Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@
"@emotion/styled": "^11.14.1",
"@kyper/hooks": "^1.0.0",
"@kyper/icon": "^1.18.1",
"@kyper/input": "^6.1.0",
"@kyper/institutionlogo": "^3.1.0",
"@kyper/messagebox": "^3.1.0",
"@kyper/progressindicators": "^3.1.0",
"@kyper/tag": "^3.0.0",
"@kyper/tokenprovider": "^4.0.1",
"@kyper/userfeedback": "^2.0.0",
"@kyper/utilityrow": "^2.1.0",
"@mui/icons-material": "^6.1.5",
"@mui/material": "^6.1.5",
Expand Down
14 changes: 6 additions & 8 deletions src/privacy/input.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable no-restricted-imports */
// This is the ONLY file that @kyper related inputs should be directly imported

import { Radio, PASSWORD_VALIDATIONS } from '@kyper/input'
import { SelectionBox } from '@mxenabled/mxui'
import { UserFeedback } from '@kyper/userfeedback'
import { withProtection } from 'src/privacy/withProtection'
import { TextField } from '@mxenabled/mxui'

Expand All @@ -19,14 +16,15 @@ import { TextField } from '@mxenabled/mxui'
*/

const ProtectedTextField = withProtection(TextField)
const ProtectedRadio = withProtection(Radio)
const ProtectedSelectionBox = withProtection(SelectionBox)
const ProtectedUserFeedback = withProtection(UserFeedback)
const PasswordValidations = {
LEADING_SPACE: 'leading_space',
TRAILING_SPACE: 'trailing_space',
LEADING_AND_TRAILING_SPACE: 'leading_and_trailing_space',
}

export {
ProtectedTextField as TextField,
ProtectedRadio as Radio,
ProtectedSelectionBox as SelectionBox,
ProtectedUserFeedback as UserFeedback,
PASSWORD_VALIDATIONS as PasswordValidations,
PasswordValidations,
}
4 changes: 2 additions & 2 deletions src/views/credentials/usePasswordInputValidation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ const validation = {
},
}

const DEFAULT_VALIDATION_STATE: Record<keyof typeof PasswordValidations, boolean> = {
const DEFAULT_VALIDATION_STATE = {
[PasswordValidations.LEADING_SPACE]: false,
[PasswordValidations.TRAILING_SPACE]: false,
[PasswordValidations.LEADING_AND_TRAILING_SPACE]: false,
}

const PASSWORD_VALIDATION_MESSAGES: Record<keyof typeof PasswordValidations, string> = {
const PASSWORD_VALIDATION_MESSAGES = {
[PasswordValidations.LEADING_SPACE]: __('The first character is a blank space'),
[PasswordValidations.TRAILING_SPACE]: __('The last character is a blank space'),
[PasswordValidations.LEADING_AND_TRAILING_SPACE]: __(
Expand Down
Loading