@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,200 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
MouseEventHandler,
|
|
15
|
+
ReactElement,
|
|
16
|
+
memo,
|
|
17
|
+
useMemo,
|
|
18
|
+
ReactNode,
|
|
19
|
+
HTMLAttributes,
|
|
20
|
+
} from "react";
|
|
21
|
+
import {
|
|
22
|
+
Card as MuiCard,
|
|
23
|
+
CardActionArea as MuiCardActionArea,
|
|
24
|
+
} from "@mui/material";
|
|
25
|
+
import styled from "@emotion/styled";
|
|
26
|
+
|
|
27
|
+
import { Button } from ".././Button";
|
|
28
|
+
import {
|
|
29
|
+
DesignTokens,
|
|
30
|
+
useOdysseyDesignTokens,
|
|
31
|
+
} from ".././OdysseyDesignTokensContext";
|
|
32
|
+
import { Heading5, Paragraph, Subordinate, Support } from ".././Typography";
|
|
33
|
+
import { Box } from ".././Box";
|
|
34
|
+
|
|
35
|
+
export const APP_TILE_IMAGE_HEIGHT = "64px";
|
|
36
|
+
|
|
37
|
+
export type AppTileProps = {
|
|
38
|
+
// Text that appears in the upper right corner of the tile
|
|
39
|
+
auxiliaryText?: string;
|
|
40
|
+
// Arbitrary content to render underneath any other tile content
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
// A string description
|
|
43
|
+
description?: string;
|
|
44
|
+
// An image or icon at the top of the tile
|
|
45
|
+
image?: ReactElement;
|
|
46
|
+
// Event handler for when the user clicks the tile
|
|
47
|
+
onClick: MouseEventHandler;
|
|
48
|
+
// An 'eyebrow' of text above the title
|
|
49
|
+
overline?: string;
|
|
50
|
+
// A string for the tile title
|
|
51
|
+
title?: string;
|
|
52
|
+
} & (
|
|
53
|
+
| {
|
|
54
|
+
// Event that fires when the user clicks the action button in the upper-right corner
|
|
55
|
+
// If this isn't set, the other action props can't be set either
|
|
56
|
+
onActionClick: MouseEventHandler;
|
|
57
|
+
// The ID of the element which the button controls (for instance, a drawer or dialog), if any.
|
|
58
|
+
actionAriaControls?: HTMLAttributes<HTMLElement>["aria-controls"];
|
|
59
|
+
// Should be filled if the button controls a popup element such as a Drawer or Dialog
|
|
60
|
+
actionAriaHasPopup?: HTMLAttributes<HTMLElement>["aria-haspopup"];
|
|
61
|
+
// Should be true if the button controls a popup element that is currently expanded. Should be synced to
|
|
62
|
+
// the state of the popup element
|
|
63
|
+
actionAriaExpanded?: HTMLAttributes<HTMLElement>["aria-expanded"];
|
|
64
|
+
// The label for the button, used as the aria-label and tooltip
|
|
65
|
+
actionLabel: string;
|
|
66
|
+
// An icon for the action button
|
|
67
|
+
actionIcon: ReactElement;
|
|
68
|
+
}
|
|
69
|
+
| {
|
|
70
|
+
onActionClick?: never;
|
|
71
|
+
actionAriaControls?: never;
|
|
72
|
+
actionAriaHasPopup?: never;
|
|
73
|
+
actionAriaExpanded?: never;
|
|
74
|
+
actionLabel?: never;
|
|
75
|
+
actionIcon?: never;
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const ImageContainer = styled("div", {
|
|
80
|
+
shouldForwardProp: (prop) =>
|
|
81
|
+
prop !== "odysseyDesignTokens" && prop !== "hasAction",
|
|
82
|
+
})<{
|
|
83
|
+
odysseyDesignTokens: DesignTokens;
|
|
84
|
+
hasAction: boolean;
|
|
85
|
+
}>(({ odysseyDesignTokens, hasAction }) => ({
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "flex-start",
|
|
88
|
+
maxHeight: APP_TILE_IMAGE_HEIGHT,
|
|
89
|
+
marginBlockEnd: odysseyDesignTokens.Spacing5,
|
|
90
|
+
paddingRight: hasAction ? odysseyDesignTokens.Spacing5 : 0,
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
const ActionContainer = styled("div", {
|
|
94
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
95
|
+
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
display: "flex",
|
|
98
|
+
minHeight: odysseyDesignTokens.Spacing6,
|
|
99
|
+
gap: odysseyDesignTokens.Spacing1,
|
|
100
|
+
position: "absolute",
|
|
101
|
+
right: odysseyDesignTokens.Spacing3,
|
|
102
|
+
top: odysseyDesignTokens.Spacing3,
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const ContentContainer = styled("div")(() => ({
|
|
106
|
+
display: "flex",
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
const ChildrenContainer = styled("div", {
|
|
110
|
+
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
111
|
+
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
112
|
+
["&:not(:first-child)"]: {
|
|
113
|
+
marginBlockStart: odysseyDesignTokens.Spacing3,
|
|
114
|
+
},
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
const AppTile = ({
|
|
118
|
+
actionAriaControls,
|
|
119
|
+
actionAriaHasPopup,
|
|
120
|
+
actionAriaExpanded,
|
|
121
|
+
actionLabel,
|
|
122
|
+
actionIcon,
|
|
123
|
+
auxiliaryText,
|
|
124
|
+
children,
|
|
125
|
+
description,
|
|
126
|
+
image,
|
|
127
|
+
onActionClick,
|
|
128
|
+
onClick,
|
|
129
|
+
overline,
|
|
130
|
+
title,
|
|
131
|
+
}: AppTileProps) => {
|
|
132
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
133
|
+
|
|
134
|
+
const tileContent = useMemo(
|
|
135
|
+
() => (
|
|
136
|
+
<ContentContainer>
|
|
137
|
+
<Box>
|
|
138
|
+
{image && (
|
|
139
|
+
<ImageContainer
|
|
140
|
+
odysseyDesignTokens={odysseyDesignTokens}
|
|
141
|
+
hasAction={Boolean(onActionClick)}
|
|
142
|
+
>
|
|
143
|
+
{image}
|
|
144
|
+
</ImageContainer>
|
|
145
|
+
)}
|
|
146
|
+
|
|
147
|
+
{overline && <Support component="div">{overline}</Support>}
|
|
148
|
+
{title && <Heading5 component="div">{title}</Heading5>}
|
|
149
|
+
{description && (
|
|
150
|
+
<Paragraph color="textSecondary">{description}</Paragraph>
|
|
151
|
+
)}
|
|
152
|
+
{children && (
|
|
153
|
+
<ChildrenContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
154
|
+
{children}
|
|
155
|
+
</ChildrenContainer>
|
|
156
|
+
)}
|
|
157
|
+
</Box>
|
|
158
|
+
</ContentContainer>
|
|
159
|
+
),
|
|
160
|
+
[
|
|
161
|
+
image,
|
|
162
|
+
odysseyDesignTokens,
|
|
163
|
+
onActionClick,
|
|
164
|
+
overline,
|
|
165
|
+
title,
|
|
166
|
+
description,
|
|
167
|
+
children,
|
|
168
|
+
],
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<MuiCard className="isClickable">
|
|
173
|
+
<MuiCardActionArea onClick={onClick}>{tileContent}</MuiCardActionArea>
|
|
174
|
+
|
|
175
|
+
{(onActionClick || auxiliaryText) && (
|
|
176
|
+
<ActionContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
177
|
+
{auxiliaryText && <Subordinate>{auxiliaryText}</Subordinate>}
|
|
178
|
+
{onActionClick && (
|
|
179
|
+
<Button
|
|
180
|
+
endIcon={actionIcon}
|
|
181
|
+
ariaLabel={actionLabel}
|
|
182
|
+
variant="floating"
|
|
183
|
+
size="small"
|
|
184
|
+
tooltipText={actionLabel}
|
|
185
|
+
ariaControls={actionAriaControls}
|
|
186
|
+
ariaExpanded={actionAriaExpanded}
|
|
187
|
+
ariaHasPopup={actionAriaHasPopup}
|
|
188
|
+
onClick={onActionClick}
|
|
189
|
+
/>
|
|
190
|
+
)}
|
|
191
|
+
</ActionContainer>
|
|
192
|
+
)}
|
|
193
|
+
</MuiCard>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const MemoizedAppTile = memo(AppTile);
|
|
198
|
+
MemoizedAppTile.displayName = "AppTile";
|
|
199
|
+
|
|
200
|
+
export { MemoizedAppTile as AppTile };
|
|
@@ -27,12 +27,12 @@ import {
|
|
|
27
27
|
useOdysseyDesignTokens,
|
|
28
28
|
} from "../../OdysseyDesignTokensContext";
|
|
29
29
|
import { RowActions } from "./RowActions";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
30
|
+
import { DataCard } from "./DataCard";
|
|
31
|
+
import { CardLayout, CardLayoutProps, UniversalProps } from "./componentTypes";
|
|
32
32
|
import { DetailPanel } from "./DetailPanel";
|
|
33
33
|
|
|
34
|
-
export type
|
|
35
|
-
currentLayout:
|
|
34
|
+
export type CardLayoutContentProps = {
|
|
35
|
+
currentLayout: CardLayout;
|
|
36
36
|
data: MRT_RowData[];
|
|
37
37
|
draggingRow?: MRT_Row<MRT_RowData> | null;
|
|
38
38
|
emptyState: ReactNode;
|
|
@@ -84,7 +84,7 @@ export type StackContentProps = {
|
|
|
84
84
|
};
|
|
85
85
|
rowSelection: MRT_RowSelectionState;
|
|
86
86
|
setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;
|
|
87
|
-
|
|
87
|
+
cardLayoutOptions: CardLayoutProps;
|
|
88
88
|
totalRows: UniversalProps["totalRows"];
|
|
89
89
|
};
|
|
90
90
|
|
|
@@ -95,7 +95,7 @@ const StackContainer = styled("div", {
|
|
|
95
95
|
prop !== "maxGridColumns",
|
|
96
96
|
})<{
|
|
97
97
|
odysseyDesignTokens: DesignTokens;
|
|
98
|
-
currentLayout:
|
|
98
|
+
currentLayout: CardLayout;
|
|
99
99
|
maxGridColumns: number;
|
|
100
100
|
}>(({ odysseyDesignTokens, currentLayout, maxGridColumns }) => ({
|
|
101
101
|
display: currentLayout === "list" ? "flex" : "grid",
|
|
@@ -135,7 +135,7 @@ const CheckboxContainer = styled("div", {
|
|
|
135
135
|
marginBlockStart: `-${odysseyDesignTokens.Spacing1}`,
|
|
136
136
|
}));
|
|
137
137
|
|
|
138
|
-
const
|
|
138
|
+
const CardLayoutContent = ({
|
|
139
139
|
currentLayout,
|
|
140
140
|
data,
|
|
141
141
|
emptyState,
|
|
@@ -150,9 +150,9 @@ const StackContent = ({
|
|
|
150
150
|
rowReorderingUtilities,
|
|
151
151
|
rowSelection,
|
|
152
152
|
setRowSelection,
|
|
153
|
-
|
|
153
|
+
cardLayoutOptions,
|
|
154
154
|
totalRows,
|
|
155
|
-
}:
|
|
155
|
+
}: CardLayoutContentProps) => {
|
|
156
156
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
157
157
|
|
|
158
158
|
const handleRowSelectionChange = useCallback(
|
|
@@ -174,7 +174,7 @@ const StackContent = ({
|
|
|
174
174
|
<StackContainer
|
|
175
175
|
odysseyDesignTokens={odysseyDesignTokens}
|
|
176
176
|
currentLayout={currentLayout}
|
|
177
|
-
maxGridColumns={
|
|
177
|
+
maxGridColumns={cardLayoutOptions.maxGridColumns ?? 3}
|
|
178
178
|
>
|
|
179
179
|
{isLoading ? (
|
|
180
180
|
<LoadingContainer odysseyDesignTokens={odysseyDesignTokens}>
|
|
@@ -188,12 +188,12 @@ const StackContent = ({
|
|
|
188
188
|
<>
|
|
189
189
|
{data.map((row: MRT_RowData, index: number) => {
|
|
190
190
|
const { overline, title, description, image, children } =
|
|
191
|
-
|
|
191
|
+
cardLayoutOptions.itemProps(row);
|
|
192
192
|
const currentIndex =
|
|
193
193
|
index + (pagination.pageIndex - 1) * pagination.pageSize;
|
|
194
194
|
|
|
195
195
|
return (
|
|
196
|
-
<
|
|
196
|
+
<DataCard
|
|
197
197
|
Accessory={
|
|
198
198
|
hasRowSelection && (
|
|
199
199
|
// Negative margin to counteract the checkbox's inbuilt spacing
|
|
@@ -210,21 +210,26 @@ const StackContent = ({
|
|
|
210
210
|
children={children}
|
|
211
211
|
description={description}
|
|
212
212
|
detailPanel={
|
|
213
|
-
|
|
213
|
+
cardLayoutOptions.renderDetailPanel ? (
|
|
214
214
|
<DetailPanel
|
|
215
215
|
row={row}
|
|
216
|
-
renderDetailPanel={
|
|
216
|
+
renderDetailPanel={
|
|
217
|
+
cardLayoutOptions.renderDetailPanel
|
|
218
|
+
}
|
|
217
219
|
/>
|
|
218
220
|
) : undefined
|
|
219
221
|
}
|
|
220
222
|
image={image}
|
|
221
223
|
key={row.id}
|
|
222
224
|
menuButtonChildren={
|
|
223
|
-
(
|
|
225
|
+
(cardLayoutOptions.rowActionMenuItems ||
|
|
226
|
+
hasRowReordering) && (
|
|
224
227
|
<RowActions
|
|
225
228
|
row={row}
|
|
226
229
|
rowIndex={currentIndex}
|
|
227
|
-
rowActionMenuItems={
|
|
230
|
+
rowActionMenuItems={
|
|
231
|
+
cardLayoutOptions.rowActionMenuItems
|
|
232
|
+
}
|
|
228
233
|
isRowReorderingDisabled={isRowReorderingDisabled}
|
|
229
234
|
totalRows={totalRows}
|
|
230
235
|
updateRowOrder={
|
|
@@ -248,7 +253,7 @@ const StackContent = ({
|
|
|
248
253
|
);
|
|
249
254
|
};
|
|
250
255
|
|
|
251
|
-
const
|
|
252
|
-
|
|
256
|
+
const MemoizedCardLayoutContent = memo(CardLayoutContent);
|
|
257
|
+
MemoizedCardLayoutContent.displayName = "CardLayoutContent";
|
|
253
258
|
|
|
254
|
-
export {
|
|
259
|
+
export { MemoizedCardLayoutContent as CardLayoutContent };
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
|
|
46
46
|
export const CARD_IMAGE_HEIGHT = "64px";
|
|
47
47
|
|
|
48
|
-
export type
|
|
48
|
+
export type DataCardProps = {
|
|
49
49
|
children?: ReactNode;
|
|
50
50
|
description?: string;
|
|
51
51
|
detailPanel?: ReactNode;
|
|
@@ -110,14 +110,14 @@ const CardContentContainer = styled("div", {
|
|
|
110
110
|
const CardChildrenContainer = styled("div", {
|
|
111
111
|
shouldForwardProp: (prop) => prop !== "odysseyDesignTokens",
|
|
112
112
|
})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({
|
|
113
|
-
["
|
|
113
|
+
["&:not(:first-child)"]: {
|
|
114
114
|
marginBlockStart: odysseyDesignTokens.Spacing3,
|
|
115
115
|
},
|
|
116
116
|
}));
|
|
117
117
|
|
|
118
118
|
const buttonProviderValue = { isFullWidth: true };
|
|
119
119
|
|
|
120
|
-
const
|
|
120
|
+
const DataCard = ({
|
|
121
121
|
Accessory: AccessoryProp,
|
|
122
122
|
button,
|
|
123
123
|
children,
|
|
@@ -128,7 +128,7 @@ const StackCard = ({
|
|
|
128
128
|
onClick,
|
|
129
129
|
overline,
|
|
130
130
|
title,
|
|
131
|
-
}:
|
|
131
|
+
}: DataCardProps) => {
|
|
132
132
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
133
133
|
const { t } = useTranslation();
|
|
134
134
|
|
|
@@ -250,7 +250,7 @@ const StackCard = ({
|
|
|
250
250
|
);
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
const
|
|
254
|
-
|
|
253
|
+
const MemoizedDataCard = memo(DataCard);
|
|
254
|
+
MemoizedDataCard.displayName = "DataCard";
|
|
255
255
|
|
|
256
|
-
export {
|
|
256
|
+
export { MemoizedDataCard as DataCard };
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
import { memo, useMemo } from "react";
|
|
14
14
|
|
|
15
15
|
import { DataView } from "./DataView";
|
|
16
|
-
import {
|
|
16
|
+
import { TableLayoutProps, UniversalProps } from "./componentTypes";
|
|
17
17
|
|
|
18
|
-
export type DataTableProps = UniversalProps &
|
|
18
|
+
export type DataTableProps = UniversalProps & TableLayoutProps;
|
|
19
19
|
|
|
20
20
|
const DataTable = ({
|
|
21
|
+
additionalActionButton,
|
|
22
|
+
additionalActionMenuItems,
|
|
21
23
|
bulkActionMenuItems,
|
|
22
24
|
columns,
|
|
23
25
|
currentPage,
|
|
@@ -53,7 +55,7 @@ const DataTable = ({
|
|
|
53
55
|
searchDelayTime,
|
|
54
56
|
totalRows,
|
|
55
57
|
}: DataTableProps) => {
|
|
56
|
-
const
|
|
58
|
+
const tableLayoutOptions = useMemo(
|
|
57
59
|
() => ({
|
|
58
60
|
columns,
|
|
59
61
|
hasChangeableDensity,
|
|
@@ -80,6 +82,8 @@ const DataTable = ({
|
|
|
80
82
|
|
|
81
83
|
return (
|
|
82
84
|
<DataView
|
|
85
|
+
additionalActionButton={additionalActionButton}
|
|
86
|
+
additionalActionMenuItems={additionalActionMenuItems}
|
|
83
87
|
availableLayouts={["table"]}
|
|
84
88
|
bulkActionMenuItems={bulkActionMenuItems}
|
|
85
89
|
currentPage={currentPage}
|
|
@@ -105,7 +109,7 @@ const DataTable = ({
|
|
|
105
109
|
paginationType={paginationType}
|
|
106
110
|
resultsPerPage={resultsPerPage}
|
|
107
111
|
searchDelayTime={searchDelayTime}
|
|
108
|
-
|
|
112
|
+
tableLayoutOptions={tableLayoutOptions}
|
|
109
113
|
totalRows={totalRows}
|
|
110
114
|
/>
|
|
111
115
|
);
|
|
@@ -35,10 +35,12 @@ import { DataFilters } from "../DataFilters";
|
|
|
35
35
|
import { EmptyState } from "../../EmptyState";
|
|
36
36
|
import { fetchData } from "./fetchData";
|
|
37
37
|
import { LayoutSwitcher } from "./LayoutSwitcher";
|
|
38
|
+
import { MenuButton } from "../..";
|
|
39
|
+
import { MoreIcon } from "../../icons.generated";
|
|
38
40
|
import { TableSettings } from "./TableSettings";
|
|
39
41
|
import { Pagination, usePagination } from "../../Pagination";
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
+
import { TableLayoutContent } from "./TableLayoutContent";
|
|
43
|
+
import { CardLayoutContent } from "./CardLayoutContent";
|
|
42
44
|
import { useFilterConversion } from "./useFilterConversion";
|
|
43
45
|
import { useRowReordering } from "../../DataTable/useRowReordering";
|
|
44
46
|
import {
|
|
@@ -68,6 +70,8 @@ const AdditionalActionsContainer = styled("div")(() => ({
|
|
|
68
70
|
}));
|
|
69
71
|
|
|
70
72
|
const DataView = ({
|
|
73
|
+
additionalActionButton,
|
|
74
|
+
additionalActionMenuItems,
|
|
71
75
|
availableLayouts = allAvailableLayouts,
|
|
72
76
|
bulkActionMenuItems,
|
|
73
77
|
currentPage = 1,
|
|
@@ -94,8 +98,8 @@ const DataView = ({
|
|
|
94
98
|
paginationType = "paged",
|
|
95
99
|
resultsPerPage = 20,
|
|
96
100
|
searchDelayTime,
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
cardLayoutOptions,
|
|
102
|
+
tableLayoutOptions,
|
|
99
103
|
totalRows,
|
|
100
104
|
maxPages,
|
|
101
105
|
maxResultsPerPage,
|
|
@@ -139,14 +143,18 @@ const DataView = ({
|
|
|
139
143
|
const [tableState, setTableState] = useState<TableState>({
|
|
140
144
|
columnSorting: [],
|
|
141
145
|
columnVisibility: {},
|
|
142
|
-
rowDensity:
|
|
146
|
+
rowDensity: tableLayoutOptions?.initialDensity ?? densityValues[0],
|
|
143
147
|
});
|
|
144
148
|
|
|
145
|
-
const shouldShowFilters =
|
|
149
|
+
const shouldShowFilters =
|
|
150
|
+
hasSearch ||
|
|
151
|
+
hasFilters ||
|
|
152
|
+
additionalActionButton ||
|
|
153
|
+
additionalActionMenuItems;
|
|
146
154
|
|
|
147
155
|
const availableFilters = useFilterConversion({
|
|
148
156
|
filters: filters,
|
|
149
|
-
columns:
|
|
157
|
+
columns: tableLayoutOptions?.columns,
|
|
150
158
|
});
|
|
151
159
|
|
|
152
160
|
useEffect(() => {
|
|
@@ -257,10 +265,10 @@ const DataView = ({
|
|
|
257
265
|
const additionalActions = useMemo(
|
|
258
266
|
() => (
|
|
259
267
|
<>
|
|
260
|
-
{currentLayout === "table" &&
|
|
268
|
+
{currentLayout === "table" && tableLayoutOptions && (
|
|
261
269
|
<TableSettings
|
|
262
270
|
setTableState={setTableState}
|
|
263
|
-
|
|
271
|
+
tableLayoutOptions={tableLayoutOptions}
|
|
264
272
|
tableState={tableState}
|
|
265
273
|
/>
|
|
266
274
|
)}
|
|
@@ -272,9 +280,30 @@ const DataView = ({
|
|
|
272
280
|
setCurrentLayout={setCurrentLayout}
|
|
273
281
|
/>
|
|
274
282
|
)}
|
|
283
|
+
|
|
284
|
+
{additionalActionButton}
|
|
285
|
+
|
|
286
|
+
{additionalActionMenuItems && (
|
|
287
|
+
<MenuButton
|
|
288
|
+
endIcon={<MoreIcon />}
|
|
289
|
+
ariaLabel={t("table.moreactions.arialabel")}
|
|
290
|
+
buttonVariant="secondary"
|
|
291
|
+
menuAlignment="right"
|
|
292
|
+
>
|
|
293
|
+
{additionalActionMenuItems}
|
|
294
|
+
</MenuButton>
|
|
295
|
+
)}
|
|
275
296
|
</>
|
|
276
297
|
),
|
|
277
|
-
[
|
|
298
|
+
[
|
|
299
|
+
currentLayout,
|
|
300
|
+
tableLayoutOptions,
|
|
301
|
+
tableState,
|
|
302
|
+
availableLayouts,
|
|
303
|
+
additionalActionButton,
|
|
304
|
+
additionalActionMenuItems,
|
|
305
|
+
t,
|
|
306
|
+
],
|
|
278
307
|
);
|
|
279
308
|
|
|
280
309
|
const { lastRow: lastRowOnPage } = usePagination({
|
|
@@ -333,9 +362,9 @@ const DataView = ({
|
|
|
333
362
|
</AdditionalActionsContainer>
|
|
334
363
|
)}
|
|
335
364
|
|
|
336
|
-
{currentLayout === "table" &&
|
|
337
|
-
<
|
|
338
|
-
columns={
|
|
365
|
+
{currentLayout === "table" && tableLayoutOptions && (
|
|
366
|
+
<TableLayoutContent
|
|
367
|
+
columns={tableLayoutOptions.columns}
|
|
339
368
|
data={data}
|
|
340
369
|
draggingRow={draggingRow}
|
|
341
370
|
emptyState={emptyState}
|
|
@@ -352,14 +381,14 @@ const DataView = ({
|
|
|
352
381
|
rowSelection={rowSelection}
|
|
353
382
|
setRowSelection={setRowSelection}
|
|
354
383
|
setTableState={setTableState}
|
|
355
|
-
|
|
384
|
+
tableLayoutOptions={tableLayoutOptions}
|
|
356
385
|
tableState={tableState}
|
|
357
386
|
totalRows={totalRows}
|
|
358
387
|
/>
|
|
359
388
|
)}
|
|
360
389
|
{(currentLayout === "list" || currentLayout === "grid") &&
|
|
361
|
-
|
|
362
|
-
<
|
|
390
|
+
cardLayoutOptions && (
|
|
391
|
+
<CardLayoutContent
|
|
363
392
|
currentLayout={currentLayout}
|
|
364
393
|
data={data}
|
|
365
394
|
draggingRow={draggingRow}
|
|
@@ -376,7 +405,7 @@ const DataView = ({
|
|
|
376
405
|
rowReorderingUtilities={rowReorderingUtilities}
|
|
377
406
|
rowSelection={rowSelection}
|
|
378
407
|
setRowSelection={setRowSelection}
|
|
379
|
-
|
|
408
|
+
cardLayoutOptions={cardLayoutOptions}
|
|
380
409
|
totalRows={totalRows}
|
|
381
410
|
/>
|
|
382
411
|
)}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { memo } from "react";
|
|
14
|
-
import {
|
|
14
|
+
import { CardLayoutProps } from "./componentTypes";
|
|
15
15
|
import { DataRow } from "./dataTypes";
|
|
16
16
|
|
|
17
17
|
const DetailPanel = ({
|
|
@@ -19,7 +19,7 @@ const DetailPanel = ({
|
|
|
19
19
|
renderDetailPanel,
|
|
20
20
|
}: {
|
|
21
21
|
row: DataRow;
|
|
22
|
-
renderDetailPanel:
|
|
22
|
+
renderDetailPanel: CardLayoutProps["renderDetailPanel"];
|
|
23
23
|
}) => {
|
|
24
24
|
if (!renderDetailPanel) return null;
|
|
25
25
|
return renderDetailPanel({ row });
|