@okta/odyssey-react-mui 1.21.2 → 1.23.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 +34 -0
- package/dist/@types/i18next.d.js.map +1 -1
- package/dist/Autocomplete.js +106 -38
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Callout.js +12 -24
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +26 -11
- package/dist/Checkbox.js.map +1 -1
- package/dist/CheckboxGroup.js +14 -3
- package/dist/CheckboxGroup.js.map +1 -1
- package/dist/DataTable/DataTable.js +10 -2
- package/dist/DataTable/DataTable.js.map +1 -1
- package/dist/DataTable/useScrollIndication.js +9 -5
- package/dist/DataTable/useScrollIndication.js.map +1 -1
- package/dist/Field.js +3 -1
- package/dist/Field.js.map +1 -1
- package/dist/FileUploader/FileUploadIllustration.js.map +1 -0
- package/dist/FileUploader/FileUploadPreview.js.map +1 -0
- package/dist/{labs/FileUpload.js → FileUploader/FileUploader.js} +6 -5
- package/dist/FileUploader/FileUploader.js.map +1 -0
- package/dist/FileUploader/index.js +13 -0
- package/dist/FileUploader/index.js.map +1 -0
- package/dist/OdysseyCacheProvider.js +4 -3
- package/dist/OdysseyCacheProvider.js.map +1 -1
- package/dist/OdysseyProvider.js +10 -3
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/OdysseyThemeProvider.js +3 -2
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/Radio.js +33 -6
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +17 -5
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +89 -31
- package/dist/Select.js.map +1 -1
- package/dist/{labs/Switch.js → Switch.js} +77 -23
- package/dist/Switch.js.map +1 -0
- package/dist/Tabs.js +7 -9
- package/dist/Tabs.js.map +1 -1
- package/dist/Tag.js +102 -4
- package/dist/Tag.js.map +1 -1
- package/dist/TextField.js +16 -39
- package/dist/TextField.js.map +1 -1
- package/dist/Toast.js +2 -2
- package/dist/Toast.js.map +1 -1
- package/dist/ToastStack.js.map +1 -1
- package/dist/createShadowDomElements.js +43 -0
- package/dist/createShadowDomElements.js.map +1 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.scss +96 -8
- package/dist/labs/AppTile.js +124 -0
- package/dist/labs/AppTile.js.map +1 -0
- package/dist/labs/DataView/BulkActionsMenu.js.map +1 -0
- package/dist/labs/{DataComponents/StackContent.js → DataView/CardLayoutContent.js} +14 -14
- package/dist/labs/DataView/CardLayoutContent.js.map +1 -0
- package/dist/labs/{DataComponents/StackCard.js → DataView/DataCard.js} +6 -6
- package/dist/labs/DataView/DataCard.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/DataTable.js +6 -2
- package/dist/labs/DataView/DataTable.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/DataView.js +79 -30
- package/dist/labs/DataView/DataView.js.map +1 -0
- package/dist/labs/DataView/DetailPanel.js.map +1 -0
- package/dist/labs/DataView/LayoutSwitcher.js.map +1 -0
- package/dist/labs/DataView/RowActions.js.map +1 -0
- package/dist/labs/{DataComponents/TableContent.js → DataView/TableLayoutContent.js} +34 -20
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/TableSettings.js +2 -2
- package/dist/labs/DataView/TableSettings.js.map +1 -0
- package/dist/labs/DataView/componentTypes.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/constants.js +2 -2
- package/dist/labs/DataView/constants.js.map +1 -0
- package/dist/labs/DataView/dataTypes.js.map +1 -0
- package/dist/labs/DataView/fetchData.js.map +1 -0
- package/dist/labs/{DataComponents → DataView}/index.js +0 -1
- package/dist/labs/DataView/index.js.map +1 -0
- package/dist/labs/DataView/tableConstants.js.map +1 -0
- package/dist/labs/DataView/useFilterConversion.js.map +1 -0
- package/dist/labs/DateField.js +2 -0
- package/dist/labs/DateField.js.map +1 -1
- package/dist/labs/DatePicker.js +5 -1
- package/dist/labs/DatePicker.js.map +1 -1
- package/dist/labs/SideNav/CollapseIcon.js +44 -0
- package/dist/labs/SideNav/CollapseIcon.js.map +1 -0
- package/dist/labs/SideNav/OktaLogo.js +36 -0
- package/dist/labs/SideNav/OktaLogo.js.map +1 -0
- package/dist/labs/SideNav/SideNav.js +335 -0
- package/dist/labs/SideNav/SideNav.js.map +1 -0
- package/dist/labs/SideNav/SideNavFooterContent.js +49 -0
- package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -0
- package/dist/labs/SideNav/SideNavHeader.js +81 -0
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemContent.js +157 -0
- package/dist/labs/SideNav/SideNavItemContent.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js +71 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -0
- package/dist/labs/SideNav/index.js +14 -0
- package/dist/labs/SideNav/index.js.map +1 -0
- package/dist/labs/SideNav/types.js +2 -0
- package/dist/labs/SideNav/types.js.map +1 -0
- package/dist/labs/TopNav.js +2 -1
- package/dist/labs/TopNav.js.map +1 -1
- package/dist/labs/index.js +3 -4
- package/dist/labs/index.js.map +1 -1
- package/dist/labs/useDateFieldsTranslations.js +1 -1
- package/dist/labs/useDateFieldsTranslations.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +3 -1
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +18 -4
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js +18 -4
- package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +17 -3
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +16 -2
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +30 -0
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Callout.d.ts +11 -23
- package/dist/src/Callout.d.ts.map +1 -1
- package/dist/src/Checkbox.d.ts +2 -2
- package/dist/src/Checkbox.d.ts.map +1 -1
- package/dist/src/CheckboxGroup.d.ts +3 -3
- package/dist/src/CheckboxGroup.d.ts.map +1 -1
- package/dist/src/DataTable/DataTable.d.ts +9 -1
- package/dist/src/DataTable/DataTable.d.ts.map +1 -1
- package/dist/src/DataTable/useScrollIndication.d.ts.map +1 -1
- package/dist/src/Field.d.ts +3 -2
- package/dist/src/Field.d.ts.map +1 -1
- package/dist/src/FileUploader/FileUploadIllustration.d.ts.map +1 -0
- package/dist/src/{labs → FileUploader}/FileUploadPreview.d.ts +2 -2
- package/dist/src/FileUploader/FileUploadPreview.d.ts.map +1 -0
- package/dist/src/{labs/FileUpload.d.ts → FileUploader/FileUploader.d.ts} +5 -4
- package/dist/src/FileUploader/FileUploader.d.ts.map +1 -0
- package/dist/src/FileUploader/index.d.ts +13 -0
- package/dist/src/FileUploader/index.d.ts.map +1 -0
- package/dist/src/NativeSelect.d.ts +1 -1
- package/dist/src/OdysseyCacheProvider.d.ts +7 -3
- package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +1 -1
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyThemeProvider.d.ts +3 -1
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/src/PasswordField.d.ts +1 -1
- package/dist/src/Radio.d.ts +6 -8
- package/dist/src/Radio.d.ts.map +1 -1
- package/dist/src/RadioGroup.d.ts +4 -5
- package/dist/src/RadioGroup.d.ts.map +1 -1
- package/dist/src/SearchField.d.ts +1 -1
- package/dist/src/Select.d.ts +38 -2
- package/dist/src/Select.d.ts.map +1 -1
- package/dist/src/{labs/Switch.d.ts → Switch.d.ts} +8 -4
- package/dist/src/Switch.d.ts.map +1 -0
- package/dist/src/Tabs.d.ts +6 -8
- package/dist/src/Tabs.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +7 -1
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/TextField.d.ts +17 -40
- package/dist/src/TextField.d.ts.map +1 -1
- package/dist/src/ToastStack.d.ts +2 -2
- package/dist/src/ToastStack.d.ts.map +1 -1
- package/dist/src/{createShadowRootElement.d.ts → createShadowDomElements.d.ts} +6 -1
- package/dist/src/createShadowDomElements.d.ts.map +1 -0
- package/dist/src/i18n.d.ts +2 -2
- package/dist/src/i18n.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/AppTile.d.ts +39 -0
- package/dist/src/labs/AppTile.d.ts.map +1 -0
- package/dist/src/labs/DataView/BulkActionsMenu.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/StackContent.d.ts → DataView/CardLayoutContent.d.ts} +7 -7
- package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/StackCard.d.ts → DataView/DataCard.d.ts} +4 -4
- package/dist/src/labs/DataView/DataCard.d.ts.map +1 -0
- package/dist/src/labs/DataView/DataTable.d.ts +16 -0
- package/dist/src/labs/DataView/DataTable.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/DataView.d.ts +1 -1
- package/dist/src/labs/DataView/DataView.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/DetailPanel.d.ts +2 -2
- package/dist/src/labs/DataView/DetailPanel.d.ts.map +1 -0
- package/dist/src/labs/DataView/LayoutSwitcher.d.ts.map +1 -0
- package/dist/src/labs/DataView/RowActions.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents/TableContent.d.ts → DataView/TableLayoutContent.d.ts} +8 -7
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/TableSettings.d.ts +3 -3
- package/dist/src/labs/DataView/TableSettings.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/componentTypes.d.ts +21 -9
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/constants.d.ts +1 -1
- package/dist/src/labs/DataView/constants.d.ts.map +1 -0
- package/dist/src/labs/DataView/dataTypes.d.ts.map +1 -0
- package/dist/src/labs/DataView/fetchData.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/index.d.ts +0 -1
- package/dist/src/labs/DataView/index.d.ts.map +1 -0
- package/dist/src/labs/DataView/tableConstants.d.ts.map +1 -0
- package/dist/src/labs/{DataComponents → DataView}/useFilterConversion.d.ts +2 -2
- package/dist/src/labs/DataView/useFilterConversion.d.ts.map +1 -0
- package/dist/src/labs/DateField.d.ts +2 -2
- package/dist/src/labs/DateField.d.ts.map +1 -1
- package/dist/src/labs/DatePicker.d.ts +2 -2
- package/dist/src/labs/DatePicker.d.ts.map +1 -1
- package/dist/src/labs/SideNav/CollapseIcon.d.ts +17 -0
- package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts +14 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNav.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -0
- package/dist/{test-selectors/odysseyTestSelectors.js → src/labs/SideNav/SideNavFooterContent.d.ts} +6 -9
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavHeader.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts +33 -0
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +16 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -0
- package/dist/src/labs/SideNav/index.d.ts +14 -0
- package/dist/src/labs/SideNav/index.d.ts.map +1 -0
- package/dist/src/labs/{SideNav.d.ts → SideNav/types.d.ts} +54 -33
- package/dist/src/labs/SideNav/types.d.ts.map +1 -0
- package/dist/src/labs/TopNav.d.ts +1 -0
- package/dist/src/labs/TopNav.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +2 -3
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +16 -2
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +15 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/test-selectors/getByQuerySelector.d.ts +148 -0
- package/dist/src/test-selectors/getByQuerySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts +14 -0
- package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts.map +1 -0
- package/dist/src/test-selectors/getComputedAccessibleText.d.ts +23 -0
- package/dist/src/test-selectors/getComputedAccessibleText.d.ts.map +1 -0
- package/dist/src/test-selectors/index.d.ts +2 -2
- package/dist/src/test-selectors/index.d.ts.map +1 -1
- package/{src/test-selectors/odysseyTestSelectors.ts → dist/src/test-selectors/interpolateString.d.ts} +4 -11
- package/dist/src/test-selectors/interpolateString.d.ts.map +1 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts +24 -0
- package/dist/src/test-selectors/linkedHtmlSelectors.d.ts.map +1 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts +5755 -0
- package/dist/src/test-selectors/queryOdysseySelector.d.ts.map +1 -0
- package/dist/src/test-selectors/querySelector.d.ts +59 -3613
- package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
- package/dist/src/test-selectors/sanityChecks.d.ts +18 -0
- package/dist/src/test-selectors/sanityChecks.d.ts.map +1 -0
- package/dist/src/test-selectors/testSelector.d.ts +46 -0
- package/dist/src/test-selectors/testSelector.d.ts.map +1 -0
- package/dist/src/theme/components.d.ts +3 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts +3 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
- package/dist/test-selectors/getByQuerySelector.js +64 -0
- package/dist/test-selectors/getByQuerySelector.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js +25 -0
- package/dist/test-selectors/getComputedAccessibleErrorMessageText.js.map +1 -0
- package/dist/test-selectors/getComputedAccessibleText.js +24 -0
- package/dist/test-selectors/getComputedAccessibleText.js.map +1 -0
- package/dist/test-selectors/index.js +2 -2
- package/dist/test-selectors/index.js.map +1 -1
- package/dist/test-selectors/interpolateString.js +25 -0
- package/dist/test-selectors/interpolateString.js.map +1 -0
- package/dist/test-selectors/linkedHtmlSelectors.js +34 -0
- package/dist/test-selectors/linkedHtmlSelectors.js.map +1 -0
- package/dist/test-selectors/queryOdysseySelector.js +26 -0
- package/dist/test-selectors/queryOdysseySelector.js.map +1 -0
- package/dist/test-selectors/querySelector.js +82 -58
- package/dist/test-selectors/querySelector.js.map +1 -1
- package/dist/test-selectors/sanityChecks.js +33 -0
- package/dist/test-selectors/sanityChecks.js.map +1 -0
- package/dist/test-selectors/testSelector.js +2 -0
- package/dist/test-selectors/testSelector.js.map +1 -0
- package/dist/test-selectors/testSelectors.json +1 -1
- package/dist/theme/components.js +231 -146
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/createOdysseyMuiTheme.js +3 -2
- package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jest.setup.js +3 -0
- package/package.json +5 -5
- package/scripts/generateTestSelectorsJson.ts +1 -1
- package/src/@types/i18next.d.ts +1 -1
- package/src/Autocomplete.tsx +140 -45
- package/src/Callout.tsx +13 -25
- package/src/Checkbox.tsx +39 -9
- package/src/CheckboxGroup.tsx +20 -4
- package/src/DataTable/DataTable.tsx +24 -1
- package/src/DataTable/useScrollIndication.tsx +11 -4
- package/src/Field.tsx +5 -2
- package/src/{labs → FileUploader}/FileUploadPreview.tsx +3 -3
- package/src/{labs/FileUpload.tsx → FileUploader/FileUploader.tsx} +7 -6
- package/src/FileUploader/index.ts +13 -0
- package/src/OdysseyCacheProvider.test.tsx +1 -0
- package/src/OdysseyCacheProvider.tsx +18 -4
- package/src/OdysseyProvider.tsx +12 -4
- package/src/OdysseyThemeProvider.tsx +6 -2
- package/src/Radio.tsx +41 -12
- package/src/RadioGroup.tsx +26 -7
- package/src/Select.tsx +116 -45
- package/src/{labs/Switch.tsx → Switch.tsx} +95 -41
- package/src/Tabs.tsx +8 -10
- package/src/Tag.tsx +134 -3
- package/src/TextField.tsx +18 -41
- package/src/Toast.tsx +1 -1
- package/src/ToastStack.tsx +2 -2
- package/src/createShadowDomElements.ts +53 -0
- package/src/i18n.ts +3 -3
- package/src/index.ts +7 -2
- package/src/labs/AppTile.tsx +200 -0
- package/src/labs/{DataComponents/StackContent.tsx → DataView/CardLayoutContent.tsx} +24 -19
- package/src/labs/{DataComponents/StackCard.tsx → DataView/DataCard.tsx} +7 -7
- package/src/labs/{DataComponents → DataView}/DataTable.tsx +8 -4
- package/src/labs/DataView/DataView.test.tsx +158 -0
- package/src/labs/{DataComponents → DataView}/DataView.tsx +119 -42
- package/src/labs/{DataComponents → DataView}/DetailPanel.tsx +2 -2
- package/src/labs/{DataComponents/TableContent.tsx → DataView/TableLayoutContent.tsx} +59 -27
- package/src/labs/{DataComponents → DataView}/TableSettings.tsx +5 -4
- package/src/labs/{DataComponents → DataView}/componentTypes.ts +24 -9
- package/src/labs/{DataComponents → DataView}/constants.tsx +2 -2
- package/src/labs/{DataComponents → DataView}/index.tsx +0 -1
- package/src/labs/{DataComponents → DataView}/useFilterConversion.ts +2 -2
- package/src/labs/DateField.tsx +3 -0
- package/src/labs/DatePicker.tsx +12 -1
- package/src/labs/SideNav/CollapseIcon.tsx +48 -0
- package/src/labs/SideNav/OktaLogo.tsx +39 -0
- package/src/labs/SideNav/SideNav.tsx +486 -0
- package/src/labs/SideNav/SideNavFooterContent.tsx +64 -0
- package/src/labs/SideNav/SideNavHeader.tsx +88 -0
- package/src/labs/SideNav/SideNavItemContent.tsx +216 -0
- package/src/labs/SideNav/SideNavItemLinkContent.tsx +87 -0
- package/src/labs/SideNav/index.ts +15 -0
- package/src/labs/SideNav/types.ts +152 -0
- package/src/labs/TopNav.tsx +3 -1
- package/src/labs/index.ts +3 -4
- package/src/labs/useDateFieldsTranslations.ts +1 -1
- package/src/properties/odyssey-react-mui.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_cs.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_da.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_de.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_el.properties +16 -4
- package/src/properties/translations/odyssey-react-mui_es.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_fi.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_fr.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ht.properties +17 -6
- package/src/properties/translations/odyssey-react-mui_hu.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_id.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_it.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ja.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_ko.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_ms.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_nb.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_pl.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ro.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_ru.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_sv.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_th.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_tr.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_uk.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_vi.properties +15 -3
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +14 -2
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +14 -2
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ht.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
- package/src/test-selectors/getByQuerySelector.ts +176 -0
- package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +52 -0
- package/src/test-selectors/getComputedAccessibleText.ts +36 -0
- package/src/test-selectors/index.ts +2 -2
- package/src/test-selectors/interpolateString.ts +41 -0
- package/src/test-selectors/linkedHtmlSelectors.ts +73 -0
- package/src/test-selectors/queryOdysseySelector.ts +36 -0
- package/src/test-selectors/querySelector.ts +221 -170
- package/src/test-selectors/sanityChecks.ts +53 -0
- package/src/test-selectors/testSelector.ts +143 -0
- package/src/theme/components.tsx +238 -150
- package/src/theme/createOdysseyMuiTheme.ts +4 -1
- package/dist/createShadowRootElement.js +0 -26
- package/dist/createShadowRootElement.js.map +0 -1
- package/dist/labs/DataComponents/BulkActionsMenu.js.map +0 -1
- package/dist/labs/DataComponents/DataStack.js +0 -85
- package/dist/labs/DataComponents/DataStack.js.map +0 -1
- package/dist/labs/DataComponents/DataTable.js.map +0 -1
- package/dist/labs/DataComponents/DataView.js.map +0 -1
- package/dist/labs/DataComponents/DetailPanel.js.map +0 -1
- package/dist/labs/DataComponents/LayoutSwitcher.js.map +0 -1
- package/dist/labs/DataComponents/RowActions.js.map +0 -1
- package/dist/labs/DataComponents/StackCard.js.map +0 -1
- package/dist/labs/DataComponents/StackContent.js.map +0 -1
- package/dist/labs/DataComponents/TableContent.js.map +0 -1
- package/dist/labs/DataComponents/TableSettings.js.map +0 -1
- package/dist/labs/DataComponents/componentTypes.js.map +0 -1
- package/dist/labs/DataComponents/constants.js.map +0 -1
- package/dist/labs/DataComponents/dataTypes.js.map +0 -1
- package/dist/labs/DataComponents/fetchData.js.map +0 -1
- package/dist/labs/DataComponents/index.js.map +0 -1
- package/dist/labs/DataComponents/tableConstants.js.map +0 -1
- package/dist/labs/DataComponents/useFilterConversion.js.map +0 -1
- package/dist/labs/FileUpload.js.map +0 -1
- package/dist/labs/FileUploadIllustration.js.map +0 -1
- package/dist/labs/FileUploadPreview.js.map +0 -1
- package/dist/labs/SideNav.js +0 -478
- package/dist/labs/SideNav.js.map +0 -1
- package/dist/labs/Switch.js.map +0 -1
- package/dist/src/createShadowRootElement.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/BulkActionsMenu.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataStack.d.ts +0 -20
- package/dist/src/labs/DataComponents/DataStack.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataTable.d.ts +0 -16
- package/dist/src/labs/DataComponents/DataTable.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DataView.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/LayoutSwitcher.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/RowActions.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/StackCard.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/StackContent.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/TableContent.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/TableSettings.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/componentTypes.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/constants.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/dataTypes.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/fetchData.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/index.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/tableConstants.d.ts.map +0 -1
- package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +0 -1
- package/dist/src/labs/FileUpload.d.ts.map +0 -1
- package/dist/src/labs/FileUploadIllustration.d.ts.map +0 -1
- package/dist/src/labs/FileUploadPreview.d.ts.map +0 -1
- package/dist/src/labs/SideNav.d.ts.map +0 -1
- package/dist/src/labs/Switch.d.ts.map +0 -1
- package/dist/src/test-selectors/featureTestSelector.d.ts +0 -31
- package/dist/src/test-selectors/featureTestSelector.d.ts.map +0 -1
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts +0 -120
- package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +0 -1
- package/dist/test-selectors/featureTestSelector.js +0 -2
- package/dist/test-selectors/featureTestSelector.js.map +0 -1
- package/dist/test-selectors/odysseyTestSelectors.js.map +0 -1
- package/src/createShadowRootElement.ts +0 -31
- package/src/labs/DataComponents/DataStack.tsx +0 -105
- package/src/labs/SideNav.tsx +0 -745
- package/src/test-selectors/featureTestSelector.ts +0 -41
- /package/dist/{labs → FileUploader}/FileUploadIllustration.js +0 -0
- /package/dist/{labs → FileUploader}/FileUploadPreview.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/BulkActionsMenu.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/DetailPanel.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/LayoutSwitcher.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/RowActions.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/componentTypes.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/dataTypes.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/fetchData.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/tableConstants.js +0 -0
- /package/dist/labs/{DataComponents → DataView}/useFilterConversion.js +0 -0
- /package/dist/src/{labs → FileUploader}/FileUploadIllustration.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/BulkActionsMenu.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/LayoutSwitcher.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/RowActions.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/dataTypes.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/fetchData.d.ts +0 -0
- /package/dist/src/labs/{DataComponents → DataView}/tableConstants.d.ts +0 -0
- /package/src/{labs → FileUploader}/FileUploadIllustration.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/BulkActionsMenu.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/LayoutSwitcher.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/RowActions.tsx +0 -0
- /package/src/labs/{DataComponents → DataView}/dataTypes.ts +0 -0
- /package/src/labs/{DataComponents → DataView}/fetchData.ts +0 -0
- /package/src/labs/{DataComponents → DataView}/tableConstants.tsx +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2024-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 {
|
|
14
|
+
type ByRoleOptions,
|
|
15
|
+
type SelectorMatcherOptions,
|
|
16
|
+
} from "@testing-library/dom";
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
type RoleSelectorMethod,
|
|
20
|
+
type TextSelectorMethod,
|
|
21
|
+
} from "./getByQuerySelector";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* We can't use React's `AriaRole` because it allows any string value. We want to be very specific. This is otherwise copied straight from React's code.
|
|
25
|
+
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L2815
|
|
26
|
+
*/
|
|
27
|
+
export type AriaRole =
|
|
28
|
+
| "alert"
|
|
29
|
+
| "alertdialog"
|
|
30
|
+
| "application"
|
|
31
|
+
| "article"
|
|
32
|
+
| "banner"
|
|
33
|
+
| "button"
|
|
34
|
+
| "cell"
|
|
35
|
+
| "checkbox"
|
|
36
|
+
| "columnheader"
|
|
37
|
+
| "combobox"
|
|
38
|
+
| "complementary"
|
|
39
|
+
| "contentinfo"
|
|
40
|
+
| "definition"
|
|
41
|
+
| "dialog"
|
|
42
|
+
| "directory"
|
|
43
|
+
| "document"
|
|
44
|
+
| "feed"
|
|
45
|
+
| "figure"
|
|
46
|
+
| "form"
|
|
47
|
+
| "grid"
|
|
48
|
+
| "gridcell"
|
|
49
|
+
| "group"
|
|
50
|
+
| "heading"
|
|
51
|
+
| "img"
|
|
52
|
+
| "link"
|
|
53
|
+
| "list"
|
|
54
|
+
| "listbox"
|
|
55
|
+
| "listitem"
|
|
56
|
+
| "log"
|
|
57
|
+
| "main"
|
|
58
|
+
| "marquee"
|
|
59
|
+
| "math"
|
|
60
|
+
| "menu"
|
|
61
|
+
| "menubar"
|
|
62
|
+
| "menuitem"
|
|
63
|
+
| "menuitemcheckbox"
|
|
64
|
+
| "menuitemradio"
|
|
65
|
+
| "navigation"
|
|
66
|
+
| "none"
|
|
67
|
+
| "note"
|
|
68
|
+
| "option"
|
|
69
|
+
| "presentation"
|
|
70
|
+
| "progressbar"
|
|
71
|
+
| "radio"
|
|
72
|
+
| "radiogroup"
|
|
73
|
+
| "region"
|
|
74
|
+
| "row"
|
|
75
|
+
| "rowgroup"
|
|
76
|
+
| "rowheader"
|
|
77
|
+
| "scrollbar"
|
|
78
|
+
| "search"
|
|
79
|
+
| "searchbox"
|
|
80
|
+
| "separator"
|
|
81
|
+
| "slider"
|
|
82
|
+
| "spinbutton"
|
|
83
|
+
| "status"
|
|
84
|
+
| "switch"
|
|
85
|
+
| "tab"
|
|
86
|
+
| "table"
|
|
87
|
+
| "tablist"
|
|
88
|
+
| "tabpanel"
|
|
89
|
+
| "term"
|
|
90
|
+
| "textbox"
|
|
91
|
+
| "timer"
|
|
92
|
+
| "toolbar"
|
|
93
|
+
| "tooltip"
|
|
94
|
+
| "tree"
|
|
95
|
+
| "treegrid"
|
|
96
|
+
| "treeitem";
|
|
97
|
+
|
|
98
|
+
export type ControlledElementSelector = { isControlledElement?: true };
|
|
99
|
+
|
|
100
|
+
export type RoleSelectorOptions = {
|
|
101
|
+
method: RoleSelectorMethod;
|
|
102
|
+
options: Record<string, keyof ByRoleOptions>;
|
|
103
|
+
role: AriaRole | AriaRole[];
|
|
104
|
+
// | "UNKNOWN" // This should be a `Symbol`, but it can't because this is ultimately going to be JSON stringified. This type will allow passing a custom role if the component allows it: `Box`.
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type TextSelectorOptions = {
|
|
108
|
+
method: TextSelectorMethod;
|
|
109
|
+
options: Record<string, keyof SelectorMatcherOptions>;
|
|
110
|
+
text: string;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export type ElementSelectorValue = RoleSelectorOptions | TextSelectorOptions;
|
|
114
|
+
|
|
115
|
+
export type ElementSelector = {
|
|
116
|
+
elementSelector: ElementSelectorValue;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export type ElementChildSelectorValue = Record<
|
|
120
|
+
string,
|
|
121
|
+
TestSelector & ControlledElementSelector
|
|
122
|
+
>;
|
|
123
|
+
|
|
124
|
+
export type ElementChildSelector = {
|
|
125
|
+
children: ElementChildSelectorValue;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type AccessibleTextSelectorValue =
|
|
129
|
+
| "description"
|
|
130
|
+
| "errorMessage"
|
|
131
|
+
| "label";
|
|
132
|
+
|
|
133
|
+
export type AccessibleTextSelector = {
|
|
134
|
+
/** An "accessible -> semantic" name mapping such as "`description` -> `hint`" where "description" equates to `"aria-description"`. */
|
|
135
|
+
accessibleText: Record<string, AccessibleTextSelectorValue>;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export type TestSelector =
|
|
139
|
+
| ElementChildSelector
|
|
140
|
+
| ElementSelector
|
|
141
|
+
| (ElementChildSelector & ElementSelector)
|
|
142
|
+
| (AccessibleTextSelector & ElementSelector)
|
|
143
|
+
| (ElementChildSelector & AccessibleTextSelector & ElementSelector);
|
package/src/theme/components.tsx
CHANGED
|
@@ -62,9 +62,12 @@ const drawerSizes = {
|
|
|
62
62
|
export const components = ({
|
|
63
63
|
odysseyTokens,
|
|
64
64
|
shadowDomElement,
|
|
65
|
+
shadowRootElement,
|
|
65
66
|
}: {
|
|
66
67
|
odysseyTokens: DesignTokens;
|
|
68
|
+
/** @deprecated use `shadowRootElement` */
|
|
67
69
|
shadowDomElement?: HTMLElement;
|
|
70
|
+
shadowRootElement?: HTMLElement;
|
|
68
71
|
}): ThemeOptions["components"] => {
|
|
69
72
|
return {
|
|
70
73
|
MuiAccordion: {
|
|
@@ -177,41 +180,45 @@ export const components = ({
|
|
|
177
180
|
padding: odysseyTokens.Spacing4,
|
|
178
181
|
gap: odysseyTokens.Spacing4,
|
|
179
182
|
color: odysseyTokens.TypographyColorBody,
|
|
180
|
-
border:
|
|
183
|
+
border: "1px solid",
|
|
181
184
|
|
|
182
185
|
// Severity color variation
|
|
183
186
|
...(ownerState.severity === "success" && {
|
|
184
|
-
backgroundColor: odysseyTokens.
|
|
187
|
+
backgroundColor: odysseyTokens.HueGreen50,
|
|
188
|
+
borderColor: odysseyTokens.HueGreen200,
|
|
185
189
|
|
|
186
190
|
...(ownerState.variant === "toast" && {
|
|
187
|
-
backgroundColor: odysseyTokens.
|
|
191
|
+
backgroundColor: odysseyTokens.HueGreen50.concat(
|
|
188
192
|
odysseyTokens.PaletteAlphaSemi,
|
|
189
193
|
),
|
|
190
194
|
}),
|
|
191
195
|
}),
|
|
192
196
|
...(ownerState.severity === "info" && {
|
|
193
|
-
backgroundColor: odysseyTokens.
|
|
197
|
+
backgroundColor: odysseyTokens.HueBlue50,
|
|
198
|
+
borderColor: odysseyTokens.HueBlue200,
|
|
194
199
|
|
|
195
200
|
...(ownerState.variant === "toast" && {
|
|
196
|
-
backgroundColor: odysseyTokens.
|
|
201
|
+
backgroundColor: odysseyTokens.HueBlue50.concat(
|
|
197
202
|
odysseyTokens.PaletteAlphaSemi,
|
|
198
203
|
),
|
|
199
204
|
}),
|
|
200
205
|
}),
|
|
201
206
|
...(ownerState.severity === "error" && {
|
|
202
|
-
backgroundColor: odysseyTokens.
|
|
207
|
+
backgroundColor: odysseyTokens.HueRed50,
|
|
208
|
+
borderColor: odysseyTokens.HueRed200,
|
|
203
209
|
|
|
204
210
|
...(ownerState.variant === "toast" && {
|
|
205
|
-
backgroundColor: odysseyTokens.
|
|
211
|
+
backgroundColor: odysseyTokens.HueRed50.concat(
|
|
206
212
|
odysseyTokens.PaletteAlphaSemi,
|
|
207
213
|
),
|
|
208
214
|
}),
|
|
209
215
|
}),
|
|
210
216
|
...(ownerState.severity === "warning" && {
|
|
211
|
-
backgroundColor: odysseyTokens.
|
|
217
|
+
backgroundColor: odysseyTokens.HueYellow50,
|
|
218
|
+
borderColor: odysseyTokens.HueYellow500,
|
|
212
219
|
|
|
213
220
|
...(ownerState.variant === "toast" && {
|
|
214
|
-
backgroundColor: odysseyTokens.
|
|
221
|
+
backgroundColor: odysseyTokens.HueYellow50.concat(
|
|
215
222
|
odysseyTokens.PaletteAlphaSemi,
|
|
216
223
|
),
|
|
217
224
|
}),
|
|
@@ -481,7 +488,6 @@ export const components = ({
|
|
|
481
488
|
background: "transparent",
|
|
482
489
|
paddingBlockStart: odysseyTokens.Spacing1,
|
|
483
490
|
...(ownerState.ListboxComponent !== undefined && {
|
|
484
|
-
height: "100%",
|
|
485
491
|
maxHeight: "40vh",
|
|
486
492
|
}),
|
|
487
493
|
}),
|
|
@@ -873,84 +879,113 @@ export const components = ({
|
|
|
873
879
|
indeterminateIcon: <SubtractIcon />,
|
|
874
880
|
},
|
|
875
881
|
styleOverrides: {
|
|
876
|
-
root: ({ theme }) =>
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
882
|
+
root: ({ ownerState, theme }) => {
|
|
883
|
+
const isReadOnly = ownerState?.inputProps?.readOnly;
|
|
884
|
+
|
|
885
|
+
return {
|
|
886
|
+
width: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
887
|
+
minWidth: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
888
|
+
height: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
889
|
+
borderRadius: odysseyTokens.BorderRadiusTight,
|
|
890
|
+
border: `1px solid ${odysseyTokens.HueNeutral500}`,
|
|
891
|
+
padding: 0,
|
|
892
|
+
boxShadow: `0 0 0 0 transparent`,
|
|
893
|
+
transition: theme.transitions.create(
|
|
894
|
+
["border-color", "background-color", "box-shadow"],
|
|
895
|
+
{
|
|
896
|
+
duration: odysseyTokens.TransitionDurationMain,
|
|
897
|
+
},
|
|
898
|
+
),
|
|
899
|
+
|
|
900
|
+
[`.${svgIconClasses.root}`]: {
|
|
901
|
+
color: odysseyTokens.HueNeutralWhite,
|
|
902
|
+
transition: theme.transitions.create(["color"], {
|
|
903
|
+
duration: odysseyTokens.TransitionDurationMain,
|
|
904
|
+
}),
|
|
890
905
|
},
|
|
891
|
-
),
|
|
892
906
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
duration: odysseyTokens.TransitionDurationMain,
|
|
897
|
-
}),
|
|
898
|
-
},
|
|
907
|
+
"&.Mui-checked, &.MuiCheckbox-indeterminate": {
|
|
908
|
+
backgroundColor: odysseyTokens.PalettePrimaryMain,
|
|
909
|
+
borderColor: odysseyTokens.PalettePrimaryMain,
|
|
899
910
|
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
911
|
+
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
912
|
+
backgroundColor: odysseyTokens.PalettePrimaryDark,
|
|
913
|
+
borderColor: odysseyTokens.PalettePrimaryDark,
|
|
914
|
+
},
|
|
915
|
+
},
|
|
903
916
|
|
|
904
917
|
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
905
|
-
backgroundColor:
|
|
906
|
-
borderColor: odysseyTokens.
|
|
918
|
+
backgroundColor: "transparent",
|
|
919
|
+
borderColor: odysseyTokens.HueNeutral900,
|
|
907
920
|
},
|
|
908
|
-
},
|
|
909
921
|
|
|
910
|
-
|
|
911
|
-
backgroundColor: "transparent",
|
|
912
|
-
borderColor: odysseyTokens.HueNeutral900,
|
|
913
|
-
},
|
|
914
|
-
".Mui-error:not(.Mui-valid):hover > &": {
|
|
915
|
-
borderColor: odysseyTokens.BorderColorDangerDark,
|
|
916
|
-
|
|
917
|
-
"&.Mui-checked": {
|
|
918
|
-
backgroundColor: odysseyTokens.PaletteDangerDark,
|
|
922
|
+
".Mui-error:not(.Mui-valid):hover > &": {
|
|
919
923
|
borderColor: odysseyTokens.BorderColorDangerDark,
|
|
920
|
-
},
|
|
921
|
-
},
|
|
922
|
-
".Mui-error:not(.Mui-valid) > &": {
|
|
923
|
-
borderColor: odysseyTokens.BorderColorDangerControl,
|
|
924
924
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
925
|
+
"&.Mui-checked": {
|
|
926
|
+
backgroundColor: odysseyTokens.PaletteDangerDark,
|
|
927
|
+
borderColor: odysseyTokens.BorderColorDangerDark,
|
|
928
|
+
},
|
|
928
929
|
},
|
|
930
|
+
".Mui-error:not(.Mui-valid) > &": {
|
|
931
|
+
borderColor: odysseyTokens.BorderColorDangerControl,
|
|
932
|
+
|
|
933
|
+
"&.Mui-checked": {
|
|
934
|
+
backgroundColor: odysseyTokens.PaletteDangerMain,
|
|
935
|
+
borderColor: odysseyTokens.BorderColorDangerControl,
|
|
936
|
+
},
|
|
929
937
|
|
|
938
|
+
"&.Mui-focusVisible": {
|
|
939
|
+
boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`,
|
|
940
|
+
},
|
|
941
|
+
},
|
|
930
942
|
"&.Mui-focusVisible": {
|
|
931
|
-
|
|
943
|
+
borderColor: odysseyTokens.HueNeutral900,
|
|
944
|
+
boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
|
|
945
|
+
outline: "2px solid transparent",
|
|
946
|
+
outlineOffset: "1px",
|
|
932
947
|
},
|
|
933
|
-
|
|
934
|
-
"&.Mui-focusVisible": {
|
|
935
|
-
borderColor: odysseyTokens.HueNeutral900,
|
|
936
|
-
boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
|
|
937
|
-
outline: "2px solid transparent",
|
|
938
|
-
outlineOffset: "1px",
|
|
939
|
-
},
|
|
940
|
-
"&.Mui-disabled": {
|
|
941
|
-
backgroundColor: odysseyTokens.HueNeutral50,
|
|
942
|
-
borderColor: odysseyTokens.HueNeutral300,
|
|
943
|
-
|
|
944
|
-
".Mui-error:not(.Mui-valid) > &": {
|
|
948
|
+
"&.Mui-disabled": {
|
|
945
949
|
backgroundColor: odysseyTokens.HueNeutral50,
|
|
946
950
|
borderColor: odysseyTokens.HueNeutral300,
|
|
947
|
-
},
|
|
948
951
|
|
|
949
|
-
|
|
950
|
-
|
|
952
|
+
".Mui-error:not(.Mui-valid) > &": {
|
|
953
|
+
backgroundColor: odysseyTokens.HueNeutral50,
|
|
954
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
955
|
+
},
|
|
956
|
+
|
|
957
|
+
[`.${svgIconClasses.root}`]: {
|
|
958
|
+
color: odysseyTokens.HueNeutral300,
|
|
959
|
+
},
|
|
951
960
|
},
|
|
952
|
-
|
|
953
|
-
|
|
961
|
+
|
|
962
|
+
...(isReadOnly && {
|
|
963
|
+
// Override default styles
|
|
964
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
965
|
+
border: `1px solid ${odysseyTokens.HueNeutral300}`,
|
|
966
|
+
cursor: "default",
|
|
967
|
+
|
|
968
|
+
// Override checked/indeterminate styles
|
|
969
|
+
"&.Mui-checked, &.MuiCheckbox-indeterminate": {
|
|
970
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
971
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
972
|
+
|
|
973
|
+
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
974
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
975
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
976
|
+
},
|
|
977
|
+
},
|
|
978
|
+
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
979
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
980
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
981
|
+
},
|
|
982
|
+
// ReadOnly styles for SVG check icon
|
|
983
|
+
[`.${svgIconClasses.root}`]: {
|
|
984
|
+
color: odysseyTokens.HueNeutral700,
|
|
985
|
+
},
|
|
986
|
+
}),
|
|
987
|
+
};
|
|
988
|
+
},
|
|
954
989
|
},
|
|
955
990
|
},
|
|
956
991
|
MuiChip: {
|
|
@@ -2141,6 +2176,13 @@ export const components = ({
|
|
|
2141
2176
|
},
|
|
2142
2177
|
},
|
|
2143
2178
|
|
|
2179
|
+
"&[data-empty='true']": {
|
|
2180
|
+
"&:after": {
|
|
2181
|
+
content: "' '",
|
|
2182
|
+
visibility: "hidden",
|
|
2183
|
+
},
|
|
2184
|
+
},
|
|
2185
|
+
|
|
2144
2186
|
...(!ownerState.disableGutters && {
|
|
2145
2187
|
paddingInline: odysseyTokens.Spacing4,
|
|
2146
2188
|
}),
|
|
@@ -2181,7 +2223,7 @@ export const components = ({
|
|
|
2181
2223
|
},
|
|
2182
2224
|
MuiModal: {
|
|
2183
2225
|
defaultProps: {
|
|
2184
|
-
container: shadowDomElement,
|
|
2226
|
+
container: shadowRootElement || shadowDomElement,
|
|
2185
2227
|
},
|
|
2186
2228
|
},
|
|
2187
2229
|
MuiNativeSelect: {
|
|
@@ -2221,7 +2263,7 @@ export const components = ({
|
|
|
2221
2263
|
},
|
|
2222
2264
|
MuiPopover: {
|
|
2223
2265
|
defaultProps: {
|
|
2224
|
-
container: shadowDomElement,
|
|
2266
|
+
container: shadowRootElement || shadowDomElement,
|
|
2225
2267
|
},
|
|
2226
2268
|
styleOverrides: {
|
|
2227
2269
|
paper: {
|
|
@@ -2234,7 +2276,7 @@ export const components = ({
|
|
|
2234
2276
|
},
|
|
2235
2277
|
MuiPopper: {
|
|
2236
2278
|
defaultProps: {
|
|
2237
|
-
container: shadowDomElement,
|
|
2279
|
+
container: shadowRootElement || shadowDomElement,
|
|
2238
2280
|
},
|
|
2239
2281
|
},
|
|
2240
2282
|
MuiRadio: {
|
|
@@ -2244,83 +2286,105 @@ export const components = ({
|
|
|
2244
2286
|
checkedIcon: <></>,
|
|
2245
2287
|
},
|
|
2246
2288
|
styleOverrides: {
|
|
2247
|
-
root: ({ theme }) =>
|
|
2248
|
-
|
|
2249
|
-
// to visually align input with label
|
|
2250
|
-
insetBlockStart: `${2 / theme.typography.fontSize}rem`,
|
|
2251
|
-
width: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2252
|
-
minWidth: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2253
|
-
height: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2254
|
-
borderRadius: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2255
|
-
borderWidth: odysseyTokens.BorderWidthMain,
|
|
2256
|
-
borderStyle: odysseyTokens.BorderStyleMain,
|
|
2257
|
-
borderColor: odysseyTokens.HueNeutral500,
|
|
2258
|
-
padding: 0,
|
|
2259
|
-
boxShadow: `0 0 0 0 transparent`,
|
|
2260
|
-
transition: theme.transitions.create(
|
|
2261
|
-
["border-color", "background-color", "box-shadow"],
|
|
2262
|
-
{
|
|
2263
|
-
duration: odysseyTokens.TransitionDurationMain,
|
|
2264
|
-
},
|
|
2265
|
-
),
|
|
2266
|
-
|
|
2267
|
-
"&::before": {
|
|
2268
|
-
content: "''",
|
|
2269
|
-
position: "absolute",
|
|
2270
|
-
width: odysseyTokens.Spacing2,
|
|
2271
|
-
height: odysseyTokens.Spacing2,
|
|
2272
|
-
borderRadius: "50%",
|
|
2273
|
-
backgroundColor: "transparent",
|
|
2274
|
-
transition: theme.transitions.create(["background-color"], {
|
|
2275
|
-
duration: odysseyTokens.TransitionDurationMain,
|
|
2276
|
-
}),
|
|
2277
|
-
},
|
|
2289
|
+
root: ({ ownerState, theme }) => {
|
|
2290
|
+
const isReadOnly = ownerState?.inputProps?.readOnly;
|
|
2278
2291
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2292
|
+
return {
|
|
2293
|
+
position: "relative",
|
|
2294
|
+
insetBlockStart: `${2 / theme.typography.fontSize}rem`,
|
|
2295
|
+
width: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2296
|
+
minWidth: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2297
|
+
height: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2298
|
+
borderRadius: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2299
|
+
borderWidth: odysseyTokens.BorderWidthMain,
|
|
2300
|
+
borderStyle: odysseyTokens.BorderStyleMain,
|
|
2301
|
+
borderColor: odysseyTokens.HueNeutral500,
|
|
2302
|
+
padding: 0,
|
|
2303
|
+
boxShadow: `0 0 0 0 transparent`,
|
|
2304
|
+
transition: theme.transitions.create(
|
|
2305
|
+
["border-color", "background-color", "box-shadow"],
|
|
2306
|
+
{
|
|
2307
|
+
duration: odysseyTokens.TransitionDurationMain,
|
|
2308
|
+
},
|
|
2309
|
+
),
|
|
2286
2310
|
"&::before": {
|
|
2287
|
-
|
|
2311
|
+
content: "''",
|
|
2312
|
+
position: "absolute",
|
|
2313
|
+
width: odysseyTokens.Spacing2,
|
|
2314
|
+
height: odysseyTokens.Spacing2,
|
|
2315
|
+
borderRadius: "50%",
|
|
2316
|
+
backgroundColor: "transparent",
|
|
2317
|
+
transition: theme.transitions.create(["background-color"], {
|
|
2318
|
+
duration: odysseyTokens.TransitionDurationMain,
|
|
2319
|
+
}),
|
|
2320
|
+
},
|
|
2321
|
+
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
2322
|
+
backgroundColor: "transparent",
|
|
2323
|
+
borderColor: odysseyTokens.HueNeutral900,
|
|
2324
|
+
},
|
|
2325
|
+
".Mui-error:hover > &": {
|
|
2326
|
+
backgroundColor: "transparent",
|
|
2327
|
+
borderColor: odysseyTokens.BorderColorDangerDark,
|
|
2328
|
+
"&::before": {
|
|
2329
|
+
backgroundColor: odysseyTokens.PaletteDangerDark,
|
|
2330
|
+
},
|
|
2331
|
+
},
|
|
2332
|
+
".Mui-error > &": {
|
|
2333
|
+
borderColor: odysseyTokens.BorderColorDangerControl,
|
|
2334
|
+
"&.Mui-focusVisible": {
|
|
2335
|
+
boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`,
|
|
2336
|
+
},
|
|
2288
2337
|
},
|
|
2289
|
-
},
|
|
2290
|
-
".Mui-error > &": {
|
|
2291
|
-
borderColor: odysseyTokens.BorderColorDangerControl,
|
|
2292
|
-
|
|
2293
2338
|
"&.Mui-focusVisible": {
|
|
2294
|
-
|
|
2339
|
+
borderColor: odysseyTokens.HueNeutral900,
|
|
2340
|
+
boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,
|
|
2341
|
+
outline: "2px solid transparent",
|
|
2342
|
+
outlineOffset: "1px",
|
|
2295
2343
|
},
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
outlineOffset: "1px",
|
|
2302
|
-
},
|
|
2303
|
-
"&.Mui-checked": {
|
|
2304
|
-
position: "relative",
|
|
2305
|
-
|
|
2306
|
-
"&::before": {
|
|
2307
|
-
backgroundColor: odysseyTokens.PalettePrimaryMain,
|
|
2344
|
+
"&.Mui-checked": {
|
|
2345
|
+
position: "relative",
|
|
2346
|
+
"&::before": {
|
|
2347
|
+
backgroundColor: odysseyTokens.PalettePrimaryMain,
|
|
2348
|
+
},
|
|
2308
2349
|
},
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
backgroundColor: odysseyTokens.PaletteDangerMain,
|
|
2312
|
-
},
|
|
2313
|
-
"&.Mui-disabled": {
|
|
2314
|
-
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2315
|
-
borderColor: odysseyTokens.BorderColorDisabled,
|
|
2316
|
-
|
|
2317
|
-
"&.Mui-checked::before": {
|
|
2318
|
-
backgroundColor: odysseyTokens.BorderColorDisabled,
|
|
2350
|
+
".Mui-error > &.Mui-checked::before": {
|
|
2351
|
+
backgroundColor: odysseyTokens.PaletteDangerMain,
|
|
2319
2352
|
},
|
|
2320
|
-
|
|
2321
|
-
|
|
2353
|
+
"&.Mui-disabled": {
|
|
2354
|
+
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2355
|
+
borderColor: odysseyTokens.BorderColorDisabled,
|
|
2356
|
+
"&.Mui-checked::before": {
|
|
2357
|
+
backgroundColor: odysseyTokens.BorderColorDisabled,
|
|
2358
|
+
},
|
|
2359
|
+
},
|
|
2360
|
+
...(isReadOnly && {
|
|
2361
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
2362
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
2363
|
+
cursor: "default",
|
|
2364
|
+
"&::before": {
|
|
2365
|
+
content: "''",
|
|
2366
|
+
position: "absolute",
|
|
2367
|
+
width: odysseyTokens.Spacing2,
|
|
2368
|
+
height: odysseyTokens.Spacing2,
|
|
2369
|
+
borderRadius: "50%",
|
|
2370
|
+
backgroundColor: "transparent",
|
|
2371
|
+
transition: theme.transitions.create(["background-color"], {
|
|
2372
|
+
duration: odysseyTokens.TransitionDurationMain,
|
|
2373
|
+
}),
|
|
2374
|
+
},
|
|
2375
|
+
"&.Mui-checked::before": {
|
|
2376
|
+
backgroundColor: odysseyTokens.HueNeutral700,
|
|
2377
|
+
},
|
|
2378
|
+
[`.${formControlLabelClasses.root}:hover > &`]: {
|
|
2379
|
+
backgroundColor: odysseyTokens.HueNeutral100,
|
|
2380
|
+
borderColor: odysseyTokens.HueNeutral300,
|
|
2381
|
+
},
|
|
2382
|
+
}),
|
|
2383
|
+
};
|
|
2384
|
+
},
|
|
2322
2385
|
},
|
|
2323
2386
|
},
|
|
2387
|
+
|
|
2324
2388
|
MuiSnackbar: {
|
|
2325
2389
|
defaultProps: {
|
|
2326
2390
|
anchorOrigin: {
|
|
@@ -2347,12 +2411,32 @@ export const components = ({
|
|
|
2347
2411
|
},
|
|
2348
2412
|
},
|
|
2349
2413
|
styleOverrides: {
|
|
2350
|
-
|
|
2414
|
+
root: ({ ownerState }) => ({
|
|
2415
|
+
...(ownerState?.inputProps?.readOnly && {
|
|
2416
|
+
"&.MuiInputBase-root": {
|
|
2417
|
+
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2418
|
+
borderColor: odysseyTokens.HueNeutral200,
|
|
2419
|
+
"&:hover": {
|
|
2420
|
+
backgroundColor: odysseyTokens.HueNeutral50,
|
|
2421
|
+
},
|
|
2422
|
+
"&.Mui-focused": {
|
|
2423
|
+
borderColor: odysseyTokens.PalettePrimaryMain,
|
|
2424
|
+
},
|
|
2425
|
+
},
|
|
2426
|
+
}),
|
|
2427
|
+
"& .MuiSelect-icon": {
|
|
2428
|
+
right: "unset",
|
|
2429
|
+
insetInlineEnd: odysseyTokens.Spacing3,
|
|
2430
|
+
color: odysseyTokens.TypographyColorSubordinate,
|
|
2431
|
+
},
|
|
2432
|
+
}),
|
|
2433
|
+
select: ({ ownerState }) => ({
|
|
2351
2434
|
height: "auto",
|
|
2352
2435
|
// We're subtracting a pixel so the total height, including borders, is 40px
|
|
2353
2436
|
paddingBlock: `calc(${odysseyTokens.Spacing3} - ${odysseyTokens.BorderWidthMain})`,
|
|
2354
2437
|
paddingInline: odysseyTokens.Spacing3,
|
|
2355
|
-
|
|
2438
|
+
// Setting min-height to the line-height here to avoid the select shrinking in size when the value is an empty string
|
|
2439
|
+
minHeight: `${odysseyTokens.TypographyLineHeightUi}em`,
|
|
2356
2440
|
|
|
2357
2441
|
"&:focus": {
|
|
2358
2442
|
backgroundColor: "transparent",
|
|
@@ -2369,12 +2453,16 @@ export const components = ({
|
|
|
2369
2453
|
["& .MuiListItemSecondaryAction-root"]: {
|
|
2370
2454
|
display: "none",
|
|
2371
2455
|
},
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2456
|
+
|
|
2457
|
+
...(ownerState?.inputProps?.readOnly && {
|
|
2458
|
+
color: odysseyTokens.HueNeutral700,
|
|
2459
|
+
cursor: "default",
|
|
2460
|
+
"&:focus": {
|
|
2461
|
+
backgroundColor: "transparent",
|
|
2462
|
+
borderColor: odysseyTokens.PalettePrimaryMain,
|
|
2463
|
+
},
|
|
2464
|
+
}),
|
|
2465
|
+
}),
|
|
2378
2466
|
},
|
|
2379
2467
|
},
|
|
2380
2468
|
MuiSvgIcon: {
|
|
@@ -30,14 +30,17 @@ export type DesignTokensOverride = Partial<typeof Tokens>;
|
|
|
30
30
|
export const createOdysseyMuiTheme = ({
|
|
31
31
|
odysseyTokens,
|
|
32
32
|
shadowDomElement,
|
|
33
|
+
shadowRootElement,
|
|
33
34
|
}: {
|
|
34
35
|
odysseyTokens: DesignTokens;
|
|
36
|
+
/** @deprecated Use `shadowRootElement` */
|
|
35
37
|
shadowDomElement?: HTMLElement;
|
|
38
|
+
shadowRootElement?: HTMLElement;
|
|
36
39
|
}) =>
|
|
37
40
|
createTheme({
|
|
38
41
|
components: components({
|
|
39
42
|
odysseyTokens,
|
|
40
|
-
shadowDomElement,
|
|
43
|
+
shadowRootElement: shadowRootElement || shadowDomElement,
|
|
41
44
|
}),
|
|
42
45
|
mixins: mixins({ odysseyTokens }),
|
|
43
46
|
palette: palette({ odysseyTokens }),
|