@primer/react-brand 0.70.0-rc.138127ad → 0.70.0-rc.88de47fc
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/NavList/index.md +210 -0
- package/docs/components/index.md +1 -0
- package/docs/index.md +3 -2
- package/esm/NavList/NavList.d.ts +86 -0
- package/esm/NavList/NavList.d.ts.map +1 -0
- package/esm/NavList/NavList.js +277 -0
- package/esm/NavList/NavList.js.map +1 -0
- package/esm/NavList/NavList.module-CZFnt8br.css +1 -0
- package/esm/NavList/NavList.module.js +32 -0
- package/esm/NavList/NavList.module.js.map +1 -0
- package/esm/NavList/index.d.ts +2 -0
- package/esm/NavList/index.d.ts.map +1 -0
- package/esm/Token/Token.js +0 -1
- package/esm/Token/Token.js.map +1 -1
- package/esm/Token/{Token.module-BcKU1KwK.css → Token.module-DtWE9IPI.css} +1 -1
- package/esm/Token/Token.module.js +1 -1
- package/esm/Token/Token.module.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +12 -11
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes-CGyt2t8f.css +1 -0
- package/lib/NavList/NavList.d.ts +85 -0
- package/lib/NavList/index.d.ts +1 -0
- package/lib/css/main.css +606 -69
- 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/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-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 +13 -0
- 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 +1 -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/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/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/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-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/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/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/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-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/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/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/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-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/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/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/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-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/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.d.ts +1 -0
- package/lib/index.js +1 -1
- package/llms.txt +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NavList
|
|
3
|
+
description: Use NavList to render vertical navigation with optional expandable groups.
|
|
4
|
+
keywords: ['navigation', 'vertical navigation', 'sidebar', 'nested navigation']
|
|
5
|
+
ready: true
|
|
6
|
+
source: https://github.com/primer/brand/tree/main/packages/react/src/NavList/NavList.tsx
|
|
7
|
+
storybook: '/brand/storybook/?path=/story/components-navlist--playground'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import {NavList} from '@primer/react-brand'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
|
+
### Default
|
|
17
|
+
|
|
18
|
+
```jsx
|
|
19
|
+
<NavList aria-label="Docs navigation">
|
|
20
|
+
<NavList.Item href="#" aria-current="page">
|
|
21
|
+
Overview
|
|
22
|
+
</NavList.Item>
|
|
23
|
+
<NavList.Item href="#">Quickstart</NavList.Item>
|
|
24
|
+
<NavList.Item href="#">Install GitHub Copilot</NavList.Item>
|
|
25
|
+
<NavList.Item href="#">Configure your editor</NavList.Item>
|
|
26
|
+
<NavList.Item href="#">Manage policies</NavList.Item>
|
|
27
|
+
<NavList.Item href="#">Troubleshooting</NavList.Item>
|
|
28
|
+
</NavList>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Groups
|
|
32
|
+
|
|
33
|
+
Use `NavList.Group` to organize related navigation items into labelled groups.
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
<NavList aria-label="Section navigation">
|
|
37
|
+
<NavList.Group title="Products">
|
|
38
|
+
<NavList.Item href="#" aria-current="page">
|
|
39
|
+
Copilot
|
|
40
|
+
</NavList.Item>
|
|
41
|
+
<NavList.Item href="#">Codespaces</NavList.Item>
|
|
42
|
+
<NavList.Item href="#">Actions</NavList.Item>
|
|
43
|
+
<NavList.Item href="#">Packages</NavList.Item>
|
|
44
|
+
</NavList.Group>
|
|
45
|
+
<NavList.Group title="Collaboration">
|
|
46
|
+
<NavList.Item href="#">Pull requests</NavList.Item>
|
|
47
|
+
<NavList.Item href="#">Issues</NavList.Item>
|
|
48
|
+
<NavList.Item href="#">Discussions</NavList.Item>
|
|
49
|
+
</NavList.Group>
|
|
50
|
+
<NavList.Group title="Security">
|
|
51
|
+
<NavList.Item href="#">Overview</NavList.Item>
|
|
52
|
+
<NavList.Item href="#">Secret scanning</NavList.Item>
|
|
53
|
+
<NavList.Item href="#">Code scanning</NavList.Item>
|
|
54
|
+
</NavList.Group>
|
|
55
|
+
</NavList>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Nested disclosure
|
|
59
|
+
|
|
60
|
+
Add `NavList.SubNav` to a `NavList.Item` when an item needs to expand and collapse nested navigation links.
|
|
61
|
+
|
|
62
|
+
```jsx
|
|
63
|
+
<NavList aria-label="Nested navigation">
|
|
64
|
+
<NavList.Group title="Collaboration">
|
|
65
|
+
<NavList.Item defaultExpanded>
|
|
66
|
+
Pull requests
|
|
67
|
+
<NavList.SubNav>
|
|
68
|
+
<NavList.Item href="#" aria-current="page">
|
|
69
|
+
Review pull requests
|
|
70
|
+
</NavList.Item>
|
|
71
|
+
<NavList.Item href="#">Use suggested changes</NavList.Item>
|
|
72
|
+
<NavList.Item href="#">Configure rulesets</NavList.Item>
|
|
73
|
+
</NavList.SubNav>
|
|
74
|
+
</NavList.Item>
|
|
75
|
+
<NavList.Item>
|
|
76
|
+
Branches
|
|
77
|
+
<NavList.SubNav>
|
|
78
|
+
<NavList.Item href="#">Overview</NavList.Item>
|
|
79
|
+
<NavList.Item href="#">Protection rules</NavList.Item>
|
|
80
|
+
</NavList.SubNav>
|
|
81
|
+
</NavList.Item>
|
|
82
|
+
</NavList.Group>
|
|
83
|
+
</NavList>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Up to five navigation levels
|
|
87
|
+
|
|
88
|
+
`NavList` can include up to five levels when a page hierarchy requires it. Use the fewest levels needed; levels one through four can optionally expand or collapse, and level five is reserved for leaf article links.
|
|
89
|
+
|
|
90
|
+
```jsx
|
|
91
|
+
<NavList aria-label="Five-level navigation">
|
|
92
|
+
<NavList.Item defaultExpanded>
|
|
93
|
+
GitHub Copilot
|
|
94
|
+
<NavList.SubNav>
|
|
95
|
+
<NavList.Item defaultExpanded>
|
|
96
|
+
Guides
|
|
97
|
+
<NavList.SubNav>
|
|
98
|
+
<NavList.Item defaultExpanded>
|
|
99
|
+
Agents
|
|
100
|
+
<NavList.SubNav>
|
|
101
|
+
<NavList.Item defaultExpanded>
|
|
102
|
+
Build an agent
|
|
103
|
+
<NavList.SubNav>
|
|
104
|
+
<NavList.Item href="#" aria-current="page">
|
|
105
|
+
Create a tool
|
|
106
|
+
</NavList.Item>
|
|
107
|
+
<NavList.Item href="#">Add memory</NavList.Item>
|
|
108
|
+
<NavList.Item href="#">Debug prompts</NavList.Item>
|
|
109
|
+
<NavList.Item href="#">Deploy safely</NavList.Item>
|
|
110
|
+
</NavList.SubNav>
|
|
111
|
+
</NavList.Item>
|
|
112
|
+
<NavList.Item href="#">Customize an agent</NavList.Item>
|
|
113
|
+
<NavList.Item href="#">Debug an agent</NavList.Item>
|
|
114
|
+
</NavList.SubNav>
|
|
115
|
+
</NavList.Item>
|
|
116
|
+
<NavList.Item>
|
|
117
|
+
Extensions
|
|
118
|
+
<NavList.SubNav>
|
|
119
|
+
<NavList.Item href="#">Install an extension</NavList.Item>
|
|
120
|
+
<NavList.Item href="#">Publish an extension</NavList.Item>
|
|
121
|
+
<NavList.Item href="#">Manage permissions</NavList.Item>
|
|
122
|
+
</NavList.SubNav>
|
|
123
|
+
</NavList.Item>
|
|
124
|
+
</NavList.SubNav>
|
|
125
|
+
</NavList.Item>
|
|
126
|
+
<NavList.Item>
|
|
127
|
+
Administration
|
|
128
|
+
<NavList.SubNav>
|
|
129
|
+
<NavList.Item href="#">Overview</NavList.Item>
|
|
130
|
+
<NavList.Item href="#">Policies</NavList.Item>
|
|
131
|
+
<NavList.Item href="#">Audit log</NavList.Item>
|
|
132
|
+
</NavList.SubNav>
|
|
133
|
+
</NavList.Item>
|
|
134
|
+
</NavList.SubNav>
|
|
135
|
+
</NavList.Item>
|
|
136
|
+
<NavList.Item>
|
|
137
|
+
Code review
|
|
138
|
+
<NavList.SubNav>
|
|
139
|
+
<NavList.Item href="#">Overview</NavList.Item>
|
|
140
|
+
<NavList.Item href="#">Review pull requests</NavList.Item>
|
|
141
|
+
<NavList.Item href="#">Use suggested changes</NavList.Item>
|
|
142
|
+
</NavList.SubNav>
|
|
143
|
+
</NavList.Item>
|
|
144
|
+
</NavList>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### With visuals
|
|
148
|
+
|
|
149
|
+
Use `leadingVisual` and `trailingVisual` to add icons to the label area. Visuals are additive: they do not replace disclosure triangles, change item sizing, or move the active and inactive row alignment.
|
|
150
|
+
|
|
151
|
+
```jsx
|
|
152
|
+
<NavList aria-label="Visual navigation">
|
|
153
|
+
<NavList.Item href="#" aria-current="page" leadingVisual={BookIcon} trailingVisual={<KebabHorizontalIcon />}>
|
|
154
|
+
GitHub Copilot
|
|
155
|
+
</NavList.Item>
|
|
156
|
+
</NavList>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Accessibility
|
|
160
|
+
|
|
161
|
+
Give each `NavList` a clear `aria-label`, especially when the page includes more than one navigation landmark.
|
|
162
|
+
|
|
163
|
+
Use `aria-current="page"` on the link for the current page. Only apply `aria-current` to leaf items that navigate somewhere, not to disclosure rows with nested items.
|
|
164
|
+
|
|
165
|
+
Keep group titles and disclosure labels short and descriptive. Items with `NavList.SubNav` must include visible label text so people can understand what will expand.
|
|
166
|
+
|
|
167
|
+
## Component props
|
|
168
|
+
|
|
169
|
+
### NavList `Required`
|
|
170
|
+
|
|
171
|
+
| name | type | default | required | description |
|
|
172
|
+
| ----------------- | ----------- | ------- | -------- | ----------------------------------------------------- |
|
|
173
|
+
| `children` | `ReactNode` | | `true` | `NavList.Item` and `NavList.Group` nodes |
|
|
174
|
+
| `aria-label` | `string` | | `true` | Accessible label for the navigation landmark |
|
|
175
|
+
| `aria-labelledby` | `string` | | `false` | ID of the element that labels the navigation landmark |
|
|
176
|
+
| `className` | `string` | | `false` | Sets a custom class on the `nav` element |
|
|
177
|
+
|
|
178
|
+
Forwards all standard HTML attributes for `<nav>` elements.
|
|
179
|
+
|
|
180
|
+
### NavList.Item `Required`
|
|
181
|
+
|
|
182
|
+
| name | type | default | required | description |
|
|
183
|
+
| ------------------ | ------------------------------------------------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
184
|
+
| `as` | `'a' \| 'button'` | `'a'` | `false` | Element used for leaf items |
|
|
185
|
+
| `children` | `ReactNode` | | `true` | Item label and optional `NavList.SubNav` for nested disclosure |
|
|
186
|
+
| `href` | `string` | | `false` | URL for leaf items when rendering as an anchor |
|
|
187
|
+
| `aria-current` | `'page' \| 'step' \| 'location' \| 'date' \| 'time' \| 'true' \| 'false'` | | `false` | Marks a leaf item as current |
|
|
188
|
+
| `defaultExpanded` | `boolean` | `false` | `false` | Opens nested `NavList.SubNav` by default |
|
|
189
|
+
| `expanded` | `boolean` | | `false` | Controls the nested `NavList.SubNav` expanded state |
|
|
190
|
+
| `onExpandedChange` | `(expanded) => void` | | `false` | Called when the nested `NavList.SubNav` expanded state changes |
|
|
191
|
+
| `leadingVisual` | `ReactElement \| Icon` | | `false` | Visual rendered before the label |
|
|
192
|
+
| `trailingVisual` | `ReactElement \| Icon` | | `false` | Visual rendered after the label |
|
|
193
|
+
| `disabled` | `boolean` | `false` | `false` | Disables the item. Leaf links receive `aria-disabled`; disclosure buttons receive disabled |
|
|
194
|
+
|
|
195
|
+
Forwards props to the rendered leaf link or disclosure button.
|
|
196
|
+
|
|
197
|
+
### NavList.Group
|
|
198
|
+
|
|
199
|
+
| name | type | default | required | description |
|
|
200
|
+
| ----------- | ----------- | ------- | -------- | ------------------------------------------ |
|
|
201
|
+
| `title` | `ReactNode` | | `false` | Heading text for the group |
|
|
202
|
+
| `children` | `ReactNode` | | `true` | `NavList.Item` nodes |
|
|
203
|
+
| `className` | `string` | | `false` | Sets a custom class on the group list item |
|
|
204
|
+
|
|
205
|
+
### NavList.SubNav
|
|
206
|
+
|
|
207
|
+
| name | type | default | required | description |
|
|
208
|
+
| ----------- | ----------- | ------- | -------- | -------------------------------------- |
|
|
209
|
+
| `children` | `ReactNode` | | `true` | Nested `NavList.Item` nodes |
|
|
210
|
+
| `className` | `string` | | `false` | Sets a custom class on the nested `ul` |
|
package/docs/components/index.md
CHANGED
|
@@ -28,6 +28,7 @@ description: Primer Brand UI components
|
|
|
28
28
|
- [Logo suite](LogoSuite/react.md): Use a logo suite to present a list logos, such as sponsors or vendors.
|
|
29
29
|
- [Media playlist](MediaPlaylist/index.md): Use MediaPlaylist to pair thumbnail-backed media items with a shared playback or media area.
|
|
30
30
|
- [Minimal footer](MinimalFooter/index.md): Use the minimal footer component to provide a global footer featuring legal links, GitHub logomarks and footnotes.
|
|
31
|
+
- [NavList](NavList/index.md): Use NavList to render vertical navigation with optional expandable groups.
|
|
31
32
|
- [Ordered list](OrderedList/react.md): Use the ordered list component to display a list of numbered items.
|
|
32
33
|
- [Pagination](Pagination/index.md): Use Pagination to display a sequence of links that allow navigation to discrete, related pages.
|
|
33
34
|
- [Pillar](Pillar/react.md): Use the pillar component to group related content together.
|
package/docs/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Primer Brand docs (v0.70.0-rc.
|
|
1
|
+
# Primer Brand docs (v0.70.0-rc.88de47fc)
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@primer/react-brand@0.70.0-rc.
|
|
3
|
+
These docs are bundled with `@primer/react-brand@0.70.0-rc.88de47fc` and match your installed version.
|
|
4
4
|
|
|
5
5
|
New here? Start with [Getting started](getting-started/index.md) for installation, global
|
|
6
6
|
stylesheet and font setup. Component directories are named after their import (e.g.
|
|
@@ -61,6 +61,7 @@ stylesheet and font setup. Component directories are named after their import (e
|
|
|
61
61
|
- [Logo suite](components/LogoSuite/react.md): Use a logo suite to present a list logos, such as sponsors or vendors.
|
|
62
62
|
- [Media playlist](components/MediaPlaylist/index.md): Use MediaPlaylist to pair thumbnail-backed media items with a shared playback or media area.
|
|
63
63
|
- [Minimal footer](components/MinimalFooter/index.md): Use the minimal footer component to provide a global footer featuring legal links, GitHub logomarks and footnotes.
|
|
64
|
+
- [NavList](components/NavList/index.md): Use NavList to render vertical navigation with optional expandable groups.
|
|
64
65
|
- [Ordered list](components/OrderedList/react.md): Use the ordered list component to display a list of numbered items.
|
|
65
66
|
- [Pagination](components/Pagination/index.md): Use Pagination to display a sequence of links that allow navigation to discrete, related pages.
|
|
66
67
|
- [Pillar](components/Pillar/react.md): Use the pillar component to group related content together.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { type PropsWithChildren, type ReactElement, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type Icon } from '@primer/octicons-react';
|
|
3
|
+
import type { BaseProps } from '../component-helpers';
|
|
4
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css';
|
|
5
|
+
export type NavListRootProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Accessible label for the navigation landmark.
|
|
8
|
+
*/
|
|
9
|
+
'aria-label': string;
|
|
10
|
+
/**
|
|
11
|
+
* ID of an element that labels the navigation landmark.
|
|
12
|
+
*/
|
|
13
|
+
'aria-labelledby'?: string;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
'data-testid'?: string;
|
|
16
|
+
} & BaseProps<HTMLElement> & Omit<React.HTMLAttributes<HTMLElement>, 'aria-label' | 'aria-labelledby'>;
|
|
17
|
+
type Visual = ReactElement | React.ElementType | Icon;
|
|
18
|
+
type NavListItemAs = 'a' | 'button';
|
|
19
|
+
type NavListItemBaseProps = {
|
|
20
|
+
/**
|
|
21
|
+
* Leading visual rendered before the item label.
|
|
22
|
+
*/
|
|
23
|
+
leadingVisual?: Visual;
|
|
24
|
+
/**
|
|
25
|
+
* Trailing visual rendered after the item label.
|
|
26
|
+
*/
|
|
27
|
+
trailingVisual?: Visual;
|
|
28
|
+
/**
|
|
29
|
+
* Whether nested items should be expanded by default.
|
|
30
|
+
*/
|
|
31
|
+
defaultExpanded?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Controls the nested item expanded state.
|
|
34
|
+
*/
|
|
35
|
+
expanded?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Called when a nested item is expanded or collapsed.
|
|
38
|
+
*/
|
|
39
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Marks the item as disabled. Disabled link items receive `aria-disabled`.
|
|
42
|
+
*/
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
'data-testid'?: string;
|
|
45
|
+
};
|
|
46
|
+
export type NavListItemProps<C extends NavListItemAs = 'a'> = {
|
|
47
|
+
as?: C;
|
|
48
|
+
} & NavListItemBaseProps & PropsWithChildren<BaseProps<HTMLElement>> & Omit<React.ComponentPropsWithoutRef<C>, keyof NavListItemBaseProps | keyof BaseProps<HTMLElement> | 'as' | 'children'>;
|
|
49
|
+
export type NavListSubNavProps = {
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
'data-testid'?: string;
|
|
52
|
+
} & BaseProps<HTMLUListElement> & React.HTMLAttributes<HTMLUListElement>;
|
|
53
|
+
export type NavListGroupProps = {
|
|
54
|
+
/**
|
|
55
|
+
* Heading text for the group.
|
|
56
|
+
*/
|
|
57
|
+
title?: ReactNode;
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
'data-testid'?: string;
|
|
60
|
+
} & BaseProps<HTMLLIElement> & Omit<React.LiHTMLAttributes<HTMLLIElement>, 'title'>;
|
|
61
|
+
/**
|
|
62
|
+
* Use NavList to render vertical navigation links with groups and expandable nested lists.
|
|
63
|
+
* @see https://primer.style/brand/components/NavList
|
|
64
|
+
*/
|
|
65
|
+
export declare const NavList: React.ForwardRefExoticComponent<Omit<NavListRootProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
66
|
+
Item: <C extends NavListItemAs = "a">(props: NavListItemProps<C> & {
|
|
67
|
+
ref?: Ref<HTMLElement>;
|
|
68
|
+
}) => ReactElement | null;
|
|
69
|
+
SubNav: React.ForwardRefExoticComponent<Omit<NavListSubNavProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
70
|
+
Group: React.ForwardRefExoticComponent<Omit<NavListGroupProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
71
|
+
testIds: {
|
|
72
|
+
root: string;
|
|
73
|
+
readonly list: string;
|
|
74
|
+
readonly item: string;
|
|
75
|
+
readonly link: string;
|
|
76
|
+
readonly leadingVisual: string;
|
|
77
|
+
readonly trailingVisual: string;
|
|
78
|
+
readonly subNav: string;
|
|
79
|
+
readonly group: string;
|
|
80
|
+
readonly groupTitle: string;
|
|
81
|
+
readonly groupList: string;
|
|
82
|
+
readonly toggle: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export {};
|
|
86
|
+
//# sourceMappingURL=NavList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAaZ,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EACT,MAAM,OAAO,CAAA;AAGd,OAAO,EAAmB,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAClE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAEnD,OAAO,4GAA4G,CAAA;AAuCnH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GAAG,SAAS,CAAC,WAAW,CAAC,GACxB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAA;AAgD3E,KAAK,MAAM,GAAG,YAAY,GAAG,KAAK,CAAC,WAAW,GAAG,IAAI,CAAA;AACrD,KAAK,aAAa,GAAG,GAAG,GAAG,QAAQ,CAAA;AAEnC,KAAK,oBAAoB,GAAG;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,aAAa,GAAG,GAAG,IAAI;IAC5D,EAAE,CAAC,EAAE,CAAC,CAAA;CACP,GAAG,oBAAoB,GACtB,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,GACzC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,oBAAoB,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,UAAU,CAAC,CAAA;AA6MxH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GAAG,SAAS,CAAC,gBAAgB,CAAC,GAC7B,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAkExC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GAAG,SAAS,CAAC,aAAa,CAAC,GAC1B,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,CAAA;AA+DtD;;;GAGG;AACH,eAAO,MAAM,OAAO;WAnJd,CAAC,SAAS,aAAa,eAAe,gBAAgB,CAAC,CAAC,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;KAAC,KAAK,YAAY,GAAG,IAAI;;;;;;;;;;;;;;;;CAwJhH,CAAA"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import e from "../node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { useId as t } from "../hooks/useId.js";
|
|
3
|
+
import { TriangleDownIcon as n } from "../node_modules/@primer/octicons-react/dist/index.esm.js";
|
|
4
|
+
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes-CGyt2t8f.css';/* empty css */
|
|
5
|
+
import r from "./NavList.module.js";
|
|
6
|
+
import i, { Children as a, createContext as o, forwardRef as s, isValidElement as c, useCallback as l, useContext as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
7
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
+
//#region src/NavList/NavList.tsx
|
|
9
|
+
var _ = {
|
|
10
|
+
root: "NavList",
|
|
11
|
+
get list() {
|
|
12
|
+
return `${this.root}-list`;
|
|
13
|
+
},
|
|
14
|
+
get item() {
|
|
15
|
+
return `${this.root}-item`;
|
|
16
|
+
},
|
|
17
|
+
get link() {
|
|
18
|
+
return `${this.root}-link`;
|
|
19
|
+
},
|
|
20
|
+
get leadingVisual() {
|
|
21
|
+
return `${this.root}-leading-visual`;
|
|
22
|
+
},
|
|
23
|
+
get trailingVisual() {
|
|
24
|
+
return `${this.root}-trailing-visual`;
|
|
25
|
+
},
|
|
26
|
+
get subNav() {
|
|
27
|
+
return `${this.root}-sub-nav`;
|
|
28
|
+
},
|
|
29
|
+
get group() {
|
|
30
|
+
return `${this.root}-group`;
|
|
31
|
+
},
|
|
32
|
+
get groupTitle() {
|
|
33
|
+
return `${this.root}-group-title`;
|
|
34
|
+
},
|
|
35
|
+
get groupList() {
|
|
36
|
+
return `${this.root}-group-list`;
|
|
37
|
+
},
|
|
38
|
+
get toggle() {
|
|
39
|
+
return `${this.root}-toggle`;
|
|
40
|
+
}
|
|
41
|
+
}, v = 5, y = o(1), b = o({
|
|
42
|
+
expanded: !0,
|
|
43
|
+
level: 2
|
|
44
|
+
}), x = s(({ children: t, className: n, "aria-label": i, "aria-labelledby": o, "data-testid": s, ...c }, l) => {
|
|
45
|
+
let u = f(() => a.toArray(t), [t]), d = f(() => u.some(j), [u]), p = f(() => u.some(M), [u]), m = d ? 1 : 2, g = !d && !p;
|
|
46
|
+
return /* @__PURE__ */ h("nav", {
|
|
47
|
+
ref: l,
|
|
48
|
+
className: e(r.NavList, n),
|
|
49
|
+
"aria-label": i,
|
|
50
|
+
"aria-labelledby": o,
|
|
51
|
+
"data-testid": s || _.root,
|
|
52
|
+
...c,
|
|
53
|
+
children: /* @__PURE__ */ h(y.Provider, {
|
|
54
|
+
value: m,
|
|
55
|
+
children: /* @__PURE__ */ h("ul", {
|
|
56
|
+
className: e(r.NavList__list, g && r["NavList__list--flat"]),
|
|
57
|
+
"data-testid": _.list,
|
|
58
|
+
children: t
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}), S = s(({ as: o, children: s, className: c, defaultExpanded: p = !1, disabled: x = !1, expanded: S, leadingVisual: C, onClick: w, onExpandedChange: T, trailingVisual: D, "aria-current": O, "data-testid": k, ...j }, M) => {
|
|
63
|
+
let te = o || "a", I = u(y), ne = t(), re = t(), L = f(() => a.toArray(s), [s]), R = f(() => L.filter(E), [L]), z = f(() => L.find(E), [L]), B = f(() => L.filter(N), [L]), V = f(() => z ? L.filter((e) => e !== z) : L, [L, z]), H = V.length > 0, U = !!z, W = I < v, ie = !U, G = z?.props.id ?? ne, K = f(() => ee(z?.props.children), [z?.props.children]), q = S !== void 0, [ae, J] = m(p || K), Y = !!(q ? S : ae), { href: X, id: oe, ...se } = j, Z = oe ?? re, Q = w, ce = f(() => {
|
|
64
|
+
if (B.length > 0) return "NavList.Item: NavList.Group is not supported as a child. Use NavList.SubNav for nested disclosure. NavList.Item will not be rendered.";
|
|
65
|
+
if (U && !W) return "NavList.Item: NavList supports up to 5 levels. Level 5 items cannot contain NavList.SubNav. NavList.Item will not be rendered.";
|
|
66
|
+
if (R.length > 1) return "NavList.Item: Only one NavList.SubNav child is supported. NavList.Item will not be rendered.";
|
|
67
|
+
if (U && !H) return "NavList.Item: A label is required when using NavList.SubNav. NavList.Item will not be rendered.";
|
|
68
|
+
if (U && (X !== void 0 || o !== void 0)) return "NavList.Item: `href` and `as` are not supported when using NavList.SubNav because expandable items render as buttons. NavList.Item will not be rendered.";
|
|
69
|
+
}, [
|
|
70
|
+
o,
|
|
71
|
+
W,
|
|
72
|
+
H,
|
|
73
|
+
U,
|
|
74
|
+
X,
|
|
75
|
+
B.length,
|
|
76
|
+
R.length
|
|
77
|
+
]);
|
|
78
|
+
d(() => {
|
|
79
|
+
K && !q && J(!0);
|
|
80
|
+
}, [K, q]);
|
|
81
|
+
let le = l((e) => {
|
|
82
|
+
q || J(e), T?.(e);
|
|
83
|
+
}, [q, T]), $ = l(() => {
|
|
84
|
+
le(!Y);
|
|
85
|
+
}, [Y, le]), ue = l((e) => {
|
|
86
|
+
if (x) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
Q?.(e);
|
|
91
|
+
}, [x, Q]), de = l((e) => {
|
|
92
|
+
A(M, e);
|
|
93
|
+
}, [M]), fe = l((e) => {
|
|
94
|
+
if (x) {
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
Q?.(e), e.defaultPrevented || $();
|
|
99
|
+
}, [
|
|
100
|
+
x,
|
|
101
|
+
Q,
|
|
102
|
+
$
|
|
103
|
+
]);
|
|
104
|
+
if (ce) return F(ce), null;
|
|
105
|
+
let pe = /* @__PURE__ */ g("span", {
|
|
106
|
+
className: r.NavList__labelArea,
|
|
107
|
+
children: [
|
|
108
|
+
P(C, r.NavList__leadingVisual, _.leadingVisual),
|
|
109
|
+
/* @__PURE__ */ h("span", {
|
|
110
|
+
className: r.NavList__label,
|
|
111
|
+
children: V
|
|
112
|
+
}),
|
|
113
|
+
P(D, r.NavList__trailingVisual, _.trailingVisual)
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
return /* @__PURE__ */ g("li", {
|
|
117
|
+
className: e(r.NavList__item, r[`NavList__item--level-${I}`], ie && r["NavList__item--leaf"], U && Y && r["NavList__item--expanded"], K && r["NavList__item--has-current-descendant"]),
|
|
118
|
+
"data-testid": k || _.item,
|
|
119
|
+
children: [/* @__PURE__ */ h("div", {
|
|
120
|
+
className: r.NavList__itemContent,
|
|
121
|
+
children: U && W ? /* @__PURE__ */ g("button", {
|
|
122
|
+
ref: de,
|
|
123
|
+
id: Z,
|
|
124
|
+
type: "button",
|
|
125
|
+
className: e(r.NavList__link, r.NavList__accordionButton, x && r["NavList__link--disabled"], c),
|
|
126
|
+
"aria-expanded": Y ? "true" : "false",
|
|
127
|
+
"aria-controls": G,
|
|
128
|
+
"data-testid": _.toggle,
|
|
129
|
+
...se,
|
|
130
|
+
disabled: x,
|
|
131
|
+
onClick: fe,
|
|
132
|
+
children: [/* @__PURE__ */ h(n, {
|
|
133
|
+
className: r.NavList__toggleIcon,
|
|
134
|
+
"aria-hidden": "true"
|
|
135
|
+
}), pe]
|
|
136
|
+
}) : /* @__PURE__ */ h(te, {
|
|
137
|
+
ref: M,
|
|
138
|
+
className: e(r.NavList__link, x && r["NavList__link--disabled"], c),
|
|
139
|
+
"aria-current": O,
|
|
140
|
+
"aria-disabled": x || void 0,
|
|
141
|
+
"data-testid": _.link,
|
|
142
|
+
onClick: ue,
|
|
143
|
+
...j,
|
|
144
|
+
children: pe
|
|
145
|
+
})
|
|
146
|
+
}), z ? /* @__PURE__ */ h(b.Provider, {
|
|
147
|
+
value: {
|
|
148
|
+
expanded: Y,
|
|
149
|
+
labelledBy: Z,
|
|
150
|
+
level: I + 1
|
|
151
|
+
},
|
|
152
|
+
children: i.cloneElement(z, { id: G })
|
|
153
|
+
}) : null]
|
|
154
|
+
});
|
|
155
|
+
}), C = s(({ children: t, className: n, "aria-labelledby": i, "data-testid": a, ...o }, s) => {
|
|
156
|
+
let { expanded: c, labelledBy: f, level: m } = u(b), g = p(null), v = l((e) => {
|
|
157
|
+
e.style.setProperty("--brand-NavList-subNav-height", `${e.scrollHeight}px`);
|
|
158
|
+
}, []), x = l(() => {
|
|
159
|
+
let e = g.current;
|
|
160
|
+
for (; e;) v(e), e = e.parentElement?.closest(`.${r.NavList__subNav}`) ?? null;
|
|
161
|
+
}, [v]), S = l((e) => {
|
|
162
|
+
g.current = e, A(s, e);
|
|
163
|
+
}, [s]);
|
|
164
|
+
return d(() => {
|
|
165
|
+
x();
|
|
166
|
+
}, [
|
|
167
|
+
t,
|
|
168
|
+
c,
|
|
169
|
+
x
|
|
170
|
+
]), d(() => {
|
|
171
|
+
g.current?.toggleAttribute("inert", !c);
|
|
172
|
+
}, [c]), d(() => {
|
|
173
|
+
let e = g.current;
|
|
174
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
175
|
+
let t = new ResizeObserver(x);
|
|
176
|
+
return t.observe(e), () => {
|
|
177
|
+
t.disconnect();
|
|
178
|
+
};
|
|
179
|
+
}, [x]), /* @__PURE__ */ h("ul", {
|
|
180
|
+
ref: S,
|
|
181
|
+
className: e(r.NavList__subNav, c && r["NavList__subNav--expanded"], n),
|
|
182
|
+
"aria-labelledby": i ?? f,
|
|
183
|
+
...o,
|
|
184
|
+
"aria-hidden": c ? void 0 : "true",
|
|
185
|
+
"data-testid": a || _.subNav,
|
|
186
|
+
children: /* @__PURE__ */ h(y.Provider, {
|
|
187
|
+
value: m,
|
|
188
|
+
children: t
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
}), w = s(({ title: n, children: o, className: s, "data-testid": l, ...u }, d) => {
|
|
192
|
+
let p = t(), m = f(() => {
|
|
193
|
+
let e = (t) => a.toArray(t).flatMap((t) => D(t) ? [t] : c(t) && t.type === i.Fragment ? e(t.props.children) : []);
|
|
194
|
+
return e(o);
|
|
195
|
+
}, [o]);
|
|
196
|
+
return f(() => {
|
|
197
|
+
let e = (t) => a.toArray(t).some((t) => D(t) ? !1 : c(t) && t.type === i.Fragment ? e(t.props.children) : !0);
|
|
198
|
+
return e(o);
|
|
199
|
+
}, [o]) && F("NavList.Group: Only NavList.Item children are supported. Invalid children will not be rendered. Use NavList.SubNav as a child of NavList.Item for nested disclosure."), /* @__PURE__ */ g("li", {
|
|
200
|
+
ref: d,
|
|
201
|
+
className: e(r.NavList__group, s),
|
|
202
|
+
"data-testid": l || _.group,
|
|
203
|
+
...u,
|
|
204
|
+
children: [n ? /* @__PURE__ */ h("h3", {
|
|
205
|
+
id: p,
|
|
206
|
+
className: r.NavList__groupTitle,
|
|
207
|
+
"data-testid": _.groupTitle,
|
|
208
|
+
children: n
|
|
209
|
+
}) : null, /* @__PURE__ */ h("ul", {
|
|
210
|
+
className: r.NavList__groupList,
|
|
211
|
+
"aria-labelledby": n ? p : void 0,
|
|
212
|
+
"data-testid": _.groupList,
|
|
213
|
+
children: /* @__PURE__ */ h(y.Provider, {
|
|
214
|
+
value: 2,
|
|
215
|
+
children: m
|
|
216
|
+
})
|
|
217
|
+
})]
|
|
218
|
+
});
|
|
219
|
+
}), T = Object.assign(x, {
|
|
220
|
+
Item: S,
|
|
221
|
+
SubNav: C,
|
|
222
|
+
Group: w,
|
|
223
|
+
testIds: _
|
|
224
|
+
});
|
|
225
|
+
function E(e) {
|
|
226
|
+
return c(e) && e.type === C;
|
|
227
|
+
}
|
|
228
|
+
function D(e) {
|
|
229
|
+
return c(e) && e.type === S;
|
|
230
|
+
}
|
|
231
|
+
function O(e) {
|
|
232
|
+
return c(e) && e.type === w;
|
|
233
|
+
}
|
|
234
|
+
function k(e) {
|
|
235
|
+
return !!e && e !== "false";
|
|
236
|
+
}
|
|
237
|
+
function ee(e) {
|
|
238
|
+
return a.toArray(e).some((e) => c(e) ? k(e.props["aria-current"]) ? !0 : ee(e.props.children) : !1);
|
|
239
|
+
}
|
|
240
|
+
function A(e, t) {
|
|
241
|
+
if (e) {
|
|
242
|
+
if (typeof e == "function") {
|
|
243
|
+
e(t);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
e.current = t;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function j(e) {
|
|
250
|
+
return c(e) ? e.type === i.Fragment ? a.toArray(e.props.children).some(j) : a.toArray(e.props.children).some(E) : !1;
|
|
251
|
+
}
|
|
252
|
+
function M(e) {
|
|
253
|
+
return c(e) ? e.type === i.Fragment ? a.toArray(e.props.children).some(M) : O(e) : !1;
|
|
254
|
+
}
|
|
255
|
+
function N(e) {
|
|
256
|
+
return c(e) ? e.type === i.Fragment ? a.toArray(e.props.children).some(N) : O(e) : !1;
|
|
257
|
+
}
|
|
258
|
+
function P(e, t, n) {
|
|
259
|
+
if (!e) return null;
|
|
260
|
+
let r = c(e) ? e : i.createElement(e);
|
|
261
|
+
return c(r) ? /* @__PURE__ */ h("span", {
|
|
262
|
+
className: t,
|
|
263
|
+
"data-testid": n,
|
|
264
|
+
children: i.cloneElement(r, {
|
|
265
|
+
className: r.props.className,
|
|
266
|
+
"aria-hidden": "true",
|
|
267
|
+
focusable: "false"
|
|
268
|
+
})
|
|
269
|
+
}) : null;
|
|
270
|
+
}
|
|
271
|
+
function F(e) {
|
|
272
|
+
(process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test") && console.warn(e);
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
export { T as NavList };
|
|
276
|
+
|
|
277
|
+
//# sourceMappingURL=NavList.js.map
|