@okta/odyssey-react-mui 0.21.0 → 0.21.2
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 +22 -0
- package/dist/Banner.js +6 -3
- package/dist/Banner.js.map +1 -1
- 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/Infobox.js +6 -3
- package/dist/Infobox.js.map +1 -1
- 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 +27 -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} +27 -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 +15 -33
- 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 +5 -5
- package/src/Banner.tsx +2 -1
- package/src/Checkbox.tsx +62 -0
- package/src/CheckboxGroup.tsx +73 -0
- package/src/Infobox.tsx +2 -1
- package/src/OdysseyThemeProvider.tsx +6 -10
- package/src/Radio.tsx +26 -3
- package/src/RadioGroup.tsx +16 -5
- package/src/TextField.tsx +141 -115
- package/src/index.ts +10 -5
- package/src/theme/OdysseyTheme.ts +25 -0
- package/src/theme/components.tsx +15 -36
- 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,6 +3,28 @@
|
|
|
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.21.2](https://github.com/okta/odyssey/compare/v0.21.1...v0.21.2) (2023-03-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add context to Banner and Infobox ([18b277c](https://github.com/okta/odyssey/commit/18b277c949065ad659508a75e04125637bc5308c))
|
|
11
|
+
- add missing autoFocus from TextField ([d01dcd4](https://github.com/okta/odyssey/commit/d01dcd4120017d16677ae870c3d1e0f7d1b13b47))
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **odyssey-react-mui:** fix Button, Floating, Disabled bg color ([a9c332a](https://github.com/okta/odyssey/commit/a9c332a85e3b4162bf68837978028081ef2133f7))
|
|
16
|
+
- **odyssey-react-mui:** fixes spacing for Hint/Error field helpers ([846134e](https://github.com/okta/odyssey/commit/846134efcdf9cd8c62932e5f849ee64b0b81e468))
|
|
17
|
+
|
|
18
|
+
## [0.21.1](https://github.com/okta/odyssey/compare/v0.21.0...v0.21.1) (2023-03-16)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- **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))
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- added TypeScript project references for VSCode ([#1708](https://github.com/okta/odyssey/issues/1708)) ([44e2783](https://github.com/okta/odyssey/commit/44e2783b6a87bca49fb1d5bcffa45b22adc77bbc))
|
|
27
|
+
|
|
6
28
|
## [0.21.0](https://github.com/okta/odyssey/compare/v0.20.0...v0.21.0) (2023-03-09)
|
|
7
29
|
|
|
8
30
|
### ⚠ BREAKING CHANGES
|
package/dist/Banner.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { memo } from "react";
|
|
13
|
-
import { Alert, Link } from "./index.js";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Alert, Link, visuallyHidden } from "./index.js";
|
|
15
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
const Banner = _ref => {
|
|
18
18
|
let {
|
|
@@ -28,7 +28,10 @@ const Banner = _ref => {
|
|
|
28
28
|
role: role,
|
|
29
29
|
severity: severity,
|
|
30
30
|
variant: "banner",
|
|
31
|
-
children: [
|
|
31
|
+
children: [_jsxs("span", {
|
|
32
|
+
style: visuallyHidden,
|
|
33
|
+
children: [severity, ":"]
|
|
34
|
+
}), text, linkUrl && _jsx(Link, {
|
|
32
35
|
href: linkUrl,
|
|
33
36
|
variant: "monochrome",
|
|
34
37
|
children: linkText
|
package/dist/Banner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","names":["memo","Alert","Link","Banner","onClose","severity","role","linkUrl","linkText","text","MemoizedBanner"],"sources":["../src/Banner.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 { AlertColor, AlertProps } from \"@mui/material\";\nimport { memo } from \"react\";\nimport { Alert, Link } from \"./\";\n\nexport interface BannerProps {\n /**\n * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: \"status\" | \"alert\";\n /**\n * The text content of the alert\n */\n text: string;\n /**\n * The function that's fired when the user clicks the close button. If undefined,\n * the close button will not be shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * If defined, the alert will include a link to the URL\n */\n linkUrl?: string;\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n}\n\nconst Banner = ({\n onClose,\n severity,\n role,\n linkUrl,\n linkText,\n text,\n}: BannerProps) => (\n <Alert onClose={onClose} role={role} severity={severity} variant=\"banner\">\n {text}\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\">\n {linkText}\n </Link>\n )}\n </Alert>\n);\n\nconst MemoizedBanner = memo(Banner);\n\nexport { MemoizedBanner as Banner };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAT,QAAqB,OAArB;SACSC,K,EAAOC,I;;;;
|
|
1
|
+
{"version":3,"file":"Banner.js","names":["memo","Alert","Link","visuallyHidden","Banner","onClose","severity","role","linkUrl","linkText","text","MemoizedBanner"],"sources":["../src/Banner.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 { AlertColor, AlertProps } from \"@mui/material\";\nimport { memo } from \"react\";\nimport { Alert, Link, visuallyHidden } from \"./\";\n\nexport interface BannerProps {\n /**\n * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: \"status\" | \"alert\";\n /**\n * The text content of the alert\n */\n text: string;\n /**\n * The function that's fired when the user clicks the close button. If undefined,\n * the close button will not be shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * If defined, the alert will include a link to the URL\n */\n linkUrl?: string;\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n}\n\nconst Banner = ({\n onClose,\n severity,\n role,\n linkUrl,\n linkText,\n text,\n}: BannerProps) => (\n <Alert onClose={onClose} role={role} severity={severity} variant=\"banner\">\n <span style={visuallyHidden}>{severity}:</span>\n {text}\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\">\n {linkText}\n </Link>\n )}\n </Alert>\n);\n\nconst MemoizedBanner = memo(Banner);\n\nexport { MemoizedBanner as Banner };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAT,QAAqB,OAArB;SACSC,K,EAAOC,I,EAAMC,c;;;;AAkCtB,MAAMC,MAAM,GAAG;EAAA,IAAC;IACdC,OADc;IAEdC,QAFc;IAGdC,IAHc;IAIdC,OAJc;IAKdC,QALc;IAMdC;EANc,CAAD;EAAA,OAQb,MAAC,KAAD;IAAO,OAAO,EAAEL,OAAhB;IAAyB,IAAI,EAAEE,IAA/B;IAAqC,QAAQ,EAAED,QAA/C;IAAyD,OAAO,EAAC,QAAjE;IAAA,WACE;MAAM,KAAK,EAAEH,cAAb;MAAA,WAA8BG,QAA9B;IAAA,EADF,EAEGI,IAFH,EAGGF,OAAO,IACN,KAAC,IAAD;MAAM,IAAI,EAAEA,OAAZ;MAAqB,OAAO,EAAC,YAA7B;MAAA,UACGC;IADH,EAJJ;EAAA,EARa;AAAA,CAAf;;AAmBA,MAAME,cAAc,GAAGX,IAAI,CAACI,MAAD,CAA3B;AAEA,SAASO,cAAc,IAAIP,MAA3B"}
|
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"}
|
package/dist/Infobox.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { memo } from "react";
|
|
13
|
-
import { Alert, AlertTitle } from "./index.js";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Alert, AlertTitle, visuallyHidden } from "./index.js";
|
|
15
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
const Infobox = _ref => {
|
|
18
18
|
let {
|
|
@@ -25,7 +25,10 @@ const Infobox = _ref => {
|
|
|
25
25
|
role: role,
|
|
26
26
|
severity: severity,
|
|
27
27
|
variant: "infobox",
|
|
28
|
-
children: [
|
|
28
|
+
children: [_jsxs("span", {
|
|
29
|
+
style: visuallyHidden,
|
|
30
|
+
children: [severity, ": "]
|
|
31
|
+
}), title && _jsx(AlertTitle, {
|
|
29
32
|
children: title
|
|
30
33
|
}), children]
|
|
31
34
|
});
|
package/dist/Infobox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Infobox.js","names":["memo","Alert","AlertTitle","Infobox","children","severity","role","title","MemoizedInfobox"],"sources":["../src/Infobox.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 { AlertColor } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\nimport { Alert, AlertTitle } from \".\";\n\nexport interface InfoboxProps {\n /**\n * The contents of the alert\n */\n children: ReactNode;\n /**\n * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: \"status\" | \"alert\";\n /**\n * The title of the alert\n */\n title?: string;\n}\n\nconst Infobox = ({ children, severity, role, title }: InfoboxProps) => (\n <Alert role={role} severity={severity} variant=\"infobox\">\n {title && <AlertTitle>{title}</AlertTitle>}\n {children}\n </Alert>\n);\n\nconst MemoizedInfobox = memo(Infobox);\n\nexport { MemoizedInfobox as Infobox };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAT,QAAgC,OAAhC;SACSC,K,EAAOC,U;;;;
|
|
1
|
+
{"version":3,"file":"Infobox.js","names":["memo","Alert","AlertTitle","visuallyHidden","Infobox","children","severity","role","title","MemoizedInfobox"],"sources":["../src/Infobox.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 { AlertColor } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\nimport { Alert, AlertTitle, visuallyHidden } from \".\";\n\nexport interface InfoboxProps {\n /**\n * The contents of the alert\n */\n children: ReactNode;\n /**\n * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: \"status\" | \"alert\";\n /**\n * The title of the alert\n */\n title?: string;\n}\n\nconst Infobox = ({ children, severity, role, title }: InfoboxProps) => (\n <Alert role={role} severity={severity} variant=\"infobox\">\n <span style={visuallyHidden}>{severity}: </span>\n {title && <AlertTitle>{title}</AlertTitle>}\n {children}\n </Alert>\n);\n\nconst MemoizedInfobox = memo(Infobox);\n\nexport { MemoizedInfobox as Infobox };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAT,QAAgC,OAAhC;SACSC,K,EAAOC,U,EAAYC,c;;;;AAuB5B,MAAMC,OAAO,GAAG;EAAA,IAAC;IAAEC,QAAF;IAAYC,QAAZ;IAAsBC,IAAtB;IAA4BC;EAA5B,CAAD;EAAA,OACd,MAAC,KAAD;IAAO,IAAI,EAAED,IAAb;IAAmB,QAAQ,EAAED,QAA7B;IAAuC,OAAO,EAAC,SAA/C;IAAA,WACE;MAAM,KAAK,EAAEH,cAAb;MAAA,WAA8BG,QAA9B;IAAA,EADF,EAEGE,KAAK,IAAI,KAAC,UAAD;MAAA,UAAaA;IAAb,EAFZ,EAGGH,QAHH;EAAA,EADc;AAAA,CAAhB;;AAQA,MAAMI,eAAe,GAAGT,IAAI,CAACI,OAAD,CAA5B;AAEA,SAASK,eAAe,IAAIL,OAA5B"}
|
|
@@ -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\nconst MemoizedRadioGroup = memo(RadioGroup);\n\nexport { MemoizedRadioGroup as RadioGroup };\n"],"mappings":";AAaA,SAA6BA,IAA7B,EAAiDC,OAAjD,QAAgE,OAAhE;SAGEC,W,EACAC,S,EACAC,c,EACAC,c,EAEAC,W;;;;AA2CF,MAAMC,UAAU,GAAG,QASI;EAAA,IATH;IAClBC,QADkB;IAElBC,YAFkB;IAGlBC,YAHkB;IAIlBC,IAJkB;IAKlBC,UALkB;IAMlBC,KANkB;IAOlBC,IAPkB;IAQlBC;EARkB,CASG;EACrB,MAAMC,eAAe,GAAGf,OAAO,CAC7B,MACES,YAAY,IAAIC,IAAhB,GACI,CAACA,IAAI,IAAK,GAAEG,IAAK,OAAjB,EAAyBJ,YAAY,IAAK,GAAEI,IAAK,QAAjD,EACGG,MADH,CACUC,OADV,EAEGC,IAFH,CAEQ,GAFR,CADJ,GAIIC,SANuB,EAO7B,CAACV,YAAD,EAAeC,IAAf,EAAqBG,IAArB,CAP6B,CAA/B;EAUA,MAAMO,UAAU,GAAGf,WAAW,CAACQ,IAAD,CAA9B;EAEA,OACE,MAAC,WAAD;IACE,SAAS,EAAC,UADZ;IAEE,QAAQ,EAAEF,UAFZ;IAGE,KAAK,EAAEM,OAAO,CAACR,YAAD,CAHhB;IAAA,WAKE,KAAC,SAAD;MAAW,SAAS,EAAC,QAArB;MAAA,UAA+BG;IAA/B,EALF,EAMGF,IAAI,IACH,KAAC,cAAD;MAAgB,EAAE,EAAG,GAAEU,UAAW,OAAlC;MAAA,UAA2CV;IAA3C,EAPJ,EASE;MACE,oBAAkBK,eADpB;MAEE,YAAY,EAAEP,YAFhB;MAGE,IAAI,EAAEY,UAHR;MAIE,QAAQ,EAAEN,QAJZ;MAAA,UAMGP;IANH,EATF,EAiBGE,YAAY,IACX,MAAC,cAAD;MAAgB,EAAE,EAAG,GAAEW,UAAW,QAAlC;MAA2C,KAAK,MAAhD;MAAA,WACE;QAAM,KAAK,EAAEhB,cAAb;QAAA;MAAA,EADF,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,33 @@
|
|
|
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
|
-
|
|
11
|
+
autoFocus,
|
|
20
12
|
endAdornment,
|
|
21
13
|
errorMessage,
|
|
22
14
|
hint,
|
|
23
15
|
id: idOverride,
|
|
24
|
-
|
|
16
|
+
inputProps = {},
|
|
17
|
+
isDisabled = false,
|
|
25
18
|
isMultiline = false,
|
|
19
|
+
isReadOnly,
|
|
20
|
+
isRequired = true,
|
|
21
|
+
label,
|
|
26
22
|
onChange,
|
|
27
23
|
onFocus,
|
|
24
|
+
onBlur,
|
|
28
25
|
optionalLabel,
|
|
29
26
|
placeholder,
|
|
30
|
-
isReadOnly,
|
|
31
|
-
isRequired = true,
|
|
32
27
|
startAdornment,
|
|
33
28
|
type = "text",
|
|
34
29
|
value
|
|
35
|
-
} =
|
|
30
|
+
} = _ref;
|
|
36
31
|
const [inputType, setInputType] = useState(type);
|
|
37
32
|
useEffect(() => {
|
|
38
33
|
setInputType(type);
|
|
@@ -44,13 +39,16 @@ const TextField = forwardRef((props, ref) => {
|
|
|
44
39
|
const hintId = hint ? `${id}-hint` : undefined;
|
|
45
40
|
const errorId = errorMessage ? `${id}-error` : undefined;
|
|
46
41
|
const labelId = label ? `${id}-label` : undefined;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
const localInputProps = useMemo(() => {
|
|
43
|
+
const ariaDescribedBy = errorId && hintId ? `${hintId} ${errorId}` : errorId || hintId;
|
|
44
|
+
return { ...inputProps,
|
|
45
|
+
"aria-describedby": inputProps["aria-describedby"]?.concat(` ${ariaDescribedBy}`) ?? ariaDescribedBy
|
|
46
|
+
};
|
|
47
|
+
}, [errorId, hintId, inputProps]);
|
|
50
48
|
return _jsxs(FormControl, {
|
|
51
49
|
disabled: isDisabled,
|
|
52
50
|
error: Boolean(errorMessage),
|
|
53
|
-
children: [_jsxs(
|
|
51
|
+
children: [_jsxs(_InputLabel, {
|
|
54
52
|
htmlFor: id,
|
|
55
53
|
id: labelId,
|
|
56
54
|
children: [label, !isRequired && _jsx(Typography, {
|
|
@@ -60,9 +58,10 @@ const TextField = forwardRef((props, ref) => {
|
|
|
60
58
|
}), hint && _jsx(FormHelperText, {
|
|
61
59
|
id: hintId,
|
|
62
60
|
children: hint
|
|
63
|
-
}), _jsx(
|
|
61
|
+
}), _jsx(_InputBase, {
|
|
64
62
|
autoComplete: autoCompleteType,
|
|
65
|
-
|
|
63
|
+
autoFocus: autoFocus,
|
|
64
|
+
endAdornment: type === "password" ? _jsx(_InputAdornment, {
|
|
66
65
|
position: "end",
|
|
67
66
|
children: _jsx(IconButton, {
|
|
68
67
|
"aria-label": "toggle password visibility",
|
|
@@ -72,14 +71,15 @@ const TextField = forwardRef((props, ref) => {
|
|
|
72
71
|
})
|
|
73
72
|
}) : endAdornment,
|
|
74
73
|
id: id,
|
|
75
|
-
inputProps:
|
|
74
|
+
inputProps: localInputProps,
|
|
76
75
|
multiline: isMultiline,
|
|
77
76
|
onChange: onChange,
|
|
78
77
|
onFocus: onFocus,
|
|
78
|
+
onBlur: onBlur,
|
|
79
79
|
placeholder: placeholder,
|
|
80
80
|
readOnly: isReadOnly,
|
|
81
81
|
ref: ref,
|
|
82
|
-
startAdornment: inputType === "search" ? _jsx(
|
|
82
|
+
startAdornment: inputType === "search" ? _jsx(_InputAdornment, {
|
|
83
83
|
position: "start",
|
|
84
84
|
children: _jsx(SearchIcon, {})
|
|
85
85
|
}) : 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":"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"}
|
|
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","autoFocus","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 * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\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 autoFocus,\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 /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n endAdornment={\n type === \"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;;;AAwFF,MAAMC,SAAS,GAAGf,UAAU,CAC1B,OAuBEgB,GAvBF,KAwBK;EAAA,IAvBH;IACEC,gBADF;IAEEC,SAFF;IAGEC,YAHF;IAIEC,YAJF;IAKEC,IALF;IAMEC,EAAE,EAAEC,UANN;IAOEC,UAAU,GAAG,EAPf;IAQEC,UAAU,GAAG,KARf;IASEC,WAAW,GAAG,KAThB;IAUEC,UAVF;IAWEC,UAAU,GAAG,IAXf;IAYEC,KAZF;IAaEC,QAbF;IAcEC,OAdF;IAeEC,MAfF;IAgBEC,aAhBF;IAiBEC,WAjBF;IAkBEC,cAlBF;IAmBEC,IAAI,GAAG,MAnBT;IAoBEC;EApBF,CAuBG;EACH,MAAM,CAACC,SAAD,EAAYC,YAAZ,IAA4BlC,QAAQ,CAAC+B,IAAD,CAA1C;EAEAjC,SAAS,CAAC,MAAM;IACdoC,YAAY,CAACH,IAAD,CAAZ;EACD,CAFQ,EAEN,CAACA,IAAD,CAFM,CAAT;EAIA,MAAMI,wBAAwB,GAAGtC,WAAW,CAAC,MAAM;IACjDqC,YAAY,CAAEE,WAAD,IACXA,WAAW,KAAK,UAAhB,GAA6B,MAA7B,GAAsC,UAD5B,CAAZ;EAGD,CAJ2C,EAIzC,EAJyC,CAA5C;EAMA,MAAMnB,EAAE,GAAGT,WAAW,CAACU,UAAD,CAAtB;EACA,MAAMmB,MAAM,GAAGrB,IAAI,GAAI,GAAEC,EAAG,OAAT,GAAkBqB,SAArC;EACA,MAAMC,OAAO,GAAGxB,YAAY,GAAI,GAAEE,EAAG,QAAT,GAAmBqB,SAA/C;EACA,MAAME,OAAO,GAAGhB,KAAK,GAAI,GAAEP,EAAG,QAAT,GAAmBqB,SAAxC;EAEA,MAAMG,eAAe,GAAG1C,OAAO,CAAC,MAAM;IACpC,MAAM2C,eAAe,GACnBH,OAAO,IAAIF,MAAX,GAAqB,GAAEA,MAAO,IAAGE,OAAQ,EAAzC,GAA6CA,OAAO,IAAIF,MAD1D;IAGA,OAAO,EACL,GAAGlB,UADE;MAEL,oBACEA,UAAU,CAAC,kBAAD,CAAV,EAAgCwB,MAAhC,CAAwC,IAAGD,eAAgB,EAA3D,KACAA;IAJG,CAAP;EAMD,CAV8B,EAU5B,CAACH,OAAD,EAAUF,MAAV,EAAkBlB,UAAlB,CAV4B,CAA/B;EAYA,OACE,MAAC,WAAD;IAAa,QAAQ,EAAEC,UAAvB;IAAmC,KAAK,EAAEwB,OAAO,CAAC7B,YAAD,CAAjD;IAAA,WACE;MAAY,OAAO,EAAEE,EAArB;MAAyB,EAAE,EAAEuB,OAA7B;MAAA,WACGhB,KADH,EAEG,CAACD,UAAD,IACC,KAAC,UAAD;QAAY,OAAO,EAAC,WAApB;QAAA,UAAiCK;MAAjC,EAHJ;IAAA,EADF,EAOGZ,IAAI,IAAI,KAAC,cAAD;MAAgB,EAAE,EAAEqB,MAApB;MAAA,UAA6BrB;IAA7B,EAPX,EAQE;MACE,YAAY,EAAEJ,gBADhB;MAGE,SAAS,EAAEC,SAHb;MAIE,YAAY,EACVkB,IAAI,KAAK,UAAT,GACE;QAAgB,QAAQ,EAAC,KAAzB;QAAA,UACE,KAAC,UAAD;UACE,cAAW,4BADb;UAEE,IAAI,EAAC,KAFP;UAGE,OAAO,EAAEI,wBAHX;UAAA,UAKGF,SAAS,KAAK,UAAd,GAA2B,KAAC,OAAD,KAA3B,GAAyC,KAAC,UAAD;QAL5C;MADF,EADF,GAWEnB,YAhBN;MAmBE,EAAE,EAAEG,EAnBN;MAoBE,UAAU,EAAEwB,eApBd;MAqBE,SAAS,EAAEpB,WArBb;MAsBE,QAAQ,EAAEI,QAtBZ;MAuBE,OAAO,EAAEC,OAvBX;MAwBE,MAAM,EAAEC,MAxBV;MAyBE,WAAW,EAAEE,WAzBf;MA0BE,QAAQ,EAAEP,UA1BZ;MA2BE,GAAG,EAAEX,GA3BP;MA4BE,cAAc,EACZsB,SAAS,KAAK,QAAd,GACE;QAAgB,QAAQ,EAAC,OAAzB;QAAA,UACE,KAAC,UAAD;MADF,EADF,GAKEH,cAlCN;MAqCE,IAAI,EAAEG,SArCR;MAsCE,KAAK,EAAED;IAtCT,EARF,EAgDGjB,YAAY,IACX,MAAC,cAAD;MAAgB,KAAK,MAArB;MAAsB,EAAE,EAAEwB,OAA1B;MAAA,WACE;QAAM,KAAK,EAAE9B,cAAb;QAAA;MAAA,EADF,EAEGM,YAFH;IAAA,EAjDJ;EAAA,EADF;AAyDD,CAhHyB,CAA5B;AAmHA,MAAM8B,iBAAiB,GAAGjD,IAAI,CAACc,SAAD,CAA9B;AAEA,SAASmC,iBAAiB,IAAInC,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,UAFF,EAGEC,GAHF,EAIEC,MAJF,EAKEC,IALF,EAMEC,gBANF,EAOEC,WAPF,EAQEC,WARF,EASEC,MATF,EAUEC,aAVF,EAWEC,aAXF,EAYEC,iBAZF,EAaEC,WAbF,EAcEC,OAdF,EAeEC,WAfF,EAgBEC,gBAhBF,EAiBEC,SAjBF,EAkBEC,cAlBF,EAmBEC,SAnBF,EAoBEC,UApBF,EAsBEC,cAtBF,EAwBEC,SAxBF,EA0BEC,UA1BF,EA2BEC,IA3BF,EA4BEC,QA5BF,EA6BEC,YA7BF,EA8BEC,YA9BF,EA+BEC,aA/BF,EAgCEC,IAhCF,EAiCEC,QAjCF,EAkCEC,KAlCF,EAmCEC,iBAnCF,EAoCEC,MApCF,EAqCEC,QArCF,EAsCEC,KAtCF,EAuCEC,OAvCF,EAwCEC,GAxCF,EAyCEC,KAzCF,EA0CEC,SA1CF,EA2CEC,SA3CF,EA4CEC,cA5CF,EA6CEC,SA7CF,EA8CEC,QA9CF,EA+CEC,cA/CF,EAgDEC,aAAa,IAAIC,gBAhDnB,EAiDEC,OAjDF,EAkDEC,UAlDF,QAmDO,eAnDP;AA0GA,SAASC,UAAT,EAAqBC,OAArB,EAA8BC,QAA9B,QAA8C,UAA9C;AAIA,SAASC,OAAO,IAAIC,YAApB,QAAwC,8BAAxC;AAEA,SAASC,SAAT,EAAoBC,cAApB,QAA0C,YAA1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;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;AAqBD,QAAA,MAAM,cAAc,8FAZjB,WAAW,iBAYqB,CAAC;AAEpC,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,CAAC"}
|