@primer/react-brand 0.71.0 → 0.71.1-rc.13d73825
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/Pagination/index.md +28 -10
- package/docs/components/VideoPlayer/index.md +15 -25
- package/docs/index.md +2 -2
- package/esm/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/esm/ButtonGroup/ButtonGroup.js +17 -16
- package/esm/ButtonGroup/ButtonGroup.js.map +1 -1
- package/esm/CTABanner/CTABanner.d.ts.map +1 -1
- package/esm/CTABanner/CTABanner.js +8 -8
- package/esm/CTABanner/CTABanner.js.map +1 -1
- package/esm/CTABanner/CTABanner.module-DZUT186Y.css +1 -0
- package/esm/CTABanner/CTABanner.module.js +4 -2
- package/esm/CTABanner/CTABanner.module.js.map +1 -1
- package/esm/Pagination/Pagination.d.ts +7 -1
- package/esm/Pagination/Pagination.d.ts.map +1 -1
- package/esm/Pagination/Pagination.js +63 -50
- package/esm/Pagination/Pagination.js.map +1 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.d.ts.map +1 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.js +5 -3
- package/esm/SectionIntroStacked/SectionIntroStacked.js.map +1 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.module-w4PEL6ek.css +1 -0
- package/esm/SectionIntroStacked/SectionIntroStacked.module.js +2 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.module.js.map +1 -1
- package/lib/Pagination/Pagination.d.ts +7 -1
- package/lib/css/main.css +113 -92
- package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
- package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
- package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +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/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
- package/lib/index.js +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/esm/CTABanner/CTABanner.module-BTMGYz51.css +0 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.module-C3cmwHDY.css +0 -1
|
@@ -7,59 +7,72 @@ import a from "./Pagination.module.js";
|
|
|
7
7
|
import o, { memo as s, useCallback as c } from "react";
|
|
8
8
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
9
|
//#region src/Pagination/Pagination.tsx
|
|
10
|
-
var d =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
var d = {
|
|
11
|
+
prev: "Previous",
|
|
12
|
+
next: "Next",
|
|
13
|
+
prevAriaLabel: "Previous Page",
|
|
14
|
+
nextAriaLabel: "Next Page"
|
|
15
|
+
}, f = s(({ id: t, className: n, pageCount: s, currentPage: u, onPageChange: f, hrefBuilder: h = m, pageAttributesBuilder: g, marginPageCount: _ = 1, showPages: v = !0, surroundingPageCount: y = 2, labels: b, "aria-label": x, "data-testid": S, ...C }) => {
|
|
16
|
+
let { width: w } = r();
|
|
17
|
+
w && w < 768 && (_ = 1, y = 0);
|
|
18
|
+
let T = b?.prev ?? d.prev, E = b?.next ?? d.next, D = b?.prevAriaLabel ?? d.prevAriaLabel, O = b?.nextAriaLabel ?? d.nextAriaLabel, k = o.useRef(null), A = c((e) => (t) => {
|
|
19
|
+
f && f(t, e);
|
|
20
|
+
}, [f]), j = o.useMemo(() => i(s, u, v, _, y).map((e) => /* @__PURE__ */ l(p, {
|
|
16
21
|
page: e,
|
|
17
|
-
hrefBuilder:
|
|
18
|
-
pageAttributesBuilder:
|
|
19
|
-
|
|
22
|
+
hrefBuilder: h,
|
|
23
|
+
pageAttributesBuilder: g,
|
|
24
|
+
prevLabel: T,
|
|
25
|
+
nextLabel: E,
|
|
26
|
+
prevAriaLabel: D,
|
|
27
|
+
nextAriaLabel: O,
|
|
28
|
+
onClick: A(e.num)
|
|
20
29
|
}, `${e.type}-${e.num}`)), [
|
|
21
30
|
s,
|
|
22
31
|
u,
|
|
23
|
-
_,
|
|
24
|
-
g,
|
|
25
32
|
v,
|
|
26
|
-
|
|
33
|
+
_,
|
|
34
|
+
y,
|
|
27
35
|
h,
|
|
28
|
-
|
|
36
|
+
g,
|
|
37
|
+
T,
|
|
38
|
+
E,
|
|
39
|
+
D,
|
|
40
|
+
O,
|
|
41
|
+
A
|
|
29
42
|
]);
|
|
30
43
|
return /* @__PURE__ */ l("nav", {
|
|
31
|
-
ref:
|
|
44
|
+
ref: k,
|
|
32
45
|
id: t,
|
|
33
46
|
className: e(a.Pagination, n),
|
|
34
|
-
"data-testid":
|
|
35
|
-
"aria-label":
|
|
36
|
-
...
|
|
47
|
+
"data-testid": S,
|
|
48
|
+
"aria-label": x || "Pagination",
|
|
49
|
+
...C,
|
|
37
50
|
children: /* @__PURE__ */ l("div", {
|
|
38
51
|
className: e(a.Pagination__inner),
|
|
39
|
-
children:
|
|
52
|
+
children: j
|
|
40
53
|
})
|
|
41
54
|
});
|
|
42
|
-
}),
|
|
43
|
-
let [
|
|
55
|
+
}), p = ({ page: r, hrefBuilder: i, pageAttributesBuilder: s, prevLabel: c, nextLabel: d, prevAriaLabel: f, nextAriaLabel: p, onClick: m }) => {
|
|
56
|
+
let [h, g] = o.useState(!1), _ = {
|
|
44
57
|
role: "button",
|
|
45
58
|
size: "small",
|
|
46
59
|
variant: "subtle",
|
|
47
|
-
onClick: r.disabled ? void 0 :
|
|
48
|
-
}, { className:
|
|
60
|
+
onClick: r.disabled ? void 0 : m
|
|
61
|
+
}, { className: v, ...y } = s?.(r.num, r) ?? {};
|
|
49
62
|
switch (r.type) {
|
|
50
63
|
case "PREV": return /* @__PURE__ */ l(n, {
|
|
51
|
-
...
|
|
64
|
+
..._,
|
|
52
65
|
as: "a",
|
|
53
66
|
rel: "prev",
|
|
54
67
|
href: r.disabled ? void 0 : i(r.num),
|
|
55
68
|
"aria-disabled": r.disabled || void 0,
|
|
56
|
-
"aria-label":
|
|
57
|
-
...
|
|
58
|
-
className: e(a.Pagination__controlItem,
|
|
59
|
-
onMouseEnter: () =>
|
|
60
|
-
onMouseLeave: () =>
|
|
61
|
-
onFocus: () =>
|
|
62
|
-
onBlur: () =>
|
|
69
|
+
"aria-label": f,
|
|
70
|
+
...y,
|
|
71
|
+
className: e(a.Pagination__controlItem, v),
|
|
72
|
+
onMouseEnter: () => g(!0),
|
|
73
|
+
onMouseLeave: () => g(!1),
|
|
74
|
+
onFocus: () => g(!0),
|
|
75
|
+
onBlur: () => g(!1),
|
|
63
76
|
children: /* @__PURE__ */ u("span", {
|
|
64
77
|
className: a.Pagination__controlContent,
|
|
65
78
|
children: [/* @__PURE__ */ l("span", {
|
|
@@ -67,71 +80,71 @@ var d = s(({ id: t, className: n, pageCount: s, currentPage: u, onPageChange: d,
|
|
|
67
80
|
children: /* @__PURE__ */ l(t, {
|
|
68
81
|
hidden: !0,
|
|
69
82
|
reverse: !0,
|
|
70
|
-
expanded: !r.disabled &&
|
|
83
|
+
expanded: !r.disabled && h,
|
|
71
84
|
className: a.Pagination__controlArrow
|
|
72
85
|
})
|
|
73
86
|
}), /* @__PURE__ */ l("span", {
|
|
74
87
|
className: a.Pagination__controlText,
|
|
75
|
-
children:
|
|
88
|
+
children: c
|
|
76
89
|
})]
|
|
77
90
|
})
|
|
78
91
|
});
|
|
79
92
|
case "NEXT": return /* @__PURE__ */ l(n, {
|
|
80
|
-
...
|
|
93
|
+
..._,
|
|
81
94
|
as: "a",
|
|
82
95
|
rel: "next",
|
|
83
96
|
href: r.disabled ? void 0 : i(r.num),
|
|
84
97
|
"aria-disabled": r.disabled || void 0,
|
|
85
|
-
"aria-label":
|
|
86
|
-
...
|
|
87
|
-
className: e(a.Pagination__controlItem,
|
|
88
|
-
onMouseEnter: () =>
|
|
89
|
-
onMouseLeave: () =>
|
|
90
|
-
onFocus: () =>
|
|
91
|
-
onBlur: () =>
|
|
98
|
+
"aria-label": p,
|
|
99
|
+
...y,
|
|
100
|
+
className: e(a.Pagination__controlItem, v),
|
|
101
|
+
onMouseEnter: () => g(!0),
|
|
102
|
+
onMouseLeave: () => g(!1),
|
|
103
|
+
onFocus: () => g(!0),
|
|
104
|
+
onBlur: () => g(!1),
|
|
92
105
|
children: /* @__PURE__ */ u("span", {
|
|
93
106
|
className: a.Pagination__controlContent,
|
|
94
107
|
children: [/* @__PURE__ */ l("span", {
|
|
95
108
|
className: a.Pagination__controlText,
|
|
96
|
-
children:
|
|
109
|
+
children: d
|
|
97
110
|
}), /* @__PURE__ */ l("span", {
|
|
98
111
|
className: e(a.Pagination__controlArrowWrapper, a["Pagination__controlArrowWrapper--next"]),
|
|
99
112
|
children: /* @__PURE__ */ l(t, {
|
|
100
113
|
hidden: !0,
|
|
101
|
-
expanded: !r.disabled &&
|
|
114
|
+
expanded: !r.disabled && h,
|
|
102
115
|
className: a.Pagination__controlArrow
|
|
103
116
|
})
|
|
104
117
|
})]
|
|
105
118
|
})
|
|
106
119
|
});
|
|
107
120
|
case "NUM": return /* @__PURE__ */ l(n, {
|
|
108
|
-
...
|
|
121
|
+
..._,
|
|
109
122
|
as: "a",
|
|
110
123
|
variant: r.selected ? "primary" : "subtle",
|
|
111
|
-
className: e(a.Pagination__pageItem,
|
|
124
|
+
className: e(a.Pagination__pageItem, v),
|
|
112
125
|
href: i(r.num),
|
|
113
126
|
"aria-label": `Page ${r.num}${r.precedesBreak ? "..." : ""}`,
|
|
114
127
|
"aria-current": r.selected ? "page" : void 0,
|
|
115
|
-
...
|
|
128
|
+
...y,
|
|
116
129
|
children: r.num
|
|
117
130
|
});
|
|
118
131
|
case "BREAK": return /* @__PURE__ */ l(n, {
|
|
119
|
-
...
|
|
132
|
+
..._,
|
|
120
133
|
as: "a",
|
|
121
|
-
className: e(a.Pagination__pageItem,
|
|
134
|
+
className: e(a.Pagination__pageItem, v),
|
|
122
135
|
variant: "subtle",
|
|
123
136
|
role: "presentation",
|
|
124
137
|
href: void 0,
|
|
125
138
|
onClick: void 0,
|
|
126
|
-
...
|
|
139
|
+
...y,
|
|
127
140
|
children: "…"
|
|
128
141
|
});
|
|
129
142
|
}
|
|
130
143
|
};
|
|
131
|
-
function
|
|
144
|
+
function m(e) {
|
|
132
145
|
return `#${e}`;
|
|
133
146
|
}
|
|
134
147
|
//#endregion
|
|
135
|
-
export {
|
|
148
|
+
export { f as Pagination };
|
|
136
149
|
|
|
137
150
|
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","names":[],"sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import React, {memo, useCallback} from 'react'\nimport {Button, useWindowSize} from '..'\n\nimport {clsx} from 'clsx'\n\nimport {ExpandableArrow} from '../ExpandableArrow'\nimport {buildPaginationModel, PaginationPageType} from './model'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from './Pagination.module.css'\n\nexport type PaginationProps = {\n /* The total number of pages */\n pageCount: number\n /* The current page number */\n currentPage: number\n /* Callback function for when the page changes */\n onPageChange?: (e: React.MouseEvent, n: number) => void\n /* Function to build the href for each page */\n hrefBuilder?: (n: number) => string\n /* Function to forward custom attributes for each pagination item */\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[attributeName: string]: string}\n /* Defines how many pages are to be displayed on the left and right of the component */\n marginPageCount?: number\n /* Whether to show the page numbers */\n showPages?: boolean\n /* The number of pages to show on each side of the current page */\n surroundingPageCount?: number\n 'data-testid'?: string\n} & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n\n/**\n * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.\n * @see https://primer.style/brand/components/Pagination\n */\nexport const Pagination = memo(\n ({\n id,\n className,\n pageCount,\n currentPage,\n onPageChange,\n hrefBuilder = defaultHrefBuilder,\n pageAttributesBuilder,\n marginPageCount = 1,\n showPages = true,\n surroundingPageCount = 2,\n 'aria-label': ariaLabel,\n 'data-testid': testId,\n ...rest\n }: PaginationProps) => {\n // On mobile, limit the number of visible numbers\n const {width} = useWindowSize()\n if (width && width < 768) {\n marginPageCount = 1\n surroundingPageCount = 0\n }\n\n const navRef = React.useRef<HTMLElement>(null)\n\n const pageChange = useCallback(\n (n: number) => (e: React.MouseEvent) => {\n if (onPageChange) {\n onPageChange(e, n)\n }\n },\n [onPageChange],\n )\n\n const paginationItems = React.useMemo(() => {\n const model = buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount)\n\n return model.map(page => {\n return (\n <PaginationItem\n key={`${page.type}-${page.num}`}\n page={page}\n hrefBuilder={hrefBuilder}\n pageAttributesBuilder={pageAttributesBuilder}\n onClick={pageChange(page.num)}\n />\n )\n })\n }, [\n pageCount,\n currentPage,\n showPages,\n marginPageCount,\n surroundingPageCount,\n hrefBuilder,\n pageAttributesBuilder,\n pageChange,\n ])\n\n return (\n <nav\n ref={navRef}\n id={id}\n className={clsx(styles.Pagination, className)}\n data-testid={testId}\n aria-label={ariaLabel || 'Pagination'}\n {...rest}\n >\n <div className={clsx(styles.Pagination__inner)}>{paginationItems}</div>\n </nav>\n )\n },\n)\n\ntype PaginationItemProps = {\n page: PaginationPageType\n hrefBuilder: (n: number) => string\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[key: string]: string}\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\nconst PaginationItem = ({page, hrefBuilder, pageAttributesBuilder, onClick}: PaginationItemProps) => {\n const [isArrowExpanded, setIsArrowExpanded] = React.useState(false)\n\n const baseProps = {\n role: 'button',\n size: 'small' as const,\n variant: 'subtle' as const,\n onClick: page.disabled ? undefined : onClick,\n }\n\n const customProps = pageAttributesBuilder?.(page.num, page)\n const {className: customClassName, ...customAttributes} = customProps ?? {}\n\n switch (page.type) {\n case 'PREV': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"prev\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label=\"Previous Page\"\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span\n className={clsx(\n styles.Pagination__controlArrowWrapper,\n styles['Pagination__controlArrowWrapper--previous'],\n )}\n >\n <ExpandableArrow\n hidden\n reverse\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n <span className={styles.Pagination__controlText}>Previous</span>\n </span>\n </Button>\n )\n }\n case 'NEXT': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"next\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label=\"Next Page\"\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span className={styles.Pagination__controlText}>Next</span>\n <span\n className={clsx(styles.Pagination__controlArrowWrapper, styles['Pagination__controlArrowWrapper--next'])}\n >\n <ExpandableArrow\n hidden\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n </span>\n </Button>\n )\n }\n case 'NUM': {\n return (\n /**\n * Append \"...\" to the aria-label for pages that precede a break because screen readers will change the\n * tone the text is read in. This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.\n */\n <Button\n {...baseProps}\n as=\"a\"\n variant={page.selected ? 'primary' : 'subtle'}\n className={clsx(styles.Pagination__pageItem, customClassName)}\n href={hrefBuilder(page.num)}\n aria-label={`Page ${page.num}${page.precedesBreak ? '...' : ''}`}\n aria-current={page.selected ? 'page' : undefined}\n {...customAttributes}\n >\n {page.num}\n </Button>\n )\n }\n case 'BREAK': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n className={clsx(styles.Pagination__pageItem, customClassName)}\n variant=\"subtle\"\n role=\"presentation\"\n href={undefined}\n onClick={undefined}\n {...customAttributes}\n >\n …\n </Button>\n )\n }\n }\n}\n\nfunction defaultHrefBuilder(pageNum: number) {\n return `#${pageNum}`\n}\n"],"mappings":";;;;;;;;;AAmCA,IAAa,IAAa,GACvB,EACC,OACA,cACA,cACA,gBACA,iBACA,iBAAc,GACd,0BACA,qBAAkB,GAClB,eAAY,IACZ,0BAAuB,GACvB,cAAc,GACd,eAAe,GACf,GAAG,QACkB;CAErB,IAAM,EAAC,aAAS,GAAe;AAC/B,CAAI,KAAS,IAAQ,QACnB,IAAkB,GAClB,IAAuB;CAGzB,IAAM,IAAS,EAAM,OAAoB,KAAK,EAExC,IAAa,GAChB,OAAe,MAAwB;AACtC,EAAI,KACF,EAAa,GAAG,EAAE;IAGtB,CAAC,EAAa,CACf,EAEK,IAAkB,EAAM,cACd,EAAqB,GAAW,GAAa,GAAW,GAAiB,EAEhF,CAAM,KAAI,MAEb,kBAAC,GAAD;EAEQ;EACO;EACU;EACvB,SAAS,EAAW,EAAK,IAAI;EAC7B,EALK,GAAG,EAAK,KAAK,GAAG,EAAK,MAK1B,CAEJ,EACD;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,kB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AK,YAAY,KAAA;GAChC,cAAW;GACX,GAAI;GACJ,WAAW,EAAK,EAAO,yBAAyB,EAAgB;GAChE,oBAAoB,EAAmB,GAAK;GAC5C,oBAAoB,EAAmB,GAAM;GAC7C,eAAe,EAAmB,GAAK;GACvC,cAAc,EAAmB,GAAM;aAEvC,kBAAC,QAAD;IAAM,WAAW,EAAO;cAAxB,CACE,kBAAC,QAAD;KAAM,WAAW,EAAO;eAAyB;KAAW,CAAA,EAC5D,kBAAC,QAAD;KACE,WAAW,EAAK,EAAO,iCAAiC,EAAO,yCAAyC;eAExG,kBAAC,GAAD;MACE,QAAA;MACA,UAAU,CAAC,EAAK,YAAY;MAC5B,WAAW,EAAO;MAClB,CAAA;KACG,CAAA,CACF;;GACA,CAAA;EAGb,KAAK,MACH,QAKE,kBAAC,GAAD;GACE,GAAI;GACJ,IAAG;GACH,SAAS,EAAK,WAAW,YAAY;GACrC,WAAW,EAAK,EAAO,sBAAsB,EAAgB;GAC7D,MAAM,EAAY,EAAK,IAAI;GAC3B,cAAY,QAAQ,EAAK,MAAM,EAAK,gBAAgB,QAAQ;GAC5D,gBAAc,EAAK,WAAW,SAAS,KAAA;GACvC,GAAI;aAEH,EAAK;GACC,CAAA;EAGb,KAAK,QACH,QACE,kBAAC,GAAD;GACE,GAAI;GACJ,IAAG;GACH,WAAW,EAAK,EAAO,sBAAsB,EAAgB;GAC7D,SAAQ;GACR,MAAK;GACL,MAAM,KAAA;GACN,SAAS,KAAA;GACT,GAAI;aACL;GAEQ,CAAA;;;AAMjB,SAAS,EAAmB,GAAiB;AAC3C,QAAO,IAAI"}
|
|
1
|
+
{"version":3,"file":"Pagination.js","names":[],"sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import React, {memo, useCallback} from 'react'\nimport {Button, useWindowSize} from '..'\n\nimport {clsx} from 'clsx'\n\nimport {ExpandableArrow} from '../ExpandableArrow'\nimport {buildPaginationModel, PaginationPageType} from './model'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from './Pagination.module.css'\n\nexport type PaginationProps = {\n /* The total number of pages */\n pageCount: number\n /* The current page number */\n currentPage: number\n /* Callback function for when the page changes */\n onPageChange?: (e: React.MouseEvent, n: number) => void\n /* Function to build the href for each page */\n hrefBuilder?: (n: number) => string\n /* Function to forward custom attributes for each pagination item */\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[attributeName: string]: string}\n /* Defines how many pages are to be displayed on the left and right of the component */\n marginPageCount?: number\n /* Whether to show the page numbers */\n showPages?: boolean\n /* The number of pages to show on each side of the current page */\n surroundingPageCount?: number\n /* Custom text labels for the pagination controls. Use for localization. */\n labels?: {\n prev?: string\n next?: string\n prevAriaLabel?: string\n nextAriaLabel?: string\n }\n 'data-testid'?: string\n} & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n\nconst defaultPaginationLabels = {\n prev: 'Previous',\n next: 'Next',\n prevAriaLabel: 'Previous Page',\n nextAriaLabel: 'Next Page',\n}\n\n/**\n * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.\n * @see https://primer.style/brand/components/Pagination\n */\nexport const Pagination = memo(\n ({\n id,\n className,\n pageCount,\n currentPage,\n onPageChange,\n hrefBuilder = defaultHrefBuilder,\n pageAttributesBuilder,\n marginPageCount = 1,\n showPages = true,\n surroundingPageCount = 2,\n labels,\n 'aria-label': ariaLabel,\n 'data-testid': testId,\n ...rest\n }: PaginationProps) => {\n // On mobile, limit the number of visible numbers\n const {width} = useWindowSize()\n if (width && width < 768) {\n marginPageCount = 1\n surroundingPageCount = 0\n }\n\n const prevLabel = labels?.prev ?? defaultPaginationLabels.prev\n const nextLabel = labels?.next ?? defaultPaginationLabels.next\n const prevAriaLabel = labels?.prevAriaLabel ?? defaultPaginationLabels.prevAriaLabel\n const nextAriaLabel = labels?.nextAriaLabel ?? defaultPaginationLabels.nextAriaLabel\n\n const navRef = React.useRef<HTMLElement>(null)\n\n const pageChange = useCallback(\n (n: number) => (e: React.MouseEvent) => {\n if (onPageChange) {\n onPageChange(e, n)\n }\n },\n [onPageChange],\n )\n\n const paginationItems = React.useMemo(() => {\n const model = buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount)\n\n return model.map(page => {\n return (\n <PaginationItem\n key={`${page.type}-${page.num}`}\n page={page}\n hrefBuilder={hrefBuilder}\n pageAttributesBuilder={pageAttributesBuilder}\n prevLabel={prevLabel}\n nextLabel={nextLabel}\n prevAriaLabel={prevAriaLabel}\n nextAriaLabel={nextAriaLabel}\n onClick={pageChange(page.num)}\n />\n )\n })\n }, [\n pageCount,\n currentPage,\n showPages,\n marginPageCount,\n surroundingPageCount,\n hrefBuilder,\n pageAttributesBuilder,\n prevLabel,\n nextLabel,\n prevAriaLabel,\n nextAriaLabel,\n pageChange,\n ])\n\n return (\n <nav\n ref={navRef}\n id={id}\n className={clsx(styles.Pagination, className)}\n data-testid={testId}\n aria-label={ariaLabel || 'Pagination'}\n {...rest}\n >\n <div className={clsx(styles.Pagination__inner)}>{paginationItems}</div>\n </nav>\n )\n },\n)\n\ntype PaginationItemProps = {\n page: PaginationPageType\n hrefBuilder: (n: number) => string\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[key: string]: string}\n prevLabel: string\n nextLabel: string\n prevAriaLabel: string\n nextAriaLabel: string\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\nconst PaginationItem = ({\n page,\n hrefBuilder,\n pageAttributesBuilder,\n prevLabel,\n nextLabel,\n prevAriaLabel,\n nextAriaLabel,\n onClick,\n}: PaginationItemProps) => {\n const [isArrowExpanded, setIsArrowExpanded] = React.useState(false)\n\n const baseProps = {\n role: 'button',\n size: 'small' as const,\n variant: 'subtle' as const,\n onClick: page.disabled ? undefined : onClick,\n }\n\n const customProps = pageAttributesBuilder?.(page.num, page)\n const {className: customClassName, ...customAttributes} = customProps ?? {}\n\n switch (page.type) {\n case 'PREV': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"prev\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label={prevAriaLabel}\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span\n className={clsx(\n styles.Pagination__controlArrowWrapper,\n styles['Pagination__controlArrowWrapper--previous'],\n )}\n >\n <ExpandableArrow\n hidden\n reverse\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n <span className={styles.Pagination__controlText}>{prevLabel}</span>\n </span>\n </Button>\n )\n }\n case 'NEXT': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"next\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label={nextAriaLabel}\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span className={styles.Pagination__controlText}>{nextLabel}</span>\n <span\n className={clsx(styles.Pagination__controlArrowWrapper, styles['Pagination__controlArrowWrapper--next'])}\n >\n <ExpandableArrow\n hidden\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n </span>\n </Button>\n )\n }\n case 'NUM': {\n return (\n /**\n * Append \"...\" to the aria-label for pages that precede a break because screen readers will change the\n * tone the text is read in. This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.\n */\n <Button\n {...baseProps}\n as=\"a\"\n variant={page.selected ? 'primary' : 'subtle'}\n className={clsx(styles.Pagination__pageItem, customClassName)}\n href={hrefBuilder(page.num)}\n aria-label={`Page ${page.num}${page.precedesBreak ? '...' : ''}`}\n aria-current={page.selected ? 'page' : undefined}\n {...customAttributes}\n >\n {page.num}\n </Button>\n )\n }\n case 'BREAK': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n className={clsx(styles.Pagination__pageItem, customClassName)}\n variant=\"subtle\"\n role=\"presentation\"\n href={undefined}\n onClick={undefined}\n {...customAttributes}\n >\n …\n </Button>\n )\n }\n }\n}\n\nfunction defaultHrefBuilder(pageNum: number) {\n return `#${pageNum}`\n}\n"],"mappings":";;;;;;;;;AAsCA,IAAM,IAA0B;CAC9B,MAAM;CACN,MAAM;CACN,eAAe;CACf,eAAe;CAChB,EAMY,IAAa,GACvB,EACC,OACA,cACA,cACA,gBACA,iBACA,iBAAc,GACd,0BACA,qBAAkB,GAClB,eAAY,IACZ,0BAAuB,GACvB,WACA,cAAc,GACd,eAAe,GACf,GAAG,QACkB;CAErB,IAAM,EAAC,aAAS,GAAe;AAC/B,CAAI,KAAS,IAAQ,QACnB,IAAkB,GAClB,IAAuB;CAGzB,IAAM,IAAY,GAAQ,QAAQ,EAAwB,MACpD,IAAY,GAAQ,QAAQ,EAAwB,MACpD,IAAgB,GAAQ,iBAAiB,EAAwB,eACjE,IAAgB,GAAQ,iBAAiB,EAAwB,eAEjE,IAAS,EAAM,OAAoB,KAAK,EAExC,IAAa,GAChB,OAAe,MAAwB;AACtC,EAAI,KACF,EAAa,GAAG,EAAE;IAGtB,CAAC,EAAa,CACf,EAEK,IAAkB,EAAM,cACd,EAAqB,GAAW,GAAa,GAAW,GAAiB,EAEhF,CAAM,KAAI,MAEb,kBAAC,GAAD;EAEQ;EACO;EACU;EACZ;EACA;EACI;EACA;EACf,SAAS,EAAW,EAAK,IAAI;EAC7B,EATK,GAAG,EAAK,KAAK,GAAG,EAAK,MAS1B,CAEJ,EACD;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,kBAAC,OAAD;EACE,KAAK;EACD;EACJ,WAAW,E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AS,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAAA;AA4CnF,KAAK,mCAAmC,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC,GAC1E,SAAS,CAAC,oBAAoB,CAAC,GAAG;IAChC,EAAE,CAAC,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC9C,CAAA;AAkBH,KAAK,4BAA4B,GAAG,SAAS,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAA;AAqB5E,KAAK,6BAA6B,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAchE,KAAK,gCAAgC,GAAG,SAAS,CAAA;AAyCjD,KAAK,uCAAuC,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,GACvF,SAAS,CAAC,oBAAoB,CAAC,GAAG;IAChC,EAAE,CAAC,EAAE,GAAG,CAAA;IACR,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC9C,CAAA;AAmBH,MAAM,MAAM,4BAA4B,GAAG,SAAS,CAAC,aAAa,CAAC,CAAA;AAiDnE,eAAO,MAAM,mBAAmB;;;;uDA7H4B,iBAAiB,CAAC,6BAA6B,CAAC;6CA8E1D,iBAAiB,CAAC,4BAA4B,CAAC;+CAhEvC,gCAAgC;;;CAwHxF,CAAA"}
|
|
@@ -23,12 +23,14 @@ var g = ["default", "gridline"], _ = d(({ animate: r, className: i, children: a,
|
|
|
23
23
|
children: /* @__PURE__ */ h(t, {
|
|
24
24
|
fullWidth: !0,
|
|
25
25
|
enableGutters: c !== "gridline",
|
|
26
|
+
columnGap: "none",
|
|
26
27
|
children: [/* @__PURE__ */ m(t.Column, {
|
|
27
28
|
span: { large: 6 },
|
|
29
|
+
className: l["SectionIntroStacked-content"],
|
|
28
30
|
children: y
|
|
29
31
|
}), /* @__PURE__ */ m(t.Column, {
|
|
30
|
-
span:
|
|
31
|
-
start:
|
|
32
|
+
span: { large: 6 },
|
|
33
|
+
start: { large: 7 },
|
|
32
34
|
children: v
|
|
33
35
|
})]
|
|
34
36
|
})
|
|
@@ -68,7 +70,7 @@ var g = ["default", "gridline"], _ = d(({ animate: r, className: i, children: a,
|
|
|
68
70
|
}, C = ({ className: t, color: n = "green", ...r }) => /* @__PURE__ */ m(c, {
|
|
69
71
|
className: e(l.SectionIntroStackedItem__icon, t),
|
|
70
72
|
hasBackground: !0,
|
|
71
|
-
size: "
|
|
73
|
+
size: "small",
|
|
72
74
|
color: n,
|
|
73
75
|
...r
|
|
74
76
|
}), w = d(({ as: t = "h3", size: n = "subhead-large", className: r, children: a, ...o }, s) => /* @__PURE__ */ m(i, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionIntroStacked.js","names":[],"sources":["../../src/SectionIntroStacked/SectionIntroStacked.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, useMemo, type Ref, useCallback} from 'react'\nimport {clsx} from 'clsx'\nimport {Grid} from '../Grid'\nimport {Link, LinkProps} from '../Link'\nimport {Heading, HeadingProps, defaultHeadingTag} from '../Heading'\nimport {Text, TextProps} from '../Text'\nimport {Icon, IconProps} from '../Icon'\nimport {useAnimation} from '../animation'\n\nimport styles from './SectionIntroStacked.module.css'\nimport gridlineStyles from '../component-helpers/shared.module.css'\n\nimport type {BaseProps} from '../component-helpers'\n\nexport const SectionIntroStackedVariants = ['default', 'gridline'] as const\nexport type SectionIntroStackedVariant = (typeof SectionIntroStackedVariants)[number]\n\nexport type SectionIntroStackedProps = React.HTMLAttributes<HTMLElement> &\n BaseProps<HTMLElement> &\n PropsWithChildren & {\n variant?: SectionIntroStackedVariant\n }\n\nconst Root = forwardRef<HTMLElement, PropsWithChildren<SectionIntroStackedProps>>(\n ({animate, className, children, style, variant = 'default', ...props}, ref) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const childrenArray = React.Children.toArray(children)\n\n // extract Items and everything else into two separate arrays\n const items = childrenArray.filter(child => React.isValidElement(child) && child.type === ItemsBase)\n\n const otherChildren = childrenArray.filter(child => !items.includes(child))\n\n return (\n <header\n ref={ref}\n className={clsx(\n styles.SectionIntroStacked,\n variant === 'gridline' && styles['SectionIntroStacked--variant-gridline'],\n variant === 'gridline' && gridlineStyles.gridline,\n animationClasses,\n className,\n )}\n {...props}\n style={{...animationInlineStyles, ...style}}\n >\n <Grid fullWidth enableGutters={variant !== 'gridline'}>\n <Grid.Column span={{large: 6}}>{otherChildren}</Grid.Column>\n <Grid.Column\n span={variant === 'gridline' ? {large: 6} : {large: 5}}\n start={variant === 'gridline' ? {large: 7} : {large: 8}}\n >\n {items}\n </Grid.Column>\n </Grid>\n </header>\n )\n },\n)\n\ntype SectionIntroStackedHeadingProps = BaseProps<HTMLHeadingElement> & HeadingProps\n\nconst defaultHeadingSize = '3'\n\nconst _Heading = forwardRef(\n (\n {\n as = defaultHeadingTag,\n size = defaultHeadingSize,\n className,\n children,\n ...props\n }: PropsWithChildren<SectionIntroStackedHeadingProps>,\n ref: Ref<HTMLHeadingElement>,\n ) => {\n const childrenArray = useMemo(() => React.Children.toArray(children), [children])\n\n const getConditionalVariant = useCallback(() => {\n if (childrenArray.some(child => React.isValidElement(child) && (child.type === 'b' || child.type === 'em'))) {\n return 'muted'\n }\n return 'default'\n }, [childrenArray])\n\n const defaultColor = childrenArray.length === 1 ? 'default' : getConditionalVariant()\n\n return (\n <Heading\n ref={ref}\n className={clsx(\n styles[`SectionIntroStacked-heading`],\n defaultColor === 'muted' && styles[`SectionIntroStacked-heading--muted`],\n className,\n )}\n size={size}\n as={as}\n {...props}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype SectionIntroStackedDescriptionProps = Omit<TextProps, 'as' | 'variant'> &\n BaseProps<HTMLParagraphElement> & {\n as?: 'p'\n children: React.ReactNode | React.ReactNode[]\n }\n\nconst _Description = forwardRef(\n ({className, children, ...props}: SectionIntroStackedDescriptionProps, ref: Ref<HTMLParagraphElement>) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles['SectionIntroStacked-description'], className)}\n ref={ref}\n variant=\"muted\"\n {...props}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype SectionIntroStackedLinkProps = LinkProps & BaseProps<HTMLAnchorElement>\n\nconst _Link = forwardRef(\n (\n {className, children, variant = 'accent', size = 'medium', ...props}: SectionIntroStackedLinkProps,\n ref: Ref<HTMLAnchorElement>,\n ) => {\n return (\n <Link\n ref={ref}\n className={clsx(styles['SectionIntroStacked-link'], className)}\n size={size}\n variant={variant}\n {...props}\n >\n {children}\n </Link>\n )\n },\n)\n\ntype SectionIntroStackedItemsProps = BaseProps<HTMLUListElement>\n\nconst ItemsBase = ({animate, className, children, ...rest}: PropsWithChildren<SectionIntroStackedItemsProps>) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const timelineClassName = clsx(animationClasses, styles['SectionIntroStacked-items'], className)\n\n return (\n <ul className={timelineClassName} style={{...animationInlineStyles}} {...rest}>\n {children}\n </ul>\n )\n}\n\ntype SectionIntroStackedItemIconProps = IconProps\n\nconst ItemIcon = ({className, color = 'green', ...props}: SectionIntroStackedItemIconProps) => {\n return (\n <Icon\n className={clsx(styles['SectionIntroStackedItem__icon'], className)}\n hasBackground\n size=\"medium\"\n color={color}\n {...props}\n />\n )\n}\n\ntype SectionIntroStackedItemHeadingProps = HeadingProps\n\nconst ItemHeading = forwardRef(\n (\n {\n as = 'h3',\n size = 'subhead-large',\n className,\n children,\n ...props\n }: PropsWithChildren<SectionIntroStackedItemHeadingProps>,\n ref: Ref<HTMLHeadingElement>,\n ) => {\n return (\n <Heading\n ref={ref}\n as={as}\n size={size}\n className={clsx(styles['SectionIntroStackedItem__heading'], className)}\n {...props}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype SectionIntroStackedItemDescriptionProps = Omit<TextProps, 'as' | 'variant' | 'size'> &\n BaseProps<HTMLParagraphElement> & {\n as?: 'p'\n children: React.ReactNode | React.ReactNode[]\n }\n\nconst ItemDescription = forwardRef(\n ({className, children, ...props}: SectionIntroStackedItemDescriptionProps, ref: Ref<HTMLParagraphElement>) => {\n return (\n <Text\n as=\"p\"\n variant=\"muted\"\n size=\"200\"\n className={clsx(styles['SectionIntroStackedItem__description'], className)}\n ref={ref}\n {...props}\n >\n {children}\n </Text>\n )\n },\n)\n\nexport type SectionIntroStackedItemProps = BaseProps<HTMLLIElement>\n\nconst ItemBase = ({className, children, ...rest}: PropsWithChildren<SectionIntroStackedItemProps>) => {\n const itemClassName = clsx(styles['SectionIntroStackedItem-item'], className)\n const childrenArray = useMemo(() => React.Children.toArray(children), [children])\n\n const hasSubComponents = childrenArray.some(\n child =>\n React.isValidElement(child) &&\n (child.type === ItemIcon || child.type === ItemHeading || child.type === ItemDescription),\n )\n\n if (hasSubComponents) {\n const iconChild = childrenArray.find(child => React.isValidElement(child) && child.type === ItemIcon)\n\n const contentChildren = childrenArray.filter(child => !(React.isValidElement(child) && child.type === ItemIcon))\n\n return (\n <li className={clsx(itemClassName, !!iconChild && styles['SectionIntroStackedItem-item--with-icon'])} {...rest}>\n {iconChild}\n <div className={styles['SectionIntroStackedItem__content']}>{contentChildren}</div>\n </li>\n )\n }\n\n const getConditionalVariant = () => {\n if (childrenArray.some(child => React.isValidElement(child) && (child.type === 'b' || child.type === 'em'))) {\n return 'muted'\n }\n return 'default'\n }\n\n const defaultColor = childrenArray.length === 1 ? 'default' : getConditionalVariant()\n return (\n <li className={itemClassName} {...rest}>\n <Text\n as=\"span\"\n className={clsx(\n styles['SectionIntroStackedItem__item-text'],\n defaultColor === 'muted' && styles[`SectionIntroStackedItem__item-text--muted`],\n )}\n size=\"350\"\n >\n {children}\n </Text>\n </li>\n )\n}\n\nexport const SectionIntroStacked = Object.assign(Root, {\n Heading: _Heading,\n Description: _Description,\n Link: _Link,\n Items: ItemsBase,\n Item: ItemBase,\n ItemIcon,\n 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A,CAGZ,EAmDY,IAAsB,OAAO,OAAO,GAAM;CACrD,SAAS;CACT,aAAa;CACb,MAAM;CACN,OAAO;CACP,OApDgB,EAAC,cAAW,aAAU,GAAG,QAA2D;EACpG,IAAM,IAAgB,EAAK,EAAO,iCAAiC,EAAU,EACvE,IAAgB,QAAc,EAAM,SAAS,QAAQ,EAAS,EAAE,CAAC,EAAS,CAAC;AAQjF,MANyB,EAAc,MACrC,MACE,EAAM,eAAe,EAAM,KAC1B,EAAM,SAAS,KAAY,EAAM,SAAS,KAAe,EAAM,SAAS,GAGzE,EAAkB;GACpB,IAAM,IAAY,EAAc,MAAK,MAAS,EAAM,eAAe,EAAM,IAAI,EAAM,SAAS,EAAS,EAE/F,IAAkB,EAAc,QAAO,MAAS,EAAE,EAAM,eAAe,EAAM,IAAI,EAAM,SAAS,GAAU;AAEhH,UACE,kBAAC,MAAD;IAAI,WAAW,EAAK,GAAe,CAAC,CAAC,KAAa,EAAO,2CAA2C;IAAE,GAAI;cAA1G,CACG,GACD,kBAAC,OAAD;KAAK,WAAW,EAAO;eAAsC;KAAsB,CAAA,CAChF;;;EAWT,IAAM,IAAe,EAAc,WAAW,IAAI,YAN5C,EAAc,MAAK,MAAS,EAAM,eAAe,EAAM,KAAK,EAAM,SAAS,OAAO,EAAM,SAAS,MAAM,GAClG,UAEF;AAIT,SACE,kBAAC,MAAD;GAAI,WAAW;GAAe,GAAI;aAChC,kBAAC,GAAD;IACE,IAAG;IACH,WAAW,EACT,EAAO,uCACP,MAAiB,WAAW,EAAO,6CACpC;IACD,MAAK;IAEJ;IACI,CAAA;GACJ,CAAA;;CAUP;CACA;CACA;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"SectionIntroStacked.js","names":[],"sources":["../../src/SectionIntroStacked/SectionIntroStacked.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, useMemo, type Ref, useCallback} from 'react'\nimport {clsx} from 'clsx'\nimport {Grid} from '../Grid'\nimport {Link, LinkProps} from '../Link'\nimport {Heading, HeadingProps, defaultHeadingTag} from '../Heading'\nimport {Text, TextProps} from '../Text'\nimport {Icon, IconProps} from '../Icon'\nimport {useAnimation} from '../animation'\n\nimport styles from './SectionIntroStacked.module.css'\nimport gridlineStyles from '../component-helpers/shared.module.css'\n\nimport type {BaseProps} from '../component-helpers'\n\nexport const SectionIntroStackedVariants = ['default', 'gridline'] as const\nexport type SectionIntroStackedVariant = (typeof SectionIntroStackedVariants)[number]\n\nexport type SectionIntroStackedProps = React.HTMLAttributes<HTMLElement> &\n BaseProps<HTMLElement> &\n PropsWithChildren & {\n variant?: SectionIntroStackedVariant\n }\n\nconst Root = forwardRef<HTMLElement, PropsWithChildren<SectionIntroStackedProps>>(\n ({animate, className, children, style, variant = 'default', ...props}, ref) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const childrenArray = React.Children.toArray(children)\n\n // extract Items and everything else into two separate arrays\n const items = childrenArray.filter(child => React.isValidElement(child) && child.type === ItemsBase)\n\n const otherChildren = childrenArray.filter(child => !items.includes(child))\n\n return (\n <header\n ref={ref}\n className={clsx(\n styles.SectionIntroStacked,\n variant === 'gridline' && styles['SectionIntroStacked--variant-gridline'],\n variant === 'gridline' && gridlineStyles.gridline,\n animationClasses,\n className,\n )}\n {...props}\n style={{...animationInlineStyles, ...style}}\n >\n <Grid fullWidth enableGutters={variant !== 'gridline'} columnGap=\"none\">\n <Grid.Column span={{large: 6}} className={styles['SectionIntroStacked-content']}>\n {otherChildren}\n </Grid.Column>\n <Grid.Column span={{large: 6}} start={{large: 7}}>\n {items}\n </Grid.Column>\n </Grid>\n </header>\n )\n },\n)\n\ntype SectionIntroStackedHeadingProps = BaseProps<HTMLHeadingElement> & HeadingProps\n\nconst defaultHeadingSize = '3'\n\nconst _Heading = forwardRef(\n (\n {\n as = defaultHeadingTag,\n size = defaultHeadingSize,\n className,\n children,\n ...props\n }: PropsWithChildren<SectionIntroStackedHeadingProps>,\n ref: Ref<HTMLHeadingElement>,\n ) => {\n const childrenArray = useMemo(() => React.Children.toArray(children), [children])\n\n const getConditionalVariant = useCallback(() => {\n if (childrenArray.some(child => React.isValidElement(child) && (child.type === 'b' || child.type === 'em'))) {\n return 'muted'\n }\n return 'default'\n }, [childrenArray])\n\n const defaultColor = childrenArray.length === 1 ? 'default' : getConditionalVariant()\n\n return (\n <Heading\n ref={ref}\n className={clsx(\n styles[`SectionIntroStacked-heading`],\n defaultColor === 'muted' && styles[`SectionIntroStacked-heading--muted`],\n className,\n )}\n size={size}\n as={as}\n {...props}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype SectionIntroStackedDescriptionProps = Omit<TextProps, 'as' | 'variant'> &\n BaseProps<HTMLParagraphElement> & {\n as?: 'p'\n children: React.ReactNode | React.ReactNode[]\n }\n\nconst _Description = forwardRef(\n ({className, children, ...props}: SectionIntroStackedDescriptionProps, ref: Ref<HTMLParagraphElement>) => {\n return (\n <Text\n as=\"p\"\n className={clsx(styles['SectionIntroStacked-description'], className)}\n ref={ref}\n variant=\"muted\"\n {...props}\n >\n {children}\n </Text>\n )\n },\n)\n\ntype SectionIntroStackedLinkProps = LinkProps & BaseProps<HTMLAnchorElement>\n\nconst _Link = forwardRef(\n (\n {className, children, variant = 'accent', size = 'medium', ...props}: SectionIntroStackedLinkProps,\n ref: Ref<HTMLAnchorElement>,\n ) => {\n return (\n <Link\n ref={ref}\n className={clsx(styles['SectionIntroStacked-link'], className)}\n size={size}\n variant={variant}\n {...props}\n >\n {children}\n </Link>\n )\n },\n)\n\ntype SectionIntroStackedItemsProps = BaseProps<HTMLUListElement>\n\nconst ItemsBase = ({animate, className, children, ...rest}: PropsWithChildren<SectionIntroStackedItemsProps>) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const timelineClassName = clsx(animationClasses, styles['SectionIntroStacked-items'], className)\n\n return (\n <ul className={timelineClassName} style={{...animationInlineStyles}} {...rest}>\n {children}\n </ul>\n )\n}\n\ntype SectionIntroStackedItemIconProps = IconProps\n\nconst ItemIcon = ({className, color = 'green', ...props}: SectionIntroStackedItemIconProps) => {\n return (\n <Icon\n className={clsx(styles['SectionIntroStackedItem__icon'], className)}\n hasBackground\n size=\"small\"\n color={color}\n {...props}\n />\n )\n}\n\ntype SectionIntroStackedItemHeadingProps = HeadingProps\n\nconst ItemHeading = forwardRef(\n (\n {\n as = 'h3',\n size = 'subhead-large',\n className,\n children,\n ...props\n }: PropsWithChildren<SectionIntroStackedItemHeadingProps>,\n ref: Ref<HTMLHeadingElement>,\n ) => {\n return (\n <Heading\n ref={ref}\n as={as}\n size={size}\n className={clsx(styles['SectionIntroStackedItem__heading'], className)}\n {...props}\n >\n {children}\n </Heading>\n )\n },\n)\n\ntype SectionIntroStackedItemDescriptionProps = Omit<TextProps, 'as' | 'variant' | 'size'> &\n BaseProps<HTMLParagraphElement> & {\n as?: 'p'\n children: React.ReactNode | React.ReactNode[]\n }\n\nconst ItemDescription = forwardRef(\n ({className, children, ...props}: SectionIntroStackedItemDescriptionProps, ref: Ref<HTMLParagraphElement>) => {\n return (\n <Text\n as=\"p\"\n variant=\"muted\"\n size=\"200\"\n className={clsx(styles['SectionIntroStackedItem__description'], className)}\n ref={ref}\n {...props}\n >\n {children}\n </Text>\n )\n },\n)\n\nexport type SectionIntroStackedItemProps = BaseProps<HTMLLIElement>\n\nconst ItemBase = ({className, children, ...rest}: PropsWithChildren<SectionIntroStackedItemProps>) => {\n const itemClassName = clsx(styles['SectionIntroStackedItem-item'], className)\n const childrenArray = useMemo(() => React.Children.toArray(children), [children])\n\n const hasSubComponents = childrenArray.some(\n child =>\n React.isValidElement(child) &&\n (child.type === ItemIcon || child.type === ItemHeading || child.type === ItemDescription),\n )\n\n if (hasSubComponents) {\n const iconChild = childrenArray.find(child => React.isValidElement(child) && child.type === ItemIcon)\n\n const contentChildren = childrenArray.filter(child => !(React.isValidElement(child) && child.type === ItemIcon))\n\n return (\n <li className={clsx(itemClassName, !!iconChild && styles['SectionIntroStackedItem-item--with-icon'])} {...rest}>\n {iconChild}\n <div className={styles['SectionIntroStackedItem__content']}>{contentChildren}</div>\n </li>\n )\n }\n\n const getConditionalVariant = () => {\n if (childrenArray.some(child => React.isValidElement(child) && (child.type === 'b' || child.type === 'em'))) {\n return 'muted'\n }\n return 'default'\n }\n\n const defaultColor = childrenArray.length === 1 ? 'default' : getConditionalVariant()\n return (\n <li className={itemClassName} {...rest}>\n <Text\n as=\"span\"\n className={clsx(\n styles['SectionIntroStackedItem__item-text'],\n defaultColor === 'muted' && styles[`SectionIntroStackedItem__item-text--muted`],\n )}\n size=\"350\"\n >\n {children}\n </Text>\n </li>\n )\n}\n\nexport const SectionIntroStacked = Object.assign(Root, {\n Heading: _Heading,\n Description: _Description,\n Link: _Link,\n Items: ItemsBase,\n Item: ItemBase,\n ItemIcon,\n ItemHeading,\n ItemDescription,\n})\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,IAA8B,CAAC,WAAW,WAAW,EAS5D,IAAO,GACV,EAAC,YAAS,cAAW,aAAU,UAAO,aAAU,WAAW,GAAG,KAAQ,MAAQ;CAC7E,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAElF,IAAgB,EAAM,SAAS,QAAQ,EAAS,EAGhD,IAAQ,EAAc,QAAO,MAAS,EAAM,eAAe,EAAM,IAAI,EAAM,SAAS,EAAU,EAE9F,IAAgB,EAAc,QAAO,MAAS,CAAC,EAAM,SAAS,EAAM,CAAC;AAE3E,QACE,kBAAC,UAAD;EACO;EACL,WAAW,EACT,EAAO,qBACP,MAAY,cAAc,EAAO,0CACjC,MAAY,cAAc,EAAe,UACzC,GACA,EACD;EACD,GAAI;EACJ,OAAO;GAAC,GAAG;GAAuB,GAAG;GAAM;YAE3C,kBAAC,GAAD;GAAM,WAAA;GAAU,eAAe,MAAY;GAAY,WAAU;aAAjE,CACE,kBAAC,EAAK,QAAN;IAAa,MAAM,EAAC,OAAO,GAAE;IAAE,WAAW,EAAO;cAC9C;IACW,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,KAAK,EAAM,SAAS,OAAO,EAAM,SAAS,MAAM,GAClG,UAEF;AAIT,SACE,kBAAC,MAAD;GAAI,WAAW;GAAe,GAAI;aAChC,kBAAC,GAAD;IACE,IAAG;IACH,WAAW,EACT,EAAO,uCACP,MAAiB,WAAW,EAAO,6CACpC;IACD,MAAK;IAEJ;IACI,CAAA;GACJ,CAAA;;CAUP;CACA;CACA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked___UM_8Y{--brand-Grid-spacing-row:var(--base-size-64)}@media screen and (width>=48rem) and (width<=63.24rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked___UM_8Y{max-width:618px;margin-inline:auto}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked___UM_8Y.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi{padding-inline:var(--base-size-32);padding-block:calc(var(--base-size-64) - var(--base-size-4));--SectionIntroStacked-item-divider-overflow-start:var(--base-size-32);--SectionIntroStacked-item-divider-overflow-end:var(--base-size-32)}}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi{padding-inline:var(--base-size-24);padding-block:var(--base-size-32);--SectionIntroStacked-item-divider-overflow-start:var(--base-size-24);--SectionIntroStacked-item-divider-overflow-end:var(--base-size-24);position:relative}@media screen and (width>=63.25rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi{padding-inline:var(--base-size-64);padding-block:var(--base-size-64);--SectionIntroStacked-item-divider-overflow-start:0px;--SectionIntroStacked-item-divider-overflow-end:var(--base-size-64)}}@media screen and (width>=80rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading--muted___MNSqH,.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__item-text--muted___PAxL5{color:var(--brand-color-text-muted)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading--muted___MNSqH em,.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading--muted___MNSqH b,.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__item-text___sVBGJ em,.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__item-text___sVBGJ b{color:var(--brand-color-text-default);font-style:normal;font-weight:var(--base-text-weight-normal)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--full-width___wxr_6 .Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading___zOCel{max-width:none}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-description____vGqZ{max-width:50ch;margin-block-start:var(--base-size-16)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-link___Vna3J{margin-block-start:var(--base-size-16)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-items___rRGdi{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}@media screen and (width<=63.24rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading___zOCel{font-size:var(--brand-text-size-600)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-items___rRGdi{overflow:hidden}}@media screen and (width>=63.25rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-items___rRGdi{top:var(--base-size-2);position:relative}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-items___rRGdi{border-inline-start:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);margin-block:calc(-1 * var(--base-size-64));padding-block:calc(var(--base-size-64) - var(--base-size-32));position:static;top:auto}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-content___Sh_hs{padding-inline-end:var(--base-size-80)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws{padding-inline-start:var(--base-size-64)}}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws{border-block-end:none;position:relative}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws:first-child{padding-block-start:var(--base-size-40)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws:last-child{padding-block-end:var(--base-size-40)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi .Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws:not(:last-child):after{content:"";bottom:0;left:calc(-1 * var(--SectionIntroStacked-item-divider-overflow-start));right:calc(-1 * var(--SectionIntroStacked-item-divider-overflow-end));border-bottom:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);position:absolute}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws{padding-block:var(--base-size-40);border-block-end:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws:last-child{border-block-end:none;padding-block-end:0}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws:first-child{padding-block-start:0}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item--with-icon___XYMFo{align-items:flex-start;gap:var(--base-size-24);flex-direction:column;display:flex}@media screen and (width>=48rem){.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item--with-icon___XYMFo{gap:var(--base-size-48);flex-direction:row}}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__content___kUlfY{gap:var(--base-size-12);flex-direction:column;flex:1;min-width:0;display:flex}.Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__icon___PkmCx{border-radius:var(--base-size-12);flex-shrink:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './SectionIntroStacked.module-
|
|
1
|
+
import './SectionIntroStacked.module-w4PEL6ek.css';var e = {
|
|
2
2
|
SectionIntroStacked: "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked___UM_8Y",
|
|
3
3
|
"SectionIntroStacked--variant-gridline": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked--variant-gridline___TUqhi",
|
|
4
4
|
"SectionIntroStacked-heading--muted": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-heading--muted___MNSqH",
|
|
@@ -9,6 +9,7 @@ import './SectionIntroStacked.module-C3cmwHDY.css';var e = {
|
|
|
9
9
|
"SectionIntroStacked-description": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-description____vGqZ",
|
|
10
10
|
"SectionIntroStacked-link": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-link___Vna3J",
|
|
11
11
|
"SectionIntroStacked-items": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-items___rRGdi",
|
|
12
|
+
"SectionIntroStacked-content": "Primer_Brand__SectionIntroStacked-module__SectionIntroStacked-content___Sh_hs",
|
|
12
13
|
"SectionIntroStackedItem-item": "Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item___hzIws",
|
|
13
14
|
"SectionIntroStackedItem-item--with-icon": "Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem-item--with-icon___XYMFo",
|
|
14
15
|
SectionIntroStackedItem__content: "Primer_Brand__SectionIntroStacked-module__SectionIntroStackedItem__content___kUlfY",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionIntroStacked.module.js","names":[],"sources":["../../src/SectionIntroStacked/SectionIntroStacked.module.css"],"sourcesContent":[".SectionIntroStacked {\n --brand-Grid-spacing-row: var(--base-size-
|
|
1
|
+
{"version":3,"file":"SectionIntroStacked.module.js","names":[],"sources":["../../src/SectionIntroStacked/SectionIntroStacked.module.css"],"sourcesContent":[".SectionIntroStacked {\n --brand-Grid-spacing-row: var(--base-size-64);\n}\n\n@media screen and (min-width: 48rem) and (max-width: 63.24rem) {\n .SectionIntroStacked {\n max-width: 618px;\n margin-inline: auto;\n }\n\n .SectionIntroStacked.SectionIntroStacked--variant-gridline {\n padding-inline: var(--base-size-32);\n padding-block: calc(var(--base-size-64) - var(--base-size-4));\n\n --SectionIntroStacked-item-divider-overflow-start: var(--base-size-32);\n --SectionIntroStacked-item-divider-overflow-end: var(--base-size-32);\n }\n}\n\n.SectionIntroStacked--variant-gridline {\n position: relative;\n padding-inline: var(--base-size-24);\n padding-block: var(--base-size-32);\n\n --SectionIntroStacked-item-divider-overflow-start: var(--base-size-24);\n --SectionIntroStacked-item-divider-overflow-end: var(--base-size-24);\n}\n\n@media screen and (min-width: 63.25rem) {\n .SectionIntroStacked--variant-gridline {\n padding-inline: var(--base-size-64);\n padding-block: var(--base-size-64);\n /* At large viewports, left overflow is 0 (vertical divider bounds the start) */\n --SectionIntroStacked-item-divider-overflow-start: 0px;\n --SectionIntroStacked-item-divider-overflow-end: var(--base-size-64);\n }\n}\n\n@media screen and (min-width: 80rem) {\n .SectionIntroStacked--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.SectionIntroStacked-heading--muted,\n.SectionIntroStackedItem__item-text--muted {\n color: var(--brand-color-text-muted);\n}\n\n.SectionIntroStacked-heading--muted em,\n.SectionIntroStacked-heading--muted b,\n.SectionIntroStackedItem__item-text em,\n.SectionIntroStackedItem__item-text b {\n color: var(--brand-color-text-default);\n font-style: normal;\n font-weight: var(--base-text-weight-normal);\n}\n\n.SectionIntroStacked--full-width .SectionIntroStacked-heading {\n max-width: none;\n}\n\n.SectionIntroStacked-description {\n margin-block-start: var(--base-size-16);\n max-width: 50ch;\n}\n\n.SectionIntroStacked-link {\n margin-block-start: var(--base-size-16);\n}\n\n.SectionIntroStacked-items {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n}\n\n@media screen and (max-width: 63.24rem) {\n .SectionIntroStacked-heading {\n font-size: var(--brand-text-size-600);\n }\n .SectionIntroStacked-items {\n overflow: hidden;\n }\n}\n\n@media screen and (min-width: 63.25rem) {\n .SectionIntroStacked-items {\n position: relative;\n top: var(--base-size-2);\n }\n\n .SectionIntroStacked--variant-gridline .SectionIntroStacked-items {\n border-inline-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n margin-block: calc(-1 * var(--base-size-64));\n padding-block: calc(var(--base-size-64) - var(--base-size-32));\n position: static;\n top: auto;\n }\n\n .SectionIntroStacked-content {\n padding-inline-end: var(--base-size-80);\n }\n\n .SectionIntroStacked--variant-gridline .SectionIntroStackedItem-item {\n /* Inset item content from the vertical gridline */\n padding-inline-start: var(--base-size-64);\n }\n}\n\n.SectionIntroStacked--variant-gridline .SectionIntroStackedItem-item {\n border-block-end: none;\n position: relative;\n}\n\n/* Restore equal padding on first/last items in gridline variant */\n.SectionIntroStacked--variant-gridline .SectionIntroStackedItem-item:first-child {\n padding-block-start: var(--base-size-40);\n}\n\n.SectionIntroStacked--variant-gridline .SectionIntroStackedItem-item:last-child {\n padding-block-end: var(--base-size-40);\n}\n\n.SectionIntroStacked--variant-gridline .SectionIntroStackedItem-item:not(:last-child)::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: calc(-1 * var(--SectionIntroStacked-item-divider-overflow-start));\n right: calc(-1 * var(--SectionIntroStacked-item-divider-overflow-end));\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n.SectionIntroStackedItem-item {\n padding-block: var(--base-size-40);\n border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n.SectionIntroStackedItem-item:last-child {\n border-block-end: none;\n padding-block-end: 0;\n}\n\n.SectionIntroStackedItem-item:first-child {\n padding-block-start: 0;\n}\n\n.SectionIntroStackedItem-item--with-icon {\n display: flex;\n align-items: flex-start;\n gap: var(--base-size-24);\n flex-direction: column;\n}\n\n@media screen and (min-width: 48rem) {\n .SectionIntroStackedItem-item--with-icon {\n gap: var(--base-size-48);\n flex-direction: row;\n }\n}\n\n.SectionIntroStackedItem__content {\n display: flex;\n flex-direction: column;\n gap: var(--base-size-12);\n flex: 1;\n min-width: 0;\n}\n\n.SectionIntroStackedItem__icon {\n flex-shrink: 0;\n border-radius: var(--base-size-12);\n}\n"],"mappings":""}
|
|
@@ -11,10 +11,16 @@ export type PaginationProps = {
|
|
|
11
11
|
marginPageCount?: number;
|
|
12
12
|
showPages?: boolean;
|
|
13
13
|
surroundingPageCount?: number;
|
|
14
|
+
labels?: {
|
|
15
|
+
prev?: string;
|
|
16
|
+
next?: string;
|
|
17
|
+
prevAriaLabel?: string;
|
|
18
|
+
nextAriaLabel?: string;
|
|
19
|
+
};
|
|
14
20
|
'data-testid'?: string;
|
|
15
21
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
16
22
|
/**
|
|
17
23
|
* Use Pagination to display a sequence of links that allow navigation to discrete, related pages.
|
|
18
24
|
* @see https://primer.style/brand/components/Pagination
|
|
19
25
|
*/
|
|
20
|
-
export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
|
|
26
|
+
export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, labels, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
|