@okta/odyssey-react-mui 1.21.2 → 1.22.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 +15 -0
- package/dist/Autocomplete.js +76 -38
- package/dist/Autocomplete.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 +2 -2
- package/dist/DataTable/useScrollIndication.js.map +1 -1
- package/dist/Field.js +3 -1
- package/dist/Field.js.map +1 -1
- package/dist/OdysseyCacheProvider.js +4 -3
- package/dist/OdysseyCacheProvider.js.map +1 -1
- package/dist/OdysseyProvider.js +6 -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 +34 -7
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +17 -5
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.js +53 -31
- package/dist/Select.js.map +1 -1
- package/dist/ToastStack.js.map +1 -1
- package/dist/{createShadowRootElement.js → createShadowDomElements.js} +22 -6
- package/dist/createShadowDomElements.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.scss +5 -5
- 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 +25 -15
- 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} +17 -17
- 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/SideNav/CollapseIcon.js +44 -0
- package/dist/labs/SideNav/CollapseIcon.js.map +1 -0
- package/dist/labs/SideNav/SideNav.js +246 -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 +58 -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/Switch.js +70 -16
- package/dist/labs/Switch.js.map +1 -1
- package/dist/labs/index.js +3 -2
- package/dist/labs/index.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.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/Field.d.ts +3 -2
- package/dist/src/Field.d.ts.map +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/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/Select.d.ts +2 -2
- package/dist/src/Select.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/index.d.ts +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} +7 -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 +11 -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/SideNav/CollapseIcon.d.ts +17 -0
- package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNav.d.ts +15 -0
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts +17 -0
- 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} +31 -33
- package/dist/src/labs/SideNav/types.d.ts.map +1 -0
- package/dist/src/labs/Switch.d.ts +5 -1
- package/dist/src/labs/Switch.d.ts.map +1 -1
- package/dist/src/labs/index.d.ts +2 -1
- package/dist/src/labs/index.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/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/theme/components.js +232 -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/package.json +3 -4
- package/src/Autocomplete.tsx +108 -45
- package/src/Checkbox.tsx +39 -9
- package/src/CheckboxGroup.tsx +20 -4
- package/src/DataTable/DataTable.tsx +24 -1
- package/src/DataTable/useScrollIndication.tsx +2 -2
- package/src/Field.tsx +5 -2
- package/src/OdysseyCacheProvider.tsx +18 -4
- package/src/OdysseyProvider.tsx +6 -3
- package/src/OdysseyThemeProvider.tsx +6 -2
- package/src/Radio.tsx +42 -13
- package/src/RadioGroup.tsx +26 -7
- package/src/Select.tsx +78 -45
- package/src/ToastStack.tsx +2 -2
- package/src/{createShadowRootElement.ts → createShadowDomElements.ts} +24 -5
- package/src/index.ts +1 -1
- 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/{DataComponents → DataView}/DataView.tsx +46 -17
- package/src/labs/{DataComponents → DataView}/DetailPanel.tsx +2 -2
- package/src/labs/{DataComponents/TableContent.tsx → DataView/TableLayoutContent.tsx} +31 -26
- package/src/labs/{DataComponents → DataView}/TableSettings.tsx +5 -4
- package/src/labs/{DataComponents → DataView}/componentTypes.ts +11 -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/SideNav/CollapseIcon.tsx +48 -0
- package/src/labs/SideNav/SideNav.tsx +350 -0
- package/src/labs/SideNav/SideNavFooterContent.tsx +64 -0
- package/src/labs/SideNav/SideNavHeader.tsx +65 -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 +125 -0
- package/src/labs/Switch.tsx +85 -31
- package/src/labs/index.ts +3 -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_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/theme/components.tsx +240 -150
- package/src/theme/createOdysseyMuiTheme.ts +4 -1
- 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/SideNav.js +0 -478
- package/dist/labs/SideNav.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/SideNav.d.ts.map +0 -1
- package/src/labs/DataComponents/DataStack.tsx +0 -105
- package/src/labs/SideNav.tsx +0 -745
- /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/{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/{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,64 @@
|
|
|
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 { memo, useMemo } from "react";
|
|
14
|
+
import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext";
|
|
15
|
+
import type { SideNavFooterItem } from "./types";
|
|
16
|
+
import { Box } from "../../Box";
|
|
17
|
+
import { Link } from "../../Link";
|
|
18
|
+
|
|
19
|
+
const SideNavFooterContent = ({
|
|
20
|
+
footerItems,
|
|
21
|
+
}: {
|
|
22
|
+
footerItems: SideNavFooterItem[];
|
|
23
|
+
}) => {
|
|
24
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
25
|
+
|
|
26
|
+
const footerContent = useMemo(() => {
|
|
27
|
+
return footerItems?.map((item, index) => (
|
|
28
|
+
<Box
|
|
29
|
+
key={`${item.id}-wrapper`}
|
|
30
|
+
sx={{
|
|
31
|
+
display: "flex",
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
34
|
+
{item.href ? (
|
|
35
|
+
<Link key={item.id} href={item.href}>
|
|
36
|
+
{item.label}
|
|
37
|
+
</Link>
|
|
38
|
+
) : (
|
|
39
|
+
<Box component="span" key={item.id}>
|
|
40
|
+
{item.label}
|
|
41
|
+
</Box>
|
|
42
|
+
)}
|
|
43
|
+
{index < footerItems.length - 1 && (
|
|
44
|
+
<Box
|
|
45
|
+
key={`${item.id}-separator`}
|
|
46
|
+
sx={{
|
|
47
|
+
marginLeft: odysseyDesignTokens.Spacing4,
|
|
48
|
+
marginRight: odysseyDesignTokens.Spacing4,
|
|
49
|
+
color: odysseyDesignTokens.HueNeutral300,
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
|
|
|
53
|
+
</Box>
|
|
54
|
+
)}
|
|
55
|
+
</Box>
|
|
56
|
+
));
|
|
57
|
+
}, [footerItems, odysseyDesignTokens]);
|
|
58
|
+
|
|
59
|
+
return footerContent;
|
|
60
|
+
};
|
|
61
|
+
const MemoizedSideNavFooterContent = memo(SideNavFooterContent);
|
|
62
|
+
MemoizedSideNavFooterContent.displayName = "SideNavFooterContent";
|
|
63
|
+
|
|
64
|
+
export { MemoizedSideNavFooterContent as SideNavFooterContent };
|
|
@@ -0,0 +1,65 @@
|
|
|
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 styled from "@emotion/styled";
|
|
14
|
+
import { memo, ReactNode, useMemo } from "react";
|
|
15
|
+
import {
|
|
16
|
+
type DesignTokens,
|
|
17
|
+
useOdysseyDesignTokens,
|
|
18
|
+
} from "../../OdysseyDesignTokensContext";
|
|
19
|
+
import { Box } from "../../Box";
|
|
20
|
+
import { Heading6 } from "../../Typography";
|
|
21
|
+
import { CollapseIcon } from "./CollapseIcon";
|
|
22
|
+
import type { SideNavProps } from "./types";
|
|
23
|
+
|
|
24
|
+
const SideNavHeaderContainer = styled("div", {
|
|
25
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
26
|
+
})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({
|
|
27
|
+
display: "flex",
|
|
28
|
+
justifyContent: "space-between",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
paddingLeft: odysseyDesignTokens.Spacing4,
|
|
31
|
+
paddingRight: odysseyDesignTokens.Spacing4,
|
|
32
|
+
paddingTop: odysseyDesignTokens.Spacing3,
|
|
33
|
+
paddingBottom: odysseyDesignTokens.Spacing3,
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
const SideNavHeader = ({
|
|
37
|
+
navHeaderText,
|
|
38
|
+
isCollapsible,
|
|
39
|
+
onCollapse,
|
|
40
|
+
}: Pick<
|
|
41
|
+
SideNavProps,
|
|
42
|
+
"navHeaderText" | "isCollapsible" | "onCollapse"
|
|
43
|
+
>): ReactNode => {
|
|
44
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
45
|
+
|
|
46
|
+
const sideNavHeaderStyles = useMemo(
|
|
47
|
+
() => ({
|
|
48
|
+
marginTop: odysseyDesignTokens.Spacing2,
|
|
49
|
+
}),
|
|
50
|
+
[odysseyDesignTokens],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<SideNavHeaderContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
55
|
+
<Box sx={sideNavHeaderStyles}>
|
|
56
|
+
<Heading6>{navHeaderText}</Heading6>
|
|
57
|
+
</Box>
|
|
58
|
+
{isCollapsible && <CollapseIcon onClick={onCollapse} />}
|
|
59
|
+
</SideNavHeaderContainer>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
const MemoizedSideNavHeader = memo(SideNavHeader);
|
|
63
|
+
MemoizedSideNavHeader.displayName = "SideNavHeader";
|
|
64
|
+
|
|
65
|
+
export { MemoizedSideNavHeader as SideNavHeader };
|
|
@@ -0,0 +1,216 @@
|
|
|
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 styled from "@emotion/styled";
|
|
14
|
+
import {
|
|
15
|
+
useRef,
|
|
16
|
+
useImperativeHandle,
|
|
17
|
+
useCallback,
|
|
18
|
+
memo,
|
|
19
|
+
KeyboardEvent,
|
|
20
|
+
} from "react";
|
|
21
|
+
import { Link } from "../../Link";
|
|
22
|
+
import {
|
|
23
|
+
type DesignTokens,
|
|
24
|
+
useOdysseyDesignTokens,
|
|
25
|
+
} from "../../OdysseyDesignTokensContext";
|
|
26
|
+
import { SideNavItemLinkContent } from "./SideNavItemLinkContent";
|
|
27
|
+
import type { SideNavItem } from "./types";
|
|
28
|
+
|
|
29
|
+
export const SideNavListItemContainer = styled("li", {
|
|
30
|
+
shouldForwardProp: (prop) =>
|
|
31
|
+
prop !== "odysseyDesignTokens" &&
|
|
32
|
+
prop !== "isSelected" &&
|
|
33
|
+
prop !== "isDisabled",
|
|
34
|
+
})<{
|
|
35
|
+
odysseyDesignTokens: DesignTokens;
|
|
36
|
+
isSelected?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
isDisabled?: boolean;
|
|
39
|
+
}>(({ odysseyDesignTokens, isSelected, isDisabled }) => ({
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
cursor: isDisabled ? "default" : "pointer",
|
|
43
|
+
pointerEvents: isDisabled ? "none" : "auto",
|
|
44
|
+
backgroundColor: isSelected ? odysseyDesignTokens.HueNeutral50 : "unset",
|
|
45
|
+
margin: `${odysseyDesignTokens.Spacing1} 0`,
|
|
46
|
+
"&:last-child": {
|
|
47
|
+
marginBottom: odysseyDesignTokens.Spacing2,
|
|
48
|
+
},
|
|
49
|
+
"& a": {
|
|
50
|
+
display: "flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
width: "100%",
|
|
53
|
+
minHeight: "48px",
|
|
54
|
+
padding: `${odysseyDesignTokens.Spacing3} ${odysseyDesignTokens.Spacing4}`,
|
|
55
|
+
color: `${odysseyDesignTokens.TypographyColorHeading} !important`,
|
|
56
|
+
pointerEvents: isDisabled ? "none" : "auto",
|
|
57
|
+
},
|
|
58
|
+
"& a:hover": {
|
|
59
|
+
textDecoration: "none",
|
|
60
|
+
cursor: isDisabled ? "default" : "pointer",
|
|
61
|
+
backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : "inherit",
|
|
62
|
+
},
|
|
63
|
+
"& a:focus-visible": {
|
|
64
|
+
outlineOffset: 0,
|
|
65
|
+
borderRadius: 0,
|
|
66
|
+
outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain,
|
|
67
|
+
backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : "inherit",
|
|
68
|
+
},
|
|
69
|
+
}));
|
|
70
|
+
|
|
71
|
+
const scrollToNode = (node: HTMLElement | null) => {
|
|
72
|
+
if (node) {
|
|
73
|
+
node?.scrollIntoView({
|
|
74
|
+
behavior: "instant",
|
|
75
|
+
block: "center",
|
|
76
|
+
inline: "nearest",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
type ScrollIntoViewHandle = {
|
|
82
|
+
scrollIntoView: () => void;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const SideNavItemContent = ({
|
|
86
|
+
id,
|
|
87
|
+
label,
|
|
88
|
+
href,
|
|
89
|
+
target,
|
|
90
|
+
startIcon,
|
|
91
|
+
severity,
|
|
92
|
+
statusLabel,
|
|
93
|
+
endIcon,
|
|
94
|
+
onClick,
|
|
95
|
+
isSelected,
|
|
96
|
+
isDisabled,
|
|
97
|
+
scrollRef,
|
|
98
|
+
}: Pick<
|
|
99
|
+
SideNavItem,
|
|
100
|
+
| "id"
|
|
101
|
+
| "label"
|
|
102
|
+
| "href"
|
|
103
|
+
| "target"
|
|
104
|
+
| "startIcon"
|
|
105
|
+
| "severity"
|
|
106
|
+
| "statusLabel"
|
|
107
|
+
| "endIcon"
|
|
108
|
+
| "onClick"
|
|
109
|
+
| "isSelected"
|
|
110
|
+
| "isDisabled"
|
|
111
|
+
> & {
|
|
112
|
+
/**
|
|
113
|
+
* The ref used to scroll to this item
|
|
114
|
+
*/
|
|
115
|
+
scrollRef?: React.RefObject<ScrollIntoViewHandle>;
|
|
116
|
+
}) => {
|
|
117
|
+
const localScrollRef = useRef<HTMLLIElement>(null);
|
|
118
|
+
useImperativeHandle(
|
|
119
|
+
scrollRef,
|
|
120
|
+
() => {
|
|
121
|
+
return {
|
|
122
|
+
scrollIntoView: () => {
|
|
123
|
+
scrollToNode(localScrollRef.current);
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
[],
|
|
128
|
+
);
|
|
129
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
130
|
+
|
|
131
|
+
const NavItemContentClickContainer = styled("div", {
|
|
132
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
133
|
+
})(() => ({
|
|
134
|
+
display: "flex",
|
|
135
|
+
alignItems: "center",
|
|
136
|
+
width: "100%",
|
|
137
|
+
minHeight: "48px",
|
|
138
|
+
padding: `${odysseyDesignTokens.Spacing3} ${odysseyDesignTokens.Spacing4}`,
|
|
139
|
+
color: `${isDisabled ? odysseyDesignTokens.TypographyColorDisabled : odysseyDesignTokens.TypographyColorHeading} !important`,
|
|
140
|
+
"&:focus-visible": {
|
|
141
|
+
borderRadius: 0,
|
|
142
|
+
outlineColor: odysseyDesignTokens.FocusOutlineColorPrimary,
|
|
143
|
+
outlineStyle: odysseyDesignTokens.FocusOutlineStyle,
|
|
144
|
+
outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain,
|
|
145
|
+
backgroundColor: odysseyDesignTokens.HueNeutral50,
|
|
146
|
+
textDecoration: "none",
|
|
147
|
+
},
|
|
148
|
+
}));
|
|
149
|
+
|
|
150
|
+
const sideNavItemContentKeyHandler = useCallback(
|
|
151
|
+
(event: KeyboardEvent<HTMLDivElement>) => {
|
|
152
|
+
if (event?.key === "Enter") {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
onClick?.();
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
[onClick],
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<SideNavListItemContainer
|
|
162
|
+
ref={localScrollRef}
|
|
163
|
+
id={id}
|
|
164
|
+
key={id}
|
|
165
|
+
disabled={isDisabled}
|
|
166
|
+
aria-disabled={isDisabled}
|
|
167
|
+
isDisabled={isDisabled}
|
|
168
|
+
isSelected={isSelected}
|
|
169
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
170
|
+
>
|
|
171
|
+
{
|
|
172
|
+
// Use Link for nav items with links and div for disabled or non-link items
|
|
173
|
+
isDisabled ? (
|
|
174
|
+
<NavItemContentClickContainer>
|
|
175
|
+
<SideNavItemLinkContent
|
|
176
|
+
label={label}
|
|
177
|
+
startIcon={startIcon}
|
|
178
|
+
endIcon={endIcon}
|
|
179
|
+
statusLabel={statusLabel}
|
|
180
|
+
severity={severity}
|
|
181
|
+
/>
|
|
182
|
+
</NavItemContentClickContainer>
|
|
183
|
+
) : !href ? (
|
|
184
|
+
<NavItemContentClickContainer
|
|
185
|
+
role="button"
|
|
186
|
+
tabIndex={0}
|
|
187
|
+
onClick={onClick}
|
|
188
|
+
onKeyDown={sideNavItemContentKeyHandler}
|
|
189
|
+
>
|
|
190
|
+
<SideNavItemLinkContent
|
|
191
|
+
label={label}
|
|
192
|
+
startIcon={startIcon}
|
|
193
|
+
endIcon={endIcon}
|
|
194
|
+
statusLabel={statusLabel}
|
|
195
|
+
severity={severity}
|
|
196
|
+
/>
|
|
197
|
+
</NavItemContentClickContainer>
|
|
198
|
+
) : (
|
|
199
|
+
<Link href={href} target={target} onClick={onClick}>
|
|
200
|
+
<SideNavItemLinkContent
|
|
201
|
+
label={label}
|
|
202
|
+
startIcon={startIcon}
|
|
203
|
+
endIcon={endIcon}
|
|
204
|
+
statusLabel={statusLabel}
|
|
205
|
+
severity={severity}
|
|
206
|
+
/>
|
|
207
|
+
</Link>
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
</SideNavListItemContainer>
|
|
211
|
+
);
|
|
212
|
+
};
|
|
213
|
+
const MemoizedSideNavItemContent = memo(SideNavItemContent);
|
|
214
|
+
MemoizedSideNavItemContent.displayName = "SideNavItemContent";
|
|
215
|
+
|
|
216
|
+
export { MemoizedSideNavItemContent as SideNavItemContent };
|
|
@@ -0,0 +1,87 @@
|
|
|
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 styled from "@emotion/styled";
|
|
14
|
+
import { memo, ReactNode, useMemo } from "react";
|
|
15
|
+
import {
|
|
16
|
+
type DesignTokens,
|
|
17
|
+
useOdysseyDesignTokens,
|
|
18
|
+
} from "../../OdysseyDesignTokensContext";
|
|
19
|
+
import { Box } from "../../Box";
|
|
20
|
+
import { Status } from "../../Status";
|
|
21
|
+
import type { SideNavItem } from "./types";
|
|
22
|
+
|
|
23
|
+
const SideNavItemLabelContainer = styled("div", {
|
|
24
|
+
shouldForwardProp: (prop) =>
|
|
25
|
+
prop !== "odysseyDesignTokens" && prop !== "isIconVisible",
|
|
26
|
+
})<{
|
|
27
|
+
odysseyDesignTokens: DesignTokens;
|
|
28
|
+
isIconVisible: boolean;
|
|
29
|
+
}>(({ odysseyDesignTokens, isIconVisible }) => ({
|
|
30
|
+
width: "100%",
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexWrap: "wrap",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
fontSize: odysseyDesignTokens.TypographyScale0,
|
|
35
|
+
fontWeight: odysseyDesignTokens.TypographyWeightHeading,
|
|
36
|
+
marginLeft: isIconVisible ? odysseyDesignTokens.Spacing2 : 0,
|
|
37
|
+
"& a": {
|
|
38
|
+
color: `${odysseyDesignTokens.TypographyColorHeading} !important`,
|
|
39
|
+
fontSize: odysseyDesignTokens.TypographyScale0,
|
|
40
|
+
},
|
|
41
|
+
"& a:hover": {
|
|
42
|
+
textDecoration: "none",
|
|
43
|
+
cursor: "pointer",
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
const SideNavItemLinkContent = ({
|
|
48
|
+
label,
|
|
49
|
+
startIcon,
|
|
50
|
+
endIcon,
|
|
51
|
+
severity,
|
|
52
|
+
statusLabel,
|
|
53
|
+
}: Pick<
|
|
54
|
+
SideNavItem,
|
|
55
|
+
"label" | "startIcon" | "endIcon" | "severity" | "statusLabel"
|
|
56
|
+
>): ReactNode => {
|
|
57
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
58
|
+
|
|
59
|
+
const sideNavItemContentStyles = useMemo(
|
|
60
|
+
() => ({
|
|
61
|
+
marginLeft: odysseyDesignTokens.Spacing2,
|
|
62
|
+
}),
|
|
63
|
+
[odysseyDesignTokens],
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<>
|
|
68
|
+
{startIcon && startIcon}
|
|
69
|
+
<SideNavItemLabelContainer
|
|
70
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
71
|
+
isIconVisible={Boolean(startIcon)}
|
|
72
|
+
>
|
|
73
|
+
{label}
|
|
74
|
+
{severity && (
|
|
75
|
+
<Box sx={sideNavItemContentStyles}>
|
|
76
|
+
<Status severity={severity} label={statusLabel || ""} />
|
|
77
|
+
</Box>
|
|
78
|
+
)}
|
|
79
|
+
</SideNavItemLabelContainer>
|
|
80
|
+
{endIcon && endIcon}
|
|
81
|
+
</>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
const MemoizedSideNavItemLinkContent = memo(SideNavItemLinkContent);
|
|
85
|
+
MemoizedSideNavItemLinkContent.displayName = "SideNavItemLinkContent";
|
|
86
|
+
|
|
87
|
+
export { MemoizedSideNavItemLinkContent as SideNavItemLinkContent };
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
export { SideNav } from "./SideNav";
|
|
14
|
+
|
|
15
|
+
export * from "./types";
|
|
@@ -0,0 +1,125 @@
|
|
|
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 type { ReactElement } from "react";
|
|
14
|
+
import type { HtmlProps } from "../../HtmlProps";
|
|
15
|
+
import type { statusSeverityValues } from "../../Status";
|
|
16
|
+
|
|
17
|
+
export type SideNavProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Side Nav header text that is usually reserved to show the App name
|
|
20
|
+
*/
|
|
21
|
+
navHeaderText: string;
|
|
22
|
+
/**
|
|
23
|
+
* Determines whether the side nav is collapsible
|
|
24
|
+
*/
|
|
25
|
+
isCollapsible?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Footer items in the side nav
|
|
28
|
+
*/
|
|
29
|
+
footerItems?: SideNavFooterItem[];
|
|
30
|
+
/**
|
|
31
|
+
* Triggers when the side nav is collapsed
|
|
32
|
+
*/
|
|
33
|
+
onCollapse?(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Triggers when the side nav is expanded
|
|
36
|
+
*/
|
|
37
|
+
onExpand?(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Nav items in the side nav
|
|
40
|
+
*/
|
|
41
|
+
sideNavItems: SideNavItem[];
|
|
42
|
+
} & Pick<HtmlProps, "testId">;
|
|
43
|
+
|
|
44
|
+
export type SideNavItem = {
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
/**
|
|
48
|
+
* The icon element to display at the end of the Nav Item
|
|
49
|
+
*/
|
|
50
|
+
endIcon?: ReactElement;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the item is disabled. When set to true the nav item is set to Disabled color,
|
|
53
|
+
* the link/item is not clickable, and item with children is not expandable.
|
|
54
|
+
*/
|
|
55
|
+
isDisabled?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the item is active/selected
|
|
58
|
+
*/
|
|
59
|
+
isSelected?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Event fired when the nav item is clicked
|
|
62
|
+
*/
|
|
63
|
+
onClick?(): void;
|
|
64
|
+
/**
|
|
65
|
+
* The status element to display after the label
|
|
66
|
+
*/
|
|
67
|
+
severity?: (typeof statusSeverityValues)[number];
|
|
68
|
+
/**
|
|
69
|
+
* The icon element to display at the start of the Nav Item
|
|
70
|
+
*/
|
|
71
|
+
startIcon?: ReactElement;
|
|
72
|
+
/**
|
|
73
|
+
* The label to display inside the status
|
|
74
|
+
*/
|
|
75
|
+
statusLabel?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The link target prop. e.g., "_blank"
|
|
78
|
+
*/
|
|
79
|
+
target?: string;
|
|
80
|
+
} & (
|
|
81
|
+
| {
|
|
82
|
+
/**
|
|
83
|
+
* Determines if the side nav item is a section header
|
|
84
|
+
*/
|
|
85
|
+
isSectionHeader: true;
|
|
86
|
+
href?: never;
|
|
87
|
+
children?: never;
|
|
88
|
+
isDefaultExpanded?: never;
|
|
89
|
+
isExpanded?: never;
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
/**
|
|
93
|
+
* link added to the nav item. if it is undefined, static text will be displayed.
|
|
94
|
+
* fires onClick event when it is passed
|
|
95
|
+
*/
|
|
96
|
+
href: string;
|
|
97
|
+
children?: never;
|
|
98
|
+
isSectionHeader?: never;
|
|
99
|
+
isDefaultExpanded?: never;
|
|
100
|
+
isExpanded?: never;
|
|
101
|
+
}
|
|
102
|
+
| {
|
|
103
|
+
/**
|
|
104
|
+
* An array of side nav items to be displayed as children within Accordion
|
|
105
|
+
*/
|
|
106
|
+
children?: SideNavItem[];
|
|
107
|
+
/**
|
|
108
|
+
* Whether the accordion (nav item with children) is expanded by default
|
|
109
|
+
*/
|
|
110
|
+
isDefaultExpanded?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* If true, expands the accordion, otherwise collapse it.
|
|
113
|
+
* Setting this prop enables control over the accordion.
|
|
114
|
+
*/
|
|
115
|
+
isExpanded?: boolean;
|
|
116
|
+
isSectionHeader?: never;
|
|
117
|
+
href?: never;
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
export type SideNavFooterItem = {
|
|
122
|
+
href?: string;
|
|
123
|
+
id: string;
|
|
124
|
+
label: string;
|
|
125
|
+
};
|