@okta/odyssey-react-mui 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/Autocomplete.js +30 -191
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Box.js +2 -0
- package/dist/Box.js.map +1 -1
- package/dist/Card.js +1 -0
- package/dist/Card.js.map +1 -1
- package/dist/OdysseyDesignTokensContext.js +3 -2
- package/dist/OdysseyDesignTokensContext.js.map +1 -1
- package/dist/OdysseyProvider.js +9 -7
- package/dist/OdysseyProvider.js.map +1 -1
- package/dist/OdysseyThemeProvider.js +33 -13
- package/dist/OdysseyThemeProvider.js.map +1 -1
- package/dist/Pagination/Pagination.js +46 -14
- package/dist/Pagination/Pagination.js.map +1 -1
- package/dist/Surface.js +4 -1
- package/dist/Surface.js.map +1 -1
- package/dist/Tag.js +42 -27
- package/dist/Tag.js.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/index.scss +1 -1
- package/dist/labs/AppTile.js +137 -39
- package/dist/labs/AppTile.js.map +1 -1
- package/dist/labs/DataView/CardLayoutContent.js +7 -8
- package/dist/labs/DataView/CardLayoutContent.js.map +1 -1
- package/dist/labs/DataView/DataCard.js +96 -43
- package/dist/labs/DataView/DataCard.js.map +1 -1
- package/dist/labs/DataView/TableLayoutContent.js +3 -2
- package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/labs/DataView/componentTypes.js.map +1 -1
- package/dist/labs/DataView/index.js.map +1 -1
- package/dist/labs/OdysseyPickers/ComposablePicker.js +113 -0
- package/dist/labs/OdysseyPickers/ComposablePicker.js.map +1 -0
- package/dist/labs/OdysseyPickers/Picker.js +261 -0
- package/dist/labs/OdysseyPickers/Picker.js.map +1 -0
- package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js +132 -0
- package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js.map +1 -0
- package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js +291 -0
- package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -0
- package/dist/{src/createShadowDomElements.d.ts → labs/OdysseyPickers/index.js} +4 -7
- package/dist/labs/OdysseyPickers/index.js.map +1 -0
- package/dist/labs/PageTemplate.js +14 -10
- package/dist/labs/PageTemplate.js.map +1 -1
- package/dist/labs/SideNav/CollapseIcon.js +11 -25
- package/dist/labs/SideNav/CollapseIcon.js.map +1 -1
- package/dist/labs/SideNav/HandleIcon.js +32 -0
- package/dist/labs/SideNav/HandleIcon.js.map +1 -0
- package/dist/labs/{NavAccordion.js → SideNav/NavAccordion.js} +35 -6
- package/dist/labs/SideNav/NavAccordion.js.map +1 -0
- package/dist/labs/SideNav/OktaAura.js +32 -0
- package/dist/labs/SideNav/OktaAura.js.map +1 -0
- package/dist/labs/SideNav/OktaLogo.js +6 -9
- package/dist/labs/SideNav/OktaLogo.js.map +1 -1
- package/dist/labs/SideNav/SideNav.js +239 -169
- package/dist/labs/SideNav/SideNav.js.map +1 -1
- package/dist/labs/SideNav/SideNavFooterContent.js +32 -18
- package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavHeader.js +48 -37
- package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
- package/dist/labs/SideNav/SideNavItemContent.js +100 -58
- package/dist/labs/SideNav/SideNavItemContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavItemContentContext.js +19 -0
- package/dist/labs/SideNav/SideNavItemContentContext.js.map +1 -0
- package/dist/labs/SideNav/SideNavItemLinkContent.js +14 -13
- package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -1
- package/dist/labs/SideNav/SideNavLogo.js +42 -0
- package/dist/labs/SideNav/SideNavLogo.js.map +1 -0
- package/dist/labs/SideNav/SideNavToggleButton.js +170 -0
- package/dist/labs/SideNav/SideNavToggleButton.js.map +1 -0
- package/dist/labs/SideNav/types.js.map +1 -1
- package/dist/labs/TopNav/TopNav.js +65 -0
- package/dist/labs/TopNav/TopNav.js.map +1 -0
- package/dist/labs/TopNav/TopNavLinksList.js +38 -0
- package/dist/labs/TopNav/TopNavLinksList.js.map +1 -0
- package/dist/labs/TopNav/TopNavListItem.js +132 -0
- package/dist/labs/TopNav/TopNavListItem.js.map +1 -0
- package/dist/labs/TopNav/UserProfile.js +65 -0
- package/dist/labs/TopNav/UserProfile.js.map +1 -0
- package/dist/labs/TopNav/index.js +14 -0
- package/dist/labs/TopNav/index.js.map +1 -0
- package/dist/labs/UiShell/UiShell.js +68 -0
- package/dist/labs/UiShell/UiShell.js.map +1 -0
- package/dist/labs/UiShell/UiShellContent.js +114 -0
- package/dist/labs/UiShell/UiShellContent.js.map +1 -0
- package/dist/labs/UiShell/bufferLatest.js +37 -0
- package/dist/labs/UiShell/bufferLatest.js.map +1 -0
- package/dist/labs/UiShell/createMessageBus.js +30 -0
- package/dist/labs/UiShell/createMessageBus.js.map +1 -0
- package/dist/labs/UiShell/createStore.js +24 -0
- package/dist/labs/UiShell/createStore.js.map +1 -0
- package/dist/labs/UiShell/index.js +15 -0
- package/dist/labs/UiShell/index.js.map +1 -0
- package/dist/labs/UiShell/renderUiShell.js +78 -0
- package/dist/labs/UiShell/renderUiShell.js.map +1 -0
- package/dist/labs/UiShell/useHasUiShell.js +22 -0
- package/dist/labs/UiShell/useHasUiShell.js.map +1 -0
- package/dist/labs/UiShell/useScrollState.js +41 -0
- package/dist/labs/UiShell/useScrollState.js.map +1 -0
- package/dist/labs/index.js +5 -3
- package/dist/labs/index.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui.js +7 -1
- package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_da.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_de.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_el.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_es.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_fr.js +5 -3
- package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_id.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_it.js +4 -2
- package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ja.js +9 -7
- package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_th.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_tr.js +4 -2
- package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js +3 -1
- package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/src/Autocomplete.d.ts +21 -22
- package/dist/src/Autocomplete.d.ts.map +1 -1
- package/dist/src/Box.d.ts +3 -1
- package/dist/src/Box.d.ts.map +1 -1
- package/dist/src/Card.d.ts.map +1 -1
- package/dist/src/OdysseyDesignTokensContext.d.ts +5 -4
- package/dist/src/OdysseyDesignTokensContext.d.ts.map +1 -1
- package/dist/src/OdysseyProvider.d.ts +3 -3
- package/dist/src/OdysseyProvider.d.ts.map +1 -1
- package/dist/src/OdysseyThemeProvider.d.ts +10 -12
- package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
- package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
- package/dist/src/Pagination/Pagination.d.ts +21 -7
- package/dist/src/Pagination/Pagination.d.ts.map +1 -1
- package/dist/src/Surface.d.ts.map +1 -1
- package/dist/src/Tag.d.ts +5 -2
- package/dist/src/Tag.d.ts.map +1 -1
- package/dist/src/index.d.ts +6 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/labs/AppTile.d.ts +3 -1
- package/dist/src/labs/AppTile.d.ts.map +1 -1
- package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/DataCard.d.ts +9 -3
- package/dist/src/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts +1 -1
- package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/src/labs/DataView/index.d.ts +1 -0
- package/dist/src/labs/DataView/index.d.ts.map +1 -1
- package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts +33 -0
- package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/Picker.d.ts +98 -0
- package/dist/src/labs/OdysseyPickers/Picker.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts +17 -0
- package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts +26 -0
- package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -0
- package/dist/src/labs/OdysseyPickers/index.d.ts +15 -0
- package/dist/src/labs/OdysseyPickers/index.d.ts.map +1 -0
- package/dist/src/labs/PageTemplate.d.ts +1 -1
- package/dist/src/labs/PageTemplate.d.ts.map +1 -1
- package/dist/src/labs/SideNav/CollapseIcon.d.ts +1 -4
- package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -1
- package/dist/src/labs/SideNav/HandleIcon.d.ts +14 -0
- package/dist/src/labs/SideNav/HandleIcon.d.ts.map +1 -0
- package/dist/src/labs/{NavAccordion.d.ts → SideNav/NavAccordion.d.ts} +6 -2
- package/dist/src/labs/SideNav/NavAccordion.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaAura.d.ts +14 -0
- package/dist/src/labs/SideNav/OktaAura.d.ts.map +1 -0
- package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNav.d.ts +2 -1
- package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavHeader.d.ts +12 -3
- package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts +2 -3
- package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts +18 -0
- package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +1 -1
- package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
- package/dist/src/labs/SideNav/SideNavLogo.d.ts +15 -0
- package/dist/src/labs/SideNav/SideNavLogo.d.ts.map +1 -0
- package/dist/src/labs/SideNav/SideNavToggleButton.d.ts +38 -0
- package/dist/src/labs/SideNav/SideNavToggleButton.d.ts.map +1 -0
- package/dist/src/labs/SideNav/types.d.ts +67 -33
- package/dist/src/labs/SideNav/types.d.ts.map +1 -1
- package/dist/src/labs/TopNav/TopNav.d.ts +31 -0
- package/dist/src/labs/TopNav/TopNav.d.ts.map +1 -0
- package/dist/src/labs/TopNav/TopNavLinksList.d.ts +44 -0
- package/dist/src/labs/TopNav/TopNavLinksList.d.ts.map +1 -0
- package/dist/src/labs/TopNav/TopNavListItem.d.ts +42 -0
- package/dist/src/labs/TopNav/TopNavListItem.d.ts.map +1 -0
- package/dist/src/labs/TopNav/UserProfile.d.ts +29 -0
- package/dist/src/labs/TopNav/UserProfile.d.ts.map +1 -0
- package/dist/src/labs/TopNav/index.d.ts +14 -0
- package/dist/src/labs/TopNav/index.d.ts.map +1 -0
- package/dist/src/labs/UiShell/UiShell.d.ts +33 -0
- package/dist/src/labs/UiShell/UiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/UiShellContent.d.ts +47 -0
- package/dist/src/labs/UiShell/UiShellContent.d.ts.map +1 -0
- package/dist/src/labs/UiShell/bufferLatest.d.ts +31 -0
- package/dist/src/labs/UiShell/bufferLatest.d.ts.map +1 -0
- package/dist/src/labs/UiShell/createMessageBus.d.ts +24 -0
- package/dist/src/labs/UiShell/createMessageBus.d.ts.map +1 -0
- package/dist/src/labs/UiShell/createStore.d.ts +22 -0
- package/dist/src/labs/UiShell/createStore.d.ts.map +1 -0
- package/dist/src/labs/UiShell/index.d.ts +16 -0
- package/dist/src/labs/UiShell/index.d.ts.map +1 -0
- package/dist/src/labs/UiShell/renderUiShell.d.ts +45 -0
- package/dist/src/labs/UiShell/renderUiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/useHasUiShell.d.ts +13 -0
- package/dist/src/labs/UiShell/useHasUiShell.d.ts.map +1 -0
- package/dist/src/labs/UiShell/useScrollState.d.ts +16 -0
- package/dist/src/labs/UiShell/useScrollState.d.ts.map +1 -0
- package/dist/src/labs/index.d.ts +6 -2
- package/dist/src/labs/index.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui.d.ts +6 -0
- package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +2 -0
- package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/src/test-selectors/querySelector.d.ts +2 -2
- package/dist/src/theme/components.d.ts +3 -1
- package/dist/src/theme/components.d.ts.map +1 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts +2 -1
- package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
- package/dist/src/useAutocomplete.d.ts +29 -0
- package/dist/src/useAutocomplete.d.ts.map +1 -0
- package/dist/src/useContrastMode.d.ts +46 -0
- package/dist/src/useContrastMode.d.ts.map +1 -0
- package/dist/src/web-component/index.d.ts +14 -0
- package/dist/src/web-component/index.d.ts.map +1 -0
- package/dist/src/web-component/renderReactInWebComponent.d.ts +76 -0
- package/dist/src/web-component/renderReactInWebComponent.d.ts.map +1 -0
- package/dist/src/web-component/shadow-dom.d.ts +23 -0
- package/dist/src/web-component/shadow-dom.d.ts.map +1 -0
- package/dist/test-selectors/querySelector.js.map +1 -1
- package/dist/theme/components.js +36 -32
- package/dist/theme/components.js.map +1 -1
- package/dist/theme/createOdysseyMuiTheme.js +3 -2
- package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/useAutocomplete.js +105 -0
- package/dist/useAutocomplete.js.map +1 -0
- package/dist/useContrastMode.js +93 -0
- package/dist/useContrastMode.js.map +1 -0
- package/dist/web-component/index.js +14 -0
- package/dist/web-component/index.js.map +1 -0
- package/dist/web-component/renderReactInWebComponent.js +72 -0
- package/dist/web-component/renderReactInWebComponent.js.map +1 -0
- package/dist/{createShadowDomElements.js → web-component/shadow-dom.js} +10 -12
- package/dist/web-component/shadow-dom.js.map +1 -0
- package/jest.config.cjs +1 -1
- package/jest.setup.js +0 -3
- package/package.json +4 -3
- package/src/Autocomplete.tsx +40 -330
- package/src/Box.tsx +4 -2
- package/src/Card.tsx +1 -0
- package/src/OdysseyDesignTokensContext.tsx +6 -3
- package/src/OdysseyProvider.tsx +13 -8
- package/src/OdysseyThemeProvider.test.tsx +209 -0
- package/src/OdysseyThemeProvider.tsx +42 -26
- package/src/Pagination/Pagination.test.tsx +305 -0
- package/src/Pagination/Pagination.tsx +86 -38
- package/src/Surface.tsx +2 -1
- package/src/Tag.tsx +64 -39
- package/src/createUniqueAlphabeticalId.test.ts +1 -1
- package/src/createUniqueId.test.ts +1 -1
- package/src/index.ts +6 -7
- package/src/labs/AppTile.tsx +169 -40
- package/src/labs/DataView/CardLayoutContent.tsx +12 -14
- package/src/labs/DataView/DataCard.tsx +137 -69
- package/src/labs/DataView/DataView.test.tsx +6 -4
- package/src/labs/DataView/TableLayoutContent.tsx +6 -2
- package/src/labs/DataView/componentTypes.ts +1 -1
- package/src/labs/DataView/index.tsx +1 -0
- package/src/labs/OdysseyPickers/ComposablePicker.test.tsx +29 -0
- package/src/labs/OdysseyPickers/ComposablePicker.tsx +188 -0
- package/src/labs/OdysseyPickers/Picker.tsx +381 -0
- package/src/labs/OdysseyPickers/PickerVirtualizationListBox.tsx +191 -0
- package/src/labs/OdysseyPickers/PickerWithOptionAdornment.tsx +429 -0
- package/src/labs/OdysseyPickers/index.ts +15 -0
- package/src/labs/PageTemplate.tsx +18 -10
- package/src/labs/SideNav/CollapseIcon.tsx +14 -28
- package/src/labs/SideNav/HandleIcon.tsx +35 -0
- package/src/labs/{NavAccordion.tsx → SideNav/NavAccordion.tsx} +48 -8
- package/src/labs/SideNav/OktaAura.tsx +35 -0
- package/src/labs/SideNav/OktaLogo.tsx +5 -10
- package/src/labs/SideNav/SideNav.test.tsx +323 -0
- package/src/labs/SideNav/SideNav.tsx +291 -204
- package/src/labs/SideNav/SideNavFooterContent.tsx +36 -28
- package/src/labs/SideNav/SideNavHeader.tsx +62 -45
- package/src/labs/SideNav/SideNavItemContent.tsx +142 -62
- package/src/labs/SideNav/SideNavItemContentContext.tsx +27 -0
- package/src/labs/SideNav/SideNavItemLinkContent.tsx +17 -14
- package/src/labs/SideNav/SideNavLogo.tsx +41 -0
- package/src/labs/SideNav/SideNavToggleButton.tsx +249 -0
- package/src/labs/SideNav/types.ts +72 -33
- package/src/labs/TopNav/TopNav.tsx +95 -0
- package/src/labs/TopNav/TopNavLinksList.tsx +68 -0
- package/src/labs/TopNav/TopNavListItem.tsx +209 -0
- package/src/labs/TopNav/UserProfile.tsx +79 -0
- package/src/labs/TopNav/index.ts +14 -0
- package/src/labs/UiShell/UiShell.test.tsx +284 -0
- package/src/labs/UiShell/UiShell.tsx +109 -0
- package/src/labs/UiShell/UiShellContent.tsx +170 -0
- package/src/labs/UiShell/bufferLatest.test.ts +79 -0
- package/src/labs/UiShell/bufferLatest.ts +64 -0
- package/src/labs/UiShell/createMessageBus.test.ts +115 -0
- package/src/labs/UiShell/createMessageBus.ts +53 -0
- package/src/labs/UiShell/createStore.test.ts +103 -0
- package/src/labs/UiShell/createStore.ts +37 -0
- package/src/labs/UiShell/index.ts +17 -0
- package/src/labs/UiShell/renderUiShell.test.tsx +197 -0
- package/src/labs/UiShell/renderUiShell.tsx +132 -0
- package/src/labs/UiShell/useHasUiShell.ts +25 -0
- package/src/labs/UiShell/useScrollState.ts +56 -0
- package/src/labs/index.ts +10 -3
- package/src/properties/odyssey-react-mui.properties +7 -0
- package/src/properties/translations/odyssey-react-mui_cs.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_da.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_de.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_el.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_es.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_fi.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_fr.properties +4 -3
- package/src/properties/translations/odyssey-react-mui_ht.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_hu.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_id.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_it.properties +3 -2
- package/src/properties/translations/odyssey-react-mui_ja.properties +8 -7
- package/src/properties/translations/odyssey-react-mui_ko.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ms.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_nb.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_pl.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ro.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_ru.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_sv.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_th.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_tr.properties +3 -2
- package/src/properties/translations/odyssey-react-mui_uk.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_vi.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +2 -1
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +2 -1
- package/src/properties/ts/odyssey-react-mui.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ht.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
- package/src/test-selectors/querySelector.ts +1 -1
- package/src/theme/components.tsx +50 -33
- package/src/theme/createOdysseyMuiTheme.ts +4 -3
- package/src/theme/useContrastMode.test.tsx +503 -0
- package/src/useAutocomplete.tsx +183 -0
- package/src/useContrastMode.tsx +149 -0
- package/src/web-component/index.ts +14 -0
- package/src/web-component/renderReactInWebComponent.test.tsx +156 -0
- package/src/web-component/renderReactInWebComponent.ts +153 -0
- package/src/web-component/shadow-dom.test.ts +24 -0
- package/src/{createShadowDomElements.ts → web-component/shadow-dom.ts} +15 -14
- package/dist/ContrastModeProvider.js +0 -86
- package/dist/ContrastModeProvider.js.map +0 -1
- package/dist/createShadowDomElements.js.map +0 -1
- package/dist/labs/NavAccordion.js.map +0 -1
- package/dist/labs/TopNav.js +0 -281
- package/dist/labs/TopNav.js.map +0 -1
- package/dist/src/ContrastModeProvider.d.ts +0 -34
- package/dist/src/ContrastModeProvider.d.ts.map +0 -1
- package/dist/src/createShadowDomElements.d.ts.map +0 -1
- package/dist/src/labs/NavAccordion.d.ts.map +0 -1
- package/dist/src/labs/TopNav.d.ts +0 -78
- package/dist/src/labs/TopNav.d.ts.map +0 -1
- package/src/ContrastModeProvider.tsx +0 -131
- package/src/labs/TopNav.tsx +0 -396
package/dist/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","styled","TagListContext","MuiPropsContext","useOdysseyDesignTokens","CloseCircleFilledIcon","useContrastContext","jsx","_jsx","tagColorVariants","getChipColors","colorVariant","odysseyDesignTokens","contrastMode","colors","default","background","HueNeutral200","text","HueNeutral700","textDisabled","HueNeutral400","HueNeutral100","HueNeutral300","hover","active","border","deleteIcon","HueNeutral500","deleteIconHover","icon","iconDisabled","info","HueBlue200","HueBlue700","HueBlue400","HueBlue100","HueBlue300","HueBlue500","accentOne","HueAccentOne200","HueAccentOne700","HueAccentOne400","HueAccentOne100","HueAccentOne300","HueAccentOne500","accentTwo","HueAccentTwo200","HueAccentTwo800","HueAccentTwo400","HueAccentTwo100","HueAccentTwo700","HueAccentTwo300","HueAccentTwo500","accentThree","HueAccentThree200","HueAccentThree700","HueAccentThree400","HueAccentThree100","HueAccentThree300","HueAccentThree500","accentFour","HueAccentFour200","HueAccentFour700","HueAccentFour400","HueAccentFour100","HueAccentFour300","HueAccentFour500","StyledTag","_Chip","shouldForwardProp","prop","includes","clickable","backgroundColor","color","borderColor","Tag","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","as","Boolean","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { CloseCircleFilledIcon } from \"./icons.generated\";\nimport { useContrastContext, ContrastMode } from \"./ContrastModeProvider\";\n\nexport const tagColorVariants = [\n \"default\",\n \"info\",\n \"accentOne\",\n \"accentTwo\",\n \"accentThree\",\n \"accentFour\",\n] as const;\n\ntype TagColorVariant = (typeof tagColorVariants)[number];\n\nexport type TagProps = {\n icon?: ReactElement;\n isDisabled?: boolean;\n /**\n * The label text for the Tag\n */\n label: string;\n /**\n * Callback fired when the Tag is clicked\n */\n onClick?: MuiChipProps[\"onClick\"];\n /**\n * Callback fired when the remove button of the Tag is clicked\n */\n onRemove?: MuiChipProps[\"onDelete\"];\n /**\n * Color variant of the Tag, affecting its appearance\n */\n colorVariant?: TagColorVariant;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst getChipColors = (\n colorVariant: TagColorVariant,\n odysseyDesignTokens: DesignTokens,\n contrastMode: ContrastMode,\n) => {\n const colors = {\n default: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueNeutral200,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueNeutral100,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral300,\n }),\n hover: odysseyDesignTokens.HueNeutral200,\n active: odysseyDesignTokens.HueNeutral300,\n border: odysseyDesignTokens.HueNeutral200,\n deleteIcon: odysseyDesignTokens.HueNeutral500,\n deleteIconHover: odysseyDesignTokens.HueNeutral700,\n icon: odysseyDesignTokens.HueNeutral700,\n iconDisabled: odysseyDesignTokens.HueNeutral300,\n },\n info: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueBlue200,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueBlue100,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue300,\n }),\n hover: odysseyDesignTokens.HueBlue200,\n active: odysseyDesignTokens.HueBlue300,\n border: odysseyDesignTokens.HueBlue200,\n deleteIcon: odysseyDesignTokens.HueBlue500,\n deleteIconHover: odysseyDesignTokens.HueBlue700,\n icon: odysseyDesignTokens.HueBlue700,\n iconDisabled: odysseyDesignTokens.HueBlue300,\n },\n accentOne: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentOne200,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentOne100,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne300,\n }),\n hover: odysseyDesignTokens.HueAccentOne200,\n active: odysseyDesignTokens.HueAccentOne300,\n border: odysseyDesignTokens.HueAccentOne200,\n deleteIcon: odysseyDesignTokens.HueAccentOne500,\n deleteIconHover: odysseyDesignTokens.HueAccentOne700,\n icon: odysseyDesignTokens.HueAccentOne700,\n iconDisabled: odysseyDesignTokens.HueAccentOne300,\n },\n accentTwo: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo200,\n text: odysseyDesignTokens.HueAccentTwo800,\n textDisabled: odysseyDesignTokens.HueAccentTwo400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo100,\n text: odysseyDesignTokens.HueAccentTwo700,\n textDisabled: odysseyDesignTokens.HueAccentTwo300,\n }),\n hover: odysseyDesignTokens.HueAccentTwo200,\n active: odysseyDesignTokens.HueAccentTwo300,\n border: odysseyDesignTokens.HueAccentTwo200,\n deleteIcon: odysseyDesignTokens.HueAccentTwo500,\n deleteIconHover: odysseyDesignTokens.HueAccentTwo700,\n icon: odysseyDesignTokens.HueAccentTwo700,\n iconDisabled: odysseyDesignTokens.HueAccentTwo300,\n },\n accentThree: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentThree200,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentThree100,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree300,\n }),\n hover: odysseyDesignTokens.HueAccentThree200,\n active: odysseyDesignTokens.HueAccentThree300,\n border: odysseyDesignTokens.HueAccentThree200,\n deleteIcon: odysseyDesignTokens.HueAccentThree500,\n deleteIconHover: odysseyDesignTokens.HueAccentThree700,\n icon: odysseyDesignTokens.HueAccentThree700,\n iconDisabled: odysseyDesignTokens.HueAccentThree300,\n },\n accentFour: {\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentFour200,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour400,\n }),\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentFour100,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour300,\n }),\n hover: odysseyDesignTokens.HueAccentFour200,\n active: odysseyDesignTokens.HueAccentFour300,\n border: odysseyDesignTokens.HueAccentFour200,\n deleteIcon: odysseyDesignTokens.HueAccentFour500,\n deleteIconHover: odysseyDesignTokens.HueAccentFour700,\n icon: odysseyDesignTokens.HueAccentFour700,\n iconDisabled: odysseyDesignTokens.HueAccentFour300,\n },\n };\n\n return colors[colorVariant] || colors.default;\n};\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) =>\n ![\"colorVariant\", \"contrastMode\", \"odysseyDesignTokens\"].includes(\n prop as string,\n ),\n})<{\n colorVariant: TagColorVariant;\n contrastMode: ContrastMode;\n odysseyDesignTokens: DesignTokens;\n as?: React.ElementType; // Allow the 'as' prop to be forwarded\n clickable?: boolean;\n}>(({ colorVariant, contrastMode, odysseyDesignTokens, clickable }) => {\n const colors = getChipColors(colorVariant, odysseyDesignTokens, contrastMode);\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n\n ...(clickable === true && {\n borderColor: colors.border,\n }),\n\n ...(clickable === false && {\n borderColor: \"transparent\",\n }),\n\n \"&.MuiChip-clickable:hover\": {\n backgroundColor: colors.hover,\n },\n\n \"&.MuiChip-clickable:active\": {\n backgroundColor: colors.active,\n },\n\n \"&.Mui-disabled\": {\n color: colors.textDisabled,\n borderColor: colors.border,\n \"& .MuiChip-icon, & .MuiChip-deleteIcon\": {\n color: colors.iconDisabled,\n },\n },\n\n \"& .MuiChip-icon\": {\n color: colors.icon,\n },\n \"& .MuiChip-deleteIcon\": {\n color: colors.deleteIcon,\n \"&:hover\": {\n color: colors.deleteIconHover,\n },\n },\n };\n});\n\nconst Tag = ({\n colorVariant = \"default\",\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { chipElementType } = useContext(TagListContext);\n const { contrastMode } = useContrastContext();\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <StyledTag\n {...muiProps}\n as={chipElementType}\n aria-disabled={isDisabled}\n clickable={Boolean(onClick)}\n data-se={testId}\n colorVariant={colorVariant}\n odysseyDesignTokens={odysseyDesignTokens}\n contrastMode=\"highContrast\"\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n deleteIcon={<CloseCircleFilledIcon />}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n colorVariant,\n odysseyDesignTokens,\n contrastMode,\n ],\n );\n\n return <MuiPropsContext.Consumer>{renderTag}</MuiPropsContext.Consumer>;\n};\n\nconst MemoizedTag = memo(Tag);\nMemoizedTag.displayName = \"Tag\";\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAg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,MAAM+E,SAAS,GAAGtF,WAAW,CAC1BuF,QAA6B,IAC5B9E,IAAA,CAAC4D,SAAS;IAAA,GACJkB,QAAQ;IACZC,EAAE,EAAEH,eAAgB;IACpB,iBAAeN,UAAW;IAC1BL,SAAS,EAAEe,OAAO,CAACR,OAAO,CAAE;IAC5B,WAASE,MAAO;IAChBvE,YAAY,EAAEA,YAAa;IAC3BC,mBAAmB,EAAEA,mBAAoB;IACzCC,YAAY,EAAC,cAAc;IAC3B4E,QAAQ,EAAEX,UAAW;IACrBhD,IAAI,EAAEA,IAAK;IACXiD,KAAK,EAAEA,KAAM;IACbC,OAAO,EAAEA,OAAQ;IACjBU,QAAQ,EAAET,QAAS;IACnBtD,UAAU,EAAEnB,IAAA,CAACH,qBAAqB,IAAE,CAAE;IACtC8E,SAAS,EAAEA;EAAU,CACtB,CACF,EACD,CACEC,eAAe,EACftD,IAAI,EACJgD,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,SAAS,EACTxE,YAAY,EACZC,mBAAmB,EACnBC,YAAY,CAEhB,CAAC;EAED,OAAOL,IAAA,CAACL,eAAe,CAACwF,QAAQ;IAAAC,QAAA,EAAEP;EAAS,CAA2B,CAAC;AACzE,CAAC;AAED,MAAMQ,WAAW,GAAG/F,IAAI,CAAC+E,GAAG,CAAC;AAC7BgB,WAAW,CAACC,WAAW,GAAG,KAAK;AAE/B,SAASD,WAAW,IAAIhB,GAAG"}
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","styled","CloseCircleFilledIcon","MuiPropsContext","useOdysseyDesignTokens","TagListContext","useContrastModeContext","jsx","_jsx","tagSizeValues","tagColorVariants","getChipColors","colorVariant","contrastMode","odysseyDesignTokens","colors","default","background","HueNeutral200","text","HueNeutral700","textDisabled","HueNeutral400","HueNeutral100","HueNeutral300","hover","active","border","deleteIcon","HueNeutral500","deleteIconHover","icon","iconDisabled","info","HueBlue200","HueBlue700","HueBlue400","HueBlue100","HueBlue300","HueBlue500","accentOne","HueAccentOne200","HueAccentOne700","HueAccentOne400","HueAccentOne100","HueAccentOne300","HueAccentOne500","accentTwo","HueAccentTwo200","HueAccentTwo800","HueAccentTwo400","HueAccentTwo100","HueAccentTwo700","HueAccentTwo300","HueAccentTwo500","accentThree","HueAccentThree200","HueAccentThree700","HueAccentThree400","HueAccentThree100","HueAccentThree300","HueAccentThree500","accentFour","HueAccentFour200","HueAccentFour700","HueAccentFour400","HueAccentFour100","HueAccentFour300","HueAccentFour500","StyledTag","_Chip","shouldForwardProp","prop","includes","clickable","size","backgroundColor","color","borderColor","paddingBlock","Spacing1","Tag","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","as","Boolean","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport { CloseCircleFilledIcon } from \"./icons.generated\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { TagListContext } from \"./TagListContext\";\nimport { ContrastMode, useContrastModeContext } from \"./useContrastMode\";\n\nconst tagSizeValues = [\"medium\", \"small\"] as const;\n\nexport const tagColorVariants = [\n \"accentFour\",\n \"accentOne\",\n \"accentThree\",\n \"accentTwo\",\n \"default\",\n \"info\",\n] as const;\n\ntype TagColorVariant = (typeof tagColorVariants)[number];\ntype TagSize = (typeof tagSizeValues)[number];\n\nexport type TagProps = {\n icon?: ReactElement;\n isDisabled?: boolean;\n /**\n * The label text for the Tag\n */\n label: string;\n /**\n * Callback fired when the Tag is clicked\n */\n onClick?: MuiChipProps[\"onClick\"];\n /**\n * Callback fired when the remove button of the Tag is clicked\n */\n onRemove?: MuiChipProps[\"onDelete\"];\n /**\n * Color variant of the Tag, affecting its appearance\n */\n colorVariant?: TagColorVariant;\n /*\n * Size variant of the Tag\n */\n size?: TagSize;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst getChipColors = ({\n colorVariant,\n contrastMode,\n odysseyDesignTokens,\n}: {\n colorVariant: TagColorVariant;\n contrastMode: ContrastMode;\n odysseyDesignTokens: DesignTokens;\n}) => {\n const colors = {\n default: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueNeutral200,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueNeutral100,\n text: odysseyDesignTokens.HueNeutral700,\n textDisabled: odysseyDesignTokens.HueNeutral300,\n }),\n hover: odysseyDesignTokens.HueNeutral200,\n active: odysseyDesignTokens.HueNeutral300,\n border: odysseyDesignTokens.HueNeutral200,\n deleteIcon: odysseyDesignTokens.HueNeutral500,\n deleteIconHover: odysseyDesignTokens.HueNeutral700,\n icon: odysseyDesignTokens.HueNeutral700,\n iconDisabled: odysseyDesignTokens.HueNeutral300,\n },\n info: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueBlue200,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueBlue100,\n text: odysseyDesignTokens.HueBlue700,\n textDisabled: odysseyDesignTokens.HueBlue300,\n }),\n hover: odysseyDesignTokens.HueBlue200,\n active: odysseyDesignTokens.HueBlue300,\n border: odysseyDesignTokens.HueBlue200,\n deleteIcon: odysseyDesignTokens.HueBlue500,\n deleteIconHover: odysseyDesignTokens.HueBlue700,\n icon: odysseyDesignTokens.HueBlue700,\n iconDisabled: odysseyDesignTokens.HueBlue300,\n },\n accentOne: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentOne200,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentOne100,\n text: odysseyDesignTokens.HueAccentOne700,\n textDisabled: odysseyDesignTokens.HueAccentOne300,\n }),\n hover: odysseyDesignTokens.HueAccentOne200,\n active: odysseyDesignTokens.HueAccentOne300,\n border: odysseyDesignTokens.HueAccentOne200,\n deleteIcon: odysseyDesignTokens.HueAccentOne500,\n deleteIconHover: odysseyDesignTokens.HueAccentOne700,\n icon: odysseyDesignTokens.HueAccentOne700,\n iconDisabled: odysseyDesignTokens.HueAccentOne300,\n },\n accentTwo: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo200,\n text: odysseyDesignTokens.HueAccentTwo800,\n textDisabled: odysseyDesignTokens.HueAccentTwo400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentTwo100,\n text: odysseyDesignTokens.HueAccentTwo700,\n textDisabled: odysseyDesignTokens.HueAccentTwo300,\n }),\n hover: odysseyDesignTokens.HueAccentTwo200,\n active: odysseyDesignTokens.HueAccentTwo300,\n border: odysseyDesignTokens.HueAccentTwo200,\n deleteIcon: odysseyDesignTokens.HueAccentTwo500,\n deleteIconHover: odysseyDesignTokens.HueAccentTwo700,\n icon: odysseyDesignTokens.HueAccentTwo700,\n iconDisabled: odysseyDesignTokens.HueAccentTwo300,\n },\n accentThree: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentThree200,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentThree100,\n text: odysseyDesignTokens.HueAccentThree700,\n textDisabled: odysseyDesignTokens.HueAccentThree300,\n }),\n hover: odysseyDesignTokens.HueAccentThree200,\n active: odysseyDesignTokens.HueAccentThree300,\n border: odysseyDesignTokens.HueAccentThree200,\n deleteIcon: odysseyDesignTokens.HueAccentThree500,\n deleteIconHover: odysseyDesignTokens.HueAccentThree700,\n icon: odysseyDesignTokens.HueAccentThree700,\n iconDisabled: odysseyDesignTokens.HueAccentThree300,\n },\n accentFour: {\n ...(contrastMode === \"highContrast\" && {\n background: odysseyDesignTokens.HueAccentFour200,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour400,\n }),\n ...(contrastMode === \"lowContrast\" && {\n background: odysseyDesignTokens.HueAccentFour100,\n text: odysseyDesignTokens.HueAccentFour700,\n textDisabled: odysseyDesignTokens.HueAccentFour300,\n }),\n hover: odysseyDesignTokens.HueAccentFour200,\n active: odysseyDesignTokens.HueAccentFour300,\n border: odysseyDesignTokens.HueAccentFour200,\n deleteIcon: odysseyDesignTokens.HueAccentFour500,\n deleteIconHover: odysseyDesignTokens.HueAccentFour700,\n icon: odysseyDesignTokens.HueAccentFour700,\n iconDisabled: odysseyDesignTokens.HueAccentFour300,\n },\n };\n\n return colors[colorVariant] || colors.default;\n};\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) =>\n ![\"colorVariant\", \"contrastMode\", \"odysseyDesignTokens\", \"size\"].includes(\n prop as string,\n ),\n})<{\n as?: React.ElementType; // Allow the 'as' prop to be forwarded\n clickable?: boolean;\n colorVariant: TagColorVariant;\n contrastMode: ContrastMode;\n odysseyDesignTokens: DesignTokens;\n size?: TagSize;\n}>(({ colorVariant, contrastMode, odysseyDesignTokens, clickable, size }) => {\n const colors = getChipColors({\n colorVariant,\n odysseyDesignTokens,\n contrastMode,\n });\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n\n ...(clickable === true && {\n borderColor: colors.border,\n }),\n\n ...(clickable === false && {\n borderColor: \"transparent\",\n }),\n\n ...(size === \"small\" && {\n paddingBlock: `calc(${odysseyDesignTokens.Spacing1})`,\n }),\n\n \"&.MuiChip-clickable:hover\": {\n backgroundColor: colors.hover,\n },\n\n \"&.MuiChip-clickable:active\": {\n backgroundColor: colors.active,\n },\n\n \"&.Mui-disabled\": {\n color: colors.textDisabled,\n borderColor: colors.border,\n \"& .MuiChip-icon, & .MuiChip-deleteIcon\": {\n color: colors.iconDisabled,\n },\n },\n\n \"& .MuiChip-icon\": {\n color: colors.icon,\n },\n\n \"& .MuiChip-deleteIcon\": {\n color: colors.deleteIcon,\n \"&:hover\": {\n color: colors.deleteIconHover,\n },\n },\n };\n});\n\nconst Tag = ({\n colorVariant = \"default\",\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n size = \"medium\",\n testId,\n translate,\n}: TagProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { chipElementType } = useContext(TagListContext);\n const { contrastMode } = useContrastModeContext();\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <StyledTag\n {...muiProps}\n aria-disabled={isDisabled}\n as={chipElementType}\n clickable={Boolean(onClick)}\n colorVariant={colorVariant}\n contrastMode={contrastMode}\n data-se={testId}\n deleteIcon={<CloseCircleFilledIcon />}\n disabled={isDisabled}\n icon={icon}\n label={label}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={onClick}\n onDelete={onRemove}\n size={size}\n translate={translate}\n />\n ),\n [\n chipElementType,\n colorVariant,\n contrastMode,\n icon,\n isDisabled,\n label,\n odysseyDesignTokens,\n onClick,\n onRemove,\n size,\n testId,\n translate,\n ],\n );\n\n return <MuiPropsContext.Consumer>{renderTag}</MuiPropsContext.Consumer>;\n};\n\nconst MemoizedTag = memo(Tag);\nMemoizedTag.displayName = \"Tag\";\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AACnE,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAE5BC,qBAAqB;AAAA,SAErBC,eAAe;AAAA,SAGtBC,sBAAsB;AAAA,SAEfC,cAAc;AAAA,SACAC,sBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE7C,MAAMC,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAElD,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACX,SAAS,EACT,MAAM,CACE;AA8BV,MAAMC,aAAa,GAAGA,CAAC;EACrBC,YAAY;EACZC,YAAY;EACZC;AAKF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAG;IACbC,OAAO,EAAE;MACP,IAAIH,YAAY,KAAK,cAAc,IAAI;QACrCI,UAAU,EAAEH,mBAAmB,CAACI,aAAa;QAC7CC,IAAI,EAAEL,mBAAmB,CAACM,aAAa;QACvCC,YAAY,EAAEP,mBAAmB,CAACQ;MACpC,CAAC,CAAC;MACF,IAAIT,YAAY,KAAK,aAAa,IAAI;QACpCI,UAAU,EAAEH,mBAAmB,CAACS,aAAa;QAC7CJ,IAAI,EAAEL,mBAAmB,CAACM,aAAa;QACvCC,YAAY,EAAEP,mBAAmB,CAACU;MACpC,CAAC,CAAC;MACFC,KAAK,EAAEX,mBAAmB,CAACI,aAAa;MACxCQ,MAAM,EAAEZ,mBAAmB,CAACU,aAAa;MACzCG,MAAM,EAAEb,mBAAmB,CAACI,aAAa;MACzCU,UAAU,EAAEd,mBAAmB,CAACe,aAAa;MAC7CC,eAAe,EAAEhB,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P;EAAS,CAA2B,CAAC;AACzE,CAAC;AAED,MAAMQ,WAAW,GAAGnG,IAAI,CAACmF,GAAG,CAAC;AAC7BgB,WAAW,CAACC,WAAW,GAAG,KAAK;AAE/B,SAASD,WAAW,IAAIhB,GAAG"}
|
package/dist/index.js
CHANGED
|
@@ -21,21 +21,19 @@ export * from "./Banner.js";
|
|
|
21
21
|
export * from "./Box.js";
|
|
22
22
|
export * from "./Breadcrumbs.js";
|
|
23
23
|
export * from "./Button.js";
|
|
24
|
-
export * from "./Card.js";
|
|
25
24
|
export * from "./Callout.js";
|
|
25
|
+
export * from "./Card.js";
|
|
26
26
|
export * from "./Checkbox.js";
|
|
27
27
|
export * from "./CheckboxGroup.js";
|
|
28
28
|
export * from "./CircularProgress.js";
|
|
29
|
-
export * from "./ContrastModeProvider.js";
|
|
30
|
-
export * from "./CssBaseline.js";
|
|
31
|
-
export * from "./createShadowDomElements.js";
|
|
32
29
|
export * from "./createUniqueId.js";
|
|
30
|
+
export * from "./CssBaseline.js";
|
|
33
31
|
export * from "./DataTable/index.js";
|
|
34
32
|
export * from "./Dialog.js";
|
|
35
33
|
export * from "./Drawer.js";
|
|
36
34
|
export * from "./EmptyState.js";
|
|
37
|
-
export * from "./Fieldset.js";
|
|
38
35
|
export * from "./FieldComponentProps.js";
|
|
36
|
+
export * from "./Fieldset.js";
|
|
39
37
|
export { FileUploader, fileUploadTypes, fileUploadVariants } from "./FileUploader/index.js";
|
|
40
38
|
export * from "./Form.js";
|
|
41
39
|
export * from "./HintLink.js";
|
|
@@ -49,6 +47,7 @@ export * from "./OdysseyCacheProvider.js";
|
|
|
49
47
|
export * from "./OdysseyProvider.js";
|
|
50
48
|
export * from "./OdysseyThemeProvider.js";
|
|
51
49
|
export * from "./OdysseyTranslationProvider.js";
|
|
50
|
+
export * from "./Pagination/index.js";
|
|
52
51
|
export * from "./PasswordField.js";
|
|
53
52
|
export * from "./Radio.js";
|
|
54
53
|
export * from "./RadioGroup.js";
|
|
@@ -58,6 +57,7 @@ export * from "./Select.js";
|
|
|
58
57
|
export * from "./Stack.js";
|
|
59
58
|
export * from "./Status.js";
|
|
60
59
|
export * from "./Surface.js";
|
|
60
|
+
export * from "./Switch.js";
|
|
61
61
|
export * from "./Tabs.js";
|
|
62
62
|
export * from "./Tag.js";
|
|
63
63
|
export * from "./TagList.js";
|
|
@@ -65,9 +65,8 @@ export * from "./TextField.js";
|
|
|
65
65
|
export * from "./theme/index.js";
|
|
66
66
|
export * from "./Toast.js";
|
|
67
67
|
export * from "./ToastStack.js";
|
|
68
|
-
export * from "./Switch.js";
|
|
69
68
|
export * from "./Tooltip.js";
|
|
70
69
|
export * from "./Typography.js";
|
|
71
70
|
export * from "./useUniqueId.js";
|
|
72
|
-
export * from "./
|
|
71
|
+
export * from "./web-component/index.js";
|
|
73
72
|
//# sourceMappingURL=index.js.map
|
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","FileUploader","fileUploadTypes","fileUploadVariants"],"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 /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\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 StackProps,\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 \"./
|
|
1
|
+
{"version":3,"file":"index.js","names":["deepmerge","visuallyHidden","createTheme","DialogContentText","Divider","InputAdornment","InputBase","ListItemIcon","ListItemText","ListSubheader","MenuList","Paper","ScopedCssBaseline","ThemeProvider","odysseyTranslate","useOdysseyDesignTokens","badgeContentMaxValues","FileUploader","fileUploadTypes","fileUploadVariants"],"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 /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\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 StackProps,\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 \"./Callout\";\nexport * from \"./Card\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./createUniqueId\";\nexport * from \"./CssBaseline\";\nexport * from \"./DataTable\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./EmptyState\";\nexport * from \"./FieldComponentProps\";\nexport * from \"./Fieldset\";\nexport {\n FileUploader,\n fileUploadTypes,\n fileUploadVariants,\n} from \"./FileUploader\";\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 \"./Pagination\";\nexport * from \"./PasswordField\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScreenReaderText\";\nexport * from \"./SearchField\";\nexport * from \"./Select\";\nexport * from \"./Stack\";\nexport * from \"./Status\";\nexport * from \"./Surface\";\nexport * from \"./Switch\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./TagList\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./Toast\";\nexport * from \"./ToastStack\";\nexport * from \"./Tooltip\";\nexport * from \"./Typography\";\nexport * from \"./useUniqueId\";\nexport * from \"./web-component\";\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,EAEjBC,aAAa,QACR,eAAe;AAAC,SAkBdC,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,SAmB5BC,YAAY,EACZC,eAAe,EACfC,kBAAkB;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
package/dist/labs/AppTile.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import _Card from "@mui/material/Card";
|
|
2
1
|
import _CardActionArea from "@mui/material/CardActionArea";
|
|
2
|
+
import _Card from "@mui/material/Card";
|
|
3
|
+
import _Skeleton from "@mui/material/Skeleton";
|
|
3
4
|
/*!
|
|
4
5
|
* Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
5
6
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -21,17 +22,20 @@ import { Box } from ".././Box.js";
|
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
export const APP_TILE_IMAGE_HEIGHT = "64px";
|
|
25
|
+
export const APP_TILE_PLACEHOLDER_IMAGE_WIDTH = "64px";
|
|
24
26
|
const ImageContainer = styled("div", {
|
|
25
|
-
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
27
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
26
28
|
})(({
|
|
27
|
-
odysseyDesignTokens
|
|
28
|
-
hasAction
|
|
29
|
+
odysseyDesignTokens
|
|
29
30
|
}) => ({
|
|
30
31
|
display: "flex",
|
|
31
32
|
alignItems: "flex-start",
|
|
32
33
|
maxHeight: APP_TILE_IMAGE_HEIGHT,
|
|
33
34
|
marginBlockEnd: odysseyDesignTokens.Spacing5,
|
|
34
|
-
|
|
35
|
+
["img"]: {
|
|
36
|
+
height: APP_TILE_IMAGE_HEIGHT,
|
|
37
|
+
maxWidth: "100%"
|
|
38
|
+
}
|
|
35
39
|
}));
|
|
36
40
|
const ActionContainer = styled("div", {
|
|
37
41
|
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
@@ -41,13 +45,23 @@ const ActionContainer = styled("div", {
|
|
|
41
45
|
alignItems: "center",
|
|
42
46
|
display: "flex",
|
|
43
47
|
minHeight: odysseyDesignTokens.Spacing6,
|
|
44
|
-
gap: odysseyDesignTokens.Spacing1,
|
|
45
48
|
position: "absolute",
|
|
46
|
-
right: odysseyDesignTokens.
|
|
47
|
-
top: odysseyDesignTokens.
|
|
49
|
+
right: odysseyDesignTokens.Spacing2,
|
|
50
|
+
top: odysseyDesignTokens.Spacing2,
|
|
51
|
+
gap: odysseyDesignTokens.Spacing1,
|
|
52
|
+
zIndex: 1,
|
|
53
|
+
["& > .MuiTypography-root:last-child"]: {
|
|
54
|
+
marginInlineEnd: odysseyDesignTokens.Spacing2
|
|
55
|
+
}
|
|
48
56
|
}));
|
|
49
|
-
const ContentContainer = styled("div"
|
|
50
|
-
|
|
57
|
+
const ContentContainer = styled("div", {
|
|
58
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "hasTopSection"
|
|
59
|
+
})(({
|
|
60
|
+
odysseyDesignTokens,
|
|
61
|
+
hasTopSection
|
|
62
|
+
}) => ({
|
|
63
|
+
alignItems: "flex-start",
|
|
64
|
+
paddingBlockStart: hasTopSection ? odysseyDesignTokens.Spacing4 : 0
|
|
51
65
|
}));
|
|
52
66
|
const ChildrenContainer = styled("div", {
|
|
53
67
|
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
@@ -58,6 +72,83 @@ const ChildrenContainer = styled("div", {
|
|
|
58
72
|
marginBlockStart: odysseyDesignTokens.Spacing3
|
|
59
73
|
}
|
|
60
74
|
}));
|
|
75
|
+
const LoadingTile = ({
|
|
76
|
+
image,
|
|
77
|
+
overline,
|
|
78
|
+
title,
|
|
79
|
+
description,
|
|
80
|
+
children,
|
|
81
|
+
hasTopSection
|
|
82
|
+
}) => {
|
|
83
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
84
|
+
return _jsx(_Card, {
|
|
85
|
+
className: "isClickable",
|
|
86
|
+
children: _jsxs(ContentContainer, {
|
|
87
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
88
|
+
hasTopSection: hasTopSection,
|
|
89
|
+
children: [hasTopSection && _jsx(ActionContainer, {
|
|
90
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
91
|
+
children: _jsx(Subordinate, {
|
|
92
|
+
children: _jsx(_Skeleton, {
|
|
93
|
+
width: 50
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
}), _jsxs(Box, {
|
|
97
|
+
sx: {
|
|
98
|
+
width: "100%"
|
|
99
|
+
},
|
|
100
|
+
children: [image && _jsx(ImageContainer, {
|
|
101
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
102
|
+
children: _jsx(_Skeleton, {
|
|
103
|
+
height: APP_TILE_IMAGE_HEIGHT,
|
|
104
|
+
width: APP_TILE_PLACEHOLDER_IMAGE_WIDTH,
|
|
105
|
+
variant: "rectangular"
|
|
106
|
+
})
|
|
107
|
+
}), overline && _jsx(Support, {
|
|
108
|
+
children: _jsx(_Skeleton, {})
|
|
109
|
+
}), title && _jsx(Heading5, {
|
|
110
|
+
children: _jsx(_Skeleton, {})
|
|
111
|
+
}), description && _jsx(Paragraph, {
|
|
112
|
+
children: _jsx(_Skeleton, {})
|
|
113
|
+
}), children && _jsx(ChildrenContainer, {
|
|
114
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
115
|
+
children: _jsx(_Skeleton, {
|
|
116
|
+
variant: "rounded",
|
|
117
|
+
width: "100%",
|
|
118
|
+
height: odysseyDesignTokens.Spacing6
|
|
119
|
+
})
|
|
120
|
+
})]
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const StyledMuiCard = styled(_Card, {
|
|
126
|
+
shouldForwardProp: prop => prop !== "odysseyDesignTokens"
|
|
127
|
+
})(({
|
|
128
|
+
odysseyDesignTokens
|
|
129
|
+
}) => ({
|
|
130
|
+
position: "relative",
|
|
131
|
+
boxShadow: "none",
|
|
132
|
+
overflow: "unset",
|
|
133
|
+
"&::after": {
|
|
134
|
+
position: "absolute",
|
|
135
|
+
top: 0,
|
|
136
|
+
left: 0,
|
|
137
|
+
width: "100%",
|
|
138
|
+
height: "100%",
|
|
139
|
+
opacity: 0,
|
|
140
|
+
boxShadow: odysseyDesignTokens.DepthMedium,
|
|
141
|
+
borderRadius: odysseyDesignTokens.BorderRadiusOuter,
|
|
142
|
+
transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}`,
|
|
143
|
+
zIndex: "-1",
|
|
144
|
+
content: '""'
|
|
145
|
+
},
|
|
146
|
+
"&:hover": {
|
|
147
|
+
"&::after": {
|
|
148
|
+
opacity: 1
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}));
|
|
61
152
|
const AppTile = ({
|
|
62
153
|
actionAriaControls,
|
|
63
154
|
actionAriaHasPopup,
|
|
@@ -68,43 +159,47 @@ const AppTile = ({
|
|
|
68
159
|
children,
|
|
69
160
|
description,
|
|
70
161
|
image,
|
|
162
|
+
isLoading,
|
|
71
163
|
onActionClick,
|
|
72
164
|
onClick,
|
|
73
165
|
overline,
|
|
74
166
|
title
|
|
75
167
|
}) => {
|
|
76
168
|
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
77
|
-
const tileContent = useMemo(() =>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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, {
|
|
169
|
+
const tileContent = useMemo(() => _jsxs(ContentContainer, {
|
|
170
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
171
|
+
hasTopSection: typeof onActionClick === "function" || !!auxiliaryText,
|
|
172
|
+
children: [image && _jsx(ImageContainer, {
|
|
104
173
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
105
|
-
children:
|
|
174
|
+
children: image
|
|
175
|
+
}), overline && _jsx(Support, {
|
|
176
|
+
component: "div",
|
|
177
|
+
children: overline
|
|
178
|
+
}), title && _jsx(Heading5, {
|
|
179
|
+
component: "div",
|
|
180
|
+
children: title
|
|
181
|
+
}), description && _jsx(Paragraph, {
|
|
182
|
+
color: "textSecondary",
|
|
183
|
+
children: description
|
|
184
|
+
}), children && _jsx(ChildrenContainer, {
|
|
185
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
186
|
+
children: children
|
|
187
|
+
})]
|
|
188
|
+
}), [image, auxiliaryText, onActionClick, odysseyDesignTokens, overline, title, description, children]);
|
|
189
|
+
return isLoading ? _jsx(LoadingTile, {
|
|
190
|
+
image: Boolean(image),
|
|
191
|
+
overline: Boolean(overline),
|
|
192
|
+
title: Boolean(title),
|
|
193
|
+
description: Boolean(description),
|
|
194
|
+
children: Boolean(children),
|
|
195
|
+
hasTopSection: typeof onActionClick === "function" || !!auxiliaryText
|
|
196
|
+
}) : _jsxs(StyledMuiCard, {
|
|
197
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
198
|
+
children: [(onActionClick || auxiliaryText) && _jsxs(ActionContainer, {
|
|
199
|
+
odysseyDesignTokens: odysseyDesignTokens,
|
|
200
|
+
children: [auxiliaryText && !isLoading && _jsx(Subordinate, {
|
|
106
201
|
children: auxiliaryText
|
|
107
|
-
}), onActionClick && _jsx(Button, {
|
|
202
|
+
}), onActionClick && !isLoading && _jsx(Button, {
|
|
108
203
|
endIcon: actionIcon,
|
|
109
204
|
ariaLabel: actionLabel,
|
|
110
205
|
variant: "floating",
|
|
@@ -115,6 +210,9 @@ const AppTile = ({
|
|
|
115
210
|
ariaHasPopup: actionAriaHasPopup,
|
|
116
211
|
onClick: onActionClick
|
|
117
212
|
})]
|
|
213
|
+
}), _jsx(_CardActionArea, {
|
|
214
|
+
onClick: onClick,
|
|
215
|
+
children: tileContent
|
|
118
216
|
})]
|
|
119
217
|
});
|
|
120
218
|
};
|
package/dist/labs/AppTile.js.map
CHANGED
|
@@ -1 +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;A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MAAQ,CACQ,CACpB;IAAA,CACE;EAAC,CACU,CACnB,EACD,CACEE,KAAK,EACL7B,mBAAmB,EACnB8B,aAAa,EACbE,QAAQ,EACRC,KAAK,EACLL,WAAW,EACXD,QAAQ,CAEZ,CAAC;EAED,OACEhC,KAAA,CAAA2C,KAAA;IAASC,SAAS,EAAC,aAAa;IAAAZ,QAAA,GAC9BlC,IAAA,CAAA+C,eAAA;MAAmBT,OAAO,EAAEA,OAAQ;MAAAJ,QAAA,EAAEO;IAAW,CAAoB,CAAC,EAErE,CAACJ,aAAa,IAAIJ,aAAa,KAC9B/B,KAAA,CAACa,eAAe;MAACR,mBAAmB,EAAEA,mBAAoB;MAAA2B,QAAA,GACvDD,aAAa,IAAIjC,IAAA,CAACJ,WAAW;QAAAsC,QAAA,EAAED;MAAa,CAAc,CAAC,EAC3DI,aAAa,IACZrC,IAAA,CAACR,MAAM;QACLwD,OAAO,EAAEhB,UAAW;QACpBiB,SAAS,EAAElB,WAAY;QACvBmB,OAAO,EAAC,UAAU;QAClBC,IAAI,EAAC,OAAO;QACZC,WAAW,EAAErB,WAAY;QACzBsB,YAAY,EAAEzB,kBAAmB;QACjC0B,YAAY,EAAExB,kBAAmB;QACjCyB,YAAY,EAAE1B,kBAAmB;QACjCS,OAAO,EAAED;MAAc,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"}
|
|
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","APP_TILE_PLACEHOLDER_IMAGE_WIDTH","ImageContainer","shouldForwardProp","prop","odysseyDesignTokens","display","alignItems","maxHeight","marginBlockEnd","Spacing5","height","maxWidth","ActionContainer","minHeight","Spacing6","position","right","Spacing2","top","gap","Spacing1","zIndex","marginInlineEnd","ContentContainer","hasTopSection","paddingBlockStart","Spacing4","ChildrenContainer","marginBlockStart","Spacing3","LoadingTile","image","overline","title","description","children","_Card","className","_Skeleton","width","sx","variant","StyledMuiCard","boxShadow","overflow","left","opacity","DepthMedium","borderRadius","BorderRadiusOuter","transition","TransitionDurationMain","content","AppTile","actionAriaControls","actionAriaHasPopup","actionAriaExpanded","actionLabel","actionIcon","auxiliaryText","isLoading","onActionClick","onClick","tileContent","component","color","Boolean","endIcon","ariaLabel","size","tooltipText","ariaControls","ariaExpanded","ariaHasPopup","_CardActionArea","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 Skeleton as MuiSkeleton,\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\";\nexport const APP_TILE_PLACEHOLDER_IMAGE_WIDTH = \"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 // If true, the AppTile is loading\n isLoading?: boolean;\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\ntype LoadingTileProps = {\n children: boolean;\n description: boolean;\n hasTopSection: boolean;\n image: boolean;\n overline: boolean;\n title: boolean;\n};\n\nconst ImageContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n maxHeight: APP_TILE_IMAGE_HEIGHT,\n marginBlockEnd: odysseyDesignTokens.Spacing5,\n\n [\"img\"]: {\n height: APP_TILE_IMAGE_HEIGHT,\n maxWidth: \"100%\",\n },\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 position: \"absolute\",\n right: odysseyDesignTokens.Spacing2,\n top: odysseyDesignTokens.Spacing2,\n gap: odysseyDesignTokens.Spacing1,\n zIndex: 1,\n\n [\"& > .MuiTypography-root:last-child\"]: {\n marginInlineEnd: odysseyDesignTokens.Spacing2,\n },\n}));\n\nconst ContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"hasTopSection\",\n})<{ odysseyDesignTokens: DesignTokens; hasTopSection: boolean }>(\n ({ odysseyDesignTokens, hasTopSection }) => ({\n alignItems: \"flex-start\",\n paddingBlockStart: hasTopSection ? odysseyDesignTokens.Spacing4 : 0,\n }),\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 LoadingTile = ({\n image,\n overline,\n title,\n description,\n children,\n hasTopSection,\n}: LoadingTileProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <MuiCard className=\"isClickable\">\n <ContentContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasTopSection={hasTopSection}\n >\n {hasTopSection && (\n <ActionContainer odysseyDesignTokens={odysseyDesignTokens}>\n <Subordinate>\n <MuiSkeleton width={50} />\n </Subordinate>\n </ActionContainer>\n )}\n <Box sx={{ width: \"100%\" }}>\n {image && (\n <ImageContainer odysseyDesignTokens={odysseyDesignTokens}>\n <MuiSkeleton\n height={APP_TILE_IMAGE_HEIGHT}\n width={APP_TILE_PLACEHOLDER_IMAGE_WIDTH}\n variant=\"rectangular\"\n />\n </ImageContainer>\n )}\n\n {overline && (\n <Support>\n <MuiSkeleton />\n </Support>\n )}\n {title && (\n <Heading5>\n <MuiSkeleton />\n </Heading5>\n )}\n {description && (\n <Paragraph>\n <MuiSkeleton />\n </Paragraph>\n )}\n {children && (\n <ChildrenContainer odysseyDesignTokens={odysseyDesignTokens}>\n <MuiSkeleton\n variant=\"rounded\"\n width=\"100%\"\n height={odysseyDesignTokens.Spacing6}\n />\n </ChildrenContainer>\n )}\n </Box>\n </ContentContainer>\n </MuiCard>\n );\n};\n\nconst StyledMuiCard = styled(MuiCard, {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n position: \"relative\",\n boxShadow: \"none\",\n overflow: \"unset\",\n\n \"&::after\": {\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n opacity: 0,\n boxShadow: odysseyDesignTokens.DepthMedium,\n borderRadius: odysseyDesignTokens.BorderRadiusOuter,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}`,\n zIndex: \"-1\",\n content: '\"\"',\n },\n\n \"&:hover\": {\n \"&::after\": {\n opacity: 1,\n },\n },\n}));\n\nconst AppTile = ({\n actionAriaControls,\n actionAriaHasPopup,\n actionAriaExpanded,\n actionLabel,\n actionIcon,\n auxiliaryText,\n children,\n description,\n image,\n isLoading,\n onActionClick,\n onClick,\n overline,\n title,\n}: AppTileProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const tileContent = useMemo(\n () => (\n <ContentContainer\n odysseyDesignTokens={odysseyDesignTokens}\n hasTopSection={typeof onActionClick === \"function\" || !!auxiliaryText}\n >\n {image && (\n <ImageContainer odysseyDesignTokens={odysseyDesignTokens}>\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 </ContentContainer>\n ),\n [\n image,\n auxiliaryText,\n onActionClick,\n odysseyDesignTokens,\n overline,\n title,\n description,\n children,\n ],\n );\n\n return isLoading ? (\n <LoadingTile\n image={Boolean(image)}\n overline={Boolean(overline)}\n title={Boolean(title)}\n description={Boolean(description)}\n children={Boolean(children)}\n hasTopSection={typeof onActionClick === \"function\" || !!auxiliaryText}\n />\n ) : (\n <StyledMuiCard odysseyDesignTokens={odysseyDesignTokens}>\n {(onActionClick || auxiliaryText) && (\n <ActionContainer odysseyDesignTokens={odysseyDesignTokens}>\n {auxiliaryText && !isLoading && (\n <Subordinate>{auxiliaryText}</Subordinate>\n )}\n {onActionClick && !isLoading && (\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\n <MuiCardActionArea onClick={onClick}>{tileContent}</MuiCardActionArea>\n </StyledMuiCard>\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;AAMd,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;AAC3C,OAAO,MAAMC,gCAAgC,GAAG,MAAM;AAuDtD,MAAMC,cAAc,GAAGd,MAAM,CAAC,KAAK,EAAE;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C,KAAK,CAAE;IACtBC,WAAW,EAAEgC,OAAO,CAAChC,WAAW,CAAE;IAClCC,QAAQ,EAAE+B,OAAO,CAAC/B,QAAQ,CAAE;IAC5BX,aAAa,EAAE,OAAOqC,aAAa,KAAK,UAAU,IAAI,CAAC,CAACF;EAAc,CACvE,CAAC,GAEF7D,KAAA,CAAC4C,aAAa;IAACtC,mBAAmB,EAAEA,mBAAoB;IAAA+B,QAAA,GACrD,CAAC0B,aAAa,IAAIF,aAAa,KAC9B7D,KAAA,CAACc,eAAe;MAACR,mBAAmB,EAAEA,mBAAoB;MAAA+B,QAAA,GACvDwB,aAAa,IAAI,CAACC,SAAS,IAC1BhE,IAAA,CAACJ,WAAW;QAAA2C,QAAA,EAAEwB;MAAa,CAAc,CAC1C,EACAE,aAAa,IAAI,CAACD,SAAS,IAC1BhE,IAAA,CAACR,MAAM;QACL+E,OAAO,EAAET,UAAW;QACpBU,SAAS,EAAEX,WAAY;QACvBhB,OAAO,EAAC,UAAU;QAClB4B,IAAI,EAAC,OAAO;QACZC,WAAW,EAAEb,WAAY;QACzBc,YAAY,EAAEjB,kBAAmB;QACjCkB,YAAY,EAAEhB,kBAAmB;QACjCiB,YAAY,EAAElB,kBAAmB;QACjCO,OAAO,EAAED;MAAc,CACxB,CACF;IAAA,CACc,CAClB,EAEDjE,IAAA,CAAA8E,eAAA;MAAmBZ,OAAO,EAAEA,OAAQ;MAAA3B,QAAA,EAAE4B;IAAW,CAAoB,CAAC;EAAA,CACzD,CAChB;AACH,CAAC;AAED,MAAMY,eAAe,GAAG1F,IAAI,CAACoE,OAAO,CAAC;AACrCsB,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAItB,OAAO"}
|
|
@@ -18,7 +18,6 @@ import { CircularProgress } from "../../CircularProgress.js";
|
|
|
18
18
|
import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
|
|
19
19
|
import { RowActions } from "./RowActions.js";
|
|
20
20
|
import { DataCard } from "./DataCard.js";
|
|
21
|
-
import { DetailPanel } from "./DetailPanel.js";
|
|
22
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
22
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
23
|
const StackContainer = styled("div", {
|
|
@@ -30,7 +29,7 @@ const StackContainer = styled("div", {
|
|
|
30
29
|
}) => ({
|
|
31
30
|
display: currentLayout === "list" ? "flex" : "grid",
|
|
32
31
|
flexDirection: "column",
|
|
33
|
-
|
|
32
|
+
columnGap: odysseyDesignTokens.Spacing5,
|
|
34
33
|
...(currentLayout === "grid" && {
|
|
35
34
|
[`@media (max-width: 720px)`]: {
|
|
36
35
|
gridTemplateColumns: "repeat(1, 1fr)"
|
|
@@ -103,7 +102,8 @@ const CardLayoutContent = ({
|
|
|
103
102
|
title,
|
|
104
103
|
description,
|
|
105
104
|
image,
|
|
106
|
-
children
|
|
105
|
+
children,
|
|
106
|
+
variant
|
|
107
107
|
} = cardLayoutOptions.itemProps(row);
|
|
108
108
|
const currentIndex = index + (pagination.pageIndex - 1) * pagination.pageSize;
|
|
109
109
|
return _jsx(DataCard, {
|
|
@@ -116,10 +116,8 @@ const CardLayoutContent = ({
|
|
|
116
116
|
}),
|
|
117
117
|
children: children,
|
|
118
118
|
description: description,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
renderDetailPanel: cardLayoutOptions.renderDetailPanel
|
|
122
|
-
}) : undefined,
|
|
119
|
+
renderDetailPanel: cardLayoutOptions.renderDetailPanel,
|
|
120
|
+
row: row,
|
|
123
121
|
image: image,
|
|
124
122
|
menuButtonChildren: (cardLayoutOptions.rowActionMenuItems || hasRowReordering) && _jsx(RowActions, {
|
|
125
123
|
row: row,
|
|
@@ -130,7 +128,8 @@ const CardLayoutContent = ({
|
|
|
130
128
|
updateRowOrder: hasRowReordering && onReorderRows ? updateRowOrder : undefined
|
|
131
129
|
}),
|
|
132
130
|
overline: overline,
|
|
133
|
-
title: title
|
|
131
|
+
title: title,
|
|
132
|
+
variant: variant
|
|
134
133
|
}, row.id);
|
|
135
134
|
})
|
|
136
135
|
})
|
|
@@ -1 +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);\nMemoizedCardLayo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yC,GAAG,EAAEA,GAAI;cACT0B,iBAAiB,EACf7B,iBAAiB,CAAC6B;YACnB,CACF,CAAC,GACAC,SACL;YACDX,KAAK,EAAEA,KAAM;YAEbY,kBAAkB,EAChB,CAAC/B,iBAAiB,CAACgC,kBAAkB,IACnC3C,gBAAgB,KAChBzB,IAAA,CAACJ,UAAU;cACT2C,GAAG,EAAEA,GAAI;cACT8B,QAAQ,EAAEZ,YAAa;cACvBW,kBAAkB,EAChBhC,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"}
|
|
1
|
+
{"version":3,"file":"CardLayoutContent.js","names":["memo","useCallback","styled","Box","CircularProgress","useOdysseyDesignTokens","RowActions","DataCard","jsx","_jsx","Fragment","_Fragment","StackContainer","shouldForwardProp","prop","odysseyDesignTokens","currentLayout","maxGridColumns","display","flexDirection","columnGap","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","variant","itemProps","currentIndex","pageIndex","pageSize","Accessory","_Checkbox","checked","onChange","renderDetailPanel","menuButtonChildren","rowActionMenuItems","rowIndex","undefined","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\";\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 columnGap: 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 {\n overline,\n title,\n description,\n image,\n children,\n variant,\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 renderDetailPanel={cardLayoutOptions.renderDetailPanel}\n row={row}\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 variant={variant}\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,UAAU;AAAA,SACVC,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AA4DjB,MAAMC,cAAc,GAAGV,MAAM,CAAC,KAAK,EAAE;EACnCW,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,eAAe,IACxBA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,mBAAmB;EAAEC,aAAa;EAAEC;AAAe,CAAC,MAAM;EAC9DC,OAAO,EAAEF,aAAa,KA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