@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/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,58 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [0.
|
|
6
|
+
## [0.21.1](https://github.com/okta/odyssey/compare/v0.21.0...v0.21.1) (2023-03-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **odyssey-react-mui:** add ability to have custom props on theme ([#1701](https://github.com/okta/odyssey/issues/1701)) ([52dd8f8](https://github.com/okta/odyssey/commit/52dd8f87411214ec5e3850a7372105460e2fd959))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- added TypeScript project references for VSCode ([#1708](https://github.com/okta/odyssey/issues/1708)) ([44e2783](https://github.com/okta/odyssey/commit/44e2783b6a87bca49fb1d5bcffa45b22adc77bbc))
|
|
15
|
+
|
|
16
|
+
## [0.21.0](https://github.com/okta/odyssey/compare/v0.20.0...v0.21.0) (2023-03-09)
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
- **odyssey-react-mui:** remove `kbd` variant from Typography component
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- abstract Radio and RadioGroup ([6b34afa](https://github.com/okta/odyssey/commit/6b34afaa83ce0043731ff8d111d3114fabd9ecf7))
|
|
25
|
+
- add DatePicker styles to Labs ([#1672](https://github.com/okta/odyssey/issues/1672)) ([f8d8b5e](https://github.com/okta/odyssey/commit/f8d8b5e4f8d30f8bce346e4dca47f88c8350a26b))
|
|
26
|
+
- add name and defaultValue attributes ([1eb7608](https://github.com/okta/odyssey/commit/1eb76081f528ebf3d529d667593d105f2c4d266d))
|
|
27
|
+
- **odyssey-react-mui:** add 'alert' to available Banner roles ([bf6f645](https://github.com/okta/odyssey/commit/bf6f6455e9271c070daa84d9668851906aa16ef4))
|
|
28
|
+
- **odyssey-react-mui:** add element styles to ScopedCssBaseline ([d2831b0](https://github.com/okta/odyssey/commit/d2831b0a8ad0a9063aea85ceaff69dcfea16314b))
|
|
29
|
+
- **odyssey-react-mui:** add MenuButton and MenuItem components ([f29c136](https://github.com/okta/odyssey/commit/f29c136b25d7df5899f55d3be6206004778fb284))
|
|
30
|
+
- **odyssey-react-mui:** export ScopedCssBaseline for use ([5a98aaa](https://github.com/okta/odyssey/commit/5a98aaacf4142f84b2e03dc13b03d4435790e014))
|
|
31
|
+
- **odyssey-react-mui:** make rem-base themeable, add element styles to ScopedCssBaseline ([ebafd5c](https://github.com/okta/odyssey/commit/ebafd5cb13afae7c8bf365782264c248b8345960))
|
|
32
|
+
- **odyssey-react-mui:** wrap and export Infobox ([4b0f283](https://github.com/okta/odyssey/commit/4b0f283e47fa553c2d72e3b85ee76102aa327709))
|
|
33
|
+
- **odyssey-react-mui:** wrap and export Status component ([55ac9c9](https://github.com/okta/odyssey/commit/55ac9c9e9b204e4262c8a7a39b60b48627baae30))
|
|
34
|
+
- re-exported MUI List components as Odyssey MUI components ([9a78122](https://github.com/okta/odyssey/commit/9a781222830fb3003ce935cbacedf5a0b62a1cec))
|
|
35
|
+
- updated a bunch of packages to the latest version ([36ce1d0](https://github.com/okta/odyssey/commit/36ce1d09a621f273878345c20cfc782059c04cd2))
|
|
36
|
+
- updated Radio and fixed types on TextField and Banner ([9cfa050](https://github.com/okta/odyssey/commit/9cfa05093fa59923085bcac18908065457a018f4))
|
|
37
|
+
- wrap banner and add stories ([0ccfbd0](https://github.com/okta/odyssey/commit/0ccfbd0ef845c1f598c5409d37e5fb9a83d94f47))
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- add Status import to index ([d16b6df](https://github.com/okta/odyssey/commit/d16b6df831dd22accbc58450595a642b2330c42d))
|
|
42
|
+
- adjusted boolean prop names in Radio ([25eb5d1](https://github.com/okta/odyssey/commit/25eb5d1686526355c2b1ae4b83f23c80c5c72951))
|
|
43
|
+
- adjusted boolean prop names in RadioGroup ([135a8ec](https://github.com/okta/odyssey/commit/135a8ec09a25b849eb413b93548dca1683480b1e))
|
|
44
|
+
- another potential Lerna build order fix ([b4eb393](https://github.com/okta/odyssey/commit/b4eb39322204682e0b33dd76a7901370de754020))
|
|
45
|
+
- DatePicker styles with updated spec ([#1697](https://github.com/okta/odyssey/issues/1697)) ([cba0894](https://github.com/okta/odyssey/commit/cba0894bc1def44ea48bf74ffd4dbf487fdd3a8c))
|
|
46
|
+
- ensure aria-describedby only show when needed ([a75a290](https://github.com/okta/odyssey/commit/a75a29038164875c1a56329669ac95159ba689f2))
|
|
47
|
+
- **odyssey-react-mui:** don't require children prop for Icon buttons ([a333527](https://github.com/okta/odyssey/commit/a3335273c07cf479ff764d2c797fc1d10d66806b))
|
|
48
|
+
- **odyssey-react-mui:** make figcaption styles a fallback ([a4a232a](https://github.com/okta/odyssey/commit/a4a232a99964f683df9a913ec003b8c81219eed3))
|
|
49
|
+
- **odyssey-react-mui:** make Link a11y-compliant in all cases ([baf01c0](https://github.com/okta/odyssey/commit/baf01c0d6650b83a4b5db3e5bf7fad863d4a25f6))
|
|
50
|
+
- **odyssey-react-mui:** provide safety dec for input box-shadow ([9562e74](https://github.com/okta/odyssey/commit/9562e7482b69b005b7d48f2694890a3b5277693c))
|
|
51
|
+
- onClose prop type ([4c2052f](https://github.com/okta/odyssey/commit/4c2052f7d3f449dafdac892b2e1bbeb8cb7ceacc))
|
|
52
|
+
- remove vestigial AlertProps import ([af7883b](https://github.com/okta/odyssey/commit/af7883b3c54257e5deeeca6db6ff9e62580c9694))
|
|
53
|
+
- textAlign logical value in FormHelperText for RTL support ([19208d5](https://github.com/okta/odyssey/commit/19208d5aed4677d9198f56cd2da0598913e4b5e1))
|
|
54
|
+
- update physical CSS properties (_-left, _-right) to use logical CSS counterpart for RTL support ([08ac38c](https://github.com/okta/odyssey/commit/08ac38c303d01de7a8c5b9ea2600a0bfec3acb5e))
|
|
55
|
+
- update type of onClose for lintert ([6983d7d](https://github.com/okta/odyssey/commit/6983d7d5aad1864593579a3e9d9df6c2c5f1b137))
|
|
56
|
+
|
|
57
|
+
## [0.20.0](https://github.com/okta/odyssey/compare/v0.19.0...v0.20.0) (2023-02-23)
|
|
7
58
|
|
|
8
59
|
### ⚠ BREAKING CHANGES
|
|
9
60
|
|
|
@@ -68,7 +119,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
68
119
|
- updated prop names ([1a73aa8](https://github.com/okta/odyssey/commit/1a73aa8aa1197e47795cda7b54382deb9ed56628))
|
|
69
120
|
- upgraded MUI icons ([c978ab6](https://github.com/okta/odyssey/commit/c978ab66375f649a9b66544dbc490cc0442cff2c))
|
|
70
121
|
|
|
71
|
-
## [0.19.0](https://github.com/okta/odyssey/compare/v0.
|
|
122
|
+
## [0.19.0](https://github.com/okta/odyssey/compare/v0.18.0...v0.19.0) (2023-02-09)
|
|
72
123
|
|
|
73
124
|
### ⚠ BREAKING CHANGES
|
|
74
125
|
|
|
@@ -132,7 +183,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
132
183
|
- updated prop names ([1a73aa8](https://github.com/okta/odyssey/commit/1a73aa8aa1197e47795cda7b54382deb9ed56628))
|
|
133
184
|
- upgraded MUI icons ([c978ab6](https://github.com/okta/odyssey/commit/c978ab66375f649a9b66544dbc490cc0442cff2c))
|
|
134
185
|
|
|
135
|
-
## [0.18.0](https://github.com/okta/odyssey/compare/v0.
|
|
186
|
+
## [0.18.0](https://github.com/okta/odyssey/compare/v0.17.2...v0.18.0) (2023-02-02)
|
|
136
187
|
|
|
137
188
|
### ⚠ BREAKING CHANGES
|
|
138
189
|
|
|
@@ -194,7 +245,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
194
245
|
- updated prop names ([1a73aa8](https://github.com/okta/odyssey/commit/1a73aa8aa1197e47795cda7b54382deb9ed56628))
|
|
195
246
|
- upgraded MUI icons ([c978ab6](https://github.com/okta/odyssey/commit/c978ab66375f649a9b66544dbc490cc0442cff2c))
|
|
196
247
|
|
|
197
|
-
### [0.17.2](https://github.com/okta/odyssey/compare/v0.
|
|
248
|
+
### [0.17.2](https://github.com/okta/odyssey/compare/v0.17.1...v0.17.2) (2023-01-12)
|
|
198
249
|
|
|
199
250
|
### Features
|
|
200
251
|
|
|
@@ -228,7 +279,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
228
279
|
- updated prop names ([1a73aa8](https://github.com/okta/odyssey/commit/1a73aa8aa1197e47795cda7b54382deb9ed56628))
|
|
229
280
|
- upgraded MUI icons ([c978ab6](https://github.com/okta/odyssey/commit/c978ab66375f649a9b66544dbc490cc0442cff2c))
|
|
230
281
|
|
|
231
|
-
### [0.17.1](https://github.com/okta/odyssey/compare/v0.
|
|
282
|
+
### [0.17.1](https://github.com/okta/odyssey/compare/v0.17.0...v0.17.1) (2022-12-09)
|
|
232
283
|
|
|
233
284
|
### Features
|
|
234
285
|
|
package/dist/Checkbox.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _Checkbox from "@mui/material/Checkbox";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { FormControlLabel } from "./index.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
const Checkbox = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
ariaLabel,
|
|
9
|
+
ariaLabelledBy,
|
|
10
|
+
isChecked,
|
|
11
|
+
isDefaultChecked,
|
|
12
|
+
isDisabled,
|
|
13
|
+
isIndeterminate,
|
|
14
|
+
hasError,
|
|
15
|
+
label,
|
|
16
|
+
name,
|
|
17
|
+
onChange,
|
|
18
|
+
value
|
|
19
|
+
} = _ref;
|
|
20
|
+
return _jsx(FormControlLabel, {
|
|
21
|
+
"aria-label": ariaLabel,
|
|
22
|
+
"aria-labelledby": ariaLabelledBy,
|
|
23
|
+
checked: isChecked,
|
|
24
|
+
className: hasError ? "Mui-error" : "",
|
|
25
|
+
control: _jsx(_Checkbox, {
|
|
26
|
+
indeterminate: isIndeterminate
|
|
27
|
+
}),
|
|
28
|
+
defaultChecked: isDefaultChecked,
|
|
29
|
+
disabled: isDisabled,
|
|
30
|
+
label: label,
|
|
31
|
+
name: name,
|
|
32
|
+
onChange: onChange,
|
|
33
|
+
value: value
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const MemoizedCheckbox = memo(Checkbox);
|
|
38
|
+
export { MemoizedCheckbox as Checkbox };
|
|
39
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["memo","FormControlLabel","Checkbox","ariaLabel","ariaLabelledBy","isChecked","isDefaultChecked","isDisabled","isIndeterminate","hasError","label","name","onChange","value","MemoizedCheckbox"],"sources":["../src/Checkbox.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Checkbox as MuiCheckbox } from \"@mui/material\";\nimport { ChangeEventHandler, memo } from \"react\";\n\nimport { FormControlLabel } from \".\";\n\nexport type CheckboxProps = {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n isChecked?: boolean;\n isDefaultChecked?: boolean;\n isDisabled?: boolean;\n hasError?: boolean;\n isIndeterminate?: boolean;\n label?: string;\n name?: string;\n onChange?: ChangeEventHandler<EventTarget>;\n value?: string;\n};\n\nconst Checkbox = ({\n ariaLabel,\n ariaLabelledBy,\n isChecked,\n isDefaultChecked,\n isDisabled,\n isIndeterminate,\n hasError,\n label,\n name,\n onChange,\n value,\n}: CheckboxProps) => (\n <FormControlLabel\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n checked={isChecked}\n className={hasError ? \"Mui-error\" : \"\"}\n control={<MuiCheckbox indeterminate={isIndeterminate} />}\n defaultChecked={isDefaultChecked}\n disabled={isDisabled}\n label={label}\n name={name}\n onChange={onChange}\n value={value}\n />\n);\n\nconst MemoizedCheckbox = memo(Checkbox);\n\nexport { MemoizedCheckbox as Checkbox };\n"],"mappings":";AAaA,SAA6BA,IAA7B,QAAyC,OAAzC;SAESC,gB;;;AAgBT,MAAMC,QAAQ,GAAG;EAAA,IAAC;IAChBC,SADgB;IAEhBC,cAFgB;IAGhBC,SAHgB;IAIhBC,gBAJgB;IAKhBC,UALgB;IAMhBC,eANgB;IAOhBC,QAPgB;IAQhBC,KARgB;IAShBC,IATgB;IAUhBC,QAVgB;IAWhBC;EAXgB,CAAD;EAAA,OAaf,KAAC,gBAAD;IACE,cAAYV,SADd;IAEE,mBAAiBC,cAFnB;IAGE,OAAO,EAAEC,SAHX;IAIE,SAAS,EAAEI,QAAQ,GAAG,WAAH,GAAiB,EAJtC;IAKE,OAAO,EAAE;MAAa,aAAa,EAAED;IAA5B,EALX;IAME,cAAc,EAAEF,gBANlB;IAOE,QAAQ,EAAEC,UAPZ;IAQE,KAAK,EAAEG,KART;IASE,IAAI,EAAEC,IATR;IAUE,QAAQ,EAAEC,QAVZ;IAWE,KAAK,EAAEC;EAXT,EAbe;AAAA,CAAjB;;AA4BA,MAAMC,gBAAgB,GAAGd,IAAI,CAACE,QAAD,CAA7B;AAEA,SAASY,gBAAgB,IAAIZ,QAA7B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import { memo, useMemo } from "react";
|
|
13
|
+
import { FormControl, FormGroup, FormHelperText, FormLabel, visuallyHidden } from "./index.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
|
|
17
|
+
const CheckboxGroup = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
children,
|
|
20
|
+
isDisabled,
|
|
21
|
+
errorMessage,
|
|
22
|
+
hint,
|
|
23
|
+
label,
|
|
24
|
+
name
|
|
25
|
+
} = _ref;
|
|
26
|
+
const ariaDescribedBy = useMemo(() => errorMessage || hint ? [hint && `${name}-hint`, errorMessage && `${name}-error`].filter(Boolean).join(" ") : undefined, [errorMessage, hint, name]);
|
|
27
|
+
return _jsxs(FormControl, {
|
|
28
|
+
component: "fieldset",
|
|
29
|
+
disabled: isDisabled,
|
|
30
|
+
error: Boolean(errorMessage),
|
|
31
|
+
children: [label && _jsx(FormLabel, {
|
|
32
|
+
component: "legend",
|
|
33
|
+
children: label
|
|
34
|
+
}), hint && _jsx(FormHelperText, {
|
|
35
|
+
id: `${name}-hint`,
|
|
36
|
+
children: hint
|
|
37
|
+
}), _jsx(FormGroup, {
|
|
38
|
+
"aria-describedby": ariaDescribedBy,
|
|
39
|
+
children: children
|
|
40
|
+
}), errorMessage && _jsxs(FormHelperText, {
|
|
41
|
+
id: `${name}-error`,
|
|
42
|
+
error: true,
|
|
43
|
+
children: [_jsx("span", {
|
|
44
|
+
style: visuallyHidden,
|
|
45
|
+
children: "Error:"
|
|
46
|
+
}), " ", errorMessage]
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const MemoizedCheckboxGroup = memo(CheckboxGroup);
|
|
52
|
+
export { MemoizedCheckboxGroup as CheckboxGroup };
|
|
53
|
+
//# sourceMappingURL=CheckboxGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","names":["memo","useMemo","FormControl","FormGroup","FormHelperText","FormLabel","visuallyHidden","CheckboxGroup","children","isDisabled","errorMessage","hint","label","name","ariaDescribedBy","filter","Boolean","join","undefined","MemoizedCheckboxGroup"],"sources":["../src/CheckboxGroup.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport {\n Checkbox,\n FormControl,\n FormGroup,\n FormHelperText,\n FormLabel,\n visuallyHidden,\n} from \".\";\n\nexport type CheckboxGroupProps = {\n children:\n | ReactElement<typeof Checkbox>\n | Array<ReactElement<typeof Checkbox>>;\n errorMessage?: string;\n hint?: string;\n isDisabled?: boolean;\n label?: string;\n name?: string;\n};\n\nconst CheckboxGroup = ({\n children,\n isDisabled,\n errorMessage,\n hint,\n label,\n name,\n}: CheckboxGroupProps) => {\n const ariaDescribedBy = useMemo(\n () =>\n errorMessage || hint\n ? [hint && `${name}-hint`, errorMessage && `${name}-error`]\n .filter(Boolean)\n .join(\" \")\n : undefined,\n [errorMessage, hint, name]\n );\n\n return (\n <FormControl\n component=\"fieldset\"\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n >\n {label && <FormLabel component=\"legend\">{label}</FormLabel>}\n {hint && <FormHelperText id={`${name}-hint`}>{hint}</FormHelperText>}\n <FormGroup aria-describedby={ariaDescribedBy}>{children}</FormGroup>\n {errorMessage && (\n <FormHelperText id={`${name}-error`} error>\n <span style={visuallyHidden}>Error:</span> {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n};\n\nconst MemoizedCheckboxGroup = memo(CheckboxGroup);\n\nexport { MemoizedCheckboxGroup as CheckboxGroup };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAIEC,W,EACAC,S,EACAC,c,EACAC,S,EACAC,c;;;;AAcF,MAAMC,aAAa,GAAG,QAOI;EAAA,IAPH;IACrBC,QADqB;IAErBC,UAFqB;IAGrBC,YAHqB;IAIrBC,IAJqB;IAKrBC,KALqB;IAMrBC;EANqB,CAOG;EACxB,MAAMC,eAAe,GAAGb,OAAO,CAC7B,MACES,YAAY,IAAIC,IAAhB,GACI,CAACA,IAAI,IAAK,GAAEE,IAAK,OAAjB,EAAyBH,YAAY,IAAK,GAAEG,IAAK,QAAjD,EACGE,MADH,CACUC,OADV,EAEGC,IAFH,CAEQ,GAFR,CADJ,GAIIC,SANuB,EAO7B,CAACR,YAAD,EAAeC,IAAf,EAAqBE,IAArB,CAP6B,CAA/B;EAUA,OACE,MAAC,WAAD;IACE,SAAS,EAAC,UADZ;IAEE,QAAQ,EAAEJ,UAFZ;IAGE,KAAK,EAAEO,OAAO,CAACN,YAAD,CAHhB;IAAA,WAKGE,KAAK,IAAI,KAAC,SAAD;MAAW,SAAS,EAAC,QAArB;MAAA,UAA+BA;IAA/B,EALZ,EAMGD,IAAI,IAAI,KAAC,cAAD;MAAgB,EAAE,EAAG,GAAEE,IAAK,OAA5B;MAAA,UAAqCF;IAArC,EANX,EAOE,KAAC,SAAD;MAAW,oBAAkBG,eAA7B;MAAA,UAA+CN;IAA/C,EAPF,EAQGE,YAAY,IACX,MAAC,cAAD;MAAgB,EAAE,EAAG,GAAEG,IAAK,QAA5B;MAAqC,KAAK,MAA1C;MAAA,WACE;QAAM,KAAK,EAAEP,cAAb;QAAA;MAAA,EADF,OAC8CI,YAD9C;IAAA,EATJ;EAAA,EADF;AAgBD,CAlCD;;AAoCA,MAAMS,qBAAqB,GAAGnB,IAAI,CAACO,aAAD,CAAlC;AAEA,SAASY,qBAAqB,IAAIZ,aAAlC"}
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import { deepmerge } from "@mui/utils";
|
|
12
|
+
import { ThemeProvider as MuiThemeProvider } from "@mui/material/styles";
|
|
14
13
|
import { memo, useMemo } from "react";
|
|
14
|
+
import { createTheme, deepmerge } from "./index.js";
|
|
15
15
|
import { odysseyTheme } from "./theme/index.js";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
|
|
18
18
|
const OdysseyThemeProvider = _ref => {
|
|
19
19
|
let {
|
|
20
20
|
children,
|
|
21
|
-
|
|
21
|
+
themeOverride
|
|
22
22
|
} = _ref;
|
|
23
|
-
const customOdysseyTheme = useMemo(() =>
|
|
23
|
+
const customOdysseyTheme = useMemo(() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)), [themeOverride]);
|
|
24
24
|
return _jsx(MuiThemeProvider, {
|
|
25
25
|
theme: customOdysseyTheme ?? odysseyTheme,
|
|
26
26
|
children: children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyThemeProvider.js","names":["
|
|
1
|
+
{"version":3,"file":"OdysseyThemeProvider.js","names":["ThemeProvider","MuiThemeProvider","memo","useMemo","createTheme","deepmerge","odysseyTheme","OdysseyThemeProvider","children","themeOverride","customOdysseyTheme","MemoizedOdysseyThemeProvider"],"sources":["../src/OdysseyThemeProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { ThemeProvider as MuiThemeProvider } from \"@mui/material/styles\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { createTheme, deepmerge, ThemeOptions } from \".\";\nimport { odysseyTheme } from \"./theme\";\n\nconst OdysseyThemeProvider = ({\n children,\n themeOverride,\n}: {\n children: ReactElement;\n themeOverride?: ThemeOptions;\n}) => {\n const customOdysseyTheme = useMemo(\n () => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),\n [themeOverride]\n );\n\n return (\n <MuiThemeProvider theme={customOdysseyTheme ?? odysseyTheme}>\n {children}\n </MuiThemeProvider>\n );\n};\n\nconst MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);\n\nexport { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,aAAa,IAAIC,gBAA1B,QAAkD,sBAAlD;AACA,SAASC,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAESC,W,EAAaC,S;SACbC,Y;;;AAET,MAAMC,oBAAoB,GAAG,QAMvB;EAAA,IANwB;IAC5BC,QAD4B;IAE5BC;EAF4B,CAMxB;EACJ,MAAMC,kBAAkB,GAAGP,OAAO,CAChC,MAAMM,aAAa,IAAIL,WAAW,CAACC,SAAS,CAACC,YAAD,EAAeG,aAAf,CAAV,CADF,EAEhC,CAACA,aAAD,CAFgC,CAAlC;EAKA,OACE,KAAC,gBAAD;IAAkB,KAAK,EAAEC,kBAAkB,IAAIJ,YAA/C;IAAA,UACGE;EADH,EADF;AAKD,CAjBD;;AAmBA,MAAMG,4BAA4B,GAAGT,IAAI,CAACK,oBAAD,CAAzC;AAEA,SAASI,4BAA4B,IAAIJ,oBAAzC"}
|
package/dist/Radio.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import _Radio from "@mui/material/Radio";
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
6
|
-
*
|
|
7
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
*
|
|
12
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
import { FormControlLabel } from "./index.js";
|
|
15
2
|
import { memo } from "react";
|
|
3
|
+
import { FormControlLabel } from "./index.js";
|
|
16
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
5
|
|
|
18
6
|
const Radio = _ref => {
|
|
19
7
|
let {
|
|
8
|
+
isChecked,
|
|
9
|
+
isDefaultChecked,
|
|
10
|
+
isDisabled,
|
|
11
|
+
hasError,
|
|
20
12
|
label,
|
|
13
|
+
name,
|
|
21
14
|
value
|
|
22
15
|
} = _ref;
|
|
23
16
|
return _jsx(FormControlLabel, {
|
|
17
|
+
checked: isChecked,
|
|
18
|
+
className: hasError ? "Mui-error" : "",
|
|
24
19
|
control: _jsx(_Radio, {}),
|
|
20
|
+
defaultChecked: isDefaultChecked,
|
|
21
|
+
disabled: isDisabled,
|
|
25
22
|
label: label,
|
|
23
|
+
name: name,
|
|
26
24
|
value: value
|
|
27
25
|
});
|
|
28
26
|
};
|
package/dist/Radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":["
|
|
1
|
+
{"version":3,"file":"Radio.js","names":["memo","FormControlLabel","Radio","isChecked","isDefaultChecked","isDisabled","hasError","label","name","value","MemoizedRadio"],"sources":["../src/Radio.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Radio as MuiRadio } from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport { FormControlLabel } from \".\";\n\nexport type RadioProps = {\n isChecked?: boolean;\n isDefaultChecked?: boolean;\n isDisabled?: boolean;\n hasError?: boolean;\n label: string;\n name?: string;\n value: string;\n};\n\nconst Radio = ({\n isChecked,\n isDefaultChecked,\n isDisabled,\n hasError,\n label,\n name,\n value,\n}: RadioProps) => (\n <FormControlLabel\n checked={isChecked}\n className={hasError ? \"Mui-error\" : \"\"}\n control={<MuiRadio />}\n defaultChecked={isDefaultChecked}\n disabled={isDisabled}\n label={label}\n name={name}\n value={value}\n />\n);\n\nconst MemoizedRadio = memo(Radio);\n\nexport { MemoizedRadio as Radio };\n"],"mappings":";AAaA,SAASA,IAAT,QAAqB,OAArB;SAESC,gB;;;AAYT,MAAMC,KAAK,GAAG;EAAA,IAAC;IACbC,SADa;IAEbC,gBAFa;IAGbC,UAHa;IAIbC,QAJa;IAKbC,KALa;IAMbC,IANa;IAObC;EAPa,CAAD;EAAA,OASZ,KAAC,gBAAD;IACE,OAAO,EAAEN,SADX;IAEE,SAAS,EAAEG,QAAQ,GAAG,WAAH,GAAiB,EAFtC;IAGE,OAAO,EAAE,gBAHX;IAIE,cAAc,EAAEF,gBAJlB;IAKE,QAAQ,EAAEC,UALZ;IAME,KAAK,EAAEE,KANT;IAOE,IAAI,EAAEC,IAPR;IAQE,KAAK,EAAEC;EART,EATY;AAAA,CAAd;;AAqBA,MAAMC,aAAa,GAAGV,IAAI,CAACE,KAAD,CAA1B;AAEA,SAASQ,aAAa,IAAIR,KAA1B"}
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import _RadioGroup from "@mui/material/RadioGroup";
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
|
-
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
6
|
-
*
|
|
7
|
-
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
8
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
*
|
|
12
|
-
* See the License for the specific language governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
import { FormControl, FormLabel, FormHelperText, visuallyHidden, useUniqueId } from "./index.js";
|
|
15
2
|
import { memo, useMemo } from "react";
|
|
3
|
+
import { FormControl, FormLabel, FormHelperText, visuallyHidden, useUniqueId } from "./index.js";
|
|
16
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
6
|
|
|
@@ -24,7 +12,8 @@ const RadioGroup = _ref => {
|
|
|
24
12
|
hint,
|
|
25
13
|
isDisabled,
|
|
26
14
|
label,
|
|
27
|
-
name
|
|
15
|
+
name,
|
|
16
|
+
onChange
|
|
28
17
|
} = _ref;
|
|
29
18
|
const ariaDescribedBy = useMemo(() => errorMessage || hint ? [hint && `${name}-hint`, errorMessage && `${name}-error`].filter(Boolean).join(" ") : undefined, [errorMessage, hint, name]);
|
|
30
19
|
const uniqueName = useUniqueId(name);
|
|
@@ -42,6 +31,7 @@ const RadioGroup = _ref => {
|
|
|
42
31
|
"aria-describedby": ariaDescribedBy,
|
|
43
32
|
defaultValue: defaultValue,
|
|
44
33
|
name: uniqueName,
|
|
34
|
+
onChange: onChange,
|
|
45
35
|
children: children
|
|
46
36
|
}), errorMessage && _jsxs(FormHelperText, {
|
|
47
37
|
id: `${uniqueName}-error`,
|
package/dist/RadioGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","names":["
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","names":["memo","useMemo","FormControl","FormLabel","FormHelperText","visuallyHidden","useUniqueId","RadioGroup","children","defaultValue","errorMessage","hint","isDisabled","label","name","onChange","ariaDescribedBy","filter","Boolean","join","undefined","uniqueName","MemoizedRadioGroup"],"sources":["../src/RadioGroup.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { RadioGroup as MuiRadioGroup } from \"@mui/material\";\nimport { ChangeEventHandler, memo, ReactElement, useMemo } from \"react\";\n\nimport {\n FormControl,\n FormLabel,\n FormHelperText,\n visuallyHidden,\n Radio,\n useUniqueId,\n RadioProps,\n} from \".\";\n\nexport interface RadioGroupProps {\n /**\n * The <Radio> components within the group. Must include two or more.\n */\n children: Array<ReactElement<typeof Radio>>;\n /**\n * The text value of the radio that should be selected by default\n */\n defaultValue?: string;\n /**\n * The error text for an invalid group\n */\n errorMessage?: string;\n /**\n * Optional hint text\n */\n hint?: string;\n /**\n * Disables the whole radio group\n */\n isDisabled?: boolean;\n /**\n * The text label for the radio group\n */\n label: string;\n /**\n * The name of the radio group, which only needs to be changed if there are multiple radio groups on the same screen\n */\n name?: string;\n /**\n * Listen for changes in the browser that change `value`.\n */\n onChange?: ChangeEventHandler<EventTarget>;\n /**\n * The `value` on the selected radio button.\n */\n value?: RadioProps[\"value\"];\n}\n\nconst RadioGroup = ({\n children,\n defaultValue,\n errorMessage,\n hint,\n isDisabled,\n label,\n name,\n onChange,\n}: RadioGroupProps) => {\n const ariaDescribedBy = useMemo(\n () =>\n errorMessage || hint\n ? [hint && `${name}-hint`, errorMessage && `${name}-error`]\n .filter(Boolean)\n .join(\" \")\n : undefined,\n [errorMessage, hint, name]\n );\n\n const uniqueName = useUniqueId(name);\n\n return (\n <FormControl\n component=\"fieldset\"\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n >\n <FormLabel component=\"legend\">{label}</FormLabel>\n {hint && (\n <FormHelperText id={`${uniqueName}-hint`}>{hint}</FormHelperText>\n )}\n <MuiRadioGroup\n aria-describedby={ariaDescribedBy}\n defaultValue={defaultValue}\n name={uniqueName}\n onChange={onChange}\n >\n {children}\n </MuiRadioGroup>\n {errorMessage && (\n <FormHelperText id={`${uniqueName}-error`} error>\n <span style={visuallyHidden}>Error:</span> {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n};\n\n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,OAC8CK,YAD9C;IAAA,EAlBJ;EAAA,EADF;AAyBD,CA/CD;;AAiDA,MAAMY,kBAAkB,GAAGtB,IAAI,CAACO,UAAD,CAA/B;AAEA,SAASe,kBAAkB,IAAIf,UAA/B"}
|
package/dist/TextField.js
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
*/
|
|
1
|
+
import _InputBase from "@mui/material/InputBase";
|
|
2
|
+
import _InputAdornment from "@mui/material/InputAdornment";
|
|
3
|
+
import _InputLabel from "@mui/material/InputLabel";
|
|
12
4
|
import { forwardRef, memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
13
|
-
import { EyeIcon, EyeOffIcon, FormControl, FormHelperText, IconButton,
|
|
5
|
+
import { EyeIcon, EyeOffIcon, FormControl, FormHelperText, IconButton, SearchIcon, Typography, useUniqueId, visuallyHidden } from "./index.js";
|
|
14
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
const TextField = forwardRef((
|
|
17
|
-
|
|
8
|
+
const TextField = forwardRef((_ref, ref) => {
|
|
9
|
+
let {
|
|
18
10
|
autoCompleteType,
|
|
19
|
-
isDisabled = false,
|
|
20
11
|
endAdornment,
|
|
21
12
|
errorMessage,
|
|
22
13
|
hint,
|
|
23
14
|
id: idOverride,
|
|
24
|
-
|
|
15
|
+
inputProps = {},
|
|
16
|
+
isDisabled = false,
|
|
25
17
|
isMultiline = false,
|
|
18
|
+
isReadOnly,
|
|
19
|
+
isRequired = true,
|
|
20
|
+
label,
|
|
26
21
|
onChange,
|
|
27
22
|
onFocus,
|
|
23
|
+
onBlur,
|
|
28
24
|
optionalLabel,
|
|
29
25
|
placeholder,
|
|
30
|
-
isReadOnly,
|
|
31
|
-
isRequired = true,
|
|
32
26
|
startAdornment,
|
|
33
27
|
type = "text",
|
|
34
28
|
value
|
|
35
|
-
} =
|
|
29
|
+
} = _ref;
|
|
36
30
|
const [inputType, setInputType] = useState(type);
|
|
37
31
|
useEffect(() => {
|
|
38
32
|
setInputType(type);
|
|
@@ -44,13 +38,16 @@ const TextField = forwardRef((props, ref) => {
|
|
|
44
38
|
const hintId = hint ? `${id}-hint` : undefined;
|
|
45
39
|
const errorId = errorMessage ? `${id}-error` : undefined;
|
|
46
40
|
const labelId = label ? `${id}-label` : undefined;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
const localInputProps = useMemo(() => {
|
|
42
|
+
const ariaDescribedBy = errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;
|
|
43
|
+
return { ...inputProps,
|
|
44
|
+
"aria-describedby": inputProps["aria-describedby"]?.concat(` ${ariaDescribedBy}`) ?? ariaDescribedBy
|
|
45
|
+
};
|
|
46
|
+
}, [errorId, hintId, inputProps]);
|
|
50
47
|
return _jsxs(FormControl, {
|
|
51
48
|
disabled: isDisabled,
|
|
52
49
|
error: Boolean(errorMessage),
|
|
53
|
-
children: [_jsxs(
|
|
50
|
+
children: [_jsxs(_InputLabel, {
|
|
54
51
|
htmlFor: id,
|
|
55
52
|
id: labelId,
|
|
56
53
|
children: [label, !isRequired && _jsx(Typography, {
|
|
@@ -60,9 +57,9 @@ const TextField = forwardRef((props, ref) => {
|
|
|
60
57
|
}), hint && _jsx(FormHelperText, {
|
|
61
58
|
id: hintId,
|
|
62
59
|
children: hint
|
|
63
|
-
}), _jsx(
|
|
60
|
+
}), _jsx(_InputBase, {
|
|
64
61
|
autoComplete: autoCompleteType,
|
|
65
|
-
endAdornment: inputType === "password" ? _jsx(
|
|
62
|
+
endAdornment: inputType === "password" ? _jsx(_InputAdornment, {
|
|
66
63
|
position: "end",
|
|
67
64
|
children: _jsx(IconButton, {
|
|
68
65
|
"aria-label": "toggle password visibility",
|
|
@@ -72,14 +69,15 @@ const TextField = forwardRef((props, ref) => {
|
|
|
72
69
|
})
|
|
73
70
|
}) : endAdornment,
|
|
74
71
|
id: id,
|
|
75
|
-
inputProps:
|
|
72
|
+
inputProps: localInputProps,
|
|
76
73
|
multiline: isMultiline,
|
|
77
74
|
onChange: onChange,
|
|
78
75
|
onFocus: onFocus,
|
|
76
|
+
onBlur: onBlur,
|
|
79
77
|
placeholder: placeholder,
|
|
80
78
|
readOnly: isReadOnly,
|
|
81
79
|
ref: ref,
|
|
82
|
-
startAdornment: inputType === "search" ? _jsx(
|
|
80
|
+
startAdornment: inputType === "search" ? _jsx(_InputAdornment, {
|
|
83
81
|
position: "start",
|
|
84
82
|
children: _jsx(SearchIcon, {})
|
|
85
83
|
}) : startAdornment,
|
package/dist/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useEffect","useMemo","useState","EyeIcon","EyeOffIcon","FormControl","FormHelperText","IconButton","InputAdornment","InputBase","InputLabel","SearchIcon","Typography","visuallyHidden","useUniqueId","TextField","props","ref","autoCompleteType","isDisabled","endAdornment","errorMessage","hint","id","idOverride","label","isMultiline","onChange","onFocus","optionalLabel","placeholder","isReadOnly","isRequired","startAdornment","type","value","inputType","setInputType","togglePasswordVisibility","currentType","hintId","undefined","errorId","labelId","inputProps","Boolean","MemoizedTextField"],"sources":["../src/TextField.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport {\n EyeIcon,\n EyeOffIcon,\n FormControl,\n FormHelperText,\n IconButton,\n InputAdornment,\n InputBase,\n InputLabel,\n SearchIcon,\n Typography,\n visuallyHidden,\n useUniqueId,\n} from \"./\";\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: ReactNode;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * The label for the `input` element.\n */\n label?: string;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The label for the `input` element if the it's not optional\n */\n optionalLabel?: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: boolean;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: ReactNode;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: string;\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: unknown;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>((props, ref) => {\n const {\n autoCompleteType,\n isDisabled = false,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n label,\n isMultiline = false,\n onChange,\n onFocus,\n optionalLabel,\n placeholder,\n isReadOnly,\n isRequired = true,\n startAdornment,\n type = \"text\",\n value,\n } = props;\n\n const [inputType, setInputType] = useState(type);\n\n useEffect(() => {\n setInputType(type);\n }, [type]);\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((currentType) =>\n currentType === \"password\" ? \"text\" : \"password\"\n );\n }, []);\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = label ? `${id}-label` : undefined;\n\n const inputProps = useMemo(\n () =>\n errorId || hintId\n ? {\n \"aria-describedby\":\n errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId,\n }\n : undefined,\n [errorId, hintId]\n );\n\n return (\n <FormControl disabled={isDisabled} error={Boolean(errorMessage)}>\n <InputLabel htmlFor={id} id={labelId}>\n {label}\n {!isRequired && (\n <Typography variant=\"subtitle1\">{optionalLabel}</Typography>\n )}\n </InputLabel>\n {hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}\n <InputBase\n autoComplete={autoCompleteType}\n endAdornment={\n inputType === \"password\" ? (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n edge=\"end\"\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <EyeIcon /> : <EyeOffIcon />}\n </IconButton>\n </InputAdornment>\n ) : (\n endAdornment\n )\n }\n id={id}\n inputProps={inputProps}\n multiline={isMultiline}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={\n inputType === \"search\" ? (\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n ) : (\n startAdornment\n )\n }\n type={inputType}\n value={value}\n />\n {errorMessage && (\n <FormHelperText error id={errorId}>\n <span style={visuallyHidden}>Error:</span>\n {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n});\n\nconst MemoizedTextField = memo(TextField);\n\nexport { MemoizedTextField as TextField };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAGEA,UAHF,EAKEC,IALF,EAOEC,WAPF,EAQEC,SARF,EASEC,OATF,EAUEC,QAVF,QAWO,OAXP;SAaEC,O,EACAC,U,EACAC,W,EACAC,c,EACAC,U,EACAC,c,EACAC,S,EACAC,U,EACAC,U,EACAC,U,EACAC,c,EACAC,W;;;AA4EF,MAAMC,SAAS,GAAGlB,UAAU,CAAmC,CAACmB,KAAD,EAAQC,GAAR,KAAgB;EAC7E,MAAM;IACJC,gBADI;IAEJC,UAAU,GAAG,KAFT;IAGJC,YAHI;IAIJC,YAJI;IAKJC,IALI;IAMJC,EAAE,EAAEC,UANA;IAOJC,KAPI;IAQJC,WAAW,GAAG,KARV;IASJC,QATI;IAUJC,OAVI;IAWJC,aAXI;IAYJC,WAZI;IAaJC,UAbI;IAcJC,UAAU,GAAG,IAdT;IAeJC,cAfI;IAgBJC,IAAI,GAAG,MAhBH;IAiBJC;EAjBI,IAkBFnB,KAlBJ;EAoBA,MAAM,CAACoB,SAAD,EAAYC,YAAZ,IAA4BnC,QAAQ,CAACgC,IAAD,CAA1C;EAEAlC,SAAS,CAAC,MAAM;IACdqC,YAAY,CAACH,IAAD,CAAZ;EACD,CAFQ,EAEN,CAACA,IAAD,CAFM,CAAT;EAIA,MAAMI,wBAAwB,GAAGvC,WAAW,CAAC,MAAM;IACjDsC,YAAY,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GF,SAAS,KAAK,UAAd,GAA2B,KAAC,OAAD,KAA3B,GAAyC,KAAC,UAAD;QAL5C;MADF,EADF,GAWEhB,YAdN;MAiBE,EAAE,EAAEG,EAjBN;MAkBE,UAAU,EAAEqB,UAlBd;MAmBE,SAAS,EAAElB,WAnBb;MAoBE,QAAQ,EAAEC,QApBZ;MAqBE,OAAO,EAAEC,OArBX;MAsBE,WAAW,EAAEE,WAtBf;MAuBE,QAAQ,EAAEC,UAvBZ;MAwBE,GAAG,EAAEd,GAxBP;MAyBE,cAAc,EACZmB,SAAS,KAAK,QAAd,GACE,KAAC,cAAD;QAAgB,QAAQ,EAAC,OAAzB;QAAA,UACE,KAAC,UAAD;MADF,EADF,GAKEH,cA/BN;MAkCE,IAAI,EAAEG,SAlCR;MAmCE,KAAK,EAAED;IAnCT,EARF,EA6CGd,YAAY,IACX,MAAC,cAAD;MAAgB,KAAK,MAArB;MAAsB,EAAE,EAAEqB,OAA1B;MAAA,WACE;QAAM,KAAK,EAAE7B,cAAb;QAAA;MAAA,EADF,EAEGQ,YAFH;IAAA,EA9CJ;EAAA,EADF;AAsDD,CAvG2B,CAA5B;AAyGA,MAAMyB,iBAAiB,GAAGhD,IAAI,CAACiB,SAAD,CAA9B;AAEA,SAAS+B,iBAAiB,IAAI/B,SAA9B"}
|
|
1
|
+
{"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useEffect","useMemo","useState","EyeIcon","EyeOffIcon","FormControl","FormHelperText","IconButton","SearchIcon","Typography","useUniqueId","visuallyHidden","TextField","ref","autoCompleteType","endAdornment","errorMessage","hint","id","idOverride","inputProps","isDisabled","isMultiline","isReadOnly","isRequired","label","onChange","onFocus","onBlur","optionalLabel","placeholder","startAdornment","type","value","inputType","setInputType","togglePasswordVisibility","currentType","hintId","undefined","errorId","labelId","localInputProps","ariaDescribedBy","concat","Boolean","MemoizedTextField"],"sources":["../src/TextField.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n InputAdornment,\n InputBase,\n InputBaseProps,\n InputLabel,\n} from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\n\nimport {\n EyeIcon,\n EyeOffIcon,\n FormControl,\n FormHelperText,\n IconButton,\n SearchIcon,\n Typography,\n useUniqueId,\n visuallyHidden,\n} from \"./\";\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: ReactNode;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * Props that go onto the HTML `input` element.\n */\n inputProps?: InputBaseProps[\"inputProps\"];\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: boolean;\n /**\n * The label for the `input` element.\n */\n label?: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The label for the `input` element if the it's not optional\n */\n optionalLabel?: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: ReactNode;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: string;\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: unknown;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n inputProps = {},\n isDisabled = false,\n isMultiline = false,\n isReadOnly,\n isRequired = true,\n label,\n onChange,\n onFocus,\n onBlur,\n optionalLabel,\n placeholder,\n startAdornment,\n type = \"text\",\n value,\n },\n ref\n ) => {\n const [inputType, setInputType] = useState(type);\n\n useEffect(() => {\n setInputType(type);\n }, [type]);\n\n const togglePasswordVisibility = useCallback(() => {\n setInputType((currentType) =>\n currentType === \"password\" ? \"text\" : \"password\"\n );\n }, []);\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = label ? `${id}-label` : undefined;\n\n const localInputProps = useMemo(() => {\n const ariaDescribedBy =\n errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;\n\n return {\n ...inputProps,\n \"aria-describedby\":\n inputProps[\"aria-describedby\"]?.concat(` ${ariaDescribedBy}`) ??\n ariaDescribedBy,\n };\n }, [errorId, hintId, inputProps]);\n\n return (\n <FormControl disabled={isDisabled} error={Boolean(errorMessage)}>\n <InputLabel htmlFor={id} id={labelId}>\n {label}\n {!isRequired && (\n <Typography variant=\"subtitle1\">{optionalLabel}</Typography>\n )}\n </InputLabel>\n {hint && <FormHelperText id={hintId}>{hint}</FormHelperText>}\n <InputBase\n autoComplete={autoCompleteType}\n endAdornment={\n inputType === \"password\" ? (\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"toggle password visibility\"\n edge=\"end\"\n onClick={togglePasswordVisibility}\n >\n {inputType === \"password\" ? <EyeIcon /> : <EyeOffIcon />}\n </IconButton>\n </InputAdornment>\n ) : (\n endAdornment\n )\n }\n id={id}\n inputProps={localInputProps}\n multiline={isMultiline}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={\n inputType === \"search\" ? (\n <InputAdornment position=\"start\">\n <SearchIcon />\n </InputAdornment>\n ) : (\n startAdornment\n )\n }\n type={inputType}\n value={value}\n />\n {errorMessage && (\n <FormHelperText error id={errorId}>\n <span style={visuallyHidden}>Error:</span>\n {errorMessage}\n </FormHelperText>\n )}\n </FormControl>\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;;AAkBA,SAGEA,UAHF,EAKEC,IALF,EAOEC,WAPF,EAQEC,SARF,EASEC,OATF,EAUEC,QAVF,QAWO,OAXP;SAcEC,O,EACAC,U,EACAC,W,EACAC,c,EACAC,U,EACAC,U,EACAC,U,EACAC,W,EACAC,c;;;AAoFF,MAAMC,SAAS,GAAGf,UAAU,CAC1B,OAsBEgB,GAtBF,KAuBK;EAAA,IAtBH;IACEC,gBADF;IAEEC,YAFF;IAGEC,YAHF;IAIEC,IAJF;IAKEC,EAAE,EAAEC,UALN;IAMEC,UAAU,GAAG,EANf;IAOEC,UAAU,GAAG,KAPf;IAQEC,WAAW,GAAG,KARhB;IASEC,UATF;IAUEC,UAAU,GAAG,IAVf;IAWEC,KAXF;IAYEC,QAZF;IAa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AA9B;AAEA,SAASkC,iBAAiB,IAAIlC,SAA9B"}
|
package/dist/index.js
CHANGED
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export { Alert, AlertTitle, Box, Button,
|
|
12
|
+
export { Alert, AlertTitle, Box, Button, Chip, CircularProgress, createTheme, CssBaseline, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, IconButton, InputAdornment, InputBase, InputLabel, List, ListItem, ListItemIcon, ListItemText, ListSubheader, Menu, MenuList, Paper, ScopedCssBaseline, Select, Snackbar, Stack, SvgIcon, Tab, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TableSortLabel, ThemeProvider as MuiThemeProvider, Tooltip, Typography } from "@mui/material";
|
|
13
13
|
export { TabContext, TabList, TabPanel } from "@mui/lab";
|
|
14
14
|
export { default as FavoriteIcon } from "@mui/icons-material/Favorite";
|
|
15
|
-
export { visuallyHidden } from "@mui/utils";
|
|
15
|
+
export { deepmerge, visuallyHidden } from "@mui/utils";
|
|
16
16
|
export * from "./Banner.js";
|
|
17
|
+
export * from "./Checkbox.js";
|
|
18
|
+
export * from "./CheckboxGroup.js";
|
|
17
19
|
export * from "./createUniqueId.js";
|
|
18
20
|
export * from "./Icon.js";
|
|
19
21
|
export * from "./iconDictionary/index.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Alert","AlertTitle","Box","Button","
|
|
1
|
+
{"version":3,"file":"index.js","names":["Alert","AlertTitle","Box","Button","Chip","CircularProgress","createTheme","CssBaseline","Dialog","DialogActions","DialogContent","DialogContentText","DialogTitle","Divider","FormControl","FormControlLabel","FormGroup","FormHelperText","FormLabel","IconButton","InputAdornment","InputBase","InputLabel","List","ListItem","ListItemIcon","ListItemText","ListSubheader","Menu","MenuList","Paper","ScopedCssBaseline","Select","Snackbar","Stack","SvgIcon","Tab","Table","TableBody","TableCell","TableContainer","TableHead","TableRow","TableSortLabel","ThemeProvider","MuiThemeProvider","Tooltip","Typography","TabContext","TabList","TabPanel","default","FavoriteIcon","deepmerge","visuallyHidden"],"sources":["../src/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport {\n Alert,\n AlertTitle,\n Box,\n Button,\n Chip,\n CircularProgress,\n createTheme,\n CssBaseline,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Divider,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormHelperText,\n FormLabel,\n IconButton,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextField`. */\n InputLabel,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n ListSubheader,\n Menu,\n MenuList,\n Paper,\n ScopedCssBaseline,\n Select,\n Snackbar,\n Stack,\n SvgIcon,\n Tab,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n TableSortLabel,\n ThemeProvider as MuiThemeProvider,\n Tooltip,\n Typography,\n} from \"@mui/material\";\n\nexport type {\n AlertProps,\n AlertTitleProps,\n BoxProps,\n ButtonProps,\n ChipProps,\n CircularProgressProps,\n CssBaselineProps,\n DialogProps,\n DialogActionsProps,\n DialogContentProps,\n DialogContentTextProps,\n DialogTitleProps,\n DividerProps,\n FormControlLabelProps,\n FormControlProps,\n FormGroupProps,\n FormHelperTextProps,\n FormLabelProps,\n IconButtonProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputAdornmentProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputBaseProps,\n /** @deprecated Will be removed in a future Odyssey version. Please switch to `TextFieldProps`. */\n InputLabelProps,\n ListProps,\n ListItemProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n SelectChangeEvent,\n SelectProps,\n SnackbarProps,\n StackProps,\n SvgIconProps,\n TabProps,\n TableBodyProps,\n TableCellProps,\n TableContainerProps,\n TableHeadProps,\n TableProps,\n TableRowProps,\n TableSortLabelProps,\n ThemeOptions,\n TooltipProps,\n TypographyProps,\n} from \"@mui/material\";\n\nexport { TabContext, TabList, TabPanel } from \"@mui/lab\";\n\nexport type { TabContextProps, TabListProps, TabPanelProps } from \"@mui/lab\";\n\nexport { default as FavoriteIcon } from \"@mui/icons-material/Favorite\";\n\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport * from \"./Banner\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./createUniqueId\";\nexport * from \"./Icon\";\nexport * from \"./iconDictionary\";\nexport * from \"./Infobox\";\nexport * from \"./Link\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\nexport * from \"./OdysseyCacheProvider\";\nexport * from \"./OdysseyThemeProvider\";\nexport * from \"./PasswordInput\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./Status\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./ThemeProvider\";\nexport * from \"./useUniqueId\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SACEA,KADF,EAEEC,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;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAoBD,QAAA,MAAM,cAAc,8FAXjB,WAAW,iBAWqB,CAAC;AAEpC,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { ChangeEventHandler } from "react";
|
|
13
|
+
export type CheckboxProps = {
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
ariaLabelledBy?: string;
|
|
16
|
+
isChecked?: boolean;
|
|
17
|
+
isDefaultChecked?: boolean;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
hasError?: boolean;
|
|
20
|
+
isIndeterminate?: boolean;
|
|
21
|
+
label?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
onChange?: ChangeEventHandler<EventTarget>;
|
|
24
|
+
value?: string;
|
|
25
|
+
};
|
|
26
|
+
declare const MemoizedCheckbox: import("react").MemoExoticComponent<({ ariaLabel, ariaLabelledBy, isChecked, isDefaultChecked, isDisabled, isIndeterminate, hasError, label, name, onChange, value, }: CheckboxProps) => JSX.Element>;
|
|
27
|
+
export { MemoizedCheckbox as Checkbox };
|
|
28
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Checkbox.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,kBAAkB,EAAQ,MAAM,OAAO,CAAC;AAIjD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA8BF,QAAA,MAAM,gBAAgB,yKAhBnB,aAAa,iBAgBuB,CAAC;AAExC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAC"}
|