@okta/odyssey-react-mui 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -5
- package/dist/Checkbox.js +39 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/CheckboxGroup.js +53 -0
- package/dist/CheckboxGroup.js.map +1 -0
- package/dist/OdysseyThemeProvider.js +4 -4
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/Radio.js +11 -13
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +4 -14
- package/dist/RadioGroup.js.map +1 -1
- package/dist/TextField.js +25 -27
- package/dist/TextField.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/src/Banner.d.ts.map +1 -0
- package/dist/src/Checkbox.d.ts +28 -0
- package/dist/src/Checkbox.d.ts.map +1 -0
- package/dist/src/CheckboxGroup.d.ts +24 -0
- package/dist/src/CheckboxGroup.d.ts.map +1 -0
- package/dist/src/Icon.d.ts +28 -0
- package/dist/src/Icon.d.ts.map +1 -0
- package/dist/src/Infobox.d.ts.map +1 -0
- package/dist/src/Link.d.ts +18 -0
- package/dist/src/Link.d.ts.map +1 -0
- package/dist/src/MenuButton.d.ts.map +1 -0
- package/dist/{MenuItem.d.ts → src/MenuItem.d.ts} +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -0
- package/dist/src/OdysseyCacheProvider.d.ts.map +1 -0
- package/dist/{OdysseyThemeProvider.d.ts → src/OdysseyThemeProvider.d.ts} +3 -3
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -0
- package/dist/{PasswordInput.d.ts → src/PasswordInput.d.ts} +1 -1
- package/dist/src/PasswordInput.d.ts.map +1 -0
- package/dist/{Radio.d.ts → src/Radio.d.ts} +6 -1
- package/dist/src/Radio.d.ts.map +1 -0
- package/dist/{RadioGroup.d.ts → src/RadioGroup.d.ts} +12 -5
- package/dist/src/RadioGroup.d.ts.map +1 -0
- package/dist/src/Status.d.ts.map +1 -0
- package/dist/{TextField.d.ts → src/TextField.d.ts} +23 -14
- package/dist/src/TextField.d.ts.map +1 -0
- package/dist/src/ThemeProvider.d.ts.map +1 -0
- package/dist/src/a11yCheck.d.ts.map +1 -0
- package/dist/src/createUniqueAlphabeticalId.d.ts.map +1 -0
- package/dist/src/createUniqueId.d.ts.map +1 -0
- package/dist/src/iconDictionary/Add.d.ts +16 -0
- package/dist/src/iconDictionary/Add.d.ts.map +1 -0
- package/dist/src/iconDictionary/AddCircle.d.ts +16 -0
- package/dist/src/iconDictionary/AddCircle.d.ts.map +1 -0
- package/dist/src/iconDictionary/AlertCircle.d.ts +16 -0
- package/dist/src/iconDictionary/AlertCircle.d.ts.map +1 -0
- package/dist/src/iconDictionary/AlertCircleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/AlertCircleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/AlertTriangleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/Anchor.d.ts +16 -0
- package/dist/src/iconDictionary/Anchor.d.ts.map +1 -0
- package/dist/src/iconDictionary/ArrowDown.d.ts +16 -0
- package/dist/src/iconDictionary/ArrowDown.d.ts.map +1 -0
- package/dist/src/iconDictionary/ArrowLeft.d.ts +16 -0
- package/dist/src/iconDictionary/ArrowLeft.d.ts.map +1 -0
- package/dist/src/iconDictionary/ArrowRight.d.ts +16 -0
- package/dist/src/iconDictionary/ArrowRight.d.ts.map +1 -0
- package/dist/src/iconDictionary/ArrowUp.d.ts +16 -0
- package/dist/src/iconDictionary/ArrowUp.d.ts.map +1 -0
- package/dist/src/iconDictionary/ArrowUpDown.d.ts +16 -0
- package/dist/src/iconDictionary/ArrowUpDown.d.ts.map +1 -0
- package/dist/src/iconDictionary/Calendar.d.ts +16 -0
- package/dist/src/iconDictionary/Calendar.d.ts.map +1 -0
- package/dist/src/iconDictionary/Check.d.ts +16 -0
- package/dist/src/iconDictionary/Check.d.ts.map +1 -0
- package/dist/src/iconDictionary/CheckCircleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/CheckCircleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/ChevronDown.d.ts +16 -0
- package/dist/src/iconDictionary/ChevronDown.d.ts.map +1 -0
- package/dist/src/iconDictionary/ChevronUp.d.ts +16 -0
- package/dist/src/iconDictionary/ChevronUp.d.ts.map +1 -0
- package/dist/src/iconDictionary/Close.d.ts +16 -0
- package/dist/src/iconDictionary/Close.d.ts.map +1 -0
- package/dist/src/iconDictionary/CloseCircleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/CloseCircleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/Copy.d.ts +16 -0
- package/dist/src/iconDictionary/Copy.d.ts.map +1 -0
- package/dist/src/iconDictionary/Delete.d.ts +16 -0
- package/dist/src/iconDictionary/Delete.d.ts.map +1 -0
- package/dist/src/iconDictionary/Download.d.ts +16 -0
- package/dist/src/iconDictionary/Download.d.ts.map +1 -0
- package/dist/src/iconDictionary/DragHandle.d.ts +16 -0
- package/dist/src/iconDictionary/DragHandle.d.ts.map +1 -0
- package/dist/src/iconDictionary/Edit.d.ts +16 -0
- package/dist/src/iconDictionary/Edit.d.ts.map +1 -0
- package/dist/src/iconDictionary/ExternalLink.d.ts +16 -0
- package/dist/src/iconDictionary/ExternalLink.d.ts.map +1 -0
- package/dist/src/iconDictionary/Eye.d.ts +16 -0
- package/dist/src/iconDictionary/Eye.d.ts.map +1 -0
- package/dist/src/iconDictionary/EyeOff.d.ts +16 -0
- package/dist/src/iconDictionary/EyeOff.d.ts.map +1 -0
- package/dist/src/iconDictionary/Filter.d.ts +16 -0
- package/dist/src/iconDictionary/Filter.d.ts.map +1 -0
- package/dist/src/iconDictionary/Globe.d.ts +16 -0
- package/dist/src/iconDictionary/Globe.d.ts.map +1 -0
- package/dist/src/iconDictionary/Home.d.ts +16 -0
- package/dist/src/iconDictionary/Home.d.ts.map +1 -0
- package/dist/src/iconDictionary/InformationCircle.d.ts +16 -0
- package/dist/src/iconDictionary/InformationCircle.d.ts.map +1 -0
- package/dist/src/iconDictionary/InformationCircleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/InformationCircleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/Notification.d.ts +16 -0
- package/dist/src/iconDictionary/Notification.d.ts.map +1 -0
- package/dist/src/iconDictionary/OverflowVertical.d.ts +16 -0
- package/dist/src/iconDictionary/OverflowVertical.d.ts.map +1 -0
- package/dist/src/iconDictionary/QuestionCircle.d.ts +16 -0
- package/dist/src/iconDictionary/QuestionCircle.d.ts.map +1 -0
- package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +16 -0
- package/dist/src/iconDictionary/QuestionCircleFilled.d.ts.map +1 -0
- package/dist/src/iconDictionary/Search.d.ts +16 -0
- package/dist/src/iconDictionary/Search.d.ts.map +1 -0
- package/dist/src/iconDictionary/Settings.d.ts +16 -0
- package/dist/src/iconDictionary/Settings.d.ts.map +1 -0
- package/dist/src/iconDictionary/Subtract.d.ts +16 -0
- package/dist/src/iconDictionary/Subtract.d.ts.map +1 -0
- package/dist/src/iconDictionary/SvgIcon.d.ts.map +1 -0
- package/dist/src/iconDictionary/User.d.ts +16 -0
- package/dist/src/iconDictionary/User.d.ts.map +1 -0
- package/dist/src/iconDictionary/UserGroup.d.ts +16 -0
- package/dist/src/iconDictionary/UserGroup.d.ts.map +1 -0
- package/dist/src/iconDictionary/index.d.ts +94 -0
- package/dist/src/iconDictionary/index.d.ts.map +1 -0
- package/dist/src/iconDictionary/types.d.ts.map +1 -0
- package/dist/src/index.d.ts +50 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/theme/OdysseyTheme.d.ts +23 -0
- package/dist/src/theme/OdysseyTheme.d.ts.map +1 -0
- package/dist/src/theme/components.d.ts.map +1 -0
- package/dist/src/theme/components.types.d.ts.map +1 -0
- package/dist/{theme → src/theme}/index.d.ts +1 -0
- package/dist/src/theme/index.d.ts.map +1 -0
- package/dist/src/theme/mixins.d.ts.map +1 -0
- package/dist/src/theme/mixins.types.d.ts.map +1 -0
- package/dist/src/theme/palette.d.ts.map +1 -0
- package/dist/src/theme/palette.types.d.ts.map +1 -0
- package/dist/src/theme/shape.d.ts.map +1 -0
- package/dist/src/theme/spacing.d.ts.map +1 -0
- package/dist/src/theme/temp.d.ts +16 -0
- package/dist/src/theme/temp.d.ts.map +1 -0
- package/dist/{theme → src/theme}/theme.d.ts +2 -1
- package/dist/src/theme/theme.d.ts.map +1 -0
- package/dist/src/theme/typography.d.ts.map +1 -0
- package/dist/src/theme/typography.types.d.ts.map +1 -0
- package/dist/src/theme/useTheme.d.ts +14 -0
- package/dist/src/theme/useTheme.d.ts.map +1 -0
- package/dist/src/useUniqueAlphabeticalId.d.ts.map +1 -0
- package/dist/src/useUniqueId.d.ts.map +1 -0
- package/dist/theme/OdysseyTheme.js +2 -0
- package/dist/theme/OdysseyTheme.js.map +1 -0
- package/dist/theme/components.js +12 -4
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/temp.js +15 -0
- package/dist/theme/temp.js.map +1 -0
- package/dist/theme/theme.js +2 -0
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/useTheme.js +16 -0
- package/dist/theme/useTheme.js.map +1 -0
- package/dist/tsconfig.production.tsbuildinfo +1 -0
- package/package.json +6 -5
- package/src/Checkbox.tsx +62 -0
- package/src/CheckboxGroup.tsx +73 -0
- package/src/OdysseyThemeProvider.tsx +6 -10
- package/src/Radio.tsx +26 -3
- package/src/RadioGroup.tsx +16 -5
- package/src/TextField.tsx +134 -115
- package/src/index.ts +10 -5
- package/src/theme/OdysseyTheme.ts +25 -0
- package/src/theme/components.tsx +10 -2
- package/src/theme/index.ts +1 -0
- package/src/theme/temp.ts +19 -0
- package/src/theme/theme.ts +4 -1
- package/src/theme/useTheme.ts +18 -0
- package/tsconfig.production.json +3 -2
- package/dist/Banner.d.ts.map +0 -1
- package/dist/Icon.d.ts +0 -28
- package/dist/Icon.d.ts.map +0 -1
- package/dist/Infobox.d.ts.map +0 -1
- package/dist/Link.d.ts +0 -18
- package/dist/Link.d.ts.map +0 -1
- package/dist/MenuButton.d.ts.map +0 -1
- package/dist/MenuItem.d.ts.map +0 -1
- package/dist/OdysseyCacheProvider.d.ts.map +0 -1
- package/dist/OdysseyThemeProvider.d.ts.map +0 -1
- package/dist/PasswordInput.d.ts.map +0 -1
- package/dist/Radio.d.ts.map +0 -1
- package/dist/RadioGroup.d.ts.map +0 -1
- package/dist/Status.d.ts.map +0 -1
- package/dist/TextField.d.ts.map +0 -1
- package/dist/ThemeProvider.d.ts.map +0 -1
- package/dist/a11yCheck.d.ts.map +0 -1
- package/dist/createUniqueAlphabeticalId.d.ts.map +0 -1
- package/dist/createUniqueId.d.ts.map +0 -1
- package/dist/iconDictionary/Add.d.ts +0 -16
- package/dist/iconDictionary/Add.d.ts.map +0 -1
- package/dist/iconDictionary/AddCircle.d.ts +0 -16
- package/dist/iconDictionary/AddCircle.d.ts.map +0 -1
- package/dist/iconDictionary/AlertCircle.d.ts +0 -16
- package/dist/iconDictionary/AlertCircle.d.ts.map +0 -1
- package/dist/iconDictionary/AlertCircleFilled.d.ts +0 -16
- package/dist/iconDictionary/AlertCircleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/AlertTriangleFilled.d.ts +0 -16
- package/dist/iconDictionary/AlertTriangleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/Anchor.d.ts +0 -16
- package/dist/iconDictionary/Anchor.d.ts.map +0 -1
- package/dist/iconDictionary/ArrowDown.d.ts +0 -16
- package/dist/iconDictionary/ArrowDown.d.ts.map +0 -1
- package/dist/iconDictionary/ArrowLeft.d.ts +0 -16
- package/dist/iconDictionary/ArrowLeft.d.ts.map +0 -1
- package/dist/iconDictionary/ArrowRight.d.ts +0 -16
- package/dist/iconDictionary/ArrowRight.d.ts.map +0 -1
- package/dist/iconDictionary/ArrowUp.d.ts +0 -16
- package/dist/iconDictionary/ArrowUp.d.ts.map +0 -1
- package/dist/iconDictionary/ArrowUpDown.d.ts +0 -16
- package/dist/iconDictionary/ArrowUpDown.d.ts.map +0 -1
- package/dist/iconDictionary/Calendar.d.ts +0 -16
- package/dist/iconDictionary/Calendar.d.ts.map +0 -1
- package/dist/iconDictionary/Check.d.ts +0 -16
- package/dist/iconDictionary/Check.d.ts.map +0 -1
- package/dist/iconDictionary/CheckCircleFilled.d.ts +0 -16
- package/dist/iconDictionary/CheckCircleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/ChevronDown.d.ts +0 -16
- package/dist/iconDictionary/ChevronDown.d.ts.map +0 -1
- package/dist/iconDictionary/ChevronUp.d.ts +0 -16
- package/dist/iconDictionary/ChevronUp.d.ts.map +0 -1
- package/dist/iconDictionary/Close.d.ts +0 -16
- package/dist/iconDictionary/Close.d.ts.map +0 -1
- package/dist/iconDictionary/CloseCircleFilled.d.ts +0 -16
- package/dist/iconDictionary/CloseCircleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/Copy.d.ts +0 -16
- package/dist/iconDictionary/Copy.d.ts.map +0 -1
- package/dist/iconDictionary/Delete.d.ts +0 -16
- package/dist/iconDictionary/Delete.d.ts.map +0 -1
- package/dist/iconDictionary/Download.d.ts +0 -16
- package/dist/iconDictionary/Download.d.ts.map +0 -1
- package/dist/iconDictionary/DragHandle.d.ts +0 -16
- package/dist/iconDictionary/DragHandle.d.ts.map +0 -1
- package/dist/iconDictionary/Edit.d.ts +0 -16
- package/dist/iconDictionary/Edit.d.ts.map +0 -1
- package/dist/iconDictionary/ExternalLink.d.ts +0 -16
- package/dist/iconDictionary/ExternalLink.d.ts.map +0 -1
- package/dist/iconDictionary/Eye.d.ts +0 -16
- package/dist/iconDictionary/Eye.d.ts.map +0 -1
- package/dist/iconDictionary/EyeOff.d.ts +0 -16
- package/dist/iconDictionary/EyeOff.d.ts.map +0 -1
- package/dist/iconDictionary/Filter.d.ts +0 -16
- package/dist/iconDictionary/Filter.d.ts.map +0 -1
- package/dist/iconDictionary/Globe.d.ts +0 -16
- package/dist/iconDictionary/Globe.d.ts.map +0 -1
- package/dist/iconDictionary/Home.d.ts +0 -16
- package/dist/iconDictionary/Home.d.ts.map +0 -1
- package/dist/iconDictionary/InformationCircle.d.ts +0 -16
- package/dist/iconDictionary/InformationCircle.d.ts.map +0 -1
- package/dist/iconDictionary/InformationCircleFilled.d.ts +0 -16
- package/dist/iconDictionary/InformationCircleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/Notification.d.ts +0 -16
- package/dist/iconDictionary/Notification.d.ts.map +0 -1
- package/dist/iconDictionary/OverflowVertical.d.ts +0 -16
- package/dist/iconDictionary/OverflowVertical.d.ts.map +0 -1
- package/dist/iconDictionary/QuestionCircle.d.ts +0 -16
- package/dist/iconDictionary/QuestionCircle.d.ts.map +0 -1
- package/dist/iconDictionary/QuestionCircleFilled.d.ts +0 -16
- package/dist/iconDictionary/QuestionCircleFilled.d.ts.map +0 -1
- package/dist/iconDictionary/Search.d.ts +0 -16
- package/dist/iconDictionary/Search.d.ts.map +0 -1
- package/dist/iconDictionary/Settings.d.ts +0 -16
- package/dist/iconDictionary/Settings.d.ts.map +0 -1
- package/dist/iconDictionary/Subtract.d.ts +0 -16
- package/dist/iconDictionary/Subtract.d.ts.map +0 -1
- package/dist/iconDictionary/SvgIcon.d.ts.map +0 -1
- package/dist/iconDictionary/User.d.ts +0 -16
- package/dist/iconDictionary/User.d.ts.map +0 -1
- package/dist/iconDictionary/UserGroup.d.ts +0 -16
- package/dist/iconDictionary/UserGroup.d.ts.map +0 -1
- package/dist/iconDictionary/index.d.ts +0 -94
- package/dist/iconDictionary/index.d.ts.map +0 -1
- package/dist/iconDictionary/types.d.ts.map +0 -1
- package/dist/index.d.ts +0 -36
- package/dist/index.d.ts.map +0 -1
- package/dist/theme/components.d.ts.map +0 -1
- package/dist/theme/components.types.d.ts.map +0 -1
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/mixins.d.ts.map +0 -1
- package/dist/theme/mixins.types.d.ts.map +0 -1
- package/dist/theme/palette.d.ts.map +0 -1
- package/dist/theme/palette.types.d.ts.map +0 -1
- package/dist/theme/shape.d.ts.map +0 -1
- package/dist/theme/spacing.d.ts.map +0 -1
- package/dist/theme/theme.d.ts.map +0 -1
- package/dist/theme/typography.d.ts.map +0 -1
- package/dist/theme/typography.types.d.ts.map +0 -1
- package/dist/useUniqueAlphabeticalId.d.ts.map +0 -1
- package/dist/useUniqueId.d.ts.map +0 -1
- /package/dist/{Banner.d.ts → src/Banner.d.ts} +0 -0
- /package/dist/{Infobox.d.ts → src/Infobox.d.ts} +0 -0
- /package/dist/{MenuButton.d.ts → src/MenuButton.d.ts} +0 -0
- /package/dist/{OdysseyCacheProvider.d.ts → src/OdysseyCacheProvider.d.ts} +0 -0
- /package/dist/{Status.d.ts → src/Status.d.ts} +0 -0
- /package/dist/{ThemeProvider.d.ts → src/ThemeProvider.d.ts} +0 -0
- /package/dist/{a11yCheck.d.ts → src/a11yCheck.d.ts} +0 -0
- /package/dist/{createUniqueAlphabeticalId.d.ts → src/createUniqueAlphabeticalId.d.ts} +0 -0
- /package/dist/{createUniqueId.d.ts → src/createUniqueId.d.ts} +0 -0
- /package/dist/{iconDictionary → src/iconDictionary}/SvgIcon.d.ts +0 -0
- /package/dist/{iconDictionary → src/iconDictionary}/types.d.ts +0 -0
- /package/dist/{theme → src/theme}/components.d.ts +0 -0
- /package/dist/{theme → src/theme}/components.types.d.ts +0 -0
- /package/dist/{theme → src/theme}/mixins.d.ts +0 -0
- /package/dist/{theme → src/theme}/mixins.types.d.ts +0 -0
- /package/dist/{theme → src/theme}/palette.d.ts +0 -0
- /package/dist/{theme → src/theme}/palette.types.d.ts +0 -0
- /package/dist/{theme → src/theme}/shape.d.ts +0 -0
- /package/dist/{theme → src/theme}/spacing.d.ts +0 -0
- /package/dist/{theme → src/theme}/typography.d.ts +0 -0
- /package/dist/{theme → src/theme}/typography.types.d.ts +0 -0
- /package/dist/{useUniqueAlphabeticalId.d.ts → src/useUniqueAlphabeticalId.d.ts} +0 -0
- /package/dist/{useUniqueId.d.ts → src/useUniqueId.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okta/odyssey-react-mui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "React MUI components for Odyssey, Okta's design system",
|
|
5
5
|
"author": "Okta, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
10
|
+
"types": "dist/src/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"default": "./dist/index.js"
|
|
13
|
+
"default": "./dist/index.js",
|
|
14
|
+
"types": "./dist/src/index.d.ts"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"repository": {
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"@mui/lab": "^5.0.0-alpha.117",
|
|
25
26
|
"@mui/material": "^5.11.6",
|
|
26
27
|
"@mui/utils": "^5.11.2",
|
|
27
|
-
"@okta/odyssey-design-tokens": "0.
|
|
28
|
+
"@okta/odyssey-design-tokens": "0.21.1"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@emotion/react": "^11",
|
|
@@ -32,5 +33,5 @@
|
|
|
32
33
|
"react": ">=17 <19",
|
|
33
34
|
"react-dom": ">=17 <19"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "721bec01e965f923e751749922e1073f63066783"
|
|
36
37
|
}
|
package/src/Checkbox.tsx
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { Checkbox as MuiCheckbox } from "@mui/material";
|
|
14
|
+
import { ChangeEventHandler, memo } from "react";
|
|
15
|
+
|
|
16
|
+
import { FormControlLabel } from ".";
|
|
17
|
+
|
|
18
|
+
export type CheckboxProps = {
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
ariaLabelledBy?: string;
|
|
21
|
+
isChecked?: boolean;
|
|
22
|
+
isDefaultChecked?: boolean;
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
hasError?: boolean;
|
|
25
|
+
isIndeterminate?: boolean;
|
|
26
|
+
label?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
onChange?: ChangeEventHandler<EventTarget>;
|
|
29
|
+
value?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const Checkbox = ({
|
|
33
|
+
ariaLabel,
|
|
34
|
+
ariaLabelledBy,
|
|
35
|
+
isChecked,
|
|
36
|
+
isDefaultChecked,
|
|
37
|
+
isDisabled,
|
|
38
|
+
isIndeterminate,
|
|
39
|
+
hasError,
|
|
40
|
+
label,
|
|
41
|
+
name,
|
|
42
|
+
onChange,
|
|
43
|
+
value,
|
|
44
|
+
}: CheckboxProps) => (
|
|
45
|
+
<FormControlLabel
|
|
46
|
+
aria-label={ariaLabel}
|
|
47
|
+
aria-labelledby={ariaLabelledBy}
|
|
48
|
+
checked={isChecked}
|
|
49
|
+
className={hasError ? "Mui-error" : ""}
|
|
50
|
+
control={<MuiCheckbox indeterminate={isIndeterminate} />}
|
|
51
|
+
defaultChecked={isDefaultChecked}
|
|
52
|
+
disabled={isDisabled}
|
|
53
|
+
label={label}
|
|
54
|
+
name={name}
|
|
55
|
+
onChange={onChange}
|
|
56
|
+
value={value}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const MemoizedCheckbox = memo(Checkbox);
|
|
61
|
+
|
|
62
|
+
export { MemoizedCheckbox as Checkbox };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo, ReactElement, useMemo } from "react";
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
Checkbox,
|
|
17
|
+
FormControl,
|
|
18
|
+
FormGroup,
|
|
19
|
+
FormHelperText,
|
|
20
|
+
FormLabel,
|
|
21
|
+
visuallyHidden,
|
|
22
|
+
} from ".";
|
|
23
|
+
|
|
24
|
+
export type CheckboxGroupProps = {
|
|
25
|
+
children:
|
|
26
|
+
| ReactElement<typeof Checkbox>
|
|
27
|
+
| Array<ReactElement<typeof Checkbox>>;
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
hint?: string;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
label?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const CheckboxGroup = ({
|
|
36
|
+
children,
|
|
37
|
+
isDisabled,
|
|
38
|
+
errorMessage,
|
|
39
|
+
hint,
|
|
40
|
+
label,
|
|
41
|
+
name,
|
|
42
|
+
}: CheckboxGroupProps) => {
|
|
43
|
+
const ariaDescribedBy = useMemo(
|
|
44
|
+
() =>
|
|
45
|
+
errorMessage || hint
|
|
46
|
+
? [hint && `${name}-hint`, errorMessage && `${name}-error`]
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.join(" ")
|
|
49
|
+
: undefined,
|
|
50
|
+
[errorMessage, hint, name]
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<FormControl
|
|
55
|
+
component="fieldset"
|
|
56
|
+
disabled={isDisabled}
|
|
57
|
+
error={Boolean(errorMessage)}
|
|
58
|
+
>
|
|
59
|
+
{label && <FormLabel component="legend">{label}</FormLabel>}
|
|
60
|
+
{hint && <FormHelperText id={`${name}-hint`}>{hint}</FormHelperText>}
|
|
61
|
+
<FormGroup aria-describedby={ariaDescribedBy}>{children}</FormGroup>
|
|
62
|
+
{errorMessage && (
|
|
63
|
+
<FormHelperText id={`${name}-error`} error>
|
|
64
|
+
<span style={visuallyHidden}>Error:</span> {errorMessage}
|
|
65
|
+
</FormHelperText>
|
|
66
|
+
)}
|
|
67
|
+
</FormControl>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const MemoizedCheckboxGroup = memo(CheckboxGroup);
|
|
72
|
+
|
|
73
|
+
export { MemoizedCheckboxGroup as CheckboxGroup };
|
|
@@ -10,26 +10,22 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
createTheme,
|
|
15
|
-
ThemeOptions,
|
|
16
|
-
ThemeProvider as MuiThemeProvider,
|
|
17
|
-
} from "@mui/material/styles";
|
|
18
|
-
import { deepmerge } from "@mui/utils";
|
|
13
|
+
import { ThemeProvider as MuiThemeProvider } from "@mui/material/styles";
|
|
19
14
|
import { memo, ReactElement, useMemo } from "react";
|
|
20
15
|
|
|
16
|
+
import { createTheme, deepmerge, ThemeOptions } from ".";
|
|
21
17
|
import { odysseyTheme } from "./theme";
|
|
22
18
|
|
|
23
19
|
const OdysseyThemeProvider = ({
|
|
24
20
|
children,
|
|
25
|
-
|
|
21
|
+
themeOverride,
|
|
26
22
|
}: {
|
|
27
23
|
children: ReactElement;
|
|
28
|
-
|
|
24
|
+
themeOverride?: ThemeOptions;
|
|
29
25
|
}) => {
|
|
30
26
|
const customOdysseyTheme = useMemo(
|
|
31
|
-
() =>
|
|
32
|
-
[
|
|
27
|
+
() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),
|
|
28
|
+
[themeOverride]
|
|
33
29
|
);
|
|
34
30
|
|
|
35
31
|
return (
|
package/src/Radio.tsx
CHANGED
|
@@ -10,17 +10,40 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { FormControlLabel } from "./";
|
|
14
13
|
import { Radio as MuiRadio } from "@mui/material";
|
|
15
14
|
import { memo } from "react";
|
|
16
15
|
|
|
16
|
+
import { FormControlLabel } from ".";
|
|
17
|
+
|
|
17
18
|
export type RadioProps = {
|
|
19
|
+
isChecked?: boolean;
|
|
20
|
+
isDefaultChecked?: boolean;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
hasError?: boolean;
|
|
18
23
|
label: string;
|
|
24
|
+
name?: string;
|
|
19
25
|
value: string;
|
|
20
26
|
};
|
|
21
27
|
|
|
22
|
-
const Radio = ({
|
|
23
|
-
|
|
28
|
+
const Radio = ({
|
|
29
|
+
isChecked,
|
|
30
|
+
isDefaultChecked,
|
|
31
|
+
isDisabled,
|
|
32
|
+
hasError,
|
|
33
|
+
label,
|
|
34
|
+
name,
|
|
35
|
+
value,
|
|
36
|
+
}: RadioProps) => (
|
|
37
|
+
<FormControlLabel
|
|
38
|
+
checked={isChecked}
|
|
39
|
+
className={hasError ? "Mui-error" : ""}
|
|
40
|
+
control={<MuiRadio />}
|
|
41
|
+
defaultChecked={isDefaultChecked}
|
|
42
|
+
disabled={isDisabled}
|
|
43
|
+
label={label}
|
|
44
|
+
name={name}
|
|
45
|
+
value={value}
|
|
46
|
+
/>
|
|
24
47
|
);
|
|
25
48
|
|
|
26
49
|
const MemoizedRadio = memo(Radio);
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { RadioGroup as MuiRadioGroup } from "@mui/material";
|
|
14
|
+
import { ChangeEventHandler, memo, ReactElement, useMemo } from "react";
|
|
15
|
+
|
|
13
16
|
import {
|
|
14
17
|
FormControl,
|
|
15
18
|
FormLabel,
|
|
@@ -17,9 +20,8 @@ import {
|
|
|
17
20
|
visuallyHidden,
|
|
18
21
|
Radio,
|
|
19
22
|
useUniqueId,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import { memo, ReactElement, useMemo } from "react";
|
|
23
|
+
RadioProps,
|
|
24
|
+
} from ".";
|
|
23
25
|
|
|
24
26
|
export interface RadioGroupProps {
|
|
25
27
|
/**
|
|
@@ -47,10 +49,17 @@ export interface RadioGroupProps {
|
|
|
47
49
|
*/
|
|
48
50
|
label: string;
|
|
49
51
|
/**
|
|
50
|
-
* The name of the radio group, which only needs to be changed
|
|
51
|
-
* if there are multiple radio groups on the same screen
|
|
52
|
+
* The name of the radio group, which only needs to be changed if there are multiple radio groups on the same screen
|
|
52
53
|
*/
|
|
53
54
|
name?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Listen for changes in the browser that change `value`.
|
|
57
|
+
*/
|
|
58
|
+
onChange?: ChangeEventHandler<EventTarget>;
|
|
59
|
+
/**
|
|
60
|
+
* The `value` on the selected radio button.
|
|
61
|
+
*/
|
|
62
|
+
value?: RadioProps["value"];
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
const RadioGroup = ({
|
|
@@ -61,6 +70,7 @@ const RadioGroup = ({
|
|
|
61
70
|
isDisabled,
|
|
62
71
|
label,
|
|
63
72
|
name,
|
|
73
|
+
onChange,
|
|
64
74
|
}: RadioGroupProps) => {
|
|
65
75
|
const ariaDescribedBy = useMemo(
|
|
66
76
|
() =>
|
|
@@ -88,6 +98,7 @@ const RadioGroup = ({
|
|
|
88
98
|
aria-describedby={ariaDescribedBy}
|
|
89
99
|
defaultValue={defaultValue}
|
|
90
100
|
name={uniqueName}
|
|
101
|
+
onChange={onChange}
|
|
91
102
|
>
|
|
92
103
|
{children}
|
|
93
104
|
</MuiRadioGroup>
|
package/src/TextField.tsx
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {
|
|
14
|
+
InputAdornment,
|
|
15
|
+
InputBase,
|
|
16
|
+
InputBaseProps,
|
|
17
|
+
InputLabel,
|
|
18
|
+
} from "@mui/material";
|
|
13
19
|
import {
|
|
14
20
|
ChangeEventHandler,
|
|
15
21
|
FocusEventHandler,
|
|
@@ -22,19 +28,17 @@ import {
|
|
|
22
28
|
useMemo,
|
|
23
29
|
useState,
|
|
24
30
|
} from "react";
|
|
31
|
+
|
|
25
32
|
import {
|
|
26
33
|
EyeIcon,
|
|
27
34
|
EyeOffIcon,
|
|
28
35
|
FormControl,
|
|
29
36
|
FormHelperText,
|
|
30
37
|
IconButton,
|
|
31
|
-
InputAdornment,
|
|
32
|
-
InputBase,
|
|
33
|
-
InputLabel,
|
|
34
38
|
SearchIcon,
|
|
35
39
|
Typography,
|
|
36
|
-
visuallyHidden,
|
|
37
40
|
useUniqueId,
|
|
41
|
+
visuallyHidden,
|
|
38
42
|
} from "./";
|
|
39
43
|
|
|
40
44
|
export type TextFieldProps = {
|
|
@@ -44,10 +48,6 @@ export type TextFieldProps = {
|
|
|
44
48
|
* You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
|
|
45
49
|
*/
|
|
46
50
|
autoCompleteType?: InputHTMLAttributes<HTMLInputElement>["autoComplete"];
|
|
47
|
-
/**
|
|
48
|
-
* If `true`, the component is disabled.
|
|
49
|
-
*/
|
|
50
|
-
isDisabled?: boolean;
|
|
51
51
|
/**
|
|
52
52
|
* End `InputAdornment` for this component.
|
|
53
53
|
*/
|
|
@@ -65,13 +65,33 @@ export type TextFieldProps = {
|
|
|
65
65
|
*/
|
|
66
66
|
id?: string;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Props that go onto the HTML `input` element.
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
inputProps?: InputBaseProps["inputProps"];
|
|
71
|
+
/**
|
|
72
|
+
* If `true`, the component is disabled.
|
|
73
|
+
*/
|
|
74
|
+
isDisabled?: boolean;
|
|
71
75
|
/**
|
|
72
76
|
* If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
|
|
73
77
|
*/
|
|
74
78
|
isMultiline?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* It prevents the user from changing the value of the field
|
|
81
|
+
*/
|
|
82
|
+
isReadOnly?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* If `true`, the `input` element is required.
|
|
85
|
+
*/
|
|
86
|
+
isRequired?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The label for the `input` element.
|
|
89
|
+
*/
|
|
90
|
+
label?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Callback fired when the `input` element loses focus.
|
|
93
|
+
*/
|
|
94
|
+
onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
|
75
95
|
/**
|
|
76
96
|
* Callback fired when the value is changed.
|
|
77
97
|
*/
|
|
@@ -88,14 +108,6 @@ export type TextFieldProps = {
|
|
|
88
108
|
* The short hint displayed in the `input` before the user enters a value.
|
|
89
109
|
*/
|
|
90
110
|
placeholder?: string;
|
|
91
|
-
/**
|
|
92
|
-
* It prevents the user from changing the value of the field
|
|
93
|
-
*/
|
|
94
|
-
isReadOnly?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* If `true`, the `input` element is required.
|
|
97
|
-
*/
|
|
98
|
-
isRequired?: boolean;
|
|
99
111
|
/**
|
|
100
112
|
* Start `InputAdornment` for this component.
|
|
101
113
|
*/
|
|
@@ -110,110 +122,117 @@ export type TextFieldProps = {
|
|
|
110
122
|
value?: unknown;
|
|
111
123
|
};
|
|
112
124
|
|
|
113
|
-
const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
|
|
126
|
+
(
|
|
127
|
+
{
|
|
128
|
+
autoCompleteType,
|
|
129
|
+
endAdornment,
|
|
130
|
+
errorMessage,
|
|
131
|
+
hint,
|
|
132
|
+
id: idOverride,
|
|
133
|
+
inputProps = {},
|
|
134
|
+
isDisabled = false,
|
|
135
|
+
isMultiline = false,
|
|
136
|
+
isReadOnly,
|
|
137
|
+
isRequired = true,
|
|
138
|
+
label,
|
|
139
|
+
onChange,
|
|
140
|
+
onFocus,
|
|
141
|
+
onBlur,
|
|
142
|
+
optionalLabel,
|
|
143
|
+
placeholder,
|
|
144
|
+
startAdornment,
|
|
145
|
+
type = "text",
|
|
146
|
+
value,
|
|
147
|
+
},
|
|
148
|
+
ref
|
|
149
|
+
) => {
|
|
150
|
+
const [inputType, setInputType] = useState(type);
|
|
133
151
|
|
|
134
|
-
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
setInputType(type);
|
|
154
|
+
}, [type]);
|
|
135
155
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
156
|
+
const togglePasswordVisibility = useCallback(() => {
|
|
157
|
+
setInputType((currentType) =>
|
|
158
|
+
currentType === "password" ? "text" : "password"
|
|
159
|
+
);
|
|
160
|
+
}, []);
|
|
139
161
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, []);
|
|
162
|
+
const id = useUniqueId(idOverride);
|
|
163
|
+
const hintId = hint ? `${id}-hint` : undefined;
|
|
164
|
+
const errorId = errorMessage ? `${id}-error` : undefined;
|
|
165
|
+
const labelId = label ? `${id}-label` : undefined;
|
|
145
166
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
const labelId = label ? `${id}-label` : undefined;
|
|
167
|
+
const localInputProps = useMemo(() => {
|
|
168
|
+
const ariaDescribedBy =
|
|
169
|
+
errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;
|
|
150
170
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
: undefined,
|
|
159
|
-
[errorId, hintId]
|
|
160
|
-
);
|
|
171
|
+
return {
|
|
172
|
+
...inputProps,
|
|
173
|
+
"aria-describedby":
|
|
174
|
+
inputProps["aria-describedby"]?.concat(` ${ariaDescribedBy}`) ??
|
|
175
|
+
ariaDescribedBy,
|
|
176
|
+
};
|
|
177
|
+
}, [errorId, hintId, inputProps]);
|
|
161
178
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
179
|
+
return (
|
|
180
|
+
<FormControl disabled={isDisabled} error={Boolean(errorMessage)}>
|
|
181
|
+
<InputLabel htmlFor={id} id={labelId}>
|
|
182
|
+
{label}
|
|
183
|
+
{!isRequired && (
|
|
184
|
+
<Typography variant="subtitle1">{optionalLabel}</Typography>
|
|
185
|
+
)}
|
|
186
|
+
</InputLabel>
|
|
187
|
+
{hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}
|
|
188
|
+
<InputBase
|
|
189
|
+
autoComplete={autoCompleteType}
|
|
190
|
+
endAdornment={
|
|
191
|
+
inputType === "password" ? (
|
|
192
|
+
<InputAdornment position="end">
|
|
193
|
+
<IconButton
|
|
194
|
+
aria-label="toggle password visibility"
|
|
195
|
+
edge="end"
|
|
196
|
+
onClick={togglePasswordVisibility}
|
|
197
|
+
>
|
|
198
|
+
{inputType === "password" ? <EyeIcon /> : <EyeOffIcon />}
|
|
199
|
+
</IconButton>
|
|
200
|
+
</InputAdornment>
|
|
201
|
+
) : (
|
|
202
|
+
endAdornment
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
id={id}
|
|
206
|
+
inputProps={localInputProps}
|
|
207
|
+
multiline={isMultiline}
|
|
208
|
+
onChange={onChange}
|
|
209
|
+
onFocus={onFocus}
|
|
210
|
+
onBlur={onBlur}
|
|
211
|
+
placeholder={placeholder}
|
|
212
|
+
readOnly={isReadOnly}
|
|
213
|
+
ref={ref}
|
|
214
|
+
startAdornment={
|
|
215
|
+
inputType === "search" ? (
|
|
216
|
+
<InputAdornment position="start">
|
|
217
|
+
<SearchIcon />
|
|
218
|
+
</InputAdornment>
|
|
219
|
+
) : (
|
|
220
|
+
startAdornment
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
type={inputType}
|
|
224
|
+
value={value}
|
|
225
|
+
/>
|
|
226
|
+
{errorMessage && (
|
|
227
|
+
<FormHelperText error id={errorId}>
|
|
228
|
+
<span style={visuallyHidden}>Error:</span>
|
|
229
|
+
{errorMessage}
|
|
230
|
+
</FormHelperText>
|
|
168
231
|
)}
|
|
169
|
-
</
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
endAdornment={
|
|
174
|
-
inputType === "password" ? (
|
|
175
|
-
<InputAdornment position="end">
|
|
176
|
-
<IconButton
|
|
177
|
-
aria-label="toggle password visibility"
|
|
178
|
-
edge="end"
|
|
179
|
-
onClick={togglePasswordVisibility}
|
|
180
|
-
>
|
|
181
|
-
{inputType === "password" ? <EyeIcon /> : <EyeOffIcon />}
|
|
182
|
-
</IconButton>
|
|
183
|
-
</InputAdornment>
|
|
184
|
-
) : (
|
|
185
|
-
endAdornment
|
|
186
|
-
)
|
|
187
|
-
}
|
|
188
|
-
id={id}
|
|
189
|
-
inputProps={inputProps}
|
|
190
|
-
multiline={isMultiline}
|
|
191
|
-
onChange={onChange}
|
|
192
|
-
onFocus={onFocus}
|
|
193
|
-
placeholder={placeholder}
|
|
194
|
-
readOnly={isReadOnly}
|
|
195
|
-
ref={ref}
|
|
196
|
-
startAdornment={
|
|
197
|
-
inputType === "search" ? (
|
|
198
|
-
<InputAdornment position="start">
|
|
199
|
-
<SearchIcon />
|
|
200
|
-
</InputAdornment>
|
|
201
|
-
) : (
|
|
202
|
-
startAdornment
|
|
203
|
-
)
|
|
204
|
-
}
|
|
205
|
-
type={inputType}
|
|
206
|
-
value={value}
|
|
207
|
-
/>
|
|
208
|
-
{errorMessage && (
|
|
209
|
-
<FormHelperText error id={errorId}>
|
|
210
|
-
<span style={visuallyHidden}>Error:</span>
|
|
211
|
-
{errorMessage}
|
|
212
|
-
</FormHelperText>
|
|
213
|
-
)}
|
|
214
|
-
</FormControl>
|
|
215
|
-
);
|
|
216
|
-
});
|
|
232
|
+
</FormControl>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
);
|
|
217
236
|
|
|
218
237
|
const MemoizedTextField = memo(TextField);
|
|
219
238
|
|
package/src/index.ts
CHANGED
|
@@ -15,9 +15,9 @@ export {
|
|
|
15
15
|
AlertTitle,
|
|
16
16
|
Box,
|
|
17
17
|
Button,
|
|
18
|
-
Checkbox,
|
|
19
18
|
Chip,
|
|
20
19
|
CircularProgress,
|
|
20
|
+
createTheme,
|
|
21
21
|
CssBaseline,
|
|
22
22
|
Dialog,
|
|
23
23
|
DialogActions,
|
|
@@ -31,8 +31,11 @@ export {
|
|
|
31
31
|
FormHelperText,
|
|
32
32
|
FormLabel,
|
|
33
33
|
IconButton,
|
|
34
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
|
|
34
35
|
InputAdornment,
|
|
36
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
|
|
35
37
|
InputBase,
|
|
38
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */
|
|
36
39
|
InputLabel,
|
|
37
40
|
List,
|
|
38
41
|
ListItem,
|
|
@@ -58,7 +61,6 @@ export {
|
|
|
58
61
|
ThemeProvider as MuiThemeProvider,
|
|
59
62
|
Tooltip,
|
|
60
63
|
Typography,
|
|
61
|
-
useTheme,
|
|
62
64
|
} from "@mui/material";
|
|
63
65
|
|
|
64
66
|
export type {
|
|
@@ -66,7 +68,6 @@ export type {
|
|
|
66
68
|
AlertTitleProps,
|
|
67
69
|
BoxProps,
|
|
68
70
|
ButtonProps,
|
|
69
|
-
CheckboxProps,
|
|
70
71
|
ChipProps,
|
|
71
72
|
CircularProgressProps,
|
|
72
73
|
CssBaselineProps,
|
|
@@ -82,8 +83,11 @@ export type {
|
|
|
82
83
|
FormHelperTextProps,
|
|
83
84
|
FormLabelProps,
|
|
84
85
|
IconButtonProps,
|
|
86
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
|
|
85
87
|
InputAdornmentProps,
|
|
88
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
|
|
86
89
|
InputBaseProps,
|
|
90
|
+
/** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */
|
|
87
91
|
InputLabelProps,
|
|
88
92
|
ListProps,
|
|
89
93
|
ListItemProps,
|
|
@@ -110,7 +114,6 @@ export type {
|
|
|
110
114
|
ThemeOptions,
|
|
111
115
|
TooltipProps,
|
|
112
116
|
TypographyProps,
|
|
113
|
-
useThemeProps,
|
|
114
117
|
} from "@mui/material";
|
|
115
118
|
|
|
116
119
|
export { TabContext, TabList, TabPanel } from "@mui/lab";
|
|
@@ -119,9 +122,11 @@ export type { TabContextProps, TabListProps, TabPanelProps } from "@mui/lab";
|
|
|
119
122
|
|
|
120
123
|
export { default as FavoriteIcon } from "@mui/icons-material/Favorite";
|
|
121
124
|
|
|
122
|
-
export { visuallyHidden } from "@mui/utils";
|
|
125
|
+
export { deepmerge, visuallyHidden } from "@mui/utils";
|
|
123
126
|
|
|
124
127
|
export * from "./Banner";
|
|
128
|
+
export * from "./Checkbox";
|
|
129
|
+
export * from "./CheckboxGroup";
|
|
125
130
|
export * from "./createUniqueId";
|
|
126
131
|
export * from "./Icon";
|
|
127
132
|
export * from "./iconDictionary";
|