@primer/react-brand 0.75.0-rc.a3f7dbd6 → 0.75.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/SubdomainNavBar/index.md +215 -86
- package/docs/index.md +2 -2
- package/esm/Accordion/Accordion.d.ts +2 -2
- package/esm/Accordion/Accordion.d.ts.map +1 -1
- package/esm/Accordion/Accordion.js +2 -2
- package/esm/Accordion/Accordion.js.map +1 -1
- package/esm/Accordion/Accordion.module.js +6 -5
- package/esm/ActionMenu/ActionMenu.d.ts +2 -2
- package/esm/ActionMenu/ActionMenu.js +3 -2
- package/esm/ActionMenu/ActionMenu.js.map +1 -1
- package/esm/ActionMenu/ActionMenu.module.js +7 -6
- package/esm/AnchorNav/AnchorNav.d.ts +4 -4
- package/esm/AnchorNav/AnchorNav.d.ts.map +1 -1
- package/esm/AnchorNav/AnchorNav.js +9 -4
- package/esm/AnchorNav/AnchorNav.js.map +1 -1
- package/esm/AnchorNav/AnchorNav.module.js +5 -4
- package/esm/AnchorNav/useExpandedMenu.js.map +1 -1
- package/esm/Avatar/Avatar.js +1 -1
- package/esm/Avatar/Avatar.js.map +1 -1
- package/esm/Avatar/Avatar.module.js +5 -4
- package/esm/Bento/Bento.d.ts +4 -4
- package/esm/Bento/Bento.js +1 -1
- package/esm/Bento/Bento.js.map +1 -1
- package/esm/Bento/Bento.module.js +7 -6
- package/esm/Box/Box.d.ts +1 -1
- package/esm/Box/Box.d.ts.map +1 -1
- package/esm/Box/Box.js +1 -1
- package/esm/Box/Box.js.map +1 -1
- package/esm/Breadcrumbs/Breadcrumbs.js +1 -1
- package/esm/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/esm/Breadcrumbs/Breadcrumbs.module.js +7 -6
- package/esm/BreakoutBanner/BreakoutBanner.js +1 -1
- package/esm/BreakoutBanner/BreakoutBanner.js.map +1 -1
- package/esm/BreakoutBanner/BreakoutBanner.module.js +5 -4
- package/esm/Button/Button.js +1 -1
- package/esm/Button/Button.js.map +1 -1
- package/esm/Button/Button.module.js +5 -4
- package/esm/ButtonGroup/ButtonGroup.js +1 -1
- package/esm/ButtonGroup/ButtonGroup.js.map +1 -1
- package/esm/ButtonGroup/ButtonGroup.module.js +3 -2
- package/esm/CTABanner/CTABanner.d.ts +1 -1
- package/esm/CTABanner/CTABanner.js +2 -2
- package/esm/CTABanner/CTABanner.js.map +1 -1
- package/esm/CTABanner/CTABanner.module.js +4 -3
- package/esm/CTAForm/CTAForm.js +1 -1
- package/esm/CTAForm/CTAForm.js.map +1 -1
- package/esm/CTAForm/CTAForm.module.js +4 -3
- package/esm/Card/Card.d.ts +2 -2
- package/esm/Card/Card.d.ts.map +1 -1
- package/esm/Card/Card.js +3 -3
- package/esm/Card/Card.js.map +1 -1
- package/esm/Card/Card.module.js +18 -17
- package/esm/ComparisonTable/ComparisonTable.d.ts +3 -3
- package/esm/ComparisonTable/ComparisonTable.js +1 -1
- package/esm/ComparisonTable/ComparisonTable.js.map +1 -1
- package/esm/ComparisonTable/ComparisonTable.module.js +4 -3
- package/esm/ExpandableArrow/ExpandableArrow.d.ts +2 -1
- package/esm/ExpandableArrow/ExpandableArrow.d.ts.map +1 -1
- package/esm/ExpandableArrow/ExpandableArrow.js +1 -1
- package/esm/ExpandableArrow/ExpandableArrow.js.map +1 -1
- package/esm/ExpandableArrow/ExpandableArrow.module.js +4 -3
- package/esm/EyebrowBanner/EyebrowBanner.js +2 -2
- package/esm/EyebrowBanner/EyebrowBanner.js.map +1 -1
- package/esm/EyebrowBanner/EyebrowBanner.module.js +12 -11
- package/esm/EyebrowText/EyebrowText.js +1 -1
- package/esm/EyebrowText/EyebrowText.js.map +1 -1
- package/esm/EyebrowText/EyebrowText.module.js +4 -3
- package/esm/FAQ/FAQ.d.ts +2 -2
- package/esm/FAQ/FAQ.d.ts.map +1 -1
- package/esm/FAQ/FAQ.js +1 -1
- package/esm/FAQ/FAQ.js.map +1 -1
- package/esm/FAQ/FAQ.module.js +7 -6
- package/esm/FAQ/FAQGroup.d.ts +2 -2
- package/esm/FAQ/FAQGroup.d.ts.map +1 -1
- package/esm/FAQ/FAQGroup.js +7 -3
- package/esm/FAQ/FAQGroup.js.map +1 -1
- package/esm/FAQ/FAQGroup.module.js +8 -7
- package/esm/Footnotes/Footnotes.d.ts +2 -2
- package/esm/Footnotes/Footnotes.d.ts.map +1 -1
- package/esm/Footnotes/Footnotes.js +2 -2
- package/esm/Footnotes/Footnotes.js.map +1 -1
- package/esm/Footnotes/Footnotes.module.js +7 -6
- package/esm/FrostedGlassVFX/FrostedGlassVFX.d.ts +1 -1
- package/esm/FrostedGlassVFX/FrostedGlassVFX.d.ts.map +1 -1
- package/esm/FrostedGlassVFX/FrostedGlassVFX.js +1 -1
- package/esm/FrostedGlassVFX/FrostedGlassVFX.js.map +1 -1
- package/esm/FrostedGlassVFX/FrostedGlassVFX.module.js +4 -3
- package/esm/Grid/Grid.d.ts +2 -2
- package/esm/Grid/Grid.js +2 -2
- package/esm/Grid/Grid.js.map +1 -1
- package/esm/Grid/Grid.module.js +5 -4
- package/esm/Heading/Heading.js +1 -1
- package/esm/Heading/Heading.js.map +1 -1
- package/esm/Heading/Heading.module.js +4 -3
- package/esm/Hero/Hero.js +1 -1
- package/esm/Hero/Hero.js.map +1 -1
- package/esm/Hero/Hero.module.js +4 -3
- package/esm/Hero/HeroContext.js.map +1 -1
- package/esm/Hero/sub-components/HeroButtonGroup.js +1 -1
- package/esm/Hero/sub-components/HeroButtonGroup.js.map +1 -1
- package/esm/Hero/sub-components/HeroDescription.js +1 -1
- package/esm/Hero/sub-components/HeroDescription.js.map +1 -1
- package/esm/Hero/sub-components/HeroEyebrow.js +1 -1
- package/esm/Hero/sub-components/HeroEyebrow.js.map +1 -1
- package/esm/Hero/sub-components/HeroHeading.js +1 -1
- package/esm/Hero/sub-components/HeroHeading.js.map +1 -1
- package/esm/Hero/sub-components/HeroImage.js +1 -1
- package/esm/Hero/sub-components/HeroImage.js.map +1 -1
- package/esm/Hero/sub-components/HeroLabel.js +1 -1
- package/esm/Hero/sub-components/HeroLabel.js.map +1 -1
- package/esm/Hero/sub-components/HeroPrimaryAction.js.map +1 -1
- package/esm/Hero/sub-components/HeroSecondaryAction.js.map +1 -1
- package/esm/Hero/sub-components/HeroVideo.js +2 -2
- package/esm/Hero/sub-components/HeroVideo.js.map +1 -1
- package/esm/IDE/IDE.d.ts +1 -1
- package/esm/IDE/IDE.js +3 -2
- package/esm/IDE/IDE.js.map +1 -1
- package/esm/IDE/IDE.module.js +8 -7
- package/esm/Icon/Icon.d.ts +2 -2
- package/esm/Icon/Icon.d.ts.map +1 -1
- package/esm/Icon/Icon.js +2 -2
- package/esm/Icon/Icon.js.map +1 -1
- package/esm/Icon/Icon.module.js +4 -3
- package/esm/Image/Image.d.ts +1 -1
- package/esm/Image/Image.d.ts.map +1 -1
- package/esm/Image/Image.js +1 -1
- package/esm/Image/Image.js.map +1 -1
- package/esm/Image/Image.module.js +5 -4
- package/esm/InlineCode/InlineCode.js +1 -1
- package/esm/InlineCode/InlineCode.js.map +1 -1
- package/esm/InlineCode/InlineCode.module.js +5 -4
- package/esm/InlineLink/InlineLink.js +2 -2
- package/esm/InlineLink/InlineLink.js.map +1 -1
- package/esm/InlineLink/InlineLink.module.js +3 -2
- package/esm/Label/Label.js +1 -1
- package/esm/Label/Label.js.map +1 -1
- package/esm/Label/Label.module.js +6 -5
- package/esm/Link/Link.d.ts +1 -1
- package/esm/Link/Link.d.ts.map +1 -1
- package/esm/Link/Link.js +2 -2
- package/esm/Link/Link.js.map +1 -1
- package/esm/Link/Link.module.js +4 -3
- package/esm/LogoSuite/LogoSuite.d.ts +1 -1
- package/esm/LogoSuite/LogoSuite.js +4 -3
- package/esm/LogoSuite/LogoSuite.js.map +1 -1
- package/esm/LogoSuite/LogoSuite.module.js +11 -10
- package/esm/MediaPlaylist/MediaPlaylist.d.ts +4 -4
- package/esm/MediaPlaylist/MediaPlaylist.d.ts.map +1 -1
- package/esm/MediaPlaylist/MediaPlaylist.js +1 -1
- package/esm/MediaPlaylist/MediaPlaylist.js.map +1 -1
- package/esm/MediaPlaylist/MediaPlaylist.module.js +25 -24
- package/esm/MediaPlaylist/useMediaPlaylist.js.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.d.ts +3 -3
- package/esm/MinimalFooter/MinimalFooter.d.ts.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.js +4 -3
- package/esm/MinimalFooter/MinimalFooter.js.map +1 -1
- package/esm/MinimalFooter/MinimalFooter.module.js +15 -14
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js +2 -2
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js.map +1 -1
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.module.js +6 -5
- package/esm/MinimalVideoPlayer/useMinimalVideoPlayback.js.map +1 -1
- package/esm/NavList/NavList.js +2 -2
- package/esm/NavList/NavList.js.map +1 -1
- package/esm/NavList/NavList.module.js +18 -17
- package/esm/Pagination/Pagination.d.ts +1 -1
- package/esm/Pagination/Pagination.d.ts.map +1 -1
- package/esm/Pagination/Pagination.js +1 -1
- package/esm/Pagination/Pagination.js.map +1 -1
- package/esm/Pagination/Pagination.module.js +11 -10
- package/esm/Pagination/model.js.map +1 -1
- package/esm/Pillar/Pillar.d.ts +2 -2
- package/esm/Pillar/Pillar.d.ts.map +1 -1
- package/esm/Pillar/Pillar.js +1 -1
- package/esm/Pillar/Pillar.js.map +1 -1
- package/esm/Pillar/Pillar.module.js +9 -8
- package/esm/PricingOptions/PricingOptions.d.ts +1 -1
- package/esm/PricingOptions/PricingOptions.js +5 -3
- package/esm/PricingOptions/PricingOptions.js.map +1 -1
- package/esm/PricingOptions/PricingOptions.module.js +13 -12
- package/esm/Prose/Prose.js +1 -1
- package/esm/Prose/Prose.js.map +1 -1
- package/esm/Prose/Prose.module.js +4 -3
- package/esm/Section/Section.js +1 -1
- package/esm/Section/Section.js.map +1 -1
- package/esm/Section/Section.module.js +5 -4
- package/esm/SectionIntro/SectionIntro.js +1 -1
- package/esm/SectionIntro/SectionIntro.js.map +1 -1
- package/esm/SectionIntro/SectionIntro.module.js +4 -3
- package/esm/SectionIntroStacked/SectionIntroStacked.d.ts +3 -3
- package/esm/SectionIntroStacked/SectionIntroStacked.js +1 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.js.map +1 -1
- package/esm/SectionIntroStacked/SectionIntroStacked.module.js +6 -5
- package/esm/Stack/Stack.js +1 -1
- package/esm/Stack/Stack.js.map +1 -1
- package/esm/Stack/Stack.module.js +4 -3
- package/esm/Statistic/Statistic.js +1 -1
- package/esm/Statistic/Statistic.js.map +1 -1
- package/esm/Statistic/Statistic.module.js +6 -5
- package/esm/SubNav/SubNav.d.ts +4 -4
- package/esm/SubNav/SubNav.d.ts.map +1 -1
- package/esm/SubNav/SubNav.js +6 -4
- package/esm/SubNav/SubNav.js.map +1 -1
- package/esm/SubNav/SubNav.module.js +9 -8
- package/esm/SubNav/useContainsFocus.js.map +1 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts.map +1 -1
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js +117 -64
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts +157 -20
- package/esm/SubdomainNavBar/SubdomainNavBar.d.ts.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.js +479 -299
- package/esm/SubdomainNavBar/SubdomainNavBar.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBar.module-WIrpYyjV.css +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js +36 -11
- package/esm/SubdomainNavBar/SubdomainNavBar.module.js.map +1 -1
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +9 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts.map +1 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js +10 -0
- package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js.map +1 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +8 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts.map +1 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js +52 -0
- package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js.map +1 -0
- package/esm/SubdomainNavBar/useSearchResults.d.ts +24 -0
- package/esm/SubdomainNavBar/useSearchResults.d.ts.map +1 -0
- package/esm/SubdomainNavBar/useSearchResults.js +57 -0
- package/esm/SubdomainNavBar/useSearchResults.js.map +1 -0
- package/esm/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
- package/esm/SubdomainNavBar/useVisibilityObserver.d.ts.map +1 -1
- package/esm/SubdomainNavBar/useVisibilityObserver.js +60 -23
- package/esm/SubdomainNavBar/useVisibilityObserver.js.map +1 -1
- package/esm/Tabs/Tabs.js +3 -2
- package/esm/Tabs/Tabs.js.map +1 -1
- package/esm/Tabs/Tabs.module.js +12 -11
- package/esm/Testimonial/Testimonial.d.ts +1 -1
- package/esm/Testimonial/Testimonial.d.ts.map +1 -1
- package/esm/Testimonial/Testimonial.js +1 -1
- package/esm/Testimonial/Testimonial.js.map +1 -1
- package/esm/Testimonial/Testimonial.module.js +8 -7
- package/esm/Text/Text.d.ts +1 -1
- package/esm/Text/Text.d.ts.map +1 -1
- package/esm/Text/Text.js +1 -1
- package/esm/Text/Text.js.map +1 -1
- package/esm/Text/Text.module.js +4 -3
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.js +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.js.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.module.js +10 -9
- package/esm/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/esm/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/esm/ThemeProvider/ThemeProvider.js +4 -4
- package/esm/ThemeProvider/ThemeProvider.js.map +1 -1
- package/esm/ThemeProvider/useTheme.js.map +1 -1
- package/esm/Tiles/Tiles.js +2 -2
- package/esm/Tiles/Tiles.js.map +1 -1
- package/esm/Tiles/Tiles.module.js +4 -3
- package/esm/Timeline/Timeline.d.ts +3 -3
- package/esm/Timeline/Timeline.d.ts.map +1 -1
- package/esm/Timeline/Timeline.js +2 -2
- package/esm/Timeline/Timeline.js.map +1 -1
- package/esm/Timeline/Timeline.module.js +5 -4
- package/esm/Token/Token.js +1 -1
- package/esm/Token/Token.js.map +1 -1
- package/esm/Token/Token.module.js +6 -5
- package/esm/Tooltip/Tooltip.js +2 -2
- package/esm/Tooltip/Tooltip.js.map +1 -1
- package/esm/Tooltip/Tooltip.module.js +4 -3
- package/esm/VideoPlayer/VideoPlayer.d.ts +2 -2
- package/esm/VideoPlayer/VideoPlayer.js +2 -2
- package/esm/VideoPlayer/VideoPlayer.js.map +1 -1
- package/esm/VideoPlayer/VideoPlayer.module.js +29 -28
- package/esm/VideoPlayer/components/CCButton/CCButton.d.ts +2 -2
- package/esm/VideoPlayer/components/CCButton/CCButton.d.ts.map +1 -1
- package/esm/VideoPlayer/components/CCButton/CCButton.js +1 -1
- package/esm/VideoPlayer/components/CCButton/CCButton.js.map +1 -1
- package/esm/VideoPlayer/components/Captions/Captions.d.ts +2 -2
- package/esm/VideoPlayer/components/Captions/Captions.d.ts.map +1 -1
- package/esm/VideoPlayer/components/Captions/Captions.js +1 -1
- package/esm/VideoPlayer/components/Captions/Captions.js.map +1 -1
- package/esm/VideoPlayer/components/Captions/Captions.module.js +5 -4
- package/esm/VideoPlayer/components/ControlsBar/ControlsBar.d.ts +2 -2
- package/esm/VideoPlayer/components/ControlsBar/ControlsBar.d.ts.map +1 -1
- package/esm/VideoPlayer/components/ControlsBar/ControlsBar.js +1 -1
- package/esm/VideoPlayer/components/ControlsBar/ControlsBar.js.map +1 -1
- package/esm/VideoPlayer/components/FullScreenButton/FullScreenButton.d.ts +2 -2
- package/esm/VideoPlayer/components/FullScreenButton/FullScreenButton.d.ts.map +1 -1
- package/esm/VideoPlayer/components/FullScreenButton/FullScreenButton.js +2 -1
- package/esm/VideoPlayer/components/FullScreenButton/FullScreenButton.js.map +1 -1
- package/esm/VideoPlayer/components/IconControl/IconControl.d.ts +2 -2
- package/esm/VideoPlayer/components/IconControl/IconControl.d.ts.map +1 -1
- package/esm/VideoPlayer/components/IconControl/IconControl.js +1 -1
- package/esm/VideoPlayer/components/IconControl/IconControl.js.map +1 -1
- package/esm/VideoPlayer/components/MuteButton/MuteButton.d.ts +2 -2
- package/esm/VideoPlayer/components/MuteButton/MuteButton.d.ts.map +1 -1
- package/esm/VideoPlayer/components/MuteButton/MuteButton.js +2 -1
- package/esm/VideoPlayer/components/MuteButton/MuteButton.js.map +1 -1
- package/esm/VideoPlayer/components/PauseIcon/PauseIcon.d.ts +2 -2
- package/esm/VideoPlayer/components/PauseIcon/PauseIcon.d.ts.map +1 -1
- package/esm/VideoPlayer/components/PauseIcon/PauseIcon.js.map +1 -1
- package/esm/VideoPlayer/components/PlayIcon/PlayIcon.d.ts +2 -2
- package/esm/VideoPlayer/components/PlayIcon/PlayIcon.d.ts.map +1 -1
- package/esm/VideoPlayer/components/PlayIcon/PlayIcon.js.map +1 -1
- package/esm/VideoPlayer/components/PlayPauseButton/PlayPauseButton.d.ts +2 -2
- package/esm/VideoPlayer/components/PlayPauseButton/PlayPauseButton.d.ts.map +1 -1
- package/esm/VideoPlayer/components/PlayPauseButton/PlayPauseButton.js.map +1 -1
- package/esm/VideoPlayer/components/Range/Range.d.ts +1 -1
- package/esm/VideoPlayer/components/Range/Range.d.ts.map +1 -1
- package/esm/VideoPlayer/components/Range/Range.js +1 -1
- package/esm/VideoPlayer/components/Range/Range.js.map +1 -1
- package/esm/VideoPlayer/components/SeekControl/SeekControl.d.ts +2 -2
- package/esm/VideoPlayer/components/SeekControl/SeekControl.d.ts.map +1 -1
- package/esm/VideoPlayer/components/SeekControl/SeekControl.js +1 -1
- package/esm/VideoPlayer/components/SeekControl/SeekControl.js.map +1 -1
- package/esm/VideoPlayer/components/VideoTooltip/VideoTooltip.d.ts +2 -2
- package/esm/VideoPlayer/components/VideoTooltip/VideoTooltip.d.ts.map +1 -1
- package/esm/VideoPlayer/components/VideoTooltip/VideoTooltip.js +3 -2
- package/esm/VideoPlayer/components/VideoTooltip/VideoTooltip.js.map +1 -1
- package/esm/VideoPlayer/components/VolumeControl/VolumeControl.d.ts +2 -1
- package/esm/VideoPlayer/components/VolumeControl/VolumeControl.d.ts.map +1 -1
- package/esm/VideoPlayer/components/VolumeControl/VolumeControl.js.map +1 -1
- package/esm/VideoPlayer/components/VolumeControl/VolumeControl.module.js +3 -2
- package/esm/VideoPlayer/hooks/useIsElementFullScreen.js.map +1 -1
- package/esm/VideoPlayer/hooks/useVideo.js.map +1 -1
- package/esm/VideoPlayer/hooks/useVideoResizeObserver.js.map +1 -1
- package/esm/animation/Animate/Animate.d.ts +1 -1
- package/esm/animation/Animate/Animate.d.ts.map +1 -1
- package/esm/animation/Animate/Animate.js +1 -1
- package/esm/animation/Animate/Animate.js.map +1 -1
- package/esm/animation/Animation.module.js +4 -3
- package/esm/animation/AnimationProvider/AnimationProvider.d.ts +1 -1
- package/esm/animation/AnimationProvider/AnimationProvider.d.ts.map +1 -1
- package/esm/animation/AnimationProvider/AnimationProvider.js.map +1 -1
- package/esm/animation/TextRevealAnimation/TextRevealAnimation.js +1 -1
- package/esm/animation/TextRevealAnimation/TextRevealAnimation.js.map +1 -1
- package/esm/animation/TextRevealAnimation/TextRevealAnimation.module.js +5 -4
- package/esm/animation/TextRevealAnimation/useTextRevealAnimationLines.js.map +1 -1
- package/esm/animation/useAnimation.js.map +1 -1
- package/esm/component-helpers/shared.module.js +3 -2
- package/esm/component-helpers.d.ts +2 -2
- package/esm/component-helpers.d.ts.map +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/css/stylesheets.js +1 -1
- package/esm/findElementInChildren.js.map +1 -1
- package/esm/forms/Checkbox/Checkbox.js +2 -2
- package/esm/forms/Checkbox/Checkbox.js.map +1 -1
- package/esm/forms/Checkbox/Checkbox.module.js +4 -3
- package/esm/forms/ControlGroup/ControlGroup.js +3 -2
- package/esm/forms/ControlGroup/ControlGroup.js.map +1 -1
- package/esm/forms/ControlGroup/ControlGroup.module.js +7 -6
- package/esm/forms/FormControl/FormControl.d.ts +5 -5
- package/esm/forms/FormControl/FormControl.d.ts.map +1 -1
- package/esm/forms/FormControl/FormControl.js +4 -3
- package/esm/forms/FormControl/FormControl.js.map +1 -1
- package/esm/forms/FormControl/FormControl.module.js +5 -4
- package/esm/forms/Radio/Radio.js +1 -1
- package/esm/forms/Radio/Radio.js.map +1 -1
- package/esm/forms/Radio/Radio.module.js +4 -3
- package/esm/forms/Select/Select.d.ts +2 -2
- package/esm/forms/Select/Select.js +1 -1
- package/esm/forms/Select/Select.js.map +1 -1
- package/esm/forms/Select/Select.module.js +4 -3
- package/esm/forms/TextInput/TextInput.js +1 -1
- package/esm/forms/TextInput/TextInput.js.map +1 -1
- package/esm/forms/TextInput/TextInput.module.js +5 -4
- package/esm/forms/Textarea/Textarea.js +1 -1
- package/esm/forms/Textarea/Textarea.js.map +1 -1
- package/esm/forms/Textarea/Textarea.module.js +4 -3
- package/esm/hooks/useAnchoredPosition.js +7 -4
- package/esm/hooks/useAnchoredPosition.js.map +1 -1
- package/esm/hooks/useCursorAnimation.js +4 -2
- package/esm/hooks/useCursorAnimation.js.map +1 -1
- package/esm/hooks/useFocusTrap.js.map +1 -1
- package/esm/hooks/useId.js.map +1 -1
- package/esm/hooks/useKeyboardEscape.js.map +1 -1
- package/esm/hooks/useOnClickOutside.js.map +1 -1
- package/esm/hooks/useReducedMotion.js +1 -1
- package/esm/hooks/useReducedMotion.js.map +1 -1
- package/esm/hooks/useRef.js.map +1 -1
- package/esm/hooks/useResizeObserver.js.map +1 -1
- package/esm/hooks/useTabs.js +1 -1
- package/esm/hooks/useTabs.js.map +1 -1
- package/esm/hooks/useWindowSize.js +7 -7
- package/esm/hooks/useWindowSize.js.map +1 -1
- package/esm/list/ListItem/ListItem.js +4 -2
- package/esm/list/ListItem/ListItem.js.map +1 -1
- package/esm/list/ListItem/ListItem.module.js +5 -4
- package/esm/list/OrderedList/OrderedList.d.ts +2 -2
- package/esm/list/OrderedList/OrderedList.d.ts.map +1 -1
- package/esm/list/OrderedList/OrderedList.js +1 -1
- package/esm/list/OrderedList/OrderedList.js.map +1 -1
- package/esm/list/OrderedList/OrderedList.module.js +3 -2
- package/esm/list/UnorderedList/UnorderedList.d.ts +2 -2
- package/esm/list/UnorderedList/UnorderedList.d.ts.map +1 -1
- package/esm/list/UnorderedList/UnorderedList.js +1 -1
- package/esm/list/UnorderedList/UnorderedList.js.map +1 -1
- package/esm/list/list-shared.module.js +3 -2
- package/esm/list/listContext.js.map +1 -1
- package/esm/node_modules/@primer/octicons-react/dist/icons/AlertFillIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/AlertFillIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ArrowUpIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ArrowUpIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ArrowUpRightIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ArrowUpRightIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CheckCircleFillIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CheckCircleFillIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CheckIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CheckIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronDownIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronDownIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronLeftIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronLeftIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronRightIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronRightIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronUpIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ChevronUpIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CopilotIcon.js +33 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/CopilotIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/DashIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/DashIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/LinkExternalIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/LinkExternalIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/MarkGithubIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/MarkGithubIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/MuteIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/MuteIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PaperAirplaneIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PaperAirplaneIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PauseIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PauseIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PlayIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/PlayIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ReplyIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ReplyIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ScreenFullIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ScreenFullIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ScreenNormalIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/ScreenNormalIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/SearchIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/SearchIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/TriangleDownIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/TriangleDownIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/TriangleUpIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/TriangleUpIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/UnmuteIcon.js +20 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/UnmuteIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/XIcon.js +28 -0
- package/esm/node_modules/@primer/octicons-react/dist/icons/XIcon.js.map +1 -0
- package/esm/node_modules/@primer/octicons-react/dist/renderOcticon-DuMQdmQC.js +132 -0
- package/esm/node_modules/@primer/octicons-react/dist/renderOcticon-DuMQdmQC.js.map +1 -0
- package/esm/node_modules/clsx/dist/clsx.js +1 -1
- package/esm/node_modules/clsx/dist/clsx.js.map +1 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css +1 -0
- package/esm/river/River/River.js +2 -2
- package/esm/river/River/River.js.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.d.ts +4 -4
- package/esm/river/RiverAccordion/RiverAccordion.js +3 -2
- package/esm/river/RiverAccordion/RiverAccordion.js.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module.js +16 -15
- package/esm/river/RiverBreakout/RiverBreakout.d.ts +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.js +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +5 -5
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js +2 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js +31 -30
- package/esm/river/RiverStoryScroll/RiverStoryScroll.d.ts +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.d.ts.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.js +5 -3
- package/esm/river/RiverStoryScroll/RiverStoryScroll.js.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScroll.module.js +8 -7
- package/esm/river/RiverStoryScroll/RiverStoryScrollProvider.d.ts +2 -2
- package/esm/river/RiverStoryScroll/RiverStoryScrollProvider.d.ts.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollProvider.js.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollResponder.d.ts +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollResponder.d.ts.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollResponder.js +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollResponder.js.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollTracker.d.ts +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollTracker.d.ts.map +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollTracker.js +1 -1
- package/esm/river/RiverStoryScroll/RiverStoryScrollTracker.js.map +1 -1
- package/esm/river/river-shared.module.js +13 -12
- package/esm/utils/getTextContent.js.map +1 -1
- package/esm/utils/isFragmentElement.js.map +1 -1
- package/lib/Accordion/Accordion.d.ts +2 -2
- package/lib/ActionMenu/ActionMenu.d.ts +2 -2
- package/lib/AnchorNav/AnchorNav.d.ts +4 -4
- package/lib/Bento/Bento.d.ts +4 -4
- package/lib/Box/Box.d.ts +1 -1
- package/lib/CTABanner/CTABanner.d.ts +1 -1
- package/lib/Card/Card.d.ts +2 -2
- package/lib/ComparisonTable/ComparisonTable.d.ts +3 -3
- package/lib/ExpandableArrow/ExpandableArrow.d.ts +2 -1
- package/lib/FAQ/FAQ.d.ts +2 -2
- package/lib/FAQ/FAQGroup.d.ts +2 -2
- package/lib/Footnotes/Footnotes.d.ts +2 -2
- package/lib/FrostedGlassVFX/FrostedGlassVFX.d.ts +1 -1
- package/lib/Grid/Grid.d.ts +2 -2
- package/lib/IDE/IDE.d.ts +1 -1
- package/lib/Icon/Icon.d.ts +2 -2
- package/lib/Image/Image.d.ts +1 -1
- package/lib/Link/Link.d.ts +1 -1
- package/lib/LogoSuite/LogoSuite.d.ts +1 -1
- package/lib/MediaPlaylist/MediaPlaylist.d.ts +4 -4
- package/lib/MinimalFooter/MinimalFooter.d.ts +3 -3
- package/lib/Pagination/Pagination.d.ts +1 -1
- package/lib/Pillar/Pillar.d.ts +2 -2
- package/lib/PricingOptions/PricingOptions.d.ts +1 -1
- package/lib/SectionIntroStacked/SectionIntroStacked.d.ts +3 -3
- package/lib/SubNav/SubNav.d.ts +4 -4
- package/lib/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
- package/lib/SubdomainNavBar/SubdomainNavBar.d.ts +157 -20
- package/lib/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +8 -0
- package/lib/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +7 -0
- package/lib/SubdomainNavBar/useSearchResults.d.ts +23 -0
- package/lib/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
- package/lib/Testimonial/Testimonial.d.ts +1 -1
- package/lib/Text/Text.d.ts +1 -1
- package/lib/TextCursorAnimation/TextCursorAnimation.d.ts +1 -1
- package/lib/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/lib/Timeline/Timeline.d.ts +3 -3
- package/lib/VideoPlayer/VideoPlayer.d.ts +2 -2
- package/lib/VideoPlayer/components/CCButton/CCButton.d.ts +2 -2
- package/lib/VideoPlayer/components/Captions/Captions.d.ts +2 -2
- package/lib/VideoPlayer/components/ControlsBar/ControlsBar.d.ts +2 -2
- package/lib/VideoPlayer/components/FullScreenButton/FullScreenButton.d.ts +2 -2
- package/lib/VideoPlayer/components/IconControl/IconControl.d.ts +2 -2
- package/lib/VideoPlayer/components/MuteButton/MuteButton.d.ts +2 -2
- package/lib/VideoPlayer/components/PauseIcon/PauseIcon.d.ts +2 -2
- package/lib/VideoPlayer/components/PlayIcon/PlayIcon.d.ts +2 -2
- package/lib/VideoPlayer/components/PlayPauseButton/PlayPauseButton.d.ts +2 -2
- package/lib/VideoPlayer/components/Range/Range.d.ts +1 -1
- package/lib/VideoPlayer/components/SeekControl/SeekControl.d.ts +2 -2
- package/lib/VideoPlayer/components/VideoTooltip/VideoTooltip.d.ts +2 -2
- package/lib/VideoPlayer/components/VolumeControl/VolumeControl.d.ts +2 -1
- package/lib/animation/Animate/Animate.d.ts +1 -1
- package/lib/animation/AnimationProvider/AnimationProvider.d.ts +1 -1
- package/lib/component-helpers.d.ts +2 -2
- package/lib/css/main.css +1390 -1056
- package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
- package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
- package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +7 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
- package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +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 +3 -0
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.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/forms/FormControl/FormControl.d.ts +5 -5
- package/lib/forms/Select/Select.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/list/OrderedList/OrderedList.d.ts +2 -2
- package/lib/list/UnorderedList/UnorderedList.d.ts +2 -2
- package/lib/river/RiverAccordion/RiverAccordion.d.ts +4 -4
- package/lib/river/RiverBreakout/RiverBreakout.d.ts +1 -1
- package/lib/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +5 -5
- package/lib/river/RiverStoryScroll/RiverStoryScroll.d.ts +1 -1
- package/lib/river/RiverStoryScroll/RiverStoryScrollProvider.d.ts +2 -2
- package/lib/river/RiverStoryScroll/RiverStoryScrollResponder.d.ts +1 -1
- package/lib/river/RiverStoryScroll/RiverStoryScrollTracker.d.ts +1 -1
- package/llms.txt +2 -2
- package/package.json +24 -24
- package/esm/SubdomainNavBar/SubdomainNavBar.module-Rf4qEDka.css +0 -1
- package/esm/node_modules/@primer/octicons-react/dist/index.esm.js +0 -434
- package/esm/node_modules/@primer/octicons-react/dist/index.esm.js.map +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-ehJCoExh.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
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";
|
|
@@ -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 {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,
|
|
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,UAAU,GAWrD,IAAO,GACV,EAAC,YAAS,cAAW,aAAU,UAAO,aAAU,WAAW,GAAG,KAA2B,MAA0B;CAClH,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,CAAO,GAGjF,IACJ,EAAsB,GAAU,GAAG,KAAK,EAAsB,GAAU,IAAI,IAAI,UAAU;CAW5F,OATK,EAAsB,GAAU,CAAW,+BACjB,iBAAA,QAAA,IAAA,aAA0C,WAErE,QAAQ,KACN,6GACF,GAKF,kBAAC,WAAD;EACO;EACL,WAAW,EACT,EAAO,eACP,MAAY,cAAc,EAAO,oCACjC,MAAY,cAAc,EAAe,UACzC,MAAiB,WAAW,EAAO,yBACnC,GACA,CACF;EACA,OAAO;GAAC,GAAG;GAAuB,GAAG;EAAK;EAC1C,GAAI;EAEH;CACM,CAAA;AAEb,CACF,GAEM,KAAe,EAAC,QAAK,MAAM,kBAC/B,kBAAC,GAAD;CAAS,WAAU;CAAsB;CACtC;AACM,CAAA,GAGL,IAAS,GAAkD,EAAC,cAAW,GAAG,KAAQ,MACtF,kBAAC,GAAD;CAAsB;CAAgB;CAAW,GAAI;AAAQ,CAAA,CAC9D,GAEY,IAAgB,OAAO,OAAO,GAAM;CAAC;CAAQ,SAAS;CAAc;AAAW,CAAC"}
|
|
@@ -59,11 +59,11 @@ export declare const RiverBreakoutTabs: React.ForwardRefExoticComponent<{
|
|
|
59
59
|
} & {
|
|
60
60
|
children?: React.ReactNode | undefined;
|
|
61
61
|
} & Omit<React.HTMLAttributes<HTMLElement>, "onChange"> & React.RefAttributes<HTMLElement>> & {
|
|
62
|
-
A11yHeading: ({ as, children, id }: RiverBreakoutTabsA11yHeadingProps) =>
|
|
63
|
-
Content: ({ children, className, ...props }: RiverBreakoutTabsContentProps) =>
|
|
64
|
-
Heading: ({ as, children, className, size, weight, ...props }: RiverBreakoutTabsHeadingProps) =>
|
|
65
|
-
Icon: ({ color, ...props }: RiverBreakoutTabsIconProps) =>
|
|
66
|
-
Item: ({ children }: RiverBreakoutTabsItemProps) =>
|
|
62
|
+
A11yHeading: ({ as, children, id }: RiverBreakoutTabsA11yHeadingProps) => React.JSX.Element;
|
|
63
|
+
Content: ({ children, className, ...props }: RiverBreakoutTabsContentProps) => React.JSX.Element;
|
|
64
|
+
Heading: ({ as, children, className, size, weight, ...props }: RiverBreakoutTabsHeadingProps) => React.JSX.Element;
|
|
65
|
+
Icon: ({ color, ...props }: RiverBreakoutTabsIconProps) => React.JSX.Element;
|
|
66
|
+
Item: ({ children }: RiverBreakoutTabsItemProps) => React.JSX.Element;
|
|
67
67
|
Visual: React.ForwardRefExoticComponent<Omit<RiverVisualBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
68
68
|
};
|
|
69
69
|
//# sourceMappingURL=RiverBreakoutTabs.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as 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/
|
|
5
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/base-Ue-p74RC.css';import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.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 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverBreakoutTabs.js","names":[],"sources":["../../../src/river/RiverBreakoutTabs/RiverBreakoutTabs.tsx"],"sourcesContent":["import React, {cloneElement, forwardRef, useCallback, useEffect, useMemo, useRef, useState} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Accordion, Heading, Link, Text, type HeadingProps} from '../..'\nimport {Icon, type IconProps} from '../../Icon'\nimport {RiverVisualBase, type RiverVisualBaseProps} from '../River/River'\nimport {useId} from '../../hooks/useId'\nimport {useTabs} from '../../hooks/useTabs'\nimport {useWindowSize} from '../../hooks/useWindowSize'\nimport riverStyles from '../river-shared.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\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 './RiverBreakoutTabs.module.css'\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement<T>(element) && element.type === componentType\n\nexport type RiverBreakoutTabsProps = React.PropsWithChildren<{\n defaultSelectedIndex?: number\n selectedIndex?: number\n onChange?: (selectedIndex: number) => void\n /**\n * Decorative background rendered behind the visual and persisted across tab\n * changes. Must not contain interactive and remain purely decorative.\n */\n backgroundVisual?: React.ReactNode\n /**\n * Alignment of media within the visual container when `backgroundVisual` is provided\n */\n imagePosition?: 'center' | 'block-end'\n /**\n * When `true`, the `backgroundVisual` bleeds out to the gridline edges instead of being inset within them\n */\n backgroundVisualFullBleed?: boolean\n}> &\n Omit<React.HTMLAttributes<HTMLElement>, 'onChange'>\n\nexport type RiverBreakoutTabsItemProps = React.PropsWithChildren<{\n className?: string\n}>\n\nexport type RiverBreakoutTabsA11yHeadingProps = React.PropsWithChildren<{\n as?: 'h2' | 'h3'\n id?: string\n}>\n\nexport type RiverBreakoutTabsHeadingProps = HeadingProps\n\nexport type RiverBreakoutTabsContentProps = React.HTMLAttributes<HTMLDivElement>\n\nexport type RiverBreakoutTabsIconProps = IconProps\n\nexport type RiverBreakoutTabsVisualProps = RiverVisualBaseProps\n\ntype RiverBreakoutTabsItemChild =\n | React.ReactElement<RiverBreakoutTabsIconProps>\n | React.ReactElement<RiverBreakoutTabsHeadingProps>\n | React.ReactElement<RiverBreakoutTabsContentProps>\n | React.ReactElement<RiverBreakoutTabsVisualProps>\n\ntype ExtractedItemParts = {\n icon: React.ReactElement<RiverBreakoutTabsIconProps> | null\n heading: React.ReactElement<RiverBreakoutTabsHeadingProps> | null\n content: React.ReactElement<RiverBreakoutTabsContentProps> | null\n visual: React.ReactElement<RiverBreakoutTabsVisualProps> | null\n className?: string\n}\n\ntype ExtractedContentParts = {\n action: React.ReactElement<React.ComponentProps<typeof Link>> | null\n body: React.ReactNode[]\n}\n\nconst RiverBreakoutTabsItem = ({children}: RiverBreakoutTabsItemProps) => <>{children}</>\n\nconst RiverBreakoutTabsA11yHeading = ({as = 'h3', children, id}: RiverBreakoutTabsA11yHeadingProps) => (\n <Heading as={as} id={id} className=\"visually-hidden\">\n {children}\n </Heading>\n)\n\nconst RiverBreakoutTabsIcon = ({color = 'green', ...props}: RiverBreakoutTabsIconProps) => (\n <Icon color={color} {...props} />\n)\n\nconst RiverBreakoutTabsHeading = ({\n as = 'h3',\n children,\n className,\n size = 'subhead-large',\n weight = 'normal',\n ...props\n}: RiverBreakoutTabsHeadingProps) => (\n <Heading\n as={as}\n className={clsx(styles.RiverBreakoutTabs__heading, className)}\n size={size}\n weight={weight}\n {...props}\n >\n {children}\n </Heading>\n)\n\nconst RiverBreakoutTabsContent = ({children, className, ...props}: RiverBreakoutTabsContentProps) => {\n const Children = useMemo(\n () =>\n React.Children.toArray(children).map(child => {\n if (isTextChild(child)) {\n return cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n })\n }\n\n if (isLinkChild(child)) {\n return cloneElement(child, {\n className: clsx(child.props.className, styles.RiverBreakoutTabs__link),\n size: child.props.size ?? 'medium',\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n }),\n [children],\n )\n\n return (\n <div className={clsx(styles.RiverBreakoutTabs__content, className)} {...props}>\n {Children}\n </div>\n )\n}\n\nconst RiverBreakoutTabsVisual = forwardRef<HTMLDivElement, RiverBreakoutTabsVisualProps>(\n ({className, ...props}, ref) => <RiverVisualBase ref={ref} className={className} {...props} />,\n)\n\nconst isItem = createComponentTypeGuard(RiverBreakoutTabsItem)\nconst isA11yHeading = createComponentTypeGuard(RiverBreakoutTabsA11yHeading)\nconst isIcon = createComponentTypeGuard(RiverBreakoutTabsIcon)\nconst isHeading = createComponentTypeGuard(RiverBreakoutTabsHeading)\nconst isContent = createComponentTypeGuard(RiverBreakoutTabsContent)\nconst isVisual = createComponentTypeGuard(RiverBreakoutTabsVisual)\n\nconst isTextChild = (child: React.ReactNode): child is React.ReactElement<React.ComponentProps<typeof Text>> =>\n React.isValidElement<React.ComponentProps<typeof Text>>(child) && child.type === Text\n\nconst isLinkChild = (child: React.ReactNode): child is React.ReactElement<React.ComponentProps<typeof Link>> =>\n React.isValidElement<React.ComponentProps<typeof Link>>(child) && child.type === Link\n\nconst extractItemParts = (item: React.ReactElement<RiverBreakoutTabsItemProps>): ExtractedItemParts => {\n const Children = React.Children.toArray(item.props.children) as RiverBreakoutTabsItemChild[]\n\n return Children.reduce<ExtractedItemParts>(\n (acc, child) => {\n if (isIcon(child)) {\n acc.icon = child\n }\n\n if (isHeading(child)) {\n acc.heading = child\n }\n\n if (isContent(child)) {\n acc.content = child\n }\n\n if (isVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {icon: null, heading: null, content: null, visual: null, className: item.props.className},\n )\n}\n\nconst extractWideTabListContentParts = (\n content: React.ReactElement<RiverBreakoutTabsContentProps> | null,\n): ExtractedContentParts => {\n if (!content) {\n return {action: null, body: []}\n }\n\n const Children = React.Children.toArray(content.props.children).map(child => {\n if (isTextChild(child)) {\n return cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n })\n }\n\n if (isLinkChild(child)) {\n return cloneElement(child, {\n className: clsx(child.props.className, styles.RiverBreakoutTabs__link),\n size: child.props.size ?? 'medium',\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n\n return Children.reduce<ExtractedContentParts>(\n (acc, child) => {\n if (isLinkChild(child)) {\n if (!acc.action) {\n acc.action = child\n }\n\n return acc\n }\n\n acc.body.push(child)\n return acc\n },\n {action: null, body: []},\n )\n}\n\nconst clampIndex = (index: number, length: number) => {\n if (length === 0) return -1\n\n const normalizedIndex = Number.isFinite(index) ? Math.trunc(index) : 0\n return Math.min(Math.max(normalizedIndex, 0), length - 1)\n}\n\nconst RiverBreakoutTabsRoot = forwardRef<HTMLElement, RiverBreakoutTabsProps>(\n (\n {\n children,\n className,\n defaultSelectedIndex = 0,\n onChange,\n selectedIndex,\n backgroundVisual,\n imagePosition = 'center',\n backgroundVisualFullBleed = false,\n ...props\n },\n ref,\n ) => {\n const instanceId = useId()\n const {isLarge} = useWindowSize()\n\n const Children = useMemo(() => React.Children.toArray(children), [children])\n\n const A11yHeadingChild = Children.find(isA11yHeading) ?? null\n const Items = Children.filter(isItem)\n .map(extractItemParts)\n .filter(item => item.heading && item.content && item.visual)\n\n const defaultActiveIndex = clampIndex(defaultSelectedIndex, Items.length)\n const controlledActiveIndex =\n typeof selectedIndex === 'number' && Number.isFinite(selectedIndex)\n ? clampIndex(selectedIndex, Items.length)\n : null\n const initialActiveIndex = controlledActiveIndex ?? defaultActiveIndex\n const headingId = A11yHeadingChild?.props.id ?? `${instanceId}-heading`\n const wideTabListColumns = Math.min(Math.max(Items.length, 1), 3)\n const initialActiveTab = initialActiveIndex >= 0 ? String(initialActiveIndex) : undefined\n const isWideTabList = isLarge === true\n const suppressOnTabActivateRef = useRef(false)\n\n const handleTabActivate = useCallback(\n (id: string) => {\n if (suppressOnTabActivateRef.current) {\n suppressOnTabActivateRef.current = false\n return\n }\n\n if (!onChange) return\n\n const nextIndex = Number(id)\n if (!Number.isNaN(nextIndex)) {\n onChange(nextIndex)\n }\n },\n [onChange],\n )\n\n const {activeTab, activateTab, getTabListProps, getTabPanelProps, getTabProps} = useTabs({\n defaultTab: initialActiveTab,\n onTabActivate: handleTabActivate,\n })\n\n const [activeAccordionIndex, setActiveAccordionIndex] = useState(initialActiveIndex)\n\n useEffect(() => {\n if (activeTab === null) return\n\n const nextIndex = Number(activeTab)\n if (!Number.isNaN(nextIndex)) {\n setActiveAccordionIndex(nextIndex)\n }\n }, [activeTab])\n\n useEffect(() => {\n if (controlledActiveIndex === null || controlledActiveIndex < 0) return\n\n const controlledTab = String(controlledActiveIndex)\n if (activeTab !== controlledTab) {\n suppressOnTabActivateRef.current = true\n activateTab(controlledTab)\n }\n\n setActiveAccordionIndex(controlledActiveIndex)\n }, [activateTab, activeTab, controlledActiveIndex])\n\n if (!A11yHeadingChild && (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test')) {\n // eslint-disable-next-line no-console\n console.warn(\n 'RiverBreakoutTabs: A11yHeading child is required. This element will not be visible, only read by screenreaders.',\n )\n }\n\n const handleAccordionOpen = (index: number) => (isOpen: boolean) => {\n if (isOpen) {\n setActiveAccordionIndex(index)\n if (activeTab !== String(index)) {\n activateTab(String(index))\n }\n }\n }\n\n const handleAccordionToggle: React.ReactEventHandler<HTMLDetailsElement> = event => {\n const toggledIndex = Number(event.currentTarget.getAttribute('data-index'))\n\n if (!event.currentTarget.open && activeAccordionIndex === toggledIndex) {\n event.currentTarget.open = true\n }\n }\n\n const tabListProps = A11yHeadingChild\n ? getTabListProps({labelledBy: headingId})\n : getTabListProps({label: 'River breakout tabs'})\n const WideTabListContentParts = useMemo(\n () => Items.map(item => extractWideTabListContentParts(item.content)),\n [Items],\n )\n\n const BackgroundVisualLayer =\n backgroundVisual != null ? (\n <div className={styles.RiverBreakoutTabs__backgroundVisual} aria-hidden=\"true\">\n {backgroundVisual}\n </div>\n ) : null\n\n return (\n <section\n ref={ref}\n className={clsx(\n riverStyles.RiverBreakout,\n riverStyles['RiverBreakout--variant-gridline'],\n gridlineStyles.gridline,\n styles.RiverBreakoutTabs,\n backgroundVisual != null && styles['RiverBreakoutTabs--has-background-visual'],\n backgroundVisual != null &&\n imagePosition === 'block-end' &&\n styles['RiverBreakoutTabs--image-position-block-end'],\n backgroundVisual != null &&\n backgroundVisualFullBleed &&\n styles['RiverBreakoutTabs--background-visual-full-bleed'],\n className,\n )}\n {...props}\n >\n {A11yHeadingChild && cloneElement(A11yHeadingChild, {id: headingId})}\n\n {isWideTabList ? (\n <div className={styles.RiverBreakoutTabs__wideTabList}>\n <div\n {...tabListProps}\n className={styles.RiverBreakoutTabs__tablist}\n style={{'--river-breakout-tabs-columns': String(wideTabListColumns)} as React.CSSProperties}\n >\n {Items.map((item, index) => {\n const isSelected = activeTab === String(index)\n const tabProps = getTabProps<HTMLButtonElement>(String(index))\n const {body} = WideTabListContentParts[index]\n\n return (\n <div\n key={index}\n className={clsx(\n styles.RiverBreakoutTabs__item,\n isSelected && styles['RiverBreakoutTabs__item--selected'],\n item.className,\n )}\n >\n <button type=\"button\" {...tabProps} className={styles.RiverBreakoutTabs__tab}>\n {item.icon &&\n cloneElement(item.icon, {\n className: item.icon.props.className,\n })}\n\n {item.heading &&\n cloneElement(item.heading, {\n className: clsx(item.heading.props.className, styles.RiverBreakoutTabs__tabHeading),\n })}\n\n {body.length > 0 && <div className={styles.RiverBreakoutTabs__wideTabListContent}>{body}</div>}\n </button>\n </div>\n )\n })}\n </div>\n\n <div className={styles.RiverBreakoutTabs__sharedVisuals}>\n {BackgroundVisualLayer}\n {Items.map((item, index) => {\n const panelProps = getTabPanelProps(String(index))\n\n return (\n <div\n key={index}\n {...panelProps}\n tabIndex={-1}\n className={styles.RiverBreakoutTabs__sharedVisualPanel}\n >\n {cloneElement(item.visual as React.ReactElement<RiverBreakoutTabsVisualProps>, {\n className: clsx(item.visual?.props.className, styles.RiverBreakoutTabs__sharedVisual),\n })}\n </div>\n )\n })}\n </div>\n\n {WideTabListContentParts.some(content => content.action) && (\n <div\n className={styles.RiverBreakoutTabs__wideTabListActions}\n style={{'--river-breakout-tabs-columns': String(wideTabListColumns)} as React.CSSProperties}\n >\n {Items.map((_, index) => {\n const {action} = WideTabListContentParts[index]\n\n return (\n <div key={index} className={styles.RiverBreakoutTabs__wideTabListActionItem}>\n {action &&\n cloneElement(action, {\n className: clsx(action.props.className, styles.RiverBreakoutTabs__wideTabListAction),\n })}\n </div>\n )\n })}\n </div>\n )}\n </div>\n ) : (\n <div className={styles.RiverBreakoutTabs__accordion}>\n {activeAccordionIndex >= 0 && Items[activeAccordionIndex]?.visual && (\n <div className={styles.RiverBreakoutTabs__accordionSharedVisuals}>\n {BackgroundVisualLayer}\n {cloneElement(Items[activeAccordionIndex].visual as React.ReactElement<RiverBreakoutTabsVisualProps>, {\n className: clsx(\n Items[activeAccordionIndex].visual.props.className,\n styles.RiverBreakoutTabs__accordionSharedVisual,\n ),\n })}\n </div>\n )}\n\n {Items.map((item, index) => {\n return (\n <Accordion\n key={index}\n data-index={index}\n className={clsx(\n styles.RiverBreakoutTabs__accordionItem,\n index === activeAccordionIndex && styles['RiverBreakoutTabs__item--selected'],\n item.className,\n )}\n onToggle={handleAccordionToggle}\n open={index === activeAccordionIndex}\n handleOpen={handleAccordionOpen(index)}\n >\n <Accordion.Heading className={styles.RiverBreakoutTabs__accordionHeading}>\n <span className={styles.RiverBreakoutTabs__accordionHeadingInner}>\n {item.icon &&\n cloneElement(item.icon, {\n className: clsx(item.icon.props.className, styles.RiverBreakoutTabs__accordionIcon),\n })}\n <span className={styles.RiverBreakoutTabs__accordionLabel}>{item.heading?.props.children}</span>\n </span>\n </Accordion.Heading>\n\n <Accordion.Content className={styles.RiverBreakoutTabs__accordionPanel}>\n {cloneElement(item.content as React.ReactElement<RiverBreakoutTabsContentProps>, {\n className: clsx(item.content?.props.className, styles.RiverBreakoutTabs__accordionContent),\n })}\n </Accordion.Content>\n </Accordion>\n )\n })}\n </div>\n )}\n </section>\n )\n },\n)\n\n/**\n * Use RiverBreakoutTabs to showcase multiple feature stories within a single immersive surface.\n */\nexport const RiverBreakoutTabs = Object.assign(RiverBreakoutTabsRoot, {\n A11yHeading: RiverBreakoutTabsA11yHeading,\n Content: RiverBreakoutTabsContent,\n Heading: RiverBreakoutTabsHeading,\n Icon: RiverBreakoutTabsIcon,\n Item: RiverBreakoutTabsItem,\n Visual: RiverBreakoutTabsVisual,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAM,KACC,OACJ,MACC,EAAM,eAAkB,EAAQ,IAAI,EAAQ,SAAS,GA0DnD,KAAyB,EAAC,kBAA0C,kBAAA,GAAA,EAAG,aAAY,CAAA,EAEnF,KAAgC,EAAC,QAAK,MAAM,aAAU,YAC1D,kBAAC,GAAD;CAAa;CAAQ;CAAI,WAAU;CAChC;CACO,CAAA,EAGN,KAAyB,EAAC,WAAQ,SAAS,GAAG,QAClD,kBAAC,GAAD;CAAa;CAAO,GAAI;CAAS,CAAA,EAG7B,KAA4B,EAChC,QAAK,MACL,aACA,cACA,UAAO,iBACP,YAAS,UACT,GAAG,QAEH,kBAAC,GAAD;CACM;CACJ,WAAW,EAAK,EAAO,4BAA4B,EAAU;CACvD;CACE;CACR,GAAI;CAEH;CACO,CAAA,EAGN,KAA4B,EAAC,aAAU,cAAW,GAAG,QAA0C;CACnG,IAAM,IAAW,QAEb,EAAM,SAAS,QAAQ,EAAS,CAAC,KAAI,MAC/B,EAAY,EAAM,GACb,EAAa,GAAO;EACzB,IAAI,EAAM,MAAM,MAAM;EACtB,SAAS,EAAM,MAAM,WAAW;EACjC,CAAC,GAGA,EAAY,EAAM,GACb,EAAa,GAAO;EACzB,WAAW,EAAK,EAAM,MAAM,WAAW,EAAO,wBAAwB;EACtE,MAAM,EAAM,MAAM,QAAQ;EAC1B,SAAS,EAA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;CACT,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACT,CAAC"}
|
|
1
|
+
{"version":3,"file":"RiverBreakoutTabs.js","names":[],"sources":["../../../src/river/RiverBreakoutTabs/RiverBreakoutTabs.tsx"],"sourcesContent":["import React, {cloneElement, forwardRef, useCallback, useEffect, useMemo, useRef, useState} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Accordion, Heading, Link, Text, type HeadingProps} from '../..'\nimport {Icon, type IconProps} from '../../Icon'\nimport {RiverVisualBase, type RiverVisualBaseProps} from '../River/River'\nimport {useId} from '../../hooks/useId'\nimport {useTabs} from '../../hooks/useTabs'\nimport {useWindowSize} from '../../hooks/useWindowSize'\nimport riverStyles from '../river-shared.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\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 './RiverBreakoutTabs.module.css'\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement<T>(element) && element.type === componentType\n\nexport type RiverBreakoutTabsProps = React.PropsWithChildren<{\n defaultSelectedIndex?: number\n selectedIndex?: number\n onChange?: (selectedIndex: number) => void\n /**\n * Decorative background rendered behind the visual and persisted across tab\n * changes. Must not contain interactive and remain purely decorative.\n */\n backgroundVisual?: React.ReactNode\n /**\n * Alignment of media within the visual container when `backgroundVisual` is provided\n */\n imagePosition?: 'center' | 'block-end'\n /**\n * When `true`, the `backgroundVisual` bleeds out to the gridline edges instead of being inset within them\n */\n backgroundVisualFullBleed?: boolean\n}> &\n Omit<React.HTMLAttributes<HTMLElement>, 'onChange'>\n\nexport type RiverBreakoutTabsItemProps = React.PropsWithChildren<{\n className?: string\n}>\n\nexport type RiverBreakoutTabsA11yHeadingProps = React.PropsWithChildren<{\n as?: 'h2' | 'h3'\n id?: string\n}>\n\nexport type RiverBreakoutTabsHeadingProps = HeadingProps\n\nexport type RiverBreakoutTabsContentProps = React.HTMLAttributes<HTMLDivElement>\n\nexport type RiverBreakoutTabsIconProps = IconProps\n\nexport type RiverBreakoutTabsVisualProps = RiverVisualBaseProps\n\ntype RiverBreakoutTabsItemChild =\n | React.ReactElement<RiverBreakoutTabsIconProps>\n | React.ReactElement<RiverBreakoutTabsHeadingProps>\n | React.ReactElement<RiverBreakoutTabsContentProps>\n | React.ReactElement<RiverBreakoutTabsVisualProps>\n\ntype ExtractedItemParts = {\n icon: React.ReactElement<RiverBreakoutTabsIconProps> | null\n heading: React.ReactElement<RiverBreakoutTabsHeadingProps> | null\n content: React.ReactElement<RiverBreakoutTabsContentProps> | null\n visual: React.ReactElement<RiverBreakoutTabsVisualProps> | null\n className?: string\n}\n\ntype ExtractedContentParts = {\n action: React.ReactElement<React.ComponentProps<typeof Link>> | null\n body: React.ReactNode[]\n}\n\nconst RiverBreakoutTabsItem = ({children}: RiverBreakoutTabsItemProps) => <>{children}</>\n\nconst RiverBreakoutTabsA11yHeading = ({as = 'h3', children, id}: RiverBreakoutTabsA11yHeadingProps) => (\n <Heading as={as} id={id} className=\"visually-hidden\">\n {children}\n </Heading>\n)\n\nconst RiverBreakoutTabsIcon = ({color = 'green', ...props}: RiverBreakoutTabsIconProps) => (\n <Icon color={color} {...props} />\n)\n\nconst RiverBreakoutTabsHeading = ({\n as = 'h3',\n children,\n className,\n size = 'subhead-large',\n weight = 'normal',\n ...props\n}: RiverBreakoutTabsHeadingProps) => (\n <Heading\n as={as}\n className={clsx(styles.RiverBreakoutTabs__heading, className)}\n size={size}\n weight={weight}\n {...props}\n >\n {children}\n </Heading>\n)\n\nconst RiverBreakoutTabsContent = ({children, className, ...props}: RiverBreakoutTabsContentProps) => {\n const Children = useMemo(\n () =>\n React.Children.toArray(children).map(child => {\n if (isTextChild(child)) {\n return cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n })\n }\n\n if (isLinkChild(child)) {\n return cloneElement(child, {\n className: clsx(child.props.className, styles.RiverBreakoutTabs__link),\n size: child.props.size ?? 'medium',\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n }),\n [children],\n )\n\n return (\n <div className={clsx(styles.RiverBreakoutTabs__content, className)} {...props}>\n {Children}\n </div>\n )\n}\n\nconst RiverBreakoutTabsVisual = forwardRef<HTMLDivElement, RiverBreakoutTabsVisualProps>(\n ({className, ...props}, ref) => <RiverVisualBase ref={ref} className={className} {...props} />,\n)\n\nconst isItem = createComponentTypeGuard(RiverBreakoutTabsItem)\nconst isA11yHeading = createComponentTypeGuard(RiverBreakoutTabsA11yHeading)\nconst isIcon = createComponentTypeGuard(RiverBreakoutTabsIcon)\nconst isHeading = createComponentTypeGuard(RiverBreakoutTabsHeading)\nconst isContent = createComponentTypeGuard(RiverBreakoutTabsContent)\nconst isVisual = createComponentTypeGuard(RiverBreakoutTabsVisual)\n\nconst isTextChild = (child: React.ReactNode): child is React.ReactElement<React.ComponentProps<typeof Text>> =>\n React.isValidElement<React.ComponentProps<typeof Text>>(child) && child.type === Text\n\nconst isLinkChild = (child: React.ReactNode): child is React.ReactElement<React.ComponentProps<typeof Link>> =>\n React.isValidElement<React.ComponentProps<typeof Link>>(child) && child.type === Link\n\nconst extractItemParts = (item: React.ReactElement<RiverBreakoutTabsItemProps>): ExtractedItemParts => {\n const Children = React.Children.toArray(item.props.children) as RiverBreakoutTabsItemChild[]\n\n return Children.reduce<ExtractedItemParts>(\n (acc, child) => {\n if (isIcon(child)) {\n acc.icon = child\n }\n\n if (isHeading(child)) {\n acc.heading = child\n }\n\n if (isContent(child)) {\n acc.content = child\n }\n\n if (isVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {icon: null, heading: null, content: null, visual: null, className: item.props.className},\n )\n}\n\nconst extractWideTabListContentParts = (\n content: React.ReactElement<RiverBreakoutTabsContentProps> | null,\n): ExtractedContentParts => {\n if (!content) {\n return {action: null, body: []}\n }\n\n const Children = React.Children.toArray(content.props.children).map(child => {\n if (isTextChild(child)) {\n return cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n })\n }\n\n if (isLinkChild(child)) {\n return cloneElement(child, {\n className: clsx(child.props.className, styles.RiverBreakoutTabs__link),\n size: child.props.size ?? 'medium',\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n\n return Children.reduce<ExtractedContentParts>(\n (acc, child) => {\n if (isLinkChild(child)) {\n if (!acc.action) {\n acc.action = child\n }\n\n return acc\n }\n\n acc.body.push(child)\n return acc\n },\n {action: null, body: []},\n )\n}\n\nconst clampIndex = (index: number, length: number) => {\n if (length === 0) return -1\n\n const normalizedIndex = Number.isFinite(index) ? Math.trunc(index) : 0\n return Math.min(Math.max(normalizedIndex, 0), length - 1)\n}\n\nconst RiverBreakoutTabsRoot = forwardRef<HTMLElement, RiverBreakoutTabsProps>(\n (\n {\n children,\n className,\n defaultSelectedIndex = 0,\n onChange,\n selectedIndex,\n backgroundVisual,\n imagePosition = 'center',\n backgroundVisualFullBleed = false,\n ...props\n },\n ref,\n ) => {\n const instanceId = useId()\n const {isLarge} = useWindowSize()\n\n const Children = useMemo(() => React.Children.toArray(children), [children])\n\n const A11yHeadingChild = Children.find(isA11yHeading) ?? null\n const Items = Children.filter(isItem)\n .map(extractItemParts)\n .filter(item => item.heading && item.content && item.visual)\n\n const defaultActiveIndex = clampIndex(defaultSelectedIndex, Items.length)\n const controlledActiveIndex =\n typeof selectedIndex === 'number' && Number.isFinite(selectedIndex)\n ? clampIndex(selectedIndex, Items.length)\n : null\n const initialActiveIndex = controlledActiveIndex ?? defaultActiveIndex\n const headingId = A11yHeadingChild?.props.id ?? `${instanceId}-heading`\n const wideTabListColumns = Math.min(Math.max(Items.length, 1), 3)\n const initialActiveTab = initialActiveIndex >= 0 ? String(initialActiveIndex) : undefined\n const isWideTabList = isLarge === true\n const suppressOnTabActivateRef = useRef(false)\n\n const handleTabActivate = useCallback(\n (id: string) => {\n if (suppressOnTabActivateRef.current) {\n suppressOnTabActivateRef.current = false\n return\n }\n\n if (!onChange) return\n\n const nextIndex = Number(id)\n if (!Number.isNaN(nextIndex)) {\n onChange(nextIndex)\n }\n },\n [onChange],\n )\n\n const {activeTab, activateTab, getTabListProps, getTabPanelProps, getTabProps} = useTabs({\n defaultTab: initialActiveTab,\n onTabActivate: handleTabActivate,\n })\n\n const [activeAccordionIndex, setActiveAccordionIndex] = useState(initialActiveIndex)\n\n useEffect(() => {\n if (activeTab === null) return\n\n const nextIndex = Number(activeTab)\n if (!Number.isNaN(nextIndex)) {\n setActiveAccordionIndex(nextIndex)\n }\n }, [activeTab])\n\n useEffect(() => {\n if (controlledActiveIndex === null || controlledActiveIndex < 0) return\n\n const controlledTab = String(controlledActiveIndex)\n if (activeTab !== controlledTab) {\n suppressOnTabActivateRef.current = true\n activateTab(controlledTab)\n }\n\n setActiveAccordionIndex(controlledActiveIndex)\n }, [activateTab, activeTab, controlledActiveIndex])\n\n if (!A11yHeadingChild && (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test')) {\n // eslint-disable-next-line no-console\n console.warn(\n 'RiverBreakoutTabs: A11yHeading child is required. This element will not be visible, only read by screenreaders.',\n )\n }\n\n const handleAccordionOpen = (index: number) => (isOpen: boolean) => {\n if (isOpen) {\n setActiveAccordionIndex(index)\n if (activeTab !== String(index)) {\n activateTab(String(index))\n }\n }\n }\n\n const handleAccordionToggle: React.ReactEventHandler<HTMLDetailsElement> = event => {\n const toggledIndex = Number(event.currentTarget.getAttribute('data-index'))\n\n if (!event.currentTarget.open && activeAccordionIndex === toggledIndex) {\n event.currentTarget.open = true\n }\n }\n\n const tabListProps = A11yHeadingChild\n ? getTabListProps({labelledBy: headingId})\n : getTabListProps({label: 'River breakout tabs'})\n const WideTabListContentParts = useMemo(\n () => Items.map(item => extractWideTabListContentParts(item.content)),\n [Items],\n )\n\n const BackgroundVisualLayer =\n backgroundVisual != null ? (\n <div className={styles.RiverBreakoutTabs__backgroundVisual} aria-hidden=\"true\">\n {backgroundVisual}\n </div>\n ) : null\n\n return (\n <section\n ref={ref}\n className={clsx(\n riverStyles.RiverBreakout,\n riverStyles['RiverBreakout--variant-gridline'],\n gridlineStyles.gridline,\n styles.RiverBreakoutTabs,\n backgroundVisual != null && styles['RiverBreakoutTabs--has-background-visual'],\n backgroundVisual != null &&\n imagePosition === 'block-end' &&\n styles['RiverBreakoutTabs--image-position-block-end'],\n backgroundVisual != null &&\n backgroundVisualFullBleed &&\n styles['RiverBreakoutTabs--background-visual-full-bleed'],\n className,\n )}\n {...props}\n >\n {A11yHeadingChild && cloneElement(A11yHeadingChild, {id: headingId})}\n\n {isWideTabList ? (\n <div className={styles.RiverBreakoutTabs__wideTabList}>\n <div\n {...tabListProps}\n className={styles.RiverBreakoutTabs__tablist}\n style={{'--river-breakout-tabs-columns': String(wideTabListColumns)} as React.CSSProperties}\n >\n {Items.map((item, index) => {\n const isSelected = activeTab === String(index)\n const tabProps = getTabProps<HTMLButtonElement>(String(index))\n const {body} = WideTabListContentParts[index]\n\n return (\n <div\n key={index}\n className={clsx(\n styles.RiverBreakoutTabs__item,\n isSelected && styles['RiverBreakoutTabs__item--selected'],\n item.className,\n )}\n >\n <button type=\"button\" {...tabProps} className={styles.RiverBreakoutTabs__tab}>\n {item.icon &&\n cloneElement(item.icon, {\n className: item.icon.props.className,\n })}\n\n {item.heading &&\n cloneElement(item.heading, {\n className: clsx(item.heading.props.className, styles.RiverBreakoutTabs__tabHeading),\n })}\n\n {body.length > 0 && <div className={styles.RiverBreakoutTabs__wideTabListContent}>{body}</div>}\n </button>\n </div>\n )\n })}\n </div>\n\n <div className={styles.RiverBreakoutTabs__sharedVisuals}>\n {BackgroundVisualLayer}\n {Items.map((item, index) => {\n const panelProps = getTabPanelProps(String(index))\n\n return (\n <div\n key={index}\n {...panelProps}\n tabIndex={-1}\n className={styles.RiverBreakoutTabs__sharedVisualPanel}\n >\n {cloneElement(item.visual as React.ReactElement<RiverBreakoutTabsVisualProps>, {\n className: clsx(item.visual?.props.className, styles.RiverBreakoutTabs__sharedVisual),\n })}\n </div>\n )\n })}\n </div>\n\n {WideTabListContentParts.some(content => content.action) && (\n <div\n className={styles.RiverBreakoutTabs__wideTabListActions}\n style={{'--river-breakout-tabs-columns': String(wideTabListColumns)} as React.CSSProperties}\n >\n {Items.map((_, index) => {\n const {action} = WideTabListContentParts[index]\n\n return (\n <div key={index} className={styles.RiverBreakoutTabs__wideTabListActionItem}>\n {action &&\n cloneElement(action, {\n className: clsx(action.props.className, styles.RiverBreakoutTabs__wideTabListAction),\n })}\n </div>\n )\n })}\n </div>\n )}\n </div>\n ) : (\n <div className={styles.RiverBreakoutTabs__accordion}>\n {activeAccordionIndex >= 0 && Items[activeAccordionIndex]?.visual && (\n <div className={styles.RiverBreakoutTabs__accordionSharedVisuals}>\n {BackgroundVisualLayer}\n {cloneElement(Items[activeAccordionIndex].visual as React.ReactElement<RiverBreakoutTabsVisualProps>, {\n className: clsx(\n Items[activeAccordionIndex].visual.props.className,\n styles.RiverBreakoutTabs__accordionSharedVisual,\n ),\n })}\n </div>\n )}\n\n {Items.map((item, index) => {\n return (\n <Accordion\n key={index}\n data-index={index}\n className={clsx(\n styles.RiverBreakoutTabs__accordionItem,\n index === activeAccordionIndex && styles['RiverBreakoutTabs__item--selected'],\n item.className,\n )}\n onToggle={handleAccordionToggle}\n open={index === activeAccordionIndex}\n handleOpen={handleAccordionOpen(index)}\n >\n <Accordion.Heading className={styles.RiverBreakoutTabs__accordionHeading}>\n <span className={styles.RiverBreakoutTabs__accordionHeadingInner}>\n {item.icon &&\n cloneElement(item.icon, {\n className: clsx(item.icon.props.className, styles.RiverBreakoutTabs__accordionIcon),\n })}\n <span className={styles.RiverBreakoutTabs__accordionLabel}>{item.heading?.props.children}</span>\n </span>\n </Accordion.Heading>\n\n <Accordion.Content className={styles.RiverBreakoutTabs__accordionPanel}>\n {cloneElement(item.content as React.ReactElement<RiverBreakoutTabsContentProps>, {\n className: clsx(item.content?.props.className, styles.RiverBreakoutTabs__accordionContent),\n })}\n </Accordion.Content>\n </Accordion>\n )\n })}\n </div>\n )}\n </section>\n )\n },\n)\n\n/**\n * Use RiverBreakoutTabs to showcase multiple feature stories within a single immersive surface.\n */\nexport const RiverBreakoutTabs = Object.assign(RiverBreakoutTabsRoot, {\n A11yHeading: RiverBreakoutTabsA11yHeading,\n Content: RiverBreakoutTabsContent,\n Heading: RiverBreakoutTabsHeading,\n Icon: RiverBreakoutTabsIcon,\n Item: RiverBreakoutTabsItem,\n Visual: RiverBreakoutTabsVisual,\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAM,KACC,OACJ,MACC,EAAM,eAAkB,CAAO,KAAK,EAAQ,SAAS,GA0DnD,KAAyB,EAAC,kBAA0C,kBAAA,GAAA,EAAG,YAAW,CAAA,GAElF,KAAgC,EAAC,QAAK,MAAM,aAAU,YAC1D,kBAAC,GAAD;CAAa;CAAQ;CAAI,WAAU;CAChC;AACM,CAAA,GAGL,KAAyB,EAAC,WAAQ,SAAS,GAAG,QAClD,kBAAC,GAAD;CAAa;CAAO,GAAI;AAAQ,CAAA,GAG5B,KAA4B,EAChC,QAAK,MACL,aACA,cACA,UAAO,iBACP,YAAS,UACT,GAAG,QAEH,kBAAC,GAAD;CACM;CACJ,WAAW,EAAK,EAAO,4BAA4B,CAAS;CACtD;CACE;CACR,GAAI;CAEH;AACM,CAAA,GAGL,KAA4B,EAAC,aAAU,cAAW,GAAG,QAA0C;CACnG,IAAM,IAAW,QAEb,EAAM,SAAS,QAAQ,CAAQ,CAAC,CAAC,KAAI,MAC/B,EAAY,CAAK,IACZ,EAAa,GAAO;EACzB,IAAI,EAAM,MAAM,MAAM;EACtB,SAAS,EAAM,MAAM,WAAW;CAClC,CAAC,IAGC,EAAY,CAAK,IACZ,EAAa,GAAO;EACzB,WAAW,EAAK,EAAM,MAAM,WAAW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AK,SAAS,MAAM,WAAW,EAAO,mCAAmC,EAC3F,CAAC;IACgB,CAAA,CACV;MA1BJ,CA0BI,CAEd,CACE;IAEA;;AAEb,CACF,GAKa,IAAoB,OAAO,OAAO,GAAuB;CACpE,aAAa;CACb,SAAS;CACT,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;AACV,CAAC"}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import './RiverBreakoutTabs.module-CB2SZhbE.css'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import './RiverBreakoutTabs.module-CB2SZhbE.css';//#region src/river/RiverBreakoutTabs/RiverBreakoutTabs.module.css
|
|
2
|
+
var e = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs___V0qyz", t = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordion___fawN5", n = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__wideTabList___mzEmX", r = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__sharedVisuals____0vGo", i = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionSharedVisuals___DbPMZ", a = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__sharedVisualPanel___9C_mn", o = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__backgroundVisual___rrq1M", s = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionSharedVisual___BgAxG", c = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__sharedVisual___ST6p9", l = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__tablist___sGkZH", u = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__wideTabListActions____5ifh", d = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__item___ZOgN5", f = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__heading___3N6_9", p = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__icon___0ToMw", m = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__tab___Gukw0", h = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__tabHeading___WIYkc", g = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__wideTabListContent___Thx_L", _ = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__wideTabListAction____VPPu", v = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__wideTabListActionItem___Vpe6P", y = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__content___NwDBO", b = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__link___NBLWE", x = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionContent___jxVob", S = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionItem___59An1", C = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionHeading___u6tN5", w = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionHeadingInner___nuDDN", T = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionIcon___GRZr8", E = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionLabel___UsRuR", D = "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__accordionPanel___yTX_x", O = {
|
|
3
|
+
RiverBreakoutTabs: e,
|
|
4
|
+
RiverBreakoutTabs__accordion: t,
|
|
5
|
+
RiverBreakoutTabs__wideTabList: n,
|
|
6
|
+
RiverBreakoutTabs__sharedVisuals: r,
|
|
7
|
+
RiverBreakoutTabs__accordionSharedVisuals: i,
|
|
8
|
+
RiverBreakoutTabs__sharedVisualPanel: a,
|
|
9
|
+
RiverBreakoutTabs__backgroundVisual: o,
|
|
10
|
+
RiverBreakoutTabs__accordionSharedVisual: s,
|
|
10
11
|
"RiverBreakoutTabs--has-background-visual": "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs--has-background-visual___4fOiK",
|
|
11
12
|
"RiverBreakoutTabs--image-position-block-end": "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs--image-position-block-end___wyjv2",
|
|
12
13
|
"RiverBreakoutTabs--background-visual-full-bleed": "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs--background-visual-full-bleed___HM5Fs",
|
|
13
|
-
RiverBreakoutTabs__sharedVisual:
|
|
14
|
-
RiverBreakoutTabs__tablist:
|
|
15
|
-
RiverBreakoutTabs__wideTabListActions:
|
|
16
|
-
RiverBreakoutTabs__item:
|
|
14
|
+
RiverBreakoutTabs__sharedVisual: c,
|
|
15
|
+
RiverBreakoutTabs__tablist: l,
|
|
16
|
+
RiverBreakoutTabs__wideTabListActions: u,
|
|
17
|
+
RiverBreakoutTabs__item: d,
|
|
17
18
|
"RiverBreakoutTabs__item--selected": "Primer_Brand__RiverBreakoutTabs-module__RiverBreakoutTabs__item--selected___T8vyR",
|
|
18
|
-
RiverBreakoutTabs__heading:
|
|
19
|
-
RiverBreakoutTabs__icon:
|
|
20
|
-
RiverBreakoutTabs__tab:
|
|
21
|
-
RiverBreakoutTabs__tabHeading:
|
|
22
|
-
RiverBreakoutTabs__wideTabListContent:
|
|
23
|
-
RiverBreakoutTabs__wideTabListAction:
|
|
24
|
-
RiverBreakoutTabs__wideTabListActionItem:
|
|
25
|
-
RiverBreakoutTabs__content:
|
|
26
|
-
RiverBreakoutTabs__link:
|
|
27
|
-
RiverBreakoutTabs__accordionContent:
|
|
28
|
-
RiverBreakoutTabs__accordionItem:
|
|
29
|
-
RiverBreakoutTabs__accordionHeading:
|
|
30
|
-
RiverBreakoutTabs__accordionHeadingInner:
|
|
31
|
-
RiverBreakoutTabs__accordionIcon:
|
|
32
|
-
RiverBreakoutTabs__accordionLabel:
|
|
33
|
-
RiverBreakoutTabs__accordionPanel:
|
|
19
|
+
RiverBreakoutTabs__heading: f,
|
|
20
|
+
RiverBreakoutTabs__icon: p,
|
|
21
|
+
RiverBreakoutTabs__tab: m,
|
|
22
|
+
RiverBreakoutTabs__tabHeading: h,
|
|
23
|
+
RiverBreakoutTabs__wideTabListContent: g,
|
|
24
|
+
RiverBreakoutTabs__wideTabListAction: _,
|
|
25
|
+
RiverBreakoutTabs__wideTabListActionItem: v,
|
|
26
|
+
RiverBreakoutTabs__content: y,
|
|
27
|
+
RiverBreakoutTabs__link: b,
|
|
28
|
+
RiverBreakoutTabs__accordionContent: x,
|
|
29
|
+
RiverBreakoutTabs__accordionItem: S,
|
|
30
|
+
RiverBreakoutTabs__accordionHeading: C,
|
|
31
|
+
RiverBreakoutTabs__accordionHeadingInner: w,
|
|
32
|
+
RiverBreakoutTabs__accordionIcon: T,
|
|
33
|
+
RiverBreakoutTabs__accordionLabel: E,
|
|
34
|
+
RiverBreakoutTabs__accordionPanel: D
|
|
34
35
|
};
|
|
35
36
|
//#endregion
|
|
36
|
-
export { e as default };
|
|
37
|
+
export { e as RiverBreakoutTabs, t as RiverBreakoutTabs__accordion, x as RiverBreakoutTabs__accordionContent, C as RiverBreakoutTabs__accordionHeading, w as RiverBreakoutTabs__accordionHeadingInner, T as RiverBreakoutTabs__accordionIcon, S as RiverBreakoutTabs__accordionItem, E as RiverBreakoutTabs__accordionLabel, D as RiverBreakoutTabs__accordionPanel, s as RiverBreakoutTabs__accordionSharedVisual, i as RiverBreakoutTabs__accordionSharedVisuals, o as RiverBreakoutTabs__backgroundVisual, y as RiverBreakoutTabs__content, f as RiverBreakoutTabs__heading, p as RiverBreakoutTabs__icon, d as RiverBreakoutTabs__item, b as RiverBreakoutTabs__link, c as RiverBreakoutTabs__sharedVisual, a as RiverBreakoutTabs__sharedVisualPanel, r as RiverBreakoutTabs__sharedVisuals, m as RiverBreakoutTabs__tab, h as RiverBreakoutTabs__tabHeading, l as RiverBreakoutTabs__tablist, n as RiverBreakoutTabs__wideTabList, _ as RiverBreakoutTabs__wideTabListAction, v as RiverBreakoutTabs__wideTabListActionItem, u as RiverBreakoutTabs__wideTabListActions, g as RiverBreakoutTabs__wideTabListContent, O as default };
|
|
37
38
|
|
|
38
39
|
//# sourceMappingURL=RiverBreakoutTabs.module.js.map
|
|
@@ -19,5 +19,5 @@ export type RiverStoryScrollProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
children?: React.ReactElement<RiverProps>[];
|
|
21
21
|
};
|
|
22
|
-
export declare function RiverStoryScroll({ children, disabled }: RiverStoryScrollProps):
|
|
22
|
+
export declare function RiverStoryScroll({ children, disabled }: RiverStoryScrollProps): React.JSX.Element;
|
|
23
23
|
//# sourceMappingURL=RiverStoryScroll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScroll.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScroll.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAA;AAKtC,OAAO,sHAAsH,CAAA;AAG7H,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAA;CAC5C,CAAA;AAID,wBAAgB,gBAAgB,CAAC,EAAC,QAAQ,EAAE,QAAQ,EAAC,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"RiverStoryScroll.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScroll.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAA;AAKtC,OAAO,sHAAsH,CAAA;AAG7H,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAA;CAC5C,CAAA;AAID,wBAAgB,gBAAgB,CAAC,EAAC,QAAQ,EAAE,QAAQ,EAAC,EAAE,qBAAqB,qBAuH3E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import { RiverStoryScrollProvider as t } from "./RiverStoryScrollProvider.js";
|
|
3
3
|
import n from "./RiverStoryScroll.module.js";
|
|
4
4
|
import { RiverStoryScrollResponder as r } from "./RiverStoryScrollResponder.js";
|
|
@@ -21,13 +21,15 @@ function d({ children: d, disabled: f }) {
|
|
|
21
21
|
e.removeEventListener("change", t);
|
|
22
22
|
};
|
|
23
23
|
}, []), o(() => {
|
|
24
|
-
f || h || !m.current
|
|
24
|
+
if (f || h || !m.current) return;
|
|
25
|
+
let e = Array.from(m.current.querySelectorAll("img, video")).map((e) => e instanceof HTMLImageElement ? {
|
|
25
26
|
type: "image",
|
|
26
27
|
src: e.src
|
|
27
28
|
} : {
|
|
28
29
|
type: "video",
|
|
29
30
|
src: e.querySelector("source")?.src || ""
|
|
30
|
-
})
|
|
31
|
+
});
|
|
32
|
+
v(e);
|
|
31
33
|
}, [f, h]), f || h ? /* @__PURE__ */ l(c, { children: d }) : /* @__PURE__ */ l("div", {
|
|
32
34
|
className: e(n.RiverStoryScroll, n["RiverStoryScroll--enabled"]),
|
|
33
35
|
children: /* @__PURE__ */ u(t, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScroll.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScroll.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {useEffect, useRef} from 'react'\nimport type {RiverProps} from '../../'\nimport {RiverStoryScrollProvider} from './RiverStoryScrollProvider'\nimport {RiverStoryScrollResponder} from './RiverStoryScrollResponder'\nimport {RiverStoryScrollTracker} from './RiverStoryScrollTracker'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css'\nimport styles from './RiverStoryScroll.module.css'\n\nexport type RiverStoryScrollProps = {\n /**\n * Adjust the order of the `Content` column. The default is `start`.\n */\n align?: 'start' | 'end'\n /**\n * Apply an alternative image to text column ratio. The default is `50:50`.\n */\n imageTextRatio?: '60:40' | '50:50'\n /**\n * Disable the scroll effect.\n */\n disabled?: boolean\n /**\n * Only River components are allowed as children.\n */\n children?: React.ReactElement<RiverProps>[]\n}\n\ntype Media = {type: 'image' | 'video'; src: string}\n\nexport function RiverStoryScroll({children, disabled}: RiverStoryScrollProps) {\n const visualContainerRef = useRef<HTMLDivElement | null>(null)\n const contentContainerRef = useRef<HTMLDivElement | null>(null)\n\n const [prefersReducedMotion, setPrefersReducedMotion] = React.useState(false)\n const [media, setMedia] = React.useState<Media[]>([])\n\n const Children = React.Children.map(children, child => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement<RiverProps>, {\n className: clsx(\n styles['RiverStoryScroll__internal-river'],\n !disabled && styles['RiverStoryScroll__content-stack'],\n ),\n })\n }\n })\n\n const initialVisibilityStates = Children ? new Array(Children.length).fill(false) : []\n\n useEffect(() => {\n const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)')\n setPrefersReducedMotion(mediaQuery.matches)\n\n const listener = (e: MediaQueryListEvent) => {\n setPrefersReducedMotion(e.matches)\n }\n\n mediaQuery.addEventListener('change', listener)\n\n return () => {\n mediaQuery.removeEventListener('change', listener)\n }\n }, [])\n\n useEffect(() => {\n if (disabled || prefersReducedMotion || !contentContainerRef.current) return\n\n const mediaElements = Array.from(\n contentContainerRef.current.querySelectorAll<HTMLImageElement | HTMLVideoElement>('img, video'),\n )\n\n const newMedia: Media[] = mediaElements.map(element => {\n if (element instanceof HTMLImageElement) {\n return {\n type: 'image',\n src: element.src,\n }\n }\n\n return {\n type: 'video',\n src: element.querySelector('source')?.src || '',\n }\n })\n\n setMedia(newMedia)\n }, [disabled, prefersReducedMotion])\n\n if (disabled || prefersReducedMotion) {\n return <>{children}</>\n }\n\n return (\n <div className={clsx(styles.RiverStoryScroll, styles['RiverStoryScroll--enabled'])}>\n <RiverStoryScrollProvider initialStates={initialVisibilityStates} className={styles.RiverStoryScroll__inner}>\n <div className={styles['RiverStoryScroll__visual-container']} ref={visualContainerRef}>\n <div\n className={clsx(\n styles['RiverStoryScroll__visual-container-inner'],\n styles['RiverStoryScroll__visual--below'],\n )}\n >\n <div className={styles['RiverStoryScroll__visual-cover']} />\n {media.map((item, index) => (\n <RiverStoryScrollResponder\n className={styles['RiverStoryScroll__visual-scroll-responder']}\n key={index}\n index={index}\n >\n {item.type === 'video' && (\n <video playsInline={true} muted={true} preload=\"auto\" className={styles['RiverStoryScroll__image']}>\n <source src={item.src} type=\"video/mp4; codecs=avc1.4d002a\" />\n </video>\n )}\n {item.type === 'image' && (\n <img className={styles['RiverStoryScroll__image']} src={`${item.src}`} alt=\"\" />\n )}\n </RiverStoryScrollResponder>\n ))}\n <div className={styles['RiverStoryScroll__pagination']}>\n {media.map((_, index) => (\n <div className={styles['RiverStoryScroll__pagination-dot']} key={index} />\n ))}\n </div>\n </div>\n </div>\n\n <div\n ref={contentContainerRef}\n className={clsx(\n styles['RiverStoryScroll__content-container'],\n styles['RiverStoryScroll__content-container--below'],\n )}\n >\n {React.Children.map(Children, (child, index) => (\n <RiverStoryScrollTracker\n key={index}\n location=\"below\"\n index={index}\n className={styles.RiverStoryScroll__tracker}\n >\n {child}\n </RiverStoryScrollTracker>\n ))}\n </div>\n </RiverStoryScrollProvider>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgB,EAAiB,EAAC,aAAU,eAAkC;CAC5E,IAAM,IAAqB,EAA8B,
|
|
1
|
+
{"version":3,"file":"RiverStoryScroll.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScroll.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {useEffect, useRef} from 'react'\nimport type {RiverProps} from '../../'\nimport {RiverStoryScrollProvider} from './RiverStoryScrollProvider'\nimport {RiverStoryScrollResponder} from './RiverStoryScrollResponder'\nimport {RiverStoryScrollTracker} from './RiverStoryScrollTracker'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css'\nimport styles from './RiverStoryScroll.module.css'\n\nexport type RiverStoryScrollProps = {\n /**\n * Adjust the order of the `Content` column. The default is `start`.\n */\n align?: 'start' | 'end'\n /**\n * Apply an alternative image to text column ratio. The default is `50:50`.\n */\n imageTextRatio?: '60:40' | '50:50'\n /**\n * Disable the scroll effect.\n */\n disabled?: boolean\n /**\n * Only River components are allowed as children.\n */\n children?: React.ReactElement<RiverProps>[]\n}\n\ntype Media = {type: 'image' | 'video'; src: string}\n\nexport function RiverStoryScroll({children, disabled}: RiverStoryScrollProps) {\n const visualContainerRef = useRef<HTMLDivElement | null>(null)\n const contentContainerRef = useRef<HTMLDivElement | null>(null)\n\n const [prefersReducedMotion, setPrefersReducedMotion] = React.useState(false)\n const [media, setMedia] = React.useState<Media[]>([])\n\n const Children = React.Children.map(children, child => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child as React.ReactElement<RiverProps>, {\n className: clsx(\n styles['RiverStoryScroll__internal-river'],\n !disabled && styles['RiverStoryScroll__content-stack'],\n ),\n })\n }\n })\n\n const initialVisibilityStates = Children ? new Array(Children.length).fill(false) : []\n\n useEffect(() => {\n const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)')\n setPrefersReducedMotion(mediaQuery.matches)\n\n const listener = (e: MediaQueryListEvent) => {\n setPrefersReducedMotion(e.matches)\n }\n\n mediaQuery.addEventListener('change', listener)\n\n return () => {\n mediaQuery.removeEventListener('change', listener)\n }\n }, [])\n\n useEffect(() => {\n if (disabled || prefersReducedMotion || !contentContainerRef.current) return\n\n const mediaElements = Array.from(\n contentContainerRef.current.querySelectorAll<HTMLImageElement | HTMLVideoElement>('img, video'),\n )\n\n const newMedia: Media[] = mediaElements.map(element => {\n if (element instanceof HTMLImageElement) {\n return {\n type: 'image',\n src: element.src,\n }\n }\n\n return {\n type: 'video',\n src: element.querySelector('source')?.src || '',\n }\n })\n\n setMedia(newMedia)\n }, [disabled, prefersReducedMotion])\n\n if (disabled || prefersReducedMotion) {\n return <>{children}</>\n }\n\n return (\n <div className={clsx(styles.RiverStoryScroll, styles['RiverStoryScroll--enabled'])}>\n <RiverStoryScrollProvider initialStates={initialVisibilityStates} className={styles.RiverStoryScroll__inner}>\n <div className={styles['RiverStoryScroll__visual-container']} ref={visualContainerRef}>\n <div\n className={clsx(\n styles['RiverStoryScroll__visual-container-inner'],\n styles['RiverStoryScroll__visual--below'],\n )}\n >\n <div className={styles['RiverStoryScroll__visual-cover']} />\n {media.map((item, index) => (\n <RiverStoryScrollResponder\n className={styles['RiverStoryScroll__visual-scroll-responder']}\n key={index}\n index={index}\n >\n {item.type === 'video' && (\n <video playsInline={true} muted={true} preload=\"auto\" className={styles['RiverStoryScroll__image']}>\n <source src={item.src} type=\"video/mp4; codecs=avc1.4d002a\" />\n </video>\n )}\n {item.type === 'image' && (\n <img className={styles['RiverStoryScroll__image']} src={`${item.src}`} alt=\"\" />\n )}\n </RiverStoryScrollResponder>\n ))}\n <div className={styles['RiverStoryScroll__pagination']}>\n {media.map((_, index) => (\n <div className={styles['RiverStoryScroll__pagination-dot']} key={index} />\n ))}\n </div>\n </div>\n </div>\n\n <div\n ref={contentContainerRef}\n className={clsx(\n styles['RiverStoryScroll__content-container'],\n styles['RiverStoryScroll__content-container--below'],\n )}\n >\n {React.Children.map(Children, (child, index) => (\n <RiverStoryScrollTracker\n key={index}\n location=\"below\"\n index={index}\n className={styles.RiverStoryScroll__tracker}\n >\n {child}\n </RiverStoryScrollTracker>\n ))}\n </div>\n </RiverStoryScrollProvider>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAgB,EAAiB,EAAC,aAAU,eAAkC;CAC5E,IAAM,IAAqB,EAA8B,IAAI,GACvD,IAAsB,EAA8B,IAAI,GAExD,CAAC,GAAsB,KAA2B,EAAM,SAAS,EAAK,GACtE,CAAC,GAAO,KAAY,EAAM,SAAkB,CAAC,CAAC,GAE9C,IAAW,EAAM,SAAS,IAAI,IAAU,MAAS;EACrD,IAAI,EAAM,eAAe,CAAK,GAC5B,OAAO,EAAM,aAAa,GAAyC,EACjE,WAAW,EACT,EAAO,qCACP,CAAC,KAAY,EAAO,kCACtB,EACF,CAAC;CAEL,CAAC,GAEK,IAA0B,IAAe,MAAM,EAAS,MAAM,CAAC,CAAC,KAAK,EAAK,IAAI,CAAC;CA6CrF,OA3CA,QAAgB;EACd,IAAM,IAAa,OAAO,WAAW,kCAAkC;EACvE,EAAwB,EAAW,OAAO;EAE1C,IAAM,KAAY,MAA2B;GAC3C,EAAwB,EAAE,OAAO;EACnC;EAIA,OAFA,EAAW,iBAAiB,UAAU,CAAQ,SAEjC;GACX,EAAW,oBAAoB,UAAU,CAAQ;EACnD;CACF,GAAG,CAAC,CAAC,GAEL,QAAgB;EACd,IAAI,KAAY,KAAwB,CAAC,EAAoB,SAAS;EAMtE,IAAM,IAJgB,MAAM,KAC1B,EAAoB,QAAQ,iBAAsD,YAAY,CAGtE,CAAA,CAAc,KAAI,MACtC,aAAmB,mBACd;GACL,MAAM;GACN,KAAK,EAAQ;EACf,IAGK;GACL,MAAM;GACN,KAAK,EAAQ,cA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import './RiverStoryScroll.module-kez68wMZ.css'
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import './RiverStoryScroll.module-kez68wMZ.css';//#region src/river/RiverStoryScroll/RiverStoryScroll.module.css
|
|
2
|
+
var e = "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll___1WYYC", t = "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__inner___WF5b_", n = "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__image___SlwET", r = "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__tracker___Xrp6i", i = "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__pagination___N3Qqs", a = {
|
|
3
|
+
RiverStoryScroll: e,
|
|
4
|
+
RiverStoryScroll__inner: t,
|
|
4
5
|
"RiverStoryScroll__visual-cover": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__visual-cover___3Fzq_",
|
|
5
|
-
RiverStoryScroll__image:
|
|
6
|
+
RiverStoryScroll__image: n,
|
|
6
7
|
"RiverStoryScroll--enabled": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll--enabled___rZJ_t",
|
|
7
8
|
"RiverStoryScroll__internal-river": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__internal-river___Z0U1_",
|
|
8
9
|
"RiverStoryScroll__visual-container-inner": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__visual-container-inner___6xmBy",
|
|
9
10
|
"RiverStoryScroll__visual-container": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__visual-container___F1VHb",
|
|
10
|
-
RiverStoryScroll__tracker:
|
|
11
|
+
RiverStoryScroll__tracker: r,
|
|
11
12
|
"in-viewport": "Primer_Brand__RiverStoryScroll-module__in-viewport___QNWnS",
|
|
12
13
|
"outside-viewport": "Primer_Brand__RiverStoryScroll-module__outside-viewport___d_yN_",
|
|
13
14
|
"RiverStoryScroll__content-container--below": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__content-container--below___wHtLU",
|
|
@@ -17,11 +18,11 @@ import './RiverStoryScroll.module-kez68wMZ.css';var e = {
|
|
|
17
18
|
"RiverStoryScroll__visual-scroll-responder": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__visual-scroll-responder___AqOJd",
|
|
18
19
|
"tracker-in-viewport": "Primer_Brand__RiverStoryScroll-module__tracker-in-viewport___oZzIh",
|
|
19
20
|
"RiverStoryScroll__content-stack": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__content-stack___LUJFy",
|
|
20
|
-
RiverStoryScroll__pagination:
|
|
21
|
+
RiverStoryScroll__pagination: i,
|
|
21
22
|
"RiverStoryScroll__pagination-dot": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__pagination-dot___K1RGe",
|
|
22
23
|
"RiverStoryScroll__content-container": "Primer_Brand__RiverStoryScroll-module__RiverStoryScroll__content-container___8f_JH"
|
|
23
24
|
};
|
|
24
25
|
//#endregion
|
|
25
|
-
export { e as default };
|
|
26
|
+
export { e as RiverStoryScroll, n as RiverStoryScroll__image, t as RiverStoryScroll__inner, i as RiverStoryScroll__pagination, r as RiverStoryScroll__tracker, a as default };
|
|
26
27
|
|
|
27
28
|
//# sourceMappingURL=RiverStoryScroll.module.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
type StoryScrollContextType = {
|
|
3
3
|
visibilityStates: boolean[];
|
|
4
4
|
setVisibilityStates: (index: number, isVisible: boolean) => void;
|
|
@@ -8,6 +8,6 @@ export declare function RiverStoryScrollProvider({ children, className, initialS
|
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
className?: string;
|
|
10
10
|
initialStates: boolean[];
|
|
11
|
-
}):
|
|
11
|
+
}): React.JSX.Element;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=RiverStoryScrollProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollProvider.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollProvider.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollProvider.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,SAAS,EAAuB,MAAM,OAAO,CAAA;AAE3E,KAAK,sBAAsB,GAAG;IAC5B,gBAAgB,EAAE,OAAO,EAAE,CAAA;IAC3B,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;CACjE,CAAA;AASD,eAAO,MAAM,qBAAqB,8BAAuC,CAAA;AAEzE,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,SAAS,EACT,aAAa,GACd,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,OAAO,EAAE,CAAA;CACzB,qBAyCA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollProvider.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollProvider.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext, useState} from 'react'\n\ntype StoryScrollContextType = {\n visibilityStates: boolean[]\n setVisibilityStates: (index: number, isVisible: boolean) => void\n}\n\nconst StoryScrollContext = createContext<StoryScrollContextType>({\n visibilityStates: [],\n setVisibilityStates: () => {\n throw new Error('setVisibilityStates function must be implemented.')\n },\n})\n\nexport const useStoryScrollContext = () => useContext(StoryScrollContext)\n\nexport function RiverStoryScrollProvider({\n children,\n className,\n initialStates,\n}: {\n children: ReactNode\n className?: string\n initialStates: boolean[]\n}) {\n const [visibilityStates, setVisibilityStates] = useState<boolean[]>(initialStates)\n const [, setVisibleIndexes] = useState<Set<number>>(new Set())\n const [lastActiveIndex, setLastActiveIndex] = useState<number | null>(null) // Track the last active index\n\n const updateVisibilityStates = (index: number, isVisible: boolean) => {\n setVisibleIndexes(currentVisibleIndexes => {\n const newVisibleIndexes = new Set(currentVisibleIndexes)\n\n if (isVisible) {\n newVisibleIndexes.add(index)\n } else {\n newVisibleIndexes.delete(index)\n }\n\n const highestVisibleIndex =\n newVisibleIndexes.size > 0 ? Math.max(...Array.from(newVisibleIndexes)) : lastActiveIndex\n\n if (highestVisibleIndex !== null) {\n // Update the last active index if a new item becomes the highest visible item\n setLastActiveIndex(highestVisibleIndex)\n // Ensure only the highest visible (or last active) index is marked as visible\n setVisibilityStates(states => states.map((_, idx) => idx === highestVisibleIndex))\n }\n\n return newVisibleIndexes\n })\n }\n\n return (\n <div className={className}>\n <StoryScrollContext.Provider\n value={{\n visibilityStates,\n setVisibilityStates: updateVisibilityStates,\n }}\n >\n {children}\n </StoryScrollContext.Provider>\n </div>\n )\n}\n"],"mappings":";;;AAOA,IAAM,IAAqB,EAAsC;CAC/D,kBAAkB,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollProvider.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollProvider.tsx"],"sourcesContent":["import React, {createContext, ReactNode, useContext, useState} from 'react'\n\ntype StoryScrollContextType = {\n visibilityStates: boolean[]\n setVisibilityStates: (index: number, isVisible: boolean) => void\n}\n\nconst StoryScrollContext = createContext<StoryScrollContextType>({\n visibilityStates: [],\n setVisibilityStates: () => {\n throw new Error('setVisibilityStates function must be implemented.')\n },\n})\n\nexport const useStoryScrollContext = () => useContext(StoryScrollContext)\n\nexport function RiverStoryScrollProvider({\n children,\n className,\n initialStates,\n}: {\n children: ReactNode\n className?: string\n initialStates: boolean[]\n}) {\n const [visibilityStates, setVisibilityStates] = useState<boolean[]>(initialStates)\n const [, setVisibleIndexes] = useState<Set<number>>(new Set())\n const [lastActiveIndex, setLastActiveIndex] = useState<number | null>(null) // Track the last active index\n\n const updateVisibilityStates = (index: number, isVisible: boolean) => {\n setVisibleIndexes(currentVisibleIndexes => {\n const newVisibleIndexes = new Set(currentVisibleIndexes)\n\n if (isVisible) {\n newVisibleIndexes.add(index)\n } else {\n newVisibleIndexes.delete(index)\n }\n\n const highestVisibleIndex =\n newVisibleIndexes.size > 0 ? Math.max(...Array.from(newVisibleIndexes)) : lastActiveIndex\n\n if (highestVisibleIndex !== null) {\n // Update the last active index if a new item becomes the highest visible item\n setLastActiveIndex(highestVisibleIndex)\n // Ensure only the highest visible (or last active) index is marked as visible\n setVisibilityStates(states => states.map((_, idx) => idx === highestVisibleIndex))\n }\n\n return newVisibleIndexes\n })\n }\n\n return (\n <div className={className}>\n <StoryScrollContext.Provider\n value={{\n visibilityStates,\n setVisibilityStates: updateVisibilityStates,\n }}\n >\n {children}\n </StoryScrollContext.Provider>\n </div>\n )\n}\n"],"mappings":";;;AAOA,IAAM,IAAqB,EAAsC;CAC/D,kBAAkB,CAAC;CACnB,2BAA2B;EACzB,MAAU,MAAM,mDAAmD;CACrE;AACF,CAAC,GAEY,UAA8B,EAAW,CAAkB;AAExE,SAAgB,EAAyB,EACvC,aACA,cACA,oBAKC;CACD,IAAM,CAAC,GAAkB,KAAuB,EAAoB,CAAa,GAC3E,GAAG,KAAqB,kBAAsB,IAAI,IAAI,CAAC,GACvD,CAAC,GAAiB,KAAsB,EAAwB,IAAI;CA0B1E,OACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,EAAmB,UAApB;GACE,OAAO;IACL;IACA,sBA7BwB,GAAe,MAAuB;KACpE,GAAkB,MAAyB;MACzC,IAAM,IAAoB,IAAI,IAAI,CAAqB;MAEvD,AAAI,IACF,EAAkB,IAAI,CAAK,IAE3B,EAAkB,OAAO,CAAK;MAGhC,IAAM,IACJ,EAAkB,OAAO,IAAI,KAAK,IAAI,GAAG,MAAM,KAAK,CAAiB,CAAC,IAAI;MAS5E,OAPI,MAAwB,SAE1B,EAAmB,CAAmB,GAEtC,GAAoB,MAAU,EAAO,KAAK,GAAG,MAAQ,MAAQ,CAAmB,CAAC,IAG5E;KACT,CAAC;IACH;GAQM;GAEC;EAC0B,CAAA;CAC1B,CAAA;AAET"}
|
|
@@ -6,6 +6,6 @@ type RiverStoryScrollResponderProps = {
|
|
|
6
6
|
visibleClassName?: string;
|
|
7
7
|
hiddenClassName?: string;
|
|
8
8
|
};
|
|
9
|
-
export declare function RiverStoryScrollResponder({ index, children, className, visibleClassName, hiddenClassName, }: RiverStoryScrollResponderProps):
|
|
9
|
+
export declare function RiverStoryScrollResponder({ index, children, className, visibleClassName, hiddenClassName, }: RiverStoryScrollResponderProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=RiverStoryScrollResponder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollResponder.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollResponder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAM9C,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,gBAAgD,EAChD,eAAoD,GACrD,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollResponder.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollResponder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAM9C,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,gBAAgD,EAChD,eAAoD,GACrD,EAAE,8BAA8B,qBA8BhC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import { useStoryScrollContext as t } from "./RiverStoryScrollProvider.js";
|
|
3
3
|
import n from "./RiverStoryScroll.module.js";
|
|
4
4
|
import r, { useEffect as i, useRef as a } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollResponder.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollResponder.tsx"],"sourcesContent":["import React, {useEffect, useRef} from 'react'\nimport {useStoryScrollContext} from './RiverStoryScrollProvider' // Adjust the import path as necessary\n\nimport styles from './RiverStoryScroll.module.css'\nimport {clsx} from 'clsx'\n\ntype RiverStoryScrollResponderProps = {\n index: number\n children?: React.ReactNode\n className?: string\n visibleClassName?: string // Optional: A class to apply when the item is supposed to be visible\n hiddenClassName?: string // Optional: A class to apply when the item is hidden\n}\n\nexport function RiverStoryScrollResponder({\n index,\n children,\n className,\n visibleClassName = styles['tracker-in-viewport'],\n hiddenClassName = styles['tracker-outside-viewport'],\n}: RiverStoryScrollResponderProps) {\n const {visibilityStates} = useStoryScrollContext()\n const isVisible = visibilityStates[index]\n const videoRef = useRef<HTMLVideoElement>(null)\n\n useEffect(() => {\n const videoElement = videoRef.current\n\n if (!videoElement) return\n\n if (isVisible) {\n // eslint-disable-next-line github/no-then\n videoElement.play().catch(error => {\n // eslint-disable-next-line no-console\n console.error('Error playing the video:', error)\n })\n } else {\n videoElement.pause()\n }\n }, [isVisible])\n\n // Parse children to attach ref to video elements\n const parsedChildren = React.Children.map(children, child => {\n if (React.isValidElement(child) && child.type === 'video') {\n return React.cloneElement(child, {ref: videoRef} as React.HTMLAttributes<HTMLVideoElement>)\n }\n return child\n })\n\n return <div className={clsx(className, isVisible ? visibleClassName : hiddenClassName)}>{parsedChildren}</div>\n}\n"],"mappings":";;;;;;AAcA,SAAgB,EAA0B,EACxC,UACA,aACA,cACA,sBAAmB,EAAO,wBAC1B,qBAAkB,EAAO,+BACQ;CACjC,IAAM,EAAC,wBAAoB,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollResponder.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollResponder.tsx"],"sourcesContent":["import React, {useEffect, useRef} from 'react'\nimport {useStoryScrollContext} from './RiverStoryScrollProvider' // Adjust the import path as necessary\n\nimport styles from './RiverStoryScroll.module.css'\nimport {clsx} from 'clsx'\n\ntype RiverStoryScrollResponderProps = {\n index: number\n children?: React.ReactNode\n className?: string\n visibleClassName?: string // Optional: A class to apply when the item is supposed to be visible\n hiddenClassName?: string // Optional: A class to apply when the item is hidden\n}\n\nexport function RiverStoryScrollResponder({\n index,\n children,\n className,\n visibleClassName = styles['tracker-in-viewport'],\n hiddenClassName = styles['tracker-outside-viewport'],\n}: RiverStoryScrollResponderProps) {\n const {visibilityStates} = useStoryScrollContext()\n const isVisible = visibilityStates[index]\n const videoRef = useRef<HTMLVideoElement>(null)\n\n useEffect(() => {\n const videoElement = videoRef.current\n\n if (!videoElement) return\n\n if (isVisible) {\n // eslint-disable-next-line github/no-then\n videoElement.play().catch(error => {\n // eslint-disable-next-line no-console\n console.error('Error playing the video:', error)\n })\n } else {\n videoElement.pause()\n }\n }, [isVisible])\n\n // Parse children to attach ref to video elements\n const parsedChildren = React.Children.map(children, child => {\n if (React.isValidElement(child) && child.type === 'video') {\n return React.cloneElement(child, {ref: videoRef} as React.HTMLAttributes<HTMLVideoElement>)\n }\n return child\n })\n\n return <div className={clsx(className, isVisible ? visibleClassName : hiddenClassName)}>{parsedChildren}</div>\n}\n"],"mappings":";;;;;;AAcA,SAAgB,EAA0B,EACxC,UACA,aACA,cACA,sBAAmB,EAAO,wBAC1B,qBAAkB,EAAO,+BACQ;CACjC,IAAM,EAAC,wBAAoB,EAAsB,GAC3C,IAAY,EAAiB,IAC7B,IAAW,EAAyB,IAAI;CAE9C,QAAgB;EACd,IAAM,IAAe,EAAS;EAEzB,MAED,IAEF,EAAa,KAAK,CAAC,CAAC,OAAM,MAAS;GAEjC,QAAQ,MAAM,4BAA4B,CAAK;EACjD,CAAC,IAED,EAAa,MAAM;CAEvB,GAAG,CAAC,CAAS,CAAC;CAGd,IAAM,IAAiB,EAAM,SAAS,IAAI,IAAU,MAC9C,EAAM,eAAe,CAAK,KAAK,EAAM,SAAS,UACzC,EAAM,aAAa,GAAO,EAAC,KAAK,EAAQ,CAA2C,IAErF,CACR;CAED,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAK,GAAW,IAAY,IAAmB,CAAe;YAAI;CAAoB,CAAA;AAC/G"}
|
|
@@ -5,6 +5,6 @@ type RiverStoryScrollTrackerProps = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
location?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const RiverStoryScrollTracker: ({ index, children, className }: RiverStoryScrollTrackerProps) =>
|
|
8
|
+
export declare const RiverStoryScrollTracker: ({ index, children, className }: RiverStoryScrollTrackerProps) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=RiverStoryScrollTracker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollTracker.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollTracker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAOxD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,gCAAmC,4BAA4B,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollTracker.d.ts","sourceRoot":"","sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollTracker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAOxD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,gCAAmC,4BAA4B,sBAgEtG,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import { useWindowSize as t } from "../../hooks/useWindowSize.js";
|
|
3
3
|
import { useStoryScrollContext as n } from "./RiverStoryScrollProvider.js";
|
|
4
4
|
import r from "./RiverStoryScroll.module.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverStoryScrollTracker.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollTracker.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react'\nimport {clsx} from 'clsx'\n\nimport {useWindowSize} from '../../'\nimport {useStoryScrollContext} from './RiverStoryScrollProvider'\nimport styles from './RiverStoryScroll.module.css'\n\ntype RiverStoryScrollTrackerProps = {\n index: number\n children?: React.ReactNode\n className?: string\n location?: string\n}\n\nexport const RiverStoryScrollTracker = ({index, children, className = ''}: RiverStoryScrollTrackerProps) => {\n const {isLarge} = useWindowSize()\n const elementRef = useRef<HTMLDivElement | null>(null)\n const [isIntersecting, setIsIntersecting] = useState(false)\n const {setVisibilityStates} = useStoryScrollContext()\n\n useEffect(() => {\n function isLandscape() {\n return window.innerWidth / window.innerHeight >= 0.78\n }\n\n const observerCallback = ([entry]: IntersectionObserverEntry[]) => {\n if (isLandscape()) {\n setIsIntersecting(entry.isIntersecting)\n setVisibilityStates(index, entry.isIntersecting)\n }\n }\n\n const observerCallbackPortrait = ([entry]: IntersectionObserverEntry[]) => {\n if (!isLandscape()) {\n setIsIntersecting(entry.isIntersecting)\n setVisibilityStates(index, entry.isIntersecting)\n }\n }\n\n const observer = new IntersectionObserver(\n observerCallback,\n !isLarge\n ? {\n rootMargin: '-80% 0% -19.99% 0%',\n threshold: 0,\n }\n : {threshold: 0.8},\n )\n\n const observerPortrait = new IntersectionObserver(\n observerCallbackPortrait,\n !isLarge\n ? {\n rootMargin: '-65% 0% -34.99% 0%',\n threshold: 0,\n }\n : {threshold: 0.8},\n )\n\n if (elementRef.current) {\n observer.observe(elementRef.current)\n observerPortrait.observe(elementRef.current)\n }\n\n return () => {\n observer.disconnect()\n observerPortrait.disconnect()\n }\n }, [index, isLarge, setVisibilityStates])\n\n return (\n <div\n ref={elementRef}\n className={clsx(className, isIntersecting ? styles['in-viewport'] : styles['outside-viewport'])}\n >\n {children}\n </div>\n )\n}\n"],"mappings":";;;;;;;AAcA,IAAa,KAA2B,EAAC,UAAO,aAAU,eAAY,SAAsC;CAC1G,IAAM,EAAC,eAAW,
|
|
1
|
+
{"version":3,"file":"RiverStoryScrollTracker.js","names":[],"sources":["../../../src/river/RiverStoryScroll/RiverStoryScrollTracker.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState} from 'react'\nimport {clsx} from 'clsx'\n\nimport {useWindowSize} from '../../'\nimport {useStoryScrollContext} from './RiverStoryScrollProvider'\nimport styles from './RiverStoryScroll.module.css'\n\ntype RiverStoryScrollTrackerProps = {\n index: number\n children?: React.ReactNode\n className?: string\n location?: string\n}\n\nexport const RiverStoryScrollTracker = ({index, children, className = ''}: RiverStoryScrollTrackerProps) => {\n const {isLarge} = useWindowSize()\n const elementRef = useRef<HTMLDivElement | null>(null)\n const [isIntersecting, setIsIntersecting] = useState(false)\n const {setVisibilityStates} = useStoryScrollContext()\n\n useEffect(() => {\n function isLandscape() {\n return window.innerWidth / window.innerHeight >= 0.78\n }\n\n const observerCallback = ([entry]: IntersectionObserverEntry[]) => {\n if (isLandscape()) {\n setIsIntersecting(entry.isIntersecting)\n setVisibilityStates(index, entry.isIntersecting)\n }\n }\n\n const observerCallbackPortrait = ([entry]: IntersectionObserverEntry[]) => {\n if (!isLandscape()) {\n setIsIntersecting(entry.isIntersecting)\n setVisibilityStates(index, entry.isIntersecting)\n }\n }\n\n const observer = new IntersectionObserver(\n observerCallback,\n !isLarge\n ? {\n rootMargin: '-80% 0% -19.99% 0%',\n threshold: 0,\n }\n : {threshold: 0.8},\n )\n\n const observerPortrait = new IntersectionObserver(\n observerCallbackPortrait,\n !isLarge\n ? {\n rootMargin: '-65% 0% -34.99% 0%',\n threshold: 0,\n }\n : {threshold: 0.8},\n )\n\n if (elementRef.current) {\n observer.observe(elementRef.current)\n observerPortrait.observe(elementRef.current)\n }\n\n return () => {\n observer.disconnect()\n observerPortrait.disconnect()\n }\n }, [index, isLarge, setVisibilityStates])\n\n return (\n <div\n ref={elementRef}\n className={clsx(className, isIntersecting ? styles['in-viewport'] : styles['outside-viewport'])}\n >\n {children}\n </div>\n )\n}\n"],"mappings":";;;;;;;AAcA,IAAa,KAA2B,EAAC,UAAO,aAAU,eAAY,SAAsC;CAC1G,IAAM,EAAC,eAAW,EAAc,GAC1B,IAAa,EAA8B,IAAI,GAC/C,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,EAAC,2BAAuB,EAAsB;CAoDpD,OAlDA,QAAgB;EACd,SAAS,IAAc;GACrB,OAAO,OAAO,aAAa,OAAO,eAAe;EACnD;EAEA,IAAM,KAAoB,CAAC,OAAwC;GACjE,AAAI,EAAY,MACd,EAAkB,EAAM,cAAc,GACtC,EAAoB,GAAO,EAAM,cAAc;EAEnD,GAEM,KAA4B,CAAC,OAAwC;GACzE,AAAK,EAAY,MACf,EAAkB,EAAM,cAAc,GACtC,EAAoB,GAAO,EAAM,cAAc;EAEnD,GAEM,IAAW,IAAI,qBACnB,GACC,IAKG,EAAC,WAAW,GAAG,IAJf;GACE,YAAY;GACZ,WAAW;EACb,CAEN,GAEM,IAAmB,IAAI,qBAC3B,GACC,IAKG,EAAC,WAAW,GAAG,IAJf;GACE,YAAY;GACZ,WAAW;EACb,CAEN;EAOA,OALI,EAAW,YACb,EAAS,QAAQ,EAAW,OAAO,GACnC,EAAiB,QAAQ,EAAW,OAAO,UAGhC;GAEX,AADA,EAAS,WAAW,GACpB,EAAiB,WAAW;EAC9B;CACF,GAAG;EAAC;EAAO;EAAS;CAAmB,CAAC,GAGtC,kBAAC,OAAD;EACE,KAAK;EACL,WAAW,EAAK,GAAW,IAAiB,EAAO,iBAAiB,EAAO,mBAAmB;EAE7F;CACE,CAAA;AAET"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import './river-shared.module-B1HvdKsP.css'
|
|
2
|
-
|
|
1
|
+
import './river-shared.module-B1HvdKsP.css';//#region src/river/river-shared.module.css
|
|
2
|
+
var e = "Primer_Brand__river-shared-module__River___PCP5W", t = "Primer_Brand__river-shared-module__River__content___udxiD", n = "Primer_Brand__river-shared-module__River__visual___s4zuj", r = "Primer_Brand__river-shared-module__River__heading___e5fwB", i = "Primer_Brand__river-shared-module__River__text___HCqnL", a = "Primer_Brand__river-shared-module__River__leadingComponent___J27K0", o = "Primer_Brand__river-shared-module__River__trailingComponent___jDuou", s = "Primer_Brand__river-shared-module__River__label___ENXiR", c = "Primer_Brand__river-shared-module__RiverBreakout___Jcz2F", l = "Primer_Brand__river-shared-module__RiverBreakout__hiddenHeading___wqngh", u = {
|
|
3
|
+
River: e,
|
|
3
4
|
"River--variant-gridline": "Primer_Brand__river-shared-module__River--variant-gridline___e27QX",
|
|
4
5
|
"River--align-center": "Primer_Brand__river-shared-module__River--align-center___4igQp",
|
|
5
|
-
River__content:
|
|
6
|
-
River__visual:
|
|
6
|
+
River__content: t,
|
|
7
|
+
River__visual: n,
|
|
7
8
|
"River__visual--fill-media": "Primer_Brand__river-shared-module__River__visual--fill-media___aXDjy",
|
|
8
9
|
"River__visual--rounded": "Primer_Brand__river-shared-module__River__visual--rounded___noFTs",
|
|
9
10
|
"River__visual--has-shadow": "Primer_Brand__river-shared-module__River__visual--has-shadow___5__Jy",
|
|
10
11
|
"River__visual--has-background": "Primer_Brand__river-shared-module__River__visual--has-background___0wEBA",
|
|
11
|
-
River__heading:
|
|
12
|
+
River__heading: r,
|
|
12
13
|
"River__call-to-action": "Primer_Brand__river-shared-module__River__call-to-action___yOsJI",
|
|
13
|
-
River__text:
|
|
14
|
-
River__leadingComponent:
|
|
15
|
-
River__trailingComponent:
|
|
14
|
+
River__text: i,
|
|
15
|
+
River__leadingComponent: a,
|
|
16
|
+
River__trailingComponent: o,
|
|
16
17
|
"River__trailingComponent--divider": "Primer_Brand__river-shared-module__River__trailingComponent--divider___mTL35",
|
|
17
|
-
River__label:
|
|
18
|
+
River__label: s,
|
|
18
19
|
"River--align-start": "Primer_Brand__river-shared-module__River--align-start___PjR7w",
|
|
19
20
|
"River--align-end": "Primer_Brand__river-shared-module__River--align-end___PI17m",
|
|
20
21
|
"River--50-50": "Primer_Brand__river-shared-module__River--50-50___37Rpp",
|
|
@@ -28,12 +29,12 @@ import './river-shared.module-B1HvdKsP.css';var e = {
|
|
|
28
29
|
"River__visual--padding-all": "Primer_Brand__river-shared-module__River__visual--padding-all___rTBWZ",
|
|
29
30
|
"River__visual--padding-none": "Primer_Brand__river-shared-module__River__visual--padding-none___4L9n5",
|
|
30
31
|
"does-not-exist": "Primer_Brand__river-shared-module__does-not-exist___GLvK6",
|
|
31
|
-
RiverBreakout:
|
|
32
|
+
RiverBreakout: c,
|
|
32
33
|
"RiverBreakout--muted": "Primer_Brand__river-shared-module__RiverBreakout--muted___ndl_I",
|
|
33
|
-
RiverBreakout__hiddenHeading:
|
|
34
|
+
RiverBreakout__hiddenHeading: l,
|
|
34
35
|
"RiverBreakout--variant-gridline": "Primer_Brand__river-shared-module__RiverBreakout--variant-gridline___2_O5H"
|
|
35
36
|
};
|
|
36
37
|
//#endregion
|
|
37
|
-
export { e as default };
|
|
38
|
+
export { e as River, c as RiverBreakout, l as RiverBreakout__hiddenHeading, t as River__content, r as River__heading, s as River__label, a as River__leadingComponent, i as River__text, o as River__trailingComponent, n as River__visual, u as default };
|
|
38
39
|
|
|
39
40
|
//# sourceMappingURL=river-shared.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTextContent.js","names":[],"sources":["../../src/utils/getTextContent.ts"],"sourcesContent":["import React from 'react'\n\nexport function getTextContent(node: React.ReactNode): string {\n if (!node) return ''\n\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(getTextContent).join('')\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {children?: React.ReactNode}\n return getTextContent(props.children)\n }\n\n return ''\n}\n"],"mappings":";;AAEA,SAAgB,EAAe,GAA+B;
|
|
1
|
+
{"version":3,"file":"getTextContent.js","names":[],"sources":["../../src/utils/getTextContent.ts"],"sourcesContent":["import React from 'react'\n\nexport function getTextContent(node: React.ReactNode): string {\n if (!node) return ''\n\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(getTextContent).join('')\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {children?: React.ReactNode}\n return getTextContent(props.children)\n }\n\n return ''\n}\n"],"mappings":";;AAEA,SAAgB,EAAe,GAA+B;CAC5D,IAAI,CAAC,GAAM,OAAO;CAElB,IAAI,OAAO,KAAS,YAAY,OAAO,KAAS,UAC9C,OAAO,OAAO,CAAI;CAGpB,IAAI,MAAM,QAAQ,CAAI,GACpB,OAAO,EAAK,IAAI,CAAc,CAAC,CAAC,KAAK,EAAE;CAGzC,IAAI,EAAM,eAAe,CAAI,GAAG;EAC9B,IAAM,IAAQ,EAAK;EACnB,OAAO,EAAe,EAAM,QAAQ;CACtC;CAEA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFragmentElement.js","names":[],"sources":["../../src/utils/isFragmentElement.ts"],"sourcesContent":["import React from 'react'\n\nexport const isFragmentElement = (\n node: React.ReactNode | null | undefined,\n): node is React.ReactElement<{children?: React.ReactNode}> => {\n return React.isValidElement(node) && node.type === React.Fragment\n}\n"],"mappings":";;AAEA,IAAa,KACX,MAEO,EAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"isFragmentElement.js","names":[],"sources":["../../src/utils/isFragmentElement.ts"],"sourcesContent":["import React from 'react'\n\nexport const isFragmentElement = (\n node: React.ReactNode | null | undefined,\n): node is React.ReactElement<{children?: React.ReactNode}> => {\n return React.isValidElement(node) && node.type === React.Fragment\n}\n"],"mappings":";;AAEA,IAAa,KACX,MAEO,EAAM,eAAe,CAAI,KAAK,EAAK,SAAS,EAAM"}
|