@primer/react-brand 0.68.0-rc.b6d410ef → 0.68.1-rc.a7b95aa2
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/esm/Accordion/Accordion.d.ts +5 -2
- package/esm/Accordion/Accordion.d.ts.map +1 -1
- package/esm/Accordion/Accordion.js +92 -50
- package/esm/Accordion/Accordion.js.map +1 -1
- package/esm/Accordion/Accordion.module-COckontb.css +1 -0
- package/esm/Accordion/Accordion.module.js +7 -5
- package/esm/Accordion/Accordion.module.js.map +1 -1
- package/esm/Box/Box.d.ts +1 -1
- package/esm/Box/Box.d.ts.map +1 -1
- package/esm/Box/Box.module-ZdcUfGo-.css +1 -0
- package/esm/Box/Box.module.js +81 -1
- package/esm/Box/Box.module.js.map +1 -1
- package/esm/Card/{Card.module-OxFQdnTA.css → Card.module-DZZ8DN76.css} +1 -1
- package/esm/Card/Card.module.js +1 -1
- package/esm/Card/Card.module.js.map +1 -1
- package/esm/FAQ/FAQ.d.ts +2 -1
- package/esm/FAQ/FAQ.d.ts.map +1 -1
- package/esm/Hero/{Hero.module-DvYo_AtL.css → Hero.module-Cy82CEW3.css} +1 -1
- package/esm/Hero/Hero.module.js +1 -1
- package/esm/Hero/Hero.module.js.map +1 -1
- package/esm/LogoSuite/LogoSuite.js +1 -1
- package/esm/LogoSuite/LogoSuite.module-69Mthqju.css +1 -0
- package/esm/LogoSuite/LogoSuite.module.js +1 -1
- package/esm/LogoSuite/LogoSuite.module.js.map +1 -1
- package/esm/MediaPlaylist/MediaPlaylist.d.ts +77 -0
- package/esm/MediaPlaylist/MediaPlaylist.d.ts.map +1 -0
- package/esm/MediaPlaylist/MediaPlaylist.js +172 -0
- package/esm/MediaPlaylist/MediaPlaylist.js.map +1 -0
- package/esm/MediaPlaylist/MediaPlaylist.module-BU39a4-W.css +1 -0
- package/esm/MediaPlaylist/MediaPlaylist.module.js +30 -0
- package/esm/MediaPlaylist/MediaPlaylist.module.js.map +1 -0
- package/esm/MediaPlaylist/index.d.ts +2 -0
- package/esm/MediaPlaylist/index.d.ts.map +1 -0
- package/esm/MediaPlaylist/useMediaPlaylist.d.ts +84 -0
- package/esm/MediaPlaylist/useMediaPlaylist.d.ts.map +1 -0
- package/esm/MediaPlaylist/useMediaPlaylist.js +114 -0
- package/esm/MediaPlaylist/useMediaPlaylist.js.map +1 -0
- package/esm/Pagination/Pagination.d.ts +2 -5
- package/esm/Pagination/Pagination.d.ts.map +1 -1
- package/esm/Pagination/Pagination.js +94 -52
- package/esm/Pagination/Pagination.js.map +1 -1
- package/esm/Pagination/Pagination.module-DmKBSq7s.css +1 -0
- package/esm/Pagination/Pagination.module.js +9 -3
- package/esm/Pagination/Pagination.module.js.map +1 -1
- package/esm/Pagination/model.d.ts +2 -2
- package/esm/Pagination/model.d.ts.map +1 -1
- package/esm/Pagination/model.js.map +1 -1
- package/esm/PricingOptions/PricingOptions.d.ts +2 -1
- package/esm/PricingOptions/PricingOptions.d.ts.map +1 -1
- package/esm/PricingOptions/PricingOptions.js +46 -45
- package/esm/PricingOptions/PricingOptions.js.map +1 -1
- package/esm/Stack/Stack.d.ts +1 -1
- package/esm/Stack/Stack.d.ts.map +1 -1
- package/esm/Stack/Stack.module-BlpDkOqI.css +1 -0
- package/esm/Stack/Stack.module.js +17 -1
- package/esm/Stack/Stack.module.js.map +1 -1
- package/esm/SubNav/SubNav.d.ts.map +1 -1
- package/esm/SubNav/SubNav.js +17 -16
- package/esm/SubNav/SubNav.js.map +1 -1
- package/esm/SubNav/SubNav.module-D-gLr0JO.css +1 -0
- package/esm/SubNav/SubNav.module.js +1 -1
- package/esm/SubNav/SubNav.module.js.map +1 -1
- package/esm/Tabs/{Tabs.module-D8VFUDRe.css → Tabs.module-CK_p1qwC.css} +1 -1
- package/esm/Tabs/Tabs.module.js +1 -1
- package/esm/Tabs/Tabs.module.js.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts +1 -0
- package/esm/TextCursorAnimation/TextCursorAnimation.d.ts.map +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.js +1 -0
- package/esm/TextCursorAnimation/TextCursorAnimation.js.map +1 -1
- package/esm/TextCursorAnimation/{TextCursorAnimation.module-CkVDXNW5.css → TextCursorAnimation.module-BJLhwKrK.css} +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.module.js +1 -1
- package/esm/TextCursorAnimation/TextCursorAnimation.module.js.map +1 -1
- package/esm/Tiles/Tiles.module-BOGZTY7t.css +1 -0
- package/esm/Tiles/Tiles.module.js +1 -1
- package/esm/Tiles/Tiles.module.js.map +1 -1
- package/esm/constants.d.ts +1 -1
- package/esm/constants.d.ts.map +1 -1
- package/esm/constants.js +2 -0
- package/esm/constants.js.map +1 -1
- package/esm/css/stylesheets.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +51 -50
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/base/size/size-6EfgMG7y.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/logosuite/{colors-with-modes-n4fDsxWz.css → colors-with-modes-B8ia26TA.css} +1 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes-YId8eSZQ.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes-BODdIvrY.css +1 -0
- package/esm/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.content.d.ts +49 -0
- package/esm/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.content.d.ts.map +1 -0
- package/esm/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.d.ts +7 -0
- package/esm/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.d.ts.map +1 -0
- package/esm/recipes/Flexsuite/Details/index.d.ts +4 -0
- package/esm/recipes/Flexsuite/Details/index.d.ts.map +1 -0
- package/esm/recipes/Flexsuite/Overview/FlexSuiteAIOverview.d.ts.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.js +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.js.map +1 -1
- package/lib/Accordion/Accordion.d.ts +5 -2
- package/lib/Box/Box.d.ts +1 -1
- package/lib/FAQ/FAQ.d.ts +2 -1
- package/lib/MediaPlaylist/MediaPlaylist.d.ts +76 -0
- package/lib/MediaPlaylist/index.d.ts +1 -0
- package/lib/MediaPlaylist/useMediaPlaylist.d.ts +83 -0
- package/lib/Pagination/Pagination.d.ts +2 -5
- package/lib/Pagination/model.d.ts +2 -2
- package/lib/PricingOptions/PricingOptions.d.ts +2 -1
- package/lib/Stack/Stack.d.ts +1 -1
- package/lib/TextCursorAnimation/TextCursorAnimation.d.ts +1 -0
- package/lib/constants.d.ts +1 -1
- package/lib/css/main.css +1055 -391
- 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 +3 -1
- package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
- package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +2 -2
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +2 -2
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +13 -0
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +8 -0
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +13 -0
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +8 -0
- 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 +3 -1
- package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +2 -2
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +15 -0
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +17 -0
- 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 +3 -1
- package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +2 -2
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +6 -0
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +6 -0
- package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +3 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +2 -2
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +5 -0
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +5 -0
- 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 +3 -1
- package/lib/design-tokens/ts/tokens/base/size/size.js +3 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +2 -2
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +15 -0
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +12 -0
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +17 -0
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +14 -0
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.content.d.ts +48 -0
- package/lib/recipes/Flexsuite/Details/FlexSuiteAIDetailsPlaylist/FlexSuiteAIDetailsPlaylist.d.ts +6 -0
- package/lib/recipes/Flexsuite/Details/index.d.ts +3 -0
- package/package.json +1 -1
- package/esm/Accordion/Accordion.module-D4diKFGj.css +0 -1
- package/esm/Box/Box.module-BgKMrzcY.css +0 -1
- package/esm/LogoSuite/LogoSuite.module-CWV4mJoG.css +0 -1
- package/esm/Pagination/Pagination.module-C7Z_pTFq.css +0 -1
- package/esm/Stack/Stack.module-ZIKnqNP_.css +0 -1
- package/esm/SubNav/SubNav.module-CFXuWNmS.css +0 -1
- package/esm/Tiles/Tiles.module-DVK0nMCy.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/base/size/size-DBypfR6O.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/pagination/colors-with-modes-C2GLM06X.css +0 -1
- package/lib/design-tokens/css/tokens/functional/components/pagination/colors-with-modes.css +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiverAccordion.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.tsx"],"sourcesContent":["import React, {createContext, forwardRef, useCallback, useContext, useMemo, useState, useRef, useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {ChevronDownIcon, ChevronUpIcon} from '@primer/octicons-react'\n\nimport {Heading, type HeadingProps, Link, Text} from '../..'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useId} from '../../hooks/useId'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** Main Stylesheet (as a CSS Module) */\nimport styles from './RiverAccordion.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\ntype RiverAccordionContextType = {\n openIndex: number\n setOpenIndex: (index: number) => void\n variant: RiverAccordionVariant\n}\n\nconst RiverAccordionContext = createContext<RiverAccordionContextType | null>(null)\n\nconst useRiverAccordionContext = (): RiverAccordionContextType => {\n const context = useContext(RiverAccordionContext)\n if (context === null) {\n throw new Error('useRiverAccordionContext must be used within a RiverAccordion component')\n }\n return context\n}\n\ntype RiverAccordionItemContextType = {\n index: number\n isOpen: boolean\n id: string\n}\n\nconst RiverAccordionItemContext = createContext<RiverAccordionItemContextType | null>(null)\n\nconst useRiverAccordionItemContext = (): RiverAccordionItemContextType => {\n const context = useContext(RiverAccordionItemContext)\n if (context === null) {\n throw new Error('useRiverAccordionItemContext must be used within a RiverAccordion component')\n }\n return context\n}\n\nexport const RiverAccordionVariants = ['default', 'gridline'] as const\nexport type RiverAccordionVariant = (typeof RiverAccordionVariants)[number]\n\nexport type RiverAccordionProps = React.PropsWithChildren<{\n align?: 'start' | 'end'\n variant?: RiverAccordionVariant\n}> &\n React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionRoot = forwardRef<HTMLDivElement, RiverAccordionProps>(\n ({align = 'start', variant = 'default', children, className, ...rest}, forwardedRef) => {\n const containerRef = useProvidedRefOrCreate<HTMLDivElement>(forwardedRef as React.RefObject<HTMLDivElement>)\n const [openIndex, setOpenIndex] = useState(0)\n\n const accordionComponents = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n items: React.ReactElement<RiverAccordionItemProps>[]\n visuals: React.ReactElement<RiverAccordionVisualProps>[]\n }>(\n (acc, child) => {\n if (!isRiverAccordionItem(child)) {\n return acc\n }\n\n const visualChild = React.Children.toArray(child.props.children).find(isRiverAccordionVisual)\n\n if (visualChild) {\n acc.items.push(child)\n acc.visuals.push(visualChild)\n }\n\n return acc\n },\n {items: [], visuals: []},\n )\n }, [children])\n\n const items = accordionComponents.items.map((item, index) => React.cloneElement(item, {key: index, index}))\n const visuals = accordionComponents.visuals.map((visual, index) =>\n React.cloneElement(visual, {key: index, 'aria-hidden': true}),\n )\n\n const contextValue = useMemo(\n () => ({\n openIndex,\n setOpenIndex,\n variant,\n }),\n [openIndex, setOpenIndex, variant],\n )\n\n return (\n <RiverAccordionContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n className={clsx(\n styles.RiverAccordion,\n styles[`RiverAccordion__align-${align}`],\n styles[`RiverAccordion--variant-${variant}`],\n variant === 'gridline' && gridlineStyles.gridline,\n className,\n )}\n {...rest}\n >\n <div className={styles.RiverAccordion__accordionContainer}>{items}</div>\n <div className={styles.RiverAccordion__visualsContainer}>\n <div className={styles.RiverAccordion__visualsWrapper}>{visuals}</div>\n </div>\n </div>\n </RiverAccordionContext.Provider>\n )\n },\n)\n\nexport type RiverAccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactElement<RiverAccordionHeadingProps | RiverAccordionContentProps>[]\n index?: number\n}\n\nconst RiverAccordionItem = ({className, index, children, ...props}: RiverAccordionItemProps) => {\n const {openIndex} = useRiverAccordionContext()\n const panelId = useId()\n const isOpen = index === openIndex\n const panelRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (panelRef.current) {\n // Workaround to avoid React 18 / 19 type mismatches with the `inert` attribute.\n // This approach won't immediately apply the attribute in pure SSR contexts, only post-hydration\n // TODO: Move back to JSX when React 19 is fully adopted in Dotcom.\n panelRef.current.toggleAttribute('inert', !isOpen)\n }\n }, [isOpen])\n\n const itemContextValue = useMemo(\n () => ({\n id: panelId,\n // Index optional for consumers, but always provided by parent\n index: index as number,\n isOpen,\n }),\n [panelId, index, isOpen],\n )\n\n const {heading, content, visual} = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n heading: React.ReactElement<RiverAccordionHeadingProps> | null\n content: React.ReactElement<RiverAccordionContentProps> | null\n visual: React.ReactElement<RiverAccordionVisualProps> | null\n }>(\n (acc, child) => {\n if (isRiverAccordionHeading(child)) {\n acc.heading = child\n }\n\n if (isRiverAccordionContent(child)) {\n acc.content = child\n }\n\n if (isRiverAccordionVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {heading: null, content: null, visual: null},\n )\n }, [children])\n\n if (!heading || !content || !visual) {\n return null\n }\n\n return (\n <RiverAccordionItemContext.Provider value={itemContextValue}>\n <div\n className={clsx(styles.RiverAccordion__item, isOpen && styles['RiverAccordion__item--open'], className)}\n {...props}\n >\n {heading}\n <div ref={panelRef} className={styles.RiverAccordion__panel} id={panelId} aria-hidden={!isOpen}>\n {content}\n {visual}\n </div>\n </div>\n </RiverAccordionItemContext.Provider>\n )\n}\n\nexport type RiverAccordionHeadingProps = HeadingProps\n\nconst RiverAccordionHeading = ({as = 'h3', children, className, size = '6', ...props}: RiverAccordionHeadingProps) => {\n const {setOpenIndex} = useRiverAccordionContext()\n const {id, index, isOpen} = useRiverAccordionItemContext()\n\n const onClick = useCallback(() => {\n if (!isOpen) {\n setOpenIndex(index)\n }\n }, [index, isOpen, setOpenIndex])\n\n return (\n <Heading size={size} as={as} className={clsx(styles.RiverAccordion__heading, className)} {...props}>\n <button\n type=\"button\"\n className={styles.RiverAccordion__trigger}\n onClick={onClick}\n aria-disabled={isOpen}\n aria-controls={id}\n aria-expanded={isOpen}\n >\n {children}\n <span aria-hidden=\"true\" className={styles.RiverAccordion__icon}>\n {isOpen ? <ChevronUpIcon size={24} /> : <ChevronDownIcon size={24} />}\n </span>\n </button>\n </Heading>\n )\n}\n\nexport type RiverAccordionContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionContent = ({className, children, ...props}: RiverAccordionContentProps) => {\n const childrenWithStyledText = useMemo(() => {\n const isLink = createComponentTypeGuard(Link)\n const isText = createComponentTypeGuard(Text)\n\n return React.Children.toArray(children).map(child => {\n if (isText(child)) {\n return React.cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n size: child.props.size ?? '300',\n })\n }\n\n if (isLink(child)) {\n return React.cloneElement(child, {\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n }, [children])\n\n return (\n <div className={clsx(styles.RiverAccordion__content, className)} {...props}>\n {childrenWithStyledText}\n </div>\n )\n}\n\nexport type RiverAccordionVisualProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionVisual = ({className, ...props}: RiverAccordionVisualProps) => {\n const {variant} = useRiverAccordionContext()\n\n return (\n <div\n className={clsx(\n styles.RiverAccordion__visual,\n variant === 'gridline' && styles['RiverAccordion__visual--has-background'],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement(element) && element.type === componentType\n\nconst isRiverAccordionItem = createComponentTypeGuard(RiverAccordionItem)\nconst isRiverAccordionContent = createComponentTypeGuard(RiverAccordionContent)\nconst isRiverAccordionHeading = createComponentTypeGuard(RiverAccordionHeading)\nconst isRiverAccordionVisual = createComponentTypeGuard(RiverAccordionVisual)\n\n/**\n * Use the RiverAccordion to create collapsible content panels with associated visuals.\n * @see https://primer.style/brand/components/RiverAccordion\n */\nexport const RiverAccordion = Object.assign(RiverAccordionRoot, {\n Content: RiverAccordionContent,\n Heading: RiverAccordionHeading,\n Item: RiverAccordionItem,\n Visual: RiverAccordionVisual,\n})\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,IAAwB,EAAgD,KAAK,EAE7E,UAA4D;CAChE,IAAM,IAAU,EAAW,EAAsB;AACjD,KAAI,MAAY,KACd,OAAU,MAAM,0EAA0E;AAE5F,QAAO;GASH,IAA4B,EAAoD,KAAK,EAErF,UAAoE;CACxE,IAAM,IAAU,EAAW,EAA0B;AACrD,KAAI,MAAY,KACd,OAAU,MAAM,8EAA8E;AAEhG,QAAO;GAGI,IAAyB,CAAC,WAAW,WAAW,EASvD,IAAqB,GACxB,EAAC,WAAQ,SAAS,aAAU,WAAW,aAAU,cAAW,GAAG,KAAO,MAAiB;CACtF,IAAM,IAAe,EAAuC,EAAgD,EACtG,CAAC,GAAW,KAAgB,EAAS,EAAE,EAEvC,IAAsB,QACnB,EAAM,SA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EAAC,cAAW,aAAU,GAAG,QAAuC;CAC7F,IAAM,IAAyB,QAAc;EAC3C,IAAM,IAAS,EAAyB,EAAK,EACvC,IAAS,EAAyB,EAAK;AAE7C,SAAO,EAAM,SAAS,QAAQ,EAAS,CAAC,KAAI,MACtC,EAAO,EAAM,GACR,EAAM,aAAa,GAAO;GAC/B,IAAI,EAAM,MAAM,MAAM;GACtB,SAAS,EAAM,MAAM,WAAW;GAChC,MAAM,EAAM,MAAM,QAAQ;GAC3B,CAAC,GAGA,EAAO,EAAM,GACR,EAAM,aAAa,GAAO,EAC/B,SAAS,EAAM,MAAM,WAAW,UACjC,CAAC,GAGG,EACP;IACD,CAAC,EAAS,CAAC;AAEd,QACE,kBAAC,OAAD;EAAK,WAAW,EAAK,EAAO,yBAAyB,EAAU;EAAE,GAAI;YAClE;EACG,CAAA;GAMJ,KAAwB,EAAC,cAAW,GAAG,QAAsC;CACjF,IAAM,EAAC,eAAW,GAA0B;AAE5C,QACE,kBAAC,OAAD;EACE,WAAW,EACT,EAAO,wBACP,MAAY,cAAc,EAAO,2CACjC,EACD;EACD,GAAI;EACJ,CAAA;GAIA,KACC,OACJ,MACC,EAAM,eAAe,EAAQ,IAAI,EAAQ,SAAS,GAEhD,IAAuB,EAAyB,EAAmB,EACnE,IAA0B,EAAyB,EAAsB,EACzE,IAA0B,EAAyB,EAAsB,EACzE,IAAyB,EAAyB,EAAqB,EAMhE,IAAiB,OAAO,OAAO,GAAoB;CAC9D,SAAS;CACT,SAAS;CACT,MAAM;CACN,QAAQ;CACT,CAAC"}
|
|
1
|
+
{"version":3,"file":"RiverAccordion.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.tsx"],"sourcesContent":["import React, {createContext, forwardRef, useCallback, useContext, useMemo, useState, useRef, useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {TriangleDownIcon, TriangleUpIcon} from '@primer/octicons-react'\n\nimport {Heading, type HeadingProps, Link, Text} from '../..'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useId} from '../../hooks/useId'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** Main Stylesheet (as a CSS Module) */\nimport styles from './RiverAccordion.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\ntype RiverAccordionContextType = {\n openIndex: number\n setOpenIndex: (index: number) => void\n variant: RiverAccordionVariant\n}\n\nconst RiverAccordionContext = createContext<RiverAccordionContextType | null>(null)\n\nconst useRiverAccordionContext = (): RiverAccordionContextType => {\n const context = useContext(RiverAccordionContext)\n if (context === null) {\n throw new Error('useRiverAccordionContext must be used within a RiverAccordion component')\n }\n return context\n}\n\ntype RiverAccordionItemContextType = {\n index: number\n isOpen: boolean\n id: string\n}\n\nconst RiverAccordionItemContext = createContext<RiverAccordionItemContextType | null>(null)\n\nconst useRiverAccordionItemContext = (): RiverAccordionItemContextType => {\n const context = useContext(RiverAccordionItemContext)\n if (context === null) {\n throw new Error('useRiverAccordionItemContext must be used within a RiverAccordion component')\n }\n return context\n}\n\nexport const RiverAccordionVariants = ['default', 'gridline'] as const\nexport type RiverAccordionVariant = (typeof RiverAccordionVariants)[number]\n\nexport type RiverAccordionProps = React.PropsWithChildren<{\n align?: 'start' | 'end'\n variant?: RiverAccordionVariant\n}> &\n React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionRoot = forwardRef<HTMLDivElement, RiverAccordionProps>(\n ({align = 'start', variant = 'default', children, className, ...rest}, forwardedRef) => {\n const containerRef = useProvidedRefOrCreate<HTMLDivElement>(forwardedRef as React.RefObject<HTMLDivElement>)\n const [openIndex, setOpenIndex] = useState(0)\n\n const accordionComponents = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n items: React.ReactElement<RiverAccordionItemProps>[]\n visuals: React.ReactElement<RiverAccordionVisualProps>[]\n }>(\n (acc, child) => {\n if (!isRiverAccordionItem(child)) {\n return acc\n }\n\n const visualChild = React.Children.toArray(child.props.children).find(isRiverAccordionVisual)\n\n if (visualChild) {\n acc.items.push(child)\n acc.visuals.push(visualChild)\n }\n\n return acc\n },\n {items: [], visuals: []},\n )\n }, [children])\n\n const items = accordionComponents.items.map((item, index) => React.cloneElement(item, {key: index, index}))\n const visuals = accordionComponents.visuals.map((visual, index) =>\n React.cloneElement(visual, {key: index, 'aria-hidden': true}),\n )\n\n const contextValue = useMemo(\n () => ({\n openIndex,\n setOpenIndex,\n variant,\n }),\n [openIndex, setOpenIndex, variant],\n )\n\n return (\n <RiverAccordionContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n className={clsx(\n styles.RiverAccordion,\n styles[`RiverAccordion__align-${align}`],\n styles[`RiverAccordion--variant-${variant}`],\n variant === 'gridline' && gridlineStyles.gridline,\n className,\n )}\n {...rest}\n >\n <div className={styles.RiverAccordion__accordionContainer}>{items}</div>\n <div className={styles.RiverAccordion__visualsContainer}>\n <div className={styles.RiverAccordion__visualsWrapper}>{visuals}</div>\n </div>\n </div>\n </RiverAccordionContext.Provider>\n )\n },\n)\n\nexport type RiverAccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactElement<RiverAccordionHeadingProps | RiverAccordionContentProps>[]\n index?: number\n}\n\nconst RiverAccordionItem = ({className, index, children, ...props}: RiverAccordionItemProps) => {\n const {openIndex} = useRiverAccordionContext()\n const panelId = useId()\n const isOpen = index === openIndex\n const panelRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (panelRef.current) {\n // Workaround to avoid React 18 / 19 type mismatches with the `inert` attribute.\n // This approach won't immediately apply the attribute in pure SSR contexts, only post-hydration\n // TODO: Move back to JSX when React 19 is fully adopted in Dotcom.\n panelRef.current.toggleAttribute('inert', !isOpen)\n }\n }, [isOpen])\n\n const itemContextValue = useMemo(\n () => ({\n id: panelId,\n // Index optional for consumers, but always provided by parent\n index: index as number,\n isOpen,\n }),\n [panelId, index, isOpen],\n )\n\n const {heading, content, visual} = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n heading: React.ReactElement<RiverAccordionHeadingProps> | null\n content: React.ReactElement<RiverAccordionContentProps> | null\n visual: React.ReactElement<RiverAccordionVisualProps> | null\n }>(\n (acc, child) => {\n if (isRiverAccordionHeading(child)) {\n acc.heading = child\n }\n\n if (isRiverAccordionContent(child)) {\n acc.content = child\n }\n\n if (isRiverAccordionVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {heading: null, content: null, visual: null},\n )\n }, [children])\n\n if (!heading || !content || !visual) {\n return null\n }\n\n return (\n <RiverAccordionItemContext.Provider value={itemContextValue}>\n <div\n className={clsx(styles.RiverAccordion__item, isOpen && styles['RiverAccordion__item--open'], className)}\n {...props}\n >\n {heading}\n <div ref={panelRef} className={styles.RiverAccordion__panel} id={panelId} aria-hidden={!isOpen}>\n {content}\n {visual}\n </div>\n </div>\n </RiverAccordionItemContext.Provider>\n )\n}\n\nexport type RiverAccordionHeadingProps = HeadingProps\n\nconst RiverAccordionHeading = ({as = 'h3', children, className, size = '6', ...props}: RiverAccordionHeadingProps) => {\n const {setOpenIndex} = useRiverAccordionContext()\n const {id, index, isOpen} = useRiverAccordionItemContext()\n\n const onClick = useCallback(() => {\n if (!isOpen) {\n setOpenIndex(index)\n }\n }, [index, isOpen, setOpenIndex])\n\n return (\n <Heading size={size} as={as} className={clsx(styles.RiverAccordion__heading, className)} {...props}>\n <button\n type=\"button\"\n className={styles.RiverAccordion__trigger}\n onClick={onClick}\n aria-disabled={isOpen}\n aria-controls={id}\n aria-expanded={isOpen}\n >\n {children}\n <span aria-hidden=\"true\" className={styles.RiverAccordion__icon}>\n {isOpen ? <TriangleUpIcon size={24} /> : <TriangleDownIcon size={24} />}\n </span>\n </button>\n </Heading>\n )\n}\n\nexport type RiverAccordionContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionContent = ({className, children, ...props}: RiverAccordionContentProps) => {\n const childrenWithStyledText = useMemo(() => {\n const isLink = createComponentTypeGuard(Link)\n const isText = createComponentTypeGuard(Text)\n\n return React.Children.toArray(children).map(child => {\n if (isText(child)) {\n return React.cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n size: child.props.size ?? '300',\n })\n }\n\n if (isLink(child)) {\n return React.cloneElement(child, {\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n }, [children])\n\n return (\n <div className={clsx(styles.RiverAccordion__content, className)} {...props}>\n {childrenWithStyledText}\n </div>\n )\n}\n\nexport type RiverAccordionVisualProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionVisual = ({className, ...props}: RiverAccordionVisualProps) => {\n const {variant} = useRiverAccordionContext()\n\n return (\n <div\n className={clsx(\n styles.RiverAccordion__visual,\n variant === 'gridline' && styles['RiverAccordion__visual--has-background'],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement(element) && element.type === componentType\n\nconst isRiverAccordionItem = createComponentTypeGuard(RiverAccordionItem)\nconst isRiverAccordionContent = createComponentTypeGuard(RiverAccordionContent)\nconst isRiverAccordionHeading = createComponentTypeGuard(RiverAccordionHeading)\nconst isRiverAccordionVisual = createComponentTypeGuard(RiverAccordionVisual)\n\n/**\n * Use the RiverAccordion to create collapsible content panels with associated visuals.\n * @see https://primer.style/brand/components/RiverAccordion\n */\nexport const RiverAccordion = Object.assign(RiverAccordionRoot, {\n Content: RiverAccordionContent,\n Heading: RiverAccordionHeading,\n Item: RiverAccordionItem,\n Visual: RiverAccordionVisual,\n})\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,IAAwB,EAAgD,KAAK,EAE7E,UAA4D;CAChE,IAAM,IAAU,EAAW,EAAsB;AACjD,KAAI,MAAY,KACd,OAAU,MAAM,0EAA0E;AAE5F,QAAO;GASH,IAA4B,EAAoD,KAAK,EAErF,UAAoE;CACxE,IAAM,IAAU,EAAW,EAA0B;AACrD,KAAI,MAAY,K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,13 @@ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/compone
|
|
|
7
7
|
export type AccordionRootProps = DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
8
8
|
children: ReactElement<AccordionHeadingProps | AccordionContentProps>[];
|
|
9
9
|
variant?: 'default' | 'emphasis';
|
|
10
|
+
disableAnimation?: boolean;
|
|
10
11
|
handleOpen?: (isOpen: boolean) => void;
|
|
11
12
|
};
|
|
12
13
|
export declare const AccordionRoot: React.ForwardRefExoticComponent<React.DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
13
14
|
children: ReactElement<AccordionHeadingProps | AccordionContentProps>[];
|
|
14
15
|
variant?: "default" | "emphasis";
|
|
16
|
+
disableAnimation?: boolean;
|
|
15
17
|
handleOpen?: (isOpen: boolean) => void;
|
|
16
18
|
} & React.RefAttributes<HTMLDetailsElement>>;
|
|
17
19
|
export declare const AccordionToggleColors: readonly ["default", "blue", "coral", "green", "gray", "indigo", "lemon", "lime", "orange", "pink", "purple", "red", "teal", "yellow", "blue-purple", "green-blue", "pink-blue", "purple-red", "red-orange"];
|
|
@@ -33,13 +35,14 @@ export declare const AccordionHeading: React.ForwardRefExoticComponent<React.HTM
|
|
|
33
35
|
weight?: HeadingProps["weight"];
|
|
34
36
|
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
35
37
|
export type AccordionContentProps = HTMLAttributes<HTMLElement>;
|
|
36
|
-
export declare const AccordionContent: ({ className, ...rest }: AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const AccordionContent: ({ children, className, ...rest }: AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
39
|
export declare const Accordion: React.ForwardRefExoticComponent<React.DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
38
40
|
children: ReactElement<AccordionHeadingProps | AccordionContentProps>[];
|
|
39
41
|
variant?: "default" | "emphasis";
|
|
42
|
+
disableAnimation?: boolean;
|
|
40
43
|
handleOpen?: (isOpen: boolean) => void;
|
|
41
44
|
} & React.RefAttributes<HTMLDetailsElement>> & {
|
|
42
|
-
Content: ({ className, ...rest }: AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
Content: ({ children, className, ...rest }: AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
46
|
Heading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
44
47
|
as?: HeadingProps["as"];
|
|
45
48
|
reversedToggles?: boolean;
|
package/lib/Box/Box.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { AnimateProps } from '../animation';
|
|
3
3
|
import type { BaseProps } from '../component-helpers';
|
|
4
|
-
export declare const BoxSpacingValues: readonly ["none", "condensed", "normal", "spacious", 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 64, 80, 96, 112, 128];
|
|
4
|
+
export declare const BoxSpacingValues: readonly ["none", "condensed", "normal", "spacious", 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 60, 64, 80, 88, 96, 112, 128];
|
|
5
5
|
type SpacingValues = (typeof BoxSpacingValues)[number];
|
|
6
6
|
type ResponsiveSpacingMap = {
|
|
7
7
|
narrow?: SpacingValues;
|
package/lib/FAQ/FAQ.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare const FAQ: React.ForwardRefExoticComponent<Omit<FAQRootProps, "re
|
|
|
31
31
|
Item: React.ForwardRefExoticComponent<React.DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
32
32
|
children: React.ReactElement<import("..").AccordionHeadingProps | import("..").AccordionContentProps>[];
|
|
33
33
|
variant?: "default" | "emphasis";
|
|
34
|
+
disableAnimation?: boolean;
|
|
34
35
|
handleOpen?: (isOpen: boolean) => void;
|
|
35
36
|
} & React.RefAttributes<HTMLDetailsElement>>;
|
|
36
37
|
Question: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
@@ -39,6 +40,6 @@ export declare const FAQ: React.ForwardRefExoticComponent<Omit<FAQRootProps, "re
|
|
|
39
40
|
toggleColor?: typeof import("..").AccordionToggleColors[number];
|
|
40
41
|
weight?: HeadingProps["weight"];
|
|
41
42
|
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
42
|
-
Answer: ({ className, ...rest }: import("..").AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
Answer: ({ children, className, ...rest }: import("..").AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
44
|
};
|
|
44
45
|
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type HeadingProps, type TextProps } from '..';
|
|
3
|
+
import type { BaseProps } from '../component-helpers';
|
|
4
|
+
/**
|
|
5
|
+
* Design tokens
|
|
6
|
+
*/
|
|
7
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css';
|
|
8
|
+
export type MediaPlaylistProps = React.PropsWithChildren<{
|
|
9
|
+
/**
|
|
10
|
+
* The index of the item to be selected by default. This is ignored if `selectedIndex` is provided.
|
|
11
|
+
*/
|
|
12
|
+
defaultSelectedIndex?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The index of the currently selected item. This makes the component controlled.
|
|
15
|
+
*/
|
|
16
|
+
selectedIndex?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when the selected index changes.
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (selectedIndex: number) => void;
|
|
21
|
+
'data-testid'?: string;
|
|
22
|
+
}> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
23
|
+
export type MediaPlaylistHeadingProps = React.PropsWithChildren<{
|
|
24
|
+
as?: Exclude<HeadingProps['as'], 'h1'>;
|
|
25
|
+
}> & BaseProps<HTMLDivElement>;
|
|
26
|
+
type MediaPlaylistHeadingInternalProps = {
|
|
27
|
+
activeIndex?: number | null;
|
|
28
|
+
itemCount?: number;
|
|
29
|
+
};
|
|
30
|
+
declare function MediaPlaylistHeading({ activeIndex, as, children, className, id, itemCount, ...props }: MediaPlaylistHeadingProps & MediaPlaylistHeadingInternalProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export type MediaPlaylistItemProps = React.PropsWithChildren<{
|
|
32
|
+
/**
|
|
33
|
+
* An optional thumbnail to be shown in the playlist for this item.
|
|
34
|
+
*/
|
|
35
|
+
thumbnail?: React.ReactNode;
|
|
36
|
+
} & BaseProps<HTMLDivElement>>;
|
|
37
|
+
declare function MediaPlaylistItem({ children }: MediaPlaylistItemProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export type MediaPlaylistItemHeadingProps = Omit<TextProps, 'as' | 'children' | 'title'> & {
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
description?: React.ReactNode;
|
|
41
|
+
title?: React.ReactNode;
|
|
42
|
+
};
|
|
43
|
+
declare function MediaPlaylistItemHeading({ children, className, description, font, size, title, variant, weight, ...props }: MediaPlaylistItemHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export type MediaPlaylistItemContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
45
|
+
declare function MediaPlaylistItemContent({ children, className, ...props }: MediaPlaylistItemContentProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export type MediaPlaylistItemMediaProps = React.HTMLAttributes<HTMLDivElement>;
|
|
47
|
+
/**
|
|
48
|
+
* Use MediaPlaylist to pair media playback with an itemized, thumbnail-backed playlist.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MediaPlaylist: React.ForwardRefExoticComponent<{
|
|
51
|
+
/**
|
|
52
|
+
* The index of the item to be selected by default. This is ignored if `selectedIndex` is provided.
|
|
53
|
+
*/
|
|
54
|
+
defaultSelectedIndex?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The index of the currently selected item. This makes the component controlled.
|
|
57
|
+
*/
|
|
58
|
+
selectedIndex?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Callback fired when the selected index changes.
|
|
61
|
+
*/
|
|
62
|
+
onChange?: (selectedIndex: number) => void;
|
|
63
|
+
'data-testid'?: string;
|
|
64
|
+
} & {
|
|
65
|
+
children?: React.ReactNode | undefined;
|
|
66
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<HTMLDivElement>> & {
|
|
67
|
+
Heading: typeof MediaPlaylistHeading;
|
|
68
|
+
Item: typeof MediaPlaylistItem;
|
|
69
|
+
ItemHeading: typeof MediaPlaylistItemHeading;
|
|
70
|
+
ItemContent: typeof MediaPlaylistItemContent;
|
|
71
|
+
ItemMedia: React.ForwardRefExoticComponent<MediaPlaylistItemMediaProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
testIds: {
|
|
73
|
+
root: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MediaPlaylist';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PaginationPageType } from '../Pagination/model';
|
|
3
|
+
type UseMediaPlaylistProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
components: MediaPlaylistComponentTypes;
|
|
6
|
+
defaultSelectedIndex: number;
|
|
7
|
+
onChange?: (selectedIndex: number) => void;
|
|
8
|
+
selectedIndex?: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Internal only hook used by MediaPlaylist to manage state and behavior.
|
|
12
|
+
* @private
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export type MediaPlaylistComponentTypes = {
|
|
16
|
+
Heading: React.ElementType;
|
|
17
|
+
Item: React.ElementType;
|
|
18
|
+
ItemHeading: React.ElementType;
|
|
19
|
+
ItemContent: React.ElementType;
|
|
20
|
+
ItemMedia: React.ElementType;
|
|
21
|
+
};
|
|
22
|
+
type MediaPlaylistHeadingChildProps = {
|
|
23
|
+
activeIndex?: number | null;
|
|
24
|
+
id?: string;
|
|
25
|
+
itemCount?: number;
|
|
26
|
+
};
|
|
27
|
+
type MediaPlaylistItemChildProps = React.PropsWithChildren<Record<string, unknown>>;
|
|
28
|
+
type MediaPlaylistItemChild = React.ReactElement<MediaPlaylistItemChildProps>;
|
|
29
|
+
type MediaPlaylistItemData = {
|
|
30
|
+
className?: string;
|
|
31
|
+
content: MediaPlaylistItemChild;
|
|
32
|
+
heading: MediaPlaylistItemChild;
|
|
33
|
+
media: MediaPlaylistItemChild;
|
|
34
|
+
thumbnail?: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Internal only hook used by MediaPlaylist to manage state and behavior.
|
|
38
|
+
* @private
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare function useMediaPlaylist({ children, components, defaultSelectedIndex, onChange, selectedIndex, }: UseMediaPlaylistProps): {
|
|
42
|
+
activeIndex: number | null;
|
|
43
|
+
currentItemPage: number;
|
|
44
|
+
getPaginationAttributes: (pageNumber: number, page: PaginationPageType) => {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
getTabListProps: (props: {
|
|
48
|
+
label: string;
|
|
49
|
+
labelledBy?: never;
|
|
50
|
+
} | {
|
|
51
|
+
labelledBy: string;
|
|
52
|
+
label?: never;
|
|
53
|
+
}) => {
|
|
54
|
+
role: "tablist";
|
|
55
|
+
'aria-orientation': "horizontal" | "vertical";
|
|
56
|
+
};
|
|
57
|
+
getTabPanelProps: (id: string) => {
|
|
58
|
+
role: "tabpanel";
|
|
59
|
+
id: `tabs-${string}-panel-${string}`;
|
|
60
|
+
'aria-labelledby': `tabs-${string}-tab-${string}`;
|
|
61
|
+
hidden: boolean;
|
|
62
|
+
tabIndex: 0;
|
|
63
|
+
};
|
|
64
|
+
getTabProps: <T extends HTMLElement = HTMLElement>(id: string, externalRef?: React.Ref<T>) => {
|
|
65
|
+
role: "tab";
|
|
66
|
+
id: `tabs-${string}-tab-${string}`;
|
|
67
|
+
'aria-controls': `tabs-${string}-panel-${string}`;
|
|
68
|
+
'aria-selected': boolean;
|
|
69
|
+
tabIndex: 0 | -1;
|
|
70
|
+
onClick: () => void;
|
|
71
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
72
|
+
onFocus: () => void;
|
|
73
|
+
ref: (element: HTMLElement | null) => void;
|
|
74
|
+
};
|
|
75
|
+
handlePageChange: (event: React.MouseEvent, page: number) => void;
|
|
76
|
+
hasOverflowItems: boolean;
|
|
77
|
+
headingChild: React.ReactElement<MediaPlaylistHeadingChildProps, string | React.JSXElementConstructor<any>> | null;
|
|
78
|
+
isItemSelected: (index: number) => boolean;
|
|
79
|
+
items: MediaPlaylistItemData[];
|
|
80
|
+
setItemRef: (index: number, element: HTMLDivElement | null) => void;
|
|
81
|
+
tabListRef: React.RefObject<HTMLDivElement | null>;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
* Design tokens
|
|
4
|
-
*/
|
|
5
|
-
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/pagination/colors-with-modes.css';
|
|
2
|
+
import { PaginationPageType } from './model';
|
|
6
3
|
export type PaginationProps = {
|
|
7
4
|
pageCount: number;
|
|
8
5
|
currentPage: number;
|
|
9
6
|
onPageChange?: (e: React.MouseEvent, n: number) => void;
|
|
10
7
|
hrefBuilder?: (n: number) => string;
|
|
11
|
-
pageAttributesBuilder?: (n: number) => {
|
|
8
|
+
pageAttributesBuilder?: (n: number, page: PaginationPageType) => {
|
|
12
9
|
[attributeName: string]: string;
|
|
13
10
|
};
|
|
14
11
|
marginPageCount?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type PaginationPageType = {
|
|
2
2
|
type: 'PREV' | 'NEXT' | 'NUM' | 'BREAK';
|
|
3
3
|
num: number;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
selected?: boolean;
|
|
6
6
|
precedesBreak?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare function buildPaginationModel(pageCount: number, currentPage: number, showPages: boolean, marginPageCount: number, surroundingPageCount: number):
|
|
8
|
+
export declare function buildPaginationModel(pageCount: number, currentPage: number, showPages: boolean, marginPageCount: number, surroundingPageCount: number): PaginationPageType[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import type { ListItemProps } from '../list/ListItem/ListItem';
|
|
3
3
|
import type { BaseProps } from '../component-helpers';
|
|
4
|
-
import { ButtonBaseProps
|
|
4
|
+
import { type ButtonBaseProps } from '../Button';
|
|
5
|
+
import { type HeadingProps } from '../Heading';
|
|
5
6
|
/**
|
|
6
7
|
* Design tokens
|
|
7
8
|
*/
|
package/lib/Stack/Stack.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/size/si
|
|
|
4
4
|
export declare const StackDirectionVariants: readonly ["horizontal", "vertical"];
|
|
5
5
|
type StackDirectionVariants = (typeof StackDirectionVariants)[number];
|
|
6
6
|
export declare const defaultStackDirection: "vertical";
|
|
7
|
-
export declare const StackSpacingVariants: readonly ["none", "condensed", "normal", "spacious", 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 64, 80, 96, 112, 128];
|
|
7
|
+
export declare const StackSpacingVariants: readonly ["none", "condensed", "normal", "spacious", 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 60, 64, 80, 88, 96, 112, 128];
|
|
8
8
|
type StackSpacingVariants = (typeof StackSpacingVariants)[number];
|
|
9
9
|
export declare const defaultStackSpacing: "condensed";
|
|
10
10
|
export declare const StackAlignItemVariants: readonly ["center", "flex-start", "flex-end"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { TextProps } from '../Text/Text';
|
|
3
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css';
|
|
3
4
|
export declare const testIds: {
|
|
4
5
|
root: string;
|
|
5
6
|
readonly cursor: string;
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const Colors: readonly ["default", "blue", "coral", "green", "gray", "indigo", "lemon", "lime", "orange", "pink", "purple", "red", "teal", "yellow"];
|
|
2
2
|
export declare const BiColorGradients: readonly ["blue-purple", "green-blue", "pink-blue", "purple-red", "red-orange"];
|
|
3
3
|
export declare const TriColorGradients: readonly ["green-blue-purple"];
|
|
4
|
-
export declare const BaseSizeScale: readonly [4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 64, 80, 96, 112, 128];
|
|
4
|
+
export declare const BaseSizeScale: readonly [4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 60, 64, 80, 88, 96, 112, 128];
|