@primer/react-brand 0.79.1-rc.5d6b749b → 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.
Files changed (505) hide show
  1. package/docs/components/Spinner/index.md +56 -0
  2. package/docs/components/index.md +1 -0
  3. package/docs/forms/FormControl/index.md +5 -0
  4. package/docs/forms/ToggleSwitch/index.md +129 -0
  5. package/docs/forms/index.md +1 -0
  6. package/docs/index.md +4 -2
  7. package/esm/IconButton/IconButton.d.ts.map +1 -1
  8. package/esm/IconButton/IconButton.js +44 -42
  9. package/esm/IconButton/IconButton.js.map +1 -1
  10. package/esm/IconButton/{IconButton.module-tmxv8TCl.css → IconButton.module-D2UJBm7x.css} +1 -1
  11. package/esm/IconButton/IconButton.module.js +4 -5
  12. package/esm/IconButton/IconButton.module.js.map +1 -1
  13. package/esm/Spinner/Spinner.d.ts +11 -0
  14. package/esm/Spinner/Spinner.d.ts.map +1 -0
  15. package/esm/Spinner/Spinner.js +48 -0
  16. package/esm/Spinner/Spinner.js.map +1 -0
  17. package/esm/Spinner/Spinner.module-BjDTZLR7.css +1 -0
  18. package/esm/Spinner/Spinner.module.js +13 -0
  19. package/esm/Spinner/Spinner.module.js.map +1 -0
  20. package/esm/Spinner/index.d.ts +3 -0
  21. package/esm/Spinner/index.d.ts.map +1 -0
  22. package/esm/forms/Checkbox/Checkbox.js +1 -1
  23. package/esm/forms/FormControl/FormControl.d.ts.map +1 -1
  24. package/esm/forms/FormControl/FormControl.js +125 -105
  25. package/esm/forms/FormControl/FormControl.js.map +1 -1
  26. package/esm/forms/FormControl/FormControl.module-NDvIk_Aq.css +1 -0
  27. package/esm/forms/FormControl/FormControl.module.js +7 -4
  28. package/esm/forms/FormControl/FormControl.module.js.map +1 -1
  29. package/esm/forms/Radio/Radio.js +1 -1
  30. package/esm/forms/Select/Select.js +1 -1
  31. package/esm/forms/TextInput/TextInput.js +1 -1
  32. package/esm/forms/Textarea/Textarea.js +1 -1
  33. package/esm/forms/ToggleSwitch/ToggleSwitch.d.ts +34 -0
  34. package/esm/forms/ToggleSwitch/ToggleSwitch.d.ts.map +1 -0
  35. package/esm/forms/ToggleSwitch/ToggleSwitch.js +81 -0
  36. package/esm/forms/ToggleSwitch/ToggleSwitch.js.map +1 -0
  37. package/esm/forms/ToggleSwitch/ToggleSwitch.module-C_gXnHNW.css +1 -0
  38. package/esm/forms/ToggleSwitch/ToggleSwitch.module.js +18 -0
  39. package/esm/forms/ToggleSwitch/ToggleSwitch.module.js.map +1 -0
  40. package/esm/forms/ToggleSwitch/index.d.ts +3 -0
  41. package/esm/forms/ToggleSwitch/index.d.ts.map +1 -0
  42. package/esm/forms/index.d.ts +1 -0
  43. package/esm/forms/index.d.ts.map +1 -1
  44. package/esm/index.d.ts +1 -0
  45. package/esm/index.d.ts.map +1 -1
  46. package/esm/index.esm.js +72 -70
  47. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-ChBPnVuN.css +1 -0
  48. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-_lTjJKpQ.css +1 -0
  49. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/base-BUCpHNCY.css +1 -0
  50. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes-izIk82NS.css +1 -0
  51. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/toggle-switch/base-CWVI8qLT.css +1 -0
  52. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors-with-modes-Ctf2MPJ3.css +1 -0
  53. package/lib/Spinner/Spinner.d.ts +10 -0
  54. package/lib/Spinner/index.d.ts +2 -0
  55. package/lib/css/main.css +423 -103
  56. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  57. package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
  58. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  59. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  60. package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
  61. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  62. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  63. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  64. package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
  65. package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
  66. package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
  67. package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
  68. package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
  69. package/lib/design-tokens/css/tokens/functional/components/button/base.css +1 -1
  70. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  71. package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
  72. package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
  73. package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
  74. package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
  75. package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
  76. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +3 -1
  77. package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
  78. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
  79. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
  80. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  81. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  82. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  83. package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
  84. package/lib/design-tokens/css/tokens/functional/components/feature-comparison-table/base.css +1 -1
  85. package/lib/design-tokens/css/tokens/functional/components/feature-comparison-table/colors-with-modes.css +1 -1
  86. package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
  87. package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
  88. package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
  89. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
  90. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
  91. package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
  92. package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
  93. package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
  94. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  95. package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
  96. package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
  97. package/lib/design-tokens/css/tokens/functional/components/icon-button/base.css +3 -3
  98. package/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css +1 -1
  99. package/lib/design-tokens/css/tokens/functional/components/icon-button/colors.css +1 -1
  100. package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
  101. package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
  102. package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
  103. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
  104. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
  105. package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
  106. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  107. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  108. package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
  109. package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
  110. package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
  111. package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
  112. package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
  113. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
  114. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
  115. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
  116. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
  117. package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
  118. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
  119. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
  120. package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
  121. package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
  122. package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
  123. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  124. package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
  125. package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
  126. package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
  127. package/lib/design-tokens/css/tokens/functional/components/spinner/base.css +12 -0
  128. package/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes.css +13 -0
  129. package/lib/design-tokens/css/tokens/functional/components/spinner/colors.css +8 -0
  130. package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
  131. package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
  132. package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
  133. package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
  134. package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
  135. package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
  136. package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
  137. package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
  138. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
  139. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
  140. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css +1 -1
  141. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
  142. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
  143. package/lib/design-tokens/css/tokens/functional/components/tiles/base.css +1 -1
  144. package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
  145. package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
  146. package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
  147. package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
  148. package/lib/design-tokens/css/tokens/functional/components/toggle-switch/base.css +30 -0
  149. package/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors-with-modes.css +29 -0
  150. package/lib/design-tokens/css/tokens/functional/components/toggle-switch/colors.css +16 -0
  151. package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
  152. package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
  153. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
  154. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
  155. package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
  156. package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
  157. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  158. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  159. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  160. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  161. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  162. package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
  163. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  164. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  165. package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
  166. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  167. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  168. package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
  169. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  170. package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
  171. package/lib/design-tokens/js/module/tokens/functional/components/button/base.js +1 -1
  172. package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
  173. package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
  174. package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  175. package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  176. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  177. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  178. package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
  179. package/lib/design-tokens/js/module/tokens/functional/components/feature-comparison-table/base.js +1 -1
  180. package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
  181. package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
  182. package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  183. package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
  184. package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
  185. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  186. package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
  187. package/lib/design-tokens/js/module/tokens/functional/components/icon-button/base.js +2 -2
  188. package/lib/design-tokens/js/module/tokens/functional/components/icon-button/colors.js +1 -1
  189. package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
  190. package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
  191. package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
  192. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
  193. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  194. package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
  195. package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
  196. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
  197. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
  198. package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
  199. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
  200. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  201. package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
  202. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  203. package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
  204. package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
  205. package/lib/design-tokens/js/module/tokens/functional/components/spinner/base.js +20 -0
  206. package/lib/design-tokens/js/module/tokens/functional/components/spinner/colors.js +15 -0
  207. package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
  208. package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
  209. package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
  210. package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
  211. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
  212. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
  213. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +1 -1
  214. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  215. package/lib/design-tokens/js/module/tokens/functional/components/tiles/base.js +1 -1
  216. package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
  217. package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
  218. package/lib/design-tokens/js/module/tokens/functional/components/toggle-switch/base.js +56 -0
  219. package/lib/design-tokens/js/module/tokens/functional/components/toggle-switch/colors.js +63 -0
  220. package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
  221. package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
  222. package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
  223. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  224. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  225. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  226. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  227. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  228. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  229. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  230. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  231. package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
  232. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  233. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  234. package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
  235. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  236. package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
  237. package/lib/design-tokens/js/tokens/functional/components/button/base.js +1 -1
  238. package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
  239. package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
  240. package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  241. package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  242. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  243. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  244. package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
  245. package/lib/design-tokens/js/tokens/functional/components/feature-comparison-table/base.js +1 -1
  246. package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
  247. package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
  248. package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  249. package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
  250. package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
  251. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  252. package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
  253. package/lib/design-tokens/js/tokens/functional/components/icon-button/base.js +3 -3
  254. package/lib/design-tokens/js/tokens/functional/components/icon-button/colors.js +1 -1
  255. package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
  256. package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
  257. package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
  258. package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
  259. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  260. package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
  261. package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
  262. package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
  263. package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
  264. package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
  265. package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
  266. package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  267. package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
  268. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  269. package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
  270. package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
  271. package/lib/design-tokens/js/tokens/functional/components/spinner/base.js +10 -0
  272. package/lib/design-tokens/js/tokens/functional/components/spinner/colors.js +6 -0
  273. package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
  274. package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
  275. package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
  276. package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
  277. package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
  278. package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
  279. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +1 -1
  280. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  281. package/lib/design-tokens/js/tokens/functional/components/tiles/base.js +1 -1
  282. package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
  283. package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
  284. package/lib/design-tokens/js/tokens/functional/components/toggle-switch/base.js +28 -0
  285. package/lib/design-tokens/js/tokens/functional/components/toggle-switch/colors.js +14 -0
  286. package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
  287. package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
  288. package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
  289. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  290. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  291. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  292. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  293. package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
  294. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  295. package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
  296. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  297. package/lib/design-tokens/json/colors.json +11 -0
  298. package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
  299. package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
  300. package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
  301. package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
  302. package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
  303. package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
  304. package/lib/design-tokens/scss/tokens/functional/components/button/base.scss +1 -1
  305. package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
  306. package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
  307. package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
  308. package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
  309. package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
  310. package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
  311. package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
  312. package/lib/design-tokens/scss/tokens/functional/components/feature-comparison-table/base.scss +1 -1
  313. package/lib/design-tokens/scss/tokens/functional/components/footer/base.scss +1 -1
  314. package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
  315. package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
  316. package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
  317. package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
  318. package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
  319. package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
  320. package/lib/design-tokens/scss/tokens/functional/components/icon-button/base.scss +3 -3
  321. package/lib/design-tokens/scss/tokens/functional/components/icon-button/colors.scss +1 -1
  322. package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
  323. package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
  324. package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
  325. package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
  326. package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
  327. package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
  328. package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
  329. package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
  330. package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
  331. package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
  332. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
  333. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
  334. package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
  335. package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
  336. package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
  337. package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
  338. package/lib/design-tokens/scss/tokens/functional/components/spinner/base.scss +9 -0
  339. package/lib/design-tokens/scss/tokens/functional/components/spinner/colors.scss +5 -0
  340. package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
  341. package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
  342. package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
  343. package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
  344. package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
  345. package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
  346. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +1 -1
  347. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
  348. package/lib/design-tokens/scss/tokens/functional/components/tiles/base.scss +1 -1
  349. package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
  350. package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
  351. package/lib/design-tokens/scss/tokens/functional/components/toggle-switch/base.scss +27 -0
  352. package/lib/design-tokens/scss/tokens/functional/components/toggle-switch/colors.scss +13 -0
  353. package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
  354. package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
  355. package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
  356. package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
  357. package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
  358. package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
  359. package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
  360. package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
  361. package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
  362. package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
  363. package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
  364. package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
  365. package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
  366. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  367. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  368. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  369. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  370. package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
  371. package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
  372. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  373. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  374. package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
  375. package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
  376. package/lib/design-tokens/ts/tokens/functional/components/button/base.d.ts +1 -1
  377. package/lib/design-tokens/ts/tokens/functional/components/button/base.js +1 -1
  378. package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
  379. package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
  380. package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
  381. package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
  382. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
  383. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  384. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
  385. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  386. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  387. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  388. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  389. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  390. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
  391. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
  392. package/lib/design-tokens/ts/tokens/functional/components/feature-comparison-table/base.d.ts +1 -1
  393. package/lib/design-tokens/ts/tokens/functional/components/feature-comparison-table/base.js +1 -1
  394. package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
  395. package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
  396. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
  397. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
  398. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
  399. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  400. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
  401. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
  402. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
  403. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
  404. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  405. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  406. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
  407. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
  408. package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.d.ts +2 -2
  409. package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.js +2 -2
  410. package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.d.ts +1 -1
  411. package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.js +1 -1
  412. package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
  413. package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
  414. package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
  415. package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
  416. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
  417. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
  418. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
  419. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
  420. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  421. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  422. package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
  423. package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
  424. package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
  425. package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
  426. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
  427. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
  428. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
  429. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
  430. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
  431. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
  432. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
  433. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
  434. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
  435. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  436. package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
  437. package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
  438. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  439. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  440. package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
  441. package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
  442. package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
  443. package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
  444. package/lib/design-tokens/ts/tokens/functional/components/spinner/base.d.ts +23 -0
  445. package/lib/design-tokens/ts/tokens/functional/components/spinner/base.js +20 -0
  446. package/lib/design-tokens/ts/tokens/functional/components/spinner/colors.d.ts +15 -0
  447. package/lib/design-tokens/ts/tokens/functional/components/spinner/colors.js +12 -0
  448. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
  449. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
  450. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
  451. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
  452. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
  453. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
  454. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
  455. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
  456. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
  457. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
  458. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
  459. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
  460. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +1 -1
  461. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +1 -1
  462. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
  463. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  464. package/lib/design-tokens/ts/tokens/functional/components/tiles/base.d.ts +1 -1
  465. package/lib/design-tokens/ts/tokens/functional/components/tiles/base.js +1 -1
  466. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
  467. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
  468. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
  469. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
  470. package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/base.d.ts +59 -0
  471. package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/base.js +56 -0
  472. package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/colors.d.ts +39 -0
  473. package/lib/design-tokens/ts/tokens/functional/components/toggle-switch/colors.js +36 -0
  474. package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
  475. package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
  476. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
  477. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
  478. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
  479. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
  480. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  481. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  482. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  483. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  484. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  485. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  486. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  487. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  488. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  489. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  490. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  491. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  492. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  493. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  494. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  495. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  496. package/lib/forms/ToggleSwitch/ToggleSwitch.d.ts +33 -0
  497. package/lib/forms/ToggleSwitch/index.d.ts +2 -0
  498. package/lib/forms/index.d.ts +1 -0
  499. package/lib/index.d.ts +1 -0
  500. package/lib/index.js +1 -1
  501. package/llms.txt +4 -2
  502. package/package.json +1 -1
  503. package/esm/forms/FormControl/FormControl.module-CSNT689n.css +0 -1
  504. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css +0 -1
  505. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-DLPw97mz.css +0 -1
@@ -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. |
@@ -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)
@@ -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.79.1-rc.5d6b749b)
1
+ # Primer Brand docs (v0.80.0-rc.e1dc6447)
2
2
 
3
- These docs are bundled with `@primer/react-brand@0.79.1-rc.5d6b749b` and match your installed version.
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;AAEnD,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
+ {"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 '../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-DLPw97mz.css';/* empty css */
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 c from "./IconButton.module.js";
7
- import l, { forwardRef as u } from "react";
8
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
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 m = [
11
+ var h = [
11
12
  ...r,
12
13
  "danger",
13
14
  "invisible"
14
- ], h = [...n], g = a, _ = i, v = {
15
+ ], g = [...n], _ = a, v = i, y = {
15
16
  root: "IconButton",
16
- get loadingIndicator() {
17
- return `${this.root}-loading-indicator`;
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 y({ as: n, icon: r, "aria-label": i, description: a, loading: u = !1, loadingAnnouncement: m = "Loading", rounded: h = !1, tooltipDirection: y = "s", size: b = _, variant: x = g, inactive: S = !1, disabled: C, className: w, onClick: T, "aria-disabled": E, "aria-expanded": D, "aria-haspopup": O, "data-testid": k, ...A }, j) {
24
- let { tooltipId: M } = l.useContext(s), N = u && !C, P = S && !C && !N, F = !C && !M, I = a || i, L = x === "danger" ? "secondary" : x === "invisible" ? "subtle" : x;
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
- C,
27
- u,
28
- S
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 R = N ? /* @__PURE__ */ f("span", {
31
- className: c.IconButton__loadingIndicator,
32
- "data-testid": v.loadingIndicator
33
- }) : /* @__PURE__ */ f(r, { className: c.IconButton__icon }), z = /* @__PURE__ */ f(t, {
34
- ...A,
35
- ref: F ? void 0 : j,
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: L,
38
- size: b,
39
- disabled: C,
40
- "aria-disabled": N || P ? !0 : E,
41
- "aria-expanded": D,
42
- "aria-haspopup": O,
43
- "aria-label": !F || a ? i : void 0,
44
- className: e(c.IconButton, c[`IconButton--${b}`], c[`IconButton--variant-${x}`], P && c["IconButton--inactive"], h && c["IconButton--rounded"], w),
45
- "data-testid": k || v.root,
46
- leadingVisual: R,
47
- onClick: N ? (e) => {
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
- } : T
51
+ } : E
50
52
  });
51
- return /* @__PURE__ */ p(d, { children: [F ? /* @__PURE__ */ f(o, {
52
- ref: j,
53
- direction: y,
54
- text: I,
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: z
57
- }) : z, /* @__PURE__ */ f("span", {
58
+ children: B
59
+ }) : B, /* @__PURE__ */ p("span", {
58
60
  "aria-live": "polite",
59
- className: c.IconButton__loadingAnnouncement,
60
- "data-testid": v.loadingAnnouncement,
61
- children: N ? m : null
61
+ className: l.IconButton__loadingAnnouncement,
62
+ "data-testid": y.loadingAnnouncement,
63
+ children: P ? h : null
62
64
  })] });
63
65
  }
64
- var b = u(y);
66
+ var x = d(b);
65
67
  //#endregion
66
- export { b as IconButton, h as IconButtonSizes, m as IconButtonVariants, _ as defaultIconButtonSize, g as defaultIconButtonVariant };
68
+ export { x as IconButton, g as IconButtonSizes, h as IconButtonVariants, v as defaultIconButtonSize, _ as defaultIconButtonVariant };
67
69
 
68
70
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","names":[],"sources":["../../src/IconButton/IconButton.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {forwardRef, type Ref} from 'react'\nimport type {Icon} from '@primer/octicons-react'\n\nimport {\n Button,\n ButtonSizes,\n ButtonVariants,\n defaultButtonSize,\n defaultButtonVariant,\n type ButtonVariant,\n} from '../Button'\nimport {Tooltip, TooltipContext, type TooltipDirection} from '../Tooltip'\nimport type {BaseProps} from '../component-helpers'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/base.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css'\nimport styles from './IconButton.module.css'\n\nexport const IconButtonVariants = [...ButtonVariants, 'danger', 'invisible'] as const\nexport const IconButtonSizes = [...ButtonSizes] as const\nexport const defaultIconButtonVariant = defaultButtonVariant\nexport const defaultIconButtonSize = defaultButtonSize\n\nexport type IconButtonVariant = (typeof IconButtonVariants)[number]\nexport type IconButtonSize = (typeof IconButtonSizes)[number]\n\ntype IconButtonBaseProps<C extends React.ElementType> = Omit<BaseProps<C>, 'ref'> & {\n as?: C\n variant?: IconButtonVariant\n icon: Icon\n 'aria-label': string\n description?: string\n inactive?: boolean\n loading?: boolean\n loadingAnnouncement?: string\n rounded?: boolean\n size?: IconButtonSize\n tooltipDirection?: TooltipDirection\n}\n\nexport type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonBaseProps<C> &\n Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonBaseProps<C> | 'children'>\n\nconst iconButtonTestIds = {\n root: 'IconButton',\n get loadingIndicator() {\n return `${this.root}-loading-indicator`\n },\n get loadingAnnouncement() {\n return `${this.root}-loading-announcement`\n },\n}\n\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & React.RefAttributes<HTMLButtonElement>,\n) => React.ReactElement | null\n\nfunction IconButtonRoot(\n {\n as,\n icon: IconComponent,\n 'aria-label': ariaLabel,\n description,\n loading = false,\n loadingAnnouncement = 'Loading',\n rounded = false,\n tooltipDirection = 's',\n size = defaultIconButtonSize,\n variant = defaultIconButtonVariant,\n inactive = false,\n disabled,\n className,\n onClick,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-haspopup': ariaHasPopup,\n 'data-testid': testId,\n ...props\n }: React.PropsWithoutRef<IconButtonProps<React.ElementType>>,\n ref: Ref<HTMLButtonElement>,\n) {\n const {tooltipId: externalTooltipId} = React.useContext(TooltipContext)\n const isLoading = loading && !disabled\n const isInactive = inactive && !disabled && !isLoading\n const shouldRenderTooltip = !disabled && !externalTooltipId\n const tooltipText = description || ariaLabel\n const buttonVariant: ButtonVariant = variant === 'danger' ? 'secondary' : variant === 'invisible' ? 'subtle' : variant\n\n if (process.env.NODE_ENV !== 'production') {\n if (!ariaLabel.trim()) {\n // eslint-disable-next-line no-console\n console.warn('IconButton requires a non-empty `aria-label`.')\n }\n\n if ([disabled, loading, inactive].filter(Boolean).length > 1) {\n // eslint-disable-next-line no-console\n console.warn('IconButton has conflicting props for `disabled`, `loading`, or `inactive` states.')\n }\n }\n\n const ButtonIcon = isLoading ? (\n <span className={styles.IconButton__loadingIndicator} data-testid={iconButtonTestIds.loadingIndicator} />\n ) : (\n <IconComponent className={styles.IconButton__icon} />\n )\n\n const ButtonElement = (\n <Button\n {...props}\n ref={shouldRenderTooltip ? undefined : ref}\n as={as}\n variant={buttonVariant}\n size={size}\n disabled={disabled}\n aria-disabled={isLoading || isInactive ? true : ariaDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={!shouldRenderTooltip || description ? ariaLabel : undefined}\n className={clsx(\n styles.IconButton,\n styles[`IconButton--${size}`],\n styles[`IconButton--variant-${variant}`],\n isInactive && styles['IconButton--inactive'],\n rounded && styles['IconButton--rounded'],\n className,\n )}\n data-testid={testId || iconButtonTestIds.root}\n leadingVisual={ButtonIcon}\n onClick={\n isLoading\n ? event => {\n event.preventDefault()\n event.stopPropagation()\n }\n : onClick\n }\n />\n )\n\n return (\n <>\n {shouldRenderTooltip ? (\n <Tooltip ref={ref} direction={tooltipDirection} text={tooltipText} type={description ? 'description' : 'label'}>\n {ButtonElement}\n </Tooltip>\n ) : (\n ButtonElement\n )}\n <span\n aria-live=\"polite\"\n className={styles.IconButton__loadingAnnouncement}\n data-testid={iconButtonTestIds.loadingAnnouncement}\n >\n {isLoading ? loadingAnnouncement : null}\n </span>\n </>\n )\n}\n\nexport const IconButton = forwardRef(IconButtonRoot) as IconButtonComponent\n"],"mappings":";;;;;;;;;AAmBA,IAAa,IAAqB;CAAC,GAAG;CAAgB;CAAU;AAAW,GAC9D,IAAkB,CAAC,GAAG,CAAW,GACjC,IAA2B,GAC3B,IAAwB,GAsB/B,IAAoB;CACxB,MAAM;CACN,IAAI,mBAAmB;EACrB,OAAO,GAAG,KAAK,KAAK;CACtB;CACA,IAAI,sBAAsB;EACxB,OAAO,GAAG,KAAK,KAAK;CACtB;AACF;AAMA,SAAS,EACP,EACE,OACA,MAAM,GACN,cAAc,GACd,gBACA,aAAU,IACV,yBAAsB,WACtB,aAAU,IACV,sBAAmB,KACnB,UAAO,GACP,aAAU,GACV,cAAW,IACX,aACA,cACA,YACA,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,GAAG,KAEL,GACA;CACA,IAAM,EAAC,WAAW,MAAqB,EAAM,WAAW,CAAc,GAChE,IAAY,KAAW,CAAC,GACxB,IAAa,KAAY,CAAC,KAAY,CAAC,GACvC,IAAsB,CAAC,KAAY,CAAC,GACpC,IAAc,KAAe,GAC7B,IAA+B,MAAY,WAAW,cAAc,MAAY,cAAc,WAAW;CAE/G,AAAA,QAAA,IAAA,aAA6B,iBACtB,EAAU,KAAK,KAElB,QAAQ,KAAK,+CAA+C,GAG1D;EAAC;EAAU;EAAS;CAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,KAEzD,QAAQ,KAAK,mFAAmF;CAIpG,IAAM,IAAa,IACjB,kBAAC,QAAD;EAAM,WAAW,EAAO;EAA8B,eAAa,EAAkB;CAAmB,CAAA,IAExG,kBAAC,GAAD,EAAe,WAAW,EAAO,iBAAmB,CAAA,GAGhD,IACJ,kBAAC,GAAD;EACE,GAAI;EACJ,KAAK,IAAsB,KAAA,IAAY;EACnC;EACJ,SAAS;EACH;EACI;EACV,iBAAe,KAAa,IAAa,KAAO;EAChD,iBAAe;EACf,iBAAe;EACf,cAAY,CAAC,KAAuB,IAAc,IAAY,KAAA;EAC9D,WAAW,EACT,EAAO,YACP,EAAO,eAAe,MACtB,EAAO,uBAAuB,MAC9B,KAAc,EAAO,yBACrB,KAAW,EAAO,wBAClB,CACF;EACA,eAAa,KAAU,EAAkB;EACzC,eAAe;EACf,SACE,KACI,MAAS;GAEP,AADA,EAAM,eAAe,GACrB,EAAM,gBAAgB;EACxB,IACA;CAEP,CAAA;CAGH,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,IACC,kBAAC,GAAD;EAAc;EAAK,WAAW;EAAkB,MAAM;EAAa,MAAM,IAAc,gBAAgB;YACpG;CACM,CAAA,IAET,GAEF,kBAAC,QAAD;EACE,aAAU;EACV,WAAW,EAAO;EAClB,eAAa,EAAkB;YAE9B,IAAY,IAAsB;CAC/B,CAAA,CACN,EAAA,CAAA;AAEN;AAEA,IAAa,IAAa,EAAW,CAAc"}
1
+ {"version":3,"file":"IconButton.js","names":[],"sources":["../../src/IconButton/IconButton.tsx"],"sourcesContent":["import {clsx} from 'clsx'\nimport React, {forwardRef, type Ref} from 'react'\nimport type {Icon} from '@primer/octicons-react'\n\nimport {\n Button,\n ButtonSizes,\n ButtonVariants,\n defaultButtonSize,\n defaultButtonVariant,\n type ButtonVariant,\n} from '../Button'\nimport {Tooltip, TooltipContext, type TooltipDirection} from '../Tooltip'\nimport type {BaseProps} from '../component-helpers'\nimport {Spinner} from '../Spinner/Spinner'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/base.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css'\nimport styles from './IconButton.module.css'\n\nexport const IconButtonVariants = [...ButtonVariants, 'danger', 'invisible'] as const\nexport const IconButtonSizes = [...ButtonSizes] as const\nexport const defaultIconButtonVariant = defaultButtonVariant\nexport const defaultIconButtonSize = defaultButtonSize\n\nexport type IconButtonVariant = (typeof IconButtonVariants)[number]\nexport type IconButtonSize = (typeof IconButtonSizes)[number]\n\ntype IconButtonBaseProps<C extends React.ElementType> = Omit<BaseProps<C>, 'ref'> & {\n as?: C\n variant?: IconButtonVariant\n icon: Icon\n 'aria-label': string\n description?: string\n inactive?: boolean\n loading?: boolean\n loadingAnnouncement?: string\n rounded?: boolean\n size?: IconButtonSize\n tooltipDirection?: TooltipDirection\n}\n\nexport type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonBaseProps<C> &\n Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonBaseProps<C> | 'children'>\n\nconst iconButtonTestIds = {\n root: 'IconButton',\n get spinner() {\n return `${this.root}-spinner`\n },\n get loadingAnnouncement() {\n return `${this.root}-loading-announcement`\n },\n}\n\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & React.RefAttributes<HTMLButtonElement>,\n) => React.ReactElement | null\n\nfunction IconButtonRoot(\n {\n as,\n icon: IconComponent,\n 'aria-label': ariaLabel,\n description,\n loading = false,\n loadingAnnouncement = 'Loading',\n rounded = false,\n tooltipDirection = 's',\n size = defaultIconButtonSize,\n variant = defaultIconButtonVariant,\n inactive = false,\n disabled,\n className,\n onClick,\n 'aria-disabled': ariaDisabled,\n 'aria-expanded': ariaExpanded,\n 'aria-haspopup': ariaHasPopup,\n 'data-testid': testId,\n ...props\n }: React.PropsWithoutRef<IconButtonProps<React.ElementType>>,\n ref: Ref<HTMLButtonElement>,\n) {\n const {tooltipId: externalTooltipId} = React.useContext(TooltipContext)\n const isLoading = loading && !disabled\n const isInactive = inactive && !disabled && !isLoading\n const shouldRenderTooltip = !disabled && !externalTooltipId\n const tooltipText = description || ariaLabel\n const buttonVariant: ButtonVariant = variant === 'danger' ? 'secondary' : variant === 'invisible' ? 'subtle' : variant\n\n if (process.env.NODE_ENV !== 'production') {\n if (!ariaLabel.trim()) {\n // eslint-disable-next-line no-console\n console.warn('IconButton requires a non-empty `aria-label`.')\n }\n\n if ([disabled, loading, inactive].filter(Boolean).length > 1) {\n // eslint-disable-next-line no-console\n console.warn('IconButton has conflicting props for `disabled`, `loading`, or `inactive` states.')\n }\n }\n\n const ButtonIcon = isLoading ? (\n <Spinner accessibleLabel={null} className={styles.IconButton__spinner} data-testid={iconButtonTestIds.spinner} />\n ) : (\n <IconComponent className={styles.IconButton__icon} />\n )\n\n const ButtonElement = (\n <Button\n {...props}\n ref={shouldRenderTooltip ? undefined : ref}\n as={as}\n variant={buttonVariant}\n size={size}\n disabled={disabled}\n aria-disabled={isLoading || isInactive ? true : ariaDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={!shouldRenderTooltip || description ? ariaLabel : undefined}\n className={clsx(\n styles.IconButton,\n styles[`IconButton--${size}`],\n styles[`IconButton--variant-${variant}`],\n isInactive && styles['IconButton--inactive'],\n rounded && styles['IconButton--rounded'],\n className,\n )}\n data-testid={testId || iconButtonTestIds.root}\n leadingVisual={ButtonIcon}\n onClick={\n isLoading\n ? event => {\n event.preventDefault()\n event.stopPropagation()\n }\n : onClick\n }\n />\n )\n\n return (\n <>\n {shouldRenderTooltip ? (\n <Tooltip ref={ref} direction={tooltipDirection} text={tooltipText} type={description ? 'description' : 'label'}>\n {ButtonElement}\n </Tooltip>\n ) : (\n ButtonElement\n )}\n <span\n aria-live=\"polite\"\n className={styles.IconButton__loadingAnnouncement}\n data-testid={iconButtonTestIds.loadingAnnouncement}\n >\n {isLoading ? loadingAnnouncement : null}\n </span>\n </>\n )\n}\n\nexport const IconButton = forwardRef(IconButtonRoot) as IconButtonComponent\n"],"mappings":";;;;;;;;;;AAoBA,IAAa,IAAqB;CAAC,GAAG;CAAgB;CAAU;AAAW,GAC9D,IAAkB,CAAC,GAAG,CAAW,GACjC,IAA2B,GAC3B,IAAwB,GAsB/B,IAAoB;CACxB,MAAM;CACN,IAAI,UAAU;EACZ,OAAO,GAAG,KAAK,KAAK;CACtB;CACA,IAAI,sBAAsB;EACxB,OAAO,GAAG,KAAK,KAAK;CACtB;AACF;AAMA,SAAS,EACP,EACE,OACA,MAAM,GACN,cAAc,GACd,gBACA,aAAU,IACV,yBAAsB,WACtB,aAAU,IACV,sBAAmB,KACnB,UAAO,GACP,aAAU,GACV,cAAW,IACX,aACA,cACA,YACA,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,GAAG,KAEL,GACA;CACA,IAAM,EAAC,WAAW,MAAqB,EAAM,WAAW,CAAc,GAChE,IAAY,KAAW,CAAC,GACxB,IAAa,KAAY,CAAC,KAAY,CAAC,GACvC,IAAsB,CAAC,KAAY,CAAC,GACpC,IAAc,KAAe,GAC7B,IAA+B,MAAY,WAAW,cAAc,MAAY,cAAc,WAAW;CAE/G,AAAA,QAAA,IAAA,aAA6B,iBACtB,EAAU,KAAK,KAElB,QAAQ,KAAK,+CAA+C,GAG1D;EAAC;EAAU;EAAS;CAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,SAAS,KAEzD,QAAQ,KAAK,mFAAmF;CAIpG,IAAM,IAAa,IACjB,kBAAC,GAAD;EAAS,iBAAiB;EAAM,WAAW,EAAO;EAAqB,eAAa,EAAkB;CAAU,CAAA,IAEhH,kBAAC,GAAD,EAAe,WAAW,EAAO,iBAAmB,CAAA,GAGhD,IACJ,kBAAC,GAAD;EACE,GAAI;EACJ,KAAK,IAAsB,KAAA,IAAY;EACnC;EACJ,SAAS;EACH;EACI;EACV,iBAAe,KAAa,IAAa,KAAO;EAChD,iBAAe;EACf,iBAAe;EACf,cAAY,CAAC,KAAuB,IAAc,IAAY,KAAA;EAC9D,WAAW,EACT,EAAO,YACP,EAAO,eAAe,MACtB,EAAO,uBAAuB,MAC9B,KAAc,EAAO,yBACrB,KAAW,EAAO,wBAClB,CACF;EACA,eAAa,KAAU,EAAkB;EACzC,eAAe;EACf,SACE,KACI,MAAS;GAEP,AADA,EAAM,eAAe,GACrB,EAAM,gBAAgB;EACxB,IACA;CAEP,CAAA;CAGH,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,IACC,kBAAC,GAAD;EAAc;EAAK,WAAW;EAAkB,MAAM;EAAa,MAAM,IAAc,gBAAgB;YACpG;CACM,CAAA,IAET,GAEF,kBAAC,QAAD;EACE,aAAU;EACV,WAAW,EAAO;EAClB,eAAa,EAAkB;YAE9B,IAAY,IAAsB;CAC/B,CAAA,CACN,EAAA,CAAA;AAEN;AAEA,IAAa,IAAa,EAAW,CAAc"}
@@ -1 +1 @@
1
- .Primer_Brand__IconButton-module__IconButton___68DKi{flex:none;gap:0;padding:0}.Primer_Brand__IconButton-module__IconButton___68DKi.Primer_Brand__IconButton-module__IconButton___68DKi{min-width:var(--brand-IconButton-control-size-medium);width:var(--brand-IconButton-control-size-medium);height:var(--brand-IconButton-control-size-medium)}.Primer_Brand__IconButton-module__IconButton--small___KXgb_.Primer_Brand__IconButton-module__IconButton--small___KXgb_{min-width:var(--brand-IconButton-control-size-small);width:var(--brand-IconButton-control-size-small);height:var(--brand-IconButton-control-size-small)}.Primer_Brand__IconButton-module__IconButton--large___ypAna.Primer_Brand__IconButton-module__IconButton--large___ypAna{min-width:var(--brand-IconButton-control-size-large);width:var(--brand-IconButton-control-size-large);height:var(--brand-IconButton-control-size-large)}.Primer_Brand__IconButton-module__IconButton--rounded___g_ngl.Primer_Brand__IconButton-module__IconButton--rounded___g_ngl{border-radius:var(--brand-borderRadius-full)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]){color:var(--brand-IconButton-danger-fgColor-rest);background-color:var(--brand-IconButton-danger-bgColor-rest);border-color:var(--brand-IconButton-danger-borderColor-rest)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]):not([aria-expanded=true]):hover{color:var(--brand-IconButton-danger-fgColor-hover);background-color:var(--brand-IconButton-danger-bgColor-hover);border-color:var(--brand-IconButton-danger-borderColor-hover)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]):active,.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true])[aria-expanded=true]{color:var(--brand-IconButton-danger-fgColor-active);background-color:var(--brand-IconButton-danger-bgColor-active);border-color:var(--brand-IconButton-danger-borderColor-active)}.Primer_Brand__IconButton-module__IconButton--variant-invisible___gp_QC.Primer_Brand__IconButton-module__IconButton--variant-invisible___gp_QC:where(:not(:hover):not(:active):not([aria-expanded=true])){background-color:var(--brand-IconButton-invisible-bgColor-rest);border-color:var(--brand-IconButton-invisible-borderColor-rest);-webkit-backdrop-filter:none;backdrop-filter:none}.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd,.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd:hover,.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd:active{color:var(--brand-IconButton-inactive-fgColor);cursor:auto;background-color:var(--brand-IconButton-inactive-bgColor);border-color:var(--brand-IconButton-inactive-borderColor);-webkit-backdrop-filter:none;backdrop-filter:none}.Primer_Brand__IconButton-module__IconButton--inactive___UanYd .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{color:inherit}.Primer_Brand__IconButton-module__IconButton--small___KXgb_ .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-small);height:var(--brand-IconButton-icon-size-small)}.Primer_Brand__IconButton-module__IconButton--medium____oYr1 .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-medium);height:var(--brand-IconButton-icon-size-medium)}.Primer_Brand__IconButton-module__IconButton--large___ypAna .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-large);height:var(--brand-IconButton-icon-size-large)}.Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC.Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC{box-sizing:border-box;width:var(--brand-IconButton-icon-size-medium);height:var(--brand-IconButton-icon-size-medium);border:var(--brand-borderWidth-thin) solid currentcolor;animation:Primer_Brand__IconButton-module__IconButton-spin___f8JZW var(--brand-IconButton-loadingIndicator-animationDuration-default) linear infinite;border-inline-end-color:#0000;border-radius:50%;display:block}.Primer_Brand__IconButton-module__IconButton--small___KXgb_ .Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC{width:var(--brand-IconButton-icon-size-small);height:var(--brand-IconButton-icon-size-small)}.Primer_Brand__IconButton-module__IconButton--large___ypAna .Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC{width:var(--brand-IconButton-icon-size-large);height:var(--brand-IconButton-icon-size-large)}.Primer_Brand__IconButton-module__IconButton__loadingAnnouncement___Ga8mZ{width:var(--base-size-1);height:var(--base-size-1);margin:calc(var(--base-size-1) * -1);clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;padding:0;position:absolute;overflow:hidden}@keyframes Primer_Brand__IconButton-module__IconButton-spin___f8JZW{to{transform:rotate(360deg)}}@media (forced-colors:active){.Primer_Brand__IconButton-module__IconButton--inactive___UanYd{color:graytext;border-color:graytext}.Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC{border-color:buttontext;border-inline-end-color:#0000}}@media (prefers-reduced-motion:reduce){.Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC{animation-duration:var(--brand-IconButton-loadingIndicator-animationDuration-reducedMotion)}}
1
+ .Primer_Brand__IconButton-module__IconButton___68DKi{flex:none;gap:0;padding:0}.Primer_Brand__IconButton-module__IconButton___68DKi.Primer_Brand__IconButton-module__IconButton___68DKi{min-width:var(--brand-IconButton-control-size-medium);width:var(--brand-IconButton-control-size-medium);height:var(--brand-IconButton-control-size-medium)}.Primer_Brand__IconButton-module__IconButton--small___KXgb_.Primer_Brand__IconButton-module__IconButton--small___KXgb_{min-width:var(--brand-IconButton-control-size-small);width:var(--brand-IconButton-control-size-small);height:var(--brand-IconButton-control-size-small)}.Primer_Brand__IconButton-module__IconButton--large___ypAna.Primer_Brand__IconButton-module__IconButton--large___ypAna{min-width:var(--brand-IconButton-control-size-large);width:var(--brand-IconButton-control-size-large);height:var(--brand-IconButton-control-size-large)}.Primer_Brand__IconButton-module__IconButton--rounded___g_ngl.Primer_Brand__IconButton-module__IconButton--rounded___g_ngl{border-radius:var(--brand-borderRadius-full)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]){color:var(--brand-IconButton-danger-fgColor-rest);background-color:var(--brand-IconButton-danger-bgColor-rest);border-color:var(--brand-IconButton-danger-borderColor-rest)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]):not([aria-expanded=true]):hover{color:var(--brand-IconButton-danger-fgColor-hover);background-color:var(--brand-IconButton-danger-bgColor-hover);border-color:var(--brand-IconButton-danger-borderColor-hover)}.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true]):active,.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH.Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH:not([disabled]):not([aria-disabled=true])[aria-expanded=true]{color:var(--brand-IconButton-danger-fgColor-active);background-color:var(--brand-IconButton-danger-bgColor-active);border-color:var(--brand-IconButton-danger-borderColor-active)}.Primer_Brand__IconButton-module__IconButton--variant-invisible___gp_QC.Primer_Brand__IconButton-module__IconButton--variant-invisible___gp_QC:where(:not(:hover):not(:active):not([aria-expanded=true])){background-color:var(--brand-IconButton-invisible-bgColor-rest);border-color:var(--brand-IconButton-invisible-borderColor-rest);-webkit-backdrop-filter:none;backdrop-filter:none}.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd,.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd:hover,.Primer_Brand__IconButton-module__IconButton--inactive___UanYd.Primer_Brand__IconButton-module__IconButton--inactive___UanYd:active{color:var(--brand-IconButton-inactive-fgColor);cursor:auto;background-color:var(--brand-IconButton-inactive-bgColor);border-color:var(--brand-IconButton-inactive-borderColor);-webkit-backdrop-filter:none;backdrop-filter:none}.Primer_Brand__IconButton-module__IconButton--inactive___UanYd .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{color:inherit}.Primer_Brand__IconButton-module__IconButton--small___KXgb_ .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-small);height:var(--brand-IconButton-icon-size-small)}.Primer_Brand__IconButton-module__IconButton--medium____oYr1 .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-medium);height:var(--brand-IconButton-icon-size-medium)}.Primer_Brand__IconButton-module__IconButton--large___ypAna .Primer_Brand__IconButton-module__IconButton__icon___ilqkK{width:var(--brand-IconButton-icon-size-large);height:var(--brand-IconButton-icon-size-large)}.Primer_Brand__IconButton-module__IconButton__spinner___I4dHE.Primer_Brand__IconButton-module__IconButton__spinner___I4dHE{width:var(--brand-IconButton-icon-size-medium);height:var(--brand-IconButton-icon-size-medium);animation-duration:var(--brand-IconButton-spinner-animationDuration-default);display:block}.Primer_Brand__IconButton-module__IconButton--small___KXgb_ .Primer_Brand__IconButton-module__IconButton__spinner___I4dHE{width:var(--brand-IconButton-icon-size-small);height:var(--brand-IconButton-icon-size-small)}.Primer_Brand__IconButton-module__IconButton--large___ypAna .Primer_Brand__IconButton-module__IconButton__spinner___I4dHE{width:var(--brand-IconButton-icon-size-large);height:var(--brand-IconButton-icon-size-large)}.Primer_Brand__IconButton-module__IconButton__loadingAnnouncement___Ga8mZ{width:var(--base-size-1);height:var(--base-size-1);margin:calc(var(--base-size-1) * -1);clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;padding:0;position:absolute;overflow:hidden}@media (forced-colors:active){.Primer_Brand__IconButton-module__IconButton--inactive___UanYd{color:graytext;border-color:graytext}.Primer_Brand__IconButton-module__IconButton__spinner___I4dHE{color:buttontext}}@media (prefers-reduced-motion:reduce){.Primer_Brand__IconButton-module__IconButton__spinner___I4dHE{animation-duration:var(--brand-IconButton-spinner-animationDuration-reducedMotion)}}
@@ -1,5 +1,5 @@
1
- import './IconButton.module-tmxv8TCl.css';//#region src/IconButton/IconButton.module.css
2
- var e = "Primer_Brand__IconButton-module__IconButton___68DKi", t = "Primer_Brand__IconButton-module__IconButton__icon___ilqkK", n = "Primer_Brand__IconButton-module__IconButton__loadingIndicator___RXZPC", r = "Primer_Brand__IconButton-module__IconButton__loadingAnnouncement___Ga8mZ", i = {
1
+ import './IconButton.module-D2UJBm7x.css';//#region src/IconButton/IconButton.module.css
2
+ var e = "Primer_Brand__IconButton-module__IconButton___68DKi", t = "Primer_Brand__IconButton-module__IconButton__icon___ilqkK", n = "Primer_Brand__IconButton-module__IconButton__spinner___I4dHE", r = "Primer_Brand__IconButton-module__IconButton__loadingAnnouncement___Ga8mZ", i = {
3
3
  IconButton: e,
4
4
  "IconButton--small": "Primer_Brand__IconButton-module__IconButton--small___KXgb_",
5
5
  "IconButton--large": "Primer_Brand__IconButton-module__IconButton--large___ypAna",
@@ -9,11 +9,10 @@ var e = "Primer_Brand__IconButton-module__IconButton___68DKi", t = "Primer_Brand
9
9
  "IconButton--inactive": "Primer_Brand__IconButton-module__IconButton--inactive___UanYd",
10
10
  IconButton__icon: t,
11
11
  "IconButton--medium": "Primer_Brand__IconButton-module__IconButton--medium____oYr1",
12
- IconButton__loadingIndicator: n,
13
- "IconButton-spin": "Primer_Brand__IconButton-module__IconButton-spin___f8JZW",
12
+ IconButton__spinner: n,
14
13
  IconButton__loadingAnnouncement: r
15
14
  };
16
15
  //#endregion
17
- export { e as IconButton, t as IconButton__icon, r as IconButton__loadingAnnouncement, n as IconButton__loadingIndicator, i as default };
16
+ export { e as IconButton, t as IconButton__icon, r as IconButton__loadingAnnouncement, n as IconButton__spinner, i as default };
18
17
 
19
18
  //# sourceMappingURL=IconButton.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.module.js","names":[],"sources":["../../src/IconButton/IconButton.module.css"],"sourcesContent":[".IconButton {\n flex: none;\n gap: 0;\n padding: 0;\n}\n\n.IconButton.IconButton {\n min-width: var(--brand-IconButton-control-size-medium);\n width: var(--brand-IconButton-control-size-medium);\n height: var(--brand-IconButton-control-size-medium);\n}\n\n.IconButton--small.IconButton--small {\n min-width: var(--brand-IconButton-control-size-small);\n width: var(--brand-IconButton-control-size-small);\n height: var(--brand-IconButton-control-size-small);\n}\n\n.IconButton--large.IconButton--large {\n min-width: var(--brand-IconButton-control-size-large);\n width: var(--brand-IconButton-control-size-large);\n height: var(--brand-IconButton-control-size-large);\n}\n\n.IconButton--rounded.IconButton--rounded {\n border-radius: var(--brand-borderRadius-full);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true']) {\n color: var(--brand-IconButton-danger-fgColor-rest);\n background-color: var(--brand-IconButton-danger-bgColor-rest);\n border-color: var(--brand-IconButton-danger-borderColor-rest);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not(\n [disabled],\n [aria-disabled='true'],\n [aria-expanded='true']\n ):hover {\n color: var(--brand-IconButton-danger-fgColor-hover);\n background-color: var(--brand-IconButton-danger-bgColor-hover);\n border-color: var(--brand-IconButton-danger-borderColor-hover);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true']):active,\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true'])[aria-expanded='true'] {\n color: var(--brand-IconButton-danger-fgColor-active);\n background-color: var(--brand-IconButton-danger-bgColor-active);\n border-color: var(--brand-IconButton-danger-borderColor-active);\n}\n\n.IconButton--variant-invisible.IconButton--variant-invisible:where(:not(:hover, :active, [aria-expanded='true'])) {\n background-color: var(--brand-IconButton-invisible-bgColor-rest);\n border-color: var(--brand-IconButton-invisible-borderColor-rest);\n backdrop-filter: none;\n}\n\n.IconButton--inactive.IconButton--inactive,\n.IconButton--inactive.IconButton--inactive:hover,\n.IconButton--inactive.IconButton--inactive:active {\n color: var(--brand-IconButton-inactive-fgColor);\n cursor: auto;\n background-color: var(--brand-IconButton-inactive-bgColor);\n border-color: var(--brand-IconButton-inactive-borderColor);\n backdrop-filter: none;\n}\n\n.IconButton--inactive .IconButton__icon {\n color: inherit;\n}\n\n.IconButton--small .IconButton__icon {\n width: var(--brand-IconButton-icon-size-small);\n height: var(--brand-IconButton-icon-size-small);\n}\n\n.IconButton--medium .IconButton__icon {\n width: var(--brand-IconButton-icon-size-medium);\n height: var(--brand-IconButton-icon-size-medium);\n}\n\n.IconButton--large .IconButton__icon {\n width: var(--brand-IconButton-icon-size-large);\n height: var(--brand-IconButton-icon-size-large);\n}\n\n.IconButton__loadingIndicator.IconButton__loadingIndicator {\n display: block;\n box-sizing: border-box;\n width: var(--brand-IconButton-icon-size-medium);\n height: var(--brand-IconButton-icon-size-medium);\n border: var(--brand-borderWidth-thin) solid currentcolor;\n border-inline-end-color: transparent;\n border-radius: 50%;\n animation: IconButton-spin var(--brand-IconButton-loadingIndicator-animationDuration-default) linear infinite;\n}\n\n.IconButton--small .IconButton__loadingIndicator {\n width: var(--brand-IconButton-icon-size-small);\n height: var(--brand-IconButton-icon-size-small);\n}\n\n.IconButton--large .IconButton__loadingIndicator {\n width: var(--brand-IconButton-icon-size-large);\n height: var(--brand-IconButton-icon-size-large);\n}\n\n.IconButton__loadingAnnouncement {\n position: absolute;\n width: var(--base-size-1);\n height: var(--base-size-1);\n padding: 0;\n margin: calc(var(--base-size-1) * -1);\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n@keyframes IconButton-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (forced-colors: active) {\n .IconButton--inactive {\n color: GrayText;\n border-color: GrayText;\n }\n\n .IconButton__loadingIndicator {\n border-color: ButtonText;\n border-inline-end-color: transparent;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .IconButton__loadingIndicator {\n animation-duration: var(--brand-IconButton-loadingIndicator-animationDuration-reducedMotion);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"IconButton.module.js","names":[],"sources":["../../src/IconButton/IconButton.module.css"],"sourcesContent":[".IconButton {\n flex: none;\n gap: 0;\n padding: 0;\n}\n\n.IconButton.IconButton {\n min-width: var(--brand-IconButton-control-size-medium);\n width: var(--brand-IconButton-control-size-medium);\n height: var(--brand-IconButton-control-size-medium);\n}\n\n.IconButton--small.IconButton--small {\n min-width: var(--brand-IconButton-control-size-small);\n width: var(--brand-IconButton-control-size-small);\n height: var(--brand-IconButton-control-size-small);\n}\n\n.IconButton--large.IconButton--large {\n min-width: var(--brand-IconButton-control-size-large);\n width: var(--brand-IconButton-control-size-large);\n height: var(--brand-IconButton-control-size-large);\n}\n\n.IconButton--rounded.IconButton--rounded {\n border-radius: var(--brand-borderRadius-full);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true']) {\n color: var(--brand-IconButton-danger-fgColor-rest);\n background-color: var(--brand-IconButton-danger-bgColor-rest);\n border-color: var(--brand-IconButton-danger-borderColor-rest);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not(\n [disabled],\n [aria-disabled='true'],\n [aria-expanded='true']\n ):hover {\n color: var(--brand-IconButton-danger-fgColor-hover);\n background-color: var(--brand-IconButton-danger-bgColor-hover);\n border-color: var(--brand-IconButton-danger-borderColor-hover);\n}\n\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true']):active,\n.IconButton--variant-danger.IconButton--variant-danger:not([disabled], [aria-disabled='true'])[aria-expanded='true'] {\n color: var(--brand-IconButton-danger-fgColor-active);\n background-color: var(--brand-IconButton-danger-bgColor-active);\n border-color: var(--brand-IconButton-danger-borderColor-active);\n}\n\n.IconButton--variant-invisible.IconButton--variant-invisible:where(:not(:hover, :active, [aria-expanded='true'])) {\n background-color: var(--brand-IconButton-invisible-bgColor-rest);\n border-color: var(--brand-IconButton-invisible-borderColor-rest);\n backdrop-filter: none;\n}\n\n.IconButton--inactive.IconButton--inactive,\n.IconButton--inactive.IconButton--inactive:hover,\n.IconButton--inactive.IconButton--inactive:active {\n color: var(--brand-IconButton-inactive-fgColor);\n cursor: auto;\n background-color: var(--brand-IconButton-inactive-bgColor);\n border-color: var(--brand-IconButton-inactive-borderColor);\n backdrop-filter: none;\n}\n\n.IconButton--inactive .IconButton__icon {\n color: inherit;\n}\n\n.IconButton--small .IconButton__icon {\n width: var(--brand-IconButton-icon-size-small);\n height: var(--brand-IconButton-icon-size-small);\n}\n\n.IconButton--medium .IconButton__icon {\n width: var(--brand-IconButton-icon-size-medium);\n height: var(--brand-IconButton-icon-size-medium);\n}\n\n.IconButton--large .IconButton__icon {\n width: var(--brand-IconButton-icon-size-large);\n height: var(--brand-IconButton-icon-size-large);\n}\n\n.IconButton__spinner.IconButton__spinner {\n display: block;\n width: var(--brand-IconButton-icon-size-medium);\n height: var(--brand-IconButton-icon-size-medium);\n animation-duration: var(--brand-IconButton-spinner-animationDuration-default);\n}\n\n.IconButton--small .IconButton__spinner {\n width: var(--brand-IconButton-icon-size-small);\n height: var(--brand-IconButton-icon-size-small);\n}\n\n.IconButton--large .IconButton__spinner {\n width: var(--brand-IconButton-icon-size-large);\n height: var(--brand-IconButton-icon-size-large);\n}\n\n.IconButton__loadingAnnouncement {\n position: absolute;\n width: var(--base-size-1);\n height: var(--base-size-1);\n padding: 0;\n margin: calc(var(--base-size-1) * -1);\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n@media (forced-colors: active) {\n .IconButton--inactive {\n color: GrayText;\n border-color: GrayText;\n }\n\n .IconButton__spinner {\n color: ButtonText;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .IconButton__spinner {\n animation-duration: var(--brand-IconButton-spinner-animationDuration-reducedMotion);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/spinner/base.css';
3
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes.css';
4
+ export type SpinnerProps = {
5
+ size?: 'small' | 'medium' | 'large' | number;
6
+ accessibleLabel?: string | null;
7
+ className?: string;
8
+ 'data-testid'?: string;
9
+ };
10
+ export declare function Spinner({ size, accessibleLabel, className, 'data-testid': testId, }: SpinnerProps): React.JSX.Element;
11
+ //# sourceMappingURL=Spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,8FAA8F,CAAA;AACrG,OAAO,2GAA2G,CAAA;AAGlH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAe,EACf,eAA2B,EAC3B,SAAS,EACT,aAAa,EAAE,MAAkB,GAClC,EAAE,YAAY,qBAqCd"}
@@ -0,0 +1,48 @@
1
+ import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
2
+ import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes-izIk82NS.css';import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/spinner/base-BUCpHNCY.css';/* empty css */
3
+ /* empty css */
4
+ import t from "./Spinner.module.js";
5
+ import "react";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
7
+ //#region src/Spinner/Spinner.tsx
8
+ function i({ size: i = "medium", accessibleLabel: a = "Loading", className: o, "data-testid": s = "Spinner" }) {
9
+ let c = typeof i == "number" ? i : void 0;
10
+ return /* @__PURE__ */ r("span", {
11
+ className: t.Spinner__box,
12
+ "data-component": "Spinner",
13
+ children: [/* @__PURE__ */ r("svg", {
14
+ width: c,
15
+ height: c,
16
+ viewBox: "0 0 16 16",
17
+ fill: "none",
18
+ "aria-hidden": "true",
19
+ focusable: "false",
20
+ className: e(t.Spinner, typeof i == "string" && t[`Spinner--${i}`], o),
21
+ "data-testid": s,
22
+ children: [/* @__PURE__ */ n("circle", {
23
+ cx: "8",
24
+ cy: "8",
25
+ r: "7",
26
+ fill: "none",
27
+ stroke: "currentColor",
28
+ strokeOpacity: "0.25",
29
+ strokeWidth: "2",
30
+ vectorEffect: "non-scaling-stroke"
31
+ }), /* @__PURE__ */ n("path", {
32
+ d: "M15 8a7.002 7.002 0 00-7-7",
33
+ fill: "none",
34
+ stroke: "currentColor",
35
+ strokeWidth: "2",
36
+ strokeLinecap: "round",
37
+ vectorEffect: "non-scaling-stroke"
38
+ })]
39
+ }), a === null ? null : /* @__PURE__ */ n("span", {
40
+ className: "visually-hidden",
41
+ children: a
42
+ })]
43
+ });
44
+ }
45
+ //#endregion
46
+ export { i as Spinner };
47
+
48
+ //# sourceMappingURL=Spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.js","names":[],"sources":["../../src/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react'\nimport {clsx} from 'clsx'\n\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/spinner/base.css'\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/spinner/colors-with-modes.css'\nimport styles from './Spinner.module.css'\n\nexport type SpinnerProps = {\n size?: 'small' | 'medium' | 'large' | number\n accessibleLabel?: string | null\n className?: string\n 'data-testid'?: string\n}\n\nexport function Spinner({\n size = 'medium',\n accessibleLabel = 'Loading',\n className,\n 'data-testid': testId = 'Spinner',\n}: SpinnerProps) {\n const customSize = typeof size === 'number' ? size : undefined\n\n return (\n <span className={styles.Spinner__box} data-component=\"Spinner\">\n <svg\n width={customSize}\n height={customSize}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n className={clsx(styles.Spinner, typeof size === 'string' && styles[`Spinner--${size}`], className)}\n data-testid={testId}\n >\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"7\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeOpacity=\"0.25\"\n strokeWidth=\"2\"\n vectorEffect=\"non-scaling-stroke\"\n />\n <path\n d=\"M15 8a7.002 7.002 0 00-7-7\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </svg>\n {accessibleLabel !== null ? <span className=\"visually-hidden\">{accessibleLabel}</span> : null}\n </span>\n )\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,EAAQ,EACtB,UAAO,UACP,qBAAkB,WAClB,cACA,eAAe,IAAS,aACT;CACf,IAAM,IAAa,OAAO,KAAS,WAAW,IAAO,KAAA;CAErD,OACE,kBAAC,QAAD;EAAM,WAAW,EAAO;EAAc,kBAAe;YAArD,CACE,kBAAC,OAAD;GACE,OAAO;GACP,QAAQ;GACR,SAAQ;GACR,MAAK;GACL,eAAY;GACZ,WAAU;GACV,WAAW,EAAK,EAAO,SAAS,OAAO,KAAS,YAAY,EAAO,YAAY,MAAS,CAAS;GACjG,eAAa;aARf,CAUE,kBAAC,UAAD;IACE,IAAG;IACH,IAAG;IACH,GAAE;IACF,MAAK;IACL,QAAO;IACP,eAAc;IACd,aAAY;IACZ,cAAa;GACd,CAAA,GACD,kBAAC,QAAD;IACE,GAAE;IACF,MAAK;IACL,QAAO;IACP,aAAY;IACZ,eAAc;IACd,cAAa;GACd,CAAA,CACE;MACJ,MAAoB,OAAoE,OAA7D,kBAAC,QAAD;GAAM,WAAU;aAAmB;EAAsB,CAAA,CACjF;;AAEV"}
@@ -0,0 +1 @@
1
+ .Primer_Brand__Spinner-module__Spinner__box___aHcR4{display:inline-flex}.Primer_Brand__Spinner-module__Spinner___udHxF{box-sizing:border-box;color:var(--brand-Spinner-fgColor);animation-name:Primer_Brand__Spinner-module__Spinner-spin___itSEr;animation-duration:var(--brand-Spinner-animationDuration-default);animation-timing-function:linear;animation-iteration-count:infinite;display:block;overflow:visible}.Primer_Brand__Spinner-module__Spinner--small___cMahj{width:var(--brand-Spinner-size-small);height:var(--brand-Spinner-size-small)}.Primer_Brand__Spinner-module__Spinner--medium___buMi2{width:var(--brand-Spinner-size-medium);height:var(--brand-Spinner-size-medium)}.Primer_Brand__Spinner-module__Spinner--large___8Bjgb{width:var(--brand-Spinner-size-large);height:var(--brand-Spinner-size-large)}@keyframes Primer_Brand__Spinner-module__Spinner-spin___itSEr{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.Primer_Brand__Spinner-module__Spinner___udHxF{animation-duration:var(--brand-Spinner-animationDuration-reducedMotion)}}
@@ -0,0 +1,13 @@
1
+ import './Spinner.module-BjDTZLR7.css';//#region src/Spinner/Spinner.module.css
2
+ var e = "Primer_Brand__Spinner-module__Spinner__box___aHcR4", t = "Primer_Brand__Spinner-module__Spinner___udHxF", n = {
3
+ Spinner__box: e,
4
+ Spinner: t,
5
+ "Spinner-spin": "Primer_Brand__Spinner-module__Spinner-spin___itSEr",
6
+ "Spinner--small": "Primer_Brand__Spinner-module__Spinner--small___cMahj",
7
+ "Spinner--medium": "Primer_Brand__Spinner-module__Spinner--medium___buMi2",
8
+ "Spinner--large": "Primer_Brand__Spinner-module__Spinner--large___8Bjgb"
9
+ };
10
+ //#endregion
11
+ export { t as Spinner, e as Spinner__box, n as default };
12
+
13
+ //# sourceMappingURL=Spinner.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.module.js","names":[],"sources":["../../src/Spinner/Spinner.module.css"],"sourcesContent":[".Spinner__box {\n display: inline-flex;\n}\n\n.Spinner {\n display: block;\n box-sizing: border-box;\n overflow: visible;\n color: var(--brand-Spinner-fgColor);\n animation-name: Spinner-spin;\n animation-duration: var(--brand-Spinner-animationDuration-default);\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n.Spinner--small {\n width: var(--brand-Spinner-size-small);\n height: var(--brand-Spinner-size-small);\n}\n\n.Spinner--medium {\n width: var(--brand-Spinner-size-medium);\n height: var(--brand-Spinner-size-medium);\n}\n\n.Spinner--large {\n width: var(--brand-Spinner-size-large);\n height: var(--brand-Spinner-size-large);\n}\n\n@keyframes Spinner-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .Spinner {\n animation-duration: var(--brand-Spinner-animationDuration-reducedMotion);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { Spinner } from './Spinner';
2
+ export type { SpinnerProps } from './Spinner';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,YAAY,EAAC,YAAY,EAAC,MAAM,WAAW,CAAA"}
@@ -2,7 +2,7 @@ import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
2
2
  import { useId as t } from "../../hooks/useId.js";
3
3
  import { useProvidedRefOrCreate as n } from "../../hooks/useRef.js";
4
4
  import r from "../../hooks/useIsomorphicLayoutEffect.js";
5
- import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-C05YPRXo.css';/* empty css */
5
+ import '../../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes-ChBPnVuN.css';/* empty css */
6
6
  import i from "./Checkbox.module.js";
7
7
  import { forwardRef as a, useCallback as o } from "react";
8
8
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/forms/FormControl/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAK9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,KAAK,CAAA;AAS7D,OAAO,2GAA2G,CAAA;AAGlH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG;IACtD;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,CAAA;AA2JD,KAAK,qBAAqB,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAA;AA4C/B,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,GAAG,SAAS,CAAC,eAAe,CAAC,CAAA;AA8B9B,KAAK,oBAAoB,GAAG,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAA;AAMzE;;;GAGG;AACH,eAAO,MAAM,WAAW,kGAnOrB,iBAAiB,CAAC,gBAAgB,CAAC;gIAwJnC,iBAAiB,CAAC,qBAAqB,CAAC;sEAqCuC,0BAA0B;mCA8B7D,oBAAoB;CAYjE,CAAA"}
1
+ {"version":3,"file":"FormControl.d.ts","sourceRoot":"","sources":["../../../src/forms/FormControl/FormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAK9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,EAAC,oBAAoB,EAAE,cAAc,EAAC,MAAM,KAAK,CAAA;AAY7D,OAAO,2GAA2G,CAAA;AAIlH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG;IACtD;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;OAEG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,CAAA;AAmMD,KAAK,qBAAqB,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAA;AA4C/B,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC,GAAG,SAAS,CAAC,eAAe,CAAC,CAAA;AA8B9B,KAAK,oBAAoB,GAAG,iBAAiB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAA;AAMzE;;;GAGG;AACH,eAAO,MAAM,WAAW,kGA3QrB,iBAAiB,CAAC,gBAAgB,CAAC;gIAgMnC,iBAAiB,CAAC,qBAAqB,CAAC;sEAqCuC,0BAA0B;mCA8B7D,oBAAoB;CAYjE,CAAA"}