@okta/odyssey-react-mui 1.33.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/cjs/Buttons/BaseButton.cjs +1 -1
  2. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  3. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  4. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  5. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +19 -6
  6. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  7. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +2 -2
  8. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  9. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs +3 -3
  10. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs.map +1 -1
  11. package/dist/cjs/ui-shell/UiShell.cjs +6 -0
  12. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  13. package/dist/cjs/ui-shell/UiShellProvider.cjs +11 -8
  14. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  15. package/dist/cjs/ui-shell/WideUiShellContent.cjs +2 -2
  16. package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
  17. package/dist/cjs/ui-shell/renderUiShell.cjs +13 -0
  18. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  19. package/dist/cjs/ui-shell/uiShellSharedConstants.cjs +2 -1
  20. package/dist/cjs/ui-shell/uiShellSharedConstants.cjs.map +1 -1
  21. package/dist/esm/Buttons/BaseButton.js +1 -1
  22. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  23. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  24. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  25. package/dist/esm/ui-shell/NarrowUiShellContent.js +20 -7
  26. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  27. package/dist/esm/ui-shell/SideNav/SideNav.js +2 -2
  28. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  29. package/dist/esm/ui-shell/SideNav/SideNavLogo.js +3 -3
  30. package/dist/esm/ui-shell/SideNav/SideNavLogo.js.map +1 -1
  31. package/dist/esm/ui-shell/UiShell.js +6 -0
  32. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  33. package/dist/esm/ui-shell/UiShellProvider.js +9 -7
  34. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  35. package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
  36. package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
  37. package/dist/esm/ui-shell/renderUiShell.js +13 -0
  38. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  39. package/dist/esm/ui-shell/uiShellSharedConstants.js +1 -0
  40. package/dist/esm/ui-shell/uiShellSharedConstants.js.map +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.mjs +1 -1
  43. package/dist/index.scss +1 -1
  44. package/dist/tsconfig.production.tsbuildinfo +1 -1
  45. package/dist/types/Buttons/BaseButton.d.ts +1 -1
  46. package/dist/types/labs/DatePickers/DateTimePicker.d.ts.map +1 -1
  47. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  48. package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts +1 -1
  49. package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts.map +1 -1
  50. package/dist/types/ui-shell/UiShell.d.ts +5 -20
  51. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  52. package/dist/types/ui-shell/UiShellProvider.d.ts +33 -6
  53. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  54. package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
  55. package/dist/types/ui-shell/renderUiShell.d.ts +2 -0
  56. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  57. package/dist/types/ui-shell/uiShellSharedConstants.d.ts +1 -0
  58. package/dist/types/ui-shell/uiShellSharedConstants.d.ts.map +1 -1
  59. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"SideNav.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactI18next","_sortable","_reactErrorBoundary","_NavAccordion","_OdysseyDesignTokensContext","_OdysseyThemeProvider","_SideNavHeader","_SideNavItemContent","_SideNavFooterContent","_SideNavItemContentContext","_SideNavToggleButton","_SortableList","_Typography","_UiShellProvider","_uiShellSharedConstants","_jsxRuntime","e","__esModule","default","StyledCollapsibleContent","styled","shouldForwardProp","prop","odysseyDesignTokens","isSideNavCollapsed","position","display","gridTemplateColumns","SIDE_NAV_WIDTH","height","transition","TransitionDurationMain","transitionTimingFunction","TransitionTimingMain","overflow","opacity","StyledOpacityTransitionContainer","gridTemplateRows","StyledSideNavContainer","backgroundColor","isAppContentWhiteBackground","HueNeutralWhite","width","borderRightWidth","BorderWidthMain","borderRightStyle","BorderStyleMain","borderRightColor","HueNeutral100","HueNeutral200","content","right","top","transform","Spacing2","zIndex","UI_SHELL_OVERLAY_Z_INDEX","Spacing3","SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","StyledSideNavHeaderContainer","borderColor","hasContentScrolled","flexShrink","borderBottomWidth","borderBottomStyle","borderBottomColor","concat","StyledSideNavListContainer","padding","listStyle","listStyleType","margin","StyledSideNavScrollableContainer","overflowY","paddingInline","StyledSectionHeaderContainer","contrastFontColor","paddingBlock","Spacing1","Spacing4","marginBlock","color","HueNeutral600","StyledSideNavFooter","sideNavBackgroundColor","StyledPersistentSideNavFooter","isContentScrollable","transitionProperty","transitionDuration","transitionTiming","UI_SHELL_BASE_Z_INDEX","boxShadow","StyledSideNavFooterItemsContainer","sideNavContrastColors","flexWrap","alignItems","fontSize","TypographySizeOverline","fontColor","textDecoration","HueNeutral900","StyledLoadingItemContainer","gap","getHasScrollableContent","scrollableContainer","scrollHeight","clientHeight","LoadingItem","useOdysseyDesignTokens","jsxs","children","jsx","_Skeleton2","variant","SideNav","appName","footerComponent","footerItems","hasCustomFooter","isCollapsible","isCollapsed","isCompact","isLoading","isObtrusive","logoProps","onCollapse","onExpand","onSort","sideNavItems","setIsSideNavCollapsed","useState","setHasContentScrolled","setIsContentScrollable","sideNavItemsList","updateSideNavItemsList","uiShellContext","useUiShellContext","t","useTranslation","scrollableContentRef","useRef","resizeObserverRef","intersectionObserverRef","blankElement","useMemo","useEffect","updateIsContentScrollable","current","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","useCallback","itemId","undefined","sideNavItemContentProviderValue","depth","setSelectedItem","selectedItemId","updatedSideNavItems","map","item","childItem","publishSideNavItemClicked","processedSideNavItems","childNavItems","childProps","isDisabled","isSortable","navItem","SideNavItemContentContext","Provider","value","SideNavItemContent","scrollRef","onItemSelected","translate","sideNavExpandClickHandler","sideNavExpandKeyHandler","event","key","code","preventDefault","unsubscribe","subscribeSideNavItemClicked","setSortedItems","parentId","activeId","activeIndex","overIndex","sortedSideNavItems","arrayMove","appBackgroundColor","SideNavToggleButton","ariaControls","onClick","onKeyDown","OdysseyThemeProvider","SideNavHeader","role","ref","fill","_","index","label","isSectionHeader","startIcon","isDefaultExpanded","isExpanded","ErrorBoundary","fallback","Overline","component","StyledSideNavListItem","disabled","NavAccordion","SortableList","items","onChange","renderItem","sortableItem","Item","createElement","SideNavFooterContent","MemoizedSideNav","exports","memo","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 { SideNavToggleButton } 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\";\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 } as 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 } as CSSProperties)),\n }),\n);\n\nconst StyledSideNavContainer = styled(\"nav\", {\n shouldForwardProp: (prop) =>\n prop !== \"backgroundColor\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isAppContentWhiteBackground\" &&\n prop !== \"isSideNavCollapsed\",\n})<{\n isAppContentWhiteBackground: boolean;\n backgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n isSideNavCollapsed: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n backgroundColor,\n isAppContentWhiteBackground,\n isSideNavCollapsed,\n odysseyDesignTokens,\n }) => ({\n backgroundColor: backgroundColor || odysseyDesignTokens.HueNeutralWhite,\n height: \"100%\",\n position: \"relative\",\n width: \"fit-content\",\n\n ...(isAppContentWhiteBackground &&\n ({\n borderRightWidth: odysseyDesignTokens.BorderWidthMain,\n borderRightStyle:\n odysseyDesignTokens.BorderStyleMain as Property.BorderRightStyle,\n borderRightColor: odysseyDesignTokens.HueNeutral100,\n } as CSSProperties)),\n\n \"&::after\": {\n backgroundColor: odysseyDesignTokens.HueNeutral200,\n content: \"''\",\n height: \"100%\",\n opacity: 0,\n position: \"absolute\",\n right: 0,\n top: 0,\n transform: `translateX(0)`,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}, transform ${odysseyDesignTokens.TransitionDurationMain}`,\n width: odysseyDesignTokens.Spacing2,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n },\n\n \"&:has([data-sidenav-toggle='true']:hover), &:has([data-sidenav-toggle='true']:focus-visible)\":\n {\n ...(isSideNavCollapsed &&\n ({\n \"&::after\": {\n opacity: 1,\n transform: `translateX(100%)`,\n } as CSSProperties,\n\n \"[data-sidenav-toggle='true']\": {\n transform: `translate3d(calc(100% + ${odysseyDesignTokens.Spacing3}), 0, 0)`,\n } as CSSProperties,\n } as CSSProperties)),\n },\n\n \"[data-sidenav-toggle='true']\": {\n position: \"absolute\",\n top: SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n right: 0,\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n transform: `translate3d(100%, 0, 0)`,\n },\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 } as CSSProperties)),\n } as CSSProperties)),\n}));\n\nconst StyledSideNavListContainer = styled(\"ul\")(() => ({\n padding: 0,\n listStyle: \"none\",\n listStyleType: \"none\",\n margin: 0,\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 paddingBlock: odysseyDesignTokens.Spacing1,\n paddingInline: odysseyDesignTokens.Spacing4,\n marginBlock: `${odysseyDesignTokens.Spacing3}`,\n color: contrastFontColor || odysseyDesignTokens.HueNeutral600,\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 flexShrink: 0,\n padding: odysseyDesignTokens.Spacing4,\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } as 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 } as CSSProperties)),\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } as 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 } as CSSProperties)),\n },\n\n \"&:hover\": {\n textDecoration: \"none\",\n color: odysseyDesignTokens.HueNeutral900,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } as CSSProperties)),\n },\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } as 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 [isSideNavCollapsed, setIsSideNavCollapsed] = useState(isCollapsed);\n const [hasContentScrolled, setHasContentScrolled] = useState(false);\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const [sideNavItemsList, updateSideNavItemsList] = useState(sideNavItems);\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\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(() => setIsSideNavCollapsed(isCollapsed), [isCollapsed]);\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 uiShellContext?.publishSideNavItemClicked();\n }\n },\n [isCollapsed, isObtrusive, sideNavItemsList, uiShellContext],\n );\n\n const processedSideNavItems = useMemo(() => {\n return sideNavItemsList?.map((item) => ({\n ...item,\n childNavItems: item.nestedNavItems?.map((childProps) => {\n return {\n id: childProps.id,\n isSelected: childProps.isSelected,\n isDisabled: childProps.isDisabled,\n isSortable: childProps.isSortable,\n navItem: (\n <SideNavItemContentContext.Provider\n value={{\n ...sideNavItemContentProviderValue,\n depth: 2,\n isSortable: item.isSortable,\n }}\n key={childProps.id}\n >\n <SideNavItemContent\n {...childProps}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(childProps.id)}\n onItemSelected={setSelectedItem}\n translate={childProps.translate}\n />\n </SideNavItemContentContext.Provider>\n ),\n };\n }),\n }));\n }, [\n getRefIfThisIsFirstNodeWithIsSelected,\n sideNavItemsList,\n sideNavItemContentProviderValue,\n setSelectedItem,\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 }, [onExpand, onCollapse]);\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 if (isCollapsed) {\n const unsubscribe = uiShellContext?.subscribeSideNavItemClicked(() => {\n onCollapse?.();\n setIsSideNavCollapsed(true);\n });\n\n return () => {\n unsubscribe?.();\n };\n }\n\n return () => {};\n }, [isCollapsed, onCollapse, 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 return (\n <StyledSideNavContainer\n aria-label={t(\"navigation.label\")}\n backgroundColor={uiShellContext?.sideNavBackgroundColor}\n id=\"side-nav-expandable\"\n isAppContentWhiteBackground={\n uiShellContext?.appBackgroundColor ===\n odysseyDesignTokens.HueNeutralWhite\n }\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {isCollapsible && (\n <SideNavToggleButton\n ariaControls=\"side-nav-expandable\"\n isSideNavCollapsed={isSideNavCollapsed}\n onClick={sideNavExpandClickHandler}\n onKeyDown={sideNavExpandKeyHandler}\n />\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 id,\n label,\n isSectionHeader,\n startIcon,\n childNavItems,\n isSortable,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n } = item;\n\n if (isSectionHeader) {\n return (\n <ErrorBoundary fallback={blankElement}>\n <StyledSectionHeaderContainer\n contrastFontColor={\n uiShellContext?.sideNavContrastColors?.fontColor\n }\n id={id}\n key={id}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Overline component=\"h3\">{label}</Overline>\n </StyledSectionHeaderContainer>\n </ErrorBoundary>\n );\n } else if (childNavItems) {\n return (\n <ErrorBoundary fallback={blankElement}>\n <StyledSideNavListItem\n id={id}\n key={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 <StyledSideNavListContainer role=\"none\">\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 </NavAccordion>\n </StyledSideNavListItem>\n </ErrorBoundary>\n );\n } else {\n return (\n <ErrorBoundary fallback={blankElement}>\n <SideNavItemContentContext.Provider\n key={item.id}\n value={sideNavItemContentProviderValue}\n >\n <SideNavItemContent\n {...item}\n key={item.id}\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":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAWA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,qBAAA,GAAAP,OAAA;AAEA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,EAAC5B,mBAAmB;cAClB5D,mBAAmB,EAAEA,mBAAoB;cACzC6D,sBAAsB,EACpBmD,cAAc,EAAEnD,sBACjB;cAAA0B,QAAA,EAED,IAAA/F,WAAA,CAAAgG,GAAA,EAACnB,iCAAiC;gBAChCrE,mBAAmB,EAAEA,mBAAoB;gBACzCsE,qBAAqB,EACnB0C,cAAc,EAAE1C,qBACjB;gBAAAiB,QAAA,EAED,IAAA/F,WAAA,CAAAgG,GAAA,EAACvG,qBAAA,CAAAqP,oBAAoB;kBAACxI,WAAW,EAAEA;gBAAY,CAAE;cAAC,CACjB;YAAC,CACjB,CACtB;UAAA,CAC+B,CAAC,EAClC,CAACK,SAAS,IAAI,CAACL,WAAW,IAAIC,eAAe,IAC5C,IAAAvG,WAAA,CAAAgG,GAAA,EAAC1B,6BAA6B;YAC5BC,mBAAmB,EAAEA,mBAAoB;YACzC/D,mBAAmB,EAAEA,mBAAoB;YACzC6D,sBAAsB,EAAEmD,cAAc,EAAEnD,sBAAuB;YAAA0B,QAAA,EAE9DM;UAAe,CACa,CAChC;QAAA,CAC+B;MAAC,CACX;IAAC,CACP,CAAC;EAAA,CACD,CAAC;AAE7B,CAAC;AAED,MAAM0I,eAAe,GAAAC,OAAA,CAAA7I,OAAA,GAAG,IAAA8I,WAAI,EAAC9I,OAAO,CAAC;AACrC4I,eAAe,CAACG,WAAW,GAAG,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"SideNav.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactI18next","_sortable","_reactErrorBoundary","_NavAccordion","_OdysseyDesignTokensContext","_OdysseyThemeProvider","_SideNavHeader","_SideNavItemContent","_SideNavFooterContent","_SideNavItemContentContext","_SideNavToggleButton","_SortableList","_Typography","_UiShellProvider","_uiShellSharedConstants","_jsxRuntime","e","__esModule","default","StyledCollapsibleContent","styled","shouldForwardProp","prop","odysseyDesignTokens","isSideNavCollapsed","position","display","gridTemplateColumns","SIDE_NAV_WIDTH","height","transition","TransitionDurationMain","transitionTimingFunction","TransitionTimingMain","overflow","opacity","StyledOpacityTransitionContainer","gridTemplateRows","StyledSideNavContainer","backgroundColor","isAppContentWhiteBackground","HueNeutralWhite","width","borderRightWidth","BorderWidthMain","borderRightStyle","BorderStyleMain","borderRightColor","HueNeutral100","HueNeutral200","content","right","top","transform","Spacing2","zIndex","UI_SHELL_OVERLAY_Z_INDEX","Spacing3","SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","StyledSideNavHeaderContainer","borderColor","hasContentScrolled","flexShrink","borderBottomWidth","borderBottomStyle","borderBottomColor","concat","StyledSideNavListContainer","padding","listStyle","listStyleType","margin","StyledSideNavScrollableContainer","overflowY","paddingInline","StyledSectionHeaderContainer","contrastFontColor","paddingBlock","Spacing1","Spacing4","marginBlock","color","HueNeutral600","StyledSideNavFooter","sideNavBackgroundColor","StyledPersistentSideNavFooter","isContentScrollable","transitionProperty","transitionDuration","transitionTiming","UI_SHELL_BASE_Z_INDEX","boxShadow","StyledSideNavFooterItemsContainer","sideNavContrastColors","flexWrap","alignItems","fontSize","TypographySizeOverline","fontColor","textDecoration","HueNeutral900","StyledLoadingItemContainer","gap","getHasScrollableContent","scrollableContainer","scrollHeight","clientHeight","LoadingItem","useOdysseyDesignTokens","jsxs","children","jsx","_Skeleton2","variant","SideNav","appName","footerComponent","footerItems","hasCustomFooter","isCollapsible","isCollapsed","isCompact","isLoading","isObtrusive","logoProps","onCollapse","onExpand","onSort","sideNavItems","setIsSideNavCollapsed","useState","setHasContentScrolled","setIsContentScrollable","sideNavItemsList","updateSideNavItemsList","uiShellContext","useUiShellContext","t","useTranslation","scrollableContentRef","useRef","resizeObserverRef","intersectionObserverRef","blankElement","useMemo","useEffect","updateIsContentScrollable","current","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","useCallback","itemId","undefined","sideNavItemContentProviderValue","depth","setSelectedItem","selectedItemId","updatedSideNavItems","map","item","childItem","closeSideNavMenu","processedSideNavItems","childNavItems","childProps","isDisabled","isSortable","navItem","SideNavItemContentContext","Provider","value","SideNavItemContent","scrollRef","onItemSelected","translate","sideNavExpandClickHandler","sideNavExpandKeyHandler","event","key","code","preventDefault","unsubscribe","subscribeToCloseSideNavMenu","setSortedItems","parentId","activeId","activeIndex","overIndex","sortedSideNavItems","arrayMove","appBackgroundColor","SideNavToggleButton","ariaControls","onClick","onKeyDown","OdysseyThemeProvider","SideNavHeader","role","ref","fill","_","index","label","isSectionHeader","startIcon","isDefaultExpanded","isExpanded","ErrorBoundary","fallback","Overline","component","StyledSideNavListItem","disabled","NavAccordion","SortableList","items","onChange","renderItem","sortableItem","Item","createElement","SideNavFooterContent","MemoizedSideNav","exports","memo","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 { SideNavToggleButton } 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\";\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 } as 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 } as CSSProperties)),\n }),\n);\n\nconst StyledSideNavContainer = styled(\"nav\", {\n shouldForwardProp: (prop) =>\n prop !== \"backgroundColor\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isAppContentWhiteBackground\" &&\n prop !== \"isSideNavCollapsed\",\n})<{\n isAppContentWhiteBackground: boolean;\n backgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n isSideNavCollapsed: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(\n ({\n backgroundColor,\n isAppContentWhiteBackground,\n isSideNavCollapsed,\n odysseyDesignTokens,\n }) => ({\n backgroundColor: backgroundColor || odysseyDesignTokens.HueNeutralWhite,\n height: \"100%\",\n position: \"relative\",\n width: \"fit-content\",\n\n ...(isAppContentWhiteBackground &&\n ({\n borderRightWidth: odysseyDesignTokens.BorderWidthMain,\n borderRightStyle:\n odysseyDesignTokens.BorderStyleMain as Property.BorderRightStyle,\n borderRightColor: odysseyDesignTokens.HueNeutral100,\n } as CSSProperties)),\n\n \"&::after\": {\n backgroundColor: odysseyDesignTokens.HueNeutral200,\n content: \"''\",\n height: \"100%\",\n opacity: 0,\n position: \"absolute\",\n right: 0,\n top: 0,\n transform: `translateX(0)`,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}, transform ${odysseyDesignTokens.TransitionDurationMain}`,\n width: odysseyDesignTokens.Spacing2,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n },\n\n \"&:has([data-sidenav-toggle='true']:hover), &:has([data-sidenav-toggle='true']:focus-visible)\":\n {\n ...(isSideNavCollapsed &&\n ({\n \"&::after\": {\n opacity: 1,\n transform: `translateX(100%)`,\n } as CSSProperties,\n\n \"[data-sidenav-toggle='true']\": {\n transform: `translate3d(calc(100% + ${odysseyDesignTokens.Spacing3}), 0, 0)`,\n } as CSSProperties,\n } as CSSProperties)),\n },\n\n \"[data-sidenav-toggle='true']\": {\n position: \"absolute\",\n top: SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION,\n right: 0,\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n transform: `translate3d(100%, 0, 0)`,\n },\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 } as CSSProperties)),\n } as CSSProperties)),\n}));\n\nconst StyledSideNavListContainer = styled(\"ul\")(() => ({\n padding: 0,\n listStyle: \"none\",\n listStyleType: \"none\",\n margin: 0,\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 paddingBlock: odysseyDesignTokens.Spacing1,\n paddingInline: odysseyDesignTokens.Spacing4,\n marginBlock: `${odysseyDesignTokens.Spacing3}`,\n color: contrastFontColor || odysseyDesignTokens.HueNeutral600,\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 flexShrink: 0,\n padding: odysseyDesignTokens.Spacing4,\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } as 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 } as CSSProperties)),\n\n ...(sideNavBackgroundColor &&\n ({\n backgroundColor: sideNavBackgroundColor,\n } as 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 } as CSSProperties)),\n },\n\n \"&:hover\": {\n textDecoration: \"none\",\n color: odysseyDesignTokens.HueNeutral900,\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } as CSSProperties)),\n },\n\n ...(sideNavContrastColors?.fontColor &&\n ({\n color: sideNavContrastColors?.fontColor,\n } as 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 [isSideNavCollapsed, setIsSideNavCollapsed] = useState(isCollapsed);\n const [hasContentScrolled, setHasContentScrolled] = useState(false);\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const [sideNavItemsList, updateSideNavItemsList] = useState(sideNavItems);\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\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(() => setIsSideNavCollapsed(isCollapsed), [isCollapsed]);\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 uiShellContext?.closeSideNavMenu();\n }\n },\n [isCollapsed, isObtrusive, sideNavItemsList, uiShellContext],\n );\n\n const processedSideNavItems = useMemo(() => {\n return sideNavItemsList?.map((item) => ({\n ...item,\n childNavItems: item.nestedNavItems?.map((childProps) => {\n return {\n id: childProps.id,\n isSelected: childProps.isSelected,\n isDisabled: childProps.isDisabled,\n isSortable: childProps.isSortable,\n navItem: (\n <SideNavItemContentContext.Provider\n value={{\n ...sideNavItemContentProviderValue,\n depth: 2,\n isSortable: item.isSortable,\n }}\n key={childProps.id}\n >\n <SideNavItemContent\n {...childProps}\n scrollRef={getRefIfThisIsFirstNodeWithIsSelected(childProps.id)}\n onItemSelected={setSelectedItem}\n translate={childProps.translate}\n />\n </SideNavItemContentContext.Provider>\n ),\n };\n }),\n }));\n }, [\n getRefIfThisIsFirstNodeWithIsSelected,\n sideNavItemsList,\n sideNavItemContentProviderValue,\n setSelectedItem,\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 }, [onExpand, onCollapse]);\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 if (isCollapsed) {\n const unsubscribe = uiShellContext?.subscribeToCloseSideNavMenu(() => {\n onCollapse?.();\n setIsSideNavCollapsed(true);\n });\n\n return () => {\n unsubscribe?.();\n };\n }\n\n return () => {};\n }, [isCollapsed, onCollapse, 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 return (\n <StyledSideNavContainer\n aria-label={t(\"navigation.label\")}\n backgroundColor={uiShellContext?.sideNavBackgroundColor}\n id=\"side-nav-expandable\"\n isAppContentWhiteBackground={\n uiShellContext?.appBackgroundColor ===\n odysseyDesignTokens.HueNeutralWhite\n }\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {isCollapsible && (\n <SideNavToggleButton\n ariaControls=\"side-nav-expandable\"\n isSideNavCollapsed={isSideNavCollapsed}\n onClick={sideNavExpandClickHandler}\n onKeyDown={sideNavExpandKeyHandler}\n />\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 id,\n label,\n isSectionHeader,\n startIcon,\n childNavItems,\n isSortable,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n } = item;\n\n if (isSectionHeader) {\n return (\n <ErrorBoundary fallback={blankElement}>\n <StyledSectionHeaderContainer\n contrastFontColor={\n uiShellContext?.sideNavContrastColors?.fontColor\n }\n id={id}\n key={id}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Overline component=\"h3\">{label}</Overline>\n </StyledSectionHeaderContainer>\n </ErrorBoundary>\n );\n } else if (childNavItems) {\n return (\n <ErrorBoundary fallback={blankElement}>\n <StyledSideNavListItem\n id={id}\n key={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 <StyledSideNavListContainer role=\"none\">\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 </NavAccordion>\n </StyledSideNavListItem>\n </ErrorBoundary>\n );\n } else {\n return (\n <ErrorBoundary fallback={blankElement}>\n <SideNavItemContentContext.Provider\n key={item.id}\n value={sideNavItemContentProviderValue}\n >\n <SideNavItemContent\n {...item}\n key={item.id}\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":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAWA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,qBAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AAIA,IAAAU,qBAAA,GAAAV,OAAA;AACA,IAAAW,0BAAA,GAAAX,OAAA;AACA,IAAAY,oBAAA,GAAAZ,OAAA;AACA,IAAAa,aAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,gBAAA,GAAAf,OAAA;AAIA,IAAAgB,uBAAA,GAAAhB,OAAA;AAKsC,IAAAiB,WAAA,GAAAjB,OAAA;AAAA,SAAAD,uBAAAmB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAzDtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAi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B,6BAA6B;YAC5BC,mBAAmB,EAAEA,mBAAoB;YACzC/D,mBAAmB,EAAEA,mBAAoB;YACzC6D,sBAAsB,EAAEmD,cAAc,EAAEnD,sBAAuB;YAAA0B,QAAA,EAE9DM;UAAe,CACa,CAChC;QAAA,CAC+B;MAAC,CACX;IAAC,CACP,CAAC;EAAA,CACD,CAAC;AAE7B,CAAC;AAED,MAAM0I,eAAe,GAAAC,OAAA,CAAA7I,OAAA,GAAG,IAAA8I,WAAI,EAAC9I,OAAO,CAAC;AACrC4I,eAAe,CAACG,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -26,22 +26,22 @@ const StyledLogoContainer = (0, _styled.default)("div", {
26
26
  })(({
27
27
  isLogoInteractive
28
28
  }) => ({
29
- display: "flex",
30
29
  alignItems: "center",
30
+ display: "flex",
31
31
  height: "100%",
32
32
  ...(isLogoInteractive && {
33
33
  cursor: "pointer"
34
34
  })
35
35
  }));
36
36
  const StyledLogoLink = (0, _styled.default)("a")(() => ({
37
- display: "flex",
38
37
  alignItems: "center",
38
+ display: "flex",
39
39
  height: "100%"
40
40
  }));
41
41
  const SideNavLogo = ({
42
42
  imageAltText,
43
- logoComponent,
44
43
  imageUrl,
44
+ logoComponent,
45
45
  ...optionalProps
46
46
  }) => {
47
47
  const logo = (0, _react.useMemo)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavLogo.cjs","names":["_react","require","_styled","_interopRequireDefault","_OktaLogo","_jsxRuntime","e","__esModule","default","StyledLogoContainer","styled","shouldForwardProp","prop","isLogoInteractive","display","alignItems","height","cursor","StyledLogoLink","SideNavLogo","imageAltText","logoComponent","imageUrl","optionalProps","logo","useMemo","jsx","src","alt","OktaLogo","ariaLabel","href","onClick","children","Boolean","role","MemoizedSideNavLogo","exports","memo","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavLogo.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport { OktaLogo } from \"./OktaLogo.js\";\nimport { SideNavLogoProps } from \"./types.js\";\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isLogoInteractive\",\n})<{\n isLogoInteractive?: boolean;\n}>(({ isLogoInteractive }) => ({\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n ...(isLogoInteractive && {\n cursor: \"pointer\",\n }),\n}));\n\nconst StyledLogoLink = styled(\"a\")(() => ({\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n}));\n\nconst SideNavLogo = ({\n imageAltText,\n logoComponent,\n imageUrl,\n ...optionalProps\n}: SideNavLogoProps) => {\n const logo = useMemo(() => {\n if (logoComponent) {\n return logoComponent;\n }\n\n if (imageAltText && imageUrl) {\n return <img src={imageUrl} alt={imageAltText} />;\n }\n\n return <OktaLogo />;\n }, [imageAltText, logoComponent, imageUrl]);\n\n return \"href\" in optionalProps && \"ariaLabel\" in optionalProps ? (\n <StyledLogoLink\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n href={optionalProps.href}\n onClick={optionalProps.onClick}\n >\n {logo}\n </StyledLogoLink>\n ) : (\n <StyledLogoContainer\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n isLogoInteractive={Boolean(optionalProps.onClick) || optionalProps.href}\n onClick={optionalProps.onClick}\n role=\"presentation\"\n >\n {logo}\n </StyledLogoContainer>\n );\n};\n\nconst MemoizedSideNavLogo = memo(SideNavLogo);\nMemoizedSideNavLogo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WAAA,CAAAqB,GAAA,EAACtB,SAAA,CAAAyB,QAAQ,IAAE,CAAC;EACrB,CAAC,EAAE,CAACT,YAAY,EAAEC,aAAa,EAAEC,QAAQ,CAAC,CAAC;EAE3C,OAAO,MAAM,IAAIC,aAAa,IAAI,WAAW,IAAIA,aAAa,GAC5D,IAAAlB,WAAA,CAAAqB,GAAA,EAACR,cAAc;IACb,cAAYK,aAAa,CAACO,SAAU;IACpC,WAAQ,qBAAqB;IAC7BC,IAAI,EAAER,aAAa,CAACQ,IAAK;IACzBC,OAAO,EAAET,aAAa,CAACS,OAAQ;IAAAC,QAAA,EAE9BT;EAAI,CACS,CAAC,GAEjB,IAAAnB,WAAA,CAAAqB,GAAA,EAACjB,mBAAmB;IAClB,cAAYc,aAAa,CAACO,SAAU;IACpC,WAAQ,qBAAqB;IAC7BjB,iBAAiB,EAAEqB,OAAO,CAACX,aAAa,CAACS,OAAO,CAAC,IAAIT,aAAa,CAACQ,IAAK;IACxEC,OAAO,EAAET,aAAa,CAACS,OAAQ;IAC/BG,IAAI,EAAC,cAAc;IAAAF,QAAA,EAElBT;EAAI,CACc,CACtB;AACH,CAAC;AAED,MAAMY,mBAAmB,GAAAC,OAAA,CAAAlB,WAAA,GAAG,IAAAmB,WAAI,EAACnB,WAAW,CAAC;AAC7CiB,mBAAmB,CAACG,WAAW,GAAG,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"SideNavLogo.cjs","names":["_react","require","_styled","_interopRequireDefault","_OktaLogo","_jsxRuntime","e","__esModule","default","StyledLogoContainer","styled","shouldForwardProp","prop","isLogoInteractive","alignItems","display","height","cursor","StyledLogoLink","SideNavLogo","imageAltText","imageUrl","logoComponent","optionalProps","logo","useMemo","jsx","src","alt","OktaLogo","ariaLabel","href","onClick","children","Boolean","role","MemoizedSideNavLogo","exports","memo","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavLogo.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport { OktaLogo } from \"./OktaLogo.js\";\nimport { SideNavLogoProps } from \"./types.js\";\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isLogoInteractive\",\n})<{\n isLogoInteractive?: boolean;\n}>(({ isLogoInteractive }) => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n\n ...(isLogoInteractive && {\n cursor: \"pointer\",\n }),\n}));\n\nconst StyledLogoLink = styled(\"a\")(() => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n}));\n\nconst SideNavLogo = ({\n imageAltText,\n imageUrl,\n logoComponent,\n ...optionalProps\n}: SideNavLogoProps) => {\n const logo = useMemo(() => {\n if (logoComponent) {\n return logoComponent;\n }\n\n if (imageAltText && imageUrl) {\n return <img src={imageUrl} alt={imageAltText} />;\n }\n\n return <OktaLogo />;\n }, [imageAltText, logoComponent, imageUrl]);\n\n return \"href\" in optionalProps && \"ariaLabel\" in optionalProps ? (\n <StyledLogoLink\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n href={optionalProps.href}\n onClick={optionalProps.onClick}\n >\n {logo}\n </StyledLogoLink>\n ) : (\n <StyledLogoContainer\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n isLogoInteractive={Boolean(optionalProps.onClick) || optionalProps.href}\n onClick={optionalProps.onClick}\n role=\"presentation\"\n >\n {logo}\n </StyledLogoContainer>\n );\n};\n\nconst MemoizedSideNavLogo = memo(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C;IAClD;IAEA,OAAO,IAAAf,WAAA,CAAAqB,GAAA,EAACtB,SAAA,CAAAyB,QAAQ,IAAE,CAAC;EACrB,CAAC,EAAE,CAACT,YAAY,EAAEE,aAAa,EAAED,QAAQ,CAAC,CAAC;EAE3C,OAAO,MAAM,IAAIE,aAAa,IAAI,WAAW,IAAIA,aAAa,GAC5D,IAAAlB,WAAA,CAAAqB,GAAA,EAACR,cAAc;IACb,cAAYK,aAAa,CAACO,SAAU;IACpC,WAAQ,qBAAqB;IAC7BC,IAAI,EAAER,aAAa,CAACQ,IAAK;IACzBC,OAAO,EAAET,aAAa,CAACS,OAAQ;IAAAC,QAAA,EAE9BT;EAAI,CACS,CAAC,GAEjB,IAAAnB,WAAA,CAAAqB,GAAA,EAACjB,mBAAmB;IAClB,cAAYc,aAAa,CAACO,SAAU;IACpC,WAAQ,qBAAqB;IAC7BjB,iBAAiB,EAAEqB,OAAO,CAACX,aAAa,CAACS,OAAO,CAAC,IAAIT,aAAa,CAACQ,IAAK;IACxEC,OAAO,EAAET,aAAa,CAACS,OAAQ;IAC/BG,IAAI,EAAC,cAAc;IAAAF,QAAA,EAElBT;EAAI,CACc,CACtB;AACH,CAAC;AAED,MAAMY,mBAAmB,GAAAC,OAAA,CAAAlB,WAAA,GAAG,IAAAmB,WAAI,EAACnB,WAAW,CAAC;AAC7CiB,mBAAmB,CAACG,WAAW,GAAG,aAAa","ignoreList":[]}
@@ -37,12 +37,15 @@ const UiShell = ({
37
37
  appBackgroundContrastMode,
38
38
  appElement,
39
39
  appElementScrollingMode,
40
+ closeSideNavMenu,
40
41
  hasStandardAppContentPadding,
41
42
  initialVisibleSections,
42
43
  onError = console.error,
43
44
  onSubscriptionCreated,
44
45
  optionalComponents,
45
46
  sideNavBackgroundColor,
47
+ subscribeToCloseRightSideMenu,
48
+ subscribeToCloseSideNavMenu,
46
49
  subscribeToPropChanges,
47
50
  topNavBackgroundColor,
48
51
  uiShellAppElement,
@@ -71,7 +74,10 @@ const UiShell = ({
71
74
  children: [(0, _jsxRuntime.jsx)(_CssBaseline.CssBaseline, {}), (0, _jsxRuntime.jsxs)(_UiShellProvider.UiShellProvider, {
72
75
  appBackgroundColor: appBackgroundColor,
73
76
  appBackgroundContrastMode: appBackgroundContrastMode,
77
+ closeSideNavMenu: closeSideNavMenu,
74
78
  sideNavBackgroundColor: sideNavBackgroundColor,
79
+ subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu,
80
+ subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu,
75
81
  topNavBackgroundColor: topNavBackgroundColor,
76
82
  children: [activeBreakpoint === "constrained" && (0, _jsxRuntime.jsx)(_NarrowUiShellContent.NarrowUiShellContent, {
77
83
  ...componentProps,
@@ -1 +1 @@
1
- {"version":3,"file":"UiShell.cjs","names":["_react","require","_reactErrorBoundary","_CssBaseline","_NarrowUiShellContent","_OdysseyProvider","_UiShellProvider","_useUiShellBreakpoints","_WideUiShellContent","_jsxRuntime","defaultComponentProps","exports","sideNavProps","undefined","topNavProps","errorComponent","jsx","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","useState","activeBreakpoint","useUiShellBreakpoints","useEffect","unsubscribe","ErrorBoundary","fallback","children","OdysseyProvider","emotionRootElement","shadowRootElement","jsxs","CssBaseline","UiShellProvider","NarrowUiShellContent","WideUiShellContent","isCollapsed","isCollapsible","MemoizedUiShell","memo","displayName"],"sources":["../../../src/ui-shell/UiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, 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 } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport { useUiShellBreakpoints } from \"./useUiShellBreakpoints.js\";\nimport { ContrastMode } from \"../useContrastMode.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: undefined,\n topNavProps: undefined,\n} as const;\n\nconst errorComponent = <div data-error />;\n\nexport type UiShellProps = {\n /**\n * Sets a custom background color for the app content area.\n */\n appBackgroundColor?: string;\n /**\n * Sets either a gray or white background color for the app content area.\n */\n appBackgroundContrastMode?: ContrastMode;\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: (\n subscriber: (\n componentProps: SetStateAction<UiShellNavComponentProps>,\n ) => void,\n ) => () => void;\n /**\n * Sets a custom background color for the side nav area.\n */\n sideNavBackgroundColor?: string;\n /**\n * Sets a custom background color for the top nav area.\n */\n topNavBackgroundColor?: string;\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} & 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 hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n sideNavBackgroundColor,\n subscribeToPropChanges,\n topNavBackgroundColor,\n uiShellAppElement,\n uiShellStylesElement,\n}: UiShellProps) => {\n const [componentProps, setComponentProps] = useState(defaultComponentProps);\n\n const activeBreakpoint = useUiShellBreakpoints();\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 sideNavBackgroundColor={sideNavBackgroundColor}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n {activeBreakpoint === \"constrained\" && (\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 === \"compact\" ||\n activeBreakpoint === \"comfortable\") && (\n <WideUiShellContent\n {...{\n ...componentProps,\n ...(componentProps.sideNavProps\n ? {\n sideNavProps: {\n ...componentProps.sideNavProps,\n isCollapsed:\n activeBreakpoint === \"compact\" ||\n componentProps.sideNavProps?.isCollapsed,\n isCollapsible:\n activeBreakpoint === \"compact\" ||\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 = \"UiShell\";\n\nexport { MemoizedUiShell as UiShell };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAGA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAKA,IAAAM,sBAAA,GAAAN,OAAA;AAEA,IAAAO,mBAAA,GAAAP,OAAA;AAA6D,IAAAQ,WAAA,GAAAR,OAAA;AA1B7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBO,MAAMS,qBAA+C,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EAC7DE,YAAY,EAAEC,SAAS;E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AkB,EAAEA;UAAmB,CACxC,CACF;QAAA,CACc,CAAC;MAAA,CACL;IAAC,CACD;EAAC,CACL,CAChB;AACH,CAAC;AAED,MAAM0B,eAAe,GAAA3C,OAAA,CAAAM,OAAA,GAAG,IAAAsC,WAAI,EAACtC,OAAO,CAAC;AACrCqC,eAAe,CAACE,WAAW,GAAG,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"UiShell.cjs","names":["_react","require","_reactErrorBoundary","_CssBaseline","_NarrowUiShellContent","_OdysseyProvider","_UiShellProvider","_useUiShellBreakpoints","_WideUiShellContent","_jsxRuntime","defaultComponentProps","exports","sideNavProps","undefined","topNavProps","errorComponent","jsx","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","useState","activeBreakpoint","useUiShellBreakpoints","useEffect","unsubscribe","ErrorBoundary","fallback","children","OdysseyProvider","emotionRootElement","shadowRootElement","jsxs","CssBaseline","UiShellProvider","NarrowUiShellContent","WideUiShellContent","isCollapsed","isCollapsible","MemoizedUiShell","memo","displayName"],"sources":["../../../src/ui-shell/UiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, 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 { useUiShellBreakpoints } 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 * 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 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();\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 === \"constrained\" && (\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 === \"compact\" ||\n activeBreakpoint === \"comfortable\") && (\n <WideUiShellContent\n {...{\n ...componentProps,\n ...(componentProps.sideNavProps\n ? {\n sideNavProps: {\n ...componentProps.sideNavProps,\n isCollapsed:\n activeBreakpoint === \"compact\" ||\n componentProps.sideNavProps?.isCollapsed,\n isCollapsible:\n activeBreakpoint === \"compact\" ||\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 = \"UiShell\";\n\nexport { MemoizedUiShell as UiShell };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAGA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAKA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAA6D,IAAAQ,WAAA,GAAAR,OAAA;AAzB7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBO,MAAMS,qBAA+C,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EAC7DE,YAAY,EAAEC,SAAS;EACvBC,WAAW,EAAED;AACf,CAAU;AAEV,MAAME,cAAc,GAAG,IAAAN,WAAA,CAAAO,GAAA;EAAK;AAAU,CAAE,CAAC;AA4CzC,MAAMC,OAAO,GAAGA,CAAC;EACfC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU;EACVC,uBAAuB;EACvBC,gB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,CACD;EAAC,CACL,CAChB;AACH,CAAC;AAED,MAAM4B,eAAe,GAAA9C,OAAA,CAAAM,OAAA,GAAG,IAAAyC,WAAI,EAACzC,OAAO,CAAC;AACrCwC,eAAe,CAACE,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useUiShellContext = exports.UiShellProvider = void 0;
6
+ exports.useUiShellContext = exports.defaultSubscribeToCloseRightSideMenu = exports.defaultCloseSideNavMessageBus = exports.UiShellProvider = void 0;
7
7
  var _react = require("react");
8
8
  var _createContrastColors = require("../createContrastColors.cjs");
9
9
  var _OdysseyDesignTokensContext = require("../OdysseyDesignTokensContext.cjs");
@@ -21,6 +21,9 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
  * See the License for the specific language governing permissions and limitations under the License.
22
22
  */
23
23
 
24
+ const defaultCloseSideNavMessageBus = exports.defaultCloseSideNavMessageBus = (0, _createMessageBus.createMessageBus)();
25
+ const defaultSubscribeToCloseRightSideMenu = () => () => {};
26
+ exports.defaultSubscribeToCloseRightSideMenu = defaultSubscribeToCloseRightSideMenu;
24
27
  const UiShellContext = (0, _react.createContext)(undefined);
25
28
  const useUiShellContext = () => {
26
29
  return (0, _react.useContext)(UiShellContext);
@@ -30,7 +33,10 @@ const UiShellProvider = ({
30
33
  appBackgroundColor,
31
34
  appBackgroundContrastMode = "lowContrast",
32
35
  children,
36
+ closeSideNavMenu,
33
37
  sideNavBackgroundColor,
38
+ subscribeToCloseRightSideMenu,
39
+ subscribeToCloseSideNavMenu,
34
40
  topNavBackgroundColor
35
41
  }) => {
36
42
  const odysseyDesignTokens = (0, _OdysseyDesignTokensContext.useOdysseyDesignTokens)();
@@ -40,18 +46,15 @@ const UiShellProvider = ({
40
46
  const defaultTopAndAppBackgroundColor = isAppBackgroundHightContrast ? odysseyDesignTokens.HueNeutralWhite : odysseyDesignTokens.HueNeutral50;
41
47
  const topNavColor = topNavBackgroundColor || defaultTopAndAppBackgroundColor;
42
48
  const appContentBackgroundColor = appBackgroundColor || defaultTopAndAppBackgroundColor;
43
- const {
44
- publish: publishSideNavItemClicked,
45
- subscribe: subscribeSideNavItemClicked
46
- } = (0, _react.useMemo)(() => (0, _createMessageBus.createMessageBus)(), []);
47
49
  const memoizedContextValue = (0, _react.useMemo)(() => ({
48
50
  appBackgroundColor: appContentBackgroundColor,
49
- publishSideNavItemClicked,
51
+ closeSideNavMenu: closeSideNavMenu ?? defaultCloseSideNavMessageBus.publish,
50
52
  sideNavBackgroundColor: sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,
51
53
  sideNavContrastColors,
52
- subscribeSideNavItemClicked,
54
+ subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu ?? defaultCloseSideNavMessageBus.subscribe,
55
+ subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu ?? defaultSubscribeToCloseRightSideMenu,
53
56
  topNavBackgroundColor: topNavColor
54
- }), [appContentBackgroundColor, odysseyDesignTokens, publishSideNavItemClicked, sideNavBackgroundColor, sideNavContrastColors, subscribeSideNavItemClicked, topNavColor]);
57
+ }), [appContentBackgroundColor, odysseyDesignTokens.HueNeutralWhite, closeSideNavMenu, sideNavBackgroundColor, sideNavContrastColors, subscribeToCloseRightSideMenu, subscribeToCloseSideNavMenu, topNavColor]);
55
58
  return (0, _jsxRuntime.jsx)(UiShellContext.Provider, {
56
59
  value: memoizedContextValue,
57
60
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"UiShellProvider.cjs","names":["_react","require","_createContrastColors","_OdysseyDesignTokensContext","_createMessageBus","_jsxRuntime","UiShellContext","createContext","undefined","useUiShellContext","useContext","exports","UiShellProvider","appBackgroundColor","appBackgroundContrastMode","children","sideNavBackgroundColor","topNavBackgroundColor","odysseyDesignTokens","useOdysseyDesignTokens","defaultedSideNavBackgroundColor","HueNeutralWhite","sideNavContrastColors","generateContrastColors","isAppBackgroundHightContrast","defaultTopAndAppBackgroundColor","HueNeutral50","topNavColor","appContentBackgroundColor","publish","publishSideNavItemClicked","subscribe","subscribeSideNavItemClicked","useMemo","createMessageBus","memoizedContextValue","jsx","Provider","value","MemoizedUiShellProvider","memo"],"sources":["../../../src/ui-shell/UiShellProvider.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 {\n createContext,\n memo,\n PropsWithChildren,\n useContext,\n useMemo,\n} from \"react\";\nimport {\n ContrastColors,\n generateContrastColors,\n} from \"../createContrastColors.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { createMessageBus, MessageBus } from \"./createMessageBus.js\";\n\nexport type UiShellColors = {\n appBackgroundColor: string;\n sideNavBackgroundColor: string;\n sideNavContrastColors?: ContrastColors | undefined;\n topNavBackgroundColor: string;\n};\n\nexport type UiShellContext = {\n publishSideNavItemClicked: MessageBus<void>[\"publish\"];\n subscribeSideNavItemClicked: MessageBus<void>[\"subscribe\"];\n} & UiShellColors;\n\nconst UiShellContext = createContext<UiShellContext | undefined>(undefined);\n\nexport const useUiShellContext = () => {\n return useContext(UiShellContext);\n};\n\nexport type UiShellProviderProps = {\n appBackgroundContrastMode?: string;\n} & Partial<\n Pick<\n UiShellColors,\n \"appBackgroundColor\" | \"sideNavBackgroundColor\" | \"topNavBackgroundColor\"\n >\n>;\n\nconst UiShellProvider = ({\n appBackgroundColor,\n appBackgroundContrastMode = \"lowContrast\",\n children,\n sideNavBackgroundColor,\n topNavBackgroundColor,\n}: PropsWithChildren<UiShellProviderProps>) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const defaultedSideNavBackgroundColor =\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite;\n\n const sideNavContrastColors =\n defaultedSideNavBackgroundColor !== odysseyDesignTokens.HueNeutralWhite\n ? generateContrastColors(\n defaultedSideNavBackgroundColor,\n odysseyDesignTokens,\n )\n : undefined;\n\n const isAppBackgroundHightContrast =\n appBackgroundContrastMode === \"highContrast\";\n\n const defaultTopAndAppBackgroundColor = isAppBackgroundHightContrast\n ? odysseyDesignTokens.HueNeutralWhite\n : odysseyDesignTokens.HueNeutral50;\n\n const topNavColor = topNavBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const appContentBackgroundColor =\n appBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const {\n publish: publishSideNavItemClicked,\n subscribe: subscribeSideNavItemClicked,\n } = useMemo(() => createMessageBus(), []);\n\n const memoizedContextValue = useMemo(\n () => ({\n appBackgroundColor: appContentBackgroundColor,\n publishSideNavItemClicked,\n sideNavBackgroundColor:\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,\n sideNavContrastColors,\n subscribeSideNavItemClicked,\n topNavBackgroundColor: topNavColor,\n }),\n [\n appContentBackgroundColor,\n odysseyDesignTokens,\n publishSideNavItemClicked,\n sideNavBackgroundColor,\n sideNavContrastColors,\n subscribeSideNavItemClicked,\n topNavColor,\n ],\n );\n\n return (\n <UiShellContext.Provider value={memoizedContextValue}>\n {children}\n </UiShellContext.Provider>\n );\n};\n\nconst MemoizedUiShellProvider = memo(UiShellProvider);\n\nexport { MemoizedUiShellProvider as UiShellProvider };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,qBAAA,GAAAD,OAAA;AAIA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAAqE,IAAAI,WAAA,GAAAJ,OAAA;AAxBrE;AACA;AACA;AACA;AACA;AACA;AACA;A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;EACzB,CAAC,CAAC,EACF,CACEC,yBAAyB,EACzBV,mBAAmB,EACnBY,yBAAyB,EACzBd,sBAAsB,EACtBM,qBAAqB,EACrBU,2BAA2B,EAC3BL,WAAW,CAEf,CAAC;EAED,OACE,IAAAtB,WAAA,CAAA+B,GAAA,EAAC9B,cAAc,CAAC+B,QAAQ;IAACC,KAAK,EAAEH,oBAAqB;IAAApB,QAAA,EAClDA;EAAQ,CACc,CAAC;AAE9B,CAAC;AAED,MAAMwB,uBAAuB,GAAA5B,OAAA,CAAAC,eAAA,GAAG,IAAA4B,WAAI,EAAC5B,eAAe,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"UiShellProvider.cjs","names":["_react","require","_createContrastColors","_OdysseyDesignTokensContext","_createMessageBus","_jsxRuntime","defaultCloseSideNavMessageBus","exports","createMessageBus","defaultSubscribeToCloseRightSideMenu","UiShellContext","createContext","undefined","useUiShellContext","useContext","UiShellProvider","appBackgroundColor","appBackgroundContrastMode","children","closeSideNavMenu","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","topNavBackgroundColor","odysseyDesignTokens","useOdysseyDesignTokens","defaultedSideNavBackgroundColor","HueNeutralWhite","sideNavContrastColors","generateContrastColors","isAppBackgroundHightContrast","defaultTopAndAppBackgroundColor","HueNeutral50","topNavColor","appContentBackgroundColor","memoizedContextValue","useMemo","publish","subscribe","jsx","Provider","value","MemoizedUiShellProvider","memo"],"sources":["../../../src/ui-shell/UiShellProvider.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 {\n createContext,\n memo,\n PropsWithChildren,\n useContext,\n useMemo,\n} from \"react\";\nimport {\n ContrastColors,\n generateContrastColors,\n} from \"../createContrastColors.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { createMessageBus, MessageBus } from \"./createMessageBus.js\";\nimport { ContrastMode } from \"../useContrastMode.js\";\n\nexport const defaultCloseSideNavMessageBus = createMessageBus();\nexport const defaultSubscribeToCloseRightSideMenu = () => () => {};\n\nexport type UiShellColors = {\n /**\n * Sets a custom background color for the app content area.\n */\n appBackgroundColor: string;\n /**\n * Sets a custom background color for the side nav area.\n */\n sideNavBackgroundColor: string;\n sideNavContrastColors?: ContrastColors;\n /**\n * Sets a custom background color for the top nav area.\n */\n topNavBackgroundColor: string;\n};\n\nexport type UiShellContext = {\n /**\n * This is a callback that publishes a change to all subscribers listening for when to close the side nav.\n */\n closeSideNavMenu: MessageBus<void>[\"publish\"];\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 a publisher that asks us to close the side nav.\n */\n subscribeToCloseSideNavMenu: MessageBus<void>[\"subscribe\"];\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 a publisher that asks us to close the right-side menu.\n */\n subscribeToCloseRightSideMenu: MessageBus<void>[\"subscribe\"];\n} & UiShellColors;\n\nconst UiShellContext = createContext<UiShellContext | undefined>(undefined);\n\nexport const useUiShellContext = () => {\n return useContext(UiShellContext);\n};\n\nexport type UiShellProviderProps = {\n /**\n * Sets either a gray or white background color for the app content area.\n */\n appBackgroundContrastMode?: ContrastMode;\n} & Partial<UiShellContext>;\n\nconst UiShellProvider = ({\n appBackgroundColor,\n appBackgroundContrastMode = \"lowContrast\",\n children,\n closeSideNavMenu,\n sideNavBackgroundColor,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n topNavBackgroundColor,\n}: PropsWithChildren<UiShellProviderProps>) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const defaultedSideNavBackgroundColor =\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite;\n\n const sideNavContrastColors =\n defaultedSideNavBackgroundColor !== odysseyDesignTokens.HueNeutralWhite\n ? generateContrastColors(\n defaultedSideNavBackgroundColor,\n odysseyDesignTokens,\n )\n : undefined;\n\n const isAppBackgroundHightContrast =\n appBackgroundContrastMode === \"highContrast\";\n\n const defaultTopAndAppBackgroundColor = isAppBackgroundHightContrast\n ? odysseyDesignTokens.HueNeutralWhite\n : odysseyDesignTokens.HueNeutral50;\n\n const topNavColor = topNavBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const appContentBackgroundColor =\n appBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const memoizedContextValue = useMemo(\n () => ({\n appBackgroundColor: appContentBackgroundColor,\n closeSideNavMenu:\n closeSideNavMenu ?? defaultCloseSideNavMessageBus.publish,\n sideNavBackgroundColor:\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,\n sideNavContrastColors,\n subscribeToCloseSideNavMenu:\n subscribeToCloseSideNavMenu ?? defaultCloseSideNavMessageBus.subscribe,\n subscribeToCloseRightSideMenu:\n subscribeToCloseRightSideMenu ?? defaultSubscribeToCloseRightSideMenu,\n topNavBackgroundColor: topNavColor,\n }),\n [\n appContentBackgroundColor,\n odysseyDesignTokens.HueNeutralWhite,\n closeSideNavMenu,\n sideNavBackgroundColor,\n sideNavContrastColors,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n topNavColor,\n ],\n );\n\n return (\n <UiShellContext.Provider value={memoizedContextValue}>\n {children}\n </UiShellContext.Provider>\n );\n};\n\nconst MemoizedUiShellProvider = memo(UiShellProvider);\n\nexport { MemoizedUiShellProvider as UiShellProvider };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,qBAAA,GAAAD,OAAA;AAIA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,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EAClC,OAAO;IACLpB,kBAAkB,EAAEkB,yBAAyB;IAC7Cf,gBAAgB,EACdA,gBAAgB,IAAIb,6BAA6B,CAAC+B,OAAO;IAC3DjB,sBAAsB,EACpBA,sBAAsB,IAAII,mBAAmB,CAACG,eAAe;IAC/DC,qBAAqB;IACrBN,2BAA2B,EACzBA,2BAA2B,IAAIhB,6BAA6B,CAACgC,SAAS;IACxEjB,6BAA6B,EAC3BA,6BAA6B,IAAIZ,oCAAoC;IACvEc,qBAAqB,EAAEU;EACzB,CAAC,CAAC,EACF,CACEC,yBAAyB,EACzBV,mBAAmB,CAACG,eAAe,EACnCR,gBAAgB,EAChBC,sBAAsB,EACtBQ,qBAAqB,EACrBP,6BAA6B,EAC7BC,2BAA2B,EAC3BW,WAAW,CAEf,CAAC;EAED,OACE,IAAA5B,WAAA,CAAAkC,GAAA,EAAC7B,cAAc,CAAC8B,QAAQ;IAACC,KAAK,EAAEN,oBAAqB;IAAAjB,QAAA,EAClDA;EAAQ,CACc,CAAC;AAE9B,CAAC;AAED,MAAMwB,uBAAuB,GAAAnC,OAAA,CAAAQ,eAAA,GAAG,IAAA4B,WAAI,EAAC5B,eAAe,CAAC","ignoreList":[]}
@@ -14,6 +14,7 @@ var _index3 = require("./TopNav/index.cjs");
14
14
  var _useScrollState = require("./useScrollState.cjs");
15
15
  var _useMatchAppElementToUiShellAppArea = require("./useMatchAppElementToUiShellAppArea.cjs");
16
16
  var _UiShellProvider = require("./UiShellProvider.cjs");
17
+ var _uiShellSharedConstants = require("./uiShellSharedConstants.cjs");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
20
  /*!
@@ -28,7 +29,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
28
29
  * See the License for the specific language governing permissions and limitations under the License.
29
30
  */
30
31
 
31
- const emptySideNavItems = [];
32
32
  const StyledAppContainer = (0, _styled.default)("div", {
33
33
  shouldForwardProp: prop => prop !== "appBackgroundColor" && prop !== "odysseyDesignTokens"
34
34
  })(({
@@ -123,7 +123,7 @@ const WideUiShellContent = ({
123
123
  onError: onError,
124
124
  children: (0, _jsxRuntime.jsx)(_index2.SideNav, {
125
125
  isLoading: true,
126
- sideNavItems: emptySideNavItems
126
+ sideNavItems: _uiShellSharedConstants.emptySideNavItems
127
127
  })
128
128
  }), sideNavProps && (0, _jsxRuntime.jsx)(_reactErrorBoundary.ErrorBoundary, {
129
129
  fallback: null,