@primer/react-brand 0.79.1-rc.ed00156c → 0.80.0-rc.e1dc6447
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/LogoSuite/react.md +215 -13
- package/docs/components/Spinner/index.md +56 -0
- package/docs/components/index.md +1 -0
- package/docs/forms/FormControl/index.md +5 -0
- package/docs/forms/ToggleSwitch/index.md +129 -0
- package/docs/forms/index.md +1 -0
- package/docs/index.md +4 -2
- package/esm/IconButton/IconButton.d.ts.map +1 -1
- package/esm/IconButton/IconButton.js +44 -42
- package/esm/IconButton/IconButton.js.map +1 -1
- package/esm/IconButton/{IconButton.module-tmxv8TCl.css → IconButton.module-D2UJBm7x.css} +1 -1
- package/esm/IconButton/IconButton.module.js +4 -5
- package/esm/IconButton/IconButton.module.js.map +1 -1
- package/esm/LogoSuite/LogoSuite.d.ts +5 -1
- package/esm/LogoSuite/LogoSuite.d.ts.map +1 -1
- package/esm/LogoSuite/LogoSuite.js +36 -33
- package/esm/LogoSuite/LogoSuite.js.map +1 -1
- package/esm/LogoSuite/LogoSuite.module-BUJyNoZs.css +1 -0
- package/esm/LogoSuite/LogoSuite.module.js +3 -1
- package/esm/LogoSuite/LogoSuite.module.js.map +1 -1
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.d.ts.map +1 -1
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js +33 -42
- package/esm/MinimalVideoPlayer/MinimalVideoPlayer.js.map +1 -1
- package/esm/PlayIcon.d.ts +3 -0
- package/esm/PlayIcon.d.ts.map +1 -0
- package/esm/PlayIcon.js +22 -0
- package/esm/PlayIcon.js.map +1 -0
- package/esm/Spinner/Spinner.d.ts +11 -0
- package/esm/Spinner/Spinner.d.ts.map +1 -0
- package/esm/Spinner/Spinner.js +48 -0
- package/esm/Spinner/Spinner.js.map +1 -0
- package/esm/Spinner/Spinner.module-BjDTZLR7.css +1 -0
- package/esm/Spinner/Spinner.module.js +13 -0
- package/esm/Spinner/Spinner.module.js.map +1 -0
- package/esm/Spinner/index.d.ts +3 -0
- package/esm/Spinner/index.d.ts.map +1 -0
- package/esm/forms/Checkbox/Checkbox.js +1 -1
- package/esm/forms/FormControl/FormControl.d.ts.map +1 -1
- package/esm/forms/FormControl/FormControl.js +125 -105
- package/esm/forms/FormControl/FormControl.js.map +1 -1
- package/esm/forms/FormControl/FormControl.module-NDvIk_Aq.css +1 -0
- package/esm/forms/FormControl/FormControl.module.js +7 -4
- package/esm/forms/FormControl/FormControl.module.js.map +1 -1
- package/esm/forms/Radio/Radio.js +1 -1
- package/esm/forms/Select/Select.js +1 -1
- package/esm/forms/TextInput/TextInput.js +1 -1
- package/esm/forms/Textarea/Textarea.js +1 -1
- package/esm/forms/ToggleSwitch/ToggleSwitch.d.ts +34 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.d.ts.map +1 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.js +81 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.js.map +1 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.module-C_gXnHNW.css +1 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.module.js +18 -0
- package/esm/forms/ToggleSwitch/ToggleSwitch.module.js.map +1 -0
- package/esm/forms/ToggleSwitch/index.d.ts +3 -0
- package/esm/forms/ToggleSwitch/index.d.ts.map +1 -0
- package/esm/forms/index.d.ts +1 -0
- package/esm/forms/index.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.esm.js +72 -70
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-ChBPnVuN.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-_lTjJKpQ.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/base-BUCpHNCY.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes-izIk82NS.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/toggle-switch/base-CWVI8qLT.css +1 -0
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors-with-modes-Ctf2MPJ3.css +1 -0
- package/lib/LogoSuite/LogoSuite.d.ts +5 -1
- package/lib/PlayIcon.d.ts +2 -0
- package/lib/Spinner/Spinner.d.ts +10 -0
- package/lib/Spinner/index.d.ts +2 -0
- package/lib/css/main.css +489 -122
- 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/base.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 +3 -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/feature-comparison-table/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/feature-comparison-table/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon-button/base.css +3 -3
- package/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/icon-button/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/spinner/base.css +12 -0
- package/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes.css +13 -0
- package/lib/design-tokens/css/tokens/functional/components/spinner/colors.css +8 -0
- 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/base.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
- package/lib/design-tokens/css/tokens/functional/components/tiles/base.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/toggle-switch/base.css +30 -0
- package/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors-with-modes.css +29 -0
- package/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors.css +16 -0
- 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/button/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/feature-comparison-table/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/icon-button/base.js +2 -2
- package/lib/design-tokens/js/module/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/spinner/base.js +20 -0
- package/lib/design-tokens/js/module/tokens/functional/components/spinner/colors.js +15 -0
- package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/module/tokens/functional/components/tiles/base.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/toggle-switch/base.js +56 -0
- package/lib/design-tokens/js/module/tokens/functional/components/toggle-switch/colors.js +63 -0
- 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/button/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/feature-comparison-table/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/icon-button/base.js +3 -3
- package/lib/design-tokens/js/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/spinner/base.js +10 -0
- package/lib/design-tokens/js/tokens/functional/components/spinner/colors.js +6 -0
- package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tiles/base.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/toggle-switch/base.js +28 -0
- package/lib/design-tokens/js/tokens/functional/components/toggle-switch/colors.js +14 -0
- package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
- package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
- package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
- package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
- package/lib/design-tokens/json/colors.json +11 -0
- package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
- package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/button/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/feature-comparison-table/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/icon-button/base.scss +3 -3
- package/lib/design-tokens/scss/tokens/functional/components/icon-button/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/spinner/base.scss +9 -0
- package/lib/design-tokens/scss/tokens/functional/components/spinner/colors.scss +5 -0
- package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
- package/lib/design-tokens/scss/tokens/functional/components/tiles/base.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/toggle-switch/base.scss +27 -0
- package/lib/design-tokens/scss/tokens/functional/components/toggle-switch/colors.scss +13 -0
- 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/button/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/button/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/feature-comparison-table/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/feature-comparison-table/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.d.ts +2 -2
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.js +2 -2
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/spinner/base.d.ts +23 -0
- package/lib/design-tokens/ts/tokens/functional/components/spinner/base.js +20 -0
- package/lib/design-tokens/ts/tokens/functional/components/spinner/colors.d.ts +15 -0
- package/lib/design-tokens/ts/tokens/functional/components/spinner/colors.js +12 -0
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tiles/base.d.ts +1 -1
- package/lib/design-tokens/ts/tokens/functional/components/tiles/base.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/toggle-switch/base.d.ts +59 -0
- package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/base.js +56 -0
- package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/colors.d.ts +39 -0
- package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/colors.js +36 -0
- 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/ToggleSwitch/ToggleSwitch.d.ts +33 -0
- package/lib/forms/ToggleSwitch/index.d.ts +2 -0
- package/lib/forms/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/llms.txt +4 -2
- package/package.json +1 -1
- package/esm/LogoSuite/LogoSuite.module-BCbX-lfy.css +0 -1
- package/esm/forms/FormControl/FormControl.module-CSNT689n.css +0 -1
- package/esm/node_modules/@primer/octicons-react/dist/icons/PlayIcon.js +0 -20
- package/esm/node_modules/@primer/octicons-react/dist/icons/PlayIcon.js.map +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css +0 -1
- package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-DLPw97mz.css +0 -1
|
@@ -81,6 +81,184 @@ import {LogoSuite} from '@primer/react-brand'
|
|
|
81
81
|
</LogoSuite>
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
### Linked logos
|
|
85
|
+
|
|
86
|
+
Wrap every logo in a native `<a>` element to add links and preserve its original colors. Do not mix linked and unlinked logos or use custom link components.
|
|
87
|
+
|
|
88
|
+
```jsx
|
|
89
|
+
<LogoSuite>
|
|
90
|
+
<LogoSuite.Heading visuallyHidden>Featured logos</LogoSuite.Heading>
|
|
91
|
+
<LogoSuite.Logobar>
|
|
92
|
+
<a href="/microsoft" aria-label="Microsoft">
|
|
93
|
+
<svg role="img" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" focusable="false">
|
|
94
|
+
<title>Microsoft</title>
|
|
95
|
+
<path fill="#F1511B" d="M121.666 121.666H0V0h121.666z" />
|
|
96
|
+
<path fill="#80CC28" d="M256 121.666H134.335V0H256z" />
|
|
97
|
+
<path fill="#00ADEF" d="M121.663 256.002H0V134.336h121.663z" />
|
|
98
|
+
<path fill="#FBBC09" d="M256 256.002H134.335V134.336H256z" />
|
|
99
|
+
</svg>
|
|
100
|
+
</a>
|
|
101
|
+
<a href="/azure" aria-label="Azure">
|
|
102
|
+
<svg role="img" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg" focusable="false">
|
|
103
|
+
<title>Azure</title>
|
|
104
|
+
<defs>
|
|
105
|
+
<linearGradient
|
|
106
|
+
id="azureGradientA"
|
|
107
|
+
x1="-1032.17"
|
|
108
|
+
x2="-1059.21"
|
|
109
|
+
y1="145.31"
|
|
110
|
+
y2="65.43"
|
|
111
|
+
gradientTransform="matrix(1 0 0 -1 1075 158)"
|
|
112
|
+
gradientUnits="userSpaceOnUse"
|
|
113
|
+
>
|
|
114
|
+
<stop offset="0" stopColor="#114a8b" />
|
|
115
|
+
<stop offset="1" stopColor="#0669bc" />
|
|
116
|
+
</linearGradient>
|
|
117
|
+
<linearGradient
|
|
118
|
+
id="azureGradientB"
|
|
119
|
+
x1="-1023.73"
|
|
120
|
+
x2="-1029.98"
|
|
121
|
+
y1="108.08"
|
|
122
|
+
y2="105.97"
|
|
123
|
+
gradientTransform="matrix(1 0 0 -1 1075 158)"
|
|
124
|
+
gradientUnits="userSpaceOnUse"
|
|
125
|
+
>
|
|
126
|
+
<stop offset="0" stopOpacity=".3" />
|
|
127
|
+
<stop offset=".07" stopOpacity=".2" />
|
|
128
|
+
<stop offset=".32" stopOpacity=".1" />
|
|
129
|
+
<stop offset=".62" stopOpacity=".05" />
|
|
130
|
+
<stop offset="1" stopOpacity="0" />
|
|
131
|
+
</linearGradient>
|
|
132
|
+
<linearGradient
|
|
133
|
+
id="azureGradientC"
|
|
134
|
+
x1="-1027.16"
|
|
135
|
+
x2="-997.48"
|
|
136
|
+
y1="147.64"
|
|
137
|
+
y2="68.56"
|
|
138
|
+
gradientTransform="matrix(1 0 0 -1 1075 158)"
|
|
139
|
+
gradientUnits="userSpaceOnUse"
|
|
140
|
+
>
|
|
141
|
+
<stop offset="0" stopColor="#3ccbf4" />
|
|
142
|
+
<stop offset="1" stopColor="#2892df" />
|
|
143
|
+
</linearGradient>
|
|
144
|
+
</defs>
|
|
145
|
+
<path
|
|
146
|
+
fill="url(#azureGradientA)"
|
|
147
|
+
d="M33.34 6.54h26.04l-27.03 80.1a4.15 4.15 0 0 1-3.94 2.81H8.15a4.14 4.14 0 0 1-3.93-5.47L29.4 9.38a4.15 4.15 0 0 1 3.94-2.83z"
|
|
148
|
+
/>
|
|
149
|
+
<path
|
|
150
|
+
fill="#0078d4"
|
|
151
|
+
d="M71.17 60.26H29.88a1.91 1.91 0 0 0-1.3 3.31l26.53 24.76a4.17 4.17 0 0 0 2.85 1.13h23.38z"
|
|
152
|
+
/>
|
|
153
|
+
<path
|
|
154
|
+
fill="url(#azureGradientB)"
|
|
155
|
+
d="M33.34 6.54a4.12 4.12 0 0 0-3.95 2.88L4.25 83.92a4.14 4.14 0 0 0 3.91 5.54h20.79a4.44 4.44 0 0 0 3.4-2.9l5.02-14.78 17.91 16.7a4.24 4.24 0 0 0 2.67.97h23.29L71.02 60.26H41.24L59.47 6.55z"
|
|
156
|
+
/>
|
|
157
|
+
<path
|
|
158
|
+
fill="url(#azureGradientC)"
|
|
159
|
+
d="M66.6 9.36a4.14 4.14 0 0 0-3.93-2.82H33.65a4.15 4.15 0 0 1 3.93 2.82l25.18 74.62a4.15 4.15 0 0 1-3.93 5.48h29.02a4.15 4.15 0 0 0 3.93-5.48z"
|
|
160
|
+
/>
|
|
161
|
+
</svg>
|
|
162
|
+
</a>
|
|
163
|
+
<a href="/microsoft-copilot" aria-label="Microsoft Copilot">
|
|
164
|
+
<svg role="img" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="2 4 43.998 40" focusable="false">
|
|
165
|
+
<title>Microsoft Copilot</title>
|
|
166
|
+
<defs>
|
|
167
|
+
<radialGradient
|
|
168
|
+
id="copilotGradientA"
|
|
169
|
+
cx="0"
|
|
170
|
+
cy="0"
|
|
171
|
+
r="1"
|
|
172
|
+
gradientTransform="matrix(-10.96051 -13.38922 12.59013 -10.30637 38.005 20.514)"
|
|
173
|
+
gradientUnits="userSpaceOnUse"
|
|
174
|
+
>
|
|
175
|
+
<stop offset=".096" stopColor="#00AEFF" />
|
|
176
|
+
<stop offset=".773" stopColor="#2253CE" />
|
|
177
|
+
<stop offset="1" stopColor="#0736C4" />
|
|
178
|
+
</radialGradient>
|
|
179
|
+
<radialGradient
|
|
180
|
+
id="copilotGradientB"
|
|
181
|
+
cx="0"
|
|
182
|
+
cy="0"
|
|
183
|
+
r="1"
|
|
184
|
+
gradientTransform="rotate(51.84 -28.201 27.85) scale(15.9912 15.5119)"
|
|
185
|
+
gradientUnits="userSpaceOnUse"
|
|
186
|
+
>
|
|
187
|
+
<stop stopColor="#FFB657" />
|
|
188
|
+
<stop offset=".634" stopColor="#FF5F3D" />
|
|
189
|
+
<stop offset=".923" stopColor="#C02B3C" />
|
|
190
|
+
</radialGradient>
|
|
191
|
+
<radialGradient
|
|
192
|
+
id="copilotGradientE"
|
|
193
|
+
cx="0"
|
|
194
|
+
cy="0"
|
|
195
|
+
r="1"
|
|
196
|
+
gradientTransform="rotate(109.274 16.301 20.802) scale(38.3873 45.9867)"
|
|
197
|
+
gradientUnits="userSpaceOnUse"
|
|
198
|
+
>
|
|
199
|
+
<stop offset=".066" stopColor="#8C48FF" />
|
|
200
|
+
<stop offset=".5" stopColor="#F2598A" />
|
|
201
|
+
<stop offset=".896" stopColor="#FFB152" />
|
|
202
|
+
</radialGradient>
|
|
203
|
+
<linearGradient
|
|
204
|
+
id="copilotGradientC"
|
|
205
|
+
x1="12.5"
|
|
206
|
+
x2="14.788"
|
|
207
|
+
y1="7.5"
|
|
208
|
+
y2="33.975"
|
|
209
|
+
gradientUnits="userSpaceOnUse"
|
|
210
|
+
>
|
|
211
|
+
<stop offset=".156" stopColor="#0D91E1" />
|
|
212
|
+
<stop offset=".487" stopColor="#52B471" />
|
|
213
|
+
<stop offset=".652" stopColor="#98BD42" />
|
|
214
|
+
<stop offset=".937" stopColor="#FFC800" />
|
|
215
|
+
</linearGradient>
|
|
216
|
+
<linearGradient id="copilotGradientD" x1="14.5" x2="15.75" y1="4" y2="32.885" gradientUnits="userSpaceOnUse">
|
|
217
|
+
<stop stopColor="#3DCBFF" />
|
|
218
|
+
<stop offset=".247" stopColor="#0588F7" stopOpacity="0" />
|
|
219
|
+
</linearGradient>
|
|
220
|
+
<linearGradient
|
|
221
|
+
id="copilotGradientF"
|
|
222
|
+
x1="42.586"
|
|
223
|
+
x2="42.569"
|
|
224
|
+
y1="13.346"
|
|
225
|
+
y2="21.215"
|
|
226
|
+
gradientUnits="userSpaceOnUse"
|
|
227
|
+
>
|
|
228
|
+
<stop offset=".058" stopColor="#F8ADFA" />
|
|
229
|
+
<stop offset=".708" stopColor="#A86EDD" stopOpacity="0" />
|
|
230
|
+
</linearGradient>
|
|
231
|
+
</defs>
|
|
232
|
+
<path
|
|
233
|
+
fill="url(#copilotGradientA)"
|
|
234
|
+
d="M34.142 7.325A4.63 4.63 0 0 0 29.7 4h-1.35a4.63 4.63 0 0 0-4.554 3.794L21.48 20.407l.575-1.965a4.63 4.63 0 0 1 4.444-3.33h7.853l3.294 1.282 3.175-1.283h-.926a4.63 4.63 0 0 1-4.443-3.325l-1.31-4.461z"
|
|
235
|
+
/>
|
|
236
|
+
<path
|
|
237
|
+
fill="url(#copilotGradientB)"
|
|
238
|
+
d="M14.33 40.656A4.63 4.63 0 0 0 18.779 44h2.87a4.63 4.63 0 0 0 4.629-4.51l.312-12.163-.654 2.233a4.63 4.63 0 0 1-4.443 3.329h-7.919l-2.823-1.532-3.057 1.532h.912a4.63 4.63 0 0 1 4.447 3.344l1.279 4.423z"
|
|
239
|
+
/>
|
|
240
|
+
<path
|
|
241
|
+
fill="url(#copilotGradientC)"
|
|
242
|
+
d="M29.5 4H13.46c-4.583 0-7.332 6.057-9.165 12.113C2.123 23.29-.72 32.885 7.503 32.885h6.925a4.63 4.63 0 0 0 4.456-3.358 2078.617 2078.617 0 0 1 4.971-17.156c.843-2.843 1.544-5.284 2.621-6.805C27.08 4.714 28.086 4 29.5 4z"
|
|
243
|
+
/>
|
|
244
|
+
<path
|
|
245
|
+
fill="url(#copilotGradientD)"
|
|
246
|
+
d="M29.5 4H13.46c-4.583 0-7.332 6.057-9.165 12.113C2.123 23.29-.72 32.885 7.503 32.885h6.925a4.63 4.63 0 0 0 4.456-3.358 2078.617 2078.617 0 0 1 4.971-17.156c.843-2.843 1.544-5.284 2.621-6.805C27.08 4.714 28.086 4 29.5 4z"
|
|
247
|
+
/>
|
|
248
|
+
<path
|
|
249
|
+
fill="url(#copilotGradientE)"
|
|
250
|
+
d="M18.498 44h16.04c4.582 0 7.332-6.058 9.165-12.115 2.171-7.177 5.013-16.775-3.208-16.775h-6.926a4.63 4.63 0 0 0-4.455 3.358 2084.036 2084.036 0 0 1-4.972 17.16c-.842 2.843-1.544 5.285-2.62 6.806-.604.852-1.61 1.566-3.024 1.566z"
|
|
251
|
+
/>
|
|
252
|
+
<path
|
|
253
|
+
fill="url(#copilotGradientF)"
|
|
254
|
+
d="M18.498 44h16.04c4.582 0 7.332-6.058 9.165-12.115 2.171-7.177 5.013-16.775-3.208-16.775h-6.926a4.63 4.63 0 0 0-4.455 3.358 2084.036 2084.036 0 0 1-4.972 17.16c-.842 2.843-1.544 5.285-2.62 6.806-.604.852-1.61 1.566-3.024 1.566z"
|
|
255
|
+
/>
|
|
256
|
+
</svg>
|
|
257
|
+
</a>
|
|
258
|
+
</LogoSuite.Logobar>
|
|
259
|
+
</LogoSuite>
|
|
260
|
+
```
|
|
261
|
+
|
|
84
262
|
### Optional heading and description
|
|
85
263
|
|
|
86
264
|
```jsx
|
|
@@ -445,6 +623,30 @@ Logobars using the `emphasis` variant will appear with relatively higher contras
|
|
|
445
623
|
</Stack>
|
|
446
624
|
```
|
|
447
625
|
|
|
626
|
+
### Gridline variant
|
|
627
|
+
|
|
628
|
+
The `gridline` variant displays the heading and description above the logos in a single-column layout.
|
|
629
|
+
|
|
630
|
+
```jsx
|
|
631
|
+
<LogoSuite variant="gridline">
|
|
632
|
+
<LogoSuite.Heading>Trusted by the world's leading organizations</LogoSuite.Heading>
|
|
633
|
+
<LogoSuite.Logobar marquee>
|
|
634
|
+
<svg role="img" viewBox="0 0 300 100">
|
|
635
|
+
<title>Placeholder logo</title>
|
|
636
|
+
<rect width="100%" height="100%" />
|
|
637
|
+
</svg>
|
|
638
|
+
<svg role="img" viewBox="0 0 300 100">
|
|
639
|
+
<title>Placeholder logo</title>
|
|
640
|
+
<rect width="100%" height="100%" />
|
|
641
|
+
</svg>
|
|
642
|
+
<svg role="img" viewBox="0 0 300 100">
|
|
643
|
+
<title>Placeholder logo</title>
|
|
644
|
+
<rect width="100%" height="100%" />
|
|
645
|
+
</svg>
|
|
646
|
+
</LogoSuite.Logobar>
|
|
647
|
+
</LogoSuite>
|
|
648
|
+
```
|
|
649
|
+
|
|
448
650
|
### Gridline expressive variant
|
|
449
651
|
|
|
450
652
|
The `gridline-expressive` variant displays the logo suite in a side-by-side layout with heading/description on the left and logos on the right, separated by a vertical border.
|
|
@@ -637,11 +839,11 @@ The `takeoverButton` prop on `LogoSuite.Logobar` adds an interactive hover effec
|
|
|
637
839
|
|
|
638
840
|
### LogoSuite
|
|
639
841
|
|
|
640
|
-
| Name | Type
|
|
641
|
-
| :----------- |
|
|
642
|
-
| `align` | `'start' \| 'center' \| 'justify'`
|
|
643
|
-
| `hasDivider` | `boolean`
|
|
644
|
-
| `variant` | `'default' \| 'gridline-expressive'` | `'default'` | The presentational variant of the LogoSuite. |
|
|
842
|
+
| Name | Type | Default | Description |
|
|
843
|
+
| :----------- | :------------------------------------------------- | :---------- | :---------------------------------------------------------- |
|
|
844
|
+
| `align` | `'start' \| 'center' \| 'justify'` | `'center'` | The horizontal alignment of the LogoSuite. |
|
|
845
|
+
| `hasDivider` | `boolean` | `true` | Whether to render a divider immediately after the LogoSuite |
|
|
846
|
+
| `variant` | `'default' \| 'gridline' \| 'gridline-expressive'` | `'default'` | The presentational variant of the LogoSuite. |
|
|
645
847
|
|
|
646
848
|
### LogoSuite.Heading `Required`
|
|
647
849
|
|
|
@@ -657,11 +859,11 @@ Forwards all props from the [Text component](../../typography/Text/index.md), in
|
|
|
657
859
|
|
|
658
860
|
### LogoSuite.Logobar
|
|
659
861
|
|
|
660
|
-
| Name | Type | Default | Description
|
|
661
|
-
| :--------------- | :-------------------------------------- | :---------- |
|
|
662
|
-
| `children` | | `undefined` |
|
|
663
|
-
| `marquee` | `boolean` | `false` | Enables an optional marquee effect.
|
|
664
|
-
| `marqueeSpeed` | `'slow' \| 'normal'` | `'normal'` | The speed of the marquee effect.
|
|
665
|
-
| `gap` | `'default' \| 'condensed'` | `'default'` | The gap between logos.
|
|
666
|
-
| `variant` | `'muted' \| 'emphasis'` | `undefined` | The stylistic variant of the LogoBar.
|
|
667
|
-
| `takeoverButton` | `` `{label: string \| href: string}` `` | `undefined` | Displays a takeover button on hover/focus. Cannot be used with `marquee`. Requires a `label`.
|
|
862
|
+
| Name | Type | Default | Description |
|
|
863
|
+
| :--------------- | :-------------------------------------- | :---------- | :---------------------------------------------------------------------------------------------------------------- |
|
|
864
|
+
| `children` | | `undefined` | SVG/Image elements, either all unlinked or all wrapped in native anchors. Custom link components are unsupported. |
|
|
865
|
+
| `marquee` | `boolean` | `false` | Enables an optional marquee effect. |
|
|
866
|
+
| `marqueeSpeed` | `'slow' \| 'normal'` | `'normal'` | The speed of the marquee effect. |
|
|
867
|
+
| `gap` | `'default' \| 'condensed'` | `'default'` | The gap between logos. |
|
|
868
|
+
| `variant` | `'muted' \| 'emphasis'` | `undefined` | The stylistic variant of the LogoBar. |
|
|
869
|
+
| `takeoverButton` | `` `{label: string \| href: string}` `` | `undefined` | Displays a takeover button on hover/focus. Cannot be used with `marquee`. Requires a `label`. |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Spinner
|
|
3
|
+
description: Use a spinner to indicate that content or an action is loading.
|
|
4
|
+
source: https://github.com/primer/brand/blob/main/packages/react/src/Spinner/Spinner.tsx
|
|
5
|
+
keywords: ['loading', 'progress', 'status', 'spinner']
|
|
6
|
+
storybook: '/brand/storybook/?path=/story/components-spinner--playground'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import {Spinner} from '@primer/react-brand'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
### Default
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
<Spinner />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Sizes
|
|
22
|
+
|
|
23
|
+
Use a named size or a number of CSS pixels for a custom size.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<Stack direction="horizontal" alignItems="center" gap="spacious">
|
|
27
|
+
<Spinner size="small" />
|
|
28
|
+
<Spinner size="medium" />
|
|
29
|
+
<Spinner size="large" />
|
|
30
|
+
<Spinner size={32} />
|
|
31
|
+
</Stack>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Custom accessible label
|
|
35
|
+
|
|
36
|
+
Use a concise label that describes the pending operation. Set `accessibleLabel` to `null` only when a parent component already communicates the loading state to assistive technologies.
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
<Spinner accessibleLabel="Loading notification settings" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Accessibility
|
|
43
|
+
|
|
44
|
+
`Spinner` is non-interactive, and its SVG is hidden from assistive technologies. Use `accessibleLabel` to provide equivalent visually hidden loading text.
|
|
45
|
+
|
|
46
|
+
Do not rely on Spinner alone to communicate loading. It should be used as part of a broader loading state UI, which announces progress through a persistent `role="status"` or `aria-live` region.
|
|
47
|
+
|
|
48
|
+
When available, prefer a component's built-in loading behavior. Components such as [ToggleSwitch](../../forms/ToggleSwitch/index.md) and [IconButton](../IconButton/index.md) already provide the appropriate semantics and announcements.
|
|
49
|
+
|
|
50
|
+
## Component Props
|
|
51
|
+
|
|
52
|
+
| Name | Type | Default | Description |
|
|
53
|
+
| ----------------- | ------------------------------------------ | ----------- | -------------------------------------------------------------------------------- |
|
|
54
|
+
| `size` | `'small' \| 'medium' \| 'large' \| number` | `'medium'` | Named size or custom dimensions in CSS pixels. |
|
|
55
|
+
| `accessibleLabel` | `string \| null` | `'Loading'` | Visually hidden loading text. Use `null` when loading is communicated elsewhere. |
|
|
56
|
+
| `className` | `string` | | Class applied to the animated SVG. |
|
package/docs/components/index.md
CHANGED
|
@@ -44,6 +44,7 @@ description: Primer Brand UI components
|
|
|
44
44
|
- [Section](Section/react.md): Use the section component to group related content together.
|
|
45
45
|
- [Section intro](SectionIntro/react.md): Use the section intro component to provide a title, optional description and link to a new section in the page.
|
|
46
46
|
- [Section intro stacked](SectionIntroStacked/index.md): Use this section intro component to provide a heading, link and itemized content in a stacked layout.
|
|
47
|
+
- [Spinner](Spinner/index.md): Use a spinner to indicate that content or an action is loading.
|
|
47
48
|
- [Statistic](Statistic/index.md): Use the statistic component display concise numerical information
|
|
48
49
|
- [Sub nav](SubNav/index.md): A sub nav is a secondary navigation element, typically positioned beneath a primary navigation.
|
|
49
50
|
- [Subdomain nav bar](SubdomainNavBar/index.md): Use the subdomain nav bar component for top level navigation for subdomain sites.
|
|
@@ -56,6 +56,11 @@ import {FormControl} from '@primer/react-brand'
|
|
|
56
56
|
<FormControl.Label>Textarea</FormControl.Label>
|
|
57
57
|
<Textarea />
|
|
58
58
|
</FormControl>
|
|
59
|
+
{/* ToggleSwitch */}
|
|
60
|
+
<FormControl>
|
|
61
|
+
<FormControl.Label>Enable notifications</FormControl.Label>
|
|
62
|
+
<ToggleSwitch />
|
|
63
|
+
</FormControl>
|
|
59
64
|
</Stack>
|
|
60
65
|
```
|
|
61
66
|
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ToggleSwitch
|
|
3
|
+
description: Use a toggle switch for a boolean setting that takes effect immediately.
|
|
4
|
+
source: https://github.com/primer/brand/blob/main/packages/react/src/forms/ToggleSwitch/ToggleSwitch.tsx
|
|
5
|
+
keywords: ['form', 'control', 'switch', 'toggle', 'setting']
|
|
6
|
+
figma: 'https://www.figma.com/design/hUT1gnfCRTX7iPZSjOg8Vp/?node-id=7985-43209'
|
|
7
|
+
storybook: '/brand/storybook/?path=/story/components-forms-toggleswitch--playground'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import {ToggleSwitch} from '@primer/react-brand'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Examples
|
|
15
|
+
|
|
16
|
+
### Default
|
|
17
|
+
|
|
18
|
+
```jsx
|
|
19
|
+
<FormControl>
|
|
20
|
+
<FormControl.Label>Enable notifications</FormControl.Label>
|
|
21
|
+
<ToggleSwitch />
|
|
22
|
+
</FormControl>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Uncontrolled
|
|
26
|
+
|
|
27
|
+
`defaultChecked` sets the initial value. `onChange` receives the next boolean value, not a native change event.
|
|
28
|
+
|
|
29
|
+
```jsx
|
|
30
|
+
<FormControl>
|
|
31
|
+
<FormControl.Label>Automatically watch repositories</FormControl.Label>
|
|
32
|
+
<ToggleSwitch defaultChecked />
|
|
33
|
+
</FormControl>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Controlled
|
|
37
|
+
|
|
38
|
+
```jsx filename="noinline"
|
|
39
|
+
function Example() {
|
|
40
|
+
const [checked, setChecked] = React.useState(false)
|
|
41
|
+
return (
|
|
42
|
+
<FormControl>
|
|
43
|
+
<FormControl.Label>Automatically watch repositories</FormControl.Label>
|
|
44
|
+
<ToggleSwitch checked={checked} onChange={setChecked} />
|
|
45
|
+
</FormControl>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
render(Example)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Sizes
|
|
53
|
+
|
|
54
|
+
```jsx
|
|
55
|
+
<Stack direction="horizontal">
|
|
56
|
+
<FormControl>
|
|
57
|
+
<FormControl.Label>Small</FormControl.Label>
|
|
58
|
+
<ToggleSwitch size="small" />
|
|
59
|
+
</FormControl>
|
|
60
|
+
<FormControl>
|
|
61
|
+
<FormControl.Label>Medium</FormControl.Label>
|
|
62
|
+
<ToggleSwitch />
|
|
63
|
+
</FormControl>
|
|
64
|
+
</Stack>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Disabled
|
|
68
|
+
|
|
69
|
+
```jsx
|
|
70
|
+
<FormControl>
|
|
71
|
+
<FormControl.Label>Enable notifications</FormControl.Label>
|
|
72
|
+
<ToggleSwitch defaultChecked disabled />
|
|
73
|
+
<FormControl.Hint>Notification settings are managed by your organization.</FormControl.Hint>
|
|
74
|
+
</FormControl>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Without `FormControl`
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
<Stack direction="horizontal" alignItems="center" gap="normal">
|
|
81
|
+
<Text as="span" id="notification-setting-label">
|
|
82
|
+
Enable notifications
|
|
83
|
+
</Text>
|
|
84
|
+
<ToggleSwitch aria-labelledby="notification-setting-label" />
|
|
85
|
+
</Stack>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Visually hidden label with `FormControl`
|
|
89
|
+
|
|
90
|
+
```jsx
|
|
91
|
+
<Stack gap="normal" direction="horizontal">
|
|
92
|
+
<Text as="span" id="visible-notification-label">
|
|
93
|
+
Enable notifications
|
|
94
|
+
</Text>
|
|
95
|
+
<FormControl>
|
|
96
|
+
<FormControl.Label visuallyHidden>Enable notifications</FormControl.Label>
|
|
97
|
+
<ToggleSwitch aria-labelledby="visible-notification-label" />
|
|
98
|
+
</FormControl>
|
|
99
|
+
</Stack>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Component Props
|
|
103
|
+
|
|
104
|
+
| Name | Type | Default | Description |
|
|
105
|
+
| ------------------- | -------------------------------------------- | ----------- | ------------------------------------------------------------------------------------- |
|
|
106
|
+
| `checked` | `boolean` | | Controlled on/off value. |
|
|
107
|
+
| `defaultChecked` | `boolean` | `false` | Initial uncontrolled value. |
|
|
108
|
+
| `onChange` | `(checked: boolean) => void` | | Called once per accepted activation with the next value. |
|
|
109
|
+
| `onClick` | `React.MouseEventHandler<HTMLButtonElement>` | | Activation callback receiving the button event. |
|
|
110
|
+
| `disabled` | `boolean` | `false` | Blocks activation while retaining keyboard focusability. |
|
|
111
|
+
| `loading` | `boolean` | `false` | Displays pending feedback and exposes `aria-busy` without blocking interaction. |
|
|
112
|
+
| `size` | `'small' \| 'medium'` | `'medium'` | Alternative sizes. |
|
|
113
|
+
| `loadingLabel` | `string` | `'Loading'` | Localized loading announcement. |
|
|
114
|
+
| `loadingLabelDelay` | `number` | `2000` | Announcement delay in milliseconds. |
|
|
115
|
+
| `spinnerPosition` | `'start' \| 'end'` | `'end'` | Indicator placement beside the switch when no visible FormControl label is available. |
|
|
116
|
+
| `aria-label` | `string` | | Explicit accessible name matching equivalent visible labeling. |
|
|
117
|
+
| `aria-labelledby` | `string` | | IDs of visible labeling elements. |
|
|
118
|
+
| `aria-describedby` | `string` | | Description IDs, combined with FormControl and loading descriptions. |
|
|
119
|
+
| `aria-invalid` | React ARIA attribute | | Validation state of the switch button. |
|
|
120
|
+
| `ref` | `React.Ref<HTMLButtonElement>` | | Ref for the focusable button. |
|
|
121
|
+
| `className` | `string` | | Class applied to the component wrapper. |
|
|
122
|
+
| `data-testid` | `string` | | Test ID applied to the component wrapper. |
|
|
123
|
+
|
|
124
|
+
Other standard button attributes, including `aria-controls`, `tabIndex`, keyboard handlers, and `style`, apply to the switch button.
|
|
125
|
+
|
|
126
|
+
## Related Components
|
|
127
|
+
|
|
128
|
+
- [FormControl](../FormControl/index.md)
|
|
129
|
+
- [Checkbox](../Checkbox/index.md)
|
package/docs/forms/index.md
CHANGED
|
@@ -12,3 +12,4 @@ title: Forms
|
|
|
12
12
|
- [Select](Select/index.md): Use the select component to enable selection of one option from a list.
|
|
13
13
|
- [Text input](TextInput/index.md): Use the text input component for single-line text field.
|
|
14
14
|
- [Textarea](TextArea/index.md): Use the textarea component for multi-line text input form fields.
|
|
15
|
+
- [ToggleSwitch](ToggleSwitch/index.md): Use a toggle switch for a boolean setting that takes effect immediately.
|
package/docs/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Primer Brand docs (v0.
|
|
1
|
+
# Primer Brand docs (v0.80.0-rc.e1dc6447)
|
|
2
2
|
|
|
3
|
-
These docs are bundled with `@primer/react-brand@0.
|
|
3
|
+
These docs are bundled with `@primer/react-brand@0.80.0-rc.e1dc6447` and match your installed version.
|
|
4
4
|
|
|
5
5
|
New here? Start with [Getting started](getting-started/index.md) for installation, global
|
|
6
6
|
stylesheet and font setup. Component directories are named after their import (e.g.
|
|
@@ -78,6 +78,7 @@ stylesheet and font setup. Component directories are named after their import (e
|
|
|
78
78
|
- [Section](components/Section/react.md): Use the section component to group related content together.
|
|
79
79
|
- [Section intro](components/SectionIntro/react.md): Use the section intro component to provide a title, optional description and link to a new section in the page.
|
|
80
80
|
- [Section intro stacked](components/SectionIntroStacked/index.md): Use this section intro component to provide a heading, link and itemized content in a stacked layout.
|
|
81
|
+
- [Spinner](components/Spinner/index.md): Use a spinner to indicate that content or an action is loading.
|
|
81
82
|
- [Statistic](components/Statistic/index.md): Use the statistic component display concise numerical information
|
|
82
83
|
- [Sub nav](components/SubNav/index.md): A sub nav is a secondary navigation element, typically positioned beneath a primary navigation.
|
|
83
84
|
- [Subdomain nav bar](components/SubdomainNavBar/index.md): Use the subdomain nav bar component for top level navigation for subdomain sites.
|
|
@@ -101,3 +102,4 @@ stylesheet and font setup. Component directories are named after their import (e
|
|
|
101
102
|
- [Select](forms/Select/index.md): Use the select component to enable selection of one option from a list.
|
|
102
103
|
- [Text input](forms/TextInput/index.md): Use the text input component for single-line text field.
|
|
103
104
|
- [Textarea](forms/TextArea/index.md): Use the textarea component for multi-line text input form fields.
|
|
105
|
+
- [ToggleSwitch](forms/ToggleSwitch/index.md): Use a toggle switch for a boolean setting that takes effect immediately.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAUhD,OAAO,EAA0B,KAAK,gBAAgB,EAAC,MAAM,YAAY,CAAA;AACzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAUhD,OAAO,EAA0B,KAAK,gBAAgB,EAAC,MAAM,YAAY,CAAA;AACzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAGnD,OAAO,kGAAkG,CAAA;AACzG,OAAO,+GAA+G,CAAA;AAGtH,eAAO,MAAM,kBAAkB,oEAAsD,CAAA;AACrF,eAAO,MAAM,eAAe,uCAA4B,CAAA;AACxD,eAAO,MAAM,wBAAwB,aAAuB,CAAA;AAC5D,eAAO,MAAM,qBAAqB,UAAoB,CAAA;AAEtD,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AACnE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7D,KAAK,mBAAmB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG;IAClF,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAC1F,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,mBAAmB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAA;AAYpF,KAAK,mBAAmB,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAChE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAC/D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;AAwG9B,eAAO,MAAM,UAAU,EAAiC,mBAAmB,CAAA"}
|
|
@@ -1,68 +1,70 @@
|
|
|
1
1
|
import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import { Button as t, ButtonSizes as n, ButtonVariants as r, defaultButtonSize as i, defaultButtonVariant as a } from "../Button/Button.js";
|
|
3
3
|
import { Tooltip as o, TooltipContext as s } from "../Tooltip/Tooltip.js";
|
|
4
|
-
import
|
|
4
|
+
import { Spinner as c } from "../Spinner/Spinner.js";
|
|
5
|
+
import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes-D7iaptsa.css';import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-_lTjJKpQ.css';/* empty css */
|
|
5
6
|
/* empty css */
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Fragment as
|
|
7
|
+
import l from "./IconButton.module.js";
|
|
8
|
+
import u, { forwardRef as d } from "react";
|
|
9
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
10
|
//#region src/IconButton/IconButton.tsx
|
|
10
|
-
var
|
|
11
|
+
var h = [
|
|
11
12
|
...r,
|
|
12
13
|
"danger",
|
|
13
14
|
"invisible"
|
|
14
|
-
],
|
|
15
|
+
], g = [...n], _ = a, v = i, y = {
|
|
15
16
|
root: "IconButton",
|
|
16
|
-
get
|
|
17
|
-
return `${this.root}-
|
|
17
|
+
get spinner() {
|
|
18
|
+
return `${this.root}-spinner`;
|
|
18
19
|
},
|
|
19
20
|
get loadingAnnouncement() {
|
|
20
21
|
return `${this.root}-loading-announcement`;
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
|
-
function
|
|
24
|
-
let { tooltipId:
|
|
24
|
+
function b({ as: n, icon: r, "aria-label": i, description: a, loading: d = !1, loadingAnnouncement: h = "Loading", rounded: g = !1, tooltipDirection: b = "s", size: x = v, variant: S = _, inactive: C = !1, disabled: w, className: T, onClick: E, "aria-disabled": D, "aria-expanded": O, "aria-haspopup": k, "data-testid": A, ...j }, M) {
|
|
25
|
+
let { tooltipId: N } = u.useContext(s), P = d && !w, F = C && !w && !P, I = !w && !N, L = a || i, R = S === "danger" ? "secondary" : S === "invisible" ? "subtle" : S;
|
|
25
26
|
process.env.NODE_ENV !== "production" && (i.trim() || console.warn("IconButton requires a non-empty `aria-label`."), [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
w,
|
|
28
|
+
d,
|
|
29
|
+
C
|
|
29
30
|
].filter(Boolean).length > 1 && console.warn("IconButton has conflicting props for `disabled`, `loading`, or `inactive` states."));
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
let z = P ? /* @__PURE__ */ p(c, {
|
|
32
|
+
accessibleLabel: null,
|
|
33
|
+
className: l.IconButton__spinner,
|
|
34
|
+
"data-testid": y.spinner
|
|
35
|
+
}) : /* @__PURE__ */ p(r, { className: l.IconButton__icon }), B = /* @__PURE__ */ p(t, {
|
|
36
|
+
...j,
|
|
37
|
+
ref: I ? void 0 : M,
|
|
36
38
|
as: n,
|
|
37
|
-
variant:
|
|
38
|
-
size:
|
|
39
|
-
disabled:
|
|
40
|
-
"aria-disabled":
|
|
41
|
-
"aria-expanded":
|
|
42
|
-
"aria-haspopup":
|
|
43
|
-
"aria-label": !
|
|
44
|
-
className: e(
|
|
45
|
-
"data-testid":
|
|
46
|
-
leadingVisual:
|
|
47
|
-
onClick:
|
|
39
|
+
variant: R,
|
|
40
|
+
size: x,
|
|
41
|
+
disabled: w,
|
|
42
|
+
"aria-disabled": P || F ? !0 : D,
|
|
43
|
+
"aria-expanded": O,
|
|
44
|
+
"aria-haspopup": k,
|
|
45
|
+
"aria-label": !I || a ? i : void 0,
|
|
46
|
+
className: e(l.IconButton, l[`IconButton--${x}`], l[`IconButton--variant-${S}`], F && l["IconButton--inactive"], g && l["IconButton--rounded"], T),
|
|
47
|
+
"data-testid": A || y.root,
|
|
48
|
+
leadingVisual: z,
|
|
49
|
+
onClick: P ? (e) => {
|
|
48
50
|
e.preventDefault(), e.stopPropagation();
|
|
49
|
-
} :
|
|
51
|
+
} : E
|
|
50
52
|
});
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
ref:
|
|
53
|
-
direction:
|
|
54
|
-
text:
|
|
53
|
+
return /* @__PURE__ */ m(f, { children: [I ? /* @__PURE__ */ p(o, {
|
|
54
|
+
ref: M,
|
|
55
|
+
direction: b,
|
|
56
|
+
text: L,
|
|
55
57
|
type: a ? "description" : "label",
|
|
56
|
-
children:
|
|
57
|
-
}) :
|
|
58
|
+
children: B
|
|
59
|
+
}) : B, /* @__PURE__ */ p("span", {
|
|
58
60
|
"aria-live": "polite",
|
|
59
|
-
className:
|
|
60
|
-
"data-testid":
|
|
61
|
-
children:
|
|
61
|
+
className: l.IconButton__loadingAnnouncement,
|
|
62
|
+
"data-testid": y.loadingAnnouncement,
|
|
63
|
+
children: P ? h : null
|
|
62
64
|
})] });
|
|
63
65
|
}
|
|
64
|
-
var
|
|
66
|
+
var x = d(b);
|
|
65
67
|
//#endregion
|
|
66
|
-
export {
|
|
68
|
+
export { x as IconButton, g as IconButtonSizes, h as IconButtonVariants, v as defaultIconButtonSize, _ as defaultIconButtonVariant };
|
|
67
69
|
|
|
68
70
|
//# sourceMappingURL=IconButton.js.map
|