@primer/react-brand 0.74.0 → 0.75.0-rc.96de7cef
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/RiverAccordion/index.md +49 -6
- package/docs/components/SubdomainNavBar/index.md +215 -86
- package/docs/index.md +2 -2
- package/esm/Hero/sub-components/HeroLabel.d.ts +1 -0
- package/esm/Hero/sub-components/HeroLabel.d.ts.map +1 -1
- package/esm/Hero/sub-components/HeroLabel.js +7 -6
- package/esm/Hero/sub-components/HeroLabel.js.map +1 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts.map +1 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js +115 -63
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts +155 -18
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.js +474 -298
- package/esm/SubdomainNavBar/SubdomainNavBar.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.module-WIrpYyjV.css +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js +33 -9
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +9 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts.map +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js +10 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js.map +1 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +8 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts.map +1 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js +52 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js.map +1 -0
- package/esm/SubdomainNavBar/useSearchResults.d.ts +24 -0
- package/esm/SubdomainNavBar/useSearchResults.d.ts.map +1 -0
- package/esm/SubdomainNavBar/useSearchResults.js +57 -0
- package/esm/SubdomainNavBar/useSearchResults.js.map +1 -0
- package/esm/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
- package/esm/SubdomainNavBar/useVisibilityObserver.d.ts.map +1 -1
- package/esm/SubdomainNavBar/useVisibilityObserver.js +60 -23
- package/esm/SubdomainNavBar/useVisibilityObserver.js.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts +8 -3
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.js +53 -27
- package/esm/TextCursorAnimation/TextCursorAnimation.js.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.module-BS4hPR8H.css +1 -0
- package/esm/TextCursorAnimation/TextCursorAnimation.module.js +14 -4
- package/esm/TextCursorAnimation/TextCursorAnimation.module.js.map +1 -1
- package/esm/hooks/useCursorAnimation.d.ts +8 -31
- package/esm/hooks/useCursorAnimation.d.ts.map +1 -1
- package/esm/hooks/useCursorAnimation.js +84 -36
- package/esm/hooks/useCursorAnimation.js.map +1 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base-DKbXhPKv.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes-BucKYl1n.css +1 -0
- package/esm/river/RiverAccordion/RiverAccordion.d.ts +13 -4
- package/esm/river/RiverAccordion/RiverAccordion.d.ts.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.js +35 -24
- package/esm/river/RiverAccordion/RiverAccordion.js.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-Cr6Q-qkm.css +1 -0
- package/esm/river/RiverAccordion/RiverAccordion.module.js +7 -3
- package/esm/river/RiverAccordion/RiverAccordion.module.js.map +1 -1
- package/lib/Hero/sub-components/HeroLabel.d.ts +1 -0
- package/lib/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
- package/lib/SubdomainNavBar/SubdomainNavBar.d.ts +155 -18
- package/lib/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +8 -0
- package/lib/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +7 -0
- package/lib/SubdomainNavBar/useSearchResults.d.ts +23 -0
- package/lib/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
- package/lib/TextCursorAnimation/TextCursorAnimation.d.ts +8 -3
- package/lib/css/main.css +1388 -302
- 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/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/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 +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +7 -1
- 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 +8 -0
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +7 -3
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +4 -2
- 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/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/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 +1 -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 +14 -0
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +10 -2
- 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/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/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 +1 -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 +6 -0
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +4 -2
- 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 +6 -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/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/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 +1 -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 +5 -0
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +4 -2
- 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/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/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 +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -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 +17 -0
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +14 -0
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +4 -2
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +4 -2
- 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/hooks/useCursorAnimation.d.ts +8 -31
- package/lib/index.js +1 -1
- package/lib/river/RiverAccordion/RiverAccordion.d.ts +13 -4
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.module-Rf4qEDka.css +0 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.module-BJLhwKrK.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-ehJCoExh.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes-BODdIvrY.css +0 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-BTU_metB.css +0 -1
|
@@ -2,20 +2,26 @@ import e from "../node_modules/clsx/dist/clsx.js";
|
|
|
2
2
|
import { useId as t } from "../hooks/useId.js";
|
|
3
3
|
import { Text as n } from "../Text/Text.js";
|
|
4
4
|
import { Button as r } from "../Button/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import f from "./
|
|
10
|
-
import { NavigationVisbilityObserver as
|
|
11
|
-
import { useFocusTrap as
|
|
12
|
-
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
5
|
+
import { useKeyboardEscape as i } from "../hooks/useKeyboardEscape.js";
|
|
6
|
+
import { ArrowUpRightIcon as a, ChevronLeftIcon as o, LinkExternalIcon as s, MarkGithubIcon as ee, SearchIcon as c } from "../node_modules/@primer/octicons-react/dist/index.esm.js";
|
|
7
|
+
import { useWindowSize as l } from "../hooks/useWindowSize.js";
|
|
8
|
+
import u from "./SubdomainNavBar.module.js";
|
|
9
|
+
import { SubdomainNavBarLinkContext as d, useSubdomainNavBarLinkContext as f } from "./SubdomainNavBarLinkContext.js";
|
|
10
|
+
import { NavigationVisbilityObserver as te } from "./NavigationVisbilityObserver.js";
|
|
11
|
+
import { useFocusTrap as ne } from "../hooks/useFocusTrap.js";
|
|
12
|
+
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css';/* empty css */
|
|
13
|
+
import { useSearchKeyboardShortcut as re } from "./useSearchKeyboardShortcut.js";
|
|
14
|
+
import { useSearchResults as ie } from "./useSearchResults.js";
|
|
15
|
+
import { TextInput as ae } from "../forms/TextInput/TextInput.js";
|
|
16
|
+
import { FormControl as p } from "../forms/FormControl/FormControl.js";
|
|
17
|
+
import m, { forwardRef as h, useCallback as g, useEffect as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
18
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
17
19
|
//#region src/SubdomainNavBar/SubdomainNavBar.tsx
|
|
18
|
-
var
|
|
20
|
+
var T = {
|
|
21
|
+
menuLabel: "Menu",
|
|
22
|
+
closeLabel: "Close",
|
|
23
|
+
overflowMenuLabel: "More"
|
|
24
|
+
}, E = m.createContext("small"), D = {
|
|
19
25
|
root: "SubdomainNavBar",
|
|
20
26
|
get innerContainer() {
|
|
21
27
|
return `${this.root}-inner-container`;
|
|
@@ -30,366 +36,536 @@ var D = {
|
|
|
30
36
|
return `${this.root}-search-live-region`;
|
|
31
37
|
}
|
|
32
38
|
};
|
|
33
|
-
function O(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
function O(e) {
|
|
40
|
+
if (e.closest("[hidden], [inert], [aria-hidden=\"true\"]")) return !1;
|
|
41
|
+
for (let t = e; t; t = t.parentElement) {
|
|
42
|
+
let e = window.getComputedStyle(t);
|
|
43
|
+
if (e.display === "none" || e.visibility === "hidden") return !1;
|
|
44
|
+
}
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
var k = h(function({ children: a, className: s, fixed: c = !0, fullWidth: f = !1, logoHref: ie = "https://github.com", style: ae, title: p, titleHref: h = "/", leadingComponent: k, trailingComponent: j, onNarrowMenuToggle: F, menuLabels: oe, skipToContentTargetId: I, ...se }, ce) {
|
|
48
|
+
let [L, le] = x(!0), [ue, R] = x(!1), [de, fe] = x(0), { isMedium: pe, isLarge: z } = l(), [me, he] = x(!1), [ge, B] = x(), V = b(null), _e = b(null), ve = t(), ye = `${ve}-main`, be = t(), H = {
|
|
49
|
+
...T,
|
|
50
|
+
...oe
|
|
51
|
+
}, U = g(() => {
|
|
52
|
+
fe(Math.max(0, V.current?.getBoundingClientRect().top ?? 0));
|
|
53
|
+
}, []), W = g(() => {
|
|
54
|
+
L || (le(!0), F?.(!1));
|
|
55
|
+
}, [L, F]), xe = () => {
|
|
56
|
+
if (!L) {
|
|
57
|
+
W();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
R(!1), U(), le(!1), F?.(!0);
|
|
61
|
+
}, Se = b(null), Ce = g(() => {
|
|
62
|
+
let e = Array.from(document.querySelectorAll("main")).find(O);
|
|
63
|
+
return e ? (e.id ||= document.getElementById("start-of-content") ? ye : "start-of-content", e) : _e.current;
|
|
64
|
+
}, [ye]), G = g(() => {
|
|
65
|
+
if (I) {
|
|
66
|
+
let e = document.getElementById(I);
|
|
67
|
+
if (e && O(e)) return e;
|
|
68
|
+
}
|
|
69
|
+
return Ce();
|
|
70
|
+
}, [Ce, I]), we = g(() => {
|
|
71
|
+
he(!0);
|
|
72
|
+
let e = G();
|
|
73
|
+
e && B(e.id);
|
|
74
|
+
}, [G]), Te = g((e) => {
|
|
75
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
76
|
+
let t = I ? document.getElementById(I) : null, n = I && (!t || !O(t)), r = G();
|
|
77
|
+
if (n && console.warn(`SubdomainNavBar could not find the skip-to-content target "${I}". Falling back to the page's main content.`), !r) return;
|
|
78
|
+
let i = `#${encodeURIComponent(r.id)}`;
|
|
79
|
+
e.currentTarget.setAttribute("href", i), B(r.id);
|
|
80
|
+
let a = r.tabIndex < 0 && !r.hasAttribute("tabindex");
|
|
81
|
+
a && (r.tabIndex = -1);
|
|
82
|
+
let o = r.style.scrollMarginBlockStart;
|
|
83
|
+
if (c) {
|
|
84
|
+
let e = V.current?.getBoundingClientRect().height ?? 0;
|
|
85
|
+
r.style.scrollMarginBlockStart = `${e}px`;
|
|
86
|
+
}
|
|
87
|
+
r.addEventListener("blur", () => {
|
|
88
|
+
a && r.removeAttribute("tabindex"), r.style.scrollMarginBlockStart = o;
|
|
89
|
+
}, { once: !0 }), r.focus({ preventScroll: !0 });
|
|
90
|
+
}, [
|
|
91
|
+
c,
|
|
92
|
+
G,
|
|
93
|
+
I
|
|
94
|
+
]);
|
|
95
|
+
_(() => {
|
|
96
|
+
let e = G();
|
|
97
|
+
e && B(e.id);
|
|
98
|
+
}, [G]), ne({
|
|
99
|
+
containerRef: Se,
|
|
43
100
|
restoreFocusOnCleanUp: !0,
|
|
44
|
-
disabled:
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
|
|
101
|
+
disabled: L
|
|
102
|
+
}), i(W), _(() => {
|
|
103
|
+
z && W();
|
|
104
|
+
}, [W, z]), _(() => {
|
|
105
|
+
if (L || z) return;
|
|
106
|
+
U();
|
|
107
|
+
let e = new ResizeObserver(U), t = V.current;
|
|
108
|
+
return t && e.observe(t), e.observe(document.documentElement), () => e.disconnect();
|
|
49
109
|
}, [
|
|
50
110
|
z,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]),
|
|
54
|
-
|
|
55
|
-
document.body.style.overflow
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
111
|
+
L,
|
|
112
|
+
U
|
|
113
|
+
]), _(() => {
|
|
114
|
+
if (L) return;
|
|
115
|
+
let e = document.body.style.overflow;
|
|
116
|
+
return document.body.style.overflow = "hidden", () => {
|
|
117
|
+
document.body.style.overflow = e;
|
|
118
|
+
};
|
|
119
|
+
}, [L]);
|
|
120
|
+
let Ee = g(() => he(!1), []), K = y(() => m.Children.toArray(a).filter((e) => m.isValidElement(e) && typeof e.type != "string" && e.type === A), []).length > 0, q = y(() => m.Children.toArray(a).map((e, t) => m.isValidElement(e) && e.type === A ? m.cloneElement(e, {
|
|
121
|
+
href: e.props.href,
|
|
122
|
+
children: e.props.children,
|
|
123
|
+
style: { "--animation-order": t }
|
|
124
|
+
}) : null).filter(Boolean), [a]), J = y(() => m.Children.toArray(a).filter((e) => m.isValidElement(e) && (e.type === N || e.type === P)), [a]), De = y(() => J.map((e) => m.cloneElement(e, { onClick: (t) => {
|
|
125
|
+
e.props.onClick?.(t), t.defaultPrevented || W();
|
|
126
|
+
} })), [J, W]), Y = J.length > 0, Oe = y(() => m.Children.toArray(a).find((e) => m.isValidElement(e) && e.type === M), [a]), ke = !!Oe, X = g(() => {
|
|
127
|
+
ke && (W(), R(!0));
|
|
128
|
+
}, [W, ke]), Z = g(() => R(!1), []);
|
|
129
|
+
v(ce, () => V.current ? Object.assign(V.current, {
|
|
130
|
+
openSearch: X,
|
|
131
|
+
closeSearch: Z
|
|
132
|
+
}) : {
|
|
133
|
+
openSearch: X,
|
|
134
|
+
closeSearch: Z
|
|
135
|
+
}, [Z, X]), re({
|
|
136
|
+
disabled: ue,
|
|
137
|
+
keyboardShortcut: Oe?.props.keyboardShortcut,
|
|
138
|
+
onTrigger: X
|
|
139
|
+
});
|
|
140
|
+
let Q = k != null, $ = j != null, Ae = K || Y || Q || $, je = {
|
|
141
|
+
...ae,
|
|
142
|
+
"--SubdomainNavBar-menu-offset-block-start": `${de}px`
|
|
143
|
+
};
|
|
144
|
+
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
|
|
145
|
+
className: e(u["SubdomainNavBar-outer-container"], c && u["SubdomainNavBar-outer-container--fixed"]),
|
|
146
|
+
children: [/* @__PURE__ */ C(r, {
|
|
75
147
|
as: "a",
|
|
76
|
-
href: `#${
|
|
148
|
+
href: `#${ge || I || ve}`,
|
|
77
149
|
variant: "primary",
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
150
|
+
size: "small",
|
|
151
|
+
className: e(u["SubdomainNavBar-skip-to-content"], !me && "visually-hidden"),
|
|
152
|
+
onFocus: we,
|
|
153
|
+
onBlur: Ee,
|
|
154
|
+
onClick: Te,
|
|
81
155
|
children: "Skip to content"
|
|
82
|
-
}), /* @__PURE__ */
|
|
83
|
-
|
|
156
|
+
}), /* @__PURE__ */ w("header", {
|
|
157
|
+
ref: V,
|
|
158
|
+
className: e(u.SubdomainNavBar, s),
|
|
84
159
|
"data-testid": D.root,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
160
|
+
style: je,
|
|
161
|
+
...se,
|
|
162
|
+
children: [/* @__PURE__ */ w("div", {
|
|
163
|
+
ref: Se,
|
|
164
|
+
className: e(u["SubdomainNavBar-inner-container"], ue && u["SubdomainNavBar-inner-container--search-open"], !f && u["SubdomainNavBar-inner-container--centered"]),
|
|
89
165
|
"data-testid": D.innerContainer,
|
|
90
166
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ C("nav", {
|
|
92
168
|
"aria-label": "Header logo and title",
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
-
className:
|
|
95
|
-
children: [/* @__PURE__ */
|
|
96
|
-
href:
|
|
169
|
+
children: /* @__PURE__ */ w("ol", {
|
|
170
|
+
className: u["SubdomainNavBar-title-area"],
|
|
171
|
+
children: [/* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("a", {
|
|
172
|
+
href: ie,
|
|
97
173
|
"aria-label": "Github Home",
|
|
98
|
-
className:
|
|
99
|
-
children: [/* @__PURE__ */
|
|
100
|
-
className:
|
|
101
|
-
children: /* @__PURE__ */
|
|
174
|
+
className: u["SubdomainNavBar-logo-mark"],
|
|
175
|
+
children: [/* @__PURE__ */ C("span", {
|
|
176
|
+
className: u["SubdomainNavBar-back-arrow"],
|
|
177
|
+
children: /* @__PURE__ */ C(o, {
|
|
102
178
|
fill: "currentColor",
|
|
103
179
|
size: 24
|
|
104
180
|
})
|
|
105
|
-
}), /* @__PURE__ */
|
|
181
|
+
}), /* @__PURE__ */ C(ee, {
|
|
106
182
|
fill: "currentColor",
|
|
107
183
|
size: 24
|
|
108
184
|
})]
|
|
109
|
-
}) }),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
children:
|
|
114
|
-
}), /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T("a", {
|
|
115
|
-
href: v,
|
|
116
|
-
"aria-label": `${g} home`,
|
|
117
|
-
className: e(f["SubdomainNavBar-title"]),
|
|
118
|
-
children: /* @__PURE__ */ T(n, {
|
|
185
|
+
}) }), p && /* @__PURE__ */ C(S, { children: /* @__PURE__ */ C("li", { children: /* @__PURE__ */ C("a", {
|
|
186
|
+
href: h,
|
|
187
|
+
"aria-label": `${p} home`,
|
|
188
|
+
className: e(u["SubdomainNavBar-title"]),
|
|
189
|
+
children: /* @__PURE__ */ w(n, {
|
|
119
190
|
size: "400",
|
|
120
191
|
weight: "medium",
|
|
121
|
-
children:
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ C("span", {
|
|
194
|
+
className: u["SubdomainNavBar-title-prefix"],
|
|
195
|
+
children: "GitHub"
|
|
196
|
+
}),
|
|
197
|
+
" ",
|
|
198
|
+
/* @__PURE__ */ C("span", {
|
|
199
|
+
className: u["SubdomainNavBar-title-label"],
|
|
200
|
+
children: p
|
|
201
|
+
})
|
|
202
|
+
]
|
|
122
203
|
})
|
|
123
|
-
}) })
|
|
204
|
+
}) }) })]
|
|
124
205
|
})
|
|
125
206
|
}),
|
|
126
|
-
|
|
207
|
+
K && /* @__PURE__ */ C("nav", {
|
|
127
208
|
id: "menu-navigation",
|
|
128
|
-
"aria-label":
|
|
129
|
-
className:
|
|
209
|
+
"aria-label": p,
|
|
210
|
+
className: u["SubdomainNavBar-primary-nav"],
|
|
130
211
|
"data-testid": D.menuLinks,
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
className: e(
|
|
133
|
-
|
|
212
|
+
children: /* @__PURE__ */ C(te, {
|
|
213
|
+
className: e(u["SubdomainNavBar-primary-nav-list--invisible"]),
|
|
214
|
+
overflowMenuLabel: H.overflowMenuLabel,
|
|
215
|
+
children: q
|
|
134
216
|
})
|
|
135
217
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
className:
|
|
218
|
+
z && Q && /* @__PURE__ */ C("div", {
|
|
219
|
+
className: u["SubdomainNavBar-leading-component"],
|
|
220
|
+
children: k
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ w("div", {
|
|
223
|
+
className: e(u["SubdomainNavBar-secondary-nav"]),
|
|
138
224
|
children: [
|
|
139
|
-
|
|
140
|
-
active:
|
|
141
|
-
|
|
142
|
-
|
|
225
|
+
m.Children.toArray(a).map((t) => m.isValidElement(t) && t.type === M ? m.cloneElement(t, {
|
|
226
|
+
active: ue,
|
|
227
|
+
className: e(t.props.className, z && (Y || $) && u["SubdomainNavBar-search-trigger--has-trailing-item"]),
|
|
228
|
+
onSearchOpen: X,
|
|
229
|
+
onSearchClose: Z,
|
|
230
|
+
title: p
|
|
143
231
|
}) : null).filter(Boolean),
|
|
144
|
-
|
|
145
|
-
"aria-expanded": !
|
|
146
|
-
"aria-label":
|
|
147
|
-
"aria-controls":
|
|
148
|
-
"
|
|
149
|
-
className: e(f["SubdomainNavBar-menu-button"], f["SubdomainNavBar-mobile-menu-button"], !P && f["SubdomainNavBar-menu-button--close"]),
|
|
232
|
+
Ae && /* @__PURE__ */ w("button", {
|
|
233
|
+
"aria-expanded": !L,
|
|
234
|
+
"aria-label": L ? H.menuLabel : H.closeLabel,
|
|
235
|
+
"aria-controls": be,
|
|
236
|
+
className: e(u["SubdomainNavBar-menu-button"], u["SubdomainNavBar-mobile-menu-button"], !L && u["SubdomainNavBar-menu-button--close"]),
|
|
150
237
|
"data-testid": D.menuButton,
|
|
151
|
-
onClick:
|
|
152
|
-
children: [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
238
|
+
onClick: xe,
|
|
239
|
+
children: [/* @__PURE__ */ w("span", {
|
|
240
|
+
className: u["SubdomainNavBar-menu-button-icon"],
|
|
241
|
+
"aria-hidden": "true",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] }),
|
|
244
|
+
/* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] }),
|
|
245
|
+
/* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] })
|
|
246
|
+
]
|
|
247
|
+
}), /* @__PURE__ */ C("span", {
|
|
248
|
+
className: u["SubdomainNavBar-menu-button-label"],
|
|
249
|
+
children: L ? H.menuLabel : H.closeLabel
|
|
250
|
+
})]
|
|
157
251
|
}),
|
|
158
|
-
z && /* @__PURE__ */
|
|
159
|
-
className:
|
|
160
|
-
children:
|
|
161
|
-
|
|
162
|
-
|
|
252
|
+
z && $ && /* @__PURE__ */ C("div", {
|
|
253
|
+
className: u["SubdomainNavBar-trailing-component"],
|
|
254
|
+
children: j
|
|
255
|
+
}),
|
|
256
|
+
z && Y && /* @__PURE__ */ C("div", {
|
|
257
|
+
className: e(u["SubdomainNavBar-button-area"], u["SubdomainNavBar-button-area--visible"], $ && u["SubdomainNavBar-button-area--has-leading-item"]),
|
|
258
|
+
children: /* @__PURE__ */ C("div", {
|
|
259
|
+
className: u["SubdomainNavBar-button-area-inner"],
|
|
260
|
+
children: J
|
|
163
261
|
})
|
|
164
262
|
}),
|
|
165
|
-
!z && /* @__PURE__ */
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
children: /* @__PURE__ */ T("div", {
|
|
181
|
-
className: f["SubdomainNavBar-button-area-inner"],
|
|
182
|
-
children: _.Children.toArray(i).map((e) => _.isValidElement(e) && (e.type === j || e.type === M) ? e : null).filter(Boolean)
|
|
263
|
+
!z && /* @__PURE__ */ w("div", {
|
|
264
|
+
id: be,
|
|
265
|
+
className: e(u["SubdomainNavBar-menu-wrapper"], L && u["SubdomainNavBar-menu-wrapper--close"]),
|
|
266
|
+
children: [!L && /* @__PURE__ */ w("div", { children: [Q && /* @__PURE__ */ C("div", {
|
|
267
|
+
className: u["SubdomainNavBar-leading-component"],
|
|
268
|
+
children: k
|
|
269
|
+
}), K && /* @__PURE__ */ C(d.Provider, {
|
|
270
|
+
value: { onLinkClick: W },
|
|
271
|
+
children: pe ? /* @__PURE__ */ C("ul", {
|
|
272
|
+
className: u["SubdomainNavBar-primary-nav-list--visible"],
|
|
273
|
+
children: q
|
|
274
|
+
}) : /* @__PURE__ */ C(te, {
|
|
275
|
+
className: e(u["SubdomainNavBar-primary-nav-list--visible"]),
|
|
276
|
+
overflowMenuLabel: H.overflowMenuLabel,
|
|
277
|
+
children: q
|
|
183
278
|
})
|
|
279
|
+
})] }), !L && (Y || $) && /* @__PURE__ */ w("div", {
|
|
280
|
+
className: e(u["SubdomainNavBar-menu-wrapper-footer"], (K || Q) && u["SubdomainNavBar-menu-wrapper-footer--has-leading-item"]),
|
|
281
|
+
children: [$ && /* @__PURE__ */ C("div", {
|
|
282
|
+
className: u["SubdomainNavBar-trailing-component"],
|
|
283
|
+
children: j
|
|
284
|
+
}), Y && /* @__PURE__ */ C("div", {
|
|
285
|
+
className: e(u["SubdomainNavBar-button-area"], u["SubdomainNavBar-button-area--visible"]),
|
|
286
|
+
children: /* @__PURE__ */ C("div", {
|
|
287
|
+
className: u["SubdomainNavBar-button-area-inner"],
|
|
288
|
+
children: /* @__PURE__ */ C(E.Provider, {
|
|
289
|
+
value: pe ? "small" : "medium",
|
|
290
|
+
children: De
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
})]
|
|
184
294
|
})]
|
|
185
295
|
})
|
|
186
296
|
]
|
|
187
297
|
})
|
|
188
298
|
]
|
|
189
|
-
})
|
|
299
|
+
}), !z && !L && /* @__PURE__ */ C("div", {
|
|
300
|
+
className: u["SubdomainNavBar-menu-backdrop"],
|
|
301
|
+
"aria-hidden": "true"
|
|
302
|
+
})]
|
|
190
303
|
})]
|
|
191
|
-
}),
|
|
192
|
-
|
|
304
|
+
}), /* @__PURE__ */ C("div", {
|
|
305
|
+
ref: _e,
|
|
306
|
+
id: ve,
|
|
193
307
|
tabIndex: -1
|
|
194
308
|
})] });
|
|
195
|
-
}
|
|
196
|
-
function
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
...
|
|
200
|
-
|
|
309
|
+
});
|
|
310
|
+
function A({ href: t, className: n, children: r, isExternal: i, "aria-current": a, "aria-hidden": o, tabIndex: ee, ...c }) {
|
|
311
|
+
let { isOverflowed: l, onLinkClick: d } = f();
|
|
312
|
+
return /* @__PURE__ */ C("li", {
|
|
313
|
+
...c,
|
|
314
|
+
"aria-hidden": l ? !0 : o,
|
|
315
|
+
className: e(u["SubdomainNavBar-primary-nav-list-item"], n),
|
|
316
|
+
tabIndex: l ? -1 : ee,
|
|
317
|
+
children: /* @__PURE__ */ C("a", {
|
|
201
318
|
href: t,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
319
|
+
"aria-current": a,
|
|
320
|
+
className: u["SubdomainNavBar-link"],
|
|
321
|
+
onClick: d,
|
|
322
|
+
tabIndex: l ? -1 : void 0,
|
|
323
|
+
children: /* @__PURE__ */ w("span", {
|
|
324
|
+
className: u["SubdomainNavBar-link-content"],
|
|
325
|
+
children: [/* @__PURE__ */ C("span", {
|
|
326
|
+
className: u["SubdomainNavBar-link-text"],
|
|
327
|
+
children: r
|
|
328
|
+
}), i && /* @__PURE__ */ C(s, {
|
|
329
|
+
size: 16,
|
|
330
|
+
"aria-label": "External link"
|
|
331
|
+
})]
|
|
332
|
+
})
|
|
210
333
|
})
|
|
211
334
|
});
|
|
212
335
|
}
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
children: [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
children: "Search"
|
|
275
|
-
}), /* @__PURE__ */ T(h, {
|
|
276
|
-
ref: _,
|
|
277
|
-
className: e(f["SubdomainNavBar-search-text-input"]),
|
|
278
|
-
name: "search",
|
|
279
|
-
role: "combobox",
|
|
280
|
-
"aria-expanded": k,
|
|
281
|
-
"aria-controls": "listbox-search-results",
|
|
282
|
-
placeholder: `Search ${r}`,
|
|
283
|
-
onChange: p,
|
|
284
|
-
defaultValue: s,
|
|
285
|
-
invisible: !0,
|
|
286
|
-
leadingVisual: /* @__PURE__ */ T(l, { size: 16 }),
|
|
287
|
-
"aria-activedescendant": x === -1 ? void 0 : `subdomainnavbar-search-result-${x}`,
|
|
288
|
-
onKeyDown: P
|
|
336
|
+
var j = {
|
|
337
|
+
searchLabel: "Search",
|
|
338
|
+
closeLabel: "Close",
|
|
339
|
+
resultsLabel: "Results",
|
|
340
|
+
searchResultsLabel: "Search results",
|
|
341
|
+
formatSearchWithTitle: (e) => `Search ${e}`,
|
|
342
|
+
formatSearchTrigger: (e) => `${e} search`,
|
|
343
|
+
formatResultsHeading: (e) => `Results for “${e}”`,
|
|
344
|
+
formatResultsLabel: (e) => `Results for ${e}`,
|
|
345
|
+
formatSuggestions: (e) => `${e} suggestions.`
|
|
346
|
+
}, M = h(({ active: t, className: r, title: i, searchResults: o, searchTerm: s, onSearchOpen: ee, onSearchClose: l, onSubmit: d, onChange: f, placeholder: te, shortcutLabel: ne, keyboardShortcut: re, labels: m }, h) => {
|
|
347
|
+
let v = b(null), y = b(null), x = {
|
|
348
|
+
...j,
|
|
349
|
+
...m
|
|
350
|
+
}, T = te ?? (i ? x.formatSearchWithTitle(i) : x.searchLabel), E = i ? x.formatSearchWithTitle(i) : x.searchLabel, O = ne ?? (re || ""), { activeDescendant: k, handleSearchResultKeyDown: A, hasGroupedSearchResults: M, hasSearchResults: N, normalizedSearchResultGroups: P, resetActiveDescendant: F, searchResultsLength: oe } = ie({
|
|
351
|
+
dialogRef: v,
|
|
352
|
+
searchResults: o
|
|
353
|
+
}), I = g(() => {
|
|
354
|
+
l?.(), F();
|
|
355
|
+
}, [l, F]), se = g((e) => {
|
|
356
|
+
if (y.current = e, typeof h == "function") {
|
|
357
|
+
h(e);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
h && (h.current = e);
|
|
361
|
+
}, [h]);
|
|
362
|
+
_(() => {
|
|
363
|
+
let e = v.current;
|
|
364
|
+
if (e) {
|
|
365
|
+
if (t) {
|
|
366
|
+
e.open || (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", "")), y.current?.focus();
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
e.open && (typeof e.close == "function" ? e.close() : e.removeAttribute("open"));
|
|
370
|
+
}
|
|
371
|
+
}, [t, y]), _(() => {
|
|
372
|
+
let e = v.current;
|
|
373
|
+
if (!e) return;
|
|
374
|
+
let t = (t) => {
|
|
375
|
+
if (t.target !== e) return;
|
|
376
|
+
let n = e.getBoundingClientRect();
|
|
377
|
+
t.clientX >= n.left && t.clientX <= n.right && t.clientY >= n.top && t.clientY <= n.bottom || I();
|
|
378
|
+
};
|
|
379
|
+
return e.addEventListener("click", t), () => e.removeEventListener("click", t);
|
|
380
|
+
}, [I]);
|
|
381
|
+
let ce = g((e) => {
|
|
382
|
+
e.preventDefault(), I();
|
|
383
|
+
}, [I]), L = ({ result: e, index: t }) => /* @__PURE__ */ w("li", {
|
|
384
|
+
className: u["SubdomainNavBar-search-result-item"],
|
|
385
|
+
role: "presentation",
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ C("div", {
|
|
388
|
+
className: u["SubdomainNavBar-search-result-item-container"],
|
|
389
|
+
children: /* @__PURE__ */ w("a", {
|
|
390
|
+
id: `subdomainnavbar-search-result-${t}`,
|
|
391
|
+
href: e.url,
|
|
392
|
+
role: "option",
|
|
393
|
+
"aria-selected": t === k,
|
|
394
|
+
children: [/* @__PURE__ */ C("span", { children: e.title }), M && e.isExternal && /* @__PURE__ */ C(a, {
|
|
395
|
+
size: 20,
|
|
396
|
+
"aria-hidden": "true"
|
|
289
397
|
})]
|
|
290
398
|
})
|
|
291
|
-
}),
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ C(n, {
|
|
401
|
+
as: "p",
|
|
402
|
+
size: "200",
|
|
403
|
+
id: `subdomainnavbar-search-result-item-desc${t}`,
|
|
404
|
+
className: u["SubdomainNavBar-search-result-item-desc"],
|
|
405
|
+
children: e.description
|
|
406
|
+
}),
|
|
407
|
+
/* @__PURE__ */ w("div", {
|
|
408
|
+
className: u["SubdomainNavBar-search-result-item-meta"],
|
|
409
|
+
children: [/* @__PURE__ */ C(n, {
|
|
410
|
+
size: "100",
|
|
411
|
+
className: u["SubdomainNavBar-search-result-item-desc"],
|
|
412
|
+
children: e.date
|
|
413
|
+
}), e.category && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(n, {
|
|
414
|
+
size: "100",
|
|
415
|
+
className: u["SubdomainNavBar-search-result-item-desc"],
|
|
416
|
+
children: [
|
|
417
|
+
" ",
|
|
418
|
+
"•",
|
|
419
|
+
" "
|
|
420
|
+
]
|
|
421
|
+
}), /* @__PURE__ */ C(n, {
|
|
422
|
+
size: "100",
|
|
423
|
+
className: u["SubdomainNavBar-search-result-item-desc"],
|
|
424
|
+
children: e.category
|
|
425
|
+
})] })]
|
|
426
|
+
})
|
|
427
|
+
]
|
|
428
|
+
}, `${e.title}-${t}`);
|
|
429
|
+
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
430
|
+
className: e(u["SubdomainNavBar-search-trigger"], r),
|
|
431
|
+
children: /* @__PURE__ */ w("button", {
|
|
432
|
+
"aria-label": x.formatSearchTrigger(T),
|
|
433
|
+
className: u["SubdomainNavBar-search-input-button"],
|
|
434
|
+
onClick: ee,
|
|
435
|
+
"data-testid": "toggle-search",
|
|
436
|
+
type: "button",
|
|
437
|
+
children: [/* @__PURE__ */ w("span", {
|
|
438
|
+
className: u["SubdomainNavBar-search-input-button-placeholder"],
|
|
439
|
+
children: [/* @__PURE__ */ C(c, {
|
|
440
|
+
"aria-hidden": "true",
|
|
441
|
+
size: 16
|
|
442
|
+
}), /* @__PURE__ */ C("span", { children: T })]
|
|
443
|
+
}), O && /* @__PURE__ */ C("span", {
|
|
444
|
+
className: u["SubdomainNavBar-search-input-button-shortcut"],
|
|
445
|
+
children: O
|
|
296
446
|
})]
|
|
297
|
-
})
|
|
447
|
+
})
|
|
448
|
+
}), /* @__PURE__ */ C("dialog", {
|
|
449
|
+
ref: v,
|
|
450
|
+
"aria-label": E,
|
|
451
|
+
className: e(u["SubdomainNavBar-search-dialog"], N && u["SubdomainNavBar-search-dialog--has-results"]),
|
|
452
|
+
onCancel: ce,
|
|
453
|
+
children: t && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
|
|
454
|
+
className: e(u["SubdomainNavBar-search-dialog-control-area"]),
|
|
455
|
+
children: /* @__PURE__ */ w("div", {
|
|
456
|
+
className: u["SubdomainNavBar-search-input-area"],
|
|
457
|
+
children: [/* @__PURE__ */ C("form", {
|
|
458
|
+
className: e(u["SubdomainNavBar-search-form"]),
|
|
459
|
+
onSubmit: d,
|
|
460
|
+
role: "search",
|
|
461
|
+
children: /* @__PURE__ */ w(p, {
|
|
462
|
+
fullWidth: !0,
|
|
463
|
+
size: "medium",
|
|
464
|
+
children: [/* @__PURE__ */ C(p.Label, {
|
|
465
|
+
visuallyHidden: !0,
|
|
466
|
+
children: x.searchLabel
|
|
467
|
+
}), /* @__PURE__ */ C(ae, {
|
|
468
|
+
ref: se,
|
|
469
|
+
className: e(u["SubdomainNavBar-search-text-input"]),
|
|
470
|
+
name: "search",
|
|
471
|
+
role: "combobox",
|
|
472
|
+
autoComplete: "off",
|
|
473
|
+
"aria-autocomplete": "list",
|
|
474
|
+
"aria-expanded": N,
|
|
475
|
+
"aria-controls": "listbox-search-results",
|
|
476
|
+
placeholder: T,
|
|
477
|
+
onChange: f,
|
|
478
|
+
defaultValue: s,
|
|
479
|
+
invisible: !0,
|
|
480
|
+
leadingVisual: /* @__PURE__ */ C(c, { size: 16 }),
|
|
481
|
+
"aria-activedescendant": k === -1 ? void 0 : `subdomainnavbar-search-result-${k}`,
|
|
482
|
+
onKeyDown: A
|
|
483
|
+
})]
|
|
484
|
+
})
|
|
485
|
+
}), /* @__PURE__ */ C("button", {
|
|
486
|
+
"aria-label": x.closeLabel,
|
|
487
|
+
className: u["SubdomainNavBar-search-close-button"],
|
|
488
|
+
onClick: I,
|
|
489
|
+
type: "button",
|
|
490
|
+
children: x.closeLabel
|
|
491
|
+
})]
|
|
492
|
+
})
|
|
493
|
+
}), /* @__PURE__ */ w("div", {
|
|
298
494
|
id: "listbox-search-results",
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
495
|
+
className: e(u["SubdomainNavBar-search-results-area"], N && u["SubdomainNavBar-search-results-area--visible"]),
|
|
496
|
+
children: [N && /* @__PURE__ */ w("div", {
|
|
497
|
+
className: e(u["SubdomainNavBar-search-results-container"]),
|
|
498
|
+
children: [!M && /* @__PURE__ */ C(n, {
|
|
302
499
|
id: "subdomainnavbar-search-results-heading",
|
|
303
|
-
className:
|
|
304
|
-
children:
|
|
305
|
-
|
|
306
|
-
s,
|
|
307
|
-
"”"
|
|
308
|
-
]
|
|
309
|
-
}), /* @__PURE__ */ T("ul", {
|
|
500
|
+
className: u["SubdomainNavBar-search-results-heading"],
|
|
501
|
+
children: x.formatResultsHeading(s ?? "")
|
|
502
|
+
}), /* @__PURE__ */ C("ul", {
|
|
310
503
|
role: "listbox",
|
|
311
504
|
tabIndex: 0,
|
|
312
|
-
"aria-labelledby": "subdomainnavbar-search-results-heading",
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}),
|
|
334
|
-
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(n, {
|
|
335
|
-
size: "100",
|
|
336
|
-
className: f["SubdomainNavBar-search-result-item-desc"],
|
|
337
|
-
children: e.date
|
|
338
|
-
}), e.category && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(n, {
|
|
339
|
-
size: "100",
|
|
340
|
-
className: f["SubdomainNavBar-search-result-item-desc"],
|
|
341
|
-
children: [
|
|
342
|
-
" ",
|
|
343
|
-
"•",
|
|
344
|
-
" "
|
|
345
|
-
]
|
|
346
|
-
}), /* @__PURE__ */ T(n, {
|
|
347
|
-
size: "100",
|
|
348
|
-
className: f["SubdomainNavBar-search-result-item-desc"],
|
|
349
|
-
children: e.category
|
|
350
|
-
})] })] })
|
|
351
|
-
]
|
|
352
|
-
}, `${e.title}-${t}`))
|
|
505
|
+
"aria-labelledby": M ? void 0 : "subdomainnavbar-search-results-heading",
|
|
506
|
+
"aria-label": M ? s ? x.formatResultsLabel(s) : x.searchResultsLabel : void 0,
|
|
507
|
+
className: e(u["SubdomainNavBar-search-results"]),
|
|
508
|
+
children: M ? P.map((e, t) => {
|
|
509
|
+
let r = `subdomainnavbar-search-result-group-${t}`;
|
|
510
|
+
return /* @__PURE__ */ w("li", {
|
|
511
|
+
className: u["SubdomainNavBar-search-result-group"],
|
|
512
|
+
role: "presentation",
|
|
513
|
+
children: [e.title && /* @__PURE__ */ C(n, {
|
|
514
|
+
id: r,
|
|
515
|
+
className: u["SubdomainNavBar-search-result-group-heading"],
|
|
516
|
+
children: e.title
|
|
517
|
+
}), /* @__PURE__ */ C("ul", {
|
|
518
|
+
className: u["SubdomainNavBar-search-result-group-list"],
|
|
519
|
+
role: "group",
|
|
520
|
+
"aria-labelledby": e.title ? r : void 0,
|
|
521
|
+
"aria-label": e.title ? void 0 : x.resultsLabel,
|
|
522
|
+
children: e.results.map(L)
|
|
523
|
+
})]
|
|
524
|
+
}, e.title ?? `ungrouped-${t}`);
|
|
525
|
+
}) : P.flatMap((e) => e.results.map(L))
|
|
353
526
|
})]
|
|
354
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ w("div", {
|
|
355
528
|
"aria-live": "polite",
|
|
356
529
|
"aria-atomic": "true",
|
|
357
530
|
"data-testid": D.liveRegion,
|
|
358
531
|
className: "visually-hidden",
|
|
359
|
-
children: [
|
|
532
|
+
children: [x.formatSuggestions(oe), /* @__PURE__ */ C("span", { children: "\xA0" })]
|
|
360
533
|
})]
|
|
361
|
-
})]
|
|
534
|
+
})] })
|
|
362
535
|
})] });
|
|
363
536
|
});
|
|
364
|
-
|
|
365
|
-
|
|
537
|
+
k.displayName = "SubdomainNavBar";
|
|
538
|
+
function N({ children: t, href: n, ...i }) {
|
|
539
|
+
let a = m.useContext(E);
|
|
540
|
+
return /* @__PURE__ */ C(r, {
|
|
366
541
|
as: "a",
|
|
367
542
|
href: n,
|
|
368
|
-
className: e(
|
|
543
|
+
className: e(u["SubdomainNavBar-cta-button"]),
|
|
369
544
|
variant: "primary",
|
|
370
|
-
size:
|
|
545
|
+
size: a,
|
|
371
546
|
...i,
|
|
372
547
|
children: t
|
|
373
548
|
});
|
|
374
549
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
550
|
+
function P({ children: t, href: n, ...i }) {
|
|
551
|
+
let a = m.useContext(E);
|
|
552
|
+
return /* @__PURE__ */ C(r, {
|
|
377
553
|
as: "a",
|
|
378
554
|
href: n,
|
|
379
|
-
className: e(
|
|
380
|
-
size:
|
|
555
|
+
className: e(u["SubdomainNavBar-cta-button"], u["SubdomainNavBar-cta-button--secondary"]),
|
|
556
|
+
size: a,
|
|
381
557
|
...i,
|
|
382
558
|
children: t
|
|
383
559
|
});
|
|
384
560
|
}
|
|
385
|
-
var
|
|
386
|
-
Link:
|
|
387
|
-
Search:
|
|
388
|
-
PrimaryAction:
|
|
389
|
-
SecondaryAction:
|
|
561
|
+
var F = Object.assign(k, {
|
|
562
|
+
Link: A,
|
|
563
|
+
Search: M,
|
|
564
|
+
PrimaryAction: N,
|
|
565
|
+
SecondaryAction: P,
|
|
390
566
|
testIds: D
|
|
391
567
|
});
|
|
392
568
|
//#endregion
|
|
393
|
-
export {
|
|
569
|
+
export { F as SubdomainNavBar };
|
|
394
570
|
|
|
395
571
|
//# sourceMappingURL=SubdomainNavBar.js.map
|