@primer/react-brand 0.78.0-rc.6fbe9fb5 → 0.78.0-rc.85e39cb4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/components/SubNav/index.md +53 -8
- package/docs/components/SubdomainNavBar/index.md +3 -1
- package/docs/index.md +2 -2
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js +1 -0
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js.map +1 -1
- package/esm/SubNav/SubNav.d.ts +19 -1
- package/esm/SubNav/SubNav.d.ts.map +1 -1
- package/esm/SubNav/SubNav.js +265 -166
- package/esm/SubNav/SubNav.js.map +1 -1
- package/esm/SubNav/SubNav.module-cyUt0N_h.css +1 -0
- package/esm/SubNav/SubNav.module.js +11 -4
- package/esm/SubNav/SubNav.module.js.map +1 -1
- package/esm/SubNav/useAnchorMenu.d.ts +5 -0
- package/esm/SubNav/useAnchorMenu.d.ts.map +1 -0
- package/esm/SubNav/useAnchorMenu.js +23 -0
- package/esm/SubNav/useAnchorMenu.js.map +1 -0
- package/esm/SubNav/useNarrowMenu.d.ts +8 -0
- package/esm/SubNav/useNarrowMenu.d.ts.map +1 -0
- package/esm/SubNav/useNarrowMenu.js +41 -0
- package/esm/SubNav/useNarrowMenu.js.map +1 -0
- package/esm/SubNav/useWideMenu.d.ts +13 -0
- package/esm/SubNav/useWideMenu.d.ts.map +1 -0
- package/esm/SubNav/useWideMenu.js +109 -0
- package/esm/SubNav/useWideMenu.js.map +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts +2 -2
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.js +304 -298
- package/esm/SubdomainNavBar/SubdomainNavBar.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.module-BLR1YjX-.css +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js +3 -3
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js.map +1 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/base-Dl5rLq0_.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes-Bna3nyXf.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-C_lnz8M6.css +1 -0
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js +9 -5
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-C46WY_qp.css +1 -0
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js +3 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js.map +1 -1
- package/lib/SubNav/SubNav.d.ts +19 -1
- package/lib/SubNav/useAnchorMenu.d.ts +4 -0
- package/lib/SubNav/useNarrowMenu.d.ts +7 -0
- package/lib/SubNav/useWideMenu.d.ts +12 -0
- package/lib/SubdomainNavBar/SubdomainNavBar.d.ts +2 -2
- package/lib/css/main.css +352 -239
- package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
- package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
- package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon-button/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon-button/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +6 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +15 -1
- package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +3 -3
- package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
- package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/button/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon-button/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +10 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/button/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon-button/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +6 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/json/colors.json +8 -1
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/button/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon-button/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon-button/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +6 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/button/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/button/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +11 -2
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +10 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
- package/lib/index.js +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/esm/SubNav/SubNav.module-D-gLr0JO.css +0 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.module-DLlWpwNa.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/base-DIkvLW-s.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes-5gfdihUt.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css +0 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-CB2SZhbE.css +0 -1
package/esm/SubNav/SubNav.js
CHANGED
|
@@ -4,16 +4,17 @@ import { useProvidedRefOrCreate as n } from "../hooks/useRef.js";
|
|
|
4
4
|
import { Text as r } from "../Text/Text.js";
|
|
5
5
|
import { Button as i } from "../Button/Button.js";
|
|
6
6
|
import { ThemeProvider as a } from "../ThemeProvider/ThemeProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
7
|
+
import { useKeyboardEscape as o } from "../hooks/useKeyboardEscape.js";
|
|
8
|
+
import { TriangleDownIcon as s } from "../node_modules/@primer/octicons-react/dist/icons/TriangleDownIcon.js";
|
|
9
|
+
import { TriangleUpIcon as c } from "../node_modules/@primer/octicons-react/dist/icons/TriangleUpIcon.js";
|
|
10
|
+
import { useWindowSize as l } from "../hooks/useWindowSize.js";
|
|
11
|
+
import { useContainsFocus as u } from "./useContainsFocus.js";
|
|
12
|
+
import d from "./SubNav.module.js";
|
|
13
|
+
import { useAnchorMenu as f } from "./useAnchorMenu.js";
|
|
14
|
+
import { useNarrowMenu as p } from "./useNarrowMenu.js";
|
|
15
|
+
import { useWideMenu as ee } from "./useWideMenu.js";
|
|
16
|
+
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes-Bna3nyXf.css';import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/sub-nav/base-Dl5rLq0_.css';/* empty css */
|
|
15
17
|
/* empty css */
|
|
16
|
-
import p from "./SubNav.module.js";
|
|
17
18
|
import m, { Children as h, createContext as g, forwardRef as _, isValidElement as v, memo as y, useCallback as b, useContext as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
18
19
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
19
20
|
import { createPortal as O } from "react-dom";
|
|
@@ -37,6 +38,12 @@ var k = {
|
|
|
37
38
|
},
|
|
38
39
|
get subMenu() {
|
|
39
40
|
return `${this.root}-sub-menu`;
|
|
41
|
+
},
|
|
42
|
+
get overflowButton() {
|
|
43
|
+
return `${this.root}-overflow-button`;
|
|
44
|
+
},
|
|
45
|
+
get overflowMenu() {
|
|
46
|
+
return `${this.root}-overflow-menu`;
|
|
40
47
|
}
|
|
41
48
|
}, A = ["dropdown", "anchor"], j = g(void 0), M = () => {
|
|
42
49
|
let e = x(j);
|
|
@@ -44,67 +51,50 @@ var k = {
|
|
|
44
51
|
return e;
|
|
45
52
|
};
|
|
46
53
|
function N({ children: t }) {
|
|
47
|
-
let
|
|
48
|
-
return
|
|
49
|
-
let e = n.current, t = new IntersectionObserver(([e]) => {
|
|
50
|
-
e.target.classList.toggle(p["SubNav__anchor-menu-outer-container--stuck"], e.intersectionRatio < 1);
|
|
51
|
-
}, { threshold: [1] });
|
|
52
|
-
return e && t.observe(e), () => {
|
|
53
|
-
e && t.unobserve(e);
|
|
54
|
-
};
|
|
55
|
-
}, []), /* @__PURE__ */ D(j.Provider, {
|
|
54
|
+
let { anchorMenuRef: n, portalRef: r } = f(), i = C(() => ({ portalRef: r }), [r]);
|
|
55
|
+
return /* @__PURE__ */ D(j.Provider, {
|
|
56
56
|
value: i,
|
|
57
57
|
children: [t, /* @__PURE__ */ E("div", {
|
|
58
|
-
className:
|
|
58
|
+
className: d["SubNav__anchor-menu-outer-container"],
|
|
59
59
|
ref: n,
|
|
60
60
|
children: /* @__PURE__ */ E("div", {
|
|
61
|
-
className: e(
|
|
61
|
+
className: e(d["SubNav__anchor-menu-container"]),
|
|
62
62
|
ref: r
|
|
63
63
|
})
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
o(A, G), s(G), S(() => {
|
|
79
|
-
let e = j.current, t = () => {
|
|
80
|
-
if (e) {
|
|
81
|
-
let t = e.getBoundingClientRect().top;
|
|
82
|
-
e.style.setProperty("--subnav-available-height", `${window.innerHeight - t}px`);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return L && !U ? (document.body.style.overflow = "hidden", t(), window.addEventListener("resize", t)) : (document.body.style.overflow = "auto", e && e.style.removeProperty("--subnav-available-height")), () => {
|
|
86
|
-
document.body.style.overflow = "auto", window.removeEventListener("resize", t), e && e.style.removeProperty("--subnav-available-height");
|
|
87
|
-
};
|
|
88
|
-
}, [L, U]);
|
|
89
|
-
let q = W.find((e) => v(e) && !!e.props["aria-current"]);
|
|
67
|
+
var te = {
|
|
68
|
+
menuLabel: "Navigation menu",
|
|
69
|
+
closeLabel: "Close navigation menu",
|
|
70
|
+
activeLabel: "Navigation menu. Current page:",
|
|
71
|
+
closeActiveLabel: "Close navigation menu. Current page:",
|
|
72
|
+
overflowMenuLabel: "More"
|
|
73
|
+
}, P = y(_(({ id: i, children: a, className: o, "data-testid": u, fullWidth: f, hasShadow: g, menuLabels: _ }, y) => {
|
|
74
|
+
let b = n(y), x = w(null), O = t(), A = t(), [j, M] = T(!1), P = {
|
|
75
|
+
...te,
|
|
76
|
+
..._
|
|
77
|
+
}, { isLarge: L } = l(), { navRef: V, narrowMenuRef: ne, isNarrowMenuOpen: H, closeNarrowMenu: U, toggleNarrowMenu: W } = p(L), G = h.toArray(a), re = G.find((e) => v(e) && !!e.props["aria-current"]);
|
|
90
78
|
S(() => {
|
|
91
|
-
let e =
|
|
79
|
+
let e = G.some((e) => {
|
|
92
80
|
if (v(e) && e.type === R) {
|
|
93
81
|
let t = h.toArray(e.props.children)[1];
|
|
94
82
|
if (v(t) && t.type === z && t.props.variant === "anchor") return !0;
|
|
95
83
|
}
|
|
96
84
|
return !1;
|
|
97
85
|
});
|
|
98
|
-
|
|
99
|
-
}, [
|
|
100
|
-
let { heading:
|
|
86
|
+
M(e);
|
|
87
|
+
}, [G]);
|
|
88
|
+
let { heading: ie, subheading: K, links: q, action: ae } = G.reduce((e, t) => {
|
|
101
89
|
if (v(t)) if (t.type === F) e.heading = t;
|
|
102
90
|
else if (t.type === I) e.subheading = t;
|
|
103
91
|
else if (t.type === R) {
|
|
104
92
|
let n = t, [r, i] = h.toArray(n.props.children), a = v(i) && i.type === z && i.props.variant === "anchor";
|
|
105
93
|
e.links.push(m.cloneElement(n, {
|
|
106
94
|
...a ? { children: [r] } : {},
|
|
107
|
-
onClick:
|
|
95
|
+
onClick: (e) => {
|
|
96
|
+
n.props.onClick?.(e), !e.defaultPrevented && n.props["aria-current"] && U();
|
|
97
|
+
}
|
|
108
98
|
}));
|
|
109
99
|
} else t.type === B && (e.action = t);
|
|
110
100
|
return e;
|
|
@@ -113,73 +103,143 @@ var P = y(_(({ id: i, children: a, className: f, "data-testid": g, fullWidth: _,
|
|
|
113
103
|
subheading: void 0,
|
|
114
104
|
links: [],
|
|
115
105
|
action: void 0
|
|
116
|
-
}),
|
|
117
|
-
className: e(
|
|
106
|
+
}), { overlayRef: oe, overflowRef: se, overflowButtonRef: ce, overflowMenuRef: le, visibleLinkCount: J, hasOverflow: Y, isOverflowMenuOpen: ue, closeOverflowMenu: de, handleOverflowMenuBlur: fe } = ee(a, L, q.length), pe = re ? h.toArray(re.props.children) : [], X = pe[0], Z = pe[1], me = v(Z) && Z.type === z && Z.props.variant === "anchor" ? Z : null, Q = v(K) && K.type === I && !!K.props["aria-current"], $ = K ? X : null, he = q.slice(J).some((e) => !!e.props["aria-current"] && e.props["aria-current"] !== "false"), ge = C(() => /* @__PURE__ */ E("div", {
|
|
107
|
+
className: e(d["SubNav__overlay-toggle"], H && d["SubNav__overlay-toggle--open"]),
|
|
118
108
|
children: /* @__PURE__ */ E("span", {
|
|
119
|
-
className: e(
|
|
109
|
+
className: e(d["SubNav__overlay-toggle-content"], !$ && d["SubNav__overlay-toggle-content--end"]),
|
|
120
110
|
children: /* @__PURE__ */ D("button", {
|
|
121
|
-
ref:
|
|
122
|
-
className:
|
|
111
|
+
ref: x,
|
|
112
|
+
className: d["SubNav__overlay-toggle-label"],
|
|
123
113
|
"data-testid": k.button,
|
|
124
|
-
onClick:
|
|
125
|
-
"aria-expanded":
|
|
126
|
-
"aria-controls":
|
|
127
|
-
"aria-label": X ?
|
|
114
|
+
onClick: H ? U : W,
|
|
115
|
+
"aria-expanded": H ? "true" : "false",
|
|
116
|
+
"aria-controls": O,
|
|
117
|
+
"aria-label": X ? `${H ? P.closeActiveLabel : P.activeLabel} ${X}` : H ? P.closeLabel : P.menuLabel,
|
|
128
118
|
children: [$ && /* @__PURE__ */ E(r, {
|
|
129
119
|
as: "span",
|
|
130
120
|
size: "100",
|
|
131
121
|
children: $
|
|
132
|
-
}), E(
|
|
133
|
-
className:
|
|
122
|
+
}), E(H ? c : s, {
|
|
123
|
+
className: d["SubNav__overlay-toggle-icon"],
|
|
134
124
|
size: 13
|
|
135
125
|
})]
|
|
136
126
|
})
|
|
137
127
|
})
|
|
138
128
|
}), [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
U,
|
|
130
|
+
W,
|
|
131
|
+
O,
|
|
142
132
|
H,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
X,
|
|
134
|
+
$,
|
|
135
|
+
P.closeLabel,
|
|
136
|
+
P.menuLabel,
|
|
137
|
+
P.activeLabel,
|
|
138
|
+
P.closeActiveLabel
|
|
139
|
+
]), _e = {
|
|
140
|
+
id: void 0,
|
|
141
|
+
ref: null,
|
|
142
|
+
"aria-activedescendant": void 0,
|
|
143
|
+
"aria-controls": void 0,
|
|
144
|
+
"aria-describedby": void 0,
|
|
145
|
+
"aria-details": void 0,
|
|
146
|
+
"aria-flowto": void 0,
|
|
147
|
+
"aria-labelledby": void 0,
|
|
148
|
+
"aria-owns": void 0
|
|
149
|
+
}, ve = (e) => h.map(e, (e) => {
|
|
150
|
+
if (!v(e)) return e;
|
|
151
|
+
let t = e.type === m.Fragment ? {} : _e;
|
|
152
|
+
return m.cloneElement(e, {
|
|
153
|
+
...t,
|
|
154
|
+
...e.props.children === void 0 ? {} : { children: ve(e.props.children) }
|
|
155
|
+
});
|
|
156
|
+
});
|
|
146
157
|
return /* @__PURE__ */ E("div", {
|
|
147
|
-
ref:
|
|
148
|
-
className: e(
|
|
158
|
+
ref: b,
|
|
159
|
+
className: e(d.SubNav__container, K && d["SubNav--has-sub-heading"], K && Q && d["SubNav--subHeadingActive"], j && d["SubNav__container--with-anchor-nav"]),
|
|
149
160
|
children: /* @__PURE__ */ E(N, { children: /* @__PURE__ */ E("nav", {
|
|
150
|
-
ref:
|
|
161
|
+
ref: V,
|
|
151
162
|
id: i,
|
|
152
|
-
className: e(
|
|
153
|
-
"data-testid":
|
|
163
|
+
className: e(d.SubNav, H && d["SubNav--open"], g && d["SubNav--has-shadow"], f && d["SubNav--full-width"], o),
|
|
164
|
+
"data-testid": u || k.root,
|
|
154
165
|
children: /* @__PURE__ */ D("div", {
|
|
155
|
-
ref:
|
|
156
|
-
className:
|
|
166
|
+
ref: ne,
|
|
167
|
+
className: d["SubNav--header-container-outer"],
|
|
157
168
|
children: [
|
|
158
169
|
/* @__PURE__ */ D("div", {
|
|
159
|
-
className:
|
|
170
|
+
className: d["SubNav__header-container"],
|
|
160
171
|
children: [
|
|
161
|
-
|
|
162
|
-
className:
|
|
163
|
-
children:
|
|
172
|
+
ie && /* @__PURE__ */ E("div", {
|
|
173
|
+
className: d["SubNav__heading-container"],
|
|
174
|
+
children: ie
|
|
164
175
|
}),
|
|
165
|
-
|
|
166
|
-
className: e(
|
|
167
|
-
children:
|
|
176
|
+
K && /* @__PURE__ */ E("div", {
|
|
177
|
+
className: e(d["SubNav__heading-container"], d["SubNav__subheading-container"], Q && d["SubNav__subheading-container-active"]),
|
|
178
|
+
children: K
|
|
168
179
|
}),
|
|
169
|
-
!
|
|
170
|
-
|
|
180
|
+
!L && (!K || Q) && ge,
|
|
181
|
+
me && me
|
|
171
182
|
]
|
|
172
183
|
}),
|
|
173
|
-
!
|
|
174
|
-
|
|
175
|
-
ref:
|
|
176
|
-
id:
|
|
177
|
-
className: e(
|
|
184
|
+
!L && K && !Q && ge,
|
|
185
|
+
q.length > 0 && /* @__PURE__ */ D("ul", {
|
|
186
|
+
ref: oe,
|
|
187
|
+
id: O,
|
|
188
|
+
className: e(d["SubNav__links-overlay"], H && d["SubNav__links-overlay--open"]),
|
|
178
189
|
"data-testid": k.overlay,
|
|
179
|
-
children: [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
children: [
|
|
191
|
+
q.map((t, n) => {
|
|
192
|
+
let r = !!L && n >= J, i = h.toArray(t.props.children).some((e) => v(e) && e.type === z);
|
|
193
|
+
return m.cloneElement(t, {
|
|
194
|
+
className: e(t.props.className, !i && d["SubNav__link--in-overlay"]),
|
|
195
|
+
_isOverflowed: r,
|
|
196
|
+
...r ? {
|
|
197
|
+
..._e,
|
|
198
|
+
children: ve(t.props.children)
|
|
199
|
+
} : {}
|
|
200
|
+
});
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ D("li", {
|
|
203
|
+
ref: se,
|
|
204
|
+
className: e(d["SubNav__overflow-container"], Y && d["SubNav__overflow-container--visible"]),
|
|
205
|
+
"aria-hidden": !Y || void 0,
|
|
206
|
+
onBlur: fe,
|
|
207
|
+
children: [/* @__PURE__ */ D("button", {
|
|
208
|
+
ref: ce,
|
|
209
|
+
type: "button",
|
|
210
|
+
className: e(d["SubNav__overflow-toggle"], he && d["SubNav__overflow-toggle--active"]),
|
|
211
|
+
"data-testid": k.overflowButton,
|
|
212
|
+
"aria-expanded": ue,
|
|
213
|
+
"aria-controls": A,
|
|
214
|
+
tabIndex: Y ? void 0 : -1,
|
|
215
|
+
children: [/* @__PURE__ */ E(r, {
|
|
216
|
+
as: "span",
|
|
217
|
+
size: "100",
|
|
218
|
+
className: d["SubNav__link-label"],
|
|
219
|
+
children: P.overflowMenuLabel
|
|
220
|
+
}), E(ue ? c : s, {})]
|
|
221
|
+
}), /* @__PURE__ */ E("div", {
|
|
222
|
+
ref: le,
|
|
223
|
+
id: A,
|
|
224
|
+
popover: "auto",
|
|
225
|
+
"data-testid": k.overflowMenu,
|
|
226
|
+
className: d["SubNav__overflow-menu"],
|
|
227
|
+
children: /* @__PURE__ */ E("ul", {
|
|
228
|
+
className: d["SubNav__overflow-menu-list"],
|
|
229
|
+
"aria-label": P.overflowMenuLabel,
|
|
230
|
+
children: q.slice(J).map((e) => m.cloneElement(e, {
|
|
231
|
+
_isOverflowed: !1,
|
|
232
|
+
_isOverflowMenu: !0,
|
|
233
|
+
_onOverflowLinkActivate: de
|
|
234
|
+
}))
|
|
235
|
+
})
|
|
236
|
+
})]
|
|
237
|
+
}),
|
|
238
|
+
ae && /* @__PURE__ */ E("li", {
|
|
239
|
+
className: d["SubNav__action-container"],
|
|
240
|
+
children: ae
|
|
241
|
+
})
|
|
242
|
+
]
|
|
183
243
|
})
|
|
184
244
|
]
|
|
185
245
|
})
|
|
@@ -187,73 +247,87 @@ var P = y(_(({ id: i, children: a, className: f, "data-testid": g, fullWidth: _,
|
|
|
187
247
|
});
|
|
188
248
|
})), F = ({ href: t, children: n, className: r, "data-testid": i, ...a }) => /* @__PURE__ */ E("a", {
|
|
189
249
|
href: t,
|
|
190
|
-
className: e(
|
|
250
|
+
className: e(d.SubNav__heading, r),
|
|
191
251
|
"data-testid": k.heading || i,
|
|
192
252
|
...a,
|
|
193
253
|
children: n
|
|
194
254
|
}), I = ({ href: t, children: n, className: r, "data-testid": i, ...a }) => /* @__PURE__ */ E("a", {
|
|
195
255
|
href: t,
|
|
196
|
-
className: e(
|
|
256
|
+
className: e(d.SubNav__heading, d.SubNav__link, d.SubNav__subHeading, r),
|
|
197
257
|
"data-testid": k.heading || i,
|
|
198
258
|
...a,
|
|
199
259
|
children: n
|
|
200
|
-
}), L = _(({ children: i, href: a, "aria-current":
|
|
201
|
-
let
|
|
202
|
-
|
|
203
|
-
e ||
|
|
260
|
+
}), L = _(({ children: i, href: a, "aria-current": c, "data-testid": f, className: p, _subMenuVariant: ee, _isOverflowMenu: h = !1, _onOverflowLinkActivate: g, variant: _, ...y }, x) => {
|
|
261
|
+
let C = t(), { isLarge: O } = l(), [A, j] = T(!1), M = n(x), N = w(null);
|
|
262
|
+
u(M, (e) => {
|
|
263
|
+
e || j(!1);
|
|
204
264
|
});
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}, [
|
|
209
|
-
|
|
265
|
+
let te = b(() => j(!0), []), P = b(() => j(!1), []), F = b(() => j((e) => !e), []), I = !!c && c !== "false";
|
|
266
|
+
o(P), S(() => {
|
|
267
|
+
N.current && N.current.toggleAttribute("inert", !!O && !h && !A);
|
|
268
|
+
}, [
|
|
269
|
+
O,
|
|
270
|
+
h,
|
|
271
|
+
A
|
|
272
|
+
]);
|
|
273
|
+
let [L, R] = i, B = v(R) && R.type === z ? R.props["aria-label"] : void 0, V = h && v(R) && R.type === z ? m.cloneElement(R, {
|
|
274
|
+
_isOverflowMenu: h,
|
|
275
|
+
_onOverflowLinkActivate: g
|
|
276
|
+
}) : R;
|
|
210
277
|
return /* @__PURE__ */ D("div", {
|
|
211
|
-
className: e(
|
|
212
|
-
"data-testid":
|
|
213
|
-
ref:
|
|
214
|
-
onMouseOver:
|
|
215
|
-
onMouseOut:
|
|
278
|
+
className: e(d["SubNav__link--has-sub-menu"], A && d["SubNav__link--expanded"], I && d["SubNav__link--has-active-sub-menu"]),
|
|
279
|
+
"data-testid": f || k.subMenu,
|
|
280
|
+
ref: M,
|
|
281
|
+
onMouseOver: te,
|
|
282
|
+
onMouseOut: P,
|
|
216
283
|
onFocus: () => null,
|
|
217
284
|
onBlur: () => null,
|
|
218
285
|
children: [
|
|
219
286
|
/* @__PURE__ */ E("a", {
|
|
220
287
|
href: a,
|
|
221
|
-
className: e(
|
|
222
|
-
"aria-current":
|
|
223
|
-
...
|
|
288
|
+
className: e(d.SubNav__link, c && d["SubNav__link--active"], p),
|
|
289
|
+
"aria-current": c,
|
|
290
|
+
...y,
|
|
291
|
+
onClick: (e) => {
|
|
292
|
+
y.onClick?.(e), e.defaultPrevented || g?.();
|
|
293
|
+
},
|
|
224
294
|
children: /* @__PURE__ */ E(r, {
|
|
225
295
|
as: "span",
|
|
226
296
|
size: "100",
|
|
227
297
|
weight: "medium",
|
|
228
|
-
className:
|
|
229
|
-
children:
|
|
298
|
+
className: d["SubNav__link-label"],
|
|
299
|
+
children: L
|
|
230
300
|
})
|
|
231
301
|
}),
|
|
232
|
-
|
|
233
|
-
className:
|
|
234
|
-
onClick:
|
|
235
|
-
"aria-expanded":
|
|
236
|
-
"aria-controls":
|
|
237
|
-
"aria-label": `${
|
|
238
|
-
children: /* @__PURE__ */ E(
|
|
239
|
-
className:
|
|
302
|
+
O && !h && /* @__PURE__ */ E("button", {
|
|
303
|
+
className: d["SubNav__sub-menu-toggle"],
|
|
304
|
+
onClick: F,
|
|
305
|
+
"aria-expanded": A ? "true" : "false",
|
|
306
|
+
"aria-controls": C,
|
|
307
|
+
"aria-label": B ?? `${L?.toString().trim()} submenu`,
|
|
308
|
+
children: /* @__PURE__ */ E(s, {
|
|
309
|
+
className: d["SubNav__sub-menu-icon"],
|
|
240
310
|
size: 16
|
|
241
311
|
})
|
|
242
312
|
}),
|
|
243
313
|
/* @__PURE__ */ E("div", {
|
|
244
|
-
id:
|
|
245
|
-
className:
|
|
246
|
-
ref:
|
|
247
|
-
children:
|
|
314
|
+
id: C,
|
|
315
|
+
className: d["SubNav__sub-menu-children"],
|
|
316
|
+
ref: N,
|
|
317
|
+
children: V
|
|
248
318
|
})
|
|
249
319
|
]
|
|
250
320
|
});
|
|
251
321
|
}), R = _((t, n) => {
|
|
252
|
-
let [i, a] = T(!1), o =
|
|
322
|
+
let [i, a] = T(!1), o = w(null), { _isOverflowed: s, _isOverflowMenu: c = !1, _onOverflowLinkActivate: l, ...u } = t, f = h.toArray(t.children);
|
|
323
|
+
S(() => {
|
|
324
|
+
o.current?.toggleAttribute("inert", !!s);
|
|
325
|
+
}, [s]);
|
|
326
|
+
let p = f.some((e) => {
|
|
253
327
|
if (v(e)) return e.type === z;
|
|
254
328
|
});
|
|
255
329
|
if (S(() => {
|
|
256
|
-
if (
|
|
330
|
+
if (p) return;
|
|
257
331
|
let e = t.href.replace("#", ""), n = document.getElementById(e);
|
|
258
332
|
if (!n) return;
|
|
259
333
|
let r = new IntersectionObserver(([e]) => {
|
|
@@ -264,64 +338,89 @@ var P = y(_(({ id: i, children: a, className: f, "data-testid": g, fullWidth: _,
|
|
|
264
338
|
rootMargin: "0px 0px -100%"
|
|
265
339
|
});
|
|
266
340
|
return r.observe(n), () => r.disconnect();
|
|
267
|
-
}, [
|
|
268
|
-
let
|
|
269
|
-
return /* @__PURE__ */ E("li", {
|
|
270
|
-
ref:
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
341
|
+
}, [p, t.href]), p) {
|
|
342
|
+
let t = f.some((e) => v(e) && e.type === z && e.props.variant === "anchor");
|
|
343
|
+
return /* @__PURE__ */ E("li", {
|
|
344
|
+
ref: o,
|
|
345
|
+
"aria-hidden": s ? !0 : void 0,
|
|
346
|
+
className: e(d["SubNav__link-item"], s && d["SubNav__link-item--overflowed"]),
|
|
347
|
+
children: /* @__PURE__ */ E(L, {
|
|
348
|
+
ref: n,
|
|
349
|
+
...u,
|
|
350
|
+
_isOverflowMenu: c,
|
|
351
|
+
_onOverflowLinkActivate: l,
|
|
352
|
+
_subMenuVariant: t ? "anchor" : void 0
|
|
353
|
+
})
|
|
354
|
+
});
|
|
274
355
|
}
|
|
275
|
-
let { children:
|
|
276
|
-
return /* @__PURE__ */ E("li", {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
356
|
+
let { children: ee, href: m, "aria-current": g, "data-testid": _, variant: y, className: b, ...x } = u;
|
|
357
|
+
return /* @__PURE__ */ E("li", {
|
|
358
|
+
ref: o,
|
|
359
|
+
"aria-hidden": s ? !0 : void 0,
|
|
360
|
+
className: e(d["SubNav__link-item"], s && d["SubNav__link-item--overflowed"]),
|
|
361
|
+
children: /* @__PURE__ */ E("a", {
|
|
362
|
+
href: m,
|
|
363
|
+
className: e(d.SubNav__link, g && d["SubNav__link--active"], i && d["SubNav__link--is-in-view"], b),
|
|
364
|
+
"aria-current": g,
|
|
365
|
+
"data-testid": _ || k.link,
|
|
366
|
+
ref: n,
|
|
367
|
+
...x,
|
|
368
|
+
onClick: (e) => {
|
|
369
|
+
x.onClick?.(e), e.defaultPrevented || l?.();
|
|
370
|
+
},
|
|
371
|
+
children: /* @__PURE__ */ E(r, {
|
|
372
|
+
as: "span",
|
|
373
|
+
size: "100",
|
|
374
|
+
weight: "medium",
|
|
375
|
+
className: d["SubNav__link-label"],
|
|
376
|
+
children: ee
|
|
377
|
+
})
|
|
289
378
|
})
|
|
290
|
-
})
|
|
379
|
+
});
|
|
291
380
|
});
|
|
292
|
-
function z({ children: t, className: n,
|
|
293
|
-
let
|
|
381
|
+
function z({ children: t, className: n, "aria-label": r = "Sub navigation", variant: i = "dropdown", _isOverflowMenu: o = !1, _onOverflowLinkActivate: s, ...c }) {
|
|
382
|
+
let u = m.useContext(j), f = w(null), { isLarge: p } = l();
|
|
294
383
|
return S(() => {
|
|
295
384
|
let e = (e) => {
|
|
296
|
-
|
|
385
|
+
f.current && !f.current.contains(e.target) || e.target instanceof HTMLAnchorElement || e.stopPropagation();
|
|
297
386
|
};
|
|
298
|
-
return
|
|
387
|
+
return i === "anchor" && document.addEventListener("click", e, !0), () => {
|
|
299
388
|
document.removeEventListener("click", e, !0);
|
|
300
389
|
};
|
|
301
|
-
}, [
|
|
302
|
-
ref:
|
|
303
|
-
className: e(
|
|
390
|
+
}, [i]), i === "anchor" && u?.portalRef.current ? O(/* @__PURE__ */ E("nav", {
|
|
391
|
+
ref: f,
|
|
392
|
+
className: e(d["SubNav__sub-menu"], d["SubNav__sub-menu--anchor"], n),
|
|
304
393
|
role: "navigation",
|
|
305
|
-
"aria-label":
|
|
394
|
+
"aria-label": r,
|
|
306
395
|
children: /* @__PURE__ */ E("ul", {
|
|
307
|
-
className:
|
|
308
|
-
...
|
|
309
|
-
children: m.Children.map(t, (e) => v(e) && e.type === R ? m.cloneElement(e, {
|
|
310
|
-
|
|
311
|
-
|
|
396
|
+
className: d["SubNav__sub-menu-list"],
|
|
397
|
+
...c,
|
|
398
|
+
children: m.Children.map(t, (e) => v(e) && e.type === R ? m.cloneElement(e, {
|
|
399
|
+
...o ? {
|
|
400
|
+
_isOverflowMenu: o,
|
|
401
|
+
_onOverflowLinkActivate: s
|
|
402
|
+
} : {},
|
|
403
|
+
onClick: (t) => {
|
|
404
|
+
e.props.onClick?.(t);
|
|
405
|
+
}
|
|
406
|
+
}) : null)
|
|
312
407
|
})
|
|
313
|
-
}),
|
|
314
|
-
...
|
|
408
|
+
}), u.portalRef.current) : /* @__PURE__ */ E(p && !o ? a : m.Fragment, {
|
|
409
|
+
...p && !o ? { colorMode: "light" } : {},
|
|
315
410
|
children: /* @__PURE__ */ E("ul", {
|
|
316
|
-
className: e(
|
|
317
|
-
|
|
318
|
-
|
|
411
|
+
className: e(d["SubNav__sub-menu"], d[`SubNav__sub-menu--${i}`], n),
|
|
412
|
+
"aria-label": r,
|
|
413
|
+
...c,
|
|
414
|
+
children: o ? h.map(t, (e) => v(e) && e.type === R ? m.cloneElement(e, {
|
|
415
|
+
_isOverflowMenu: o,
|
|
416
|
+
_onOverflowLinkActivate: s
|
|
417
|
+
}) : e) : t
|
|
319
418
|
})
|
|
320
419
|
});
|
|
321
420
|
}
|
|
322
421
|
function B({ children: e, href: t, variant: n = "primary", size: r = "small", ...a }) {
|
|
323
422
|
return /* @__PURE__ */ E(i, {
|
|
324
|
-
className:
|
|
423
|
+
className: d.SubNav__action,
|
|
325
424
|
as: "a",
|
|
326
425
|
href: t,
|
|
327
426
|
variant: n,
|