@okta/odyssey-react-mui 1.50.1 → 1.52.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 +10 -0
- package/dist/{assets/axeRun-B-LchFqf.js → cjs/ConditionalWrapper.cjs} +22 -3
- package/dist/cjs/ConditionalWrapper.cjs.map +1 -0
- package/dist/cjs/DataTable/DataTable.cjs +1 -2
- package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
- package/dist/cjs/Dialog.cjs +9 -1
- package/dist/cjs/Dialog.cjs.map +1 -1
- package/dist/cjs/Drawer.cjs +1 -0
- package/dist/cjs/Drawer.cjs.map +1 -1
- package/dist/cjs/FullScreenOverlay.cjs +4 -1
- package/dist/cjs/FullScreenOverlay.cjs.map +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +10 -3
- package/dist/cjs/FullScreenOverlayContext.cjs.map +1 -1
- package/dist/cjs/HintLink.cjs +1 -1
- package/dist/cjs/HintLink.cjs.map +1 -1
- package/dist/cjs/OdysseyProvider.cjs +33 -22
- package/dist/cjs/OdysseyProvider.cjs.map +1 -1
- package/dist/cjs/Select.cjs +5 -0
- package/dist/cjs/Select.cjs.map +1 -1
- package/dist/cjs/__internal.cjs +11 -0
- package/dist/cjs/__internal.cjs.map +1 -1
- package/dist/cjs/createUniqueId.cjs +4 -1
- package/dist/cjs/createUniqueId.cjs.map +1 -1
- package/dist/cjs/labs/index.cjs +12 -0
- package/dist/cjs/labs/index.cjs.map +1 -1
- package/dist/cjs/theme/components.cjs +5 -2
- package/dist/cjs/theme/components.cjs.map +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +6 -10
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +2 -2
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +5 -1
- package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/{SideNav/SideNavLogo.cjs → UiShellLogo.cjs} +6 -6
- package/dist/cjs/ui-shell/UiShellLogo.cjs.map +1 -0
- package/dist/cjs/ui-shell/index.cjs +12 -0
- package/dist/cjs/ui-shell/index.cjs.map +1 -1
- package/dist/cjs/ui-shell/uiShellContentTypes.cjs.map +1 -1
- package/dist/cjs/useContrastMode.cjs +1 -1
- package/dist/cjs/useContrastMode.cjs.map +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/{assets/pxToRem-BrMhKUxS.js → esm/ConditionalWrapper.js} +15 -1
- package/dist/esm/ConditionalWrapper.js.map +1 -0
- package/dist/esm/DataTable/DataTable.js +1 -2
- package/dist/esm/DataTable/DataTable.js.map +1 -1
- package/dist/esm/Dialog.js +10 -2
- package/dist/esm/Dialog.js.map +1 -1
- package/dist/esm/Drawer.js +1 -0
- package/dist/esm/Drawer.js.map +1 -1
- package/dist/esm/FullScreenOverlay.js +4 -1
- package/dist/esm/FullScreenOverlay.js.map +1 -1
- package/dist/esm/FullScreenOverlayContext.js +9 -2
- package/dist/esm/FullScreenOverlayContext.js.map +1 -1
- package/dist/esm/HintLink.js +1 -1
- package/dist/esm/HintLink.js.map +1 -1
- package/dist/esm/OdysseyProvider.js +34 -23
- package/dist/esm/OdysseyProvider.js.map +1 -1
- package/dist/esm/Select.js +5 -0
- package/dist/esm/Select.js.map +1 -1
- package/dist/esm/__internal.js +1 -0
- package/dist/esm/__internal.js.map +1 -1
- package/dist/esm/createUniqueId.js +4 -1
- package/dist/esm/createUniqueId.js.map +1 -1
- package/dist/esm/labs/index.js +1 -0
- package/dist/esm/labs/index.js.map +1 -1
- package/dist/esm/theme/components.js +5 -2
- package/dist/esm/theme/components.js.map +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +6 -10
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +2 -2
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
- package/dist/esm/ui-shell/UiShell.js +5 -1
- package/dist/esm/ui-shell/UiShell.js.map +1 -1
- package/dist/esm/ui-shell/{SideNav/SideNavLogo.js → UiShellLogo.js} +6 -6
- package/dist/esm/ui-shell/UiShellLogo.js.map +1 -0
- package/dist/esm/ui-shell/index.js +1 -0
- package/dist/esm/ui-shell/index.js.map +1 -1
- package/dist/esm/ui-shell/uiShellContentTypes.js.map +1 -1
- package/dist/esm/useContrastMode.js +1 -1
- package/dist/esm/useContrastMode.js.map +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/index.d.ts +21 -232
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{assets/uiShellSharedConstants-CvCey4L_.js → types/ConditionalWrapper.d.ts} +10 -1
- package/dist/types/ConditionalWrapper.d.ts.map +1 -0
- package/dist/types/DataTable/DataTable.d.ts.map +1 -1
- package/dist/types/Dialog.d.ts +5 -1
- package/dist/types/Dialog.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/FullScreenOverlay.d.ts +3 -2
- package/dist/types/FullScreenOverlay.d.ts.map +1 -1
- package/dist/types/FullScreenOverlayContext.d.ts +12 -1
- package/dist/types/FullScreenOverlayContext.d.ts.map +1 -1
- package/dist/types/OdysseyProvider.d.ts +7 -1
- package/dist/types/OdysseyProvider.d.ts.map +1 -1
- package/dist/types/Select.d.ts.map +1 -1
- package/dist/types/__internal.d.ts +1 -0
- package/dist/types/__internal.d.ts.map +1 -1
- package/dist/types/createUniqueId.d.ts.map +1 -1
- package/dist/types/labs/index.d.ts +4 -0
- package/dist/types/labs/index.d.ts.map +1 -1
- package/dist/types/theme/components.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts +2 -2
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts +6 -2
- package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/types.d.ts +4 -44
- package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShellLogo.d.ts +55 -0
- package/dist/types/ui-shell/UiShellLogo.d.ts.map +1 -0
- package/dist/types/ui-shell/index.d.ts +1 -0
- package/dist/types/ui-shell/index.d.ts.map +1 -1
- package/dist/types/ui-shell/uiShellContentTypes.d.ts +7 -0
- package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -1
- package/dist/types/useContrastMode.d.ts +1 -1
- package/dist/types/useContrastMode.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +8 -8
- package/dist/appswitcher/admin-app-default.svg +0 -6
- package/dist/appswitcher/admin-app-selected.svg +0 -6
- package/dist/appswitcher/aerial-default.svg +0 -7
- package/dist/appswitcher/aerial-selected.svg +0 -7
- package/dist/appswitcher/okta-dashboard-default.svg +0 -7
- package/dist/appswitcher/okta-dashboard-selected.svg +0 -7
- package/dist/appswitcher/privileged-access-default.svg +0 -4
- package/dist/appswitcher/privileged-access-selected.svg +0 -4
- package/dist/appswitcher/workflows-default.svg +0 -5
- package/dist/appswitcher/workflows-selected.svg +0 -5
- package/dist/assets/Accordion-TL4V06gN.js +0 -1
- package/dist/assets/Accordion.stories-_etHHM8e.js +0 -85
- package/dist/assets/AccordionSummary-D9iUNt-k.js +0 -1
- package/dist/assets/AlertTitle-C5NflvC5.js +0 -1
- package/dist/assets/AppSwitcher-QbTtJQaq.js +0 -21
- package/dist/assets/AppSwitcher.stories-DHBG5rOr.js +0 -100
- package/dist/assets/AppTile _labs_.stories-C-dzZ7Qn.js +0 -136
- package/dist/assets/ArrowDropDown-DddCYTEO.js +0 -1
- package/dist/assets/ArrowRight-BCdbWzwG.js +0 -1
- package/dist/assets/Autocomplete-BMfy4j72.js +0 -1
- package/dist/assets/Autocomplete-DVDZYzDH.js +0 -1
- package/dist/assets/Autocomplete.stories-B8RiFnpA.js +0 -316
- package/dist/assets/Badge-DGWMi2ON.js +0 -11
- package/dist/assets/Banner-DCJxRKN5.js +0 -1
- package/dist/assets/Banner.stories-Bsazp99i.js +0 -96
- package/dist/assets/BaseButton-C1Nzi3yl.js +0 -11
- package/dist/assets/BaseMenuButton-DPFgAU1j.js +0 -1
- package/dist/assets/Box-BK5oZBIO.js +0 -1
- package/dist/assets/Box-CTjIz0-2.js +0 -1
- package/dist/assets/Box-Csk9IBP6.js +0 -11
- package/dist/assets/Box.stories-CtReuS8W.js +0 -38
- package/dist/assets/Breadcrumbs-DnkzpkPy.js +0 -6
- package/dist/assets/Breadcrumbs.stories-C7zVt3mr.js +0 -79
- package/dist/assets/Bug-CxccEZAh.js +0 -1
- package/dist/assets/Button-CbJri63v.js +0 -1
- package/dist/assets/Button-DuM2NeMY.js +0 -11
- package/dist/assets/Button.stories-CRV-c8gG.js +0 -271
- package/dist/assets/ButtonBase-Lbe0_84r.js +0 -74
- package/dist/assets/Calendar-DXL71nUA.js +0 -1
- package/dist/assets/Callout-DY2rv89C.js +0 -1
- package/dist/assets/Callout.stories--Eo8BRU5.js +0 -128
- package/dist/assets/Card-BBklAYRu.js +0 -8
- package/dist/assets/Card-z7130zaB.js +0 -1
- package/dist/assets/Card.stories-fvpTzjYC.js +0 -56
- package/dist/assets/CardActionArea-B7i8fBJO.js +0 -1
- package/dist/assets/CardActions-C8G3mEo5.js +0 -1
- package/dist/assets/Checkbox-BlSNHylx.js +0 -1
- package/dist/assets/Checkbox-CMDOP82Q.js +0 -1
- package/dist/assets/Checkbox.stories-DP2aUvGZ.js +0 -96
- package/dist/assets/CheckboxGroup-CwIFFbkc.js +0 -1
- package/dist/assets/CheckboxGroup.stories-Bo4ON9ko.js +0 -92
- package/dist/assets/ChevronRight-SFKDVCjo.js +0 -1
- package/dist/assets/ChevronUp-DyYSBYAc.js +0 -1
- package/dist/assets/Chip-M3FRYspe.js +0 -1
- package/dist/assets/CircularProgress-K0vgt9-g.js +0 -28
- package/dist/assets/CircularProgress-iBaxEenq.js +0 -1
- package/dist/assets/CircularProgress.stories-B0Pf66JJ.js +0 -44
- package/dist/assets/Clock-B6hba9Vz.js +0 -1
- package/dist/assets/Close-DJA1l50S.js +0 -1
- package/dist/assets/Code Styling Guidelines-pHbGhTau.js +0 -14
- package/dist/assets/Collapse-DKQFr8Jv.js +0 -1
- package/dist/assets/Color-YHDXOIA2-CG5LwN35.js +0 -1
- package/dist/assets/CssBaseline-Bkt1iTa6.js +0 -191
- package/dist/assets/CssBaseline.stories-DJmHUmdE.js +0 -364
- package/dist/assets/Custom Theming-B72hK7oE.js +0 -135
- package/dist/assets/Custom Theming.stories-Cf2-ayRw.js +0 -95
- package/dist/assets/DataFilters _labs_-jIB_cIPS.js +0 -55
- package/dist/assets/DataFilters _labs_.stories-Bbrh7lix.js +0 -31
- package/dist/assets/DataFilters-DPi4_TMw.js +0 -1
- package/dist/assets/DataTable _labs_-UipdAC3j.js +0 -41
- package/dist/assets/DataTable _labs_.stories-o_LRnzmM.js +0 -21
- package/dist/assets/DataTable-8_tFkAz1.js +0 -404
- package/dist/assets/DataTable-Breh7Oua.js +0 -21
- package/dist/assets/DataTable.stories-D_xL1EQO.js +0 -438
- package/dist/assets/DataView _labs_-Uk1ng26p.js +0 -332
- package/dist/assets/DataView _labs_.stories-BIkujkH4.js +0 -438
- package/dist/assets/DataView-CBu_vDz5.js +0 -91
- package/dist/assets/DataView.stories-BZ_fLfnH.js +0 -954
- package/dist/assets/DatePicker-DcQC9osa.js +0 -1
- package/dist/assets/DatePicker-DrZNv0PG.js +0 -11
- package/dist/assets/DatePicker.stories-CdxHpQSt.js +0 -133
- package/dist/assets/DateTimePicker-Bc3ybPls.js +0 -1
- package/dist/assets/DateTimePicker.stories-EwHhkVLF.js +0 -158
- package/dist/assets/Design Tokens-rV9HMgkt.js +0 -4
- package/dist/assets/Dialog-DzHtD6Y8.js +0 -1
- package/dist/assets/Dialog.stories-Da8cQK7E.js +0 -201
- package/dist/assets/DialogContent-CfzX3t0u.js +0 -1
- package/dist/assets/DialogTitle-DWrKQeoP.js +0 -1
- package/dist/assets/Divider-bVF9wNUG.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-DjVgG9gc.js +0 -2
- package/dist/assets/Documentation-D-myRfum.js +0 -1
- package/dist/assets/Download-vZ2qKd4H.js +0 -1
- package/dist/assets/Drawer-D97GHbuL.js +0 -33
- package/dist/assets/Drawer.stories-BgDN3SBx.js +0 -95
- package/dist/assets/EmptyState-DqVcjLYd.js +0 -11
- package/dist/assets/EmptyState.stories-LlfICq7c.js +0 -11
- package/dist/assets/ExampleButton.stories-Dlu-0j3r.js +0 -320
- package/dist/assets/Extending Translations-yMUmArCq.js +0 -148
- package/dist/assets/ExternalLink-D3z7HWdx.js +0 -1
- package/dist/assets/Fade-fD56BVkE.js +0 -1
- package/dist/assets/Field-QbF6sK2K.js +0 -11
- package/dist/assets/FieldHint-Mz3OdL0I.js +0 -1
- package/dist/assets/Fieldset-Qg__SoCs.js +0 -11
- package/dist/assets/Fieldset.stories-CSgoy_R1.js +0 -15
- package/dist/assets/FileUploader.stories-CLC8ua1s.js +0 -58
- package/dist/assets/Filter-sXa3iWrm.js +0 -1
- package/dist/assets/Folder-DFjbrJpD.js +0 -1
- package/dist/assets/Form Field Accessibility-CeE-yHi9.js +0 -18
- package/dist/assets/Form--NGGwJcX.js +0 -11
- package/dist/assets/Form.stories-DpN6pnfW.js +0 -69
- package/dist/assets/FormControlLabel-DPa22EmK.js +0 -1
- package/dist/assets/FormGroup-CYHiKrU4.js +0 -1
- package/dist/assets/FormHelperText-DQoZ2-nD.js +0 -1
- package/dist/assets/FormLabel-CjrKvhME.js +0 -1
- package/dist/assets/FullScreenOverlay-B8rXO7lI.js +0 -11
- package/dist/assets/Generating Icons-4rsSwyQz.js +0 -16
- package/dist/assets/Globe-DER_Oel8.js +0 -1
- package/dist/assets/Grid-_Dwg3x03.js +0 -1
- package/dist/assets/Group-D87tnFnJ.js +0 -1
- package/dist/assets/GroupPicker _labs_.stories-Dkot8Gvy.js +0 -33
- package/dist/assets/Grow-D6A2VZqw.js +0 -1
- package/dist/assets/Hide-ovxLvICH.js +0 -1
- package/dist/assets/Hint-CkN2-6Wh.js +0 -11
- package/dist/assets/Home-Cn8YbOdj.js +0 -1
- package/dist/assets/Icon _icons_.stories-qnlVJ269.js +0 -16
- package/dist/assets/IconButton-CgM2Hv_L.js +0 -1
- package/dist/assets/IconWithTooltip _icons_.stories-Bdz-yaYX.js +0 -19
- package/dist/assets/InformationCircle-CG6-PCJh.js +0 -1
- package/dist/assets/InputAdornment-CVIbzdDI.js +0 -1
- package/dist/assets/InputBase-DSyP23zj.js +0 -2
- package/dist/assets/Installing odyssey-react-mui-CiYP6xN7.js +0 -216
- package/dist/assets/Introduction-CrzfC_TA.js +0 -36
- package/dist/assets/Layout-CLuC-soE.js +0 -11
- package/dist/assets/Layout.stories-CBxD-F_N.js +0 -285
- package/dist/assets/Legacy Migrations-ClnAFJAt.js +0 -86
- package/dist/assets/Link-BS9ZeF6K.js +0 -11
- package/dist/assets/Link-Ck99nJao.js +0 -1
- package/dist/assets/Link-D0sejjD3.js +0 -1
- package/dist/assets/Link-PjuOItUN.js +0 -1
- package/dist/assets/Link.stories--V5lBgMx.js +0 -43
- package/dist/assets/List-B7JH4gjK.js +0 -1
- package/dist/assets/List-BSidosAy.js +0 -1
- package/dist/assets/ListItem-DB9pwEx3.js +0 -1
- package/dist/assets/ListSubheader--G940pR4.js +0 -1
- package/dist/assets/Menu-C2dEwThV.js +0 -1
- package/dist/assets/MenuButton-Bh79TcKB.js +0 -9
- package/dist/assets/MenuButton-C-OmKt3g.js +0 -11
- package/dist/assets/MenuButton.stories-Ceqz4qjB.js +0 -246
- package/dist/assets/MenuContext-DKMyPMNY.js +0 -11
- package/dist/assets/MenuItem-C0i8WJAZ.js +0 -1
- package/dist/assets/MenuItem-D69h7bYZ.js +0 -1
- package/dist/assets/MenuItem.stories-D1nmz6cr.js +0 -29
- package/dist/assets/MenuList-BCZDiX8u.js +0 -1
- package/dist/assets/Modal-Ddv1e_fT.js +0 -1
- package/dist/assets/More-DLP5TTaz.js +0 -1
- package/dist/assets/MuiPropsContext-DhRylJZk.js +0 -11
- package/dist/assets/NativeSelect.stories-iwOAP2MY.js +0 -173
- package/dist/assets/Notification-DZN2A8i5.js +0 -1
- package/dist/assets/OdysseyProvider-oMWLr_-4.js +0 -66
- package/dist/assets/OdysseyStorybookThemeDecorator-DmBIIOGu.js +0 -1
- package/dist/assets/OdysseyThemeProvider-C4N_85M9.js +0 -189
- package/dist/assets/PageHeader.stories-CP7yWDvu.js +0 -57
- package/dist/assets/PageHeader.stories-o8T_qtyq.js +0 -364
- package/dist/assets/PageTemplate _labs_-D-ZpvSDn.js +0 -8
- package/dist/assets/PageTemplate _labs_.stories-CcKAPVlY.js +0 -306
- package/dist/assets/PageTemplate-DwiuZ2gD.js +0 -21
- package/dist/assets/PageTemplate.stories-BWAsJCDg.js +0 -205
- package/dist/assets/PaginatedTable _labs_.stories-eXIvKB_N.js +0 -65
- package/dist/assets/Pagination-CPZOkZUE.js +0 -11
- package/dist/assets/Pagination.stories-ZB73al5s.js +0 -17
- package/dist/assets/Paper-D4wDjY4F.js +0 -1
- package/dist/assets/PasswordField.stories-CFBj2mPt.js +0 -129
- package/dist/assets/Picker _labs_.stories-BSP2s_pC.js +0 -18
- package/dist/assets/PickerWithOptionAdornment _labs_.stories-CcdT2YZm.js +0 -70
- package/dist/assets/PlaceholderLogo-JfVvgA23.js +0 -11
- package/dist/assets/Popper-9pd1Yneu.js +0 -1
- package/dist/assets/Portal-DK2ELYoG.js +0 -1
- package/dist/assets/ProgressBar.stories-BNmDO6bH.js +0 -311
- package/dist/assets/Radio-B2zw408T.js +0 -1
- package/dist/assets/Radio-BRMnUBeG.js +0 -1
- package/dist/assets/Radio.stories-BiHez-Um.js +0 -63
- package/dist/assets/RadioGroup-3NM12Muw.js +0 -10
- package/dist/assets/RadioGroup-BM3_3HU2.js +0 -1
- package/dist/assets/RadioGroup-CZWIkl-b.js +0 -1
- package/dist/assets/RadioGroup.stories-cENtOlFv.js +0 -138
- package/dist/assets/Refresh-D3vISItP.js +0 -1
- package/dist/assets/ResourceAccessPolicyComponentsStorybookThemeDecorator-Di2iOJpx.js +0 -212
- package/dist/assets/Right-to-Left (RTL)-fcueNY4p.js +0 -62
- package/dist/assets/ScreenReaderText-6_RVPtH_.js +0 -15
- package/dist/assets/ScreenReaderText-DrkvjfUf.js +0 -1
- package/dist/assets/ScreenReaderText.stories-CO8LdK8F.js +0 -8
- package/dist/assets/Search-BH45H3v4.js +0 -1
- package/dist/assets/SearchDropdown _labs_.stories-Bmp81G56.js +0 -53
- package/dist/assets/SearchField-vEVEEXjl.js +0 -1
- package/dist/assets/SearchField.stories-C83bZsBy.js +0 -37
- package/dist/assets/Select-DGL00QcS.js +0 -15
- package/dist/assets/Select-Dg6qtAos.js +0 -1
- package/dist/assets/Select.stories-CZO06lSs.js +0 -293
- package/dist/assets/Server-3cieqme0.js +0 -1
- package/dist/assets/Settings-Bxzwc53G.js +0 -1
- package/dist/assets/Setup-wp_q8G1u.js +0 -7
- package/dist/assets/Shadow DOM-UCL9R1Bd.js +0 -64
- package/dist/assets/Show-D1oNDX9u.js +0 -1
- package/dist/assets/SideNav-CA5MPRIw.js +0 -85
- package/dist/assets/SideNav-DjaJNhvQ.js +0 -131
- package/dist/assets/SideNav.stories-DsqmEgxA.js +0 -207
- package/dist/assets/Skeleton-Bgl-rJ6W.js +0 -51
- package/dist/assets/Snackbar-hhmQPX8K.js +0 -1
- package/dist/assets/Stack-Dyzg8njm.js +0 -1
- package/dist/assets/Stack.stories-DoWxKo-o.js +0 -1
- package/dist/assets/StaticTable _labs_.stories-CwBlkxKe.js +0 -34
- package/dist/assets/Status-SY8R_HiF.js +0 -1
- package/dist/assets/Status.stories-DEyjfdZ8.js +0 -66
- package/dist/assets/Stepper.stories-C2_hEMjv.js +0 -564
- package/dist/assets/Surface-DBEECTVv.js +0 -1
- package/dist/assets/Switch.stories-CsPyggPf.js +0 -61
- package/dist/assets/SwitchBase-n4YlIRfi.js +0 -1
- package/dist/assets/Sync-MXQ8RKoq.js +0 -1
- package/dist/assets/Tabs-CKDb0WZw.js +0 -23
- package/dist/assets/Tabs-Yjnd4xiR.js +0 -1
- package/dist/assets/Tabs.stories-DYgpMtE6.js +0 -100
- package/dist/assets/Tag-DCZngwHs.js +0 -11
- package/dist/assets/Tag.stories-DjsZZZ5g.js +0 -96
- package/dist/assets/TagList-BvQLms1L.js +0 -1
- package/dist/assets/TextField-DUdvP48K.js +0 -1
- package/dist/assets/TextField.stories-CFIUIy2O.js +0 -149
- package/dist/assets/Toast.stories-DmPuslG7.js +0 -134
- package/dist/assets/ToastManager.stories-C0WSwoY-.js +0 -196
- package/dist/assets/Tooltip-DOwIJUHs.js +0 -1
- package/dist/assets/Tooltip-ciZ4e0Eb.js +0 -11
- package/dist/assets/Tooltip.stories-B4e1QEoX.js +0 -68
- package/dist/assets/TopNav-DjvdFijR.js +0 -11
- package/dist/assets/TopNav.stories-Ctwu_9N_.js +0 -13
- package/dist/assets/TransitionGroupContext-DAL84N7p.js +0 -1
- package/dist/assets/Typography-C4vClHaZ.js +0 -1
- package/dist/assets/Typography-DkvJJHkF.js +0 -1
- package/dist/assets/Typography-NdqIGwl5.js +0 -1
- package/dist/assets/Typography-c9CeGtmy.js +0 -9
- package/dist/assets/Typography.stories-C8KXE15q.js +0 -139
- package/dist/assets/Typography.stories-Di7tmDM_.js +0 -73
- package/dist/assets/UiShell.stories-CkplIEt6.js +0 -558
- package/dist/assets/UiShellProvider-Do3wWAnY.js +0 -31
- package/dist/assets/Upload-B99qcWTV.js +0 -1
- package/dist/assets/User-D5oZGOlm.js +0 -1
- package/dist/assets/UserProfile-DyDMmyrK.js +0 -11
- package/dist/assets/UserProfile.stories-W7GTlBN8.js +0 -14
- package/dist/assets/UserProfileMenuButton.stories-BLoHU0os.js +0 -30
- package/dist/assets/Video-t97PFROt.js +0 -1
- package/dist/assets/WorkflowsComponentsStorybookThemeDecorator-C42hLMDY.js +0 -197
- package/dist/assets/_commonjsHelpers-gnU0ypJ3.js +0 -1
- package/dist/assets/assertThisInitialized-B9jnkVVz.js +0 -1
- package/dist/assets/axe-4JP0vCEZ.js +0 -30
- package/dist/assets/chunk-XP5HYGXS-BpfKkqn7.js +0 -1
- package/dist/assets/client-ByW5HbEz.js +0 -1
- package/dist/assets/colorManipulator-BmBCr6qx.js +0 -1
- package/dist/assets/constants-CGUp4oSR.js +0 -11
- package/dist/assets/constants-CyailK6t.js +0 -11
- package/dist/assets/createBox-Cu6fLdzL.js +0 -1
- package/dist/assets/createChainedFunction-BO_9K8Jh.js +0 -1
- package/dist/assets/createStyled-CcazfAPj.js +0 -1
- package/dist/assets/createSvgIcon-V-Po-Ssl.js +0 -1
- package/dist/assets/createUniqueId-ByTaVY63.js +0 -1
- package/dist/assets/debounce-Be36O1Ab.js +0 -1
- package/dist/assets/dialogActionsClasses-p1SqDmrR.js +0 -1
- package/dist/assets/dom.esm-B9r8vBgQ.js +0 -65
- package/dist/assets/emotion-react-jsx-runtime.browser.esm-DIdX2qdc.js +0 -1
- package/dist/assets/entry-preview-CPHmgmI_.js +0 -2
- package/dist/assets/entry-preview-docs-BKXv92OK.js +0 -46
- package/dist/assets/fieldComponentPropsMetaData-BqbNLw6V.js +0 -11
- package/dist/assets/getReactElementRef-SdO7zWnC.js +0 -1
- package/dist/assets/getScrollbarSize-Bqq2hMjQ.js +0 -1
- package/dist/assets/i18next-7SyOfhCu.js +0 -1
- package/dist/assets/iconUtils-01jcyLGr.js +0 -11
- package/dist/assets/iframe-pzQvMjuK.js +0 -211
- package/dist/assets/index-B-lxVbXh.js +0 -1
- package/dist/assets/index-B5xazMy1.js +0 -1
- package/dist/assets/index-BJMTVygn.js +0 -240
- package/dist/assets/index-BJRwoad0.js +0 -1
- package/dist/assets/index-BJTM6NaI.js +0 -192
- package/dist/assets/index-BVtttuMv.js +0 -1
- package/dist/assets/index-BeeV6X6A.js +0 -1
- package/dist/assets/index-CXQShRbs.js +0 -8
- package/dist/assets/index-DDAqzdZr.js +0 -1
- package/dist/assets/index-DieBXP3Z.js +0 -24
- package/dist/assets/index-DrFu-skq.js +0 -6
- package/dist/assets/index-NdkWRN8K.js +0 -9
- package/dist/assets/index-c74KQyVj.js +0 -384
- package/dist/assets/index.esm-C8irYXeq.js +0 -1
- package/dist/assets/index.esm-Dv3Cs9mX.js +0 -138
- package/dist/assets/index.modern-CkASn_bb.js +0 -14
- package/dist/assets/inheritsLoose-S-YxUaHb.js +0 -1
- package/dist/assets/inputUtils-Dbi8XkA6.js +0 -11
- package/dist/assets/isHostComponent-DVu5iVWx.js +0 -1
- package/dist/assets/jsx-runtime-CnH95YSl.js +0 -9
- package/dist/assets/matchers-7Z3WT2CE-T3xScrR7.js +0 -14
- package/dist/assets/ownerDocument-DW-IO8s5.js +0 -1
- package/dist/assets/ownerWindow-HkKU3E4x.js +0 -1
- package/dist/assets/personData-BDz2-Bac.js +0 -11
- package/dist/assets/personData-TjBCCFSX.js +0 -1
- package/dist/assets/pickerComponentPropsMetadata-DyMkD2Aw.js +0 -21
- package/dist/assets/popper-ChLFknNm.js +0 -1
- package/dist/assets/preview-B8lJiyuQ.js +0 -34
- package/dist/assets/preview-BAx1BwgB.js +0 -1
- package/dist/assets/preview-BBWR9nbA.js +0 -1
- package/dist/assets/preview-BWzBA1C2.js +0 -396
- package/dist/assets/preview-BaoH-L4j.js +0 -1
- package/dist/assets/preview-CQqyhYi4.js +0 -2
- package/dist/assets/preview-CYp4EYYZ.js +0 -1
- package/dist/assets/preview-CvbIS5ZJ.js +0 -1
- package/dist/assets/preview-DGUiP6tS.js +0 -7
- package/dist/assets/preview-DHQbi4pV.js +0 -1
- package/dist/assets/preview-Db5KMipM.js +0 -2
- package/dist/assets/preview-MBifGIx_.js +0 -1
- package/dist/assets/queryOdysseySelector-_ueksTI2.js +0 -123
- package/dist/assets/react-18-u8niHpKc.js +0 -1
- package/dist/assets/renderUiShell.stories-DJOqBLkr.js +0 -872
- package/dist/assets/resolveComponentProps-D1ztx9lS.js +0 -1
- package/dist/assets/tableSortLabelClasses-BUdDGZ1b.js +0 -1
- package/dist/assets/test-utils-H9lH7T5D.js +0 -9
- package/dist/assets/useAutocomplete-B3_vLbIK.js +0 -11
- package/dist/assets/useControlled-NQulfz4l.js +0 -1
- package/dist/assets/useFormControl-BMISTZuX.js +0 -1
- package/dist/assets/useIsFocusVisible-DH0qxT5e.js +0 -1
- package/dist/assets/useMobilePicker-NPR54vgn.js +0 -6
- package/dist/assets/useMountLifecycleEffect-CjsUCFhB.js +0 -11
- package/dist/assets/useOdysseyDateFields-NlKc4Nvp.js +0 -61
- package/dist/assets/useScrollIndication-DY-bS9Bn.js +0 -31
- package/dist/assets/useSlot-D_uu6bU4.js +0 -1
- package/dist/assets/useThemeProps-BX3arxP9.js +0 -1
- package/dist/assets/useThemeProps-k7xle20R.js +0 -1
- package/dist/assets/useUniqueId-Bsgqe1tm.js +0 -11
- package/dist/assets/utilities.esm-DpQ0TZP_.js +0 -5
- package/dist/assets/utils-3Wr9v8NX.js +0 -1
- package/dist/assets/utils-iop7lDec.js +0 -1
- package/dist/assets/v4-CtRu48qb.js +0 -1
- package/dist/assets/visuallyHidden-Dan1xhjv.js +0 -1
- package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs.map +0 -1
- package/dist/esm/ui-shell/SideNav/SideNavLogo.js.map +0 -1
- package/dist/favicon.svg +0 -1
- package/dist/iframe.html +0 -748
- package/dist/index.cjs +0 -231
- package/dist/index.html +0 -203
- package/dist/index.json +0 -1
- package/dist/index.mjs +0 -229
- package/dist/index.scss +0 -549
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +0 -1
- package/dist/sb-addons/a11y-3/manager-bundle.js +0 -220
- package/dist/sb-addons/docs-1/manager-bundle.js +0 -242
- package/dist/sb-addons/essentials-actions-5/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-backgrounds-6/manager-bundle.js +0 -12
- package/dist/sb-addons/essentials-controls-4/manager-bundle.js +0 -402
- package/dist/sb-addons/essentials-measure-9/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-outline-10/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-toolbars-8/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-viewport-7/manager-bundle.js +0 -3
- package/dist/sb-addons/interactions-11/manager-bundle.js +0 -222
- package/dist/sb-addons/links-2/manager-bundle.js +0 -3
- package/dist/sb-addons/rtl-12/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-13/manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +0 -1052
- package/dist/sb-manager/globals-runtime.js +0 -42127
- package/dist/sb-manager/globals.js +0 -48
- package/dist/sb-manager/runtime.js +0 -12048
- package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts +0 -15
- package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts.map +0 -1
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.NarrowUiShellContent = void 0;
|
|
7
|
-
var _Skeleton2 = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
8
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
8
|
var _react = require("react");
|
|
10
9
|
var _reactErrorBoundary = require("react-error-boundary");
|
|
@@ -15,8 +14,8 @@ var _More = require("../icons.generated/More.cjs");
|
|
|
15
14
|
var _OdysseyDesignTokensContext = require("../OdysseyDesignTokensContext.cjs");
|
|
16
15
|
var _InnerAppContainer = require("./InnerAppContainer.cjs");
|
|
17
16
|
var _SideNav = require("./SideNav/SideNav.cjs");
|
|
18
|
-
var _SideNavLogo = require("./SideNav/SideNavLogo.cjs");
|
|
19
17
|
var _HamburgerMenuIcon = require("./TopNav/HamburgerMenuIcon.cjs");
|
|
18
|
+
var _UiShellLogo = require("./UiShellLogo.cjs");
|
|
20
19
|
var _UiShellProvider = require("./UiShellProvider.cjs");
|
|
21
20
|
var _uiShellSharedConstants = require("./uiShellSharedConstants.cjs");
|
|
22
21
|
var _useMatchAppElementToUiShellAppArea = require("./useMatchAppElementToUiShellAppArea.cjs");
|
|
@@ -192,9 +191,10 @@ const StyledTopNavSearch = (0, _styled.default)("div", {
|
|
|
192
191
|
const NarrowUiShellContent = ({
|
|
193
192
|
appElement,
|
|
194
193
|
appElementScrollingMode,
|
|
195
|
-
hasStandardAppContentPadding = true,
|
|
196
194
|
hasSideNavProps,
|
|
195
|
+
hasStandardAppContentPadding = true,
|
|
197
196
|
initialVisibleSections = ["TopNav", "SideNav", "AppSwitcher"],
|
|
197
|
+
logoProps,
|
|
198
198
|
onError = console.error,
|
|
199
199
|
optionalComponents,
|
|
200
200
|
sideNavProps,
|
|
@@ -264,19 +264,15 @@ const NarrowUiShellContent = ({
|
|
|
264
264
|
topNavBackgroundColor: uiShellContext?.sideNavBackgroundColor,
|
|
265
265
|
children: [(0, _jsxRuntime.jsxs)(StyledMenuLogo, {
|
|
266
266
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
267
|
-
children: [(sideNavProps?.isCollapsible || !sideNavProps?.isCollapsed) && (0, _jsxRuntime.jsx)(_Button.Button, {
|
|
267
|
+
children: [hasSideNavProps && (sideNavProps?.isCollapsible || !sideNavProps?.isCollapsed) && (0, _jsxRuntime.jsx)(_Button.Button, {
|
|
268
268
|
onClick: toggleLeftSideMenu,
|
|
269
269
|
startIcon: (0, _jsxRuntime.jsx)(_HamburgerMenuIcon.HamburgerMenuIcon, {}),
|
|
270
270
|
testId: "sidenav-menu--icon",
|
|
271
271
|
variant: "floating"
|
|
272
272
|
}), (0, _jsxRuntime.jsx)(StyledLogoContainer, {
|
|
273
273
|
odysseyDesignTokens: odysseyDesignTokens,
|
|
274
|
-
children:
|
|
275
|
-
|
|
276
|
-
variant: "rounded",
|
|
277
|
-
width: 67
|
|
278
|
-
}) : (0, _jsxRuntime.jsx)(_SideNavLogo.SideNavLogo, {
|
|
279
|
-
...sideNavProps?.logoProps
|
|
274
|
+
children: (0, _jsxRuntime.jsx)(_UiShellLogo.UiShellLogo, {
|
|
275
|
+
...(sideNavProps?.logoProps || logoProps)
|
|
280
276
|
})
|
|
281
277
|
})]
|
|
282
278
|
}), optionalComponents?.rightSideMenu && (0, _jsxRuntime.jsx)(_Button.Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NarrowUiShellContent.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactErrorBoundary","_Button","_hexToRgb","_Close","_More","_OdysseyDesignTokensContext","_InnerAppContainer","_SideNav","_SideNavLogo","_HamburgerMenuIcon","_UiShellProvider","_uiShellSharedConstants","_useMatchAppElementToUiShellAppArea","_useScrollState","_jsxRuntime","e","__esModule","default","StyledAppContentArea","styled","gridArea","position","height","width","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","overflow","StyledBannersContainer","zIndex","UI_SHELL_BASE_Z_INDEX","StyledLeftSideContainer","isOpen","display","UI_SHELL_OVERLAY_Z_INDEX","StyledRightSideContainer","odysseyDesignTokens","HueNeutralWhite","maxWidth","SIDE_NAV_WIDTH","overflowY","right","StyledMenuLogo","alignItems","gap","Spacing3","StyledLogoContainer","TOP_NAV_HEIGHT","paddingBlock","Spacing4","maxHeight","StyledPageOverlay","hexToRgb","HueNeutral900","asFormattedString","replace","left","top","StyledSideNavContainer","StyledUiShellContainer","HueNeutral50","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","StyledTopNav","isContentScrolled","topNavBackgroundColor","boxShadow","DepthMedium","undefined","clipPath","flexDirection","justifyContent","transition","TransitionDurationMain","TransitionTimingMain","StyledTopNavMenu","minHeight","Spacing2","paddingInline","borderBottomColor","HueNeutral100","borderBottomStyle","BorderStyleMain","borderBottomWidth","BorderWidthMain","StyledTopNavSearch","NarrowUiShellContent","appElement","appElementScrollingMode","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","useOdysseyDesignTokens","uiShellContext","useUiShellContext","useScrollState","sideNavContainerRef","useRef","topNavContainerRef","uiShellAppAreaRef","isLeftSideMenuOpen","setIsLeftSideMenuOpen","useState","isRightSideMenuOpen","setIsRightSideMenuOpen","closeSideMenus","useCallback","useEffect","unsubscribeFromCloseRightSideMenu","subscribeToCloseRightSideMenu","unsubscribeFromSideNavItemClicked","subscribeToCloseSideNavMenu","toggleLeftSideMenu","toggleRightSideMenu","parentContainerRef","useMatchAppElementToUiShellAppArea","paddingMode","uiShellResizableRefs","jsxs","Fragment","children","jsx","onClick","ref","banners","includes","ErrorBoundary","fallback","sideNavBackgroundColor","isCollapsible","isCollapsed","Button","startIcon","HamburgerMenuIcon","testId","variant","isLoading","_Skeleton2","SideNavLogo","logoProps","rightSideMenu","CloseIcon","MoreIcon","topNavLeftSide","SideNav","sideNavItems","emptySideNavItems","appName","hasCustomFooter","sideNavFooter","footerComponent","footerItems","isObtrusive","onCollapse","tabIndex","InnerAppContainer","MemoizedNarrowUiShellContent","exports","memo","displayName"],"sources":["../../../src/ui-shell/NarrowUiShellContent.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 styled from \"@emotion/styled\";\nimport { Skeleton } from \"@mui/material\";\nimport {\n CSSProperties,\n memo,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { Button } from \"../Buttons/Button.js\";\nimport { hexToRgb } from \"../hexToRgb.js\";\nimport { CloseIcon } from \"../icons.generated/Close.js\";\nimport { MoreIcon } from \"../icons.generated/More.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { SideNavLogo } from \"./SideNav/SideNavLogo.js\";\nimport { HamburgerMenuIcon } from \"./TopNav/HamburgerMenuIcon.js\";\nimport {\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport {\n emptySideNavItems,\n SIDE_NAV_WIDTH,\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n UI_SHELL_OVERLAY_Z_INDEX,\n} from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst StyledAppContentArea = styled(\"div\")({\n gridArea: \"app-content\",\n position: \"relative\",\n height: \"100%\",\n width: \"100%\",\n});\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\",\n}));\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst StyledLeftSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isOpen\",\n})<{\n isOpen: boolean;\n}>(({ isOpen }) => ({\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n position: \"absolute\",\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n}));\n\nconst StyledRightSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"isOpen\" && prop !== \"odysseyDesignTokens\",\n})<{\n isOpen: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ isOpen, odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n maxWidth: SIDE_NAV_WIDTH,\n overflowY: \"auto\",\n position: \"absolute\",\n right: 0,\n width: SIDE_NAV_WIDTH,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n}));\n\nconst StyledMenuLogo = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"inline-flex\",\n gap: odysseyDesignTokens.Spacing3,\n}));\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n}));\n\nconst StyledPageOverlay = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: hexToRgb(\n odysseyDesignTokens.HueNeutral900,\n ).asFormattedString.replace(/rgb\\((.+)\\)$/, \"rgba($1, 0.26)\"),\n gridArea: \"app-content\",\n height: \"100vh\",\n left: 0,\n position: \"absolute\",\n top: 0,\n width: \"100vw\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledSideNavContainer = styled(\"div\")({\n height: \"100%\", // Without this value, side nav won't fill up the height if the content is too short.\n});\n\nconst StyledUiShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners\"\n \"top-nav\"\n \"app-content\"\n `,\n gridTemplateColumns: \"1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n overflow: \"hidden\",\n width: \"100vw\",\n}));\n\nconst StyledTopNav = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isContentScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isContentScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isContentScrolled, topNavBackgroundColor }) => ({\n alignItems: \"stretch\",\n backgroundColor: odysseyDesignTokens.HueNeutralWhite || topNavBackgroundColor, // This logic doesn't make sense, but I wanted to leave it here for when we eventually make a decision on `topNavBackgroundColor`. --Kevin Ghadyani\n boxShadow: isContentScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n flexDirection: \"column\",\n gridArea: \"top-nav\",\n height: \"100%\",\n justifyContent: \"center\",\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledTopNavMenu = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"topNavBackgroundColor\",\n})<{\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing3,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite &&\n ({\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n } as CSSProperties)),\n}));\n\nconst StyledTopNavSearch = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n}));\n\nexport type NarrowUiShellContentProps = Pick<HtmlProps, \"testId\"> &\n Pick<UiShellNavComponentProps, \"sideNavProps\" | \"topNavProps\"> &\n UiShellContentProps;\n\nconst NarrowUiShellContent = ({\n appElement,\n appElementScrollingMode,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: NarrowUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const [isLeftSideMenuOpen, setIsLeftSideMenuOpen] = useState(false);\n const [isRightSideMenuOpen, setIsRightSideMenuOpen] = useState(false);\n\n const closeSideMenus = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen(false);\n }, []);\n\n useEffect(() => {\n const unsubscribeFromCloseRightSideMenu =\n uiShellContext?.subscribeToCloseRightSideMenu(() => {\n closeSideMenus();\n });\n\n const unsubscribeFromSideNavItemClicked =\n uiShellContext?.subscribeToCloseSideNavMenu(() => {\n closeSideMenus();\n });\n\n return () => {\n unsubscribeFromCloseRightSideMenu?.();\n unsubscribeFromSideNavItemClicked?.();\n };\n }, [closeSideMenus, uiShellContext]);\n\n const toggleLeftSideMenu = useCallback(() => {\n setIsRightSideMenuOpen(false);\n setIsLeftSideMenuOpen((isLeftSideMenuOpen) => !isLeftSideMenuOpen);\n }, []);\n\n const toggleRightSideMenu = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen((isRightSideMenuOpen) => !isRightSideMenuOpen);\n }, []);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"compact\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <>\n {(isLeftSideMenuOpen || isRightSideMenuOpen) && (\n <StyledPageOverlay\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={closeSideMenus}\n />\n )}\n\n <StyledUiShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n {(initialVisibleSections?.includes(\"TopNav\") || topNavProps) && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledTopNav\n isContentScrolled={isContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledTopNavMenu\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n <StyledMenuLogo odysseyDesignTokens={odysseyDesignTokens}>\n {(sideNavProps?.isCollapsible ||\n !sideNavProps?.isCollapsed) && (\n <Button\n onClick={toggleLeftSideMenu}\n startIcon={<HamburgerMenuIcon />}\n testId=\"sidenav-menu--icon\"\n variant=\"floating\"\n />\n )}\n\n <StyledLogoContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {sideNavProps?.isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton height={24} variant=\"rounded\" width={67} />\n ) : (\n <SideNavLogo {...sideNavProps?.logoProps} />\n )}\n </StyledLogoContainer>\n </StyledMenuLogo>\n\n {optionalComponents?.rightSideMenu && (\n <Button\n onClick={toggleRightSideMenu}\n startIcon={\n isRightSideMenuOpen ? <CloseIcon /> : <MoreIcon />\n }\n testId=\"userprofile-menu--icon\"\n variant=\"floating\"\n />\n )}\n </StyledTopNavMenu>\n\n {optionalComponents?.topNavLeftSide && (\n <StyledTopNavSearch odysseyDesignTokens={odysseyDesignTokens}>\n {optionalComponents?.topNavLeftSide}\n </StyledTopNavSearch>\n )}\n </StyledTopNav>\n </ErrorBoundary>\n )}\n\n <StyledAppContentArea>\n <StyledLeftSideContainer isOpen={isLeftSideMenuOpen}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") &&\n !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledSideNavContainer>\n <SideNav\n {...{\n ...{\n ...sideNavProps,\n // This hides the side nav logo or app name from showing up as we already have one in the narrow top nav.\n appName: undefined,\n logoProps: undefined,\n },\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n isCollapsed={false}\n isCollapsible={false}\n isObtrusive\n onCollapse={closeSideMenus}\n />\n </StyledSideNavContainer>\n </ErrorBoundary>\n )}\n </StyledLeftSideContainer>\n\n <StyledRightSideContainer\n isOpen={isRightSideMenuOpen}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledSideNavContainer>\n {optionalComponents?.rightSideMenu}\n </StyledSideNavContainer>\n </StyledRightSideContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledAppContentArea>\n </StyledUiShellContainer>\n </>\n );\n};\n\nconst MemoizedNarrowUiShellContent = memo(NarrowUiShellContent);\nMemoizedNarrowUiShellContent.displayName = \"NarrowUiShellContent\";\n\nexport { MemoizedNarrowUiShellContent as NarrowUiShellContent };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,mBAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AAIA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AAKA,IAAAY,gBAAA,GAAAZ,OAAA;AACA,IAAAa,uBAAA,GAAAb,OAAA;AAOA,IAAAc,mCAAA,GAAAd,OAAA;AACA,IAAAe,eAAA,GAAAf,OAAA;AAAqD,IAAAgB,WAAA,GAAAhB,OAAA;AAAA,SAAAD,uBAAAkB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAnDrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2CA,MAAMG,oBAAoB,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EACzCC,QAAQ,EAAE,aAAa;EACvBC,QAAQ,EAAE,UAAU;EACpBC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;AACT,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG,IAAAL,eAAM,EAAC,KAAK,EAAE;EACvCM,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAo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AW,GAAG,sBAAsB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"NarrowUiShellContent.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactErrorBoundary","_Button","_hexToRgb","_Close","_More","_OdysseyDesignTokensContext","_InnerAppContainer","_SideNav","_HamburgerMenuIcon","_UiShellLogo","_UiShellProvider","_uiShellSharedConstants","_useMatchAppElementToUiShellAppArea","_useScrollState","_jsxRuntime","e","__esModule","default","StyledAppContentArea","styled","gridArea","position","height","width","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","overflow","StyledBannersContainer","zIndex","UI_SHELL_BASE_Z_INDEX","StyledLeftSideContainer","isOpen","display","UI_SHELL_OVERLAY_Z_INDEX","StyledRightSideContainer","odysseyDesignTokens","HueNeutralWhite","maxWidth","SIDE_NAV_WIDTH","overflowY","right","StyledMenuLogo","alignItems","gap","Spacing3","StyledLogoContainer","TOP_NAV_HEIGHT","paddingBlock","Spacing4","maxHeight","StyledPageOverlay","hexToRgb","HueNeutral900","asFormattedString","replace","left","top","StyledSideNavContainer","StyledUiShellContainer","HueNeutral50","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","StyledTopNav","isContentScrolled","topNavBackgroundColor","boxShadow","DepthMedium","undefined","clipPath","flexDirection","justifyContent","transition","TransitionDurationMain","TransitionTimingMain","StyledTopNavMenu","minHeight","Spacing2","paddingInline","borderBottomColor","HueNeutral100","borderBottomStyle","BorderStyleMain","borderBottomWidth","BorderWidthMain","StyledTopNavSearch","NarrowUiShellContent","appElement","appElementScrollingMode","hasSideNavProps","hasStandardAppContentPadding","initialVisibleSections","logoProps","onError","console","error","optionalComponents","sideNavProps","topNavProps","useOdysseyDesignTokens","uiShellContext","useUiShellContext","useScrollState","sideNavContainerRef","useRef","topNavContainerRef","uiShellAppAreaRef","isLeftSideMenuOpen","setIsLeftSideMenuOpen","useState","isRightSideMenuOpen","setIsRightSideMenuOpen","closeSideMenus","useCallback","useEffect","unsubscribeFromCloseRightSideMenu","subscribeToCloseRightSideMenu","unsubscribeFromSideNavItemClicked","subscribeToCloseSideNavMenu","toggleLeftSideMenu","toggleRightSideMenu","parentContainerRef","useMatchAppElementToUiShellAppArea","paddingMode","uiShellResizableRefs","jsxs","Fragment","children","jsx","onClick","ref","banners","includes","ErrorBoundary","fallback","sideNavBackgroundColor","isCollapsible","isCollapsed","Button","startIcon","HamburgerMenuIcon","testId","variant","UiShellLogo","rightSideMenu","CloseIcon","MoreIcon","topNavLeftSide","SideNav","isLoading","sideNavItems","emptySideNavItems","appName","hasCustomFooter","sideNavFooter","footerComponent","footerItems","isObtrusive","onCollapse","tabIndex","InnerAppContainer","MemoizedNarrowUiShellContent","exports","memo","displayName"],"sources":["../../../src/ui-shell/NarrowUiShellContent.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 styled from \"@emotion/styled\";\nimport {\n CSSProperties,\n memo,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { Button } from \"../Buttons/Button.js\";\nimport { hexToRgb } from \"../hexToRgb.js\";\nimport { CloseIcon } from \"../icons.generated/Close.js\";\nimport { MoreIcon } from \"../icons.generated/More.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { HamburgerMenuIcon } from \"./TopNav/HamburgerMenuIcon.js\";\nimport {\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellLogo } from \"./UiShellLogo.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport {\n emptySideNavItems,\n SIDE_NAV_WIDTH,\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n UI_SHELL_OVERLAY_Z_INDEX,\n} from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst StyledAppContentArea = styled(\"div\")({\n gridArea: \"app-content\",\n position: \"relative\",\n height: \"100%\",\n width: \"100%\",\n});\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\",\n}));\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst StyledLeftSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isOpen\",\n})<{\n isOpen: boolean;\n}>(({ isOpen }) => ({\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n position: \"absolute\",\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n}));\n\nconst StyledRightSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"isOpen\" && prop !== \"odysseyDesignTokens\",\n})<{\n isOpen: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ isOpen, odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n maxWidth: SIDE_NAV_WIDTH,\n overflowY: \"auto\",\n position: \"absolute\",\n right: 0,\n width: SIDE_NAV_WIDTH,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n}));\n\nconst StyledMenuLogo = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"inline-flex\",\n gap: odysseyDesignTokens.Spacing3,\n}));\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n}));\n\nconst StyledPageOverlay = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: hexToRgb(\n odysseyDesignTokens.HueNeutral900,\n ).asFormattedString.replace(/rgb\\((.+)\\)$/, \"rgba($1, 0.26)\"),\n gridArea: \"app-content\",\n height: \"100vh\",\n left: 0,\n position: \"absolute\",\n top: 0,\n width: \"100vw\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledSideNavContainer = styled(\"div\")({\n height: \"100%\", // Without this value, side nav won't fill up the height if the content is too short.\n});\n\nconst StyledUiShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners\"\n \"top-nav\"\n \"app-content\"\n `,\n gridTemplateColumns: \"1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n overflow: \"hidden\",\n width: \"100vw\",\n}));\n\nconst StyledTopNav = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isContentScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isContentScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isContentScrolled, topNavBackgroundColor }) => ({\n alignItems: \"stretch\",\n backgroundColor: odysseyDesignTokens.HueNeutralWhite || topNavBackgroundColor, // This logic doesn't make sense, but I wanted to leave it here for when we eventually make a decision on `topNavBackgroundColor`. --Kevin Ghadyani\n boxShadow: isContentScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n flexDirection: \"column\",\n gridArea: \"top-nav\",\n height: \"100%\",\n justifyContent: \"center\",\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledTopNavMenu = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"topNavBackgroundColor\",\n})<{\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing3,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite &&\n ({\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n } as CSSProperties)),\n}));\n\nconst StyledTopNavSearch = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n}));\n\nexport type NarrowUiShellContentProps = Pick<HtmlProps, \"testId\"> &\n Pick<UiShellNavComponentProps, \"logoProps\" | \"sideNavProps\" | \"topNavProps\"> &\n UiShellContentProps;\n\nconst NarrowUiShellContent = ({\n appElement,\n appElementScrollingMode,\n hasSideNavProps,\n hasStandardAppContentPadding = true,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n logoProps,\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: NarrowUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const [isLeftSideMenuOpen, setIsLeftSideMenuOpen] = useState(false);\n const [isRightSideMenuOpen, setIsRightSideMenuOpen] = useState(false);\n\n const closeSideMenus = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen(false);\n }, []);\n\n useEffect(() => {\n const unsubscribeFromCloseRightSideMenu =\n uiShellContext?.subscribeToCloseRightSideMenu(() => {\n closeSideMenus();\n });\n\n const unsubscribeFromSideNavItemClicked =\n uiShellContext?.subscribeToCloseSideNavMenu(() => {\n closeSideMenus();\n });\n\n return () => {\n unsubscribeFromCloseRightSideMenu?.();\n unsubscribeFromSideNavItemClicked?.();\n };\n }, [closeSideMenus, uiShellContext]);\n\n const toggleLeftSideMenu = useCallback(() => {\n setIsRightSideMenuOpen(false);\n setIsLeftSideMenuOpen((isLeftSideMenuOpen) => !isLeftSideMenuOpen);\n }, []);\n\n const toggleRightSideMenu = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen((isRightSideMenuOpen) => !isRightSideMenuOpen);\n }, []);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"compact\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <>\n {(isLeftSideMenuOpen || isRightSideMenuOpen) && (\n <StyledPageOverlay\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={closeSideMenus}\n />\n )}\n\n <StyledUiShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n {(initialVisibleSections?.includes(\"TopNav\") || topNavProps) && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledTopNav\n isContentScrolled={isContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledTopNavMenu\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n <StyledMenuLogo odysseyDesignTokens={odysseyDesignTokens}>\n {hasSideNavProps &&\n (sideNavProps?.isCollapsible ||\n !sideNavProps?.isCollapsed) && (\n <Button\n onClick={toggleLeftSideMenu}\n startIcon={<HamburgerMenuIcon />}\n testId=\"sidenav-menu--icon\"\n variant=\"floating\"\n />\n )}\n\n <StyledLogoContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <UiShellLogo {...(sideNavProps?.logoProps || logoProps)} />\n </StyledLogoContainer>\n </StyledMenuLogo>\n\n {optionalComponents?.rightSideMenu && (\n <Button\n onClick={toggleRightSideMenu}\n startIcon={\n isRightSideMenuOpen ? <CloseIcon /> : <MoreIcon />\n }\n testId=\"userprofile-menu--icon\"\n variant=\"floating\"\n />\n )}\n </StyledTopNavMenu>\n\n {optionalComponents?.topNavLeftSide && (\n <StyledTopNavSearch odysseyDesignTokens={odysseyDesignTokens}>\n {optionalComponents?.topNavLeftSide}\n </StyledTopNavSearch>\n )}\n </StyledTopNav>\n </ErrorBoundary>\n )}\n\n <StyledAppContentArea>\n <StyledLeftSideContainer isOpen={isLeftSideMenuOpen}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") &&\n !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledSideNavContainer>\n <SideNav\n {...{\n ...{\n ...sideNavProps,\n // This hides the side nav logo or app name from showing up as we already have one in the narrow top nav.\n appName: undefined,\n logoProps: undefined,\n },\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n isCollapsed={false}\n isCollapsible={false}\n isObtrusive\n onCollapse={closeSideMenus}\n />\n </StyledSideNavContainer>\n </ErrorBoundary>\n )}\n </StyledLeftSideContainer>\n\n <StyledRightSideContainer\n isOpen={isRightSideMenuOpen}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledSideNavContainer>\n {optionalComponents?.rightSideMenu}\n </StyledSideNavContainer>\n </StyledRightSideContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledAppContentArea>\n </StyledUiShellContainer>\n </>\n );\n};\n\nconst MemoizedNarrowUiShellContent = memo(NarrowUiShellContent);\nMemoizedNarrowUiShellContent.displayName = \"NarrowUiShellContent\";\n\nexport { MemoizedNarrowUiShellContent as NarrowUiShellContent };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,mBAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AAIA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,kBAAA,GAAAV,OAAA;AAKA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AACA,IAAAa,uBAAA,GAAAb,OAAA;AAOA,IAAAc,mCAAA,GAAAd,OAAA;AACA,IAAAe,eAAA,GAAAf,OAAA;AAAqD,IAAAgB,WAAA,GAAAhB,OAAA;AAAA,SAAAD,uBAAAkB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlDrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0CA,MAAMG,oBAAoB,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EACzCC,QAAQ,EAAE,aAAa;EACvBC,QAAQ,EAAE,UAAU;EACpBC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE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","ignoreList":[]}
|
|
@@ -10,8 +10,8 @@ var _react = require("react");
|
|
|
10
10
|
var _OdysseyDesignTokensContext = require("../../OdysseyDesignTokensContext.cjs");
|
|
11
11
|
var _Typography = require("../../Typography.cjs");
|
|
12
12
|
var _UiShellProvider = require("../../ui-shell/UiShellProvider.cjs");
|
|
13
|
+
var _UiShellLogo = require("../UiShellLogo.cjs");
|
|
13
14
|
var _uiShellSharedConstants = require("../uiShellSharedConstants.cjs");
|
|
14
|
-
var _SideNavLogo = require("./SideNavLogo.cjs");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
/*!
|
|
@@ -86,7 +86,7 @@ const SideNavHeader = ({
|
|
|
86
86
|
height: 24,
|
|
87
87
|
variant: "rounded",
|
|
88
88
|
width: 67
|
|
89
|
-
}) : (0, _jsxRuntime.jsx)(
|
|
89
|
+
}) : (0, _jsxRuntime.jsx)(_UiShellLogo.UiShellLogo, {
|
|
90
90
|
...logoProps
|
|
91
91
|
})
|
|
92
92
|
}), appName && (0, _jsxRuntime.jsx)(SideNavHeadingContainer, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavHeader.cjs","names":["_styled","_interopRequireDefault","require","_react","_OdysseyDesignTokensContext","_Typography","_UiShellProvider","
|
|
1
|
+
{"version":3,"file":"SideNavHeader.cjs","names":["_styled","_interopRequireDefault","require","_react","_OdysseyDesignTokensContext","_Typography","_UiShellProvider","_UiShellLogo","_uiShellSharedConstants","_jsxRuntime","e","__esModule","default","SideNavHeaderContainer","styled","position","display","flexDirection","zIndex","UI_SHELL_BASE_Z_INDEX","SideNavLogoContainer","shouldForwardProp","prop","headerBackgroundColor","isSameBackgroundAsMain","odysseyDesignTokens","alignItems","height","TOP_NAV_HEIGHT","paddingBlock","Spacing4","paddingInline","Spacing5","backgroundColor","HueNeutralWhite","maxHeight","width","maxWidth","SideNavHeadingContainer","contrastFontColor","justifyContent","margin","color","SideNavHeader","appName","isLoading","logoProps","useOdysseyDesignTokens","uiShellContext","useUiShellContext","jsxs","children","jsx","sideNavBackgroundColor","_Skeleton2","variant","UiShellLogo","sideNavContrastColors","fontColor","Heading5","component","MemoizedSideNavHeader","exports","memo","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavHeader.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 styled from \"@emotion/styled\";\nimport { Skeleton } from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport { ContrastColors } from \"../../createContrastColors.js\";\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { Heading5 } from \"../../Typography.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport { UiShellLogo, UiShellLogoProps } from \"../UiShellLogo.js\";\nimport {\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n} from \"../uiShellSharedConstants.js\";\n\nconst SideNavHeaderContainer = styled(\"div\")({\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst SideNavLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"headerBackgroundColor\" &&\n prop !== \"isSameBackgroundAsMain\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n headerBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n isSameBackgroundAsMain: UiShellLogoProps[\"isSameBackgroundAsMain\"];\n odysseyDesignTokens: DesignTokens;\n}>(\n ({ headerBackgroundColor, isSameBackgroundAsMain, odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n backgroundColor: isSameBackgroundAsMain\n ? headerBackgroundColor\n : odysseyDesignTokens.HueNeutralWhite,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n }),\n);\n\nconst SideNavHeadingContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"contrastFontColor\",\n})(\n ({\n contrastFontColor,\n odysseyDesignTokens,\n }: {\n contrastFontColor: ContrastColors[\"fontColor\"];\n odysseyDesignTokens: DesignTokens;\n }) => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n width: \"100%\",\n\n [\"& .MuiTypography-root\"]: {\n margin: 0,\n width: \"100%\",\n color: contrastFontColor || \"inherit\",\n },\n }),\n);\n\nexport type SideNavHeaderProps = {\n /**\n * The app's name.\n */\n appName?: string;\n /**\n * If the side nav currently has no items, it will be loading.\n */\n isLoading?: boolean;\n /**\n * Properties for displaying the logo image or passing a logo image component instead.\n */\n logoProps?: UiShellLogoProps;\n};\n\nconst SideNavHeader = ({\n appName,\n isLoading,\n logoProps,\n}: SideNavHeaderProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n return (\n <SideNavHeaderContainer>\n <SideNavLogoContainer\n data-se=\"sidenav-header-logo-container\"\n headerBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n isSameBackgroundAsMain={logoProps?.isSameBackgroundAsMain}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton height={24} variant=\"rounded\" width={67} />\n ) : (\n <UiShellLogo {...logoProps} />\n )}\n </SideNavLogoContainer>\n\n {appName && (\n <SideNavHeadingContainer\n contrastFontColor={uiShellContext?.sideNavContrastColors?.fontColor}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Heading5 component=\"h2\">\n {isLoading ? <Skeleton /> : appName}\n </Heading5>\n </SideNavHeadingContainer>\n )}\n </SideNavHeaderContainer>\n );\n};\n\nconst MemoizedSideNavHeader = memo(SideNavHeader);\nMemoizedSideNavHeader.displayName = \"SideNavHeader\";\n\nexport { MemoizedSideNavHeader as SideNavHeader };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,2BAAA,GAAAF,OAAA;AAIA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AAIA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,uBAAA,GAAAN,OAAA;AAGsC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA9BtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBA,MAAMG,sBAAsB,GAAG,IAAAC,eAAM,EAAC,KAAK,CAAC,CAAC;EAC3CC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,MAAM,EAAEC;AACV,CAAC,CAAC;AAEF,MAAMC,oBAAoB,GAAG,IAAAN,eAAM,EAAC,KAAK,EAAE;EACzCO,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,uBAAuB,IAChCA,IAAI,KAAK,wBAAwB,IACjCA,IAAI,KA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AAAsC,QAAA,GACrB,IAAA1C,WAAA,CAAA2C,GAAA,EAAChC,oBAAoB;MACnB,WAAQ,+BAA+B;MACvCG,qBAAqB,EAAEyB,cAAc,EAAEK,sBAAuB;MAC9D7B,sBAAsB,EAAEsB,SAAS,EAAEtB,sBAAuB;MAC1DC,mBAAmB,EAAEA,mBAAoB;MAAA0B,QAAA,EAExCN,SAAS,GAER,IAAApC,WAAA,CAAA2C,GAAA,EAAAE,UAAA,CAAA1C,OAAA;QAAUe,MAAM,EAAE,EAAG;QAAC4B,OAAO,EAAC,SAAS;QAACnB,KAAK,EAAE;MAAG,CAAE,CAAC,GAErD,IAAA3B,WAAA,CAAA2C,GAAA,EAAC7C,YAAA,CAAAiD,WAAW;QAAA,GAAKV;MAAS,CAAG;IAC9B,CACmB,CAAC,EAEtBF,OAAO,IACN,IAAAnC,WAAA,CAAA2C,GAAA,EAACd,uBAAuB;MACtBC,iBAAiB,EAAES,cAAc,EAAES,qBAAqB,EAAEC,SAAU;MACpEjC,mBAAmB,EAAEA,mBAAoB;MAAA0B,QAAA,EAEzC,IAAA1C,WAAA,CAAA2C,GAAA,EAAC/C,WAAA,CAAAsD,QAAQ;QAACC,SAAS,EAAC,IAAI;QAAAT,QAAA,EACrBN,SAAS,GAAG,IAAApC,WAAA,CAAA2C,GAAA,EAAAE,UAAA,CAAA1C,OAAA,IAAW,CAAC,GAAGgC;MAAO,CAC3B;IAAC,CACY,CAC1B;EAAA,CACqB,CAAC;AAE7B,CAAC;AAED,MAAMiB,qBAAqB,GAAAC,OAAA,CAAAnB,aAAA,GAAG,IAAAoB,WAAI,EAACpB,aAAa,CAAC;AACjDkB,qBAAqB,CAACG,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"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 type { ReactElement, SyntheticEvent } from \"react\";\n\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\n\n/**\n * Type representing spacing values from the design tokens.\n * odysseyDesignTokens.Spacing0, odysseyDesignTokens.Spacing1, etc.\n */\nexport type OdysseySpacingValue = DesignTokens[keyof Pick<\n DesignTokens,\n | \"Spacing0\"\n | \"Spacing1\"\n | \"Spacing2\"\n | \"Spacing3\"\n | \"Spacing4\"\n | \"Spacing5\"\n | \"Spacing6\"\n | \"Spacing7\"\n | \"Spacing8\"\n | \"Spacing9\"\n>];\n\
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"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 type { ReactElement, SyntheticEvent } from \"react\";\n\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\nimport type { UiShellLogoProps } from \"../UiShellLogo.js\";\n\n/**\n * Type representing spacing values from the design tokens.\n * odysseyDesignTokens.Spacing0, odysseyDesignTokens.Spacing1, etc.\n */\nexport type OdysseySpacingValue = DesignTokens[keyof Pick<\n DesignTokens,\n | \"Spacing0\"\n | \"Spacing1\"\n | \"Spacing2\"\n | \"Spacing3\"\n | \"Spacing4\"\n | \"Spacing5\"\n | \"Spacing6\"\n | \"Spacing7\"\n | \"Spacing8\"\n | \"Spacing9\"\n>];\n\nexport type SideNavProps = {\n /**\n * Side Nav header text that is usually reserved to show the App name\n */\n appName?: string;\n /**\n * If we want the collapse state to be based on session storage, then this needs to be `true`.\n */\n hasSessionStorageState?: boolean;\n /**\n * Determines whether the side nav is collapsed by default. When `true`, side nav also closes once and item is clicked.\n */\n isCollapsed?: boolean;\n /**\n * Determines whether the side nav is collapsible\n */\n isCollapsible?: boolean;\n /**\n * Determines whether the side nav items use compact layout\n */\n isCompact?: boolean;\n /**\n * Before the side nav has items, it will be in a loading state.\n */\n isLoading?: boolean;\n /**\n * If the side nav is up too much screen real estate. For instance, if you're in a narrower view, and it displays next to the content.\n *\n * When `true`, side nav will close itself after nav items are clicked.\n */\n isObtrusive?: boolean;\n /**\n * Optional padding to apply to the start of the leaves (items which are not expanded).\n * Should be one of the Odyssey design token spacing values (e.g., odysseyDesignTokens.Spacing1, odysseyDesignTokens.Spacing2, etc.)\n */\n leavesPaddingStart?: OdysseySpacingValue;\n /**\n * @deprecated use `logoProps` next to `sideNavProps` instead. This was moved to the top level.\n *\n * An optional logo component or src string for an img to display in the header. If not provided, will default to the Okta logo\n */\n logoProps?: UiShellLogoProps;\n /**\n * Triggers when the side nav is collapsed\n */\n onCollapse?: () => void;\n /**\n * Triggers when the side nav is expanded\n */\n onExpand?: () => void;\n /**\n * Triggers when the item is reordered\n */\n onSort?: (\n reorderedItems: SideNavItem[],\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n /**\n * Nav items in the side nav\n */\n sideNavItems?: SideNavItem[];\n} & (\n | {\n /**\n * The component to display as the footer; if present the `footerItems` are ignored and not rendered.\n */\n footerComponent?: ReactElement;\n footerItems?: never;\n hasCustomFooter: true;\n }\n | {\n footerComponent?: never;\n /**\n * Footer items in the side nav\n */\n footerItems?: SideNavFooterItem[];\n hasCustomFooter?: false;\n }\n) &\n Pick<HtmlProps, \"testId\">;\n\nexport type SideNavItem = {\n /**\n * The number to display as a count alongside the nav item\n */\n count?: number;\n /**\n * The icon element to display after the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n endIcon?: ReactElement;\n id: string;\n /**\n * Whether the item is disabled. When set to true the nav item is set to Disabled color,\n * the link/item is not clickable, and item with nestedNavItems is not expandable.\n */\n isDisabled?: boolean;\n /**\n * Whether the item is active/selected\n */\n isSelected?: boolean;\n /**\n * Whether the item is sortable within a sortable list\n */\n isSortable?: boolean;\n label: string;\n /**\n * Event fired when the nav item is changed (for instance, capturing clicks on Accordion)\n */\n onChange?: (event: SyntheticEvent) => void;\n /**\n * Event fired when the nav item is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n /**\n * The status element to display after the label\n */\n severity?: (typeof statusSeverityValues)[number];\n /**\n * The icon element to display before the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n startIcon?: ReactElement;\n /**\n * The label to display inside the status\n */\n statusLabel?: string;\n /**\n * The link target prop. e.g., \"_blank\"\n */\n target?: string;\n} & (\n | {\n href?: never;\n isDefaultExpanded?: never;\n isExpanded?: never;\n /**\n * Determines if the side nav item is a section header\n */\n isSectionHeader: true;\n nestedNavItems?: never;\n }\n | {\n /**\n * link added to the nav item. if it is undefined, static text will be displayed.\n * fires onClick event when it is passed\n */\n href?: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n nestedNavItems?: never;\n }\n | {\n href?: never;\n /**\n * Whether the accordion (nav item with nestedNavItems) is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * If true, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n isExpanded?: boolean;\n /**\n * If true, enables sorting for the accordion items\n */\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n | {\n href: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -54,6 +54,9 @@ const UiShell = ({
|
|
|
54
54
|
}) => {
|
|
55
55
|
const [componentProps, setComponentProps] = (0, _react.useState)(defaultComponentProps);
|
|
56
56
|
const activeBreakpoint = (0, _useUiShellBreakpoints.useUiShellBreakpoints)(breakpointConfig);
|
|
57
|
+
if (componentProps.sideNavProps?.logoProps && componentProps.logoProps) {
|
|
58
|
+
throw new Error("Unified UI Shell: You passed both `logoProps` and `sideNavProps.logoProps` as component props. Please only use the top-level `logoProps` instead.");
|
|
59
|
+
}
|
|
57
60
|
(0, _react.useEffect)(() => {
|
|
58
61
|
const unsubscribe = subscribeToPropChanges(componentProps => {
|
|
59
62
|
setComponentProps(componentProps || defaultComponentProps);
|
|
@@ -98,7 +101,8 @@ const UiShell = ({
|
|
|
98
101
|
...componentProps.sideNavProps,
|
|
99
102
|
hasSessionStorageState: activeBreakpoint === "wide",
|
|
100
103
|
isCollapsed: activeBreakpoint === "medium" || componentProps.sideNavProps?.isCollapsed,
|
|
101
|
-
isCollapsible: activeBreakpoint === "medium" || componentProps.sideNavProps?.isCollapsible
|
|
104
|
+
isCollapsible: activeBreakpoint === "medium" || componentProps.sideNavProps?.isCollapsible,
|
|
105
|
+
logoProps: componentProps.sideNavProps?.logoProps || componentProps.logoProps
|
|
102
106
|
}
|
|
103
107
|
},
|
|
104
108
|
appElement: appElement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiShell.cjs","names":["_react","require","_reactErrorBoundary","_OdysseyProvider","_NarrowUiShellContent","_UiShellProvider","_useUiShellBreakpoints","_WideUiShellContent","_jsxRuntime","defaultComponentProps","exports","sideNavProps","undefined","topNavProps","errorComponent","jsx","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","breakpointConfig","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","sideNavBackgroundContrastColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","useState","activeBreakpoint","useUiShellBreakpoints","useEffect","unsubscribe","ErrorBoundary","fallback","children","OdysseyProvider","emotionRootElement","hasCssBaseline","shadowRootElement","jsxs","UiShellProvider","NarrowUiShellContent","hasSideNavProps","Boolean","WideUiShellContent","hasSessionStorageState","isCollapsed","isCollapsible","MemoizedUiShell","memo","displayName"],"sources":["../../../src/ui-shell/UiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, type SetStateAction, useEffect, useState } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport { MessageBus } from \"../tools/createMessageBus.js\";\nimport { type ReactRootElements } from \"../web-component/createReactRootElements.js\";\nimport { NarrowUiShellContent } from \"./NarrowUiShellContent.js\";\nimport {\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellProvider, UiShellProviderProps } from \"./UiShellProvider.js\";\nimport {\n UiShellBreakpointConfig,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: undefined,\n topNavProps: undefined,\n} as const;\n\nconst errorComponent = <div data-error />;\n\nexport type UiShellProps = {\n /**\n * Customized breakpoints for UI Shell.\n *\n * The defaults are set for you. Pass these only if your app doesn't work properly with the defaults (like Admin).\n */\n breakpointConfig?: UiShellBreakpointConfig;\n /**\n * Notifies when subscribed to prop changes.\n *\n * UI Shell listens to prop updates, and it won't subscribe synchronously. Because of that, this callback notifies when that subscription is ready.\n */\n onSubscriptionCreated: () => void;\n /**\n * This is a callback that provides a subscriber callback to listen for changes to state.\n * It allows UI Shell to listen for state changes.\n *\n * The props coming in this callback go directly to a React state; therefore, it shares the same signature and provides a previous state.\n */\n subscribeToPropChanges: MessageBus<\n SetStateAction<UiShellNavComponentProps>\n >[\"subscribe\"];\n /**\n * Element inside UI Shell's React root component renders into. If using a web component, this is going to exist inside it.\n */\n uiShellAppElement: ReactRootElements[\"appRootElement\"];\n /**\n * Typically, this is your `<head>` element. If using a web component, you need to create one yourself as Shadow DOM's don't have a `<head>`.\n */\n uiShellStylesElement: ReactRootElements[\"stylesRootElement\"];\n} & UiShellProviderProps &\n Pick<\n UiShellContentProps,\n | \"appElement\"\n | \"appElementScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"onError\"\n | \"optionalComponents\"\n >;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst UiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement,\n appElementScrollingMode,\n breakpointConfig,\n closeSideNavMenu,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n subscribeToPropChanges,\n topNavBackgroundColor,\n uiShellAppElement,\n uiShellStylesElement,\n}: UiShellProps) => {\n const [componentProps, setComponentProps] = useState(defaultComponentProps);\n\n const activeBreakpoint = useUiShellBreakpoints(breakpointConfig);\n\n useEffect(() => {\n const unsubscribe = subscribeToPropChanges((componentProps) => {\n // If for some reason nothing is passed as `componentProps`, we fallback on `defaultComponentProps` as a safety mechanism to ensure nothing breaks.\n setComponentProps(componentProps || defaultComponentProps);\n });\n\n onSubscriptionCreated();\n\n return () => {\n unsubscribe();\n };\n }, [onSubscriptionCreated, subscribeToPropChanges]);\n\n return activeBreakpoint === \"none\" ? null : (\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <OdysseyProvider\n emotionRootElement={uiShellStylesElement}\n hasCssBaseline\n shadowRootElement={uiShellAppElement}\n >\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n closeSideNavMenu={closeSideNavMenu}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n {activeBreakpoint === \"narrow\" && (\n <NarrowUiShellContent\n {...componentProps}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasSideNavProps={Boolean(componentProps.sideNavProps)}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n\n {(activeBreakpoint === \"medium\" || activeBreakpoint === \"wide\") && (\n <WideUiShellContent\n {...{\n ...componentProps,\n ...{\n sideNavProps: {\n ...componentProps.sideNavProps,\n hasSessionStorageState: activeBreakpoint === \"wide\",\n isCollapsed:\n activeBreakpoint === \"medium\" ||\n componentProps.sideNavProps?.isCollapsed,\n isCollapsible:\n activeBreakpoint === \"medium\" ||\n componentProps.sideNavProps?.isCollapsible,\n // We have to use `as` because sideNavProps expects you to have `sideNavItems` defined even though it had to be passed in `...componentProps.sideNavProps`.\n } as typeof componentProps.sideNavProps,\n },\n }}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasSideNavProps={Boolean(componentProps.sideNavProps)}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n </UiShellProvider>\n </ErrorBoundary>\n </OdysseyProvider>\n </ErrorBoundary>\n );\n};\n\nconst MemoizedUiShell = memo(UiShell);\nMemoizedUiShell.displayName = \"UiShell\";\n\nexport { MemoizedUiShell as UiShell };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAGA,IAAAG,qBAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AAIA,IAAAM,mBAAA,GAAAN,OAAA;AAA6D,IAAAO,WAAA,GAAAP,OAAA;AA5B7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBO,MAAMQ,qBAA+C,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EAC7DE,YAAY,EAAEC,SAAS;EACvBC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AK,QAAQ,IAC7BH,cAAc,CAAC3B,YAAY,EAAEiD;cAEjC;YACF,CAAC;YAEHzC,UAAU,EAAEA,UAAW;YACvBC,uBAAuB,EAAEA,uBAAwB;YACjDmC,eAAe,EAAEC,OAAO,CAAClB,cAAc,CAAC3B,YAAY,CAAE;YACtDY,4BAA4B,EAAEA,4BAA6B;YAC3DC,sBAAsB,EAAEA,sBAAuB;YAC/CC,OAAO,EAAEA,OAAQ;YACjBI,kBAAkB,EAAEA;UAAmB,CACxC,CACF;QAAA,CACc;MAAC,CACL;IAAC,CACD;EAAC,CACL,CAChB;AACH,CAAC;AAED,MAAMgC,eAAe,GAAAnD,OAAA,CAAAM,OAAA,GAAG,IAAA8C,WAAI,EAAC9C,OAAO,CAAC;AACrC6C,eAAe,CAACE,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"UiShell.cjs","names":["_react","require","_reactErrorBoundary","_OdysseyProvider","_NarrowUiShellContent","_UiShellProvider","_useUiShellBreakpoints","_WideUiShellContent","_jsxRuntime","defaultComponentProps","exports","sideNavProps","undefined","topNavProps","errorComponent","jsx","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","breakpointConfig","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","sideNavBackgroundContrastColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","useState","activeBreakpoint","useUiShellBreakpoints","logoProps","Error","useEffect","unsubscribe","ErrorBoundary","fallback","children","OdysseyProvider","emotionRootElement","hasCssBaseline","shadowRootElement","jsxs","UiShellProvider","NarrowUiShellContent","hasSideNavProps","Boolean","WideUiShellContent","hasSessionStorageState","isCollapsed","isCollapsible","MemoizedUiShell","memo","displayName"],"sources":["../../../src/ui-shell/UiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, type SetStateAction, useEffect, useState } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport { MessageBus } from \"../tools/createMessageBus.js\";\nimport { type ReactRootElements } from \"../web-component/createReactRootElements.js\";\nimport { NarrowUiShellContent } from \"./NarrowUiShellContent.js\";\nimport {\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellProvider, UiShellProviderProps } from \"./UiShellProvider.js\";\nimport {\n UiShellBreakpointConfig,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: undefined,\n topNavProps: undefined,\n} as const;\n\nconst errorComponent = <div data-error />;\n\nexport type UiShellProps = {\n /**\n * Customized breakpoints for UI Shell.\n *\n * The defaults are set for you. Pass these only if your app doesn't work properly with the defaults (like Admin).\n */\n breakpointConfig?: UiShellBreakpointConfig;\n /**\n * Notifies when subscribed to prop changes.\n *\n * UI Shell listens to prop updates, and it won't subscribe synchronously. Because of that, this callback notifies when that subscription is ready.\n */\n onSubscriptionCreated: () => void;\n /**\n * This is a callback that provides a subscriber callback to listen for changes to state.\n * It allows UI Shell to listen for state changes.\n *\n * The props coming in this callback go directly to a React state; therefore, it shares the same signature and provides a previous state.\n */\n subscribeToPropChanges: MessageBus<\n SetStateAction<UiShellNavComponentProps>\n >[\"subscribe\"];\n /**\n * Element inside UI Shell's React root component renders into. If using a web component, this is going to exist inside it.\n */\n uiShellAppElement: ReactRootElements[\"appRootElement\"];\n /**\n * Typically, this is your `<head>` element. If using a web component, you need to create one yourself as Shadow DOM's don't have a `<head>`.\n */\n uiShellStylesElement: ReactRootElements[\"stylesRootElement\"];\n} & UiShellProviderProps &\n Pick<\n UiShellContentProps,\n | \"appElement\"\n | \"appElementScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"onError\"\n | \"optionalComponents\"\n >;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst UiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement,\n appElementScrollingMode,\n breakpointConfig,\n closeSideNavMenu,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n subscribeToPropChanges,\n topNavBackgroundColor,\n uiShellAppElement,\n uiShellStylesElement,\n}: UiShellProps) => {\n const [componentProps, setComponentProps] = useState(defaultComponentProps);\n\n const activeBreakpoint = useUiShellBreakpoints(breakpointConfig);\n\n if (componentProps.sideNavProps?.logoProps && componentProps.logoProps) {\n throw new Error(\n \"Unified UI Shell: You passed both `logoProps` and `sideNavProps.logoProps` as component props. Please only use the top-level `logoProps` instead.\",\n );\n }\n\n useEffect(() => {\n const unsubscribe = subscribeToPropChanges((componentProps) => {\n // If for some reason nothing is passed as `componentProps`, we fallback on `defaultComponentProps` as a safety mechanism to ensure nothing breaks.\n setComponentProps(componentProps || defaultComponentProps);\n });\n\n onSubscriptionCreated();\n\n return () => {\n unsubscribe();\n };\n }, [onSubscriptionCreated, subscribeToPropChanges]);\n\n return activeBreakpoint === \"none\" ? null : (\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <OdysseyProvider\n emotionRootElement={uiShellStylesElement}\n hasCssBaseline\n shadowRootElement={uiShellAppElement}\n >\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n closeSideNavMenu={closeSideNavMenu}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n {activeBreakpoint === \"narrow\" && (\n <NarrowUiShellContent\n {...componentProps}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasSideNavProps={Boolean(componentProps.sideNavProps)}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n\n {(activeBreakpoint === \"medium\" || activeBreakpoint === \"wide\") && (\n <WideUiShellContent\n {...{\n ...componentProps,\n ...{\n sideNavProps: {\n ...componentProps.sideNavProps,\n hasSessionStorageState: activeBreakpoint === \"wide\",\n isCollapsed:\n activeBreakpoint === \"medium\" ||\n componentProps.sideNavProps?.isCollapsed,\n isCollapsible:\n activeBreakpoint === \"medium\" ||\n componentProps.sideNavProps?.isCollapsible,\n logoProps:\n componentProps.sideNavProps?.logoProps ||\n componentProps.logoProps,\n } as typeof componentProps.sideNavProps, // We have to use `as` because sideNavProps expects you to have `sideNavItems` defined even though it had to be passed in `...componentProps.sideNavProps`.\n },\n }}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasSideNavProps={Boolean(componentProps.sideNavProps)}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n </UiShellProvider>\n </ErrorBoundary>\n </OdysseyProvider>\n </ErrorBoundary>\n );\n};\n\nconst MemoizedUiShell = memo(UiShell);\nMemoizedUiShell.displayName = \"UiShell\";\n\nexport { MemoizedUiShell as UiShell };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAGA,IAAAG,qBAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AAIA,IAAAM,mBAAA,GAAAN,OAAA;AAA6D,IAAAO,WAAA,GAAAP,OAAA;AA5B7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBO,MAAMQ,qBAA+C,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EAC7DE,YAAY,EAAEC,SAAS;EACvBC,WAAW,EAAED;AACf,CAAU;AAEV,MAAME,cAAc,GAAG,IAAAN,WAAA,CAAAO,GAAA;EAAK;AAAU,CAAE,CAAC;AAkDzC,MAAMC,OAAO,GAAGA,CAAC;EACfC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU;EACVC,uBAAuB;EACvBC,gBAAgB;EAChBC,gBAAgB;EAChBC,4BAA4B;EAC5BC,sBAAsB;EACtBC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,qBAAqB;EACrBC,kBAAkB;EAClBC,sBAAsB;EACtBC,8BAA8B;EAC9BC,6BAA6B;EAC7BC,2BAA2B;EAC3BC,sBAAsB;EACtBC,qBAAqB;EACrBC,iBAAiB;EACjBC;AACY,CAAC,KAAK;EAClB,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAC/B,qBAAqB,CAAC;EAE3E,MAAMgC,gBAAgB,GAAG,IAAAC,4CAAqB,EAACrB,gBAAgB,CAAC;EAEhE,IAAIiB,cAAc,CAAC3B,YAAY,EAAEgC,SAAS,IAAIL,cAAc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Ae,CAACE,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.UiShellLogo = void 0;
|
|
7
7
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var _OktaLogo = require("./OktaLogo.cjs");
|
|
9
|
+
var _OktaLogo = require("./SideNav/OktaLogo.cjs");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
/*!
|
|
@@ -38,7 +38,7 @@ const StyledLogoLink = (0, _styled.default)("a")(() => ({
|
|
|
38
38
|
display: "flex",
|
|
39
39
|
height: "100%"
|
|
40
40
|
}));
|
|
41
|
-
const
|
|
41
|
+
const UiShellLogo = ({
|
|
42
42
|
imageAltText,
|
|
43
43
|
imageUrl,
|
|
44
44
|
logoComponent,
|
|
@@ -71,6 +71,6 @@ const SideNavLogo = ({
|
|
|
71
71
|
children: logo
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=
|
|
74
|
+
const MemoizedUiShellLogo = exports.UiShellLogo = (0, _react.memo)(UiShellLogo);
|
|
75
|
+
MemoizedUiShellLogo.displayName = "UiShellLogo";
|
|
76
|
+
//# sourceMappingURL=UiShellLogo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiShellLogo.cjs","names":["_styled","_interopRequireDefault","require","_react","_OktaLogo","_jsxRuntime","e","__esModule","default","StyledLogoContainer","styled","shouldForwardProp","prop","isLogoInteractive","alignItems","display","height","cursor","StyledLogoLink","UiShellLogo","imageAltText","imageUrl","logoComponent","optionalProps","logo","useMemo","jsx","alt","src","OktaLogo","ariaLabel","href","onClick","children","Boolean","role","MemoizedUiShellLogo","exports","memo","displayName"],"sources":["../../../src/ui-shell/UiShellLogo.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 styled from \"@emotion/styled\";\nimport {\n memo,\n type MouseEventHandler,\n type ReactElement,\n useMemo,\n} from \"react\";\n\nimport { OktaLogo } from \"./SideNav/OktaLogo.js\";\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isLogoInteractive\",\n})<{\n isLogoInteractive?: boolean;\n}>(({ isLogoInteractive }) => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n\n ...(isLogoInteractive && {\n cursor: \"pointer\",\n }),\n}));\n\nconst StyledLogoLink = styled(\"a\")(() => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n}));\n\nexport type UiShellLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: MouseEventHandler<HTMLDivElement | HTMLAnchorElement>;\n} & (\n | {\n ariaLabel: string;\n href: string;\n }\n | {\n ariaLabel?: never;\n href?: never;\n }\n) &\n (\n | {\n imageAltText?: never;\n imageUrl?: never;\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n logoComponent?: never;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n logoComponent?: never;\n }\n );\n\nconst UiShellLogo = ({\n imageAltText,\n imageUrl,\n logoComponent,\n ...optionalProps\n}: UiShellLogoProps) => {\n const logo = useMemo(() => {\n if (logoComponent) {\n return logoComponent;\n }\n\n if (imageAltText && imageUrl) {\n return <img alt={imageAltText} src={imageUrl} />;\n }\n\n return <OktaLogo />;\n }, [imageAltText, logoComponent, imageUrl]);\n\n return \"href\" in optionalProps && \"ariaLabel\" in optionalProps ? (\n <StyledLogoLink\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n href={optionalProps.href}\n onClick={optionalProps.onClick}\n >\n {logo}\n </StyledLogoLink>\n ) : (\n <StyledLogoContainer\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n isLogoInteractive={Boolean(optionalProps.onClick) || optionalProps.href}\n onClick={optionalProps.onClick}\n role=\"presentation\"\n >\n {logo}\n </StyledLogoContainer>\n );\n};\n\nconst MemoizedUiShellLogo = memo(UiShellLogo);\nMemoizedUiShellLogo.displayName = \"UiShellLogo\";\n\nexport { MemoizedUiShellLogo as UiShellLogo };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAOA,IAAAE,SAAA,GAAAF,OAAA;AAAiD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AApBjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAMG,mBAAmB,GAAG,IAAAC,eAAM,EAAC,KAAK,EAAE;EACxCC,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAkB,CAAC,MAAM;EAC7BC,UAAU,EAAE,QAAQ;EACpBC,OAAO,EAAE,MAAM;EACfC,MAAM,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C,OAAO,EAAET,aAAa,CAACS,OAAQ;IAC/BG,IAAI,EAAC,cAAc;IAAAF,QAAA,EAElBT;EAAI,CACc,CACtB;AACH,CAAC;AAED,MAAMY,mBAAmB,GAAAC,OAAA,CAAAlB,WAAA,GAAG,IAAAmB,WAAI,EAACnB,WAAW,CAAC;AAC7CiB,mBAAmB,CAACG,WAAW,GAAG,aAAa","ignoreList":[]}
|
|
@@ -122,6 +122,18 @@ Object.keys(_uiShellContentTypes).forEach(function (key) {
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
+
var _UiShellLogo = require("./UiShellLogo.cjs");
|
|
126
|
+
Object.keys(_UiShellLogo).forEach(function (key) {
|
|
127
|
+
if (key === "default" || key === "__esModule") return;
|
|
128
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
129
|
+
if (key in exports && exports[key] === _UiShellLogo[key]) return;
|
|
130
|
+
Object.defineProperty(exports, key, {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () {
|
|
133
|
+
return _UiShellLogo[key];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
});
|
|
125
137
|
var _useHasUiShell = require("./useHasUiShell.cjs");
|
|
126
138
|
Object.keys(_useHasUiShell).forEach(function (key) {
|
|
127
139
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_AppSwitcher","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_InnerAppContainer","_NarrowUiShellContent","_renderUiShell","_SideNav","_types","_TopNav","_uiShellContentTypes","_useHasUiShell","_WideUiShellContent","_renderReactInWebComponent","_UiShell","_useUiShellBreakpoints"],"sources":["../../../src/ui-shell/index.ts"],"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\nexport * from \"./AppSwitcher/AppSwitcher.js\";\nexport * from \"./InnerAppContainer.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/SideNav.js\";\nexport * from \"./SideNav/types.js\";\nexport * from \"./TopNav/TopNav.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"./WideUiShellContent.js\";\n\nexport * from \"../web-component/renderReactInWebComponent.js\"; // This is located here because some teams use React v17, and this uses React v18's `ReactDOM/client` import which isn't in older versions.\n\nexport { UiShell, type UiShellProps } from \"./UiShell.js\";\nexport {\n adminAppUiShellBreakpoints,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,kBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,kBAAA,EAAAV,OAAA,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A;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,OAAA,CAAAd,GAAA;IAAA;EAAA;AAAA;AACA,IAAAe,oBAAA,GAAAnB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAiB,oBAAA,EAAAhB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAe,oBAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,oBAAA,CAAAf,GAAA;IAAA;EAAA;AAAA;AACA,IAAAgB,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_AppSwitcher","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_InnerAppContainer","_NarrowUiShellContent","_renderUiShell","_SideNav","_types","_TopNav","_uiShellContentTypes","_UiShellLogo","_useHasUiShell","_WideUiShellContent","_renderReactInWebComponent","_UiShell","_useUiShellBreakpoints"],"sources":["../../../src/ui-shell/index.ts"],"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\nexport * from \"./AppSwitcher/AppSwitcher.js\";\nexport * from \"./InnerAppContainer.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/SideNav.js\";\nexport * from \"./SideNav/types.js\";\nexport * from \"./TopNav/TopNav.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./UiShellLogo.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"./WideUiShellContent.js\";\n\nexport * from \"../web-component/renderReactInWebComponent.js\"; // This is located here because some teams use React v17, and this uses React v18's `ReactDOM/client` import which isn't in older versions.\n\nexport { UiShell, type UiShellProps } from \"./UiShell.js\";\nexport {\n adminAppUiShellBreakpoints,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,kBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,kBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,kBAA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,GAAA,WAAAA,CAAA;MAAA,OAAAS,cAAA,CAAAjB,GAAA;IAAA;EAAA;AAAA;AACA,IAAAkB,mBAAA,GAAAtB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAoB,mBAAA,EAAAnB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAkB,mBAAA,CAAAlB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,mBAAA,CAAAlB,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAmB,0BAAA,GAAAvB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAqB,0BAAA,EAAApB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAmB,0BAAA,CAAAnB,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,0BAAA,CAAAnB,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAoB,QAAA,GAAAxB,OAAA;AACA,IAAAyB,sBAAA,GAAAzB,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiShellContentTypes.cjs","names":["subComponentNames","exports","TURN_OFF_APP_SWITCHER","Symbol"],"sources":["../../../src/ui-shell/uiShellContentTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { ReactElement } from \"react\";\nimport { ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { AppSwitcherProps } from \"./AppSwitcher/AppSwitcher.js\";\nimport { SideNavProps } from \"./SideNav/types.js\";\nimport { TopNavProps } from \"./TopNav/TopNav.js\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport const TURN_OFF_APP_SWITCHER = Symbol(\n \"Turn off AppSwitcher in the event of an error.\",\n);\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n *\n * In this special case, a value of `TURN_OFF_APP_SWITCHER` tells the `appSwitcher` to not appear. This can occur if there's an error loading the items. In that case, we don't want it to appear.\n */\n appSwitcherProps?: AppSwitcherProps | typeof TURN_OFF_APP_SWITCHER;\n /**\n * Object that gets pass directly to the side nav component. If `undefined` and in `initialVisibleSections`, SideNav will be initially rendered. Pass `null` to hide a previously-visible SideNav.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\"> | null;\n /**\n * Object that gets pass directly to the top nav component. If `undefined` and in `initialVisibleSections`, TopNav will be initially rendered. Pass `null` to hide a previously-visible TopNav.\n */\n topNavProps?: Omit<\n TopNavProps,\n \"leftSideComponent\" | \"rightSideComponent\"\n > | null;\n};\n\nexport type UiShellContentProps = {\n /**\n * **WARNING:** UI Shell will modify the styling of this element.\n * HTML element where the app gets rendered. This typically called the React root element for your app.\n *\n * When passed, the app is expected to render into this element, not the Shadow DOM.\n *\n * UI Shell will position this element appropriately to match the content area inside the Shadow DOM.\n *\n * A major benefit to having this element separate from UI Shell is related to encapsulation. UI Shell has the capability of rendering inside a web component, but in doing so, the app would be subject to the styles in the web component and not the page itself.\n * The app should either be in its own web component or use the global styles, and having this separate element allows us to accomplish that goal.\n */\n appElement: HTMLDivElement;\n /**\n * Controls the scrolling behavior of the app element area.\n *\n * In the case of an app wanting to control their own scrolling, use `\"none\"`.\n *\n * Most apps will want to use `\"vertical\"` and let UI Shell manage scrolling behavior.\n */\n appElementScrollingMode: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Says if `sideNavProps` has been passed in. This is important for rendering as we will override `sideNavProps` internally, but we need to know if they were passed in for showing the loading state.\n */\n hasSideNavProps: boolean;\n /**\n * Defaults to `true`.\n *\n * If `false`, the content area will have no padding provided. This is for the case where an app wants to manage this separate from UI Shell.\n */\n hasStandardAppContentPadding?: boolean;\n /**\n * Parts of UI Shell that are visible when rendered.\n *\n * For example, if `sideNavProps` is `undefined`, should there be a space left for side nav or should that space not exist?\n */\n initialVisibleSections?: SubComponentName[];\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, flagging \"p0\"s, and recovering UI Shell when errors occur.\n */\n onError?: ErrorBoundaryProps[\"onError\"];\n /**\n * Components that will render as children of various other components such as the top nav or side nav.\n */\n optionalComponents?: {\n /**\n * Spot for banners to go at the top of the page.\n */\n banners?: ReactElement;\n /**\n * In narrow view, this is the right-side menu area.\n */\n rightSideMenu?: ReactElement;\n /**\n * Footer in the side nav.\n */\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the left-aligned half.\n */\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the right-aligned half.\n */\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"uiShellContentTypes.cjs","names":["subComponentNames","exports","TURN_OFF_APP_SWITCHER","Symbol"],"sources":["../../../src/ui-shell/uiShellContentTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { ReactElement } from \"react\";\nimport { ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { AppSwitcherProps } from \"./AppSwitcher/AppSwitcher.js\";\nimport { SideNavProps } from \"./SideNav/types.js\";\nimport { TopNavProps } from \"./TopNav/TopNav.js\";\nimport { UiShellLogoProps } from \"./UiShellLogo.js\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport const TURN_OFF_APP_SWITCHER = Symbol(\n \"Turn off AppSwitcher in the event of an error.\",\n);\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n *\n * In this special case, a value of `TURN_OFF_APP_SWITCHER` tells the `appSwitcher` to not appear. This can occur if there's an error loading the items. In that case, we don't want it to appear.\n */\n appSwitcherProps?: AppSwitcherProps | typeof TURN_OFF_APP_SWITCHER;\n /**\n * Logo that displays in the side nav header and narrow top nav.\n *\n * This used to be `sideNavProps.logoProps`, but the logo is used both in the side nav and narrow top nav. If you don't have a side nav, you still need a logo in narrow view.\n */\n logoProps?: UiShellLogoProps;\n /**\n * Object that gets pass directly to the side nav component. If `undefined` and in `initialVisibleSections`, SideNav will be initially rendered. Pass `null` to hide a previously-visible SideNav.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\"> | null;\n /**\n * Object that gets pass directly to the top nav component. If `undefined` and in `initialVisibleSections`, TopNav will be initially rendered. Pass `null` to hide a previously-visible TopNav.\n */\n topNavProps?: Omit<\n TopNavProps,\n \"leftSideComponent\" | \"rightSideComponent\"\n > | null;\n};\n\nexport type UiShellContentProps = {\n /**\n * **WARNING:** UI Shell will modify the styling of this element.\n * HTML element where the app gets rendered. This typically called the React root element for your app.\n *\n * When passed, the app is expected to render into this element, not the Shadow DOM.\n *\n * UI Shell will position this element appropriately to match the content area inside the Shadow DOM.\n *\n * A major benefit to having this element separate from UI Shell is related to encapsulation. UI Shell has the capability of rendering inside a web component, but in doing so, the app would be subject to the styles in the web component and not the page itself.\n * The app should either be in its own web component or use the global styles, and having this separate element allows us to accomplish that goal.\n */\n appElement: HTMLDivElement;\n /**\n * Controls the scrolling behavior of the app element area.\n *\n * In the case of an app wanting to control their own scrolling, use `\"none\"`.\n *\n * Most apps will want to use `\"vertical\"` and let UI Shell manage scrolling behavior.\n */\n appElementScrollingMode: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Says if `sideNavProps` has been passed in. This is important for rendering as we will override `sideNavProps` internally, but we need to know if they were passed in for showing the loading state.\n */\n hasSideNavProps: boolean;\n /**\n * Defaults to `true`.\n *\n * If `false`, the content area will have no padding provided. This is for the case where an app wants to manage this separate from UI Shell.\n */\n hasStandardAppContentPadding?: boolean;\n /**\n * Parts of UI Shell that are visible when rendered.\n *\n * For example, if `sideNavProps` is `undefined`, should there be a space left for side nav or should that space not exist?\n */\n initialVisibleSections?: SubComponentName[];\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, flagging \"p0\"s, and recovering UI Shell when errors occur.\n */\n onError?: ErrorBoundaryProps[\"onError\"];\n /**\n * Components that will render as children of various other components such as the top nav or side nav.\n */\n optionalComponents?: {\n /**\n * Spot for banners to go at the top of the page.\n */\n banners?: ReactElement;\n /**\n * In narrow view, this is the right-side menu area.\n */\n rightSideMenu?: ReactElement;\n /**\n * Footer in the side nav.\n */\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the left-aligned half.\n */\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the right-aligned half.\n */\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU;AAGvE,MAAME,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,GAAGC,MAAM,CACzC,gDACF,CAAC","ignoreList":[]}
|
|
@@ -41,7 +41,7 @@ const normalizeBackgroundColor = bgColor => {
|
|
|
41
41
|
return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;
|
|
42
42
|
};
|
|
43
43
|
exports.normalizeBackgroundColor = normalizeBackgroundColor;
|
|
44
|
-
const defaultParentBackgroundColor = exports.defaultParentBackgroundColor =
|
|
44
|
+
const defaultParentBackgroundColor = exports.defaultParentBackgroundColor = Tokens.HueNeutral50;
|
|
45
45
|
const getBackgroundColor = element => {
|
|
46
46
|
while (element) {
|
|
47
47
|
const bgColor = getElementComputedBackgroundColor(element);
|