@primer/react-brand 0.77.0 → 0.78.0-rc.6fbe9fb5

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 (488) hide show
  1. package/docs/components/ActionMenu/index.md +65 -19
  2. package/docs/components/ButtonGroup/index.md +9 -6
  3. package/docs/components/ButtonGroup/react.md +26 -6
  4. package/docs/components/IconButton/index.md +99 -0
  5. package/docs/components/IconButton/react.md +189 -0
  6. package/docs/components/Tooltip/index.md +24 -13
  7. package/docs/components/index.md +1 -0
  8. package/docs/forms/TextInput/index.md +4 -2
  9. package/docs/index.md +3 -2
  10. package/esm/ActionMenu/ActionMenu.d.ts +18 -24
  11. package/esm/ActionMenu/ActionMenu.d.ts.map +1 -1
  12. package/esm/ActionMenu/ActionMenu.js +247 -168
  13. package/esm/ActionMenu/ActionMenu.js.map +1 -1
  14. package/esm/ActionMenu/ActionMenu.module-DlO2FtEt.css +1 -0
  15. package/esm/ActionMenu/ActionMenu.module.js +4 -1
  16. package/esm/ActionMenu/ActionMenu.module.js.map +1 -1
  17. package/esm/ActionMenu/ActionMenuContext.d.ts +23 -0
  18. package/esm/ActionMenu/ActionMenuContext.d.ts.map +1 -0
  19. package/esm/ActionMenu/ActionMenuContext.js +24 -0
  20. package/esm/ActionMenu/ActionMenuContext.js.map +1 -0
  21. package/esm/Button/Button.d.ts +4 -2
  22. package/esm/Button/Button.d.ts.map +1 -1
  23. package/esm/Button/Button.js +25 -24
  24. package/esm/Button/Button.js.map +1 -1
  25. package/esm/Button/Button.module-CqRiLusx.css +1 -0
  26. package/esm/Button/Button.module.js +1 -1
  27. package/esm/Button/Button.module.js.map +1 -1
  28. package/esm/ButtonGroup/ButtonGroup.d.ts +7 -1
  29. package/esm/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  30. package/esm/ButtonGroup/ButtonGroup.js +44 -22
  31. package/esm/ButtonGroup/ButtonGroup.js.map +1 -1
  32. package/esm/ButtonGroup/ButtonGroup.module-pJbqxGBe.css +1 -0
  33. package/esm/ButtonGroup/ButtonGroup.module.js +8 -3
  34. package/esm/ButtonGroup/ButtonGroup.module.js.map +1 -1
  35. package/esm/FAQ/{FAQGroup.module-qm5jP0zF.css → FAQGroup.module-DNyxktEm.css} +1 -1
  36. package/esm/FAQ/FAQGroup.module.js +1 -1
  37. package/esm/FAQ/FAQGroup.module.js.map +1 -1
  38. package/esm/IconButton/IconButton.d.ts +30 -0
  39. package/esm/IconButton/IconButton.d.ts.map +1 -0
  40. package/esm/IconButton/IconButton.js +68 -0
  41. package/esm/IconButton/IconButton.js.map +1 -0
  42. package/esm/IconButton/IconButton.module-tmxv8TCl.css +1 -0
  43. package/esm/IconButton/IconButton.module.js +19 -0
  44. package/esm/IconButton/IconButton.module.js.map +1 -0
  45. package/esm/IconButton/index.d.ts +2 -0
  46. package/esm/IconButton/index.d.ts.map +1 -0
  47. package/esm/PricingOptions/PricingOptions.js +26 -26
  48. package/esm/Tooltip/Tooltip.d.ts +5 -2
  49. package/esm/Tooltip/Tooltip.d.ts.map +1 -1
  50. package/esm/Tooltip/Tooltip.js +90 -45
  51. package/esm/Tooltip/Tooltip.js.map +1 -1
  52. package/esm/Tooltip/Tooltip.module-CSt4tNaI.css +1 -0
  53. package/esm/Tooltip/Tooltip.module.js +1 -1
  54. package/esm/Tooltip/Tooltip.module.js.map +1 -1
  55. package/esm/forms/TextInput/TextInput.d.ts +4 -2
  56. package/esm/forms/TextInput/TextInput.d.ts.map +1 -1
  57. package/esm/forms/TextInput/TextInput.js +8 -3
  58. package/esm/forms/TextInput/TextInput.js.map +1 -1
  59. package/esm/forms/TextInput/TextInput.module-CeOwKkHk.css +1 -0
  60. package/esm/forms/TextInput/TextInput.module.js +10 -1
  61. package/esm/forms/TextInput/TextInput.module.js.map +1 -1
  62. package/esm/index.d.ts +1 -0
  63. package/esm/index.d.ts.map +1 -1
  64. package/esm/index.esm.js +70 -68
  65. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes-mgXFtgvP.css +1 -0
  66. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/button/base-DhkVnZYz.css +1 -0
  67. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/base-DLPw97mz.css +1 -0
  68. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes-D7iaptsa.css +1 -0
  69. package/lib/ActionMenu/ActionMenu.d.ts +18 -24
  70. package/lib/ActionMenu/ActionMenuContext.d.ts +22 -0
  71. package/lib/Button/Button.d.ts +4 -2
  72. package/lib/ButtonGroup/ButtonGroup.d.ts +7 -1
  73. package/lib/IconButton/IconButton.d.ts +29 -0
  74. package/lib/IconButton/index.d.ts +1 -0
  75. package/lib/Tooltip/Tooltip.d.ts +5 -2
  76. package/lib/css/main.css +659 -347
  77. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  78. package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
  79. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  80. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  81. package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
  82. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  83. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  84. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  85. package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +5 -1
  86. package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
  87. package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
  88. package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
  89. package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
  90. package/lib/design-tokens/css/tokens/functional/components/button/base.css +13 -0
  91. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  92. package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
  93. package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
  94. package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
  95. package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
  96. package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
  97. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
  98. package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
  99. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
  100. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
  101. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  102. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  103. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  104. package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
  105. package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
  106. package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
  107. package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
  108. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
  109. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
  110. package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
  111. package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
  112. package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
  113. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  114. package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
  115. package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
  116. package/lib/design-tokens/css/tokens/functional/components/icon-button/base.css +15 -0
  117. package/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css +39 -0
  118. package/lib/design-tokens/css/tokens/functional/components/icon-button/colors.css +21 -0
  119. package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
  120. package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
  121. package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
  122. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
  123. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
  124. package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
  125. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  126. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  127. package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
  128. package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
  129. package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
  130. package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
  131. package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
  132. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
  133. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
  134. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
  135. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
  136. package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
  137. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
  138. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
  139. package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
  140. package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
  141. package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
  142. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  143. package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
  144. package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
  145. package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
  146. package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
  147. package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
  148. package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
  149. package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
  150. package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
  151. package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
  152. package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
  153. package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
  154. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
  155. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
  156. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css +1 -1
  157. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
  158. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
  159. package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
  160. package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
  161. package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
  162. package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
  163. package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
  164. package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
  165. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
  166. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
  167. package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
  168. package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
  169. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  170. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  171. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  172. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  173. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  174. package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
  175. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  176. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  177. package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
  178. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  179. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  180. package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
  181. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  182. package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
  183. package/lib/design-tokens/js/module/tokens/functional/components/button/base.js +25 -0
  184. package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
  185. package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
  186. package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  187. package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  188. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  189. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  190. package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
  191. package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
  192. package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
  193. package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  194. package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
  195. package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
  196. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  197. package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
  198. package/lib/design-tokens/js/module/tokens/functional/components/icon-button/base.js +31 -0
  199. package/lib/design-tokens/js/module/tokens/functional/components/icon-button/colors.js +83 -0
  200. package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
  201. package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
  202. package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
  203. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
  204. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  205. package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
  206. package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
  207. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
  208. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
  209. package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
  210. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
  211. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  212. package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
  213. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  214. package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
  215. package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
  216. package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
  217. package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
  218. package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
  219. package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
  220. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
  221. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
  222. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +1 -1
  223. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  224. package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
  225. package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
  226. package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
  227. package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
  228. package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
  229. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  230. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  231. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  232. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  233. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  234. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  235. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  236. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  237. package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
  238. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  239. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  240. package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
  241. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  242. package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
  243. package/lib/design-tokens/js/tokens/functional/components/button/base.js +11 -0
  244. package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
  245. package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
  246. package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  247. package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  248. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  249. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  250. package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
  251. package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
  252. package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
  253. package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  254. package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
  255. package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
  256. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  257. package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
  258. package/lib/design-tokens/js/tokens/functional/components/icon-button/base.js +13 -0
  259. package/lib/design-tokens/js/tokens/functional/components/icon-button/colors.js +19 -0
  260. package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
  261. package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
  262. package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
  263. package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
  264. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  265. package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
  266. package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
  267. package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
  268. package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
  269. package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
  270. package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
  271. package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  272. package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
  273. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  274. package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
  275. package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
  276. package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
  277. package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
  278. package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
  279. package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
  280. package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
  281. package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
  282. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +1 -1
  283. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  284. package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
  285. package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
  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 +16 -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 +10 -0
  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/footer/base.scss +1 -1
  313. package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
  314. package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
  315. package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
  316. package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
  317. package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
  318. package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
  319. package/lib/design-tokens/scss/tokens/functional/components/icon-button/base.scss +12 -0
  320. package/lib/design-tokens/scss/tokens/functional/components/icon-button/colors.scss +18 -0
  321. package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
  322. package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
  323. package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
  324. package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
  325. package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
  326. package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
  327. package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
  328. package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
  329. package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
  330. package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
  331. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
  332. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
  333. package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
  334. package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
  335. package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
  336. package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
  337. package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
  338. package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
  339. package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
  340. package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
  341. package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
  342. package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
  343. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +1 -1
  344. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
  345. package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
  346. package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
  347. package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
  348. package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
  349. package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
  350. package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
  351. package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
  352. package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
  353. package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
  354. package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
  355. package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
  356. package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
  357. package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
  358. package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
  359. package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
  360. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  361. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  362. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  363. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  364. package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
  365. package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
  366. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  367. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  368. package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
  369. package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
  370. package/lib/design-tokens/ts/tokens/functional/components/button/base.d.ts +28 -0
  371. package/lib/design-tokens/ts/tokens/functional/components/button/base.js +25 -0
  372. package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
  373. package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
  374. package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
  375. package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
  376. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
  377. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  378. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
  379. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  380. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  381. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  382. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  383. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  384. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
  385. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
  386. package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
  387. package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
  388. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
  389. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
  390. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
  391. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  392. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
  393. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
  394. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
  395. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
  396. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  397. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  398. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
  399. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
  400. package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.d.ts +34 -0
  401. package/lib/design-tokens/ts/tokens/functional/components/icon-button/base.js +31 -0
  402. package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.d.ts +44 -0
  403. package/lib/design-tokens/ts/tokens/functional/components/icon-button/colors.js +41 -0
  404. package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
  405. package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
  406. package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
  407. package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
  408. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
  409. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
  410. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
  411. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
  412. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  413. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  414. package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
  415. package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
  416. package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
  417. package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
  418. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
  419. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
  420. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
  421. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
  422. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
  423. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
  424. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
  425. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
  426. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
  427. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  428. package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
  429. package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
  430. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  431. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  432. package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
  433. package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
  434. package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
  435. package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
  436. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
  437. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
  438. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
  439. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
  440. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
  441. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
  442. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
  443. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
  444. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
  445. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
  446. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
  447. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
  448. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +1 -1
  449. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +1 -1
  450. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
  451. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  452. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
  453. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
  454. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
  455. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
  456. package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
  457. package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
  458. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
  459. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
  460. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
  461. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
  462. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  463. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  464. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  465. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  466. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  467. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  468. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  469. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  470. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  471. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  472. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  473. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  474. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  475. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  476. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  477. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  478. package/lib/forms/TextInput/TextInput.d.ts +4 -2
  479. package/lib/index.d.ts +1 -0
  480. package/lib/index.js +1 -1
  481. package/llms.txt +3 -2
  482. package/package.json +1 -1
  483. package/esm/ActionMenu/ActionMenu.module-BAeHTqHw.css +0 -1
  484. package/esm/Button/Button.module-9oHHqqnx.css +0 -1
  485. package/esm/ButtonGroup/ButtonGroup.module-wZYyupar.css +0 -1
  486. package/esm/Tooltip/Tooltip.module-5Km7qGR5.css +0 -1
  487. package/esm/forms/TextInput/TextInput.module-CrmcmO_m.css +0 -1
  488. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes-B69RzUbe.css +0 -1
@@ -1,32 +1,54 @@
1
1
  import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
2
2
  import { Button as t } from "../Button/Button.js";
3
- import { ActionMenu as n } from "../ActionMenu/ActionMenu.js";
4
- import r from "./ButtonGroup.module.js";
5
- import i, { forwardRef as a } from "react";
6
- import { jsx as o } from "react/jsx-runtime";
3
+ import { IconButton as n } from "../IconButton/IconButton.js";
4
+ import { ActionMenu as r } from "../ActionMenu/ActionMenu.js";
5
+ import i from "./ButtonGroup.module.js";
6
+ import a, { forwardRef as o } from "react";
7
+ import { jsx as s } from "react/jsx-runtime";
7
8
  //#region src/ButtonGroup/ButtonGroup.tsx
8
- var s = a(({ buttonSize: a = "medium", buttonsAs: s, className: c, children: l, ...u }, d) => {
9
- let f = i.Children.toArray(l).filter((e) => i.isValidElement(e) && (e.type === t || e.type === n)).slice(0, 2).map((e, r) => {
10
- let o = r === 0 ? "primary" : "secondary";
11
- if (i.isValidElement(e) && e.type === t) return i.cloneElement(e, {
12
- size: e.props.size ?? a,
13
- as: e.props.as ?? s,
14
- variant: e.props.variant ?? o
15
- });
16
- let c = e, l = a === "large" ? "medium" : a, u = i.Children.map(c.props.children, (e) => i.isValidElement(e) && e.type === n.Button ? i.cloneElement(e, { variant: e.props.variant ?? o }) : e);
17
- return i.cloneElement(c, {
18
- children: u,
19
- size: c.props.size ?? l
9
+ var c = ["default", "joined"], l = c[0], u = o(({ buttonSize: o = "medium", buttonsAs: c, className: u, children: d, variant: f = l, ...p }, m) => {
10
+ let h = a.Children.toArray(d).filter((e) => a.isValidElement(e) && (e.type === t || e.type === n || e.type === r)), g = h.length > 0 && h.every((e) => e.type === t || e.type === n), _ = f === "joined" && g, v = _ ? h : h.slice(0, 2);
11
+ process.env.NODE_ENV !== "production" && f === "joined" && !g && console.warn("ButtonGroup variant=\"joined\" supports only Button and IconButton children.");
12
+ let y = v.map((l, u) => {
13
+ let d = _ ? "secondary" : u === 0 ? "primary" : "secondary";
14
+ if (a.isValidElement(l) && l.type === t) {
15
+ let t = a.cloneElement(l, {
16
+ size: l.props.size ?? o,
17
+ as: l.props.as ?? c,
18
+ variant: l.props.variant ?? d,
19
+ className: e(l.props.className, _ && i.ButtonGroup__joinedButton)
20
+ });
21
+ return _ ? /* @__PURE__ */ s("span", {
22
+ className: i.ButtonGroup__item,
23
+ children: t
24
+ }, l.key ?? u) : t;
25
+ }
26
+ if (a.isValidElement(l) && l.type === n) {
27
+ let t = a.cloneElement(l, {
28
+ size: l.props.size ?? o,
29
+ as: l.props.as ?? c,
30
+ variant: l.props.variant ?? d,
31
+ className: e(l.props.className, _ && i.ButtonGroup__joinedButton)
32
+ });
33
+ return _ ? /* @__PURE__ */ s("span", {
34
+ className: i.ButtonGroup__item,
35
+ children: t
36
+ }, l.key ?? u) : t;
37
+ }
38
+ let f = l, p = o === "large" ? "medium" : o, m = a.Children.map(f.props.children, (e) => a.isValidElement(e) && e.type === r.Button ? a.cloneElement(e, { variant: e.props.variant ?? d }) : e);
39
+ return a.cloneElement(f, {
40
+ children: m,
41
+ size: f.props.size ?? p
20
42
  });
21
43
  });
22
- return /* @__PURE__ */ o("section", {
23
- ref: d,
24
- ...u,
25
- className: e(r.ButtonGroup, c),
26
- children: f
44
+ return /* @__PURE__ */ s("section", {
45
+ ref: m,
46
+ ...p,
47
+ className: e(i.ButtonGroup, _ && i["ButtonGroup--variant-joined"], u),
48
+ children: y
27
49
  });
28
50
  });
29
51
  //#endregion
30
- export { s as ButtonGroup };
52
+ export { u as ButtonGroup, c as ButtonGroupVariants, l as defaultButtonGroupVariant };
31
53
 
32
54
  //# sourceMappingURL=ButtonGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.js","names":[],"sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, {forwardRef, type Ref} from 'react'\nimport {clsx} from 'clsx'\nimport type {BaseProps} from '../component-helpers'\nimport {Button, ButtonProps} from '../Button'\nimport {ActionMenu, ActionMenuProps} from '../ActionMenu'\nimport styles from './ButtonGroup.module.css'\n\nexport type PrimerBrandButtonType = React.ReactElement<ButtonProps<React.ElementType<'button' | 'a'>>>\nexport type PrimerBrandActionMenuType = React.ReactElement<ActionMenuProps>\nexport type ButtonGroupChild = PrimerBrandButtonType | PrimerBrandActionMenuType | false | null | undefined\n\nexport type ButtonGroupProps = BaseProps<HTMLDivElement> & {\n children: ButtonGroupChild | ButtonGroupChild[]\n buttonSize?: ButtonProps<'button' | 'a'>['size']\n buttonsAs?: 'button' | 'a'\n}\n\nexport const ButtonGroup = forwardRef(\n ({buttonSize = 'medium', buttonsAs, className, children, ...props}: ButtonGroupProps, ref: Ref<HTMLDivElement>) => {\n const buttonsToRender = React.Children.toArray(children)\n .filter(\n (child): child is React.ReactElement =>\n React.isValidElement(child) && (child.type === Button || child.type === ActionMenu),\n )\n .slice(0, 2)\n .map((child, index) => {\n const variant = index === 0 ? 'primary' : 'secondary'\n\n if (React.isValidElement<ButtonProps<'button' | 'a'>>(child) && child.type === Button) {\n return React.cloneElement(child, {\n size: child.props.size ?? buttonSize,\n as: child.props.as ?? buttonsAs,\n variant: child.props.variant ?? variant,\n })\n }\n\n const actionMenu = child as PrimerBrandActionMenuType\n const actionMenuSize = buttonSize === 'large' ? 'medium' : buttonSize\n const actionMenuChildren = React.Children.map(actionMenu.props.children, actionMenuChild => {\n if (\n React.isValidElement<React.ComponentProps<typeof ActionMenu.Button>>(actionMenuChild) &&\n actionMenuChild.type === ActionMenu.Button\n ) {\n return React.cloneElement(actionMenuChild, {\n variant: actionMenuChild.props.variant ?? variant,\n })\n }\n return actionMenuChild\n })\n\n return React.cloneElement(actionMenu, {\n children: actionMenuChildren,\n size: actionMenu.props.size ?? actionMenuSize,\n })\n })\n\n return (\n <section ref={ref} {...props} className={clsx(styles.ButtonGroup, className)}>\n {buttonsToRender}\n </section>\n )\n },\n)\n"],"mappings":";;;;;;;AAiBA,IAAa,IAAc,GACxB,EAAC,gBAAa,UAAU,cAAW,cAAW,aAAU,GAAG,KAA0B,MAA6B;CACjH,IAAM,IAAkB,EAAM,SAAS,QAAQ,CAAQ,CAAC,CACrD,QACE,MACC,EAAM,eAAe,CAAK,MAAM,EAAM,SAAS,KAAU,EAAM,SAAS,EAC5E,CAAC,CACA,MAAM,GAAG,CAAC,CAAC,CACX,KAAK,GAAO,MAAU;EACrB,IAAM,IAAU,MAAU,IAAI,YAAY;EAE1C,IAAI,EAAM,eAA4C,CAAK,KAAK,EAAM,SAAS,GAC7E,OAAO,EAAM,aAAa,GAAO;GAC/B,MAAM,EAAM,MAAM,QAAQ;GAC1B,IAAI,EAAM,MAAM,MAAM;GACtB,SAAS,EAAM,MAAM,WAAW;EAClC,CAAC;EAGH,IAAM,IAAa,GACb,IAAiB,MAAe,UAAU,WAAW,GACrD,IAAqB,EAAM,SAAS,IAAI,EAAW,MAAM,WAAU,MAErE,EAAM,eAA+D,CAAe,KACpF,EAAgB,SAAS,EAAW,SAE7B,EAAM,aAAa,GAAiB,EACzC,SAAS,EAAgB,MAAM,WAAW,EAC5C,CAAC,IAEI,CACR;EAED,OAAO,EAAM,aAAa,GAAY;GACpC,UAAU;GACV,MAAM,EAAW,MAAM,QAAQ;EACjC,CAAC;CACH,CAAC;CAEH,OACE,kBAAC,WAAD;EAAc;EAAK,GAAI;EAAO,WAAW,EAAK,EAAO,aAAa,CAAS;YACxE;CACM,CAAA;AAEb,CACF"}
1
+ {"version":3,"file":"ButtonGroup.js","names":[],"sources":["../../src/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import React, {forwardRef, type Ref} from 'react'\nimport {clsx} from 'clsx'\nimport type {BaseProps} from '../component-helpers'\nimport {Button, ButtonProps} from '../Button'\nimport {IconButton, type IconButtonProps} from '../IconButton'\nimport {ActionMenu, ActionMenuProps} from '../ActionMenu'\nimport styles from './ButtonGroup.module.css'\n\nexport type PrimerBrandButtonType = React.ReactElement<ButtonProps<React.ElementType<'button' | 'a'>>>\nexport type PrimerBrandIconButtonType = React.ReactElement<IconButtonProps<React.ElementType<'button' | 'a'>>>\nexport type PrimerBrandActionMenuType = React.ReactElement<ActionMenuProps>\nexport const ButtonGroupVariants = ['default', 'joined'] as const\nexport const defaultButtonGroupVariant = ButtonGroupVariants[0]\n\nexport type ButtonGroupVariant = (typeof ButtonGroupVariants)[number]\nexport type ButtonGroupChild =\n | PrimerBrandButtonType\n | PrimerBrandIconButtonType\n | PrimerBrandActionMenuType\n | false\n | null\n | undefined\n\nexport type ButtonGroupProps = BaseProps<HTMLDivElement> & {\n children: ButtonGroupChild | ButtonGroupChild[]\n buttonSize?: ButtonProps<'button' | 'a'>['size']\n buttonsAs?: 'button' | 'a'\n variant?: ButtonGroupVariant\n}\n\nexport const ButtonGroup = forwardRef(\n (\n {\n buttonSize = 'medium',\n buttonsAs,\n className,\n children,\n variant = defaultButtonGroupVariant,\n ...props\n }: ButtonGroupProps,\n ref: Ref<HTMLDivElement>,\n ) => {\n const supportedChildren = React.Children.toArray(children).filter(\n (child): child is React.ReactElement =>\n React.isValidElement(child) &&\n (child.type === Button || child.type === IconButton || child.type === ActionMenu),\n )\n const supportsJoinedVariant =\n supportedChildren.length > 0 &&\n supportedChildren.every(child => child.type === Button || child.type === IconButton)\n\n const isJoinedGroup = variant === 'joined' && supportsJoinedVariant\n\n const childrenToRender = isJoinedGroup ? supportedChildren : supportedChildren.slice(0, 2)\n\n if (process.env.NODE_ENV !== 'production' && variant === 'joined' && !supportsJoinedVariant) {\n // eslint-disable-next-line no-console\n console.warn('ButtonGroup variant=\"joined\" supports only Button and IconButton children.')\n }\n\n const buttonsToRender = childrenToRender.map((child, index) => {\n const childVariant = isJoinedGroup ? 'secondary' : index === 0 ? 'primary' : 'secondary'\n\n if (React.isValidElement<ButtonProps<'button' | 'a'>>(child) && child.type === Button) {\n const button = React.cloneElement(child, {\n size: child.props.size ?? buttonSize,\n as: child.props.as ?? buttonsAs,\n variant: child.props.variant ?? childVariant,\n className: clsx(child.props.className, isJoinedGroup && styles.ButtonGroup__joinedButton),\n })\n\n if (isJoinedGroup) {\n return (\n <span className={styles.ButtonGroup__item} key={child.key ?? index}>\n {button}\n </span>\n )\n }\n\n return button\n }\n\n if (React.isValidElement<IconButtonProps<'button' | 'a'>>(child) && child.type === IconButton) {\n const iconButton = React.cloneElement(child, {\n size: child.props.size ?? buttonSize,\n as: child.props.as ?? buttonsAs,\n variant: child.props.variant ?? childVariant,\n className: clsx(child.props.className, isJoinedGroup && styles.ButtonGroup__joinedButton),\n })\n\n if (isJoinedGroup) {\n return (\n <span className={styles.ButtonGroup__item} key={child.key ?? index}>\n {iconButton}\n </span>\n )\n }\n\n return iconButton\n }\n\n const actionMenu = child as PrimerBrandActionMenuType\n const actionMenuSize = buttonSize === 'large' ? 'medium' : buttonSize\n const actionMenuChildren = React.Children.map(actionMenu.props.children, actionMenuChild => {\n if (\n React.isValidElement<React.ComponentProps<typeof ActionMenu.Button>>(actionMenuChild) &&\n actionMenuChild.type === ActionMenu.Button\n ) {\n return React.cloneElement(actionMenuChild, {\n variant: actionMenuChild.props.variant ?? childVariant,\n })\n }\n return actionMenuChild\n })\n\n return React.cloneElement(actionMenu, {\n children: actionMenuChildren,\n size: actionMenu.props.size ?? actionMenuSize,\n })\n })\n\n return (\n <section\n ref={ref}\n {...props}\n className={clsx(styles.ButtonGroup, isJoinedGroup && styles['ButtonGroup--variant-joined'], className)}\n >\n {buttonsToRender}\n </section>\n )\n },\n)\n"],"mappings":";;;;;;;;AAWA,IAAa,IAAsB,CAAC,WAAW,QAAQ,GAC1C,IAA4B,EAAoB,IAkBhD,IAAc,GAEvB,EACE,gBAAa,UACb,cACA,cACA,aACA,aAAU,GACV,GAAG,KAEL,MACG;CACH,IAAM,IAAoB,EAAM,SAAS,QAAQ,CAAQ,CAAC,CAAC,QACxD,MACC,EAAM,eAAe,CAAK,MACzB,EAAM,SAAS,KAAU,EAAM,SAAS,KAAc,EAAM,SAAS,EAC1E,GACM,IACJ,EAAkB,SAAS,KAC3B,EAAkB,OAAM,MAAS,EAAM,SAAS,KAAU,EAAM,SAAS,CAAU,GAE/E,IAAgB,MAAY,YAAY,GAExC,IAAmB,IAAgB,IAAoB,EAAkB,MAAM,GAAG,CAAC;CAEzF,AAAA,QAAA,IAAA,aAA6B,gBAAgB,MAAY,YAAY,CAAC,KAEpE,QAAQ,KAAK,8EAA4E;CAG3F,IAAM,IAAkB,EAAiB,KAAK,GAAO,MAAU;EAC7D,IAAM,IAAe,IAAgB,cAAc,MAAU,IAAI,YAAY;EAE7E,IAAI,EAAM,eAA4C,CAAK,KAAK,EAAM,SAAS,GAAQ;GACrF,IAAM,IAAS,EAAM,aAAa,GAAO;IACvC,MAAM,EAAM,MAAM,QAAQ;IAC1B,IAAI,EAAM,MAAM,MAAM;IACtB,SAAS,EAAM,MAAM,WAAW;IAChC,WAAW,EAAK,EAAM,MAAM,WAAW,KAAiB,EAAO,yBAAyB;GAC1F,CAAC;GAUD,OARI,IAEA,kBAAC,QAAD;IAAM,WAAW,EAAO;cACrB;GACG,GAF0C,EAAM,OAAO,CAEvD,IAIH;EACT;EAEA,IAAI,EAAM,eAAgD,CAAK,KAAK,EAAM,SAAS,GAAY;GAC7F,IAAM,IAAa,EAAM,aAAa,GAAO;IAC3C,MAAM,EAAM,MAAM,QAAQ;IAC1B,IAAI,EAAM,MAAM,MAAM;IACtB,SAAS,EAAM,MAAM,WAAW;IAChC,WAAW,EAAK,EAAM,MAAM,WAAW,KAAiB,EAAO,yBAAyB;GAC1F,CAAC;GAUD,OARI,IAEA,kBAAC,QAAD;IAAM,WAAW,EAAO;cACrB;GACG,GAF0C,EAAM,OAAO,CAEvD,IAIH;EACT;EAEA,IAAM,IAAa,GACb,IAAiB,MAAe,UAAU,WAAW,GACrD,IAAqB,EAAM,SAAS,IAAI,EAAW,MAAM,WAAU,MAErE,EAAM,eAA+D,CAAe,KACpF,EAAgB,SAAS,EAAW,SAE7B,EAAM,aAAa,GAAiB,EACzC,SAAS,EAAgB,MAAM,WAAW,EAC5C,CAAC,IAEI,CACR;EAED,OAAO,EAAM,aAAa,GAAY;GACpC,UAAU;GACV,MAAM,EAAW,MAAM,QAAQ;EACjC,CAAC;CACH,CAAC;CAED,OACE,kBAAC,WAAD;EACO;EACL,GAAI;EACJ,WAAW,EAAK,EAAO,aAAa,KAAiB,EAAO,gCAAgC,CAAS;YAEpG;CACM,CAAA;AAEb,CACF"}
@@ -0,0 +1 @@
1
+ .Primer_Brand__ButtonGroup-module__ButtonGroup___YuqTd{gap:var(--base-size-8) var(--base-size-16);flex-flow:wrap;display:inline-flex}.Primer_Brand__ButtonGroup-module__ButtonGroup___YuqTd>*{flex-grow:1}.Primer_Brand__ButtonGroup-module__ButtonGroup--variant-joined___JqJHW{flex-wrap:nowrap;gap:0}.Primer_Brand__ButtonGroup-module__ButtonGroup--variant-joined___JqJHW .Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0{flex-grow:0;display:flex;position:relative}.Primer_Brand__ButtonGroup-module__ButtonGroup--variant-joined___JqJHW .Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0:not(:first-child){margin-inline-start:calc(var(--brand-borderWidth-thin) * -1)}.Primer_Brand__ButtonGroup-module__ButtonGroup--variant-joined___JqJHW .Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0:focus-within{z-index:1}.Primer_Brand__ButtonGroup-module__ButtonGroup__joinedButton___XhlHg.Primer_Brand__ButtonGroup-module__ButtonGroup__joinedButton___XhlHg{border-radius:0}.Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0:first-child .Primer_Brand__ButtonGroup-module__ButtonGroup__joinedButton___XhlHg{border-start-start-radius:var(--brand-borderRadius-medium);border-end-start-radius:var(--brand-borderRadius-medium)}.Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0:last-child .Primer_Brand__ButtonGroup-module__ButtonGroup__joinedButton___XhlHg{border-start-end-radius:var(--brand-borderRadius-medium);border-end-end-radius:var(--brand-borderRadius-medium)}
@@ -1,6 +1,11 @@
1
- import './ButtonGroup.module-wZYyupar.css';//#region src/ButtonGroup/ButtonGroup.module.css
2
- var e = "Primer_Brand__ButtonGroup-module__ButtonGroup___YuqTd", t = { ButtonGroup: e };
1
+ import './ButtonGroup.module-pJbqxGBe.css';//#region src/ButtonGroup/ButtonGroup.module.css
2
+ var e = "Primer_Brand__ButtonGroup-module__ButtonGroup___YuqTd", t = "Primer_Brand__ButtonGroup-module__ButtonGroup__item___34yE0", n = "Primer_Brand__ButtonGroup-module__ButtonGroup__joinedButton___XhlHg", r = {
3
+ ButtonGroup: e,
4
+ "ButtonGroup--variant-joined": "Primer_Brand__ButtonGroup-module__ButtonGroup--variant-joined___JqJHW",
5
+ ButtonGroup__item: t,
6
+ ButtonGroup__joinedButton: n
7
+ };
3
8
  //#endregion
4
- export { e as ButtonGroup, t as default };
9
+ export { e as ButtonGroup, t as ButtonGroup__item, n as ButtonGroup__joinedButton, r as default };
5
10
 
6
11
  //# sourceMappingURL=ButtonGroup.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonGroup.module.js","names":[],"sources":["../../src/ButtonGroup/ButtonGroup.module.css"],"sourcesContent":[".ButtonGroup {\n display: inline-flex;\n gap: var(--base-size-8) var(--base-size-16);\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.ButtonGroup > * {\n flex-grow: 1;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"ButtonGroup.module.js","names":[],"sources":["../../src/ButtonGroup/ButtonGroup.module.css"],"sourcesContent":[".ButtonGroup {\n display: inline-flex;\n gap: var(--base-size-8) var(--base-size-16);\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.ButtonGroup > * {\n flex-grow: 1;\n}\n\n.ButtonGroup--variant-joined {\n gap: 0;\n flex-wrap: nowrap;\n}\n\n.ButtonGroup--variant-joined .ButtonGroup__item {\n position: relative;\n display: flex;\n flex-grow: 0;\n}\n\n.ButtonGroup--variant-joined .ButtonGroup__item:not(:first-child) {\n margin-inline-start: calc(var(--brand-borderWidth-thin) * -1);\n}\n\n.ButtonGroup--variant-joined .ButtonGroup__item:focus-within {\n z-index: 1;\n}\n\n.ButtonGroup__joinedButton.ButtonGroup__joinedButton {\n border-radius: 0;\n}\n\n.ButtonGroup__item:first-child .ButtonGroup__joinedButton {\n border-start-start-radius: var(--brand-borderRadius-medium);\n border-end-start-radius: var(--brand-borderRadius-medium);\n}\n\n.ButtonGroup__item:last-child .ButtonGroup__joinedButton {\n border-start-end-radius: var(--brand-borderRadius-medium);\n border-end-end-radius: var(--brand-borderRadius-medium);\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- .Primer_Brand__FAQGroup-module__FAQGroup___YEL8U{justify-content:space-between;gap:var(--brand-stack-gap-spacious);display:none}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{margin-block-start:var(--base-size-48)}.Primer_Brand__FAQGroup-module__FAQGroup__panel-subHeading___hpXCw{text-transform:uppercase;font-size:var(--brand-text-size-100);line-height:var(--brand-text-lineHeight-100);margin-block-start:calc(var(--base-size-8) + 1px)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist___iBu9X .Primer_Brand__FAQGroup-module__FAQ__heading___HjZwb{display:none}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R{appearance:none;padding-block:var(--base-size-8);cursor:pointer;align-items:center;gap:var(--base-size-12);width:100%;font-family:var(--brand-fontStack-monospace);font-size:var(--brand-text-size-100);font-weight:var(--brand-text-weight-500);line-height:var(--brand-text-lineHeight-100);letter-spacing:.15px;text-transform:uppercase;text-align:start;color:var(--brand-color-text-muted);text-overflow:ellipsis;white-space:nowrap;transition:gap var(--brand-animation-duration-fast) var(--brand-animation-easing-default);background-color:#0000;border:none;padding-inline:0;display:flex;overflow:hidden}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:focus-visible{outline:var(--brand-borderWidth-thick) solid var(--brand-color-focus);outline-offset:2px}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:before{content:"";width:calc(var(--base-size-8) + var(--base-size-2));height:var(--base-size-12);background-color:var(--brand-FAQGroup-buttonIndicator-idle);transform-origin:0;transition:transform var(--brand-animation-duration-fast) var(--brand-animation-easing-default), background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-default);flex-shrink:0;display:block;transform:scaleX(.7)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:hover:before{background-color:var(--brand-FAQGroup-buttonIndicator-hover)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]{color:var(--brand-FAQ-color-tabLabel-selected);gap:calc(var(--base-size-12) + 3px)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]:before{background-color:var(--brand-FAQGroup-buttonIndicator-active);transform:scaleX(1)}.Primer_Brand__FAQGroup-module__FAQGroup__nested-accordion-item___Bh12D summary h4{font-weight:var(--brand-text-weight-200);font-size:var(--brand-text-size-200);line-height:var(--brand-text-lineHeight-200)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist--gridline___9dsD5{padding-inline-start:var(--base-size-48);padding-block:var(--base-size-80)}.Primer_Brand__FAQGroup-module__FAQGroup__content--gridline___Xu44n{border-inline-start:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);padding-inline:var(--base-size-64);padding-block-start:var(--base-size-80);padding-block-end:var(--base-size-96)}@media (forced-colors:active){.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]{border-color:highlight;border-width:var(--brand-borderWidth-thicker);color:highlighttext}}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{padding-inline:var(--base-size-20)}@media screen and (width>=618px){.Primer_Brand__FAQGroup-module__FAQGroup__gridline-wrapper___7IC44{border-block-end:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);max-width:618px;margin-block-start:0;margin-inline:auto}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{max-width:618px;margin:0 auto}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper___pYwfs{padding-block-end:var(--base-size-40)}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper--gridline___nZYpp{border-block-end:var(--brand-color-border-muted) var(--brand-borderWidth-thin) solid}.Primer_Brand__FAQGroup-module__FAQGroup__accordion--gridline___6GLEm:first-child summary{border-block-start:none!important}.Primer_Brand__FAQGroup-module__FAQGroup__accordion--gridline___6GLEm:last-child summary{border-block-end:none!important}}@media screen and (width>=63.25rem){.Primer_Brand__FAQGroup-module__FAQGroup___YEL8U{display:grid}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{display:none}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{max-width:100%;padding-inline:0}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper___pYwfs{padding-block-end:var(--base-size-64)}}@media screen and (width>=80rem){.Primer_Brand__FAQGroup-module__FAQGroup__tablist--gridline___9dsD5{border-inline-start:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}.Primer_Brand__FAQGroup-module__FAQGroup__content--gridline___Xu44n{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}
1
+ .Primer_Brand__FAQGroup-module__FAQGroup___YEL8U{justify-content:space-between;gap:var(--brand-stack-gap-spacious);display:none}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{margin-block-start:var(--base-size-48)}.Primer_Brand__FAQGroup-module__FAQGroup__panel-subHeading___hpXCw{text-transform:uppercase;font-size:var(--brand-text-size-100);line-height:var(--brand-text-lineHeight-100);margin-block-start:calc(var(--base-size-8) + 1px)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist___iBu9X .Primer_Brand__FAQGroup-module__FAQ__heading___HjZwb{display:none}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R{appearance:none;padding-block:var(--base-size-8);cursor:pointer;align-items:center;gap:var(--base-size-12);width:100%;font-family:var(--brand-fontStack-monospace);font-size:var(--brand-text-size-100);font-weight:var(--brand-text-weight-500);line-height:var(--brand-text-lineHeight-100);letter-spacing:.15px;text-transform:uppercase;text-align:start;color:var(--brand-color-text-muted);text-overflow:ellipsis;white-space:nowrap;transition:gap var(--brand-animation-duration-fast) var(--brand-animation-easing-default);background-color:#0000;border:none;padding-inline:0;display:flex;overflow:hidden}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:focus-visible{outline:var(--brand-borderWidth-thick) solid var(--brand-color-focus);outline-offset:2px}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:before{content:"";width:calc(var(--base-size-8) + var(--base-size-2));height:var(--base-size-12);background-color:var(--brand-FAQGroup-buttonIndicator-idle);transform-origin:0;transition:transform var(--brand-animation-duration-fast) var(--brand-animation-easing-default), background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-default);flex-shrink:0;display:block;transform:scaleX(.7)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R:hover:before{background-color:var(--brand-FAQGroup-buttonIndicator-hover)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]{color:var(--brand-FAQ-color-tabLabel-selected);gap:calc(var(--base-size-12) + 3px)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]:before{background-color:var(--brand-FAQGroup-buttonIndicator-active);transform:scaleX(1)}.Primer_Brand__FAQGroup-module__FAQGroup__nested-accordion-item___Bh12D summary h4{font-weight:var(--brand-text-weight-200);font-size:var(--brand-text-size-200);line-height:var(--brand-text-lineHeight-200)}.Primer_Brand__FAQGroup-module__FAQGroup__tablist--gridline___9dsD5{padding-inline-start:var(--base-size-48);padding-block:var(--base-size-80)}.Primer_Brand__FAQGroup-module__FAQGroup__content--gridline___Xu44n{border-inline-start:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);padding-inline:var(--base-size-64);padding-block-start:var(--base-size-80);padding-block-end:var(--base-size-96)}@media (forced-colors:active){.Primer_Brand__FAQGroup-module__FAQGroup__tablist-button___VAe_R[aria-selected=true]{border-color:highlight;border-width:var(--brand-borderWidth-thicker);color:highlighttext}}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{padding-inline:var(--base-size-20)}@media screen and (width>=618px){.Primer_Brand__FAQGroup-module__FAQGroup__gridline-wrapper___7IC44{border-block-end:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);max-width:618px;margin-block-start:0;margin-inline:auto}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{max-width:618px;margin:0 auto}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper___pYwfs{padding-block-end:var(--base-size-40)}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper--gridline___nZYpp{border-block-end:var(--brand-color-border-muted) var(--brand-borderWidth-thin) solid}.Primer_Brand__FAQGroup-module__FAQGroup__accordion--gridline___6GLEm:first-child summary{border-block-start:none!important}.Primer_Brand__FAQGroup-module__FAQGroup__accordion--gridline___6GLEm:last-child summary{border-block-end:none!important}}@media screen and (width>=63.25rem){.Primer_Brand__FAQGroup-module__FAQGroup___YEL8U{display:grid}.Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM{display:none}.Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{max-width:100%;padding-inline:0}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper--gridline___nZYpp .Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB{padding-inline-start:var(--base-size-44)}.Primer_Brand__FAQGroup-module__FAQGroup__heading-wrapper___pYwfs{padding-block-end:var(--base-size-64)}}@media screen and (width>=80rem){.Primer_Brand__FAQGroup-module__FAQGroup__tablist--gridline___9dsD5{border-inline-start:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}.Primer_Brand__FAQGroup-module__FAQGroup__content--gridline___Xu44n{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}
@@ -1,4 +1,4 @@
1
- import './FAQGroup.module-qm5jP0zF.css';//#region src/FAQ/FAQGroup.module.css
1
+ import './FAQGroup.module-DNyxktEm.css';//#region src/FAQ/FAQGroup.module.css
2
2
  var e = "Primer_Brand__FAQGroup-module__FAQGroup___YEL8U", t = "Primer_Brand__FAQGroup-module__FAQGroup__accordion___UP5VM", n = "Primer_Brand__FAQGroup-module__FAQGroup__tablist___iBu9X", r = "Primer_Brand__FAQGroup-module__FAQ__heading___HjZwb", i = "Primer_Brand__FAQGroup-module__FAQGroup__heading___RypDB", a = {
3
3
  FAQGroup: e,
4
4
  FAQGroup__accordion: t,
@@ -1 +1 @@
1
- {"version":3,"file":"FAQGroup.module.js","names":[],"sources":["../../src/FAQ/FAQGroup.module.css"],"sourcesContent":[".FAQGroup {\n display: none;\n justify-content: space-between;\n gap: var(--brand-stack-gap-spacious);\n}\n\n.FAQGroup__accordion {\n margin-block-start: var(--base-size-48);\n}\n\n.FAQGroup__panel-subHeading {\n margin-block-start: calc(var(--base-size-8) + 1px);\n text-transform: uppercase;\n font-size: var(--brand-text-size-100);\n line-height: var(--brand-text-lineHeight-100);\n}\n\n.FAQGroup__tablist .FAQ__heading {\n display: none;\n}\n\n.FAQGroup__tablist-button {\n appearance: none;\n border: none;\n background-color: transparent;\n padding-block: var(--base-size-8);\n padding-inline: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: var(--base-size-12);\n width: 100%;\n font-family: var(--brand-fontStack-monospace);\n font-size: var(--brand-text-size-100);\n font-weight: var(--brand-text-weight-500);\n line-height: var(--brand-text-lineHeight-100);\n letter-spacing: 0.15px;\n text-transform: uppercase;\n text-align: start;\n color: var(--brand-color-text-muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n transition: gap var(--brand-animation-duration-fast) var(--brand-animation-easing-default);\n}\n\n.FAQGroup__tablist-button:focus-visible {\n outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);\n outline-offset: 2px;\n}\n\n.FAQGroup__tablist-button::before {\n content: '';\n display: block;\n width: calc(var(--base-size-8) + var(--base-size-2));\n height: var(--base-size-12);\n flex-shrink: 0;\n background-color: var(--brand-FAQGroup-buttonIndicator-idle);\n transform: scaleX(0.7);\n transform-origin: left;\n transition: transform var(--brand-animation-duration-fast) var(--brand-animation-easing-default),\n background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-default);\n}\n\n.FAQGroup__tablist-button:hover::before {\n background-color: var(--brand-FAQGroup-buttonIndicator-hover);\n}\n\n.FAQGroup__tablist-button[aria-selected='true'] {\n color: var(--brand-FAQ-color-tabLabel-selected);\n gap: calc(var(--base-size-12) + 3px);\n}\n\n.FAQGroup__tablist-button[aria-selected='true']::before {\n transform: scaleX(1);\n background-color: var(--brand-FAQGroup-buttonIndicator-active);\n}\n\n.FAQGroup__nested-accordion-item summary h4 {\n font-weight: var(--brand-text-weight-200);\n font-size: var(--brand-text-size-200);\n line-height: var(--brand-text-lineHeight-200);\n}\n\n/* Gridline variant */\n\n.FAQGroup__tablist--gridline {\n padding-inline-start: var(--base-size-48);\n padding-block: var(--base-size-80);\n}\n\n.FAQGroup__content--gridline {\n border-inline-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n padding-inline: var(--base-size-64);\n padding-block-start: var(--base-size-80);\n padding-block-end: var(--base-size-96);\n}\n\n@media (forced-colors: active) {\n .FAQGroup__tablist-button[aria-selected='true'] {\n border-color: Highlight;\n border-width: var(--brand-borderWidth-thicker);\n color: HighlightText;\n }\n}\n\n.FAQGroup__heading {\n padding-inline: var(--base-size-20);\n}\n\n/* Custom tablet breakpoint */\n@media screen and (min-width: 618px) {\n .FAQGroup__gridline-wrapper {\n border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n\n .FAQGroup__accordion {\n margin-block-start: 0;\n max-width: 618px;\n margin-inline: auto;\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n .FAQGroup__heading {\n max-width: 618px;\n margin: 0 auto;\n }\n\n .FAQGroup__heading-wrapper {\n padding-block-end: var(--base-size-40);\n }\n .FAQGroup__heading-wrapper--gridline {\n border-block-end: var(--brand-color-border-muted) var(--brand-borderWidth-thin) solid;\n }\n\n .FAQGroup__accordion--gridline:first-child summary {\n border-block-start: none !important;\n }\n\n .FAQGroup__accordion--gridline:last-child summary {\n border-block-end: none !important;\n }\n}\n\n@media screen and (min-width: 63.25rem) {\n .FAQGroup {\n display: grid;\n }\n\n .FAQGroup__accordion {\n display: none;\n }\n\n .FAQGroup__heading {\n padding-inline: 0;\n max-width: 100%;\n }\n\n .FAQGroup__heading-wrapper {\n padding-block-end: var(--base-size-64);\n }\n}\n\n@media screen and (min-width: 80rem) {\n .FAQGroup__tablist--gridline {\n border-inline-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n\n .FAQGroup__content--gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FAQGroup.module.js","names":[],"sources":["../../src/FAQ/FAQGroup.module.css"],"sourcesContent":[".FAQGroup {\n display: none;\n justify-content: space-between;\n gap: var(--brand-stack-gap-spacious);\n}\n\n.FAQGroup__accordion {\n margin-block-start: var(--base-size-48);\n}\n\n.FAQGroup__panel-subHeading {\n margin-block-start: calc(var(--base-size-8) + 1px);\n text-transform: uppercase;\n font-size: var(--brand-text-size-100);\n line-height: var(--brand-text-lineHeight-100);\n}\n\n.FAQGroup__tablist .FAQ__heading {\n display: none;\n}\n\n.FAQGroup__tablist-button {\n appearance: none;\n border: none;\n background-color: transparent;\n padding-block: var(--base-size-8);\n padding-inline: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: var(--base-size-12);\n width: 100%;\n font-family: var(--brand-fontStack-monospace);\n font-size: var(--brand-text-size-100);\n font-weight: var(--brand-text-weight-500);\n line-height: var(--brand-text-lineHeight-100);\n letter-spacing: 0.15px;\n text-transform: uppercase;\n text-align: start;\n color: var(--brand-color-text-muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n transition: gap var(--brand-animation-duration-fast) var(--brand-animation-easing-default);\n}\n\n.FAQGroup__tablist-button:focus-visible {\n outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);\n outline-offset: 2px;\n}\n\n.FAQGroup__tablist-button::before {\n content: '';\n display: block;\n width: calc(var(--base-size-8) + var(--base-size-2));\n height: var(--base-size-12);\n flex-shrink: 0;\n background-color: var(--brand-FAQGroup-buttonIndicator-idle);\n transform: scaleX(0.7);\n transform-origin: left;\n transition: transform var(--brand-animation-duration-fast) var(--brand-animation-easing-default),\n background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-default);\n}\n\n.FAQGroup__tablist-button:hover::before {\n background-color: var(--brand-FAQGroup-buttonIndicator-hover);\n}\n\n.FAQGroup__tablist-button[aria-selected='true'] {\n color: var(--brand-FAQ-color-tabLabel-selected);\n gap: calc(var(--base-size-12) + 3px);\n}\n\n.FAQGroup__tablist-button[aria-selected='true']::before {\n transform: scaleX(1);\n background-color: var(--brand-FAQGroup-buttonIndicator-active);\n}\n\n.FAQGroup__nested-accordion-item summary h4 {\n font-weight: var(--brand-text-weight-200);\n font-size: var(--brand-text-size-200);\n line-height: var(--brand-text-lineHeight-200);\n}\n\n/* Gridline variant */\n\n.FAQGroup__tablist--gridline {\n padding-inline-start: var(--base-size-48);\n padding-block: var(--base-size-80);\n}\n\n.FAQGroup__content--gridline {\n border-inline-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n padding-inline: var(--base-size-64);\n padding-block-start: var(--base-size-80);\n padding-block-end: var(--base-size-96);\n}\n\n@media (forced-colors: active) {\n .FAQGroup__tablist-button[aria-selected='true'] {\n border-color: Highlight;\n border-width: var(--brand-borderWidth-thicker);\n color: HighlightText;\n }\n}\n\n.FAQGroup__heading {\n padding-inline: var(--base-size-20);\n}\n\n/* Custom tablet breakpoint */\n@media screen and (min-width: 618px) {\n .FAQGroup__gridline-wrapper {\n border-block-end: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n\n .FAQGroup__accordion {\n margin-block-start: 0;\n max-width: 618px;\n margin-inline: auto;\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n .FAQGroup__heading {\n max-width: 618px;\n margin: 0 auto;\n }\n\n .FAQGroup__heading-wrapper {\n padding-block-end: var(--base-size-40);\n }\n .FAQGroup__heading-wrapper--gridline {\n border-block-end: var(--brand-color-border-muted) var(--brand-borderWidth-thin) solid;\n }\n\n .FAQGroup__accordion--gridline:first-child summary {\n border-block-start: none !important;\n }\n\n .FAQGroup__accordion--gridline:last-child summary {\n border-block-end: none !important;\n }\n}\n\n@media screen and (min-width: 63.25rem) {\n .FAQGroup {\n display: grid;\n }\n\n .FAQGroup__accordion {\n display: none;\n }\n\n .FAQGroup__heading {\n padding-inline: 0;\n max-width: 100%;\n }\n\n .FAQGroup__heading-wrapper--gridline .FAQGroup__heading {\n padding-inline-start: var(--base-size-44);\n }\n\n .FAQGroup__heading-wrapper {\n padding-block-end: var(--base-size-64);\n }\n}\n\n@media screen and (min-width: 80rem) {\n .FAQGroup__tablist--gridline {\n border-inline-start: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n\n .FAQGroup__content--gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n"],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import type { Icon } from '@primer/octicons-react';
3
+ import { type TooltipDirection } from '../Tooltip';
4
+ import type { BaseProps } from '../component-helpers';
5
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/base.css';
6
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/icon-button/colors-with-modes.css';
7
+ export declare const IconButtonVariants: readonly ["primary", "secondary", "subtle", "danger", "invisible"];
8
+ export declare const IconButtonSizes: readonly ["small", "medium", "large"];
9
+ export declare const defaultIconButtonVariant: "secondary";
10
+ export declare const defaultIconButtonSize: "medium";
11
+ export type IconButtonVariant = (typeof IconButtonVariants)[number];
12
+ export type IconButtonSize = (typeof IconButtonSizes)[number];
13
+ type IconButtonBaseProps<C extends React.ElementType> = Omit<BaseProps<C>, 'ref'> & {
14
+ as?: C;
15
+ variant?: IconButtonVariant;
16
+ icon: Icon;
17
+ 'aria-label': string;
18
+ description?: string;
19
+ inactive?: boolean;
20
+ loading?: boolean;
21
+ loadingAnnouncement?: string;
22
+ rounded?: boolean;
23
+ size?: IconButtonSize;
24
+ tooltipDirection?: TooltipDirection;
25
+ };
26
+ export type IconButtonProps<C extends React.ElementType = 'button'> = IconButtonBaseProps<C> & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonBaseProps<C> | 'children'>;
27
+ type IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & React.RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
28
+ export declare const IconButton: IconButtonComponent;
29
+ export {};
30
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,68 @@
1
+ import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
2
+ import { Button as t, ButtonSizes as n, ButtonVariants as r, defaultButtonSize as i, defaultButtonVariant as a } from "../Button/Button.js";
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 */
5
+ /* 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";
9
+ //#region src/IconButton/IconButton.tsx
10
+ var m = [
11
+ ...r,
12
+ "danger",
13
+ "invisible"
14
+ ], h = [...n], g = a, _ = i, v = {
15
+ root: "IconButton",
16
+ get loadingIndicator() {
17
+ return `${this.root}-loading-indicator`;
18
+ },
19
+ get loadingAnnouncement() {
20
+ return `${this.root}-loading-announcement`;
21
+ }
22
+ };
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;
25
+ process.env.NODE_ENV !== "production" && (i.trim() || console.warn("IconButton requires a non-empty `aria-label`."), [
26
+ C,
27
+ u,
28
+ S
29
+ ].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,
36
+ 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) => {
48
+ e.preventDefault(), e.stopPropagation();
49
+ } : T
50
+ });
51
+ return /* @__PURE__ */ p(d, { children: [F ? /* @__PURE__ */ f(o, {
52
+ ref: j,
53
+ direction: y,
54
+ text: I,
55
+ type: a ? "description" : "label",
56
+ children: z
57
+ }) : z, /* @__PURE__ */ f("span", {
58
+ "aria-live": "polite",
59
+ className: c.IconButton__loadingAnnouncement,
60
+ "data-testid": v.loadingAnnouncement,
61
+ children: N ? m : null
62
+ })] });
63
+ }
64
+ var b = u(y);
65
+ //#endregion
66
+ export { b as IconButton, h as IconButtonSizes, m as IconButtonVariants, _ as defaultIconButtonSize, g as defaultIconButtonVariant };
67
+
68
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +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"}
@@ -0,0 +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)}}
@@ -0,0 +1,19 @@
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 = {
3
+ IconButton: e,
4
+ "IconButton--small": "Primer_Brand__IconButton-module__IconButton--small___KXgb_",
5
+ "IconButton--large": "Primer_Brand__IconButton-module__IconButton--large___ypAna",
6
+ "IconButton--rounded": "Primer_Brand__IconButton-module__IconButton--rounded___g_ngl",
7
+ "IconButton--variant-danger": "Primer_Brand__IconButton-module__IconButton--variant-danger____mjeH",
8
+ "IconButton--variant-invisible": "Primer_Brand__IconButton-module__IconButton--variant-invisible___gp_QC",
9
+ "IconButton--inactive": "Primer_Brand__IconButton-module__IconButton--inactive___UanYd",
10
+ IconButton__icon: t,
11
+ "IconButton--medium": "Primer_Brand__IconButton-module__IconButton--medium____oYr1",
12
+ IconButton__loadingIndicator: n,
13
+ "IconButton-spin": "Primer_Brand__IconButton-module__IconButton-spin___f8JZW",
14
+ IconButton__loadingAnnouncement: r
15
+ };
16
+ //#endregion
17
+ export { e as IconButton, t as IconButton__icon, r as IconButton__loadingAnnouncement, n as IconButton__loadingIndicator, i as default };
18
+
19
+ //# sourceMappingURL=IconButton.module.js.map
@@ -0,0 +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":""}
@@ -0,0 +1,2 @@
1
+ export * from './IconButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/IconButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -2,13 +2,13 @@ import { clsx as e } from "../node_modules/clsx/dist/clsx.js";
2
2
  import { Text as t } from "../Text/Text.js";
3
3
  import { Heading as n } from "../Heading/Heading.js";
4
4
  import { Button as r } from "../Button/Button.js";
5
- import { CheckIcon as i } from "../node_modules/@primer/octicons-react/dist/icons/CheckIcon.js";
6
- import { TriangleDownIcon as a } from "../node_modules/@primer/octicons-react/dist/icons/TriangleDownIcon.js";
7
- import { XIcon as o } from "../node_modules/@primer/octicons-react/dist/icons/XIcon.js";
8
- import { useWindowSize as s } from "../hooks/useWindowSize.js";
9
- import { Accordion as c } from "../Accordion/Accordion.js";
10
- import { UnorderedList as l } from "../list/UnorderedList/UnorderedList.js";
11
- import { Tooltip as u } from "../Tooltip/Tooltip.js";
5
+ import { Tooltip as i } from "../Tooltip/Tooltip.js";
6
+ import { CheckIcon as a } from "../node_modules/@primer/octicons-react/dist/icons/CheckIcon.js";
7
+ import { TriangleDownIcon as o } from "../node_modules/@primer/octicons-react/dist/icons/TriangleDownIcon.js";
8
+ import { XIcon as s } from "../node_modules/@primer/octicons-react/dist/icons/XIcon.js";
9
+ import { useWindowSize as c } from "../hooks/useWindowSize.js";
10
+ import { Accordion as l } from "../Accordion/Accordion.js";
11
+ import { UnorderedList as u } from "../list/UnorderedList/UnorderedList.js";
12
12
  import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes-DBi2l0Re.css';import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options-B9TarQsR.css';/* empty css */
13
13
  /* empty css */
14
14
  import d from "./PricingOptions.module.js";
@@ -190,25 +190,25 @@ var v = {
190
190
  children: c
191
191
  })
192
192
  ]
193
- })), k = p(({ children: t, className: n, "data-testid": r, hasDivider: i = !0, expanded: o, accordionAs: u = "h4", ...p }, m) => {
194
- let { allFeatureListsExpanded: h, updateFeatureListExpanded: y, featureListUserInteracted: b, setFeatureListUserInteracted: C } = x(), { isMedium: w, isXLarge: T, isSmall: E } = s();
193
+ })), k = p(({ children: t, className: n, "data-testid": r, hasDivider: i = !0, expanded: a, accordionAs: s = "h4", ...p }, m) => {
194
+ let { allFeatureListsExpanded: h, updateFeatureListExpanded: y, featureListUserInteracted: b, setFeatureListUserInteracted: C } = x(), { isMedium: w, isXLarge: T, isSmall: E } = c();
195
195
  f.useEffect(() => {
196
- (o === void 0 || typeof o == "object") && C(!1);
196
+ (a === void 0 || typeof a == "object") && C(!1);
197
197
  }, [
198
198
  w,
199
199
  T,
200
200
  E,
201
201
  C,
202
- o
202
+ a
203
203
  ]);
204
204
  let D = f.useMemo(() => {
205
205
  if (b) return h;
206
- if (typeof o == "boolean") return o;
207
- if (o === void 0) return !!(T || w);
208
- let { narrow: e, regular: t, wide: n } = o;
206
+ if (typeof a == "boolean") return a;
207
+ if (a === void 0) return !!(T || w);
208
+ let { narrow: e, regular: t, wide: n } = a;
209
209
  return T ? n : w ? t : e;
210
210
  }, [
211
- o,
211
+ a,
212
212
  h,
213
213
  w,
214
214
  T,
@@ -221,7 +221,7 @@ var v = {
221
221
  Items: []
222
222
  }), e), []).map(({ Heading: e, Items: t }, n) => /* @__PURE__ */ _("div", {
223
223
  className: d["PricingOptions__feature-list-set"],
224
- children: [e, /* @__PURE__ */ g(l, {
224
+ children: [e, /* @__PURE__ */ g(u, {
225
225
  variant: "checked",
226
226
  ...p,
227
227
  children: t
@@ -231,18 +231,18 @@ var v = {
231
231
  ref: m,
232
232
  className: e(d["PricingOptions__feature-list"], i && d["PricingOptions__feature-list--has-divider"], n),
233
233
  "data-testid": r || v.featureList,
234
- children: /* @__PURE__ */ _(c, {
234
+ children: /* @__PURE__ */ _(l, {
235
235
  className: d["PricingOptions__feature-list-accordion"],
236
236
  disableAnimation: !0,
237
237
  open: D,
238
238
  onToggle: (e) => {
239
239
  C(!0), y(e.currentTarget.open);
240
240
  },
241
- children: [/* @__PURE__ */ _(c.Heading, {
242
- as: u,
241
+ children: [/* @__PURE__ */ _(l.Heading, {
242
+ as: s,
243
243
  className: d["PricingOptions__feature-list-accordion-heading"],
244
- children: [O, /* @__PURE__ */ g(a, { className: d["PricingOptions__feature-list-accordion-chevron"] })]
245
- }), /* @__PURE__ */ g(c.Content, {
244
+ children: [O, /* @__PURE__ */ g(o, { className: d["PricingOptions__feature-list-accordion-chevron"] })]
245
+ }), /* @__PURE__ */ g(l.Content, {
246
246
  className: d["PricingOptions__feature-list-accordion-content"],
247
247
  children: k
248
248
  })]
@@ -262,9 +262,9 @@ var v = {
262
262
  size: "subhead-medium",
263
263
  ...a,
264
264
  children: t
265
- })), M = p(({ children: t, className: n, infoTooltip: r, infoTooltipAriaLabel: a, leadingVisual: s, leadingVisualFill: c, variant: f = "included", "data-testid": p, ...m }, h) => {
266
- let y = s ?? (f === "included" ? i : o), b = f === "included" ? "Includes" : "Does not include", x = c ?? (f === "included" ? "var(--brand-color-accent-primary)" : "var(--brand-color-text-muted)");
267
- return /* @__PURE__ */ _(l.Item, {
265
+ })), M = p(({ children: t, className: n, infoTooltip: r, infoTooltipAriaLabel: o, leadingVisual: c, leadingVisualFill: l, variant: f = "included", "data-testid": p, ...m }, h) => {
266
+ let y = c ?? (f === "included" ? a : s), b = f === "included" ? "Includes" : "Does not include", x = l ?? (f === "included" ? "var(--brand-color-accent-primary)" : "var(--brand-color-text-muted)");
267
+ return /* @__PURE__ */ _(u.Item, {
268
268
  className: e(d["PricingOptions__feature-list-item"], { [d["PricingOptions__feature-list-item--excluded"]]: f === "excluded" }, r && d["PricingOptions__feature-list-item--has-info"], n),
269
269
  "data-testid": p || v.featureListItem,
270
270
  leadingVisual: y,
@@ -272,13 +272,13 @@ var v = {
272
272
  leadingVisualFill: x,
273
273
  ref: h,
274
274
  ...m,
275
- children: [t, r && /* @__PURE__ */ g(u, {
275
+ children: [t, r && /* @__PURE__ */ g(i, {
276
276
  text: r,
277
277
  direction: "n",
278
278
  children: /* @__PURE__ */ g("button", {
279
279
  type: "button",
280
280
  className: d["PricingOptions__feature-list-item-info"],
281
- "aria-label": a ?? `More information about ${typeof t == "string" ? t : "this feature"}`,
281
+ "aria-label": o ?? `More information about ${typeof t == "string" ? t : "this feature"}`,
282
282
  children: /* @__PURE__ */ _("svg", {
283
283
  viewBox: "0 0 4 8",
284
284
  fill: "none",
@@ -1,9 +1,13 @@
1
1
  import React from 'react';
2
2
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css';
3
3
  import { BaseProps } from '../component-helpers';
4
- type TooltipDirection = 'n' | 'e' | 's' | 'w';
4
+ export declare const TooltipDirections: readonly ["nw", "n", "ne", "e", "se", "s", "sw", "w"];
5
+ export declare const TooltipDelays: readonly ["short", "medium", "long"];
6
+ export type TooltipDirection = (typeof TooltipDirections)[number];
7
+ export type TooltipDelay = (typeof TooltipDelays)[number];
5
8
  export type TooltipProps = {
6
9
  direction?: TooltipDirection;
10
+ delay?: TooltipDelay;
7
11
  text: string;
8
12
  type?: 'label' | 'description';
9
13
  children?: React.ReactNode;
@@ -22,5 +26,4 @@ export declare const TooltipContext: React.Context<{
22
26
  tooltipId?: string;
23
27
  }>;
24
28
  export declare const Tooltip: React.ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & React.RefAttributes<unknown>>;
25
- export {};
26
29
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAUlE,OAAO,2GAA2G,CAAA;AAClH,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAE9C,KAAK,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAC7C,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,SAAS,CAAC,cAAc,CAAC,CAAA;AAE7B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAChC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACtC,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACtC,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAC1C,CAAA;AAkCD,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E,eAAO,MAAM,OAAO,2FAgKnB,CAAA"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAUlE,OAAO,2GAA2G,CAAA;AAClH,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAE9C,eAAO,MAAM,iBAAiB,uDAAwD,CAAA;AACtF,eAAO,MAAM,aAAa,sCAAuC,CAAA;AACjE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AACjE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,SAAS,CAAC,cAAc,CAAC,CAAA;AAE7B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IAChC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACtC,YAAY,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACtC,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAC1C,CAAA;AAgDD,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E,eAAO,MAAM,OAAO,2FAyNnB,CAAA"}