@kushagradhawan/kookie-ui 0.1.28 → 0.1.30

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 (538) hide show
  1. package/components.css +4742 -2680
  2. package/dist/cjs/components/_internal/base-button.d.ts +36 -0
  3. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  4. package/dist/cjs/components/_internal/base-button.js +1 -1
  5. package/dist/cjs/components/_internal/base-button.js.map +3 -3
  6. package/dist/cjs/components/_internal/base-button.props.d.ts +61 -0
  7. package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
  8. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  9. package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
  10. package/dist/cjs/components/_internal/base-checkbox.props.d.ts +6 -1
  11. package/dist/cjs/components/_internal/base-checkbox.props.d.ts.map +1 -1
  12. package/dist/cjs/components/_internal/base-checkbox.props.js +1 -1
  13. package/dist/cjs/components/_internal/base-checkbox.props.js.map +3 -3
  14. package/dist/cjs/components/_internal/base-menu.props.d.ts +8 -0
  15. package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
  16. package/dist/cjs/components/_internal/base-menu.props.js +1 -1
  17. package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
  18. package/dist/cjs/components/_internal/base-radio.props.d.ts +6 -1
  19. package/dist/cjs/components/_internal/base-radio.props.d.ts.map +1 -1
  20. package/dist/cjs/components/_internal/base-radio.props.js +1 -1
  21. package/dist/cjs/components/_internal/base-radio.props.js.map +3 -3
  22. package/dist/cjs/components/accordion.d.ts +22 -0
  23. package/dist/cjs/components/accordion.d.ts.map +1 -0
  24. package/dist/cjs/components/accordion.js +2 -0
  25. package/dist/cjs/components/accordion.js.map +7 -0
  26. package/dist/cjs/components/accordion.props.d.ts +97 -0
  27. package/dist/cjs/components/accordion.props.d.ts.map +1 -0
  28. package/dist/cjs/components/accordion.props.js +2 -0
  29. package/dist/cjs/components/accordion.props.js.map +7 -0
  30. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  31. package/dist/cjs/components/alert-dialog.js +1 -1
  32. package/dist/cjs/components/alert-dialog.js.map +3 -3
  33. package/dist/cjs/components/alert-dialog.props.d.ts +69 -2
  34. package/dist/cjs/components/alert-dialog.props.d.ts.map +1 -1
  35. package/dist/cjs/components/alert-dialog.props.js +1 -1
  36. package/dist/cjs/components/alert-dialog.props.js.map +3 -3
  37. package/dist/cjs/components/avatar.d.ts.map +1 -1
  38. package/dist/cjs/components/avatar.js +1 -1
  39. package/dist/cjs/components/avatar.js.map +3 -3
  40. package/dist/cjs/components/avatar.props.d.ts +9 -1
  41. package/dist/cjs/components/avatar.props.d.ts.map +1 -1
  42. package/dist/cjs/components/avatar.props.js +1 -1
  43. package/dist/cjs/components/avatar.props.js.map +3 -3
  44. package/dist/cjs/components/badge.d.ts +8 -1
  45. package/dist/cjs/components/badge.d.ts.map +1 -1
  46. package/dist/cjs/components/badge.js +1 -1
  47. package/dist/cjs/components/badge.js.map +3 -3
  48. package/dist/cjs/components/badge.props.d.ts +14 -6
  49. package/dist/cjs/components/badge.props.d.ts.map +1 -1
  50. package/dist/cjs/components/badge.props.js +1 -1
  51. package/dist/cjs/components/badge.props.js.map +3 -3
  52. package/dist/cjs/components/blockquote.props.d.ts +1 -1
  53. package/dist/cjs/components/button.d.ts +53 -1
  54. package/dist/cjs/components/button.d.ts.map +1 -1
  55. package/dist/cjs/components/button.js +1 -1
  56. package/dist/cjs/components/button.js.map +3 -3
  57. package/dist/cjs/components/button.props.d.ts +17 -0
  58. package/dist/cjs/components/button.props.d.ts.map +1 -1
  59. package/dist/cjs/components/button.props.js.map +2 -2
  60. package/dist/cjs/components/callout.d.ts +4 -0
  61. package/dist/cjs/components/callout.d.ts.map +1 -1
  62. package/dist/cjs/components/callout.js +1 -1
  63. package/dist/cjs/components/callout.js.map +3 -3
  64. package/dist/cjs/components/callout.props.d.ts +9 -1
  65. package/dist/cjs/components/callout.props.d.ts.map +1 -1
  66. package/dist/cjs/components/callout.props.js +1 -1
  67. package/dist/cjs/components/callout.props.js.map +3 -3
  68. package/dist/cjs/components/card.d.ts.map +1 -1
  69. package/dist/cjs/components/card.js +1 -1
  70. package/dist/cjs/components/card.js.map +3 -3
  71. package/dist/cjs/components/card.props.d.ts +5 -0
  72. package/dist/cjs/components/card.props.d.ts.map +1 -1
  73. package/dist/cjs/components/card.props.js +1 -1
  74. package/dist/cjs/components/card.props.js.map +3 -3
  75. package/dist/cjs/components/checkbox-cards.d.ts.map +1 -1
  76. package/dist/cjs/components/checkbox-cards.js +1 -1
  77. package/dist/cjs/components/checkbox-cards.js.map +3 -3
  78. package/dist/cjs/components/checkbox-cards.props.d.ts +2 -2
  79. package/dist/cjs/components/checkbox-cards.props.js +1 -1
  80. package/dist/cjs/components/checkbox-cards.props.js.map +2 -2
  81. package/dist/cjs/components/checkbox-group.props.d.ts +6 -1
  82. package/dist/cjs/components/checkbox-group.props.d.ts.map +1 -1
  83. package/dist/cjs/components/checkbox.d.ts.map +1 -1
  84. package/dist/cjs/components/checkbox.js +1 -1
  85. package/dist/cjs/components/checkbox.js.map +3 -3
  86. package/dist/cjs/components/code.js.map +1 -1
  87. package/dist/cjs/components/code.props.d.ts +1 -1
  88. package/dist/cjs/components/context-menu.d.ts +1 -1
  89. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  90. package/dist/cjs/components/context-menu.js +1 -1
  91. package/dist/cjs/components/context-menu.js.map +3 -3
  92. package/dist/cjs/components/dialog.d.ts.map +1 -1
  93. package/dist/cjs/components/dialog.js +1 -1
  94. package/dist/cjs/components/dialog.js.map +3 -3
  95. package/dist/cjs/components/dialog.props.d.ts +6 -1
  96. package/dist/cjs/components/dialog.props.d.ts.map +1 -1
  97. package/dist/cjs/components/dialog.props.js +1 -1
  98. package/dist/cjs/components/dialog.props.js.map +3 -3
  99. package/dist/cjs/components/dropdown-menu.d.ts +1 -1
  100. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  101. package/dist/cjs/components/dropdown-menu.js +1 -1
  102. package/dist/cjs/components/dropdown-menu.js.map +3 -3
  103. package/dist/cjs/components/heading.props.d.ts +1 -1
  104. package/dist/cjs/components/icon-button.d.ts +79 -1
  105. package/dist/cjs/components/icon-button.d.ts.map +1 -1
  106. package/dist/cjs/components/icon-button.js +4 -1
  107. package/dist/cjs/components/icon-button.js.map +3 -3
  108. package/dist/cjs/components/image.d.ts +131 -12
  109. package/dist/cjs/components/image.d.ts.map +1 -1
  110. package/dist/cjs/components/image.js +1 -1
  111. package/dist/cjs/components/image.js.map +3 -3
  112. package/dist/cjs/components/image.props.d.ts +136 -21
  113. package/dist/cjs/components/image.props.d.ts.map +1 -1
  114. package/dist/cjs/components/image.props.js +1 -1
  115. package/dist/cjs/components/image.props.js.map +3 -3
  116. package/dist/cjs/components/index.d.ts +1 -0
  117. package/dist/cjs/components/index.d.ts.map +1 -1
  118. package/dist/cjs/components/index.js +1 -1
  119. package/dist/cjs/components/index.js.map +3 -3
  120. package/dist/cjs/components/link.props.d.ts +1 -1
  121. package/dist/cjs/components/progress.props.d.ts +2 -2
  122. package/dist/cjs/components/progress.props.js +1 -1
  123. package/dist/cjs/components/progress.props.js.map +2 -2
  124. package/dist/cjs/components/radio-cards.d.ts.map +1 -1
  125. package/dist/cjs/components/radio-cards.js +1 -1
  126. package/dist/cjs/components/radio-cards.js.map +3 -3
  127. package/dist/cjs/components/radio-cards.props.d.ts +2 -2
  128. package/dist/cjs/components/radio-cards.props.js +1 -1
  129. package/dist/cjs/components/radio-cards.props.js.map +2 -2
  130. package/dist/cjs/components/radio.d.ts.map +1 -1
  131. package/dist/cjs/components/radio.js +1 -1
  132. package/dist/cjs/components/radio.js.map +3 -3
  133. package/dist/cjs/components/segmented-control.props.d.ts +3 -3
  134. package/dist/cjs/components/segmented-control.props.js +1 -1
  135. package/dist/cjs/components/segmented-control.props.js.map +2 -2
  136. package/dist/cjs/components/select.d.ts.map +1 -1
  137. package/dist/cjs/components/select.js +1 -1
  138. package/dist/cjs/components/select.js.map +3 -3
  139. package/dist/cjs/components/select.props.d.ts +12 -0
  140. package/dist/cjs/components/select.props.d.ts.map +1 -1
  141. package/dist/cjs/components/select.props.js +1 -1
  142. package/dist/cjs/components/select.props.js.map +2 -2
  143. package/dist/cjs/components/sidebar.d.ts +5 -0
  144. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  145. package/dist/cjs/components/sidebar.js +1 -1
  146. package/dist/cjs/components/sidebar.js.map +3 -3
  147. package/dist/cjs/components/slider.d.ts +5 -0
  148. package/dist/cjs/components/slider.d.ts.map +1 -1
  149. package/dist/cjs/components/slider.js +1 -1
  150. package/dist/cjs/components/slider.js.map +3 -3
  151. package/dist/cjs/components/slider.props.d.ts +10 -2
  152. package/dist/cjs/components/slider.props.d.ts.map +1 -1
  153. package/dist/cjs/components/slider.props.js +1 -1
  154. package/dist/cjs/components/slider.props.js.map +2 -2
  155. package/dist/cjs/components/switch.d.ts.map +1 -1
  156. package/dist/cjs/components/switch.js +1 -1
  157. package/dist/cjs/components/switch.js.map +3 -3
  158. package/dist/cjs/components/switch.props.d.ts +17 -4
  159. package/dist/cjs/components/switch.props.d.ts.map +1 -1
  160. package/dist/cjs/components/switch.props.js +1 -1
  161. package/dist/cjs/components/switch.props.js.map +3 -3
  162. package/dist/cjs/components/tab-nav.d.ts.map +1 -1
  163. package/dist/cjs/components/tab-nav.js +1 -1
  164. package/dist/cjs/components/tab-nav.js.map +3 -3
  165. package/dist/cjs/components/tabs.d.ts.map +1 -1
  166. package/dist/cjs/components/tabs.js +1 -1
  167. package/dist/cjs/components/tabs.js.map +2 -2
  168. package/dist/cjs/components/text-area.d.ts.map +1 -1
  169. package/dist/cjs/components/text-area.js +1 -1
  170. package/dist/cjs/components/text-area.js.map +3 -3
  171. package/dist/cjs/components/text-area.props.d.ts +29 -0
  172. package/dist/cjs/components/text-area.props.d.ts.map +1 -1
  173. package/dist/cjs/components/text-area.props.js +1 -1
  174. package/dist/cjs/components/text-area.props.js.map +3 -3
  175. package/dist/cjs/components/text-field.d.ts.map +1 -1
  176. package/dist/cjs/components/text-field.js +4 -4
  177. package/dist/cjs/components/text-field.js.map +3 -3
  178. package/dist/cjs/components/text-field.props.d.ts +29 -0
  179. package/dist/cjs/components/text-field.props.d.ts.map +1 -1
  180. package/dist/cjs/components/text-field.props.js +1 -1
  181. package/dist/cjs/components/text-field.props.js.map +3 -3
  182. package/dist/cjs/components/text.props.d.ts +1 -1
  183. package/dist/cjs/components/theme.d.ts +3 -0
  184. package/dist/cjs/components/theme.d.ts.map +1 -1
  185. package/dist/cjs/components/theme.js +1 -1
  186. package/dist/cjs/components/theme.js.map +3 -3
  187. package/dist/cjs/components/theme.props.d.ts +14 -0
  188. package/dist/cjs/components/theme.props.d.ts.map +1 -1
  189. package/dist/cjs/components/theme.props.js +1 -1
  190. package/dist/cjs/components/theme.props.js.map +3 -3
  191. package/dist/cjs/components/toggle-button.d.ts +52 -0
  192. package/dist/cjs/components/toggle-button.d.ts.map +1 -1
  193. package/dist/cjs/components/toggle-button.js +1 -1
  194. package/dist/cjs/components/toggle-button.js.map +3 -3
  195. package/dist/cjs/components/toggle-icon-button.d.ts +84 -2
  196. package/dist/cjs/components/toggle-icon-button.d.ts.map +1 -1
  197. package/dist/cjs/components/toggle-icon-button.js +1 -1
  198. package/dist/cjs/components/toggle-icon-button.js.map +3 -3
  199. package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
  200. package/dist/cjs/hooks/index.d.ts +2 -0
  201. package/dist/cjs/hooks/index.d.ts.map +1 -0
  202. package/dist/cjs/hooks/index.js +2 -0
  203. package/dist/cjs/hooks/index.js.map +7 -0
  204. package/dist/cjs/hooks/use-live-announcer.d.ts +6 -0
  205. package/dist/cjs/hooks/use-live-announcer.d.ts.map +1 -0
  206. package/dist/cjs/hooks/use-live-announcer.js +10 -0
  207. package/dist/cjs/hooks/use-live-announcer.js.map +7 -0
  208. package/dist/cjs/index.d.ts +1 -0
  209. package/dist/cjs/index.d.ts.map +1 -1
  210. package/dist/cjs/index.js +1 -1
  211. package/dist/cjs/index.js.map +2 -2
  212. package/dist/cjs/props/weight.prop.d.ts +1 -1
  213. package/dist/cjs/props/weight.prop.js +1 -1
  214. package/dist/cjs/props/weight.prop.js.map +2 -2
  215. package/dist/esm/components/_internal/base-button.d.ts +36 -0
  216. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  217. package/dist/esm/components/_internal/base-button.js +1 -1
  218. package/dist/esm/components/_internal/base-button.js.map +3 -3
  219. package/dist/esm/components/_internal/base-button.props.d.ts +61 -0
  220. package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
  221. package/dist/esm/components/_internal/base-button.props.js +1 -1
  222. package/dist/esm/components/_internal/base-button.props.js.map +3 -3
  223. package/dist/esm/components/_internal/base-checkbox.props.d.ts +6 -1
  224. package/dist/esm/components/_internal/base-checkbox.props.d.ts.map +1 -1
  225. package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
  226. package/dist/esm/components/_internal/base-checkbox.props.js.map +3 -3
  227. package/dist/esm/components/_internal/base-menu.props.d.ts +8 -0
  228. package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
  229. package/dist/esm/components/_internal/base-menu.props.js +1 -1
  230. package/dist/esm/components/_internal/base-menu.props.js.map +3 -3
  231. package/dist/esm/components/_internal/base-radio.props.d.ts +6 -1
  232. package/dist/esm/components/_internal/base-radio.props.d.ts.map +1 -1
  233. package/dist/esm/components/_internal/base-radio.props.js +1 -1
  234. package/dist/esm/components/_internal/base-radio.props.js.map +3 -3
  235. package/dist/esm/components/accordion.d.ts +22 -0
  236. package/dist/esm/components/accordion.d.ts.map +1 -0
  237. package/dist/esm/components/accordion.js +2 -0
  238. package/dist/esm/components/accordion.js.map +7 -0
  239. package/dist/esm/components/accordion.props.d.ts +97 -0
  240. package/dist/esm/components/accordion.props.d.ts.map +1 -0
  241. package/dist/esm/components/accordion.props.js +2 -0
  242. package/dist/esm/components/accordion.props.js.map +7 -0
  243. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  244. package/dist/esm/components/alert-dialog.js +1 -1
  245. package/dist/esm/components/alert-dialog.js.map +3 -3
  246. package/dist/esm/components/alert-dialog.props.d.ts +69 -2
  247. package/dist/esm/components/alert-dialog.props.d.ts.map +1 -1
  248. package/dist/esm/components/alert-dialog.props.js +1 -1
  249. package/dist/esm/components/alert-dialog.props.js.map +3 -3
  250. package/dist/esm/components/avatar.d.ts.map +1 -1
  251. package/dist/esm/components/avatar.js +1 -1
  252. package/dist/esm/components/avatar.js.map +3 -3
  253. package/dist/esm/components/avatar.props.d.ts +9 -1
  254. package/dist/esm/components/avatar.props.d.ts.map +1 -1
  255. package/dist/esm/components/avatar.props.js +1 -1
  256. package/dist/esm/components/avatar.props.js.map +3 -3
  257. package/dist/esm/components/badge.d.ts +8 -1
  258. package/dist/esm/components/badge.d.ts.map +1 -1
  259. package/dist/esm/components/badge.js +1 -1
  260. package/dist/esm/components/badge.js.map +3 -3
  261. package/dist/esm/components/badge.props.d.ts +14 -6
  262. package/dist/esm/components/badge.props.d.ts.map +1 -1
  263. package/dist/esm/components/badge.props.js +1 -1
  264. package/dist/esm/components/badge.props.js.map +3 -3
  265. package/dist/esm/components/blockquote.props.d.ts +1 -1
  266. package/dist/esm/components/button.d.ts +53 -1
  267. package/dist/esm/components/button.d.ts.map +1 -1
  268. package/dist/esm/components/button.js +1 -1
  269. package/dist/esm/components/button.js.map +3 -3
  270. package/dist/esm/components/button.props.d.ts +17 -0
  271. package/dist/esm/components/button.props.d.ts.map +1 -1
  272. package/dist/esm/components/button.props.js.map +2 -2
  273. package/dist/esm/components/callout.d.ts +4 -0
  274. package/dist/esm/components/callout.d.ts.map +1 -1
  275. package/dist/esm/components/callout.js +1 -1
  276. package/dist/esm/components/callout.js.map +3 -3
  277. package/dist/esm/components/callout.props.d.ts +9 -1
  278. package/dist/esm/components/callout.props.d.ts.map +1 -1
  279. package/dist/esm/components/callout.props.js +1 -1
  280. package/dist/esm/components/callout.props.js.map +3 -3
  281. package/dist/esm/components/card.d.ts.map +1 -1
  282. package/dist/esm/components/card.js +1 -1
  283. package/dist/esm/components/card.js.map +3 -3
  284. package/dist/esm/components/card.props.d.ts +5 -0
  285. package/dist/esm/components/card.props.d.ts.map +1 -1
  286. package/dist/esm/components/card.props.js +1 -1
  287. package/dist/esm/components/card.props.js.map +3 -3
  288. package/dist/esm/components/checkbox-cards.d.ts.map +1 -1
  289. package/dist/esm/components/checkbox-cards.js +1 -1
  290. package/dist/esm/components/checkbox-cards.js.map +3 -3
  291. package/dist/esm/components/checkbox-cards.props.d.ts +2 -2
  292. package/dist/esm/components/checkbox-cards.props.js +1 -1
  293. package/dist/esm/components/checkbox-cards.props.js.map +2 -2
  294. package/dist/esm/components/checkbox-group.props.d.ts +6 -1
  295. package/dist/esm/components/checkbox-group.props.d.ts.map +1 -1
  296. package/dist/esm/components/checkbox.d.ts.map +1 -1
  297. package/dist/esm/components/checkbox.js +1 -1
  298. package/dist/esm/components/checkbox.js.map +3 -3
  299. package/dist/esm/components/code.js.map +1 -1
  300. package/dist/esm/components/code.props.d.ts +1 -1
  301. package/dist/esm/components/context-menu.d.ts +1 -1
  302. package/dist/esm/components/context-menu.d.ts.map +1 -1
  303. package/dist/esm/components/context-menu.js +1 -1
  304. package/dist/esm/components/context-menu.js.map +3 -3
  305. package/dist/esm/components/dialog.d.ts.map +1 -1
  306. package/dist/esm/components/dialog.js +1 -1
  307. package/dist/esm/components/dialog.js.map +3 -3
  308. package/dist/esm/components/dialog.props.d.ts +6 -1
  309. package/dist/esm/components/dialog.props.d.ts.map +1 -1
  310. package/dist/esm/components/dialog.props.js +1 -1
  311. package/dist/esm/components/dialog.props.js.map +3 -3
  312. package/dist/esm/components/dropdown-menu.d.ts +1 -1
  313. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  314. package/dist/esm/components/dropdown-menu.js +1 -1
  315. package/dist/esm/components/dropdown-menu.js.map +3 -3
  316. package/dist/esm/components/heading.props.d.ts +1 -1
  317. package/dist/esm/components/icon-button.d.ts +79 -1
  318. package/dist/esm/components/icon-button.d.ts.map +1 -1
  319. package/dist/esm/components/icon-button.js +4 -1
  320. package/dist/esm/components/icon-button.js.map +3 -3
  321. package/dist/esm/components/image.d.ts +131 -12
  322. package/dist/esm/components/image.d.ts.map +1 -1
  323. package/dist/esm/components/image.js +1 -1
  324. package/dist/esm/components/image.js.map +3 -3
  325. package/dist/esm/components/image.props.d.ts +136 -21
  326. package/dist/esm/components/image.props.d.ts.map +1 -1
  327. package/dist/esm/components/image.props.js +1 -1
  328. package/dist/esm/components/image.props.js.map +3 -3
  329. package/dist/esm/components/index.d.ts +1 -0
  330. package/dist/esm/components/index.d.ts.map +1 -1
  331. package/dist/esm/components/index.js +1 -1
  332. package/dist/esm/components/index.js.map +3 -3
  333. package/dist/esm/components/link.props.d.ts +1 -1
  334. package/dist/esm/components/progress.props.d.ts +2 -2
  335. package/dist/esm/components/progress.props.js +1 -1
  336. package/dist/esm/components/progress.props.js.map +2 -2
  337. package/dist/esm/components/radio-cards.d.ts.map +1 -1
  338. package/dist/esm/components/radio-cards.js +1 -1
  339. package/dist/esm/components/radio-cards.js.map +3 -3
  340. package/dist/esm/components/radio-cards.props.d.ts +2 -2
  341. package/dist/esm/components/radio-cards.props.js +1 -1
  342. package/dist/esm/components/radio-cards.props.js.map +2 -2
  343. package/dist/esm/components/radio.d.ts.map +1 -1
  344. package/dist/esm/components/radio.js +1 -1
  345. package/dist/esm/components/radio.js.map +3 -3
  346. package/dist/esm/components/segmented-control.props.d.ts +3 -3
  347. package/dist/esm/components/segmented-control.props.js +1 -1
  348. package/dist/esm/components/segmented-control.props.js.map +2 -2
  349. package/dist/esm/components/select.d.ts.map +1 -1
  350. package/dist/esm/components/select.js +1 -1
  351. package/dist/esm/components/select.js.map +3 -3
  352. package/dist/esm/components/select.props.d.ts +12 -0
  353. package/dist/esm/components/select.props.d.ts.map +1 -1
  354. package/dist/esm/components/select.props.js +1 -1
  355. package/dist/esm/components/select.props.js.map +2 -2
  356. package/dist/esm/components/sidebar.d.ts +5 -0
  357. package/dist/esm/components/sidebar.d.ts.map +1 -1
  358. package/dist/esm/components/sidebar.js +1 -1
  359. package/dist/esm/components/sidebar.js.map +3 -3
  360. package/dist/esm/components/slider.d.ts +5 -0
  361. package/dist/esm/components/slider.d.ts.map +1 -1
  362. package/dist/esm/components/slider.js +1 -1
  363. package/dist/esm/components/slider.js.map +3 -3
  364. package/dist/esm/components/slider.props.d.ts +10 -2
  365. package/dist/esm/components/slider.props.d.ts.map +1 -1
  366. package/dist/esm/components/slider.props.js +1 -1
  367. package/dist/esm/components/slider.props.js.map +2 -2
  368. package/dist/esm/components/switch.d.ts.map +1 -1
  369. package/dist/esm/components/switch.js +1 -1
  370. package/dist/esm/components/switch.js.map +3 -3
  371. package/dist/esm/components/switch.props.d.ts +17 -4
  372. package/dist/esm/components/switch.props.d.ts.map +1 -1
  373. package/dist/esm/components/switch.props.js +1 -1
  374. package/dist/esm/components/switch.props.js.map +3 -3
  375. package/dist/esm/components/tab-nav.d.ts.map +1 -1
  376. package/dist/esm/components/tab-nav.js +1 -1
  377. package/dist/esm/components/tab-nav.js.map +3 -3
  378. package/dist/esm/components/tabs.d.ts.map +1 -1
  379. package/dist/esm/components/tabs.js +1 -1
  380. package/dist/esm/components/tabs.js.map +2 -2
  381. package/dist/esm/components/text-area.d.ts.map +1 -1
  382. package/dist/esm/components/text-area.js +1 -1
  383. package/dist/esm/components/text-area.js.map +3 -3
  384. package/dist/esm/components/text-area.props.d.ts +29 -0
  385. package/dist/esm/components/text-area.props.d.ts.map +1 -1
  386. package/dist/esm/components/text-area.props.js +1 -1
  387. package/dist/esm/components/text-area.props.js.map +3 -3
  388. package/dist/esm/components/text-field.d.ts.map +1 -1
  389. package/dist/esm/components/text-field.js +4 -4
  390. package/dist/esm/components/text-field.js.map +3 -3
  391. package/dist/esm/components/text-field.props.d.ts +29 -0
  392. package/dist/esm/components/text-field.props.d.ts.map +1 -1
  393. package/dist/esm/components/text-field.props.js +1 -1
  394. package/dist/esm/components/text-field.props.js.map +3 -3
  395. package/dist/esm/components/text.props.d.ts +1 -1
  396. package/dist/esm/components/theme.d.ts +3 -0
  397. package/dist/esm/components/theme.d.ts.map +1 -1
  398. package/dist/esm/components/theme.js +1 -1
  399. package/dist/esm/components/theme.js.map +3 -3
  400. package/dist/esm/components/theme.props.d.ts +14 -0
  401. package/dist/esm/components/theme.props.d.ts.map +1 -1
  402. package/dist/esm/components/theme.props.js +1 -1
  403. package/dist/esm/components/theme.props.js.map +3 -3
  404. package/dist/esm/components/toggle-button.d.ts +52 -0
  405. package/dist/esm/components/toggle-button.d.ts.map +1 -1
  406. package/dist/esm/components/toggle-button.js +1 -1
  407. package/dist/esm/components/toggle-button.js.map +3 -3
  408. package/dist/esm/components/toggle-icon-button.d.ts +84 -2
  409. package/dist/esm/components/toggle-icon-button.d.ts.map +1 -1
  410. package/dist/esm/components/toggle-icon-button.js +1 -1
  411. package/dist/esm/components/toggle-icon-button.js.map +3 -3
  412. package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
  413. package/dist/esm/hooks/index.d.ts +2 -0
  414. package/dist/esm/hooks/index.d.ts.map +1 -0
  415. package/dist/esm/hooks/index.js +2 -0
  416. package/dist/esm/hooks/index.js.map +7 -0
  417. package/dist/esm/hooks/use-live-announcer.d.ts +6 -0
  418. package/dist/esm/hooks/use-live-announcer.d.ts.map +1 -0
  419. package/dist/esm/hooks/use-live-announcer.js +10 -0
  420. package/dist/esm/hooks/use-live-announcer.js.map +7 -0
  421. package/dist/esm/index.d.ts +1 -0
  422. package/dist/esm/index.d.ts.map +1 -1
  423. package/dist/esm/index.js +1 -1
  424. package/dist/esm/index.js.map +2 -2
  425. package/dist/esm/props/weight.prop.d.ts +1 -1
  426. package/dist/esm/props/weight.prop.js +1 -1
  427. package/dist/esm/props/weight.prop.js.map +2 -2
  428. package/layout/components.css +1 -0
  429. package/layout.css +1 -0
  430. package/package.json +2 -1
  431. package/src/components/_internal/base-button.css +483 -284
  432. package/src/components/_internal/base-button.props.ts +87 -0
  433. package/src/components/_internal/base-button.tsx +127 -10
  434. package/src/components/_internal/base-card.css +866 -83
  435. package/src/components/_internal/base-checkbox.css +252 -52
  436. package/src/components/_internal/base-checkbox.props.ts +4 -1
  437. package/src/components/_internal/base-dialog.css +39 -8
  438. package/src/components/_internal/base-menu.css +55 -32
  439. package/src/components/_internal/base-menu.props.ts +10 -0
  440. package/src/components/_internal/base-radio.css +222 -52
  441. package/src/components/_internal/base-radio.props.ts +4 -1
  442. package/src/components/_internal/base-sidebar-menu.css +223 -0
  443. package/src/components/_internal/base-sidebar.css +141 -0
  444. package/src/components/_internal/base-tab-list.css +16 -0
  445. package/src/components/accordion.css +657 -0
  446. package/src/components/accordion.props.tsx +90 -0
  447. package/src/components/accordion.tsx +209 -0
  448. package/src/components/alert-dialog.props.tsx +22 -2
  449. package/src/components/alert-dialog.tsx +94 -3
  450. package/src/components/avatar.css +294 -152
  451. package/src/components/avatar.props.tsx +7 -1
  452. package/src/components/avatar.tsx +12 -2
  453. package/src/components/badge.css +160 -138
  454. package/src/components/badge.props.tsx +10 -3
  455. package/src/components/badge.tsx +71 -9
  456. package/src/components/button.css +88 -0
  457. package/src/components/button.props.tsx +17 -0
  458. package/src/components/button.tsx +107 -5
  459. package/src/components/callout.css +122 -35
  460. package/src/components/callout.props.tsx +7 -1
  461. package/src/components/callout.tsx +32 -9
  462. package/src/components/card.css +0 -597
  463. package/src/components/card.props.tsx +3 -0
  464. package/src/components/card.tsx +4 -2
  465. package/src/components/checkbox-cards.css +27 -104
  466. package/src/components/checkbox-cards.props.tsx +2 -2
  467. package/src/components/checkbox-cards.tsx +21 -3
  468. package/src/components/checkbox.tsx +2 -0
  469. package/src/components/code.css +1 -1
  470. package/src/components/code.tsx +1 -1
  471. package/src/components/container.css +1 -0
  472. package/src/components/context-menu.tsx +54 -12
  473. package/src/components/dialog.props.tsx +3 -0
  474. package/src/components/dialog.tsx +93 -3
  475. package/src/components/dropdown-menu.tsx +49 -12
  476. package/src/components/icon-button.css +73 -4
  477. package/src/components/icon-button.tsx +125 -19
  478. package/src/components/image.css +160 -91
  479. package/src/components/image.props.ts +152 -15
  480. package/src/components/image.tsx +290 -247
  481. package/src/components/index.css +1 -0
  482. package/src/components/index.tsx +1 -0
  483. package/src/components/kbd.css +23 -44
  484. package/src/components/progress.css +130 -149
  485. package/src/components/progress.props.tsx +2 -2
  486. package/src/components/radio-cards.css +23 -113
  487. package/src/components/radio-cards.props.tsx +2 -2
  488. package/src/components/radio-cards.tsx +45 -18
  489. package/src/components/radio.tsx +4 -3
  490. package/src/components/scroll-area.css +1 -1
  491. package/src/components/segmented-control.css +83 -64
  492. package/src/components/segmented-control.props.tsx +3 -3
  493. package/src/components/select.css +502 -224
  494. package/src/components/select.props.tsx +8 -0
  495. package/src/components/select.tsx +45 -2
  496. package/src/components/sidebar.css +186 -630
  497. package/src/components/sidebar.tsx +61 -5
  498. package/src/components/slider.css +228 -88
  499. package/src/components/slider.props.tsx +6 -2
  500. package/src/components/slider.tsx +201 -24
  501. package/src/components/spinner.css +12 -0
  502. package/src/components/switch.css +135 -216
  503. package/src/components/switch.props.tsx +16 -4
  504. package/src/components/switch.tsx +5 -3
  505. package/src/components/tab-nav.tsx +6 -3
  506. package/src/components/tabs.tsx +2 -0
  507. package/src/components/text-area.css +222 -140
  508. package/src/components/text-area.props.tsx +18 -1
  509. package/src/components/text-area.tsx +58 -7
  510. package/src/components/text-field.css +214 -131
  511. package/src/components/text-field.props.tsx +17 -0
  512. package/src/components/text-field.tsx +79 -28
  513. package/src/components/theme.props.tsx +12 -0
  514. package/src/components/theme.tsx +31 -1
  515. package/src/components/toggle-button.tsx +102 -3
  516. package/src/components/toggle-icon-button.tsx +150 -7
  517. package/src/components/tooltip.css +3 -3
  518. package/src/hooks/index.ts +1 -0
  519. package/src/hooks/use-live-announcer.ts +52 -0
  520. package/src/index.ts +1 -0
  521. package/src/props/weight.prop.ts +1 -1
  522. package/src/styles/fonts.css +27 -13
  523. package/src/styles/index.css +1 -1
  524. package/src/styles/tokens/base.css +2 -0
  525. package/src/styles/tokens/blur.css +32 -0
  526. package/src/styles/tokens/color.css +9 -9
  527. package/src/styles/tokens/constants.css +88 -140
  528. package/src/styles/tokens/index.css +2 -0
  529. package/src/styles/tokens/opacity.css +32 -0
  530. package/src/styles/tokens/radius.css +6 -10
  531. package/src/styles/tokens/shadow.css +25 -25
  532. package/src/styles/tokens/transition.css +49 -13
  533. package/src/styles/tokens/typography.css +7 -3
  534. package/src/styles/utilities/font-weight.css +16 -0
  535. package/styles.css +11129 -8945
  536. package/tokens/base.css +127 -49
  537. package/tokens.css +158 -114
  538. package/utilities.css +72 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/toggle-icon-button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\nimport { BaseButton } from './_internal/base-button.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype ToggleIconButtonElement = React.ElementRef<typeof BaseButton>;\n\n// Extract toggle-specific props from Radix Toggle\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof Toggle.Root>;\n\n// Required accessibility props for icon buttons (same as IconButton)\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n// Combine BaseButton props with Toggle-specific props and accessibility requirements\ninterface ToggleIconButtonProps extends Omit<BaseButtonProps, 'as'> {\n pressed?: ToggleProps['pressed'];\n onPressedChange?: ToggleProps['onPressedChange'];\n defaultPressed?: ToggleProps['defaultPressed'];\n}\n\n// Intersection with accessibility props\ntype ToggleIconButtonPropsWithAccessibility = ToggleIconButtonProps & AccessibilityProps;\n\nconst ToggleIconButton = React.forwardRef<\n ToggleIconButtonElement,\n ToggleIconButtonPropsWithAccessibility\n>(({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={onPressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <IconButton {...iconButtonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n});\nToggleIconButton.displayName = 'ToggleIconButton';\n\nexport { ToggleIconButton };\nexport type { ToggleIconButtonPropsWithAccessibility as ToggleIconButtonProps };\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAA2B,4BAC3BC,EAA2B,sCAwB3B,MAAML,EAAmBE,EAAM,WAG7B,CAAC,CAAE,QAAAI,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAgB,EAAGC,IAEjER,EAAA,cAAC,SAAO,KAAP,CACC,QAASI,EACT,gBAAiBC,EACjB,eAAgBC,EAChB,QAAO,IAEPN,EAAA,cAAC,cAAY,GAAGO,EAAiB,IAAKC,EAAc,CACtD,CAEH,EACDV,EAAiB,YAAc",
6
- "names": ["toggle_icon_button_exports", "__export", "ToggleIconButton", "__toCommonJS", "React", "import_radix_ui", "import_icon_button", "import_base_button", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport { Toggle } from 'radix-ui';\nimport { IconButton } from './icon-button.js';\nimport { BaseButton } from './_internal/base-button.js';\nimport { useLiveAnnouncer } from '../hooks/use-live-announcer.js';\nimport type { IconButtonProps } from './icon-button.js';\n\ntype ToggleIconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Extract toggle-specific props from Radix Toggle\n * These props control the toggle state and behavior\n */\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof Toggle.Root>;\n\n/**\n * Required accessibility props for icon buttons (same as IconButton)\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Combine IconButton props with Toggle-specific props\n * Includes tooltip props from IconButton for comprehensive functionality\n */\ninterface ToggleIconButtonProps extends Omit<IconButtonProps, 'as'> {\n /** Controlled pressed state */\n pressed?: ToggleProps['pressed'];\n /** Callback when pressed state changes */\n onPressedChange?: ToggleProps['onPressedChange'];\n /** Default pressed state for uncontrolled usage */\n defaultPressed?: ToggleProps['defaultPressed'];\n}\n\n/**\n * Intersection with accessibility props to ensure compliance\n * This type ensures all ToggleIconButton instances have proper accessibility\n */\ntype ToggleIconButtonPropsWithAccessibility = ToggleIconButtonProps & AccessibilityProps;\n\n/**\n * ToggleIconButton component for icon buttons that can be pressed/unpressed\n *\n * The ToggleIconButton component extends IconButton with toggle functionality\n * using Radix UI's Toggle primitive. It provides proper accessibility announcements,\n * controlled/uncontrolled state management, and seamless integration with\n * the existing IconButton component.\n *\n * Key features:\n * - Controlled and uncontrolled state management\n * - Live accessibility announcements for screen readers\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic state validation and warnings\n * - Seamless integration with IconButton props and styling\n * - Proper ARIA attributes for toggle functionality\n * - Built-in tooltip support from IconButton\n *\n * @example\n * ```tsx\n * // Uncontrolled toggle icon button\n * <ToggleIconButton defaultPressed={false} aria-label=\"Toggle notifications\">\n * <Bell />\n * </ToggleIconButton>\n *\n * // Controlled toggle icon button\n * const [pressed, setPressed] = React.useState(false);\n * <ToggleIconButton\n * pressed={pressed}\n * onPressedChange={setPressed}\n * aria-label=\"Toggle notifications\"\n * >\n * <Bell />\n * </ToggleIconButton>\n *\n * // Toggle icon button with tooltip\n * <ToggleIconButton\n * variant=\"solid\"\n * size=\"3\"\n * color=\"blue\"\n * pressed={isActive}\n * onPressedChange={setIsActive}\n * aria-label=\"Toggle feature\"\n * tooltip=\"Toggle this feature on/off\"\n * >\n * <Star />\n * </ToggleIconButton>\n *\n * // Toggle icon button with aria-labelledby\n * <ToggleIconButton\n * aria-labelledby=\"notifications-label\"\n * pressed={notificationsEnabled}\n * onPressedChange={setNotificationsEnabled}\n * >\n * <Bell />\n * </ToggleIconButton>\n * <span id=\"notifications-label\">Toggle notifications</span>\n * ```\n */\nconst ToggleIconButton = React.forwardRef<\n ToggleIconButtonElement,\n ToggleIconButtonPropsWithAccessibility\n>(({ pressed, onPressedChange, defaultPressed, ...iconButtonProps }, forwardedRef) => {\n // Get the live announcer for accessibility announcements\n const announce = useLiveAnnouncer();\n\n /**\n * Extract accessible name from various sources for announcements\n * This ensures screen readers announce meaningful state changes\n * Priority: aria-label > aria-labelledby > children > fallback\n */\n const getAccessibleName = React.useCallback(() => {\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n children,\n } = iconButtonProps;\n\n // First priority: direct aria-label\n if (ariaLabel) return ariaLabel;\n\n // Second priority: referenced label element\n if (ariaLabelledBy) {\n const labelElement = document.getElementById(ariaLabelledBy);\n return labelElement?.textContent || 'Toggle icon button';\n }\n\n // Third priority: visible text children\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n\n // Fallback for edge cases\n return 'Toggle icon button';\n }, [iconButtonProps]);\n\n /**\n * Memoized handler for state changes with accessibility announcements\n * This ensures screen readers announce the new state immediately\n */\n const handlePressedChange = React.useCallback(\n (newPressed: boolean) => {\n const accessibleName = getAccessibleName();\n // Announce the state change for screen readers\n announce(`${accessibleName} ${newPressed ? 'pressed' : 'unpressed'}`);\n // Call the user's change handler\n onPressedChange?.(newPressed);\n },\n [announce, onPressedChange, getAccessibleName],\n );\n\n // Development-only warning for controlled/uncontrolled pattern\n // This helps developers avoid common state management mistakes\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'development' && pressed !== undefined && onPressedChange === undefined) {\n console.warn(\n 'ToggleIconButton: You provided a `pressed` prop without an `onPressedChange` handler. ' +\n 'This will result in a read-only toggle button. If you want the button to be interactive, ' +\n 'you should provide an `onPressedChange` handler.',\n );\n }\n }, [pressed, onPressedChange]);\n\n // Render the toggle icon button using Radix UI's Toggle primitive\n // This provides proper ARIA attributes and keyboard navigation\n // The IconButton component handles accessibility validation internally\n return (\n <Toggle.Root\n pressed={pressed}\n onPressedChange={handlePressedChange}\n defaultPressed={defaultPressed}\n asChild\n >\n <IconButton {...iconButtonProps} ref={forwardedRef} />\n </Toggle.Root>\n );\n});\nToggleIconButton.displayName = 'ToggleIconButton';\n\nexport { ToggleIconButton };\nexport type { ToggleIconButtonPropsWithAccessibility as ToggleIconButtonProps };\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBACvBC,EAAuB,oBACvBC,EAA2B,4BAC3BC,EAA2B,sCAC3BC,EAAiC,0CAsGjC,MAAMN,EAAmBE,EAAM,WAG7B,CAAC,CAAE,QAAAK,EAAS,gBAAAC,EAAiB,eAAAC,EAAgB,GAAGC,CAAgB,EAAGC,IAAiB,CAEpF,MAAMC,KAAW,oBAAiB,EAO5BC,EAAoBX,EAAM,YAAY,IAAM,CAChD,KAAM,CACJ,aAAcY,EACd,kBAAmBC,EACnB,SAAAC,CACF,EAAIN,EAGJ,OAAII,IAGAC,EACmB,SAAS,eAAeA,CAAc,GACtC,aAAe,qBAIlC,OAAOC,GAAa,SAAiBA,EACrCd,EAAM,eAAec,CAAQ,GAAK,OAAQA,EAAS,OAAe,UAAa,SACzEA,EAAS,MAAc,SAI1B,qBACT,EAAG,CAACN,CAAe,CAAC,EAMdO,EAAsBf,EAAM,YAC/BgB,GAAwB,CACvB,MAAMC,EAAiBN,EAAkB,EAEzCD,EAAS,GAAGO,CAAc,IAAID,EAAa,UAAY,WAAW,EAAE,EAEpEV,IAAkBU,CAAU,CAC9B,EACA,CAACN,EAAUJ,EAAiBK,CAAiB,CAC/C,EAIA,OAAAX,EAAM,UAAU,IAAM,CAQtB,EAAG,CAACK,EAASC,CAAe,CAAC,EAM3BN,EAAA,cAAC,SAAO,KAAP,CACC,QAASK,EACT,gBAAiBU,EACjB,eAAgBR,EAChB,QAAO,IAEPP,EAAA,cAAC,cAAY,GAAGQ,EAAiB,IAAKC,EAAc,CACtD,CAEJ,CAAC,EACDX,EAAiB,YAAc",
6
+ "names": ["toggle_icon_button_exports", "__export", "ToggleIconButton", "__toCommonJS", "React", "import_radix_ui", "import_icon_button", "import_base_button", "import_use_live_announcer", "pressed", "onPressedChange", "defaultPressed", "iconButtonProps", "forwardedRef", "announce", "getAccessibleName", "ariaLabel", "ariaLabelledBy", "children", "handlePressedChange", "newPressed", "accessibleName"]
7
7
  }
@@ -1,12 +1,12 @@
1
1
  import type { MarginProps } from '../props/margin.props.js';
2
2
  export declare function extractMarginProps<T extends MarginProps>(props: T): {
3
- m: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
4
- mx: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
5
- my: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
6
- mt: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
7
- mr: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
8
- mb: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
9
- ml: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
3
+ m: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
4
+ mx: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
5
+ my: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
6
+ mt: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
7
+ mr: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
8
+ mb: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
9
+ ml: import("../props/prop-def.js").Responsive<import("../props/prop-def.js").Union<string, "1" | "2" | "3" | "4" | "0" | "5" | "6" | "7" | "8" | "9" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9">> | undefined;
10
10
  rest: Omit<T, "m" | "ml" | "mr" | "mt" | "mb" | "mx" | "my">;
11
11
  };
12
12
  //# sourceMappingURL=extract-margin-props.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { useLiveAnnouncer } from './use-live-announcer.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var u=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(n,e)=>{for(var r in e)u(n,r,{get:e[r],enumerable:!0})},t=(n,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!p.call(n,o)&&o!==r&&u(n,o,{get:()=>e[o],enumerable:!(c=i(e,o))||c.enumerable});return n};var v=n=>t(u({},"__esModule",{value:!0}),n);var x={};s(x,{useLiveAnnouncer:()=>f.useLiveAnnouncer});module.exports=v(x);var f=require("./use-live-announcer.js");
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/index.ts"],
4
+ "sourcesContent": ["export { useLiveAnnouncer } from './use-live-announcer.js'; "],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0DAAAE,EAAAF,GAAA,IAAAG,EAAiC",
6
+ "names": ["hooks_exports", "__export", "__toCommonJS", "import_use_live_announcer"]
7
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook for making live announcements to screen readers
3
+ * Creates a hidden aria-live region for announcing dynamic content changes
4
+ */
5
+ export declare function useLiveAnnouncer(): (message: string) => void;
6
+ //# sourceMappingURL=use-live-announcer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-live-announcer.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-live-announcer.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,gBAAgB,cA+Be,MAAM,UAcpD"}
@@ -0,0 +1,10 @@
1
+ "use strict";var a=Object.create;var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},c=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!m.call(t,i)&&i!==n&&o(t,i,{get:()=>e[i],enumerable:!(r=l(e,i))||r.enumerable});return t};var v=(t,e,n)=>(n=t!=null?a(d(t)):{},c(e||!t||!t.__esModule?o(n,"default",{value:t,enumerable:!0}):n,t)),f=t=>c(o({},"__esModule",{value:!0}),t);var x={};p(x,{useLiveAnnouncer:()=>h});module.exports=f(x);var u=v(require("react"));function h(){return u.useEffect(()=>{let e=document.getElementById("rt-live-announcer");return e||(e=document.createElement("div"),e.id="rt-live-announcer",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.style.cssText=`
2
+ position: absolute;
3
+ left: -10000px;
4
+ width: 1px;
5
+ height: 1px;
6
+ overflow: hidden;
7
+ clip: rect(0, 0, 0, 0);
8
+ white-space: nowrap;
9
+ `,document.body.appendChild(e)),()=>{e&&!e.hasChildNodes()&&e.remove()}},[]),u.useCallback(e=>{const n=document.getElementById("rt-live-announcer");n&&(n.textContent="",setTimeout(()=>{n.textContent=e},100))},[])}
10
+ //# sourceMappingURL=use-live-announcer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/use-live-announcer.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\n\n/**\n * Hook for making live announcements to screen readers\n * Creates a hidden aria-live region for announcing dynamic content changes\n */\nexport function useLiveAnnouncer() {\n\n // Create aria-live region if it doesn't exist\n React.useEffect(() => {\n let liveRegion = document.getElementById('rt-live-announcer');\n \n if (!liveRegion) {\n liveRegion = document.createElement('div');\n liveRegion.id = 'rt-live-announcer';\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = `\n position: absolute;\n left: -10000px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n `;\n document.body.appendChild(liveRegion);\n }\n\n return () => {\n // Clean up on unmount if no other components are using it\n if (liveRegion && !liveRegion.hasChildNodes()) {\n liveRegion.remove();\n }\n };\n }, []);\n\n const announce = React.useCallback((message: string) => {\n const liveRegion = document.getElementById('rt-live-announcer');\n if (liveRegion) {\n // Clear previous announcements\n liveRegion.textContent = '';\n \n // Add new announcement with a small delay to ensure it's announced\n setTimeout(() => {\n liveRegion.textContent = message;\n }, 100);\n }\n }, []);\n\n return announce;\n} "],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBAMhB,SAASF,GAAmB,CAGjC,OAAAE,EAAM,UAAU,IAAM,CACpB,IAAIC,EAAa,SAAS,eAAe,mBAAmB,EAE5D,OAAKA,IACHA,EAAa,SAAS,cAAc,KAAK,EACzCA,EAAW,GAAK,oBAChBA,EAAW,aAAa,YAAa,QAAQ,EAC7CA,EAAW,aAAa,cAAe,MAAM,EAC7CA,EAAW,MAAM,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAS3B,SAAS,KAAK,YAAYA,CAAU,GAG/B,IAAM,CAEPA,GAAc,CAACA,EAAW,cAAc,GAC1CA,EAAW,OAAO,CAEtB,CACF,EAAG,CAAC,CAAC,EAEYD,EAAM,YAAaE,GAAoB,CACtD,MAAMD,EAAa,SAAS,eAAe,mBAAmB,EAC1DA,IAEFA,EAAW,YAAc,GAGzB,WAAW,IAAM,CACfA,EAAW,YAAcC,CAC3B,EAAG,GAAG,EAEV,EAAG,CAAC,CAAC,CAGP",
6
+ "names": ["use_live_announcer_exports", "__export", "useLiveAnnouncer", "__toCommonJS", "React", "liveRegion", "message"]
7
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './components/index.js';
2
+ export * from './hooks/index.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(r,o,f,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==f&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},t=(r,o,f)=>(p(r,o,"default"),f&&p(f,o,"default"));var g=r=>p(a({},"__esModule",{value:!0}),r);var m={};module.exports=g(m);t(m,require("./components/index.js"),module.exports);
1
+ "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(r,o,p,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of c(o))!d.call(r,m)&&m!==p&&a(r,m,{get:()=>o[m],enumerable:!(x=b(o,m))||x.enumerable});return r},f=(r,o,p)=>(t(r,o,"default"),p&&t(p,o,"default"));var g=r=>t(a({},"__esModule",{value:!0}),r);var e={};module.exports=g(e);f(e,require("./components/index.js"),module.exports);f(e,require("./hooks/index.js"),module.exports);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './components/index.js';\n"],
5
- "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,iCAAd",
4
+ "sourcesContent": ["export * from './components/index.js';\nexport * from './hooks/index.js';\n"],
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,iCAAd,gBACAE,EAAAF,EAAc,4BADd",
6
6
  "names": ["src_exports", "__toCommonJS", "__reExport"]
7
7
  }
@@ -2,7 +2,7 @@ declare const weightPropDef: {
2
2
  weight: {
3
3
  type: "enum";
4
4
  className: string;
5
- values: readonly ["light", "regular", "medium", "bold"];
5
+ values: readonly ["thin", "extralight", "light", "regular", "medium", "semibold", "bold", "extrabold"];
6
6
  responsive: true;
7
7
  };
8
8
  };
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},a=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!h.call(t,s)&&s!==r&&o(t,s,{get:()=>e[s],enumerable:!(i=g(e,s))||i.enumerable});return t};var n=t=>a(o({},"__esModule",{value:!0}),t);var w={};m(w,{weightPropDef:()=>p});module.exports=n(w);const u=["light","regular","medium","bold"],p={weight:{type:"enum",className:"rt-r-weight",values:u,responsive:!0}};
1
+ "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},m=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!a.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(o=g(e,r))||o.enumerable});return t};var f=t=>m(i({},"__esModule",{value:!0}),t);var u={};l(u,{weightPropDef:()=>p});module.exports=f(u);const n=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],p={weight:{type:"enum",className:"rt-r-weight",values:n,responsive:!0}};
2
2
  //# sourceMappingURL=weight.prop.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/props/weight.prop.ts"],
4
- "sourcesContent": ["import type { PropDef } from './prop-def.js';\n\nconst weights = ['light', 'regular', 'medium', 'bold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAU,CAAC,QAAS,UAAW,SAAU,MAAM,EAE/CF,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,UAAW,cACX,OAAQE,EACR,WAAY,EACd,CACF",
4
+ "sourcesContent": ["import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAU,CAAC,OAAQ,aAAc,QAAS,UAAW,SAAU,WAAY,OAAQ,WAAW,EAE9FF,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,UAAW,cACX,OAAQE,EACR,WAAY,EACd,CACF",
6
6
  "names": ["weight_prop_exports", "__export", "weightPropDef", "__toCommonJS", "weights"]
7
7
  }
@@ -4,11 +4,47 @@ import type { MarginProps } from '../../props/margin.props.js';
4
4
  import type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';
5
5
  import type { GetPropDefTypes } from '../../props/prop-def.js';
6
6
  type BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;
7
+ /**
8
+ * Polymorphic BaseButton props that support rendering as different HTML elements
9
+ * Uses the proper ComponentPropsWithout pattern for type safety
10
+ * @template C - The element type to render as (defaults to 'button')
11
+ */
7
12
  type PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {
13
+ /** Element type to render as (e.g., 'a', 'span', etc.) */
8
14
  as?: C;
9
15
  } & BaseButtonOwnProps & MarginProps & ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;
16
+ /**
17
+ * BaseButton props interface that combines all available props
18
+ */
10
19
  interface BaseButtonProps extends PolymorphicBaseButtonProps {
11
20
  }
21
+ /**
22
+ * BaseButton component that provides the core button functionality
23
+ *
24
+ * This is the foundational button component that handles all the complex logic
25
+ * including loading states, accessibility, performance optimizations, and
26
+ * polymorphic rendering. It's used by Button, IconButton, and other button
27
+ * variants to ensure consistent behavior across the design system.
28
+ *
29
+ * Key features:
30
+ * - Loading state with spinner and accessibility announcements
31
+ * - Performance optimizations for backdrop-filter effects
32
+ * - Comprehensive accessibility support
33
+ * - Polymorphic rendering support
34
+ * - Material/panel background handling
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Basic usage
39
+ * <BaseButton>Click me</BaseButton>
40
+ *
41
+ * // With loading state
42
+ * <BaseButton loading>Processing...</BaseButton>
43
+ *
44
+ * // Polymorphic rendering
45
+ * <BaseButton as="a" href="/link">Link Button</BaseButton>
46
+ * ```
47
+ */
12
48
  declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
49
  export { BaseButton };
14
50
  export type { BaseButtonProps };
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGrE,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D,QAAA,MAAM,UAAU,2FAkFd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"base-button.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAQ5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAErE;;;;GAIG;AACH,KAAK,0BAA0B,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,IAAI;IACxE,0DAA0D;IAC1D,EAAE,CAAC,EAAE,CAAC,CAAC;CACR,GAAG,kBAAkB,GACpB,WAAW,GACX,qBAAqB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,kBAAkB,GAAG,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC;AAE/F;;GAEG;AACH,UAAU,eAAgB,SAAQ,0BAA0B;CAAG;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,UAAU,2FAoKd,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import C from"classnames";import{Slot as x}from"radix-ui";import{baseButtonPropDefs as i}from"./base-button.props.js";import{Flex as w}from"../flex.js";import{Spinner as D}from"../spinner.js";import{VisuallyHidden as z}from"../visually-hidden.js";import{extractProps as S}from"../../helpers/extract-props.js";import{mapResponsiveProp as T,mapButtonSizeToSpinnerSize as j}from"../../helpers/map-prop-values.js";import{marginPropDefs as k}from"../../props/margin.props.js";const p=e.forwardRef((o,d)=>{const{size:l=i.size.default}=o,{className:u,children:t,asChild:n,as:s,color:m,radius:f,panelBackground:B,flush:c,disabled:a=o.loading,...y}=S(o,i,k),P=n?x.Root:s||"button",b=n||!s||["button","input","textarea","select"].includes(s),h=e.useId(),r=o.loading?`${h}-loading`:void 0,g=o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":r}:{};return e.createElement(P,{"data-disabled":a||void 0,"data-accent-color":m,"data-radius":f,"data-panel-background":B,"data-flush":c?"true":void 0,...y,...g,ref:d,className:C("rt-reset","rt-BaseButton",u),...b&&{disabled:a}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(z,null,e.createElement("span",{id:r},"Loading, please wait..."),t),e.createElement(w,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(D,{size:T(l,j),"aria-hidden":"true"})))):t)});p.displayName="BaseButton";export{p as BaseButton};
1
+ import*as e from"react";import S from"classnames";import{Slot as z}from"radix-ui";import{baseButtonPropDefs as m}from"./base-button.props.js";import{Flex as j}from"../flex.js";import{Spinner as I}from"../spinner.js";import{VisuallyHidden as N}from"../visually-hidden.js";import{extractProps as O}from"../../helpers/extract-props.js";import{mapResponsiveProp as V,mapButtonSizeToSpinnerSize as F}from"../../helpers/map-prop-values.js";import{marginPropDefs as H}from"../../props/margin.props.js";const f=e.forwardRef((n,r)=>{const{size:y=m.size.default}=n,{className:B,children:o,asChild:p,as:a,color:b,radius:P,material:g,panelBackground:h,flush:C,disabled:u=n.loading,...T}=O(n,m,H);e.useEffect(()=>{n.panelBackground!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.")},[n.panelBackground]);const s=g??h,d=e.useRef(null);e.useEffect(()=>{const t=d.current;if(!t)return;if(s==="translucent"){t.style.setProperty("will-change","backdrop-filter");const k=()=>{const E=getComputedStyle(t).getPropertyValue("--duration-2")||"75ms",D=parseInt(E)||75;setTimeout(()=>{t&&s!=="translucent"&&t.style.setProperty("will-change","auto")},D)},c=new MutationObserver(k);return c.observe(t,{attributes:!0,attributeFilter:["data-material"]}),()=>{c.disconnect(),t.style.setProperty("will-change","auto")}}else t.style.setProperty("will-change","auto")},[s]);const v=p?z.Root:a||"button",w=p||!a||["button","input","textarea","select"].includes(a),M=e.useId(),i=n.loading?`${M}-loading`:void 0,l=e.useMemo(()=>typeof o=="string"?o:e.isValidElement(o)&&typeof o.props?.children=="string"?o.props.children:"button",[o]),x=e.useMemo(()=>n.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":i,"aria-label":`${l} (loading)`}:{},[n.loading,i,l]);return e.createElement(v,{"data-disabled":u||void 0,"data-accent-color":b,"data-radius":P,"data-material":s,"data-panel-background":s,"data-flush":C?"true":void 0,...T,...x,ref:t=>{typeof r=="function"?r(t):r&&(r.current=t),d.current=t},className:S("rt-reset","rt-BaseButton",B),...w&&{disabled:u}},n.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},o),e.createElement(N,null,e.createElement("span",{id:i},l," is loading, please wait..."),o),e.createElement(j,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(I,{size:V(y,F),"aria-hidden":"true"})))):o)});f.displayName="BaseButton";export{f as BaseButton};
2
2
  //# sourceMappingURL=base-button.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n// Polymorphic types using the proper ComponentPropsWithout pattern\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n panelBackground,\n flush,\n disabled = props.loading,\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // asChild takes precedence over as prop\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Enhanced accessibility props for loading state\n const accessibilityProps = props.loading\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n }\n : {};\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={panelBackground}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>Loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner\n size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)}\n aria-hidden=\"true\"\n />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAkB/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAC7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,SAAAC,EAAWX,EAAM,QACjB,GAAGY,CACL,EAAIjB,EAAaK,EAAOT,EAAoBO,CAAc,EAGpDe,EAAOR,EAAUf,EAAK,KAAOgB,GAAM,SAGnCQ,EACJT,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAGnES,EAAY3B,EAAM,MAAM,EACxB4B,EAAgBhB,EAAM,QAAU,GAAGe,CAAS,WAAa,OAGzDE,EAAqBjB,EAAM,QAC7B,CACE,YAAa,GACb,gBAAiB,GACjB,mBAAoBgB,CACtB,EACA,CAAC,EAEL,OACE5B,EAAA,cAACyB,EAAA,CAEC,gBAAeF,GAAY,OAC3B,oBAAmBJ,EACnB,cAAaC,EACb,wBAAuBC,EACvB,aAAYC,EAAQ,OAAS,OAC5B,GAAGE,EACH,GAAGK,EACJ,IAAKhB,EACL,UAAWZ,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAIW,GAAsB,CAAE,SAAAH,CAAS,GAErCX,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EAGAhB,EAAA,cAACM,EAAA,KACCN,EAAA,cAAC,QAAK,GAAI4B,GAAe,yBAAuB,EAC/CZ,CACH,EAEAhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CACC,KAAMG,EAAkBM,EAAML,CAA0B,EACxD,cAAY,OACd,CACF,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
6
- "names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "panelBackground", "flush", "disabled", "baseButtonProps", "Comp", "shouldPassDisabled", "loadingId", "describedById", "accessibilityProps"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // Show deprecation warning for panelBackground when used\n // This helps developers migrate to the new material prop\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // Will-change cleanup for backdrop-filter performance optimization\n // This prevents layout thrashing when using translucent materials\n const buttonRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n const button = buttonRef.current;\n if (!button) return;\n\n const hasTranslucentMaterial = effectiveMaterial === 'translucent';\n\n if (hasTranslucentMaterial) {\n // Add will-change when material is translucent to optimize rendering\n button.style.setProperty('will-change', 'backdrop-filter');\n\n // Clean up will-change after transition completes to prevent memory leaks\n const cleanup = () => {\n const transitionDuration =\n getComputedStyle(button).getPropertyValue('--duration-2') || '75ms';\n const duration = parseInt(transitionDuration) || 75;\n\n setTimeout(() => {\n if (button && effectiveMaterial !== 'translucent') {\n button.style.setProperty('will-change', 'auto');\n }\n }, duration);\n };\n\n // Listen for material changes to clean up will-change property\n const observer = new MutationObserver(cleanup);\n observer.observe(button, { attributes: true, attributeFilter: ['data-material'] });\n\n return () => {\n observer.disconnect();\n button.style.setProperty('will-change', 'auto');\n };\n } else {\n // Remove will-change when material is not translucent\n button.style.setProperty('will-change', 'auto');\n }\n }, [effectiveMaterial]);\n\n // asChild takes precedence over as prop for Radix Slot integration\n const Comp = asChild ? Slot.Root : as || 'button';\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled =\n asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={(node) => {\n // Handle both forwarded ref and internal ref for performance optimization\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n buttonRef.current = node;\n }}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner\n size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)}\n aria-hidden=\"true\"\n />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WAErB,OAAS,sBAAAC,MAA0B,yBACnC,OAAS,QAAAC,MAAY,aACrB,OAAS,WAAAC,MAAe,gBACxB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,gBAAAC,MAAoB,iCAC7B,OAAS,qBAAAC,EAAmB,8BAAAC,MAAkC,mCAC9D,OAAS,kBAAAC,MAAsB,8BAqD/B,MAAMC,EAAaX,EAAM,WAA+C,CAACY,EAAOC,IAAiB,CAC/F,KAAM,CAAE,KAAAC,EAAOX,EAAmB,KAAK,OAAQ,EAAIS,EAG7C,CACJ,UAAAG,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,SAAAC,EAAWZ,EAAM,QACjB,GAAGa,CACL,EAAIlB,EAAaK,EAAOT,EAAoBO,CAAc,EAI1DV,EAAM,UAAU,IAAM,CAChBY,EAAM,kBAAoB,QAC5B,QAAQ,KACN,yHACF,CAEJ,EAAG,CAACA,EAAM,eAAe,CAAC,EAG1B,MAAMc,EAAoBL,GAAYC,EAIhCK,EAAY3B,EAAM,OAAoB,IAAI,EAEhDA,EAAM,UAAU,IAAM,CACpB,MAAM4B,EAASD,EAAU,QACzB,GAAI,CAACC,EAAQ,OAIb,GAF+BF,IAAsB,cAEzB,CAE1BE,EAAO,MAAM,YAAY,cAAe,iBAAiB,EAGzD,MAAMC,EAAU,IAAM,CACpB,MAAMC,EACJ,iBAAiBF,CAAM,EAAE,iBAAiB,cAAc,GAAK,OACzDG,EAAW,SAASD,CAAkB,GAAK,GAEjD,WAAW,IAAM,CACXF,GAAUF,IAAsB,eAClCE,EAAO,MAAM,YAAY,cAAe,MAAM,CAElD,EAAGG,CAAQ,CACb,EAGMC,EAAW,IAAI,iBAAiBH,CAAO,EAC7C,OAAAG,EAAS,QAAQJ,EAAQ,CAAE,WAAY,GAAM,gBAAiB,CAAC,eAAe,CAAE,CAAC,EAE1E,IAAM,CACXI,EAAS,WAAW,EACpBJ,EAAO,MAAM,YAAY,cAAe,MAAM,CAChD,CACF,MAEEA,EAAO,MAAM,YAAY,cAAe,MAAM,CAElD,EAAG,CAACF,CAAiB,CAAC,EAGtB,MAAMO,EAAOhB,EAAUf,EAAK,KAAOgB,GAAM,SAInCgB,EACJjB,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAGnEiB,EAAYnC,EAAM,MAAM,EACxBoC,EAAgBxB,EAAM,QAAU,GAAGuB,CAAS,WAAa,OAGzDE,EAAarC,EAAM,QAAQ,IAC3B,OAAOgB,GAAa,SAAiBA,EACrChB,EAAM,eAAegB,CAAQ,GAAK,OAAQA,EAAS,OAAe,UAAa,SACzEA,EAAS,MAAc,SAE1B,SACN,CAACA,CAAQ,CAAC,EAIPsB,EAAqBtC,EAAM,QAAQ,IACnCY,EAAM,QACD,CACL,YAAa,GACb,gBAAiB,GACjB,mBAAoBwB,EACpB,aAAc,GAAGC,CAAU,YAC7B,EAEK,CAAC,EACP,CAACzB,EAAM,QAASwB,EAAeC,CAAU,CAAC,EAE7C,OACErC,EAAA,cAACiC,EAAA,CAEC,gBAAeT,GAAY,OAC3B,oBAAmBL,EACnB,cAAaC,EACb,gBAAeM,EACf,wBAAuBA,EACvB,aAAYH,EAAQ,OAAS,OAC5B,GAAGE,EACH,GAAGa,EACJ,IAAMC,GAAS,CAET,OAAO1B,GAAiB,WAC1BA,EAAa0B,CAAI,EACR1B,IACTA,EAAa,QAAU0B,GAEzBZ,EAAU,QAAUY,CACtB,EACA,UAAWtC,EAAW,WAAY,gBAAiBc,CAAS,EAC3D,GAAImB,GAAsB,CAAE,SAAAV,CAAS,GAErCZ,EAAM,QACLZ,EAAA,cAAAA,EAAA,cAQEA,EAAA,cAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEgB,CACH,EAGAhB,EAAA,cAACM,EAAA,KACCN,EAAA,cAAC,QAAK,GAAIoC,GAAgBC,EAAW,6BAA2B,EAC/DrB,CACH,EAGAhB,EAAA,cAACI,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtEJ,EAAA,cAAC,YACCA,EAAA,cAACK,EAAA,CACC,KAAMG,EAAkBM,EAAML,CAA0B,EACxD,cAAY,OACd,CACF,CACF,CACF,EAEAO,CAEJ,CAEJ,CAAC,EACDL,EAAW,YAAc",
6
+ "names": ["React", "classNames", "Slot", "baseButtonPropDefs", "Flex", "Spinner", "VisuallyHidden", "extractProps", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "marginPropDefs", "BaseButton", "props", "forwardedRef", "size", "className", "children", "asChild", "as", "color", "radius", "material", "panelBackground", "flush", "disabled", "baseButtonProps", "effectiveMaterial", "buttonRef", "button", "cleanup", "transitionDuration", "duration", "observer", "Comp", "shouldPassDisabled", "loadingId", "describedById", "buttonText", "accessibilityProps", "node"]
7
7
  }
@@ -1,19 +1,73 @@
1
+ /**
2
+ * Base button prop definitions that define the component's API
3
+ *
4
+ * These props are used by all button variants (Button, IconButton, etc.)
5
+ * to ensure consistent behavior and styling across the design system.
6
+ *
7
+ * Key features:
8
+ * - Responsive sizing with mobile-first approach
9
+ * - Six visual variants for different interface contexts
10
+ * - Comprehensive color system with semantic meanings
11
+ * - Loading states with automatic accessibility
12
+ * - Material system for visual depth and elevation
13
+ * - Polymorphic rendering support via asChild
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * // Basic button with default props
18
+ * <BaseButton>Click me</BaseButton>
19
+ *
20
+ * // Button with custom size and variant
21
+ * <BaseButton size="3" variant="solid">Primary Action</BaseButton>
22
+ *
23
+ * // Button with loading state
24
+ * <BaseButton loading>Processing...</BaseButton>
25
+ *
26
+ * // Button with material and high contrast
27
+ * <BaseButton material="translucent" highContrast>Elevated Button</BaseButton>
28
+ * ```
29
+ */
1
30
  declare const baseButtonPropDefs: {
31
+ /**
32
+ * Loading state that shows a spinner and disables interaction
33
+ * Automatically sets disabled=true and provides accessibility announcements
34
+ */
2
35
  loading: {
3
36
  type: "boolean";
4
37
  className: string;
5
38
  default: false;
6
39
  };
40
+ /**
41
+ * Full width mode that expands the button to fill its container
42
+ * Useful for mobile layouts and form submissions
43
+ */
7
44
  fullWidth: {
8
45
  type: "boolean";
9
46
  className: string;
10
47
  default: false;
11
48
  };
49
+ /**
50
+ * Material type for visual rendering and depth effects
51
+ * Controls how the button renders its visual elements
52
+ */
53
+ material: {
54
+ type: "enum";
55
+ values: readonly ["solid", "translucent"];
56
+ default: undefined;
57
+ };
58
+ /**
59
+ * Panel background type (deprecated)
60
+ * @deprecated Use `material` prop instead. This prop will be removed in a future version.
61
+ */
12
62
  panelBackground: {
13
63
  type: "enum";
14
64
  values: readonly ["solid", "translucent"];
15
65
  default: undefined;
16
66
  };
67
+ /**
68
+ * Flush mode that removes visual padding for seamless text integration
69
+ * Only effective with ghost variant
70
+ */
17
71
  flush: {
18
72
  type: "boolean";
19
73
  default: false;
@@ -33,6 +87,10 @@ declare const baseButtonPropDefs: {
33
87
  values: readonly ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"];
34
88
  default: "gray" | "gold" | "bronze" | "brown" | "yellow" | "amber" | "orange" | "tomato" | "red" | "ruby" | "crimson" | "pink" | "plum" | "purple" | "violet" | "iris" | "indigo" | "blue" | "cyan" | "teal" | "jade" | "green" | "grass" | "lime" | "mint" | "sky";
35
89
  };
90
+ /**
91
+ * Button size for responsive design and interface density
92
+ * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }
93
+ */
36
94
  size: {
37
95
  type: "enum";
38
96
  className: string;
@@ -40,6 +98,9 @@ declare const baseButtonPropDefs: {
40
98
  default: "2";
41
99
  responsive: true;
42
100
  };
101
+ /**
102
+ * Visual variant that determines the button's appearance and context
103
+ */
43
104
  variant: {
44
105
  type: "enum";
45
106
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBvB,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"base-button.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-button.props.ts"],"names":[],"mappings":"AAwCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,kBAAkB;IActB;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;IAnCH;;;OAGG;;;;;;;;IAEH;;OAEG;;;;;;;;;;CAsCJ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as o}from"../../props/color.prop.js";import{highContrastPropDef as a}from"../../props/high-contrast.prop.js";import{radiusPropDef as s}from"../../props/radius.prop.js";const t=["1","2","3","4"],r=["classic","solid","soft","surface","outline","ghost"],n=["solid","translucent"],l={...e,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...o,...a,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},panelBackground:{type:"enum",values:n,default:void 0},flush:{type:"boolean",default:!1}};export{l as baseButtonPropDefs};
1
+ import{asChildPropDef as e}from"../../props/as-child.prop.js";import{accentColorPropDef as a}from"../../props/color.prop.js";import{highContrastPropDef as o}from"../../props/high-contrast.prop.js";import{radiusPropDef as s}from"../../props/radius.prop.js";const t=["1","2","3","4"],n=["classic","solid","soft","surface","outline","ghost"],r=["solid","translucent"],l=["solid","translucent"],f={...e,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:n,default:"solid"},...a,...o,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:l,default:void 0},panelBackground:{type:"enum",values:r,default:void 0},flush:{type:"boolean",default:!1}};export{f as baseButtonPropDefs};
2
2
  //# sourceMappingURL=base-button.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-button.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAI9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EACrEC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAAqB,CACzB,GAAGP,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EACH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EACpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EACzE,gBAAiB,CAAE,KAAM,OAAQ,OAAQG,EAAkB,QAAS,MAAU,EAC9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
- "names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "baseButtonPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,sBAAAC,MAA0B,4BACnC,OAAS,uBAAAC,MAA2B,oCACpC,OAAS,iBAAAC,MAAqB,6BAW9B,MAAMC,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,UAAW,OAAO,EAMrEC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGR,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQI,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGJ,EACH,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQI,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
+ "names": ["asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs"]
7
7
  }
@@ -19,9 +19,14 @@ declare const baseCheckboxPropDefs: {
19
19
  variant: {
20
20
  type: "enum";
21
21
  className: string;
22
- values: readonly ["classic", "solid", "soft"];
22
+ values: readonly ["classic", "solid", "soft", "outline", "surface"];
23
23
  default: "solid";
24
24
  };
25
+ material: {
26
+ type: "enum";
27
+ values: readonly ["solid", "translucent"];
28
+ default: undefined;
29
+ };
25
30
  };
26
31
  export { baseCheckboxPropDefs };
27
32
  //# sourceMappingURL=base-checkbox.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-checkbox.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-checkbox.props.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAQzB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"base-checkbox.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-checkbox.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUzB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{colorPropDef as s}from"../../props/color.prop.js";import{highContrastPropDef as e}from"../../props/high-contrast.prop.js";const o=["1","2","3"],r=["classic","solid","soft"],t={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid"},...s,...e};export{t as baseCheckboxPropDefs};
1
+ import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const t=["1","2","3"],a=["classic","solid","soft","outline","surface"],r=["solid","translucent"],o={size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:a,default:"solid"},material:{type:"enum",values:r,default:void 0},...e,...s};export{o as baseCheckboxPropDefs};
2
2
  //# sourceMappingURL=base-checkbox.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-checkbox.props.ts"],
4
- "sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'solid', 'soft'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n"],
5
- "mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,QAAS,MAAM,EAEtCC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGH,EACH,GAAGC,CACL",
6
- "names": ["colorPropDef", "highContrastPropDef", "sizes", "variants", "baseCheckboxPropDefs"]
4
+ "sourcesContent": ["import { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst variants = ['classic', 'solid', 'soft', 'outline', 'surface'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n material: { type: 'enum', values: materials, default: undefined },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n};\n\nexport { baseCheckboxPropDefs };\n"],
5
+ "mappings": "AAAA,OAAS,gBAAAA,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAQ,CAAC,IAAK,IAAK,GAAG,EACtBC,EAAW,CAAC,UAAW,QAAS,OAAQ,UAAW,SAAS,EAC5DC,EAAY,CAAC,QAAS,aAAa,EAEnCC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,SAAU,CAAE,KAAM,OAAQ,OAAQC,EAAW,QAAS,MAAU,EAChE,GAAGJ,EACH,GAAGC,CACL",
6
+ "names": ["colorPropDef", "highContrastPropDef", "sizes", "variants", "materials", "baseCheckboxPropDefs"]
7
7
  }
@@ -22,6 +22,14 @@ declare const baseMenuContentPropDefs: {
22
22
  values: readonly ["solid", "soft"];
23
23
  default: "solid";
24
24
  };
25
+ material: {
26
+ type: "enum";
27
+ values: readonly ["solid", "translucent"];
28
+ default: undefined;
29
+ };
30
+ /**
31
+ * @deprecated Use `material` prop instead. This prop will be removed in a future version.
32
+ */
25
33
  panelBackground: {
26
34
  type: "enum";
27
35
  values: readonly ["solid", "translucent"];
@@ -1 +1 @@
1
- {"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB5B,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAMzB,CAAC;AAEF,QAAA,MAAM,4BAA4B;;;;;;;;;CAKjC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;CAE9B,CAAC;AAEF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,CAAC"}
1
+ {"version":3,"file":"base-menu.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-menu.props.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmB3B;;OAEG;;;;;;CAaJ,CAAC;AAEF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;CAMzB,CAAC;AAEF,QAAA,MAAM,4BAA4B;;;;;;;;;CAKjC,CAAC;AAEF,QAAA,MAAM,yBAAyB;;;;;;CAE9B,CAAC;AAEF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import{asChildPropDef as t}from"../../props/as-child.prop.js";import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const o=["1","2"],n=["solid","soft"],r=["solid","translucent"],a={size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:n,default:"solid"},panelBackground:{type:"enum",values:r,default:void 0},...e,...s},p={...t,...e,shortcut:{type:"string"}},i={...e,shortcut:{type:"string"}},f={...e};export{i as baseMenuCheckboxItemPropDefs,a as baseMenuContentPropDefs,p as baseMenuItemPropDefs,f as baseMenuRadioItemPropDefs};
1
+ import{asChildPropDef as t}from"../../props/as-child.prop.js";import{colorPropDef as e}from"../../props/color.prop.js";import{highContrastPropDef as s}from"../../props/high-contrast.prop.js";const n=["1","2"],o=["solid","soft"],r=["solid","translucent"],a=["solid","translucent"],i={size:{type:"enum",className:"rt-r-size",values:n,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:o,default:"solid"},material:{type:"enum",values:a,default:void 0},panelBackground:{type:"enum",values:r,default:void 0},...e,...s},p={...t,...e,shortcut:{type:"string"}},f={...e,shortcut:{type:"string"}},u={...e};export{f as baseMenuCheckboxItemPropDefs,i as baseMenuContentPropDefs,p as baseMenuItemPropDefs,u as baseMenuRadioItemPropDefs};
2
2
  //# sourceMappingURL=base-menu.props.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-menu.props.ts"],
4
- "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
5
- "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAE1CC,EAA0B,CAC9B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQH,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,gBAAiB,CACf,KAAM,OACN,OAAQC,EACR,QAAS,MACX,EACA,GAAGJ,EACH,GAAGC,CACL,EAMMK,EAAuB,CAC3B,GAAGP,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMO,EAA+B,CACnC,GAAGP,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMQ,EAA4B,CAChC,GAAGR,CACL",
6
- "names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
4
+ "sourcesContent": ["import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst contentVariants = ['solid', 'soft'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\n\nconst baseMenuContentPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: contentVariants,\n default: 'solid',\n },\n material: {\n type: 'enum',\n values: materials,\n default: undefined,\n },\n /**\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: {\n type: 'enum',\n values: panelBackgrounds,\n default: undefined,\n },\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n variant: PropDef<(typeof contentVariants)[number]>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n};\n"],
5
+ "mappings": "AAAA,OAAS,kBAAAA,MAAsB,+BAC/B,OAAS,gBAAAC,MAAoB,4BAC7B,OAAS,uBAAAC,MAA2B,oCAIpC,MAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAkB,CAAC,QAAS,MAAM,EAClCC,EAAmB,CAAC,QAAS,aAAa,EAC1CC,EAAY,CAAC,QAAS,aAAa,EAEnCC,EAA0B,CAC9B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQJ,EACR,QAAS,IACT,WAAY,EACd,EACA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,OACX,EACA,SAAU,CACR,KAAM,OACN,OAAQE,EACR,QAAS,MACX,EAIA,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,MACX,EACA,GAAGJ,EACH,GAAGC,CACL,EAOMM,EAAuB,CAC3B,GAAGR,EACH,GAAGC,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMQ,EAA+B,CACnC,GAAGR,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMS,EAA4B,CAChC,GAAGT,CACL",
6
+ "names": ["asChildPropDef", "colorPropDef", "highContrastPropDef", "contentSizes", "contentVariants", "panelBackgrounds", "materials", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
7
7
  }
@@ -19,9 +19,14 @@ declare const baseRadioPropDefs: {
19
19
  variant: {
20
20
  type: "enum";
21
21
  className: string;
22
- values: readonly ["classic", "solid", "soft"];
22
+ values: readonly ["classic", "solid", "soft", "outline", "surface"];
23
23
  default: "solid";
24
24
  };
25
+ material: {
26
+ type: "enum";
27
+ values: readonly ["solid", "translucent"];
28
+ default: undefined;
29
+ };
25
30
  };
26
31
  export { baseRadioPropDefs };
27
32
  //# sourceMappingURL=base-radio.props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-radio.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-radio.props.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;CAQtB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"base-radio.props.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/base-radio.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUtB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}