@primer/react-brand 0.74.0-rc.ffd69649 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/components/Card/index.md +2 -2
- package/docs/components/Card/react.md +2 -3
- package/docs/components/InlineCode/index.md +53 -0
- package/docs/components/Label/index.md +14 -46
- package/docs/components/Label/react.md +23 -20
- package/docs/components/MinimalFooter/index.md +54 -10
- package/docs/components/PricingOptions/index.md +28 -6
- package/docs/components/River/react.md +11 -8
- package/docs/components/Token/index.md +4 -3
- package/docs/components/index.md +4 -3
- package/docs/index.md +6 -5
- package/docs/introduction/mcp.md +10 -10
- package/esm/Bento/Bento.d.ts.map +1 -1
- package/esm/Bento/Bento.js +3 -3
- package/esm/Bento/Bento.js.map +1 -1
- package/esm/CTABanner/CTABanner.d.ts +1 -0
- package/esm/CTABanner/CTABanner.d.ts.map +1 -1
- package/esm/CTABanner/CTABanner.js +4 -3
- package/esm/CTABanner/CTABanner.js.map +1 -1
- package/esm/CTABanner/{CTABanner.module-CDLOww8c.css → CTABanner.module-D4pYR4mY.css} +1 -1
- package/esm/CTABanner/CTABanner.module.js +1 -2
- package/esm/CTABanner/CTABanner.module.js.map +1 -1
- package/esm/Card/Card.d.ts +2 -1
- package/esm/Card/Card.d.ts.map +1 -1
- package/esm/Card/Card.js +2 -1
- package/esm/Card/Card.js.map +1 -1
- package/esm/Card/Card.module-Svi04dp7.css +1 -0
- package/esm/Card/Card.module.js +1 -1
- package/esm/Card/Card.module.js.map +1 -1
- package/esm/InlineCode/InlineCode.d.ts +19 -0
- package/esm/InlineCode/InlineCode.d.ts.map +1 -0
- package/esm/InlineCode/InlineCode.js +22 -0
- package/esm/InlineCode/InlineCode.js.map +1 -0
- package/esm/InlineCode/InlineCode.module-Br3-YmSA.css +1 -0
- package/esm/InlineCode/InlineCode.module.js +9 -0
- package/esm/InlineCode/InlineCode.module.js.map +1 -0
- package/esm/InlineCode/index.d.ts +2 -0
- package/esm/InlineCode/index.d.ts.map +1 -0
- package/esm/Label/Label.d.ts +3 -1
- package/esm/Label/Label.d.ts.map +1 -1
- package/esm/Label/Label.js.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.d.ts +25 -1
- package/esm/MinimalFooter/MinimalFooter.d.ts.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.js +140 -100
- package/esm/MinimalFooter/MinimalFooter.js.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.module-CGtOtT5r.css +1 -0
- package/esm/MinimalFooter/MinimalFooter.module.js +26 -13
- package/esm/MinimalFooter/MinimalFooter.module.js.map +1 -1
- package/esm/Pillar/Pillar.d.ts +1 -1
- package/esm/Pillar/Pillar.js.map +1 -1
- package/esm/PricingOptions/PricingOptions.d.ts +4 -0
- package/esm/PricingOptions/PricingOptions.d.ts.map +1 -1
- package/esm/PricingOptions/PricingOptions.js +10 -10
- package/esm/PricingOptions/PricingOptions.js.map +1 -1
- package/esm/Token/Token.d.ts +2 -2
- package/esm/Token/Token.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +48 -47
- package/esm/node_modules/@primer/octicons-react/dist/index.esm.js +22 -28
- package/esm/node_modules/@primer/octicons-react/dist/index.esm.js.map +1 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/footer/base-C0fjI9_t.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes-CMFhnjfv.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes-Bj7XtHMY.css +1 -0
- package/esm/river/River/River.d.ts +8 -2
- package/esm/river/River/River.d.ts.map +1 -1
- package/esm/river/River/River.js +6 -6
- package/esm/river/River/River.js.map +1 -1
- package/esm/river/river-shared.module-B1HvdKsP.css +1 -0
- package/esm/river/river-shared.module.js +1 -2
- package/esm/river/river-shared.module.js.map +1 -1
- package/lib/CTABanner/CTABanner.d.ts +1 -0
- package/lib/Card/Card.d.ts +2 -1
- package/lib/InlineCode/InlineCode.d.ts +18 -0
- package/lib/InlineCode/index.d.ts +1 -0
- package/lib/Label/Label.d.ts +3 -1
- package/lib/MinimalFooter/MinimalFooter.d.ts +25 -1
- package/lib/Pillar/Pillar.d.ts +1 -1
- package/lib/PricingOptions/PricingOptions.d.ts +4 -0
- package/lib/Token/Token.d.ts +2 -2
- package/lib/css/main.css +417 -218
- 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 +8 -0
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +19 -3
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +10 -2
- 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 +17 -0
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +10 -0
- 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 +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/base.js +14 -0
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +41 -3
- 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 +27 -0
- 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/base.js +6 -0
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +10 -2
- 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 +8 -0
- 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/json/colors.json +11 -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 +5 -0
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +10 -2
- 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 +7 -0
- 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/base.d.ts +17 -0
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +14 -0
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +15 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +16 -2
- 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 +21 -0
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +18 -0
- 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/lib/river/River/River.d.ts +8 -2
- package/llms.txt +6 -5
- package/package.json +1 -1
- package/esm/Card/Card.module-DvGFYMFf.css +0 -1
- package/esm/MinimalFooter/MinimalFooter.module-Cl2g38SO.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes-DhME9i-y.css +0 -1
- package/esm/river/river-shared.module-5fefR7ip.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalFooter.js","names":[],"sources":["../../src/MinimalFooter/MinimalFooter.tsx"],"sourcesContent":["import React, {PropsWithChildren} from 'react'\nimport {clsx} from 'clsx'\nimport {LogoGithubIcon} from '@primer/octicons-react'\n\nimport {ColorModesEnum, Stack, Text, useTheme} from '../'\nimport {BaseProps} from '../component-helpers'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css'\n\n/**\n * Main Stylesheet (as a CSS Module)\n */\nimport styles from './MinimalFooter.module.css'\n\nconst socialLinkData = {\n x: {\n fullName: 'X',\n url: 'https://x.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/x.svg',\n iconWidth: 20,\n iconHeight: 16,\n },\n github: {\n fullName: 'GitHub',\n url: 'https://github.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/github-mark.svg',\n iconWidth: 20,\n iconHeight: 20,\n },\n linkedin: {\n fullName: 'LinkedIn',\n url: 'https://www.linkedin.com/company/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/linkedin.svg',\n iconWidth: 19,\n iconHeight: 18,\n },\n youtube: {\n fullName: 'YouTube',\n url: 'https://www.youtube.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/youtube.svg',\n iconWidth: 23,\n iconHeight: 16,\n },\n facebook: {\n fullName: 'Facebook',\n url: 'https://www.facebook.com/GitHub',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/facebook.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n twitch: {\n fullName: 'Twitch',\n url: 'https://www.twitch.tv/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/twitch.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n tiktok: {\n fullName: 'TikTok',\n url: 'https://www.tiktok.com/@github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/tiktok.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n instagram: {\n fullName: 'Instagram',\n url: 'https://www.instagram.com/github/',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/instagram.svg',\n iconWidth: 24,\n iconHeight: 24,\n },\n} as const\n\ntype SocialLinkName = keyof typeof socialLinkData\ntype SocialLink = (typeof socialLinkData)[SocialLinkName]\n\nconst socialLinkNames = Object.keys(socialLinkData) as SocialLinkName[]\n\nexport type MinimalFooterProps = {\n /**\n * An array of social links to be displayed in the footer.\n */\n socialLinks?: SocialLinkName[] | false\n /**\n * The href for the GitHub logo.\n */\n logoHref?: string\n /**\n * The copyright statement to be displayed in the footer.\n * If not provided, the copyright statement will be the default GitHub copyright statement.\n */\n copyrightStatement?: string | React.ReactElement\n} & BaseProps<HTMLElement>\n\nfunction Root({\n className,\n children,\n copyrightStatement,\n logoHref = 'https://github.com',\n socialLinks,\n ...rest\n}: PropsWithChildren<MinimalFooterProps>) {\n // find Footer.Footnotes children\n const footerFootnoteChild = () => {\n const footnotes = React.Children.toArray(children).find(child => {\n if (!React.isValidElement(child)) {\n return false\n }\n\n if (child.type && child.type === Footnotes) {\n return true\n }\n })\n return footnotes\n }\n\n /**\n * Renders a maximum of 5 links.\n * If more than 5 links are required, we should encourage usage of Footer instead.\n */\n const LinkChildren = React.Children.toArray(children)\n .filter(child => {\n // if not valid element\n if (React.isValidElement(child)) {\n if (child.type === Link) {\n return child\n }\n }\n })\n .slice(0, 5)\n\n const currentYear = new Date().getFullYear()\n\n return (\n <footer className={clsx(styles.Footer, className)} {...rest}>\n {footerFootnoteChild()}\n <SocialLogomarks socialLinks={socialLinks} logoHref={logoHref} />\n <section>\n <div className={styles['Footer__legal-and-links']}>\n <div className={styles['Footer__container']}>\n <Stack\n direction={{narrow: 'vertical', regular: 'horizontal'}}\n gap=\"normal\"\n padding=\"none\"\n justifyContent=\"space-between\"\n >\n <Stack\n padding=\"none\"\n gap=\"condensed\"\n justifyContent={{\n narrow: 'center',\n regular: 'flex-end',\n }}\n direction={{\n narrow: 'vertical',\n regular: 'horizontal',\n }}\n className={styles['Footer__links']}\n >\n <>{LinkChildren}</>\n </Stack>\n <Text as=\"p\" size=\"200\" variant=\"muted\" className={styles['Footer__copyright']}>\n {copyrightStatement ? copyrightStatement : `\\u00A9 ${currentYear} GitHub. All rights reserved.`}\n </Text>\n </Stack>\n </div>\n </div>\n </section>\n </footer>\n )\n}\n\ntype FootnoteProps = BaseProps<HTMLElement>\n\nfunction Footnotes({children, className}: PropsWithChildren<FootnoteProps>) {\n const styledChildren = React.Children.map(children, child => {\n if (React.isValidElement<React.ComponentProps<typeof Text>>(child) && child.type === Text) {\n const textChild = child as React.ReactElement<React.ComponentProps<typeof Text>>\n const overrideProps: Partial<React.ComponentProps<typeof Text>> = {\n variant: 'muted',\n size: '100',\n className: clsx(styles['Footer__terms-item'], textChild.props.className),\n }\n\n if (!textChild.props.as) {\n overrideProps.as = 'p'\n }\n\n return React.cloneElement(textChild, overrideProps)\n }\n\n return null\n })\n\n return (\n <section className={styles.Footer__container}>\n <div className={clsx(styles.Footer__terms, className)}>{styledChildren}</div>\n </section>\n )\n}\n\ntype SocialLinkProps = {name: SocialLinkName}\n\nconst SocialLink = ({name}: SocialLinkProps) => {\n const link = socialLinkData[name]\n return (\n <li key={name}>\n <a\n href={link.url}\n className={styles['Footer__social-link']}\n data-analytics-event={`{\"category\":\"Footer\",\"action\":\"go to ${link.fullName}\",\"label\":\"text:${name}\"}`}\n >\n <img\n className={styles['Footer__social-icon']}\n src={link.icon}\n height={link.iconHeight}\n width={link.iconWidth}\n loading=\"lazy\"\n decoding=\"async\"\n alt=\"\"\n />\n <span className=\"visually-hidden\">GitHub on {link.fullName}</span>\n </a>\n </li>\n )\n}\n\ntype SocialLogomarksProps = {\n socialLinks?: SocialLinkName[] | false\n logoHref?: string\n}\n\nfunction SocialLogomarks({socialLinks = socialLinkNames, logoHref}: SocialLogomarksProps) {\n const {colorMode} = useTheme()\n\n return (\n <section className={clsx(styles['Footer__logomarks'])}>\n <div className={styles['Footer__container']}>\n <Stack\n alignItems=\"center\"\n direction={{narrow: 'vertical', regular: 'horizontal'}}\n gap=\"normal\"\n padding=\"none\"\n justifyContent=\"space-between\"\n >\n <div>\n <a\n href={logoHref}\n data-analytics-event='{\"category\":\"Footer\",\"action\":\"go to home\",\"label\":\"text:home\"}'\n aria-label=\"GitHub\"\n >\n <LogoGithubIcon fill={colorMode === ColorModesEnum.DARK ? 'white' : 'black'} size=\"medium\" />\n </a>\n </div>\n {socialLinks ? (\n <ul className={styles['Footer__social-links']}>\n {socialLinks.map(name => (\n <SocialLink key={name} name={name} />\n ))}\n </ul>\n ) : null}\n </Stack>\n </div>\n </section>\n )\n}\n\ntype LinkProps<C extends React.ElementType> = BaseProps<C> & {as?: 'a' | 'button'} & Omit<\n React.ComponentPropsWithoutRef<C>,\n keyof C\n >\n\nconst Link = <C extends React.ElementType = 'a'>({as, children, ...rest}: PropsWithChildren<LinkProps<C>>) => {\n const Component = as || 'a'\n return (\n <Component\n className={styles['Footer__link']}\n data-analytics-event={\n rest['href'] ? `{\"category\":\"Footer\",\"action\":\"go to ${rest['href']}\",\"label\":\"text:${children}\"}` : undefined\n }\n {...rest}\n >\n <Text variant=\"muted\" size=\"200\">\n {children}\n </Text>\n </Component>\n )\n}\n\n/**\n * Use MinimalFooter to render a global footer on all GitHub pages.\n * @see https://primer.style/brand/components/MinimalFooter\n */\nexport const MinimalFooter = Object.assign(Root, {\n Footnotes,\n Link,\n})\n"],"mappings":";;;;;;;;;;;AAiBA,IAAM,IAAiB;CACrB,GAAG;EACD,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,SAAS;EACP,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,WAAW;EACT,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACF,EAKK,IAAkB,OAAO,KAAK,EAAe;AAkBnD,SAAS,EAAK,EACZ,cACA,aACA,uBACA,cAAW,sBACX,gBACA,GAAG,KACqC;CAExC,IAAM,UACc,EAAM,SAAS,QAAQ,EAAS,CAAC,MAAK,MAAS;AAC/D,MAAI,CAAC,EAAM,eAAe,EAAM,CAC9B,QAAO;AAGT,MAAI,EAAM,QAAQ,EAAM,SAAS,EAC/B,QAAO;GAGJ,EAOH,IAAe,EAAM,SAAS,QAAQ,EAAS,CAClD,QAAO,MAAS;AAEf,MAA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C,EAAK,KAAQ,kBAAkB,EAAS,MAAM,KAAA;CAEvG,GAAI;WAEJ,kBAAC,GAAD;EAAM,SAAQ;EAAQ,MAAK;EACxB;EACI,CAAA;CACG,CAAA,EAQH,IAAgB,OAAO,OAAO,GAAM;CAC/C;CACA;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"MinimalFooter.js","names":[],"sources":["../../src/MinimalFooter/MinimalFooter.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, useCallback} from 'react'\nimport {clsx} from 'clsx'\nimport {ArrowUpIcon, MarkGithubIcon} from '@primer/octicons-react'\n\nimport {Text} from '../'\nimport {BaseProps} from '../component-helpers'\nimport {useReducedMotion} from '../hooks/useReducedMotion'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/footer/base.css'\n\n/**\n * Main Stylesheet (as a CSS Module)\n */\nimport styles from './MinimalFooter.module.css'\n\nconst socialLinkData = {\n x: {\n fullName: 'X',\n url: 'https://x.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/x.svg',\n iconWidth: 20,\n iconHeight: 16,\n },\n github: {\n fullName: 'GitHub',\n url: 'https://github.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/github-mark.svg',\n iconWidth: 20,\n iconHeight: 20,\n },\n linkedin: {\n fullName: 'LinkedIn',\n url: 'https://www.linkedin.com/company/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/linkedin.svg',\n iconWidth: 19,\n iconHeight: 18,\n },\n youtube: {\n fullName: 'YouTube',\n url: 'https://www.youtube.com/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/youtube.svg',\n iconWidth: 23,\n iconHeight: 16,\n },\n facebook: {\n fullName: 'Facebook',\n url: 'https://www.facebook.com/GitHub',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/facebook.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n twitch: {\n fullName: 'Twitch',\n url: 'https://www.twitch.tv/github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/twitch.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n tiktok: {\n fullName: 'TikTok',\n url: 'https://www.tiktok.com/@github',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/tiktok.svg',\n iconWidth: 18,\n iconHeight: 18,\n },\n instagram: {\n fullName: 'Instagram',\n url: 'https://www.instagram.com/github/',\n icon: 'https://github.githubassets.com/images/modules/site/icons/footer/instagram.svg',\n iconWidth: 24,\n iconHeight: 24,\n },\n} as const\n\ntype SocialLinkName = keyof typeof socialLinkData\nconst socialLinkNames = Object.keys(socialLinkData) as SocialLinkName[]\n\nexport type MinimalFooterProps = {\n /**\n * Escape-hatch for inserting custom React components.\n * Warning:\n * This prop isn't advertised in our docs but remains part of the public API for edge-cases.\n * Need to use this prop? Please check in with #primer-brand first to confirm correct usage.\n */\n centerComponent?: React.ReactElement\n /**\n * An array of social links to be displayed in the footer.\n */\n socialLinks?: SocialLinkName[] | false\n /**\n * The href for the GitHub logo.\n */\n logoHref?: string\n /**\n * The copyright statement to be displayed in the footer.\n * If not provided, the copyright statement will be the default GitHub copyright statement.\n */\n copyrightStatement?: string | React.ReactElement\n} & BaseProps<HTMLElement>\n\nfunction Root({\n centerComponent,\n className,\n children,\n copyrightStatement,\n logoHref = 'https://github.com',\n socialLinks,\n ...rest\n}: PropsWithChildren<MinimalFooterProps>) {\n let footnotes: React.ReactElement | undefined\n let backToTop: React.ReactElement | undefined\n const links: React.ReactElement[] = []\n\n for (const child of React.Children.toArray(children)) {\n if (!React.isValidElement(child)) {\n continue\n }\n\n if (child.type === Footnotes) {\n footnotes ??= child\n } else if (child.type === BackToTop) {\n backToTop ??= child\n } else if (child.type === Link && links.length < 5) {\n links.push(child)\n }\n }\n\n const currentYear = new Date().getFullYear()\n const resolvedSocialLinks = socialLinks === undefined ? socialLinkNames : socialLinks\n const renderedSocialLinks = resolvedSocialLinks === false ? [] : resolvedSocialLinks\n const hasSocialLinks = renderedSocialLinks.length > 0\n const hasLinks = links.length > 0\n const renderedLinks = hasLinks ? <div className={styles.MinimalFooter__links}>{links}</div> : null\n const copyright = (\n <Text\n as=\"p\"\n size=\"100\"\n font=\"monospace\"\n weight={{narrow: 'medium', wide: 'normal'}}\n variant=\"muted\"\n className={clsx(styles.MinimalFooter__copyright, styles.MinimalFooter__metaText)}\n >\n {copyrightStatement ? copyrightStatement : `\\u00A9 ${currentYear} GitHub. All rights reserved.`}\n </Text>\n )\n\n return (\n <footer\n className={clsx(styles.MinimalFooter, footnotes && styles['MinimalFooter--withFootnotes'], className)}\n {...rest}\n >\n {footnotes}\n <div className={styles.MinimalFooter__section}>\n <section className={styles.MinimalFooter__top}>\n <div className={styles.MinimalFooter__container}>\n <div className={styles['MinimalFooter__top-row']}>\n <LogoLink logoHref={logoHref} />\n {hasLinks || backToTop ? (\n <div className={styles['MinimalFooter__top-actions']}>\n {backToTop}\n {renderedLinks}\n </div>\n ) : null}\n </div>\n </div>\n </section>\n </div>\n {centerComponent ? (\n <div className={clsx(styles.MinimalFooter__section, styles['MinimalFooter__section--center'])}>\n <section className={styles.MinimalFooter__container}>{centerComponent}</section>\n </div>\n ) : null}\n <div className={clsx(styles.MinimalFooter__section, styles['MinimalFooter__section--bottom'])}>\n <section className={styles.MinimalFooter__bottom}>\n <div className={styles.MinimalFooter__container}>\n <div className={styles['MinimalFooter__bottom-row']}>\n {copyright}\n {hasSocialLinks ? <SocialLinks socialLinks={renderedSocialLinks} /> : null}\n </div>\n </div>\n </section>\n </div>\n </footer>\n )\n}\n\ntype FootnoteProps = BaseProps<HTMLElement>\n\nfunction Footnotes({children, className}: PropsWithChildren<FootnoteProps>) {\n const styledChildren = React.Children.map(children, child => {\n if (React.isValidElement<React.ComponentProps<typeof Text>>(child) && child.type === Text) {\n const textChild = child as React.ReactElement<React.ComponentProps<typeof Text>>\n const overrideProps: Partial<React.ComponentProps<typeof Text>> = {\n variant: 'muted',\n size: '100',\n className: clsx(styles['MinimalFooter__terms-item'], textChild.props.className),\n }\n\n if (!textChild.props.as) {\n overrideProps.as = 'p'\n }\n\n return React.cloneElement(textChild, overrideProps)\n }\n\n return null\n })\n\n return (\n <div className={clsx(styles.MinimalFooter__section, styles['MinimalFooter__section--footnotes'])}>\n <section className={styles.MinimalFooter__container}>\n <div className={clsx(styles.MinimalFooter__terms, className)}>{styledChildren}</div>\n </section>\n </div>\n )\n}\n\ntype SocialLinkProps = {name: SocialLinkName}\n\nconst SocialLink = ({name}: SocialLinkProps) => {\n const link = socialLinkData[name]\n return (\n <li>\n <a\n href={link.url}\n className={styles['MinimalFooter__social-link']}\n data-analytics-event={`{\"category\":\"Footer\",\"action\":\"go to ${link.fullName}\",\"label\":\"text:${name}\"}`}\n >\n <img\n className={styles['MinimalFooter__social-icon']}\n src={link.icon}\n height={link.iconHeight}\n width={link.iconWidth}\n loading=\"lazy\"\n decoding=\"async\"\n alt=\"\"\n />\n <span className=\"visually-hidden\">GitHub on {link.fullName}</span>\n </a>\n </li>\n )\n}\n\nfunction LogoLink({logoHref}: {logoHref?: string}) {\n return (\n <a\n href={logoHref}\n className={styles.MinimalFooter__logo}\n data-analytics-event='{\"category\":\"Footer\",\"action\":\"go to home\",\"label\":\"text:home\"}'\n aria-label=\"GitHub\"\n >\n <MarkGithubIcon size={24} />\n </a>\n )\n}\n\nfunction SocialLinks({socialLinks}: {socialLinks: SocialLinkName[]}) {\n return (\n <ul className={styles['MinimalFooter__social-links']}>\n {socialLinks.map(name => (\n <SocialLink key={name} name={name} />\n ))}\n </ul>\n )\n}\n\ntype LinkProps<C extends React.ElementType> = BaseProps<C> & {as?: 'a' | 'button'} & Omit<\n React.ComponentPropsWithoutRef<C>,\n keyof C\n >\n\nconst Link = <C extends React.ElementType = 'a'>({as, children, ...rest}: PropsWithChildren<LinkProps<C>>) => {\n const Component = as || 'a'\n return (\n <Component\n className={styles.MinimalFooter__link}\n data-analytics-event={\n rest['href'] ? `{\"category\":\"Footer\",\"action\":\"go to ${rest['href']}\",\"label\":\"text:${children}\"}` : undefined\n }\n {...rest}\n >\n <Text\n variant=\"muted\"\n size=\"100\"\n font=\"monospace\"\n weight={{narrow: 'medium', wide: 'normal'}}\n className={styles.MinimalFooter__metaText}\n >\n {children}\n </Text>\n </Component>\n )\n}\n\nexport type MinimalFooterBackToTopProps = {\n /**\n * The visible and accessible label.\n */\n children: React.ReactNode\n /**\n * The ID of the semantic top-of-page element that receives focus after keyboard activation.\n * Defaults to the first `<main>` element, then falls back to `<body>`.\n */\n focusTargetId?: string\n /**\n * Runs before the built-in behavior. Call `event.preventDefault()` to cancel scrolling and focus transfer.\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>\n} & BaseProps<HTMLButtonElement> &\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'children'>\n\n/**\n * Scrolls to the top and, after keyboard activation, moves focus to the configured top-of-page destination.\n */\nconst BackToTop = forwardRef<HTMLButtonElement, MinimalFooterBackToTopProps>(\n ({children, className, focusTargetId, onClick, type = 'button', ...rest}, ref) => {\n const prefersReducedMotion = useReducedMotion()\n\n const handleClick = useCallback<React.MouseEventHandler<HTMLButtonElement>>(\n event => {\n onClick?.(event)\n\n if (event.defaultPrevented) {\n return\n }\n\n window.scrollTo({\n top: 0,\n behavior: prefersReducedMotion ? 'instant' : 'smooth',\n })\n\n if (event.detail === 0) {\n const focusTarget = focusTargetId\n ? document.getElementById(focusTargetId)\n : document.querySelector<HTMLElement>('main') ??\n document.querySelector<HTMLElement>('body') ??\n document.documentElement\n\n if (!focusTarget) {\n if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n // eslint-disable-next-line no-console\n console.warn(`MinimalFooter.BackToTop: No element found with id \"${focusTargetId}\".`)\n }\n return\n }\n\n const hadTabIndex = focusTarget.hasAttribute('tabindex')\n\n if (!hadTabIndex) {\n focusTarget.tabIndex = -1\n focusTarget.addEventListener('blur', () => focusTarget.removeAttribute('tabindex'), {once: true})\n }\n\n focusTarget.focus({preventScroll: true})\n }\n },\n [focusTargetId, onClick, prefersReducedMotion],\n )\n\n return (\n <button\n ref={ref}\n type={type}\n className={clsx(styles.MinimalFooter__backToTop, className)}\n onClick={handleClick}\n {...rest}\n >\n <span className={styles['MinimalFooter__backToTop-content']}>\n <Text as=\"span\" size=\"100\" weight=\"medium\" className={styles.MinimalFooter__metaText}>\n {children}\n </Text>\n <span className={styles['MinimalFooter__backToTop-icon']} aria-hidden=\"true\">\n <ArrowUpIcon />\n </span>\n </span>\n </button>\n )\n },\n)\n\n/**\n * Use MinimalFooter to render a global footer on all GitHub pages.\n * @see https://primer.style/brand/components/MinimalFooter\n */\nexport const MinimalFooter = Object.assign(Root, {\n Footnotes,\n Link,\n BackToTop,\n})\n"],"mappings":";;;;;;;;;;AAmBA,IAAM,IAAiB;CACrB,GAAG;EACD,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,SAAS;EACP,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,UAAU;EACR,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,QAAQ;EACN,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACD,WAAW;EACT,UAAU;EACV,KAAK;EACL,MAAM;EACN,WAAW;EACX,YAAY;EACb;CACF,EAGK,IAAkB,OAAO,KAAK,EAAe;AAyBnD,SAAS,EAAK,EACZ,oBACA,cACA,aACA,uBACA,cAAW,sBACX,gBACA,G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KACH,EAAY,WAAW,IACvB,EAAY,iBAAiB,cAAc,EAAY,gBAAgB,WAAW,EAAE,EAAC,MAAM,IAAK,CAAC,GAGnG,EAAY,MAAM,EAAC,eAAe,IAAK,CAAC;;IAG5C;EAAC;EAAe;EAAS;EAAqB,CAC/C;AAED,QACE,kBAAC,UAAD;EACO;EACC;EACN,WAAW,EAAK,EAAO,0BAA0B,EAAU;EAC3D,SAAS;EACT,GAAI;YAEJ,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAxB,CACE,kBAAC,GAAD;IAAM,IAAG;IAAO,MAAK;IAAM,QAAO;IAAS,WAAW,EAAO;IAC1D;IACI,CAAA,EACP,kBAAC,QAAD;IAAM,WAAW,EAAO;IAAkC,eAAY;cACpE,kBAAC,GAAD,EAAe,CAAA;IACV,CAAA,CACF;;EACA,CAAA;EAGd,EAMY,IAAgB,OAAO,OAAO,GAAM;CAC/C;CACA;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65{border-top:var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);background-color:var(--brand-footer-bg-color);position:relative}.Primer_Brand__MinimalFooter-module__MinimalFooter--withFootnotes___oUvH8{border-top:0}.Primer_Brand__MinimalFooter-module__MinimalFooter__container___mhY_8{max-width:1280px;max-width:var(--brand-footer-max-width,1280px);padding-inline:var(--base-size-20);margin-left:auto;margin-right:auto}@media screen and (width>=48rem){.Primer_Brand__MinimalFooter-module__MinimalFooter__container___mhY_8{padding-inline:var(--base-size-32)}}.Primer_Brand__MinimalFooter-module__MinimalFooter__terms___gwB2R{padding:var(--base-size-48) 0}.Primer_Brand__MinimalFooter-module__MinimalFooter__terms-item___VB5Sx{margin-bottom:var(--base-size-24)}.Primer_Brand__MinimalFooter-module__MinimalFooter__terms-item___VB5Sx sup{font-size:var(--base-size-12);vertical-align:super;margin-right:var(--base-size-4);display:inline-block}.Primer_Brand__MinimalFooter-module__MinimalFooter__terms-item___VB5Sx:last-child{margin-bottom:0}.Primer_Brand__MinimalFooter-module__MinimalFooter__top___UXzkJ{padding-top:var(--base-size-48);padding-bottom:var(--base-size-32);border-bottom:var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle)}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-row____WR7L{grid-gap:var(--base-size-24);align-items:center;gap:var(--base-size-24);grid-template-columns:auto 1fr;display:grid}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd{display:contents}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd>.Primer_Brand__MinimalFooter-module__MinimalFooter__links___kwBz2{grid-area:2/1/auto/-1;justify-content:flex-start}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd>.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit{grid-area:1/2;justify-self:flex-end}.Primer_Brand__MinimalFooter-module__MinimalFooter__logo___rFLvw{color:var(--brand-color-text-default);display:inline-flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__logo___rFLvw>svg{width:var(--base-size-24);height:var(--base-size-24)}.Primer_Brand__MinimalFooter-module__MinimalFooter__bottom___oi9Jk{padding-top:var(--base-size-32);padding-bottom:var(--base-size-32)}@media screen and (width>=80rem){.Primer_Brand__MinimalFooter-module__MinimalFooter__top___UXzkJ{padding-top:var(--base-size-32)}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-row____WR7L{justify-content:space-between;display:flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd{justify-content:flex-end;align-items:center;gap:var(--base-size-20);flex-wrap:wrap;flex:1;min-width:0;display:flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd>.Primer_Brand__MinimalFooter-module__MinimalFooter__links___kwBz2{justify-content:flex-end}.Primer_Brand__MinimalFooter-module__MinimalFooter__logo___rFLvw>svg{width:var(--base-size-32);height:var(--base-size-32)}}.Primer_Brand__MinimalFooter-module__MinimalFooter__section___W7x7a{min-width:0}.Primer_Brand__MinimalFooter-module__MinimalFooter__section--footnotes___9t40F{border-bottom:var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);background-color:var(--brand-color-canvas-default)}.Primer_Brand__MinimalFooter-module__MinimalFooter__section--center___K3_Ia>.Primer_Brand__MinimalFooter-module__MinimalFooter__container___mhY_8{padding-top:var(--base-size-32);padding-bottom:var(--base-size-32)}.Primer_Brand__MinimalFooter-module__MinimalFooter__section--center___K3_Ia+.Primer_Brand__MinimalFooter-module__MinimalFooter__section--bottom___HwSJJ{border-top:var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle)}.Primer_Brand__MinimalFooter-module__MinimalFooter__bottom-row___kcZck{align-items:flex-start;gap:var(--base-size-24);flex-direction:column;display:flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__social-links___0zKRs{justify-content:flex-start;align-items:center;gap:var(--base-size-16);margin:0;padding:0;list-style:none;display:flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__social-link___T5TF0{min-width:var(--base-size-24);min-height:var(--base-size-24);justify-content:center;align-items:center;display:flex;position:relative}.Primer_Brand__MinimalFooter-module__MinimalFooter__social-link___T5TF0:hover .Primer_Brand__MinimalFooter-module__MinimalFooter__social-icon___N1tDK,.Primer_Brand__MinimalFooter-module__MinimalFooter__social-link___T5TF0:focus-visible .Primer_Brand__MinimalFooter-module__MinimalFooter__social-icon___N1tDK{filter:var(--brand-footer-socialIcon-hoverFilter)}.Primer_Brand__MinimalFooter-module__MinimalFooter__social-icon___N1tDK{width:auto;height:auto;max-height:var(--base-size-20);filter:var(--brand-footer-socialIcon-restFilter);display:block}.Primer_Brand__MinimalFooter-module__MinimalFooter__copyright___qQ3QR{text-transform:uppercase;margin:0}.Primer_Brand__MinimalFooter-module__MinimalFooter__metaText___peNSx{font-size:var(--base-size-12)}.Primer_Brand__MinimalFooter-module__MinimalFooter__links___kwBz2{align-items:center;gap:var(--base-size-20);flex-wrap:wrap;display:flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__link___T4gI3{color:var(--brand-color-text-muted);cursor:pointer;text-transform:uppercase;background-color:#0000;border:0;align-self:center;padding:0;-webkit-text-decoration:none;text-decoration:none}.Primer_Brand__MinimalFooter-module__MinimalFooter__link___T4gI3:hover{-webkit-text-decoration:underline;text-decoration:underline}@media screen and (width>=48rem){.Primer_Brand__MinimalFooter-module__MinimalFooter__social-links___0zKRs{gap:var(--base-size-20)}}@media screen and (width>=80rem){.Primer_Brand__MinimalFooter-module__MinimalFooter__bottom-row___kcZck{flex-direction:row;justify-content:space-between;align-items:center}}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit{appearance:none;color:var(--brand-color-text-default);cursor:pointer;background:0 0;border:0;padding:0;display:inline-flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit:focus-visible{outline:var(--base-size-4) solid var(--brand-color-focus);outline-offset:var(--base-size-2)}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit:disabled,.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit[aria-disabled=true]{cursor:not-allowed}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-content___umaLY{align-items:center;gap:var(--base-size-12);display:inline-flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-icon___y85GZ{border:var(--brand-borderWidth-thin) solid var(--brand-footer-backToTop-borderColor-rest);border-radius:var(--base-size-6);background-color:var(--brand-footer-backToTop-bgColor-rest);min-width:var(--brand-footer-backToTop-minTarget);min-height:var(--brand-footer-backToTop-minTarget);transition:background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide), border-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide);justify-content:center;align-items:center;display:inline-flex}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit:not([disabled]):not([aria-disabled=true]):hover .Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-icon___y85GZ{border-color:var(--brand-footer-backToTop-borderColor-hover);background-color:var(--brand-footer-backToTop-bgColor-hover)}.Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit:not([disabled]):not([aria-disabled=true]):active .Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-icon___y85GZ{border-color:var(--brand-footer-backToTop-borderColor-active);background-color:var(--brand-footer-backToTop-bgColor-active)}@media (prefers-reduced-motion:reduce){.Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65,.Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65:before,.Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65:after,.Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65 *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import './MinimalFooter.module-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import './MinimalFooter.module-CGtOtT5r.css';var e = {
|
|
2
|
+
MinimalFooter: "Primer_Brand__MinimalFooter-module__MinimalFooter___xLq65",
|
|
3
|
+
"MinimalFooter--withFootnotes": "Primer_Brand__MinimalFooter-module__MinimalFooter--withFootnotes___oUvH8",
|
|
4
|
+
MinimalFooter__container: "Primer_Brand__MinimalFooter-module__MinimalFooter__container___mhY_8",
|
|
5
|
+
MinimalFooter__terms: "Primer_Brand__MinimalFooter-module__MinimalFooter__terms___gwB2R",
|
|
6
|
+
"MinimalFooter__terms-item": "Primer_Brand__MinimalFooter-module__MinimalFooter__terms-item___VB5Sx",
|
|
7
|
+
MinimalFooter__top: "Primer_Brand__MinimalFooter-module__MinimalFooter__top___UXzkJ",
|
|
8
|
+
"MinimalFooter__top-row": "Primer_Brand__MinimalFooter-module__MinimalFooter__top-row____WR7L",
|
|
9
|
+
"MinimalFooter__top-actions": "Primer_Brand__MinimalFooter-module__MinimalFooter__top-actions___dz_zd",
|
|
10
|
+
MinimalFooter__links: "Primer_Brand__MinimalFooter-module__MinimalFooter__links___kwBz2",
|
|
11
|
+
MinimalFooter__backToTop: "Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop___fmxit",
|
|
12
|
+
MinimalFooter__logo: "Primer_Brand__MinimalFooter-module__MinimalFooter__logo___rFLvw",
|
|
13
|
+
MinimalFooter__bottom: "Primer_Brand__MinimalFooter-module__MinimalFooter__bottom___oi9Jk",
|
|
14
|
+
MinimalFooter__section: "Primer_Brand__MinimalFooter-module__MinimalFooter__section___W7x7a",
|
|
15
|
+
"MinimalFooter__section--footnotes": "Primer_Brand__MinimalFooter-module__MinimalFooter__section--footnotes___9t40F",
|
|
16
|
+
"MinimalFooter__section--center": "Primer_Brand__MinimalFooter-module__MinimalFooter__section--center___K3_Ia",
|
|
17
|
+
"MinimalFooter__section--bottom": "Primer_Brand__MinimalFooter-module__MinimalFooter__section--bottom___HwSJJ",
|
|
18
|
+
"MinimalFooter__bottom-row": "Primer_Brand__MinimalFooter-module__MinimalFooter__bottom-row___kcZck",
|
|
19
|
+
"MinimalFooter__social-links": "Primer_Brand__MinimalFooter-module__MinimalFooter__social-links___0zKRs",
|
|
20
|
+
"MinimalFooter__social-link": "Primer_Brand__MinimalFooter-module__MinimalFooter__social-link___T5TF0",
|
|
21
|
+
"MinimalFooter__social-icon": "Primer_Brand__MinimalFooter-module__MinimalFooter__social-icon___N1tDK",
|
|
22
|
+
MinimalFooter__copyright: "Primer_Brand__MinimalFooter-module__MinimalFooter__copyright___qQ3QR",
|
|
23
|
+
MinimalFooter__metaText: "Primer_Brand__MinimalFooter-module__MinimalFooter__metaText___peNSx",
|
|
24
|
+
MinimalFooter__link: "Primer_Brand__MinimalFooter-module__MinimalFooter__link___T4gI3",
|
|
25
|
+
"MinimalFooter__backToTop-content": "Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-content___umaLY",
|
|
26
|
+
"MinimalFooter__backToTop-icon": "Primer_Brand__MinimalFooter-module__MinimalFooter__backToTop-icon___y85GZ"
|
|
14
27
|
};
|
|
15
28
|
//#endregion
|
|
16
29
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalFooter.module.js","names":[],"sources":["../../src/MinimalFooter/MinimalFooter.module.css"],"sourcesContent":[".
|
|
1
|
+
{"version":3,"file":"MinimalFooter.module.js","names":[],"sources":["../../src/MinimalFooter/MinimalFooter.module.css"],"sourcesContent":[".MinimalFooter {\n position: relative;\n border-top: var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);\n background-color: var(--brand-footer-bg-color);\n}\n\n.MinimalFooter--withFootnotes {\n border-top: 0;\n}\n\n/**\n * MinimalFooter shared styles\n */\n.MinimalFooter__container {\n max-width: var(--brand-footer-max-width, 1280px);\n padding-inline: var(--base-size-20);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media screen and (min-width: 48rem) {\n .MinimalFooter__container {\n padding-inline: var(--base-size-32);\n }\n}\n\n/**\n * MinimalFooter terms section\n */\n.MinimalFooter__terms {\n padding: var(--base-size-48) 0;\n}\n\n.MinimalFooter__terms-item {\n margin-bottom: var(--base-size-24);\n}\n\n.MinimalFooter__terms-item sup {\n font-size: var(--base-size-12);\n vertical-align: super;\n display: inline-block;\n margin-right: var(--base-size-4);\n}\n\n.MinimalFooter__terms-item:last-child {\n margin-bottom: 0;\n}\n\n/**\n * MinimalFooter top section\n */\n.MinimalFooter__top {\n padding-top: var(--base-size-48);\n padding-bottom: var(--base-size-32);\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle);\n}\n\n.MinimalFooter__top-row {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n gap: var(--base-size-24);\n}\n\n.MinimalFooter__top-actions {\n display: contents;\n}\n\n.MinimalFooter__top-actions > .MinimalFooter__links {\n grid-column: 1 / -1;\n grid-row: 2;\n justify-content: flex-start;\n}\n\n.MinimalFooter__top-actions > .MinimalFooter__backToTop {\n grid-column: 2;\n grid-row: 1;\n justify-self: flex-end;\n}\n\n.MinimalFooter__logo {\n display: inline-flex;\n color: var(--brand-color-text-default);\n}\n\n.MinimalFooter__logo > svg {\n width: var(--base-size-24);\n height: var(--base-size-24);\n}\n\n.MinimalFooter__bottom {\n padding-top: var(--base-size-32);\n padding-bottom: var(--base-size-32);\n}\n\n@media screen and (min-width: 80rem) {\n .MinimalFooter__top {\n padding-top: var(--base-size-32);\n }\n\n .MinimalFooter__top-row {\n display: flex;\n justify-content: space-between;\n }\n\n .MinimalFooter__top-actions {\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-end;\n gap: var(--base-size-20);\n min-width: 0;\n }\n\n .MinimalFooter__top-actions > .MinimalFooter__links {\n justify-content: flex-end;\n }\n\n .MinimalFooter__logo > svg {\n width: var(--base-size-32);\n height: var(--base-size-32);\n }\n}\n\n.MinimalFooter__section {\n min-width: 0;\n}\n\n.MinimalFooter__section--footnotes {\n border-bottom: var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);\n background-color: var(--brand-color-canvas-default);\n}\n\n.MinimalFooter__section--center > .MinimalFooter__container {\n padding-top: var(--base-size-32);\n padding-bottom: var(--base-size-32);\n}\n\n.MinimalFooter__section--center + .MinimalFooter__section--bottom {\n border-top: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle);\n}\n\n/**\n * MinimalFooter bottom section\n */\n.MinimalFooter__bottom-row {\n display: flex;\n}\n\n.MinimalFooter__bottom-row {\n flex-direction: column;\n align-items: flex-start;\n gap: var(--base-size-24);\n}\n\n.MinimalFooter__social-links {\n display: flex;\n padding: 0;\n margin: 0;\n list-style: none;\n justify-content: flex-start;\n align-items: center;\n gap: var(--base-size-16);\n}\n\n.MinimalFooter__social-link {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: var(--base-size-24);\n min-height: var(--base-size-24);\n}\n\n.MinimalFooter__social-link:hover .MinimalFooter__social-icon,\n.MinimalFooter__social-link:focus-visible .MinimalFooter__social-icon {\n filter: var(--brand-footer-socialIcon-hoverFilter);\n}\n\n.MinimalFooter__social-icon {\n display: block;\n width: auto;\n height: auto;\n max-height: var(--base-size-20);\n filter: var(--brand-footer-socialIcon-restFilter);\n}\n\n.MinimalFooter__copyright {\n margin: 0;\n text-transform: uppercase;\n}\n\n/* Keep the size-100 text rhythm, but use the approved 12px size token for footer chrome. */\n.MinimalFooter__metaText {\n font-size: var(--base-size-12);\n}\n\n.MinimalFooter__links {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--base-size-20);\n}\n\n.MinimalFooter__link {\n align-self: center;\n color: var(--brand-color-text-muted);\n text-decoration: none;\n border: 0;\n background-color: transparent;\n cursor: pointer;\n padding: 0;\n text-transform: uppercase;\n}\n\n.MinimalFooter__link:hover {\n text-decoration: underline;\n}\n\n@media screen and (min-width: 48rem) {\n .MinimalFooter__social-links {\n gap: var(--base-size-20);\n }\n}\n\n@media screen and (min-width: 80rem) {\n .MinimalFooter__bottom-row {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n}\n\n.MinimalFooter__backToTop {\n appearance: none;\n display: inline-flex;\n padding: 0;\n border: 0;\n color: var(--brand-color-text-default);\n background: none;\n cursor: pointer;\n}\n\n.MinimalFooter__backToTop:focus-visible {\n outline: var(--base-size-4) solid var(--brand-color-focus);\n outline-offset: var(--base-size-2);\n}\n\n.MinimalFooter__backToTop:disabled,\n.MinimalFooter__backToTop[aria-disabled='true'] {\n cursor: not-allowed;\n}\n\n.MinimalFooter__backToTop-content {\n display: inline-flex;\n align-items: center;\n gap: var(--base-size-12);\n}\n\n.MinimalFooter__backToTop-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--brand-borderWidth-thin) solid var(--brand-footer-backToTop-borderColor-rest);\n border-radius: var(--base-size-6);\n background-color: var(--brand-footer-backToTop-bgColor-rest);\n min-width: var(--brand-footer-backToTop-minTarget);\n min-height: var(--brand-footer-backToTop-minTarget);\n transition: background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide),\n border-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide);\n}\n\n.MinimalFooter__backToTop:not([disabled], [aria-disabled='true']):hover .MinimalFooter__backToTop-icon {\n border-color: var(--brand-footer-backToTop-borderColor-hover);\n background-color: var(--brand-footer-backToTop-bgColor-hover);\n}\n\n.MinimalFooter__backToTop:not([disabled], [aria-disabled='true']):active .MinimalFooter__backToTop-icon {\n border-color: var(--brand-footer-backToTop-borderColor-active);\n background-color: var(--brand-footer-backToTop-bgColor-active);\n}\n\n/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */\n@media (prefers-reduced-motion: reduce) {\n .MinimalFooter,\n .MinimalFooter::before,\n .MinimalFooter::after,\n .MinimalFooter * {\n animation: none !important;\n transition: none !important;\n scroll-behavior: auto !important;\n }\n}\n"],"mappings":""}
|
package/esm/Pillar/Pillar.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ type PillarLinkProps = {
|
|
|
43
43
|
} & Omit<LinkProps, 'size' | 'direction'> & BaseProps<HTMLAnchorElement>;
|
|
44
44
|
/**
|
|
45
45
|
* Pillar component:
|
|
46
|
-
*
|
|
46
|
+
* @see https://primer.style/brand/components/Pillar
|
|
47
47
|
*/
|
|
48
48
|
export declare const Pillar: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<PillarProps<"div">>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
49
49
|
Icon: typeof PillarIcon;
|
package/esm/Pillar/Pillar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pillar.js","names":[],"sources":["../../src/Pillar/Pillar.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, HTMLAttributes, type Ref, type JSX} from 'react'\nimport {clsx} from 'clsx'\nimport {Heading, HeadingProps, Text, Image, type ImageProps, Link, LinkProps} from '..'\nimport {Icon, type IconProps} from '../Icon'\nimport type {BaseProps} from '../component-helpers'\nimport {useAnimation} from '../animation'\n\n/**\n * Main stylesheet (as a CSS Module)\n */\nimport styles from './Pillar.module.css'\n\nexport const defaultPillarIconColor = 'green'\nexport const defaultPillarIconSize = 32\nexport type PillarProps<C extends keyof JSX.IntrinsicElements = 'div'> = React.HTMLAttributes<C> & {\n /**\n * The HTML element used to render the Pillar.\n */\n as?: C | 'div' | 'article'\n /**\n * Aligns the pillar content\n */\n align?: 'start' | 'center'\n /**\n * Enables optional border around the pillar content\n */\n hasBorder?: boolean\n /**\n * Allows the pillar to fill the width of its parent container.\n */\n fullWidth?: boolean\n} & (C extends 'article' ? PropsWithChildren<BaseProps<HTMLElement>> : PropsWithChildren<BaseProps<HTMLDivElement>>)\n\nconst PillarRoot = forwardRef(\n (\n {\n children,\n className,\n animate,\n as = 'div',\n align = 'start',\n style,\n hasBorder = false,\n fullWidth = false,\n ...rest\n }: PropsWithChildren<PillarProps>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const filteredChildren = React.Children.toArray(children).filter(child => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (\n child.type === PillarImage ||\n child.type === PillarIcon ||\n child.type === PillarHeading ||\n child.type === PillarDescription ||\n child.type === PillarLink\n ) {\n return true\n }\n }\n return false\n })\n\n const validElements = ['div', 'article']\n const Component = validElements.includes(as) ? as : 'div'\n\n return (\n <Component\n className={clsx(\n styles.Pillar,\n styles[`Pillar--align-${align}`],\n hasBorder && styles['Pillar--has-border'],\n !fullWidth && styles['Pillar--has-max-width'],\n animationClasses,\n className,\n )}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n style={{...animationInlineStyles, ...style}}\n >\n {filteredChildren}\n </Component>\n )\n },\n)\n\ntype PillarImageProps = ImageProps\n\nfunction PillarImage({className, ...rest}: PillarImageProps) {\n return (\n <div className={styles.Pillar__image}>\n <Image className={className} {...rest} />\n </div>\n )\n}\n\ntype IconComponentProps = React.SVGAttributes<SVGElement> & {size?: number}\ntype IconComponent = React.ComponentType<IconComponentProps> | React.ExoticComponent<IconComponentProps>\ntype IconElement = React.ReactElement<IconComponentProps>\n\nexport type PillarIconProps = Omit<IconProps, 'icon' | 'color'> & {\n icon: IconElement | IconComponent\n}\n\nfunction PillarIcon({icon, className, hasBackground = true, size, ...props}: PillarIconProps) {\n if (!hasBackground) {\n const iconWrapperProps = {\n ...(props as React.HTMLAttributes<HTMLSpanElement>),\n className: clsx(styles.Pillar__icon, className),\n }\n\n let iconWithoutBackground: React.ReactNode\n\n if (React.isValidElement<IconComponentProps>(icon)) {\n iconWithoutBackground = icon\n } else {\n const IconWithoutBackground = icon\n iconWithoutBackground = <IconWithoutBackground />\n }\n\n return <span {...iconWrapperProps}>{iconWithoutBackground}</span>\n }\n\n return (\n <Icon\n className={clsx(styles.Pillar__icon, styles['Pillar__icon--with-background'], className)}\n color={defaultPillarIconColor}\n hasBackground\n icon={icon as IconProps['icon']}\n size={size ?? defaultPillarIconSize}\n {...props}\n />\n )\n}\n\ntype PillarHeadingProps = BaseProps<HTMLHeadingElement> & {\n children: React.ReactNode | React.ReactNode[]\n as?: Exclude<HeadingProps['as'], 'h1'>\n} & HeadingProps\n\nconst PillarHeading = forwardRef<HTMLHeadingElement, PillarHeadingProps>(\n ({children, as = 'h3', size = '6', className, ...rest}, ref) => {\n return (\n <Heading\n size={size}\n className={clsx(styles.Pillar__heading, styles[`Pillar__heading--size-${size}`], className)}\n ref={ref}\n as={as}\n {...rest}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype PillarDescriptionProps = PropsWithChildren<BaseProps<HTMLParagraphElement>>\n\nconst PillarDescription = forwardRef<HTMLParagraphElement, PillarDescriptionProps>(\n ({children, className, ...rest}, ref) => {\n return (\n <Text\n variant=\"muted\"\n ref={ref}\n size=\"200\"\n as=\"p\"\n className={clsx(styles.Pillar__description, className)}\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype PillarLinkProps = {\n href: string\n} & Omit<LinkProps, 'size' | 'direction'> &\n BaseProps<HTMLAnchorElement>\n\nconst PillarLink = forwardRef(({className, children, href, ...props}: PillarLinkProps, ref: Ref<HTMLAnchorElement>) => {\n return (\n <Link variant=\"accent\" href={href} ref={ref} className={clsx(styles.Pillar__link, className)} {...props}>\n {children}\n </Link>\n )\n})\n\n/**\n * Pillar component:\n *
|
|
1
|
+
{"version":3,"file":"Pillar.js","names":[],"sources":["../../src/Pillar/Pillar.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, HTMLAttributes, type Ref, type JSX} from 'react'\nimport {clsx} from 'clsx'\nimport {Heading, HeadingProps, Text, Image, type ImageProps, Link, LinkProps} from '..'\nimport {Icon, type IconProps} from '../Icon'\nimport type {BaseProps} from '../component-helpers'\nimport {useAnimation} from '../animation'\n\n/**\n * Main stylesheet (as a CSS Module)\n */\nimport styles from './Pillar.module.css'\n\nexport const defaultPillarIconColor = 'green'\nexport const defaultPillarIconSize = 32\nexport type PillarProps<C extends keyof JSX.IntrinsicElements = 'div'> = React.HTMLAttributes<C> & {\n /**\n * The HTML element used to render the Pillar.\n */\n as?: C | 'div' | 'article'\n /**\n * Aligns the pillar content\n */\n align?: 'start' | 'center'\n /**\n * Enables optional border around the pillar content\n */\n hasBorder?: boolean\n /**\n * Allows the pillar to fill the width of its parent container.\n */\n fullWidth?: boolean\n} & (C extends 'article' ? PropsWithChildren<BaseProps<HTMLElement>> : PropsWithChildren<BaseProps<HTMLDivElement>>)\n\nconst PillarRoot = forwardRef(\n (\n {\n children,\n className,\n animate,\n as = 'div',\n align = 'start',\n style,\n hasBorder = false,\n fullWidth = false,\n ...rest\n }: PropsWithChildren<PillarProps>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const filteredChildren = React.Children.toArray(children).filter(child => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (\n child.type === PillarImage ||\n child.type === PillarIcon ||\n child.type === PillarHeading ||\n child.type === PillarDescription ||\n child.type === PillarLink\n ) {\n return true\n }\n }\n return false\n })\n\n const validElements = ['div', 'article']\n const Component = validElements.includes(as) ? as : 'div'\n\n return (\n <Component\n className={clsx(\n styles.Pillar,\n styles[`Pillar--align-${align}`],\n hasBorder && styles['Pillar--has-border'],\n !fullWidth && styles['Pillar--has-max-width'],\n animationClasses,\n className,\n )}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n style={{...animationInlineStyles, ...style}}\n >\n {filteredChildren}\n </Component>\n )\n },\n)\n\ntype PillarImageProps = ImageProps\n\nfunction PillarImage({className, ...rest}: PillarImageProps) {\n return (\n <div className={styles.Pillar__image}>\n <Image className={className} {...rest} />\n </div>\n )\n}\n\ntype IconComponentProps = React.SVGAttributes<SVGElement> & {size?: number}\ntype IconComponent = React.ComponentType<IconComponentProps> | React.ExoticComponent<IconComponentProps>\ntype IconElement = React.ReactElement<IconComponentProps>\n\nexport type PillarIconProps = Omit<IconProps, 'icon' | 'color'> & {\n icon: IconElement | IconComponent\n}\n\nfunction PillarIcon({icon, className, hasBackground = true, size, ...props}: PillarIconProps) {\n if (!hasBackground) {\n const iconWrapperProps = {\n ...(props as React.HTMLAttributes<HTMLSpanElement>),\n className: clsx(styles.Pillar__icon, className),\n }\n\n let iconWithoutBackground: React.ReactNode\n\n if (React.isValidElement<IconComponentProps>(icon)) {\n iconWithoutBackground = icon\n } else {\n const IconWithoutBackground = icon\n iconWithoutBackground = <IconWithoutBackground />\n }\n\n return <span {...iconWrapperProps}>{iconWithoutBackground}</span>\n }\n\n return (\n <Icon\n className={clsx(styles.Pillar__icon, styles['Pillar__icon--with-background'], className)}\n color={defaultPillarIconColor}\n hasBackground\n icon={icon as IconProps['icon']}\n size={size ?? defaultPillarIconSize}\n {...props}\n />\n )\n}\n\ntype PillarHeadingProps = BaseProps<HTMLHeadingElement> & {\n children: React.ReactNode | React.ReactNode[]\n as?: Exclude<HeadingProps['as'], 'h1'>\n} & HeadingProps\n\nconst PillarHeading = forwardRef<HTMLHeadingElement, PillarHeadingProps>(\n ({children, as = 'h3', size = '6', className, ...rest}, ref) => {\n return (\n <Heading\n size={size}\n className={clsx(styles.Pillar__heading, styles[`Pillar__heading--size-${size}`], className)}\n ref={ref}\n as={as}\n {...rest}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype PillarDescriptionProps = PropsWithChildren<BaseProps<HTMLParagraphElement>>\n\nconst PillarDescription = forwardRef<HTMLParagraphElement, PillarDescriptionProps>(\n ({children, className, ...rest}, ref) => {\n return (\n <Text\n variant=\"muted\"\n ref={ref}\n size=\"200\"\n as=\"p\"\n className={clsx(styles.Pillar__description, className)}\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype PillarLinkProps = {\n href: string\n} & Omit<LinkProps, 'size' | 'direction'> &\n BaseProps<HTMLAnchorElement>\n\nconst PillarLink = forwardRef(({className, children, href, ...props}: PillarLinkProps, ref: Ref<HTMLAnchorElement>) => {\n return (\n <Link variant=\"accent\" href={href} ref={ref} className={clsx(styles.Pillar__link, className)} {...props}>\n {children}\n </Link>\n )\n})\n\n/**\n * Pillar component:\n * @see https://primer.style/brand/components/Pillar\n */\nexport const Pillar = Object.assign(PillarRoot, {\n Icon: PillarIcon,\n Image: PillarImage,\n Heading: PillarHeading,\n Description: PillarDescription,\n Link: PillarLink,\n})\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,IAAyB,SACzB,IAAwB,IAoB/B,IAAa,GAEf,EACE,aACA,cACA,YACA,QAAK,OACL,WAAQ,SACR,UACA,eAAY,IACZ,eAAY,IACZ,GAAG,KAEL,MACG;CACH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAElF,IAAmB,EAAM,SAAS,QAAQ,EAAS,CAAC,QAAO,MAC/D,GAAI,EAAM,eAAe,EAAM,IAAI,OAAO,EAAM,QAAS,aAErD,EAAM,SAAS,KACf,EAAM,SAAS,KACf,EAAM,SAAS,KACf,EAAM,SAAS,KACf,EAA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ACtD,GAAI;CAEH;CACI,CAAA,CAGZ,EAOK,IAAa,GAAY,EAAC,cAAW,aAAU,SAAM,GAAG,KAAyB,MAEnF,kBAAC,GAAD;CAAM,SAAQ;CAAe;CAAW;CAAK,WAAW,EAAK,EAAO,cAAc,EAAU;CAAE,GAAI;CAC/F;CACI,CAAA,CAET,EAMW,IAAS,OAAO,OAAO,GAAY;CAC9C,MAAM;CACN,OAAO;CACP,SAAS;CACT,aAAa;CACb,MAAM;CACP,CAAC"}
|
|
@@ -63,6 +63,10 @@ type PricingOptionsFeatureListGroupHeadingProps = PropsWithChildren<BaseProps<HT
|
|
|
63
63
|
type PricingOptionsFeatureListItemProps = PropsWithChildren<BaseProps<HTMLLIElement>> & {
|
|
64
64
|
'data-testid'?: string;
|
|
65
65
|
infoTooltip?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Optional accessible label for the info tooltip trigger. Overrides the automatically generated label.
|
|
68
|
+
*/
|
|
69
|
+
infoTooltipAriaLabel?: string;
|
|
66
70
|
variant?: 'included' | 'excluded';
|
|
67
71
|
} & Omit<ListItemProps, 'variant'>;
|
|
68
72
|
type AsA = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingOptions.d.ts","sourceRoot":"","sources":["../../src/PricingOptions/PricingOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,cAAc,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAA;AAGlG,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAS,KAAK,eAAe,EAAC,MAAM,WAAW,CAAA;AACtD,OAAO,EAA8B,KAAK,YAAY,EAAC,MAAM,YAAY,CAAA;AAMzE;;GAEG;AACH,OAAO,iHAAiH,CAAA;AACxH,OAAO,mHAAmH,CAAA;AAO1H,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ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
})), M = p(({ children: t, className: n, infoTooltip: r,
|
|
264
|
-
let
|
|
263
|
+
})), M = p(({ children: t, className: n, infoTooltip: r, infoTooltipAriaLabel: a, leadingVisual: s, leadingVisualFill: c, variant: f = "included", "data-testid": p, ...m }, h) => {
|
|
264
|
+
let y = s ?? (f === "included" ? i : o), b = f === "included" ? "Includes" : "Does not include", x = c ?? (f === "included" ? "var(--brand-color-accent-primary)" : "var(--brand-color-text-muted)");
|
|
265
265
|
return /* @__PURE__ */ _(l.Item, {
|
|
266
|
-
className: e(d["PricingOptions__feature-list-item"], { [d["PricingOptions__feature-list-item--excluded"]]:
|
|
267
|
-
"data-testid":
|
|
268
|
-
leadingVisual:
|
|
269
|
-
leadingVisualAriaLabel:
|
|
270
|
-
leadingVisualFill:
|
|
271
|
-
ref:
|
|
272
|
-
...
|
|
266
|
+
className: e(d["PricingOptions__feature-list-item"], { [d["PricingOptions__feature-list-item--excluded"]]: f === "excluded" }, r && d["PricingOptions__feature-list-item--has-info"], n),
|
|
267
|
+
"data-testid": p || v.featureListItem,
|
|
268
|
+
leadingVisual: y,
|
|
269
|
+
leadingVisualAriaLabel: b,
|
|
270
|
+
leadingVisualFill: x,
|
|
271
|
+
ref: h,
|
|
272
|
+
...m,
|
|
273
273
|
children: [t, r && /* @__PURE__ */ g(u, {
|
|
274
274
|
text: r,
|
|
275
275
|
direction: "n",
|
|
276
276
|
children: /* @__PURE__ */ g("button", {
|
|
277
277
|
type: "button",
|
|
278
278
|
className: d["PricingOptions__feature-list-item-info"],
|
|
279
|
-
"aria-label": `More information about ${typeof t == "string" ? t : "this feature"}`,
|
|
279
|
+
"aria-label": a ?? `More information about ${typeof t == "string" ? t : "this feature"}`,
|
|
280
280
|
children: /* @__PURE__ */ _("svg", {
|
|
281
281
|
viewBox: "0 0 4 8",
|
|
282
282
|
fill: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingOptions.js","names":[],"sources":["../../src/PricingOptions/PricingOptions.tsx"],"sourcesContent":["import React, {forwardRef, HTMLAttributes, PropsWithChildren, useMemo, Ref, Dispatch} from 'react'\nimport {CheckIcon, TriangleDownIcon, XIcon} from '@primer/octicons-react'\nimport {clsx} from 'clsx'\nimport type {ListItemProps} from '../list/ListItem/ListItem'\nimport type {BaseProps} from '../component-helpers'\nimport {Accordion} from '../Accordion/Accordion'\nimport {Button, type ButtonBaseProps} from '../Button'\nimport {Heading as HeadingComponent, type HeadingProps} from '../Heading'\nimport {Text} from '../Text'\nimport {Tooltip} from '../Tooltip'\nimport {useWindowSize} from '../hooks/useWindowSize'\nimport {UnorderedList, type UnorderedListProps} from '../list'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css'\n\n/**\n * Main stylesheet (as a CSS Module)\n */\nimport styles from './PricingOptions.module.css'\n\ntype AlignOptions = 'start' | 'center'\n\nexport type PricingOptionsProps = {\n align?: AlignOptions\n variant?: 'default' | 'default-gradient' | 'cards' | 'cards-gradient'\n ['data-testid']?: string\n} & PropsWithChildren<BaseProps<HTMLDivElement>> &\n HTMLAttributes<HTMLDivElement>\n\nconst testIds = {\n root: 'PricingOptions',\n item: 'PricingOptions__item',\n labelRow: 'PricingOptions__labels',\n heading: 'PricingOptions__heading',\n label: 'PricingOptions__label',\n description: 'PricingOptions__description',\n price: 'PricingOptions__price',\n actionsMessage: 'PricingOptions__actionsMessage',\n primaryAction: 'PricingOptions__primaryAction',\n secondaryAction: 'PricingOptions__secondaryAction',\n menuAction: 'PricingOptions__menuAction',\n featureList: 'PricingOptions__featureList',\n featureListHeading: 'PricingOptions__featureListHeading',\n featureListItem: 'PricingOptions__featureListItem',\n featureListGroupHeading: 'PricingOptions__featureListGroupHeading',\n footnote: 'PricingOptions__footnote',\n}\n\ntype PricingOptionsContextValue = {\n align: AlignOptions\n allFeatureListsExpanded: boolean\n updateFeatureListExpanded: Dispatch<boolean>\n featureListUserInteracted: boolean\n setFeatureListUserInteracted: Dispatch<boolean>\n}\n\nconst PricingOptionsContext = React.createContext<PricingOptionsContextValue>({\n align: 'start',\n allFeatureListsExpanded: false,\n featureListUserInteracted: false,\n updateFeatureListExpanded: () => {},\n setFeatureListUserInteracted: () => {},\n})\n\nconst PricingOptionsProvider = ({children, align = 'start'}: PropsWithChildren<{align: AlignOptions}>) => {\n const [allFeatureListsExpanded, setAllFeatureListsExpanded] = React.useState(false)\n const [featureListUserInteracted, setFeatureListUserInteracted] = React.useState(false)\n\n const updateFeatureListExpanded = (newValue: boolean) => {\n setAllFeatureListsExpanded(() => newValue)\n }\n\n return (\n <PricingOptionsContext.Provider\n value={{\n allFeatureListsExpanded,\n updateFeatureListExpanded,\n align,\n featureListUserInteracted,\n setFeatureListUserInteracted,\n }}\n >\n {children}\n </PricingOptionsContext.Provider>\n )\n}\n\nconst usePricingOptions = (): PricingOptionsContextValue => {\n return React.useContext(PricingOptionsContext)\n}\n\nconst pricingOptionsDefaultFeatureListHeading = \"What's included\"\n\ntype PricingOptionsLabelProps = PropsWithChildren<{\n 'data-testid'?: string\n}>\n\nconst PricingOptionsLabel = ({children}: PricingOptionsLabelProps) => {\n return <>{children}</>\n}\n\nconst PricingOptionsRoot = forwardRef(\n (\n {\n align = 'start',\n children,\n className,\n 'data-testid': testId,\n variant = 'default',\n ...rest\n }: PropsWithChildren<PricingOptionsProps>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const filteredChildren = useMemo(\n () =>\n React.Children.toArray(children).filter(\n child => React.isValidElement(child) && typeof child.type !== 'string' && child.type === PricingOptionsItem,\n ) as React.ReactElement<PropsWithChildren<PricingOptionsItem>>[],\n [children],\n ).slice(0, 4)\n\n const headerLabels = useMemo(\n () =>\n filteredChildren.map(item => {\n const labelChild = React.Children.toArray(item.props.children).find(\n child =>\n React.isValidElement(child) && typeof child.type !== 'string' && child.type === PricingOptionsLabel,\n )\n\n return (\n React.isValidElement(labelChild) ? labelChild : null\n ) as React.ReactElement<PricingOptionsLabelProps> | null\n }),\n [filteredChildren],\n )\n\n const hasHeaderLabels = headerLabels.some(label => label !== null)\n\n return (\n <PricingOptionsProvider align={align}>\n <div\n className={clsx(\n styles.PricingOptions,\n styles[`PricingOptions--layout-${variant.includes('default') ? 'default' : 'cards'}`],\n styles[`PricingOptions--items${filteredChildren.length}`],\n styles[`PricingOptions--appearance-${variant.includes('gradient') ? 'gradient' : 'solid'}`],\n className,\n )}\n data-testid={testId || testIds.root}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n {filteredChildren}\n\n {hasHeaderLabels && (\n <div\n className={styles['PricingOptions__labels']}\n data-testid={testIds.labelRow}\n style={\n {\n '--brand-pricing-options-column-count': filteredChildren.length,\n } as React.CSSProperties\n }\n >\n {headerLabels.map((headerLabel, index) => {\n const hasLabelContent = Boolean(headerLabel?.props.children)\n\n return (\n <div\n className={clsx(\n styles['PricingOptions__label-cell'],\n hasLabelContent\n ? styles['PricingOptions__label-cell--has-label']\n : styles['PricingOptions__label-cell--empty'],\n )}\n data-testid={headerLabel?.props['data-testid'] || testIds.label}\n key={index}\n >\n {headerLabel?.props.children ? (\n <span className={styles.PricingOptions__label}>{headerLabel.props.children}</span>\n ) : null}\n </div>\n )\n })}\n </div>\n )}\n </div>\n </PricingOptionsProvider>\n )\n },\n)\n\nexport type PricingOptionsItem = {\n ['data-testid']?: string\n /**\n * Escape-hatch for inserting custom React components.\n * Warning:\n * This prop isn't advertised in our docs but remains part of the public API for edge-cases.\n * Need to use this prop? Please check in with #primer-brand first to confirm correct usage.\n */\n leadingComponent?: React.ReactElement\n} & PropsWithChildren<BaseProps<HTMLDivElement>>\n\ntype FilteredChildren = {\n FeatureList: React.ReactElement<PricingOptionsFeatureListProps> | null\n Actions: React.ReactElement<PricingOptionsActionsProps>[]\n ActionsMessage: React.ReactElement<PricingOptionsActionsMessageProps> | null\n Footnote: React.ReactElement<PricingOptionsFootnoteProps> | null\n Heading: React.ReactElement<PricingOptionsHeadingProps> | null\n Description: React.ReactElement<PricingOptionsDescriptionProps> | null\n Price: React.ReactElement<PricingOptionsPriceProps> | null\n}\n\nconst PricingOptionsItem = forwardRef(\n (\n {'data-testid': testId, children, className, leadingComponent, ...rest}: PropsWithChildren<PricingOptionsItem>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {align} = usePricingOptions()\n\n const memoizedChildren = useMemo(() => React.Children.toArray(children), [children])\n\n const filteredChildren = memoizedChildren.reduce<FilteredChildren>(\n (acc, child) => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (child.type === PricingOptionsFeatureList) {\n acc.FeatureList = child as React.ReactElement<PricingOptionsFeatureListProps> | null\n }\n\n if (\n child.type === PricingOptionsPrimaryAction ||\n child.type === PricingOptionsSecondaryAction ||\n child.type === PricingOptionsMenuAction\n ) {\n acc.Actions.push(child as React.ReactElement<PricingOptionsActionsProps>)\n }\n\n if (child.type === PricingOptionsActionsMessage) {\n acc.ActionsMessage = child as React.ReactElement<PricingOptionsActionsMessageProps>\n }\n\n if (child.type === PricingOptionsFootnote) {\n acc.Footnote = child as React.ReactElement<PricingOptionsFootnoteProps>\n }\n\n if (child.type === PricingOptionsHeading) {\n acc.Heading = child as React.ReactElement<PricingOptionsHeadingProps>\n }\n\n if (child.type === PricingOptionsDescription) {\n acc.Description = child as React.ReactElement<PricingOptionsDescriptionProps>\n }\n\n if (child.type === PricingOptionsPrice) {\n acc.Price = child as React.ReactElement<PricingOptionsPriceProps>\n }\n }\n\n return acc\n },\n {\n FeatureList: null,\n Actions: [],\n ActionsMessage: null,\n Footnote: null,\n Heading: null,\n Description: null,\n Price: null,\n },\n )\n\n const {Heading, Description, Price, FeatureList, Actions, ActionsMessage, Footnote} = filteredChildren\n\n return (\n <div\n className={clsx(\n styles.PricingOptions__item,\n leadingComponent && styles['PricingOptions__item--has-leading-component'],\n styles[`PricingOptions__item--align-${align}`],\n className,\n )}\n data-testid={testId || testIds.item}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n <div className={styles['PricingOptions__header']}>{Heading}</div>\n {Description}\n {Price}\n {leadingComponent && <div className={styles['PricingOptions__leading-component']}>{leadingComponent}</div>}\n {(Actions.length > 0 || ActionsMessage) && (\n <div className={styles.PricingOptions__actions}>\n {Actions}\n {ActionsMessage}\n </div>\n )}\n {FeatureList}\n {Footnote}\n </div>\n )\n },\n)\n\ntype PricingOptionsDescriptionProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsDescription = forwardRef<HTMLParagraphElement, PricingOptionsDescriptionProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__description, className)}\n data-testid={testId || testIds.description}\n ref={ref}\n size=\"200\"\n variant=\"muted\"\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype PricingOptionsHeadingProps = PropsWithChildren<BaseProps<HTMLHeadingElement>> & {\n 'data-testid'?: string\n} & HeadingProps\n\nconst PricingOptionsHeading = forwardRef<HTMLHeadingElement, PricingOptionsHeadingProps>(\n ({as = 'h3', children, 'data-testid': testId, size = '5', className, ...rest}, ref) => {\n return (\n <HeadingComponent\n as={as}\n className={clsx(styles.PricingOptions__heading, styles[`PricingOptions__heading--size-${size}`], className)}\n data-testid={testId || testIds.heading}\n ref={ref}\n size={size}\n {...rest}\n >\n {children}\n </HeadingComponent>\n )\n },\n)\n\ntype PricingOptionsPriceProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n currencyCode?: string\n currencySymbol?: string\n 'data-testid'?: string\n originalPrice?: string\n trailingText?: string\n}\n\nconst PricingOptionsPrice = forwardRef<HTMLParagraphElement, PricingOptionsPriceProps>(\n (\n {\n children,\n className,\n currencyCode = 'USD',\n currencySymbol = '$',\n 'data-testid': testId,\n originalPrice,\n trailingText,\n ...rest\n },\n ref,\n ) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__price, className)}\n data-testid={testId || testIds.price}\n ref={ref}\n weight=\"normal\"\n {...rest}\n >\n <span className={styles['PricingOptions__price-amount']}>\n <Text as=\"span\" className={styles['PricingOptions__price-currency-symbol']} size=\"500\" weight=\"normal\">\n {currencySymbol}\n </Text>\n\n <Text as=\"span\" className={styles['PricingOptions__price-value']} size=\"500\" weight=\"normal\">\n {children}\n </Text>\n\n <Text as=\"span\" className={styles['PricingOptions__price-currency-code']} size=\"100\" weight=\"normal\">\n {currencyCode}\n </Text>\n </span>\n\n {originalPrice && (\n <del className={styles['PricingOptions__price-original-price']}>\n <Text size=\"400\" variant=\"muted\" weight=\"normal\">\n {currencySymbol}\n </Text>\n <Text\n className={styles['PricingOptions__price-original-price-value']}\n size=\"300\"\n variant=\"muted\"\n weight=\"normal\"\n >\n {originalPrice}\n </Text>\n </del>\n )}\n\n {trailingText && (\n <Text as=\"span\" className={styles['PricingOptions__price-trailing-text']} size=\"200\" variant=\"muted\">\n {trailingText}\n </Text>\n )}\n </Text>\n )\n },\n)\n\ntype PricingOptionsFeatureListProps = BaseProps<HTMLUListElement> & {\n accordionAs?: HeadingProps['as']\n expanded?: ExpandedProp\n hasDivider?: boolean\n children: React.ReactElement<PricingOptionsFeatureListGroupHeadingProps | PricingOptionsFeatureListItemProps>[]\n 'data-testid'?: string\n}\n\ntype ExpandedProp = boolean | ResponsiveExpandableProps\n\ntype ResponsiveExpandableProps = {\n narrow: boolean\n regular: boolean\n wide: boolean\n}\n\ntype ValidFeatureListChildren = {\n Heading: React.ReactElement<PricingOptionsFeatureListGroupHeadingProps> | null\n Items: React.ReactElement<PricingOptionsFeatureListItemProps>[]\n}[]\n\nconst PricingOptionsFeatureList = forwardRef<HTMLDivElement, PricingOptionsFeatureListProps>(\n ({children, className, 'data-testid': testId, hasDivider = true, expanded, accordionAs = 'h4', ...rest}, ref) => {\n const {\n allFeatureListsExpanded,\n updateFeatureListExpanded,\n featureListUserInteracted,\n setFeatureListUserInteracted,\n } = usePricingOptions()\n const {isMedium: isRegular, isXLarge: isWide, isSmall: isNarrow} = useWindowSize()\n\n React.useEffect(() => {\n if (expanded === undefined || typeof expanded === 'object') {\n setFeatureListUserInteracted(false)\n }\n }, [isRegular, isWide, isNarrow, setFeatureListUserInteracted, expanded])\n\n const shouldBeOpen = React.useMemo(() => {\n if (featureListUserInteracted) {\n return allFeatureListsExpanded\n }\n\n // Important: Fixes layout shift by ensuring that explicit values are preserved.\n if (typeof expanded === 'boolean') {\n return expanded\n }\n // If undefined, should follow some default responsive logic\n if (expanded === undefined) {\n if (isWide) return true\n if (isRegular) return true\n return false\n }\n\n // finally handle responsive objects, and go from largest to smallest viewports\n const {narrow, regular, wide} = expanded\n if (isWide) return wide\n if (isRegular) return regular\n return narrow\n }, [expanded, allFeatureListsExpanded, isRegular, isWide, featureListUserInteracted])\n\n let FeatureListHeading = (\n <PricingOptions.FeatureListHeading>{pricingOptionsDefaultFeatureListHeading}</PricingOptions.FeatureListHeading>\n )\n\n const FilteredChildrenSet = React.Children.toArray(children).reduce<ValidFeatureListChildren>((acc, child) => {\n if (React.isValidElement(child) && child.type === PricingOptionsFeatureListHeading) {\n FeatureListHeading = child\n } else if (React.isValidElement(child) && child.type === PricingOptionsFeatureListItem) {\n if (acc.length === 0) {\n acc.push({Heading: null, Items: []})\n }\n acc[acc.length - 1].Items.push(child as React.ReactElement<PricingOptionsFeatureListItemProps>)\n } else if (React.isValidElement(child) && child.type === PricingOptionsFeatureListGroupHeading) {\n acc.push({\n Heading: child as React.ReactElement<PricingOptionsFeatureListGroupHeadingProps>,\n Items: [],\n })\n }\n\n return acc\n }, [])\n\n const FeatureListItems = FilteredChildrenSet.map(({Heading: HeadingChild, Items}, index) => (\n <div className={styles['PricingOptions__feature-list-set']} key={index}>\n {HeadingChild}\n\n <UnorderedList variant=\"checked\" {...(rest as UnorderedListProps)}>\n {Items}\n </UnorderedList>\n </div>\n ))\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles['PricingOptions__feature-list'],\n hasDivider && styles['PricingOptions__feature-list--has-divider'],\n className,\n )}\n data-testid={testId || testIds.featureList}\n >\n <Accordion\n className={styles['PricingOptions__feature-list-accordion']}\n disableAnimation\n open={shouldBeOpen}\n onToggle={event => {\n setFeatureListUserInteracted(true)\n updateFeatureListExpanded(event.currentTarget.open)\n }}\n >\n <Accordion.Heading as={accordionAs} className={styles['PricingOptions__feature-list-accordion-heading']}>\n {FeatureListHeading}\n\n <TriangleDownIcon className={styles['PricingOptions__feature-list-accordion-chevron']} />\n </Accordion.Heading>\n <Accordion.Content className={styles['PricingOptions__feature-list-accordion-content']}>\n {FeatureListItems}\n </Accordion.Content>\n </Accordion>\n </div>\n )\n },\n)\n\ntype PricingOptionsFeatureListHeadingProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsFeatureListHeading = forwardRef<HTMLDivElement, PricingOptionsFeatureListHeadingProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <div className={className} data-testid={testId || testIds.featureListHeading} ref={ref} {...rest}>\n {children}\n </div>\n )\n },\n)\n\ntype PricingOptionsFeatureListGroupHeadingProps = PropsWithChildren<BaseProps<HTMLHeadingElement>> & {\n as?: Exclude<HeadingProps['as'], 'h1' | 'h2'>\n 'data-testid'?: string\n}\n\nconst PricingOptionsFeatureListGroupHeading = forwardRef<\n HTMLHeadingElement,\n PricingOptionsFeatureListGroupHeadingProps\n>(({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <HeadingComponent\n as=\"h4\"\n className={clsx(styles['PricingOptions__feature-list-group-heading'], className)}\n data-testid={testId || testIds.featureListGroupHeading}\n ref={ref}\n size=\"subhead-medium\"\n {...rest}\n >\n {children}\n </HeadingComponent>\n )\n})\n\ntype PricingOptionsFeatureListItemProps = PropsWithChildren<BaseProps<HTMLLIElement>> & {\n 'data-testid'?: string\n infoTooltip?: string\n variant?: 'included' | 'excluded'\n} & Omit<ListItemProps, 'variant'>\n\nconst PricingOptionsFeatureListItem = forwardRef<HTMLLIElement, PricingOptionsFeatureListItemProps>(\n (\n {\n children,\n className,\n infoTooltip,\n leadingVisual,\n leadingVisualFill,\n variant = 'included',\n 'data-testid': testId,\n ...rest\n },\n ref,\n ) => {\n const itemLeadingVisual = leadingVisual ?? (variant === 'included' ? CheckIcon : XIcon)\n const itemLeadingVisualAriaLabel = variant === 'included' ? 'Includes' : 'Does not include'\n\n const itemLeadingVisualFill =\n leadingVisualFill ??\n (variant === 'included' ? 'var(--brand-color-accent-primary)' : 'var(--brand-color-text-muted)')\n\n return (\n <UnorderedList.Item\n className={clsx(\n styles['PricingOptions__feature-list-item'],\n {[styles['PricingOptions__feature-list-item--excluded']]: variant === 'excluded'},\n infoTooltip && styles['PricingOptions__feature-list-item--has-info'],\n className,\n )}\n data-testid={testId || testIds.featureListItem}\n leadingVisual={itemLeadingVisual}\n leadingVisualAriaLabel={itemLeadingVisualAriaLabel}\n leadingVisualFill={itemLeadingVisualFill}\n ref={ref}\n {...rest}\n >\n {children}\n {infoTooltip && (\n <Tooltip text={infoTooltip} direction=\"n\">\n <button\n type=\"button\"\n className={styles['PricingOptions__feature-list-item-info']}\n aria-label={`More information about ${typeof children === 'string' ? children : 'this feature'}`}\n >\n <svg viewBox=\"0 0 4 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path\n d=\"M0.75 3C0.33579 3 0 3.33579 0 3.75C0 4.16421 0.33579 4.5 0.75 4.5H1V6.5H0.75C0.33579 6.5 0 6.8358 0 7.25C0 7.6642 0.33579 8 0.75 8H2.75C3.16421 8 3.5 7.6642 3.5 7.25C3.5 6.8358 3.16421 6.5 2.75 6.5H2.5V3.75C2.5 3.33579 2.16421 3 1.75 3H0.75Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2.5 1C2.5 1.55228 2.05229 2 1.5 2C0.94772 2 0.5 1.55228 0.5 1C0.5 0.44772 0.94772 0 1.5 0C2.05229 0 2.5 0.44772 2.5 1Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n </Tooltip>\n )}\n </UnorderedList.Item>\n )\n },\n)\n\ntype AsA = {as: 'a'; href: string; 'data-testid'?: string} & React.AnchorHTMLAttributes<BaseProps<HTMLAnchorElement>> &\n ButtonBaseProps\n\ntype AsButton = {as: 'button'; 'data-testid'?: string} & React.ButtonHTMLAttributes<BaseProps<HTMLButtonElement>> &\n ButtonBaseProps\n\ntype PricingOptionsActionsProps = AsA | AsButton\n\ntype PricingOptionsActionsMessageProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n leadingComponent?: React.ReactElement\n}\n\nconst PricingOptionsActionsMessage = forwardRef<HTMLDivElement, PricingOptionsActionsMessageProps>(\n ({children, className, 'data-testid': testId, leadingComponent, ...rest}, ref) => {\n return (\n <div\n ref={ref}\n className={clsx(styles['PricingOptions__actions-message'], className)}\n data-testid={testId || testIds.actionsMessage}\n {...rest}\n >\n {leadingComponent && (\n <span className={styles['PricingOptions__actions-message-leading-component']}>{leadingComponent}</span>\n )}\n <div className={styles['PricingOptions__actions-message-content']}>{children}</div>\n </div>\n )\n },\n)\n\nconst PricingOptionsPrimaryAction = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n PropsWithChildren<PricingOptionsActionsProps>\n>(({as, children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n as={as}\n data-testid={testId || testIds.primaryAction}\n className={clsx(styles['PricingOptions__primary-action'], className)}\n size=\"medium\"\n variant=\"primary\"\n block\n {...rest}\n >\n {children}\n </Button>\n )\n})\n\nconst PricingOptionsSecondaryAction = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n PropsWithChildren<PricingOptionsActionsProps>\n>(({as, children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n as={as}\n className={clsx(styles['PricingOptions__primary-action'], className)}\n data-testid={testId || testIds.secondaryAction}\n variant=\"secondary\"\n block\n {...rest}\n >\n {children}\n </Button>\n )\n})\n\ntype PricingOptionsMenuActionProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsMenuAction = forwardRef<HTMLDivElement, PricingOptionsMenuActionProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <div\n ref={ref}\n className={clsx(styles['PricingOptions__menu-action'], className)}\n data-testid={testId || testIds.menuAction}\n {...rest}\n >\n {children}\n </div>\n )\n },\n)\n\ntype PricingOptionsFootnoteProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsFootnote = forwardRef<HTMLParagraphElement, PricingOptionsFootnoteProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__footnote, className)}\n data-testid={testId || testIds.footnote}\n ref={ref}\n size=\"100\"\n variant=\"muted\"\n weight=\"light\"\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\n/**\n * Pricing options component:\n * {@link https://primer.style/brand/components/PricingOptions/ See usage examples}.\n */\nexport const PricingOptions = Object.assign(PricingOptionsRoot, {\n ActionsMessage: PricingOptionsActionsMessage,\n Description: PricingOptionsDescription,\n FeatureList: PricingOptionsFeatureList,\n FeatureListHeading: PricingOptionsFeatureListHeading,\n FeatureListGroupHeading: PricingOptionsFeatureListGroupHeading,\n FeatureListItem: PricingOptionsFeatureListItem,\n Footnote: PricingOptionsFootnote,\n Label: PricingOptionsLabel,\n Heading: PricingOptionsHeading,\n Item: PricingOptionsItem,\n MenuAction: PricingOptionsMenuAction,\n Price: PricingOptionsPrice,\n PrimaryAction: PricingOptionsPrimaryAction,\n SecondaryAction: PricingOptionsSecondaryAction,\n testIds,\n})\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,IAAM,IAAU;CACd,MAAM;CACN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CACf,iBAAiB;CACjB;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"PricingOptions.js","names":[],"sources":["../../src/PricingOptions/PricingOptions.tsx"],"sourcesContent":["import React, {forwardRef, HTMLAttributes, PropsWithChildren, useMemo, Ref, Dispatch} from 'react'\nimport {CheckIcon, TriangleDownIcon, XIcon} from '@primer/octicons-react'\nimport {clsx} from 'clsx'\nimport type {ListItemProps} from '../list/ListItem/ListItem'\nimport type {BaseProps} from '../component-helpers'\nimport {Accordion} from '../Accordion/Accordion'\nimport {Button, type ButtonBaseProps} from '../Button'\nimport {Heading as HeadingComponent, type HeadingProps} from '../Heading'\nimport {Text} from '../Text'\nimport {Tooltip} from '../Tooltip'\nimport {useWindowSize} from '../hooks/useWindowSize'\nimport {UnorderedList, type UnorderedListProps} from '../list'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css'\n\n/**\n * Main stylesheet (as a CSS Module)\n */\nimport styles from './PricingOptions.module.css'\n\ntype AlignOptions = 'start' | 'center'\n\nexport type PricingOptionsProps = {\n align?: AlignOptions\n variant?: 'default' | 'default-gradient' | 'cards' | 'cards-gradient'\n ['data-testid']?: string\n} & PropsWithChildren<BaseProps<HTMLDivElement>> &\n HTMLAttributes<HTMLDivElement>\n\nconst testIds = {\n root: 'PricingOptions',\n item: 'PricingOptions__item',\n labelRow: 'PricingOptions__labels',\n heading: 'PricingOptions__heading',\n label: 'PricingOptions__label',\n description: 'PricingOptions__description',\n price: 'PricingOptions__price',\n actionsMessage: 'PricingOptions__actionsMessage',\n primaryAction: 'PricingOptions__primaryAction',\n secondaryAction: 'PricingOptions__secondaryAction',\n menuAction: 'PricingOptions__menuAction',\n featureList: 'PricingOptions__featureList',\n featureListHeading: 'PricingOptions__featureListHeading',\n featureListItem: 'PricingOptions__featureListItem',\n featureListGroupHeading: 'PricingOptions__featureListGroupHeading',\n footnote: 'PricingOptions__footnote',\n}\n\ntype PricingOptionsContextValue = {\n align: AlignOptions\n allFeatureListsExpanded: boolean\n updateFeatureListExpanded: Dispatch<boolean>\n featureListUserInteracted: boolean\n setFeatureListUserInteracted: Dispatch<boolean>\n}\n\nconst PricingOptionsContext = React.createContext<PricingOptionsContextValue>({\n align: 'start',\n allFeatureListsExpanded: false,\n featureListUserInteracted: false,\n updateFeatureListExpanded: () => {},\n setFeatureListUserInteracted: () => {},\n})\n\nconst PricingOptionsProvider = ({children, align = 'start'}: PropsWithChildren<{align: AlignOptions}>) => {\n const [allFeatureListsExpanded, setAllFeatureListsExpanded] = React.useState(false)\n const [featureListUserInteracted, setFeatureListUserInteracted] = React.useState(false)\n\n const updateFeatureListExpanded = (newValue: boolean) => {\n setAllFeatureListsExpanded(() => newValue)\n }\n\n return (\n <PricingOptionsContext.Provider\n value={{\n allFeatureListsExpanded,\n updateFeatureListExpanded,\n align,\n featureListUserInteracted,\n setFeatureListUserInteracted,\n }}\n >\n {children}\n </PricingOptionsContext.Provider>\n )\n}\n\nconst usePricingOptions = (): PricingOptionsContextValue => {\n return React.useContext(PricingOptionsContext)\n}\n\nconst pricingOptionsDefaultFeatureListHeading = \"What's included\"\n\ntype PricingOptionsLabelProps = PropsWithChildren<{\n 'data-testid'?: string\n}>\n\nconst PricingOptionsLabel = ({children}: PricingOptionsLabelProps) => {\n return <>{children}</>\n}\n\nconst PricingOptionsRoot = forwardRef(\n (\n {\n align = 'start',\n children,\n className,\n 'data-testid': testId,\n variant = 'default',\n ...rest\n }: PropsWithChildren<PricingOptionsProps>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const filteredChildren = useMemo(\n () =>\n React.Children.toArray(children).filter(\n child => React.isValidElement(child) && typeof child.type !== 'string' && child.type === PricingOptionsItem,\n ) as React.ReactElement<PropsWithChildren<PricingOptionsItem>>[],\n [children],\n ).slice(0, 4)\n\n const headerLabels = useMemo(\n () =>\n filteredChildren.map(item => {\n const labelChild = React.Children.toArray(item.props.children).find(\n child =>\n React.isValidElement(child) && typeof child.type !== 'string' && child.type === PricingOptionsLabel,\n )\n\n return (\n React.isValidElement(labelChild) ? labelChild : null\n ) as React.ReactElement<PricingOptionsLabelProps> | null\n }),\n [filteredChildren],\n )\n\n const hasHeaderLabels = headerLabels.some(label => label !== null)\n\n return (\n <PricingOptionsProvider align={align}>\n <div\n className={clsx(\n styles.PricingOptions,\n styles[`PricingOptions--layout-${variant.includes('default') ? 'default' : 'cards'}`],\n styles[`PricingOptions--items${filteredChildren.length}`],\n styles[`PricingOptions--appearance-${variant.includes('gradient') ? 'gradient' : 'solid'}`],\n className,\n )}\n data-testid={testId || testIds.root}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n {filteredChildren}\n\n {hasHeaderLabels && (\n <div\n className={styles['PricingOptions__labels']}\n data-testid={testIds.labelRow}\n style={\n {\n '--brand-pricing-options-column-count': filteredChildren.length,\n } as React.CSSProperties\n }\n >\n {headerLabels.map((headerLabel, index) => {\n const hasLabelContent = Boolean(headerLabel?.props.children)\n\n return (\n <div\n className={clsx(\n styles['PricingOptions__label-cell'],\n hasLabelContent\n ? styles['PricingOptions__label-cell--has-label']\n : styles['PricingOptions__label-cell--empty'],\n )}\n data-testid={headerLabel?.props['data-testid'] || testIds.label}\n key={index}\n >\n {headerLabel?.props.children ? (\n <span className={styles.PricingOptions__label}>{headerLabel.props.children}</span>\n ) : null}\n </div>\n )\n })}\n </div>\n )}\n </div>\n </PricingOptionsProvider>\n )\n },\n)\n\nexport type PricingOptionsItem = {\n ['data-testid']?: string\n /**\n * Escape-hatch for inserting custom React components.\n * Warning:\n * This prop isn't advertised in our docs but remains part of the public API for edge-cases.\n * Need to use this prop? Please check in with #primer-brand first to confirm correct usage.\n */\n leadingComponent?: React.ReactElement\n} & PropsWithChildren<BaseProps<HTMLDivElement>>\n\ntype FilteredChildren = {\n FeatureList: React.ReactElement<PricingOptionsFeatureListProps> | null\n Actions: React.ReactElement<PricingOptionsActionsProps>[]\n ActionsMessage: React.ReactElement<PricingOptionsActionsMessageProps> | null\n Footnote: React.ReactElement<PricingOptionsFootnoteProps> | null\n Heading: React.ReactElement<PricingOptionsHeadingProps> | null\n Description: React.ReactElement<PricingOptionsDescriptionProps> | null\n Price: React.ReactElement<PricingOptionsPriceProps> | null\n}\n\nconst PricingOptionsItem = forwardRef(\n (\n {'data-testid': testId, children, className, leadingComponent, ...rest}: PropsWithChildren<PricingOptionsItem>,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {align} = usePricingOptions()\n\n const memoizedChildren = useMemo(() => React.Children.toArray(children), [children])\n\n const filteredChildren = memoizedChildren.reduce<FilteredChildren>(\n (acc, child) => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (child.type === PricingOptionsFeatureList) {\n acc.FeatureList = child as React.ReactElement<PricingOptionsFeatureListProps> | null\n }\n\n if (\n child.type === PricingOptionsPrimaryAction ||\n child.type === PricingOptionsSecondaryAction ||\n child.type === PricingOptionsMenuAction\n ) {\n acc.Actions.push(child as React.ReactElement<PricingOptionsActionsProps>)\n }\n\n if (child.type === PricingOptionsActionsMessage) {\n acc.ActionsMessage = child as React.ReactElement<PricingOptionsActionsMessageProps>\n }\n\n if (child.type === PricingOptionsFootnote) {\n acc.Footnote = child as React.ReactElement<PricingOptionsFootnoteProps>\n }\n\n if (child.type === PricingOptionsHeading) {\n acc.Heading = child as React.ReactElement<PricingOptionsHeadingProps>\n }\n\n if (child.type === PricingOptionsDescription) {\n acc.Description = child as React.ReactElement<PricingOptionsDescriptionProps>\n }\n\n if (child.type === PricingOptionsPrice) {\n acc.Price = child as React.ReactElement<PricingOptionsPriceProps>\n }\n }\n\n return acc\n },\n {\n FeatureList: null,\n Actions: [],\n ActionsMessage: null,\n Footnote: null,\n Heading: null,\n Description: null,\n Price: null,\n },\n )\n\n const {Heading, Description, Price, FeatureList, Actions, ActionsMessage, Footnote} = filteredChildren\n\n return (\n <div\n className={clsx(\n styles.PricingOptions__item,\n leadingComponent && styles['PricingOptions__item--has-leading-component'],\n styles[`PricingOptions__item--align-${align}`],\n className,\n )}\n data-testid={testId || testIds.item}\n ref={ref}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n <div className={styles['PricingOptions__header']}>{Heading}</div>\n {Description}\n {Price}\n {leadingComponent && <div className={styles['PricingOptions__leading-component']}>{leadingComponent}</div>}\n {(Actions.length > 0 || ActionsMessage) && (\n <div className={styles.PricingOptions__actions}>\n {Actions}\n {ActionsMessage}\n </div>\n )}\n {FeatureList}\n {Footnote}\n </div>\n )\n },\n)\n\ntype PricingOptionsDescriptionProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsDescription = forwardRef<HTMLParagraphElement, PricingOptionsDescriptionProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__description, className)}\n data-testid={testId || testIds.description}\n ref={ref}\n size=\"200\"\n variant=\"muted\"\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype PricingOptionsHeadingProps = PropsWithChildren<BaseProps<HTMLHeadingElement>> & {\n 'data-testid'?: string\n} & HeadingProps\n\nconst PricingOptionsHeading = forwardRef<HTMLHeadingElement, PricingOptionsHeadingProps>(\n ({as = 'h3', children, 'data-testid': testId, size = '5', className, ...rest}, ref) => {\n return (\n <HeadingComponent\n as={as}\n className={clsx(styles.PricingOptions__heading, styles[`PricingOptions__heading--size-${size}`], className)}\n data-testid={testId || testIds.heading}\n ref={ref}\n size={size}\n {...rest}\n >\n {children}\n </HeadingComponent>\n )\n },\n)\n\ntype PricingOptionsPriceProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n currencyCode?: string\n currencySymbol?: string\n 'data-testid'?: string\n originalPrice?: string\n trailingText?: string\n}\n\nconst PricingOptionsPrice = forwardRef<HTMLParagraphElement, PricingOptionsPriceProps>(\n (\n {\n children,\n className,\n currencyCode = 'USD',\n currencySymbol = '$',\n 'data-testid': testId,\n originalPrice,\n trailingText,\n ...rest\n },\n ref,\n ) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__price, className)}\n data-testid={testId || testIds.price}\n ref={ref}\n weight=\"normal\"\n {...rest}\n >\n <span className={styles['PricingOptions__price-amount']}>\n <Text as=\"span\" className={styles['PricingOptions__price-currency-symbol']} size=\"500\" weight=\"normal\">\n {currencySymbol}\n </Text>\n\n <Text as=\"span\" className={styles['PricingOptions__price-value']} size=\"500\" weight=\"normal\">\n {children}\n </Text>\n\n <Text as=\"span\" className={styles['PricingOptions__price-currency-code']} size=\"100\" weight=\"normal\">\n {currencyCode}\n </Text>\n </span>\n\n {originalPrice && (\n <del className={styles['PricingOptions__price-original-price']}>\n <Text size=\"400\" variant=\"muted\" weight=\"normal\">\n {currencySymbol}\n </Text>\n <Text\n className={styles['PricingOptions__price-original-price-value']}\n size=\"300\"\n variant=\"muted\"\n weight=\"normal\"\n >\n {originalPrice}\n </Text>\n </del>\n )}\n\n {trailingText && (\n <Text as=\"span\" className={styles['PricingOptions__price-trailing-text']} size=\"200\" variant=\"muted\">\n {trailingText}\n </Text>\n )}\n </Text>\n )\n },\n)\n\ntype PricingOptionsFeatureListProps = BaseProps<HTMLUListElement> & {\n accordionAs?: HeadingProps['as']\n expanded?: ExpandedProp\n hasDivider?: boolean\n children: React.ReactElement<PricingOptionsFeatureListGroupHeadingProps | PricingOptionsFeatureListItemProps>[]\n 'data-testid'?: string\n}\n\ntype ExpandedProp = boolean | ResponsiveExpandableProps\n\ntype ResponsiveExpandableProps = {\n narrow: boolean\n regular: boolean\n wide: boolean\n}\n\ntype ValidFeatureListChildren = {\n Heading: React.ReactElement<PricingOptionsFeatureListGroupHeadingProps> | null\n Items: React.ReactElement<PricingOptionsFeatureListItemProps>[]\n}[]\n\nconst PricingOptionsFeatureList = forwardRef<HTMLDivElement, PricingOptionsFeatureListProps>(\n ({children, className, 'data-testid': testId, hasDivider = true, expanded, accordionAs = 'h4', ...rest}, ref) => {\n const {\n allFeatureListsExpanded,\n updateFeatureListExpanded,\n featureListUserInteracted,\n setFeatureListUserInteracted,\n } = usePricingOptions()\n const {isMedium: isRegular, isXLarge: isWide, isSmall: isNarrow} = useWindowSize()\n\n React.useEffect(() => {\n if (expanded === undefined || typeof expanded === 'object') {\n setFeatureListUserInteracted(false)\n }\n }, [isRegular, isWide, isNarrow, setFeatureListUserInteracted, expanded])\n\n const shouldBeOpen = React.useMemo(() => {\n if (featureListUserInteracted) {\n return allFeatureListsExpanded\n }\n\n // Important: Fixes layout shift by ensuring that explicit values are preserved.\n if (typeof expanded === 'boolean') {\n return expanded\n }\n // If undefined, should follow some default responsive logic\n if (expanded === undefined) {\n if (isWide) return true\n if (isRegular) return true\n return false\n }\n\n // finally handle responsive objects, and go from largest to smallest viewports\n const {narrow, regular, wide} = expanded\n if (isWide) return wide\n if (isRegular) return regular\n return narrow\n }, [expanded, allFeatureListsExpanded, isRegular, isWide, featureListUserInteracted])\n\n let FeatureListHeading = (\n <PricingOptions.FeatureListHeading>{pricingOptionsDefaultFeatureListHeading}</PricingOptions.FeatureListHeading>\n )\n\n const FilteredChildrenSet = React.Children.toArray(children).reduce<ValidFeatureListChildren>((acc, child) => {\n if (React.isValidElement(child) && child.type === PricingOptionsFeatureListHeading) {\n FeatureListHeading = child\n } else if (React.isValidElement(child) && child.type === PricingOptionsFeatureListItem) {\n if (acc.length === 0) {\n acc.push({Heading: null, Items: []})\n }\n acc[acc.length - 1].Items.push(child as React.ReactElement<PricingOptionsFeatureListItemProps>)\n } else if (React.isValidElement(child) && child.type === PricingOptionsFeatureListGroupHeading) {\n acc.push({\n Heading: child as React.ReactElement<PricingOptionsFeatureListGroupHeadingProps>,\n Items: [],\n })\n }\n\n return acc\n }, [])\n\n const FeatureListItems = FilteredChildrenSet.map(({Heading: HeadingChild, Items}, index) => (\n <div className={styles['PricingOptions__feature-list-set']} key={index}>\n {HeadingChild}\n\n <UnorderedList variant=\"checked\" {...(rest as UnorderedListProps)}>\n {Items}\n </UnorderedList>\n </div>\n ))\n\n return (\n <div\n ref={ref}\n className={clsx(\n styles['PricingOptions__feature-list'],\n hasDivider && styles['PricingOptions__feature-list--has-divider'],\n className,\n )}\n data-testid={testId || testIds.featureList}\n >\n <Accordion\n className={styles['PricingOptions__feature-list-accordion']}\n disableAnimation\n open={shouldBeOpen}\n onToggle={event => {\n setFeatureListUserInteracted(true)\n updateFeatureListExpanded(event.currentTarget.open)\n }}\n >\n <Accordion.Heading as={accordionAs} className={styles['PricingOptions__feature-list-accordion-heading']}>\n {FeatureListHeading}\n\n <TriangleDownIcon className={styles['PricingOptions__feature-list-accordion-chevron']} />\n </Accordion.Heading>\n <Accordion.Content className={styles['PricingOptions__feature-list-accordion-content']}>\n {FeatureListItems}\n </Accordion.Content>\n </Accordion>\n </div>\n )\n },\n)\n\ntype PricingOptionsFeatureListHeadingProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsFeatureListHeading = forwardRef<HTMLDivElement, PricingOptionsFeatureListHeadingProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <div className={className} data-testid={testId || testIds.featureListHeading} ref={ref} {...rest}>\n {children}\n </div>\n )\n },\n)\n\ntype PricingOptionsFeatureListGroupHeadingProps = PropsWithChildren<BaseProps<HTMLHeadingElement>> & {\n as?: Exclude<HeadingProps['as'], 'h1' | 'h2'>\n 'data-testid'?: string\n}\n\nconst PricingOptionsFeatureListGroupHeading = forwardRef<\n HTMLHeadingElement,\n PricingOptionsFeatureListGroupHeadingProps\n>(({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <HeadingComponent\n as=\"h4\"\n className={clsx(styles['PricingOptions__feature-list-group-heading'], className)}\n data-testid={testId || testIds.featureListGroupHeading}\n ref={ref}\n size=\"subhead-medium\"\n {...rest}\n >\n {children}\n </HeadingComponent>\n )\n})\n\ntype PricingOptionsFeatureListItemProps = PropsWithChildren<BaseProps<HTMLLIElement>> & {\n 'data-testid'?: string\n infoTooltip?: string\n /**\n * Optional accessible label for the info tooltip trigger. Overrides the automatically generated label.\n */\n infoTooltipAriaLabel?: string\n variant?: 'included' | 'excluded'\n} & Omit<ListItemProps, 'variant'>\n\nconst PricingOptionsFeatureListItem = forwardRef<HTMLLIElement, PricingOptionsFeatureListItemProps>(\n (\n {\n children,\n className,\n infoTooltip,\n infoTooltipAriaLabel,\n leadingVisual,\n leadingVisualFill,\n variant = 'included',\n 'data-testid': testId,\n ...rest\n },\n ref,\n ) => {\n const itemLeadingVisual = leadingVisual ?? (variant === 'included' ? CheckIcon : XIcon)\n const itemLeadingVisualAriaLabel = variant === 'included' ? 'Includes' : 'Does not include'\n\n const itemLeadingVisualFill =\n leadingVisualFill ??\n (variant === 'included' ? 'var(--brand-color-accent-primary)' : 'var(--brand-color-text-muted)')\n\n return (\n <UnorderedList.Item\n className={clsx(\n styles['PricingOptions__feature-list-item'],\n {[styles['PricingOptions__feature-list-item--excluded']]: variant === 'excluded'},\n infoTooltip && styles['PricingOptions__feature-list-item--has-info'],\n className,\n )}\n data-testid={testId || testIds.featureListItem}\n leadingVisual={itemLeadingVisual}\n leadingVisualAriaLabel={itemLeadingVisualAriaLabel}\n leadingVisualFill={itemLeadingVisualFill}\n ref={ref}\n {...rest}\n >\n {children}\n {infoTooltip && (\n <Tooltip text={infoTooltip} direction=\"n\">\n <button\n type=\"button\"\n className={styles['PricingOptions__feature-list-item-info']}\n aria-label={\n infoTooltipAriaLabel ??\n // eslint-disable-next-line i18n-text/no-en\n `More information about ${typeof children === 'string' ? children : 'this feature'}`\n }\n >\n <svg viewBox=\"0 0 4 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path\n d=\"M0.75 3C0.33579 3 0 3.33579 0 3.75C0 4.16421 0.33579 4.5 0.75 4.5H1V6.5H0.75C0.33579 6.5 0 6.8358 0 7.25C0 7.6642 0.33579 8 0.75 8H2.75C3.16421 8 3.5 7.6642 3.5 7.25C3.5 6.8358 3.16421 6.5 2.75 6.5H2.5V3.75C2.5 3.33579 2.16421 3 1.75 3H0.75Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M2.5 1C2.5 1.55228 2.05229 2 1.5 2C0.94772 2 0.5 1.55228 0.5 1C0.5 0.44772 0.94772 0 1.5 0C2.05229 0 2.5 0.44772 2.5 1Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n </Tooltip>\n )}\n </UnorderedList.Item>\n )\n },\n)\n\ntype AsA = {as: 'a'; href: string; 'data-testid'?: string} & React.AnchorHTMLAttributes<BaseProps<HTMLAnchorElement>> &\n ButtonBaseProps\n\ntype AsButton = {as: 'button'; 'data-testid'?: string} & React.ButtonHTMLAttributes<BaseProps<HTMLButtonElement>> &\n ButtonBaseProps\n\ntype PricingOptionsActionsProps = AsA | AsButton\n\ntype PricingOptionsActionsMessageProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n leadingComponent?: React.ReactElement\n}\n\nconst PricingOptionsActionsMessage = forwardRef<HTMLDivElement, PricingOptionsActionsMessageProps>(\n ({children, className, 'data-testid': testId, leadingComponent, ...rest}, ref) => {\n return (\n <div\n ref={ref}\n className={clsx(styles['PricingOptions__actions-message'], className)}\n data-testid={testId || testIds.actionsMessage}\n {...rest}\n >\n {leadingComponent && (\n <span className={styles['PricingOptions__actions-message-leading-component']}>{leadingComponent}</span>\n )}\n <div className={styles['PricingOptions__actions-message-content']}>{children}</div>\n </div>\n )\n },\n)\n\nconst PricingOptionsPrimaryAction = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n PropsWithChildren<PricingOptionsActionsProps>\n>(({as, children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n as={as}\n data-testid={testId || testIds.primaryAction}\n className={clsx(styles['PricingOptions__primary-action'], className)}\n size=\"medium\"\n variant=\"primary\"\n block\n {...rest}\n >\n {children}\n </Button>\n )\n})\n\nconst PricingOptionsSecondaryAction = forwardRef<\n HTMLAnchorElement | HTMLButtonElement,\n PropsWithChildren<PricingOptionsActionsProps>\n>(({as, children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Button\n ref={ref as React.Ref<HTMLButtonElement>}\n as={as}\n className={clsx(styles['PricingOptions__primary-action'], className)}\n data-testid={testId || testIds.secondaryAction}\n variant=\"secondary\"\n block\n {...rest}\n >\n {children}\n </Button>\n )\n})\n\ntype PricingOptionsMenuActionProps = PropsWithChildren<BaseProps<HTMLDivElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsMenuAction = forwardRef<HTMLDivElement, PricingOptionsMenuActionProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <div\n ref={ref}\n className={clsx(styles['PricingOptions__menu-action'], className)}\n data-testid={testId || testIds.menuAction}\n {...rest}\n >\n {children}\n </div>\n )\n },\n)\n\ntype PricingOptionsFootnoteProps = PropsWithChildren<BaseProps<HTMLParagraphElement>> & {\n 'data-testid'?: string\n}\n\nconst PricingOptionsFootnote = forwardRef<HTMLParagraphElement, PricingOptionsFootnoteProps>(\n ({children, className, 'data-testid': testId, ...rest}, ref) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles.PricingOptions__footnote, className)}\n data-testid={testId || testIds.footnote}\n ref={ref}\n size=\"100\"\n variant=\"muted\"\n weight=\"light\"\n {...rest}\n >\n {children}\n </Text>\n )\n },\n)\n\n/**\n * Pricing options component:\n * {@link https://primer.style/brand/components/PricingOptions/ See usage examples}.\n */\nexport const PricingOptions = Object.assign(PricingOptionsRoot, {\n ActionsMessage: PricingOptionsActionsMessage,\n Description: PricingOptionsDescription,\n FeatureList: PricingOptionsFeatureList,\n FeatureListHeading: PricingOptionsFeatureListHeading,\n FeatureListGroupHeading: PricingOptionsFeatureListGroupHeading,\n FeatureListItem: PricingOptionsFeatureListItem,\n Footnote: PricingOptionsFootnote,\n Label: PricingOptionsLabel,\n Heading: PricingOptionsHeading,\n Item: PricingOptionsItem,\n MenuAction: PricingOptionsMenuAction,\n Price: PricingOptionsPrice,\n PrimaryAction: PricingOptionsPrimaryAction,\n SecondaryAction: PricingOptionsSecondaryAction,\n testIds,\n})\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,IAAM,IAAU;CACd,MAAM;CACN,MAAM;CACN,UAAU;CACV,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,gBAAgB;CAChB,eAAe;CACf,iBAAiB;CACjB,YAAY;CACZ,aAAa;CACb,oBAAoB;CACpB,iBAAiB;CACjB,yBAAyB;CACzB,UAAU;CACX,EAUK,IAAwB,EAAM,cAA0C;CAC5E,OAAO;CACP,yBAAyB;CACzB,2BAA2B;CAC3B,iCAAiC;CACjC,oCAAoC;CACrC,CAAC,EAEI,KAA0B,EAAC,aAAU,WAAQ,cAAuD;CACxG,IAAM,CAAC,GAAyB,KAA8B,EAAM,SAAS,GAAM,EAC7E,CAAC,GAA2B,KAAgC,EAAM,SAAS,GAAM;AAMvF,QACE,kBAAC,EAAsB,UAAvB;EACE,OAAO;GACL;GACA,4BAR6B,MAAsB;AACvD,YAAiC,EAAS;;GAQtC;GACA;GACA;GACD;EAEA;EAC8B,CAAA;GAI/B,UACG,EAAM,WAAW,EAAsB,EAG1C,IAA0C,mBAM1C,KAAuB,EAAC,kBACrB,kBAAA,GAAA,EAAG,aAAY,CAAA,EAGlB,IAAqB,GAEvB,EACE,WAAQ,SACR,aACA,cACA,eAAe,GACf,aAAU,WACV,GAAG,KAEL,MACG;CACH,IAAM,IAAmB,QAErB,EAAM,SAAS,QAAQ,EAAS,CAAC,QAC/B,MAAS,EAAM,eAAe,EAAM,IAAI,OAAO,EAAM,QAAS,YAAY,EAAM,SAAS,EAC1F,EACH,CAAC,EAAS,CACX,CAAC,MAAM,GAAG,EAAE,EAEP,IAAe,QAEjB,EAAiB,KAAI,MAAQ;EAC3B,IAAM,IAA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AK;CACL,SAAQ;CACR,QAAO;CACP,GAAI;CAEH;CACI,CAAA,CAGZ,EAMY,IAAiB,OAAO,OAAO,GAAoB;CAC9D,gBAAgB;CAChB,aAAa;CACb,aAAa;CACb,oBAAoB;CACpB,yBAAyB;CACzB,iBAAiB;CACjB,UAAU;CACV,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,eAAe;CACf,iBAAiB;CACjB;CACD,CAAC"}
|
package/esm/Token/Token.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ type TokenAnchorProps = BaseProps<HTMLAnchorElement> & TokenSharedProps & {
|
|
|
34
34
|
} & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;
|
|
35
35
|
export type TokenProps = TokenSpanProps | TokenAnchorProps;
|
|
36
36
|
/**
|
|
37
|
-
* Use
|
|
38
|
-
* @see https://primer.style/brand
|
|
37
|
+
* Use Token to display compact metadata that describes or supports adjacent content.
|
|
38
|
+
* @see https://primer.style/brand/components/Token
|
|
39
39
|
*/
|
|
40
40
|
export declare const Token: React.ForwardRefExoticComponent<(Omit<TokenSpanProps, "ref"> | Omit<TokenAnchorProps, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLSpanElement>> & {
|
|
41
41
|
testIds: {
|
package/esm/Token/Token.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","names":[],"sources":["../../src/Token/Token.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {forwardRef, type Ref} from 'react'\n\nimport {Text} from '../Text'\nimport {useAnimation} from '../animation'\nimport type {BaseProps} from '../component-helpers'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css'\n\nimport styles from './Token.module.css'\n\nexport const TokenVariants = ['default', 'accent', 'outline', 'invisible'] as const\n\nexport const defaultTokenVariant = TokenVariants[0]\n\ntype TokenLeadingVisual = React.ReactElement | React.ComponentType<{className?: string}>\n\ntype TokenSharedProps = {\n /**\n * The leading visual appears before the Token content.\n * Pass an element to supply custom props, or a component type that accepts an optional className.\n */\n leadingVisual?: TokenLeadingVisual\n /**\n * The variant variations available in Token.\n */\n variant?: (typeof TokenVariants)[number]\n /**\n * The HTML element rendered by Token.\n */\n as?: 'span' | 'a'\n ['data-testid']?: string\n}\n\ntype TokenSpanProps = BaseProps<HTMLSpanElement> &\n TokenSharedProps & {\n as?: 'span'\n } & React.ComponentPropsWithoutRef<'span'>\n\ntype TokenAnchorProps = BaseProps<HTMLAnchorElement> &\n TokenSharedProps & {\n as: 'a'\n href: string\n } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>\n\nexport type TokenProps = TokenSpanProps | TokenAnchorProps\n\nconst testIds = {\n root: 'Token',\n get leadingVisual() {\n return `${this.root}-leading-visual`\n },\n}\n\nconst _Token = forwardRef<HTMLSpanElement | HTMLAnchorElement, TokenProps>(\n (\n {\n animate,\n variant = defaultTokenVariant,\n as = 'span',\n children,\n className,\n 'data-testid': testId,\n leadingVisual: LeadingVisual,\n style,\n ...props\n },\n ref: Ref<HTMLSpanElement | HTMLAnchorElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const tokenClassName = clsx(\n animationClasses,\n styles.Token,\n LeadingVisual && styles['Token--hasLeadingVisual'],\n as === 'a' && styles['Token--interactive'],\n styles[`Token--variant-${variant}`],\n className,\n )\n\n const tokenChildren = (\n <>\n {LeadingVisual && (\n <span className={styles['Token__leading-visual']} data-testid={testIds.leadingVisual} aria-hidden=\"true\">\n {typeof LeadingVisual === 'function' ? (\n <LeadingVisual className={styles['Token__visual']} />\n ) : (\n React.isValidElement<{className?: string}>(LeadingVisual) &&\n React.cloneElement(LeadingVisual, {\n className: clsx(styles['Token__visual'], LeadingVisual.props.className),\n })\n )}\n </span>\n )}\n <Text as=\"span\" size=\"100\" className={styles['Token__label']}>\n {children}\n </Text>\n </>\n )\n\n if (as === 'a') {\n return (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n className={tokenClassName}\n data-testid={testId || testIds.root}\n style={{...animationInlineStyles, ...style}}\n {...props}\n >\n {tokenChildren}\n </a>\n )\n }\n\n return (\n <span\n ref={ref as Ref<HTMLSpanElement>}\n className={tokenClassName}\n data-testid={testId || testIds.root}\n style={{...animationInlineStyles, ...style}}\n {...props}\n >\n {tokenChildren}\n </span>\n )\n },\n)\n\n/**\n * Use
|
|
1
|
+
{"version":3,"file":"Token.js","names":[],"sources":["../../src/Token/Token.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {forwardRef, type Ref} from 'react'\n\nimport {Text} from '../Text'\nimport {useAnimation} from '../animation'\nimport type {BaseProps} from '../component-helpers'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css'\n\nimport styles from './Token.module.css'\n\nexport const TokenVariants = ['default', 'accent', 'outline', 'invisible'] as const\n\nexport const defaultTokenVariant = TokenVariants[0]\n\ntype TokenLeadingVisual = React.ReactElement | React.ComponentType<{className?: string}>\n\ntype TokenSharedProps = {\n /**\n * The leading visual appears before the Token content.\n * Pass an element to supply custom props, or a component type that accepts an optional className.\n */\n leadingVisual?: TokenLeadingVisual\n /**\n * The variant variations available in Token.\n */\n variant?: (typeof TokenVariants)[number]\n /**\n * The HTML element rendered by Token.\n */\n as?: 'span' | 'a'\n ['data-testid']?: string\n}\n\ntype TokenSpanProps = BaseProps<HTMLSpanElement> &\n TokenSharedProps & {\n as?: 'span'\n } & React.ComponentPropsWithoutRef<'span'>\n\ntype TokenAnchorProps = BaseProps<HTMLAnchorElement> &\n TokenSharedProps & {\n as: 'a'\n href: string\n } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>\n\nexport type TokenProps = TokenSpanProps | TokenAnchorProps\n\nconst testIds = {\n root: 'Token',\n get leadingVisual() {\n return `${this.root}-leading-visual`\n },\n}\n\nconst _Token = forwardRef<HTMLSpanElement | HTMLAnchorElement, TokenProps>(\n (\n {\n animate,\n variant = defaultTokenVariant,\n as = 'span',\n children,\n className,\n 'data-testid': testId,\n leadingVisual: LeadingVisual,\n style,\n ...props\n },\n ref: Ref<HTMLSpanElement | HTMLAnchorElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const tokenClassName = clsx(\n animationClasses,\n styles.Token,\n LeadingVisual && styles['Token--hasLeadingVisual'],\n as === 'a' && styles['Token--interactive'],\n styles[`Token--variant-${variant}`],\n className,\n )\n\n const tokenChildren = (\n <>\n {LeadingVisual && (\n <span className={styles['Token__leading-visual']} data-testid={testIds.leadingVisual} aria-hidden=\"true\">\n {typeof LeadingVisual === 'function' ? (\n <LeadingVisual className={styles['Token__visual']} />\n ) : (\n React.isValidElement<{className?: string}>(LeadingVisual) &&\n React.cloneElement(LeadingVisual, {\n className: clsx(styles['Token__visual'], LeadingVisual.props.className),\n })\n )}\n </span>\n )}\n <Text as=\"span\" size=\"100\" className={styles['Token__label']}>\n {children}\n </Text>\n </>\n )\n\n if (as === 'a') {\n return (\n <a\n ref={ref as Ref<HTMLAnchorElement>}\n className={tokenClassName}\n data-testid={testId || testIds.root}\n style={{...animationInlineStyles, ...style}}\n {...props}\n >\n {tokenChildren}\n </a>\n )\n }\n\n return (\n <span\n ref={ref as Ref<HTMLSpanElement>}\n className={tokenClassName}\n data-testid={testId || testIds.root}\n style={{...animationInlineStyles, ...style}}\n {...props}\n >\n {tokenChildren}\n </span>\n )\n },\n)\n\n/**\n * Use Token to display compact metadata that describes or supports adjacent content.\n * @see https://primer.style/brand/components/Token\n */\nexport const Token = Object.assign(_Token, {testIds})\n"],"mappings":";;;;;;;;AAcA,IAAa,IAAgB;CAAC;CAAW;CAAU;CAAW;CAAY,EAE7D,IAAsB,EAAc,IAkC3C,IAAU;CACd,MAAM;CACN,IAAI,gBAAgB;AAClB,SAAO,GAAG,KAAK,KAAK;;CAEvB,EAEK,IAAS,GAEX,EACE,YACA,aAAU,GACV,QAAK,QACL,aACA,cACA,eAAe,GACf,eAAe,GACf,UACA,GAAG,KAEL,MACG;CACH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAElF,IAAiB,EACrB,GACA,EAAO,OACP,KAAiB,EAAO,4BACxB,MAAO,OAAO,EAAO,uBACrB,EAAO,kBAAkB,MACzB,EACD,EAEK,IACJ,kBAAA,GAAA,EAAA,UAAA,CACG,KACC,kBAAC,QAAD;EAAM,WAAW,EAAO;EAA0B,eAAa,EAAQ;EAAe,eAAY;YAC/F,OAAO,KAAkB,aACxB,kBAAC,GAAD,EAAe,WAAW,EAAO,eAAoB,CAAA,GAErD,EAAM,eAAqC,EAAc,IACzD,EAAM,aAAa,GAAe,EAChC,WAAW,EAAK,EAAO,eAAkB,EAAc,MAAM,UAAU,EACxE,CAAC;EAEC,CAAA,EAET,kBAAC,GAAD;EAAM,IAAG;EAAO,MAAK;EAAM,WAAW,EAAO;EAC1C;EACI,CAAA,CACN,EAAA,CAAA;AAiBL,QAZI,EAFA,MAAO,MAEN,MAaF,QAbC;EACO;EACL,WAAW;EACX,eAAa,KAAU,EAAQ;EAC/B,OAAO;GAAC,GAAG;GAAuB,GAAG;GAAM;EAC3C,GAAI;YAEH;EACC,CAAA;EAgBX,EAMY,IAAQ,OAAO,OAAO,GAAQ,EAAC,YAAQ,CAAC"}
|
package/esm/index.d.ts
CHANGED
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,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