@primer/react-brand 0.72.0-rc.f273f08b → 0.72.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/ButtonGroup/react.md +29 -8
- package/docs/components/Hero/react.md +82 -18
- package/docs/components/River/react.md +33 -33
- package/docs/components/RiverBreakoutTabs/index.md +3 -4
- package/docs/components/index.md +1 -1
- package/docs/getting-started/index.md +9 -3
- package/docs/index.md +3 -3
- package/esm/ActionMenu/ActionMenu.d.ts +1 -1
- package/esm/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/esm/ActionMenu/ActionMenu.js +60 -60
- package/esm/ActionMenu/ActionMenu.js.map +1 -1
- package/esm/AnchorNav/AnchorNav.js +20 -20
- package/esm/Avatar/Avatar.module-DUQdD7On.css +1 -0
- package/esm/Avatar/Avatar.module.js +1 -1
- package/esm/Avatar/Avatar.module.js.map +1 -1
- package/esm/BreakoutBanner/{BreakoutBanner.module-DGBSJFNJ.css → BreakoutBanner.module-gfmzcUSU.css} +1 -1
- package/esm/BreakoutBanner/BreakoutBanner.module.js +1 -1
- package/esm/BreakoutBanner/BreakoutBanner.module.js.map +1 -1
- package/esm/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/esm/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/esm/ButtonGroup/ButtonGroup.js +24 -16
- package/esm/ButtonGroup/ButtonGroup.js.map +1 -1
- package/esm/CTABanner/CTABanner.js +6 -6
- package/esm/CTABanner/CTABanner.module-CDLOww8c.css +1 -0
- package/esm/CTABanner/CTABanner.module.js +1 -1
- package/esm/CTABanner/CTABanner.module.js.map +1 -1
- package/esm/Card/Card.js +5 -5
- package/esm/EyebrowBanner/EyebrowBanner.module-DYeTmaU9.css +1 -0
- package/esm/EyebrowBanner/EyebrowBanner.module.js +1 -1
- package/esm/EyebrowBanner/EyebrowBanner.module.js.map +1 -1
- package/esm/Hero/Hero.d.ts +17 -4
- package/esm/Hero/Hero.d.ts.map +1 -1
- package/esm/Hero/Hero.js +103 -98
- package/esm/Hero/Hero.js.map +1 -1
- package/esm/Hero/Hero.module-BfrAFYlo.css +1 -0
- package/esm/Hero/Hero.module.js +8 -5
- package/esm/Hero/Hero.module.js.map +1 -1
- package/esm/Hero/HeroContext.d.ts +7 -5
- package/esm/Hero/HeroContext.d.ts.map +1 -1
- package/esm/Hero/HeroContext.js +3 -9
- package/esm/Hero/HeroContext.js.map +1 -1
- package/esm/Hero/sub-components/HeroButtonGroup.d.ts +5 -0
- package/esm/Hero/sub-components/HeroButtonGroup.d.ts.map +1 -0
- package/esm/Hero/sub-components/HeroButtonGroup.js +28 -0
- package/esm/Hero/sub-components/HeroButtonGroup.js.map +1 -0
- package/esm/Hero/sub-components/HeroImage.d.ts +7 -4
- package/esm/Hero/sub-components/HeroImage.d.ts.map +1 -1
- package/esm/Hero/sub-components/HeroImage.js +6 -6
- package/esm/Hero/sub-components/HeroImage.js.map +1 -1
- package/esm/Hero/sub-components/HeroVideo.d.ts +16 -4
- package/esm/Hero/sub-components/HeroVideo.d.ts.map +1 -1
- package/esm/Hero/sub-components/HeroVideo.js +15 -15
- package/esm/Hero/sub-components/HeroVideo.js.map +1 -1
- package/esm/Hero/sub-components/index.d.ts +2 -0
- package/esm/Hero/sub-components/index.d.ts.map +1 -1
- package/esm/Link/Link.js +5 -5
- package/esm/LogoSuite/LogoSuite.js +11 -11
- package/esm/LogoSuite/LogoSuite.module-BCbX-lfy.css +1 -0
- package/esm/LogoSuite/LogoSuite.module.js +1 -1
- package/esm/LogoSuite/LogoSuite.module.js.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.js +6 -6
- package/esm/MinimalFooter/{MinimalFooter.module-DPMYigso.css → MinimalFooter.module-Cl2g38SO.css} +1 -1
- package/esm/MinimalFooter/MinimalFooter.module.js +1 -1
- package/esm/MinimalFooter/MinimalFooter.module.js.map +1 -1
- package/esm/PricingOptions/PricingOptions.js +18 -18
- package/esm/PricingOptions/{PricingOptions.module-Cm3Oq9u6.css → PricingOptions.module-CgPKaZAm.css} +1 -1
- package/esm/PricingOptions/PricingOptions.module.js +1 -1
- package/esm/PricingOptions/PricingOptions.module.js.map +1 -1
- package/esm/SectionIntro/SectionIntro.module-BbIW9pPO.css +1 -0
- package/esm/SectionIntro/SectionIntro.module.js +1 -1
- package/esm/SectionIntro/SectionIntro.module.js.map +1 -1
- package/esm/Statistic/Statistic.d.ts.map +1 -1
- package/esm/Statistic/Statistic.js +1 -1
- package/esm/Statistic/Statistic.js.map +1 -1
- package/esm/Statistic/{Statistic.module-Dqb6n1GX.css → Statistic.module-DvdiSbXk.css} +1 -1
- package/esm/Statistic/Statistic.module.js +2 -1
- package/esm/Statistic/Statistic.module.js.map +1 -1
- package/esm/SubNav/SubNav.js +30 -30
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js +21 -21
- package/esm/SubdomainNavBar/SubdomainNavBar.js +83 -83
- package/esm/Testimonial/Testimonial.js +1 -1
- package/esm/Testimonial/Testimonial.js.map +1 -1
- package/esm/Testimonial/Testimonial.module-BEBpUSD7.css +1 -0
- package/esm/Testimonial/Testimonial.module.js +2 -1
- package/esm/Testimonial/Testimonial.module.js.map +1 -1
- package/esm/VideoPlayer/VideoPlayer.js +4 -4
- package/esm/css/reset-CSgu34_f.css +1 -0
- package/esm/css/stylesheets.js +1 -1
- package/esm/hooks/useFocusTrap.d.ts +8 -8
- package/esm/hooks/useFocusTrap.d.ts.map +1 -1
- package/esm/hooks/useFocusTrap.js +16 -16
- package/esm/hooks/useFocusTrap.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +68 -67
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/colors/global-with-modes-Bdet_nBw.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.css +1 -0
- package/esm/river/River/River.d.ts +16 -8
- package/esm/river/River/River.d.ts.map +1 -1
- package/esm/river/River/River.js +33 -14
- package/esm/river/River/River.js.map +1 -1
- package/esm/river/River/index.d.ts +2 -2
- package/esm/river/River/index.d.ts.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.js +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-BTU_metB.css +1 -0
- package/esm/river/RiverAccordion/RiverAccordion.module.js +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module.js.map +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.d.ts +2 -1
- package/esm/river/RiverBreakout/RiverBreakout.d.ts.map +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.js +8 -4
- package/esm/river/RiverBreakout/RiverBreakout.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +3 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js +2 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-CB2SZhbE.css +1 -0
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.module-kez68wMZ.css +1 -0
- package/esm/river/RiverStoryScroll/RiverStoryScroll.module.js +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.module.js.map +1 -1
- package/esm/river/river-shared.module-5fefR7ip.css +1 -0
- package/esm/river/river-shared.module.js +10 -2
- package/esm/river/river-shared.module.js.map +1 -1
- package/lib/ActionMenu/ActionMenu.d.ts +1 -1
- package/lib/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/lib/Hero/Hero.d.ts +17 -4
- package/lib/Hero/HeroContext.d.ts +7 -5
- package/lib/Hero/sub-components/HeroButtonGroup.d.ts +4 -0
- package/lib/Hero/sub-components/HeroImage.d.ts +7 -4
- package/lib/Hero/sub-components/HeroVideo.d.ts +16 -4
- package/lib/Hero/sub-components/index.d.ts +2 -0
- package/lib/css/main.css +5748 -5537
- 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 +4 -4
- package/lib/design-tokens/css/tokens/functional/colors/global.css +3 -3
- 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 +8 -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 +4 -4
- 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 +4 -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 +3 -3
- 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 +2 -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 +2 -2
- 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 +3 -3
- 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 +2 -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 +3 -3
- 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 +4 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +4 -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/hooks/useFocusTrap.d.ts +8 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/river/River/River.d.ts +16 -8
- package/lib/river/River/index.d.ts +2 -2
- package/lib/river/RiverBreakout/RiverBreakout.d.ts +2 -1
- package/lib/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +3 -2
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/esm/Avatar/Avatar.module-DzfWmLu4.css +0 -1
- package/esm/CTABanner/CTABanner.module-DZUT186Y.css +0 -1
- package/esm/EyebrowBanner/EyebrowBanner.module-C8hfGfYx.css +0 -1
- package/esm/Hero/Hero.module-DjsgFkIQ.css +0 -1
- package/esm/LogoSuite/LogoSuite.module-69Mthqju.css +0 -1
- package/esm/SectionIntro/SectionIntro.module-CiRymbla.css +0 -1
- package/esm/Testimonial/Testimonial.module-DRCosU_J.css +0 -1
- package/esm/css/reset-PKNIUbst.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/colors/global-with-modes-tpdcmiok.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-QteO10lt.css +0 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-nlZZH3O7.css +0 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-CH8jehnx.css +0 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.module-D8dFaLHq.css +0 -1
- package/esm/river/river-shared.module-D0AV93uz.css +0 -1
|
@@ -71,9 +71,11 @@ export type RiverContentProps = BaseProps<HTMLDivElement> & {
|
|
|
71
71
|
children: React.ReactElement<TextProps> | React.ReactElement<HeadingProps | TextProps | LinkProps>[];
|
|
72
72
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
73
73
|
export declare const RiverContent: React.ForwardRefExoticComponent<Omit<RiverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
-
export declare const
|
|
75
|
-
export type
|
|
76
|
-
export
|
|
74
|
+
export declare const RiverVisualPositionOptions: readonly ["default", "center", "block-end", "block-end-inline-start", "block-end-inline-end"];
|
|
75
|
+
export type RiverVisualPosition = (typeof RiverVisualPositionOptions)[number];
|
|
76
|
+
export declare const RiverVisualPaddingOptions: readonly ["default", "none", "all"];
|
|
77
|
+
export type RiverVisualPadding = (typeof RiverVisualPaddingOptions)[number];
|
|
78
|
+
export type RiverVisualBaseProps = BaseProps<HTMLDivElement> & React.HtmlHTMLAttributes<HTMLDivElement> & PropsWithChildren<{
|
|
77
79
|
/**
|
|
78
80
|
* Applies automatic size constraints to child images and video.
|
|
79
81
|
* This can be disabled by setting this prop to `false`.
|
|
@@ -89,17 +91,23 @@ export type RiverVisualProps = BaseProps<HTMLDivElement> & React.HtmlHTMLAttribu
|
|
|
89
91
|
* Can optionally be disabled.
|
|
90
92
|
*/
|
|
91
93
|
rounded?: boolean;
|
|
94
|
+
}>;
|
|
95
|
+
export type RiverVisualProps = RiverVisualBaseProps & {
|
|
92
96
|
/**
|
|
93
|
-
*
|
|
97
|
+
* Positions media within the visual region in the gridline variant.
|
|
94
98
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
position?: RiverVisualPosition;
|
|
100
|
+
/**
|
|
101
|
+
* Controls media padding within the visual region in the gridline variant.
|
|
102
|
+
*/
|
|
103
|
+
padding?: RiverVisualPadding;
|
|
104
|
+
};
|
|
105
|
+
export declare const RiverVisualBase: React.ForwardRefExoticComponent<Omit<RiverVisualBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
98
106
|
/**
|
|
99
107
|
* Alternating text and image pairs.
|
|
100
108
|
*/
|
|
101
109
|
export declare const River: React.ForwardRefExoticComponent<Omit<RiverProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
102
|
-
Visual: React.ForwardRefExoticComponent<Omit<
|
|
110
|
+
Visual: React.ForwardRefExoticComponent<Omit<RiverVisualProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
103
111
|
Content: React.ForwardRefExoticComponent<Omit<RiverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
104
112
|
};
|
|
105
113
|
//# sourceMappingURL=River.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"River.d.ts","sourceRoot":"","sources":["../../../src/river/River/River.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,iBAAiB,EAAoB,MAAM,OAAO,CAAA;AAE7E,OAAO,EAAU,KAAK,YAAY,EAAC,MAAM,eAAe,CAAA;AACxD,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,YAAY,CAAA;AAI/C,OAAO,KAAK,EAAC,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AAE,OAAO,CAAA;IAClC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAC1C;;;;;OAKG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC,EAAE,CAAA;CACrG,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA;AAExC,eAAO,MAAM,YAAY,uGA8FxB,CAAA;AAED,eAAO,MAAM,0BAA0B,+FAM7B,CAAA;AACV,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7E,eAAO,MAAM,yBAAyB,qCAAsC,CAAA;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3E,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,cAAc,CAAC,GAC1D,KAAK,CAAC,kBAAkB,CAAC,cAAc,CAAC,GACxC,iBAAiB,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC,CAAA;AAEJ,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,eAAe,0GAqB3B,CAAA;AAgBD;;GAEG;AACH,eAAO,MAAM,KAAK;;;CAAuD,CAAA"}
|
package/esm/river/River/River.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useAnimation as t } from "../../animation/useAnimation.js";
|
|
|
3
3
|
import { Text as n } from "../../Text/Text.js";
|
|
4
4
|
import { EyebrowText as r } from "../../EyebrowText/EyebrowText.js";
|
|
5
5
|
import { Heading as i } from "../../Heading/Heading.js";
|
|
6
|
-
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-
|
|
6
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.css';import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/base-Ue-p74RC.css';/* empty css */
|
|
7
7
|
import a from "../../component-helpers/shared.module.js";
|
|
8
8
|
import { Link as o } from "../../Link/Link.js";
|
|
9
9
|
import { Label as s } from "../../Label/Label.js";
|
|
@@ -13,19 +13,21 @@ import l, { forwardRef as u, useMemo as d } from "react";
|
|
|
13
13
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
14
|
//#region src/river/River/River.tsx
|
|
15
15
|
var m = "50:50", h = "start", g = "default", _ = u(({ animate: n, imageTextRatio: r = m, align: i = h, variant: o = g, className: s, children: u, style: d, ...f }, _) => {
|
|
16
|
-
let { classes:
|
|
16
|
+
let { classes: y, styles: b } = t(n), { Visual: x, Content: C } = l.Children.toArray(u).reduce((e, t) => (l.isValidElement(t) && typeof t.type != "string" && (t.type === S && (e.Visual = t), t.type === v && (e.Content = t)), e), {
|
|
17
17
|
Visual: null,
|
|
18
18
|
Content: null
|
|
19
|
-
});
|
|
19
|
+
}), w = x?.props.position ?? "default", T = x?.props.padding ?? "default";
|
|
20
|
+
(w !== "default" || T !== "default") && o !== "gridline" && (process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test") && console.warn(`River: River.Visual position and padding are only supported when River uses variant="gridline"; ignoring position="${w}" and padding="${T}".`);
|
|
21
|
+
let E = x ? l.cloneElement(x, { className: e(x.props.className, o === "gridline" && c["River__visual--has-background"]) }) : null;
|
|
20
22
|
return /* @__PURE__ */ p("section", {
|
|
21
23
|
ref: _,
|
|
22
|
-
className: e(c.River, c[`River--${r.replace(":", "-")}`], c[`River--align-${i}`], c[`River--variant-${o}`], o === "gridline" && a.gridline,
|
|
24
|
+
className: e(c.River, c[`River--${r.replace(":", "-")}`], c[`River--align-${i}`], c[`River--variant-${o}`], o === "gridline" && a.gridline, y, s),
|
|
23
25
|
style: {
|
|
24
|
-
...
|
|
26
|
+
...b,
|
|
25
27
|
...d
|
|
26
28
|
},
|
|
27
29
|
...f,
|
|
28
|
-
children: [C,
|
|
30
|
+
children: [C, E]
|
|
29
31
|
});
|
|
30
32
|
}), v = u(({ align: a = "center", animate: u, children: m, className: h, leadingComponent: g, trailingComponent: _, trailingComponentDivider: v = !1, style: y, ...b }, x) => {
|
|
31
33
|
let { classes: S, styles: C } = t(u), w = d(() => l.Children.toArray(m), [m]), T = w.find((e) => l.isValidElement(e) && e.type === i), E = w.find((e) => l.isValidElement(e) && e.type === n), D = w.find((e) => l.isValidElement(e) && e.type === o), O = w.find((e) => l.isValidElement(e) && e.type === s), k = w.find((e) => l.isValidElement(e) && e.type === r);
|
|
@@ -46,7 +48,10 @@ var m = "50:50", h = "start", g = "default", _ = u(({ animate: n, imageTextRatio
|
|
|
46
48
|
className: c.River__label,
|
|
47
49
|
children: k
|
|
48
50
|
}),
|
|
49
|
-
!O && !k && g && /* @__PURE__ */ f("div", {
|
|
51
|
+
!O && !k && g && /* @__PURE__ */ f("div", {
|
|
52
|
+
className: c.River__leadingComponent,
|
|
53
|
+
children: /* @__PURE__ */ f(g, {})
|
|
54
|
+
}),
|
|
50
55
|
l.isValidElement(T) && /* @__PURE__ */ f("div", {
|
|
51
56
|
className: c.River__heading,
|
|
52
57
|
children: l.cloneElement(T, {
|
|
@@ -77,16 +82,30 @@ var m = "50:50", h = "start", g = "default", _ = u(({ animate: n, imageTextRatio
|
|
|
77
82
|
})
|
|
78
83
|
]
|
|
79
84
|
});
|
|
80
|
-
}), y =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
}), y = [
|
|
86
|
+
"default",
|
|
87
|
+
"center",
|
|
88
|
+
"block-end",
|
|
89
|
+
"block-end-inline-start",
|
|
90
|
+
"block-end-inline-end"
|
|
91
|
+
], b = [
|
|
92
|
+
"default",
|
|
93
|
+
"none",
|
|
94
|
+
"all"
|
|
95
|
+
], x = u(({ fillMedia: t = !0, children: n, className: r, hasShadow: i = !1, rounded: a = !0, ...o }, s) => /* @__PURE__ */ f("div", {
|
|
96
|
+
ref: s,
|
|
97
|
+
className: e(c.River__visual, i && c["River__visual--has-shadow"], t && c["River__visual--fill-media"], a && c["River__visual--rounded"], r),
|
|
98
|
+
...o,
|
|
84
99
|
children: n
|
|
85
|
-
})),
|
|
86
|
-
|
|
100
|
+
})), S = u(({ className: t, position: n = "default", padding: r = "default", ...i }, a) => /* @__PURE__ */ f(x, {
|
|
101
|
+
ref: a,
|
|
102
|
+
className: e(n !== "default" && c[`River__visual--position-${n}`], r !== "default" && c[`River__visual--padding-${r}`], t),
|
|
103
|
+
...i
|
|
104
|
+
})), C = Object.assign(_, {
|
|
105
|
+
Visual: S,
|
|
87
106
|
Content: v
|
|
88
107
|
});
|
|
89
108
|
//#endregion
|
|
90
|
-
export {
|
|
109
|
+
export { C as River, v as RiverContent, x as RiverVisualBase, b as RiverVisualPaddingOptions, y as RiverVisualPositionOptions, h as defaultRiverAlign, m as defaultRiverImageTextRatio, g as defaultRiverVariant };
|
|
91
110
|
|
|
92
111
|
//# sourceMappingURL=River.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"River.js","names":[],"sources":["../../../src/river/River/River.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, useMemo, type Ref} from 'react'\nimport {clsx} from 'clsx'\nimport {Heading, type HeadingProps} from '../../Heading'\nimport {Text, type TextProps} from '../../Text'\nimport {Link, type LinkProps} from '../../Link'\nimport {Label, type LabelProps} from '../../Label'\nimport {EyebrowText} from '../../EyebrowText'\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/river/base.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from '../river-shared.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\nexport const RiverVariants = ['default', 'gridline'] as const\nexport const BorderedGrid = 'gridline' as const\nexport const GridLine = 'gridline' as const\nexport type RiverVariant = (typeof RiverVariants)[number]\n\nexport const RiverContentAlignValues = ['center', 'block-end'] as const\nexport type RiverContentAlign = (typeof RiverContentAlignValues)[number]\n\nexport type RiverProps = {\n /**\n * Only specific children are valid.\n * These include: `River.Visual` and `River.Content`.\n * The declarative order of the children will be ignored in the rendered output\n * to enforce correct HTML semantics.\n */\n children: React.ReactElement<RiverVisualProps | RiverContentProps>[]\n /**\n * Apply an alternative image to text column ratio. The default is `50:50`.\n */\n imageTextRatio?: '60:40' | '50:50'\n /**\n * Adjust the order of the `Content` column. The default is `start`.\n */\n align?: 'start' | 'end' | 'center'\n /**\n * Apply a visual variant. The default is `default`.\n * `gridline` applies lateral spacing for use in bordered grid layouts.\n */\n variant?: RiverVariant\n} & BaseProps<HTMLElement> &\n React.HTMLAttributes<HTMLElement>\n\nexport const defaultRiverImageTextRatio = '50:50'\nexport const defaultRiverAlign = 'start'\nexport const defaultRiverVariant: RiverVariant = 'default'\n\ntype ValidRootChildren = {\n Visual: React.ReactElement<RiverVisualProps> | null\n Content: React.ReactElement<RiverContentProps> | null\n}\n\nconst Root = forwardRef(\n (\n {\n animate,\n imageTextRatio = defaultRiverImageTextRatio,\n align = defaultRiverAlign,\n variant = defaultRiverVariant,\n className,\n children,\n style,\n ...rest\n }: RiverProps,\n ref: Ref<HTMLElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const {Visual: VisualChild, Content: ContentChild} = React.Children.toArray(children).reduce<ValidRootChildren>(\n (acc, child) => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (child.type === Visual) {\n acc.Visual = child as React.ReactElement<RiverVisualProps>\n }\n if (child.type === RiverContent) {\n acc.Content = child as React.ReactElement<RiverContentProps>\n }\n }\n return acc\n },\n {Visual: null, Content: null},\n )\n\n return (\n <section\n ref={ref}\n className={clsx(\n styles.River,\n styles[`River--${imageTextRatio.replace(':', '-')}`],\n styles[`River--align-${align}`],\n styles[`River--variant-${variant}`],\n variant === 'gridline' && gridlineStyles.gridline,\n animationClasses,\n className,\n )}\n style={{...animationInlineStyles, ...style}}\n {...rest}\n >\n {ContentChild}\n {VisualChild}\n </section>\n )\n },\n)\n\nexport type RiverContentProps = BaseProps<HTMLDivElement> & {\n /**\n * Aligns the content vertically within its container.\n */\n align?: RiverContentAlign\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 trailingComponent?: React.FunctionComponent\n /**\n * When `true`, a divider will be rendered between the standard river and optional trailing content.\n */\n trailingComponentDivider?: boolean\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.FunctionComponent\n /**\n * Only valid children are allowed.\n * These include: `Heading`, `Text` and `Link`.\n * The declarative order of the children will be ignored in the rendered output\n * to enforce correct HTML semantics.\n */\n children: React.ReactElement<TextProps> | React.ReactElement<HeadingProps | TextProps | LinkProps>[]\n} & React.HTMLAttributes<HTMLDivElement>\n\nexport const RiverContent = forwardRef(\n (\n {\n align = 'center',\n animate,\n children,\n className,\n leadingComponent: LeadingComponent,\n trailingComponent: TrailingComponent,\n trailingComponentDivider = false,\n style,\n ...rest\n }: RiverContentProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const Children = useMemo(() => React.Children.toArray(children), [children])\n\n const HeadingChild = Children.find(child => React.isValidElement(child) && child.type === Heading)\n\n const TextChild = Children.find(child => React.isValidElement(child) && child.type === Text)\n\n const LinkChild = Children.find(child => React.isValidElement(child) && child.type === Link)\n\n const LabelChild = Children.find(child => React.isValidElement(child) && child.type === Label)\n\n const EyebrowTextChild = Children.find(child => React.isValidElement(child) && child.type === EyebrowText)\n\n return (\n <div\n ref={ref}\n className={clsx(animationClasses, styles.River__content, styles[`River__content--align-${align}`], className)}\n style={{...animationInlineStyles, ...style}}\n {...rest}\n >\n {React.isValidElement(LabelChild) && !LeadingComponent && (\n <div className={styles.River__label}>\n {React.cloneElement(LabelChild as React.ReactElement<LabelProps>, {})}\n </div>\n )}\n\n {!LabelChild && React.isValidElement(EyebrowTextChild) && !LeadingComponent && (\n <div className={styles.River__label}>{EyebrowTextChild}</div>\n )}\n\n {!LabelChild && !EyebrowTextChild && LeadingComponent && (\n <div>\n <LeadingComponent />\n </div>\n )}\n\n {React.isValidElement<HeadingProps>(HeadingChild) && (\n <div className={styles.River__heading}>\n {React.cloneElement(HeadingChild as React.ReactElement<HeadingProps>, {\n // as uses h3 default, but can be overridden\n as: HeadingChild.props.as || 'h3',\n size: HeadingChild.props.size || '5',\n weight: HeadingChild.props.weight,\n className: clsx(HeadingChild.props.className, styles['River__heading-inner']),\n })}\n </div>\n )}\n\n {React.isValidElement<TextProps>(TextChild) && (\n <div className={styles['River__body-text']}>\n {React.cloneElement(TextChild as React.ReactElement<TextProps>, {\n variant: 'muted',\n as: 'p',\n className: clsx(styles.River__text, TextChild.props.className),\n })}\n </div>\n )}\n {React.isValidElement<LinkProps>(LinkChild) && (\n <div className={styles['River__call-to-action']}>\n {React.cloneElement(LinkChild as React.ReactElement<LinkProps>, {\n size: 'medium',\n variant: LinkChild.props.variant || 'accent',\n })}\n </div>\n )}\n {TrailingComponent && (\n <div\n className={clsx(\n styles.River__trailingComponent,\n trailingComponentDivider && styles['River__trailingComponent--divider'],\n )}\n >\n <TrailingComponent />\n </div>\n )}\n </div>\n )\n },\n)\n\nexport const RiverVisualBackgroundColors = ['default', 'subtle'] as const\nexport type RiverVisualBackgroundColor = (typeof RiverVisualBackgroundColors)[number]\n\nexport type RiverVisualProps = BaseProps<HTMLDivElement> &\n React.HtmlHTMLAttributes<HTMLDivElement> &\n PropsWithChildren<{\n /**\n * Applies automatic size constraints to child images and video.\n * This can be disabled by setting this prop to `false`.\n */\n fillMedia?: boolean\n /**\n * `img` and `video` elements will apply a shadow by default.\n * This can be disabled by setting this prop to `false`.\n */\n hasShadow?: boolean\n /**\n * Enables rounded corners.\n * Can optionally be disabled.\n */\n rounded?: boolean\n /**\n * Applies a background color with padding around the media.\n */\n imageBackgroundColor?: RiverVisualBackgroundColor\n }>\n\nexport const Visual = forwardRef(\n (\n {\n fillMedia = true,\n children,\n className,\n hasShadow = false,\n rounded = true,\n imageBackgroundColor,\n ...rest\n }: PropsWithChildren<RiverVisualProps>,\n ref: Ref<HTMLDivElement>,\n ) => {\n return (\n <div\n ref={ref}\n className={clsx(\n styles.River__visual,\n hasShadow && styles['River__visual--has-shadow'],\n fillMedia && styles['River__visual--fill-media'],\n rounded && styles['River__visual--rounded'],\n imageBackgroundColor === 'subtle' && styles['River__visual--has-background'],\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n },\n)\n\n/**\n * Alternating text and image pairs.\n */\nexport const River = Object.assign(Root, {Visual, Content: RiverContent})\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAa,IAA6B,SAC7B,IAAoB,SACpB,IAAoC,WAO3C,IAAO,GAET,EACE,YACA,oBAAiB,GACjB,WAAQ,GACR,aAAU,GACV,cACA,aACA,UACA,GAAG,KAEL,MACG;CACH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAElF,EAAC,QAAQ,GAAa,SAAS,MAAgB,EAAM,SAAS,QAAQ,EAAS,CAAC,QACnF,GAAK,OACA,EAAM,eAAe,EAAM,IAAI,OAAO,EAAM,QAAS,aACnD,EAAM,S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OAAO,GAAM;CAAC;CAAQ,SAAS;CAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"River.js","names":[],"sources":["../../../src/river/River/River.tsx"],"sourcesContent":["import React, {forwardRef, PropsWithChildren, useMemo, type Ref} from 'react'\nimport {clsx} from 'clsx'\nimport {Heading, type HeadingProps} from '../../Heading'\nimport {Text, type TextProps} from '../../Text'\nimport {Link, type LinkProps} from '../../Link'\nimport {Label, type LabelProps} from '../../Label'\nimport {EyebrowText} from '../../EyebrowText'\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/river/base.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from '../river-shared.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\nexport const RiverVariants = ['default', 'gridline'] as const\nexport const BorderedGrid = 'gridline' as const\nexport const GridLine = 'gridline' as const\nexport type RiverVariant = (typeof RiverVariants)[number]\n\nexport const RiverContentAlignValues = ['center', 'block-end'] as const\nexport type RiverContentAlign = (typeof RiverContentAlignValues)[number]\n\nexport type RiverProps = {\n /**\n * Only specific children are valid.\n * These include: `River.Visual` and `River.Content`.\n * The declarative order of the children will be ignored in the rendered output\n * to enforce correct HTML semantics.\n */\n children: React.ReactElement<RiverVisualProps | RiverContentProps>[]\n /**\n * Apply an alternative image to text column ratio. The default is `50:50`.\n */\n imageTextRatio?: '60:40' | '50:50'\n /**\n * Adjust the order of the `Content` column. The default is `start`.\n */\n align?: 'start' | 'end' | 'center'\n /**\n * Apply a visual variant. The default is `default`.\n * `gridline` applies lateral spacing for use in bordered grid layouts.\n */\n variant?: RiverVariant\n} & BaseProps<HTMLElement> &\n React.HTMLAttributes<HTMLElement>\n\nexport const defaultRiverImageTextRatio = '50:50'\nexport const defaultRiverAlign = 'start'\nexport const defaultRiverVariant: RiverVariant = 'default'\n\ntype ValidRootChildren = {\n Visual: React.ReactElement<RiverVisualProps> | null\n Content: React.ReactElement<RiverContentProps> | null\n}\n\nconst Root = forwardRef(\n (\n {\n animate,\n imageTextRatio = defaultRiverImageTextRatio,\n align = defaultRiverAlign,\n variant = defaultRiverVariant,\n className,\n children,\n style,\n ...rest\n }: RiverProps,\n ref: Ref<HTMLElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const {Visual: VisualChild, Content: ContentChild} = React.Children.toArray(children).reduce<ValidRootChildren>(\n (acc, child) => {\n if (React.isValidElement(child) && typeof child.type !== 'string') {\n if (child.type === Visual) {\n acc.Visual = child as React.ReactElement<RiverVisualProps>\n }\n if (child.type === RiverContent) {\n acc.Content = child as React.ReactElement<RiverContentProps>\n }\n }\n return acc\n },\n {Visual: null, Content: null},\n )\n\n const visualPosition = VisualChild?.props.position ?? 'default'\n const visualPadding = VisualChild?.props.padding ?? 'default'\n const hasNonDefaultPosition = visualPosition !== 'default'\n const hasNonDefaultPadding = visualPadding !== 'default'\n const hasVisualLayoutOverrides = hasNonDefaultPosition || hasNonDefaultPadding\n const supportsVisualLayoutOverrides = variant === 'gridline'\n\n if (\n hasVisualLayoutOverrides &&\n !supportsVisualLayoutOverrides &&\n (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test')\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n `River: River.Visual position and padding are only supported when River uses variant=\"gridline\"; ignoring position=\"${visualPosition}\" and padding=\"${visualPadding}\".`,\n )\n }\n\n const VisualChildWithVariantStyles = VisualChild\n ? React.cloneElement(VisualChild, {\n className: clsx(\n VisualChild.props.className,\n variant === 'gridline' && styles['River__visual--has-background'],\n ),\n })\n : null\n\n return (\n <section\n ref={ref}\n className={clsx(\n styles.River,\n styles[`River--${imageTextRatio.replace(':', '-')}`],\n styles[`River--align-${align}`],\n styles[`River--variant-${variant}`],\n variant === 'gridline' && gridlineStyles.gridline,\n animationClasses,\n className,\n )}\n style={{...animationInlineStyles, ...style}}\n {...rest}\n >\n {ContentChild}\n {VisualChildWithVariantStyles}\n </section>\n )\n },\n)\n\nexport type RiverContentProps = BaseProps<HTMLDivElement> & {\n /**\n * Aligns the content vertically within its container.\n */\n align?: RiverContentAlign\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 trailingComponent?: React.FunctionComponent\n /**\n * When `true`, a divider will be rendered between the standard river and optional trailing content.\n */\n trailingComponentDivider?: boolean\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.FunctionComponent\n /**\n * Only valid children are allowed.\n * These include: `Heading`, `Text` and `Link`.\n * The declarative order of the children will be ignored in the rendered output\n * to enforce correct HTML semantics.\n */\n children: React.ReactElement<TextProps> | React.ReactElement<HeadingProps | TextProps | LinkProps>[]\n} & React.HTMLAttributes<HTMLDivElement>\n\nexport const RiverContent = forwardRef(\n (\n {\n align = 'center',\n animate,\n children,\n className,\n leadingComponent: LeadingComponent,\n trailingComponent: TrailingComponent,\n trailingComponentDivider = false,\n style,\n ...rest\n }: RiverContentProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n const Children = useMemo(() => React.Children.toArray(children), [children])\n\n const HeadingChild = Children.find(child => React.isValidElement(child) && child.type === Heading)\n\n const TextChild = Children.find(child => React.isValidElement(child) && child.type === Text)\n\n const LinkChild = Children.find(child => React.isValidElement(child) && child.type === Link)\n\n const LabelChild = Children.find(child => React.isValidElement(child) && child.type === Label)\n\n const EyebrowTextChild = Children.find(child => React.isValidElement(child) && child.type === EyebrowText)\n\n return (\n <div\n ref={ref}\n className={clsx(animationClasses, styles.River__content, styles[`River__content--align-${align}`], className)}\n style={{...animationInlineStyles, ...style}}\n {...rest}\n >\n {React.isValidElement(LabelChild) && !LeadingComponent && (\n <div className={styles.River__label}>\n {React.cloneElement(LabelChild as React.ReactElement<LabelProps>, {})}\n </div>\n )}\n\n {!LabelChild && React.isValidElement(EyebrowTextChild) && !LeadingComponent && (\n <div className={styles.River__label}>{EyebrowTextChild}</div>\n )}\n\n {!LabelChild && !EyebrowTextChild && LeadingComponent && (\n <div className={styles.River__leadingComponent}>\n <LeadingComponent />\n </div>\n )}\n\n {React.isValidElement<HeadingProps>(HeadingChild) && (\n <div className={styles.River__heading}>\n {React.cloneElement(HeadingChild as React.ReactElement<HeadingProps>, {\n // as uses h3 default, but can be overridden\n as: HeadingChild.props.as || 'h3',\n size: HeadingChild.props.size || '5',\n weight: HeadingChild.props.weight,\n className: clsx(HeadingChild.props.className, styles['River__heading-inner']),\n })}\n </div>\n )}\n\n {React.isValidElement<TextProps>(TextChild) && (\n <div className={styles['River__body-text']}>\n {React.cloneElement(TextChild as React.ReactElement<TextProps>, {\n variant: 'muted',\n as: 'p',\n className: clsx(styles.River__text, TextChild.props.className),\n })}\n </div>\n )}\n {React.isValidElement<LinkProps>(LinkChild) && (\n <div className={styles['River__call-to-action']}>\n {React.cloneElement(LinkChild as React.ReactElement<LinkProps>, {\n size: 'medium',\n variant: LinkChild.props.variant || 'accent',\n })}\n </div>\n )}\n {TrailingComponent && (\n <div\n className={clsx(\n styles.River__trailingComponent,\n trailingComponentDivider && styles['River__trailingComponent--divider'],\n )}\n >\n <TrailingComponent />\n </div>\n )}\n </div>\n )\n },\n)\n\nexport const RiverVisualPositionOptions = [\n 'default',\n 'center',\n 'block-end',\n 'block-end-inline-start',\n 'block-end-inline-end',\n] as const\nexport type RiverVisualPosition = (typeof RiverVisualPositionOptions)[number]\n\nexport const RiverVisualPaddingOptions = ['default', 'none', 'all'] as const\nexport type RiverVisualPadding = (typeof RiverVisualPaddingOptions)[number]\n\nexport type RiverVisualBaseProps = BaseProps<HTMLDivElement> &\n React.HtmlHTMLAttributes<HTMLDivElement> &\n PropsWithChildren<{\n /**\n * Applies automatic size constraints to child images and video.\n * This can be disabled by setting this prop to `false`.\n */\n fillMedia?: boolean\n /**\n * `img` and `video` elements will apply a shadow by default.\n * This can be disabled by setting this prop to `false`.\n */\n hasShadow?: boolean\n /**\n * Enables rounded corners.\n * Can optionally be disabled.\n */\n rounded?: boolean\n }>\n\nexport type RiverVisualProps = RiverVisualBaseProps & {\n /**\n * Positions media within the visual region in the gridline variant.\n */\n position?: RiverVisualPosition\n /**\n * Controls media padding within the visual region in the gridline variant.\n */\n padding?: RiverVisualPadding\n}\n\nexport const RiverVisualBase = forwardRef<HTMLDivElement, RiverVisualBaseProps>(\n (\n {fillMedia = true, children, className, hasShadow = false, rounded = true, ...rest}: RiverVisualBaseProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n return (\n <div\n ref={ref}\n className={clsx(\n styles.River__visual,\n hasShadow && styles['River__visual--has-shadow'],\n fillMedia && styles['River__visual--fill-media'],\n rounded && styles['River__visual--rounded'],\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n )\n },\n)\n\nconst Visual = forwardRef<HTMLDivElement, RiverVisualProps>(\n ({className, position = 'default', padding = 'default', ...rest}, ref) => (\n <RiverVisualBase\n ref={ref}\n className={clsx(\n position !== 'default' && styles[`River__visual--position-${position}`],\n padding !== 'default' && styles[`River__visual--padding-${padding}`],\n className,\n )}\n {...rest}\n />\n ),\n)\n\n/**\n * Alternating text and image pairs.\n */\nexport const River = Object.assign(Root, {Visual, Content: RiverContent})\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAa,IAA6B,SAC7B,IAAoB,SACpB,IAAoC,WAO3C,IAAO,GAET,EACE,YACA,oBAAiB,GACjB,WAAQ,GACR,aAAU,GACV,cACA,aACA,UACA,GAAG,KAEL,MACG;CACH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAElF,EAAC,QAAQ,GAAa,SAAS,MAA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SAAS,EAAU,MAAM,WAAW;KACrC,CAAC;IACE,CAAA;GAEP,KACC,kBAAC,OAAD;IACE,WAAW,EACT,EAAO,0BACP,KAA4B,EAAO,qCACpC;cAED,kBAAC,GAAD,EAAqB,CAAA;IACjB,CAAA;GAEJ;;EAGX,EAEY,IAA6B;CACxC;CACA;CACA;CACA;CACA;CACD,EAGY,IAA4B;CAAC;CAAW;CAAQ;CAAM,EAkCtD,IAAkB,GAE3B,EAAC,eAAY,IAAM,aAAU,cAAW,eAAY,IAAO,aAAU,IAAM,GAAG,KAC9E,MAGE,kBAAC,OAAD;CACO;CACL,WAAW,EACT,EAAO,eACP,KAAa,EAAO,8BACpB,KAAa,EAAO,8BACpB,KAAW,EAAO,2BAClB,EACD;CACD,GAAI;CAEH;CACG,CAAA,CAGX,EAEK,IAAS,GACZ,EAAC,cAAW,cAAW,WAAW,aAAU,WAAW,GAAG,KAAO,MAChE,kBAAC,GAAD;CACO;CACL,WAAW,EACT,MAAa,aAAa,EAAO,2BAA2B,MAC5D,MAAY,aAAa,EAAO,0BAA0B,MAC1D,EACD;CACD,GAAI;CACJ,CAAA,CAEL,EAKY,IAAQ,OAAO,OAAO,GAAM;CAAC;CAAQ,SAAS;CAAa,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { River, defaultRiverImageTextRatio, defaultRiverAlign, defaultRiverVariant } from './River';
|
|
2
|
-
export type { RiverProps, RiverContentProps, RiverVisualProps } from './River';
|
|
1
|
+
export { River, defaultRiverImageTextRatio, defaultRiverAlign, defaultRiverVariant, RiverVisualPositionOptions, RiverVisualPaddingOptions, } from './River';
|
|
2
|
+
export type { RiverProps, RiverContentProps, RiverVisualProps, RiverVisualPosition, RiverVisualPadding } from './River';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/river/River/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/river/River/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,SAAS,CAAA;AAChB,YAAY,EAAC,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { useProvidedRefOrCreate as n } from "../../hooks/useRef.js";
|
|
|
4
4
|
import { Text as r } from "../../Text/Text.js";
|
|
5
5
|
import { Heading as i } from "../../Heading/Heading.js";
|
|
6
6
|
import { TriangleDownIcon as a, TriangleUpIcon as o } from "../../node_modules/@primer/octicons-react/dist/index.esm.js";
|
|
7
|
-
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-
|
|
7
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.css';/* empty css */
|
|
8
8
|
import s from "./RiverAccordion.module.js";
|
|
9
9
|
import c from "../../component-helpers/shared.module.js";
|
|
10
10
|
import { Link as l } from "../../Link/Link.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB{grid-gap:0;grid-template:"visual""accordion"/1fr;gap:0;display:grid;position:relative}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB{--gap-width:var(--brand-Grid-spacing-column-gap);--column-and-gap-width:calc((100% + var(--gap-width)) / 12);--4-grid-columns:calc(4 * var(--column-and-gap-width));--7-grid-columns-minus-last-gap:calc((7 * var(--column-and-gap-width)) - var(--gap-width));gap:var(--column-and-gap-width);grid-template-rows:auto}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3{grid-template-columns:var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);grid-template-areas:"accordion visual"}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ{grid-template-columns:var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);grid-template-areas:"visual accordion"}}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{padding-inline:var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);padding-block:var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);position:relative}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{--gap-width:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);--half-column:calc(50% - var(--gap-width) / 2);gap:var(--gap-width);align-items:center}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3{grid-template-columns:var(--half-column) var(--half-column);grid-template-areas:"accordion visual"}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ{grid-template-columns:var(--half-column) var(--half-column);grid-template-areas:"visual accordion"}}@media (width>=80rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6{border-radius:var(--brand-borderRadius-medium)}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{margin-inline:calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));margin-block-start:calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock))}@media screen and (width>=48rem) and (width<=63.24rem){.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB{max-width:618px;margin-inline:auto}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB){border-radius:0}.Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{grid-area:accordion}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{grid-area:visual}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6{border-radius:var(--brand-borderRadius-xlarge);grid-template-columns:subgrid;grid-template-rows:subgrid;width:100%;display:grid;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob{opacity:0;width:100%;height:100%;transition:opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default), scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);grid-area:1/1;align-items:center;display:flex;scale:1.05}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>*{border-radius:var(--brand-borderRadius-xlarge);-o-object-fit:contain;object-fit:contain;width:100%;height:auto;display:block;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>*{border-radius:var(--brand-borderRadius-medium)}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob img,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob picture,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob video{border-radius:inherit;-o-object-fit:contain;object-fit:contain;width:100%;height:auto;display:block}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>* img,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>* video{border-radius:inherit;-o-object-fit:cover;object-fit:cover;width:100%;height:100%;display:block}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB{padding:var(--base-size-32);background:var(--brand-RiverAccordion-visual-background,var(--brand-color-canvas-subtle));justify-content:center;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB>*{border-radius:var(--brand-borderRadius-large);justify-content:center;align-items:center;max-width:100%;height:auto;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB img,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB picture,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB video{border-radius:var(--brand-borderRadius-large);max-width:100%;height:100%}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB){grid-template-columns:1fr 1fr;align-items:stretch;gap:0;padding:0}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB) .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding:var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock) var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);flex-direction:column;justify-content:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB) .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding-inline-end:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap)}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB) .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding-inline-start:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap)}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{margin:0}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB){height:100%}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB{padding:var(--base-size-64);justify-content:center;align-items:center}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB>*,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB img,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB picture,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB video{border-radius:var(--brand-borderRadius-large)}}:is(.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:first-child) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:first-child,.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(2)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(2),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(3)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(3),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(4)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(4),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(5)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(5),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(6)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(6),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(7)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(7),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(8)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(8),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(9)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(9),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(10)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(10),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:not(:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:first-child){opacity:1;z-index:1;scale:1}.Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob{clip:rect(0, 0, 0, 0);word-wrap:normal;border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX{border-bottom:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);padding-block-start:var(--base-size-32);position:relative}@media screen and (width<=63.24rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:last-child{border-bottom:none}}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:not(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2) .Primer_Brand__RiverAccordion-module__RiverAccordion__heading___O56M6{color:var(--brand-color-text-muted)}.Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50{color:inherit;cursor:pointer;font:inherit;text-align:left;width:100%;padding:0;padding:var(--base-size-4);margin:0;margin:calc(var(--base-size-4) * -1);background:0 0;border:none;justify-content:space-between;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50{cursor:auto;cursor:initial}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:not(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2) .Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50:after{content:"";width:100%;height:100%;display:block;position:absolute}.Primer_Brand__RiverAccordion-module__RiverAccordion__panel___Y4GUN{transition:grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default), margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default), padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);grid-template-rows:0fr;margin-block-start:var(--base-size-32);display:grid;overflow-y:clip}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__panel___Y4GUN{grid-template-rows:1fr;margin-block-start:var(--base-size-12);padding-block-end:var(--base-size-32)}.Primer_Brand__RiverAccordion-module__RiverAccordion__content___87sh8{align-items:flex-start;gap:var(--base-size-20);flex-direction:column;min-height:0;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__icon___FMAZH{color:var(--brand-color-text-muted);flex-shrink:0;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__icon___FMAZH{color:var(--brand-color-text-default)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './RiverAccordion.module-
|
|
1
|
+
import './RiverAccordion.module-BTU_metB.css';var e = {
|
|
2
2
|
RiverAccordion: "Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB",
|
|
3
3
|
"RiverAccordion__align-start": "Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3",
|
|
4
4
|
"RiverAccordion__align-end": "Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverAccordion.module.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.module.css"],"sourcesContent":[".RiverAccordion {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas:\n 'visual'\n 'accordion';\n gap: 0;\n position: relative;\n}\n\n@media (min-width: 48rem) {\n .RiverAccordion {\n --gap-width: var(--brand-Grid-spacing-column-gap);\n --column-and-gap-width: calc((100% + var(--gap-width)) / 12);\n\n --4-grid-columns: calc(4 * var(--column-and-gap-width));\n --7-grid-columns-minus-last-gap: calc((7 * var(--column-and-gap-width)) - var(--gap-width));\n\n grid-template-rows: auto;\n gap: var(--column-and-gap-width);\n }\n\n .RiverAccordion__align-start {\n grid-template-columns: var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion__align-end {\n grid-template-columns: var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);\n grid-template-areas: 'visual accordion';\n }\n}\n\n/* Gridline variant */\n\n.RiverAccordion--variant-gridline {\n position: relative;\n padding-inline: var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n padding-block: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);\n}\n\n@media (min-width: 48rem) {\n .RiverAccordion--variant-gridline {\n --gap-width: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n --half-column: calc(50% - var(--gap-width) / 2);\n\n gap: var(--gap-width);\n align-items: center;\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'visual accordion';\n }\n}\n\n@media (min-width: 80rem) {\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin-inline: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));\n margin-block-start: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock));\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n border-radius: 0;\n}\n\n.RiverAccordion__accordionContainer {\n grid-area: accordion;\n}\n\n.RiverAccordion__visualsContainer {\n grid-area: visual;\n}\n\n.RiverAccordion__visualsWrapper {\n width: 100%;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n display: grid;\n grid-template-columns: subgrid;\n grid-template-rows: subgrid;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual {\n grid-column: 1;\n grid-row: 1;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n opacity: 0;\n scale: 1.05;\n transition: opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n display: block;\n width: 100%;\n height: auto;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n object-fit: contain;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual picture,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual video {\n display: block;\n width: 100%;\n height: auto;\n border-radius: inherit;\n object-fit: contain;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * video {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n object-fit: cover;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--base-size-32);\n background: var(--brand-RiverAccordion-visual-background, var(--brand-color-canvas-subtle));\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > * {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 100%;\n height: auto;\n border-radius: var(--brand-borderRadius-large);\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n max-width: 100%;\n height: 100%;\n border-radius: var(--brand-borderRadius-large);\n}\n\n@media (min-width: 48rem) {\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) {\n padding: 0;\n gap: 0;\n align-items: stretch;\n grid-template-columns: 1fr 1fr;\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__accordionContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock)\n var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-end: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-start: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin: 0;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n height: 100%;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n align-items: center;\n justify-content: center;\n padding: var(--base-size-64);\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > *,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n border-radius: var(--brand-borderRadius-large);\n }\n}\n\n/* Show the visual when the corresponding accordion item is open */\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(1)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(2)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(2),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(3)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(3),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(4)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(4),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(5)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(5),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(6)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(6),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(7)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(7),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(8)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(8),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(9)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(9),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(10)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(10),\n/* Just in case all accordions are somehow closed, show the first visual */\n.RiverAccordion:not(:has(.RiverAccordion__item--open)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1) {\n opacity: 1;\n scale: 1;\n z-index: 1;\n}\n\n/* Visually hide visuals inside the accordion */\n.RiverAccordion__accordionContainer .RiverAccordion__visual {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n word-wrap: normal;\n border: 0;\n}\n\n.RiverAccordion__item {\n position: relative;\n padding-block-start: var(--base-size-32);\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__heading {\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__trigger {\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n margin: 0;\n padding: 0;\n text-align: left;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--base-size-4);\n margin: calc(var(--base-size-4) * -1);\n}\n\n.RiverAccordion__item--open .RiverAccordion__trigger {\n cursor: initial;\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__trigger::after {\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.RiverAccordion__panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n margin-block-start: var(--base-size-32);\n overflow-y: clip;\n}\n\n.RiverAccordion__item--open .RiverAccordion__panel {\n margin-block-start: var(--base-size-12);\n padding-block-end: var(--base-size-32);\n grid-template-rows: 1fr;\n}\n\n.RiverAccordion__content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-height: 0;\n gap: var(--base-size-20);\n}\n\n.RiverAccordion__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__item--open .RiverAccordion__icon {\n color: var(--brand-color-text-default);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"RiverAccordion.module.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.module.css"],"sourcesContent":[".RiverAccordion {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas:\n 'visual'\n 'accordion';\n gap: 0;\n position: relative;\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion {\n --gap-width: var(--brand-Grid-spacing-column-gap);\n --column-and-gap-width: calc((100% + var(--gap-width)) / 12);\n\n --4-grid-columns: calc(4 * var(--column-and-gap-width));\n --7-grid-columns-minus-last-gap: calc((7 * var(--column-and-gap-width)) - var(--gap-width));\n\n grid-template-rows: auto;\n gap: var(--column-and-gap-width);\n }\n\n .RiverAccordion__align-start {\n grid-template-columns: var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion__align-end {\n grid-template-columns: var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);\n grid-template-areas: 'visual accordion';\n }\n}\n\n/* Gridline variant */\n\n.RiverAccordion--variant-gridline {\n position: relative;\n padding-inline: var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n padding-block: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--variant-gridline {\n --gap-width: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n --half-column: calc(50% - var(--gap-width) / 2);\n\n gap: var(--gap-width);\n align-items: center;\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'visual accordion';\n }\n}\n\n@media (min-width: 80rem) {\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin-inline: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));\n margin-block-start: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock));\n}\n\n@media screen and (min-width: 48rem) and (max-width: 63.24rem) {\n .RiverAccordion {\n max-width: 618px;\n margin-inline: auto;\n }\n\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n border-radius: 0;\n}\n\n.RiverAccordion__accordionContainer {\n grid-area: accordion;\n}\n\n.RiverAccordion__visualsContainer {\n grid-area: visual;\n}\n\n.RiverAccordion__visualsWrapper {\n width: 100%;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n display: grid;\n grid-template-columns: subgrid;\n grid-template-rows: subgrid;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual {\n grid-column: 1;\n grid-row: 1;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n opacity: 0;\n scale: 1.05;\n transition: opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n display: block;\n width: 100%;\n height: auto;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n object-fit: contain;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual picture,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual video {\n display: block;\n width: 100%;\n height: auto;\n border-radius: inherit;\n object-fit: contain;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * video {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n object-fit: cover;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--base-size-32);\n background: var(--brand-RiverAccordion-visual-background, var(--brand-color-canvas-subtle));\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > * {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 100%;\n height: auto;\n border-radius: var(--brand-borderRadius-large);\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n max-width: 100%;\n height: 100%;\n border-radius: var(--brand-borderRadius-large);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) {\n padding: 0;\n gap: 0;\n align-items: stretch;\n grid-template-columns: 1fr 1fr;\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__accordionContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock)\n var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-end: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-start: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin: 0;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n height: 100%;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n align-items: center;\n justify-content: center;\n padding: var(--base-size-64);\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > *,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n border-radius: var(--brand-borderRadius-large);\n }\n}\n\n/* Show the visual when the corresponding accordion item is open */\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(1)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(2)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(2),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(3)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(3),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(4)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(4),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(5)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(5),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(6)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(6),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(7)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(7),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(8)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(8),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(9)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(9),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(10)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(10),\n/* Just in case all accordions are somehow closed, show the first visual */\n.RiverAccordion:not(:has(.RiverAccordion__item--open)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1) {\n opacity: 1;\n scale: 1;\n z-index: 1;\n}\n\n/* Visually hide visuals inside the accordion */\n.RiverAccordion__accordionContainer .RiverAccordion__visual {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n word-wrap: normal;\n border: 0;\n}\n\n.RiverAccordion__item {\n position: relative;\n padding-block-start: var(--base-size-32);\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n@media screen and (max-width: 63.24rem) {\n .RiverAccordion--variant-gridline .RiverAccordion__item:last-child {\n border-bottom: none;\n }\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__heading {\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__trigger {\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n margin: 0;\n padding: 0;\n text-align: left;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--base-size-4);\n margin: calc(var(--base-size-4) * -1);\n}\n\n.RiverAccordion__item--open .RiverAccordion__trigger {\n cursor: initial;\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__trigger::after {\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.RiverAccordion__panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n margin-block-start: var(--base-size-32);\n overflow-y: clip;\n}\n\n.RiverAccordion__item--open .RiverAccordion__panel {\n margin-block-start: var(--base-size-12);\n padding-block-end: var(--base-size-32);\n grid-template-rows: 1fr;\n}\n\n.RiverAccordion__content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-height: 0;\n gap: var(--base-size-20);\n}\n\n.RiverAccordion__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__item--open .RiverAccordion__icon {\n color: var(--brand-color-text-default);\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RiverProps } from '../River';
|
|
3
|
+
import { type RiverVisualBaseProps } from '../River/River';
|
|
3
4
|
export declare const RiverBreakoutVariants: readonly ["default", "gridline"];
|
|
4
5
|
export type RiverBreakoutVariant = (typeof RiverBreakoutVariants)[number];
|
|
5
6
|
type RiverBreakoutProps = Omit<RiverProps, 'align' | 'imageTextRatio'> & {
|
|
@@ -10,7 +11,7 @@ type RiverBreakoutProps = Omit<RiverProps, 'align' | 'imageTextRatio'> & {
|
|
|
10
11
|
variant?: RiverBreakoutVariant;
|
|
11
12
|
};
|
|
12
13
|
export declare const RiverBreakout: React.ForwardRefExoticComponent<Omit<RiverBreakoutProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
13
|
-
Visual: React.ForwardRefExoticComponent<Omit<
|
|
14
|
+
Visual: React.ForwardRefExoticComponent<Omit<RiverVisualBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
15
|
Content: React.ForwardRefExoticComponent<Omit<import("..").RiverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
16
|
A11yHeading: ({ as, children }: React.PropsWithChildren<{
|
|
16
17
|
as?: "h2" | "h3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverBreakout.d.ts","sourceRoot":"","sources":["../../../src/river/RiverBreakout/RiverBreakout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"RiverBreakout.d.ts","sourceRoot":"","sources":["../../../src/river/RiverBreakout/RiverBreakout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAE5C,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAA;AACnC,OAAO,EAAgC,KAAK,oBAAoB,EAAC,MAAM,gBAAgB,CAAA;AAQvF,eAAO,MAAM,qBAAqB,kCAAmC,CAAA;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzE,KAAK,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,gBAAgB,CAAC,GAAG;IACvE;;;OAGG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAiDD,eAAO,MAAM,aAAa;;;oCAVkB,KAAK,CAAC,iBAAiB,CAAC;QAAC,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;KAAC,CAAC;CAUO,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { useAnimation as t } from "../../animation/useAnimation.js";
|
|
|
3
3
|
import { Heading as n } from "../../Heading/Heading.js";
|
|
4
4
|
import r from "../../component-helpers/shared.module.js";
|
|
5
5
|
import i from "../river-shared.module.js";
|
|
6
|
-
import { RiverContent as a,
|
|
6
|
+
import { RiverContent as a, RiverVisualBase as o } from "../River/River.js";
|
|
7
7
|
import s from "../../findElementInChildren.js";
|
|
8
8
|
import { forwardRef as c } from "react";
|
|
9
9
|
import { jsx as l } from "react/jsx-runtime";
|
|
@@ -24,12 +24,16 @@ var u = ["default", "gridline"], d = c(({ animate: n, className: a, children: o,
|
|
|
24
24
|
className: "visually-hidden",
|
|
25
25
|
as: e,
|
|
26
26
|
children: t
|
|
27
|
-
}), p =
|
|
28
|
-
|
|
27
|
+
}), p = c(({ className: e, ...t }, n) => /* @__PURE__ */ l(o, {
|
|
28
|
+
ref: n,
|
|
29
|
+
className: e,
|
|
30
|
+
...t
|
|
31
|
+
})), m = Object.assign(d, {
|
|
32
|
+
Visual: p,
|
|
29
33
|
Content: a,
|
|
30
34
|
A11yHeading: f
|
|
31
35
|
});
|
|
32
36
|
//#endregion
|
|
33
|
-
export {
|
|
37
|
+
export { m as RiverBreakout, u as RiverBreakoutVariants };
|
|
34
38
|
|
|
35
39
|
//# sourceMappingURL=RiverBreakout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverBreakout.js","names":[],"sources":["../../../src/river/RiverBreakout/RiverBreakout.tsx"],"sourcesContent":["import React, {Ref, forwardRef} from 'react'\nimport {clsx} from 'clsx'\nimport {RiverProps} from '../River'\nimport {
|
|
1
|
+
{"version":3,"file":"RiverBreakout.js","names":[],"sources":["../../../src/river/RiverBreakout/RiverBreakout.tsx"],"sourcesContent":["import React, {Ref, forwardRef} from 'react'\nimport {clsx} from 'clsx'\nimport {RiverProps} from '../River'\nimport {RiverVisualBase, RiverContent, type RiverVisualBaseProps} from '../River/River'\nimport {useAnimation} from '../../animation'\nimport findElementInChildren from '../../findElementInChildren'\nimport {Heading} from '../../Heading'\n\nimport styles from '../river-shared.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\nexport const RiverBreakoutVariants = ['default', 'gridline'] as const\nexport type RiverBreakoutVariant = (typeof RiverBreakoutVariants)[number]\n\ntype RiverBreakoutProps = Omit<RiverProps, 'align' | 'imageTextRatio'> & {\n /**\n * Apply a visual variant. The default is `default`.\n * `gridline` adds horizontal border lines and lateral spacing.\n */\n variant?: RiverBreakoutVariant\n}\n\nconst Root = forwardRef(\n ({animate, className, children, style, variant = 'default', ...rest}: RiverBreakoutProps, ref: Ref<HTMLElement>) => {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n\n // TODO: when Firefox supports :has() selector, we should use that instead of JS\n const defaultColor =\n findElementInChildren(children, 'b') || findElementInChildren(children, 'em') ? 'muted' : 'default'\n\n if (!findElementInChildren(children, A11yHeading)) {\n if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') {\n // eslint-disable-next-line no-console\n console.warn(\n 'RiverBreakout: A11yHeading child is required. This element will not be visible, only read by screenreaders.',\n )\n }\n }\n\n return (\n <section\n ref={ref}\n className={clsx(\n styles.RiverBreakout,\n variant === 'gridline' && styles['RiverBreakout--variant-gridline'],\n variant === 'gridline' && gridlineStyles.gridline,\n defaultColor === 'muted' && styles['RiverBreakout--muted'],\n animationClasses,\n className,\n )}\n style={{...animationInlineStyles, ...style}}\n {...rest}\n >\n {children}\n </section>\n )\n },\n)\n\nconst A11yHeading = ({as = 'h3', children}: React.PropsWithChildren<{as?: 'h2' | 'h3'}>) => (\n <Heading className=\"visually-hidden\" as={as}>\n {children}\n </Heading>\n)\n\nconst Visual = forwardRef<HTMLDivElement, RiverVisualBaseProps>(({className, ...props}, ref) => (\n <RiverVisualBase ref={ref} className={className} {...props} />\n))\n\nexport const RiverBreakout = Object.assign(Root, {Visual, Content: RiverContent, A11yHeading})\n"],"mappings":";;;;;;;;;;AAWA,IAAa,IAAwB,CAAC,WAAW,WAAW,EAWtD,IAAO,GACV,EAAC,YAAS,cAAW,aAAU,UAAO,aAAU,WAAW,GAAG,KAA2B,MAA0B;CAClH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,EAAQ,EAGlF,IACJ,EAAsB,GAAU,IAAI,IAAI,EAAsB,GAAU,KAAK,GAAG,UAAU;AAW5F,QATK,EAAsB,GAAU,EAAY,8BAClB,iBAAA,QAAA,IAAA,aAA0C,WAErE,QAAQ,KACN,8GACD,EAKH,kBAAC,WAAD;EACO;EACL,WAAW,EACT,EAAO,eACP,MAAY,cAAc,EAAO,oCACjC,MAAY,cAAc,EAAe,UACzC,MAAiB,WAAW,EAAO,yBACnC,GACA,EACD;EACD,OAAO;GAAC,GAAG;GAAuB,GAAG;GAAM;EAC3C,GAAI;EAEH;EACO,CAAA;EAGf,EAEK,KAAe,EAAC,QAAK,MAAM,kBAC/B,kBAAC,GAAD;CAAS,WAAU;CAAsB;CACtC;CACO,CAAA,EAGN,IAAS,GAAkD,EAAC,cAAW,GAAG,KAAQ,MACtF,kBAAC,GAAD;CAAsB;CAAgB;CAAW,GAAI;CAAS,CAAA,CAC9D,EAEW,IAAgB,OAAO,OAAO,GAAM;CAAC;CAAQ,SAAS;CAAc;CAAY,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type HeadingProps } from '../..';
|
|
3
3
|
import { type IconProps } from '../../Icon';
|
|
4
|
-
import { type
|
|
4
|
+
import { type RiverVisualBaseProps } from '../River/River';
|
|
5
5
|
/**
|
|
6
6
|
* Design tokens
|
|
7
7
|
*/
|
|
@@ -35,6 +35,7 @@ export type RiverBreakoutTabsA11yHeadingProps = React.PropsWithChildren<{
|
|
|
35
35
|
export type RiverBreakoutTabsHeadingProps = HeadingProps;
|
|
36
36
|
export type RiverBreakoutTabsContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
37
37
|
export type RiverBreakoutTabsIconProps = IconProps;
|
|
38
|
+
export type RiverBreakoutTabsVisualProps = RiverVisualBaseProps;
|
|
38
39
|
/**
|
|
39
40
|
* Use RiverBreakoutTabs to showcase multiple feature stories within a single immersive surface.
|
|
40
41
|
*/
|
|
@@ -63,6 +64,6 @@ export declare const RiverBreakoutTabs: React.ForwardRefExoticComponent<{
|
|
|
63
64
|
Heading: ({ as, children, className, size, weight, ...props }: RiverBreakoutTabsHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
64
65
|
Icon: ({ color, ...props }: RiverBreakoutTabsIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
65
66
|
Item: ({ children }: RiverBreakoutTabsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
Visual: React.ForwardRefExoticComponent<Omit<
|
|
67
|
+
Visual: React.ForwardRefExoticComponent<Omit<RiverVisualBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
67
68
|
};
|
|
68
69
|
//# sourceMappingURL=RiverBreakoutTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverBreakoutTabs.d.ts","sourceRoot":"","sources":["../../../src/river/RiverBreakoutTabs/RiverBreakoutTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAA;AAGxG,OAAO,EAAiC,KAAK,YAAY,EAAC,MAAM,OAAO,CAAA;AACvE,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,YAAY,CAAA;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"RiverBreakoutTabs.d.ts","sourceRoot":"","sources":["../../../src/river/RiverBreakoutTabs/RiverBreakoutTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAA;AAGxG,OAAO,EAAiC,KAAK,YAAY,EAAC,MAAM,OAAO,CAAA;AACvE,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAkB,KAAK,oBAAoB,EAAC,MAAM,gBAAgB,CAAA;AAOzE;;GAEG;AACH,OAAO,4FAA4F,CAAA;AACnG,OAAO,6FAA6F,CAAA;AAUpG,MAAM,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;yBAR3C,0BAA0B;;CAwbnE,CAAA"}
|
|
@@ -2,12 +2,12 @@ import e from "../../node_modules/clsx/dist/clsx.js";
|
|
|
2
2
|
import { useId as t } from "../../hooks/useId.js";
|
|
3
3
|
import { Text as n } from "../../Text/Text.js";
|
|
4
4
|
import { Heading as r } from "../../Heading/Heading.js";
|
|
5
|
-
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-
|
|
5
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.css';import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/base-Ue-p74RC.css';/* empty css */
|
|
6
6
|
import i from "../../component-helpers/shared.module.js";
|
|
7
7
|
import { Link as a } from "../../Link/Link.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import o from "../river-shared.module.js";
|
|
10
|
-
import {
|
|
10
|
+
import { RiverVisualBase as s } from "../River/River.js";
|
|
11
11
|
import { Icon as c } from "../../Icon/Icon.js";
|
|
12
12
|
import { useTabs as l } from "../../hooks/useTabs.js";
|
|
13
13
|
import { useWindowSize as u } from "../../hooks/useWindowSize.js";
|