@okta/odyssey-react-mui 0.23.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 +20 -0
- package/README.md +43 -7
- package/dist/{src/ThemeProvider.d.ts → @types/i18next.d.js} +4 -7
- package/dist/@types/i18next.d.js.map +1 -0
- package/dist/Autocomplete.js +13 -3
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Banner.js +6 -3
- package/dist/Banner.js.map +1 -1
- package/dist/Button.js +13 -3
- package/dist/Button.js.map +1 -1
- package/dist/Checkbox.js +44 -10
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js +14 -3
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/CircularProgress.js +11 -0
- package/dist/CircularProgress.js.map +1 -1
- package/dist/Dialog.js +11 -7
- package/dist/Dialog.js.map +1 -1
- package/dist/Field.js +13 -8
- 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 +17 -5
- 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 +2 -3
- package/dist/Icon.js.map +1 -1
- package/dist/Infobox.js +6 -3
- package/dist/Infobox.js.map +1 -1
- package/dist/Link.js +6 -2
- package/dist/Link.js.map +1 -1
- package/dist/MenuButton.js +0 -5
- package/dist/MenuButton.js.map +1 -1
- package/dist/MenuItem.js +4 -2
- package/dist/MenuItem.js.map +1 -1
- package/dist/MuiPropsChild.js +3 -1
- package/dist/MuiPropsChild.js.map +1 -1
- package/dist/MuiPropsContext.js +1 -0
- package/dist/MuiPropsContext.js.map +1 -1
- 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/{ThemeProvider.js → OdysseyProvider.js} +20 -8
- 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 +12 -0
- package/dist/PasswordField.js.map +1 -1
- package/dist/Radio.js +11 -2
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +11 -2
- package/dist/RadioGroup.js.map +1 -1
- package/dist/ScreenReaderText.js +3 -3
- package/dist/ScreenReaderText.js.map +1 -1
- package/dist/SearchField.js +11 -0
- 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 +12 -2
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +10 -4
- package/dist/Toast.js.map +1 -1
- package/dist/ToastStack.js +1 -2
- package/dist/ToastStack.js.map +1 -1
- package/dist/Tooltip.js +11 -0
- package/dist/Tooltip.js.map +1 -1
- 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 +1 -2
- package/dist/iconDictionary/Add.js.map +1 -1
- package/dist/iconDictionary/AddCircle.js +1 -2
- package/dist/iconDictionary/AddCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircle.js +1 -2
- package/dist/iconDictionary/AlertCircle.js.map +1 -1
- package/dist/iconDictionary/AlertCircleFilled.js +1 -2
- package/dist/iconDictionary/AlertCircleFilled.js.map +1 -1
- package/dist/iconDictionary/AlertTriangleFilled.js +1 -2
- package/dist/iconDictionary/AlertTriangleFilled.js.map +1 -1
- package/dist/iconDictionary/Anchor.js +1 -2
- package/dist/iconDictionary/Anchor.js.map +1 -1
- package/dist/iconDictionary/ArrowDown.js +1 -2
- package/dist/iconDictionary/ArrowDown.js.map +1 -1
- package/dist/iconDictionary/ArrowLeft.js +1 -2
- package/dist/iconDictionary/ArrowLeft.js.map +1 -1
- package/dist/iconDictionary/ArrowRight.js +1 -2
- package/dist/iconDictionary/ArrowRight.js.map +1 -1
- package/dist/iconDictionary/ArrowUp.js +1 -2
- package/dist/iconDictionary/ArrowUp.js.map +1 -1
- package/dist/iconDictionary/ArrowUpDown.js +1 -2
- package/dist/iconDictionary/ArrowUpDown.js.map +1 -1
- package/dist/iconDictionary/Calendar.js +1 -2
- package/dist/iconDictionary/Calendar.js.map +1 -1
- package/dist/iconDictionary/Check.js +1 -2
- package/dist/iconDictionary/Check.js.map +1 -1
- package/dist/iconDictionary/CheckCircleFilled.js +1 -2
- package/dist/iconDictionary/CheckCircleFilled.js.map +1 -1
- package/dist/iconDictionary/ChevronDown.js +1 -2
- package/dist/iconDictionary/ChevronDown.js.map +1 -1
- package/dist/iconDictionary/ChevronUp.js +1 -2
- package/dist/iconDictionary/ChevronUp.js.map +1 -1
- package/dist/iconDictionary/Close.js +1 -2
- package/dist/iconDictionary/Close.js.map +1 -1
- package/dist/iconDictionary/CloseCircleFilled.js +1 -2
- package/dist/iconDictionary/CloseCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Copy.js +1 -2
- package/dist/iconDictionary/Copy.js.map +1 -1
- package/dist/iconDictionary/Delete.js +1 -2
- package/dist/iconDictionary/Delete.js.map +1 -1
- package/dist/iconDictionary/Download.js +1 -2
- package/dist/iconDictionary/Download.js.map +1 -1
- package/dist/iconDictionary/DragHandle.js +1 -2
- package/dist/iconDictionary/DragHandle.js.map +1 -1
- package/dist/iconDictionary/Edit.js +1 -2
- package/dist/iconDictionary/Edit.js.map +1 -1
- package/dist/iconDictionary/ExternalLink.js +1 -2
- package/dist/iconDictionary/ExternalLink.js.map +1 -1
- package/dist/iconDictionary/Eye.js +1 -2
- package/dist/iconDictionary/Eye.js.map +1 -1
- package/dist/iconDictionary/EyeOff.js +1 -2
- package/dist/iconDictionary/EyeOff.js.map +1 -1
- package/dist/iconDictionary/Filter.js +1 -2
- package/dist/iconDictionary/Filter.js.map +1 -1
- package/dist/iconDictionary/Globe.js +1 -2
- package/dist/iconDictionary/Globe.js.map +1 -1
- package/dist/iconDictionary/Home.js +1 -2
- package/dist/iconDictionary/Home.js.map +1 -1
- package/dist/iconDictionary/InformationCircle.js +1 -2
- package/dist/iconDictionary/InformationCircle.js.map +1 -1
- package/dist/iconDictionary/InformationCircleFilled.js +1 -2
- package/dist/iconDictionary/InformationCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Notification.js +1 -2
- package/dist/iconDictionary/Notification.js.map +1 -1
- package/dist/iconDictionary/OverflowVertical.js +1 -2
- package/dist/iconDictionary/OverflowVertical.js.map +1 -1
- package/dist/iconDictionary/QuestionCircle.js +1 -2
- package/dist/iconDictionary/QuestionCircle.js.map +1 -1
- package/dist/iconDictionary/QuestionCircleFilled.js +1 -2
- package/dist/iconDictionary/QuestionCircleFilled.js.map +1 -1
- package/dist/iconDictionary/Search.js +1 -2
- package/dist/iconDictionary/Search.js.map +1 -1
- package/dist/iconDictionary/Settings.js +1 -2
- package/dist/iconDictionary/Settings.js.map +1 -1
- package/dist/iconDictionary/Subtract.js +1 -2
- 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 +1 -2
- package/dist/iconDictionary/User.js.map +1 -1
- package/dist/iconDictionary/UserGroup.js +1 -2
- package/dist/iconDictionary/UserGroup.js.map +1 -1
- package/dist/iconDictionary/index.js.map +1 -1
- package/dist/index.js +9 -3
- 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/Banner.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 +2 -1
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/Field.d.ts +5 -5
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FieldError.d.ts.map +1 -1
- package/dist/src/FieldLabel.d.ts +1 -2
- 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 +4 -2
- package/dist/src/Icon.d.ts.map +1 -1
- package/dist/src/Infobox.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/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.map +1 -1
- package/dist/src/Select.d.ts +35 -0
- package/dist/src/Select.d.ts.map +1 -0
- package/{src/ThemeProvider.tsx → dist/src/Tabs.d.ts} +16 -15
- package/dist/src/Tabs.d.ts.map +1 -0
- package/dist/src/TextField.d.ts +0 -4
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/Toast.d.ts +1 -1
- package/dist/src/Toast.d.ts.map +1 -1
- package/dist/src/index.d.ts +9 -5
- 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 +91 -73
- 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/Banner.tsx +16 -11
- package/src/Checkbox.tsx +47 -21
- package/src/CheckboxGroup.tsx +4 -1
- package/src/Field.tsx +16 -7
- package/src/FieldError.tsx +6 -1
- package/src/FieldLabel.tsx +7 -4
- package/src/Fieldset.tsx +95 -0
- package/src/Form.tsx +142 -0
- package/src/Icon.tsx +11 -14
- package/src/Infobox.tsx +12 -7
- package/src/Link.tsx +2 -2
- package/src/MenuItem.tsx +1 -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 +1 -0
- package/src/Select.tsx +226 -0
- package/src/Tabs.tsx +70 -0
- package/src/TextField.tsx +1 -6
- package/src/Toast.tsx +61 -59
- package/src/index.ts +7 -9
- 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 +12 -4
- 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/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _FormControl from "@mui/material/FormControl";
|
|
2
2
|
import _FormLabel from "@mui/material/FormLabel";
|
|
3
|
-
|
|
3
|
+
import _Typography from "@mui/material/Typography";
|
|
4
4
|
/*!
|
|
5
5
|
* Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
6
6
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -12,14 +12,15 @@ import _FormLabel from "@mui/material/FormLabel";
|
|
|
12
12
|
*
|
|
13
13
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
|
+
|
|
15
16
|
import { memo, useMemo } from "react";
|
|
16
17
|
import { FieldError } from "./FieldError.js";
|
|
17
18
|
import { FieldHint } from "./FieldHint.js";
|
|
18
19
|
import { FieldLabel } from "./FieldLabel.js";
|
|
19
20
|
import { useUniqueId } from "./useUniqueId.js";
|
|
20
|
-
import {
|
|
21
|
+
import { useTranslation } from "react-i18next";
|
|
21
22
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
-
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
24
|
const Field = _ref => {
|
|
24
25
|
let {
|
|
25
26
|
errorMessage,
|
|
@@ -31,9 +32,11 @@ const Field = _ref => {
|
|
|
31
32
|
isRadioGroup = false,
|
|
32
33
|
isOptional = false,
|
|
33
34
|
label,
|
|
34
|
-
optionalLabel,
|
|
35
35
|
renderFieldComponent
|
|
36
36
|
} = _ref;
|
|
37
|
+
const {
|
|
38
|
+
t
|
|
39
|
+
} = useTranslation();
|
|
37
40
|
const id = useUniqueId(idOverride);
|
|
38
41
|
const hintId = hint ? `${id}-hint` : undefined;
|
|
39
42
|
const errorId = errorMessage ? `${id}-error` : undefined;
|
|
@@ -44,15 +47,18 @@ const Field = _ref => {
|
|
|
44
47
|
disabled: isDisabled,
|
|
45
48
|
error: Boolean(errorMessage),
|
|
46
49
|
role: isRadioGroup ? "radiogroup" : undefined,
|
|
47
|
-
children: [fieldType === "group" ?
|
|
50
|
+
children: [fieldType === "group" ? _jsxs(_FormLabel, {
|
|
48
51
|
component: "legend",
|
|
49
|
-
children: label
|
|
52
|
+
children: [label, " ", isOptional && label && _jsxs(_Typography, {
|
|
53
|
+
component: "span",
|
|
54
|
+
color: "textSecondary",
|
|
55
|
+
children: ["(", t("fieldlabel.optional.text"), ")"]
|
|
56
|
+
})]
|
|
50
57
|
}) : _jsx(FieldLabel, {
|
|
51
58
|
hasVisibleLabel: hasVisibleLabel,
|
|
52
59
|
id: labelId,
|
|
53
60
|
inputId: id,
|
|
54
61
|
isOptional: isOptional,
|
|
55
|
-
optionalText: optionalLabel,
|
|
56
62
|
text: label
|
|
57
63
|
}), hint && _jsx(FieldHint, {
|
|
58
64
|
id: hintId,
|
|
@@ -66,7 +72,6 @@ const Field = _ref => {
|
|
|
66
72
|
})]
|
|
67
73
|
});
|
|
68
74
|
};
|
|
69
|
-
|
|
70
75
|
const MemoizedField = memo(Field);
|
|
71
76
|
export { MemoizedField as Field };
|
|
72
77
|
//# sourceMappingURL=Field.js.map
|
package/dist/Field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","useUniqueId","Field","errorMessage","fieldType","hasVisibleLabel","hint","id","idOverride","isDisabled","isRadioGroup","isOptional","label","
|
|
1
|
+
{"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","useUniqueId","useTranslation","jsxs","_jsxs","jsx","_jsx","Field","_ref","errorMessage","fieldType","hasVisibleLabel","hint","id","idOverride","isDisabled","isRadioGroup","isOptional","label","renderFieldComponent","t","hintId","undefined","errorId","labelId","ariaDescribedBy","join","trim","_FormControl","component","disabled","error","Boolean","role","children","_FormLabel","_Typography","color","inputId","text","MemoizedField"],"sources":["../src/Field.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 FormControl as MuiFormControl,\n FormLabel as MuiFormLabel,\n Typography,\n} from \"@mui/material\";\nimport { FieldError } from \"./FieldError\";\nimport { FieldHint } from \"./FieldHint\";\nimport { FieldLabel } from \"./FieldLabel\";\nimport { useUniqueId } from \"./useUniqueId\";\nimport { useTranslation } from \"react-i18next\";\n\nexport type FieldProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).\n */\n fieldType: \"single\" | \"group\";\n hasVisibleLabel: boolean;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * Important for narrowing down the `fieldset` role to \"radiogroup\".\n */\n isRadioGroup?: boolean;\n /**\n * Important for determining if children inherit error state\n */\n isCheckboxGroup?: boolean;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the `input` element is not required.\n */\n isOptional?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Render-props function that sends back ARIA props to your field component.\n */\n renderFieldComponent: ({\n ariaDescribedBy,\n id,\n }: {\n ariaDescribedBy?: string;\n id: string;\n }) => ReactElement;\n};\n\nconst Field = ({\n errorMessage,\n fieldType,\n hasVisibleLabel,\n hint,\n id: idOverride,\n isDisabled = false,\n isRadioGroup = false,\n isOptional = false,\n label,\n renderFieldComponent,\n}: FieldProps) => {\n const { t } = useTranslation();\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorId = errorMessage ? `${id}-error` : undefined;\n const labelId = `${id}-label`;\n\n const ariaDescribedBy = useMemo(\n () => [hintId, errorId].join(\" \").trim() || undefined,\n [errorId, hintId]\n );\n\n return (\n <MuiFormControl\n component={fieldType === \"group\" ? \"fieldset\" : \"div\"}\n disabled={isDisabled}\n error={Boolean(errorMessage)}\n role={isRadioGroup ? \"radiogroup\" : undefined}\n >\n {fieldType === \"group\" ? (\n <MuiFormLabel component=\"legend\">\n {label}{\" \"}\n {isOptional && label && (\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.optional.text\")})\n </Typography>\n )}\n </MuiFormLabel>\n ) : (\n <FieldLabel\n hasVisibleLabel={hasVisibleLabel}\n id={labelId}\n inputId={id}\n isOptional={isOptional}\n text={label}\n />\n )}\n\n {hint && <FieldHint id={hintId} text={hint} />}\n\n {renderFieldComponent({\n ariaDescribedBy,\n id,\n })}\n\n {errorMessage && <FieldError id={errorId} text={errorMessage} />}\n </MuiFormControl>\n );\n};\n\nconst MemoizedField = memo(Field);\n\nexport { MemoizedField as Field };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAO3CC,UAAU;AAAA,SACVC,SAAS;AAAA,SACTC,UAAU;AAAA,SACVC,WAAW;AACpB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAwD/C,MAAMC,KAAK,GAAGC,IAAA,IAWI;EAAA,IAXH;IACbC,YAAY;IACZC,SAAS;IACTC,eAAe;IACfC,IAAI;IACJC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,YAAY,GAAG,KAAK;IACpBC,UAAU,GAAG,KAAK;IAClBC,KAAK;IACLC;EACU,CAAC,GAAAX,IAAA;EACX,MAAM;IAAEY;EAAE,CAAC,GAAGlB,cAAc,CAAC,CAAC;EAE9B,MAAMW,EAAE,GAAGZ,WAAW,CAACa,UAAU,CAAC;EAClC,MAAMO,MAAM,GAAGT,IAAI,GAAI,GAAEC,EAAG,OAAM,GAAGS,SAAS;EAC9C,MAAMC,OAAO,GAAGd,YAAY,GAAI,GAAEI,EAAG,QAAO,GAAGS,SAAS;EACxD,MAAME,OAAO,GAAI,GAAEX,EAAG,QAAO;EAE7B,MAAMY,eAAe,GAAG5B,OAAO,CAC7B,MAAM,CAACwB,MAAM,EAAEE,OAAO,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,CAAC,IAAIL,SAAS,EACrD,CAACC,OAAO,EAAEF,MAAM,CAClB,CAAC;EAED,OACEjB,KAAA,CAAAwB,YAAA;IACEC,SAAS,EAAEnB,SAAS,KAAK,OAAO,GAAG,UAAU,GAAG,KAAM;IACtDoB,QAAQ,EAAEf,UAAW;IACrBgB,KAAK,EAAEC,OAAO,CAACvB,YAAY,CAAE;IAC7BwB,IAAI,EAAEjB,YAAY,GAAG,YAAY,GAAGM,SAAU;IAAAY,QAAA,GAE7CxB,SAAS,KAAK,OAAO,GACpBN,KAAA,CAAA+B,UAAA;MAAcN,SAAS,EAAC,QAAQ;MAAAK,QAAA,GAC7BhB,KAAK,EAAE,GAAG,EACVD,UAAU,IAAIC,KAAK,IAClBd,KAAA,CAAAgC,WAAA;QAAYP,SAAS,EAAC,MAAM;QAACQ,KAAK,EAAC,eAAe;QAAAH,QAAA,GAAC,GAChD,EAACd,CAAC,CAAC,0BAA0B,CAAC,EAAC,GAClC;MAAA,CAAY,CACb;IAAA,CACW,CAAC,GAEfd,IAAA,CAACN,UAAU;MACTW,eAAe,EAAEA,eAAgB;MACjCE,EAAE,EAAEW,OAAQ;MACZc,OAAO,EAAEzB,EAAG;MACZI,UAAU,EAAEA,UAAW;MACvBsB,IAAI,EAAErB;IAAM,CACb,CACF,EAEAN,IAAI,IAAIN,IAAA,CAACP,SAAS;MAACc,EAAE,EAAEQ,MAAO;MAACkB,IAAI,EAAE3B;IAAK,CAAE,CAAC,EAE7CO,oBAAoB,CAAC;MACpBM,eAAe;MACfZ;IACF,CAAC,CAAC,EAEDJ,YAAY,IAAIH,IAAA,CAACR,UAAU;MAACe,EAAE,EAAEU,OAAQ;MAACgB,IAAI,EAAE9B;IAAa,CAAE,CAAC;EAAA,CAClD,CAAC;AAErB,CAAC;AAED,MAAM+B,aAAa,GAAG5C,IAAI,CAACW,KAAK,CAAC;AAEjC,SAASiC,aAAa,IAAIjC,KAAK"}
|
package/dist/FieldError.js
CHANGED
|
@@ -9,26 +9,29 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
|
|
12
13
|
import { memo } from "react";
|
|
13
14
|
import { FormHelperText } from "./index.js";
|
|
14
15
|
import { ScreenReaderText } from "./ScreenReaderText.js";
|
|
16
|
+
import { useTranslation } from "react-i18next";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
19
|
const FieldError = _ref => {
|
|
19
20
|
let {
|
|
20
21
|
id,
|
|
21
22
|
text
|
|
22
23
|
} = _ref;
|
|
24
|
+
const {
|
|
25
|
+
t
|
|
26
|
+
} = useTranslation();
|
|
23
27
|
return _jsxs(FormHelperText, {
|
|
24
28
|
error: true,
|
|
25
29
|
id: id,
|
|
26
30
|
children: [_jsx(ScreenReaderText, {
|
|
27
|
-
children: "
|
|
31
|
+
children: `${t("fielderror.screenreader.text")}:`
|
|
28
32
|
}), text]
|
|
29
33
|
});
|
|
30
34
|
};
|
|
31
|
-
|
|
32
35
|
const MemoizedFieldError = memo(FieldError);
|
|
33
36
|
export { MemoizedFieldError as FieldError };
|
|
34
37
|
//# sourceMappingURL=FieldError.js.map
|
package/dist/FieldError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldError.js","names":["memo","FormHelperText","ScreenReaderText","FieldError","id","text","MemoizedFieldError"],"sources":["../src/FieldError.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 { memo } from \"react\";\n\nimport { FormHelperText } from \".\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\n\nexport type FieldErrorProps = {\n id?: string;\n text: string;\n};\n\nconst FieldError = ({ id, text }: FieldErrorProps) => {\n return (\n <FormHelperText error id={id}>\n <ScreenReaderText>
|
|
1
|
+
{"version":3,"file":"FieldError.js","names":["memo","FormHelperText","ScreenReaderText","useTranslation","jsx","_jsx","jsxs","_jsxs","FieldError","_ref","id","text","t","error","children","MemoizedFieldError"],"sources":["../src/FieldError.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 { memo } from \"react\";\n\nimport { FormHelperText } from \".\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { useTranslation } from \"react-i18next\";\n\nexport type FieldErrorProps = {\n id?: string;\n text: string;\n};\n\nconst FieldError = ({ id, text }: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText error id={id}>\n <ScreenReaderText>{`${t(\n \"fielderror.screenreader.text\"\n )}:`}</ScreenReaderText>\n {text}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldError = memo(FieldError);\n\nexport { MemoizedFieldError as FieldError };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAEpBC,cAAc;AAAA,SACdC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAO/C,MAAMC,UAAU,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,EAAE;IAAEC;EAAsB,CAAC,GAAAF,IAAA;EAC/C,MAAM;IAAEG;EAAE,CAAC,GAAGT,cAAc,CAAC,CAAC;EAE9B,OACEI,KAAA,CAACN,cAAc;IAACY,KAAK;IAACH,EAAE,EAAEA,EAAG;IAAAI,QAAA,GAC3BT,IAAA,CAACH,gBAAgB;MAAAY,QAAA,EAAG,GAAEF,CAAC,CACrB,8BACF,CAAE;IAAE,CAAmB,CAAC,EACvBD,IAAI;EAAA,CACS,CAAC;AAErB,CAAC;AAED,MAAMI,kBAAkB,GAAGf,IAAI,CAACQ,UAAU,CAAC;AAE3C,SAASO,kBAAkB,IAAIP,UAAU"}
|
package/dist/FieldHint.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
|
|
12
13
|
import { memo } from "react";
|
|
13
14
|
import { FormHelperText } from "./index.js";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
16
|
const FieldHint = _ref => {
|
|
17
17
|
let {
|
|
18
18
|
id,
|
|
@@ -23,7 +23,6 @@ const FieldHint = _ref => {
|
|
|
23
23
|
children: text
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
|
|
27
26
|
const MemoizedFieldHint = memo(FieldHint);
|
|
28
27
|
export { MemoizedFieldHint as FieldHint };
|
|
29
28
|
//# sourceMappingURL=FieldHint.js.map
|
package/dist/FieldHint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHint.js","names":["memo","FormHelperText","FieldHint","id","text","MemoizedFieldHint"],"sources":["../src/FieldHint.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"./\";\n\nexport type FieldHintProps = {\n id?: string;\n text: string;\n};\n\nconst FieldHint = ({ id, text }: FieldHintProps) => {\n return <FormHelperText id={id}>{text}</FormHelperText>;\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"file":"FieldHint.js","names":["memo","FormHelperText","jsx","_jsx","FieldHint","_ref","id","text","children","MemoizedFieldHint"],"sources":["../src/FieldHint.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 { memo } from \"react\";\n\nimport { FormHelperText } from \"./\";\n\nexport type FieldHintProps = {\n id?: string;\n text: string;\n};\n\nconst FieldHint = ({ id, text }: FieldHintProps) => {\n return <FormHelperText id={id}>{text}</FormHelperText>;\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAEpBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOvB,MAAMC,SAAS,GAAGC,IAAA,IAAkC;EAAA,IAAjC;IAAEC,EAAE;IAAEC;EAAqB,CAAC,GAAAF,IAAA;EAC7C,OAAOF,IAAA,CAACF,cAAc;IAACK,EAAE,EAAEA,EAAG;IAAAE,QAAA,EAAED;EAAI,CAAiB,CAAC;AACxD,CAAC;AAED,MAAME,iBAAiB,GAAGT,IAAI,CAACI,SAAS,CAAC;AAEzC,SAASK,iBAAiB,IAAIL,SAAS"}
|
package/dist/FieldLabel.js
CHANGED
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
import _InputLabel from "@mui/material/InputLabel";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) 2023-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
|
+
*/
|
|
2
13
|
import { memo, useMemo } from "react";
|
|
14
|
+
import { useTranslation } from "react-i18next";
|
|
3
15
|
import { ScreenReaderText } from "./ScreenReaderText.js";
|
|
4
16
|
import { Typography } from "./index.js";
|
|
5
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
18
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
19
|
const FieldLabel = _ref => {
|
|
9
20
|
let {
|
|
10
21
|
hasVisibleLabel,
|
|
11
22
|
id,
|
|
12
23
|
inputId,
|
|
13
24
|
isOptional,
|
|
14
|
-
optionalText,
|
|
15
25
|
text
|
|
16
26
|
} = _ref;
|
|
27
|
+
const {
|
|
28
|
+
t
|
|
29
|
+
} = useTranslation();
|
|
17
30
|
const inputLabel = useMemo(() => _jsxs(_InputLabel, {
|
|
18
31
|
htmlFor: inputId,
|
|
19
32
|
id: id,
|
|
20
33
|
children: [text, isOptional && _jsx(Typography, {
|
|
21
34
|
variant: "subtitle1",
|
|
22
|
-
children:
|
|
35
|
+
children: t("fieldlabel.optional.text")
|
|
23
36
|
})]
|
|
24
|
-
}), [id, inputId, isOptional,
|
|
37
|
+
}), [id, inputId, isOptional, text, t]);
|
|
25
38
|
return hasVisibleLabel ? inputLabel : _jsx(ScreenReaderText, {
|
|
26
39
|
children: inputLabel
|
|
27
40
|
});
|
|
28
41
|
};
|
|
29
|
-
|
|
30
42
|
const MemoizedFieldLabel = memo(FieldLabel);
|
|
31
43
|
export { MemoizedFieldLabel as FieldLabel };
|
|
32
44
|
//# sourceMappingURL=FieldLabel.js.map
|
package/dist/FieldLabel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldLabel.js","names":["memo","useMemo","ScreenReaderText","Typography","FieldLabel","hasVisibleLabel","id","inputId","isOptional","
|
|
1
|
+
{"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Typography","jsx","_jsx","jsxs","_jsxs","FieldLabel","_ref","hasVisibleLabel","id","inputId","isOptional","text","t","inputLabel","_InputLabel","htmlFor","children","variant","MemoizedFieldLabel"],"sources":["../src/FieldLabel.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 { InputLabel as MuiInputLabel } from \"@mui/material\";\nimport { memo, useMemo } from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { Typography } from \".\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n};\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel htmlFor={inputId} id={id}>\n {text}\n {isOptional && (\n <Typography variant=\"subtitle1\">\n {t(\"fieldlabel.optional.text\")}\n </Typography>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, text, t]\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText>{inputLabel}</ScreenReaderText>\n );\n};\n\nconst MemoizedFieldLabel = memo(FieldLabel);\n\nexport { MemoizedFieldLabel as FieldLabel };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,SAASC,cAAc,QAAQ,eAAe;AAAC,SACtCC,gBAAgB;AAAA,SAChBC,UAAU;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAUnB,MAAMC,UAAU,GAAGC,IAAA,IAMI;EAAA,IANH;IAClBC,eAAe;IACfC,EAAE;IACFC,OAAO;IACPC,UAAU;IACVC;EACe,CAAC,GAAAL,IAAA;EAChB,MAAM;IAAEM;EAAE,CAAC,GAAGd,cAAc,CAAC,CAAC;EAE9B,MAAMe,UAAU,GAAGhB,OAAO,CACxB,MACEO,KAAA,CAAAU,WAAA;IAAeC,OAAO,EAAEN,OAAQ;IAACD,EAAE,EAAEA,EAAG;IAAAQ,QAAA,GACrCL,IAAI,EACJD,UAAU,IACTR,IAAA,CAACF,UAAU;MAACiB,OAAO,EAAC,WAAW;MAAAD,QAAA,EAC5BJ,CAAC,CAAC,0BAA0B;IAAC,CACpB,CACb;EAAA,CACY,CAChB,EACD,CAACJ,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,CAAC,CACnC,CAAC;EAED,OAAOL,eAAe,GACpBM,UAAU,GAEVX,IAAA,CAACH,gBAAgB;IAAAiB,QAAA,EAAEH;EAAU,CAAmB,CACjD;AACH,CAAC;AAED,MAAMK,kBAAkB,GAAGtB,IAAI,CAACS,UAAU,CAAC;AAE3C,SAASa,kBAAkB,IAAIb,UAAU"}
|
package/dist/Fieldset.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
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 { Box, Typography } from "./index.js";
|
|
15
|
+
import { useUniqueId } from "./useUniqueId.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
const Fieldset = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
alert,
|
|
21
|
+
children,
|
|
22
|
+
description,
|
|
23
|
+
legend,
|
|
24
|
+
name,
|
|
25
|
+
id: idOverride
|
|
26
|
+
} = _ref;
|
|
27
|
+
const id = useUniqueId(idOverride);
|
|
28
|
+
return _jsxs(Box, {
|
|
29
|
+
component: "fieldset",
|
|
30
|
+
name: name,
|
|
31
|
+
id: id,
|
|
32
|
+
sx: {
|
|
33
|
+
maxWidth: theme => theme.mixins.maxWidth,
|
|
34
|
+
margin: theme => theme.spacing(0),
|
|
35
|
+
marginBlockEnd: theme => theme.spacing(4),
|
|
36
|
+
padding: theme => theme.spacing(0),
|
|
37
|
+
border: "0",
|
|
38
|
+
"&:last-child": {
|
|
39
|
+
marginBlockEnd: theme => theme.spacing(0)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
children: [_jsx(Typography, {
|
|
43
|
+
variant: "legend",
|
|
44
|
+
component: "legend",
|
|
45
|
+
children: legend
|
|
46
|
+
}), description && _jsx(Typography, {
|
|
47
|
+
paragraph: true,
|
|
48
|
+
children: description
|
|
49
|
+
}), alert, children]
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const MemoizedFieldset = memo(Fieldset);
|
|
53
|
+
MemoizedFieldset.displayName = "Fieldset";
|
|
54
|
+
export { MemoizedFieldset as Fieldset };
|
|
55
|
+
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fieldset.js","names":["memo","Box","Typography","useUniqueId","jsx","_jsx","jsxs","_jsxs","Fieldset","_ref","alert","children","description","legend","name","id","idOverride","component","sx","maxWidth","theme","mixins","margin","spacing","marginBlockEnd","padding","border","variant","paragraph","MemoizedFieldset","displayName"],"sources":["../src/Fieldset.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 { Box, Typography } from \".\";\nimport { Infobox } from \"./Infobox\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type FieldsetProps = {\n /**\n * The title of the Fieldset\n */\n legend: string;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * The Field components within the Fieldset\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * An Infobox indicating a Fieldset-wide error or status update.\n */\n alert?: ReactElement<typeof Infobox>;\n /**\n * The name associated with the group.\n */\n name?: string;\n // /**\n // * If this Boolean attribute is set, all form controls that are descendants of the <fieldset>, are disabled, meaning they are not editable and won't be submitted along with the <form>.\n // * They won't receive any browsing events, like mouse clicks or focus-related events.\n // * Note that form elements inside the <legend> element won't be disabled.\n // */\n // NOTE: Functionality is currently disabled. This will correctly disable child <input>s, but will not pass `isDisabled` to the child components.\n // isDisabled?: boolean;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n};\n\nconst Fieldset = ({\n alert,\n children,\n description,\n legend,\n name,\n id: idOverride,\n}: // isDisabled,\nFieldsetProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n component=\"fieldset\"\n // disabled={isDisabled}\n name={name}\n id={id}\n sx={{\n maxWidth: (theme) => theme.mixins.maxWidth,\n margin: (theme) => theme.spacing(0),\n marginBlockEnd: (theme) => theme.spacing(4),\n padding: (theme) => theme.spacing(0),\n border: \"0\",\n\n \"&:last-child\": {\n marginBlockEnd: (theme) => theme.spacing(0),\n },\n }}\n >\n <Typography variant=\"legend\" component=\"legend\">\n {legend}\n </Typography>\n {description && <Typography paragraph>{description}</Typography>}\n {alert}\n {children}\n </Box>\n );\n};\n\nconst MemoizedFieldset = memo(Fieldset);\nMemoizedFieldset.displayName = \"Fieldset\";\n\nexport { MemoizedFieldset as Fieldset };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAElCC,GAAG,EAAEC,UAAU;AAAA,SAEfC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAoCpB,MAAMC,QAAQ,GAAGC,IAAA,IAQC;EAAA,IARA;IAChBC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,MAAM;IACNC,IAAI;IACJC,EAAE,EAAEC;EAEM,CAAC,GAAAP,IAAA;EACX,MAAMM,EAAE,GAAGZ,WAAW,CAACa,UAAU,CAAC;EAElC,OACET,KAAA,CAACN,GAAG;IACFgB,SAAS,EAAC,UAAU;IAEpBH,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEA,EAAG;IACPG,EAAE,EAAE;MACFC,QAAQ,EAAGC,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACF,QAAQ;MAC1CG,MAAM,EAAGF,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;MACnCC,cAAc,EAAGJ,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;MAC3CE,OAAO,EAAGL,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;MACpCG,MAAM,EAAE,GAAG;MAEX,cAAc,EAAE;QACdF,cAAc,EAAGJ,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MAC5C;IACF,CAAE;IAAAZ,QAAA,GAEFN,IAAA,CAACH,UAAU;MAACyB,OAAO,EAAC,QAAQ;MAACV,SAAS,EAAC,QAAQ;MAAAN,QAAA,EAC5CE;IAAM,CACG,CAAC,EACZD,WAAW,IAAIP,IAAA,CAACH,UAAU;MAAC0B,SAAS;MAAAjB,QAAA,EAAEC;IAAW,CAAa,CAAC,EAC/DF,KAAK,EACLC,QAAQ;EAAA,CACN,CAAC;AAEV,CAAC;AAED,MAAMkB,gBAAgB,GAAG7B,IAAI,CAACQ,QAAQ,CAAC;AACvCqB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIrB,QAAQ"}
|
package/dist/Form.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
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 { Box, Typography } from "./index.js";
|
|
15
|
+
import { useUniqueId } from "./useUniqueId.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
const Form = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
alert,
|
|
21
|
+
children,
|
|
22
|
+
description,
|
|
23
|
+
encodingType,
|
|
24
|
+
formActions,
|
|
25
|
+
hasAutoComplete,
|
|
26
|
+
id: idOverride,
|
|
27
|
+
method,
|
|
28
|
+
name,
|
|
29
|
+
noValidate = false,
|
|
30
|
+
target,
|
|
31
|
+
title
|
|
32
|
+
} = _ref;
|
|
33
|
+
const id = useUniqueId(idOverride);
|
|
34
|
+
return _jsxs(Box, {
|
|
35
|
+
component: "form",
|
|
36
|
+
autoComplete: hasAutoComplete,
|
|
37
|
+
name: name,
|
|
38
|
+
encType: encodingType,
|
|
39
|
+
method: method,
|
|
40
|
+
noValidate: noValidate,
|
|
41
|
+
target: target,
|
|
42
|
+
id: id,
|
|
43
|
+
sx: {
|
|
44
|
+
maxWidth: theme => theme.mixins.maxWidth,
|
|
45
|
+
margin: theme => theme.spacing(0),
|
|
46
|
+
padding: theme => theme.spacing(0)
|
|
47
|
+
},
|
|
48
|
+
children: [title && _jsx(Typography, {
|
|
49
|
+
variant: "h4",
|
|
50
|
+
component: "h1",
|
|
51
|
+
children: title
|
|
52
|
+
}), description && _jsx(Typography, {
|
|
53
|
+
paragraph: true,
|
|
54
|
+
children: description
|
|
55
|
+
}), alert, children, formActions && _jsx(Box, {
|
|
56
|
+
component: "div",
|
|
57
|
+
sx: {
|
|
58
|
+
display: "flex",
|
|
59
|
+
justifyContent: "flex-start",
|
|
60
|
+
gap: theme => theme.spacing(1)
|
|
61
|
+
},
|
|
62
|
+
children: formActions
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const MemoizedForm = memo(Form);
|
|
67
|
+
MemoizedForm.displayName = "Form";
|
|
68
|
+
export { MemoizedForm as Form };
|
|
69
|
+
//# sourceMappingURL=Form.js.map
|
package/dist/Form.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","names":["memo","Box","Typography","useUniqueId","jsx","_jsx","jsxs","_jsxs","Form","_ref","alert","children","description","encodingType","formActions","hasAutoComplete","id","idOverride","method","name","noValidate","target","title","component","autoComplete","encType","sx","maxWidth","theme","mixins","margin","spacing","padding","variant","paragraph","display","justifyContent","gap","MemoizedForm","displayName"],"sources":["../src/Form.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 { Box, Typography } from \"./\";\nimport { Button } from \"./Button\";\nimport { Infobox } from \"./Infobox\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type FormProps = {\n /**\n * The title of the Form\n */\n title?: string;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * The Field or FieldSet components within the Form\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * An Infobox indicating a Form-wide error or status update.\n */\n alert?: ReactElement<typeof Infobox>;\n /**\n * Indicates whether input elements can by default have their values automatically completed by the browser.\n * `autocomplete` attributes on form elements override it on <form>\n */\n hasAutoComplete?: \"on\" | \"off\" | undefined;\n /**\n * The name of the form. The value must not be the empty string, and must be unique among the form elements in the forms collection that it is in, if any.\n */\n name: string;\n /**\n * This Boolean attribute indicates that the form shouldn't be validated when submitted.\n * If this attribute is not set (and therefore the form is validated),\n * it can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.\n */\n noValidate?: boolean;\n /**\n * If the value of the method attribute is post, enctype is the MIME type of the form submission.\n * This value can be overridden by formenctype attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n encodingType?:\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\"\n | \"text/plain\"\n | undefined;\n /**\n * The HTTP method to submit the form with.\n * This value is overridden by formmethod attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n method?: \"post\" | \"get\" | \"dialog\" | undefined;\n /**\n * Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe).\n * This value can be overridden by a formtarget attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element.\n */\n target?: \"post\" | \"get\" | \"dialog\" | undefined;\n /**\n * The Field or FieldGroup components within the Form\n */\n formActions?:\n | ReactElement<typeof Button>\n | Array<ReactElement<typeof Button>>;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n};\n\nconst Form = ({\n alert,\n children,\n description,\n encodingType,\n formActions,\n hasAutoComplete,\n id: idOverride,\n method,\n name,\n noValidate = false,\n target,\n title,\n}: FormProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n component=\"form\"\n autoComplete={hasAutoComplete}\n name={name}\n encType={encodingType}\n method={method}\n noValidate={noValidate}\n target={target}\n id={id}\n sx={{\n maxWidth: (theme) => theme.mixins.maxWidth,\n margin: (theme) => theme.spacing(0),\n padding: (theme) => theme.spacing(0),\n }}\n >\n {title && (\n <Typography variant=\"h4\" component=\"h1\">\n {title}\n </Typography>\n )}\n {description && <Typography paragraph>{description}</Typography>}\n {alert}\n {children}\n {formActions && (\n <Box\n component=\"div\"\n sx={{\n display: \"flex\",\n justifyContent: \"flex-start\",\n gap: (theme) => theme.spacing(1),\n }}\n >\n {formActions}\n </Box>\n )}\n </Box>\n );\n};\n\nconst MemoizedForm = memo(Form);\nMemoizedForm.displayName = \"Form\";\n\nexport { MemoizedForm as Form };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAElCC,GAAG,EAAEC,UAAU;AAAA,SAGfC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAiEpB,MAAMC,IAAI,GAAGC,IAAA,IAaI;EAAA,IAbH;IACZC,KAAK;IACLC,QAAQ;IACRC,WAAW;IACXC,YAAY;IACZC,WAAW;IACXC,eAAe;IACfC,EAAE,EAAEC,UAAU;IACdC,MAAM;IACNC,IAAI;IACJC,UAAU,GAAG,KAAK;IAClBC,MAAM;IACNC;EACS,CAAC,GAAAb,IAAA;EACV,MAAMO,EAAE,GAAGb,WAAW,CAACc,UAAU,CAAC;EAElC,OACEV,KAAA,CAACN,GAAG;IACFsB,SAAS,EAAC,MAAM;IAChBC,YAAY,EAAET,eAAgB;IAC9BI,IAAI,EAAEA,IAAK;IACXM,OAAO,EAAEZ,YAAa;IACtBK,MAAM,EAAEA,MAAO;IACfE,UAAU,EAAEA,UAAW;IACvBC,MAAM,EAAEA,MAAO;IACfL,EAAE,EAAEA,EAAG;IACPU,EAAE,EAAE;MACFC,QAAQ,EAAGC,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACF,QAAQ;MAC1CG,MAAM,EAAGF,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;MACnCC,OAAO,EAAGJ,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;IACrC,CAAE;IAAApB,QAAA,GAEDW,KAAK,IACJjB,IAAA,CAACH,UAAU;MAAC+B,OAAO,EAAC,IAAI;MAACV,SAAS,EAAC,IAAI;MAAAZ,QAAA,EACpCW;IAAK,CACI,CACb,EACAV,WAAW,IAAIP,IAAA,CAACH,UAAU;MAACgC,SAAS;MAAAvB,QAAA,EAAEC;IAAW,CAAa,CAAC,EAC/DF,KAAK,EACLC,QAAQ,EACRG,WAAW,IACVT,IAAA,CAACJ,GAAG;MACFsB,SAAS,EAAC,KAAK;MACfG,EAAE,EAAE;QACFS,OAAO,EAAE,MAAM;QACfC,cAAc,EAAE,YAAY;QAC5BC,GAAG,EAAGT,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MACjC,CAAE;MAAApB,QAAA,EAEDG;IAAW,CACT,CACN;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAMwB,YAAY,GAAGtC,IAAI,CAACQ,IAAI,CAAC;AAC/B8B,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAI9B,IAAI"}
|
package/dist/Icon.js
CHANGED
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { forwardRef } from "react";
|
|
13
12
|
import { iconDictionary } from "./iconDictionary/index.js";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
export const Icon =
|
|
14
|
+
export const Icon = _ref => {
|
|
16
15
|
let {
|
|
17
16
|
ariaLabelledby,
|
|
18
17
|
label,
|
|
@@ -26,6 +25,6 @@ export const Icon = forwardRef(_ref => {
|
|
|
26
25
|
fontSize: size,
|
|
27
26
|
titleAccess: label
|
|
28
27
|
});
|
|
29
|
-
}
|
|
28
|
+
};
|
|
30
29
|
Icon.displayName = "Icon";
|
|
31
30
|
//# sourceMappingURL=Icon.js.map
|
package/dist/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","names":["
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["iconDictionary","jsx","_jsx","Icon","_ref","ariaLabelledby","label","name","size","NamedIcon","fontSize","titleAccess","displayName"],"sources":["../src/Icon.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2021-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 { iconDictionary } from \"./iconDictionary\";\n\nexport type IconProps = {\n /*\n ** The element whose text describes the icon, if it exists\n */\n ariaLabelledby?: string;\n /*\n ** Text that describes the icon\n */\n label: string;\n /*\n ** Name of the icon to render\n */\n name: keyof typeof iconDictionary;\n /*\n ** The size of the icon\n */\n size: \"small\" | \"medium\" | \"large\";\n};\n\n/**\n * A system of icons which establishes a visual language\n * that can be easily understood regardless of age, language or culture.\n * This component includes all icon data as static imports. Favor individual\n * icon component imports where possible to keep your bundle size smaller.\n */\nexport const Icon = ({ ariaLabelledby, label, name, size }: IconProps) => {\n if (!(name in iconDictionary)) return null;\n\n const NamedIcon = iconDictionary[name];\n\n return (\n <NamedIcon\n aria-labelledby={ariaLabelledby}\n fontSize={size}\n titleAccess={label}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAYSA,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AA2BvB,OAAO,MAAMC,IAAI,GAAGC,IAAA,IAAsD;EAAA,IAArD;IAAEC,cAAc;IAAEC,KAAK;IAAEC,IAAI;IAAEC;EAAgB,CAAC,GAAAJ,IAAA;EACnE,IAAI,EAAEG,IAAI,IAAIP,cAAc,CAAC,EAAE,OAAO,IAAI;EAE1C,MAAMS,SAAS,GAAGT,cAAc,CAACO,IAAI,CAAC;EAEtC,OACEL,IAAA,CAACO,SAAS;IACR,mBAAiBJ,cAAe;IAChCK,QAAQ,EAAEF,IAAK;IACfG,WAAW,EAAEL;EAAM,CACpB,CAAC;AAEN,CAAC;AAEDH,IAAI,CAACS,WAAW,GAAG,MAAM"}
|
package/dist/Infobox.js
CHANGED
|
@@ -9,11 +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 { memo } from "react";
|
|
13
14
|
import { Alert, AlertTitle, ScreenReaderText } from "./index.js";
|
|
15
|
+
import { useTranslation } from "react-i18next";
|
|
14
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
18
|
const Infobox = _ref => {
|
|
18
19
|
let {
|
|
19
20
|
children,
|
|
@@ -21,18 +22,20 @@ const Infobox = _ref => {
|
|
|
21
22
|
severity,
|
|
22
23
|
title
|
|
23
24
|
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
t
|
|
27
|
+
} = useTranslation();
|
|
24
28
|
return _jsxs(Alert, {
|
|
25
29
|
role: role,
|
|
26
30
|
severity: severity,
|
|
27
31
|
variant: "infobox",
|
|
28
32
|
children: [_jsxs(ScreenReaderText, {
|
|
29
|
-
children: [severity, ": "]
|
|
33
|
+
children: [t(`severity.${severity}`), ": "]
|
|
30
34
|
}), title && _jsx(AlertTitle, {
|
|
31
35
|
children: title
|
|
32
36
|
}), children]
|
|
33
37
|
});
|
|
34
38
|
};
|
|
35
|
-
|
|
36
39
|
const MemoizedInfobox = memo(Infobox);
|
|
37
40
|
export { MemoizedInfobox as Infobox };
|
|
38
41
|
//# sourceMappingURL=Infobox.js.map
|
package/dist/Infobox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Infobox.js","names":["memo","Alert","AlertTitle","ScreenReaderText","Infobox","children","role","severity","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, ScreenReaderText } from \".\";\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 <Alert role={role} severity={severity} variant=\"infobox\">\n
|
|
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";
|
|
@@ -20,12 +20,16 @@ export const Link = forwardRef((props, ref) => {
|
|
|
20
20
|
icon,
|
|
21
21
|
children,
|
|
22
22
|
target,
|
|
23
|
-
variant
|
|
23
|
+
variant,
|
|
24
|
+
href,
|
|
25
|
+
rel
|
|
24
26
|
} = props;
|
|
25
27
|
return _jsxs(_Link, {
|
|
26
28
|
ref: ref,
|
|
27
29
|
variant: variant,
|
|
28
30
|
target: target,
|
|
31
|
+
href: href,
|
|
32
|
+
rel: rel,
|
|
29
33
|
children: [icon && _jsx("span", {
|
|
30
34
|
className: "Link-icon",
|
|
31
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","variant"],"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 } = props;\n return (\n <MuiLink ref={ref} variant={variant} target={target}>\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":"
|
|
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,7 +13,6 @@ 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 = "",
|
|
@@ -24,15 +23,12 @@ const MenuButton = _ref => {
|
|
|
24
23
|
} = _ref;
|
|
25
24
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
26
25
|
const open = Boolean(anchorEl);
|
|
27
|
-
|
|
28
26
|
const handleClick = event => {
|
|
29
27
|
setAnchorEl(event.currentTarget);
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
const handleClose = () => {
|
|
33
30
|
setAnchorEl(null);
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
const uniqueId = useUniqueId(idOverride);
|
|
37
33
|
const menuListProps = useMemo(() => ({
|
|
38
34
|
"aria-labelledby": `${uniqueId}-button`
|
|
@@ -57,7 +53,6 @@ const MenuButton = _ref => {
|
|
|
57
53
|
})]
|
|
58
54
|
});
|
|
59
55
|
};
|
|
60
|
-
|
|
61
56
|
const MemoizedMenuButton = memo(MenuButton);
|
|
62
57
|
export { MemoizedMenuButton as MenuButton };
|
|
63
58
|
//# sourceMappingURL=MenuButton.js.map
|