@okta/odyssey-react-mui 1.21.1 → 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 +19 -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/Pagination/Pagination.js +1 -1
- package/dist/Pagination/Pagination.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 +27 -17
- 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/{DataComponents → DataView}/fetchData.js +2 -2
- 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/Pagination/Pagination.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/{DataComponents → DataView}/fetchData.d.ts +1 -1
- 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 +236 -151
- 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/Pagination/Pagination.tsx +3 -1
- 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 +49 -19
- 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}/fetchData.ts +3 -3
- 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 +245 -155
- 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}/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}/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}/tableConstants.tsx +0 -0
package/dist/ToastStack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastStack.js","names":["memo","jsx","_jsx","ToastStack","children","_Snackbar","open","_Box","sx","display","flexDirection","gap","MemoizedToastStack","displayName"],"sources":["../src/ToastStack.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactElement } from \"react\";\nimport { Box, Snackbar } from \"@mui/material\";\nimport { Toast } from \"./Toast\";\n\nexport type
|
|
1
|
+
{"version":3,"file":"ToastStack.js","names":["memo","jsx","_jsx","ToastStack","children","_Snackbar","open","_Box","sx","display","flexDirection","gap","MemoizedToastStack","displayName"],"sources":["../src/ToastStack.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactElement } from \"react\";\nimport { Box, Snackbar } from \"@mui/material\";\nimport { Toast } from \"./Toast\";\n\nexport type ToastListProps = {\n /**\n * The Toast or array of Toasts within the ToastStack\n */\n children: ReactElement<typeof Toast> | Array<ReactElement<typeof Toast>>;\n};\n\nconst ToastStack = ({ children }: ToastListProps) => {\n return (\n <Snackbar open={true}>\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column-reverse\",\n gap: 2,\n }}\n >\n {children}\n </Box>\n </Snackbar>\n );\n};\n\nconst MemoizedToastStack = memo(ToastStack);\nMemoizedToastStack.displayName = \"ToastStack\";\n\nexport { MemoizedToastStack as ToastStack };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW3C,MAAMC,UAAU,GAAGA,CAAC;EAAEC;AAAyB,CAAC,KAAK;EACnD,OACEF,IAAA,CAAAG,SAAA;IAAUC,IAAI,EAAE,IAAK;IAAAF,QAAA,EACnBF,IAAA,CAAAK,IAAA;MACEC,EAAE,EAAE;QACFC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE,gBAAgB;QAC/BC,GAAG,EAAE;MACP,CAAE;MAAAP,QAAA,EAEDA;IAAQ,CACN;EAAC,CACE,CAAC;AAEf,CAAC;AAED,MAAMQ,kBAAkB,GAAGZ,IAAI,CAACG,UAAU,CAAC;AAC3CS,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIT,UAAU"}
|
|
@@ -10,17 +10,33 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
export const createShadowDomElements = containerElement => {
|
|
14
|
+
const shadowRoot = containerElement.attachShadow({
|
|
15
|
+
mode: "open"
|
|
16
|
+
});
|
|
17
|
+
const emotionRootElement = document.createElement("div");
|
|
18
|
+
emotionRootElement.setAttribute("id", "style-root");
|
|
19
|
+
emotionRootElement.setAttribute("nonce", window.cspNonce);
|
|
20
|
+
const shadowRootElement = document.createElement("div");
|
|
21
|
+
shadowRootElement.setAttribute("id", "shadow-root");
|
|
22
|
+
shadowRoot.appendChild(emotionRootElement);
|
|
23
|
+
shadowRoot.appendChild(shadowRootElement);
|
|
24
|
+
return {
|
|
25
|
+
emotionRootElement,
|
|
26
|
+
shadowRootElement
|
|
27
|
+
};
|
|
28
|
+
};
|
|
13
29
|
export const createShadowRootElement = containerElement => {
|
|
14
30
|
const shadowRoot = containerElement.attachShadow({
|
|
15
31
|
mode: "open"
|
|
16
32
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
const emotionRootElement = document.createElement("style");
|
|
34
|
+
emotionRootElement.setAttribute("id", "style-root");
|
|
35
|
+
emotionRootElement.setAttribute("nonce", window.cspNonce);
|
|
20
36
|
const shadowRootElement = document.createElement("div");
|
|
21
37
|
shadowRootElement.setAttribute("id", "shadow-root");
|
|
22
|
-
shadowRoot.appendChild(
|
|
38
|
+
shadowRoot.appendChild(emotionRootElement);
|
|
23
39
|
shadowRoot.appendChild(shadowRootElement);
|
|
24
|
-
return [
|
|
40
|
+
return [emotionRootElement, shadowRootElement];
|
|
25
41
|
};
|
|
26
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=createShadowDomElements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createShadowDomElements.js","names":["createShadowDomElements","containerElement","shadowRoot","attachShadow","mode","emotionRootElement","document","createElement","setAttribute","window","cspNonce","shadowRootElement","appendChild","createShadowRootElement"],"sources":["../src/createShadowDomElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport const createShadowDomElements = (containerElement: HTMLElement) => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // Container for Emotion `<style>` elements.\n const emotionRootElement = document.createElement(\"div\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // React app root component.\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return { emotionRootElement, shadowRootElement };\n};\n\n/** @deprecated Use `createShadowDomElements` instead. */\nexport const createShadowRootElement = (\n containerElement: HTMLElement,\n): [HTMLStyleElement, HTMLDivElement] => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // the element that styles will be cached into\n const emotionRootElement = document.createElement(\"style\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // the element that emotion renders html into\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement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AACP,kBAAkB,CAAC;EAC1CH,UAAU,CAACU,WAAW,CAACD,iBAAiB,CAAC;EAEzC,OAAO,CAACN,kBAAkB,EAAEM,iBAAiB,CAAC;AAChD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ export * from "./Checkbox.js";
|
|
|
27
27
|
export * from "./CheckboxGroup.js";
|
|
28
28
|
export * from "./CircularProgress.js";
|
|
29
29
|
export * from "./CssBaseline.js";
|
|
30
|
-
export * from "./
|
|
30
|
+
export * from "./createShadowDomElements.js";
|
|
31
31
|
export * from "./createUniqueId.js";
|
|
32
32
|
export * from "./DataTable/index.js";
|
|
33
33
|
export * from "./Dialog.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["deepmerge","visuallyHidden","createTheme","DialogContentText","Divider","InputAdornment","InputBase","ListItemIcon","ListItemText","ListSubheader","MenuList","Paper","ScopedCssBaseline","ThemeProvider","odysseyTranslate","useOdysseyDesignTokens","badgeContentMaxValues"],"sources":["../src/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport {\n createTheme,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n DialogContentText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Divider,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemIcon,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListSubheader,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n MenuList,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Paper,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ScopedCssBaseline,\n ThemeProvider,\n} from \"@mui/material\";\n\nexport type {\n CssBaselineProps,\n DialogContentTextProps,\n DividerProps,\n InputAdornmentProps,\n InputBaseProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n ThemeOptions,\n} from \"@mui/material\";\n\nexport { odysseyTranslate } from \"./i18n\";\nexport type { FocusHandle } from \"./inputUtils\";\nexport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\n\nexport * from \"./Accordion\";\nexport * from \"./Autocomplete\";\nexport { badgeContentMaxValues } from \"./Badge\";\nexport * from \"./Banner\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Callout\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./CssBaseline\";\nexport * from \"./
|
|
1
|
+
{"version":3,"file":"index.js","names":["deepmerge","visuallyHidden","createTheme","DialogContentText","Divider","InputAdornment","InputBase","ListItemIcon","ListItemText","ListSubheader","MenuList","Paper","ScopedCssBaseline","ThemeProvider","odysseyTranslate","useOdysseyDesignTokens","badgeContentMaxValues"],"sources":["../src/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport {\n createTheme,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n DialogContentText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Divider,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemIcon,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListSubheader,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n MenuList,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Paper,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ScopedCssBaseline,\n ThemeProvider,\n} from \"@mui/material\";\n\nexport type {\n CssBaselineProps,\n DialogContentTextProps,\n DividerProps,\n InputAdornmentProps,\n InputBaseProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n ThemeOptions,\n} from \"@mui/material\";\n\nexport { odysseyTranslate } from \"./i18n\";\nexport type { FocusHandle } from \"./inputUtils\";\nexport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\n\nexport * from \"./Accordion\";\nexport * from \"./Autocomplete\";\nexport { badgeContentMaxValues } from \"./Badge\";\nexport * from \"./Banner\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Callout\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./CssBaseline\";\nexport * from \"./createShadowDomElements\";\nexport * from \"./createUniqueId\";\nexport * from \"./DataTable\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./EmptyState\";\nexport * from \"./Fieldset\";\nexport * from \"./FieldComponentProps\";\nexport * from \"./Form\";\nexport * from \"./HintLink\";\nexport * from \"./IconWithTooltip\";\nexport * from \"./Link\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\nexport * from \"./NativeSelect\";\nexport * from \"./NullElement\";\nexport * from \"./OdysseyCacheProvider\";\nexport * from \"./OdysseyProvider\";\nexport * from \"./OdysseyThemeProvider\";\nexport * from \"./OdysseyTranslationProvider\";\nexport * from \"./PasswordField\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScreenReaderText\";\nexport * from \"./SearchField\";\nexport * from \"./Select\";\nexport * from \"./Status\";\nexport * from \"./Surface\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./TagList\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./Toast\";\nexport * from \"./ToastStack\";\nexport * from \"./labs/Switch\";\nexport * from \"./Tooltip\";\nexport * from \"./Typography\";\nexport * from \"./useUniqueId\";\nexport * from \"./Pagination\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,cAAc,QAAQ,YAAY;AAEtD,SACEC,WAAW,EAEXC,iBAAiB,EAEjBC,OAAO,EAEPC,cAAc,EAEdC,SAAS,EAETC,YAAY,EAEZC,YAAY,EAEZC,aAAa,EAEbC,QAAQ,EAERC,KAAK,EAELC,iBAAiB,EACjBC,aAAa,QACR,eAAe;AAAC,SAiBdC,gBAAgB;AAAA,SAEhBC,sBAAsB;AAAA;AAAA;AAAA,SAItBC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
|
package/dist/index.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
* Do not edit directly
|
|
4
|
-
* Generated on
|
|
4
|
+
* Generated on Thu, 05 Sep 2024 19:54:26 GMT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
$border-color-control: #8d8d8d !default;
|
|
@@ -70,8 +70,8 @@ $hue-red-600: #d92300 !default;
|
|
|
70
70
|
$hue-red-700: #951800 !default;
|
|
71
71
|
$hue-red-800: #711200 !default;
|
|
72
72
|
$hue-red-900: #500d00 !default;
|
|
73
|
-
$hue-yellow-50: #
|
|
74
|
-
$hue-yellow-100: #
|
|
73
|
+
$hue-yellow-50: #fdfad9 !default;
|
|
74
|
+
$hue-yellow-100: #ffe01a !default;
|
|
75
75
|
$hue-yellow-200: #f9c503 !default;
|
|
76
76
|
$hue-yellow-300: #eb9e05 !default;
|
|
77
77
|
$hue-yellow-400: #bf8004 !default;
|
|
@@ -96,14 +96,14 @@ $palette-danger-darker: #711200 !default;
|
|
|
96
96
|
$palette-danger-text: #d92300 !default;
|
|
97
97
|
$palette-danger-heading: #500d00 !default;
|
|
98
98
|
$palette-danger-highlight: #ffd8d1 !default;
|
|
99
|
-
$palette-warning-lighter: #
|
|
99
|
+
$palette-warning-lighter: #fdfad9 !default;
|
|
100
100
|
$palette-warning-light: #eb9e05 !default;
|
|
101
101
|
$palette-warning-main: #a16c03 !default;
|
|
102
102
|
$palette-warning-dark: #664402 !default;
|
|
103
103
|
$palette-warning-darker: #4c3302 !default;
|
|
104
104
|
$palette-warning-text: #966603 !default;
|
|
105
105
|
$palette-warning-heading: #352401 !default;
|
|
106
|
-
$palette-warning-highlight: #
|
|
106
|
+
$palette-warning-highlight: #ffe01a !default;
|
|
107
107
|
$palette-success-lighter: #defae7 !default;
|
|
108
108
|
$palette-success-light: #59c282 !default;
|
|
109
109
|
$palette-success-main: #16884a !default;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import _Card from "@mui/material/Card";
|
|
2
|
+
import _CardActionArea from "@mui/material/CardActionArea";
|
|
3
|
+
/*!
|
|
4
|
+
* Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
6
|
+
*
|
|
7
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
10
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
*
|
|
12
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { memo, useMemo } from "react";
|
|
16
|
+
import styled from "@emotion/styled";
|
|
17
|
+
import { Button } from ".././Button.js";
|
|
18
|
+
import { useOdysseyDesignTokens } from ".././OdysseyDesignTokensContext.js";
|
|
19
|
+
import { Heading5, Paragraph, Subordinate, Support } from ".././Typography.js";
|
|
20
|
+
import { Box } from ".././Box.js";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
export const APP_TILE_IMAGE_HEIGHT = "64px";
|
|
24
|
+
const ImageContainer = styled("div", {
|
|
25
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasAction"
|
|
26
|
+
})(({
|
|
27
|
+
odysseyDesignTokens,
|
|
28
|
+
hasAction
|
|
29
|
+
}) => ({
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "flex-start",
|
|
32
|
+
maxHeight: APP_TILE_IMAGE_HEIGHT,
|
|
33
|
+
marginBlockEnd: odysseyDesignTokens.Spacing5,
|
|
34
|
+
paddingRight: hasAction ? odysseyDesignTokens.Spacing5 : 0
|
|
35
|
+
}));
|
|
36
|
+
const ActionContainer = styled("div", {
|
|
37
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
38
|
+
})(({
|
|
39
|
+
odysseyDesignTokens
|
|
40
|
+
}) => ({
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
display: "flex",
|
|
43
|
+
minHeight: odysseyDesignTokens.Spacing6,
|
|
44
|
+
gap: odysseyDesignTokens.Spacing1,
|
|
45
|
+
position: "absolute",
|
|
46
|
+
right: odysseyDesignTokens.Spacing3,
|
|
47
|
+
top: odysseyDesignTokens.Spacing3
|
|
48
|
+
}));
|
|
49
|
+
const ContentContainer = styled("div")(() => ({
|
|
50
|
+
display: "flex"
|
|
51
|
+
}));
|
|
52
|
+
const ChildrenContainer = styled("div", {
|
|
53
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
54
|
+
})(({
|
|
55
|
+
odysseyDesignTokens
|
|
56
|
+
}) => ({
|
|
57
|
+
["&:not(:first-child)"]: {
|
|
58
|
+
marginBlockStart: odysseyDesignTokens.Spacing3
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
const AppTile = ({
|
|
62
|
+
actionAriaControls,
|
|
63
|
+
actionAriaHasPopup,
|
|
64
|
+
actionAriaExpanded,
|
|
65
|
+
actionLabel,
|
|
66
|
+
actionIcon,
|
|
67
|
+
auxiliaryText,
|
|
68
|
+
children,
|
|
69
|
+
description,
|
|
70
|
+
image,
|
|
71
|
+
onActionClick,
|
|
72
|
+
onClick,
|
|
73
|
+
overline,
|
|
74
|
+
title
|
|
75
|
+
}) => {
|
|
76
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
77
|
+
const tileContent = useMemo(() => _jsx(ContentContainer, {
|
|
78
|
+
children: _jsxs(Box, {
|
|
79
|
+
children: [image && _jsx(ImageContainer, {
|
|
80
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
81
|
+
hasAction: Boolean(onActionClick),
|
|
82
|
+
children: image
|
|
83
|
+
}), overline && _jsx(Support, {
|
|
84
|
+
component: "div",
|
|
85
|
+
children: overline
|
|
86
|
+
}), title && _jsx(Heading5, {
|
|
87
|
+
component: "div",
|
|
88
|
+
children: title
|
|
89
|
+
}), description && _jsx(Paragraph, {
|
|
90
|
+
color: "textSecondary",
|
|
91
|
+
children: description
|
|
92
|
+
}), children && _jsx(ChildrenContainer, {
|
|
93
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
94
|
+
children: children
|
|
95
|
+
})]
|
|
96
|
+
})
|
|
97
|
+
}), [image, odysseyDesignTokens, onActionClick, overline, title, description, children]);
|
|
98
|
+
return _jsxs(_Card, {
|
|
99
|
+
className: "isClickable",
|
|
100
|
+
children: [_jsx(_CardActionArea, {
|
|
101
|
+
onClick: onClick,
|
|
102
|
+
children: tileContent
|
|
103
|
+
}), (onActionClick || auxiliaryText) && _jsxs(ActionContainer, {
|
|
104
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
105
|
+
children: [auxiliaryText && _jsx(Subordinate, {
|
|
106
|
+
children: auxiliaryText
|
|
107
|
+
}), onActionClick && _jsx(Button, {
|
|
108
|
+
endIcon: actionIcon,
|
|
109
|
+
ariaLabel: actionLabel,
|
|
110
|
+
variant: "floating",
|
|
111
|
+
size: "small",
|
|
112
|
+
tooltipText: actionLabel,
|
|
113
|
+
ariaControls: actionAriaControls,
|
|
114
|
+
ariaExpanded: actionAriaExpanded,
|
|
115
|
+
ariaHasPopup: actionAriaHasPopup,
|
|
116
|
+
onClick: onActionClick
|
|
117
|
+
})]
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
const MemoizedAppTile = memo(AppTile);
|
|
122
|
+
MemoizedAppTile.displayName = "AppTile";
|
|
123
|
+
export { MemoizedAppTile as AppTile };
|
|
124
|
+
//# sourceMappingURL=AppTile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppTile.js","names":["memo","useMemo","styled","Button","useOdysseyDesignTokens","Heading5","Paragraph","Subordinate","Support","Box","jsx","_jsx","jsxs","_jsxs","APP_TILE_IMAGE_HEIGHT","ImageContainer","shouldForwardProp","prop","odysseyDesignTokens","hasAction","display","alignItems","maxHeight","marginBlockEnd","Spacing5","paddingRight","ActionContainer","minHeight","Spacing6","gap","Spacing1","position","right","Spacing3","top","ContentContainer","ChildrenContainer","marginBlockStart","AppTile","actionAriaControls","actionAriaHasPopup","actionAriaExpanded","actionLabel","actionIcon","auxiliaryText","children","description","image","onActionClick","onClick","overline","title","tileContent","Boolean","component","color","_Card","className","_CardActionArea","endIcon","ariaLabel","variant","size","tooltipText","ariaControls","ariaExpanded","ariaHasPopup","MemoizedAppTile","displayName"],"sources":["../../src/labs/AppTile.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MouseEventHandler,\n ReactElement,\n memo,\n useMemo,\n ReactNode,\n HTMLAttributes,\n} from \"react\";\nimport {\n Card as MuiCard,\n CardActionArea as MuiCardActionArea,\n} from \"@mui/material\";\nimport styled from \"@emotion/styled\";\n\nimport { Button } from \".././Button\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \".././OdysseyDesignTokensContext\";\nimport { Heading5, Paragraph, Subordinate, Support } from \".././Typography\";\nimport { Box } from \".././Box\";\n\nexport const APP_TILE_IMAGE_HEIGHT = \"64px\";\n\nexport type AppTileProps = {\n // Text that appears in the upper right corner of the tile\n auxiliaryText?: string;\n // Arbitrary content to render underneath any other tile content\n children?: ReactNode;\n // A string description\n description?: string;\n // An image or icon at the top of the tile\n image?: ReactElement;\n // Event handler for when the user clicks the tile\n onClick: MouseEventHandler;\n // An 'eyebrow' of text above the title\n overline?: string;\n // A string for the tile title\n title?: string;\n} & (\n | {\n // Event that fires when the user clicks the action button in the upper-right corner\n // If this isn't set, the other action props can't be set either\n onActionClick: MouseEventHandler;\n // The ID of the element which the button controls (for instance, a drawer or dialog), if any.\n actionAriaControls?: HTMLAttributes<HTMLElement>[\"aria-controls\"];\n // Should be filled if the button controls a popup element such as a Drawer or Dialog\n actionAriaHasPopup?: HTMLAttributes<HTMLElement>[\"aria-haspopup\"];\n // Should be true if the button controls a popup element that is currently expanded. Should be synced to\n // the state of the popup element\n actionAriaExpanded?: HTMLAttributes<HTMLElement>[\"aria-expanded\"];\n // The label for the button, used as the aria-label and tooltip\n actionLabel: string;\n // An icon for the action button\n actionIcon: ReactElement;\n }\n | {\n onActionClick?: never;\n actionAriaControls?: never;\n actionAriaHasPopup?: never;\n actionAriaExpanded?: never;\n actionLabel?: never;\n actionIcon?: never;\n }\n);\n\nconst ImageContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasAction\",\n})<{\n odysseyDesignTokens: DesignTokens;\n hasAction: boolean;\n}>(({ odysseyDesignTokens, hasAction }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n maxHeight: APP_TILE_IMAGE_HEIGHT,\n marginBlockEnd: odysseyDesignTokens.Spacing5,\n paddingRight: hasAction ? odysseyDesignTokens.Spacing5 : 0,\n}));\n\nconst ActionContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n minHeight: odysseyDesignTokens.Spacing6,\n gap: odysseyDesignTokens.Spacing1,\n position: \"absolute\",\n right: odysseyDesignTokens.Spacing3,\n top: odysseyDesignTokens.Spacing3,\n}));\n\nconst ContentContainer = styled(\"div\")(() => ({\n display: \"flex\",\n}));\n\nconst ChildrenContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n [\"&:not(:first-child)\"]: {\n marginBlockStart: odysseyDesignTokens.Spacing3,\n },\n}));\n\nconst AppTile = ({\n actionAriaControls,\n actionAriaHasPopup,\n actionAriaExpanded,\n actionLabel,\n actionIcon,\n auxiliaryText,\n children,\n description,\n image,\n onActionClick,\n onClick,\n overline,\n title,\n}: AppTileProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const tileContent = useMemo(\n () => (\n <ContentContainer>\n <Box>\n {image && (\n <ImageContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasAction={Boolean(onActionClick)}\n >\n {image}\n </ImageContainer>\n )}\n\n {overline && <Support component=\"div\">{overline}</Support>}\n {title && <Heading5 component=\"div\">{title}</Heading5>}\n {description && (\n <Paragraph color=\"textSecondary\">{description}</Paragraph>\n )}\n {children && (\n <ChildrenContainer odysseyDesignTokens={odysseyDesignTokens}>\n {children}\n </ChildrenContainer>\n )}\n </Box>\n </ContentContainer>\n ),\n [\n image,\n odysseyDesignTokens,\n onActionClick,\n overline,\n title,\n description,\n children,\n ],\n );\n\n return (\n <MuiCard className=\"isClickable\">\n <MuiCardActionArea onClick={onClick}>{tileContent}</MuiCardActionArea>\n\n {(onActionClick || auxiliaryText) && (\n <ActionContainer odysseyDesignTokens={odysseyDesignTokens}>\n {auxiliaryText && <Subordinate>{auxiliaryText}</Subordinate>}\n {onActionClick && (\n <Button\n endIcon={actionIcon}\n ariaLabel={actionLabel}\n variant=\"floating\"\n size=\"small\"\n tooltipText={actionLabel}\n ariaControls={actionAriaControls}\n ariaExpanded={actionAriaExpanded}\n ariaHasPopup={actionAriaHasPopup}\n onClick={onActionClick}\n />\n )}\n </ActionContainer>\n )}\n </MuiCard>\n );\n};\n\nconst MemoizedAppTile = memo(AppTile);\nMemoizedAppTile.displayName = \"AppTile\";\n\nexport { MemoizedAppTile as AppTile };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC,OAAO,QAGF,OAAO;AAKd,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAE5BC,MAAM;AAAA,SAGbC,sBAAsB;AAAA,SAEfC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,OAAO;AAAA,SACzCC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEZ,OAAO,MAAMC,qBAAqB,GAAG,MAAM;AA4C3C,MAAMC,cAAc,GAAGb,MAAM,CAAC,KAAK,EAAE;EACnCc,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAAIA,IAAI,KAAK;AAC/C,CAAC,CAAC,CAGC,CAAC;EAAEC,mBAAmB;EAAEC;AAAU,CAAC,MAAM;EAC1CC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,YAAY;EACxBC,SAAS,EAAER,qBAAqB;EAChCS,cAAc,EAAEL,mBAAmB,CAACM,QAAQ;EAC5CC,YAAY,EAAEN,SAAS,GAAGD,mBAAmB,CAACM,QAAQ,GAAG;AAC3D,CAAC,CAAC,CAAC;AAEH,MAAME,eAAe,GAAGxB,MAAM,CAAC,KAAK,EAAE;EACpCc,iBAAiB,EAAGC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Ac,CACxB,CACF;IAAA,CACc,CAClB;EAAA,CACM,CAAC;AAEd,CAAC;AAED,MAAMmB,eAAe,GAAGnE,IAAI,CAACsC,OAAO,CAAC;AACrC6B,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAI7B,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkActionsMenu.js","names":["memo","useCallback","styled","useTranslation","Box","Button","ChevronDownIcon","MenuButton","useOdysseyDesignTokens","jsx","_jsx","jsxs","_jsxs","BulkActionsContainer","shouldForwardProp","prop","odysseyDesignTokens","display","gap","Spacing2","BulkActionsMenu","data","menuItems","rowSelection","setRowSelection","t","selectedRowCount","Object","values","filter","Boolean","length","handleSelectAll","rows","fromEntries","map","row","id","handleSelectNone","children","ariaLabel","buttonLabel","buttonVariant","endIcon","isDisabled","label","onClick","variant","MemoizedBulkActionsMenu","displayName"],"sources":["../../../src/labs/DataView/BulkActionsMenu.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useCallback, Dispatch, SetStateAction } from \"react\";\nimport { MRT_RowData, MRT_RowSelectionState } from \"material-react-table\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Box } from \"../../Box\";\nimport { Button } from \"../../Button\";\nimport { ChevronDownIcon } from \"../../icons.generated\";\nimport { MenuButton } from \"../../MenuButton\";\nimport { UniversalProps } from \"./componentTypes\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\n\nexport type BulkActionsMenuProps = {\n data: MRT_RowData[];\n menuItems: UniversalProps[\"bulkActionMenuItems\"];\n rowSelection: MRT_RowSelectionState;\n setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;\n};\n\nconst BulkActionsContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing2,\n}));\n\nconst BulkActionsMenu = ({\n data,\n menuItems,\n rowSelection,\n setRowSelection,\n}: BulkActionsMenuProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const selectedRowCount = Object.values(rowSelection).filter(Boolean).length;\n\n const handleSelectAll = useCallback(() => {\n const rows = Object.fromEntries(data.map((row) => [row.id, true]));\n setRowSelection(rows);\n }, [data, setRowSelection]);\n\n const handleSelectNone = useCallback(() => {\n setRowSelection({});\n }, [setRowSelection]);\n\n return (\n <BulkActionsContainer odysseyDesignTokens={odysseyDesignTokens}>\n {selectedRowCount > 0 && (\n <MenuButton\n ariaLabel=\"More actions\"\n buttonLabel={t(\"table.actions.selectsome\", { selectedRowCount })}\n buttonVariant=\"primary\"\n endIcon={<ChevronDownIcon />}\n >\n {menuItems?.(rowSelection)}\n </MenuButton>\n )}\n <Box>\n <Button\n isDisabled={selectedRowCount === data.length} // Disabled if all are selected\n label={t(\"table.actions.selectall\")}\n onClick={handleSelectAll}\n variant=\"secondary\"\n />\n <Button\n isDisabled={selectedRowCount === 0} // Disabled if none are selected\n label={t(\"table.actions.selectnone\")}\n onClick={handleSelectNone}\n variant=\"secondary\"\n />\n </Box>\n </BulkActionsContainer>\n );\n};\n\nconst MemoizedBulkActionsMenu = memo(BulkActionsMenu);\nMemoizedBulkActionsMenu.displayName = \"BulkActionsMenu\";\n\nexport { MemoizedBulkActionsMenu as BulkActionsMenu };\n"],"mappings":"A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CAAC,CAAC,CAAC;EACrB,CAAC,EAAE,CAACA,eAAe,CAAC,CAAC;EAErB,OACEZ,KAAA,CAACC,oBAAoB;IAACG,mBAAmB,EAAEA,mBAAoB;IAAAuB,QAAA,GAC5Db,gBAAgB,GAAG,CAAC,IACnBhB,IAAA,CAACH,UAAU;MACTiC,SAAS,EAAC,cAAc;MACxBC,WAAW,EAAEhB,CAAC,CAAC,0BAA0B,EAAE;QAAEC;MAAiB,CAAC,CAAE;MACjEgB,aAAa,EAAC,SAAS;MACvBC,OAAO,EAAEjC,IAAA,CAACJ,eAAe,IAAE,CAAE;MAAAiC,QAAA,EAE5BjB,SAAS,GAAGC,YAAY;IAAC,CAChB,CACb,EACDX,KAAA,CAACR,GAAG;MAAAmC,QAAA,GACF7B,IAAA,CAACL,MAAM;QACLuC,UAAU,EAAElB,gBAAgB,KAAKL,IAAI,CAACU,MAAO;QAC7Cc,KAAK,EAAEpB,CAAC,CAAC,yBAAyB,CAAE;QACpCqB,OAAO,EAAEd,eAAgB;QACzBe,OAAO,EAAC;MAAW,CACpB,CAAC,EACFrC,IAAA,CAACL,MAAM;QACLuC,UAAU,EAAElB,gBAAgB,KAAK,CAAE;QACnCmB,KAAK,EAAEpB,CAAC,CAAC,0BAA0B,CAAE;QACrCqB,OAAO,EAAER,gBAAiB;QAC1BS,OAAO,EAAC;MAAW,CACpB,CAAC;IAAA,CACC,CAAC;EAAA,CACc,CAAC;AAE3B,CAAC;AAED,MAAMC,uBAAuB,GAAGhD,IAAI,CAACoB,eAAe,CAAC;AACrD4B,uBAAuB,CAACC,WAAW,GAAG,iBAAiB;AAEvD,SAASD,uBAAuB,IAAI5B,eAAe"}
|
|
@@ -17,7 +17,7 @@ import { Box } from "../../Box.js";
|
|
|
17
17
|
import { CircularProgress } from "../../CircularProgress.js";
|
|
18
18
|
import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
|
|
19
19
|
import { RowActions } from "./RowActions.js";
|
|
20
|
-
import {
|
|
20
|
+
import { DataCard } from "./DataCard.js";
|
|
21
21
|
import { DetailPanel } from "./DetailPanel.js";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -61,7 +61,7 @@ const CheckboxContainer = styled("div", {
|
|
|
61
61
|
}) => ({
|
|
62
62
|
marginBlockStart: `-${odysseyDesignTokens.Spacing1}`
|
|
63
63
|
}));
|
|
64
|
-
const
|
|
64
|
+
const CardLayoutContent = ({
|
|
65
65
|
currentLayout,
|
|
66
66
|
data,
|
|
67
67
|
emptyState,
|
|
@@ -76,7 +76,7 @@ const StackContent = ({
|
|
|
76
76
|
rowReorderingUtilities,
|
|
77
77
|
rowSelection,
|
|
78
78
|
setRowSelection,
|
|
79
|
-
|
|
79
|
+
cardLayoutOptions,
|
|
80
80
|
totalRows
|
|
81
81
|
}) => {
|
|
82
82
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
@@ -89,7 +89,7 @@ const StackContent = ({
|
|
|
89
89
|
return _jsx(StackContainer, {
|
|
90
90
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
91
91
|
currentLayout: currentLayout,
|
|
92
|
-
maxGridColumns:
|
|
92
|
+
maxGridColumns: cardLayoutOptions.maxGridColumns ?? 3,
|
|
93
93
|
children: isLoading ? _jsx(LoadingContainer, {
|
|
94
94
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
95
95
|
children: _jsx(CircularProgress, {})
|
|
@@ -104,9 +104,9 @@ const StackContent = ({
|
|
|
104
104
|
description,
|
|
105
105
|
image,
|
|
106
106
|
children
|
|
107
|
-
} =
|
|
107
|
+
} = cardLayoutOptions.itemProps(row);
|
|
108
108
|
const currentIndex = index + (pagination.pageIndex - 1) * pagination.pageSize;
|
|
109
|
-
return _jsx(
|
|
109
|
+
return _jsx(DataCard, {
|
|
110
110
|
Accessory: hasRowSelection && _jsx(CheckboxContainer, {
|
|
111
111
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
112
112
|
children: _jsx(_Checkbox, {
|
|
@@ -116,15 +116,15 @@ const StackContent = ({
|
|
|
116
116
|
}),
|
|
117
117
|
children: children,
|
|
118
118
|
description: description,
|
|
119
|
-
detailPanel:
|
|
119
|
+
detailPanel: cardLayoutOptions.renderDetailPanel ? _jsx(DetailPanel, {
|
|
120
120
|
row: row,
|
|
121
|
-
renderDetailPanel:
|
|
121
|
+
renderDetailPanel: cardLayoutOptions.renderDetailPanel
|
|
122
122
|
}) : undefined,
|
|
123
123
|
image: image,
|
|
124
|
-
menuButtonChildren: (
|
|
124
|
+
menuButtonChildren: (cardLayoutOptions.rowActionMenuItems || hasRowReordering) && _jsx(RowActions, {
|
|
125
125
|
row: row,
|
|
126
126
|
rowIndex: currentIndex,
|
|
127
|
-
rowActionMenuItems:
|
|
127
|
+
rowActionMenuItems: cardLayoutOptions.rowActionMenuItems,
|
|
128
128
|
isRowReorderingDisabled: isRowReorderingDisabled,
|
|
129
129
|
totalRows: totalRows,
|
|
130
130
|
updateRowOrder: hasRowReordering && onReorderRows ? updateRowOrder : undefined
|
|
@@ -137,7 +137,7 @@ const StackContent = ({
|
|
|
137
137
|
})
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
export {
|
|
143
|
-
//# sourceMappingURL=
|
|
140
|
+
const MemoizedCardLayoutContent = memo(CardLayoutContent);
|
|
141
|
+
MemoizedCardLayoutContent.displayName = "CardLayoutContent";
|
|
142
|
+
export { MemoizedCardLayoutContent as CardLayoutContent };
|
|
143
|
+
//# sourceMappingURL=CardLayoutContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardLayoutContent.js","names":["memo","useCallback","styled","Box","CircularProgress","useOdysseyDesignTokens","RowActions","DataCard","DetailPanel","jsx","_jsx","Fragment","_Fragment","StackContainer","shouldForwardProp","prop","odysseyDesignTokens","currentLayout","maxGridColumns","display","flexDirection","gap","Spacing5","gridTemplateColumns","LoadingContainer","alignItems","justifyContent","width","paddingBlock","CheckboxContainer","marginBlockStart","Spacing1","CardLayoutContent","data","emptyState","hasRowReordering","hasRowSelection","isEmpty","isLoading","isNoResults","isRowReorderingDisabled","onReorderRows","pagination","rowReorderingUtilities","rowSelection","setRowSelection","cardLayoutOptions","totalRows","handleRowSelectionChange","row","Object","fromEntries","id","entries","filter","key","concat","updateRowOrder","children","length","map","index","overline","title","description","image","itemProps","currentIndex","pageIndex","pageSize","Accessory","_Checkbox","checked","onChange","detailPanel","renderDetailPanel","undefined","menuButtonChildren","rowActionMenuItems","rowIndex","MemoizedCardLayoutContent","displayName"],"sources":["../../../src/labs/DataView/CardLayoutContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Dispatch, ReactNode, SetStateAction, memo, useCallback } from \"react\";\nimport styled, { CSSObject } from \"@emotion/styled\";\nimport {\n MRT_Row,\n MRT_RowData,\n MRT_RowSelectionState,\n MRT_TableInstance,\n} from \"material-react-table\";\n\nimport { Box } from \"../../Box\";\nimport { Checkbox as MuiCheckbox } from \"@mui/material\";\nimport { CircularProgress } from \"../../CircularProgress\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\nimport { RowActions } from \"./RowActions\";\nimport { DataCard } from \"./DataCard\";\nimport { CardLayout, CardLayoutProps, UniversalProps } from \"./componentTypes\";\nimport { DetailPanel } from \"./DetailPanel\";\n\nexport type CardLayoutContentProps = {\n currentLayout: CardLayout;\n data: MRT_RowData[];\n draggingRow?: MRT_Row<MRT_RowData> | null;\n emptyState: ReactNode;\n getRowId: UniversalProps[\"getRowId\"];\n hasRowReordering: UniversalProps[\"hasRowReordering\"];\n hasRowSelection: UniversalProps[\"hasRowSelection\"];\n isEmpty?: boolean;\n isLoading: boolean;\n isNoResults?: boolean;\n isRowReorderingDisabled?: boolean;\n onReorderRows: UniversalProps[\"onReorderRows\"];\n pagination: { pageIndex: number; pageSize: number };\n rowReorderingUtilities: {\n dragHandleStyles: CSSObject;\n dragHandleText: {\n title: string;\n \"aria-label\": string;\n };\n draggableTableBodyRowClassName: ({\n currentRowId,\n draggingRowId,\n hoveredRowId,\n }: {\n currentRowId: string;\n draggingRowId?: string;\n hoveredRowId?: string;\n }) => string | undefined;\n handleDragHandleKeyDown: ({\n table,\n row,\n event,\n }: {\n table: MRT_TableInstance<MRT_RowData>;\n row: MRT_Row<MRT_RowData>;\n event: React.KeyboardEvent<HTMLButtonElement>;\n }) => void;\n handleDragHandleOnDragCapture: (\n table: MRT_TableInstance<MRT_RowData>,\n ) => void;\n handleDragHandleOnDragEnd: (table: MRT_TableInstance<MRT_RowData>) => void;\n resetDraggingAndHoveredRow: (table: MRT_TableInstance<MRT_RowData>) => void;\n updateRowOrder: ({\n rowId,\n newRowIndex,\n }: {\n rowId: string;\n newRowIndex: number;\n }) => void;\n };\n rowSelection: MRT_RowSelectionState;\n setRowSelection: Dispatch<SetStateAction<MRT_RowSelectionState>>;\n cardLayoutOptions: CardLayoutProps;\n totalRows: UniversalProps[\"totalRows\"];\n};\n\nconst StackContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"currentLayout\" &&\n prop !== \"maxGridColumns\",\n})<{\n odysseyDesignTokens: DesignTokens;\n currentLayout: CardLayout;\n maxGridColumns: number;\n}>(({ odysseyDesignTokens, currentLayout, maxGridColumns }) => ({\n display: currentLayout === \"list\" ? \"flex\" : \"grid\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing5,\n\n ...(currentLayout === \"grid\" && {\n [`@media (max-width: 720px)`]: {\n gridTemplateColumns: \"repeat(1, 1fr)\",\n },\n [`@media (min-width: 720px) and (max-width: 960px)`]: {\n gridTemplateColumns: \"repeat(2, 1fr)\",\n },\n [`@media (min-width: 960px)`]: {\n gridTemplateColumns: `repeat(${maxGridColumns}, 1fr)`,\n },\n }),\n}));\n\nconst LoadingContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n paddingBlock: odysseyDesignTokens.Spacing5,\n}));\n\nconst CheckboxContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n marginBlockStart: `-${odysseyDesignTokens.Spacing1}`,\n}));\n\nconst CardLayoutContent = ({\n currentLayout,\n data,\n emptyState,\n hasRowReordering,\n hasRowSelection,\n isEmpty,\n isLoading,\n isNoResults,\n isRowReorderingDisabled,\n onReorderRows,\n pagination,\n rowReorderingUtilities,\n rowSelection,\n setRowSelection,\n cardLayoutOptions,\n totalRows,\n}: CardLayoutContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const handleRowSelectionChange = useCallback(\n (row: MRT_RowData) => {\n setRowSelection((rowSelection) =>\n Object.fromEntries(\n row.id in rowSelection\n ? Object.entries(rowSelection).filter(([key]) => key !== row.id)\n : Object.entries(rowSelection).concat([[row.id, true]]),\n ),\n );\n },\n [setRowSelection],\n );\n\n const { updateRowOrder } = rowReorderingUtilities;\n\n return (\n <StackContainer\n odysseyDesignTokens={odysseyDesignTokens}\n currentLayout={currentLayout}\n maxGridColumns={cardLayoutOptions.maxGridColumns ?? 3}\n >\n {isLoading ? (\n <LoadingContainer odysseyDesignTokens={odysseyDesignTokens}>\n <CircularProgress />\n </LoadingContainer>\n ) : (\n <>\n {!data || data.length === 0 || isEmpty || isNoResults ? (\n <Box>{emptyState}</Box>\n ) : (\n <>\n {data.map((row: MRT_RowData, index: number) => {\n const { overline, title, description, image, children } =\n cardLayoutOptions.itemProps(row);\n const currentIndex =\n index + (pagination.pageIndex - 1) * pagination.pageSize;\n\n return (\n <DataCard\n Accessory={\n hasRowSelection && (\n // Negative margin to counteract the checkbox's inbuilt spacing\n <CheckboxContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <MuiCheckbox\n checked={rowSelection[row.id] ?? false}\n onChange={() => handleRowSelectionChange(row)}\n />\n </CheckboxContainer>\n )\n }\n children={children}\n description={description}\n detailPanel={\n cardLayoutOptions.renderDetailPanel ? (\n <DetailPanel\n row={row}\n renderDetailPanel={\n cardLayoutOptions.renderDetailPanel\n }\n />\n ) : undefined\n }\n image={image}\n key={row.id}\n menuButtonChildren={\n (cardLayoutOptions.rowActionMenuItems ||\n hasRowReordering) && (\n <RowActions\n row={row}\n rowIndex={currentIndex}\n rowActionMenuItems={\n cardLayoutOptions.rowActionMenuItems\n }\n isRowReorderingDisabled={isRowReorderingDisabled}\n totalRows={totalRows}\n updateRowOrder={\n hasRowReordering && onReorderRows\n ? updateRowOrder\n : undefined\n }\n />\n )\n }\n overline={overline}\n title={title}\n />\n );\n })}\n </>\n )}\n </>\n )}\n </StackContainer>\n );\n};\n\nconst MemoizedCardLayoutContent = memo(CardLayoutContent);\nMemoizedCardLayoutContent.displayName = \"CardLayoutContent\";\n\nexport { MemoizedCardLayoutContent as CardLayoutContent };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAA8CA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAC9E,OAAOC,MAAM,MAAqB,iBAAiB;AAAC,SAQ3CC,GAAG;AAAA,SAEHC,gBAAgB;AAAA,SAGvBC,sBAAsB;AAAA,SAEfC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BhC,iBAAiB,CAACgC,kBACnB;cACDtC,uBAAuB,EAAEA,uBAAwB;cACjDO,SAAS,EAAEA,SAAU;cACrBU,cAAc,EACZtB,gBAAgB,IAAIM,aAAa,GAC7BgB,cAAc,GACdmB;YACL,CACF,CAEJ;YACDd,QAAQ,EAAEA,QAAS;YACnBC,KAAK,EAAEA;UAAM,GArBRd,GAAG,CAACG,EAsBV,CAAC;QAEN,CAAC;MAAC,CACF;IACH,CACD;EACH,CACa,CAAC;AAErB,CAAC;AAED,MAAM4B,yBAAyB,GAAGhF,IAAI,CAACgC,iBAAiB,CAAC;AACzDgD,yBAAyB,CAACC,WAAW,GAAG,mBAAmB;AAE3D,SAASD,yBAAyB,IAAIhD,iBAAiB"}
|
|
@@ -71,14 +71,14 @@ const CardChildrenContainer = styled("div", {
|
|
|
71
71
|
})(({
|
|
72
72
|
odysseyDesignTokens
|
|
73
73
|
}) => ({
|
|
74
|
-
["
|
|
74
|
+
["&:not(:first-child)"]: {
|
|
75
75
|
marginBlockStart: odysseyDesignTokens.Spacing3
|
|
76
76
|
}
|
|
77
77
|
}));
|
|
78
78
|
const buttonProviderValue = {
|
|
79
79
|
isFullWidth: true
|
|
80
80
|
};
|
|
81
|
-
const
|
|
81
|
+
const DataCard = ({
|
|
82
82
|
Accessory: AccessoryProp,
|
|
83
83
|
button,
|
|
84
84
|
children,
|
|
@@ -157,7 +157,7 @@ const StackCard = ({
|
|
|
157
157
|
})]
|
|
158
158
|
});
|
|
159
159
|
};
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
export {
|
|
163
|
-
//# sourceMappingURL=
|
|
160
|
+
const MemoizedDataCard = memo(DataCard);
|
|
161
|
+
MemoizedDataCard.displayName = "DataCard";
|
|
162
|
+
export { MemoizedDataCard as DataCard };
|
|
163
|
+
//# sourceMappingURL=DataCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCard.js","names":["memo","useMemo","useState","styled","useTranslation","Box","ButtonContext","useOdysseyDesignTokens","Heading5","Paragraph","Support","MenuButton","ChevronDownIcon","ChevronUpIcon","MoreIcon","jsx","_jsx","jsxs","_jsxs","CARD_IMAGE_HEIGHT","AccessoryContainer","shouldForwardProp","prop","odysseyDesignTokens","display","flexDirection","alignItems","gap","Spacing2","ImageContainer","hasMenuButtonChildren","maxHeight","marginBlockEnd","Spacing5","paddingRight","MenuButtonContainer","position","right","Spacing3","top","CardContentContainer","CardChildrenContainer","marginBlockStart","buttonProviderValue","isFullWidth","DataCard","Accessory","AccessoryProp","button","children","description","detailPanel","image","menuButtonChildren","onClick","overline","title","t","isDetailPanelOpen","setIsDetailPanelOpen","_Tooltip","_IconButton","cardContent","Boolean","component","color","_CardActions","Provider","value","_Card","className","_CardActionArea","endIcon","ariaLabel","buttonVariant","menuAlignment","size","tooltipText","MemoizedDataCard","displayName"],"sources":["../../../src/labs/DataView/DataCard.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MouseEventHandler,\n ReactElement,\n memo,\n useMemo,\n ReactNode,\n useState,\n} from \"react\";\nimport {\n IconButton as MuiIconButton,\n Card as MuiCard,\n CardActions as MuiCardActions,\n CardActionArea as MuiCardActionArea,\n Tooltip as MuiTooltip,\n} from \"@mui/material\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Box } from \"../../Box\";\nimport { Button } from \"../../Button\";\nimport { ButtonContext } from \"../../ButtonContext\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\nimport { Heading5, Paragraph, Support } from \"../../Typography\";\nimport { MenuButton, MenuButtonProps } from \"../../MenuButton\";\nimport {\n ChevronDownIcon,\n ChevronUpIcon,\n MoreIcon,\n} from \"../../icons.generated\";\n\nexport const CARD_IMAGE_HEIGHT = \"64px\";\n\nexport type DataCardProps = {\n children?: ReactNode;\n description?: string;\n detailPanel?: ReactNode;\n image?: ReactElement;\n overline?: string;\n title?: string;\n} & (\n | {\n Accessory?: never;\n button?: never;\n menuButtonChildren?: never;\n onClick: MouseEventHandler;\n }\n | {\n Accessory?: ReactNode;\n button?: ReactElement<typeof Button>;\n menuButtonChildren?: MenuButtonProps[\"children\"];\n onClick?: never;\n }\n);\n\nconst AccessoryContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing2,\n}));\n\nconst ImageContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasMenuButtonChildren\",\n})<{\n odysseyDesignTokens: DesignTokens;\n hasMenuButtonChildren: boolean;\n}>(({ odysseyDesignTokens, hasMenuButtonChildren }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n maxHeight: `${CARD_IMAGE_HEIGHT}`,\n marginBlockEnd: odysseyDesignTokens.Spacing5,\n paddingRight: hasMenuButtonChildren ? odysseyDesignTokens.Spacing5 : 0,\n}));\n\nconst MenuButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n position: \"absolute\",\n right: odysseyDesignTokens.Spacing3,\n top: odysseyDesignTokens.Spacing3,\n}));\n\nconst CardContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing3,\n}));\n\nconst CardChildrenContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n [\"&:not(:first-child)\"]: {\n marginBlockStart: odysseyDesignTokens.Spacing3,\n },\n}));\n\nconst buttonProviderValue = { isFullWidth: true };\n\nconst DataCard = ({\n Accessory: AccessoryProp,\n button,\n children,\n description,\n detailPanel,\n image,\n menuButtonChildren,\n onClick,\n overline,\n title,\n}: DataCardProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const [isDetailPanelOpen, setIsDetailPanelOpen] = useState<boolean>(false);\n\n const Accessory = useMemo(\n () => (\n <AccessoryContainer odysseyDesignTokens={odysseyDesignTokens}>\n {AccessoryProp}\n {detailPanel && (\n <MuiTooltip\n title={\n isDetailPanelOpen\n ? t(\"table.rowexpansion.collapse\")\n : t(\"table.rowexpansion.expand\")\n }\n >\n <MuiIconButton\n children={\n isDetailPanelOpen ? <ChevronUpIcon /> : <ChevronDownIcon />\n }\n onClick={() => setIsDetailPanelOpen(!isDetailPanelOpen)}\n aria-label={\n isDetailPanelOpen\n ? t(\"table.rowexpansion.collapse\")\n : t(\"table.rowexpansion.expand\")\n }\n />\n </MuiTooltip>\n )}\n </AccessoryContainer>\n ),\n [AccessoryProp, detailPanel, isDetailPanelOpen, odysseyDesignTokens, t],\n );\n\n const cardContent = useMemo(\n () => (\n <CardContentContainer odysseyDesignTokens={odysseyDesignTokens}>\n {(AccessoryProp || detailPanel) && <Box>{Accessory}</Box>}\n <Box>\n {image && (\n <ImageContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasMenuButtonChildren={Boolean(menuButtonChildren)}\n >\n {image}\n </ImageContainer>\n )}\n\n {overline && <Support component=\"div\">{overline}</Support>}\n {title && <Heading5 component=\"div\">{title}</Heading5>}\n {description && (\n <Paragraph color=\"textSecondary\">{description}</Paragraph>\n )}\n\n {button && (\n <MuiCardActions>\n <ButtonContext.Provider value={buttonProviderValue}>\n {button}\n </ButtonContext.Provider>\n </MuiCardActions>\n )}\n\n {children && (\n <CardChildrenContainer odysseyDesignTokens={odysseyDesignTokens}>\n {children}\n </CardChildrenContainer>\n )}\n\n {detailPanel && isDetailPanelOpen && (\n <CardChildrenContainer odysseyDesignTokens={odysseyDesignTokens}>\n {detailPanel}\n </CardChildrenContainer>\n )}\n </Box>\n </CardContentContainer>\n ),\n [\n odysseyDesignTokens,\n AccessoryProp,\n detailPanel,\n Accessory,\n image,\n menuButtonChildren,\n overline,\n title,\n description,\n button,\n children,\n isDetailPanelOpen,\n ],\n );\n\n return (\n <MuiCard\n className={`${onClick ? \"isClickable\" : \"\"} ${Accessory ? \"hasAccessory\" : \"\"}`}\n >\n {onClick ? (\n <MuiCardActionArea onClick={onClick}>{cardContent}</MuiCardActionArea>\n ) : (\n cardContent\n )}\n\n {menuButtonChildren && (\n <MenuButtonContainer odysseyDesignTokens={odysseyDesignTokens}>\n <MenuButton\n endIcon={<MoreIcon />}\n ariaLabel={t(\"table.moreactions.arialabel\")}\n buttonVariant=\"floating\"\n menuAlignment=\"right\"\n size=\"small\"\n tooltipText={t(\"table.actions\")}\n >\n {menuButtonChildren}\n </MenuButton>\n </MenuButtonContainer>\n )}\n </MuiCard>\n );\n};\n\nconst MemoizedDataCard = memo(DataCard);\nMemoizedDataCard.displayName = \"DataCard\";\n\nexport { MemoizedDataCard as DataCard };\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,IAAI,EACJC,OAAO,EAEPC,QAAQ,QACH,OAAO;AAQd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAEtCC,GAAG;AAAA,SAEHC,aAAa;AAAA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Ed,CAAC;AAED,MAAMyB,gBAAgB,GAAG9E,IAAI,CAAC6C,QAAQ,CAAC;AACvCiC,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIjC,QAAQ"}
|
|
@@ -14,6 +14,8 @@ import { memo, useMemo } from "react";
|
|
|
14
14
|
import { DataView } from "./DataView.js";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
const DataTable = ({
|
|
17
|
+
additionalActionButton,
|
|
18
|
+
additionalActionMenuItems,
|
|
17
19
|
bulkActionMenuItems,
|
|
18
20
|
columns,
|
|
19
21
|
currentPage,
|
|
@@ -49,7 +51,7 @@ const DataTable = ({
|
|
|
49
51
|
searchDelayTime,
|
|
50
52
|
totalRows
|
|
51
53
|
}) => {
|
|
52
|
-
const
|
|
54
|
+
const tableLayoutOptions = useMemo(() => ({
|
|
53
55
|
columns,
|
|
54
56
|
hasChangeableDensity,
|
|
55
57
|
hasColumnResizing,
|
|
@@ -61,6 +63,8 @@ const DataTable = ({
|
|
|
61
63
|
rowActionMenuItems
|
|
62
64
|
}), [columns, hasChangeableDensity, hasColumnResizing, hasColumnVisibility, hasSorting, initialDensity, renderDetailPanel, rowActionButtons, rowActionMenuItems]);
|
|
63
65
|
return _jsx(DataView, {
|
|
66
|
+
additionalActionButton: additionalActionButton,
|
|
67
|
+
additionalActionMenuItems: additionalActionMenuItems,
|
|
64
68
|
availableLayouts: ["table"],
|
|
65
69
|
bulkActionMenuItems: bulkActionMenuItems,
|
|
66
70
|
currentPage: currentPage,
|
|
@@ -86,7 +90,7 @@ const DataTable = ({
|
|
|
86
90
|
paginationType: paginationType,
|
|
87
91
|
resultsPerPage: resultsPerPage,
|
|
88
92
|
searchDelayTime: searchDelayTime,
|
|
89
|
-
|
|
93
|
+
tableLayoutOptions: tableLayoutOptions,
|
|
90
94
|
totalRows: totalRows
|
|
91
95
|
});
|
|
92
96
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.js","names":["memo","useMemo","DataView","jsx","_jsx","DataTable","additionalActionButton","additionalActionMenuItems","bulkActionMenuItems","columns","currentPage","emptyPlaceholder","errorMessage","filters","getData","hasChangeableDensity","hasColumnResizing","hasColumnVisibility","initialDensity","hasFilters","hasPagination","hasRowReordering","hasRowSelection","hasSearch","hasSearchSubmitButton","hasSorting","isLoading","isEmpty","isNoResults","isPaginationMoreDisabled","isRowReorderingDisabled","maxResultsPerPage","maxPages","noResultsPlaceholder","onChangeRowSelection","paginationType","renderDetailPanel","resultsPerPage","rowActionButtons","rowActionMenuItems","searchDelayTime","totalRows","tableLayoutOptions","availableLayouts","MemoizedDataTable","displayName"],"sources":["../../../src/labs/DataView/DataTable.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useMemo } from \"react\";\n\nimport { DataView } from \"./DataView\";\nimport { TableLayoutProps, UniversalProps } from \"./componentTypes\";\n\nexport type DataTableProps = UniversalProps & TableLayoutProps;\n\nconst DataTable = ({\n additionalActionButton,\n additionalActionMenuItems,\n bulkActionMenuItems,\n columns,\n currentPage,\n emptyPlaceholder,\n errorMessage,\n filters,\n getData,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n initialDensity,\n hasFilters,\n hasPagination,\n hasRowReordering,\n hasRowSelection,\n hasSearch,\n hasSearchSubmitButton,\n hasSorting,\n isLoading,\n isEmpty,\n isNoResults,\n isPaginationMoreDisabled,\n isRowReorderingDisabled,\n maxResultsPerPage,\n maxPages,\n noResultsPlaceholder,\n onChangeRowSelection,\n paginationType,\n renderDetailPanel,\n resultsPerPage,\n rowActionButtons,\n rowActionMenuItems,\n searchDelayTime,\n totalRows,\n}: DataTableProps) => {\n const tableLayoutOptions = useMemo(\n () => ({\n columns,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasSorting,\n initialDensity,\n renderDetailPanel,\n rowActionButtons,\n rowActionMenuItems,\n }),\n [\n columns,\n hasChangeableDensity,\n hasColumnResizing,\n hasColumnVisibility,\n hasSorting,\n initialDensity,\n renderDetailPanel,\n rowActionButtons,\n rowActionMenuItems,\n ],\n );\n\n return (\n <DataView\n additionalActionButton={additionalActionButton}\n additionalActionMenuItems={additionalActionMenuItems}\n availableLayouts={[\"table\"]}\n bulkActionMenuItems={bulkActionMenuItems}\n currentPage={currentPage}\n emptyPlaceholder={emptyPlaceholder}\n errorMessage={errorMessage}\n filters={filters}\n getData={getData}\n hasFilters={hasFilters}\n hasPagination={hasPagination}\n hasRowReordering={hasRowReordering}\n hasRowSelection={hasRowSelection}\n hasSearch={hasSearch}\n hasSearchSubmitButton={hasSearchSubmitButton}\n isEmpty={isEmpty}\n isLoading={isLoading}\n isNoResults={isNoResults}\n isPaginationMoreDisabled={isPaginationMoreDisabled}\n isRowReorderingDisabled={isRowReorderingDisabled}\n maxPages={maxPages}\n maxResultsPerPage={maxResultsPerPage}\n noResultsPlaceholder={noResultsPlaceholder}\n onChangeRowSelection={onChangeRowSelection}\n paginationType={paginationType}\n resultsPerPage={resultsPerPage}\n searchDelayTime={searchDelayTime}\n tableLayoutOptions={tableLayoutOptions}\n totalRows={totalRows}\n />\n );\n};\n\nconst MemoizedDataTable = memo(DataTable);\nMemoizedDataTable.displayName = \"DataTable\";\n\nexport { MemoizedDataTable as DataTable };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAAC,SAE7BC,QAAQ;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