@okta/odyssey-react-mui 0.22.0 → 0.24.0
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 +44 -0
- package/README.md +43 -7
- package/dist/@types/i18next.d.js +14 -0
- package/dist/@types/i18next.d.js.map +1 -0
- package/dist/Autocomplete.js +18 -4
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Banner.js +9 -6
- package/dist/Banner.js.map +1 -1
- package/dist/Button.js +20 -10
- package/dist/Button.js.map +1 -1
- package/dist/Checkbox.js +44 -10
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js +25 -26
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/CircularProgress.js +11 -0
- package/dist/CircularProgress.js.map +1 -1
- package/dist/Dialog.js +72 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Field.js +28 -10
- package/dist/Field.js.map +1 -1
- package/dist/FieldError.js +6 -3
- package/dist/FieldError.js.map +1 -1
- package/dist/FieldHint.js +1 -2
- package/dist/FieldHint.js.map +1 -1
- package/dist/FieldLabel.js +19 -7
- package/dist/FieldLabel.js.map +1 -1
- package/dist/Fieldset.js +55 -0
- package/dist/Fieldset.js.map +1 -0
- package/dist/Form.js +69 -0
- package/dist/Form.js.map +1 -0
- package/dist/Icon.js +8 -8
- package/dist/Icon.js.map +1 -1
- package/dist/Infobox.js +7 -4
- package/dist/Infobox.js.map +1 -1
- package/dist/Link.js +10 -3
- package/dist/Link.js.map +1 -1
- package/dist/MenuButton.js +3 -7
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuItem.js +4 -2
- package/dist/MenuItem.js.map +1 -1
- package/dist/MuiPropsChild.js +32 -0
- package/dist/MuiPropsChild.js.map +1 -0
- package/dist/MuiPropsContext.js +15 -0
- package/dist/MuiPropsContext.js.map +1 -0
- package/dist/NativeSelect.js +61 -0
- package/dist/NativeSelect.js.map +1 -0
- package/dist/OdysseyCacheProvider.js +1 -2
- package/dist/OdysseyCacheProvider.js.map +1 -1
- package/dist/OdysseyI18n.js +93 -0
- package/dist/OdysseyI18n.js.map +1 -0
- package/dist/OdysseyProvider.js +42 -0
- package/dist/OdysseyProvider.js.map +1 -0
- package/dist/OdysseyThemeProvider.js +11 -5
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/OdysseyTranslationProvider.js +47 -0
- package/dist/OdysseyTranslationProvider.js.map +1 -0
- package/dist/OdysseyTranslationProvider.types.js +14 -0
- package/dist/OdysseyTranslationProvider.types.js.map +1 -0
- package/dist/PasswordField.js +20 -3
- package/dist/PasswordField.js.map +1 -1
- package/dist/Radio.js +11 -2
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +36 -28
- package/dist/RadioGroup.js.map +1 -1
- package/dist/ScreenReaderText.js +3 -3
- package/dist/ScreenReaderText.js.map +1 -1
- package/dist/SearchField.js +17 -4
- package/dist/SearchField.js.map +1 -1
- package/dist/Select.js +131 -0
- package/dist/Select.js.map +1 -0
- package/dist/Status.js.map +1 -1
- package/dist/Tabs.js +46 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Tag.js +11 -2
- package/dist/Tag.js.map +1 -1
- package/dist/TagList.js +11 -2
- package/dist/TagList.js.map +1 -1
- package/dist/TagListContext.js +1 -0
- package/dist/TagListContext.js.map +1 -1
- package/dist/TextField.js +28 -9
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +78 -0
- package/dist/Toast.js.map +1 -0
- package/dist/{ThemeProvider.js → ToastStack.js} +12 -10
- package/dist/ToastStack.js.map +1 -0
- package/dist/Tooltip.js +31 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/a11yCheck.js +1 -2
- package/dist/a11yCheck.js.map +1 -1
- package/dist/createUniqueAlphabeticalId.js +1 -2
- package/dist/createUniqueAlphabeticalId.js.map +1 -1
- package/dist/createUniqueId.js +1 -2
- package/dist/createUniqueId.js.map +1 -1
- package/dist/iconDictionary/Add.js +5 -6
- package/dist/iconDictionary/Add.js.map +1 -1
- package/dist/iconDictionary/AddCircle.js +5 -6
- package/dist/iconDictionary/AddCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircle.js +5 -6
- package/dist/iconDictionary/AlertCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircleFilled.js +5 -6
- package/dist/iconDictionary/AlertCircleFilled.js.map +1 -1
- package/dist/iconDictionary/AlertTriangleFilled.js +5 -6
- package/dist/iconDictionary/AlertTriangleFilled.js.map +1 -1
- package/dist/iconDictionary/Anchor.js +6 -7
- package/dist/iconDictionary/Anchor.js.map +1 -1
- package/dist/iconDictionary/ArrowDown.js +5 -6
- package/dist/iconDictionary/ArrowDown.js.map +1 -1
- package/dist/iconDictionary/ArrowLeft.js +5 -6
- package/dist/iconDictionary/ArrowLeft.js.map +1 -1
- package/dist/iconDictionary/ArrowRight.js +5 -6
- package/dist/iconDictionary/ArrowRight.js.map +1 -1
- package/dist/iconDictionary/ArrowUp.js +5 -6
- package/dist/iconDictionary/ArrowUp.js.map +1 -1
- package/dist/iconDictionary/ArrowUpDown.js +5 -6
- package/dist/iconDictionary/ArrowUpDown.js.map +1 -1
- package/dist/iconDictionary/Calendar.js +5 -6
- package/dist/iconDictionary/Calendar.js.map +1 -1
- package/dist/iconDictionary/Check.js +5 -6
- package/dist/iconDictionary/Check.js.map +1 -1
- package/dist/iconDictionary/CheckCircleFilled.js +5 -6
- package/dist/iconDictionary/CheckCircleFilled.js.map +1 -1
- package/dist/iconDictionary/ChevronDown.js +5 -6
- package/dist/iconDictionary/ChevronDown.js.map +1 -1
- package/dist/iconDictionary/ChevronUp.js +5 -6
- package/dist/iconDictionary/ChevronUp.js.map +1 -1
- package/dist/iconDictionary/Close.js +5 -6
- package/dist/iconDictionary/Close.js.map +1 -1
- package/dist/iconDictionary/CloseCircleFilled.js +5 -6
- package/dist/iconDictionary/CloseCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Copy.js +5 -6
- package/dist/iconDictionary/Copy.js.map +1 -1
- package/dist/iconDictionary/Delete.js +5 -6
- package/dist/iconDictionary/Delete.js.map +1 -1
- package/dist/iconDictionary/Download.js +5 -6
- package/dist/iconDictionary/Download.js.map +1 -1
- package/dist/iconDictionary/DragHandle.js +5 -6
- package/dist/iconDictionary/DragHandle.js.map +1 -1
- package/dist/iconDictionary/Edit.js +5 -6
- package/dist/iconDictionary/Edit.js.map +1 -1
- package/dist/iconDictionary/ExternalLink.js +5 -6
- package/dist/iconDictionary/ExternalLink.js.map +1 -1
- package/dist/iconDictionary/Eye.js +5 -6
- package/dist/iconDictionary/Eye.js.map +1 -1
- package/dist/iconDictionary/EyeOff.js +5 -6
- package/dist/iconDictionary/EyeOff.js.map +1 -1
- package/dist/iconDictionary/Filter.js +5 -6
- package/dist/iconDictionary/Filter.js.map +1 -1
- package/dist/iconDictionary/Globe.js +5 -6
- package/dist/iconDictionary/Globe.js.map +1 -1
- package/dist/iconDictionary/Home.js +5 -6
- package/dist/iconDictionary/Home.js.map +1 -1
- package/dist/iconDictionary/InformationCircle.js +5 -6
- package/dist/iconDictionary/InformationCircle.js.map +1 -1
- package/dist/iconDictionary/InformationCircleFilled.js +5 -6
- package/dist/iconDictionary/InformationCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Notification.js +5 -6
- package/dist/iconDictionary/Notification.js.map +1 -1
- package/dist/iconDictionary/OverflowVertical.js +5 -6
- package/dist/iconDictionary/OverflowVertical.js.map +1 -1
- package/dist/iconDictionary/QuestionCircle.js +5 -6
- package/dist/iconDictionary/QuestionCircle.js.map +1 -1
- package/dist/iconDictionary/QuestionCircleFilled.js +5 -6
- package/dist/iconDictionary/QuestionCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Search.js +5 -6
- package/dist/iconDictionary/Search.js.map +1 -1
- package/dist/iconDictionary/Settings.js +4 -5
- package/dist/iconDictionary/Settings.js.map +1 -1
- package/dist/iconDictionary/Subtract.js +5 -6
- package/dist/iconDictionary/Subtract.js.map +1 -1
- package/dist/iconDictionary/SvgIcon.js +1 -0
- package/dist/iconDictionary/SvgIcon.js.map +1 -1
- package/dist/iconDictionary/User.js +5 -6
- package/dist/iconDictionary/User.js.map +1 -1
- package/dist/iconDictionary/UserGroup.js +5 -6
- package/dist/iconDictionary/UserGroup.js.map +1 -1
- package/dist/iconDictionary/index.js.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +11 -0
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_cs.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_da.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_de.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_el.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_es.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_fi.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_fr.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_hu.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_id.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_it.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_ja.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_ko.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_ms.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_nb.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_nl-NL.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_nl-NL.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_pl.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_pt-BR.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_pt-BR.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_ro.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_ru.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_sv.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_th.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_tr.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_uk.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_zh-CN.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_zh-CN.js.map +1 -0
- package/dist/properties/ts/odyssey-react-mui_zh-TW.js +2 -0
- package/dist/properties/ts/odyssey-react-mui_zh-TW.js.map +1 -0
- package/dist/src/Autocomplete.d.ts +2 -1
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Banner.d.ts +19 -19
- package/dist/src/Banner.d.ts.map +1 -1
- package/dist/src/Button.d.ts +4 -3
- package/dist/src/Button.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +4 -2
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +8 -4
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/Dialog.d.ts +25 -0
- package/dist/src/Dialog.d.ts.map +1 -0
- package/dist/src/Field.d.ts +18 -7
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FieldError.d.ts.map +1 -1
- package/dist/src/FieldLabel.d.ts +2 -3
- package/dist/src/FieldLabel.d.ts.map +1 -1
- package/dist/src/Fieldset.d.ts +42 -0
- package/dist/src/Fieldset.d.ts.map +1 -0
- package/dist/src/Form.d.ts +73 -0
- package/dist/src/Form.d.ts.map +1 -0
- package/dist/src/Icon.d.ts +9 -8
- package/dist/src/Icon.d.ts.map +1 -1
- package/dist/src/Infobox.d.ts +7 -7
- package/dist/src/Infobox.d.ts.map +1 -1
- package/dist/src/Link.d.ts +9 -4
- package/dist/src/Link.d.ts.map +1 -1
- package/dist/src/MenuButton.d.ts +7 -3
- package/dist/src/MenuButton.d.ts.map +1 -1
- package/dist/src/MenuItem.d.ts +1 -1
- package/dist/src/MenuItem.d.ts.map +1 -1
- package/dist/src/MuiPropsChild.d.ts +18 -0
- package/dist/src/MuiPropsChild.d.ts.map +1 -0
- package/dist/src/MuiPropsContext.d.ts +15 -0
- package/dist/src/MuiPropsContext.d.ts.map +1 -0
- package/dist/src/NativeSelect.d.ts +36 -0
- package/dist/src/NativeSelect.d.ts.map +1 -0
- package/dist/src/OdysseyI18n.d.ts +54 -0
- package/dist/src/OdysseyI18n.d.ts.map +1 -0
- package/dist/src/OdysseyProvider.d.ts +27 -0
- package/dist/src/OdysseyProvider.d.ts.map +1 -0
- package/dist/src/OdysseyThemeProvider.d.ts +4 -2
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +25 -0
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -0
- package/dist/src/OdysseyTranslationProvider.types.d.ts +14 -0
- package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -0
- package/dist/src/PasswordField.d.ts +8 -8
- package/dist/src/PasswordField.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +8 -8
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +4 -4
- package/dist/src/SearchField.d.ts.map +1 -1
- package/dist/src/Select.d.ts +35 -0
- package/dist/src/Select.d.ts.map +1 -0
- package/dist/src/Status.d.ts +2 -2
- package/dist/src/Status.d.ts.map +1 -1
- package/dist/src/Tabs.d.ts +27 -0
- package/dist/src/Tabs.d.ts.map +1 -0
- package/dist/src/TextField.d.ts +12 -15
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +60 -0
- package/dist/src/Toast.d.ts.map +1 -0
- package/dist/src/ToastStack.d.ts +19 -0
- package/dist/src/ToastStack.d.ts.map +1 -0
- package/dist/src/{ThemeProvider.d.ts → Tooltip.d.ts} +8 -4
- package/dist/src/Tooltip.d.ts.map +1 -0
- package/dist/src/iconDictionary/Add.d.ts +2 -2
- package/dist/src/iconDictionary/AddCircle.d.ts +2 -2
- package/dist/src/iconDictionary/AlertCircle.d.ts +2 -2
- package/dist/src/iconDictionary/AlertCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Anchor.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowDown.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowLeft.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowRight.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowUp.d.ts +2 -2
- package/dist/src/iconDictionary/ArrowUpDown.d.ts +2 -2
- package/dist/src/iconDictionary/Calendar.d.ts +2 -2
- package/dist/src/iconDictionary/Check.d.ts +2 -2
- package/dist/src/iconDictionary/CheckCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/ChevronDown.d.ts +2 -2
- package/dist/src/iconDictionary/ChevronUp.d.ts +2 -2
- package/dist/src/iconDictionary/Close.d.ts +2 -2
- package/dist/src/iconDictionary/CloseCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Copy.d.ts +2 -2
- package/dist/src/iconDictionary/Delete.d.ts +2 -2
- package/dist/src/iconDictionary/Download.d.ts +2 -2
- package/dist/src/iconDictionary/DragHandle.d.ts +2 -2
- package/dist/src/iconDictionary/Edit.d.ts +2 -2
- package/dist/src/iconDictionary/ExternalLink.d.ts +2 -2
- package/dist/src/iconDictionary/Eye.d.ts +2 -2
- package/dist/src/iconDictionary/EyeOff.d.ts +2 -2
- package/dist/src/iconDictionary/Filter.d.ts +2 -2
- package/dist/src/iconDictionary/Globe.d.ts +2 -2
- package/dist/src/iconDictionary/Home.d.ts +2 -2
- package/dist/src/iconDictionary/InformationCircle.d.ts +2 -2
- package/dist/src/iconDictionary/InformationCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Notification.d.ts +2 -2
- package/dist/src/iconDictionary/OverflowVertical.d.ts +2 -2
- package/dist/src/iconDictionary/QuestionCircle.d.ts +2 -2
- package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +2 -2
- package/dist/src/iconDictionary/Search.d.ts +2 -2
- package/dist/src/iconDictionary/Settings.d.ts +2 -2
- package/dist/src/iconDictionary/Subtract.d.ts +2 -2
- package/dist/src/iconDictionary/User.d.ts +2 -2
- package/dist/src/iconDictionary/UserGroup.d.ts +2 -2
- package/dist/src/iconDictionary/index.d.ts +40 -40
- package/dist/src/index.d.ts +15 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +11 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts.map +1 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts.map +1 -0
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/index.d.ts +3 -1
- package/dist/src/theme/index.d.ts.map +1 -1
- package/dist/src/theme/mixins.d.ts +2 -1
- package/dist/src/theme/mixins.d.ts.map +1 -1
- package/dist/src/theme/palette.d.ts +2 -1
- package/dist/src/theme/palette.d.ts.map +1 -1
- package/dist/src/theme/shape.d.ts +2 -1
- package/dist/src/theme/shape.d.ts.map +1 -1
- package/dist/src/theme/spacing.d.ts +2 -1
- package/dist/src/theme/spacing.d.ts.map +1 -1
- package/dist/src/theme/theme.d.ts +3 -2
- package/dist/src/theme/theme.d.ts.map +1 -1
- package/dist/src/theme/typography.d.ts +2 -1
- package/dist/src/theme/typography.d.ts.map +1 -1
- package/dist/theme/components.js +123 -85
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/components.types.js +1 -0
- package/dist/theme/components.types.js.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/mixins.js +8 -6
- package/dist/theme/mixins.js.map +1 -1
- package/dist/theme/mixins.types.js +1 -0
- package/dist/theme/mixins.types.js.map +1 -1
- package/dist/theme/palette.js +89 -86
- package/dist/theme/palette.js.map +1 -1
- package/dist/theme/palette.types.js +1 -0
- package/dist/theme/palette.types.js.map +1 -1
- package/dist/theme/shape.js +6 -4
- package/dist/theme/shape.js.map +1 -1
- package/dist/theme/spacing.js +4 -1
- package/dist/theme/spacing.js.map +1 -1
- package/dist/theme/temp.js +1 -0
- package/dist/theme/temp.js.map +1 -1
- package/dist/theme/theme.js +12 -9
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/typography.js +85 -83
- package/dist/theme/typography.js.map +1 -1
- package/dist/theme/typography.types.js +1 -0
- package/dist/theme/typography.types.js.map +1 -1
- package/dist/theme/useTheme.js +1 -0
- package/dist/theme/useTheme.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/useUniqueAlphabeticalId.js +1 -0
- package/dist/useUniqueAlphabeticalId.js.map +1 -1
- package/dist/useUniqueId.js +1 -0
- package/dist/useUniqueId.js.map +1 -1
- package/i18n.config.json +8 -0
- package/package.json +9 -4
- package/scripts/properties-to-ts.js +103 -0
- package/src/@types/i18next.d.ts +22 -0
- package/src/Autocomplete.tsx +10 -1
- package/src/Banner.tsx +37 -32
- package/src/Button.tsx +38 -18
- package/src/Checkbox.tsx +47 -21
- package/src/CheckboxGroup.tsx +30 -34
- package/src/Dialog.tsx +110 -0
- package/src/Field.tsx +56 -24
- package/src/FieldError.tsx +6 -1
- package/src/FieldLabel.tsx +13 -10
- package/src/Fieldset.tsx +95 -0
- package/src/Form.tsx +142 -0
- package/src/Icon.test.tsx +1 -1
- package/src/Icon.tsx +27 -13
- package/src/Infobox.tsx +18 -13
- package/src/Link.tsx +14 -6
- package/src/MenuButton.tsx +8 -3
- package/src/MenuItem.tsx +1 -0
- package/src/MuiPropsChild.tsx +41 -0
- package/src/MuiPropsContext.ts +17 -0
- package/src/NativeSelect.tsx +107 -0
- package/src/OdysseyI18n.ts +101 -0
- package/src/OdysseyProvider.tsx +59 -0
- package/src/OdysseyThemeProvider.tsx +9 -3
- package/src/OdysseyTranslationProvider.test.tsx +63 -0
- package/src/OdysseyTranslationProvider.tsx +65 -0
- package/src/OdysseyTranslationProvider.types.ts +42 -0
- package/src/PasswordField.tsx +18 -11
- package/src/RadioGroup.tsx +31 -46
- package/src/SearchField.tsx +10 -8
- package/src/Select.tsx +226 -0
- package/src/Status.tsx +2 -2
- package/src/Tabs.tsx +70 -0
- package/src/TextField.tsx +31 -25
- package/src/Toast.tsx +140 -0
- package/src/{ThemeProvider.tsx → ToastStack.tsx} +16 -9
- package/src/Tooltip.tsx +39 -0
- package/src/iconDictionary/Add.tsx +3 -3
- package/src/iconDictionary/AddCircle.tsx +3 -3
- package/src/iconDictionary/AlertCircle.tsx +3 -3
- package/src/iconDictionary/AlertCircleFilled.tsx +3 -3
- package/src/iconDictionary/AlertTriangleFilled.tsx +3 -3
- package/src/iconDictionary/Anchor.tsx +3 -3
- package/src/iconDictionary/ArrowDown.tsx +3 -3
- package/src/iconDictionary/ArrowLeft.tsx +3 -3
- package/src/iconDictionary/ArrowRight.tsx +3 -3
- package/src/iconDictionary/ArrowUp.tsx +3 -3
- package/src/iconDictionary/ArrowUpDown.tsx +3 -3
- package/src/iconDictionary/Calendar.tsx +3 -3
- package/src/iconDictionary/Check.tsx +3 -3
- package/src/iconDictionary/CheckCircleFilled.tsx +3 -3
- package/src/iconDictionary/ChevronDown.tsx +3 -3
- package/src/iconDictionary/ChevronUp.tsx +3 -3
- package/src/iconDictionary/Close.tsx +3 -3
- package/src/iconDictionary/CloseCircleFilled.tsx +3 -3
- package/src/iconDictionary/Copy.tsx +3 -3
- package/src/iconDictionary/Delete.tsx +3 -3
- package/src/iconDictionary/Download.tsx +3 -3
- package/src/iconDictionary/DragHandle.tsx +3 -3
- package/src/iconDictionary/Edit.tsx +3 -3
- package/src/iconDictionary/ExternalLink.tsx +3 -3
- package/src/iconDictionary/Eye.tsx +3 -3
- package/src/iconDictionary/EyeOff.tsx +3 -3
- package/src/iconDictionary/Filter.tsx +3 -3
- package/src/iconDictionary/Globe.tsx +3 -3
- package/src/iconDictionary/Home.tsx +3 -3
- package/src/iconDictionary/InformationCircle.tsx +3 -3
- package/src/iconDictionary/InformationCircleFilled.tsx +3 -3
- package/src/iconDictionary/Notification.tsx +3 -3
- package/src/iconDictionary/OverflowVertical.tsx +3 -3
- package/src/iconDictionary/QuestionCircle.tsx +3 -3
- package/src/iconDictionary/QuestionCircleFilled.tsx +3 -3
- package/src/iconDictionary/Search.tsx +3 -3
- package/src/iconDictionary/Settings.tsx +2 -2
- package/src/iconDictionary/Subtract.tsx +3 -3
- package/src/iconDictionary/User.tsx +3 -3
- package/src/iconDictionary/UserGroup.tsx +3 -3
- package/src/iconDictionary/index.ts +1 -1
- package/src/index.ts +11 -23
- package/src/properties/odyssey-react-mui.properties +8 -0
- package/src/properties/translations/odyssey-react-mui_cs.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_da.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_de.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_el.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_es.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_fi.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_fr.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_hu.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_id.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_it.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_ja.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_ko.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_ms.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_nb.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_nl-NL.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_pl.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_pt-BR.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_ro.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_ru.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_sv.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_th.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_tr.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_uk.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_zh-CN.properties +0 -0
- package/src/properties/translations/odyssey-react-mui_zh-TW.properties +0 -0
- package/src/properties/ts/odyssey-react-mui.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_nl-NL.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_pt-BR.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_zh-CN.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_zh-TW.ts +1 -0
- package/src/theme/components.tsx +44 -13
- package/src/theme/index.ts +5 -1
- package/src/theme/mixins.ts +10 -6
- package/src/theme/palette.ts +95 -88
- package/src/theme/shape.ts +12 -8
- package/src/theme/spacing.ts +17 -12
- package/src/theme/theme.ts +14 -10
- package/src/theme/typography.ts +87 -83
- package/dist/ThemeProvider.js.map +0 -1
- package/dist/src/ThemeProvider.d.ts.map +0 -1
package/dist/Infobox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Infobox.js","names":["memo","Alert","AlertTitle","ScreenReaderText","Infobox","
|
|
1
|
+
{"version":3,"file":"Infobox.js","names":["memo","Alert","AlertTitle","ScreenReaderText","useTranslation","jsxs","_jsxs","jsx","_jsx","Infobox","_ref","children","role","severity","title","t","variant","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, ScreenReaderText } from \".\";\nimport { useTranslation } from \"react-i18next\";\n\nexport type InfoboxProps = {\n /**\n * The contents of the alert\n */\n children: ReactNode;\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 * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * The title of the alert\n */\n title?: string;\n};\n\nconst Infobox = ({ children, role, severity, title }: InfoboxProps) => {\n const { t } = useTranslation();\n\n return (\n <Alert role={role} severity={severity} variant=\"infobox\">\n <ScreenReaderText>{t(`severity.${severity}`)}: </ScreenReaderText>\n {title && <AlertTitle>{title}</AlertTitle>}\n {children}\n </Alert>\n );\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,IAAI,QAAmB,OAAO;AAAC,SAC/BC,KAAK,EAAEC,UAAU,EAAEC,gBAAgB;AAC5C,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAuB/C,MAAMC,OAAO,GAAGC,IAAA,IAAuD;EAAA,IAAtD;IAAEC,QAAQ;IAAEC,IAAI;IAAEC,QAAQ;IAAEC;EAAoB,CAAC,GAAAJ,IAAA;EAChE,MAAM;IAAEK;EAAE,CAAC,GAAGX,cAAc,CAAC,CAAC;EAE9B,OACEE,KAAA,CAACL,KAAK;IAACW,IAAI,EAAEA,IAAK;IAACC,QAAQ,EAAEA,QAAS;IAACG,OAAO,EAAC,SAAS;IAAAL,QAAA,GACtDL,KAAA,CAACH,gBAAgB;MAAAQ,QAAA,GAAEI,CAAC,CAAE,YAAWF,QAAS,EAAC,CAAC,EAAC,IAAE;IAAA,CAAkB,CAAC,EACjEC,KAAK,IAAIN,IAAA,CAACN,UAAU;MAAAS,QAAA,EAAEG;IAAK,CAAa,CAAC,EACzCH,QAAQ;EAAA,CACJ,CAAC;AAEZ,CAAC;AAED,MAAMM,eAAe,GAAGjB,IAAI,CAACS,OAAO,CAAC;AAErC,SAASQ,eAAe,IAAIR,OAAO"}
|
package/dist/Link.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _Link from "@mui/material/Link";
|
|
2
2
|
import _SvgIcon from "@mui/material/SvgIcon";
|
|
3
|
-
|
|
4
3
|
/*!
|
|
5
4
|
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
6
5
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -12,6 +11,7 @@ import _SvgIcon from "@mui/material/SvgIcon";
|
|
|
12
11
|
*
|
|
13
12
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
14
13
|
*/
|
|
14
|
+
|
|
15
15
|
import { forwardRef } from "react";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -19,10 +19,17 @@ export const Link = forwardRef((props, ref) => {
|
|
|
19
19
|
const {
|
|
20
20
|
icon,
|
|
21
21
|
children,
|
|
22
|
-
target
|
|
22
|
+
target,
|
|
23
|
+
variant,
|
|
24
|
+
href,
|
|
25
|
+
rel
|
|
23
26
|
} = props;
|
|
24
|
-
return _jsxs(_Link, {
|
|
27
|
+
return _jsxs(_Link, {
|
|
25
28
|
ref: ref,
|
|
29
|
+
variant: variant,
|
|
30
|
+
target: target,
|
|
31
|
+
href: href,
|
|
32
|
+
rel: rel,
|
|
26
33
|
children: [icon && _jsx("span", {
|
|
27
34
|
className: "Link-icon",
|
|
28
35
|
children: icon
|
package/dist/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","names":["forwardRef","Link","props","ref","icon","children","target"],"sources":["../src/Link.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 { forwardRef, ReactElement } from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"Link.js","names":["forwardRef","jsx","_jsx","jsxs","_jsxs","Link","props","ref","icon","children","target","variant","href","rel","_Link","className","role","_SvgIcon","viewBox","fillRule","clipRule","d","fill"],"sources":["../src/Link.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 { forwardRef, ReactElement } from \"react\";\n\nimport {\n Link as MuiLink,\n LinkProps as MuiLinkProps,\n SvgIcon,\n} from \"@mui/material\";\n\nexport type LinkProps = {\n children: React.ReactNode;\n href: string;\n icon?: ReactElement;\n rel?: string;\n target?: \"_self\" | \"_blank\" | \"_parent\" | \"_top\" | string;\n variant?: MuiLinkProps[\"variant\"];\n};\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>((props, ref) => {\n const { icon, children, target, variant, href, rel } = props;\n return (\n <MuiLink ref={ref} variant={variant} target={target} href={href} rel={rel}>\n {icon && <span className=\"Link-icon\">{icon}</span>}\n {children}\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <SvgIcon viewBox=\"0 0 16 16\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13.2929 2H7.99998V1H14.5C14.7761 1 15 1.22386 15 1.5V8H14V2.70711L6.35353 10.3536L5.64642 9.64645L13.2929 2ZM1.5 4H1V4.5V14.5V15H1.5H11.5H12V14.5V8H11V14H2V5H8V4H1.5Z\"\n fill=\"currentColor\"\n />\n </SvgIcon>\n </span>\n )}\n </MuiLink>\n );\n});\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAsB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAiBjD,OAAO,MAAMC,IAAI,GAAGL,UAAU,CAA+B,CAACM,KAAK,EAAEC,GAAG,KAAK;EAC3E,MAAM;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,OAAO;IAAEC,IAAI;IAAEC;EAAI,CAAC,GAAGP,KAAK;EAC5D,OACEF,KAAA,CAAAU,KAAA;IAASP,GAAG,EAAEA,GAAI;IAACI,OAAO,EAAEA,OAAQ;IAACD,MAAM,EAAEA,MAAO;IAACE,IAAI,EAAEA,IAAK;IAACC,GAAG,EAAEA,GAAI;IAAAJ,QAAA,GACvED,IAAI,IAAIN,IAAA;MAAMa,SAAS,EAAC,WAAW;MAAAN,QAAA,EAAED;IAAI,CAAO,CAAC,EACjDC,QAAQ,EACRC,MAAM,KAAK,QAAQ,IAClBR,IAAA;MAAMa,SAAS,EAAC,gBAAgB;MAACC,IAAI,EAAC,cAAc;MAAAP,QAAA,EAClDP,IAAA,CAAAe,QAAA;QAASC,OAAO,EAAC,WAAW;QAAAT,QAAA,EAC1BP,IAAA;UACEiB,QAAQ,EAAC,SAAS;UAClBC,QAAQ,EAAC,SAAS;UAClBC,CAAC,EAAC,yKAAyK;UAC3KC,IAAI,EAAC;QAAc,CACpB;MAAC,CACK;IAAC,CACN,CACP;EAAA,CACM,CAAC;AAEd,CAAC,CAAC"}
|
package/dist/MenuButton.js
CHANGED
|
@@ -13,26 +13,23 @@ import { Button, ChevronDownIcon, Menu, useUniqueId } from "./index.js";
|
|
|
13
13
|
import { memo, useMemo, useState } from "react";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
16
|
const MenuButton = _ref => {
|
|
18
17
|
let {
|
|
19
18
|
buttonLabel = "",
|
|
20
19
|
children,
|
|
21
20
|
buttonEndIcon = _jsx(ChevronDownIcon, {}),
|
|
22
|
-
buttonVariant = "secondary"
|
|
21
|
+
buttonVariant = "secondary",
|
|
22
|
+
id: idOverride
|
|
23
23
|
} = _ref;
|
|
24
24
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
25
25
|
const open = Boolean(anchorEl);
|
|
26
|
-
|
|
27
26
|
const handleClick = event => {
|
|
28
27
|
setAnchorEl(event.currentTarget);
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
const handleClose = () => {
|
|
32
30
|
setAnchorEl(null);
|
|
33
31
|
};
|
|
34
|
-
|
|
35
|
-
const uniqueId = useUniqueId();
|
|
32
|
+
const uniqueId = useUniqueId(idOverride);
|
|
36
33
|
const menuListProps = useMemo(() => ({
|
|
37
34
|
"aria-labelledby": `${uniqueId}-button`
|
|
38
35
|
}), [uniqueId]);
|
|
@@ -56,7 +53,6 @@ const MenuButton = _ref => {
|
|
|
56
53
|
})]
|
|
57
54
|
});
|
|
58
55
|
};
|
|
59
|
-
|
|
60
56
|
const MemoizedMenuButton = memo(MenuButton);
|
|
61
57
|
export { MemoizedMenuButton as MenuButton };
|
|
62
58
|
//# sourceMappingURL=MenuButton.js.map
|
package/dist/MenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","names":["Button","ChevronDownIcon","Menu","useUniqueId","memo","useMemo","useState","MenuButton","buttonLabel","children","buttonEndIcon","buttonVariant","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleClose","uniqueId","menuListProps","undefined","MemoizedMenuButton"],"sources":["../src/MenuButton.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 Button,\n ButtonProps,\n ChevronDownIcon,\n Divider,\n ListSubheader,\n Menu,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { memo, MouseEvent, ReactElement, useMemo, useState } from \"react\";\n\nexport
|
|
1
|
+
{"version":3,"file":"MenuButton.js","names":["Button","ChevronDownIcon","Menu","useUniqueId","memo","useMemo","useState","jsx","_jsx","jsxs","_jsxs","MenuButton","_ref","buttonLabel","children","buttonEndIcon","buttonVariant","id","idOverride","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleClose","uniqueId","menuListProps","endIcon","undefined","onClick","text","variant","onClose","MenuListProps","MemoizedMenuButton"],"sources":["../src/MenuButton.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 Button,\n ButtonProps,\n ChevronDownIcon,\n Divider,\n ListSubheader,\n Menu,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { memo, MouseEvent, ReactElement, useMemo, useState } from \"react\";\n\nexport type MenuButtonProps = {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: Array<\n ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n >;\n /**\n * The end Icon on the trigggering Button\n */\n buttonEndIcon?: ReactElement;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: ButtonProps[\"variant\"];\n /**\n * The id of the `input` element.\n */\n id?: string;\n};\n\nconst MenuButton = ({\n buttonLabel = \"\",\n children,\n buttonEndIcon = <ChevronDownIcon />,\n buttonVariant = \"secondary\",\n id: idOverride,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const open = Boolean(anchorEl);\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n return (\n <div>\n <Button\n endIcon={buttonEndIcon}\n id={`${uniqueId}-button`}\n aria-controls={open ? `${uniqueId}-menu` : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? \"true\" : undefined}\n onClick={handleClick}\n text={buttonLabel}\n variant={buttonVariant}\n />\n <Menu\n id={`${uniqueId}-menu`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={menuListProps}\n >\n {children}\n </Menu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,MAAM,EAENC,eAAe,EAGfC,IAAI,EAEJC,WAAW;AAEb,SAASC,IAAI,EAA4BC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA2B1E,MAAMC,UAAU,GAAGC,IAAA,IAMI;EAAA,IANH;IAClBC,WAAW,GAAG,EAAE;IAChBC,QAAQ;IACRC,aAAa,GAAGP,IAAA,CAACP,eAAe,IAAE,CAAC;IACnCe,aAAa,GAAG,WAAW;IAC3BC,EAAE,EAAEC;EACW,CAAC,GAAAN,IAAA;EAChB,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAQ,CAAqB,IAAI,CAAC;EAElE,MAAMe,IAAI,GAAGC,OAAO,CAACH,QAAQ,CAAC;EAE9B,MAAMI,WAAW,GAAIC,KAAoC,IAAK;IAC5DJ,WAAW,CAACI,KAAK,CAACC,aAAa,CAAC;EAClC,CAAC;EAED,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxBN,WAAW,CAAC,IAAI,CAAC;EACnB,CAAC;EAED,MAAMO,QAAQ,GAAGxB,WAAW,CAACe,UAAU,CAAC;EAExC,MAAMU,aAAa,GAAGvB,OAAO,CAC3B,OAAO;IAAE,iBAAiB,EAAG,GAAEsB,QAAS;EAAS,CAAC,CAAC,EACnD,CAACA,QAAQ,CACX,CAAC;EAED,OACEjB,KAAA;IAAAI,QAAA,GACEN,IAAA,CAACR,MAAM;MACL6B,OAAO,EAAEd,aAAc;MACvBE,EAAE,EAAG,GAAEU,QAAS,SAAS;MACzB,iBAAeN,IAAI,GAAI,GAAEM,QAAS,OAAM,GAAGG,SAAU;MACrD,iBAAc,MAAM;MACpB,iBAAeT,IAAI,GAAG,MAAM,GAAGS,SAAU;MACzCC,OAAO,EAAER,WAAY;MACrBS,IAAI,EAAEnB,WAAY;MAClBoB,OAAO,EAAEjB;IAAc,CACxB,CAAC,EACFR,IAAA,CAACN,IAAI;MACHe,EAAE,EAAG,GAAEU,QAAS,OAAO;MACvBR,QAAQ,EAAEA,QAAS;MACnBE,IAAI,EAAEA,IAAK;MACXa,OAAO,EAAER,WAAY;MACrBS,aAAa,EAAEP,aAAc;MAAAd,QAAA,EAE5BA;IAAQ,CACL,CAAC;EAAA,CACJ,CAAC;AAEV,CAAC;AAED,MAAMsB,kBAAkB,GAAGhC,IAAI,CAACO,UAAU,CAAC;AAE3C,SAASyB,kBAAkB,IAAIzB,UAAU"}
|
package/dist/MenuItem.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _MenuItem from "@mui/material/MenuItem";
|
|
2
|
-
|
|
3
2
|
/*!
|
|
4
3
|
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
4
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -11,6 +10,7 @@ import _MenuItem from "@mui/material/MenuItem";
|
|
|
11
10
|
*
|
|
12
11
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
13
12
|
*/
|
|
13
|
+
|
|
14
14
|
import { memo, forwardRef } from "react";
|
|
15
15
|
import { menuItemClasses } from "@mui/material/MenuItem";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -19,12 +19,14 @@ const MenuItem = forwardRef((_ref, ref) => {
|
|
|
19
19
|
isDestructive,
|
|
20
20
|
...props
|
|
21
21
|
} = _ref;
|
|
22
|
-
return _jsx(_MenuItem, {
|
|
22
|
+
return _jsx(_MenuItem, {
|
|
23
|
+
...props,
|
|
23
24
|
ref: ref,
|
|
24
25
|
className: isDestructive ? `${menuItemClasses.root}-destructive` : undefined,
|
|
25
26
|
children: props.children
|
|
26
27
|
});
|
|
27
28
|
});
|
|
28
29
|
const MemoizedMenuItem = memo(MenuItem);
|
|
30
|
+
MemoizedMenuItem.displayName = "MenuItem";
|
|
29
31
|
export { MemoizedMenuItem as MenuItem };
|
|
30
32
|
//# sourceMappingURL=MenuItem.js.map
|
package/dist/MenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","names":["memo","forwardRef","menuItemClasses","MenuItem","ref","isDestructive","props","root","undefined","children","MemoizedMenuItem"],"sources":["../src/MenuItem.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, forwardRef } from \"react\";\nimport { MenuItem as MuiMenuItem } from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport type { MenuItemProps as MuiMenuItemProps } from \"@mui/material\";\n\nexport interface MenuItemProps\n extends Omit<\n MuiMenuItemProps,\n | \"component\"\n | \"dense\"\n | \"disableGutters\"\n | \"divider\"\n | \"focusVisibleClassName\"\n > {\n /**\n * Toggles whether or not the MenuItem represents a destructive action.\n */\n isDestructive?: boolean;\n}\n\nconst MenuItem = forwardRef<HTMLLIElement, MenuItemProps>(\n ({ isDestructive, ...props }, ref) => (\n <MuiMenuItem\n {...props}\n ref={ref}\n className={\n isDestructive ? `${menuItemClasses.root}-destructive` : undefined\n }\n >\n {props.children}\n </MuiMenuItem>\n )\n);\n\nconst MemoizedMenuItem = memo(MenuItem);\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuItem.js","names":["memo","forwardRef","menuItemClasses","jsx","_jsx","MenuItem","_ref","ref","isDestructive","props","_MenuItem","className","root","undefined","children","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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, forwardRef } from \"react\";\nimport { MenuItem as MuiMenuItem } from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport type { MenuItemProps as MuiMenuItemProps } from \"@mui/material\";\n\nexport interface MenuItemProps\n extends Omit<\n MuiMenuItemProps,\n | \"component\"\n | \"dense\"\n | \"disableGutters\"\n | \"divider\"\n | \"focusVisibleClassName\"\n > {\n /**\n * Toggles whether or not the MenuItem represents a destructive action.\n */\n isDestructive?: boolean;\n}\n\nconst MenuItem = forwardRef<HTMLLIElement, MenuItemProps>(\n ({ isDestructive, ...props }, ref) => (\n <MuiMenuItem\n {...props}\n ref={ref}\n className={\n isDestructive ? `${menuItemClasses.root}-destructive` : undefined\n }\n >\n {props.children}\n </MuiMenuItem>\n )\n);\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,OAAO;AAExC,SAASC,eAAe,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAkBzD,MAAMC,QAAQ,GAAGJ,UAAU,CACzB,CAAAK,IAAA,EAA8BC,GAAG;EAAA,IAAhC;IAAEC,aAAa;IAAE,GAAGC;EAAM,CAAC,GAAAH,IAAA;EAAA,OAC1BF,IAAA,CAAAM,SAAA;IAAA,GACMD,KAAK;IACTF,GAAG,EAAEA,GAAI;IACTI,SAAS,EACPH,aAAa,GAAI,GAAEN,eAAe,CAACU,IAAK,cAAa,GAAGC,SACzD;IAAAC,QAAA,EAEAL,KAAK,CAACK;EAAQ,CACJ,CAAC;AAAA,CAElB,CAAC;AAED,MAAMC,gBAAgB,GAAGf,IAAI,CAACK,QAAQ,CAAC;AACvCU,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIV,QAAQ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { forwardRef, memo, useMemo } from "react";
|
|
14
|
+
import { MuiPropsContext } from "./MuiPropsContext.js";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
const MuiPropsChild = forwardRef((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
...muiProps
|
|
20
|
+
} = _ref;
|
|
21
|
+
const providerValue = useMemo(() => ({
|
|
22
|
+
...muiProps,
|
|
23
|
+
ref
|
|
24
|
+
}), [muiProps, ref]);
|
|
25
|
+
return _jsx(MuiPropsContext.Provider, {
|
|
26
|
+
value: providerValue,
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const MemoizedMuiPropsChild = memo(MuiPropsChild);
|
|
31
|
+
export { MemoizedMuiPropsChild as MuiPropsChild };
|
|
32
|
+
//# sourceMappingURL=MuiPropsChild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiPropsChild.js","names":["forwardRef","memo","useMemo","MuiPropsContext","jsx","_jsx","MuiPropsChild","_ref","ref","children","muiProps","providerValue","Provider","value","MemoizedMuiPropsChild"],"sources":["../src/MuiPropsChild.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { forwardRef, memo, ReactNode, useMemo } from \"react\";\n\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\n\nexport type MuiPropsChildProps = {\n children: ReactNode;\n};\n\nconst MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(\n ({ children, ...muiProps }, ref) => {\n const providerValue = useMemo<MuiPropsContextType>(\n () => ({\n ...muiProps,\n ref,\n }),\n [muiProps, ref]\n );\n\n return (\n <MuiPropsContext.Provider value={providerValue}>\n {children}\n </MuiPropsContext.Provider>\n );\n }\n);\n\nconst MemoizedMuiPropsChild = memo(MuiPropsChild);\n\nexport { MemoizedMuiPropsChild as MuiPropsChild };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAEpDC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxB,MAAMC,aAAa,GAAGN,UAAU,CAC9B,CAAAO,IAAA,EAA4BC,GAAG,KAAK;EAAA,IAAnC;IAAEC,QAAQ;IAAE,GAAGC;EAAS,CAAC,GAAAH,IAAA;EACxB,MAAMI,aAAa,GAAGT,OAAO,CAC3B,OAAO;IACL,GAAGQ,QAAQ;IACXF;EACF,CAAC,CAAC,EACF,CAACE,QAAQ,EAAEF,GAAG,CAChB,CAAC;EAED,OACEH,IAAA,CAACF,eAAe,CAACS,QAAQ;IAACC,KAAK,EAAEF,aAAc;IAAAF,QAAA,EAC5CA;EAAQ,CACe,CAAC;AAE/B,CACF,CAAC;AAED,MAAMK,qBAAqB,GAAGb,IAAI,CAACK,aAAa,CAAC;AAEjD,SAASQ,qBAAqB,IAAIR,aAAa"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { createContext } from "react";
|
|
14
|
+
export const MuiPropsContext = createContext({});
|
|
15
|
+
//# sourceMappingURL=MuiPropsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MuiPropsContext.js","names":["createContext","MuiPropsContext"],"sources":["../src/MuiPropsContext.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { createContext } from \"react\";\n\nexport type MuiPropsContextType = Record<string, unknown>;\n\nexport const MuiPropsContext = createContext<MuiPropsContextType>({});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,OAAO;AAIrC,OAAO,MAAMC,eAAe,GAAGD,aAAa,CAAsB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _Select from "@mui/material/Select";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
4
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
5
|
+
*
|
|
6
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
*
|
|
11
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { forwardRef, memo, useCallback } from "react";
|
|
15
|
+
import { Field } from "./Field.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const NativeSelect = forwardRef((_ref, ref) => {
|
|
18
|
+
let {
|
|
19
|
+
defaultValue,
|
|
20
|
+
errorMessage,
|
|
21
|
+
hint,
|
|
22
|
+
id: idOverride,
|
|
23
|
+
isDisabled = false,
|
|
24
|
+
isMultiSelect = false,
|
|
25
|
+
isOptional = false,
|
|
26
|
+
label,
|
|
27
|
+
onBlur,
|
|
28
|
+
onChange,
|
|
29
|
+
onFocus,
|
|
30
|
+
value,
|
|
31
|
+
children
|
|
32
|
+
} = _ref;
|
|
33
|
+
const renderFieldComponent = useCallback(() => _jsx(_Select, {
|
|
34
|
+
defaultValue: defaultValue,
|
|
35
|
+
id: idOverride,
|
|
36
|
+
name: idOverride,
|
|
37
|
+
multiple: isMultiSelect,
|
|
38
|
+
native: true,
|
|
39
|
+
onBlur: onBlur,
|
|
40
|
+
onChange: onChange,
|
|
41
|
+
onFocus: onFocus,
|
|
42
|
+
ref: ref,
|
|
43
|
+
value: value,
|
|
44
|
+
children: children
|
|
45
|
+
}), [defaultValue, idOverride, isMultiSelect, onBlur, onChange, onFocus, ref, children, value]);
|
|
46
|
+
return _jsx(Field, {
|
|
47
|
+
errorMessage: errorMessage,
|
|
48
|
+
fieldType: "single",
|
|
49
|
+
hasVisibleLabel: true,
|
|
50
|
+
hint: hint,
|
|
51
|
+
id: idOverride,
|
|
52
|
+
isDisabled: isDisabled,
|
|
53
|
+
isOptional: isOptional,
|
|
54
|
+
label: label,
|
|
55
|
+
renderFieldComponent: renderFieldComponent
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const MemoizedNativeSelect = memo(NativeSelect);
|
|
59
|
+
MemoizedNativeSelect.displayName = "NativeSelect";
|
|
60
|
+
export { MemoizedNativeSelect as NativeSelect };
|
|
61
|
+
//# sourceMappingURL=NativeSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSelect.js","names":["forwardRef","memo","useCallback","Field","jsx","_jsx","NativeSelect","_ref","ref","defaultValue","errorMessage","hint","id","idOverride","isDisabled","isMultiSelect","isOptional","label","onBlur","onChange","onFocus","value","children","renderFieldComponent","_Select","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.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 { ReactElement, forwardRef, memo, useCallback } from \"react\";\nimport { Select as MuiSelect } from \"@mui/material\";\nimport { SelectProps as MuiSelectProps } from \"@mui/material\";\nimport { Field } from \"./Field\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectProps = {\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n defaultValue?: string;\n errorMessage?: string;\n hint?: string;\n id?: string;\n isDisabled?: boolean;\n isMultiSelect?: boolean;\n isOptional?: boolean;\n label: string;\n onBlur?: MuiSelectProps[\"onBlur\"];\n onChange?: MuiSelectProps[\"onChange\"];\n onFocus?: MuiSelectProps[\"onFocus\"];\n value?: string | string[];\n};\n\nconst NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n (\n {\n defaultValue,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiSelect = false,\n isOptional = false,\n label,\n onBlur,\n onChange,\n onFocus,\n value,\n children,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n () => (\n <MuiSelect\n defaultValue={defaultValue}\n id={idOverride}\n name={idOverride}\n multiple={isMultiSelect}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n value={value}\n children={children}\n />\n ),\n [\n defaultValue,\n idOverride,\n isMultiSelect,\n onBlur,\n onChange,\n onFocus,\n ref,\n children,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAuBA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAAC,SAG3DC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAwBd,MAAMC,YAAY,GAAGN,UAAU,CAC7B,CAAAO,IAAA,EAgBEC,GAAG,KACA;EAAA,IAhBH;IACEC,YAAY;IACZC,YAAY;IACZC,IAAI;IACJC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,aAAa,GAAG,KAAK;IACrBC,UAAU,GAAG,KAAK;IAClBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,KAAK;IACLC;EACF,CAAC,GAAAf,IAAA;EAGD,MAAMgB,oBAAoB,GAAGrB,WAAW,CACtC,MACEG,IAAA,CAAAmB,OAAA;IACEf,YAAY,EAAEA,YAAa;IAC3BG,EAAE,EAAEC,UAAW;IACfY,IAAI,EAAEZ,UAAW;IACjBa,QAAQ,EAAEX,aAAc;IACxBY,MAAM,EAAE,IAAK;IACbT,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBZ,GAAG,EAAEA,GAAI;IACTa,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA;EAAS,CACpB,CACF,EACD,CACEb,YAAY,EACZI,UAAU,EACVE,aAAa,EACbG,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPZ,GAAG,EACHc,QAAQ,EACRD,KAAK,CAET,CAAC;EAED,OACEhB,IAAA,CAACF,KAAK;IACJO,YAAY,EAAEA,YAAa;IAC3BkB,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACflB,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBE,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA,KAAM;IACbM,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMO,oBAAoB,GAAG7B,IAAI,CAACK,YAAY,CAAC;AAC/CwB,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIxB,YAAY"}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
|
|
12
13
|
import createCache from "@emotion/cache";
|
|
13
14
|
import { CacheProvider } from "@emotion/react";
|
|
14
15
|
import { memo, useMemo } from "react";
|
|
15
16
|
import { useUniqueAlphabeticalId } from "./useUniqueAlphabeticalId.js";
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
18
|
const OdysseyCacheProvider = _ref => {
|
|
19
19
|
let {
|
|
20
20
|
children,
|
|
@@ -30,7 +30,6 @@ const OdysseyCacheProvider = _ref => {
|
|
|
30
30
|
children: children
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
|
|
34
33
|
const MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);
|
|
35
34
|
export { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };
|
|
36
35
|
//# sourceMappingURL=OdysseyCacheProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","OdysseyCacheProvider","children","nonce","uniqueAlphabeticalId","emotionCache","key","window","cspNonce","MemoizedOdysseyCacheProvider"],"sources":["../src/OdysseyCacheProvider.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\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nconst OdysseyCacheProvider = ({\n children,\n nonce,\n}: {\n children: ReactElement;\n nonce?: string;\n}) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n }),\n [nonce, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","jsx","_jsx","OdysseyCacheProvider","_ref","children","nonce","uniqueAlphabeticalId","emotionCache","key","window","cspNonce","value","MemoizedOdysseyCacheProvider"],"sources":["../src/OdysseyCacheProvider.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\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nconst OdysseyCacheProvider = ({\n children,\n nonce,\n}: {\n children: ReactElement;\n nonce?: string;\n}) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n }),\n [nonce, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,WAAW,MAAM,gBAAgB;AACxC,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAE3CC,uBAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEhC,MAAMC,oBAAoB,GAAGC,IAAA,IAMvB;EAAA,IANwB;IAC5BC,QAAQ;IACRC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAMG,oBAAoB,GAAGP,uBAAuB,CAAC,CAAC;EAEtD,MAAMQ,YAAY,GAAGT,OAAO,CAC1B,MACEH,WAAW,CAAC;IACVa,GAAG,EAAEF,oBAAoB;IACzBD,KAAK,EAAEA,KAAK,IAAII,MAAM,CAACC;EACzB,CAAC,CAAC,EACJ,CAACL,KAAK,EAAEC,oBAAoB,CAC9B,CAAC;EAED,OAAOL,IAAA,CAACL,aAAa;IAACe,KAAK,EAAEJ,YAAa;IAAAH,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMQ,4BAA4B,GAAGf,IAAI,CAACK,oBAAoB,CAAC;AAE/D,SAASU,4BAA4B,IAAIV,oBAAoB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import i18n from "i18next";
|
|
14
|
+
import { initReactI18next } from "react-i18next";
|
|
15
|
+
import { translation as cs } from "./properties/ts/odyssey-react-mui_cs.js";
|
|
16
|
+
import { translation as da } from "./properties/ts/odyssey-react-mui_da.js";
|
|
17
|
+
import { translation as de } from "./properties/ts/odyssey-react-mui_de.js";
|
|
18
|
+
import { translation as el } from "./properties/ts/odyssey-react-mui_el.js";
|
|
19
|
+
import { translation as en } from "./properties/ts/odyssey-react-mui.js";
|
|
20
|
+
import { translation as es } from "./properties/ts/odyssey-react-mui_es.js";
|
|
21
|
+
import { translation as fi } from "./properties/ts/odyssey-react-mui_fi.js";
|
|
22
|
+
import { translation as fr } from "./properties/ts/odyssey-react-mui_fr.js";
|
|
23
|
+
import { translation as hu } from "./properties/ts/odyssey-react-mui_hu.js";
|
|
24
|
+
import { translation as id } from "./properties/ts/odyssey-react-mui_id.js";
|
|
25
|
+
import { translation as it } from "./properties/ts/odyssey-react-mui_it.js";
|
|
26
|
+
import { translation as ja } from "./properties/ts/odyssey-react-mui_ja.js";
|
|
27
|
+
import { translation as ko } from "./properties/ts/odyssey-react-mui_ko.js";
|
|
28
|
+
import { translation as ms } from "./properties/ts/odyssey-react-mui_ms.js";
|
|
29
|
+
import { translation as nb } from "./properties/ts/odyssey-react-mui_nb.js";
|
|
30
|
+
import { translation as nlNL } from "./properties/ts/odyssey-react-mui_nl-NL.js";
|
|
31
|
+
import { translation as pl } from "./properties/ts/odyssey-react-mui_pl.js";
|
|
32
|
+
import { translation as ptBR } from "./properties/ts/odyssey-react-mui_pt-BR.js";
|
|
33
|
+
import { translation as ro } from "./properties/ts/odyssey-react-mui_ro.js";
|
|
34
|
+
import { translation as ru } from "./properties/ts/odyssey-react-mui_ru.js";
|
|
35
|
+
import { translation as sv } from "./properties/ts/odyssey-react-mui_sv.js";
|
|
36
|
+
import { translation as th } from "./properties/ts/odyssey-react-mui_th.js";
|
|
37
|
+
import { translation as tr } from "./properties/ts/odyssey-react-mui_tr.js";
|
|
38
|
+
import { translation as uk } from "./properties/ts/odyssey-react-mui_uk.js";
|
|
39
|
+
import { translation as zhCN } from "./properties/ts/odyssey-react-mui_zh-CN.js";
|
|
40
|
+
import { translation as znTW } from "./properties/ts/odyssey-react-mui_zh-TW.js";
|
|
41
|
+
import { supportedLanguages } from "./OdysseyTranslationProvider.types.js";
|
|
42
|
+
export const defaultLNG = "en";
|
|
43
|
+
export const defaultNS = "translations";
|
|
44
|
+
export const resources = {
|
|
45
|
+
cs,
|
|
46
|
+
da,
|
|
47
|
+
de,
|
|
48
|
+
el,
|
|
49
|
+
en,
|
|
50
|
+
es,
|
|
51
|
+
fi,
|
|
52
|
+
fr,
|
|
53
|
+
hu,
|
|
54
|
+
id,
|
|
55
|
+
it,
|
|
56
|
+
ja,
|
|
57
|
+
ko,
|
|
58
|
+
ms,
|
|
59
|
+
nb,
|
|
60
|
+
"nl-NL": nlNL,
|
|
61
|
+
pl,
|
|
62
|
+
"pt-BR": ptBR,
|
|
63
|
+
ro,
|
|
64
|
+
ru,
|
|
65
|
+
sv,
|
|
66
|
+
th,
|
|
67
|
+
tr,
|
|
68
|
+
uk,
|
|
69
|
+
"zh-CN": zhCN,
|
|
70
|
+
"zh-TW": znTW
|
|
71
|
+
};
|
|
72
|
+
i18n.use(initReactI18next).init({
|
|
73
|
+
defaultNS,
|
|
74
|
+
ns: [defaultNS],
|
|
75
|
+
fallbackLng: defaultLNG,
|
|
76
|
+
supportedLngs: supportedLanguages,
|
|
77
|
+
load: "currentOnly",
|
|
78
|
+
keySeparator: false,
|
|
79
|
+
interpolation: {
|
|
80
|
+
escapeValue: false,
|
|
81
|
+
skipOnVariables: false
|
|
82
|
+
},
|
|
83
|
+
react: {
|
|
84
|
+
useSuspense: false,
|
|
85
|
+
bindI18nStore: "added"
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.entries(resources).forEach(_ref => {
|
|
89
|
+
let [locale, property] = _ref;
|
|
90
|
+
i18n.addResourceBundle(locale, defaultNS, property);
|
|
91
|
+
});
|
|
92
|
+
export default i18n;
|
|
93
|
+
//# sourceMappingURL=OdysseyI18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OdysseyI18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","hu","id","it","ja","ko","ms","nb","nlNL","pl","ptBR","ro","ru","sv","th","tr","uk","zhCN","znTW","supportedLanguages","defaultLNG","defaultNS","resources","use","init","ns","fallbackLng","supportedLngs","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","_ref","locale","property","addResourceBundle"],"sources":["../src/OdysseyI18n.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { translation as cs } from \"./properties/ts/odyssey-react-mui_cs\";\nimport { translation as da } from \"./properties/ts/odyssey-react-mui_da\";\nimport { translation as de } from \"./properties/ts/odyssey-react-mui_de\";\nimport { translation as el } from \"./properties/ts/odyssey-react-mui_el\";\nimport { translation as en } from \"./properties/ts/odyssey-react-mui\";\nimport { translation as es } from \"./properties/ts/odyssey-react-mui_es\";\nimport { translation as fi } from \"./properties/ts/odyssey-react-mui_fi\";\nimport { translation as fr } from \"./properties/ts/odyssey-react-mui_fr\";\nimport { translation as hu } from \"./properties/ts/odyssey-react-mui_hu\";\nimport { translation as id } from \"./properties/ts/odyssey-react-mui_id\";\nimport { translation as it } from \"./properties/ts/odyssey-react-mui_it\";\nimport { translation as ja } from \"./properties/ts/odyssey-react-mui_ja\";\nimport { translation as ko } from \"./properties/ts/odyssey-react-mui_ko\";\nimport { translation as ms } from \"./properties/ts/odyssey-react-mui_ms\";\nimport { translation as nb } from \"./properties/ts/odyssey-react-mui_nb\";\nimport { translation as nlNL } from \"./properties/ts/odyssey-react-mui_nl-NL\";\nimport { translation as pl } from \"./properties/ts/odyssey-react-mui_pl\";\nimport { translation as ptBR } from \"./properties/ts/odyssey-react-mui_pt-BR\";\nimport { translation as ro } from \"./properties/ts/odyssey-react-mui_ro\";\nimport { translation as ru } from \"./properties/ts/odyssey-react-mui_ru\";\nimport { translation as sv } from \"./properties/ts/odyssey-react-mui_sv\";\nimport { translation as th } from \"./properties/ts/odyssey-react-mui_th\";\nimport { translation as tr } from \"./properties/ts/odyssey-react-mui_tr\";\nimport { translation as uk } from \"./properties/ts/odyssey-react-mui_uk\";\nimport { translation as zhCN } from \"./properties/ts/odyssey-react-mui_zh-CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh-TW\";\n\nimport {\n SupportedLanguages,\n supportedLanguages,\n} from \"./OdysseyTranslationProvider.types\";\n\nexport const defaultLNG: SupportedLanguages = \"en\";\nexport const defaultNS = \"translations\";\nexport const resources = {\n cs,\n da,\n de,\n el,\n en,\n es,\n fi,\n fr,\n hu,\n id,\n it,\n ja,\n ko,\n ms,\n nb,\n \"nl-NL\": nlNL,\n pl,\n \"pt-BR\": ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n \"zh-CN\": zhCN,\n \"zh-TW\": znTW,\n};\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n supportedLngs: supportedLanguages,\n load: \"currentOnly\",\n keySeparator: false,\n interpolation: {\n escapeValue: false, // react already safe from xss\n skipOnVariables: false, // to handle translations that use nesting\n },\n react: {\n useSuspense: false,\n bindI18nStore: \"added\",\n },\n});\n\nObject.entries(resources).forEach(([locale, property]) => {\n i18n.addResourceBundle(locale, defaultNS, property);\n});\n\n// eslint-disable-next-line import/no-default-export\nexport default i18n;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,SAAS;AAC1B,SAASC,gBAAgB,QAAQ,eAAe;AAAC,SAExCC,WAAW,IAAIC,EAAE;AAAA,SACjBD,WAAW,IAAIE,EAAE;AAAA,SACjBF,WAAW,IAAIG,EAAE;AAAA,SACjBH,WAAW,IAAII,EAAE;AAAA,SACjBJ,WAAW,IAAIK,EAAE;AAAA,SACjBL,WAAW,IAAIM,EAAE;AAAA,SACjBN,WAAW,IAAIO,EAAE;AAAA,SACjBP,WAAW,IAAIQ,EAAE;AAAA,SACjBR,WAAW,IAAIS,EAAE;AAAA,SACjBT,WAAW,IAAIU,EAAE;AAAA,SACjBV,WAAW,IAAIW,EAAE;AAAA,SACjBX,WAAW,IAAIY,EAAE;AAAA,SACjBZ,WAAW,IAAIa,EAAE;AAAA,SACjBb,WAAW,IAAIc,EAAE;AAAA,SACjBd,WAAW,IAAIe,EAAE;AAAA,SACjBf,WAAW,IAAIgB,IAAI;AAAA,SACnBhB,WAAW,IAAIiB,EAAE;AAAA,SACjBjB,WAAW,IAAIkB,IAAI;AAAA,SACnBlB,WAAW,IAAImB,EAAE;AAAA,SACjBnB,WAAW,IAAIoB,EAAE;AAAA,SACjBpB,WAAW,IAAIqB,EAAE;AAAA,SACjBrB,WAAW,IAAIsB,EAAE;AAAA,SACjBtB,WAAW,IAAIuB,EAAE;AAAA,SACjBvB,WAAW,IAAIwB,EAAE;AAAA,SACjBxB,WAAW,IAAIyB,IAAI;AAAA,SACnBzB,WAAW,IAAI0B,IAAI;AAAA,SAI1BC,kBAAkB;AAGpB,OAAO,MAAMC,UAA8B,GAAG,IAAI;AAClD,OAAO,MAAMC,SAAS,GAAG,cAAc;AACvC,OAAO,MAAMC,SAAS,GAAG;EACvB7B,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACF,OAAO,EAAEC,IAAI;EACbC,EAAE;EACF,OAAO,EAAEC,IAAI;EACbC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACF,OAAO,EAAEC,IAAI;EACb,OAAO,EAAEC;AACX,CAAC;AAED5B,IAAI,CAACiC,GAAG,CAAChC,gBAAgB,CAAC,CAACiC,IAAI,CAAC;EAC9BH,SAAS;EACTI,EAAE,EAAE,CAACJ,SAAS,CAAC;EACfK,WAAW,EAAEN,UAAU;EACvBO,aAAa,EAAER,kBAAkB;EACjCS,IAAI,EAAE,aAAa;EACnBC,YAAY,EAAE,KAAK;EACnBC,aAAa,EAAE;IACbC,WAAW,EAAE,KAAK;IAClBC,eAAe,EAAE;EACnB,CAAC;EACDC,KAAK,EAAE;IACLC,WAAW,EAAE,KAAK;IAClBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEFC,MAAM,CAACC,OAAO,CAACf,SAAS,CAAC,CAACgB,OAAO,CAACC,IAAA,IAAwB;EAAA,IAAvB,CAACC,MAAM,EAAEC,QAAQ,CAAC,GAAAF,IAAA;EACnDjD,IAAI,CAACoD,iBAAiB,CAACF,MAAM,EAAEnB,SAAS,EAAEoB,QAAQ,CAAC;AACrD,CAAC,CAAC;AAGF,eAAenD,IAAI"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo } from "react";
|
|
14
|
+
import { OdysseyCacheProvider } from "./OdysseyCacheProvider.js";
|
|
15
|
+
import { OdysseyThemeProvider } from "./OdysseyThemeProvider.js";
|
|
16
|
+
import { OdysseyTranslationProvider } from "./OdysseyTranslationProvider.js";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
const OdysseyProvider = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
children,
|
|
21
|
+
nonce,
|
|
22
|
+
themeOverride,
|
|
23
|
+
designTokensOverride,
|
|
24
|
+
languageCode,
|
|
25
|
+
translationOverrides
|
|
26
|
+
} = _ref;
|
|
27
|
+
return _jsx(OdysseyCacheProvider, {
|
|
28
|
+
nonce: nonce,
|
|
29
|
+
children: _jsx(OdysseyThemeProvider, {
|
|
30
|
+
themeOverride: themeOverride,
|
|
31
|
+
designTokensOverride: designTokensOverride,
|
|
32
|
+
children: _jsx(OdysseyTranslationProvider, {
|
|
33
|
+
languageCode: languageCode,
|
|
34
|
+
translationOverrides: translationOverrides,
|
|
35
|
+
children: children
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const MemoizedThemeProvider = memo(OdysseyProvider);
|
|
41
|
+
export { MemoizedThemeProvider as OdysseyProvider };
|
|
42
|
+
//# sourceMappingURL=OdysseyProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","_ref","children","nonce","themeOverride","designTokensOverride","languageCode","translationOverrides","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.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 } from \"react\";\n\nimport { ThemeOptions } from \".\";\nimport { DesignTokensOverride } from \"../src/theme/index\";\nimport { OdysseyCacheProvider } from \"./OdysseyCacheProvider\";\nimport { OdysseyThemeProvider } from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n TranslationOverrides,\n} from \"./OdysseyTranslationProvider\";\nimport { SupportedLanguages } from \"./OdysseyTranslationProvider.types\";\n\ntype OdysseyProviderProps = {\n children: ReactElement;\n nonce?: string;\n themeOverride?: ThemeOptions;\n designTokensOverride?: DesignTokensOverride;\n languageCode?: SupportedLanguages;\n translationOverrides?: TranslationOverrides;\n};\n\nconst OdysseyProvider = ({\n children,\n nonce,\n themeOverride,\n designTokensOverride,\n languageCode,\n translationOverrides,\n}: OdysseyProviderProps) => (\n <OdysseyCacheProvider nonce={nonce}>\n <OdysseyThemeProvider\n themeOverride={themeOverride}\n designTokensOverride={designTokensOverride}\n >\n <OdysseyTranslationProvider\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider);\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAIlCC,oBAAoB;AAAA,SACpBC,oBAAoB;AAAA,SAE3BC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAc5B,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IACvBC,QAAQ;IACRC,KAAK;IACLC,aAAa;IACbC,oBAAoB;IACpBC,YAAY;IACZC;EACoB,CAAC,GAAAN,IAAA;EAAA,OACrBF,IAAA,CAACJ,oBAAoB;IAACQ,KAAK,EAAEA,KAAM;IAAAD,QAAA,EACjCH,IAAA,CAACH,oBAAoB;MACnBQ,aAAa,EAAEA,aAAc;MAC7BC,oBAAoB,EAAEA,oBAAqB;MAAAH,QAAA,EAE3CH,IAAA,CAACF,0BAA0B;QACzBS,YAAY,EAAEA,YAAa;QAC3BC,oBAAoB,EAAEA,oBAAqB;QAAAL,QAAA,EAE1CA;MAAQ,CACiB;IAAC,CACT;EAAC,CACH,CAAC;AAAA,CACxB;AAED,MAAMM,qBAAqB,GAAGd,IAAI,CAACM,eAAe,CAAC;AAEnD,SAASQ,qBAAqB,IAAIR,eAAe"}
|
|
@@ -9,24 +9,30 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
|
|
12
13
|
import { ThemeProvider as MuiThemeProvider } from "@mui/material/styles";
|
|
13
14
|
import { memo, useMemo } from "react";
|
|
14
15
|
import { createTheme, deepmerge } from "./index.js";
|
|
15
|
-
import {
|
|
16
|
+
import { createOdysseyMuiTheme } from "./theme/index.js";
|
|
17
|
+
import * as Tokens from "@okta/odyssey-design-tokens";
|
|
16
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
19
|
const OdysseyThemeProvider = _ref => {
|
|
19
20
|
let {
|
|
20
21
|
children,
|
|
21
|
-
themeOverride
|
|
22
|
+
themeOverride,
|
|
23
|
+
designTokensOverride
|
|
22
24
|
} = _ref;
|
|
23
|
-
const
|
|
25
|
+
const odysseyTokens = {
|
|
26
|
+
...Tokens,
|
|
27
|
+
...designTokensOverride
|
|
28
|
+
};
|
|
29
|
+
const odysseyTheme = createOdysseyMuiTheme(odysseyTokens);
|
|
30
|
+
const customOdysseyTheme = useMemo(() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)), [odysseyTheme, themeOverride]);
|
|
24
31
|
return _jsx(MuiThemeProvider, {
|
|
25
32
|
theme: customOdysseyTheme ?? odysseyTheme,
|
|
26
33
|
children: children
|
|
27
34
|
});
|
|
28
35
|
};
|
|
29
|
-
|
|
30
36
|
const MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);
|
|
31
37
|
export { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };
|
|
32
38
|
//# sourceMappingURL=OdysseyThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdysseyThemeProvider.js","names":["ThemeProvider","MuiThemeProvider","memo","useMemo","createTheme","deepmerge","
|
|
1
|
+
{"version":3,"file":"OdysseyThemeProvider.js","names":["ThemeProvider","MuiThemeProvider","memo","useMemo","createTheme","deepmerge","createOdysseyMuiTheme","Tokens","jsx","_jsx","OdysseyThemeProvider","_ref","children","themeOverride","designTokensOverride","odysseyTokens","odysseyTheme","customOdysseyTheme","theme","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, DesignTokensOverride } from \".\";\nimport { createOdysseyMuiTheme } from \"./theme\";\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\n\nconst OdysseyThemeProvider = ({\n children,\n themeOverride,\n designTokensOverride,\n}: {\n children: ReactElement;\n themeOverride?: ThemeOptions;\n designTokensOverride?: DesignTokensOverride;\n}) => {\n const odysseyTokens = { ...Tokens, ...designTokensOverride };\n const odysseyTheme = createOdysseyMuiTheme(odysseyTokens);\n\n const customOdysseyTheme = useMemo(\n () => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),\n [odysseyTheme, 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,gBAAgB,QAAQ,sBAAsB;AACxE,SAASC,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAE3CC,WAAW,EAAEC,SAAS;AAAA,SACtBC,qBAAqB;AAC9B,OAAO,KAAKC,MAAM,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtD,MAAMC,oBAAoB,GAAGC,IAAA,IAQvB;EAAA,IARwB;IAC5BC,QAAQ;IACRC,aAAa;IACbC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,aAAa,GAAG;IAAE,GAAGR,MAAM;IAAE,GAAGO;EAAqB,CAAC;EAC5D,MAAME,YAAY,GAAGV,qBAAqB,CAACS,aAAa,CAAC;EAEzD,MAAME,kBAAkB,GAAGd,OAAO,CAChC,MAAMU,aAAa,IAAIT,WAAW,CAACC,SAAS,CAACW,YAAY,EAAEH,aAAa,CAAC,CAAC,EAC1E,CAACG,YAAY,EAAEH,aAAa,CAC9B,CAAC;EAED,OACEJ,IAAA,CAACR,gBAAgB;IAACiB,KAAK,EAAED,kBAAkB,IAAID,YAAa;IAAAJ,QAAA,EACzDA;EAAQ,CACO,CAAC;AAEvB,CAAC;AAED,MAAMO,4BAA4B,GAAGjB,IAAI,CAACQ,oBAAoB,CAAC;AAE/D,SAASS,4BAA4B,IAAIT,oBAAoB"}
|