@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuteButton.js","names":[],"sources":["../../../../src/VideoPlayer/components/MuteButton/MuteButton.tsx"],"sourcesContent":["import React, {type HTMLAttributes} from 'react'\nimport {MuteIcon, UnmuteIcon} from '@primer/octicons-react'\n\nimport {IconControl} from '../'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const MuteButton = (props: HTMLAttributes<HTMLButtonElement>) => {\n const {isMuted, toggleMute} = useVideo()\n return (\n <IconControl tooltip={isMuted ? 'Unmute' : 'Mute'} onClick={toggleMute} {...props}>\n {isMuted ? <MuteIcon size={24} /> : <UnmuteIcon size={24} />}\n </IconControl>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MuteButton.js","names":[],"sources":["../../../../src/VideoPlayer/components/MuteButton/MuteButton.tsx"],"sourcesContent":["import React, {type HTMLAttributes} from 'react'\nimport {MuteIcon, UnmuteIcon} from '@primer/octicons-react'\n\nimport {IconControl} from '../'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const MuteButton = (props: HTMLAttributes<HTMLButtonElement>) => {\n const {isMuted, toggleMute} = useVideo()\n return (\n <IconControl tooltip={isMuted ? 'Unmute' : 'Mute'} onClick={toggleMute} {...props}>\n {isMuted ? <MuteIcon size={24} /> : <UnmuteIcon size={24} />}\n </IconControl>\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAa,KAAc,MAA6C;CACtE,IAAM,EAAC,YAAS,kBAAc,EAAS;CACvC,OACE,kBAAC,GAAD;EAAa,SAAS,IAAU,WAAW;EAAQ,SAAS;EAAY,GAAI;YAC/D,EAAV,IAAW,IAAyB,GAA1B,EAAU,MAAM,GAAK,CAA2B;CAChD,CAAA;AAEjB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type SVGAttributes } from 'react';
|
|
2
|
-
export declare const PauseIcon: (props: SVGAttributes<SVGSVGElement>) =>
|
|
1
|
+
import React, { type SVGAttributes } from 'react';
|
|
2
|
+
export declare const PauseIcon: (props: SVGAttributes<SVGSVGElement>) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PauseIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PauseIcon.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PauseIcon/PauseIcon.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"PauseIcon.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PauseIcon/PauseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,aAAa,EAAC,MAAM,OAAO,CAAA;AAE/C,eAAO,MAAM,SAAS,GAAI,OAAO,aAAa,CAAC,aAAa,CAAC,sBAK5D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PauseIcon.js","names":[],"sources":["../../../../src/VideoPlayer/components/PauseIcon/PauseIcon.tsx"],"sourcesContent":["import React, {type SVGAttributes} from 'react'\n\nexport const PauseIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <rect width=\"7.2\" height=\"24\" rx=\"1\" fill=\"currentColor\" />\n <rect x=\"12.5\" width=\"7.2\" height=\"24\" rx=\"1\" fill=\"currentColor\" />\n </svg>\n)\n"],"mappings":";;;AAEA,IAAa,KAAa,MACxB,kBAAC,OAAD;CAAK,OAAM;CAA6B,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,GAAI;WAAnG,CACE,kBAAC,QAAD;EAAM,OAAM;EAAM,QAAO;EAAK,IAAG;EAAI,MAAK;
|
|
1
|
+
{"version":3,"file":"PauseIcon.js","names":[],"sources":["../../../../src/VideoPlayer/components/PauseIcon/PauseIcon.tsx"],"sourcesContent":["import React, {type SVGAttributes} from 'react'\n\nexport const PauseIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <rect width=\"7.2\" height=\"24\" rx=\"1\" fill=\"currentColor\" />\n <rect x=\"12.5\" width=\"7.2\" height=\"24\" rx=\"1\" fill=\"currentColor\" />\n </svg>\n)\n"],"mappings":";;;AAEA,IAAa,KAAa,MACxB,kBAAC,OAAD;CAAK,OAAM;CAA6B,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,GAAI;WAAnG,CACE,kBAAC,QAAD;EAAM,OAAM;EAAM,QAAO;EAAK,IAAG;EAAI,MAAK;CAAgB,CAAA,GAC1D,kBAAC,QAAD;EAAM,GAAE;EAAO,OAAM;EAAM,QAAO;EAAK,IAAG;EAAI,MAAK;CAAgB,CAAA,CAChE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type SVGAttributes } from 'react';
|
|
2
|
-
export declare const PlayIcon: (props: SVGAttributes<SVGSVGElement>) =>
|
|
1
|
+
import React, { type SVGAttributes } from 'react';
|
|
2
|
+
export declare const PlayIcon: (props: SVGAttributes<SVGSVGElement>) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PlayIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayIcon.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PlayIcon/PlayIcon.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"PlayIcon.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PlayIcon/PlayIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,aAAa,EAAC,MAAM,OAAO,CAAA;AAE/C,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,CAAC,aAAa,CAAC,sBAO3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayIcon.js","names":[],"sources":["../../../../src/VideoPlayer/components/PlayIcon/PlayIcon.tsx"],"sourcesContent":["import React, {type SVGAttributes} from 'react'\n\nexport const PlayIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n d=\"M1.56489 23.8112C0.884817 24.2389 1.07491e-06 23.7501 1.0398e-06 22.9467L8.28679e-08 1.05473C4.73246e-08 0.241596 0.904067 -0.245404 1.58307 0.201969L18.5829 11.4026C19.2032 11.8113 19.1935 12.7244 18.5647 13.1198L1.56489 23.8112Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"mappings":";;;AAEA,IAAa,KAAY,MACvB,kBAAC,OAAD;CAAK,OAAM;CAA6B,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,GAAI;WACjG,kBAAC,QAAD;EACE,GAAE;EACF,MAAK;
|
|
1
|
+
{"version":3,"file":"PlayIcon.js","names":[],"sources":["../../../../src/VideoPlayer/components/PlayIcon/PlayIcon.tsx"],"sourcesContent":["import React, {type SVGAttributes} from 'react'\n\nexport const PlayIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n d=\"M1.56489 23.8112C0.884817 24.2389 1.07491e-06 23.7501 1.0398e-06 22.9467L8.28679e-08 1.05473C4.73246e-08 0.241596 0.904067 -0.245404 1.58307 0.201969L18.5829 11.4026C19.2032 11.8113 19.1935 12.7244 18.5647 13.1198L1.56489 23.8112Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n"],"mappings":";;;AAEA,IAAa,KAAY,MACvB,kBAAC,OAAD;CAAK,OAAM;CAA6B,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,GAAI;WACjG,kBAAC,QAAD;EACE,GAAE;EACF,MAAK;CACN,CAAA;AACE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
2
|
-
export declare const PlayPauseButton: (props: HTMLAttributes<HTMLButtonElement>) =>
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
|
+
export declare const PlayPauseButton: (props: HTMLAttributes<HTMLButtonElement>) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PlayPauseButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayPauseButton.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PlayPauseButton/PlayPauseButton.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"PlayPauseButton.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/PlayPauseButton/PlayPauseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,cAAc,EAAC,MAAM,OAAO,CAAA;AAKhD,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,CAAC,iBAAiB,CAAC,sBAQvE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayPauseButton.js","names":[],"sources":["../../../../src/VideoPlayer/components/PlayPauseButton/PlayPauseButton.tsx"],"sourcesContent":["import React, {type HTMLAttributes} from 'react'\n\nimport {IconControl, PlayIcon, PauseIcon} from '../'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const PlayPauseButton = (props: HTMLAttributes<HTMLButtonElement>) => {\n const {isPlaying, togglePlaying} = useVideo()\n\n return (\n <IconControl onClick={togglePlaying} tooltip={isPlaying ? 'Pause video' : 'Play video'} {...props}>\n {isPlaying ? <PauseIcon /> : <PlayIcon />}\n </IconControl>\n )\n}\n"],"mappings":";;;;;;;AAKA,IAAa,KAAmB,MAA6C;CAC3E,IAAM,EAAC,cAAW,qBAAiB,
|
|
1
|
+
{"version":3,"file":"PlayPauseButton.js","names":[],"sources":["../../../../src/VideoPlayer/components/PlayPauseButton/PlayPauseButton.tsx"],"sourcesContent":["import React, {type HTMLAttributes} from 'react'\n\nimport {IconControl, PlayIcon, PauseIcon} from '../'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const PlayPauseButton = (props: HTMLAttributes<HTMLButtonElement>) => {\n const {isPlaying, togglePlaying} = useVideo()\n\n return (\n <IconControl onClick={togglePlaying} tooltip={isPlaying ? 'Pause video' : 'Play video'} {...props}>\n {isPlaying ? <PauseIcon /> : <PlayIcon />}\n </IconControl>\n )\n}\n"],"mappings":";;;;;;;AAKA,IAAa,KAAmB,MAA6C;CAC3E,IAAM,EAAC,cAAW,qBAAiB,EAAS;CAE5C,OACE,kBAAC,GAAD;EAAa,SAAS;EAAe,SAAS,IAAY,gBAAgB;EAAc,GAAI;YAC7E,EAAZ,IAAa,IAAgB,GAAjB,CAAY,CAAe;CAC7B,CAAA;AAEjB"}
|
|
@@ -6,5 +6,5 @@ export type RangeProps = {
|
|
|
6
6
|
a11yStep?: number;
|
|
7
7
|
name?: string;
|
|
8
8
|
} & React.HTMLProps<HTMLInputElement>;
|
|
9
|
-
export declare const Range: ({ className, onChange, value: startValue, max, onKeyDown, a11yStep, tooltip, tooltipFormatter, name, id, ...props }: RangeProps) =>
|
|
9
|
+
export declare const Range: ({ className, onChange, value: startValue, max, onKeyDown, a11yStep, tooltip, tooltipFormatter, name, id, ...props }: RangeProps) => React.JSX.Element;
|
|
10
10
|
//# sourceMappingURL=Range.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/Range/Range.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAOvE,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAErC,eAAO,MAAM,KAAK,GAAI,qHAYnB,UAAU,
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/Range/Range.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAOvE,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAErC,eAAO,MAAM,KAAK,GAAI,qHAYnB,UAAU,sBAiFZ,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 { useId as t } from "../../../hooks/useId.js";
|
|
3
3
|
import n from "../../VideoPlayer.module.js";
|
|
4
4
|
import { VideoTooltip as r } from "../VideoTooltip/VideoTooltip.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.js","names":[],"sources":["../../../../src/VideoPlayer/components/Range/Range.tsx"],"sourcesContent":["import React, {useState, useEffect, DOMAttributes, useRef} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../../hooks/useId'\n\nimport {VideoTooltip} from '../'\nimport styles from '../../VideoPlayer.module.css'\n\nexport type RangeProps = {\n tooltip?: boolean\n tooltipFormatter?: (value: number) => string\n max?: number\n a11yStep?: number\n name?: string\n} & React.HTMLProps<HTMLInputElement>\n\nexport const Range = ({\n className,\n onChange = x => x,\n value: startValue,\n max,\n onKeyDown = x => x,\n a11yStep = 1,\n tooltip,\n tooltipFormatter = value => value.toString(),\n name,\n id,\n ...props\n}: RangeProps) => {\n const [value, setValue] = useState(startValue)\n const [mousePos, setMousePos] = useState(0)\n const [hoverValue, setHoverValue] = useState(0)\n const generatedId = useId()\n const inputId = id || generatedId\n const inputRef = useRef<HTMLInputElement | null>(null)\n\n useEffect(() => {\n setValue(startValue)\n }, [startValue])\n\n useEffect(() => {\n const input = inputRef.current\n\n if (!max || !tooltip || !input) {\n return\n }\n\n const handleMouseMove = event => {\n if (event.target !== input) {\n setHoverValue(0)\n setMousePos(0)\n return\n }\n\n setMousePos(event.offsetX)\n\n setHoverValue((event.offsetX / event.target.clientWidth) * max)\n }\n\n input.addEventListener('mousemove', handleMouseMove)\n\n return () => {\n input.removeEventListener('mousemove', handleMouseMove)\n }\n }, [max, tooltip, inputRef])\n\n const handleKeyDown: DOMAttributes<HTMLInputElement>['onKeyDown'] = event => {\n if (typeof value !== 'number') return\n\n if (event.key === 'ArrowUp') {\n event.stopPropagation()\n setValue(value + a11yStep)\n } else if (event.key === 'ArrowDown') {\n event.stopPropagation()\n setValue(value - a11yStep)\n }\n }\n\n return (\n <div className={clsx(styles.VideoPlayer__range, className)}>\n <progress aria-hidden=\"true\" className={styles.VideoPlayer__rangeProgress} value={value} max={max} />\n <label htmlFor={inputId}>\n <span className=\"visually-hidden\">{name}</span>\n <input\n tabIndex={0}\n type=\"range\"\n className={clsx(styles.VideoPlayer__rangeInput, styles.VideoPlayer__progressBar)}\n value={value}\n onChange={e => {\n setValue(e.currentTarget.valueAsNumber)\n onChange(e)\n }}\n max={max}\n onKeyDown={e => {\n handleKeyDown(e)\n onKeyDown(e)\n }}\n id={inputId}\n name={name}\n ref={inputRef}\n {...props}\n />\n </label>\n\n {tooltip && hoverValue ? (\n <VideoTooltip style={{left: mousePos}}>{tooltipFormatter(hoverValue)}</VideoTooltip>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;AAeA,IAAa,KAAS,EACpB,cACA,eAAW,MAAK,GAChB,OAAO,GACP,QACA,gBAAY,MAAK,GACjB,cAAW,GACX,YACA,uBAAmB,MAAS,EAAM,
|
|
1
|
+
{"version":3,"file":"Range.js","names":[],"sources":["../../../../src/VideoPlayer/components/Range/Range.tsx"],"sourcesContent":["import React, {useState, useEffect, DOMAttributes, useRef} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../../hooks/useId'\n\nimport {VideoTooltip} from '../'\nimport styles from '../../VideoPlayer.module.css'\n\nexport type RangeProps = {\n tooltip?: boolean\n tooltipFormatter?: (value: number) => string\n max?: number\n a11yStep?: number\n name?: string\n} & React.HTMLProps<HTMLInputElement>\n\nexport const Range = ({\n className,\n onChange = x => x,\n value: startValue,\n max,\n onKeyDown = x => x,\n a11yStep = 1,\n tooltip,\n tooltipFormatter = value => value.toString(),\n name,\n id,\n ...props\n}: RangeProps) => {\n const [value, setValue] = useState(startValue)\n const [mousePos, setMousePos] = useState(0)\n const [hoverValue, setHoverValue] = useState(0)\n const generatedId = useId()\n const inputId = id || generatedId\n const inputRef = useRef<HTMLInputElement | null>(null)\n\n useEffect(() => {\n setValue(startValue)\n }, [startValue])\n\n useEffect(() => {\n const input = inputRef.current\n\n if (!max || !tooltip || !input) {\n return\n }\n\n const handleMouseMove = event => {\n if (event.target !== input) {\n setHoverValue(0)\n setMousePos(0)\n return\n }\n\n setMousePos(event.offsetX)\n\n setHoverValue((event.offsetX / event.target.clientWidth) * max)\n }\n\n input.addEventListener('mousemove', handleMouseMove)\n\n return () => {\n input.removeEventListener('mousemove', handleMouseMove)\n }\n }, [max, tooltip, inputRef])\n\n const handleKeyDown: DOMAttributes<HTMLInputElement>['onKeyDown'] = event => {\n if (typeof value !== 'number') return\n\n if (event.key === 'ArrowUp') {\n event.stopPropagation()\n setValue(value + a11yStep)\n } else if (event.key === 'ArrowDown') {\n event.stopPropagation()\n setValue(value - a11yStep)\n }\n }\n\n return (\n <div className={clsx(styles.VideoPlayer__range, className)}>\n <progress aria-hidden=\"true\" className={styles.VideoPlayer__rangeProgress} value={value} max={max} />\n <label htmlFor={inputId}>\n <span className=\"visually-hidden\">{name}</span>\n <input\n tabIndex={0}\n type=\"range\"\n className={clsx(styles.VideoPlayer__rangeInput, styles.VideoPlayer__progressBar)}\n value={value}\n onChange={e => {\n setValue(e.currentTarget.valueAsNumber)\n onChange(e)\n }}\n max={max}\n onKeyDown={e => {\n handleKeyDown(e)\n onKeyDown(e)\n }}\n id={inputId}\n name={name}\n ref={inputRef}\n {...props}\n />\n </label>\n\n {tooltip && hoverValue ? (\n <VideoTooltip style={{left: mousePos}}>{tooltipFormatter(hoverValue)}</VideoTooltip>\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;AAeA,IAAa,KAAS,EACpB,cACA,eAAW,MAAK,GAChB,OAAO,GACP,QACA,gBAAY,MAAK,GACjB,cAAW,GACX,YACA,uBAAmB,MAAS,EAAM,SAAS,GAC3C,SACA,OACA,GAAG,QACa;CAChB,IAAM,CAAC,GAAO,KAAY,EAAS,CAAU,GACvC,CAAC,GAAU,KAAe,EAAS,CAAC,GACpC,CAAC,GAAY,KAAiB,EAAS,CAAC,GACxC,IAAc,EAAM,GACpB,IAAU,KAAM,GAChB,IAAW,EAAgC,IAAI;CAMrD,AAJA,QAAgB;EACd,EAAS,CAAU;CACrB,GAAG,CAAC,CAAU,CAAC,GAEf,QAAgB;EACd,IAAM,IAAQ,EAAS;EAEvB,IAAI,CAAC,KAAO,CAAC,KAAW,CAAC,GACvB;EAGF,IAAM,KAAkB,MAAS;GAC/B,IAAI,EAAM,WAAW,GAAO;IAE1B,AADA,EAAc,CAAC,GACf,EAAY,CAAC;IACb;GACF;GAIA,AAFA,EAAY,EAAM,OAAO,GAEzB,EAAe,EAAM,UAAU,EAAM,OAAO,cAAe,CAAG;EAChE;EAIA,OAFA,EAAM,iBAAiB,aAAa,CAAe,SAEtC;GACX,EAAM,oBAAoB,aAAa,CAAe;EACxD;CACF,GAAG;EAAC;EAAK;EAAS;CAAQ,CAAC;CAE3B,IAAM,KAA8D,MAAS;EACvE,OAAO,KAAU,aAEjB,EAAM,QAAQ,aAChB,EAAM,gBAAgB,GACtB,EAAS,IAAQ,CAAQ,KAChB,EAAM,QAAQ,gBACvB,EAAM,gBAAgB,GACtB,EAAS,IAAQ,CAAQ;CAE7B;CAEA,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,oBAAoB,CAAS;YAAzD;GACE,kBAAC,YAAD;IAAU,eAAY;IAAO,WAAW,EAAO;IAAmC;IAAY;GAAM,CAAA;GACpG,kBAAC,SAAD;IAAO,SAAS;cAAhB,CACE,kBAAC,QAAD;KAAM,WAAU;eAAmB;IAAW,CAAA,GAC9C,kBAAC,SAAD;KACE,UAAU;KACV,MAAK;KACL,WAAW,EAAK,EAAO,yBAAyB,EAAO,wBAAwB;KACxE;KACP,WAAU,MAAK;MAEb,AADA,EAAS,EAAE,cAAc,aAAa,GACtC,EAAS,CAAC;KACZ;KACK;KACL,YAAW,MAAK;MAEd,AADA,EAAc,CAAC,GACf,EAAU,CAAC;KACb;KACA,IAAI;KACE;KACN,KAAK;KACL,GAAI;IACL,CAAA,CACI;;GAEN,KAAW,IACV,kBAAC,GAAD;IAAc,OAAO,EAAC,MAAM,EAAQ;cAAI,EAAiB,CAAU;GAAgB,CAAA,IACjF;EACD;;AAET"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
type SeekControlProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare const SeekControl: ({ className, ...rest }: SeekControlProps) =>
|
|
3
|
+
export declare const SeekControl: ({ className, ...rest }: SeekControlProps) => React.JSX.Element;
|
|
4
4
|
export {};
|
|
5
5
|
//# sourceMappingURL=SeekControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeekControl.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/SeekControl/SeekControl.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SeekControl.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/SeekControl/SeekControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmC,KAAK,cAAc,EAAiB,MAAM,OAAO,CAAA;AA+BlG,KAAK,gBAAgB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAEtD,eAAO,MAAM,WAAW,GAAI,wBAAsB,gBAAgB,sBAsDjE,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 { Text as t } from "../../../Text/Text.js";
|
|
3
3
|
import n from "../../VideoPlayer.module.js";
|
|
4
4
|
import { useVideo as r } from "../../hooks/useVideo.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeekControl.js","names":[],"sources":["../../../../src/VideoPlayer/components/SeekControl/SeekControl.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback, type HTMLAttributes, type FormEvent} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Range} from '../'\nimport styles from '../../VideoPlayer.module.css'\nimport {Text} from '../../../Text'\nimport {useVideo} from '../../hooks/useVideo'\n\nconst padTime = (time: number) => time.toString().padStart(2, '0')\nconst formatTime = (time: number, duration?: number) => {\n if (isNaN(time) || time < 0) {\n return '00:00'\n }\n\n if (duration && time > duration) {\n time = duration\n }\n\n const minutes = padTime(Math.floor((time % 3600) / 60))\n const seconds = padTime(Math.floor(time % 60))\n\n let formattedTime = `${minutes}:${seconds}`\n\n if (time > 3600) {\n const hours = padTime(Math.floor(time / 3600))\n formattedTime = `${hours}:${formattedTime}`\n }\n\n return formattedTime\n}\n\ntype SeekControlProps = HTMLAttributes<HTMLDivElement>\n\nexport const SeekControl = ({className, ...rest}: SeekControlProps) => {\n const {ref, duration} = useVideo()\n const [currentTime, setCurrentTime] = useState(0)\n const seek = useCallback(\n (e: FormEvent<HTMLInputElement>) => {\n const time = e.currentTarget.valueAsNumber\n if (ref?.current) {\n ref.current.currentTime = time\n }\n },\n [ref],\n )\n\n useEffect(() => {\n const videoRef = ref?.current\n if (!videoRef) return\n\n const onTimeUpdate = () => {\n setCurrentTime(videoRef.currentTime)\n }\n\n videoRef.addEventListener('timeupdate', onTimeUpdate)\n\n return () => {\n videoRef.removeEventListener('timeupdate', onTimeUpdate)\n }\n }, [ref])\n\n return (\n <div className={clsx(styles.VideoPlayer__seek, className)} {...rest}>\n <Range\n type=\"range\"\n min=\"0\"\n max={duration}\n step={0.0001}\n onInput={seek}\n value={currentTime}\n className={styles.VideoPlayer__progressBar}\n tooltip\n tooltipFormatter={time => formatTime(time, duration)}\n name=\"Seek\"\n />\n <div className={styles.VideoPlayer__progressTime}>\n <Text\n as=\"p\"\n className={clsx(styles.VideoPlayer__controlTextColor, styles.VideoPlayer__seekTime)}\n font=\"monospace\"\n >\n {formatTime(currentTime, duration)}\n {<span className={styles.VideoPlayer__totalTime}> / {formatTime(duration)}</span>}\n </Text>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAQA,IAAM,KAAW,MAAiB,EAAK,
|
|
1
|
+
{"version":3,"file":"SeekControl.js","names":[],"sources":["../../../../src/VideoPlayer/components/SeekControl/SeekControl.tsx"],"sourcesContent":["import React, {useState, useEffect, useCallback, type HTMLAttributes, type FormEvent} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Range} from '../'\nimport styles from '../../VideoPlayer.module.css'\nimport {Text} from '../../../Text'\nimport {useVideo} from '../../hooks/useVideo'\n\nconst padTime = (time: number) => time.toString().padStart(2, '0')\nconst formatTime = (time: number, duration?: number) => {\n if (isNaN(time) || time < 0) {\n return '00:00'\n }\n\n if (duration && time > duration) {\n time = duration\n }\n\n const minutes = padTime(Math.floor((time % 3600) / 60))\n const seconds = padTime(Math.floor(time % 60))\n\n let formattedTime = `${minutes}:${seconds}`\n\n if (time > 3600) {\n const hours = padTime(Math.floor(time / 3600))\n formattedTime = `${hours}:${formattedTime}`\n }\n\n return formattedTime\n}\n\ntype SeekControlProps = HTMLAttributes<HTMLDivElement>\n\nexport const SeekControl = ({className, ...rest}: SeekControlProps) => {\n const {ref, duration} = useVideo()\n const [currentTime, setCurrentTime] = useState(0)\n const seek = useCallback(\n (e: FormEvent<HTMLInputElement>) => {\n const time = e.currentTarget.valueAsNumber\n if (ref?.current) {\n ref.current.currentTime = time\n }\n },\n [ref],\n )\n\n useEffect(() => {\n const videoRef = ref?.current\n if (!videoRef) return\n\n const onTimeUpdate = () => {\n setCurrentTime(videoRef.currentTime)\n }\n\n videoRef.addEventListener('timeupdate', onTimeUpdate)\n\n return () => {\n videoRef.removeEventListener('timeupdate', onTimeUpdate)\n }\n }, [ref])\n\n return (\n <div className={clsx(styles.VideoPlayer__seek, className)} {...rest}>\n <Range\n type=\"range\"\n min=\"0\"\n max={duration}\n step={0.0001}\n onInput={seek}\n value={currentTime}\n className={styles.VideoPlayer__progressBar}\n tooltip\n tooltipFormatter={time => formatTime(time, duration)}\n name=\"Seek\"\n />\n <div className={styles.VideoPlayer__progressTime}>\n <Text\n as=\"p\"\n className={clsx(styles.VideoPlayer__controlTextColor, styles.VideoPlayer__seekTime)}\n font=\"monospace\"\n >\n {formatTime(currentTime, duration)}\n {<span className={styles.VideoPlayer__totalTime}> / {formatTime(duration)}</span>}\n </Text>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAQA,IAAM,KAAW,MAAiB,EAAK,SAAS,CAAC,CAAC,SAAS,GAAG,GAAG,GAC3D,KAAc,GAAc,MAAsB;CACtD,IAAI,MAAM,CAAI,KAAK,IAAO,GACxB,OAAO;CAGT,AAAI,KAAY,IAAO,MACrB,IAAO;CAMT,IAAI,IAAgB,GAHJ,EAAQ,KAAK,MAAO,IAAO,OAAQ,EAAE,CAG9B,EAAQ,GAFf,EAAQ,KAAK,MAAM,IAAO,EAAE,CAEV;CAOlC,OALI,IAAO,SAET,IAAgB,GADF,EAAQ,KAAK,MAAM,IAAO,IAAI,CACzB,EAAM,GAAG,MAGvB;AACT,GAIa,KAAe,EAAC,cAAW,GAAG,QAA4B;CACrE,IAAM,EAAC,QAAK,gBAAY,EAAS,GAC3B,CAAC,GAAa,KAAkB,EAAS,CAAC,GAC1C,IAAO,GACV,MAAmC;EAClC,IAAM,IAAO,EAAE,cAAc;EAC7B,AAAI,GAAK,YACP,EAAI,QAAQ,cAAc;CAE9B,GACA,CAAC,CAAG,CACN;CAiBA,OAfA,QAAgB;EACd,IAAM,IAAW,GAAK;EACtB,IAAI,CAAC,GAAU;EAEf,IAAM,UAAqB;GACzB,EAAe,EAAS,WAAW;EACrC;EAIA,OAFA,EAAS,iBAAiB,cAAc,CAAY,SAEvC;GACX,EAAS,oBAAoB,cAAc,CAAY;EACzD;CACF,GAAG,CAAC,CAAG,CAAC,GAGN,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,mBAAmB,CAAS;EAAG,GAAI;YAA/D,CACE,kBAAC,GAAD;GACE,MAAK;GACL,KAAI;GACJ,KAAK;GACL,MAAM;GACN,SAAS;GACT,OAAO;GACP,WAAW,EAAO;GAClB,SAAA;GACA,mBAAkB,MAAQ,EAAW,GAAM,CAAQ;GACnD,MAAK;EACN,CAAA,GACD,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,GAAD;IACE,IAAG;IACH,WAAW,EAAK,EAAO,+BAA+B,EAAO,qBAAqB;IAClF,MAAK;cAHP,CAKG,EAAW,GAAa,CAAQ,GAChC,kBAAC,QAAD;KAAM,WAAW,EAAO;eAAxB,CAAgD,OAAI,EAAW,CAAQ,CAAQ;MAC5E;;EACH,CAAA,CACF;;AAET"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
type VideoTooltipProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare const VideoTooltip: ({ children, className, ...rest }: VideoTooltipProps) =>
|
|
3
|
+
export declare const VideoTooltip: ({ children, className, ...rest }: VideoTooltipProps) => React.JSX.Element;
|
|
4
4
|
export {};
|
|
5
5
|
//# sourceMappingURL=VideoTooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoTooltip.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/VideoTooltip/VideoTooltip.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"VideoTooltip.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/VideoTooltip/VideoTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA8B,KAAK,cAAc,EAAC,MAAM,OAAO,CAAA;AAM7E,KAAK,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAA;AAEvD,eAAO,MAAM,YAAY,GAAI,kCAAgC,iBAAiB,sBAyF7E,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 { Text as t } from "../../../Text/Text.js";
|
|
3
3
|
import n from "../../VideoPlayer.module.js";
|
|
4
4
|
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
@@ -14,7 +14,8 @@ var s = ({ children: s, className: c, ...l }) => {
|
|
|
14
14
|
}, r = (e) => {
|
|
15
15
|
e.key === "Escape" && f(!1);
|
|
16
16
|
}, i = () => {
|
|
17
|
-
|
|
17
|
+
let e = t === document.activeElement || t.contains(document.activeElement);
|
|
18
|
+
f(e);
|
|
18
19
|
}, a = () => {
|
|
19
20
|
f(!1);
|
|
20
21
|
}, o = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoTooltip.js","names":[],"sources":["../../../../src/VideoPlayer/components/VideoTooltip/VideoTooltip.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState, type HTMLAttributes} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Text} from '../../../Text'\nimport styles from '../../VideoPlayer.module.css'\n\ntype VideoTooltipProps = HTMLAttributes<HTMLDivElement>\n\nexport const VideoTooltip = ({children, className, ...rest}: VideoTooltipProps) => {\n const tooltipRef = useRef<HTMLDivElement>(null)\n const [hasFocus, setHasFocus] = useState(false)\n const mouseenterTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n useEffect(() => {\n const tooltip = tooltipRef.current\n const parent = tooltip?.parentElement\n\n if (!tooltip || !parent) {\n return\n }\n\n const clearTimeoutAndRef = () => {\n if (mouseenterTimeoutRef.current) {\n clearTimeout(mouseenterTimeoutRef.current)\n mouseenterTimeoutRef.current = null\n }\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setHasFocus(false)\n }\n }\n\n const checkFocus = () => {\n const isFocused = parent === document.activeElement || parent.contains(document.activeElement)\n setHasFocus(isFocused)\n }\n\n const onClick = () => {\n // Close tooltip when element is clicked\n setHasFocus(false)\n }\n\n const onMouseEnterTooltip = () => {\n clearTimeoutAndRef()\n setHasFocus(true)\n }\n\n const onMouseLeaveTooltip = () => {\n clearTimeoutAndRef()\n\n mouseenterTimeoutRef.current = setTimeout(() => {\n setHasFocus(false)\n }, 100)\n }\n\n parent.addEventListener('focus', checkFocus)\n parent.addEventListener('blur', checkFocus)\n parent.addEventListener('focusin', checkFocus)\n parent.addEventListener('focusout', checkFocus)\n parent.addEventListener('click', onClick)\n parent.addEventListener('mouseenter', onMouseEnterTooltip)\n parent.addEventListener('mouseleave', onMouseLeaveTooltip)\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n clearTimeoutAndRef()\n\n parent.removeEventListener('focus', checkFocus)\n parent.removeEventListener('blur', checkFocus)\n parent.removeEventListener('focusin', checkFocus)\n parent.removeEventListener('focusout', checkFocus)\n parent.removeEventListener('click', onClick)\n parent.removeEventListener('mouseenter', onMouseEnterTooltip)\n parent.removeEventListener('mouseleave', onMouseLeaveTooltip)\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [tooltipRef])\n\n return (\n <div\n className={clsx(styles.VideoPlayer__tooltip, hasFocus && styles['VideoPlayer__tooltip-visible'], className)}\n ref={tooltipRef}\n {...rest}\n >\n {hasFocus ? (\n <span className={styles.VideoPlayer__tooltipContent}>\n <Text className={styles.VideoPlayer__tooltipText} weight=\"medium\">\n {children}\n </Text>\n </span>\n ) : (\n <span className=\"visually-hidden\">{children}</span>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;AAQA,IAAa,KAAgB,EAAC,aAAU,cAAW,GAAG,QAA6B;CACjF,IAAM,IAAa,EAAuB,
|
|
1
|
+
{"version":3,"file":"VideoTooltip.js","names":[],"sources":["../../../../src/VideoPlayer/components/VideoTooltip/VideoTooltip.tsx"],"sourcesContent":["import React, {useEffect, useRef, useState, type HTMLAttributes} from 'react'\nimport {clsx} from 'clsx'\n\nimport {Text} from '../../../Text'\nimport styles from '../../VideoPlayer.module.css'\n\ntype VideoTooltipProps = HTMLAttributes<HTMLDivElement>\n\nexport const VideoTooltip = ({children, className, ...rest}: VideoTooltipProps) => {\n const tooltipRef = useRef<HTMLDivElement>(null)\n const [hasFocus, setHasFocus] = useState(false)\n const mouseenterTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n useEffect(() => {\n const tooltip = tooltipRef.current\n const parent = tooltip?.parentElement\n\n if (!tooltip || !parent) {\n return\n }\n\n const clearTimeoutAndRef = () => {\n if (mouseenterTimeoutRef.current) {\n clearTimeout(mouseenterTimeoutRef.current)\n mouseenterTimeoutRef.current = null\n }\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setHasFocus(false)\n }\n }\n\n const checkFocus = () => {\n const isFocused = parent === document.activeElement || parent.contains(document.activeElement)\n setHasFocus(isFocused)\n }\n\n const onClick = () => {\n // Close tooltip when element is clicked\n setHasFocus(false)\n }\n\n const onMouseEnterTooltip = () => {\n clearTimeoutAndRef()\n setHasFocus(true)\n }\n\n const onMouseLeaveTooltip = () => {\n clearTimeoutAndRef()\n\n mouseenterTimeoutRef.current = setTimeout(() => {\n setHasFocus(false)\n }, 100)\n }\n\n parent.addEventListener('focus', checkFocus)\n parent.addEventListener('blur', checkFocus)\n parent.addEventListener('focusin', checkFocus)\n parent.addEventListener('focusout', checkFocus)\n parent.addEventListener('click', onClick)\n parent.addEventListener('mouseenter', onMouseEnterTooltip)\n parent.addEventListener('mouseleave', onMouseLeaveTooltip)\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n clearTimeoutAndRef()\n\n parent.removeEventListener('focus', checkFocus)\n parent.removeEventListener('blur', checkFocus)\n parent.removeEventListener('focusin', checkFocus)\n parent.removeEventListener('focusout', checkFocus)\n parent.removeEventListener('click', onClick)\n parent.removeEventListener('mouseenter', onMouseEnterTooltip)\n parent.removeEventListener('mouseleave', onMouseLeaveTooltip)\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [tooltipRef])\n\n return (\n <div\n className={clsx(styles.VideoPlayer__tooltip, hasFocus && styles['VideoPlayer__tooltip-visible'], className)}\n ref={tooltipRef}\n {...rest}\n >\n {hasFocus ? (\n <span className={styles.VideoPlayer__tooltipContent}>\n <Text className={styles.VideoPlayer__tooltipText} weight=\"medium\">\n {children}\n </Text>\n </span>\n ) : (\n <span className=\"visually-hidden\">{children}</span>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;AAQA,IAAa,KAAgB,EAAC,aAAU,cAAW,GAAG,QAA6B;CACjF,IAAM,IAAa,EAAuB,IAAI,GACxC,CAAC,GAAU,KAAe,EAAS,EAAK,GACxC,IAAuB,EAA6C,IAAI;CAqE9E,OAnEA,QAAgB;EACd,IAAM,IAAU,EAAW,SACrB,IAAS,GAAS;EAExB,IAAI,CAAC,KAAW,CAAC,GACf;EAGF,IAAM,UAA2B;GAC/B,AAEE,EAAqB,aADrB,aAAa,EAAqB,OAAO,GACV;EAEnC,GAEM,KAAiB,MAAqB;GAC1C,AAAI,EAAE,QAAQ,YACZ,EAAY,EAAK;EAErB,GAEM,UAAmB;GACvB,IAAM,IAAY,MAAW,SAAS,iBAAiB,EAAO,SAAS,SAAS,aAAa;GAC7F,EAAY,CAAS;EACvB,GAEM,UAAgB;GAEpB,EAAY,EAAK;EACnB,GAEM,UAA4B;GAEhC,AADA,EAAmB,GACnB,EAAY,EAAI;EAClB,GAEM,UAA4B;GAGhC,AAFA,EAAmB,GAEnB,EAAqB,UAAU,iBAAiB;IAC9C,EAAY,EAAK;GACnB,GAAG,GAAG;EACR;EAWA,OATA,EAAO,iBAAiB,SAAS,CAAU,GAC3C,EAAO,iBAAiB,QAAQ,CAAU,GAC1C,EAAO,iBAAiB,WAAW,CAAU,GAC7C,EAAO,iBAAiB,YAAY,CAAU,GAC9C,EAAO,iBAAiB,SAAS,CAAO,GACxC,EAAO,iBAAiB,cAAc,CAAmB,GACzD,EAAO,iBAAiB,cAAc,CAAmB,GACzD,OAAO,iBAAiB,WAAW,CAAa,SAEnC;GAUX,AATA,EAAmB,GAEnB,EAAO,oBAAoB,SAAS,CAAU,GAC9C,EAAO,oBAAoB,QAAQ,CAAU,GAC7C,EAAO,oBAAoB,WAAW,CAAU,GAChD,EAAO,oBAAoB,YAAY,CAAU,GACjD,EAAO,oBAAoB,SAAS,CAAO,GAC3C,EAAO,oBAAoB,cAAc,CAAmB,GAC5D,EAAO,oBAAoB,cAAc,CAAmB,GAC5D,OAAO,oBAAoB,WAAW,CAAa;EACrD;CACF,GAAG,CAAC,CAAU,CAAC,GAGb,kBAAC,OAAD;EACE,WAAW,EAAK,EAAO,sBAAsB,KAAY,EAAO,iCAAiC,CAAS;EAC1G,KAAK;EACL,GAAI;YAEH,IACC,kBAAC,QAAD;GAAM,WAAW,EAAO;aACtB,kBAAC,GAAD;IAAM,WAAW,EAAO;IAA0B,QAAO;IACtD;GACG,CAAA;EACF,CAAA,IAEN,kBAAC,QAAD;GAAM,WAAU;GAAmB;EAAe,CAAA;CAEjD,CAAA;AAET"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type RangeProps } from '../';
|
|
2
|
-
export declare const VolumeControl: ({ name, ...rest }: RangeProps) =>
|
|
3
|
+
export declare const VolumeControl: ({ name, ...rest }: RangeProps) => React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=VolumeControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeControl.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/VolumeControl/VolumeControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VolumeControl.d.ts","sourceRoot":"","sources":["../../../../src/VideoPlayer/components/VolumeControl/VolumeControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAQ,KAAK,UAAU,EAAC,MAAM,KAAK,CAAA;AAI1C,eAAO,MAAM,aAAa,GAAI,mBAA4B,UAAU,sBAiBnE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeControl.js","names":[],"sources":["../../../../src/VideoPlayer/components/VolumeControl/VolumeControl.tsx"],"sourcesContent":["import React from 'react'\n\nimport {Range, type RangeProps} from '../'\nimport styles from './VolumeControl.module.css'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const VolumeControl = ({name = 'Volume', ...rest}: RangeProps) => {\n const {volume, setVolume} = useVideo()\n\n return (\n <Range\n className={styles.VolumeControl}\n type=\"range\"\n min=\"0\"\n max={1}\n step={0.001}\n onInput={e => setVolume(e.currentTarget.valueAsNumber)}\n value={volume}\n a11yStep={0.1}\n name={name}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;AAMA,IAAa,KAAiB,EAAC,UAAO,UAAU,GAAG,QAAsB;CACvE,IAAM,EAAC,WAAQ,iBAAa,
|
|
1
|
+
{"version":3,"file":"VolumeControl.js","names":[],"sources":["../../../../src/VideoPlayer/components/VolumeControl/VolumeControl.tsx"],"sourcesContent":["import React from 'react'\n\nimport {Range, type RangeProps} from '../'\nimport styles from './VolumeControl.module.css'\nimport {useVideo} from '../../hooks/useVideo'\n\nexport const VolumeControl = ({name = 'Volume', ...rest}: RangeProps) => {\n const {volume, setVolume} = useVideo()\n\n return (\n <Range\n className={styles.VolumeControl}\n type=\"range\"\n min=\"0\"\n max={1}\n step={0.001}\n onInput={e => setVolume(e.currentTarget.valueAsNumber)}\n value={volume}\n a11yStep={0.1}\n name={name}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;AAMA,IAAa,KAAiB,EAAC,UAAO,UAAU,GAAG,QAAsB;CACvE,IAAM,EAAC,WAAQ,iBAAa,EAAS;CAErC,OACE,kBAAC,GAAD;EACE,WAAW,EAAO;EAClB,MAAK;EACL,KAAI;EACJ,KAAK;EACL,MAAM;EACN,UAAS,MAAK,EAAU,EAAE,cAAc,aAAa;EACrD,OAAO;EACP,UAAU;EACJ;EACN,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import './VolumeControl.module-DRSCPBbP.css'
|
|
1
|
+
import './VolumeControl.module-DRSCPBbP.css';//#region src/VideoPlayer/components/VolumeControl/VolumeControl.module.css
|
|
2
|
+
var e = "Primer_Brand__VolumeControl-module__VolumeControl___UcqPG", t = { VolumeControl: e };
|
|
2
3
|
//#endregion
|
|
3
|
-
export { e as default };
|
|
4
|
+
export { e as VolumeControl, t as default };
|
|
4
5
|
|
|
5
6
|
//# sourceMappingURL=VolumeControl.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsElementFullScreen.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useIsElementFullScreen.ts"],"sourcesContent":["import {useCallback, useEffect, useState, type Dispatch, type SetStateAction} from 'react'\nimport styles from '../VideoPlayer.module.css'\n\nexport const useIsElementFullScreen = (element?: HTMLElement | null): [boolean, Dispatch<SetStateAction<boolean>>] => {\n const [isFullScreen, _setIsFullScreen] = useState(false)\n\n useEffect(() => {\n if (!element) return\n\n const handleFullScreenChange = () => {\n const isCurrentlyFullScreen = document.fullscreenElement === element\n\n const fullscreenClass = styles['VideoPlayer__container--fullscreen']\n\n if (isCurrentlyFullScreen) {\n element.classList.add(fullscreenClass)\n } else {\n element.classList.remove(fullscreenClass)\n }\n\n _setIsFullScreen(isCurrentlyFullScreen)\n }\n\n document.addEventListener('fullscreenchange', handleFullScreenChange)\n\n return () => {\n document.removeEventListener('fullscreenchange', handleFullScreenChange)\n }\n }, [element])\n\n const setIsFullScreen = useCallback(\n (shouldFullScreenValOrFn: SetStateAction<boolean>) => {\n const shouldFullScreen =\n typeof shouldFullScreenValOrFn === 'function' ? shouldFullScreenValOrFn(isFullScreen) : shouldFullScreenValOrFn\n\n if (!element || isFullScreen === shouldFullScreen) return\n\n if (shouldFullScreen) {\n element.requestFullscreen()\n } else {\n document.exitFullscreen()\n }\n },\n [element, isFullScreen],\n )\n\n return [isFullScreen, setIsFullScreen]\n}\n"],"mappings":";;;AAGA,IAAa,KAA0B,MAA+E;CACpH,IAAM,CAAC,GAAc,KAAoB,EAAS,
|
|
1
|
+
{"version":3,"file":"useIsElementFullScreen.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useIsElementFullScreen.ts"],"sourcesContent":["import {useCallback, useEffect, useState, type Dispatch, type SetStateAction} from 'react'\nimport styles from '../VideoPlayer.module.css'\n\nexport const useIsElementFullScreen = (element?: HTMLElement | null): [boolean, Dispatch<SetStateAction<boolean>>] => {\n const [isFullScreen, _setIsFullScreen] = useState(false)\n\n useEffect(() => {\n if (!element) return\n\n const handleFullScreenChange = () => {\n const isCurrentlyFullScreen = document.fullscreenElement === element\n\n const fullscreenClass = styles['VideoPlayer__container--fullscreen']\n\n if (isCurrentlyFullScreen) {\n element.classList.add(fullscreenClass)\n } else {\n element.classList.remove(fullscreenClass)\n }\n\n _setIsFullScreen(isCurrentlyFullScreen)\n }\n\n document.addEventListener('fullscreenchange', handleFullScreenChange)\n\n return () => {\n document.removeEventListener('fullscreenchange', handleFullScreenChange)\n }\n }, [element])\n\n const setIsFullScreen = useCallback(\n (shouldFullScreenValOrFn: SetStateAction<boolean>) => {\n const shouldFullScreen =\n typeof shouldFullScreenValOrFn === 'function' ? shouldFullScreenValOrFn(isFullScreen) : shouldFullScreenValOrFn\n\n if (!element || isFullScreen === shouldFullScreen) return\n\n if (shouldFullScreen) {\n element.requestFullscreen()\n } else {\n document.exitFullscreen()\n }\n },\n [element, isFullScreen],\n )\n\n return [isFullScreen, setIsFullScreen]\n}\n"],"mappings":";;;AAGA,IAAa,KAA0B,MAA+E;CACpH,IAAM,CAAC,GAAc,KAAoB,EAAS,EAAK;CA0CvD,OAxCA,QAAgB;EACd,IAAI,CAAC,GAAS;EAEd,IAAM,UAA+B;GACnC,IAAM,IAAwB,SAAS,sBAAsB,GAEvD,IAAkB,EAAO;GAQ/B,AANI,IACF,EAAQ,UAAU,IAAI,CAAe,IAErC,EAAQ,UAAU,OAAO,CAAe,GAG1C,EAAiB,CAAqB;EACxC;EAIA,OAFA,SAAS,iBAAiB,oBAAoB,CAAsB,SAEvD;GACX,SAAS,oBAAoB,oBAAoB,CAAsB;EACzE;CACF,GAAG,CAAC,CAAO,CAAC,GAkBL,CAAC,GAhBgB,GACrB,MAAqD;EACpD,IAAM,IACJ,OAAO,KAA4B,aAAa,EAAwB,CAAY,IAAI;EAEtF,CAAC,KAAW,MAAiB,MAE7B,IACF,EAAQ,kBAAkB,IAE1B,SAAS,eAAe;CAE5B,GACA,CAAC,GAAS,CAAY,CAGF,CAAe;AACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVideo.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useVideo.tsx"],"sourcesContent":["import React, {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useReducer,\n useRef,\n type PropsWithChildren,\n type SetStateAction,\n type RefObject,\n} from 'react'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useIsElementFullScreen} from './useIsElementFullScreen'\n\ntype VideoState = {\n ref?: RefObject<HTMLVideoElement>\n isPlaying: boolean\n isMuted: boolean\n volume: number\n volumeBeforeMute: number | null\n ccEnabled: boolean\n duration: number\n}\n\nexport type UseVideoContext = VideoState & {\n play: () => void\n pause: () => void\n togglePlaying: () => void\n mute: () => void\n unmute: () => void\n toggleMute: () => void\n setVolume: (volumeValOrFn: SetStateAction<number>) => void\n seekToPercent: (percent: number) => void\n seek: (secondsValOrFn: SetStateAction<number>) => void\n enableCC: () => void\n disableCC: () => void\n toggleCC: () => void\n enterFullScreen: () => void\n exitFullScreen: () => void\n toggleFullScreen: () => void\n setDuration: (duration: number) => void\n isFullScreen: boolean\n fullscreenRef: RefObject<HTMLDivElement | null>\n}\n\ntype Action =\n | {type: 'play'}\n | {type: 'pause'}\n | {type: 'mute'}\n | {type: 'unmute'}\n | {type: 'setVolume'; payload: number}\n | {type: 'enableCC'}\n | {type: 'disableCC'}\n | {type: 'setDuration'; payload: number}\n\nexport const VideoContext = createContext<UseVideoContext | null>(null)\n\nconst videoReducer = (state: VideoState, action: Action): VideoState => {\n const video = state.ref?.current\n\n if (!video) {\n // eslint-disable-next-line no-console\n console.error('Video element is not available, ignoring action', action)\n return state\n }\n\n switch (action.type) {\n case 'play': {\n video.play()\n return {...state, isPlaying: true}\n }\n case 'pause': {\n video.pause()\n return {...state, isPlaying: false}\n }\n case 'mute': {\n video.volume = 0\n return {...state, isMuted: true, volumeBeforeMute: state.volume}\n }\n case 'unmute': {\n const nextVolume = state.volumeBeforeMute ?? 1\n video.volume = nextVolume\n return {...state, isMuted: false, volume: nextVolume}\n }\n case 'setVolume': {\n video.volume = action.payload\n return {...state, volume: action.payload}\n }\n case 'enableCC': {\n return {...state, ccEnabled: true}\n }\n case 'disableCC': {\n return {...state, ccEnabled: false}\n }\n case 'setDuration': {\n return {...state, duration: action.payload}\n }\n default:\n return state\n }\n}\n\nexport const useVideo = () => {\n const context = useContext(VideoContext)\n\n if (!context) {\n throw new Error(\n 'useVideo must be used within a VideoProvider. Did you forget to wrap your component in a <VideoProvider>?',\n )\n }\n\n return context\n}\n\ntype VideoProviderProps = PropsWithChildren\n\nexport const VideoProvider = forwardRef<HTMLVideoElement, VideoProviderProps>(({children}, forwardedRef) => {\n const ref = useProvidedRefOrCreate(forwardedRef as RefObject<HTMLVideoElement>)\n const fullscreenRef = useRef<HTMLDivElement>(null)\n\n const [state, dispatch] = useReducer(videoReducer, {\n isPlaying: false,\n isMuted: false,\n volume: 1,\n volumeBeforeMute: null,\n ccEnabled: false,\n ref,\n duration: 0,\n })\n\n const [isFullScreen, setIsFullScreen] = useIsElementFullScreen(fullscreenRef.current)\n\n const value: UseVideoContext = {\n ...state,\n isFullScreen,\n fullscreenRef,\n play: () => dispatch({type: 'play'}),\n pause: () => dispatch({type: 'pause'}),\n togglePlaying: () => dispatch({type: state.isPlaying ? 'pause' : 'play'}),\n mute: () => dispatch({type: 'mute'}),\n unmute: () => dispatch({type: 'unmute'}),\n toggleMute: () => dispatch({type: state.isMuted ? 'unmute' : 'mute'}),\n setVolume: volumeValOrFn => {\n const nextVolume = typeof volumeValOrFn === 'function' ? volumeValOrFn(state.volume) : volumeValOrFn\n const clampedVolume = Math.max(0, Math.min(1, nextVolume))\n\n dispatch({type: 'setVolume', payload: clampedVolume})\n },\n enableCC: () => {\n dispatch({type: 'enableCC'})\n },\n disableCC: () => dispatch({type: 'disableCC'}),\n toggleCC: () => dispatch({type: state.ccEnabled ? 'disableCC' : 'enableCC'}),\n enterFullScreen: () => setIsFullScreen(true),\n exitFullScreen: () => setIsFullScreen(false),\n toggleFullScreen: () => setIsFullScreen(prev => !prev),\n setDuration: (duration: number) => dispatch({type: 'setDuration', payload: duration}),\n\n seekToPercent: percent => {\n const videoRef = state.ref?.current\n if (!videoRef) return\n\n videoRef.currentTime = (percent / 100) * videoRef.duration\n },\n seek: secondsValOrFn => {\n const videoRef = state.ref?.current\n if (!videoRef) return\n\n videoRef.currentTime =\n typeof secondsValOrFn === 'function' ? secondsValOrFn(videoRef.currentTime) : secondsValOrFn\n },\n }\n\n useEffect(() => {\n const videoRef = state.ref?.current\n\n if (!videoRef) return\n\n const eventHandlers: Record<string, (event: Event) => void> = {\n play: () => {\n dispatch({type: 'play'})\n },\n playing: () => {\n videoRef.textTracks[0].mode = 'hidden'\n },\n pause: () => {\n dispatch({type: 'pause'})\n },\n ended: () => {\n videoRef.currentTime = 0\n },\n mute: () => {\n dispatch({type: 'mute'})\n },\n unmute: () => {\n dispatch({type: 'unmute'})\n },\n volumechange: () => {\n dispatch({type: 'setVolume', payload: videoRef.volume})\n },\n loadedmetadata: () => {\n dispatch({type: 'setDuration', payload: videoRef.duration})\n },\n }\n\n for (const [event, handler] of Object.entries(eventHandlers)) {\n videoRef.addEventListener(event, handler)\n }\n\n return () => {\n for (const [event, handler] of Object.entries(eventHandlers)) {\n videoRef.removeEventListener(event, handler)\n }\n }\n }, [state.ref])\n\n return <VideoContext.Provider value={value}>{children}</VideoContext.Provider>\n})\n"],"mappings":";;;;;AAuDA,IAAa,IAAe,EAAsC,
|
|
1
|
+
{"version":3,"file":"useVideo.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useVideo.tsx"],"sourcesContent":["import React, {\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useReducer,\n useRef,\n type PropsWithChildren,\n type SetStateAction,\n type RefObject,\n} from 'react'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useIsElementFullScreen} from './useIsElementFullScreen'\n\ntype VideoState = {\n ref?: RefObject<HTMLVideoElement>\n isPlaying: boolean\n isMuted: boolean\n volume: number\n volumeBeforeMute: number | null\n ccEnabled: boolean\n duration: number\n}\n\nexport type UseVideoContext = VideoState & {\n play: () => void\n pause: () => void\n togglePlaying: () => void\n mute: () => void\n unmute: () => void\n toggleMute: () => void\n setVolume: (volumeValOrFn: SetStateAction<number>) => void\n seekToPercent: (percent: number) => void\n seek: (secondsValOrFn: SetStateAction<number>) => void\n enableCC: () => void\n disableCC: () => void\n toggleCC: () => void\n enterFullScreen: () => void\n exitFullScreen: () => void\n toggleFullScreen: () => void\n setDuration: (duration: number) => void\n isFullScreen: boolean\n fullscreenRef: RefObject<HTMLDivElement | null>\n}\n\ntype Action =\n | {type: 'play'}\n | {type: 'pause'}\n | {type: 'mute'}\n | {type: 'unmute'}\n | {type: 'setVolume'; payload: number}\n | {type: 'enableCC'}\n | {type: 'disableCC'}\n | {type: 'setDuration'; payload: number}\n\nexport const VideoContext = createContext<UseVideoContext | null>(null)\n\nconst videoReducer = (state: VideoState, action: Action): VideoState => {\n const video = state.ref?.current\n\n if (!video) {\n // eslint-disable-next-line no-console\n console.error('Video element is not available, ignoring action', action)\n return state\n }\n\n switch (action.type) {\n case 'play': {\n video.play()\n return {...state, isPlaying: true}\n }\n case 'pause': {\n video.pause()\n return {...state, isPlaying: false}\n }\n case 'mute': {\n video.volume = 0\n return {...state, isMuted: true, volumeBeforeMute: state.volume}\n }\n case 'unmute': {\n const nextVolume = state.volumeBeforeMute ?? 1\n video.volume = nextVolume\n return {...state, isMuted: false, volume: nextVolume}\n }\n case 'setVolume': {\n video.volume = action.payload\n return {...state, volume: action.payload}\n }\n case 'enableCC': {\n return {...state, ccEnabled: true}\n }\n case 'disableCC': {\n return {...state, ccEnabled: false}\n }\n case 'setDuration': {\n return {...state, duration: action.payload}\n }\n default:\n return state\n }\n}\n\nexport const useVideo = () => {\n const context = useContext(VideoContext)\n\n if (!context) {\n throw new Error(\n 'useVideo must be used within a VideoProvider. Did you forget to wrap your component in a <VideoProvider>?',\n )\n }\n\n return context\n}\n\ntype VideoProviderProps = PropsWithChildren\n\nexport const VideoProvider = forwardRef<HTMLVideoElement, VideoProviderProps>(({children}, forwardedRef) => {\n const ref = useProvidedRefOrCreate(forwardedRef as RefObject<HTMLVideoElement>)\n const fullscreenRef = useRef<HTMLDivElement>(null)\n\n const [state, dispatch] = useReducer(videoReducer, {\n isPlaying: false,\n isMuted: false,\n volume: 1,\n volumeBeforeMute: null,\n ccEnabled: false,\n ref,\n duration: 0,\n })\n\n const [isFullScreen, setIsFullScreen] = useIsElementFullScreen(fullscreenRef.current)\n\n const value: UseVideoContext = {\n ...state,\n isFullScreen,\n fullscreenRef,\n play: () => dispatch({type: 'play'}),\n pause: () => dispatch({type: 'pause'}),\n togglePlaying: () => dispatch({type: state.isPlaying ? 'pause' : 'play'}),\n mute: () => dispatch({type: 'mute'}),\n unmute: () => dispatch({type: 'unmute'}),\n toggleMute: () => dispatch({type: state.isMuted ? 'unmute' : 'mute'}),\n setVolume: volumeValOrFn => {\n const nextVolume = typeof volumeValOrFn === 'function' ? volumeValOrFn(state.volume) : volumeValOrFn\n const clampedVolume = Math.max(0, Math.min(1, nextVolume))\n\n dispatch({type: 'setVolume', payload: clampedVolume})\n },\n enableCC: () => {\n dispatch({type: 'enableCC'})\n },\n disableCC: () => dispatch({type: 'disableCC'}),\n toggleCC: () => dispatch({type: state.ccEnabled ? 'disableCC' : 'enableCC'}),\n enterFullScreen: () => setIsFullScreen(true),\n exitFullScreen: () => setIsFullScreen(false),\n toggleFullScreen: () => setIsFullScreen(prev => !prev),\n setDuration: (duration: number) => dispatch({type: 'setDuration', payload: duration}),\n\n seekToPercent: percent => {\n const videoRef = state.ref?.current\n if (!videoRef) return\n\n videoRef.currentTime = (percent / 100) * videoRef.duration\n },\n seek: secondsValOrFn => {\n const videoRef = state.ref?.current\n if (!videoRef) return\n\n videoRef.currentTime =\n typeof secondsValOrFn === 'function' ? secondsValOrFn(videoRef.currentTime) : secondsValOrFn\n },\n }\n\n useEffect(() => {\n const videoRef = state.ref?.current\n\n if (!videoRef) return\n\n const eventHandlers: Record<string, (event: Event) => void> = {\n play: () => {\n dispatch({type: 'play'})\n },\n playing: () => {\n videoRef.textTracks[0].mode = 'hidden'\n },\n pause: () => {\n dispatch({type: 'pause'})\n },\n ended: () => {\n videoRef.currentTime = 0\n },\n mute: () => {\n dispatch({type: 'mute'})\n },\n unmute: () => {\n dispatch({type: 'unmute'})\n },\n volumechange: () => {\n dispatch({type: 'setVolume', payload: videoRef.volume})\n },\n loadedmetadata: () => {\n dispatch({type: 'setDuration', payload: videoRef.duration})\n },\n }\n\n for (const [event, handler] of Object.entries(eventHandlers)) {\n videoRef.addEventListener(event, handler)\n }\n\n return () => {\n for (const [event, handler] of Object.entries(eventHandlers)) {\n videoRef.removeEventListener(event, handler)\n }\n }\n }, [state.ref])\n\n return <VideoContext.Provider value={value}>{children}</VideoContext.Provider>\n})\n"],"mappings":";;;;;AAuDA,IAAa,IAAe,EAAsC,IAAI,GAEhE,KAAgB,GAAmB,MAA+B;CACtE,IAAM,IAAQ,EAAM,KAAK;CAEzB,IAAI,CAAC,GAGH,OADA,QAAQ,MAAM,mDAAmD,CAAM,GAChE;CAGT,QAAQ,EAAO,MAAf;EACE,KAAK,QAEH,OADA,EAAM,KAAK,GACJ;GAAC,GAAG;GAAO,WAAW;EAAI;EAEnC,KAAK,SAEH,OADA,EAAM,MAAM,GACL;GAAC,GAAG;GAAO,WAAW;EAAK;EAEpC,KAAK,QAEH,OADA,EAAM,SAAS,GACR;GAAC,GAAG;GAAO,SAAS;GAAM,kBAAkB,EAAM;EAAM;EAEjE,KAAK,UAAU;GACb,IAAM,IAAa,EAAM,oBAAoB;GAE7C,OADA,EAAM,SAAS,GACR;IAAC,GAAG;IAAO,SAAS;IAAO,QAAQ;GAAU;EACtD;EACA,KAAK,aAEH,OADA,EAAM,SAAS,EAAO,SACf;GAAC,GAAG;GAAO,QAAQ,EAAO;EAAO;EAE1C,KAAK,YACH,OAAO;GAAC,GAAG;GAAO,WAAW;EAAI;EAEnC,KAAK,aACH,OAAO;GAAC,GAAG;GAAO,WAAW;EAAK;EAEpC,KAAK,eACH,OAAO;GAAC,GAAG;GAAO,UAAU,EAAO;EAAO;EAE5C,SACE,OAAO;CACX;AACF,GAEa,UAAiB;CAC5B,IAAM,IAAU,EAAW,CAAY;CAEvC,IAAI,CAAC,GACH,MAAU,MACR,2GACF;CAGF,OAAO;AACT,GAIa,IAAgB,GAAkD,EAAC,eAAW,MAAiB;CAC1G,IAAM,IAAM,EAAuB,CAA2C,GACxE,IAAgB,EAAuB,IAAI,GAE3C,CAAC,GAAO,KAAY,EAAW,GAAc;EACjD,WAAW;EACX,SAAS;EACT,QAAQ;EACR,kBAAkB;EAClB,WAAW;EACX;EACA,UAAU;CACZ,CAAC,GAEK,CAAC,GAAc,KAAmB,EAAuB,EAAc,OAAO,GAE9E,IAAyB;EAC7B,GAAG;EACH;EACA;EACA,YAAY,EAAS,EAAC,MAAM,OAAM,CAAC;EACnC,aAAa,EAAS,EAAC,MAAM,QAAO,CAAC;EACrC,qBAAqB,EAAS,EAAC,MAAM,EAAM,YAAY,UAAU,OAAM,CAAC;EACxE,YAAY,EAAS,EAAC,MAAM,OAAM,CAAC;EACnC,cAAc,EAAS,EAAC,MAAM,SAAQ,CAAC;EACvC,kBAAkB,EAAS,EAAC,MAAM,EAAM,UAAU,WAAW,OAAM,CAAC;EACpE,YAAW,MAAiB;GAC1B,IAAM,IAAa,OAAO,KAAkB,aAAa,EAAc,EAAM,MAAM,IAAI;GAGvF,EAAS;IAAC,MAAM;IAAa,SAFP,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,CAAU,CAElB;GAAa,CAAC;EACtD;EACA,gBAAgB;GACd,EAAS,EAAC,MAAM,WAAU,CAAC;EAC7B;EACA,iBAAiB,EAAS,EAAC,MAAM,YAAW,CAAC;EAC7C,gBAAgB,EAAS,EAAC,MAAM,EAAM,YAAY,cAAc,WAAU,CAAC;EAC3E,uBAAuB,EAAgB,EAAI;EAC3C,sBAAsB,EAAgB,EAAK;EAC3C,wBAAwB,GAAgB,MAAQ,CAAC,CAAI;EACrD,cAAc,MAAqB,EAAS;GAAC,MAAM;GAAe,SAAS;EAAQ,CAAC;EAEpF,gBAAe,MAAW;GACxB,IAAM,IAAW,EAAM,KAAK;GACvB,MAEL,EAAS,cAAe,IAAU,MAAO,EAAS;EACpD;EACA,OAAM,MAAkB;GACtB,IAAM,IAAW,EAAM,KAAK;GACvB,MAEL,EAAS,cACP,OAAO,KAAmB,aAAa,EAAe,EAAS,WAAW,IAAI;EAClF;CACF;CA6CA,OA3CA,QAAgB;EACd,IAAM,IAAW,EAAM,KAAK;EAE5B,IAAI,CAAC,GAAU;EAEf,IAAM,IAAwD;GAC5D,YAAY;IACV,EAAS,EAAC,MAAM,OAAM,CAAC;GACzB;GACA,eAAe;IACb,EAAS,WAAW,EAAE,CAAC,OAAO;GAChC;GACA,aAAa;IACX,EAAS,EAAC,MAAM,QAAO,CAAC;GAC1B;GACA,aAAa;IACX,EAAS,cAAc;GACzB;GACA,YAAY;IACV,EAAS,EAAC,MAAM,OAAM,CAAC;GACzB;GACA,cAAc;IACZ,EAAS,EAAC,MAAM,SAAQ,CAAC;GAC3B;GACA,oBAAoB;IAClB,EAAS;KAAC,MAAM;KAAa,SAAS,EAAS;IAAM,CAAC;GACxD;GACA,sBAAsB;IACpB,EAAS;KAAC,MAAM;KAAe,SAAS,EAAS;IAAQ,CAAC;GAC5D;EACF;EAEA,KAAK,IAAM,CAAC,GAAO,MAAY,OAAO,QAAQ,CAAa,GACzD,EAAS,iBAAiB,GAAO,CAAO;EAG1C,aAAa;GACX,KAAK,IAAM,CAAC,GAAO,MAAY,OAAO,QAAQ,CAAa,GACzD,EAAS,oBAAoB,GAAO,CAAO;EAE/C;CACF,GAAG,CAAC,EAAM,GAAG,CAAC,GAEP,kBAAC,EAAa,UAAd;EAA8B;EAAQ;CAAgC,CAAA;AAC/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVideoResizeObserver.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useVideoResizeObserver.ts"],"sourcesContent":["import {type RefObject, useEffect, useState} from 'react'\n\n// TODO Once Safari 18 is released we can drop this in favour of container queries\nexport const useVideoResizeObserver = ({\n videoWrapperRef,\n className,\n}: {\n videoWrapperRef: RefObject<HTMLElement | null>\n className: string\n}) => {\n const [isSmall, setIsSmall] = useState(false)\n\n useEffect(() => {\n const handleResize = () => {\n if (!videoWrapperRef.current) return\n\n const breakpoint = videoWrapperRef.current.getBoundingClientRect().width\n\n const isSmallVideo = Boolean(breakpoint && breakpoint < 544)\n setIsSmall(isSmallVideo)\n\n if (isSmallVideo) {\n videoWrapperRef.current.classList.add(className)\n } else {\n videoWrapperRef.current.classList.remove(className)\n }\n }\n\n const resizeObserver = new ResizeObserver(_ => {\n if (videoWrapperRef.current) {\n handleResize()\n }\n })\n\n handleResize()\n\n const currentRef = videoWrapperRef.current\n\n if (!currentRef) {\n return () => {\n resizeObserver.disconnect()\n }\n }\n\n resizeObserver.observe(currentRef)\n return () => {\n resizeObserver.unobserve(currentRef)\n }\n }, [className, videoWrapperRef])\n\n return isSmall\n}\n"],"mappings":";;AAGA,IAAa,KAA0B,EACrC,oBACA,mBAII;CACJ,IAAM,CAAC,GAAS,KAAc,EAAS,
|
|
1
|
+
{"version":3,"file":"useVideoResizeObserver.js","names":[],"sources":["../../../src/VideoPlayer/hooks/useVideoResizeObserver.ts"],"sourcesContent":["import {type RefObject, useEffect, useState} from 'react'\n\n// TODO Once Safari 18 is released we can drop this in favour of container queries\nexport const useVideoResizeObserver = ({\n videoWrapperRef,\n className,\n}: {\n videoWrapperRef: RefObject<HTMLElement | null>\n className: string\n}) => {\n const [isSmall, setIsSmall] = useState(false)\n\n useEffect(() => {\n const handleResize = () => {\n if (!videoWrapperRef.current) return\n\n const breakpoint = videoWrapperRef.current.getBoundingClientRect().width\n\n const isSmallVideo = Boolean(breakpoint && breakpoint < 544)\n setIsSmall(isSmallVideo)\n\n if (isSmallVideo) {\n videoWrapperRef.current.classList.add(className)\n } else {\n videoWrapperRef.current.classList.remove(className)\n }\n }\n\n const resizeObserver = new ResizeObserver(_ => {\n if (videoWrapperRef.current) {\n handleResize()\n }\n })\n\n handleResize()\n\n const currentRef = videoWrapperRef.current\n\n if (!currentRef) {\n return () => {\n resizeObserver.disconnect()\n }\n }\n\n resizeObserver.observe(currentRef)\n return () => {\n resizeObserver.unobserve(currentRef)\n }\n }, [className, videoWrapperRef])\n\n return isSmall\n}\n"],"mappings":";;AAGA,IAAa,KAA0B,EACrC,oBACA,mBAII;CACJ,IAAM,CAAC,GAAS,KAAc,EAAS,EAAK;CAwC5C,OAtCA,QAAgB;EACd,IAAM,UAAqB;GACzB,IAAI,CAAC,EAAgB,SAAS;GAE9B,IAAM,IAAa,EAAgB,QAAQ,sBAAsB,CAAC,CAAC,OAE7D,IAAe,GAAQ,KAAc,IAAa;GAGxD,AAFA,EAAW,CAAY,GAEnB,IACF,EAAgB,QAAQ,UAAU,IAAI,CAAS,IAE/C,EAAgB,QAAQ,UAAU,OAAO,CAAS;EAEtD,GAEM,IAAiB,IAAI,gBAAe,MAAK;GAC7C,AAAI,EAAgB,WAClB,EAAa;EAEjB,CAAC;EAED,EAAa;EAEb,IAAM,IAAa,EAAgB;EASnC,OAPK,KAML,EAAe,QAAQ,CAAU,SACpB;GACX,EAAe,UAAU,CAAU;EACrC,WARe;GACX,EAAe,WAAW;EAC5B;CAOJ,GAAG,CAAC,GAAW,CAAe,CAAC,GAExB;AACT"}
|
|
@@ -7,5 +7,5 @@ export type BoxProps<T extends keyof JSX.IntrinsicElements = 'div'> = React.HTML
|
|
|
7
7
|
* An animation-helper component that can be rendered as any HTML element.
|
|
8
8
|
* Use Animate to wrap any element and apply an animation to it.
|
|
9
9
|
*/
|
|
10
|
-
export declare function Animate({ animate, as, children, className, style, ...rest }: PropsWithChildren<BoxProps>):
|
|
10
|
+
export declare function Animate({ animate, as, children, className, style, ...rest }: PropsWithChildren<BoxProps>): JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Animate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Animate.d.ts","sourceRoot":"","sources":["../../../src/animation/Animate/Animate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AAGtD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GAAG,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG;IAC9F,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAA;CACpC,GAAG,CAAC,CAAC,SAAS,MAAM,GACf,SAAS,CAAC,eAAe,CAAC,GAC1B,CAAC,SAAS,SAAS,GACnB,SAAS,CAAC,WAAW,CAAC,GACtB,CAAC,SAAS,SAAS,GACnB,SAAS,CAAC,cAAc,CAAC,GACzB,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;AAE7B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAC,OAAO,EAAE,EAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"Animate.d.ts","sourceRoot":"","sources":["../../../src/animation/Animate/Animate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,iBAAiB,EAAE,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AAGtD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,GAAG,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG;IAC9F,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAA;CACpC,GAAG,CAAC,CAAC,SAAS,MAAM,GACf,SAAS,CAAC,eAAe,CAAC,GAC1B,CAAC,SAAS,SAAS,GACnB,SAAS,CAAC,WAAW,CAAC,GACtB,CAAC,SAAS,SAAS,GACnB,SAAS,CAAC,cAAc,CAAC,GACzB,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;AAE7B;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAC,OAAO,EAAE,EAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,eAiB9G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Animate.js","names":[],"sources":["../../../src/animation/Animate/Animate.tsx"],"sourcesContent":["import React, {HTMLAttributes, PropsWithChildren, type JSX} from 'react'\nimport {useAnimation} from '..'\nimport type {BaseProps} from '../../component-helpers'\nimport {clsx} from 'clsx'\n\nexport type BoxProps<T extends keyof JSX.IntrinsicElements = 'div'> = React.HTMLAttributes<T> & {\n as?: T | 'div' | 'span' | 'section'\n} & (T extends 'span'\n ? BaseProps<HTMLSpanElement>\n : T extends 'section'\n ? BaseProps<HTMLElement>\n : T extends 'section'\n ? BaseProps<HTMLDivElement>\n : BaseProps<HTMLElement>)\n\n/**\n * An animation-helper component that can be rendered as any HTML element.\n * Use Animate to wrap any element and apply an animation to it.\n */\nexport function Animate({animate, as = 'div', children, className, style, ...rest}: PropsWithChildren<BoxProps>) {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n const validElements = ['div', 'span', 'section']\n const Component = validElements.includes(as) ? as : 'div'\n\n return (\n <Component\n className={clsx(animationClasses, className)}\n style={{\n ...animationInlineStyles,\n ...style,\n }}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAQ,EAAC,YAAS,QAAK,OAAO,aAAU,cAAW,UAAO,GAAG,KAAoC;CAC/G,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,
|
|
1
|
+
{"version":3,"file":"Animate.js","names":[],"sources":["../../../src/animation/Animate/Animate.tsx"],"sourcesContent":["import React, {HTMLAttributes, PropsWithChildren, type JSX} from 'react'\nimport {useAnimation} from '..'\nimport type {BaseProps} from '../../component-helpers'\nimport {clsx} from 'clsx'\n\nexport type BoxProps<T extends keyof JSX.IntrinsicElements = 'div'> = React.HTMLAttributes<T> & {\n as?: T | 'div' | 'span' | 'section'\n} & (T extends 'span'\n ? BaseProps<HTMLSpanElement>\n : T extends 'section'\n ? BaseProps<HTMLElement>\n : T extends 'section'\n ? BaseProps<HTMLDivElement>\n : BaseProps<HTMLElement>)\n\n/**\n * An animation-helper component that can be rendered as any HTML element.\n * Use Animate to wrap any element and apply an animation to it.\n */\nexport function Animate({animate, as = 'div', children, className, style, ...rest}: PropsWithChildren<BoxProps>) {\n const {classes: animationClasses, styles: animationInlineStyles} = useAnimation(animate)\n const validElements = ['div', 'span', 'section']\n const Component = validElements.includes(as) ? as : 'div'\n\n return (\n <Component\n className={clsx(animationClasses, className)}\n style={{\n ...animationInlineStyles,\n ...style,\n }}\n {...(rest as HTMLAttributes<HTMLElement>)}\n >\n {children}\n </Component>\n )\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAQ,EAAC,YAAS,QAAK,OAAO,aAAU,cAAW,UAAO,GAAG,KAAoC;CAC/G,IAAM,EAAC,SAAS,GAAkB,QAAQ,MAAyB,EAAa,CAAO;CAIvF,OACE,kBAHgB;EADK;EAAO;EAAQ;CACpB,CAAA,CAAc,SAAS,CAAE,IAAI,IAAK,OAGlD;EACE,WAAW,EAAK,GAAkB,CAAS;EAC3C,OAAO;GACL,GAAG;GACH,GAAG;EACL;EACA,GAAK;EAEJ;CACQ,CAAA;AAEf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import './Animation.module-Bz_IX_fh.css'
|
|
2
|
-
|
|
1
|
+
import './Animation.module-Bz_IX_fh.css';//#region src/animation/Animation.module.css
|
|
2
|
+
var e = "Primer_Brand__Animation-module__Animation___cS_aI", t = {
|
|
3
|
+
Animation: e,
|
|
3
4
|
"Animation--fade-in": "Primer_Brand__Animation-module__Animation--fade-in___BXhl8",
|
|
4
5
|
"Animation--active": "Primer_Brand__Animation-module__Animation--active___F4mYy",
|
|
5
6
|
"Animation--fade-out": "Primer_Brand__Animation-module__Animation--fade-out___G3tT5",
|
|
@@ -17,6 +18,6 @@ import './Animation.module-Bz_IX_fh.css';var e = {
|
|
|
17
18
|
"Animation--reveal-in-up": "Primer_Brand__Animation-module__Animation--reveal-in-up___8fCQo"
|
|
18
19
|
};
|
|
19
20
|
//#endregion
|
|
20
|
-
export { e as default };
|
|
21
|
+
export { e as Animation, t as default };
|
|
21
22
|
|
|
22
23
|
//# sourceMappingURL=Animation.module.js.map
|
|
@@ -42,6 +42,6 @@ type AnimationProviderProps = {
|
|
|
42
42
|
staggerDelayIncrement?: number;
|
|
43
43
|
};
|
|
44
44
|
export declare const AnimationContext: React.Context<AnimationProviderProps>;
|
|
45
|
-
export declare function AnimationProvider({ children, disableAnimations, animationTrigger, visibilityOptions, runOnce, autoStaggerChildren, staggerDelayIncrement, }: PropsWithChildren<AnimationProviderProps>):
|
|
45
|
+
export declare function AnimationProvider({ children, disableAnimations, animationTrigger, visibilityOptions, runOnce, autoStaggerChildren, staggerDelayIncrement, }: PropsWithChildren<AnimationProviderProps>): React.JSX.Element;
|
|
46
46
|
export {};
|
|
47
47
|
//# sourceMappingURL=AnimationProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationProvider.d.ts","sourceRoot":"","sources":["../../../src/animation/AnimationProvider/AnimationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,iBAAiB,EAAsB,MAAM,OAAO,CAAA;AAElF;;GAEG;AACH,OAAO,qFAAqF,CAAA;AAM5F,eAAO,MAAM,iBAAiB,oOAepB,CAAA;AAEV,KAAK,OAAO,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAA;AAEpD,KAAK,gBAAgB,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAA;AAC5D,KAAK,8BAA8B,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAEzG,KAAK,sBAAsB,GAAG;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,8BAA8B,CAAA;IAClD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,gBAAgB,uCAA4C,CAAA;AAkCzE,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,iBAAyB,EACzB,gBAA+B,EAC/B,iBAAsC,EACtC,OAAe,EACf,mBAA0B,EAC1B,qBAA2B,GAC5B,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"AnimationProvider.d.ts","sourceRoot":"","sources":["../../../src/animation/AnimationProvider/AnimationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,iBAAiB,EAAsB,MAAM,OAAO,CAAA;AAElF;;GAEG;AACH,OAAO,qFAAqF,CAAA;AAM5F,eAAO,MAAM,iBAAiB,oOAepB,CAAA;AAEV,KAAK,OAAO,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAA;AAEpD,KAAK,gBAAgB,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAAA;AAC5D,KAAK,8BAA8B,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAEzG,KAAK,sBAAsB,GAAG;IAC5B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,8BAA8B,CAAA;IAClD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,gBAAgB,uCAA4C,CAAA;AAkCzE,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,iBAAyB,EACzB,gBAA+B,EAC/B,iBAAsC,EACtC,OAAe,EACf,mBAA0B,EAC1B,qBAA2B,GAC5B,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,qBA2G3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationProvider.js","names":[],"sources":["../../../src/animation/AnimationProvider/AnimationProvider.tsx"],"sourcesContent":["import React, {createContext, PropsWithChildren, useEffect, useState} from 'react'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/animation/base.css'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from '../Animation.module.css'\nimport {useId} from '../../hooks/useId'\n\nexport const AnimationVariants = [\n 'fade-in',\n 'fade-out',\n 'slide-in-up',\n 'slide-in-down',\n 'slide-in-left',\n 'slide-in-right',\n 'scale-in-up',\n 'scale-in-down',\n 'scale-in',\n 'fill-in-top',\n 'scale-in-right',\n 'scale-in-left',\n 'fill-in-right',\n 'reveal-in-up',\n] as const\n\ntype Variant = (typeof AnimationVariants)[number]\n\ntype VariantAdvanced = {\n variant: Variant\n delay?: number\n duration?: number\n ease?: string\n}\nexport type AnimateProps = Variant | VariantAdvanced\n\ntype AnimationTrigger = 'click' | 'on-visible' | 'immediate'\ntype IntersectionVisibilityeOptions = 'bottom-of-screen' | 'middle-of-screen' | 'about-to-leave' | number\n\ntype AnimationProviderProps = {\n /**\n * Prevents animations from running inside the provider\n */\n disableAnimations?: boolean\n /**\n * Controls the trigger method for the animation. One of `click`, `on-visible`, or `immediate`.\n */\n animationTrigger?: AnimationTrigger\n /**\n * Controls the intersection observer options for the animation.\n * One of `bottom-of-screen`, `middle-of-screen`, `about-to-leave`, or a number between 0 and 1.\n */\n visibilityOptions?: IntersectionVisibilityeOptions\n /**\n * Will persist the animation end-state after the animation has completed\n */\n runOnce?: boolean\n\n /**\n * Will stagger the animations of the children using an incrementing delay\n */\n autoStaggerChildren?: boolean\n\n /**\n * Stagger delay increment. Should be used alongside `autoStaggerChildren`.\n */\n staggerDelayIncrement?: number\n}\n\nexport const AnimationContext = createContext<AnimationProviderProps>({})\n\nfunction getIntersectionObserverOptions(animationOptions: AnimationProviderProps): IntersectionObserverInit {\n const {visibilityOptions} = animationOptions\n\n switch (visibilityOptions) {\n case 'bottom-of-screen':\n return {\n rootMargin: '0px 0px -10% 0px',\n threshold: 0.4,\n }\n case 'middle-of-screen':\n return {\n rootMargin: '0px 0px -30% 0px',\n threshold: 0.4,\n }\n case 'about-to-leave':\n return {\n rootMargin: '0px 0px -100% 0px',\n threshold: 0.4,\n }\n default:\n return typeof visibilityOptions === 'number'\n ? {\n rootMargin: '0px',\n threshold: visibilityOptions / 100,\n }\n : {\n rootMargin: '0px',\n threshold: 0.4,\n }\n }\n}\n\nexport function AnimationProvider({\n children,\n disableAnimations = false,\n animationTrigger = 'on-visible',\n visibilityOptions = 'bottom-of-screen',\n runOnce = false,\n autoStaggerChildren = true,\n staggerDelayIncrement = 100,\n}: PropsWithChildren<AnimationProviderProps>) {\n const uniqueId = useId()\n const [animationContext, setAnimationContext] = useState<AnimationProviderProps>({\n disableAnimations,\n animationTrigger,\n visibilityOptions,\n runOnce,\n })\n\n useEffect(() => {\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n if (prefersReducedMotion) {\n setAnimationContext({\n disableAnimations: true,\n animationTrigger,\n visibilityOptions,\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n // add useEffect to add transition-delay to children that contain the Animation class\n useEffect(() => {\n if (!disableAnimations && autoStaggerChildren && uniqueId) {\n const stagger = staggerDelayIncrement\n const animationProvider = document.getElementById(uniqueId)\n\n if (!animationProvider) return\n\n const items = Array.from(animationProvider.querySelectorAll<HTMLElement>(`.${styles.Animation}`))\n\n if (items.length === 0) return\n\n for (let i = 0; i < items.length; i++) {\n items[i].style.transitionDelay = `${i * stagger}ms`\n }\n }\n }, [disableAnimations, autoStaggerChildren, staggerDelayIncrement, uniqueId])\n\n // Immediately run animations and bypass intersection observer\n useEffect(() => {\n if (!disableAnimations && animationTrigger === 'immediate' && uniqueId) {\n const animationProvider = document.getElementById(uniqueId)\n if (!animationProvider) return\n\n requestAnimationFrame(() => {\n const elements = Array.from(animationProvider.querySelectorAll(`.${styles.Animation}`))\n for (const element of elements) {\n element.classList.add(styles['Animation--active'])\n }\n })\n }\n }, [disableAnimations, animationTrigger, uniqueId])\n\n useEffect(() => {\n if (!disableAnimations && animationTrigger === 'on-visible') {\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n if (entry.isIntersecting && entry.target.classList.contains(styles.Animation)) {\n entry.target.classList.add(styles['Animation--active'])\n } else {\n if (!runOnce) {\n entry.target.classList.remove(styles['Animation--active'])\n }\n }\n }\n },\n getIntersectionObserverOptions({\n disableAnimations,\n animationTrigger,\n visibilityOptions,\n }),\n )\n\n const elements = Array.from(document.querySelectorAll(`.${styles.Animation}`))\n\n for (const element of elements) {\n observer.observe(element)\n }\n\n return () => {\n observer.disconnect()\n }\n }\n\n if (!disableAnimations && animationTrigger === 'click') {\n const handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement\n if (target.classList.contains(styles.Animation)) {\n target.classList.add(styles['Animation--active'])\n }\n }\n\n document.addEventListener('click', handleClick)\n\n return () => {\n document.removeEventListener('click', handleClick)\n }\n }\n }, [disableAnimations, animationTrigger, visibilityOptions, runOnce])\n return (\n <AnimationContext.Provider value={animationContext}>\n <div id={uniqueId}>{children}</div>\n </AnimationContext.Provider>\n )\n}\n"],"mappings":";;;;;;AAWA,IAAa,IAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;
|
|
1
|
+
{"version":3,"file":"AnimationProvider.js","names":[],"sources":["../../../src/animation/AnimationProvider/AnimationProvider.tsx"],"sourcesContent":["import React, {createContext, PropsWithChildren, useEffect, useState} from 'react'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/animation/base.css'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from '../Animation.module.css'\nimport {useId} from '../../hooks/useId'\n\nexport const AnimationVariants = [\n 'fade-in',\n 'fade-out',\n 'slide-in-up',\n 'slide-in-down',\n 'slide-in-left',\n 'slide-in-right',\n 'scale-in-up',\n 'scale-in-down',\n 'scale-in',\n 'fill-in-top',\n 'scale-in-right',\n 'scale-in-left',\n 'fill-in-right',\n 'reveal-in-up',\n] as const\n\ntype Variant = (typeof AnimationVariants)[number]\n\ntype VariantAdvanced = {\n variant: Variant\n delay?: number\n duration?: number\n ease?: string\n}\nexport type AnimateProps = Variant | VariantAdvanced\n\ntype AnimationTrigger = 'click' | 'on-visible' | 'immediate'\ntype IntersectionVisibilityeOptions = 'bottom-of-screen' | 'middle-of-screen' | 'about-to-leave' | number\n\ntype AnimationProviderProps = {\n /**\n * Prevents animations from running inside the provider\n */\n disableAnimations?: boolean\n /**\n * Controls the trigger method for the animation. One of `click`, `on-visible`, or `immediate`.\n */\n animationTrigger?: AnimationTrigger\n /**\n * Controls the intersection observer options for the animation.\n * One of `bottom-of-screen`, `middle-of-screen`, `about-to-leave`, or a number between 0 and 1.\n */\n visibilityOptions?: IntersectionVisibilityeOptions\n /**\n * Will persist the animation end-state after the animation has completed\n */\n runOnce?: boolean\n\n /**\n * Will stagger the animations of the children using an incrementing delay\n */\n autoStaggerChildren?: boolean\n\n /**\n * Stagger delay increment. Should be used alongside `autoStaggerChildren`.\n */\n staggerDelayIncrement?: number\n}\n\nexport const AnimationContext = createContext<AnimationProviderProps>({})\n\nfunction getIntersectionObserverOptions(animationOptions: AnimationProviderProps): IntersectionObserverInit {\n const {visibilityOptions} = animationOptions\n\n switch (visibilityOptions) {\n case 'bottom-of-screen':\n return {\n rootMargin: '0px 0px -10% 0px',\n threshold: 0.4,\n }\n case 'middle-of-screen':\n return {\n rootMargin: '0px 0px -30% 0px',\n threshold: 0.4,\n }\n case 'about-to-leave':\n return {\n rootMargin: '0px 0px -100% 0px',\n threshold: 0.4,\n }\n default:\n return typeof visibilityOptions === 'number'\n ? {\n rootMargin: '0px',\n threshold: visibilityOptions / 100,\n }\n : {\n rootMargin: '0px',\n threshold: 0.4,\n }\n }\n}\n\nexport function AnimationProvider({\n children,\n disableAnimations = false,\n animationTrigger = 'on-visible',\n visibilityOptions = 'bottom-of-screen',\n runOnce = false,\n autoStaggerChildren = true,\n staggerDelayIncrement = 100,\n}: PropsWithChildren<AnimationProviderProps>) {\n const uniqueId = useId()\n const [animationContext, setAnimationContext] = useState<AnimationProviderProps>({\n disableAnimations,\n animationTrigger,\n visibilityOptions,\n runOnce,\n })\n\n useEffect(() => {\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n if (prefersReducedMotion) {\n setAnimationContext({\n disableAnimations: true,\n animationTrigger,\n visibilityOptions,\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n // add useEffect to add transition-delay to children that contain the Animation class\n useEffect(() => {\n if (!disableAnimations && autoStaggerChildren && uniqueId) {\n const stagger = staggerDelayIncrement\n const animationProvider = document.getElementById(uniqueId)\n\n if (!animationProvider) return\n\n const items = Array.from(animationProvider.querySelectorAll<HTMLElement>(`.${styles.Animation}`))\n\n if (items.length === 0) return\n\n for (let i = 0; i < items.length; i++) {\n items[i].style.transitionDelay = `${i * stagger}ms`\n }\n }\n }, [disableAnimations, autoStaggerChildren, staggerDelayIncrement, uniqueId])\n\n // Immediately run animations and bypass intersection observer\n useEffect(() => {\n if (!disableAnimations && animationTrigger === 'immediate' && uniqueId) {\n const animationProvider = document.getElementById(uniqueId)\n if (!animationProvider) return\n\n requestAnimationFrame(() => {\n const elements = Array.from(animationProvider.querySelectorAll(`.${styles.Animation}`))\n for (const element of elements) {\n element.classList.add(styles['Animation--active'])\n }\n })\n }\n }, [disableAnimations, animationTrigger, uniqueId])\n\n useEffect(() => {\n if (!disableAnimations && animationTrigger === 'on-visible') {\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n if (entry.isIntersecting && entry.target.classList.contains(styles.Animation)) {\n entry.target.classList.add(styles['Animation--active'])\n } else {\n if (!runOnce) {\n entry.target.classList.remove(styles['Animation--active'])\n }\n }\n }\n },\n getIntersectionObserverOptions({\n disableAnimations,\n animationTrigger,\n visibilityOptions,\n }),\n )\n\n const elements = Array.from(document.querySelectorAll(`.${styles.Animation}`))\n\n for (const element of elements) {\n observer.observe(element)\n }\n\n return () => {\n observer.disconnect()\n }\n }\n\n if (!disableAnimations && animationTrigger === 'click') {\n const handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement\n if (target.classList.contains(styles.Animation)) {\n target.classList.add(styles['Animation--active'])\n }\n }\n\n document.addEventListener('click', handleClick)\n\n return () => {\n document.removeEventListener('click', handleClick)\n }\n }\n }, [disableAnimations, animationTrigger, visibilityOptions, runOnce])\n return (\n <AnimationContext.Provider value={animationContext}>\n <div id={uniqueId}>{children}</div>\n </AnimationContext.Provider>\n )\n}\n"],"mappings":";;;;;;AAWA,IAAa,IAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GA6Ca,IAAmB,EAAsC,CAAC,CAAC;AAExE,SAAS,EAA+B,GAAoE;CAC1G,IAAM,EAAC,yBAAqB;CAE5B,QAAQ,GAAR;EACE,KAAK,oBACH,OAAO;GACL,YAAY;GACZ,WAAW;EACb;EACF,KAAK,oBACH,OAAO;GACL,YAAY;GACZ,WAAW;EACb;EACF,KAAK,kBACH,OAAO;GACL,YAAY;GACZ,WAAW;EACb;EACF,SACE,OAAO,OAAO,KAAsB,WAChC;GACE,YAAY;GACZ,WAAW,IAAoB;EACjC,IACA;GACE,YAAY;GACZ,WAAW;EACb;CACR;AACF;AAEA,SAAgB,EAAkB,EAChC,aACA,uBAAoB,IACpB,sBAAmB,cACnB,uBAAoB,oBACpB,aAAU,IACV,yBAAsB,IACtB,2BAAwB,OACoB;CAC5C,IAAM,IAAW,EAAM,GACjB,CAAC,GAAkB,KAAuB,EAAiC;EAC/E;EACA;EACA;EACA;CACF,CAAC;CA+FD,OA7FA,QAAgB;EAGd,AAF6B,OAAO,WAAW,kCAAkC,CAAC,CAAC,WAGjF,EAAoB;GAClB,mBAAmB;GACnB;GACA;EACF,CAAC;CAGL,GAAG,CAAC,CAAC,GAGL,QAAgB;EACd,IAAI,CAAC,KAAqB,KAAuB,GAAU;GACzD,IAAM,IAAU,GACV,IAAoB,SAAS,eAAe,CAAQ;GAE1D,IAAI,CAAC,GAAmB;GAExB,IAAM,IAAQ,MAAM,KAAK,EAAkB,iBAA8B,IAAI,EAAO,WAAW,CAAC;GAEhG,IAAI,EAAM,WAAW,GAAG;GAExB,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,QAAQ,KAChC,EAAM,EAAE,CAAC,MAAM,kBAAkB,GAAG,IAAI,EAAQ;EAEpD;CACF,GAAG;EAAC;EAAmB;EAAqB;EAAuB;CAAQ,CAAC,GAG5E,QAAgB;EACd,IAAI,CAAC,KAAqB,MAAqB,eAAe,GAAU;GACtE,IAAM,IAAoB,SAAS,eAAe,CAAQ;GAC1D,IAAI,CAAC,GAAmB;GAExB,4BAA4B;IAC1B,IAAM,IAAW,MAAM,KAAK,EAAkB,iBAAiB,IAAI,EAAO,WAAW,CAAC;IACtF,KAAK,IAAM,KAAW,GACpB,EAAQ,UAAU,IAAI,EAAO,oBAAoB;GAErD,CAAC;EACH;CACF,GAAG;EAAC;EAAmB;EAAkB;CAAQ,CAAC,GAElD,QAAgB;EACd,IAAI,CAAC,KAAqB,MAAqB,cAAc;GAC3D,IAAM,IAAW,IAAI,sBACnB,MAAW;IACT,KAAK,IAAM,KAAS,GAClB,AAAI,EAAM,kBAAkB,EAAM,OAAO,UAAU,SAAS,EAAO,SAAS,IAC1E,EAAM,OAAO,UAAU,IAAI,EAAO,oBAAoB,IAEjD,KACH,EAAM,OAAO,UAAU,OAAO,EAAO,oBAAoB;GAIjE,GACA,EAA+B;IAC7B;IACA;IACA;GACF,CAAC,CACH,GAEM,IAAW,MAAM,KAAK,SAAS,iBAAiB,IAAI,EAAO,WAAW,CAAC;GAE7E,KAAK,IAAM,KAAW,GACpB,EAAS,QAAQ,CAAO;GAG1B,aAAa;IACX,EAAS,WAAW;GACtB;EACF;EAEA,IAAI,CAAC,KAAqB,MAAqB,SAAS;GACtD,IAAM,KAAe,MAAsB;IACzC,IAAM,IAAS,EAAM;IACrB,AAAI,EAAO,UAAU,SAAS,EAAO,SAAS,KAC5C,EAAO,UAAU,IAAI,EAAO,oBAAoB;GAEpD;GAIA,OAFA,SAAS,iBAAiB,SAAS,CAAW,SAEjC;IACX,SAAS,oBAAoB,SAAS,CAAW;GACnD;EACF;CACF,GAAG;EAAC;EAAmB;EAAkB;EAAmB;CAAO,CAAC,GAElE,kBAAC,EAAiB,UAAlB;EAA2B,OAAO;YAChC,kBAAC,OAAD;GAAK,IAAI;GAAW;EAAc,CAAA;CACT,CAAA;AAE/B"}
|
|
@@ -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 { useTextRevealAnimationLines as t } from "./useTextRevealAnimationLines.js";
|
|
3
3
|
import n from "./TextRevealAnimation.module.js";
|
|
4
4
|
import { useProvidedRefOrCreate as r } from "../../hooks/useRef.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextRevealAnimation.js","names":[],"sources":["../../../src/animation/TextRevealAnimation/TextRevealAnimation.tsx"],"sourcesContent":["import React, {useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {useTextRevealAnimationLines} from './useTextRevealAnimationLines'\n\nimport styles from './TextRevealAnimation.module.css'\nimport {BaseProps} from '../../component-helpers'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\n\nexport type TextRevealAnimationProps = BaseProps<HTMLSpanElement> &\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {\n children: string\n }\n\nexport const TextRevealAnimation = React.forwardRef<HTMLSpanElement, TextRevealAnimationProps>(\n function
|
|
1
|
+
{"version":3,"file":"TextRevealAnimation.js","names":[],"sources":["../../../src/animation/TextRevealAnimation/TextRevealAnimation.tsx"],"sourcesContent":["import React, {useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {useTextRevealAnimationLines} from './useTextRevealAnimationLines'\n\nimport styles from './TextRevealAnimation.module.css'\nimport {BaseProps} from '../../component-helpers'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\n\nexport type TextRevealAnimationProps = BaseProps<HTMLSpanElement> &\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> & {\n children: string\n }\n\nexport const TextRevealAnimation = React.forwardRef<HTMLSpanElement, TextRevealAnimationProps>(\n function TextRevealAnimationWithRef({children, ...rest}, forwardedRef) {\n const spanRef = useProvidedRefOrCreate<HTMLSpanElement | null>(\n forwardedRef as React.RefObject<HTMLSpanElement> | React.RefCallback<HTMLSpanElement> | null,\n )\n const {lines} = useTextRevealAnimationLines(children || '', spanRef)\n const [animationStarted, setAnimationStarted] = React.useState(false)\n const [hasAnimationCompleted, setHasAnimationCompleted] = React.useState(false)\n\n const onLineAnimationEnd = (i: number) => {\n if (lines && i === lines.length - 1) {\n setHasAnimationCompleted(true)\n }\n }\n\n useEffect(() => {\n const el = spanRef.current\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setAnimationStarted(true)\n if (el) {\n observer.unobserve(el)\n }\n }\n }\n },\n {\n threshold: 1,\n rootMargin: '0px 0px -10% 0px',\n },\n )\n\n if (el) {\n observer.observe(el)\n }\n\n return () => {\n if (el) {\n observer.unobserve(el)\n }\n }\n }, [spanRef])\n\n if (typeof children !== 'string' && (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test')) {\n // eslint-disable-next-line no-console\n console.warn('Children passed to TextRevealAnimation must be a string')\n return null\n }\n\n return (\n <span ref={spanRef} {...rest}>\n {lines?.map((line, i) => (\n <React.Fragment key={line}>\n <span\n className={clsx(\n styles.TextRevealAnimation,\n animationStarted && styles['TextRevealAnimation--visible'],\n animationStarted &&\n (hasAnimationCompleted ? styles['TextRevealAnimation'] : styles['TextRevealAnimation--animated']),\n )}\n style={{'--animation-delay': `${220 + i * 200}ms`} as React.CSSProperties}\n onAnimationEnd={() => onLineAnimationEnd(i)}\n >\n {line}\n </span>{' '}\n {/* The trailing space above is intentional. It prevents adjacent words at the start/end of lines from being rendered as a single word */}\n </React.Fragment>\n ))}\n </span>\n )\n },\n)\n"],"mappings":";;;;;;;AAaA,IAAa,IAAsB,EAAM,WACvC,SAAoC,EAAC,aAAU,GAAG,KAAO,GAAc;CACrE,IAAM,IAAU,EACd,CACF,GACM,EAAC,aAAS,EAA4B,KAAY,IAAI,CAAO,GAC7D,CAAC,GAAkB,KAAuB,EAAM,SAAS,EAAK,GAC9D,CAAC,GAAuB,KAA4B,EAAM,SAAS,EAAK,GAExE,KAAsB,MAAc;EACxC,AAAI,KAAS,MAAM,EAAM,SAAS,KAChC,EAAyB,EAAI;CAEjC;CAsCA,OApCA,QAAgB;EACd,IAAM,IAAK,EAAQ,SACb,IAAW,IAAI,sBACnB,MAAW;GACT,KAAK,IAAM,KAAS,GAClB,AAAI,EAAM,mBACR,EAAoB,EAAI,GACpB,KACF,EAAS,UAAU,CAAE;EAI7B,GACA;GACE,WAAW;GACX,YAAY;EACd,CACF;EAMA,OAJI,KACF,EAAS,QAAQ,CAAE,SAGR;GACX,AAAI,KACF,EAAS,UAAU,CAAE;EAEzB;CACF,GAAG,CAAC,CAAO,CAAC,GAER,OAAO,KAAa,aAAA,QAAA,IAAA,aAAsC,iBAAA,QAAA,IAAA,aAA0C,WAEtG,QAAQ,KAAK,yDAAyD,GAC/D,QAIP,kBAAC,QAAD;EAAM,KAAK;EAAS,GAAI;YACrB,GAAO,KAAK,GAAM,MACjB,kBAAC,EAAM,UAAP,EAAA,UAAA,CACE,kBAAC,QAAD;GACE,WAAW,EACT,EAAO,qBACP,KAAoB,EAAO,iCAC3B,MACG,IAAwB,EAAO,sBAAyB,EAAO,iCACpE;GACA,OAAO,EAAC,qBAAqB,GAAG,MAAM,IAAI,IAAI,IAAG;GACjD,sBAAsB,EAAmB,CAAC;aAEzC;EACG,CAAA,GAAE,GAEM,EAAA,GAdK,CAcL,CACjB;CACG,CAAA;AAEV,CACF"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import './TextRevealAnimation.module-BzK16DXS.css'
|
|
2
|
-
|
|
1
|
+
import './TextRevealAnimation.module-BzK16DXS.css';//#region src/animation/TextRevealAnimation/TextRevealAnimation.module.css
|
|
2
|
+
var e = "Primer_Brand__TextRevealAnimation-module__TextRevealAnimation___W6_ey", t = "Primer_Brand__TextRevealAnimation-module__wipe___IwKBR", n = {
|
|
3
|
+
TextRevealAnimation: e,
|
|
3
4
|
"TextRevealAnimation--visible": "Primer_Brand__TextRevealAnimation-module__TextRevealAnimation--visible___VS7mJ",
|
|
4
5
|
"TextRevealAnimation--animated": "Primer_Brand__TextRevealAnimation-module__TextRevealAnimation--animated___wKBYl",
|
|
5
|
-
wipe:
|
|
6
|
+
wipe: t
|
|
6
7
|
};
|
|
7
8
|
//#endregion
|
|
8
|
-
export { e as default };
|
|
9
|
+
export { e as TextRevealAnimation, n as default, t as wipe };
|
|
9
10
|
|
|
10
11
|
//# sourceMappingURL=TextRevealAnimation.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextRevealAnimationLines.js","names":[],"sources":["../../../src/animation/TextRevealAnimation/useTextRevealAnimationLines.ts"],"sourcesContent":["import {useRef, useEffect, useState, RefObject} from 'react'\n\nexport const useTextRevealAnimationLines = (text?: string, providedRef?: RefObject<HTMLElement | null>) => {\n const internalRef = useRef<HTMLElement>(null)\n const ref = providedRef ?? internalRef\n const [lines, setLines] = useState<string[]>()\n\n useEffect(() => {\n if (!ref.current || !text) return\n\n const wrapLines = () => {\n const element = ref.current\n\n if (!element || !text) return\n\n const originalColor = window.getComputedStyle(element).color\n\n element.style.color = 'transparent'\n element.textContent = ''\n\n const words = text.split(' ')\n\n const lineBreakPositions: number[] = []\n let prevHeight = 0\n const linesArr: string[][] = []\n\n for (const word of words) {\n element.textContent += `${word} `\n const height = element.offsetHeight\n\n if (linesArr.length === 0) {\n prevHeight = height\n linesArr.push([word])\n continue\n }\n\n if (height > prevHeight) {\n lineBreakPositions.push(linesArr.length)\n linesArr.push([word])\n } else {\n linesArr.at(-1)?.push(word)\n }\n\n prevHeight = height\n }\n\n element.style.color = originalColor\n element.textContent = ''\n\n setLines(linesArr.map(line => line.join(' ')))\n }\n\n wrapLines()\n }, [text, ref])\n\n return {ref, lines}\n}\n"],"mappings":";;AAEA,IAAa,KAA+B,GAAe,MAAgD;CACzG,IAAM,IAAc,EAAoB,
|
|
1
|
+
{"version":3,"file":"useTextRevealAnimationLines.js","names":[],"sources":["../../../src/animation/TextRevealAnimation/useTextRevealAnimationLines.ts"],"sourcesContent":["import {useRef, useEffect, useState, RefObject} from 'react'\n\nexport const useTextRevealAnimationLines = (text?: string, providedRef?: RefObject<HTMLElement | null>) => {\n const internalRef = useRef<HTMLElement>(null)\n const ref = providedRef ?? internalRef\n const [lines, setLines] = useState<string[]>()\n\n useEffect(() => {\n if (!ref.current || !text) return\n\n const wrapLines = () => {\n const element = ref.current\n\n if (!element || !text) return\n\n const originalColor = window.getComputedStyle(element).color\n\n element.style.color = 'transparent'\n element.textContent = ''\n\n const words = text.split(' ')\n\n const lineBreakPositions: number[] = []\n let prevHeight = 0\n const linesArr: string[][] = []\n\n for (const word of words) {\n element.textContent += `${word} `\n const height = element.offsetHeight\n\n if (linesArr.length === 0) {\n prevHeight = height\n linesArr.push([word])\n continue\n }\n\n if (height > prevHeight) {\n lineBreakPositions.push(linesArr.length)\n linesArr.push([word])\n } else {\n linesArr.at(-1)?.push(word)\n }\n\n prevHeight = height\n }\n\n element.style.color = originalColor\n element.textContent = ''\n\n setLines(linesArr.map(line => line.join(' ')))\n }\n\n wrapLines()\n }, [text, ref])\n\n return {ref, lines}\n}\n"],"mappings":";;AAEA,IAAa,KAA+B,GAAe,MAAgD;CACzG,IAAM,IAAc,EAAoB,IAAI,GACtC,IAAM,KAAe,GACrB,CAAC,GAAO,KAAY,EAAmB;CAkD7C,OAhDA,QAAgB;EACV,CAAC,EAAI,WAAW,CAAC,YAEG;GACtB,IAAM,IAAU,EAAI;GAEpB,IAAI,CAAC,KAAW,CAAC,GAAM;GAEvB,IAAM,IAAgB,OAAO,iBAAiB,CAAO,CAAC,CAAC;GAGvD,AADA,EAAQ,MAAM,QAAQ,eACtB,EAAQ,cAAc;GAEtB,IAAM,IAAQ,EAAK,MAAM,GAAG,GAEtB,IAA+B,CAAC,GAClC,IAAa,GACX,IAAuB,CAAC;GAE9B,KAAK,IAAM,KAAQ,GAAO;IACxB,EAAQ,eAAe,GAAG,EAAK;IAC/B,IAAM,IAAS,EAAQ;IAEvB,IAAI,EAAS,WAAW,GAAG;KAEzB,AADA,IAAa,GACb,EAAS,KAAK,CAAC,CAAI,CAAC;KACpB;IACF;IASA,AAPI,IAAS,KACX,EAAmB,KAAK,EAAS,MAAM,GACvC,EAAS,KAAK,CAAC,CAAI,CAAC,KAEpB,EAAS,GAAG,EAAE,CAAC,EAAE,KAAK,CAAI,GAG5B,IAAa;GACf;GAKA,AAHA,EAAQ,MAAM,QAAQ,GACtB,EAAQ,cAAc,IAEtB,EAAS,EAAS,KAAI,MAAQ,EAAK,KAAK,GAAG,CAAC,CAAC;EAC/C,EAEA,CAAU;CACZ,GAAG,CAAC,GAAM,CAAG,CAAC,GAEP;EAAC;EAAK;CAAK;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimation.js","names":[],"sources":["../../src/animation/useAnimation.ts"],"sourcesContent":["import {CSSProperties, useContext, useMemo} from 'react'\nimport {AnimateProps, AnimationContext, AnimationVariants} from './AnimationProvider'\n\nimport styles from './Animation.module.css'\n\nconst animationTypeToClass = AnimationVariants.reduce((acc, key) => {\n acc[key] = styles[`Animation--${key}`]\n return acc\n}, {})\n\n/**\n * A hook that returns CSS classes and styles for animating an element.\n * @param {AnimateProps} [animateProps] - An object containing animation properties.\n * @returns {{classes: string; styles: CSSProperties}} - An object containing CSS classes and styles for animating an element.\n */\nexport const useAnimation = (animateProps?: AnimateProps): {classes: string; styles: CSSProperties} => {\n const {disableAnimations} = useContext(AnimationContext)\n\n const animationClasses = useMemo(() => {\n if (!animateProps || disableAnimations) {\n return ''\n }\n\n const defaultClasses = styles.Animation\n const dynamicClasses: string[] = []\n\n const animationType = typeof animateProps === 'string' ? animateProps : animateProps.variant\n const animationClass = animationTypeToClass[animationType]\n if (animationClass) {\n dynamicClasses.push(animationClass)\n }\n\n return `${defaultClasses} ${dynamicClasses.join(' ')}`\n }, [animateProps, disableAnimations])\n\n const animationStyles = useMemo(() => {\n if (!animateProps) {\n return {}\n }\n\n const newStyles: CSSProperties = {}\n\n if (typeof animateProps === 'object') {\n const {delay, duration, ease} = animateProps\n if (typeof delay === 'number') {\n newStyles.transitionDelay = `${delay}ms`\n }\n if (typeof duration === 'number') {\n newStyles.transitionDuration = `${duration}ms`\n }\n\n if (ease) {\n newStyles.transitionTimingFunction = ease\n }\n }\n\n return newStyles\n }, [animateProps])\n\n return {\n classes: animationClasses,\n styles: animationStyles,\n }\n}\n"],"mappings":";;;;AAKA,IAAM,IAAuB,EAAkB,QAAQ,GAAK,OAC1D,EAAI,KAAO,EAAO,cAAc,MACzB,IACN,
|
|
1
|
+
{"version":3,"file":"useAnimation.js","names":[],"sources":["../../src/animation/useAnimation.ts"],"sourcesContent":["import {CSSProperties, useContext, useMemo} from 'react'\nimport {AnimateProps, AnimationContext, AnimationVariants} from './AnimationProvider'\n\nimport styles from './Animation.module.css'\n\nconst animationTypeToClass = AnimationVariants.reduce((acc, key) => {\n acc[key] = styles[`Animation--${key}`]\n return acc\n}, {})\n\n/**\n * A hook that returns CSS classes and styles for animating an element.\n * @param {AnimateProps} [animateProps] - An object containing animation properties.\n * @returns {{classes: string; styles: CSSProperties}} - An object containing CSS classes and styles for animating an element.\n */\nexport const useAnimation = (animateProps?: AnimateProps): {classes: string; styles: CSSProperties} => {\n const {disableAnimations} = useContext(AnimationContext)\n\n const animationClasses = useMemo(() => {\n if (!animateProps || disableAnimations) {\n return ''\n }\n\n const defaultClasses = styles.Animation\n const dynamicClasses: string[] = []\n\n const animationType = typeof animateProps === 'string' ? animateProps : animateProps.variant\n const animationClass = animationTypeToClass[animationType]\n if (animationClass) {\n dynamicClasses.push(animationClass)\n }\n\n return `${defaultClasses} ${dynamicClasses.join(' ')}`\n }, [animateProps, disableAnimations])\n\n const animationStyles = useMemo(() => {\n if (!animateProps) {\n return {}\n }\n\n const newStyles: CSSProperties = {}\n\n if (typeof animateProps === 'object') {\n const {delay, duration, ease} = animateProps\n if (typeof delay === 'number') {\n newStyles.transitionDelay = `${delay}ms`\n }\n if (typeof duration === 'number') {\n newStyles.transitionDuration = `${duration}ms`\n }\n\n if (ease) {\n newStyles.transitionTimingFunction = ease\n }\n }\n\n return newStyles\n }, [animateProps])\n\n return {\n classes: animationClasses,\n styles: animationStyles,\n }\n}\n"],"mappings":";;;;AAKA,IAAM,IAAuB,EAAkB,QAAQ,GAAK,OAC1D,EAAI,KAAO,EAAO,cAAc,MACzB,IACN,CAAC,CAAC,GAOQ,KAAgB,MAA0E;CACrG,IAAM,EAAC,yBAAqB,EAAW,CAAgB;CA2CvD,OAAO;EACL,SA1CuB,QAAc;GACrC,IAAI,CAAC,KAAgB,GACnB,OAAO;GAGT,IAAM,IAAiB,EAAO,WACxB,IAA2B,CAAC,GAG5B,IAAiB,EADD,OAAO,KAAiB,WAAW,IAAe,EAAa;GAMrF,OAJI,KACF,EAAe,KAAK,CAAc,GAG7B,GAAG,EAAe,GAAG,EAAe,KAAK,GAAG;EACrD,GAAG,CAAC,GAAc,CAAiB,CA2BxB;EACT,QA1BsB,QAAc;GACpC,IAAI,CAAC,GACH,OAAO,CAAC;GAGV,IAAM,IAA2B,CAAC;GAElC,IAAI,OAAO,KAAiB,UAAU;IACpC,IAAM,EAAC,UAAO,aAAU,YAAQ;IAQhC,AAPI,OAAO,KAAU,aACnB,EAAU,kBAAkB,GAAG,EAAM,MAEnC,OAAO,KAAa,aACtB,EAAU,qBAAqB,GAAG,EAAS,MAGzC,MACF,EAAU,2BAA2B;GAEzC;GAEA,OAAO;EACT,GAAG,CAAC,CAAY,CAIN;CACV;AACF"}
|