Skip to content

Commit 7bec824

Browse files
authored
Merge pull request #361 from mxenabled/jameson/CT-2400
feat(input.ts): removed @kyper/input and @kyper/userfeedback
2 parents 5a6cf97 + aca92ff commit 7bec824

4 files changed

Lines changed: 8 additions & 39 deletions

File tree

package-lock.json

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@
4545
"@emotion/styled": "^11.14.1",
4646
"@kyper/hooks": "^1.0.0",
4747
"@kyper/icon": "^1.18.1",
48-
"@kyper/input": "^6.1.0",
4948
"@kyper/messagebox": "^3.1.0",
5049
"@kyper/progressindicators": "^3.1.0",
5150
"@kyper/tag": "^3.0.0",
5251
"@kyper/tokenprovider": "^4.0.1",
53-
"@kyper/userfeedback": "^2.0.0",
5452
"@kyper/utilityrow": "^2.1.0",
5553
"@mui/icons-material": "^6.1.5",
5654
"@mui/material": "^6.1.5",

src/privacy/input.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
/* eslint-disable no-restricted-imports */
21
// This is the ONLY file that @kyper related inputs should be directly imported
32

4-
import { Radio, PASSWORD_VALIDATIONS } from '@kyper/input'
53
import { SelectionBox } from '@mxenabled/mxui'
6-
import { UserFeedback } from '@kyper/userfeedback'
74
import { withProtection } from 'src/privacy/withProtection'
85
import { TextField } from '@mxenabled/mxui'
96

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

2118
const ProtectedTextField = withProtection(TextField)
22-
const ProtectedRadio = withProtection(Radio)
2319
const ProtectedSelectionBox = withProtection(SelectionBox)
24-
const ProtectedUserFeedback = withProtection(UserFeedback)
20+
const PasswordValidations = {
21+
LEADING_SPACE: 'leading_space',
22+
TRAILING_SPACE: 'trailing_space',
23+
LEADING_AND_TRAILING_SPACE: 'leading_and_trailing_space',
24+
}
2525

2626
export {
2727
ProtectedTextField as TextField,
28-
ProtectedRadio as Radio,
2928
ProtectedSelectionBox as SelectionBox,
30-
ProtectedUserFeedback as UserFeedback,
31-
PASSWORD_VALIDATIONS as PasswordValidations,
29+
PasswordValidations,
3230
}

src/views/credentials/usePasswordInputValidation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ const validation = {
117117
},
118118
}
119119

120-
const DEFAULT_VALIDATION_STATE: Record<keyof typeof PasswordValidations, boolean> = {
120+
const DEFAULT_VALIDATION_STATE = {
121121
[PasswordValidations.LEADING_SPACE]: false,
122122
[PasswordValidations.TRAILING_SPACE]: false,
123123
[PasswordValidations.LEADING_AND_TRAILING_SPACE]: false,
124124
}
125125

126-
const PASSWORD_VALIDATION_MESSAGES: Record<keyof typeof PasswordValidations, string> = {
126+
const PASSWORD_VALIDATION_MESSAGES = {
127127
[PasswordValidations.LEADING_SPACE]: __('The first character is a blank space'),
128128
[PasswordValidations.TRAILING_SPACE]: __('The last character is a blank space'),
129129
[PasswordValidations.LEADING_AND_TRAILING_SPACE]: __(

0 commit comments

Comments
 (0)