@okta/odyssey-react-mui 1.25.0 → 1.26.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 +11 -0
- package/dist/Autocomplete.js +30 -191
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Box.js +2 -0
- package/dist/Box.js.map +1 -1
- package/dist/Card.js +1 -0
- package/dist/Card.js.map +1 -1
- package/dist/OdysseyDesignTokensContext.js +3 -2
- package/dist/OdysseyDesignTokensContext.js.map +1 -1
- package/dist/OdysseyProvider.js +9 -7
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/OdysseyThemeProvider.js +33 -13
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/Pagination/Pagination.js +46 -14
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Surface.js +4 -1
- package/dist/Surface.js.map +1 -1
- package/dist/Tag.js +42 -27
- package/dist/Tag.js.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/index.scss +1 -1
- package/dist/labs/AppTile.js +137 -39
- package/dist/labs/AppTile.js.map +1 -1
- package/dist/labs/DataView/CardLayoutContent.js +7 -8
- package/dist/labs/DataView/CardLayoutContent.js.map +1 -1
- package/dist/labs/DataView/DataCard.js +96 -43
- package/dist/labs/DataView/DataCard.js.map +1 -1
- package/dist/labs/DataView/TableLayoutContent.js +3 -2
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/labs/DataView/componentTypes.js.map +1 -1
- package/dist/labs/DataView/index.js.map +1 -1
- package/dist/labs/OdysseyPickers/ComposablePicker.js +113 -0
- package/dist/labs/OdysseyPickers/ComposablePicker.js.map +1 -0
- package/dist/labs/OdysseyPickers/Picker.js +261 -0
- package/dist/labs/OdysseyPickers/Picker.js.map +1 -0
- package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js +132 -0
- package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js.map +1 -0
- package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js +291 -0
- package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -0
- package/dist/{src/createShadowDomElements.d.ts → labs/OdysseyPickers/index.js} +4 -7
- package/dist/labs/OdysseyPickers/index.js.map +1 -0
- package/dist/labs/PageTemplate.js +14 -10
- package/dist/labs/PageTemplate.js.map +1 -1
- package/dist/labs/SideNav/CollapseIcon.js +11 -25
- package/dist/labs/SideNav/CollapseIcon.js.map +1 -1
- package/dist/labs/SideNav/HandleIcon.js +32 -0
- package/dist/labs/SideNav/HandleIcon.js.map +1 -0
- package/dist/labs/{NavAccordion.js → SideNav/NavAccordion.js} +35 -6
- package/dist/labs/SideNav/NavAccordion.js.map +1 -0
- package/dist/labs/SideNav/OktaAura.js +32 -0
- package/dist/labs/SideNav/OktaAura.js.map +1 -0
- package/dist/labs/SideNav/OktaLogo.js +6 -9
- package/dist/labs/SideNav/OktaLogo.js.map +1 -1
- package/dist/labs/SideNav/SideNav.js +239 -169
- package/dist/labs/SideNav/SideNav.js.map +1 -1
- package/dist/labs/SideNav/SideNavFooterContent.js +32 -18
- package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavHeader.js +48 -37
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
- package/dist/labs/SideNav/SideNavItemContent.js +100 -58
- package/dist/labs/SideNav/SideNavItemContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavItemContentContext.js +19 -0
- package/dist/labs/SideNav/SideNavItemContentContext.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js +14 -13
- package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavLogo.js +42 -0
- package/dist/labs/SideNav/SideNavLogo.js.map +1 -0
- package/dist/labs/SideNav/SideNavToggleButton.js +170 -0
- package/dist/labs/SideNav/SideNavToggleButton.js.map +1 -0
- package/dist/labs/SideNav/types.js.map +1 -1
- package/dist/labs/TopNav/TopNav.js +65 -0
- package/dist/labs/TopNav/TopNav.js.map +1 -0
- package/dist/labs/TopNav/TopNavLinksList.js +38 -0
- package/dist/labs/TopNav/TopNavLinksList.js.map +1 -0
- package/dist/labs/TopNav/TopNavListItem.js +132 -0
- package/dist/labs/TopNav/TopNavListItem.js.map +1 -0
- package/dist/labs/TopNav/UserProfile.js +65 -0
- package/dist/labs/TopNav/UserProfile.js.map +1 -0
- package/dist/labs/TopNav/index.js +14 -0
- package/dist/labs/TopNav/index.js.map +1 -0
- package/dist/labs/UiShell/UiShell.js +68 -0
- package/dist/labs/UiShell/UiShell.js.map +1 -0
- package/dist/labs/UiShell/UiShellContent.js +114 -0
- package/dist/labs/UiShell/UiShellContent.js.map +1 -0
- package/dist/labs/UiShell/bufferLatest.js +37 -0
- package/dist/labs/UiShell/bufferLatest.js.map +1 -0
- package/dist/labs/UiShell/createMessageBus.js +30 -0
- package/dist/labs/UiShell/createMessageBus.js.map +1 -0
- package/dist/labs/UiShell/createStore.js +24 -0
- package/dist/labs/UiShell/createStore.js.map +1 -0
- package/dist/labs/UiShell/index.js +15 -0
- package/dist/labs/UiShell/index.js.map +1 -0
- package/dist/labs/UiShell/renderUiShell.js +78 -0
- package/dist/labs/UiShell/renderUiShell.js.map +1 -0
- package/dist/labs/UiShell/useHasUiShell.js +22 -0
- package/dist/labs/UiShell/useHasUiShell.js.map +1 -0
- package/dist/labs/UiShell/useScrollState.js +41 -0
- package/dist/labs/UiShell/useScrollState.js.map +1 -0
- package/dist/labs/index.js +5 -3
- package/dist/labs/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +7 -1
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +5 -3
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +4 -2
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +9 -7
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +4 -2
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +21 -22
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Box.d.ts +3 -1
- package/dist/src/Box.d.ts.map +1 -1
- package/dist/src/Card.d.ts.map +1 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts +5 -4
- package/dist/src/OdysseyDesignTokensContext.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +3 -3
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyThemeProvider.d.ts +10 -12
- 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/Pagination/Pagination.d.ts +21 -7
- package/dist/src/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/Surface.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +5 -2
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/index.d.ts +6 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/AppTile.d.ts +3 -1
- package/dist/src/labs/AppTile.d.ts.map +1 -1
- package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataCard.d.ts +9 -3
- package/dist/src/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DataView/index.d.ts +1 -0
- package/dist/src/labs/DataView/index.d.ts.map +1 -1
- package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts +33 -0
- package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/Picker.d.ts +98 -0
- package/dist/src/labs/OdysseyPickers/Picker.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts +17 -0
- package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts +26 -0
- package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/index.d.ts +15 -0
- package/dist/src/labs/OdysseyPickers/index.d.ts.map +1 -0
- package/dist/src/labs/PageTemplate.d.ts +1 -1
- package/dist/src/labs/PageTemplate.d.ts.map +1 -1
- package/dist/src/labs/SideNav/CollapseIcon.d.ts +1 -4
- package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -1
- package/dist/src/labs/SideNav/HandleIcon.d.ts +14 -0
- package/dist/src/labs/SideNav/HandleIcon.d.ts.map +1 -0
- package/dist/src/labs/{NavAccordion.d.ts → SideNav/NavAccordion.d.ts} +6 -2
- package/dist/src/labs/SideNav/NavAccordion.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaAura.d.ts +14 -0
- package/dist/src/labs/SideNav/OktaAura.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNav.d.ts +2 -1
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavHeader.d.ts +12 -3
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts +2 -3
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts +18 -0
- package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavLogo.d.ts +15 -0
- package/dist/src/labs/SideNav/SideNavLogo.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavToggleButton.d.ts +38 -0
- package/dist/src/labs/SideNav/SideNavToggleButton.d.ts.map +1 -0
- package/dist/src/labs/SideNav/types.d.ts +67 -33
- package/dist/src/labs/SideNav/types.d.ts.map +1 -1
- package/dist/src/labs/TopNav/TopNav.d.ts +31 -0
- package/dist/src/labs/TopNav/TopNav.d.ts.map +1 -0
- package/dist/src/labs/TopNav/TopNavLinksList.d.ts +44 -0
- package/dist/src/labs/TopNav/TopNavLinksList.d.ts.map +1 -0
- package/dist/src/labs/TopNav/TopNavListItem.d.ts +42 -0
- package/dist/src/labs/TopNav/TopNavListItem.d.ts.map +1 -0
- package/dist/src/labs/TopNav/UserProfile.d.ts +29 -0
- package/dist/src/labs/TopNav/UserProfile.d.ts.map +1 -0
- package/dist/src/labs/TopNav/index.d.ts +14 -0
- package/dist/src/labs/TopNav/index.d.ts.map +1 -0
- package/dist/src/labs/UiShell/UiShell.d.ts +33 -0
- package/dist/src/labs/UiShell/UiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/UiShellContent.d.ts +47 -0
- package/dist/src/labs/UiShell/UiShellContent.d.ts.map +1 -0
- package/dist/src/labs/UiShell/bufferLatest.d.ts +31 -0
- package/dist/src/labs/UiShell/bufferLatest.d.ts.map +1 -0
- package/dist/src/labs/UiShell/createMessageBus.d.ts +24 -0
- package/dist/src/labs/UiShell/createMessageBus.d.ts.map +1 -0
- package/dist/src/labs/UiShell/createStore.d.ts +22 -0
- package/dist/src/labs/UiShell/createStore.d.ts.map +1 -0
- package/dist/src/labs/UiShell/index.d.ts +16 -0
- package/dist/src/labs/UiShell/index.d.ts.map +1 -0
- package/dist/src/labs/UiShell/renderUiShell.d.ts +45 -0
- package/dist/src/labs/UiShell/renderUiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/useHasUiShell.d.ts +13 -0
- package/dist/src/labs/UiShell/useHasUiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/useScrollState.d.ts +16 -0
- package/dist/src/labs/UiShell/useScrollState.d.ts.map +1 -0
- package/dist/src/labs/index.d.ts +6 -2
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +6 -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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- 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 +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/test-selectors/querySelector.d.ts +2 -2
- 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 +2 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
- package/dist/src/useAutocomplete.d.ts +29 -0
- package/dist/src/useAutocomplete.d.ts.map +1 -0
- package/dist/src/useContrastMode.d.ts +46 -0
- package/dist/src/useContrastMode.d.ts.map +1 -0
- package/dist/src/web-component/index.d.ts +14 -0
- package/dist/src/web-component/index.d.ts.map +1 -0
- package/dist/src/web-component/renderReactInWebComponent.d.ts +76 -0
- package/dist/src/web-component/renderReactInWebComponent.d.ts.map +1 -0
- package/dist/src/web-component/shadow-dom.d.ts +23 -0
- package/dist/src/web-component/shadow-dom.d.ts.map +1 -0
- package/dist/test-selectors/querySelector.js.map +1 -1
- package/dist/theme/components.js +36 -32
- 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/dist/useAutocomplete.js +105 -0
- package/dist/useAutocomplete.js.map +1 -0
- package/dist/useContrastMode.js +93 -0
- package/dist/useContrastMode.js.map +1 -0
- package/dist/web-component/index.js +14 -0
- package/dist/web-component/index.js.map +1 -0
- package/dist/web-component/renderReactInWebComponent.js +72 -0
- package/dist/web-component/renderReactInWebComponent.js.map +1 -0
- package/dist/{createShadowDomElements.js → web-component/shadow-dom.js} +10 -12
- package/dist/web-component/shadow-dom.js.map +1 -0
- package/jest.config.cjs +1 -1
- package/jest.setup.js +0 -3
- package/package.json +4 -3
- package/src/Autocomplete.tsx +40 -330
- package/src/Box.tsx +4 -2
- package/src/Card.tsx +1 -0
- package/src/OdysseyDesignTokensContext.tsx +6 -3
- package/src/OdysseyProvider.tsx +13 -8
- package/src/OdysseyThemeProvider.test.tsx +209 -0
- package/src/OdysseyThemeProvider.tsx +42 -26
- package/src/Pagination/Pagination.test.tsx +305 -0
- package/src/Pagination/Pagination.tsx +86 -38
- package/src/Surface.tsx +2 -1
- package/src/Tag.tsx +64 -39
- package/src/createUniqueAlphabeticalId.test.ts +1 -1
- package/src/createUniqueId.test.ts +1 -1
- package/src/index.ts +6 -7
- package/src/labs/AppTile.tsx +169 -40
- package/src/labs/DataView/CardLayoutContent.tsx +12 -14
- package/src/labs/DataView/DataCard.tsx +137 -69
- package/src/labs/DataView/DataView.test.tsx +6 -4
- package/src/labs/DataView/TableLayoutContent.tsx +6 -2
- package/src/labs/DataView/componentTypes.ts +1 -1
- package/src/labs/DataView/index.tsx +1 -0
- package/src/labs/OdysseyPickers/ComposablePicker.test.tsx +29 -0
- package/src/labs/OdysseyPickers/ComposablePicker.tsx +188 -0
- package/src/labs/OdysseyPickers/Picker.tsx +381 -0
- package/src/labs/OdysseyPickers/PickerVirtualizationListBox.tsx +191 -0
- package/src/labs/OdysseyPickers/PickerWithOptionAdornment.tsx +429 -0
- package/src/labs/OdysseyPickers/index.ts +15 -0
- package/src/labs/PageTemplate.tsx +18 -10
- package/src/labs/SideNav/CollapseIcon.tsx +14 -28
- package/src/labs/SideNav/HandleIcon.tsx +35 -0
- package/src/labs/{NavAccordion.tsx → SideNav/NavAccordion.tsx} +48 -8
- package/src/labs/SideNav/OktaAura.tsx +35 -0
- package/src/labs/SideNav/OktaLogo.tsx +5 -10
- package/src/labs/SideNav/SideNav.test.tsx +323 -0
- package/src/labs/SideNav/SideNav.tsx +291 -204
- package/src/labs/SideNav/SideNavFooterContent.tsx +36 -28
- package/src/labs/SideNav/SideNavHeader.tsx +62 -45
- package/src/labs/SideNav/SideNavItemContent.tsx +142 -62
- package/src/labs/SideNav/SideNavItemContentContext.tsx +27 -0
- package/src/labs/SideNav/SideNavItemLinkContent.tsx +17 -14
- package/src/labs/SideNav/SideNavLogo.tsx +41 -0
- package/src/labs/SideNav/SideNavToggleButton.tsx +249 -0
- package/src/labs/SideNav/types.ts +72 -33
- package/src/labs/TopNav/TopNav.tsx +95 -0
- package/src/labs/TopNav/TopNavLinksList.tsx +68 -0
- package/src/labs/TopNav/TopNavListItem.tsx +209 -0
- package/src/labs/TopNav/UserProfile.tsx +79 -0
- package/src/labs/TopNav/index.ts +14 -0
- package/src/labs/UiShell/UiShell.test.tsx +284 -0
- package/src/labs/UiShell/UiShell.tsx +109 -0
- package/src/labs/UiShell/UiShellContent.tsx +170 -0
- package/src/labs/UiShell/bufferLatest.test.ts +79 -0
- package/src/labs/UiShell/bufferLatest.ts +64 -0
- package/src/labs/UiShell/createMessageBus.test.ts +115 -0
- package/src/labs/UiShell/createMessageBus.ts +53 -0
- package/src/labs/UiShell/createStore.test.ts +103 -0
- package/src/labs/UiShell/createStore.ts +37 -0
- package/src/labs/UiShell/index.ts +17 -0
- package/src/labs/UiShell/renderUiShell.test.tsx +197 -0
- package/src/labs/UiShell/renderUiShell.tsx +132 -0
- package/src/labs/UiShell/useHasUiShell.ts +25 -0
- package/src/labs/UiShell/useScrollState.ts +56 -0
- package/src/labs/index.ts +10 -3
- package/src/properties/odyssey-react-mui.properties +7 -0
- package/src/properties/translations/odyssey-react-mui_cs.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_da.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_de.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_el.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_es.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_fi.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_fr.properties +4 -3
- package/src/properties/translations/odyssey-react-mui_ht.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_hu.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_id.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_it.properties +3 -2
- package/src/properties/translations/odyssey-react-mui_ja.properties +8 -7
- package/src/properties/translations/odyssey-react-mui_ko.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ms.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_nb.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_pl.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ro.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ru.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_sv.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_th.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_tr.properties +3 -2
- package/src/properties/translations/odyssey-react-mui_uk.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_vi.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +2 -1
- 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/querySelector.ts +1 -1
- package/src/theme/components.tsx +50 -33
- package/src/theme/createOdysseyMuiTheme.ts +4 -3
- package/src/theme/useContrastMode.test.tsx +503 -0
- package/src/useAutocomplete.tsx +183 -0
- package/src/useContrastMode.tsx +149 -0
- package/src/web-component/index.ts +14 -0
- package/src/web-component/renderReactInWebComponent.test.tsx +156 -0
- package/src/web-component/renderReactInWebComponent.ts +153 -0
- package/src/web-component/shadow-dom.test.ts +24 -0
- package/src/{createShadowDomElements.ts → web-component/shadow-dom.ts} +15 -14
- package/dist/ContrastModeProvider.js +0 -86
- package/dist/ContrastModeProvider.js.map +0 -1
- package/dist/createShadowDomElements.js.map +0 -1
- package/dist/labs/NavAccordion.js.map +0 -1
- package/dist/labs/TopNav.js +0 -281
- package/dist/labs/TopNav.js.map +0 -1
- package/dist/src/ContrastModeProvider.d.ts +0 -34
- package/dist/src/ContrastModeProvider.d.ts.map +0 -1
- package/dist/src/createShadowDomElements.d.ts.map +0 -1
- package/dist/src/labs/NavAccordion.d.ts.map +0 -1
- package/dist/src/labs/TopNav.d.ts +0 -78
- package/dist/src/labs/TopNav.d.ts.map +0 -1
- package/src/ContrastModeProvider.tsx +0 -131
- package/src/labs/TopNav.tsx +0 -396
|
@@ -10,44 +10,42 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import styled from "@emotion/styled";
|
|
13
|
+
import styled, { CSSObject } from "@emotion/styled";
|
|
14
14
|
import {
|
|
15
15
|
memo,
|
|
16
16
|
useMemo,
|
|
17
17
|
useState,
|
|
18
18
|
useCallback,
|
|
19
|
-
KeyboardEvent,
|
|
20
19
|
useRef,
|
|
21
20
|
useEffect,
|
|
21
|
+
KeyboardEventHandler,
|
|
22
22
|
} from "react";
|
|
23
|
+
import { Skeleton } from "@mui/material";
|
|
24
|
+
import { useTranslation } from "react-i18next";
|
|
23
25
|
|
|
24
|
-
import {
|
|
25
|
-
import { NavAccordion } from "../NavAccordion";
|
|
26
|
+
import { NavAccordion } from "./NavAccordion";
|
|
26
27
|
import {
|
|
27
28
|
DesignTokens,
|
|
28
29
|
useOdysseyDesignTokens,
|
|
29
30
|
} from "../../OdysseyDesignTokensContext";
|
|
31
|
+
import { OdysseyThemeProvider } from "../../OdysseyThemeProvider";
|
|
30
32
|
import type { SideNavProps } from "./types";
|
|
31
|
-
import { OktaLogo } from "./OktaLogo";
|
|
32
33
|
import { SideNavHeader } from "./SideNavHeader";
|
|
33
34
|
import {
|
|
34
35
|
SideNavItemContent,
|
|
35
|
-
|
|
36
|
+
StyledSideNavListItem,
|
|
36
37
|
} from "./SideNavItemContent";
|
|
37
38
|
import { SideNavFooterContent } from "./SideNavFooterContent";
|
|
39
|
+
import { SideNavItemContentContext } from "./SideNavItemContentContext";
|
|
40
|
+
import { SideNavToggleButton } from "./SideNavToggleButton";
|
|
38
41
|
|
|
39
42
|
export const DEFAULT_SIDE_NAV_WIDTH = "300px";
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
display: "flex",
|
|
45
|
-
height: "100%",
|
|
46
|
-
maxWidth: expandedWidth,
|
|
47
|
-
overflow: "hidden",
|
|
48
|
-
}));
|
|
44
|
+
// The side nav collapse icon is placed absolutely from the top (Logo container + nav header height)
|
|
45
|
+
// to align it in the middle of the nav header text
|
|
46
|
+
export const SIDENAV_COLLAPSE_ICON_POSITION = "77px";
|
|
49
47
|
|
|
50
|
-
const
|
|
48
|
+
const StyledCollapsibleContent = styled("div", {
|
|
51
49
|
shouldForwardProp: (prop) =>
|
|
52
50
|
prop !== "odysseyDesignTokens" && prop !== "isSideNavCollapsed",
|
|
53
51
|
})(
|
|
@@ -58,43 +56,69 @@ const SideNavCollapsedContainer = styled("div", {
|
|
|
58
56
|
odysseyDesignTokens: DesignTokens;
|
|
59
57
|
isSideNavCollapsed: boolean;
|
|
60
58
|
}) => ({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
transitionDuration: odysseyDesignTokens.TransitionDurationMain,
|
|
59
|
+
position: "relative",
|
|
60
|
+
display: "inline-grid",
|
|
61
|
+
gridTemplateColumns: isSideNavCollapsed ? 0 : DEFAULT_SIDE_NAV_WIDTH,
|
|
62
|
+
gridTemplateRows: "max-content 1fr max-content",
|
|
63
|
+
minWidth: isSideNavCollapsed ? 0 : DEFAULT_SIDE_NAV_WIDTH,
|
|
64
|
+
height: "100%",
|
|
65
|
+
transition: `grid-template-columns ${odysseyDesignTokens.TransitionDurationMain}, opacity 300ms`,
|
|
69
66
|
transitionTimingFunction: odysseyDesignTokens.TransitionTimingMain,
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
opacity: isSideNavCollapsed ? 0 : 1,
|
|
70
69
|
}),
|
|
71
70
|
);
|
|
72
71
|
|
|
73
|
-
const
|
|
72
|
+
const StyledSideNav = styled("nav", {
|
|
74
73
|
shouldForwardProp: (prop) =>
|
|
75
|
-
prop !== "odysseyDesignTokens" &&
|
|
76
|
-
prop !== "isSideNavCollapsed" &&
|
|
77
|
-
prop !== "expandedWidth",
|
|
74
|
+
prop !== "odysseyDesignTokens" && prop !== "isSideNavCollapsed",
|
|
78
75
|
})(
|
|
79
76
|
({
|
|
80
77
|
odysseyDesignTokens,
|
|
81
78
|
isSideNavCollapsed,
|
|
82
|
-
expandedWidth,
|
|
83
79
|
}: {
|
|
84
80
|
odysseyDesignTokens: DesignTokens;
|
|
85
81
|
isSideNavCollapsed: boolean;
|
|
86
|
-
expandedWidth: string;
|
|
87
82
|
}) => ({
|
|
83
|
+
position: "relative",
|
|
84
|
+
display: "inline-block",
|
|
85
|
+
height: "100%",
|
|
88
86
|
backgroundColor: odysseyDesignTokens.HueNeutralWhite,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
|
|
88
|
+
"&::after": {
|
|
89
|
+
backgroundColor: odysseyDesignTokens.HueNeutral200,
|
|
90
|
+
content: "''",
|
|
91
|
+
height: "100%",
|
|
92
|
+
opacity: 0,
|
|
93
|
+
position: "absolute",
|
|
94
|
+
right: 0,
|
|
95
|
+
top: 0,
|
|
96
|
+
transform: `translateX(0)`,
|
|
97
|
+
transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}, transform ${odysseyDesignTokens.TransitionDurationMain}`,
|
|
98
|
+
width: odysseyDesignTokens.Spacing2,
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
"&:has([data-sidenav-toggle='true']:hover), &:has([data-sidenav-toggle='true']:focus)":
|
|
102
|
+
{
|
|
103
|
+
...(isSideNavCollapsed && {
|
|
104
|
+
"&::after": {
|
|
105
|
+
opacity: 1,
|
|
106
|
+
transform: `translateX(100%)`,
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
"[data-sidenav-toggle='true']": {
|
|
110
|
+
transform: `translate3d(calc(100% + ${odysseyDesignTokens.Spacing3}), 0, 0)`,
|
|
111
|
+
},
|
|
112
|
+
}),
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
"[data-sidenav-toggle='true']": {
|
|
116
|
+
position: "absolute",
|
|
117
|
+
top: SIDENAV_COLLAPSE_ICON_POSITION,
|
|
118
|
+
right: 0,
|
|
119
|
+
transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,
|
|
120
|
+
transform: `translate3d(100%, 0, 0)`,
|
|
121
|
+
},
|
|
98
122
|
}),
|
|
99
123
|
);
|
|
100
124
|
|
|
@@ -109,36 +133,43 @@ const SideNavHeaderContainer = styled("div", {
|
|
|
109
133
|
hasContentScrolled: boolean;
|
|
110
134
|
odysseyDesignTokens: DesignTokens;
|
|
111
135
|
}) => ({
|
|
112
|
-
|
|
113
|
-
top: 0,
|
|
136
|
+
flexShrink: 0,
|
|
114
137
|
// The bottom border should appear only if the scrollable region has been scrolled
|
|
115
|
-
...(hasContentScrolled &&
|
|
116
|
-
|
|
117
|
-
|
|
138
|
+
...(hasContentScrolled &&
|
|
139
|
+
({
|
|
140
|
+
borderBottom: `${odysseyDesignTokens.BorderWidthMain} ${odysseyDesignTokens.BorderStyleMain} ${odysseyDesignTokens.HueNeutral50}`,
|
|
141
|
+
} satisfies CSSObject)),
|
|
118
142
|
}),
|
|
119
143
|
);
|
|
120
144
|
|
|
121
|
-
const SideNavListContainer = styled
|
|
145
|
+
const SideNavListContainer = styled("ul")(() => ({
|
|
122
146
|
padding: 0,
|
|
123
147
|
listStyle: "none",
|
|
124
148
|
listStyleType: "none",
|
|
125
|
-
});
|
|
149
|
+
}));
|
|
126
150
|
|
|
127
|
-
const SideNavScrollableContainer = styled
|
|
128
|
-
|
|
151
|
+
const SideNavScrollableContainer = styled("div", {
|
|
152
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
153
|
+
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
154
|
+
flex: "1 1 100%",
|
|
129
155
|
overflowY: "auto",
|
|
130
|
-
|
|
156
|
+
paddingInline: odysseyDesignTokens.Spacing2,
|
|
157
|
+
}));
|
|
158
|
+
|
|
159
|
+
const SectionHeaderContainer = styled("li", {
|
|
160
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
161
|
+
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
162
|
+
paddingBlock: odysseyDesignTokens.Spacing3,
|
|
163
|
+
paddingInline: odysseyDesignTokens.Spacing4,
|
|
164
|
+
}));
|
|
131
165
|
|
|
132
|
-
const SectionHeader = styled("
|
|
166
|
+
const SectionHeader = styled("h3", {
|
|
133
167
|
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
134
168
|
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
135
169
|
fontFamily: odysseyDesignTokens.TypographyFamilyHeading,
|
|
136
170
|
fontSize: odysseyDesignTokens.TypographySizeOverline,
|
|
137
171
|
fontWeight: odysseyDesignTokens.TypographyWeightHeadingBold,
|
|
138
172
|
color: odysseyDesignTokens.HueNeutral600,
|
|
139
|
-
paddingTop: odysseyDesignTokens.Spacing3,
|
|
140
|
-
paddingBottom: odysseyDesignTokens.Spacing3,
|
|
141
|
-
paddingLeft: odysseyDesignTokens.Spacing4,
|
|
142
173
|
textTransform: "uppercase",
|
|
143
174
|
}));
|
|
144
175
|
|
|
@@ -153,15 +184,14 @@ const SideNavFooter = styled("div", {
|
|
|
153
184
|
isContentScrollable: boolean;
|
|
154
185
|
odysseyDesignTokens: DesignTokens;
|
|
155
186
|
}) => ({
|
|
156
|
-
|
|
157
|
-
bottom: 0,
|
|
158
|
-
paddingTop: odysseyDesignTokens.Spacing2,
|
|
187
|
+
flexShrink: 0,
|
|
159
188
|
transitionProperty: "box-shadow",
|
|
160
189
|
transitionDuration: odysseyDesignTokens.TransitionDurationMain,
|
|
161
190
|
transitionTiming: odysseyDesignTokens.TransitionTimingMain,
|
|
191
|
+
backgroundColor: odysseyDesignTokens.HueNeutralWhite,
|
|
162
192
|
// The box shadow should appear above the footer only if the scrollable region has overflow
|
|
163
193
|
...(isContentScrollable && {
|
|
164
|
-
boxShadow:
|
|
194
|
+
boxShadow: "0px -8px 8px -8px rgba(39, 39, 39, 0.08)",
|
|
165
195
|
}),
|
|
166
196
|
}),
|
|
167
197
|
);
|
|
@@ -169,45 +199,74 @@ const SideNavFooter = styled("div", {
|
|
|
169
199
|
const SideNavFooterItemsContainer = styled("div", {
|
|
170
200
|
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
171
201
|
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
172
|
-
|
|
173
|
-
|
|
202
|
+
paddingBlock: odysseyDesignTokens.Spacing4,
|
|
203
|
+
// paddingBlockEnd: odysseyDesignTokens.Spacing4,
|
|
204
|
+
paddingInline: odysseyDesignTokens.Spacing5,
|
|
174
205
|
display: "flex",
|
|
175
|
-
justifyContent: "center",
|
|
176
206
|
flexWrap: "wrap",
|
|
177
207
|
alignItems: "center",
|
|
178
208
|
fontSize: odysseyDesignTokens.TypographySizeOverline,
|
|
179
|
-
|
|
209
|
+
|
|
210
|
+
a: {
|
|
180
211
|
color: `${odysseyDesignTokens.TypographyColorHeading} !important`,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
212
|
+
|
|
213
|
+
"&:hover": {
|
|
214
|
+
textDecoration: "none",
|
|
215
|
+
},
|
|
216
|
+
"&:visited": {
|
|
217
|
+
color: odysseyDesignTokens.TypographyColorHeading,
|
|
218
|
+
},
|
|
187
219
|
},
|
|
188
220
|
}));
|
|
189
221
|
|
|
222
|
+
const LoadingItemContainer = styled("div", {
|
|
223
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
224
|
+
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
225
|
+
alignItems: "center",
|
|
226
|
+
display: "flex",
|
|
227
|
+
gap: odysseyDesignTokens.Spacing2,
|
|
228
|
+
paddingBlock: odysseyDesignTokens.Spacing2,
|
|
229
|
+
paddingInline: odysseyDesignTokens.Spacing4,
|
|
230
|
+
}));
|
|
231
|
+
|
|
190
232
|
const getHasScrollableContent = (scrollableContainer: HTMLElement) =>
|
|
191
233
|
scrollableContainer.scrollHeight > scrollableContainer.clientHeight;
|
|
192
234
|
|
|
235
|
+
const LoadingItem = () => {
|
|
236
|
+
const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();
|
|
237
|
+
return (
|
|
238
|
+
<LoadingItemContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
239
|
+
<Skeleton
|
|
240
|
+
variant="circular"
|
|
241
|
+
width={odysseyDesignTokens.Spacing4}
|
|
242
|
+
height={odysseyDesignTokens.Spacing4}
|
|
243
|
+
/>
|
|
244
|
+
<Skeleton variant="rounded" width="100%" />
|
|
245
|
+
</LoadingItemContainer>
|
|
246
|
+
);
|
|
247
|
+
};
|
|
248
|
+
|
|
193
249
|
const SideNav = ({
|
|
194
|
-
|
|
250
|
+
appName,
|
|
251
|
+
footerComponent,
|
|
252
|
+
footerItems,
|
|
253
|
+
hasCustomFooter,
|
|
195
254
|
isCollapsible,
|
|
255
|
+
isCompact,
|
|
256
|
+
isLoading,
|
|
257
|
+
logoProps,
|
|
196
258
|
onCollapse,
|
|
197
259
|
onExpand,
|
|
198
260
|
sideNavItems,
|
|
199
|
-
expandedWidth = DEFAULT_SIDE_NAV_WIDTH,
|
|
200
|
-
footerItems,
|
|
201
|
-
footerComponent,
|
|
202
|
-
logo,
|
|
203
261
|
}: SideNavProps) => {
|
|
204
262
|
const [isSideNavCollapsed, setSideNavCollapsed] = useState(false);
|
|
205
|
-
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
206
263
|
const [isContentScrollable, setIsContentScrollable] = useState(false);
|
|
207
264
|
const [hasContentScrolled, setHasContentScrolled] = useState(false);
|
|
208
265
|
const scrollableContentRef = useRef<HTMLUListElement>(null);
|
|
209
266
|
const resizeObserverRef = useRef<ResizeObserver | null>(null);
|
|
210
267
|
const intersectionObserverRef = useRef<IntersectionObserver | null>(null);
|
|
268
|
+
const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();
|
|
269
|
+
const { t } = useTranslation();
|
|
211
270
|
|
|
212
271
|
useEffect(() => {
|
|
213
272
|
const updateIsContentScrollable = () => {
|
|
@@ -267,10 +326,14 @@ const SideNav = ({
|
|
|
267
326
|
},
|
|
268
327
|
);
|
|
269
328
|
}
|
|
329
|
+
|
|
270
330
|
if (intersectionObserverRef.current && scrollableContentRef.current) {
|
|
271
|
-
const
|
|
272
|
-
const
|
|
273
|
-
|
|
331
|
+
const ulElement = scrollableContentRef.current;
|
|
332
|
+
const [liElement] = Array.from(ulElement?.children || []);
|
|
333
|
+
|
|
334
|
+
if (liElement) {
|
|
335
|
+
intersectionObserverRef.current.observe(liElement);
|
|
336
|
+
}
|
|
274
337
|
}
|
|
275
338
|
|
|
276
339
|
// Cleanup when unmounted:
|
|
@@ -285,7 +348,7 @@ const SideNav = ({
|
|
|
285
348
|
}
|
|
286
349
|
cancelAnimationFrame(resizeObserverDebounceTimer); // Ensure timer is cleared on component unmount
|
|
287
350
|
};
|
|
288
|
-
}, []);
|
|
351
|
+
}, [sideNavItems]);
|
|
289
352
|
|
|
290
353
|
const scrollIntoViewRef = useRef<HTMLLIElement>(null);
|
|
291
354
|
/**
|
|
@@ -328,155 +391,179 @@ const SideNav = ({
|
|
|
328
391
|
[firstSideNavItemIdWithIsSelected],
|
|
329
392
|
);
|
|
330
393
|
|
|
394
|
+
const sideNavItemContentProviderValue = useMemo(
|
|
395
|
+
() => ({ isCompact, depth: 1 }),
|
|
396
|
+
[isCompact],
|
|
397
|
+
);
|
|
398
|
+
|
|
331
399
|
const processedSideNavItems = useMemo(
|
|
332
400
|
() =>
|
|
333
401
|
sideNavItems.map((item) => ({
|
|
334
402
|
...item,
|
|
335
|
-
children: item.children?.map((childProps) =>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
403
|
+
children: item.children?.map((childProps) => {
|
|
404
|
+
return (
|
|
405
|
+
<SideNavItemContentContext.Provider
|
|
406
|
+
value={{ ...sideNavItemContentProviderValue, depth: 2 }}
|
|
407
|
+
key={childProps.id}
|
|
408
|
+
>
|
|
409
|
+
<SideNavItemContent
|
|
410
|
+
{...childProps}
|
|
411
|
+
key={childProps.id}
|
|
412
|
+
scrollRef={getRefIfThisIsFirstNodeWithIsSelected(childProps.id)}
|
|
413
|
+
/>
|
|
414
|
+
</SideNavItemContentContext.Provider>
|
|
415
|
+
);
|
|
416
|
+
}),
|
|
342
417
|
})),
|
|
343
|
-
[
|
|
418
|
+
[
|
|
419
|
+
getRefIfThisIsFirstNodeWithIsSelected,
|
|
420
|
+
sideNavItems,
|
|
421
|
+
sideNavItemContentProviderValue,
|
|
422
|
+
],
|
|
344
423
|
);
|
|
345
424
|
|
|
346
|
-
const sideNavCollapseHandler = useCallback(() => {
|
|
347
|
-
setSideNavCollapsed(!isSideNavCollapsed);
|
|
348
|
-
onCollapse?.();
|
|
349
|
-
}, [isSideNavCollapsed, setSideNavCollapsed, onCollapse]);
|
|
350
|
-
|
|
351
425
|
const sideNavExpandClickHandler = useCallback(() => {
|
|
426
|
+
isSideNavCollapsed ? onExpand?.() : onCollapse?.();
|
|
352
427
|
setSideNavCollapsed(!isSideNavCollapsed);
|
|
353
|
-
|
|
354
|
-
}, [isSideNavCollapsed, setSideNavCollapsed, onExpand]);
|
|
428
|
+
}, [isSideNavCollapsed, setSideNavCollapsed, onExpand, onCollapse]);
|
|
355
429
|
|
|
356
|
-
const sideNavExpandKeyHandler = useCallback
|
|
357
|
-
|
|
430
|
+
const sideNavExpandKeyHandler = useCallback<
|
|
431
|
+
KeyboardEventHandler<HTMLButtonElement>
|
|
432
|
+
>(
|
|
433
|
+
(event) => {
|
|
358
434
|
if (event?.key === "Enter" || event?.code === "Space") {
|
|
359
435
|
event.preventDefault();
|
|
360
|
-
|
|
361
|
-
onExpand?.();
|
|
436
|
+
sideNavExpandClickHandler();
|
|
362
437
|
}
|
|
363
438
|
},
|
|
364
|
-
[
|
|
365
|
-
);
|
|
366
|
-
|
|
367
|
-
const expandLeftIconStyles = useMemo(
|
|
368
|
-
() => ({
|
|
369
|
-
fontSize: "1em",
|
|
370
|
-
margin: `0 ${odysseyDesignTokens.Spacing1}`,
|
|
371
|
-
}),
|
|
372
|
-
[odysseyDesignTokens],
|
|
439
|
+
[sideNavExpandClickHandler],
|
|
373
440
|
);
|
|
374
441
|
|
|
375
442
|
return (
|
|
376
|
-
<
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
aria-label={navHeaderText}
|
|
395
|
-
>
|
|
396
|
-
<SideNavHeaderContainer
|
|
443
|
+
<StyledSideNav
|
|
444
|
+
aria-label={t("navigation.label")}
|
|
445
|
+
id="side-nav-expandable"
|
|
446
|
+
isSideNavCollapsed={isSideNavCollapsed}
|
|
447
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
448
|
+
>
|
|
449
|
+
{isCollapsible && (
|
|
450
|
+
<SideNavToggleButton
|
|
451
|
+
ariaControls="side-nav-expandable"
|
|
452
|
+
isSideNavCollapsed={isSideNavCollapsed}
|
|
453
|
+
onClick={sideNavExpandClickHandler}
|
|
454
|
+
onKeyDown={sideNavExpandKeyHandler}
|
|
455
|
+
/>
|
|
456
|
+
)}
|
|
457
|
+
<OdysseyThemeProvider>
|
|
458
|
+
<StyledCollapsibleContent
|
|
459
|
+
data-se="collapsible-region"
|
|
460
|
+
isSideNavCollapsed={isSideNavCollapsed}
|
|
397
461
|
odysseyDesignTokens={odysseyDesignTokens}
|
|
398
|
-
hasContentScrolled={hasContentScrolled}
|
|
399
462
|
>
|
|
400
|
-
<
|
|
401
|
-
logo={logo || <OktaLogo />}
|
|
402
|
-
navHeaderText={navHeaderText}
|
|
403
|
-
isCollapsible={isCollapsible}
|
|
404
|
-
onCollapse={sideNavCollapseHandler}
|
|
405
|
-
/>
|
|
406
|
-
</SideNavHeaderContainer>
|
|
407
|
-
<SideNavScrollableContainer data-se="scrollable-region">
|
|
408
|
-
<SideNavListContainer ref={scrollableContentRef}>
|
|
409
|
-
{processedSideNavItems?.map((item) => {
|
|
410
|
-
const {
|
|
411
|
-
id,
|
|
412
|
-
label,
|
|
413
|
-
isSectionHeader,
|
|
414
|
-
startIcon,
|
|
415
|
-
children,
|
|
416
|
-
isDefaultExpanded,
|
|
417
|
-
isDisabled,
|
|
418
|
-
isExpanded,
|
|
419
|
-
} = item;
|
|
420
|
-
|
|
421
|
-
if (isSectionHeader) {
|
|
422
|
-
return (
|
|
423
|
-
<SectionHeader
|
|
424
|
-
id={id}
|
|
425
|
-
key={id}
|
|
426
|
-
odysseyDesignTokens={odysseyDesignTokens}
|
|
427
|
-
>
|
|
428
|
-
{label}
|
|
429
|
-
</SectionHeader>
|
|
430
|
-
);
|
|
431
|
-
} else if (children) {
|
|
432
|
-
return (
|
|
433
|
-
<SideNavListItemContainer
|
|
434
|
-
id={id}
|
|
435
|
-
key={id}
|
|
436
|
-
odysseyDesignTokens={odysseyDesignTokens}
|
|
437
|
-
>
|
|
438
|
-
<NavAccordion
|
|
439
|
-
label={label}
|
|
440
|
-
isDefaultExpanded={isDefaultExpanded}
|
|
441
|
-
isExpanded={isExpanded}
|
|
442
|
-
startIcon={startIcon}
|
|
443
|
-
isDisabled={isDisabled}
|
|
444
|
-
>
|
|
445
|
-
<SideNavListContainer id={`${id}-list`}>
|
|
446
|
-
{children}
|
|
447
|
-
</SideNavListContainer>
|
|
448
|
-
</NavAccordion>
|
|
449
|
-
</SideNavListItemContainer>
|
|
450
|
-
);
|
|
451
|
-
} else {
|
|
452
|
-
return (
|
|
453
|
-
<SideNavItemContent
|
|
454
|
-
key={item.id}
|
|
455
|
-
scrollRef={getRefIfThisIsFirstNodeWithIsSelected(item.id)}
|
|
456
|
-
{...item}
|
|
457
|
-
/>
|
|
458
|
-
);
|
|
459
|
-
}
|
|
460
|
-
})}
|
|
461
|
-
</SideNavListContainer>
|
|
462
|
-
</SideNavScrollableContainer>
|
|
463
|
-
{(footerItems || footerComponent) && (
|
|
464
|
-
<SideNavFooter
|
|
463
|
+
<SideNavHeaderContainer
|
|
465
464
|
odysseyDesignTokens={odysseyDesignTokens}
|
|
466
|
-
|
|
465
|
+
hasContentScrolled={hasContentScrolled}
|
|
467
466
|
>
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
467
|
+
<SideNavHeader
|
|
468
|
+
appName={appName}
|
|
469
|
+
isLoading={isLoading}
|
|
470
|
+
logoProps={logoProps}
|
|
471
|
+
/>
|
|
472
|
+
</SideNavHeaderContainer>
|
|
473
|
+
<SideNavScrollableContainer
|
|
474
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
475
|
+
data-se="scrollable-region"
|
|
476
|
+
>
|
|
477
|
+
<SideNavListContainer role="list" ref={scrollableContentRef}>
|
|
478
|
+
{isLoading
|
|
479
|
+
? [...Array(6)].map((_, index) => <LoadingItem key={index} />)
|
|
480
|
+
: processedSideNavItems?.map((item) => {
|
|
481
|
+
const {
|
|
482
|
+
id,
|
|
483
|
+
label,
|
|
484
|
+
isSectionHeader,
|
|
485
|
+
startIcon,
|
|
486
|
+
children,
|
|
487
|
+
isDefaultExpanded,
|
|
488
|
+
isDisabled,
|
|
489
|
+
isExpanded,
|
|
490
|
+
} = item;
|
|
491
|
+
|
|
492
|
+
if (isSectionHeader) {
|
|
493
|
+
return (
|
|
494
|
+
<SectionHeaderContainer
|
|
495
|
+
id={id}
|
|
496
|
+
key={id}
|
|
497
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
498
|
+
>
|
|
499
|
+
<SectionHeader
|
|
500
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
501
|
+
>
|
|
502
|
+
{label}
|
|
503
|
+
</SectionHeader>
|
|
504
|
+
</SectionHeaderContainer>
|
|
505
|
+
);
|
|
506
|
+
} else if (children) {
|
|
507
|
+
return (
|
|
508
|
+
<StyledSideNavListItem
|
|
509
|
+
id={id}
|
|
510
|
+
key={id}
|
|
511
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
512
|
+
disabled={isDisabled}
|
|
513
|
+
aria-disabled={isDisabled}
|
|
514
|
+
>
|
|
515
|
+
<NavAccordion
|
|
516
|
+
label={label}
|
|
517
|
+
isCompact={isCompact}
|
|
518
|
+
isDefaultExpanded={isDefaultExpanded}
|
|
519
|
+
isExpanded={isExpanded}
|
|
520
|
+
startIcon={startIcon}
|
|
521
|
+
isDisabled={isDisabled}
|
|
522
|
+
>
|
|
523
|
+
<SideNavListContainer id={`${id}-list`} role="list">
|
|
524
|
+
{children}
|
|
525
|
+
</SideNavListContainer>
|
|
526
|
+
</NavAccordion>
|
|
527
|
+
</StyledSideNavListItem>
|
|
528
|
+
);
|
|
529
|
+
} else {
|
|
530
|
+
return (
|
|
531
|
+
<SideNavItemContentContext.Provider
|
|
532
|
+
key={item.id}
|
|
533
|
+
value={sideNavItemContentProviderValue}
|
|
534
|
+
>
|
|
535
|
+
<SideNavItemContent
|
|
536
|
+
{...item}
|
|
537
|
+
key={item.id}
|
|
538
|
+
scrollRef={getRefIfThisIsFirstNodeWithIsSelected(
|
|
539
|
+
item.id,
|
|
540
|
+
)}
|
|
541
|
+
/>
|
|
542
|
+
</SideNavItemContentContext.Provider>
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
})}
|
|
546
|
+
</SideNavListContainer>
|
|
547
|
+
</SideNavScrollableContainer>
|
|
548
|
+
{!isLoading && (footerItems || hasCustomFooter) && (
|
|
549
|
+
<SideNavFooter
|
|
550
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
551
|
+
isContentScrollable={isContentScrollable}
|
|
552
|
+
>
|
|
553
|
+
{hasCustomFooter
|
|
554
|
+
? footerComponent
|
|
555
|
+
: footerItems && (
|
|
556
|
+
<SideNavFooterItemsContainer
|
|
557
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
558
|
+
>
|
|
559
|
+
<SideNavFooterContent footerItems={footerItems} />
|
|
560
|
+
</SideNavFooterItemsContainer>
|
|
561
|
+
)}
|
|
562
|
+
</SideNavFooter>
|
|
563
|
+
)}
|
|
564
|
+
</StyledCollapsibleContent>
|
|
565
|
+
</OdysseyThemeProvider>
|
|
566
|
+
</StyledSideNav>
|
|
480
567
|
);
|
|
481
568
|
};
|
|
482
569
|
|