@okta/odyssey-react-mui 1.37.0 → 1.37.1
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/dist/cjs/Pagination/Pagination.cjs +1 -0
- package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +2 -0
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs +21 -27
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +11 -10
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/test-selectors/getByQuerySelector.cjs +2 -2
- package/dist/cjs/test-selectors/getByQuerySelector.cjs.map +1 -1
- package/dist/cjs/test-selectors/testSelector.cjs.map +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +3 -2
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +8 -4
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +5 -2
- package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +3 -2
- package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/uiShellContentTypes.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/esm/Pagination/Pagination.js +1 -0
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +2 -0
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/Picker.js +23 -29
- package/dist/esm/labs/OdysseyPickers/Picker.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +12 -11
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/test-selectors/getByQuerySelector.js +1 -1
- package/dist/esm/test-selectors/getByQuerySelector.js.map +1 -1
- package/dist/esm/test-selectors/testSelector.js.map +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +3 -2
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +8 -4
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
- package/dist/esm/ui-shell/UiShell.js +5 -2
- package/dist/esm/ui-shell/UiShell.js.map +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +3 -2
- package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/uiShellContentTypes.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.cjs +1 -1
- package/dist/index.d.ts +232 -21
- package/dist/index.mjs +1 -1
- package/dist/index.scss +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Pagination/Pagination.d.ts +1 -0
- package/dist/types/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/i18n.d.ts +27 -0
- package/dist/types/i18n.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts +2 -1
- package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/Picker.d.ts +6 -7
- package/dist/types/labs/OdysseyPickers/Picker.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/test-selectors/getByQuerySelector.d.ts +73 -73
- package/dist/types/test-selectors/getByQuerySelector.d.ts.map +1 -1
- package/dist/types/test-selectors/testSelector.d.ts +1 -1
- package/dist/types/test-selectors/testSelector.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/types.d.ts +5 -1
- 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/WideUiShellContent.d.ts +1 -1
- package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/uiShellContentTypes.d.ts +4 -0
- package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.js","names":["styled","memo","useMemo","useState","useCallback","useRef","useEffect","useTranslation","arrayMove","ErrorBoundary","NavAccordion","useOdysseyDesignTokens","OdysseyThemeProvider","SideNavHeader","SideNavItemContent","StyledSideNavListItem","SideNavFooterContent","SideNavItemContentContext","SIDE_NAV_TOGGLE_ICON_HALF_SIZE","SIDE_NAV_TOGGLE_ICON_SIZE","SideNavToggleButton","SortableList","Overline","useUiShellContext","SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","SIDE_NAV_WIDTH","UI_SHELL_BASE_Z_INDEX","UI_SHELL_OVERLAY_Z_INDEX","useIsSideNavCollapsedSessionStorage","useMountLifecycleEffect","jsx","_jsx","jsxs","_jsxs","SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED","SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED","StyledCollapsibleContent","shouldForwardProp","prop","odysseyDesignTokens","isSideNavCollapsed","position","display","gridTemplateColumns","height","transition","TransitionDurationMain","transitionTimingFunction","TransitionTimingMain","overflow","opacity","StyledOpacityTransitionContainer","gridTemplateRows","StyledSideNavContainer","backgroundColor","hasNeighboringContent","isAppContentWhiteBackground","isSideNavToggleHighlighted","HueNeutralWhite","width","content","pointerEvents","right","BorderWidthMain","top","userSelect","zIndex","BorderColorPrimaryControl","HueNeutral100","HueNeutral200","transform","borderRightColor","borderRightStyle","BorderStyleMain","borderRightWidth","StyledSideNavToggleButtonContainer","StyledSideNavHeaderContainer","borderColor","hasContentScrolled","flexShrink","borderBottomWidth","borderBottomStyle","borderBottomColor","concat","StyledSideNavListContainer","padding","listStyle","listStyleType","margin","StyledSideNavScrollableContainer","overflowY","paddingInline","Spacing2","StyledSectionHeaderContainer","contrastFontColor","color","HueNeutral600","marginBlock","Spacing3","paddingBlock","Spacing1","Spacing4","StyledSideNavFooter","sideNavBackgroundColor","StyledPersistentSideNavFooter","isContentScrollable","transitionProperty","transitionDuration","transitionTiming","boxShadow","StyledSideNavFooterItemsContainer","sideNavContrastColors","flexWrap","alignItems","fontSize","TypographySizeOverline","fontColor","textDecoration","HueNeutral900","StyledLoadingItemContainer","gap","getHasScrollableContent","scrollableContainer","scrollHeight","clientHeight","LoadingItem","children","_Skeleton","variant","SideNav","appName","footerComponent","footerItems","hasCustomFooter","isCollapsible","isCollapsed","isCompact","isLoading","isObtrusive","logoProps","onCollapse","onExpand","onSort","sideNavItems","setHasContentScrolled","setHasNeighboringContent","setIsContentScrollable","setIsSideNavToggleHighlighted","sideNavItemsList","updateSideNavItemsList","sessionState","setSessionState","setIsSideNavCollapsed","uiShellContext","t","scrollableContentRef","resizeObserverRef","intersectionObserverRef","sideNavRef","blankElement","current","getBoundingClientRect","x","onMount","onUpdate","updateIsContentScrollable","parentElement","resizeObserverDebounceTimer","ResizeObserver","cancelAnimationFrame","requestAnimationFrame","observe","IntersectionObserver","entries","isIntersecting","slice","sort","a","b","time","at","root","threshold","ulElement","liElement","Array","from","disconnect","scrollIntoViewRef","firstSideNavItemIdWithIsSelected","flattenedItems","flatMap","sideNavItem","nestedNavItems","firstItemWithIsSelected","find","isSelected","id","scrollIntoView","getRefIfThisIsFirstNodeWithIsSelected","itemId","undefined","sideNavItemContentProviderValue","depth","setSelectedItem","selectedItemId","updatedSideNavItems","map","item","childItem","closeSideNavMenu","processedSideNavItems","childNavItems","childProps","isDisabled","isSortable","navItem","Provider","value","onItemSelected","scrollRef","translate","sideNavExpandClickHandler","sideNavExpandKeyHandler","event","key","code","preventDefault","unsubscribe","subscribeToCloseSideNavMenu","setSortedItems","parentId","activeId","activeIndex","overIndex","sortedSideNavItems","onSideNavToggleButtonHighlight","isHighlighted","appBackgroundColor","ref","clickAreaPadding","ariaControls","onClick","onHighlight","onKeyDown","role","fill","_","index","href","isDefaultExpanded","isExpanded","isSectionHeader","label","startIcon","fallback","component","nestedChildren","items","onChange","renderItem","sortableItem","Item","disabled","MemoizedSideNav","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNav.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 memo,\n useMemo,\n useState,\n useCallback,\n useRef,\n useEffect,\n KeyboardEventHandler,\n CSSProperties,\n} from \"react\";\nimport { Skeleton } from \"@mui/material\";\nimport { useTranslation } from \"react-i18next\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { Property } from \"csstype\";\n\nimport { ContrastColors } from \"../../createContrastColors.js\";\nimport { NavAccordion } from \"./NavAccordion.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { OdysseyThemeProvider } from \"../../OdysseyThemeProvider.js\";\nimport type { SideNavProps } from \"./types.js\";\nimport { SideNavHeader } from \"./SideNavHeader.js\";\nimport {\n SideNavItemContent,\n StyledSideNavListItem,\n} from \"./SideNavItemContent.js\";\nimport { SideNavFooterContent } from \"./SideNavFooterContent.js\";\nimport { SideNavItemContentContext } from \"./SideNavItemContentContext.js\";\nimport {\n SIDE_NAV_TOGGLE_ICON_HALF_SIZE,\n SIDE_NAV_TOGGLE_ICON_SIZE,\n SideNavToggleButton,\n SideNavToggleButtonProps,\n} from \"./SideNavToggleButton.js\";\nimport { SortableList } from \"./SortableList/SortableList.js\";\nimport { Overline } from \"../../Typography.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport {\n SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n SIDE_NAV_WIDTH,\n UI_SHELL_BASE_Z_INDEX,\n UI_SHELL_OVERLAY_Z_INDEX,\n} from \"../uiShellSharedConstants.js\";\nimport { useIsSideNavCollapsedSessionStorage } from \"./useIsSideNavCollapsedSessionStorage.js\";\nimport { useMountLifecycleEffect } from \"../../useMountLifecycleEffect.js\";\n\nexport const SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED = 12;\nexport const SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED = 2;\n\nconst StyledCollapsibleContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isSideNavCollapsed\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isSideNavCollapsed: boolean;\n}>(({ odysseyDesignTokens, isSideNavCollapsed }) => ({\n position: \"relative\",\n display: \"grid\",\n gridTemplateColumns: SIDE_NAV_WIDTH,\n height: \"100%\",\n transition: `grid-template-columns ${odysseyDesignTokens.TransitionDurationMain}, opacity 300ms`,\n transitionTimingFunction: odysseyDesignTokens.TransitionTimingMain,\n overflow: \"hidden\",\n\n ...(isSideNavCollapsed &&\n ({\n gridTemplateColumns: 0,\n opacity: 0,\n } satisfies CSSProperties)),\n}));\n\nconst StyledOpacityTransitionContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isSideNavCollapsed\",\n})(\n ({\n odysseyDesignTokens,\n isSideNavCollapsed,\n }: {\n odysseyDesignTokens: DesignTokens;\n isSideNavCollapsed: boolean;\n }) => ({\n display: \"grid\",\n gridTemplateRows: \"max-content 1fr max-content\",\n height: \"100%\",\n transition: `opacity 50ms`,\n transitionTimingFunction: odysseyDesignTokens.TransitionTimingMain,\n overflow: \"hidden\",\n\n ...(isSideNavCollapsed &&\n ({\n opacity: 0,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledSideNavContainer = styled(\"nav\", {\n shouldForwardProp: (prop) =>\n prop !== \"backgroundColor\" &&\n prop !== \"hasNeighboringContent\" &&\n prop !== \"isAppContentWhiteBackground\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"isSideNavToggleHighlighted\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n backgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n hasNeighboringContent: boolean;\n isAppContentWhiteBackground: boolean;\n isSideNavCollapsed: boolean;\n isSideNavToggleHighlighted: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n backgroundColor,\n hasNeighboringContent,\n isAppContentWhiteBackground,\n isSideNavCollapsed,\n isSideNavToggleHighlighted,\n odysseyDesignTokens,\n }) => ({\n // Side nav container styles\n backgroundColor: backgroundColor || odysseyDesignTokens.HueNeutralWhite,\n height: \"100%\",\n position: \"relative\",\n width: \"fit-content\",\n\n // Right-side vertical line shared\n \"&::before, &::after\": {\n content: \"''\",\n height: \"100%\",\n pointerEvents: \"none\",\n position: \"absolute\",\n right: `-${odysseyDesignTokens.BorderWidthMain}`,\n top: 0,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}, transform ${odysseyDesignTokens.TransitionDurationMain}, width ${odysseyDesignTokens.TransitionDurationMain}`,\n userSelect: \"none\",\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n },\n\n // Right-side vertical line when open\n \"&::before\": {\n backgroundColor: isSideNavToggleHighlighted\n ? odysseyDesignTokens.BorderColorPrimaryControl\n : odysseyDesignTokens.HueNeutral100,\n opacity:\n isAppContentWhiteBackground ||\n (!isSideNavCollapsed && isSideNavToggleHighlighted)\n ? 1\n : 0,\n width: `calc(${odysseyDesignTokens.BorderWidthMain} * 2)`,\n },\n\n // Side nav vertical fill line when no neighboring content\n \"&::after\": {\n backgroundColor: odysseyDesignTokens.HueNeutral200,\n opacity: isSideNavCollapsed ? 1 : 0,\n transform:\n isSideNavCollapsed && !hasNeighboringContent\n ? isSideNavToggleHighlighted\n ? `translateX(calc(100% - (${odysseyDesignTokens.BorderWidthMain} * 2)))`\n : `translateX(calc(100% - ${SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px))`\n : \"translateX(0)\",\n width: hasNeighboringContent\n ? 0\n : `calc(${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px + ${odysseyDesignTokens.BorderWidthMain} * 2)`,\n\n // Right-side vertical line when collapsed\n ...((isSideNavCollapsed && isSideNavToggleHighlighted\n ? {\n borderRightColor: odysseyDesignTokens.BorderColorPrimaryControl,\n borderRightStyle:\n odysseyDesignTokens.BorderStyleMain as Property.BorderRightStyle,\n borderRightWidth: `calc(${odysseyDesignTokens.BorderWidthMain} * 2)`,\n }\n : {}) satisfies CSSProperties),\n },\n }),\n);\n\nconst StyledSideNavToggleButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"hasNeighboringContent\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"isSideNavToggleHighlighted\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n hasNeighboringContent: boolean;\n isSideNavCollapsed: boolean;\n isSideNavToggleHighlighted: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n hasNeighboringContent,\n isSideNavCollapsed,\n isSideNavToggleHighlighted,\n odysseyDesignTokens,\n }) => ({\n position: \"absolute\",\n right: `${SIDE_NAV_TOGGLE_ICON_HALF_SIZE}px`,\n top: SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n transform:\n isSideNavCollapsed && !hasNeighboringContent\n ? isSideNavToggleHighlighted\n ? `translate3d(calc(100% + ${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px), 0, 0)`\n : `translate3d(calc(100% + ${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED}px), 0, 0)`\n : \"translate3d(100%, 0, 0)\",\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX + 1,\n }),\n);\n\nconst StyledSideNavHeaderContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"borderColor\" &&\n prop !== \"hasContentScrolled\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n borderColor: ContrastColors[\"fontColor\"];\n hasContentScrolled: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ borderColor, hasContentScrolled, odysseyDesignTokens }) => ({\n flexShrink: 0,\n // The bottom border should appear only if the scrollable region has been scrolled\n ...(hasContentScrolled &&\n ({\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n\n ...(borderColor &&\n ({\n borderBottomColor: borderColor.concat(\"15\"),\n } satisfies CSSProperties)),\n } as CSSProperties)),\n}));\n\nconst StyledSideNavListContainer = styled(\"ul\")(() => ({\n padding: 0,\n listStyle: \"none\",\n listStyleType: \"none\",\n margin: 0,\n width: \"100%\",\n}));\n\nconst StyledSideNavScrollableContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"inline-grid\",\n gridTemplateRows: \"1fr max-content\",\n overflowY: \"auto\",\n paddingInline: odysseyDesignTokens.Spacing2,\n}));\n\nconst StyledSectionHeaderContainer = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"contrastFontColor\",\n})(\n ({\n contrastFontColor,\n odysseyDesignTokens,\n }: {\n contrastFontColor: ContrastColors[\"fontColor\"];\n odysseyDesignTokens: DesignTokens;\n }) => ({\n color: contrastFontColor || odysseyDesignTokens.HueNeutral600,\n marginBlock: `${odysseyDesignTokens.Spacing3}`,\n paddingBlock: odysseyDesignTokens.Spacing1,\n paddingInline: odysseyDesignTokens.Spacing4,\n }),\n);\n\nconst StyledSideNavFooter = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"sideNavBackgroundColor\",\n})(\n ({\n odysseyDesignTokens,\n sideNavBackgroundColor,\n }: {\n odysseyDesignTokens: DesignTokens;\n sideNavBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n flexShrink: 0,\n padding: odysseyDesignTokens.Spacing4,\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledPersistentSideNavFooter = styled(StyledSideNavFooter, {\n shouldForwardProp: (prop) =>\n prop !== \"isContentScrollable\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavBackgroundColor\",\n})(\n ({\n isContentScrollable,\n odysseyDesignTokens,\n sideNavBackgroundColor,\n }: {\n isContentScrollable: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n }) => ({\n transitionProperty: \"box-shadow\",\n transitionDuration: odysseyDesignTokens.TransitionDurationMain,\n transitionTiming: odysseyDesignTokens.TransitionTimingMain,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n\n // The box shadow should appear above the footer only if the scrollable region has overflow\n ...(isContentScrollable &&\n ({\n boxShadow: \"0px -8px 8px -8px rgba(39, 39, 39, 0.08)\",\n } satisfies CSSProperties)),\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledSideNavFooterItemsContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"sideNavContrastColors\",\n})<{\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(({ odysseyDesignTokens, sideNavContrastColors }) => ({\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n fontSize: odysseyDesignTokens.TypographySizeOverline,\n\n \"a, span\": {\n color: odysseyDesignTokens.HueNeutral600,\n transition: `color ${odysseyDesignTokens.TransitionDurationMain}`,\n\n \"&:visited\": {\n color: odysseyDesignTokens.HueNeutral600,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n\n \"&:hover\": {\n textDecoration: \"none\",\n color: odysseyDesignTokens.HueNeutral900,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n}));\n\nconst StyledLoadingItemContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing2,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing4,\n}));\n\nconst getHasScrollableContent = (scrollableContainer: HTMLElement) =>\n scrollableContainer.scrollHeight > scrollableContainer.clientHeight;\n\nconst LoadingItem = () => {\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n return (\n <StyledLoadingItemContainer odysseyDesignTokens={odysseyDesignTokens}>\n <Skeleton\n variant=\"circular\"\n width={odysseyDesignTokens.Spacing4}\n height={odysseyDesignTokens.Spacing4}\n />\n <Skeleton variant=\"rounded\" width=\"100%\" />\n </StyledLoadingItemContainer>\n );\n};\n\nconst SideNav = ({\n appName,\n footerComponent,\n footerItems,\n hasCustomFooter,\n isCollapsible,\n isCollapsed = false,\n isCompact,\n isLoading,\n isObtrusive,\n logoProps,\n onCollapse,\n onExpand,\n onSort,\n sideNavItems,\n}: SideNavProps) => {\n const [hasContentScrolled, setHasContentScrolled] = useState(false);\n const [hasNeighboringContent, setHasNeighboringContent] = useState(false);\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const [isSideNavToggleHighlighted, setIsSideNavToggleHighlighted] =\n useState(false);\n const [sideNavItemsList, updateSideNavItemsList] = useState(sideNavItems);\n\n const {\n sessionState: isSideNavCollapsed,\n setSessionState: setIsSideNavCollapsed,\n } = useIsSideNavCollapsedSessionStorage(isCollapsed);\n\n const uiShellContext = useUiShellContext();\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const scrollableContentRef = useRef<HTMLUListElement>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const intersectionObserverRef = useRef<IntersectionObserver | null>(null);\n const sideNavRef = useRef<HTMLDivElement>(null);\n\n const blankElement = useMemo(() => <div />, []);\n\n // The default value (sideNavItems) passed to useState is ONLY used by the useState hook for\n // the very first value. Subsequent updates to the prop (sideNavItems) need to cause the state\n // to update!\n useEffect(() => updateSideNavItemsList(sideNavItems), [sideNavItems]);\n\n // update sidenav collapse status\n useEffect(() => {\n if (sideNavRef.current) {\n setHasNeighboringContent(\n sideNavRef.current.getBoundingClientRect().x > 0,\n );\n }\n // We want this listening to `isCollapsed`.\n }, [isCollapsed]);\n\n // In the case that you can't control the side nav, then it should use whatever state was passed (app control) rather than what's stored in session storage (user control).\n const onMount = useCallback(() => {\n if (!isCollapsible) {\n setIsSideNavCollapsed(isCollapsed);\n }\n }, [isCollapsed, isCollapsible, setIsSideNavCollapsed]);\n\n const onUpdate = useCallback(() => {\n setIsSideNavCollapsed(isCollapsed);\n }, [isCollapsed, setIsSideNavCollapsed]);\n\n useMountLifecycleEffect({\n onMount,\n onUpdate,\n });\n\n useEffect(() => {\n // This is called directly in this effect AND perhaps as a result of the ResizeObserver\n const updateIsContentScrollable = () => {\n if (\n scrollableContentRef.current &&\n scrollableContentRef.current.parentElement\n ) {\n setIsContentScrollable(\n getHasScrollableContent(scrollableContentRef.current.parentElement),\n );\n }\n };\n\n // If the window is resized, we may need to re-determine if the scrollable container has overflow\n // Setup a ResizeObserver to know if the size of the scrollableContent changes\n let resizeObserverDebounceTimer: ReturnType<typeof requestAnimationFrame>;\n if (!resizeObserverRef.current) {\n resizeObserverRef.current = new ResizeObserver(() => {\n cancelAnimationFrame(resizeObserverDebounceTimer);\n resizeObserverDebounceTimer = requestAnimationFrame(\n updateIsContentScrollable,\n );\n });\n }\n\n if (resizeObserverRef.current && scrollableContentRef.current) {\n // Observe the <ul> itself (in case it changes size due to the content expanding)\n resizeObserverRef.current.observe(scrollableContentRef.current);\n if (scrollableContentRef.current.parentElement) {\n // ALSO observe the parent (<SideNavScrollableContainer>) in case the window resizes\n resizeObserverRef.current.observe(\n scrollableContentRef.current.parentElement,\n );\n }\n }\n\n // Determine if the scrollable container has overflow or not on load\n updateIsContentScrollable();\n\n // Finally, we only want to have the border on the bottom of the header iff the user has scrolled\n // the scrollable container\n if (!intersectionObserverRef.current && scrollableContentRef.current) {\n intersectionObserverRef.current = new IntersectionObserver(\n (entries) => {\n // If isIntersecting is true, then we're at the top of the scroll container\n // If isIntersecting is false, some scrolling has occurred.\n // The entries must be sorted by time and we only really need to look at the latest one\n const isIntersecting = entries\n .slice()\n .sort((a, b) => a.time - b.time)\n .at(0)?.isIntersecting;\n setHasContentScrolled(!isIntersecting);\n },\n {\n root: scrollableContentRef.current.parentElement,\n threshold: 1.0,\n },\n );\n }\n\n if (intersectionObserverRef.current && scrollableContentRef.current) {\n const ulElement = scrollableContentRef.current;\n const [liElement] = Array.from(ulElement?.children || []);\n\n if (liElement) {\n intersectionObserverRef.current.observe(liElement);\n }\n }\n\n // Cleanup when unmounted:\n return () => {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n resizeObserverRef.current = null;\n }\n if (intersectionObserverRef.current) {\n intersectionObserverRef.current.disconnect();\n intersectionObserverRef.current = null;\n }\n cancelAnimationFrame(resizeObserverDebounceTimer); // Ensure timer is cleared on component unmount\n };\n }, [sideNavItemsList]);\n\n const scrollIntoViewRef = useRef<HTMLLIElement>(null);\n /**\n * Look through the sideNavItems and determine which is the first node\n * with isSelected. This should be the node we set a ref on in order to\n * call scrollIntoView in the effect\n */\n const firstSideNavItemIdWithIsSelected = useMemo(() => {\n const flattenedItems = sideNavItemsList.flatMap((sideNavItem) =>\n sideNavItem.nestedNavItems\n ? [sideNavItem, ...sideNavItem.nestedNavItems]\n : sideNavItem,\n );\n const firstItemWithIsSelected = flattenedItems.find(\n (sideNavItem) => sideNavItem.isSelected,\n );\n return firstItemWithIsSelected?.id;\n }, [sideNavItemsList]);\n /**\n * Once we've rendered and if we have an item to scroll to, do the scroll action.\n * This must rely on checking firstSideNavItemIdWithIsSelected or it will not run\n * once the actual ref is populated.\n */\n useEffect(() => {\n if (firstSideNavItemIdWithIsSelected && scrollIntoViewRef.current) {\n scrollIntoViewRef.current.scrollIntoView();\n }\n }, [firstSideNavItemIdWithIsSelected]);\n\n /**\n * We only want to put a ref on a node iff it is the first selected node.\n * This function returns the ref only if the ID provided matches the first\n * selected node, otherwise returns undefined (so that the node has no ref)\n */\n const getRefIfThisIsFirstNodeWithIsSelected = useCallback(\n (itemId: string) =>\n itemId === firstSideNavItemIdWithIsSelected\n ? scrollIntoViewRef\n : undefined,\n [firstSideNavItemIdWithIsSelected],\n );\n\n const sideNavItemContentProviderValue = useMemo(\n () => ({ isCompact, depth: 1 }),\n [isCompact],\n );\n\n const setSelectedItem = useCallback(\n (selectedItemId: string) => {\n const updatedSideNavItems = sideNavItemsList.map((item) => {\n if (item.id === selectedItemId) {\n item.isSelected = true;\n } else if (item.isSelected) {\n delete item.isSelected;\n }\n\n return item.nestedNavItems\n ? {\n ...item,\n nestedNavItems: item.nestedNavItems.map((childItem) => {\n if (childItem.id === selectedItemId) {\n childItem.isSelected = true;\n } else if (childItem.isSelected) {\n delete childItem.isSelected;\n }\n return childItem;\n }),\n }\n : item;\n });\n updateSideNavItemsList(updatedSideNavItems);\n\n if (isCollapsed || isObtrusive) {\n if (isCollapsible) {\n uiShellContext?.closeSideNavMenu();\n } else {\n onCollapse?.();\n }\n }\n },\n [\n isCollapsed,\n isCollapsible,\n isObtrusive,\n onCollapse,\n sideNavItemsList,\n uiShellContext,\n ],\n );\n\n const processedSideNavItems = useMemo(() => {\n return sideNavItemsList?.map((item) => ({\n ...item,\n childNavItems: item.nestedNavItems?.map((childProps) => ({\n id: childProps.id,\n isSelected: childProps.isSelected,\n isDisabled: childProps.isDisabled,\n isSortable: childProps.isSortable,\n navItem: (\n <SideNavItemContentContext.Provider\n key={childProps.id}\n value={{\n ...sideNavItemContentProviderValue,\n depth: 2,\n isSortable: item.isSortable,\n }}\n >\n <SideNavItemContent\n {...childProps}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(childProps.id)}\n translate={childProps.translate}\n />\n </SideNavItemContentContext.Provider>\n ),\n })),\n }));\n }, [\n getRefIfThisIsFirstNodeWithIsSelected,\n setSelectedItem,\n sideNavItemContentProviderValue,\n sideNavItemsList,\n ]);\n\n const sideNavExpandClickHandler = useCallback(() => {\n setIsSideNavCollapsed((isSideNavCollapsed) => {\n if (isSideNavCollapsed) {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n\n return !isSideNavCollapsed;\n });\n }, [onCollapse, onExpand, setIsSideNavCollapsed]);\n\n const sideNavExpandKeyHandler = useCallback<\n KeyboardEventHandler<HTMLButtonElement>\n >(\n (event) => {\n if (event?.key === \"Enter\" || event?.code === \"Space\") {\n event.preventDefault();\n sideNavExpandClickHandler();\n }\n },\n [sideNavExpandClickHandler],\n );\n\n useEffect(() => {\n const unsubscribe = uiShellContext?.subscribeToCloseSideNavMenu(() => {\n onCollapse?.();\n setIsSideNavCollapsed(true);\n });\n\n return () => {\n unsubscribe?.();\n };\n }, [onCollapse, setIsSideNavCollapsed, uiShellContext]);\n\n const setSortedItems = useCallback(\n (\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => {\n const sortedSideNavItems = sideNavItemsList.map((item) =>\n item.id === parentId && item.nestedNavItems\n ? {\n ...item,\n nestedNavItems: arrayMove(\n item.nestedNavItems,\n activeIndex,\n overIndex,\n ),\n }\n : item,\n );\n updateSideNavItemsList(sortedSideNavItems);\n onSort?.(sortedSideNavItems, parentId, activeId, activeIndex, overIndex);\n },\n [onSort, sideNavItemsList],\n );\n\n const onSideNavToggleButtonHighlight = useCallback<\n NonNullable<SideNavToggleButtonProps[\"onHighlight\"]>\n >((isHighlighted) => {\n setIsSideNavToggleHighlighted(isHighlighted);\n }, []);\n\n return (\n <StyledSideNavContainer\n aria-label={t(\"navigation.label\")}\n backgroundColor={uiShellContext?.sideNavBackgroundColor}\n hasNeighboringContent={hasNeighboringContent}\n id=\"side-nav-expandable\"\n isAppContentWhiteBackground={\n uiShellContext?.appBackgroundColor ===\n odysseyDesignTokens.HueNeutralWhite\n }\n isSideNavCollapsed={isSideNavCollapsed}\n isSideNavToggleHighlighted={isSideNavToggleHighlighted}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={sideNavRef}\n >\n {isCollapsible && (\n <StyledSideNavToggleButtonContainer\n hasNeighboringContent={hasNeighboringContent}\n isSideNavCollapsed={isSideNavCollapsed}\n isSideNavToggleHighlighted={isSideNavToggleHighlighted}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <SideNavToggleButton\n clickAreaPadding={\n isSideNavCollapsed && !hasNeighboringContent\n ? SIDE_NAV_TOGGLE_ICON_SIZE / 2\n : 0\n }\n ariaControls=\"side-nav-expandable\"\n isSideNavCollapsed={isSideNavCollapsed}\n onClick={sideNavExpandClickHandler}\n onHighlight={onSideNavToggleButtonHighlight}\n onKeyDown={sideNavExpandKeyHandler}\n />\n </StyledSideNavToggleButtonContainer>\n )}\n\n <OdysseyThemeProvider>\n <StyledCollapsibleContent\n data-se=\"collapsible-region\"\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledOpacityTransitionContainer\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {appName || isLoading || logoProps ? (\n <StyledSideNavHeaderContainer\n hasContentScrolled={hasContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n borderColor={uiShellContext?.sideNavContrastColors?.fontColor}\n >\n {isLoading && !appName && !logoProps ? (\n <SideNavHeader isLoading={isLoading} />\n ) : (\n <SideNavHeader\n appName={appName}\n isLoading={isLoading}\n logoProps={logoProps}\n />\n )}\n </StyledSideNavHeaderContainer>\n ) : (\n <div />\n )}\n\n <StyledSideNavScrollableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n data-se=\"scrollable-region\"\n >\n <StyledSideNavListContainer\n role=\"none\"\n ref={scrollableContentRef}\n >\n {isLoading\n ? Array(6)\n .fill(null)\n .map((_, index) => <LoadingItem key={index} />)\n : processedSideNavItems?.map((item) => {\n const {\n childNavItems,\n href,\n id,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n isSectionHeader,\n isSortable,\n label,\n startIcon,\n } = item;\n\n if (isSectionHeader) {\n return (\n <ErrorBoundary fallback={blankElement} key={id}>\n <StyledSectionHeaderContainer\n contrastFontColor={\n uiShellContext?.sideNavContrastColors?.fontColor\n }\n id={id}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Overline component=\"h3\">{label}</Overline>\n </StyledSectionHeaderContainer>\n </ErrorBoundary>\n );\n } else if (childNavItems) {\n const nestedChildren = (\n <StyledSideNavListContainer role=\"presentation\">\n {isSortable ? (\n <SortableList\n parentId={item.id}\n items={childNavItems}\n onChange={setSortedItems}\n renderItem={(sortableItem) => (\n <SortableList.Item\n id={sortableItem.id}\n isDisabled={sortableItem.isDisabled}\n isSelected={sortableItem.isSelected}\n isSortable={sortableItem.isSortable}\n >\n {sortableItem.navItem}\n </SortableList.Item>\n )}\n />\n ) : (\n childNavItems.map((item) => item.navItem)\n )}\n </StyledSideNavListContainer>\n );\n\n return href ? (\n <ErrorBoundary fallback={blankElement} key={id}>\n <SideNavItemContent\n {...item}\n href={href}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(\n item.id,\n )}\n startIcon={item.startIcon}\n />\n\n <StyledSideNavListItem\n id={`${id}-items`}\n odysseyDesignTokens={odysseyDesignTokens}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n >\n {nestedChildren}\n </StyledSideNavListItem>\n </ErrorBoundary>\n ) : (\n <ErrorBoundary fallback={blankElement} key={id}>\n <StyledSideNavListItem\n id={id}\n odysseyDesignTokens={odysseyDesignTokens}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n >\n <NavAccordion\n label={label}\n isCompact={isCompact}\n isDefaultExpanded={isDefaultExpanded}\n isExpanded={isExpanded}\n startIcon={startIcon}\n isDisabled={isDisabled}\n >\n {nestedChildren}\n </NavAccordion>\n </StyledSideNavListItem>\n </ErrorBoundary>\n );\n } else {\n return (\n <ErrorBoundary fallback={blankElement} key={item.id}>\n <SideNavItemContentContext.Provider\n value={sideNavItemContentProviderValue}\n >\n <SideNavItemContent\n {...item}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(\n item.id,\n )}\n startIcon={item.startIcon}\n />\n </SideNavItemContentContext.Provider>\n </ErrorBoundary>\n );\n }\n })}\n </StyledSideNavListContainer>\n {!isLoading && footerItems && !hasCustomFooter && (\n <StyledSideNavFooter\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavBackgroundColor={\n uiShellContext?.sideNavBackgroundColor\n }\n >\n <StyledSideNavFooterItemsContainer\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavContrastColors={\n uiShellContext?.sideNavContrastColors\n }\n >\n <SideNavFooterContent footerItems={footerItems} />\n </StyledSideNavFooterItemsContainer>\n </StyledSideNavFooter>\n )}\n </StyledSideNavScrollableContainer>\n {!isLoading && !footerItems && hasCustomFooter && (\n <StyledPersistentSideNavFooter\n isContentScrollable={isContentScrollable}\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n {footerComponent}\n </StyledPersistentSideNavFooter>\n )}\n </StyledOpacityTransitionContainer>\n </StyledCollapsibleContent>\n </OdysseyThemeProvider>\n </StyledSideNavContainer>\n );\n};\n\nconst MemoizedSideNav = memo(SideNav);\nMemoizedSideNav.displayName = \"SideNav\";\n\nexport { MemoizedSideNav as SideNav };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SACEC,IAAI,EACJC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,MAAM,EACNC,SAAS,QAGJ,OAA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AACoH,WAAW,EAAEA;gBAAY,CAAE;cAAC,CACjB;YAAC,CACjB,CACtB;UAAA,CAC+B,CAAC,EAClC,CAACK,SAAS,IAAI,CAACL,WAAW,IAAIC,eAAe,IAC5CtG,IAAA,CAACyE,6BAA6B;YAC5BC,mBAAmB,EAAEA,mBAAoB;YACzClE,mBAAmB,EAAEA,mBAAoB;YACzCgE,sBAAsB,EAAEkD,cAAc,EAAElD,sBAAuB;YAAAuB,QAAA,EAE9DK;UAAe,CACa,CAChC;QAAA,CAC+B;MAAC,CACX;IAAC,CACP,CAAC;EAAA,CACD,CAAC;AAE7B,CAAC;AAED,MAAMqI,eAAe,GAAGvQ,IAAI,CAACgI,OAAO,CAAC;AACrCuI,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAIvI,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SideNav.js","names":["styled","memo","useMemo","useState","useCallback","useRef","useEffect","useTranslation","arrayMove","ErrorBoundary","NavAccordion","useOdysseyDesignTokens","OdysseyThemeProvider","SideNavHeader","SideNavItemContent","StyledSideNavListItem","SideNavFooterContent","SideNavItemContentContext","SIDE_NAV_TOGGLE_ICON_HALF_SIZE","SIDE_NAV_TOGGLE_ICON_SIZE","SideNavToggleButton","SortableList","Overline","useUiShellContext","SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","SIDE_NAV_WIDTH","UI_SHELL_BASE_Z_INDEX","UI_SHELL_OVERLAY_Z_INDEX","useIsSideNavCollapsedSessionStorage","useMountLifecycleEffect","jsx","_jsx","jsxs","_jsxs","SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED","SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED","StyledCollapsibleContent","shouldForwardProp","prop","odysseyDesignTokens","isSideNavCollapsed","position","display","gridTemplateColumns","height","transition","TransitionDurationMain","transitionTimingFunction","TransitionTimingMain","overflow","opacity","StyledOpacityTransitionContainer","gridTemplateRows","StyledSideNavContainer","backgroundColor","hasNeighboringContent","isAppContentWhiteBackground","isSideNavToggleHighlighted","HueNeutralWhite","width","content","pointerEvents","right","BorderWidthMain","top","userSelect","zIndex","BorderColorPrimaryControl","HueNeutral100","HueNeutral200","transform","borderRightColor","borderRightStyle","BorderStyleMain","borderRightWidth","StyledSideNavToggleButtonContainer","StyledSideNavHeaderContainer","borderColor","hasContentScrolled","flexShrink","borderBottomWidth","borderBottomStyle","borderBottomColor","concat","StyledSideNavListContainer","padding","listStyle","listStyleType","margin","StyledSideNavScrollableContainer","overflowY","paddingInline","Spacing2","StyledSectionHeaderContainer","contrastFontColor","color","HueNeutral600","marginBlock","Spacing3","paddingBlock","Spacing1","Spacing4","StyledSideNavFooter","sideNavBackgroundColor","StyledPersistentSideNavFooter","isContentScrollable","transitionProperty","transitionDuration","transitionTiming","boxShadow","StyledSideNavFooterItemsContainer","sideNavContrastColors","flexWrap","alignItems","fontSize","TypographySizeOverline","fontColor","textDecoration","HueNeutral900","StyledLoadingItemContainer","gap","getHasScrollableContent","scrollableContainer","scrollHeight","clientHeight","LoadingItem","children","_Skeleton","variant","SideNav","appName","footerComponent","footerItems","hasCustomFooter","hasSessionStorageState","isCollapsible","isCollapsed","isCompact","isLoading","isObtrusive","logoProps","onCollapse","onExpand","onSort","sideNavItems","setHasContentScrolled","setHasNeighboringContent","setIsContentScrollable","setIsSideNavToggleHighlighted","sideNavItemsList","updateSideNavItemsList","isSideNavCollapsedLocalState","setIsSideNavCollapsedLocalState","sessionState","isSideNavCollapsedSessionState","setSessionState","setIsSideNavCollapsedSessionState","setIsSideNavCollapsed","uiShellContext","t","scrollableContentRef","resizeObserverRef","intersectionObserverRef","sideNavRef","blankElement","current","getBoundingClientRect","x","onMount","onUpdate","updateIsContentScrollable","parentElement","resizeObserverDebounceTimer","ResizeObserver","cancelAnimationFrame","requestAnimationFrame","observe","IntersectionObserver","entries","isIntersecting","slice","sort","a","b","time","at","root","threshold","ulElement","liElement","Array","from","disconnect","scrollIntoViewRef","firstSideNavItemIdWithIsSelected","flattenedItems","flatMap","sideNavItem","nestedNavItems","firstItemWithIsSelected","find","isSelected","id","scrollIntoView","getRefIfThisIsFirstNodeWithIsSelected","itemId","undefined","sideNavItemContentProviderValue","depth","setSelectedItem","selectedItemId","updatedSideNavItems","map","item","childItem","closeSideNavMenu","processedSideNavItems","childNavItems","childProps","isDisabled","isSortable","navItem","Provider","value","onItemSelected","scrollRef","translate","sideNavExpandClickHandler","sideNavExpandKeyHandler","event","key","code","preventDefault","unsubscribe","subscribeToCloseSideNavMenu","setSortedItems","parentId","activeId","activeIndex","overIndex","sortedSideNavItems","onSideNavToggleButtonHighlight","isHighlighted","appBackgroundColor","ref","clickAreaPadding","ariaControls","onClick","onHighlight","onKeyDown","role","fill","_","index","href","isDefaultExpanded","isExpanded","isSectionHeader","label","startIcon","fallback","component","nestedChildren","items","onChange","renderItem","sortableItem","Item","disabled","MemoizedSideNav","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNav.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 memo,\n useMemo,\n useState,\n useCallback,\n useRef,\n useEffect,\n KeyboardEventHandler,\n CSSProperties,\n} from \"react\";\nimport { Skeleton } from \"@mui/material\";\nimport { useTranslation } from \"react-i18next\";\nimport { arrayMove } from \"@dnd-kit/sortable\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { Property } from \"csstype\";\n\nimport { ContrastColors } from \"../../createContrastColors.js\";\nimport { NavAccordion } from \"./NavAccordion.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { OdysseyThemeProvider } from \"../../OdysseyThemeProvider.js\";\nimport type { SideNavProps } from \"./types.js\";\nimport { SideNavHeader } from \"./SideNavHeader.js\";\nimport {\n SideNavItemContent,\n StyledSideNavListItem,\n} from \"./SideNavItemContent.js\";\nimport { SideNavFooterContent } from \"./SideNavFooterContent.js\";\nimport { SideNavItemContentContext } from \"./SideNavItemContentContext.js\";\nimport {\n SIDE_NAV_TOGGLE_ICON_HALF_SIZE,\n SIDE_NAV_TOGGLE_ICON_SIZE,\n SideNavToggleButton,\n SideNavToggleButtonProps,\n} from \"./SideNavToggleButton.js\";\nimport { SortableList } from \"./SortableList/SortableList.js\";\nimport { Overline } from \"../../Typography.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport {\n SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n SIDE_NAV_WIDTH,\n UI_SHELL_BASE_Z_INDEX,\n UI_SHELL_OVERLAY_Z_INDEX,\n} from \"../uiShellSharedConstants.js\";\nimport { useIsSideNavCollapsedSessionStorage } from \"./useIsSideNavCollapsedSessionStorage.js\";\nimport { useMountLifecycleEffect } from \"../../useMountLifecycleEffect.js\";\n\nexport const SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED = 12;\nexport const SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED = 2;\n\nconst StyledCollapsibleContent = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isSideNavCollapsed\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isSideNavCollapsed: boolean;\n}>(({ odysseyDesignTokens, isSideNavCollapsed }) => ({\n position: \"relative\",\n display: \"grid\",\n gridTemplateColumns: SIDE_NAV_WIDTH,\n height: \"100%\",\n transition: `grid-template-columns ${odysseyDesignTokens.TransitionDurationMain}, opacity 300ms`,\n transitionTimingFunction: odysseyDesignTokens.TransitionTimingMain,\n overflow: \"hidden\",\n\n ...(isSideNavCollapsed &&\n ({\n gridTemplateColumns: 0,\n opacity: 0,\n } satisfies CSSProperties)),\n}));\n\nconst StyledOpacityTransitionContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isSideNavCollapsed\",\n})(\n ({\n odysseyDesignTokens,\n isSideNavCollapsed,\n }: {\n odysseyDesignTokens: DesignTokens;\n isSideNavCollapsed: boolean;\n }) => ({\n display: \"grid\",\n gridTemplateRows: \"max-content 1fr max-content\",\n height: \"100%\",\n transition: `opacity 50ms`,\n transitionTimingFunction: odysseyDesignTokens.TransitionTimingMain,\n overflow: \"hidden\",\n\n ...(isSideNavCollapsed &&\n ({\n opacity: 0,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledSideNavContainer = styled(\"nav\", {\n shouldForwardProp: (prop) =>\n prop !== \"backgroundColor\" &&\n prop !== \"hasNeighboringContent\" &&\n prop !== \"isAppContentWhiteBackground\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"isSideNavToggleHighlighted\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n backgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n hasNeighboringContent: boolean;\n isAppContentWhiteBackground: boolean;\n isSideNavCollapsed: boolean;\n isSideNavToggleHighlighted: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n backgroundColor,\n hasNeighboringContent,\n isAppContentWhiteBackground,\n isSideNavCollapsed,\n isSideNavToggleHighlighted,\n odysseyDesignTokens,\n }) => ({\n // Side nav container styles\n backgroundColor: backgroundColor || odysseyDesignTokens.HueNeutralWhite,\n height: \"100%\",\n position: \"relative\",\n width: \"fit-content\",\n\n // Right-side vertical line shared\n \"&::before, &::after\": {\n content: \"''\",\n height: \"100%\",\n pointerEvents: \"none\",\n position: \"absolute\",\n right: `-${odysseyDesignTokens.BorderWidthMain}`,\n top: 0,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}, transform ${odysseyDesignTokens.TransitionDurationMain}, width ${odysseyDesignTokens.TransitionDurationMain}`,\n userSelect: \"none\",\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n },\n\n // Right-side vertical line when open\n \"&::before\": {\n backgroundColor: isSideNavToggleHighlighted\n ? odysseyDesignTokens.BorderColorPrimaryControl\n : odysseyDesignTokens.HueNeutral100,\n opacity:\n isAppContentWhiteBackground ||\n (!isSideNavCollapsed && isSideNavToggleHighlighted)\n ? 1\n : 0,\n width: `calc(${odysseyDesignTokens.BorderWidthMain} * 2)`,\n },\n\n // Side nav vertical fill line when no neighboring content\n \"&::after\": {\n backgroundColor: odysseyDesignTokens.HueNeutral200,\n opacity: isSideNavCollapsed ? 1 : 0,\n transform:\n isSideNavCollapsed && !hasNeighboringContent\n ? isSideNavToggleHighlighted\n ? `translateX(calc(100% - (${odysseyDesignTokens.BorderWidthMain} * 2)))`\n : `translateX(calc(100% - ${SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px))`\n : \"translateX(0)\",\n width: hasNeighboringContent\n ? 0\n : `calc(${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px + ${odysseyDesignTokens.BorderWidthMain} * 2)`,\n\n // Right-side vertical line when collapsed\n ...((isSideNavCollapsed && isSideNavToggleHighlighted\n ? {\n borderRightColor: odysseyDesignTokens.BorderColorPrimaryControl,\n borderRightStyle:\n odysseyDesignTokens.BorderStyleMain as Property.BorderRightStyle,\n borderRightWidth: `calc(${odysseyDesignTokens.BorderWidthMain} * 2)`,\n }\n : {}) satisfies CSSProperties),\n },\n }),\n);\n\nconst StyledSideNavToggleButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"hasNeighboringContent\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"isSideNavToggleHighlighted\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n hasNeighboringContent: boolean;\n isSideNavCollapsed: boolean;\n isSideNavToggleHighlighted: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n hasNeighboringContent,\n isSideNavCollapsed,\n isSideNavToggleHighlighted,\n odysseyDesignTokens,\n }) => ({\n position: \"absolute\",\n right: `${SIDE_NAV_TOGGLE_ICON_HALF_SIZE}px`,\n top: SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n transform:\n isSideNavCollapsed && !hasNeighboringContent\n ? isSideNavToggleHighlighted\n ? `translate3d(calc(100% + ${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_HIGHLIGHTED}px), 0, 0)`\n : `translate3d(calc(100% + ${SIDE_NAV_TOGGLE_ICON_HALF_SIZE + SIDE_NAV_COLLAPSED_PADDING_UNHIGHLIGHTED}px), 0, 0)`\n : \"translate3d(100%, 0, 0)\",\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX + 1,\n }),\n);\n\nconst StyledSideNavHeaderContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"borderColor\" &&\n prop !== \"hasContentScrolled\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n borderColor: ContrastColors[\"fontColor\"];\n hasContentScrolled: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ borderColor, hasContentScrolled, odysseyDesignTokens }) => ({\n flexShrink: 0,\n // The bottom border should appear only if the scrollable region has been scrolled\n ...(hasContentScrolled &&\n ({\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n\n ...(borderColor &&\n ({\n borderBottomColor: borderColor.concat(\"15\"),\n } satisfies CSSProperties)),\n } as CSSProperties)),\n}));\n\nconst StyledSideNavListContainer = styled(\"ul\")(() => ({\n padding: 0,\n listStyle: \"none\",\n listStyleType: \"none\",\n margin: 0,\n width: \"100%\",\n}));\n\nconst StyledSideNavScrollableContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"inline-grid\",\n gridTemplateRows: \"1fr max-content\",\n overflowY: \"auto\",\n paddingInline: odysseyDesignTokens.Spacing2,\n}));\n\nconst StyledSectionHeaderContainer = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"contrastFontColor\",\n})(\n ({\n contrastFontColor,\n odysseyDesignTokens,\n }: {\n contrastFontColor: ContrastColors[\"fontColor\"];\n odysseyDesignTokens: DesignTokens;\n }) => ({\n color: contrastFontColor || odysseyDesignTokens.HueNeutral600,\n marginBlock: `${odysseyDesignTokens.Spacing3}`,\n paddingBlock: odysseyDesignTokens.Spacing1,\n paddingInline: odysseyDesignTokens.Spacing4,\n }),\n);\n\nconst StyledSideNavFooter = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"sideNavBackgroundColor\",\n})(\n ({\n odysseyDesignTokens,\n sideNavBackgroundColor,\n }: {\n odysseyDesignTokens: DesignTokens;\n sideNavBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n flexShrink: 0,\n padding: odysseyDesignTokens.Spacing4,\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledPersistentSideNavFooter = styled(StyledSideNavFooter, {\n shouldForwardProp: (prop) =>\n prop !== \"isContentScrollable\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavBackgroundColor\",\n})(\n ({\n isContentScrollable,\n odysseyDesignTokens,\n sideNavBackgroundColor,\n }: {\n isContentScrollable: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n }) => ({\n transitionProperty: \"box-shadow\",\n transitionDuration: odysseyDesignTokens.TransitionDurationMain,\n transitionTiming: odysseyDesignTokens.TransitionTimingMain,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n\n // The box shadow should appear above the footer only if the scrollable region has overflow\n ...(isContentScrollable &&\n ({\n boxShadow: \"0px -8px 8px -8px rgba(39, 39, 39, 0.08)\",\n } satisfies CSSProperties)),\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } satisfies CSSProperties)),\n }),\n);\n\nconst StyledSideNavFooterItemsContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"sideNavContrastColors\",\n})<{\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(({ odysseyDesignTokens, sideNavContrastColors }) => ({\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n fontSize: odysseyDesignTokens.TypographySizeOverline,\n\n \"a, span\": {\n color: odysseyDesignTokens.HueNeutral600,\n transition: `color ${odysseyDesignTokens.TransitionDurationMain}`,\n\n \"&:visited\": {\n color: odysseyDesignTokens.HueNeutral600,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n\n \"&:hover\": {\n textDecoration: \"none\",\n color: odysseyDesignTokens.HueNeutral900,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } satisfies CSSProperties)),\n },\n}));\n\nconst StyledLoadingItemContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing2,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing4,\n}));\n\nconst getHasScrollableContent = (scrollableContainer: HTMLElement) =>\n scrollableContainer.scrollHeight > scrollableContainer.clientHeight;\n\nconst LoadingItem = () => {\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n return (\n <StyledLoadingItemContainer odysseyDesignTokens={odysseyDesignTokens}>\n <Skeleton\n variant=\"circular\"\n width={odysseyDesignTokens.Spacing4}\n height={odysseyDesignTokens.Spacing4}\n />\n <Skeleton variant=\"rounded\" width=\"100%\" />\n </StyledLoadingItemContainer>\n );\n};\n\nconst SideNav = ({\n appName,\n footerComponent,\n footerItems,\n hasCustomFooter,\n hasSessionStorageState,\n isCollapsible,\n isCollapsed = false,\n isCompact,\n isLoading,\n isObtrusive,\n logoProps,\n onCollapse,\n onExpand,\n onSort,\n sideNavItems,\n}: SideNavProps) => {\n const [hasContentScrolled, setHasContentScrolled] = useState(false);\n const [hasNeighboringContent, setHasNeighboringContent] = useState(false);\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const [isSideNavToggleHighlighted, setIsSideNavToggleHighlighted] =\n useState(false);\n const [sideNavItemsList, updateSideNavItemsList] = useState(\n sideNavItems || [],\n );\n\n const [isSideNavCollapsedLocalState, setIsSideNavCollapsedLocalState] =\n useState(isCollapsed);\n\n const {\n sessionState: isSideNavCollapsedSessionState,\n setSessionState: setIsSideNavCollapsedSessionState,\n } = useIsSideNavCollapsedSessionStorage(isCollapsed);\n\n const isSideNavCollapsed = hasSessionStorageState\n ? isSideNavCollapsedSessionState\n : isSideNavCollapsedLocalState;\n const setIsSideNavCollapsed = hasSessionStorageState\n ? setIsSideNavCollapsedSessionState\n : setIsSideNavCollapsedLocalState;\n\n const uiShellContext = useUiShellContext();\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const scrollableContentRef = useRef<HTMLUListElement>(null);\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const intersectionObserverRef = useRef<IntersectionObserver | null>(null);\n const sideNavRef = useRef<HTMLDivElement>(null);\n\n const blankElement = useMemo(() => <div />, []);\n\n // The default value (sideNavItems) passed to useState is ONLY used by the useState hook for\n // the very first value. Subsequent updates to the prop (sideNavItems) need to cause the state\n // to update!\n useEffect(() => updateSideNavItemsList(sideNavItems || []), [sideNavItems]);\n\n // update sidenav collapse status\n useEffect(() => {\n if (sideNavRef.current) {\n setHasNeighboringContent(\n sideNavRef.current.getBoundingClientRect().x > 0,\n );\n }\n // We want this listening to `isCollapsed` because that changes what's next to the side nav.\n }, [isCollapsed]);\n\n // In the case that you can't control the side nav, then it should use whatever state was passed (app control) rather than what's stored in session storage (user control).\n const onMount = useCallback(() => {\n if (!isCollapsible) {\n setIsSideNavCollapsed(isCollapsed);\n }\n }, [isCollapsed, isCollapsible, setIsSideNavCollapsed]);\n\n const onUpdate = useCallback(() => {\n setIsSideNavCollapsed(isCollapsed);\n }, [isCollapsed, setIsSideNavCollapsed]);\n\n useMountLifecycleEffect({\n onMount,\n onUpdate,\n });\n\n useEffect(() => {\n // This is called directly in this effect AND perhaps as a result of the ResizeObserver\n const updateIsContentScrollable = () => {\n if (\n scrollableContentRef.current &&\n scrollableContentRef.current.parentElement\n ) {\n setIsContentScrollable(\n getHasScrollableContent(scrollableContentRef.current.parentElement),\n );\n }\n };\n\n // If the window is resized, we may need to re-determine if the scrollable container has overflow\n // Setup a ResizeObserver to know if the size of the scrollableContent changes\n let resizeObserverDebounceTimer: ReturnType<typeof requestAnimationFrame>;\n if (!resizeObserverRef.current) {\n resizeObserverRef.current = new ResizeObserver(() => {\n cancelAnimationFrame(resizeObserverDebounceTimer);\n resizeObserverDebounceTimer = requestAnimationFrame(\n updateIsContentScrollable,\n );\n });\n }\n\n if (resizeObserverRef.current && scrollableContentRef.current) {\n // Observe the <ul> itself (in case it changes size due to the content expanding)\n resizeObserverRef.current.observe(scrollableContentRef.current);\n if (scrollableContentRef.current.parentElement) {\n // ALSO observe the parent (<SideNavScrollableContainer>) in case the window resizes\n resizeObserverRef.current.observe(\n scrollableContentRef.current.parentElement,\n );\n }\n }\n\n // Determine if the scrollable container has overflow or not on load\n updateIsContentScrollable();\n\n // Finally, we only want to have the border on the bottom of the header iff the user has scrolled\n // the scrollable container\n if (!intersectionObserverRef.current && scrollableContentRef.current) {\n intersectionObserverRef.current = new IntersectionObserver(\n (entries) => {\n // If isIntersecting is true, then we're at the top of the scroll container\n // If isIntersecting is false, some scrolling has occurred.\n // The entries must be sorted by time and we only really need to look at the latest one\n const isIntersecting = entries\n .slice()\n .sort((a, b) => a.time - b.time)\n .at(0)?.isIntersecting;\n setHasContentScrolled(!isIntersecting);\n },\n {\n root: scrollableContentRef.current.parentElement,\n threshold: 1.0,\n },\n );\n }\n\n if (intersectionObserverRef.current && scrollableContentRef.current) {\n const ulElement = scrollableContentRef.current;\n const [liElement] = Array.from(ulElement?.children || []);\n\n if (liElement) {\n intersectionObserverRef.current.observe(liElement);\n }\n }\n\n // Cleanup when unmounted:\n return () => {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n resizeObserverRef.current = null;\n }\n if (intersectionObserverRef.current) {\n intersectionObserverRef.current.disconnect();\n intersectionObserverRef.current = null;\n }\n cancelAnimationFrame(resizeObserverDebounceTimer); // Ensure timer is cleared on component unmount\n };\n }, [sideNavItemsList]);\n\n const scrollIntoViewRef = useRef<HTMLLIElement>(null);\n /**\n * Look through the sideNavItems and determine which is the first node\n * with isSelected. This should be the node we set a ref on in order to\n * call scrollIntoView in the effect\n */\n const firstSideNavItemIdWithIsSelected = useMemo(() => {\n const flattenedItems = sideNavItemsList.flatMap((sideNavItem) =>\n sideNavItem.nestedNavItems\n ? [sideNavItem, ...sideNavItem.nestedNavItems]\n : sideNavItem,\n );\n const firstItemWithIsSelected = flattenedItems.find(\n (sideNavItem) => sideNavItem.isSelected,\n );\n return firstItemWithIsSelected?.id;\n }, [sideNavItemsList]);\n /**\n * Once we've rendered and if we have an item to scroll to, do the scroll action.\n * This must rely on checking firstSideNavItemIdWithIsSelected or it will not run\n * once the actual ref is populated.\n */\n useEffect(() => {\n if (firstSideNavItemIdWithIsSelected && scrollIntoViewRef.current) {\n scrollIntoViewRef.current.scrollIntoView();\n }\n }, [firstSideNavItemIdWithIsSelected]);\n\n /**\n * We only want to put a ref on a node iff it is the first selected node.\n * This function returns the ref only if the ID provided matches the first\n * selected node, otherwise returns undefined (so that the node has no ref)\n */\n const getRefIfThisIsFirstNodeWithIsSelected = useCallback(\n (itemId: string) =>\n itemId === firstSideNavItemIdWithIsSelected\n ? scrollIntoViewRef\n : undefined,\n [firstSideNavItemIdWithIsSelected],\n );\n\n const sideNavItemContentProviderValue = useMemo(\n () => ({ isCompact, depth: 1 }),\n [isCompact],\n );\n\n const setSelectedItem = useCallback(\n (selectedItemId: string) => {\n const updatedSideNavItems = sideNavItemsList.map((item) => {\n if (item.id === selectedItemId) {\n item.isSelected = true;\n } else if (item.isSelected) {\n delete item.isSelected;\n }\n\n return item.nestedNavItems\n ? {\n ...item,\n nestedNavItems: item.nestedNavItems.map((childItem) => {\n if (childItem.id === selectedItemId) {\n childItem.isSelected = true;\n } else if (childItem.isSelected) {\n delete childItem.isSelected;\n }\n return childItem;\n }),\n }\n : item;\n });\n updateSideNavItemsList(updatedSideNavItems);\n\n if (isCollapsed || isObtrusive) {\n if (isCollapsible) {\n uiShellContext?.closeSideNavMenu();\n } else {\n onCollapse?.();\n }\n }\n },\n [\n isCollapsed,\n isCollapsible,\n isObtrusive,\n onCollapse,\n sideNavItemsList,\n uiShellContext,\n ],\n );\n\n const processedSideNavItems = useMemo(() => {\n return sideNavItemsList?.map((item) => ({\n ...item,\n childNavItems: item.nestedNavItems?.map((childProps) => ({\n id: childProps.id,\n isSelected: childProps.isSelected,\n isDisabled: childProps.isDisabled,\n isSortable: childProps.isSortable,\n navItem: (\n <SideNavItemContentContext.Provider\n key={childProps.id}\n value={{\n ...sideNavItemContentProviderValue,\n depth: 2,\n isSortable: item.isSortable,\n }}\n >\n <SideNavItemContent\n {...childProps}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(childProps.id)}\n translate={childProps.translate}\n />\n </SideNavItemContentContext.Provider>\n ),\n })),\n }));\n }, [\n getRefIfThisIsFirstNodeWithIsSelected,\n setSelectedItem,\n sideNavItemContentProviderValue,\n sideNavItemsList,\n ]);\n\n const sideNavExpandClickHandler = useCallback(() => {\n setIsSideNavCollapsed((isSideNavCollapsed) => {\n if (isSideNavCollapsed) {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n\n return !isSideNavCollapsed;\n });\n }, [onCollapse, onExpand, setIsSideNavCollapsed]);\n\n const sideNavExpandKeyHandler = useCallback<\n KeyboardEventHandler<HTMLButtonElement>\n >(\n (event) => {\n if (event?.key === \"Enter\" || event?.code === \"Space\") {\n event.preventDefault();\n sideNavExpandClickHandler();\n }\n },\n [sideNavExpandClickHandler],\n );\n\n useEffect(() => {\n const unsubscribe = uiShellContext?.subscribeToCloseSideNavMenu(() => {\n onCollapse?.();\n setIsSideNavCollapsed(true);\n });\n\n return () => {\n unsubscribe?.();\n };\n }, [onCollapse, setIsSideNavCollapsed, uiShellContext]);\n\n const setSortedItems = useCallback(\n (\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => {\n const sortedSideNavItems = sideNavItemsList.map((item) =>\n item.id === parentId && item.nestedNavItems\n ? {\n ...item,\n nestedNavItems: arrayMove(\n item.nestedNavItems,\n activeIndex,\n overIndex,\n ),\n }\n : item,\n );\n updateSideNavItemsList(sortedSideNavItems);\n onSort?.(sortedSideNavItems, parentId, activeId, activeIndex, overIndex);\n },\n [onSort, sideNavItemsList],\n );\n\n const onSideNavToggleButtonHighlight = useCallback<\n NonNullable<SideNavToggleButtonProps[\"onHighlight\"]>\n >((isHighlighted) => {\n setIsSideNavToggleHighlighted(isHighlighted);\n }, []);\n\n return (\n <StyledSideNavContainer\n aria-label={t(\"navigation.label\")}\n backgroundColor={uiShellContext?.sideNavBackgroundColor}\n hasNeighboringContent={hasNeighboringContent}\n id=\"side-nav-expandable\"\n isAppContentWhiteBackground={\n uiShellContext?.appBackgroundColor ===\n odysseyDesignTokens.HueNeutralWhite\n }\n isSideNavCollapsed={isSideNavCollapsed}\n isSideNavToggleHighlighted={isSideNavToggleHighlighted}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={sideNavRef}\n >\n {isCollapsible && (\n <StyledSideNavToggleButtonContainer\n hasNeighboringContent={hasNeighboringContent}\n isSideNavCollapsed={isSideNavCollapsed}\n isSideNavToggleHighlighted={isSideNavToggleHighlighted}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <SideNavToggleButton\n clickAreaPadding={\n isSideNavCollapsed && !hasNeighboringContent\n ? SIDE_NAV_TOGGLE_ICON_SIZE / 2\n : 0\n }\n ariaControls=\"side-nav-expandable\"\n isSideNavCollapsed={isSideNavCollapsed}\n onClick={sideNavExpandClickHandler}\n onHighlight={onSideNavToggleButtonHighlight}\n onKeyDown={sideNavExpandKeyHandler}\n />\n </StyledSideNavToggleButtonContainer>\n )}\n\n <OdysseyThemeProvider>\n <StyledCollapsibleContent\n data-se=\"collapsible-region\"\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledOpacityTransitionContainer\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {appName || isLoading || logoProps ? (\n <StyledSideNavHeaderContainer\n hasContentScrolled={hasContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n borderColor={uiShellContext?.sideNavContrastColors?.fontColor}\n >\n {isLoading && !appName && !logoProps ? (\n <SideNavHeader isLoading={isLoading} />\n ) : (\n <SideNavHeader\n appName={appName}\n isLoading={isLoading}\n logoProps={logoProps}\n />\n )}\n </StyledSideNavHeaderContainer>\n ) : (\n <div />\n )}\n\n <StyledSideNavScrollableContainer\n odysseyDesignTokens={odysseyDesignTokens}\n data-se=\"scrollable-region\"\n >\n <StyledSideNavListContainer\n role=\"none\"\n ref={scrollableContentRef}\n >\n {isLoading\n ? Array(6)\n .fill(null)\n .map((_, index) => <LoadingItem key={index} />)\n : processedSideNavItems?.map((item) => {\n const {\n childNavItems,\n href,\n id,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n isSectionHeader,\n isSortable,\n label,\n startIcon,\n } = item;\n\n if (isSectionHeader) {\n return (\n <ErrorBoundary fallback={blankElement} key={id}>\n <StyledSectionHeaderContainer\n contrastFontColor={\n uiShellContext?.sideNavContrastColors?.fontColor\n }\n id={id}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Overline component=\"h3\">{label}</Overline>\n </StyledSectionHeaderContainer>\n </ErrorBoundary>\n );\n } else if (childNavItems) {\n const nestedChildren = (\n <StyledSideNavListContainer role=\"presentation\">\n {isSortable ? (\n <SortableList\n parentId={item.id}\n items={childNavItems}\n onChange={setSortedItems}\n renderItem={(sortableItem) => (\n <SortableList.Item\n id={sortableItem.id}\n isDisabled={sortableItem.isDisabled}\n isSelected={sortableItem.isSelected}\n isSortable={sortableItem.isSortable}\n >\n {sortableItem.navItem}\n </SortableList.Item>\n )}\n />\n ) : (\n childNavItems.map((item) => item.navItem)\n )}\n </StyledSideNavListContainer>\n );\n\n return href ? (\n <ErrorBoundary fallback={blankElement} key={id}>\n <SideNavItemContent\n {...item}\n href={href}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(\n item.id,\n )}\n startIcon={item.startIcon}\n />\n\n <StyledSideNavListItem\n id={`${id}-items`}\n odysseyDesignTokens={odysseyDesignTokens}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n >\n {nestedChildren}\n </StyledSideNavListItem>\n </ErrorBoundary>\n ) : (\n <ErrorBoundary fallback={blankElement} key={id}>\n <StyledSideNavListItem\n id={id}\n odysseyDesignTokens={odysseyDesignTokens}\n disabled={isDisabled}\n aria-disabled={isDisabled}\n >\n <NavAccordion\n label={label}\n isCompact={isCompact}\n isDefaultExpanded={isDefaultExpanded}\n isExpanded={isExpanded}\n startIcon={startIcon}\n isDisabled={isDisabled}\n >\n {nestedChildren}\n </NavAccordion>\n </StyledSideNavListItem>\n </ErrorBoundary>\n );\n } else {\n return (\n <ErrorBoundary fallback={blankElement} key={item.id}>\n <SideNavItemContentContext.Provider\n value={sideNavItemContentProviderValue}\n >\n <SideNavItemContent\n {...item}\n onItemSelected={setSelectedItem}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(\n item.id,\n )}\n startIcon={item.startIcon}\n />\n </SideNavItemContentContext.Provider>\n </ErrorBoundary>\n );\n }\n })}\n </StyledSideNavListContainer>\n {!isLoading && footerItems && !hasCustomFooter && (\n <StyledSideNavFooter\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavBackgroundColor={\n uiShellContext?.sideNavBackgroundColor\n }\n >\n <StyledSideNavFooterItemsContainer\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavContrastColors={\n uiShellContext?.sideNavContrastColors\n }\n >\n <SideNavFooterContent footerItems={footerItems} />\n </StyledSideNavFooterItemsContainer>\n </StyledSideNavFooter>\n )}\n </StyledSideNavScrollableContainer>\n {!isLoading && !footerItems && hasCustomFooter && (\n <StyledPersistentSideNavFooter\n isContentScrollable={isContentScrollable}\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n {footerComponent}\n </StyledPersistentSideNavFooter>\n )}\n </StyledOpacityTransitionContainer>\n </StyledCollapsibleContent>\n </OdysseyThemeProvider>\n </StyledSideNavContainer>\n );\n};\n\nconst MemoizedSideNav = memo(SideNav);\nMemoizedSideNav.displayName = \"SideNav\";\n\nexport { MemoizedSideNav as SideNav };\n"],"mappings":";AAAA;AACA;AACA;AACA;AAC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,CAC3B;oBAAC,CACgC;kBAAC,GAZK9C,IAAI,CAACX,EAalC,CAAC;gBAEpB;cACF,CAAC;YAAC,CACoB,CAAC,EAC5B,CAAChE,SAAS,IAAIN,WAAW,IAAI,CAACC,eAAe,IAC5CtG,IAAA,CAACuE,mBAAmB;cAClB/D,mBAAmB,EAAEA,mBAAoB;cACzCgE,sBAAsB,EACpBuD,cAAc,EAAEvD,sBACjB;cAAAuB,QAAA,EAED/F,IAAA,CAAC+E,iCAAiC;gBAChCvE,mBAAmB,EAAEA,mBAAoB;gBACzCwE,qBAAqB,EACnB+C,cAAc,EAAE/C,qBACjB;gBAAAe,QAAA,EAED/F,IAAA,CAACf,oBAAoB;kBAACoH,WAAW,EAAEA;gBAAY,CAAE;cAAC,CACjB;YAAC,CACjB,CACtB;UAAA,CAC+B,CAAC,EAClC,CAACM,SAAS,IAAI,CAACN,WAAW,IAAIC,eAAe,IAC5CtG,IAAA,CAACyE,6BAA6B;YAC5BC,mBAAmB,EAAEA,mBAAoB;YACzClE,mBAAmB,EAAEA,mBAAoB;YACzCgE,sBAAsB,EAAEuD,cAAc,EAAEvD,sBAAuB;YAAAuB,QAAA,EAE9DK;UAAe,CACa,CAChC;QAAA,CAC+B;MAAC,CACX;IAAC,CACP,CAAC;EAAA,CACD,CAAC;AAE7B,CAAC;AAED,MAAM0I,eAAe,GAAG5Q,IAAI,CAACgI,OAAO,CAAC;AACrC4I,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAI5I,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","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 type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\ntype LogoWithLink = {\n href: string;\n ariaLabel: string;\n};\ntype LogoWithNoLink = {\n href?: never;\n ariaLabel?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n imageAltText?: never;\n imageUrl?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n logoComponent?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n logoComponent?: never;\n }\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 * Determines whether the side nav is collapsible\n */\n isCollapsible?: 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 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 * 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?: SideNavLogoProps;\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
|
|
1
|
+
{"version":3,"file":"types.js","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 type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\ntype LogoWithLink = {\n href: string;\n ariaLabel: string;\n};\ntype LogoWithNoLink = {\n href?: never;\n ariaLabel?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n imageAltText?: never;\n imageUrl?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n logoComponent?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n logoComponent?: never;\n }\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 collapsible\n */\n isCollapsible?: 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 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 * 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?: SideNavLogoProps;\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 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 nestedNavItems?: never;\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 }\n | {\n nestedNavItems?: never;\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 }\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<Omit<SideNavItem, \"nestedNavItems\" | \"startIcon\">>;\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<Omit<SideNavItem, \"nestedNavItems\" | \"startIcon\">>;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -78,22 +78,25 @@ const UiShell = ({
|
|
|
78
78
|
...componentProps,
|
|
79
79
|
appElement: appElement,
|
|
80
80
|
appElementScrollingMode: appElementScrollingMode,
|
|
81
|
+
hasSideNavProps: Boolean(componentProps.sideNavProps),
|
|
81
82
|
hasStandardAppContentPadding: hasStandardAppContentPadding,
|
|
82
83
|
initialVisibleSections: initialVisibleSections,
|
|
83
84
|
onError: onError,
|
|
84
85
|
optionalComponents: optionalComponents
|
|
85
86
|
}), (activeBreakpoint === "medium" || activeBreakpoint === "wide") && _jsx(WideUiShellContent, {
|
|
86
87
|
...componentProps,
|
|
87
|
-
...
|
|
88
|
+
...{
|
|
88
89
|
sideNavProps: {
|
|
89
90
|
...componentProps.sideNavProps,
|
|
91
|
+
hasSessionStorageState: activeBreakpoint === "wide",
|
|
90
92
|
isCollapsed: activeBreakpoint === "medium" || componentProps.sideNavProps?.isCollapsed,
|
|
91
93
|
isCollapsible: activeBreakpoint === "medium" || componentProps.sideNavProps?.isCollapsible
|
|
92
94
|
}
|
|
93
|
-
}
|
|
95
|
+
},
|
|
94
96
|
appElement: appElement,
|
|
95
97
|
appElementScrollingMode: appElementScrollingMode,
|
|
96
98
|
hasStandardAppContentPadding: hasStandardAppContentPadding,
|
|
99
|
+
hasSideNavProps: Boolean(componentProps.sideNavProps),
|
|
97
100
|
initialVisibleSections: initialVisibleSections,
|
|
98
101
|
onError: onError,
|
|
99
102
|
optionalComponents: optionalComponents
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiShell.js","names":["memo","useEffect","useState","ErrorBoundary","CssBaseline","NarrowUiShellContent","OdysseyProvider","UiShellProvider","useUiShellBreakpoints","WideUiShellContent","jsx","_jsx","jsxs","_jsxs","defaultComponentProps","sideNavProps","undefined","topNavProps","errorComponent","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","breakpointConfig","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","activeBreakpoint","unsubscribe","fallback","children","emotionRootElement","shadowRootElement","isCollapsed","isCollapsible","MemoizedUiShell","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, useEffect, useState, type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { type ReactRootElements } from \"../web-component/createReactRootElements.js\";\nimport { CssBaseline } from \"../CssBaseline.js\";\nimport { NarrowUiShellContent } from \"./NarrowUiShellContent.js\";\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport { UiShellProvider, UiShellProviderProps } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport {\n UiShellBreakpointConfig,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\nimport { MessageBus } from \"./createMessageBus.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 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 shadowRootElement={uiShellAppElement}\n >\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <CssBaseline />\n\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n closeSideNavMenu={closeSideNavMenu}\n sideNavBackgroundColor={sideNavBackgroundColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n {activeBreakpoint === \"narrow\" && (\n <NarrowUiShellContent\n {...componentProps}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\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 ...(componentProps.sideNavProps\n ? {\n sideNavProps: {\n ...componentProps.sideNavProps,\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 }}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\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 =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B;cACEA,YAAY,EAAE;gBACZ,GAAGyB,cAAc,CAACzB,YAAY;gBAC9BiC,WAAW,EACTN,gBAAgB,KAAK,QAAQ,IAC7BF,cAAc,CAACzB,YAAY,EAAEiC,WAAW;gBAC1CC,aAAa,EACXP,gBAAgB,KAAK,QAAQ,IAC7BF,cAAc,CAACzB,YAAY,EAAEkC;cAEjC;YACF,CAAC,GACD,CAAC,CAAC,CAAC;YAET3B,UAAU,EAAEA,UAAW;YACvBC,uBAAuB,EAAEA,uBAAwB;YACjDG,4BAA4B,EAAEA,4BAA6B;YAC3DC,sBAAsB,EAAEA,sBAAuB;YAC/CC,OAAO,EAAEA,OAAQ;YACjBI,kBAAkB,EAAEA;UAAmB,CACxC,CACF;QAAA,CACc,CAAC;MAAA,CACL;IAAC,CACD;EAAC,CACL,CAChB;AACH,CAAC;AAED,MAAMkB,eAAe,GAAGlD,IAAI,CAACmB,OAAO,CAAC;AACrC+B,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAI/B,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"UiShell.js","names":["memo","useEffect","useState","ErrorBoundary","CssBaseline","NarrowUiShellContent","OdysseyProvider","UiShellProvider","useUiShellBreakpoints","WideUiShellContent","jsx","_jsx","jsxs","_jsxs","defaultComponentProps","sideNavProps","undefined","topNavProps","errorComponent","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","breakpointConfig","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","activeBreakpoint","unsubscribe","fallback","children","emotionRootElement","shadowRootElement","hasSideNavProps","Boolean","hasSessionStorageState","isCollapsed","isCollapsible","MemoizedUiShell","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, useEffect, useState, type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { type ReactRootElements } from \"../web-component/createReactRootElements.js\";\nimport { CssBaseline } from \"../CssBaseline.js\";\nimport { NarrowUiShellContent } from \"./NarrowUiShellContent.js\";\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport { UiShellProvider, UiShellProviderProps } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport {\n UiShellBreakpointConfig,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\nimport { MessageBus } from \"./createMessageBus.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 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 shadowRootElement={uiShellAppElement}\n >\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <CssBaseline />\n\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n closeSideNavMenu={closeSideNavMenu}\n sideNavBackgroundColor={sideNavBackgroundColor}\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 hasStandardAppContentPadding={hasStandardAppContentPadding}\n hasSideNavProps={Boolean(componentProps.sideNavProps)}\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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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B,EAAER,gBAAgB,KAAK,MAAM;gBACnDS,WAAW,EACTT,gBAAgB,KAAK,QAAQ,IAC7BF,cAAc,CAACzB,YAAY,EAAEoC,WAAW;gBAC1CC,aAAa,EACXV,gBAAgB,KAAK,QAAQ,IAC7BF,cAAc,CAACzB,YAAY,EAAEqC;cAEjC;YACF,CAAC;YAEH9B,UAAU,EAAEA,UAAW;YACvBC,uBAAuB,EAAEA,uBAAwB;YACjDG,4BAA4B,EAAEA,4BAA6B;YAC3DsB,eAAe,EAAEC,OAAO,CAACT,cAAc,CAACzB,YAAY,CAAE;YACtDY,sBAAsB,EAAEA,sBAAuB;YAC/CC,OAAO,EAAEA,OAAQ;YACjBI,kBAAkB,EAAEA;UAAmB,CACxC,CACF;QAAA,CACc,CAAC;MAAA,CACL;IAAC,CACD;EAAC,CACL,CAChB;AACH,CAAC;AAED,MAAMqB,eAAe,GAAGrD,IAAI,CAACmB,OAAO,CAAC;AACrCkC,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAIlC,OAAO","ignoreList":[]}
|
|
@@ -68,6 +68,7 @@ const WideUiShellContent = ({
|
|
|
68
68
|
appElementScrollingMode,
|
|
69
69
|
appSwitcherProps,
|
|
70
70
|
hasStandardAppContentPadding = true,
|
|
71
|
+
hasSideNavProps,
|
|
71
72
|
initialVisibleSections = ["TopNav", "SideNav", "AppSwitcher"],
|
|
72
73
|
onError = console.error,
|
|
73
74
|
optionalComponents,
|
|
@@ -114,14 +115,14 @@ const WideUiShellContent = ({
|
|
|
114
115
|
})]
|
|
115
116
|
}), _jsxs(StyledSideNavContainer, {
|
|
116
117
|
ref: sideNavContainerRef,
|
|
117
|
-
children: [initialVisibleSections?.includes("SideNav") &&
|
|
118
|
+
children: [initialVisibleSections?.includes("SideNav") && !hasSideNavProps && _jsx(ErrorBoundary, {
|
|
118
119
|
fallback: null,
|
|
119
120
|
onError: onError,
|
|
120
121
|
children: _jsx(SideNav, {
|
|
121
122
|
isLoading: true,
|
|
122
123
|
sideNavItems: emptySideNavItems
|
|
123
124
|
})
|
|
124
|
-
}), sideNavProps && _jsx(ErrorBoundary, {
|
|
125
|
+
}), hasSideNavProps && sideNavProps && _jsx(ErrorBoundary, {
|
|
125
126
|
fallback: null,
|
|
126
127
|
onError: onError,
|
|
127
128
|
children: _jsx(SideNav, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","AppSwitcher","InnerAppContainer","useOdysseyDesignTokens","SideNav","TopNav","useScrollState","useMatchAppElementToUiShellAppArea","useUiShellContext","emptySideNavItems","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","appIcons","isLoading","selectedAppName","undefined","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","MemoizedWideUiShellContent","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.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 { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport {\n useOdysseyDesignTokens,\n type DesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport { useScrollState } from \"./useScrollState.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = 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 banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\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 WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\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 { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\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 sideNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\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 />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n tabIndex={0}\n ref={uiShellAppAreaRef}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,WAAW,QAAQ,wBAAwB;AAEpD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SACEC,sBAAsB,QAEjB,kCAAkC;AACzC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,kCAAkC,QAAQ,yCAAyC;AAK5F,SAAwBC,iBAAiB,QAAQ,sBAAsB;AACvE,SAASC,iBAAiB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,MAAMC,0BAA0B,GAAG,EAAqC;AAExE,MAAMC,kBAAkB,GAAGlB,MAAM,CAAC,KAAK,EAAE;EACvCmB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAAIA,IAAI,KAAK;AAC9C,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAmB,CAAC,MAAM;EAC9BC,eAAe,EAAED,kBAAkB;EACnCE,QAAQ,EAAE,aAAa;EACvBC,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AAEH,MAAMC,0BAA0B,GAAGzB,MAAM,CAAC,KAAK,CAAC,CAAC;EAC/CuB,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMG,sBAAsB,GAAG1B,MAAM,CAAC,KAAK,CAAC,CAAC;EAC3CuB,QAAQ,EAAE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CACoB,CAAC,EAExB9D,IAAA,CAACI,kBAAkB;MACjBG,kBAAkB,EAAE8B,cAAc,EAAE9B,kBAAmB;MACvDwD,QAAQ,EAAE,CAAE;MACZlB,GAAG,EAAEJ,iBAAkB;MAAAK,QAAA,EAEvB9C,IAAA,CAACT,iBAAiB;QAAC+C,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAM0B,0BAA0B,GAAG7E,IAAI,CAACsC,kBAAkB,CAAC;AAC3DuC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAIvC,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","AppSwitcher","InnerAppContainer","useOdysseyDesignTokens","SideNav","TopNav","useScrollState","useMatchAppElementToUiShellAppArea","useUiShellContext","emptySideNavItems","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","appIcons","isLoading","selectedAppName","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","MemoizedWideUiShellContent","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.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 { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport {\n useOdysseyDesignTokens,\n type DesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport { useScrollState } from \"./useScrollState.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = 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 banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\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 WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\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 { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") && !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 <SideNav\n {...{\n ...sideNavProps,\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 />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n tabIndex={0}\n ref={uiShellAppAreaRef}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,WAAW,QAAQ,wBAAwB;AAEpD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SACEC,sBAAsB,QAEjB,kCAAkC;AACzC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,kCAAkC,QAAQ,yCAAyC;AAK5F,SAAwBC,iBAAiB,QAAQ,sBAAsB;AACvE,SAASC,iBAAiB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,MAAMC,0BAA0B,GAAG,EAAqC;AAExE,MAAMC,kBAAkB,GAAGlB,MAAM,CAAC,KAAK,EAAE;EACvCmB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAAIA,IAAI,KAAK;AAC9C,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAmB,CAAC,MAAM;EAC9BC,eAAe,EAAED,kBAAkB;EACnCE,QAAQ,EAAE,aAAa;EACv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AAa;QAAC6D,QAAQ,EAAE,IAAK;QAAClB,OAAO,EAAEA,OAAQ;QAAAe,QAAA,EAC9C/C,IAAA,CAACN,MAAM;UAAA,GACD2C,WAAW;UACfuB,iBAAiB,EAAEzB,kBAAkB,EAAE0B,cAAe;UACtDC,kBAAkB,EAAE3B,kBAAkB,EAAE4B;QAAgB,CACzD;MAAC,CACW,CAChB;IAAA,CACoB,CAAC,EAExB/D,IAAA,CAACI,kBAAkB;MACjBG,kBAAkB,EAAE+B,cAAc,EAAE/B,kBAAmB;MACvDyD,QAAQ,EAAE,CAAE;MACZlB,GAAG,EAAEJ,iBAAkB;MAAAK,QAAA,EAEvB/C,IAAA,CAACT,iBAAiB;QAACgD,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAM0B,0BAA0B,GAAG9E,IAAI,CAACsC,kBAAkB,CAAC;AAC3DwC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAIxC,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiShellContentTypes.js","names":["subComponentNames"],"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 type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n */\n appSwitcherProps?: AppSwitcherProps;\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 * 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;;AASA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"uiShellContentTypes.js","names":["subComponentNames"],"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 type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n */\n appSwitcherProps?: AppSwitcherProps;\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;;AASA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU","ignoreList":[]}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/export default "1-37-
|
|
11
|
+
*/export default "1-37-1";
|
|
12
12
|
//# sourceMappingURL=odysseyWebComponentVersion.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.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\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\nexport default \"1-37-
|
|
1
|
+
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.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\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\nexport default \"1-37-1\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAOA,eAAe,QAAQ","ignoreList":[]}
|