@primer/react-brand 0.72.0-rc.44ea78b6 → 0.72.0-rc.4db5fc89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/components/ButtonGroup/react.md +29 -8
- package/docs/components/Hero/react.md +82 -18
- package/docs/components/River/react.md +33 -33
- package/docs/components/RiverBreakoutTabs/index.md +3 -4
- package/docs/components/index.md +1 -1
- package/docs/getting-started/index.md +9 -3
- package/docs/index.md +3 -3
- package/esm/ActionMenu/ActionMenu.d.ts +1 -1
- package/esm/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/esm/ActionMenu/ActionMenu.js +60 -60
- package/esm/ActionMenu/ActionMenu.js.map +1 -1
- package/esm/AnchorNav/AnchorNav.js +20 -20
- package/esm/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/esm/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/esm/ButtonGroup/ButtonGroup.js +24 -16
- package/esm/ButtonGroup/ButtonGroup.js.map +1 -1
- package/esm/CTABanner/CTABanner.js +6 -6
- package/esm/Card/Card.js +5 -5
- package/esm/Hero/Hero.d.ts +17 -4
- package/esm/Hero/Hero.d.ts.map +1 -1
- package/esm/Hero/Hero.js +103 -98
- package/esm/Hero/Hero.js.map +1 -1
- package/esm/Hero/Hero.module-DH253w6y.css +1 -0
- package/esm/Hero/Hero.module.js +8 -5
- package/esm/Hero/Hero.module.js.map +1 -1
- package/esm/Hero/HeroContext.d.ts +7 -5
- package/esm/Hero/HeroContext.d.ts.map +1 -1
- package/esm/Hero/HeroContext.js +3 -9
- package/esm/Hero/HeroContext.js.map +1 -1
- package/esm/Hero/sub-components/HeroButtonGroup.d.ts +5 -0
- package/esm/Hero/sub-components/HeroButtonGroup.d.ts.map +1 -0
- package/esm/Hero/sub-components/HeroButtonGroup.js +28 -0
- package/esm/Hero/sub-components/HeroButtonGroup.js.map +1 -0
- package/esm/Hero/sub-components/HeroImage.d.ts +7 -4
- package/esm/Hero/sub-components/HeroImage.d.ts.map +1 -1
- package/esm/Hero/sub-components/HeroImage.js +6 -6
- package/esm/Hero/sub-components/HeroImage.js.map +1 -1
- package/esm/Hero/sub-components/HeroVideo.d.ts +16 -4
- package/esm/Hero/sub-components/HeroVideo.d.ts.map +1 -1
- package/esm/Hero/sub-components/HeroVideo.js +15 -15
- package/esm/Hero/sub-components/HeroVideo.js.map +1 -1
- package/esm/Hero/sub-components/index.d.ts +2 -0
- package/esm/Hero/sub-components/index.d.ts.map +1 -1
- package/esm/Link/Link.js +5 -5
- package/esm/LogoSuite/LogoSuite.js +11 -11
- package/esm/MinimalFooter/MinimalFooter.js +6 -6
- package/esm/NavList/NavList.module-zvpwnkzz.css +1 -0
- package/esm/NavList/NavList.module.js +8 -8
- package/esm/NavList/NavList.module.js.map +1 -1
- package/esm/PricingOptions/PricingOptions.js +18 -18
- package/esm/SubNav/SubNav.js +30 -30
- package/esm/SubdomainNavBar/NavigationVisbilityObserver.js +21 -21
- package/esm/SubdomainNavBar/SubdomainNavBar.js +83 -83
- package/esm/VideoPlayer/VideoPlayer.js +4 -4
- package/esm/forms/Checkbox/Checkbox.d.ts +1 -0
- package/esm/forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/esm/forms/Checkbox/Checkbox.js +1 -0
- package/esm/forms/Checkbox/Checkbox.js.map +1 -1
- package/esm/forms/FormControl/FormControl.d.ts +1 -0
- package/esm/forms/FormControl/FormControl.d.ts.map +1 -1
- package/esm/forms/FormControl/FormControl.js +1 -0
- package/esm/forms/FormControl/FormControl.js.map +1 -1
- package/esm/forms/Radio/Radio.d.ts +1 -0
- package/esm/forms/Radio/Radio.d.ts.map +1 -1
- package/esm/forms/Radio/Radio.js +1 -0
- package/esm/forms/Radio/Radio.js.map +1 -1
- package/esm/forms/Select/Select.d.ts +1 -0
- package/esm/forms/Select/Select.d.ts.map +1 -1
- package/esm/forms/Select/Select.js +1 -0
- package/esm/forms/Select/Select.js.map +1 -1
- package/esm/forms/TextInput/TextInput.d.ts +1 -0
- package/esm/forms/TextInput/TextInput.d.ts.map +1 -1
- package/esm/forms/TextInput/TextInput.js +1 -0
- package/esm/forms/TextInput/TextInput.js.map +1 -1
- package/esm/forms/Textarea/Textarea.d.ts +1 -0
- package/esm/forms/Textarea/Textarea.d.ts.map +1 -1
- package/esm/forms/Textarea/Textarea.js +1 -0
- package/esm/forms/Textarea/Textarea.js.map +1 -1
- package/esm/forms/index.d.ts +0 -4
- package/esm/forms/index.d.ts.map +1 -1
- package/esm/hooks/useFocusTrap.d.ts +8 -8
- package/esm/hooks/useFocusTrap.d.ts.map +1 -1
- package/esm/hooks/useFocusTrap.js +16 -16
- package/esm/hooks/useFocusTrap.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +68 -67
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-DHn1_SEa.css +1 -0
- package/esm/river/River/River.d.ts +16 -8
- package/esm/river/River/River.d.ts.map +1 -1
- package/esm/river/River/River.js +29 -13
- package/esm/river/River/River.js.map +1 -1
- package/esm/river/River/index.d.ts +2 -2
- package/esm/river/River/index.d.ts.map +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.js +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-BTU_metB.css +1 -0
- package/esm/river/RiverAccordion/RiverAccordion.module.js +1 -1
- package/esm/river/RiverAccordion/RiverAccordion.module.js.map +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.d.ts +2 -1
- package/esm/river/RiverBreakout/RiverBreakout.d.ts.map +1 -1
- package/esm/river/RiverBreakout/RiverBreakout.js +8 -4
- package/esm/river/RiverBreakout/RiverBreakout.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +3 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js +2 -2
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.js.map +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-CB2SZhbE.css +1 -0
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js +1 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module.js.map +1 -1
- package/esm/river/river-shared.module-fF58cowg.css +1 -0
- package/esm/river/river-shared.module.js +8 -1
- package/esm/river/river-shared.module.js.map +1 -1
- package/lib/ActionMenu/ActionMenu.d.ts +1 -1
- package/lib/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/lib/Hero/Hero.d.ts +17 -4
- package/lib/Hero/HeroContext.d.ts +7 -5
- package/lib/Hero/sub-components/HeroButtonGroup.d.ts +4 -0
- package/lib/Hero/sub-components/HeroImage.d.ts +7 -4
- package/lib/Hero/sub-components/HeroVideo.d.ts +16 -4
- package/lib/Hero/sub-components/index.d.ts +2 -0
- package/lib/css/main.css +6943 -6764
- package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
- package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
- package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/river.css +8 -1
- package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
- package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
- package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
- package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +4 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +2 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +2 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +4 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +4 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
- package/lib/forms/Checkbox/Checkbox.d.ts +1 -0
- package/lib/forms/FormControl/FormControl.d.ts +1 -0
- package/lib/forms/Radio/Radio.d.ts +1 -0
- package/lib/forms/Select/Select.d.ts +1 -0
- package/lib/forms/TextInput/TextInput.d.ts +1 -0
- package/lib/forms/Textarea/Textarea.d.ts +1 -0
- package/lib/forms/index.d.ts +0 -4
- package/lib/hooks/useFocusTrap.d.ts +8 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/river/River/River.d.ts +16 -8
- package/lib/river/River/index.d.ts +2 -2
- package/lib/river/RiverBreakout/RiverBreakout.d.ts +2 -1
- package/lib/river/RiverBreakoutTabs/RiverBreakoutTabs.d.ts +3 -2
- package/llms.txt +3 -3
- package/package.json +1 -1
- package/esm/Hero/Hero.module-DqG5f0MT.css +0 -1
- package/esm/NavList/NavList.module-CZFnt8br.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/river/river-QteO10lt.css +0 -1
- package/esm/river/RiverAccordion/RiverAccordion.module-nlZZH3O7.css +0 -1
- package/esm/river/RiverBreakoutTabs/RiverBreakoutTabs.module-CH8jehnx.css +0 -1
- package/esm/river/river-shared.module-D0AV93uz.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","names":[],"sources":["../../../src/forms/Radio/Radio.tsx"],"sourcesContent":["import React, {forwardRef, useCallback, type InputHTMLAttributes, type ReactElement} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../hooks/useId'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\n\nimport type {BaseProps} from '../../component-helpers'\n\nimport styles from './Radio.module.css'\n\nexport type RadioProps = {\n /**\n * Apply inactive visual appearance to the Radio\n */\n disabled?: boolean\n /**\n * Indicates whether the Radio must be checked\n */\n required?: boolean\n /**\n * A unique value that is never shown to the user.\n * Used during form submission and to identify which Radio inputs are selected\n */\n value?: string\n} & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'> &\n BaseProps<HTMLInputElement>\n\nconst RadioInternal = (\n {checked, className, disabled, id, onChange, required, value, ...rest}: RadioProps,\n ref,\n): ReactElement => {\n const inputRef = useProvidedRefOrCreate<HTMLInputElement | null>(ref || null)\n const uniqueId = useId(id)\n\n const onClick = useCallback(() => {\n if (!disabled && inputRef.current) {\n inputRef.current.click()\n }\n }, [disabled, inputRef])\n\n return (\n <span className={styles['Radio-wrapper']}>\n <input\n id={uniqueId}\n aria-checked={checked ? 'true' : 'false'}\n checked={checked}\n className={clsx(styles['Radio-input'])}\n disabled={disabled}\n name={value}\n onChange={onChange}\n ref={inputRef}\n required={required}\n type=\"radio\"\n value={value}\n {...rest}\n />\n <span className={clsx(styles.Radio, className)} onClick={onClick} tabIndex={-1} aria-hidden=\"true\">\n <span className={styles['Radio-dot']} />\n </span>\n </span>\n )\n}\n\nexport const Radio = forwardRef(RadioInternal)\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.js","names":[],"sources":["../../../src/forms/Radio/Radio.tsx"],"sourcesContent":["import React, {forwardRef, useCallback, type InputHTMLAttributes, type ReactElement} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../hooks/useId'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\n\nimport type {BaseProps} from '../../component-helpers'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css'\nimport styles from './Radio.module.css'\n\nexport type RadioProps = {\n /**\n * Apply inactive visual appearance to the Radio\n */\n disabled?: boolean\n /**\n * Indicates whether the Radio must be checked\n */\n required?: boolean\n /**\n * A unique value that is never shown to the user.\n * Used during form submission and to identify which Radio inputs are selected\n */\n value?: string\n} & Exclude<InputHTMLAttributes<HTMLInputElement>, 'value'> &\n BaseProps<HTMLInputElement>\n\nconst RadioInternal = (\n {checked, className, disabled, id, onChange, required, value, ...rest}: RadioProps,\n ref,\n): ReactElement => {\n const inputRef = useProvidedRefOrCreate<HTMLInputElement | null>(ref || null)\n const uniqueId = useId(id)\n\n const onClick = useCallback(() => {\n if (!disabled && inputRef.current) {\n inputRef.current.click()\n }\n }, [disabled, inputRef])\n\n return (\n <span className={styles['Radio-wrapper']}>\n <input\n id={uniqueId}\n aria-checked={checked ? 'true' : 'false'}\n checked={checked}\n className={clsx(styles['Radio-input'])}\n disabled={disabled}\n name={value}\n onChange={onChange}\n ref={inputRef}\n required={required}\n type=\"radio\"\n value={value}\n {...rest}\n />\n <span className={clsx(styles.Radio, className)} onClick={onClick} tabIndex={-1} aria-hidden=\"true\">\n <span className={styles['Radio-dot']} />\n </span>\n </span>\n )\n}\n\nexport const Radio = forwardRef(RadioInternal)\n"],"mappings":";;;;;;;AA+DA,IAAa,IAAQ,GAnCnB,EAAC,YAAS,cAAW,aAAU,OAAI,aAAU,aAAU,UAAO,GAAG,KACjE,MACiB;CACjB,IAAM,IAAW,EAAgD,KAAO,KAAK,EACvE,IAAW,EAAM,EAAG,EAEpB,IAAU,QAAkB;AAChC,EAAI,CAAC,KAAY,EAAS,WACxB,EAAS,QAAQ,OAAO;IAEzB,CAAC,GAAU,EAAS,CAAC;AAExB,QACE,kBAAC,QAAD;EAAM,WAAW,EAAO;YAAxB,CACE,kBAAC,SAAD;GACE,IAAI;GACJ,gBAAc,IAAU,SAAS;GACxB;GACT,WAAW,EAAK,EAAO,eAAe;GAC5B;GACV,MAAM;GACI;GACV,KAAK;GACK;GACV,MAAK;GACE;GACP,GAAI;GACJ,CAAA,EACF,kBAAC,QAAD;GAAM,WAAW,EAAK,EAAO,OAAO,EAAU;GAAW;GAAS,UAAU;GAAI,eAAY;aAC1F,kBAAC,QAAD,EAAM,WAAW,EAAO,cAAgB,CAAA;GACnC,CAAA,CACF;;EAImC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BaseProps } from '../../component-helpers';
|
|
3
3
|
import type { FormInputSizes, FormValidationStatus } from '../form-types';
|
|
4
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css';
|
|
4
5
|
export type SelectProps = {
|
|
5
6
|
/**
|
|
6
7
|
* Applies full width styling.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/forms/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/forms/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;AAEvE,OAAO,2GAA2G,CAAA;AAGlH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,GAC5D,SAAS,CAAC,iBAAiB,CAAC,CAAA;AAmD9B,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAU/D,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,CAAA;AAUjE;;GAEG;AACH,eAAO,MAAM,MAAM;2CA9ByB,WAAW;6CAmBT,aAAa;CAczD,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css';/* empty css */
|
|
2
3
|
import t from "./Select.module.js";
|
|
3
4
|
import { forwardRef as n } from "react";
|
|
4
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","names":[],"sources":["../../../src/forms/Select/Select.tsx"],"sourcesContent":["import React, {forwardRef} from 'react'\nimport {clsx} from 'clsx'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\n\nimport styles from './Select.module.css'\n\nexport type SelectProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Placeholder text to display when no value is selected\n */\n placeholder?: string\n /**\n *\n */\n validationStatus?: FormValidationStatus\n} & Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'size'> &\n BaseProps<HTMLSelectElement>\n\nconst _SelectRoot = (\n {\n children,\n className,\n disabled,\n fullWidth = false,\n placeholder,\n size = 'medium',\n validationStatus,\n ...rest\n }: SelectProps,\n ref,\n) => {\n return (\n <span\n className={clsx(\n styles['Select-wrapper'],\n styles[`Select-wrapper--${size}`],\n fullWidth && styles['Select-wrapper--fullWidth'],\n validationStatus && styles[`Select--${validationStatus}`],\n disabled && styles[`Select-wrapper--disabled`],\n )}\n >\n <select\n aria-invalid={validationStatus === 'error'}\n className={clsx(\n styles.Select,\n styles[`Select--${size}`],\n 'Select',\n fullWidth && styles['Select--fullWidth'],\n className,\n )}\n disabled={disabled}\n ref={ref}\n {...rest}\n >\n {placeholder && (\n <option value=\"\" disabled={disabled}>\n {placeholder}\n </option>\n )}\n {children}\n </select>\n </span>\n )\n}\n\nconst SelectRoot = forwardRef(_SelectRoot)\n\nexport type OptionProps = {\n value: string\n} & React.PropsWithChildren<React.HTMLProps<HTMLOptionElement>>\n\nconst Option = ({children, value, ...rest}: OptionProps) => {\n return (\n <option value={value} {...rest}>\n {children}\n </option>\n )\n}\n\nexport type OptGroupProps = {\n /**\n * Specifies that an option-group should be disabled\n */\n disabled?: string\n /**\n * Specifies a label for an option-group\n */\n label: string\n} & React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>\n\nconst OptGroup = ({children, label, ...rest}: OptGroupProps) => {\n return (\n <optgroup label={label} {...rest}>\n {children}\n </optgroup>\n )\n}\n\n/**\n * Select\n */\nexport const Select = Object.assign(SelectRoot, {\n Option,\n OptGroup,\n})\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","names":[],"sources":["../../../src/forms/Select/Select.tsx"],"sourcesContent":["import React, {forwardRef} from 'react'\nimport {clsx} from 'clsx'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css'\nimport styles from './Select.module.css'\n\nexport type SelectProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Placeholder text to display when no value is selected\n */\n placeholder?: string\n /**\n *\n */\n validationStatus?: FormValidationStatus\n} & Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'size'> &\n BaseProps<HTMLSelectElement>\n\nconst _SelectRoot = (\n {\n children,\n className,\n disabled,\n fullWidth = false,\n placeholder,\n size = 'medium',\n validationStatus,\n ...rest\n }: SelectProps,\n ref,\n) => {\n return (\n <span\n className={clsx(\n styles['Select-wrapper'],\n styles[`Select-wrapper--${size}`],\n fullWidth && styles['Select-wrapper--fullWidth'],\n validationStatus && styles[`Select--${validationStatus}`],\n disabled && styles[`Select-wrapper--disabled`],\n )}\n >\n <select\n aria-invalid={validationStatus === 'error'}\n className={clsx(\n styles.Select,\n styles[`Select--${size}`],\n 'Select',\n fullWidth && styles['Select--fullWidth'],\n className,\n )}\n disabled={disabled}\n ref={ref}\n {...rest}\n >\n {placeholder && (\n <option value=\"\" disabled={disabled}>\n {placeholder}\n </option>\n )}\n {children}\n </select>\n </span>\n )\n}\n\nconst SelectRoot = forwardRef(_SelectRoot)\n\nexport type OptionProps = {\n value: string\n} & React.PropsWithChildren<React.HTMLProps<HTMLOptionElement>>\n\nconst Option = ({children, value, ...rest}: OptionProps) => {\n return (\n <option value={value} {...rest}>\n {children}\n </option>\n )\n}\n\nexport type OptGroupProps = {\n /**\n * Specifies that an option-group should be disabled\n */\n disabled?: string\n /**\n * Specifies a label for an option-group\n */\n label: string\n} & React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>\n\nconst OptGroup = ({children, label, ...rest}: OptGroupProps) => {\n return (\n <optgroup label={label} {...rest}>\n {children}\n </optgroup>\n )\n}\n\n/**\n * Select\n */\nexport const Select = Object.assign(SelectRoot, {\n Option,\n OptGroup,\n})\n"],"mappings":";;;;;AAgFA,IAAM,IAAa,GA9CjB,EACE,aACA,cACA,aACA,eAAY,IACZ,gBACA,UAAO,UACP,qBACA,GAAG,KAEL,MAGE,kBAAC,QAAD;CACE,WAAW,EACT,EAAO,mBACP,EAAO,mBAAmB,MAC1B,KAAa,EAAO,8BACpB,KAAoB,EAAO,WAAW,MACtC,KAAY,EAAO,4BACpB;WAED,kBAAC,UAAD;EACE,gBAAc,MAAqB;EACnC,WAAW,EACT,EAAO,QACP,EAAO,WAAW,MAClB,UACA,KAAa,EAAO,sBACpB,EACD;EACS;EACL;EACL,GAAI;YAXN,CAaG,KACC,kBAAC,UAAD;GAAQ,OAAM;GAAa;aACxB;GACM,CAAA,EAEV,EACM;;CACJ,CAAA,CAI+B,EAoC7B,IAAS,OAAO,OAAO,GAAY;CAC9C,SA/Bc,EAAC,aAAU,UAAO,GAAG,QAEjC,kBAAC,UAAD;EAAe;EAAO,GAAI;EACvB;EACM,CAAA;CA4BX,WAbgB,EAAC,aAAU,UAAO,GAAG,QAEnC,kBAAC,YAAD;EAAiB;EAAO,GAAI;EACzB;EACQ,CAAA;CAUd,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BaseProps } from '../../component-helpers';
|
|
3
3
|
import type { FormInputSizes, FormValidationStatus } from '../form-types';
|
|
4
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css';
|
|
4
5
|
import type { Icon } from '@primer/octicons-react';
|
|
5
6
|
type VisualType = React.ReactElement | React.ReactNode | Icon;
|
|
6
7
|
export type TextInputProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/forms/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAIhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/forms/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAIhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;AAGvE,OAAO,2GAA2G,CAAA;AAElH,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAEhD,KAAK,UAAU,GAAG,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;AAE7D,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAA;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAA;IAC/G;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GACpE,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAkK7B,eAAO,MAAM,SAAS,6FAAgC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import { useId as t } from "../../hooks/useId.js";
|
|
3
3
|
import { Text as n } from "../../Text/Text.js";
|
|
4
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css';/* empty css */
|
|
4
5
|
import r from "./TextInput.module.js";
|
|
5
6
|
import i, { forwardRef as a, useMemo as o } from "react";
|
|
6
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","names":[],"sources":["../../../src/forms/TextInput/TextInput.tsx"],"sourcesContent":["import React, {forwardRef, useMemo} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../hooks/useId'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\nimport {Text} from '../../Text'\n\nimport styles from './TextInput.module.css'\nimport type {Icon} from '@primer/octicons-react'\n\ntype VisualType = React.ReactElement | React.ReactNode | Icon\n\nexport type TextInputProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Removes border\n */\n invisible?: boolean\n /**\n * Applies non-interactive text to start of input.\n */\n leadingText?: string\n /**\n * Applies non-interactive iconography to start of input.\n */\n leadingVisual?: VisualType\n /**\n * Applies monospace styling.\n */\n monospace?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Applies non-interactive text to end of input.\n */\n trailingText?: string\n /**\n * Applies non-interactive iconography to end of input.\n */\n trailingVisual?: VisualType\n /**\n * Constrains the input type to single line inputs.\n */\n type?: 'text' | 'number' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local'\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n *\n */\n validationStatus?: FormValidationStatus\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> &\n BaseProps<HTMLInputElement>\n\nconst TextInputInternal = (\n {\n className,\n disabled,\n fullWidth = false,\n invisible = false,\n leadingText,\n leadingVisual: LeadingVisual,\n monospace,\n placeholder,\n size = 'medium',\n trailingText,\n trailingVisual: TrailingVisual,\n validationStatus,\n ...rest\n }: TextInputProps,\n ref,\n) => {\n const uniqueId = useId()\n\n const showLeadingText = leadingText && !LeadingVisual\n const showLeadingVisual = LeadingVisual && !leadingText\n const showTrailingText = trailingText && !TrailingVisual\n const showTrailingVisual = TrailingVisual && !trailingText\n\n const leadingTextId = `${uniqueId}-leading-text`\n const leadingVisualId = `${uniqueId}-leading-visual`\n const trailingVisualId = `${uniqueId}-trailing-visual`\n const trailingTextId = `${uniqueId}-trailing-text`\n\n const describedBy = useMemo(() => {\n const elements = [\n {condition: showLeadingText, id: leadingTextId},\n {condition: showLeadingVisual, id: leadingVisualId},\n {condition: showTrailingVisual, id: trailingVisualId},\n {condition: showTrailingText, id: trailingTextId},\n ]\n\n return elements\n .filter(({condition}) => condition)\n .map(({id}) => id)\n .join(' ')\n }, [\n showLeadingText,\n showLeadingVisual,\n showTrailingVisual,\n showTrailingText,\n leadingTextId,\n leadingVisualId,\n trailingVisualId,\n trailingTextId,\n ])\n\n return (\n <span\n className={clsx(\n styles['TextInput-wrapper'],\n styles[`TextInput-wrapper--${size}`],\n fullWidth && styles['TextInput-wrapper--fullWidth'],\n invisible && styles['TextInput-wrapper--invisible'],\n disabled && styles['TextInput-wrapper--disabled'],\n monospace && styles['TextInput-wrapper--monospace'],\n validationStatus && styles[`TextInput-wrapper--${validationStatus}`],\n )}\n >\n {showLeadingText && (\n <span\n className={clsx(\n styles['TextInput-leading-text'],\n styles[`TextInput-leading-text--${size}`],\n disabled && styles['TextInput-leading-text--disabled'],\n validationStatus && styles[`TextInput-leading-text--${validationStatus}`],\n )}\n >\n <Text\n size={size === 'large' ? '200' : '100'}\n as=\"span\"\n className={clsx(styles['TextInput-leading-text-inner'], styles[`TextInput-leading-text-inner--${size}`])}\n id={leadingTextId}\n >\n {leadingText}\n </Text>\n </span>\n )}\n {showLeadingVisual && (\n <span className={clsx(styles['TextInput-leading-visual'], styles[`TextInput-leading-visual--${size}`])}>\n {LeadingVisual &&\n React.isValidElement<{className?: string; width?: number; height?: number; id?: string}>(LeadingVisual)\n ? React.cloneElement(LeadingVisual, {\n className: clsx(\n styles['TextInput-leading-visual-icon'],\n styles[`TextInput-leading-visual-icon--${size}`],\n ),\n width: size === 'large' ? 20 : 16,\n height: size === 'large' ? 20 : 16,\n id: leadingVisualId,\n })\n : null}\n </span>\n )}\n <input\n type=\"text\"\n ref={ref}\n className={clsx(\n styles.TextInput,\n 'TextInput',\n styles[`TextInput--${size}`],\n fullWidth && styles['TextInput--fullWidth'],\n LeadingVisual && styles[`TextInput--has-leading-visual--${size}`],\n TrailingVisual && styles[`TextInput--has-trailing-visual--${size}`],\n validationStatus && styles[`TextInput--${validationStatus}`],\n leadingText && !LeadingVisual && styles['TextInput--has-leading-text'],\n trailingText && !TrailingVisual && styles['TextInput--has-trailing-text'],\n className,\n )}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={validationStatus === 'error'}\n aria-describedby={describedBy || undefined}\n {...rest}\n />\n {showTrailingVisual && (\n <span className={clsx(styles['TextInput-trailing-visual'], styles[`TextInput-trailing-visual--${size}`])}>\n {TrailingVisual &&\n React.isValidElement<{className?: string; width?: number; height?: number; id?: string}>(TrailingVisual)\n ? React.cloneElement(TrailingVisual, {\n className: clsx(\n styles['TextInput-trailing-visual-icon'],\n styles[`TextInput-trailing-visual-icon--${size}`],\n ),\n width: size === 'large' ? 20 : 16,\n height: size === 'large' ? 20 : 16,\n id: trailingVisualId,\n })\n : null}\n </span>\n )}\n {showTrailingText && (\n <span\n className={clsx(\n styles['TextInput-trailing-text'],\n styles[`TextInput-trailing-text--${size}`],\n disabled && styles['TextInput-trailing-text--disabled'],\n validationStatus && styles[`TextInput-trailing-text--${validationStatus}`],\n )}\n >\n <Text\n size={size === 'large' ? '200' : '100'}\n as=\"span\"\n className={clsx(styles['TextInput-trailing-text-inner'], styles[`TextInput-trailing-text-inner--${size}`])}\n id={trailingTextId}\n >\n {trailingText}\n </Text>\n </span>\n )}\n </span>\n )\n}\n\nexport const TextInput = forwardRef(TextInputInternal)\n\nTextInput.displayName = 'TextInput'\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.js","names":[],"sources":["../../../src/forms/TextInput/TextInput.tsx"],"sourcesContent":["import React, {forwardRef, useMemo} from 'react'\nimport {clsx} from 'clsx'\nimport {useId} from '../../hooks/useId'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\nimport {Text} from '../../Text'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css'\nimport styles from './TextInput.module.css'\nimport type {Icon} from '@primer/octicons-react'\n\ntype VisualType = React.ReactElement | React.ReactNode | Icon\n\nexport type TextInputProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Removes border\n */\n invisible?: boolean\n /**\n * Applies non-interactive text to start of input.\n */\n leadingText?: string\n /**\n * Applies non-interactive iconography to start of input.\n */\n leadingVisual?: VisualType\n /**\n * Applies monospace styling.\n */\n monospace?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Applies non-interactive text to end of input.\n */\n trailingText?: string\n /**\n * Applies non-interactive iconography to end of input.\n */\n trailingVisual?: VisualType\n /**\n * Constrains the input type to single line inputs.\n */\n type?: 'text' | 'number' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local'\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n *\n */\n validationStatus?: FormValidationStatus\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> &\n BaseProps<HTMLInputElement>\n\nconst TextInputInternal = (\n {\n className,\n disabled,\n fullWidth = false,\n invisible = false,\n leadingText,\n leadingVisual: LeadingVisual,\n monospace,\n placeholder,\n size = 'medium',\n trailingText,\n trailingVisual: TrailingVisual,\n validationStatus,\n ...rest\n }: TextInputProps,\n ref,\n) => {\n const uniqueId = useId()\n\n const showLeadingText = leadingText && !LeadingVisual\n const showLeadingVisual = LeadingVisual && !leadingText\n const showTrailingText = trailingText && !TrailingVisual\n const showTrailingVisual = TrailingVisual && !trailingText\n\n const leadingTextId = `${uniqueId}-leading-text`\n const leadingVisualId = `${uniqueId}-leading-visual`\n const trailingVisualId = `${uniqueId}-trailing-visual`\n const trailingTextId = `${uniqueId}-trailing-text`\n\n const describedBy = useMemo(() => {\n const elements = [\n {condition: showLeadingText, id: leadingTextId},\n {condition: showLeadingVisual, id: leadingVisualId},\n {condition: showTrailingVisual, id: trailingVisualId},\n {condition: showTrailingText, id: trailingTextId},\n ]\n\n return elements\n .filter(({condition}) => condition)\n .map(({id}) => id)\n .join(' ')\n }, [\n showLeadingText,\n showLeadingVisual,\n showTrailingVisual,\n showTrailingText,\n leadingTextId,\n leadingVisualId,\n trailingVisualId,\n trailingTextId,\n ])\n\n return (\n <span\n className={clsx(\n styles['TextInput-wrapper'],\n styles[`TextInput-wrapper--${size}`],\n fullWidth && styles['TextInput-wrapper--fullWidth'],\n invisible && styles['TextInput-wrapper--invisible'],\n disabled && styles['TextInput-wrapper--disabled'],\n monospace && styles['TextInput-wrapper--monospace'],\n validationStatus && styles[`TextInput-wrapper--${validationStatus}`],\n )}\n >\n {showLeadingText && (\n <span\n className={clsx(\n styles['TextInput-leading-text'],\n styles[`TextInput-leading-text--${size}`],\n disabled && styles['TextInput-leading-text--disabled'],\n validationStatus && styles[`TextInput-leading-text--${validationStatus}`],\n )}\n >\n <Text\n size={size === 'large' ? '200' : '100'}\n as=\"span\"\n className={clsx(styles['TextInput-leading-text-inner'], styles[`TextInput-leading-text-inner--${size}`])}\n id={leadingTextId}\n >\n {leadingText}\n </Text>\n </span>\n )}\n {showLeadingVisual && (\n <span className={clsx(styles['TextInput-leading-visual'], styles[`TextInput-leading-visual--${size}`])}>\n {LeadingVisual &&\n React.isValidElement<{className?: string; width?: number; height?: number; id?: string}>(LeadingVisual)\n ? React.cloneElement(LeadingVisual, {\n className: clsx(\n styles['TextInput-leading-visual-icon'],\n styles[`TextInput-leading-visual-icon--${size}`],\n ),\n width: size === 'large' ? 20 : 16,\n height: size === 'large' ? 20 : 16,\n id: leadingVisualId,\n })\n : null}\n </span>\n )}\n <input\n type=\"text\"\n ref={ref}\n className={clsx(\n styles.TextInput,\n 'TextInput',\n styles[`TextInput--${size}`],\n fullWidth && styles['TextInput--fullWidth'],\n LeadingVisual && styles[`TextInput--has-leading-visual--${size}`],\n TrailingVisual && styles[`TextInput--has-trailing-visual--${size}`],\n validationStatus && styles[`TextInput--${validationStatus}`],\n leadingText && !LeadingVisual && styles['TextInput--has-leading-text'],\n trailingText && !TrailingVisual && styles['TextInput--has-trailing-text'],\n className,\n )}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={validationStatus === 'error'}\n aria-describedby={describedBy || undefined}\n {...rest}\n />\n {showTrailingVisual && (\n <span className={clsx(styles['TextInput-trailing-visual'], styles[`TextInput-trailing-visual--${size}`])}>\n {TrailingVisual &&\n React.isValidElement<{className?: string; width?: number; height?: number; id?: string}>(TrailingVisual)\n ? React.cloneElement(TrailingVisual, {\n className: clsx(\n styles['TextInput-trailing-visual-icon'],\n styles[`TextInput-trailing-visual-icon--${size}`],\n ),\n width: size === 'large' ? 20 : 16,\n height: size === 'large' ? 20 : 16,\n id: trailingVisualId,\n })\n : null}\n </span>\n )}\n {showTrailingText && (\n <span\n className={clsx(\n styles['TextInput-trailing-text'],\n styles[`TextInput-trailing-text--${size}`],\n disabled && styles['TextInput-trailing-text--disabled'],\n validationStatus && styles[`TextInput-trailing-text--${validationStatus}`],\n )}\n >\n <Text\n size={size === 'large' ? '200' : '100'}\n as=\"span\"\n className={clsx(styles['TextInput-trailing-text-inner'], styles[`TextInput-trailing-text-inner--${size}`])}\n id={trailingTextId}\n >\n {trailingText}\n </Text>\n </span>\n )}\n </span>\n )\n}\n\nexport const TextInput = forwardRef(TextInputInternal)\n\nTextInput.displayName = 'TextInput'\n"],"mappings":";;;;;;;AA8NA,IAAa,IAAY,GA/JvB,EACE,cACA,aACA,eAAY,IACZ,eAAY,IACZ,gBACA,eAAe,GACf,cACA,gBACA,UAAO,UACP,iBACA,gBAAgB,GAChB,qBACA,GAAG,KAEL,MACG;CACH,IAAM,IAAW,GAAO,EAElB,IAAkB,KAAe,CAAC,GAClC,IAAoB,KAAiB,CAAC,GACtC,IAAmB,KAAgB,CAAC,GACpC,IAAqB,KAAkB,CAAC,GAExC,IAAgB,GAAG,EAAS,gBAC5B,IAAkB,GAAG,EAAS,kBAC9B,IAAmB,GAAG,EAAS,mBAC/B,IAAiB,GAAG,EAAS,iBAE7B,IAAc,QAQX;EANL;GAAC,WAAW;GAAiB,IAAI;GAAc;EAC/C;GAAC,WAAW;GAAmB,IAAI;GAAgB;EACnD;GAAC,WAAW;GAAoB,IAAI;GAAiB;EACrD;GAAC,WAAW;GAAkB,IAAI;GAAe;EAG5C,CACJ,QAAQ,EAAC,mBAAe,EAAU,CAClC,KAAK,EAAC,YAAQ,EAAG,CACjB,KAAK,IAAI,EACX;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,kBAAC,QAAD;EACE,WAAW,EACT,EAAO,sBACP,EAAO,sBAAsB,MAC7B,KAAa,EAAO,iCACpB,KAAa,EAAO,iCACpB,KAAY,EAAO,gCACnB,KAAa,EAAO,iCACpB,KAAoB,EAAO,sBAAsB,KAClD;YATH;GAWG,KACC,kBAAC,QAAD;IACE,WAAW,EACT,EAAO,2BACP,EAAO,2BAA2B,MAClC,KAAY,EAAO,qCACnB,KAAoB,EAAO,2BAA2B,KACvD;cAED,kBAAC,GAAD;KACE,MAAM,MAAS,UAAU,QAAQ;KACjC,IAAG;KACH,WAAW,EAAK,EAAO,iCAAiC,EAAO,iCAAiC,KAAQ;KACxG,IAAI;eAEH;KACI,CAAA;IACF,CAAA;GAER,KACC,kBAAC,QAAD;IAAM,WAAW,EAAK,EAAO,6BAA6B,EAAO,6BAA6B,KAAQ;cACnG,KACD,EAAM,eAAmF,EAAc,GACnG,EAAM,aAAa,GAAe;KAChC,WAAW,EACT,EAAO,kCACP,EAAO,kCAAkC,KAC1C;KACD,OAAO,MAAS,UAAU,KAAK;KAC/B,QAAQ,MAAS,UAAU,KAAK;KAChC,IAAI;KACL,CAAC,GACF;IACC,CAAA;GAET,kBAAC,SAAD;IACE,MAAK;IACA;IACL,WAAW,EACT,EAAO,WACP,aACA,EAAO,cAAc,MACrB,KAAa,EAAO,yBACpB,KAAiB,EAAO,kCAAkC,MAC1D,KAAkB,EAAO,mCAAmC,MAC5D,KAAoB,EAAO,cAAc,MACzC,KAAe,CAAC,KAAiB,EAAO,gCACxC,KAAgB,CAAC,KAAkB,EAAO,iCAC1C,EACD;IACY;IACH;IACV,gBAAc,MAAqB;IACnC,oBAAkB,KAAe,KAAA;IACjC,GAAI;IACJ,CAAA;GACD,KACC,kBAAC,QAAD;IAAM,WAAW,EAAK,EAAO,8BAA8B,EAAO,8BAA8B,KAAQ;cACrG,KACD,EAAM,eAAmF,EAAe,GACpG,EAAM,aAAa,GAAgB;KACjC,WAAW,EACT,EAAO,mCACP,EAAO,mCAAmC,KAC3C;KACD,OAAO,MAAS,UAAU,KAAK;KAC/B,QAAQ,MAAS,UAAU,KAAK;KAChC,IAAI;KACL,CAAC,GACF;IACC,CAAA;GAER,KACC,kBAAC,QAAD;IACE,WAAW,EACT,EAAO,4BACP,EAAO,4BAA4B,MACnC,KAAY,EAAO,sCACnB,KAAoB,EAAO,4BAA4B,KACxD;cAED,kBAAC,GAAD;KACE,MAAM,MAAS,UAAU,QAAQ;KACjC,IAAG;KACH,WAAW,EAAK,EAAO,kCAAkC,EAAO,kCAAkC,KAAQ;KAC1G,IAAI;eAEH;KACI,CAAA;IACF,CAAA;GAEJ;;EAI2C;AAEtD,EAAU,cAAc"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BaseProps } from '../../component-helpers';
|
|
3
3
|
import type { FormInputSizes, FormValidationStatus } from '../form-types';
|
|
4
|
+
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css';
|
|
4
5
|
export declare const DEFAULT_TEXTAREA_ROWS = 7;
|
|
5
6
|
export declare const DEFAULT_TEXTAREA_COLS = 30;
|
|
6
7
|
export declare const DEFAULT_TEXTAREA_RESIZE = "both";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/forms/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/forms/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,cAAc,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAA;AAEvE,OAAO,2GAA2G,CAAA;AAGlH,eAAO,MAAM,qBAAqB,IAAI,CAAA;AACtC,eAAO,MAAM,qBAAqB,KAAK,CAAA;AACvC,eAAO,MAAM,uBAAuB,SAAS,CAAA;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAA;CACrD,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,GACjE,SAAS,CAAC,mBAAmB,CAAC,CAAA;AAiEhC,eAAO,MAAM,QAAQ,4FAAwB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import e from "../../node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css';/* empty css */
|
|
2
3
|
import t from "./Textarea.module.js";
|
|
3
4
|
import { forwardRef as n } from "react";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/forms/Textarea/Textarea.tsx"],"sourcesContent":["import React, {forwardRef} from 'react'\nimport {clsx} from 'clsx'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\n\nimport styles from './Textarea.module.css'\n\nexport const DEFAULT_TEXTAREA_ROWS = 7\nexport const DEFAULT_TEXTAREA_COLS = 30\nexport const DEFAULT_TEXTAREA_RESIZE = 'both'\n\nexport type TextareaProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Removes border\n */\n invisible?: boolean\n /**\n * Applies monospace styling.\n */\n monospace?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n *\n */\n validationStatus?: FormValidationStatus\n /**\n * Allows resizing of the textarea\n */\n resize?: 'none' | 'both' | 'horizontal' | 'vertical'\n} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> &\n BaseProps<HTMLTextAreaElement>\n\nconst testIds = {\n root: 'Textarea',\n get outerContainer() {\n return `${this.root}-outer-container`\n },\n}\n\nconst _Textarea = (\n {\n children,\n className,\n cols = DEFAULT_TEXTAREA_COLS,\n disabled,\n fullWidth = false,\n invisible = false,\n monospace,\n placeholder,\n size = 'medium',\n validationStatus,\n required,\n resize = DEFAULT_TEXTAREA_RESIZE,\n rows = DEFAULT_TEXTAREA_ROWS,\n ...rest\n }: TextareaProps,\n ref,\n) => {\n return (\n <span\n className={clsx(\n styles['Textarea-wrapper'],\n fullWidth && styles['Textarea-wrapper--fullWidth'],\n invisible && styles['Textarea-wrapper--invisible'],\n disabled && styles['Textarea-wrapper--disabled'],\n monospace && styles['Textarea-wrapper--monospace'],\n validationStatus && styles[`Textarea-wrapper--${validationStatus}`],\n )}\n data-testid={testIds.outerContainer}\n >\n <textarea\n ref={ref}\n className={clsx(\n styles.Textarea,\n 'Textarea',\n styles[`Textarea--${size}`],\n styles[`Textarea-resize--${resize}`],\n fullWidth && styles['Textarea--fullWidth'],\n validationStatus && styles[`Textarea--${validationStatus}`],\n className,\n )}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={validationStatus === 'error'}\n required={required}\n rows={rows}\n cols={cols}\n {...rest}\n >\n {children}\n </textarea>\n </span>\n )\n}\n\nexport const Textarea = forwardRef(_Textarea)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Textarea.js","names":[],"sources":["../../../src/forms/Textarea/Textarea.tsx"],"sourcesContent":["import React, {forwardRef} from 'react'\nimport {clsx} from 'clsx'\n\nimport type {BaseProps} from '../../component-helpers'\nimport type {FormInputSizes, FormValidationStatus} from '../form-types'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css'\nimport styles from './Textarea.module.css'\n\nexport const DEFAULT_TEXTAREA_ROWS = 7\nexport const DEFAULT_TEXTAREA_COLS = 30\nexport const DEFAULT_TEXTAREA_RESIZE = 'both'\n\nexport type TextareaProps = {\n /**\n * Applies full width styling.\n */\n fullWidth?: boolean\n /**\n * Removes border\n */\n invisible?: boolean\n /**\n * Applies monospace styling.\n */\n monospace?: boolean\n /**\n * Applies alternative sizing to the input\n */\n size?: FormInputSizes\n /**\n * Applies a required attribute to the input\n */\n required?: boolean\n /**\n *\n */\n validationStatus?: FormValidationStatus\n /**\n * Allows resizing of the textarea\n */\n resize?: 'none' | 'both' | 'horizontal' | 'vertical'\n} & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> &\n BaseProps<HTMLTextAreaElement>\n\nconst testIds = {\n root: 'Textarea',\n get outerContainer() {\n return `${this.root}-outer-container`\n },\n}\n\nconst _Textarea = (\n {\n children,\n className,\n cols = DEFAULT_TEXTAREA_COLS,\n disabled,\n fullWidth = false,\n invisible = false,\n monospace,\n placeholder,\n size = 'medium',\n validationStatus,\n required,\n resize = DEFAULT_TEXTAREA_RESIZE,\n rows = DEFAULT_TEXTAREA_ROWS,\n ...rest\n }: TextareaProps,\n ref,\n) => {\n return (\n <span\n className={clsx(\n styles['Textarea-wrapper'],\n fullWidth && styles['Textarea-wrapper--fullWidth'],\n invisible && styles['Textarea-wrapper--invisible'],\n disabled && styles['Textarea-wrapper--disabled'],\n monospace && styles['Textarea-wrapper--monospace'],\n validationStatus && styles[`Textarea-wrapper--${validationStatus}`],\n )}\n data-testid={testIds.outerContainer}\n >\n <textarea\n ref={ref}\n className={clsx(\n styles.Textarea,\n 'Textarea',\n styles[`Textarea--${size}`],\n styles[`Textarea-resize--${resize}`],\n fullWidth && styles['Textarea--fullWidth'],\n validationStatus && styles[`Textarea--${validationStatus}`],\n className,\n )}\n placeholder={placeholder}\n disabled={disabled}\n aria-invalid={validationStatus === 'error'}\n required={required}\n rows={rows}\n cols={cols}\n {...rest}\n >\n {children}\n </textarea>\n </span>\n )\n}\n\nexport const Textarea = forwardRef(_Textarea)\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";;;;;;AASA,IAAa,IAAwB,GACxB,IAAwB,IACxB,IAA0B,QAkCjC,IAAU;CACd,MAAM;CACN,IAAI,iBAAiB;AACnB,SAAO,GAAG,KAAK,KAAK;;CAEvB,EA0DY,IAAW,GAvDtB,EACE,aACA,cACA,UAAA,IACA,aACA,eAAY,IACZ,eAAY,IACZ,cACA,gBACA,UAAO,UACP,qBACA,aACA,YAAS,GACT,UAAA,GACA,GAAG,KAEL,MAGE,kBAAC,QAAD;CACE,WAAW,EACT,EAAO,qBACP,KAAa,EAAO,gCACpB,KAAa,EAAO,gCACpB,KAAY,EAAO,+BACnB,KAAa,EAAO,gCACpB,KAAoB,EAAO,qBAAqB,KACjD;CACD,eAAa,EAAQ;WAErB,kBAAC,YAAD;EACO;EACL,WAAW,EACT,EAAO,UACP,YACA,EAAO,aAAa,MACpB,EAAO,oBAAoB,MAC3B,KAAa,EAAO,wBACpB,KAAoB,EAAO,aAAa,MACxC,EACD;EACY;EACH;EACV,gBAAc,MAAqB;EACzB;EACJ;EACA;EACN,GAAI;EAEH;EACQ,CAAA;CACN,CAAA,CAIkC;AAE7C,EAAS,cAAc"}
|
package/esm/forms/index.d.ts
CHANGED
package/esm/forms/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface FocusTrapHookSettings {
|
|
2
|
+
export interface FocusTrapHookSettings<ContainerElement extends HTMLElement = HTMLElement, InitialFocusElement extends HTMLElement = HTMLElement> {
|
|
3
3
|
/**
|
|
4
|
-
* Ref that will be used for the trapping container. If not provided, one will
|
|
4
|
+
* Ref object that will be used for the trapping container. If not provided, one will
|
|
5
5
|
* be created by this hook and returned.
|
|
6
6
|
*/
|
|
7
|
-
containerRef
|
|
7
|
+
containerRef?: React.RefObject<ContainerElement | null>;
|
|
8
8
|
/**
|
|
9
|
-
* Ref for the element that should receive focus when the focus trap is first enabled.
|
|
9
|
+
* Ref object for the element that should receive focus when the focus trap is first enabled.
|
|
10
10
|
* If not provided, one will be created by this hook and returned. Its use is optional.
|
|
11
11
|
*/
|
|
12
|
-
initialFocusRef?: React.RefObject<
|
|
12
|
+
initialFocusRef?: React.RefObject<InitialFocusElement | null>;
|
|
13
13
|
/**
|
|
14
14
|
* Set to true to disable the focus trap and clean up listeners. Can be re-enabled at any time.
|
|
15
15
|
*/
|
|
@@ -24,8 +24,8 @@ export interface FocusTrapHookSettings {
|
|
|
24
24
|
* that should trap focus.
|
|
25
25
|
* @param settings {FocusTrapHookSettings}
|
|
26
26
|
*/
|
|
27
|
-
export declare function useFocusTrap(settings?: FocusTrapHookSettings, dependencies?: React.DependencyList): {
|
|
28
|
-
containerRef: React.RefObject<
|
|
29
|
-
initialFocusRef: React.RefObject<
|
|
27
|
+
export declare function useFocusTrap<ContainerElement extends HTMLElement = HTMLElement, InitialFocusElement extends HTMLElement = HTMLElement>(settings?: FocusTrapHookSettings<ContainerElement, InitialFocusElement>, dependencies?: React.DependencyList): {
|
|
28
|
+
containerRef: React.RefObject<ContainerElement | null>;
|
|
29
|
+
initialFocusRef: React.RefObject<InitialFocusElement | null>;
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=useFocusTrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,qBAAqB,CACpC,gBAAgB,SAAS,WAAW,GAAG,WAAW,EAClD,mBAAmB,SAAS,WAAW,GAAG,WAAW;IAErD;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IAEvD;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAA;IAE7D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,gBAAgB,SAAS,WAAW,GAAG,WAAW,EAClD,mBAAmB,SAAS,WAAW,GAAG,WAAW,EAErD,QAAQ,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,EACvE,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC;IACD,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IACtD,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAA;CAC7D,CAsCA"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import { useProvidedRefOrCreate as e } from "./useRef.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { focusTrap as n } from "@primer/behaviors";
|
|
3
4
|
//#region src/hooks/useFocusTrap.ts
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
s.current?.abort(), n?.restoreFocusOnCleanUp && c.current instanceof HTMLElement && (c.current.focus(), c.current = null);
|
|
5
|
+
function r(r, i = []) {
|
|
6
|
+
let a = e(r?.containerRef), o = e(r?.initialFocusRef), s = r?.disabled, c = t.useRef(null), l = t.useRef(null);
|
|
7
|
+
function u() {
|
|
8
|
+
c.current?.abort(), r?.restoreFocusOnCleanUp && l.current instanceof HTMLElement && l.current.focus(), l.current = null;
|
|
9
9
|
}
|
|
10
|
-
return
|
|
11
|
-
if (
|
|
12
|
-
else return
|
|
13
|
-
|
|
10
|
+
return t.useEffect(() => {
|
|
11
|
+
if (a.current instanceof HTMLElement) if (s) u();
|
|
12
|
+
else return l.current ||= document.activeElement, c.current = n(a.current, o.current ?? void 0) ?? null, () => {
|
|
13
|
+
u();
|
|
14
14
|
};
|
|
15
15
|
}, [
|
|
16
|
-
i,
|
|
17
16
|
a,
|
|
18
17
|
o,
|
|
19
|
-
|
|
18
|
+
s,
|
|
19
|
+
...i
|
|
20
20
|
]), {
|
|
21
|
-
containerRef:
|
|
22
|
-
initialFocusRef:
|
|
21
|
+
containerRef: a,
|
|
22
|
+
initialFocusRef: o
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
export {
|
|
26
|
+
export { r as useFocusTrap };
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.js","names":[],"sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React from 'react'\nimport {focusTrap} from '@primer/behaviors'\n\nexport interface FocusTrapHookSettings {\n /**\n * Ref that will be used for the trapping container. If not provided, one will\n * be created by this hook and returned.\n */\n containerRef
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","names":[],"sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React from 'react'\nimport {focusTrap} from '@primer/behaviors'\nimport {useProvidedRefOrCreate} from './useRef'\n\nexport interface FocusTrapHookSettings<\n ContainerElement extends HTMLElement = HTMLElement,\n InitialFocusElement extends HTMLElement = HTMLElement,\n> {\n /**\n * Ref object that will be used for the trapping container. If not provided, one will\n * be created by this hook and returned.\n */\n containerRef?: React.RefObject<ContainerElement | null>\n\n /**\n * Ref object for the element that should receive focus when the focus trap is first enabled.\n * If not provided, one will be created by this hook and returned. Its use is optional.\n */\n initialFocusRef?: React.RefObject<InitialFocusElement | null>\n\n /**\n * Set to true to disable the focus trap and clean up listeners. Can be re-enabled at any time.\n */\n disabled?: boolean\n\n /**\n * If true, when this focus trap is cleaned up, restore focus to the element that had focus immediately before the focus trap was enabled. (Default: false)\n */\n restoreFocusOnCleanUp?: boolean\n}\n\n/**\n * Hook used to trap focus inside a container. Returns a ref that can be added to the container\n * that should trap focus.\n * @param settings {FocusTrapHookSettings}\n */\nexport function useFocusTrap<\n ContainerElement extends HTMLElement = HTMLElement,\n InitialFocusElement extends HTMLElement = HTMLElement,\n>(\n settings?: FocusTrapHookSettings<ContainerElement, InitialFocusElement>,\n dependencies: React.DependencyList = [],\n): {\n containerRef: React.RefObject<ContainerElement | null>\n initialFocusRef: React.RefObject<InitialFocusElement | null>\n} {\n const containerRef = useProvidedRefOrCreate<ContainerElement | null>(settings?.containerRef)\n const initialFocusRef = useProvidedRefOrCreate<InitialFocusElement | null>(settings?.initialFocusRef)\n const disabled = settings?.disabled\n const abortController = React.useRef<AbortController | null>(null)\n const previousFocusedElement = React.useRef<Element | null>(null)\n\n // This function removes the event listeners that enable the focus trap and restores focus\n // to the previously-focused element (if necessary).\n function disableTrap() {\n abortController.current?.abort()\n if (settings?.restoreFocusOnCleanUp && previousFocusedElement.current instanceof HTMLElement) {\n previousFocusedElement.current.focus()\n }\n previousFocusedElement.current = null\n }\n\n React.useEffect(\n () => {\n if (containerRef.current instanceof HTMLElement) {\n if (!disabled) {\n if (!previousFocusedElement.current) {\n previousFocusedElement.current = document.activeElement\n }\n abortController.current = focusTrap(containerRef.current, initialFocusRef.current ?? undefined) ?? null\n return () => {\n disableTrap()\n }\n } else {\n disableTrap()\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [containerRef, initialFocusRef, disabled, ...dependencies],\n )\n\n return {containerRef, initialFocusRef}\n}\n"],"mappings":";;;;AAoCA,SAAgB,EAId,GACA,IAAqC,EAAE,EAIvC;CACA,IAAM,IAAe,EAAgD,GAAU,aAAa,EACtF,IAAkB,EAAmD,GAAU,gBAAgB,EAC/F,IAAW,GAAU,UACrB,IAAkB,EAAM,OAA+B,KAAK,EAC5D,IAAyB,EAAM,OAAuB,KAAK;CAIjE,SAAS,IAAc;AAKrB,EAJA,EAAgB,SAAS,OAAO,EAC5B,GAAU,yBAAyB,EAAuB,mBAAmB,eAC/E,EAAuB,QAAQ,OAAO,EAExC,EAAuB,UAAU;;AAuBnC,QApBA,EAAM,gBACE;AACJ,MAAI,EAAa,mBAAmB,YAClC,KAAK,EASH,IAAa;MAJb,QAJA,AACE,EAAuB,YAAU,SAAS,eAE5C,EAAgB,UAAU,EAAU,EAAa,SAAS,EAAgB,WAAW,KAAA,EAAU,IAAI,YACtF;AACX,MAAa;;IAQrB;EAAC;EAAc;EAAiB;EAAU,GAAG;EAAa,CAC3D,EAEM;EAAC;EAAc;EAAgB"}
|
package/esm/index.d.ts
CHANGED
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,QAAQ,CAAA;AACtB,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AAGvB,cAAc,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AAEjC,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,QAAQ,CAAA;AACtB,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AAGvB,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA"}
|
package/esm/index.esm.js
CHANGED
|
@@ -10,70 +10,71 @@ import { Text as S, TextFontVariants as C, TextSizes as w, TextTags as T, TextVa
|
|
|
10
10
|
import { EyebrowText as M, EyebrowTextVariants as N } from "./EyebrowText/EyebrowText.js";
|
|
11
11
|
import { TextCursorAnimation as P, testIds as F } from "./TextCursorAnimation/TextCursorAnimation.js";
|
|
12
12
|
import { Heading as I, HeadingFontVariants as L, HeadingLetterSpacing as R, HeadingSizes as z, HeadingStretch as B, HeadingTags as V, HeadingWeights as H, classMap as U, defaultHeadingFont as W, defaultHeadingTag as G } from "./Heading/Heading.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
|
|
13
|
+
import { Button as K, ButtonSizes as q, ButtonVariants as J, _Button as Y, defaultButtonSize as X, defaultButtonVariant as Z } from "./Button/Button.js";
|
|
14
|
+
import { ColorModesEnum as Q, ThemeContext as $, ThemeProvider as ee } from "./ThemeProvider/ThemeProvider.js";
|
|
15
|
+
import { useTheme as te } from "./ThemeProvider/useTheme.js";
|
|
16
|
+
import { ActionMenu as ne, ActionMenuButtonModes as re, ActionMenuProvider as ie, ActionMenuSizes as ae, actionMenuOverlaySides as oe, useActionMenuContext as se } from "./ActionMenu/ActionMenu.js";
|
|
17
|
+
import { ButtonGroup as ce } from "./ButtonGroup/ButtonGroup.js";
|
|
18
|
+
import { Image as le, ImageBorderRadiusOptions as ue } from "./Image/Image.js";
|
|
19
|
+
import { Hero as de } from "./Hero/Hero.js";
|
|
20
|
+
import { RiverAccordion as fe, RiverAccordionVariants as pe } from "./river/RiverAccordion/RiverAccordion.js";
|
|
21
|
+
import { Link as me, LinkArrowDirections as he, LinkSizes as ge, LinkVariants as _e } from "./Link/Link.js";
|
|
22
|
+
import { Label as ve, LabelColors as ye, LabelSizes as be, defaultLabelColor as xe, defaultLabelSize as Se } from "./Label/Label.js";
|
|
23
|
+
import { River as Ce, RiverVisualPaddingOptions as we, RiverVisualPositionOptions as Te, defaultRiverAlign as Ee, defaultRiverImageTextRatio as De, defaultRiverVariant as Oe } from "./river/River/River.js";
|
|
24
|
+
import { RiverBreakout as ke, RiverBreakoutVariants as Ae } from "./river/RiverBreakout/RiverBreakout.js";
|
|
25
|
+
import { Icon as je, defaultIconColor as Me, defaultIconSize as Ne, iconColors as Pe, iconSizeMap as Fe, iconSizes as Ie, namedIconSizes as Le, numericIconSizes as Re } from "./Icon/Icon.js";
|
|
26
|
+
import { BreakpointSize as ze, useWindowSize as Be } from "./hooks/useWindowSize.js";
|
|
27
|
+
import { RiverBreakoutTabs as Ve } from "./river/RiverBreakoutTabs/RiverBreakoutTabs.js";
|
|
28
|
+
import { RiverStoryScroll as He } from "./river/RiverStoryScroll/RiverStoryScroll.js";
|
|
29
|
+
import { Pagination as Ue } from "./Pagination/Pagination.js";
|
|
30
|
+
import { MediaPlaylist as We } from "./MediaPlaylist/MediaPlaylist.js";
|
|
31
|
+
import { useFocusTrap as Ge } from "./hooks/useFocusTrap.js";
|
|
32
|
+
import { SubdomainNavBar as Ke } from "./SubdomainNavBar/SubdomainNavBar.js";
|
|
33
|
+
import { InlineLink as qe } from "./InlineLink/InlineLink.js";
|
|
34
|
+
import { Token as Je, TokenVariants as Ye, defaultTokenVariant as Xe } from "./Token/Token.js";
|
|
35
|
+
import { Accordion as Ze, AccordionContent as Qe, AccordionHeading as $e, AccordionRoot as et, AccordionToggleColors as tt } from "./Accordion/Accordion.js";
|
|
36
|
+
import { FAQ as nt } from "./FAQ/FAQ.js";
|
|
37
|
+
import { FAQGroup as rt } from "./FAQ/FAQGroup.js";
|
|
38
|
+
import { Checkbox as it } from "./forms/Checkbox/Checkbox.js";
|
|
39
|
+
import { DEFAULT_TEXTAREA_COLS as at, DEFAULT_TEXTAREA_RESIZE as ot, DEFAULT_TEXTAREA_ROWS as st, Textarea as ct } from "./forms/Textarea/Textarea.js";
|
|
40
|
+
import { TextInput as lt } from "./forms/TextInput/TextInput.js";
|
|
41
|
+
import { Select as ut } from "./forms/Select/Select.js";
|
|
42
|
+
import { Radio as dt } from "./forms/Radio/Radio.js";
|
|
43
|
+
import { FormControl as ft } from "./forms/FormControl/FormControl.js";
|
|
44
|
+
import { CheckboxGroup as pt } from "./forms/CheckboxGroup/CheckboxGroup.js";
|
|
45
|
+
import { RadioGroup as mt } from "./forms/RadioGroup/RadioGroup.js";
|
|
46
|
+
import { Avatar as ht, AvatarShapes as gt, AvatarSizes as _t } from "./Avatar/Avatar.js";
|
|
47
|
+
import { Testimonial as vt, TestimonialQuoteMarkColors as yt, TestimonialVariants as bt, defaultQuoteMarkColor as xt, defaultTestimonialVariant as St } from "./Testimonial/Testimonial.js";
|
|
48
|
+
import { ComparisonTable as Ct, _ComparisonTable as wt } from "./ComparisonTable/ComparisonTable.js";
|
|
49
|
+
import { AnchorNav as Tt } from "./AnchorNav/AnchorNav.js";
|
|
50
|
+
import { CTABanner as Et, CTABannerBackgroundColors as Dt } from "./CTABanner/CTABanner.js";
|
|
51
|
+
import { UnorderedList as Ot } from "./list/UnorderedList/UnorderedList.js";
|
|
52
|
+
import { OrderedList as kt } from "./list/OrderedList/OrderedList.js";
|
|
53
|
+
import { CTAForm as At } from "./CTAForm/CTAForm.js";
|
|
54
|
+
import { MinimalFooter as jt } from "./MinimalFooter/MinimalFooter.js";
|
|
55
|
+
import { Pillar as Mt, defaultPillarIconColor as Nt, defaultPillarIconSize as Pt } from "./Pillar/Pillar.js";
|
|
56
|
+
import { Card as Ft, CardBackgroundColors as It, CardCTAVariants as Lt, CardIconColors as Rt, CardLabelVariants as zt, CardTokenPositions as Bt, CardVariants as Vt, defaultCardCTAVariant as Ht, defaultCardIconColor as Ut, defaultCardLabelVariant as Wt } from "./Card/Card.js";
|
|
57
|
+
import { CardSkewEffect as Gt } from "./Card/CardSkewEffect.js";
|
|
58
|
+
import { SectionIntro as Kt } from "./SectionIntro/SectionIntro.js";
|
|
59
|
+
import { Prose as qt } from "./Prose/Prose.js";
|
|
60
|
+
import { useVideo as Jt } from "./VideoPlayer/hooks/useVideo.js";
|
|
61
|
+
import { VideoPlayer as Yt } from "./VideoPlayer/VideoPlayer.js";
|
|
62
|
+
import { LogoSuite as Xt } from "./LogoSuite/LogoSuite.js";
|
|
63
|
+
import { Timeline as Zt } from "./Timeline/Timeline.js";
|
|
64
|
+
import { Bento as Qt } from "./Bento/Bento.js";
|
|
65
|
+
import { EyebrowBanner as $t, EyebrowBannerIconColors as en, EyebrowBannerLabelColors as tn, defaultEyebrowBannerIconColor as nn } from "./EyebrowBanner/EyebrowBanner.js";
|
|
66
|
+
import { Tooltip as rn, TooltipContext as an } from "./Tooltip/Tooltip.js";
|
|
67
|
+
import { PricingOptions as on } from "./PricingOptions/PricingOptions.js";
|
|
68
|
+
import { SubNav as sn, SubNavSubMenuVariants as cn, useSubNavContext as ln } from "./SubNav/SubNav.js";
|
|
69
|
+
import { NavList as un } from "./NavList/NavList.js";
|
|
70
|
+
import { IDE as dn, IDEDefaultIconMap as fn, IDEFileExtensions as pn } from "./IDE/IDE.js";
|
|
71
|
+
import { BreadcrumbVariants as mn, Breadcrumbs as hn } from "./Breadcrumbs/Breadcrumbs.js";
|
|
72
|
+
import { Section as gn, SectionBackgroundColors as _n, SectionPaddingVariants as vn } from "./Section/Section.js";
|
|
73
|
+
import { Statistic as yn, StatisticSizes as bn, StatisticSpacingValues as xn } from "./Statistic/Statistic.js";
|
|
74
|
+
import { BreakoutBanner as Sn, BreakoutBannerBackgroundColors as Cn } from "./BreakoutBanner/BreakoutBanner.js";
|
|
75
|
+
import { Footnotes as wn, FootnotesItemTags as Tn, FootnotesTags as En } from "./Footnotes/Footnotes.js";
|
|
76
|
+
import { FrostedGlassVFX as Dn, FrostedGlassVFXIntensity as On, defaultFrostedGlassVFXIntensity as kn } from "./FrostedGlassVFX/FrostedGlassVFX.js";
|
|
77
|
+
import { SectionIntroStacked as An, SectionIntroStackedVariants as jn } from "./SectionIntroStacked/SectionIntroStacked.js";
|
|
78
|
+
import { Tabs as Mn } from "./Tabs/Tabs.js";
|
|
79
|
+
import { Tiles as Nn } from "./Tiles/Tiles.js";
|
|
80
|
+
export { Ze as Accordion, Qe as AccordionContent, $e as AccordionHeading, et as AccordionRoot, tt as AccordionToggleColors, ne as ActionMenu, re as ActionMenuButtonModes, ie as ActionMenuProvider, ae as ActionMenuSizes, Tt as AnchorNav, a as Animate, n as AnimationContext, r as AnimationProvider, i as AnimationVariants, ht as Avatar, gt as AvatarShapes, _t as AvatarSizes, Qt as Bento, g as Box, _ as BoxBackgroundColors, v as BoxBorderColorOptions, y as BoxBorderRadiusOptions, b as BoxBorderWidthOptions, x as BoxSpacingValues, mn as BreadcrumbVariants, hn as Breadcrumbs, Sn as BreakoutBanner, Cn as BreakoutBannerBackgroundColors, ze as BreakpointSize, K as Button, ce as ButtonGroup, q as ButtonSizes, J as ButtonVariants, Et as CTABanner, Dt as CTABannerBackgroundColors, At as CTAForm, Ft as Card, It as CardBackgroundColors, Lt as CardCTAVariants, Rt as CardIconColors, zt as CardLabelVariants, Gt as CardSkewEffect, Bt as CardTokenPositions, Vt as CardVariants, it as Checkbox, pt as CheckboxGroup, Q as ColorModesEnum, Ct as ComparisonTable, at as DEFAULT_TEXTAREA_COLS, ot as DEFAULT_TEXTAREA_RESIZE, st as DEFAULT_TEXTAREA_ROWS, $t as EyebrowBanner, en as EyebrowBannerIconColors, tn as EyebrowBannerLabelColors, M as EyebrowText, N as EyebrowTextVariants, nt as FAQ, rt as FAQGroup, wn as Footnotes, Tn as FootnotesItemTags, En as FootnotesTags, ft as FormControl, Dn as FrostedGlassVFX, On as FrostedGlassVFXIntensity, t as Grid, I as Heading, L as HeadingFontVariants, R as HeadingLetterSpacing, z as HeadingSizes, B as HeadingStretch, V as HeadingTags, H as HeadingWeights, de as Hero, dn as IDE, fn as IDEDefaultIconMap, pn as IDEFileExtensions, je as Icon, le as Image, ue as ImageBorderRadiusOptions, qe as InlineLink, ve as Label, ye as LabelColors, be as LabelSizes, me as Link, he as LinkArrowDirections, ge as LinkSizes, _e as LinkVariants, Xt as LogoSuite, We as MediaPlaylist, jt as MinimalFooter, un as NavList, kt as OrderedList, Ue as Pagination, Mt as Pillar, on as PricingOptions, qt as Prose, dt as Radio, mt as RadioGroup, Ce as River, fe as RiverAccordion, pe as RiverAccordionVariants, ke as RiverBreakout, Ve as RiverBreakoutTabs, Ae as RiverBreakoutVariants, He as RiverStoryScroll, we as RiverVisualPaddingOptions, Te as RiverVisualPositionOptions, gn as Section, _n as SectionBackgroundColors, Kt as SectionIntro, An as SectionIntroStacked, jn as SectionIntroStackedVariants, vn as SectionPaddingVariants, ut as Select, c as Stack, l as StackAlignItemVariants, u as StackDirectionVariants, d as StackFlexWrapVariants, f as StackJustifyContentVariants, p as StackSpacingVariants, yn as Statistic, bn as StatisticSizes, xn as StatisticSpacingValues, sn as SubNav, cn as SubNavSubMenuVariants, Ke as SubdomainNavBar, Mn as Tabs, vt as Testimonial, yt as TestimonialQuoteMarkColors, bt as TestimonialVariants, S as Text, P as TextCursorAnimation, C as TextFontVariants, lt as TextInput, s as TextRevealAnimation, w as TextSizes, T as TextTags, E as TextVariants, D as TextWeights, ct as Textarea, $ as ThemeContext, ee as ThemeProvider, Nn as Tiles, Zt as Timeline, Je as Token, Ye as TokenVariants, rn as Tooltip, an as TooltipContext, Ot as UnorderedList, Yt as VideoPlayer, Y as _Button, wt as _ComparisonTable, e as _GLOBAL_STYLES, oe as actionMenuOverlaySides, U as classMap, X as defaultButtonSize, Z as defaultButtonVariant, Ht as defaultCardCTAVariant, Ut as defaultCardIconColor, Wt as defaultCardLabelVariant, nn as defaultEyebrowBannerIconColor, O as defaultFontVariant, kn as defaultFrostedGlassVFXIntensity, W as defaultHeadingFont, G as defaultHeadingTag, Me as defaultIconColor, Ne as defaultIconSize, xe as defaultLabelColor, Se as defaultLabelSize, Nt as defaultPillarIconColor, Pt as defaultPillarIconSize, xt as defaultQuoteMarkColor, Ee as defaultRiverAlign, De as defaultRiverImageTextRatio, Oe as defaultRiverVariant, m as defaultStackDirection, h as defaultStackSpacing, St as defaultTestimonialVariant, k as defaultTextSize, A as defaultTextTag, j as defaultTextVariant, Xe as defaultTokenVariant, Pe as iconColors, Fe as iconSizeMap, Ie as iconSizes, Le as namedIconSizes, Re as numericIconSizes, F as testIds, se as useActionMenuContext, o as useAnimation, Ge as useFocusTrap, ln as useSubNavContext, te as useTheme, Jt as useVideo, Be as useWindowSize };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root,[data-color-mode=light]{--brand-control-color-border-default:var(--base-color-scale-gray-4);--brand-control-color-border-disabled:var(--base-color-scale-gray-2);--brand-control-color-canvas-disabled:var(--base-color-scale-gray-1);--brand-control-color-fg-default:var(--brand-color-text-default);--brand-control-color-fg-disabled:var(--base-color-scale-gray-4);--brand-control-color-focus:var(--base-color-scale-blue-6);--brand-control-checkbox-bg-default:var(--base-color-scale-white-0);--brand-control-checkbox-bg-hover:var(--brand-color-canvas-subtle);--brand-control-checkbox-bg-checked:var(--base-color-scale-green-6);--brand-control-checkbox-bg-checked-hover:color-mix(in srgb, var(--brand-color-text-emphasized), #000 26%);--brand-control-checkbox-bg-indeterminate:var(--base-color-scale-green-6);--brand-control-checkbox-bg-indeterminate-hover:color-mix(in srgb, var(--brand-color-text-emphasized), #000 26%);--brand-control-checkbox-bg-checked-disabled:color-mix(in srgb, var(--base-color-scale-green-6), #fff 65%);--brand-control-checkbox-fg-checked:var(--base-color-scale-white-0);--brand-control-checkbox-fg-checked-disabled:var(--base-color-scale-white-0);--brand-control-checkbox-border-default:var(--base-color-scale-gray-4);--brand-control-checkbox-border-hover:var(--base-color-scale-gray-4);--brand-control-checkbox-border-checked:var(--base-color-scale-green-6);--brand-control-checkbox-border-checked-hover:var(--brand-color-text-emphasized);--brand-control-checkbox-border-indeterminate:var(--base-color-scale-green-6);--brand-control-checkbox-border-indeterminate-hover:var(--brand-color-text-emphasized);--brand-control-checkbox-border-checked-disabled:color-mix(in srgb, var(--base-color-scale-green-6), #fff 65%);--brand-control-checkbox-border-unchecked-disabled:var(--base-color-scale-gray-1);--brand-control-radio-bg-default:var(--base-color-scale-white-0);--brand-control-radio-bg-hover:var(--brand-color-canvas-subtle);--brand-control-radio-bg-checked:var(--base-color-scale-white-0);--brand-control-radio-bg-checked-hover:var(--brand-color-canvas-subtle);--brand-control-radio-bg-disabled:var(--brand-color-canvas-default);--brand-control-radio-border-default:var(--brand-control-color-border-default);--brand-control-radio-border-hover:var(--base-color-scale-gray-4);--brand-control-radio-border-checked:var(--brand-control-color-border-default);--brand-control-radio-border-checked-hover:var(--brand-control-color-border-default);--brand-control-radio-border-disabled:var(--base-color-scale-gray-4);--brand-control-radio-dot-default:var(--base-color-scale-black-0);--brand-control-radio-dot-checked:var(--base-color-scale-green-6);--brand-control-radio-dot-checked-hover:color-mix(in srgb, var(--brand-color-text-emphasized), #000 26%)}[data-color-mode=dark]{--brand-control-color-border-default:var(--base-color-scale-gray-4);--brand-control-color-border-disabled:var(--base-color-scale-gray-5);--brand-control-color-canvas-disabled:var(--base-color-scale-gray-8);--brand-control-color-fg-default:var(--brand-color-text-default);--brand-control-color-fg-disabled:var(--base-color-scale-gray-5);--brand-control-color-focus:var(--base-color-scale-blue-2);--brand-control-checkbox-bg-default:var(--base-color-scale-gray-7);--brand-control-checkbox-bg-hover:var(--brand-color-canvas-subtle);--brand-control-checkbox-bg-checked:var(--base-color-scale-green-5);--brand-control-checkbox-bg-checked-hover:#309a4d;--brand-control-checkbox-bg-indeterminate:var(--base-color-scale-green-5);--brand-control-checkbox-bg-indeterminate-hover:#309a4d;--brand-control-checkbox-bg-checked-disabled:color-mix(in srgb, var(--base-color-scale-green-6), #000 35%);--brand-control-checkbox-fg-checked:var(--base-color-scale-white-0);--brand-control-checkbox-fg-checked-disabled:color-mix(in srgb, var(--base-color-scale-green-5), #000 20%);--brand-control-checkbox-border-default:var(--base-color-scale-gray-4);--brand-control-checkbox-border-hover:var(--base-color-scale-gray-5);--brand-control-checkbox-border-checked:#077726;--brand-control-checkbox-border-checked-hover:#0000001f;--brand-control-checkbox-border-indeterminate:#077726;--brand-control-checkbox-border-indeterminate-hover:#0000001f;--brand-control-checkbox-border-checked-disabled:color-mix(in srgb, var(--base-color-scale-green-6), #000 35%);--brand-control-checkbox-border-unchecked-disabled:var(--base-color-scale-gray-5);--brand-control-radio-bg-default:var(--base-color-scale-black-0);--brand-control-radio-bg-hover:var(--brand-color-canvas-subtle);--brand-control-radio-bg-checked:var(--base-color-scale-black-0);--brand-control-radio-bg-checked-hover:var(--brand-color-canvas-subtle);--brand-control-radio-bg-disabled:var(--brand-color-canvas-default);--brand-control-radio-border-default:var(--base-color-scale-gray-4);--brand-control-radio-border-hover:var(--base-color-scale-gray-5);--brand-control-radio-border-checked:var(--base-color-scale-gray-4);--brand-control-radio-border-checked-hover:var(--base-color-scale-gray-4);--brand-control-radio-border-disabled:var(--base-color-scale-gray-5);--brand-control-radio-dot-default:var(--base-color-scale-white-0);--brand-control-radio-dot-checked:var(--base-color-scale-green-5);--brand-control-radio-dot-checked-hover:#309a4d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--brand-RiverBreakout-variant-gridline-spacing-contentGap:var(--base-size-16);--brand-RiverBreakout-variant-gridline-spacing-outerInline:var(--base-size-20);--brand-RiverBreakout-variant-gridline-spacing-outerBlockEnd:var(--base-size-40);--brand-RiverBreakout-variant-gridline-spacing-outerBlock:var(--base-size-36);--brand-RiverBreakout-spacing-inner:var(--base-size-40);--brand-RiverAccordion-variant-gridline-spacing-contentGap:var(--base-size-32);--brand-RiverAccordion-variant-gridline-spacing-outerInline:var(--base-size-20);--brand-RiverAccordion-variant-gridline-spacing-outerBlock:var(--base-size-40);--brand-River-variant-gridline-spacing-outerInline:var(--base-size-20);--brand-River-variant-gridline-spacing-outerBlock:var(--base-size-40);--brand-River-variant-gridline-visual-padding:var(--base-size-32);--brand-River-spacing-outerBlock:var(--base-size-36);--brand-River-spacing-innerY:var(--base-size-24);--brand-River-spacing-inner:var(--base-size-40)}@media (width>=768px){:root{--brand-RiverBreakout-variant-gridline-spacing-contentGap:var(--base-size-20);--brand-RiverBreakout-variant-gridline-spacing-outerInline:var(--base-size-36);--brand-RiverBreakout-variant-gridline-spacing-outerBlockEnd:var(--base-size-48);--brand-RiverBreakout-variant-gridline-spacing-outerBlock:var(--base-size-40);--brand-RiverBreakout-spacing-inner:var(--base-size-48);--brand-RiverAccordion-variant-gridline-spacing-outerInline:var(--base-size-36);--brand-RiverAccordion-variant-gridline-spacing-outerBlock:var(--base-size-36);--brand-River-spacing-innerY:var(--base-size-24)}}@media (width>=1012px){:root{--brand-River-variant-gridline-visual-padding:var(--base-size-64)}}@media (width>=1280px){:root{--brand-RiverBreakout-variant-gridline-spacing-contentGap:var(--base-size-24);--brand-RiverBreakout-variant-gridline-spacing-outerInline:var(--base-size-64);--brand-RiverBreakout-variant-gridline-spacing-outerBlockEnd:var(--base-size-80);--brand-RiverBreakout-variant-gridline-spacing-outerBlock:var(--base-size-64);--brand-RiverBreakout-spacing-inner:var(--base-size-64);--brand-RiverAccordion-variant-gridline-spacing-contentGap:var(--base-size-64);--brand-RiverAccordion-variant-gridline-spacing-outerInline:var(--base-size-64);--brand-RiverAccordion-variant-gridline-spacing-outerBlock:var(--base-size-64);--brand-River-variant-gridline-spacing-outerInline:var(--base-size-64);--brand-River-variant-gridline-spacing-outerBlock:var(--base-size-64);--brand-River-spacing-outerBlock:var(--base-size-48);--brand-River-spacing-innerY:var(--base-size-32);--brand-River-spacing-inner:var(--base-size-24)}}
|
|
@@ -71,9 +71,11 @@ export type RiverContentProps = BaseProps<HTMLDivElement> & {
|
|
|
71
71
|
children: React.ReactElement<TextProps> | React.ReactElement<HeadingProps | TextProps | LinkProps>[];
|
|
72
72
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
73
73
|
export declare const RiverContent: React.ForwardRefExoticComponent<Omit<RiverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
-
export declare const
|
|
75
|
-
export type
|
|
76
|
-
export
|
|
74
|
+
export declare const RiverVisualPositionOptions: readonly ["default", "center", "block-end", "block-end-inline-start", "block-end-inline-end"];
|
|
75
|
+
export type RiverVisualPosition = (typeof RiverVisualPositionOptions)[number];
|
|
76
|
+
export declare const RiverVisualPaddingOptions: readonly ["default", "none", "all"];
|
|
77
|
+
export type RiverVisualPadding = (typeof RiverVisualPaddingOptions)[number];
|
|
78
|
+
export type RiverVisualBaseProps = BaseProps<HTMLDivElement> & React.HtmlHTMLAttributes<HTMLDivElement> & PropsWithChildren<{
|
|
77
79
|
/**
|
|
78
80
|
* Applies automatic size constraints to child images and video.
|
|
79
81
|
* This can be disabled by setting this prop to `false`.
|
|
@@ -89,17 +91,23 @@ export type RiverVisualProps = BaseProps<HTMLDivElement> & React.HtmlHTMLAttribu
|
|
|
89
91
|
* Can optionally be disabled.
|
|
90
92
|
*/
|
|
91
93
|
rounded?: boolean;
|
|
94
|
+
}>;
|
|
95
|
+
export type RiverVisualProps = RiverVisualBaseProps & {
|
|
92
96
|
/**
|
|
93
|
-
*
|
|
97
|
+
* Positions media within the visual region in the gridline variant.
|
|
94
98
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
position?: RiverVisualPosition;
|
|
100
|
+
/**
|
|
101
|
+
* Controls media padding within the visual region in the gridline variant.
|
|
102
|
+
*/
|
|
103
|
+
padding?: RiverVisualPadding;
|
|
104
|
+
};
|
|
105
|
+
export declare const RiverVisualBase: React.ForwardRefExoticComponent<Omit<RiverVisualBaseProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
98
106
|
/**
|
|
99
107
|
* Alternating text and image pairs.
|
|
100
108
|
*/
|
|
101
109
|
export declare const River: React.ForwardRefExoticComponent<Omit<RiverProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
102
|
-
Visual: React.ForwardRefExoticComponent<Omit<
|
|
110
|
+
Visual: React.ForwardRefExoticComponent<Omit<RiverVisualProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
103
111
|
Content: React.ForwardRefExoticComponent<Omit<RiverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
104
112
|
};
|
|
105
113
|
//# sourceMappingURL=River.d.ts.map
|