@womp/kookie-ui 0.16.0 → 0.17.0

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 (703) hide show
  1. package/codemods/space-0.17.py +71 -0
  2. package/components.css +2159 -3085
  3. package/dist/cjs/components/_internal/base-button.d.ts +0 -2
  4. package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
  5. package/dist/cjs/components/_internal/base-button.js +1 -1
  6. package/dist/cjs/components/_internal/base-button.js.map +3 -3
  7. package/dist/cjs/components/_internal/base-button.props.d.ts +0 -17
  8. package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
  9. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  10. package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
  11. package/dist/cjs/components/_internal/base-menu.props.d.ts +0 -10
  12. package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
  13. package/dist/cjs/components/_internal/base-menu.props.js +1 -1
  14. package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
  15. package/dist/cjs/components/_internal/base-menu.utils.d.ts +3 -9
  16. package/dist/cjs/components/_internal/base-menu.utils.d.ts.map +1 -1
  17. package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
  18. package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
  19. package/dist/cjs/components/_internal/base-tab-list.props.d.ts +0 -5
  20. package/dist/cjs/components/_internal/base-tab-list.props.d.ts.map +1 -1
  21. package/dist/cjs/components/_internal/base-tab-list.props.js +1 -1
  22. package/dist/cjs/components/_internal/base-tab-list.props.js.map +3 -3
  23. package/dist/cjs/components/_internal/menu-context.d.ts +2 -3
  24. package/dist/cjs/components/_internal/menu-context.d.ts.map +1 -1
  25. package/dist/cjs/components/_internal/menu-context.js +1 -1
  26. package/dist/cjs/components/_internal/menu-context.js.map +4 -4
  27. package/dist/cjs/components/_internal/pane-chrome.d.ts +14 -2
  28. package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
  29. package/dist/cjs/components/_internal/pane-chrome.js +1 -1
  30. package/dist/cjs/components/_internal/pane-chrome.js.map +3 -3
  31. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  32. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  33. package/dist/cjs/components/accordion.d.ts.map +1 -1
  34. package/dist/cjs/components/accordion.js +1 -1
  35. package/dist/cjs/components/accordion.js.map +3 -3
  36. package/dist/cjs/components/accordion.props.d.ts +0 -7
  37. package/dist/cjs/components/accordion.props.d.ts.map +1 -1
  38. package/dist/cjs/components/accordion.props.js +1 -1
  39. package/dist/cjs/components/accordion.props.js.map +3 -3
  40. package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
  41. package/dist/cjs/components/alert-dialog.js +1 -1
  42. package/dist/cjs/components/alert-dialog.js.map +3 -3
  43. package/dist/cjs/components/alert-dialog.props.d.ts +0 -5
  44. package/dist/cjs/components/alert-dialog.props.d.ts.map +1 -1
  45. package/dist/cjs/components/alert-dialog.props.js +1 -1
  46. package/dist/cjs/components/alert-dialog.props.js.map +3 -3
  47. package/dist/cjs/components/badge.js +1 -1
  48. package/dist/cjs/components/badge.js.map +3 -3
  49. package/dist/cjs/components/button.js +2 -2
  50. package/dist/cjs/components/button.js.map +3 -3
  51. package/dist/cjs/components/button.props.js +1 -1
  52. package/dist/cjs/components/button.props.js.map +3 -3
  53. package/dist/cjs/components/card.d.ts.map +1 -1
  54. package/dist/cjs/components/card.js +1 -1
  55. package/dist/cjs/components/card.js.map +3 -3
  56. package/dist/cjs/components/card.props.d.ts +0 -5
  57. package/dist/cjs/components/card.props.d.ts.map +1 -1
  58. package/dist/cjs/components/card.props.js +1 -1
  59. package/dist/cjs/components/card.props.js.map +3 -3
  60. package/dist/cjs/components/chatbar.d.ts +0 -2
  61. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  62. package/dist/cjs/components/chatbar.js +2 -2
  63. package/dist/cjs/components/chatbar.js.map +3 -3
  64. package/dist/cjs/components/checkbox-cards.d.ts.map +1 -1
  65. package/dist/cjs/components/checkbox-cards.js +1 -1
  66. package/dist/cjs/components/checkbox-cards.js.map +4 -4
  67. package/dist/cjs/components/checkbox-cards.props.d.ts +0 -5
  68. package/dist/cjs/components/checkbox-cards.props.d.ts.map +1 -1
  69. package/dist/cjs/components/checkbox-cards.props.js +1 -1
  70. package/dist/cjs/components/checkbox-cards.props.js.map +3 -3
  71. package/dist/cjs/components/combobox.d.ts.map +1 -1
  72. package/dist/cjs/components/combobox.js +1 -1
  73. package/dist/cjs/components/combobox.js.map +3 -3
  74. package/dist/cjs/components/combobox.props.d.ts +0 -9
  75. package/dist/cjs/components/combobox.props.d.ts.map +1 -1
  76. package/dist/cjs/components/combobox.props.js +1 -1
  77. package/dist/cjs/components/combobox.props.js.map +3 -3
  78. package/dist/cjs/components/context-menu.d.ts.map +1 -1
  79. package/dist/cjs/components/context-menu.js +1 -1
  80. package/dist/cjs/components/context-menu.js.map +4 -4
  81. package/dist/cjs/components/context-menu.props.js +1 -1
  82. package/dist/cjs/components/context-menu.props.js.map +3 -3
  83. package/dist/cjs/components/dialog.d.ts.map +1 -1
  84. package/dist/cjs/components/dialog.js +1 -1
  85. package/dist/cjs/components/dialog.js.map +3 -3
  86. package/dist/cjs/components/dialog.props.d.ts +0 -5
  87. package/dist/cjs/components/dialog.props.d.ts.map +1 -1
  88. package/dist/cjs/components/dialog.props.js +1 -1
  89. package/dist/cjs/components/dialog.props.js.map +3 -3
  90. package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
  91. package/dist/cjs/components/dropdown-menu.js +1 -1
  92. package/dist/cjs/components/dropdown-menu.js.map +4 -4
  93. package/dist/cjs/components/dropdown-menu.props.js +1 -1
  94. package/dist/cjs/components/dropdown-menu.props.js.map +3 -3
  95. package/dist/cjs/components/hover-card.js +1 -1
  96. package/dist/cjs/components/hover-card.js.map +3 -3
  97. package/dist/cjs/components/icon-button.js +2 -2
  98. package/dist/cjs/components/icon-button.js.map +3 -3
  99. package/dist/cjs/components/icon-button.props.js +1 -1
  100. package/dist/cjs/components/icon-button.props.js.map +3 -3
  101. package/dist/cjs/components/index.js +5 -5
  102. package/dist/cjs/components/index.js.map +4 -4
  103. package/dist/cjs/components/message-scroller.js +2 -2
  104. package/dist/cjs/components/message-scroller.js.map +3 -3
  105. package/dist/cjs/components/notice.d.ts +0 -2
  106. package/dist/cjs/components/notice.d.ts.map +1 -1
  107. package/dist/cjs/components/notice.js +2 -2
  108. package/dist/cjs/components/notice.js.map +3 -3
  109. package/dist/cjs/components/popover.d.ts.map +1 -1
  110. package/dist/cjs/components/popover.js +1 -1
  111. package/dist/cjs/components/popover.js.map +3 -3
  112. package/dist/cjs/components/popover.props.d.ts +0 -5
  113. package/dist/cjs/components/popover.props.d.ts.map +1 -1
  114. package/dist/cjs/components/popover.props.js +1 -1
  115. package/dist/cjs/components/popover.props.js.map +3 -3
  116. package/dist/cjs/components/radio-cards.d.ts.map +1 -1
  117. package/dist/cjs/components/radio-cards.js +1 -1
  118. package/dist/cjs/components/radio-cards.js.map +4 -4
  119. package/dist/cjs/components/radio-cards.props.d.ts +0 -5
  120. package/dist/cjs/components/radio-cards.props.d.ts.map +1 -1
  121. package/dist/cjs/components/radio-cards.props.js +1 -1
  122. package/dist/cjs/components/radio-cards.props.js.map +3 -3
  123. package/dist/cjs/components/schemas/base-button.schema.d.ts +0 -4
  124. package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
  125. package/dist/cjs/components/schemas/base-button.schema.js +1 -1
  126. package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
  127. package/dist/cjs/components/schemas/button.schema.d.ts +0 -4
  128. package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
  129. package/dist/cjs/components/schemas/button.schema.js +1 -1
  130. package/dist/cjs/components/schemas/button.schema.js.map +2 -2
  131. package/dist/cjs/components/schemas/icon-button.schema.d.ts +0 -4
  132. package/dist/cjs/components/schemas/icon-button.schema.d.ts.map +1 -1
  133. package/dist/cjs/components/schemas/icon-button.schema.js +1 -1
  134. package/dist/cjs/components/schemas/icon-button.schema.js.map +2 -2
  135. package/dist/cjs/components/schemas/index.js +1 -1
  136. package/dist/cjs/components/schemas/index.js.map +2 -2
  137. package/dist/cjs/components/schemas/toggle-button.schema.d.ts +0 -4
  138. package/dist/cjs/components/schemas/toggle-button.schema.d.ts.map +1 -1
  139. package/dist/cjs/components/schemas/toggle-button.schema.js +1 -1
  140. package/dist/cjs/components/schemas/toggle-button.schema.js.map +2 -2
  141. package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +0 -4
  142. package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
  143. package/dist/cjs/components/schemas/toggle-icon-button.schema.js +1 -1
  144. package/dist/cjs/components/schemas/toggle-icon-button.schema.js.map +2 -2
  145. package/dist/cjs/components/segmented-control.d.ts.map +1 -1
  146. package/dist/cjs/components/segmented-control.js +1 -1
  147. package/dist/cjs/components/segmented-control.js.map +3 -3
  148. package/dist/cjs/components/segmented-control.props.d.ts +0 -4
  149. package/dist/cjs/components/segmented-control.props.d.ts.map +1 -1
  150. package/dist/cjs/components/segmented-control.props.js +1 -1
  151. package/dist/cjs/components/segmented-control.props.js.map +2 -2
  152. package/dist/cjs/components/select.d.ts.map +1 -1
  153. package/dist/cjs/components/select.js +1 -1
  154. package/dist/cjs/components/select.js.map +3 -3
  155. package/dist/cjs/components/select.props.d.ts +0 -4
  156. package/dist/cjs/components/select.props.d.ts.map +1 -1
  157. package/dist/cjs/components/select.props.js +1 -1
  158. package/dist/cjs/components/select.props.js.map +2 -2
  159. package/dist/cjs/components/sheet.d.ts +0 -1
  160. package/dist/cjs/components/sheet.d.ts.map +1 -1
  161. package/dist/cjs/components/sheet.js +1 -1
  162. package/dist/cjs/components/sheet.js.map +3 -3
  163. package/dist/cjs/components/shell.js +1 -1
  164. package/dist/cjs/components/shell.js.map +3 -3
  165. package/dist/cjs/components/sidebar.js +1 -1
  166. package/dist/cjs/components/sidebar.js.map +4 -4
  167. package/dist/cjs/components/switch.js.map +2 -2
  168. package/dist/cjs/components/switch.props.d.ts.map +1 -1
  169. package/dist/cjs/components/switch.props.js.map +2 -2
  170. package/dist/cjs/components/tab-nav.d.ts.map +1 -1
  171. package/dist/cjs/components/tab-nav.js +1 -1
  172. package/dist/cjs/components/tab-nav.js.map +3 -3
  173. package/dist/cjs/components/tab-nav.props.js +1 -1
  174. package/dist/cjs/components/tab-nav.props.js.map +3 -3
  175. package/dist/cjs/components/tabs.d.ts.map +1 -1
  176. package/dist/cjs/components/tabs.js +1 -1
  177. package/dist/cjs/components/tabs.js.map +3 -3
  178. package/dist/cjs/components/tabs.props.js +1 -1
  179. package/dist/cjs/components/tabs.props.js.map +3 -3
  180. package/dist/cjs/components/text-area.d.ts.map +1 -1
  181. package/dist/cjs/components/text-area.js +1 -1
  182. package/dist/cjs/components/text-area.js.map +3 -3
  183. package/dist/cjs/components/text-area.props.d.ts +0 -5
  184. package/dist/cjs/components/text-area.props.d.ts.map +1 -1
  185. package/dist/cjs/components/text-area.props.js +1 -1
  186. package/dist/cjs/components/text-area.props.js.map +3 -3
  187. package/dist/cjs/components/text-field.d.ts.map +1 -1
  188. package/dist/cjs/components/text-field.js +2 -2
  189. package/dist/cjs/components/text-field.js.map +3 -3
  190. package/dist/cjs/components/text-field.props.d.ts +0 -5
  191. package/dist/cjs/components/text-field.props.d.ts.map +1 -1
  192. package/dist/cjs/components/text-field.props.js +1 -1
  193. package/dist/cjs/components/text-field.props.js.map +3 -3
  194. package/dist/cjs/components/theme-panel.d.ts.map +1 -1
  195. package/dist/cjs/components/theme-panel.js +3 -3
  196. package/dist/cjs/components/theme-panel.js.map +4 -4
  197. package/dist/cjs/components/theme.d.ts +0 -6
  198. package/dist/cjs/components/theme.d.ts.map +1 -1
  199. package/dist/cjs/components/theme.js +1 -1
  200. package/dist/cjs/components/theme.js.map +3 -3
  201. package/dist/cjs/components/theme.props.d.ts +0 -19
  202. package/dist/cjs/components/theme.props.d.ts.map +1 -1
  203. package/dist/cjs/components/theme.props.js +1 -1
  204. package/dist/cjs/components/theme.props.js.map +3 -3
  205. package/dist/cjs/components/toggle-button.js +3 -3
  206. package/dist/cjs/components/toggle-button.js.map +3 -3
  207. package/dist/cjs/components/toggle-icon-button.js +3 -3
  208. package/dist/cjs/components/toggle-icon-button.js.map +3 -3
  209. package/dist/cjs/components/toolbar.d.ts.map +1 -1
  210. package/dist/cjs/components/toolbar.js +2 -2
  211. package/dist/cjs/components/toolbar.js.map +4 -4
  212. package/dist/cjs/components/toolbar.props.d.ts +2 -1
  213. package/dist/cjs/components/toolbar.props.d.ts.map +1 -1
  214. package/dist/cjs/components/toolbar.props.js.map +2 -2
  215. package/dist/cjs/components/tooltip.js +1 -1
  216. package/dist/cjs/components/tooltip.js.map +3 -3
  217. package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
  218. package/dist/cjs/components/virtual-menu.js +1 -1
  219. package/dist/cjs/components/virtual-menu.js.map +4 -4
  220. package/dist/cjs/index.js +7 -7
  221. package/dist/cjs/index.js.map +4 -4
  222. package/dist/cjs/props/index.js +1 -1
  223. package/dist/cjs/props/index.js.map +3 -3
  224. package/dist/esm/chunk-2CNQGDY3.js +2 -0
  225. package/dist/esm/{chunk-MNC2O6QW.js.map → chunk-2CNQGDY3.js.map} +3 -3
  226. package/dist/esm/chunk-2HUAVZZL.js +2 -0
  227. package/dist/esm/chunk-2HUAVZZL.js.map +7 -0
  228. package/dist/esm/chunk-2O3WL25H.js +2 -0
  229. package/dist/esm/chunk-2O3WL25H.js.map +7 -0
  230. package/dist/esm/{chunk-MD3QCXRD.js → chunk-4STOJSJZ.js} +2 -2
  231. package/dist/esm/{chunk-R4CN4Q3G.js → chunk-534LGOWC.js} +2 -2
  232. package/dist/esm/chunk-5LGWS5QS.js +2 -0
  233. package/dist/esm/chunk-5LGWS5QS.js.map +7 -0
  234. package/dist/esm/{chunk-7UW7D77E.js → chunk-5UU2IMGX.js} +2 -2
  235. package/dist/esm/chunk-655TAWHX.js +2 -0
  236. package/dist/esm/chunk-655TAWHX.js.map +7 -0
  237. package/dist/esm/{chunk-MQT3YJKY.js → chunk-6HRBG5H2.js} +2 -2
  238. package/dist/esm/chunk-6VPYP3VN.js +2 -0
  239. package/dist/esm/chunk-6VPYP3VN.js.map +7 -0
  240. package/dist/esm/{chunk-PTEAQFHI.js → chunk-6WFEMPCF.js} +2 -2
  241. package/dist/esm/chunk-6XHM724Y.js +2 -0
  242. package/dist/esm/chunk-6XHM724Y.js.map +7 -0
  243. package/dist/esm/chunk-6YWJUNMB.js +2 -0
  244. package/dist/esm/chunk-6YWJUNMB.js.map +7 -0
  245. package/dist/esm/chunk-AHOUZS3V.js +2 -0
  246. package/dist/esm/chunk-AHOUZS3V.js.map +7 -0
  247. package/dist/esm/chunk-B6RH4CTY.js +2 -0
  248. package/dist/esm/chunk-B6RH4CTY.js.map +7 -0
  249. package/dist/esm/chunk-BOLRYGFQ.js +2 -0
  250. package/dist/esm/chunk-BOLRYGFQ.js.map +7 -0
  251. package/dist/esm/chunk-BUEYZEAY.js +2 -0
  252. package/dist/esm/chunk-BUEYZEAY.js.map +7 -0
  253. package/dist/esm/chunk-CC4GNSKL.js +2 -0
  254. package/dist/esm/chunk-CC4GNSKL.js.map +7 -0
  255. package/dist/esm/chunk-CG54MBMW.js +2 -0
  256. package/dist/esm/chunk-CG54MBMW.js.map +7 -0
  257. package/dist/esm/{chunk-2PO6TZ7L.js → chunk-COSHAOEK.js} +2 -2
  258. package/dist/esm/{chunk-F2XQYWBE.js → chunk-CRYT55SY.js} +2 -2
  259. package/dist/esm/chunk-DKALDTCN.js +2 -0
  260. package/dist/esm/chunk-DKALDTCN.js.map +7 -0
  261. package/dist/esm/{chunk-ELZEAEN2.js → chunk-DP3OWU5T.js} +2 -2
  262. package/dist/esm/{chunk-UI2EFF6F.js → chunk-E3754NJZ.js} +2 -2
  263. package/dist/esm/chunk-EJOVE3JH.js +2 -0
  264. package/dist/esm/chunk-EJOVE3JH.js.map +7 -0
  265. package/dist/esm/chunk-ENPQJYXZ.js +2 -0
  266. package/dist/esm/chunk-ENPQJYXZ.js.map +7 -0
  267. package/dist/esm/chunk-EO7WQYFO.js +2 -0
  268. package/dist/esm/chunk-EO7WQYFO.js.map +7 -0
  269. package/dist/esm/chunk-EUSKAXHP.js +2 -0
  270. package/dist/esm/chunk-EUSKAXHP.js.map +7 -0
  271. package/dist/esm/chunk-FPDLBLO3.js +2 -0
  272. package/dist/esm/chunk-FPDLBLO3.js.map +7 -0
  273. package/dist/esm/{chunk-6ERCPRXX.js → chunk-FSKZAL5H.js} +2 -2
  274. package/dist/esm/chunk-GOYI2U6F.js +2 -0
  275. package/dist/esm/chunk-GOYI2U6F.js.map +7 -0
  276. package/dist/esm/chunk-HSFQO4QM.js +2 -0
  277. package/dist/esm/chunk-HSFQO4QM.js.map +7 -0
  278. package/dist/esm/chunk-IF4PYIUV.js +2 -0
  279. package/dist/esm/chunk-IF4PYIUV.js.map +7 -0
  280. package/dist/esm/chunk-IGBEDJBC.js +2 -0
  281. package/dist/esm/chunk-IGBEDJBC.js.map +7 -0
  282. package/dist/esm/chunk-JCOALADA.js +5 -0
  283. package/dist/esm/chunk-JCOALADA.js.map +7 -0
  284. package/dist/esm/{chunk-ZUOK3KFY.js → chunk-K7VO7TND.js} +1 -1
  285. package/dist/esm/{chunk-ZUOK3KFY.js.map → chunk-K7VO7TND.js.map} +2 -2
  286. package/dist/esm/{chunk-DIGT74P3.js → chunk-KPACVWV4.js} +1 -1
  287. package/dist/esm/{chunk-DIGT74P3.js.map → chunk-KPACVWV4.js.map} +2 -2
  288. package/dist/esm/chunk-KU3LLWFU.js +2 -0
  289. package/dist/esm/{chunk-UPCRXJB2.js.map → chunk-KU3LLWFU.js.map} +2 -2
  290. package/dist/esm/chunk-M55KFXYV.js +2 -0
  291. package/dist/esm/chunk-M55KFXYV.js.map +7 -0
  292. package/dist/esm/chunk-MAI7FEU7.js +2 -0
  293. package/dist/esm/chunk-MAI7FEU7.js.map +7 -0
  294. package/dist/esm/chunk-MDHXSEGH.js +2 -0
  295. package/dist/esm/chunk-MDHXSEGH.js.map +7 -0
  296. package/dist/esm/{chunk-YKGLZEXX.js → chunk-MJC4NKYG.js} +2 -2
  297. package/dist/esm/chunk-MOYLXCMW.js +2 -0
  298. package/dist/esm/chunk-MOYLXCMW.js.map +7 -0
  299. package/dist/esm/{chunk-Y4IB7KDZ.js → chunk-MZQDDG5K.js} +2 -2
  300. package/dist/esm/chunk-NCDOMH5I.js +2 -0
  301. package/dist/esm/chunk-NCDOMH5I.js.map +7 -0
  302. package/dist/esm/{chunk-DDYII5NA.js → chunk-NOSR2XWD.js} +2 -2
  303. package/dist/esm/chunk-OMUUPPJO.js +2 -0
  304. package/dist/esm/chunk-OMUUPPJO.js.map +7 -0
  305. package/dist/esm/{chunk-J43ZS6TI.js → chunk-ORMCQAPS.js} +2 -2
  306. package/dist/esm/chunk-PNIVUG5D.js +2 -0
  307. package/dist/esm/chunk-PNIVUG5D.js.map +7 -0
  308. package/dist/esm/chunk-PYYI64XK.js +2 -0
  309. package/dist/esm/chunk-PYYI64XK.js.map +7 -0
  310. package/dist/esm/chunk-Q7S5LQBQ.js +2 -0
  311. package/dist/esm/chunk-Q7S5LQBQ.js.map +7 -0
  312. package/dist/esm/chunk-QOPRXQGR.js +2 -0
  313. package/dist/esm/chunk-QOPRXQGR.js.map +7 -0
  314. package/dist/esm/{chunk-MLJLEOZ5.js → chunk-R2FUNQTI.js} +2 -2
  315. package/dist/esm/{chunk-MLJLEOZ5.js.map → chunk-R2FUNQTI.js.map} +2 -2
  316. package/dist/esm/chunk-RFURPE7W.js +10 -0
  317. package/dist/esm/chunk-RFURPE7W.js.map +7 -0
  318. package/dist/esm/chunk-RJ6SA7AY.js +2 -0
  319. package/dist/esm/chunk-RJ6SA7AY.js.map +7 -0
  320. package/dist/esm/chunk-RSJSVJ6A.js +2 -0
  321. package/dist/esm/chunk-RSJSVJ6A.js.map +7 -0
  322. package/dist/esm/chunk-SM27AC7E.js +2 -0
  323. package/dist/esm/chunk-SM27AC7E.js.map +7 -0
  324. package/dist/esm/chunk-WKMJIWFP.js +2 -0
  325. package/dist/esm/chunk-WKMJIWFP.js.map +7 -0
  326. package/dist/esm/{chunk-5RHODJDJ.js → chunk-X5KCVLKG.js} +2 -2
  327. package/dist/esm/chunk-YDRFILTX.js +2 -0
  328. package/dist/esm/chunk-YDRFILTX.js.map +7 -0
  329. package/dist/esm/chunk-YGPUKJEB.js +2 -0
  330. package/dist/esm/chunk-YGPUKJEB.js.map +7 -0
  331. package/dist/esm/{chunk-PAB6HVKC.js → chunk-YZABQ4LS.js} +2 -2
  332. package/dist/esm/components/_internal/base-button.d.ts +0 -2
  333. package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
  334. package/dist/esm/components/_internal/base-button.js +1 -1
  335. package/dist/esm/components/_internal/base-button.props.d.ts +0 -17
  336. package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
  337. package/dist/esm/components/_internal/base-button.props.js +1 -1
  338. package/dist/esm/components/_internal/base-menu.props.d.ts +0 -10
  339. package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
  340. package/dist/esm/components/_internal/base-menu.props.js +1 -1
  341. package/dist/esm/components/_internal/base-menu.utils.d.ts +3 -9
  342. package/dist/esm/components/_internal/base-menu.utils.d.ts.map +1 -1
  343. package/dist/esm/components/_internal/base-menu.utils.js +1 -1
  344. package/dist/esm/components/_internal/base-tab-list.props.d.ts +0 -5
  345. package/dist/esm/components/_internal/base-tab-list.props.d.ts.map +1 -1
  346. package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
  347. package/dist/esm/components/_internal/menu-context.d.ts +2 -3
  348. package/dist/esm/components/_internal/menu-context.d.ts.map +1 -1
  349. package/dist/esm/components/_internal/menu-context.js +1 -1
  350. package/dist/esm/components/_internal/pane-chrome.d.ts +14 -2
  351. package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
  352. package/dist/esm/components/_internal/pane-chrome.js +1 -1
  353. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  354. package/dist/esm/components/accordion.d.ts.map +1 -1
  355. package/dist/esm/components/accordion.js +1 -1
  356. package/dist/esm/components/accordion.props.d.ts +0 -7
  357. package/dist/esm/components/accordion.props.d.ts.map +1 -1
  358. package/dist/esm/components/accordion.props.js +1 -1
  359. package/dist/esm/components/alert-dialog.d.ts.map +1 -1
  360. package/dist/esm/components/alert-dialog.js +1 -1
  361. package/dist/esm/components/alert-dialog.props.d.ts +0 -5
  362. package/dist/esm/components/alert-dialog.props.d.ts.map +1 -1
  363. package/dist/esm/components/alert-dialog.props.js +1 -1
  364. package/dist/esm/components/badge.js +1 -1
  365. package/dist/esm/components/button.js +1 -1
  366. package/dist/esm/components/button.props.js +1 -1
  367. package/dist/esm/components/card.d.ts.map +1 -1
  368. package/dist/esm/components/card.js +1 -1
  369. package/dist/esm/components/card.props.d.ts +0 -5
  370. package/dist/esm/components/card.props.d.ts.map +1 -1
  371. package/dist/esm/components/card.props.js +1 -1
  372. package/dist/esm/components/chatbar.d.ts +0 -2
  373. package/dist/esm/components/chatbar.d.ts.map +1 -1
  374. package/dist/esm/components/chatbar.js +1 -1
  375. package/dist/esm/components/checkbox-cards.d.ts.map +1 -1
  376. package/dist/esm/components/checkbox-cards.js +1 -1
  377. package/dist/esm/components/checkbox-cards.props.d.ts +0 -5
  378. package/dist/esm/components/checkbox-cards.props.d.ts.map +1 -1
  379. package/dist/esm/components/checkbox-cards.props.js +1 -1
  380. package/dist/esm/components/combobox.d.ts.map +1 -1
  381. package/dist/esm/components/combobox.js +1 -1
  382. package/dist/esm/components/combobox.props.d.ts +0 -9
  383. package/dist/esm/components/combobox.props.d.ts.map +1 -1
  384. package/dist/esm/components/combobox.props.js +1 -1
  385. package/dist/esm/components/context-menu.d.ts.map +1 -1
  386. package/dist/esm/components/context-menu.js +1 -1
  387. package/dist/esm/components/context-menu.props.js +1 -1
  388. package/dist/esm/components/dialog.d.ts.map +1 -1
  389. package/dist/esm/components/dialog.js +1 -1
  390. package/dist/esm/components/dialog.props.d.ts +0 -5
  391. package/dist/esm/components/dialog.props.d.ts.map +1 -1
  392. package/dist/esm/components/dialog.props.js +1 -1
  393. package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
  394. package/dist/esm/components/dropdown-menu.js +1 -1
  395. package/dist/esm/components/dropdown-menu.props.js +1 -1
  396. package/dist/esm/components/hover-card.js +1 -1
  397. package/dist/esm/components/icon-button.js +1 -1
  398. package/dist/esm/components/icon-button.props.js +1 -1
  399. package/dist/esm/components/index.js +1 -1
  400. package/dist/esm/components/message-scroller.js +1 -1
  401. package/dist/esm/components/notice.d.ts +0 -2
  402. package/dist/esm/components/notice.d.ts.map +1 -1
  403. package/dist/esm/components/notice.js +1 -1
  404. package/dist/esm/components/popover.d.ts.map +1 -1
  405. package/dist/esm/components/popover.js +1 -1
  406. package/dist/esm/components/popover.props.d.ts +0 -5
  407. package/dist/esm/components/popover.props.d.ts.map +1 -1
  408. package/dist/esm/components/popover.props.js +1 -1
  409. package/dist/esm/components/radio-cards.d.ts.map +1 -1
  410. package/dist/esm/components/radio-cards.js +1 -1
  411. package/dist/esm/components/radio-cards.props.d.ts +0 -5
  412. package/dist/esm/components/radio-cards.props.d.ts.map +1 -1
  413. package/dist/esm/components/radio-cards.props.js +1 -1
  414. package/dist/esm/components/schemas/base-button.schema.d.ts +0 -4
  415. package/dist/esm/components/schemas/base-button.schema.d.ts.map +1 -1
  416. package/dist/esm/components/schemas/base-button.schema.js +1 -1
  417. package/dist/esm/components/schemas/button.schema.d.ts +0 -4
  418. package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
  419. package/dist/esm/components/schemas/button.schema.js +1 -1
  420. package/dist/esm/components/schemas/icon-button.schema.d.ts +0 -4
  421. package/dist/esm/components/schemas/icon-button.schema.d.ts.map +1 -1
  422. package/dist/esm/components/schemas/icon-button.schema.js +1 -1
  423. package/dist/esm/components/schemas/index.js +1 -1
  424. package/dist/esm/components/schemas/toggle-button.schema.d.ts +0 -4
  425. package/dist/esm/components/schemas/toggle-button.schema.d.ts.map +1 -1
  426. package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
  427. package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +0 -4
  428. package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
  429. package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
  430. package/dist/esm/components/segmented-control.d.ts.map +1 -1
  431. package/dist/esm/components/segmented-control.js +1 -1
  432. package/dist/esm/components/segmented-control.props.d.ts +0 -4
  433. package/dist/esm/components/segmented-control.props.d.ts.map +1 -1
  434. package/dist/esm/components/segmented-control.props.js +1 -1
  435. package/dist/esm/components/select.d.ts.map +1 -1
  436. package/dist/esm/components/select.js +1 -1
  437. package/dist/esm/components/select.props.d.ts +0 -4
  438. package/dist/esm/components/select.props.d.ts.map +1 -1
  439. package/dist/esm/components/select.props.js +1 -1
  440. package/dist/esm/components/sheet.d.ts +0 -1
  441. package/dist/esm/components/sheet.d.ts.map +1 -1
  442. package/dist/esm/components/sheet.js +1 -1
  443. package/dist/esm/components/shell.js +1 -1
  444. package/dist/esm/components/sidebar.js +1 -1
  445. package/dist/esm/components/switch.js +1 -1
  446. package/dist/esm/components/switch.props.d.ts.map +1 -1
  447. package/dist/esm/components/switch.props.js +1 -1
  448. package/dist/esm/components/tab-nav.d.ts.map +1 -1
  449. package/dist/esm/components/tab-nav.js +1 -1
  450. package/dist/esm/components/tab-nav.props.js +1 -1
  451. package/dist/esm/components/tabs.d.ts.map +1 -1
  452. package/dist/esm/components/tabs.js +1 -1
  453. package/dist/esm/components/tabs.props.js +1 -1
  454. package/dist/esm/components/text-area.d.ts.map +1 -1
  455. package/dist/esm/components/text-area.js +1 -1
  456. package/dist/esm/components/text-area.props.d.ts +0 -5
  457. package/dist/esm/components/text-area.props.d.ts.map +1 -1
  458. package/dist/esm/components/text-area.props.js +1 -1
  459. package/dist/esm/components/text-field.d.ts.map +1 -1
  460. package/dist/esm/components/text-field.js +1 -1
  461. package/dist/esm/components/text-field.props.d.ts +0 -5
  462. package/dist/esm/components/text-field.props.d.ts.map +1 -1
  463. package/dist/esm/components/text-field.props.js +1 -1
  464. package/dist/esm/components/theme-panel.d.ts.map +1 -1
  465. package/dist/esm/components/theme-panel.js +1 -1
  466. package/dist/esm/components/theme.d.ts +0 -6
  467. package/dist/esm/components/theme.d.ts.map +1 -1
  468. package/dist/esm/components/theme.js +1 -1
  469. package/dist/esm/components/theme.props.d.ts +0 -19
  470. package/dist/esm/components/theme.props.d.ts.map +1 -1
  471. package/dist/esm/components/theme.props.js +1 -1
  472. package/dist/esm/components/toggle-button.js +1 -1
  473. package/dist/esm/components/toggle-icon-button.js +1 -1
  474. package/dist/esm/components/toolbar.d.ts.map +1 -1
  475. package/dist/esm/components/toolbar.js +1 -1
  476. package/dist/esm/components/toolbar.props.d.ts +2 -1
  477. package/dist/esm/components/toolbar.props.d.ts.map +1 -1
  478. package/dist/esm/components/toolbar.props.js +1 -1
  479. package/dist/esm/components/tooltip.js +1 -1
  480. package/dist/esm/components/virtual-menu.d.ts.map +1 -1
  481. package/dist/esm/components/virtual-menu.js +1 -1
  482. package/dist/esm/helpers/index.js +1 -1
  483. package/dist/esm/index.js +1 -1
  484. package/dist/esm/props/index.js +1 -1
  485. package/layout/components.css +48 -48
  486. package/layout/tokens.css +65 -31
  487. package/layout.css +113 -79
  488. package/package.json +2 -1
  489. package/schemas/base-button.json +0 -8
  490. package/schemas/button.json +0 -8
  491. package/schemas/icon-button.json +0 -8
  492. package/schemas/index.json +0 -40
  493. package/schemas/toggle-button.json +0 -8
  494. package/schemas/toggle-icon-button.json +0 -8
  495. package/src/components/_internal/base-button.css +19 -100
  496. package/src/components/_internal/base-button.props.ts +0 -26
  497. package/src/components/_internal/base-button.tsx +0 -6
  498. package/src/components/_internal/base-card.css +32 -194
  499. package/src/components/_internal/base-checkbox.css +16 -53
  500. package/src/components/_internal/base-dialog.css +13 -45
  501. package/src/components/_internal/base-menu.css +24 -57
  502. package/src/components/_internal/base-menu.props.ts +0 -8
  503. package/src/components/_internal/base-menu.utils.tsx +4 -15
  504. package/src/components/_internal/base-radio.css +14 -51
  505. package/src/components/_internal/base-sidebar-menu.css +21 -19
  506. package/src/components/_internal/base-sidebar.css +2 -3
  507. package/src/components/_internal/base-tab-list.css +14 -61
  508. package/src/components/_internal/base-tab-list.props.ts +0 -3
  509. package/src/components/_internal/menu-context.tsx +6 -10
  510. package/src/components/_internal/pane-chrome.tsx +40 -8
  511. package/src/components/accordion.css +17 -263
  512. package/src/components/accordion.props.tsx +0 -4
  513. package/src/components/accordion.tsx +1 -4
  514. package/src/components/alert-dialog.props.tsx +0 -4
  515. package/src/components/alert-dialog.tsx +1 -14
  516. package/src/components/avatar.css +19 -57
  517. package/src/components/badge.css +28 -41
  518. package/src/components/blockquote.css +2 -2
  519. package/src/components/button.css +13 -13
  520. package/src/components/card.props.tsx +0 -3
  521. package/src/components/card.tsx +1 -3
  522. package/src/components/chatbar.css +44 -124
  523. package/src/components/chatbar.tsx +1 -7
  524. package/src/components/checkbox-cards.css +11 -11
  525. package/src/components/checkbox-cards.props.tsx +0 -3
  526. package/src/components/checkbox-cards.tsx +0 -5
  527. package/src/components/checkbox-group.css +1 -1
  528. package/src/components/combobox.css +4 -9
  529. package/src/components/combobox.props.tsx +0 -5
  530. package/src/components/combobox.tsx +1 -11
  531. package/src/components/context-menu.tsx +6 -19
  532. package/src/components/data-list.css +4 -4
  533. package/src/components/dialog.css +0 -12
  534. package/src/components/dialog.props.tsx +0 -3
  535. package/src/components/dialog.tsx +1 -14
  536. package/src/components/dropdown-menu.css +1 -1
  537. package/src/components/dropdown-menu.tsx +5 -19
  538. package/src/components/hover-card.css +3 -3
  539. package/src/components/icon-button.css +4 -4
  540. package/src/components/image.css +1 -1
  541. package/src/components/kbd.css +14 -14
  542. package/src/components/message-scroller.css +1 -1
  543. package/src/components/navbar.css +6 -6
  544. package/src/components/notice.css +9 -15
  545. package/src/components/notice.tsx +1 -4
  546. package/src/components/popover.css +15 -37
  547. package/src/components/popover.props.tsx +0 -3
  548. package/src/components/popover.tsx +0 -5
  549. package/src/components/progress.css +0 -69
  550. package/src/components/radio-cards.css +6 -6
  551. package/src/components/radio-cards.props.tsx +0 -3
  552. package/src/components/radio-cards.tsx +0 -5
  553. package/src/components/radio-group.css +1 -1
  554. package/src/components/schemas/base-button.schema.ts +0 -9
  555. package/src/components/scroll-area.css +14 -14
  556. package/src/components/section.css +8 -8
  557. package/src/components/segmented-control.css +25 -68
  558. package/src/components/segmented-control.props.tsx +0 -2
  559. package/src/components/segmented-control.tsx +0 -4
  560. package/src/components/select.css +24 -363
  561. package/src/components/select.props.tsx +0 -2
  562. package/src/components/select.tsx +0 -2
  563. package/src/components/separator.css +3 -3
  564. package/src/components/sheet.css +0 -11
  565. package/src/components/sheet.tsx +1 -18
  566. package/src/components/shell.css +45 -30
  567. package/src/components/sidebar.css +108 -198
  568. package/src/components/skeleton.css +1 -1
  569. package/src/components/slider.css +16 -87
  570. package/src/components/spinner.css +6 -6
  571. package/src/components/switch.css +10 -37
  572. package/src/components/switch.props.tsx +0 -8
  573. package/src/components/tab-nav.tsx +1 -3
  574. package/src/components/table.css +10 -18
  575. package/src/components/tabs.tsx +1 -3
  576. package/src/components/text-area.css +41 -154
  577. package/src/components/text-area.props.tsx +0 -3
  578. package/src/components/text-area.tsx +1 -3
  579. package/src/components/text-field.css +36 -244
  580. package/src/components/text-field.props.tsx +0 -3
  581. package/src/components/text-field.tsx +1 -3
  582. package/src/components/theme-panel.css +4 -4
  583. package/src/components/theme-panel.tsx +19 -236
  584. package/src/components/theme.props.tsx +0 -15
  585. package/src/components/theme.tsx +0 -35
  586. package/src/components/toolbar.css +9 -9
  587. package/src/components/toolbar.props.tsx +2 -1
  588. package/src/components/toolbar.tsx +5 -2
  589. package/src/components/tooltip.css +1 -1
  590. package/src/components/virtual-menu.tsx +2 -4
  591. package/src/styles/tokens/base.css +0 -2
  592. package/src/styles/tokens/color.css +4 -32
  593. package/src/styles/tokens/constants.css +23 -51
  594. package/src/styles/tokens/layout.css +1 -1
  595. package/src/styles/tokens/radius.css +24 -24
  596. package/src/styles/tokens/space.css +88 -21
  597. package/src/styles/tokens/typography.css +39 -39
  598. package/styles.css +2418 -3410
  599. package/tokens/base.css +229 -283
  600. package/tokens.css +252 -318
  601. package/dist/esm/chunk-23WDP4JG.js +0 -2
  602. package/dist/esm/chunk-23WDP4JG.js.map +0 -7
  603. package/dist/esm/chunk-2IWL4V4H.js +0 -2
  604. package/dist/esm/chunk-2IWL4V4H.js.map +0 -7
  605. package/dist/esm/chunk-2MYYU7ST.js +0 -2
  606. package/dist/esm/chunk-2MYYU7ST.js.map +0 -7
  607. package/dist/esm/chunk-2NNB4ZZ5.js +0 -2
  608. package/dist/esm/chunk-2NNB4ZZ5.js.map +0 -7
  609. package/dist/esm/chunk-2NNCZM7P.js +0 -2
  610. package/dist/esm/chunk-2NNCZM7P.js.map +0 -7
  611. package/dist/esm/chunk-3PT3AOD5.js +0 -2
  612. package/dist/esm/chunk-3PT3AOD5.js.map +0 -7
  613. package/dist/esm/chunk-4EBCFKNC.js +0 -2
  614. package/dist/esm/chunk-4EBCFKNC.js.map +0 -7
  615. package/dist/esm/chunk-5PG5YGIW.js +0 -2
  616. package/dist/esm/chunk-5PG5YGIW.js.map +0 -7
  617. package/dist/esm/chunk-BDOMLGLZ.js +0 -2
  618. package/dist/esm/chunk-BDOMLGLZ.js.map +0 -7
  619. package/dist/esm/chunk-CAUFRKTK.js +0 -2
  620. package/dist/esm/chunk-CAUFRKTK.js.map +0 -7
  621. package/dist/esm/chunk-CJ4UZDW5.js +0 -2
  622. package/dist/esm/chunk-CJ4UZDW5.js.map +0 -7
  623. package/dist/esm/chunk-DD5QHU6R.js +0 -2
  624. package/dist/esm/chunk-DD5QHU6R.js.map +0 -7
  625. package/dist/esm/chunk-DQTJMIRO.js +0 -2
  626. package/dist/esm/chunk-DQTJMIRO.js.map +0 -7
  627. package/dist/esm/chunk-E5DJILUI.js +0 -2
  628. package/dist/esm/chunk-E5DJILUI.js.map +0 -7
  629. package/dist/esm/chunk-EJG2UNTM.js +0 -2
  630. package/dist/esm/chunk-EJG2UNTM.js.map +0 -7
  631. package/dist/esm/chunk-FK6F6ROH.js +0 -2
  632. package/dist/esm/chunk-FK6F6ROH.js.map +0 -7
  633. package/dist/esm/chunk-HI3JY3DJ.js +0 -2
  634. package/dist/esm/chunk-HI3JY3DJ.js.map +0 -7
  635. package/dist/esm/chunk-IMYZP5OY.js +0 -2
  636. package/dist/esm/chunk-IMYZP5OY.js.map +0 -7
  637. package/dist/esm/chunk-IYXR46Q6.js +0 -5
  638. package/dist/esm/chunk-IYXR46Q6.js.map +0 -7
  639. package/dist/esm/chunk-JGB6LNTP.js +0 -2
  640. package/dist/esm/chunk-JGB6LNTP.js.map +0 -7
  641. package/dist/esm/chunk-JLHJHYVQ.js +0 -2
  642. package/dist/esm/chunk-JLHJHYVQ.js.map +0 -7
  643. package/dist/esm/chunk-LRFAOQK6.js +0 -2
  644. package/dist/esm/chunk-LRFAOQK6.js.map +0 -7
  645. package/dist/esm/chunk-LXSARUXD.js +0 -2
  646. package/dist/esm/chunk-LXSARUXD.js.map +0 -7
  647. package/dist/esm/chunk-MNC2O6QW.js +0 -2
  648. package/dist/esm/chunk-MOMYWKIO.js +0 -2
  649. package/dist/esm/chunk-MOMYWKIO.js.map +0 -7
  650. package/dist/esm/chunk-PRRJ4WRE.js +0 -2
  651. package/dist/esm/chunk-PRRJ4WRE.js.map +0 -7
  652. package/dist/esm/chunk-QE2EF7A7.js +0 -2
  653. package/dist/esm/chunk-QE2EF7A7.js.map +0 -7
  654. package/dist/esm/chunk-QJSSCW3B.js +0 -2
  655. package/dist/esm/chunk-QJSSCW3B.js.map +0 -7
  656. package/dist/esm/chunk-QPNYHS6A.js +0 -2
  657. package/dist/esm/chunk-QPNYHS6A.js.map +0 -7
  658. package/dist/esm/chunk-RA4U6VVZ.js +0 -2
  659. package/dist/esm/chunk-RA4U6VVZ.js.map +0 -7
  660. package/dist/esm/chunk-ULSNYQOY.js +0 -2
  661. package/dist/esm/chunk-ULSNYQOY.js.map +0 -7
  662. package/dist/esm/chunk-UPCRXJB2.js +0 -2
  663. package/dist/esm/chunk-URLG45A4.js +0 -2
  664. package/dist/esm/chunk-URLG45A4.js.map +0 -7
  665. package/dist/esm/chunk-UZS3BA2Z.js +0 -2
  666. package/dist/esm/chunk-UZS3BA2Z.js.map +0 -7
  667. package/dist/esm/chunk-W7VAP3WE.js +0 -2
  668. package/dist/esm/chunk-W7VAP3WE.js.map +0 -7
  669. package/dist/esm/chunk-WGNIFXUE.js +0 -2
  670. package/dist/esm/chunk-WGNIFXUE.js.map +0 -7
  671. package/dist/esm/chunk-WNSG5P3U.js +0 -2
  672. package/dist/esm/chunk-WNSG5P3U.js.map +0 -7
  673. package/dist/esm/chunk-X3UTLDGG.js +0 -2
  674. package/dist/esm/chunk-X3UTLDGG.js.map +0 -7
  675. package/dist/esm/chunk-XCDXQLWS.js +0 -2
  676. package/dist/esm/chunk-XCDXQLWS.js.map +0 -7
  677. package/dist/esm/chunk-XKAWVGBL.js +0 -2
  678. package/dist/esm/chunk-XKAWVGBL.js.map +0 -7
  679. package/dist/esm/chunk-Y3FVBAN2.js +0 -2
  680. package/dist/esm/chunk-Y3FVBAN2.js.map +0 -7
  681. package/dist/esm/chunk-YSHEXVBI.js +0 -10
  682. package/dist/esm/chunk-YSHEXVBI.js.map +0 -7
  683. package/dist/esm/chunk-Z2LGVLUB.js +0 -2
  684. package/dist/esm/chunk-Z2LGVLUB.js.map +0 -7
  685. package/src/styles/tokens/blur.css +0 -63
  686. package/src/styles/tokens/opacity.css +0 -32
  687. package/src/styles/tokens/scaling.css +0 -17
  688. /package/dist/esm/{chunk-MD3QCXRD.js.map → chunk-4STOJSJZ.js.map} +0 -0
  689. /package/dist/esm/{chunk-R4CN4Q3G.js.map → chunk-534LGOWC.js.map} +0 -0
  690. /package/dist/esm/{chunk-7UW7D77E.js.map → chunk-5UU2IMGX.js.map} +0 -0
  691. /package/dist/esm/{chunk-MQT3YJKY.js.map → chunk-6HRBG5H2.js.map} +0 -0
  692. /package/dist/esm/{chunk-PTEAQFHI.js.map → chunk-6WFEMPCF.js.map} +0 -0
  693. /package/dist/esm/{chunk-2PO6TZ7L.js.map → chunk-COSHAOEK.js.map} +0 -0
  694. /package/dist/esm/{chunk-F2XQYWBE.js.map → chunk-CRYT55SY.js.map} +0 -0
  695. /package/dist/esm/{chunk-ELZEAEN2.js.map → chunk-DP3OWU5T.js.map} +0 -0
  696. /package/dist/esm/{chunk-UI2EFF6F.js.map → chunk-E3754NJZ.js.map} +0 -0
  697. /package/dist/esm/{chunk-6ERCPRXX.js.map → chunk-FSKZAL5H.js.map} +0 -0
  698. /package/dist/esm/{chunk-YKGLZEXX.js.map → chunk-MJC4NKYG.js.map} +0 -0
  699. /package/dist/esm/{chunk-Y4IB7KDZ.js.map → chunk-MZQDDG5K.js.map} +0 -0
  700. /package/dist/esm/{chunk-DDYII5NA.js.map → chunk-NOSR2XWD.js.map} +0 -0
  701. /package/dist/esm/{chunk-J43ZS6TI.js.map → chunk-ORMCQAPS.js.map} +0 -0
  702. /package/dist/esm/{chunk-5RHODJDJ.js.map → chunk-X5KCVLKG.js.map} +0 -0
  703. /package/dist/esm/{chunk-PAB6HVKC.js.map → chunk-YZABQ4LS.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/checkbox-cards.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Context } from 'radix-ui/internal';\n\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive.js';\nimport { createCheckboxGroupScope } from './checkbox-group.primitive.js';\nimport { checkboxCardsRootPropDefs } from './checkbox-cards.props.js';\nimport { baseCheckboxPropDefs } from './_internal/base-checkbox.props.js';\nimport { Grid } from './grid.js';\nimport { ThickCheckIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { Responsive, GetPropDefTypes } from '../props/prop-def.js';\n\nconst CHECKBOX_CARD_GROUP_NAME = 'CheckboxCards';\n\ntype ScopedProps<P> = P & { __scopeCheckboxCards?: Context.Scope };\nconst [createCheckboxCardsContext] = Context.createContextScope(CHECKBOX_CARD_GROUP_NAME, [\n createCheckboxGroupScope,\n]);\nconst useCheckboxGroupScope = createCheckboxGroupScope();\n\ntype CheckboxCardsContextValue = {\n size?: Responsive<(typeof checkboxCardsRootPropDefs.size.values)[number]>;\n variant?: (typeof checkboxCardsRootPropDefs.variant.values)[number];\n};\n\nconst [CheckboxCardsProvider, useCheckboxCardsContext] =\n createCheckboxCardsContext<CheckboxCardsContextValue>(CHECKBOX_CARD_GROUP_NAME);\n\ntype CheckboxCardsRootElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxCardsRootOwnProps = GetPropDefTypes<typeof checkboxCardsRootPropDefs>;\ninterface CheckboxCardsRootProps\n extends ComponentPropsWithout<\n typeof CheckboxGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n MarginProps,\n CheckboxCardsRootOwnProps {}\nconst CheckboxCardsRoot = React.forwardRef<CheckboxCardsRootElement, CheckboxCardsRootProps>(\n (props: ScopedProps<CheckboxCardsRootProps>, forwardedRef) => {\n const {\n __scopeCheckboxCards,\n className,\n color,\n ...rootProps\n } = extractProps(props, checkboxCardsRootPropDefs, marginPropDefs);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxCards);\n return (\n <CheckboxCardsProvider\n scope={__scopeCheckboxCards}\n size={props.size}\n variant={props.variant}\n >\n <Grid asChild>\n <CheckboxGroupPrimitive.Root\n {...checkboxGroupScope}\n data-accent-color={color}\n {...rootProps}\n ref={forwardedRef}\n className={classNames('rt-CheckboxCardsRoot', className)}\n />\n </Grid>\n </CheckboxCardsProvider>\n );\n },\n);\nCheckboxCardsRoot.displayName = 'CheckboxCards.Root';\n\ntype CheckboxCardsItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxCardsItemProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps>,\n MarginProps {}\nconst CheckboxCardsItem = React.forwardRef<\n CheckboxCardsItemElement,\n ScopedProps<CheckboxCardsItemProps>\n>(({ __scopeCheckboxCards, children, className, style, ...props }, forwardedRef) => {\n const context = useCheckboxCardsContext('CheckboxCardsItem', __scopeCheckboxCards);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxCards);\n\n const { className: checkboxClassName } = extractProps(\n // Pass size and variant values from the context to generate styles\n {\n size: context?.size,\n variant: context?.variant || 'solid',\n },\n // Pass size & variant prop defs to allow it to be extracted\n baseCheckboxPropDefs,\n );\n const variantClass = context?.variant ? `rt-variant-${context.variant}` : undefined;\n const sizeClass = context?.size ? `rt-r-size-${context.size}` : undefined;\n\n return (\n <label\n className={classNames(\n 'rt-BaseCard',\n 'rt-CheckboxCardsItem',\n variantClass,\n sizeClass,\n className,\n )}\n style={style}\n >\n {children}\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-reset',\n 'rt-BaseCheckboxRoot',\n 'rt-CheckboxCardCheckbox',\n checkboxClassName,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"rt-BaseCheckboxIndicator\"\n >\n <ThickCheckIcon />\n </CheckboxGroupPrimitive.Indicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n );\n});\nCheckboxCardsItem.displayName = 'CheckboxCards.Item';\n\nexport { CheckboxCardsRoot as Root, CheckboxCardsItem as Item };\nexport type { CheckboxCardsRootProps as RootProps, CheckboxC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ACAC,EACAjB,CACF,EACA,MAAOY,GAEND,EACD,gBAAwBO,EAAvB,CACE,GAAGZ,EACH,GAAGT,EACJ,IAAKC,EACL,UAAWW,EACT,WACA,sBACA,0BACAK,CACF,GAEA,gBAAwBK,EAAvB,CACE,GAAGb,EACJ,QAAO,GACP,UAAU,4BAEV,gBAACc,EAAA,IAAe,CAClB,CACF,CACF,CAEJ,CAAC,EACDV,EAAkB,YAAc",
6
+ "names": ["checkbox_cards_exports", "__export", "CheckboxCardsItem", "CheckboxCardsRoot", "React", "classNames", "Context", "CHECKBOX_CARD_GROUP_NAME", "createCheckboxCardsContext", "Context", "createCheckboxGroupScope", "useCheckboxGroupScope", "CheckboxCardsProvider", "useCheckboxCardsContext", "CheckboxCardsRoot", "props", "forwardedRef", "__scopeCheckboxCards", "className", "color", "rootProps", "extractProps", "checkboxCardsRootPropDefs", "marginPropDefs", "checkboxGroupScope", "Grid", "Root", "classNames", "CheckboxCardsItem", "children", "style", "context", "checkboxClassName", "baseCheckboxPropDefs", "variantClass", "sizeClass", "Item", "Indicator", "ThickCheckIcon"]
7
+ }
@@ -0,0 +1,5 @@
1
+ import{a as G,b as U}from"./chunk-B6RH4CTY.js";import{a as K}from"./chunk-UBSLEGQZ.js";import{a as q}from"./chunk-GSTOGDAJ.js";import{a as se}from"./chunk-OS3FCYZY.js";var ie={};se(ie,{Root:()=>Z,Slot:()=>J});import*as e from"react";import*as z from"react-dom";import B from"classnames";import{composeRefs as _}from"radix-ui/internal";var Z=e.forwardRef((b,x)=>{let n=e.useRef(null),{children:R,className:v,color:M,radius:T,style:F,...a}=K(b,G,q),P=e.useId(),h=a.error,{"aria-describedby":y,"aria-labelledby":E}=a,w=e.useMemo(()=>{let r=[];return a.errorMessage&&r.push(P),y&&r.push(y),r.length>0?r.join(" "):void 0},[a.errorMessage,y,P]),A=e.useMemo(()=>({"aria-invalid":h,"aria-describedby":w,"aria-labelledby":E}),[h,w,E]),{error:H,errorMessage:g,required:i,"aria-describedby":L,"aria-labelledby":O,...C}=a,p=e.useCallback(r=>{let s=r.target;if(s.closest("input, button, a"))return;let c=n.current;if(!c)return;let f=s.closest(`
2
+ .rt-TextFieldSlot[data-side='right'],
3
+ .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
4
+ `)?c.value.length:0;requestAnimationFrame(()=>{try{c.setSelectionRange(f,f)}catch{}c.focus()})},[]);return e.createElement("div",{"data-accent-color":M,"data-radius":T,style:F,className:B("rt-TextFieldRoot",v,{"rt-error":h}),onPointerDown:p},e.createElement("input",{spellCheck:"false",...C,...A,ref:_(n,x),className:"rt-reset rt-TextFieldInput"}),R,a.errorMessage&&e.createElement("div",{id:P,className:"rt-TextFieldErrorMessage",role:"alert"},a.errorMessage))});Z.displayName="TextField.Root";var m=(()=>{if(typeof navigator>"u")return!1;let b=navigator.userAgent,x=/^((?!chrome|android).)*safari/i.test(b),n=/firefox/i.test(b);return x||n})(),J=e.forwardRef((b,x)=>{let{scrub:n,scrubValue:R,scrubStep:v=1,scrubSensitivity:M=1,scrubMin:T,scrubMax:F,scrubShiftMultiplier:a=10,scrubAltMultiplier:P=.1,onScrub:h,...y}=b,{className:E,color:w,side:A,...H}=K(y,U),g=e.useRef(null),[i,L]=e.useState(!1),[O,C]=e.useState({x:0,y:0}),p=e.useRef(0),r=e.useRef(0),s=e.useRef(0),c=e.useRef(null),k=e.useRef(0),f=e.useRef({scrubValue:R,scrubStep:v,scrubSensitivity:M,scrubMin:T,scrubMax:F,scrubShiftMultiplier:a,scrubAltMultiplier:P,onScrub:h});f.current={scrubValue:R,scrubStep:v,scrubSensitivity:M,scrubMin:T,scrubMax:F,scrubShiftMultiplier:a,scrubAltMultiplier:P,onScrub:h};let Q=e.useCallback(t=>{if(!n||t.target.closest("input, button, a"))return;t.preventDefault(),p.current=0,r.current=R??0,s.current=t.clientX,C({x:t.clientX,y:t.clientY});let l=g.current;l&&(m?(c.current=t.pointerId,k.current=t.clientX,l.setPointerCapture(t.pointerId),L(!0)):l.requestPointerLock())},[n,R]);e.useEffect(()=>{if(m)return;let t=()=>{let o=document.pointerLockElement===g.current;L(o),o||(f.current.onScrub?.(0,!1),p.current=0,r.current=0)};return document.addEventListener("pointerlockchange",t),()=>{document.removeEventListener("pointerlockchange",t)}},[]);let D=e.useCallback((t,o,l,oe)=>{let u=f.current,N=window.innerWidth,X=window.innerHeight;s.current+=t,s.current>N?s.current=s.current%N:s.current<0&&(s.current=N+s.current%N),C(S=>{let d=S.y+o;return d>X?d=d%X:d<0&&(d=X+d%X),{x:s.current,y:d}}),p.current+=t;let V=p.current/u.scrubSensitivity;if(Math.abs(V)>=1){let S=1;l?S=u.scrubShiftMultiplier:oe&&(S=u.scrubAltMultiplier);let d=Math.trunc(V),j=d*u.scrubStep*S,W=j;if(u.scrubMin!==void 0||u.scrubMax!==void 0){let ne=r.current+j,Y=Math.max(u.scrubMin??-1/0,Math.min(u.scrubMax??1/0,ne));W=Y-r.current,r.current=Y}else r.current+=j;W!==0&&u.onScrub?.(W,!0),p.current=(V-d)*u.scrubSensitivity}},[]),I=e.useCallback(()=>{f.current.onScrub?.(0,!1),p.current=0,r.current=0,c.current=null,L(!1)},[]),$=e.useCallback(t=>{if(!i||!m)return;let o=t.clientX-k.current;k.current=t.clientX,D(o,t.movementY,t.shiftKey,t.altKey)},[i,D]),ee=e.useCallback(t=>{if(!m||c.current!==t.pointerId)return;let o=g.current;o&&c.current!==null&&o.releasePointerCapture(c.current),I()},[I]),te=e.useCallback(()=>{m&&i&&I()},[i,I]);e.useEffect(()=>{if(!i||m)return;let t=l=>{D(l.movementX,l.movementY,l.shiftKey,l.altKey)},o=()=>{document.exitPointerLock()};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",o),document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",o),document.body.style.userSelect=""}},[i,D]),e.useEffect(()=>{if(!i||!m)return;let t=document.createElement("style");return t.textContent="* { cursor: none !important; user-select: none !important; }",document.head.appendChild(t),()=>{document.head.removeChild(t)}},[i]);let re=i?z.createPortal(e.createElement("img",{className:"rt-TextFieldSlotScrubCursor",src:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E",alt:"",style:{position:"fixed",left:O.x,top:O.y,transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:99999,width:24,height:24},"aria-hidden":"true"}),document.body):null;return e.createElement("div",{"data-accent-color":w,"data-side":A,"data-scrub":n||void 0,"data-scrubbing":i||void 0,...H,ref:_(g,x),className:B("rt-TextFieldSlot",E),onPointerDown:n?Q:void 0,onPointerMove:n?$:void 0,onPointerUp:n?ee:void 0,onLostPointerCapture:n?te:void 0},H.children,re)});J.displayName="TextField.Slot";export{Z as a,J as b,ie as c};
5
+ //# sourceMappingURL=chunk-JCOALADA.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/text-field.tsx"],
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { composeRefs } from 'radix-ui/internal';\n\nimport { textFieldRootPropDefs, textFieldSlotPropDefs, type TextFieldSlotScrubProps } from './text-field.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { NotInputTextualAttributes } from '../helpers/input-attributes.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldRootElement = React.ElementRef<'input'>;\ntype TextFieldRootOwnProps = GetPropDefTypes<typeof textFieldRootPropDefs> & {\n defaultValue?: string | number;\n value?: string | number;\n type?: 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';\n};\ntype TextFieldInputProps = ComponentPropsWithout<'input', NotInputTextualAttributes | 'color' | 'defaultValue' | 'size' | 'type' | 'value'>;\ninterface TextFieldRootProps extends TextFieldInputProps, MarginProps, TextFieldRootOwnProps {}\nconst TextFieldRoot = React.forwardRef<TextFieldRootElement, TextFieldRootProps>((props, forwardedRef) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { children, className, color, radius, style, ...inputProps } = extractProps(props, textFieldRootPropDefs, marginPropDefs);\n\n // Generate unique IDs for accessibility\n const errorId = React.useId();\n\n // Determine invalid state\n const isInvalid = inputProps.error;\n\n const { 'aria-describedby': ariaDescribedby, 'aria-labelledby': ariaLabelledby } = inputProps;\n\n // Build aria-describedby string\n const describedBy = React.useMemo(() => {\n const parts = [];\n if (inputProps.errorMessage) parts.push(errorId);\n if (ariaDescribedby) parts.push(ariaDescribedby);\n return parts.length > 0 ? parts.join(' ') : undefined;\n }, [inputProps.errorMessage, ariaDescribedby, errorId]);\n\n // Build aria attributes\n const ariaProps = React.useMemo(\n () => ({\n 'aria-invalid': isInvalid,\n 'aria-describedby': describedBy,\n 'aria-labelledby': ariaLabelledby,\n }),\n [isInvalid, describedBy, ariaLabelledby],\n );\n\n // Filter out our custom props to avoid DOM warnings\n const { error, errorMessage, required, 'aria-describedby': _ariaDescribedby, 'aria-labelledby': _ariaLabelledby, ...nativeInputProps } = inputProps;\n\n // Memoized pointer event handler\n const handlePointerDown = React.useCallback((event: React.PointerEvent) => {\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n const input = inputRef.current;\n if (!input) return;\n\n // Same selector as in the CSS to find the right slot\n const isRightSlot = target.closest(`\n .rt-TextFieldSlot[data-side='right'],\n .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])\n `);\n\n const cursorPosition = isRightSlot ? input.value.length : 0;\n\n requestAnimationFrame(() => {\n // Only some input types support this, browsers will throw an error if not supported\n // See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange#:~:text=Note%20that%20according,not%20support%20selection%22.\n try {\n input.setSelectionRange(cursorPosition, cursorPosition);\n } catch {}\n input.focus();\n });\n }, []);\n\n return (\n <div\n data-accent-color={color}\n data-radius={radius}\n style={style}\n className={classNames('rt-TextFieldRoot', className, {\n 'rt-error': isInvalid,\n })}\n onPointerDown={handlePointerDown}\n >\n <input spellCheck=\"false\" {...nativeInputProps} {...ariaProps} ref={composeRefs(inputRef, forwardedRef)} className=\"rt-reset rt-TextFieldInput\" />\n {children}\n {inputProps.errorMessage && (\n <div id={errorId} className=\"rt-TextFieldErrorMessage\" role=\"alert\">\n {inputProps.errorMessage}\n </div>\n )}\n </div>\n );\n});\nTextFieldRoot.displayName = 'TextField.Root';\n\ntype TextFieldSlotElement = React.ElementRef<'div'>;\ntype TextFieldSlotOwnProps = GetPropDefTypes<typeof textFieldSlotPropDefs> & TextFieldSlotScrubProps;\ninterface TextFieldSlotProps extends ComponentPropsWithout<'div', RemovedProps>, TextFieldSlotOwnProps {}\n\n// Detect if we should use pointer capture instead of pointer lock\n// Safari and Firefox show intrusive browser warnings with pointer lock\nconst usePointerCapture = (() => {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent;\n const isSafari = /^((?!chrome|android).)*safari/i.test(ua);\n const isFirefox = /firefox/i.test(ua);\n return isSafari || isFirefox;\n})();\n\nconst TextFieldSlot = React.forwardRef<TextFieldSlotElement, TextFieldSlotProps>((props, forwardedRef) => {\n // Extract scrub props first (not part of PropDef system)\n const { scrub, scrubValue, scrubStep = 1, scrubSensitivity = 1, scrubMin, scrubMax, scrubShiftMultiplier = 10, scrubAltMultiplier = 0.1, onScrub, ...restProps } = props;\n\n // Then extract styling props\n const { className, color, side, ...slotProps } = extractProps(restProps, textFieldSlotPropDefs);\n\n const slotRef = React.useRef<HTMLDivElement>(null);\n const [isScrubbing, setIsScrubbing] = React.useState(false);\n // Virtual cursor position - X wraps around viewport, Y follows mouse\n const [cursorPosition, setCursorPosition] = React.useState({ x: 0, y: 0 });\n\n // Track accumulated sub-step movement for precision\n const accumulatedMovement = React.useRef(0);\n // Track current value for clamping (initialized to scrubValue when scrubbing starts)\n const currentValue = React.useRef(0);\n // Track virtual X position for wrap-around (separate from rendered position)\n const virtualX = React.useRef(0);\n // Track pointer ID for capture mode\n const pointerIdRef = React.useRef<number | null>(null);\n // Track last X position for capture mode (movementX calculation)\n const lastXRef = React.useRef(0);\n\n // Store scrub config in refs so document handlers can access latest values\n const scrubConfigRef = React.useRef({\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n });\n scrubConfigRef.current = {\n scrubValue,\n scrubStep,\n scrubSensitivity,\n scrubMin,\n scrubMax,\n scrubShiftMultiplier,\n scrubAltMultiplier,\n onScrub,\n };\n\n const handlePointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (!scrub) return;\n\n // Don't start scrubbing if clicking on interactive elements\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n event.preventDefault();\n accumulatedMovement.current = 0;\n // Initialize to current value so min/max clamping works correctly\n currentValue.current = scrubValue ?? 0;\n\n // Initialize virtual cursor at actual mouse position\n virtualX.current = event.clientX;\n setCursorPosition({ x: event.clientX, y: event.clientY });\n\n const slot = slotRef.current;\n if (!slot) return;\n\n if (usePointerCapture) {\n // Safari/Firefox: Use pointer capture (no browser warning)\n pointerIdRef.current = event.pointerId;\n lastXRef.current = event.clientX;\n slot.setPointerCapture(event.pointerId);\n setIsScrubbing(true);\n } else {\n // Chrome: Use pointer lock for infinite movement\n slot.requestPointerLock();\n }\n },\n [scrub, scrubValue],\n );\n\n // Handle pointer lock state changes (Chrome only)\n React.useEffect(() => {\n if (usePointerCapture) return;\n\n const handlePointerLockChange = () => {\n const isLocked = document.pointerLockElement === slotRef.current;\n setIsScrubbing(isLocked);\n if (!isLocked) {\n // Fire callback with isChanging = false when scrubbing ends\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n }\n };\n\n document.addEventListener('pointerlockchange', handlePointerLockChange);\n return () => {\n document.removeEventListener('pointerlockchange', handlePointerLockChange);\n };\n }, []);\n\n // Shared scrub calculation logic\n const processScrubMovement = React.useCallback((movementX: number, movementY: number, shiftKey: boolean, altKey: boolean) => {\n const config = scrubConfigRef.current;\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Update virtual position with wrap-around at viewport edges\n virtualX.current += movementX;\n if (virtualX.current > viewportWidth) {\n virtualX.current = virtualX.current % viewportWidth;\n } else if (virtualX.current < 0) {\n virtualX.current = viewportWidth + (virtualX.current % viewportWidth);\n }\n\n // Also track Y with wrap-around\n setCursorPosition((prev) => {\n let newY = prev.y + movementY;\n if (newY > viewportHeight) {\n newY = newY % viewportHeight;\n } else if (newY < 0) {\n newY = viewportHeight + (newY % viewportHeight);\n }\n return { x: virtualX.current, y: newY };\n });\n\n // Accumulate movement for sensitivity calculation\n accumulatedMovement.current += movementX;\n\n // Calculate how many steps we've moved\n const stepsFromMovement = accumulatedMovement.current / config.scrubSensitivity;\n\n if (Math.abs(stepsFromMovement) >= 1) {\n // Determine modifier multiplier\n let multiplier = 1;\n if (shiftKey) {\n multiplier = config.scrubShiftMultiplier;\n } else if (altKey) {\n multiplier = config.scrubAltMultiplier;\n }\n\n // Calculate delta\n const wholeSteps = Math.trunc(stepsFromMovement);\n const delta = wholeSteps * config.scrubStep * multiplier;\n\n // Apply min/max clamping if bounds are set\n let clampedDelta = delta;\n if (config.scrubMin !== undefined || config.scrubMax !== undefined) {\n const newValue = currentValue.current + delta;\n const clampedValue = Math.max(config.scrubMin ?? -Infinity, Math.min(config.scrubMax ?? Infinity, newValue));\n clampedDelta = clampedValue - currentValue.current;\n currentValue.current = clampedValue;\n } else {\n currentValue.current += delta;\n }\n\n // Fire callback with clamped delta (isChanging = true during drag)\n if (clampedDelta !== 0) {\n config.onScrub?.(clampedDelta, true);\n }\n\n // Keep the fractional remainder for smooth sub-pixel accumulation\n accumulatedMovement.current = (stepsFromMovement - wholeSteps) * config.scrubSensitivity;\n }\n }, []);\n\n // End scrubbing helper\n const endScrubbing = React.useCallback(() => {\n scrubConfigRef.current.onScrub?.(0, false);\n accumulatedMovement.current = 0;\n currentValue.current = 0;\n pointerIdRef.current = null;\n setIsScrubbing(false);\n }, []);\n\n // Handle pointer capture mode events (Safari/Firefox)\n const handlePointerMove = React.useCallback(\n (event: React.PointerEvent) => {\n if (!isScrubbing || !usePointerCapture) return;\n\n const movementX = event.clientX - lastXRef.current;\n lastXRef.current = event.clientX;\n\n processScrubMovement(movementX, event.movementY, event.shiftKey, event.altKey);\n },\n [isScrubbing, processScrubMovement],\n );\n\n const handlePointerUp = React.useCallback(\n (event: React.PointerEvent) => {\n if (!usePointerCapture || pointerIdRef.current !== event.pointerId) return;\n\n const slot = slotRef.current;\n if (slot && pointerIdRef.current !== null) {\n slot.releasePointerCapture(pointerIdRef.current);\n }\n endScrubbing();\n },\n [endScrubbing],\n );\n\n const handleLostPointerCapture = React.useCallback(() => {\n if (usePointerCapture && isScrubbing) {\n endScrubbing();\n }\n }, [isScrubbing, endScrubbing]);\n\n // Attach document-level listeners for pointer lock mode (Chrome)\n React.useEffect(() => {\n if (!isScrubbing || usePointerCapture) return;\n\n const handleMouseMove = (event: MouseEvent) => {\n processScrubMovement(event.movementX, event.movementY, event.shiftKey, event.altKey);\n };\n\n const handleMouseUp = () => {\n // Exit pointer lock to end scrubbing\n document.exitPointerLock();\n };\n\n // Use mousemove for pointer lock (pointermove doesn't work well with pointer lock)\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n\n // Disable text selection during scrubbing\n document.body.style.userSelect = 'none';\n\n return () => {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n document.body.style.userSelect = '';\n };\n }, [isScrubbing, processScrubMovement]);\n\n // Hide native cursor and disable text selection during pointer capture scrubbing\n React.useEffect(() => {\n if (!isScrubbing || !usePointerCapture) return;\n\n // Create a style element to hide cursor globally during scrub\n const style = document.createElement('style');\n style.textContent = '* { cursor: none !important; user-select: none !important; }';\n document.head.appendChild(style);\n\n return () => {\n document.head.removeChild(style);\n };\n }, [isScrubbing]);\n\n // Render virtual cursor via portal to body so it's not clipped\n // Using a data URI of ew-resize cursor for a native look\n const virtualCursor = isScrubbing\n ? ReactDOM.createPortal(\n <img\n className=\"rt-TextFieldSlotScrubCursor\"\n src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='black' stroke='white' stroke-width='1' d='M0 12 L5 7 L5 10 L19 10 L19 7 L24 12 L19 17 L19 14 L5 14 L5 17 Z'/%3E%3C/svg%3E\"\n alt=\"\"\n style={{\n position: 'fixed',\n left: cursorPosition.x,\n top: cursorPosition.y,\n transform: 'translate(-50%, -50%)',\n pointerEvents: 'none',\n zIndex: 99999,\n width: 24,\n height: 24,\n }}\n aria-hidden=\"true\"\n />,\n document.body,\n )\n : null;\n\n return (\n <div\n data-accent-color={color}\n data-side={side}\n data-scrub={scrub || undefined}\n data-scrubbing={isScrubbing || undefined}\n {...slotProps}\n ref={composeRefs(slotRef, forwardedRef)}\n className={classNames('rt-TextFieldSlot', className)}\n onPointerDown={scrub ? handlePointerDown : undefined}\n onPointerMove={scrub ? handlePointerMove : undefined}\n onPointerUp={scrub ? handlePointerUp : undefined}\n onLostPointerCapture={scrub ? handleLostPointerCapture : undefined}\n >\n {slotProps.children}\n {virtualCursor}\n </div>\n );\n});\nTextFieldSlot.displayName = 'TextField.Slot';\n\nexport { TextFieldRoot as Root, TextFieldSlot as Slot };\nexport type { TextFieldRootProps as RootProps, TextFieldSlotProps as SlotProps };\n"],
5
+ "mappings": "wKAAA,IAAAA,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MmC,GAAgBnC,EACT,eACP,gBAAC,OACC,UAAU,8BACV,IAAI,oPACJ,IAAI,GACJ,MAAO,CACL,SAAU,QACV,KAAMtB,EAAe,EACrB,IAAKA,EAAe,EACpB,UAAW,wBACX,cAAe,OACf,OAAQ,MACR,MAAO,GACP,OAAQ,EACV,EACA,cAAY,OACd,EACA,SAAS,IACX,EACA,KAEJ,OACE,gBAAC,OACC,oBAAmBxB,EACnB,YAAW0C,EACX,aAAYV,GAAS,OACrB,iBAAgBc,GAAe,OAC9B,GAAGH,EACJ,IAAKjB,EAAYmB,EAASjD,CAAY,EACtC,UAAW6B,EAAW,mBAAoB1B,CAAS,EACnD,cAAeiC,EAAQZ,EAAoB,OAC3C,cAAeY,EAAQ4C,EAAoB,OAC3C,YAAa5C,EAAQ6C,GAAkB,OACvC,qBAAsB7C,EAAQ8C,GAA2B,QAExDnC,EAAU,SACVsC,EACH,CAEJ,CAAC,EACDlD,EAAc,YAAc",
6
+ "names": ["text_field_exports", "__export", "TextFieldRoot", "TextFieldSlot", "React", "ReactDOM", "classNames", "composeRefs", "TextFieldRoot", "props", "forwardedRef", "inputRef", "children", "className", "color", "radius", "style", "inputProps", "extractProps", "textFieldRootPropDefs", "marginPropDefs", "errorId", "isInvalid", "ariaDescribedby", "ariaLabelledby", "describedBy", "parts", "ariaProps", "error", "errorMessage", "required", "_ariaDescribedby", "_ariaLabelledby", "nativeInputProps", "handlePointerDown", "event", "target", "input", "cursorPosition", "classNames", "composeRefs", "usePointerCapture", "ua", "isSafari", "isFirefox", "TextFieldSlot", "scrub", "scrubValue", "scrubStep", "scrubSensitivity", "scrubMin", "scrubMax", "scrubShiftMultiplier", "scrubAltMultiplier", "onScrub", "restProps", "side", "slotProps", "textFieldSlotPropDefs", "slotRef", "isScrubbing", "setIsScrubbing", "setCursorPosition", "accumulatedMovement", "currentValue", "virtualX", "pointerIdRef", "lastXRef", "scrubConfigRef", "slot", "handlePointerLockChange", "isLocked", "processScrubMovement", "movementX", "movementY", "shiftKey", "altKey", "config", "viewportWidth", "viewportHeight", "prev", "newY", "stepsFromMovement", "multiplier", "wholeSteps", "delta", "clampedDelta", "newValue", "clampedValue", "endScrubbing", "handlePointerMove", "handlePointerUp", "handleLostPointerCapture", "handleMouseMove", "handleMouseUp", "virtualCursor"]
7
+ }
@@ -1,2 +1,2 @@
1
1
  var o=["1","2","3","4"],e=["horizontal","vertical"],t={size:{type:"enum",className:"rt-r-size",values:o,default:"2"},orientation:{type:"enum",values:e,default:"horizontal"}};export{t as a};
2
- //# sourceMappingURL=chunk-ZUOK3KFY.js.map
2
+ //# sourceMappingURL=chunk-K7VO7TND.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/toolbar.props.tsx"],
4
- "sourcesContent": ["import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * Toolbar prop definitions.\n *\n * `size` is one value for the whole row (not responsive): the row hands it to every control\n * inside it that does not state its own, through context, so it has to be a single index.\n */\nconst toolbarRootPropDefs = {\n /**\n * Size step of the row and of every control in it that doesn't set its own `size`.\n * Matches Button's sizes: 1 (24px) to 4 (48px).\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2' },\n /**\n * Direction of the row and of the arrow keys. Use `vertical` for a strip of tools along an edge.\n */\n orientation: { type: 'enum', values: orientations, default: 'horizontal' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { toolbarRootPropDefs };\n"],
5
- "mappings": "AAEA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAQxCC,EAAsB,CAK1B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,GAAI,EAI1E,YAAa,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,YAAa,CAC3E",
4
+ "sourcesContent": ["import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * Toolbar prop definitions.\n *\n * `size` is one value for the whole row (not responsive): the row hands it to every control\n * inside it that does not state its own, through context, so it has to be a single index.\n */\nconst toolbarRootPropDefs = {\n /**\n * Size step of the row and of every control in it that doesn't set its own `size`.\n * Matches Button's sizes: 1 (28px) to 4 (48px). Unset inside `Shell.PaneHeader` or\n * `Shell.PaneFooter`, it rests one step above the Shell's `size`.\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2' },\n /**\n * Direction of the row and of the arrow keys. Use `vertical` for a strip of tools along an edge.\n */\n orientation: { type: 'enum', values: orientations, default: 'horizontal' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { toolbarRootPropDefs };\n"],
5
+ "mappings": "AAEA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAQxCC,EAAsB,CAM1B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,GAAI,EAI1E,YAAa,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,YAAa,CAC3E",
6
6
  "names": ["sizes", "orientations", "toolbarRootPropDefs"]
7
7
  }
@@ -1,2 +1,2 @@
1
1
  import{c as e}from"./chunk-34KVYDF6.js";var s=["1","2","3","4"],r=["surface","soft","outline"],o={size:{type:"enum",className:"rt-r-size",values:s,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"surface"},...e};export{o as a};
2
- //# sourceMappingURL=chunk-DIGT74P3.js.map
2
+ //# sourceMappingURL=chunk-KPACVWV4.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/switch.props.tsx"],
4
- "sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['surface', 'soft', 'outline'] as const;\n\nconst switchPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n /**\n * Material type for visual rendering and depth effects\n * Controls how the switch renders its visual elements\n */\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { switchPropDefs };\n"],
5
- "mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,OAAQ,SAAS,EAExCC,EAAiB,CACrB,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,GAAGE,CASL",
4
+ "sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['surface', 'soft', 'outline'] as const;\n\nconst switchPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'surface' },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { switchPropDefs };\n"],
5
+ "mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAW,CAAC,UAAW,OAAQ,SAAS,EAExCC,EAAiB,CACrB,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,EACvF,GAAGE,CACL",
6
6
  "names": ["sizes", "variants", "switchPropDefs", "colorPropDef"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{b as o}from"./chunk-KRJTW535.js";import{c as e}from"./chunk-34KVYDF6.js";var r=["1","2","3","4"],p={size:{type:"enum",className:"rt-r-size",values:r,default:"2",responsive:!0}},t=["raised","surface","soft","outline","ghost"],i={variant:{type:"enum",className:"rt-variant",values:t,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...e,...o,placeholder:{type:"ReactNode"}},n={...e};export{p as a,i as b,n as c};
2
+ //# sourceMappingURL=chunk-KU3LLWFU.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/select.props.tsx"],
4
- "sourcesContent": ["import type React from 'react';\n\nimport { colorPropDef } from '../props/color.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;\n\nconst selectRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\nconst selectTriggerPropDefs = {\n variant: { type: 'enum', className: 'rt-variant', values: triggerVariants, default: 'raised' },\n material: { type: 'enum', values: ['solid', 'translucent'] },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n placeholder: { type: 'ReactNode' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n material: PropDef<'solid' | 'translucent'>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n placeholder: PropDef<React.ReactNode>;\n};\n\n\nconst selectContentPropDefs = {\n ...colorPropDef,\n} satisfies {\n};\n\nexport { selectRootPropDefs, selectTriggerPropDefs, selectContentPropDefs };\n"],
5
- "mappings": "gFAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAqB,CACzB,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC9F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAElEC,EAAwB,CAC5B,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAiB,QAAS,QAAS,EAC7F,SAAU,CAAE,KAAM,OAAQ,OAAQ,CAAC,QAAS,aAAa,CAAE,EAC3D,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,YAAa,CAAE,KAAM,WAAY,CACnC,EAWMC,EAAwB,CAC5B,GAAGF,CACL",
4
+ "sourcesContent": ["import type React from 'react';\n\nimport { colorPropDef } from '../props/color.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;\n\nconst selectRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\nconst selectTriggerPropDefs = {\n variant: { type: 'enum', className: 'rt-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n placeholder: { type: 'ReactNode' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n placeholder: PropDef<React.ReactNode>;\n};\n\n\nconst selectContentPropDefs = {\n ...colorPropDef,\n} satisfies {\n};\n\nexport { selectRootPropDefs, selectTriggerPropDefs, selectContentPropDefs };\n"],
5
+ "mappings": "gFAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAE3BC,EAAqB,CACzB,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC9F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAElEC,EAAwB,CAC5B,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAiB,QAAS,QAAS,EAC7F,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,YAAa,CAAE,KAAM,WAAY,CACnC,EAUMC,EAAwB,CAC5B,GAAGF,CACL",
6
6
  "names": ["sizes", "selectRootPropDefs", "triggerVariants", "selectTriggerPropDefs", "colorPropDef", "radiusPropDef", "selectContentPropDefs"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{a as et}from"./chunk-BOLRYGFQ.js";import{a as De}from"./chunk-6HRBG5H2.js";import{g as Qe,j as Ze}from"./chunk-IX5HIHVI.js";import{a as Pe}from"./chunk-O6K6RZXY.js";import{a as Je}from"./chunk-HKRQ3E3I.js";import{a as Fe}from"./chunk-XZ5XZS5O.js";import{a as Ie}from"./chunk-7CBZFHSQ.js";import{a as ze}from"./chunk-AGAQC4HH.js";import{b as G}from"./chunk-FWB47YCH.js";import{a as Nt}from"./chunk-OS3FCYZY.js";var Dt={};Nt(Dt,{AttachTrigger:()=>ht,Attachment:()=>We,AttachmentsRow:()=>dt,InlineEnd:()=>lt,InlineStart:()=>it,Item:()=>pt,Root:()=>st,Row:()=>ft,RowEnd:()=>Rt,RowStart:()=>bt,Send:()=>Ct,Textarea:()=>ct});import*as e from"react";import T from"classnames";import{useComposedRefs as nt}from"radix-ui/internal";import{useDropzone as Mt}from"react-dropzone";var Be=typeof window<"u"?e.useLayoutEffect:e.useEffect;function tt(t,o){let{placeholder:a}=t;if(!a){o();return}t.placeholder="";try{o()}finally{t.placeholder=a}}var rt=e.createContext(null),Ve=e.createContext(""),I=()=>{let t=e.useContext(rt);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},de=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(o=>o.trim()).filter(Boolean):[],Ot=(t,o)=>{if(o.length===0)return!0;let a=t.type.toLowerCase(),c=t.name.toLowerCase();for(let i of o){let l=i.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[f,b]=a.split("/");if(d==="*"||d===f&&(u==="*"||u===b))return!0}else if(l.startsWith(".")&&c.endsWith(l))return!0}return!1},Ht=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ot=(t,o)=>(o||"").toLowerCase().startsWith("image/")||Ht.test(t),je=t=>t.trim().length>0,at=(t,o)=>`${t} ${o}${t===1?"":"s"}`,It=0,Ft=()=>`chatbar-attachment-${Date.now()}-${++It}`,st=e.forwardRef((t,o)=>{let{className:a,style:c,children:i,value:l,defaultValue:d="",onValueChange:u,open:f,defaultOpen:b=!1,onOpenChange:g,expandOn:y="both",minLines:C=3,maxLines:S=6,sendMode:F="whenDirty",disabled:R,readOnly:E,onSubmit:D,size:A="2",variant:z,color:O,radius:H,width:Q,maxWidth:h,attachments:_,defaultAttachments:B,onAttachmentsChange:oe,accept:P,multiple:k=!0,maxAttachments:Z,maxFileSize:q,paste:j=!0,pasteAccept:X,clearOnSubmit:V=!0,onAttachmentReject:N,dropzone:M=!0,apiRef:Ae,onBlurCapture:ue,notices:me,context:pe,...we}=t,he=l!=null,[Se,r]=e.useState(d),v=he?l:Se,w=f!=null,[se,Y]=e.useState(b),W=w?f:se,ce="attachments"in t,[ee,fe]=e.useState(()=>B??[]),$=e.useMemo(()=>ce?_??[]:ee,[ce,_,ee]),[$e,gt]=e.useState({text:"",id:0}),ie=e.useCallback(n=>gt(s=>({text:n,id:s.id+1})),[]),Ke=e.useRef(null),vt=nt(o,Ke),Ee=e.useRef(null),Te=e.useRef(null),le=e.useRef(!1),be=e.useRef(!1),Re=e.useRef(void 0),Le=e.useRef(null),Ue=de(P).join(","),ke=de(X).join(","),Ne=e.useMemo(()=>de(Ue),[Ue]),yt=e.useMemo(()=>ke?de(ke):Ne,[ke,Ne]),Ge={value:v,attachments:$,accepts:Ne,pasteAccepts:yt,multiple:k,maxAttachments:Z,maxFileSize:q,disabled:R,readOnly:E,expandOn:y,isValueControlled:he,isOpenControlled:w,isAttachmentsControlled:ce,onValueChange:u,onOpenChange:g,onAttachmentsChange:oe,onAttachmentReject:N,onSubmit:D},x=e.useRef(Ge);x.current=Ge;let Me=e.useRef(null),K=e.useCallback(()=>Me.current??x.current.attachments,[]),te=e.useCallback(n=>{x.current.isOpenControlled||Y(n),x.current.onOpenChange?.(n)},[]),Ce=e.useCallback(n=>{x.current.isValueControlled||r(n),x.current.onValueChange?.(n)},[]),ae=e.useCallback(n=>{Me.current=n,queueMicrotask(()=>{Me.current=null}),x.current.isAttachmentsControlled||fe(n),x.current.onAttachmentsChange?.(n)},[]),ge=e.useRef(new Set),ne=e.useCallback((n,s,m=x.current.multiple)=>{let p=x.current;if(p.disabled||p.readOnly||n.length===0)return 0;let U=K(),J=[],re=[],Lt=typeof p.maxAttachments=="number"?Math.max(p.maxAttachments-U.length,0):1/0,kt=m?1/0:1;for(let L of n){if(J.length>=Lt||J.length>=kt){re.push({file:L,reason:"count"});continue}if(typeof p.maxFileSize=="number"&&L.size>p.maxFileSize){re.push({file:L,reason:"size"});continue}if(!Ot(L,s)){re.push({file:L,reason:"type"});continue}let He=ot(L.name,L.type)?URL.createObjectURL(L):void 0;He&&ge.current.add(He),J.push({id:Ft(),name:L.name,size:L.size,type:L.type,file:L,url:He,status:"idle"})}let xe=[];return J.length>0&&(ae(U.concat(J)),p.expandOn!=="none"&&te(!0),xe.push(`${at(J.length,"file")} attached.`)),re.length>0&&(p.onAttachmentReject?.(re),xe.push(`${at(re.length,"file")} could not be attached.`)),xe.length>0&&ie(xe.join(" ")),J.length},[K,ae,te,ie]),ve=e.useCallback(n=>ne(n,x.current.accepts),[ne]),_e=e.useCallback(n=>ne(n,x.current.pasteAccepts),[ne]),qe=e.useCallback(n=>{let s=K(),m=s.find(p=>p.id===n);m&&(ae(s.filter(p=>p.id!==n)),ie(`Removed ${m.name}.`))},[K,ae,ie]),Xe=e.useCallback(n=>{let s=x.current;if(s.disabled||s.readOnly)return!1;let m=K();if(!je(s.value)&&m.length===0)return!1;let p={value:s.value,attachments:m};if(n&&s.onSubmit)for(let U of m)U.url&&ge.current.delete(U.url);return s.onSubmit?.(p),n&&(Ce(""),ae([])),!0},[K,Ce,ae]);e.useEffect(()=>{let n=ge.current;if(n.size===0)return;let s=new Set($.map(m=>m.url));for(let m of Array.from(n))s.has(m)||(URL.revokeObjectURL(m),n.delete(m))},[$]),e.useEffect(()=>{let n=ge.current;return()=>{if(!x.current.isAttachmentsControlled){for(let s of Array.from(n))URL.revokeObjectURL(s);n.clear()}}},[]);let ye=e.useCallback(n=>{let s=x.current,m=Te.current;if(clearTimeout(Re.current),be.current=!1,!m||s.disabled||s.readOnly)return;let p=n?.accept!=null?de(n.accept):s.accepts,U=n?.multiple??s.multiple;Le.current={patterns:p,multiple:U},m.accept=p.join(","),m.multiple=U,le.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(le.current=!1)},1e3)},[]),Ye=e.useCallback(()=>{be.current=!0,clearTimeout(Re.current),Re.current=setTimeout(()=>{be.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(Re.current),[]),e.useEffect(()=>{let n=Te.current,s=()=>{le.current=!1};return window.addEventListener("focus",s),n?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),n?.removeEventListener("cancel",s)}},[]);let xt=e.useCallback(n=>{let s=n.currentTarget,m=Array.from(s.files??[]),p=Le.current;ne(m,p?.patterns??x.current.accepts,p?.multiple),le.current=!1,Le.current=null,s.value=""},[ne]),Pt=e.useCallback(n=>{ue?.(n);let s=x.current,m=Ke.current;if(!m||s.expandOn==="none")return;let p=n.relatedTarget;p&&m.contains(p)||le.current||be.current||!je(s.value)&&K().length===0&&te(!1)},[ue,te,K]),At=e.useCallback(n=>{ve(n)},[ve]),{getRootProps:wt,isDragActive:St}=Mt({onDrop:At,onDragEnter:()=>ie(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!M||R||E}),Oe=M&&St;e.useImperativeHandle(Ae,()=>({focusTextarea:()=>Ee.current?.focus({preventScroll:!0}),openFilePicker:()=>ye()}),[ye]);let Et=e.useCallback(n=>{if(R||n.pointerType==="mouse"&&n.button!==0)return;let s=n.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(n.preventDefault(),Ee.current?.focus({preventScroll:!0}))},[R]),Tt=e.useMemo(()=>({open:W,setOpen:te,setValue:Ce,size:A,expandOn:y,minLines:C,maxLines:S,sendMode:F,disabled:R,readOnly:E,paste:j,clearOnSubmit:V,multiple:k,textareaRef:Ee,attachments:$,removeAttachment:qe,submit:Xe,appendFiles:ve,appendFilesFromPaste:_e,openFilePicker:ye,beginFilePickerPress:Ye}),[W,te,Ce,A,y,C,S,F,R,E,j,V,k,$,qe,Xe,ve,_e,ye,Ye]);return e.createElement(rt.Provider,{value:Tt},e.createElement(Ve.Provider,{value:v},e.createElement(e.Fragment,null,e.createElement("div",{...we,ref:vt,className:T("rt-ChatbarRoot",`rt-r-size-${A}`,a),style:{position:"relative",width:Q,maxWidth:h,...c},"data-state":W?"open":"closed","data-disabled":R?"":void 0,"data-readonly":E?"":void 0,"data-drop-active":Oe?"":void 0,"data-accent-color":O,"data-radius":H,onBlurCapture:Pt},e.createElement("input",{ref:Te,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:xt}),me?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(et.Provider,{value:A},me)):null,e.createElement("div",{...M?wt():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Et},e.createElement("div",{className:T("rt-ChatbarBox",`rt-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":O,"data-radius":H},e.createElement("div",{className:"rt-ChatbarGrid"},i),Oe&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(Pe,{emphasis:"medium",size:A,weight:"medium"},"Drop files here to attach"))))),pe?e.createElement(Pe,{as:"div",size:A==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},pe):null,e.createElement(ze,{role:"status","aria-live":"polite"},Oe?"Drop files here to attach.":e.createElement("span",{key:$e.id},$e.text))))))});st.displayName="Chatbar.Root";var ct=e.forwardRef((t,o)=>{let{className:a,style:c,asChild:i,onFocus:l,onChange:d,onPaste:u,onKeyDown:f,onCompositionStart:b,onCompositionEnd:g,submitOnEnter:y=!1,...C}=t,S=I(),F=e.useContext(Ve),{open:R,minLines:E,maxLines:D,expandOn:A,disabled:z,readOnly:O,setOpen:H,setValue:Q,textareaRef:h,paste:_,appendFilesFromPaste:B,size:oe,submit:P,clearOnSubmit:k}=S,Z=nt(o,h),q=e.useRef(0),j=e.useRef(0),X=e.useRef(!1),V=e.useRef({open:R,minLines:E,maxLines:D});Be(()=>{V.current={open:R,minLines:E,maxLines:D}},[R,E,D]);let N=e.useCallback(()=>{let r=h.current;if(!r)return;let v=window.getComputedStyle(r);q.current=parseFloat(v.lineHeight)||20,j.current=(parseFloat(v.paddingTop)||0)+(parseFloat(v.paddingBottom)||0)},[h]),M=e.useCallback((r,v)=>{let{minLines:w,maxLines:se}=V.current,Y=q.current,W=j.current,ce=Math.ceil((v?w:1)*Y)+W,ee=Math.ceil((v?se:1)*Y)+W,fe=Math.max(r.scrollHeight,ce);r.style.height=`${Math.min(fe,ee)}px`;let $=fe>ee;r.style.overflowY=$?"auto":"hidden",r.style.maxHeight=$?`${ee}px`:"none"},[]);Be(()=>{N()},[N,oe]),Be(()=>{let r=h.current;r&&(q.current===0&&N(),tt(r,()=>{r.style.height="auto";let v=R;if(!R&&(A==="overflow"||A==="both")){let w=Math.ceil(q.current)+j.current;r.scrollHeight>w+1&&(v=!0,H(!0))}M(r,v)}))},[F,R,A,E,D,oe,H,h,N,M]),e.useEffect(()=>{let r=h.current;if(!r||typeof ResizeObserver>"u")return;let v=-1,w=new ResizeObserver(se=>{let Y=se[0]?.contentRect.width??0;if(Y===v)return;let W=v===-1;v=Y,!W&&(N(),tt(r,()=>{r.style.height="auto",M(r,V.current.open)}))});return w.observe(r),()=>w.disconnect()},[h,N,M]),e.useEffect(()=>{},[]);let Ae=e.useCallback(r=>{l?.(r),!(z||O)&&(A==="focus"||A==="both")&&!R&&H(!0)},[z,O,A,R,H,l]),ue=e.useCallback(r=>{Q(r.currentTarget.value),d?.(r)},[Q,d]),me=e.useCallback(r=>{if(u?.(r),r.defaultPrevented||!_||z||O)return;let v=Array.from(r.clipboardData?.items??[]).filter(w=>w.kind==="file").map(w=>w.getAsFile()).filter(w=>!!w);v.length!==0&&B(v)>0&&r.preventDefault()},[_,z,O,u,B]),pe=e.useCallback(r=>{X.current=!0,b?.(r)},[b]),we=e.useCallback(r=>{X.current=!1,g?.(r)},[g]),he=e.useCallback(r=>{f?.(r),!(r.defaultPrevented||!y)&&(r.key!=="Enter"||r.shiftKey||r.altKey||r.ctrlKey||r.metaKey||X.current||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||(r.preventDefault(),P(k)))},[y,f,P,k]),Se=i?G:"textarea";return e.createElement("div",{className:T("rt-ChatbarField","rt-ChatbarTextarea",a)},e.createElement(Se,{...C,ref:Z,className:"rt-ChatbarInput",value:F,onChange:ue,onFocus:Ae,onPaste:me,onKeyDown:he,onCompositionStart:pe,onCompositionEnd:we,disabled:z,readOnly:O,rows:R?E:1,spellCheck:C.spellCheck??!0,autoCorrect:C.autoCorrect??"on",style:c}))});ct.displayName="Chatbar.Textarea";var it=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?G:"div",{...l,ref:o,className:T("rt-ChatbarInlineStart",i)},a)});it.displayName="Chatbar.InlineStart";var lt=e.forwardRef((t,o)=>{let{children:a,asChild:c,className:i,...l}=t;return I().open?null:e.createElement(c?G:"div",{...l,ref:o,className:T("rt-ChatbarInlineEnd",i)},a)});lt.displayName="Chatbar.InlineEnd";var dt=e.forwardRef((t,o)=>{let{asChild:a,forceMount:c,renderAttachment:i,className:l,children:d,...u}=t,f=I(),b=e.Children.toArray(d).length>0;return f.attachments.length===0&&!b&&!c?null:e.createElement("div",null,e.createElement(a?G:"div",{...u,ref:o,className:T("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(Je,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(Ie,{align:"center",gap:"3",minWidth:"fit-content"},f.attachments.map(y=>e.createElement(We,{key:y.id,attachment:y,asChild:!!i},i?.(y))),d))))});dt.displayName="Chatbar.AttachmentsRow";function ut(t,o){let a=t.closest('[role="listitem"]'),c=a?.parentElement?Array.from(a.parentElement.children):[],i=a?c.indexOf(a):-1,d=(c[i+1]??c[i-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():o.current?.focus({preventScroll:!0})}var mt=({lead:t,leadKind:o,label:a,detail:c,removeLabel:i,onRemove:l})=>{let d=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":o,"aria-hidden":!0},t),e.createElement(Pe,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},a,c?e.createElement(ze,null,", ",c):null),l&&e.createElement(De,{className:"rt-ChatbarItemRemove","aria-label":i,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(Qe,null)))},zt={uploading:"uploading",error:"failed to upload"},We=e.forwardRef((t,o)=>{let{attachment:a,asChild:c,className:i,children:l,...d}=t,u=I(),f=c?G:"div",b=!!a.url&&ot(a.name,a.type),g=`${Math.ceil(a.size/1024)} KB`,y=a.status?zt[a.status]:void 0,C=u.disabled||u.readOnly,S=R=>{ut(R.currentTarget,u.textareaRef),u.removeAttachment(a.id)},F=a.status==="uploading"?e.createElement(Fe,{size:"1"}):b?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(Ze,null);return e.createElement(f,{...d,ref:o,className:T(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",i),role:"listitem","data-kind":b?"image":"file","data-status":a.status,title:a.name},l??e.createElement(mt,{lead:F,leadKind:b&&a.status!=="uploading"?"image":"icon",label:a.name,detail:y?`${g}, ${y}`:g,removeLabel:`Remove ${a.name}`,onRemove:C?void 0:S}))});We.displayName="Chatbar.Attachment";var pt=e.forwardRef((t,o)=>{let{children:a,icon:c,image:i,color:l,onRemove:d,removeLabel:u,className:f,...b}=t,g=I(),y=g.disabled||g.readOnly,C=d?S=>{ut(S.currentTarget,g.textareaRef),d()}:void 0;return e.createElement("div",{...b,ref:o,className:T("rt-ChatbarItem",f),role:"listitem","data-accent-color":i?void 0:l??"gray",title:a},e.createElement(mt,{lead:i?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:i,alt:""}):c,leadKind:i?"image":"icon",label:a,removeLabel:u??`Remove ${a}`,onRemove:y?void 0:C}))});pt.displayName="Chatbar.Item";var ht=e.forwardRef((t,o)=>{let{asChild:a,accept:c,multiple:i,disabled:l,onPointerDown:d,onClick:u,...f}=t,b=I(),g=l||b.disabled||b.readOnly;return e.createElement(a?G:"button",{...f,ref:o,className:T("rt-ChatbarAttachTrigger",f.className),type:f.type??"button","aria-label":f["aria-label"]??"Add attachments",disabled:g,onPointerDown:C=>{d?.(C),!g&&!C.defaultPrevented&&b.beginFilePickerPress()},onClick:C=>{u?.(C),!(g||C.defaultPrevented)&&b.openFilePicker({accept:c,multiple:i})}})});ht.displayName="Chatbar.AttachTrigger";var ft=e.forwardRef((t,o)=>{let{asChild:a,children:c,className:i,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?G:"div",{...l,ref:o,className:T("rt-ChatbarRow",i)},e.createElement(Ie,{align:"center",justify:"between",width:"100%"},c))):null});ft.displayName="Chatbar.Row";var bt=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:T("rt-ChatbarRowStart",a)})});bt.displayName="Chatbar.RowStart";var Rt=e.forwardRef((t,o)=>{let{className:a,...c}=t;return e.createElement("div",{...c,ref:o,className:T("rt-ChatbarRowEnd",a)})});Rt.displayName="Chatbar.RowEnd";var Ct=e.forwardRef((t,o)=>{let{asChild:a,clearOnSend:c,disabled:i,children:l,style:d,className:u,size:f,variant:b,emphasis:g,tabIndex:y,onClick:C,status:S="ready",onStop:F,onRetry:R,stopLabel:E="Stop",retryLabel:D="Retry",stopIcon:A,retryIcon:z,"aria-label":O,"aria-labelledby":H,...Q}=t,h=I(),_=e.useContext(Ve),B=je(_)||h.attachments.length>0,P=B?"send":S==="submitted"||S==="streaming"?"stop":S==="error"?"retry":"send";if(h.sendMode==="never"&&P==="send")return null;let k=P!=="send"||h.sendMode==="always"||B,Z=P==="send"?i||h.disabled||h.readOnly||!B:i||h.disabled,j=P==="stop"?{"aria-label":E}:P==="retry"?{"aria-label":D}:H?{"aria-labelledby":H}:{"aria-label":O??"Send"},X=N=>{if(C?.(N),N.defaultPrevented||Z)return;if(P==="stop"){F?.();return}if(P==="retry"){R?.();return}let M=c??h.clearOnSubmit;h.submit(M)&&M&&h.textareaRef.current?.focus({preventScroll:!0})},V=P==="stop"?A??(S==="submitted"?e.createElement(Fe,{size:h.size}):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):P==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(De,{...Q,ref:o,size:f??h.size,...g?{emphasis:g}:{variant:b??(h.open||P!=="send"?"solid":"ghost")},disabled:Z,className:T("rt-ChatbarSend",u),style:{opacity:k?1:0,pointerEvents:k?void 0:"none",...d},"aria-hidden":k?void 0:!0,tabIndex:k?y:-1,asChild:a,onClick:X,"data-status":S,"data-mode":P,...j},V)});Ct.displayName="Chatbar.Send";export{st as a,ct as b,it as c,lt as d,dt as e,We as f,pt as g,ht as h,ft as i,bt as j,Rt as k,Ct as l,Dt as m};
2
+ //# sourceMappingURL=chunk-M55KFXYV.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/chatbar.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { useDropzone } from 'react-dropzone';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { NoticeSizeContext } from './notice.js';\nimport { Spinner } from './spinner.js';\nimport { Text } from './text.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { accentColors } from '../props/color.prop.js';\nimport type { radii } from '../props/radius.prop.js';\nimport type { ButtonRankProps } from './button.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\n/**\n * Runs `measure` with the placeholder taken out of layout, so a height read\n * reflects the value alone.\n *\n * A textarea with an empty value lays its placeholder out as real text, so\n * `scrollHeight` reports the placeholder wrapped at whatever width the field\n * has at that instant. That sizes an empty bar to the suggestion showing in it\n * rather than to `minLines`, and when the read lands before the field has its\n * final width -- a panel still animating open, a flex parent whose basis is 0\n * -- it wraps that text at a fraction of the real width and opens the bar at\n * `maxLines`. The first keystroke takes the placeholder out of layout and the\n * height snaps back, which is what made the bug look intermittent rather than\n * simply wrong.\n *\n * The reset to 'auto' and the `scrollHeight` read sit in different functions\n * here, so the whole measurement window is wrapped rather than a single read.\n * Costs one extra style recalc on a path that is already forcing a reflow.\n */\nfunction withoutPlaceholder(el: HTMLTextAreaElement, measure: () => void): void {\n const { placeholder } = el;\n if (!placeholder) {\n measure();\n return;\n }\n el.placeholder = '';\n try {\n measure();\n } finally {\n el.placeholder = placeholder;\n }\n}\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews. Chatbar revokes it when the\n * attachment is removed; once an attachment is handed to `onSubmit`, the\n * consumer owns the URL and is responsible for revoking it.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ntype ChatbarRejectReason = 'type' | 'size' | 'count';\ninterface ChatbarAttachmentRejection {\n file: File;\n reason: ChatbarRejectReason;\n}\n\ninterface ChatbarSubmitPayload {\n value: string;\n attachments: ChatbarAttachment[];\n}\n\ninterface FilePickerOptions {\n accept?: string | string[];\n multiple?: boolean;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n\n setValue(next: string): void;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n paste: boolean;\n clearOnSubmit: boolean;\n multiple: boolean;\n\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n attachments: ChatbarAttachment[];\n removeAttachment(id: string): void;\n\n /** Validates and submits; returns false when there was nothing to submit */\n submit(clear: boolean): boolean;\n appendFiles(files: File[]): number;\n appendFilesFromPaste(files: File[]): number;\n openFilePicker(options?: FilePickerOptions): void;\n /** Guards blur-collapse between pointerdown on a picker trigger and its click */\n beginFilePickerPress(): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\n// Value lives in its own context so keystrokes only re-render parts that read it\nconst ChatbarValueContext = React.createContext<string>('');\n\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\nconst toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];\n\nconst matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype))) return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n};\n\nconst IMAGE_EXT_RE = /\\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i;\nconst isImageLike = (name: string, type: string) => (type || '').toLowerCase().startsWith('image/') || IMAGE_EXT_RE.test(name);\n\nconst hasText = (value: string) => value.trim().length > 0;\n\nconst plural = (n: number, word: string) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nlet attachmentCounter = 0;\nconst createAttachmentId = () => `chatbar-attachment-${Date.now()}-${++attachmentCounter}`;\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `multiple`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - Submitting requires text or at least one attachment.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n /** When the chatbar expands on its own. `none` leaves open state entirely to the consumer. */\n expandOn?: ExpandOn;\n\n /** Minimum visible lines when expanded (default: 3). The compact state is always one line. */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n /** Controls Send button visibility only. Enter-to-submit is controlled by `Textarea submitOnEnter`. */\n sendMode?: SendMode;\n\n /** Disables text input, submission and every way of adding attachments */\n disabled?: boolean;\n /** Prevents editing, submission and adding attachments */\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: ChatbarSubmitPayload) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'raised' | 'surface' | 'outline' | 'ghost' | 'soft';\n /** Accent color for the control (matches TextArea) */\n color?: (typeof accentColors)[number];\n /** Optional radius override (matches TextArea) */\n radius?: (typeof radii)[number];\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n /** Allow more than one file per pick, paste or drop */\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n /** Accepted types for pasted files. Replaces `accept` for paste when set. */\n pasteAccept?: string | string[];\n /** Clear message and attachments after submit */\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: ChatbarAttachmentRejection[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, multiple, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n\n /**\n * Optional API ref to control Chatbar imperatively without relying on DOM refs.\n * Provides methods to focus the textarea and open the file picker.\n */\n apiRef?: React.Ref<ChatbarApi>;\n\n /**\n * Messages that need an answer before the next message, such as `Notice` and `Confirmation`.\n * They stack in a column above the chatbar, in the order given, so put the one the next\n * message answers last, nearest the text. They sit outside the box: a button in a notice never\n * submits the message, and pressing one never collapses the chatbar.\n */\n notices?: React.ReactNode;\n /**\n * Short facts that stay true about the conversation, such as the model or the context left.\n * They sit below the chatbar, inset from its sides.\n */\n context?: React.ReactNode;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/** Imperative API for Chatbar.Root */\nexport interface ChatbarApi {\n /** Focus the textarea input */\n focusTextarea: () => void;\n /** Open the file picker dialog (respects accept/multiple). No-op when disabled or read-only. */\n openFilePicker: () => void;\n}\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n *\n * Attachments\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n * - Additions and rejections are announced through a polite live region.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n */\ninterface RootProps extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit' | 'color'>, ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n expandOn = 'both',\n minLines = 3,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n color,\n radius,\n width,\n maxWidth,\n attachments: attachmentsProp,\n defaultAttachments,\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n apiRef,\n onBlurCapture,\n notices,\n context,\n ...divProps\n } = props;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? valueProp : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? openProp : openUncontrolled;\n\n // Treat `attachments` as controlled if the prop is provided, even if its value is `undefined`.\n // This avoids switching between controlled and uncontrolled when a consumer sets\n // `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.\n const isAttachmentsControlled = 'attachments' in props;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(() => defaultAttachments ?? []);\n const attachments = React.useMemo(\n () => (isAttachmentsControlled ? (attachmentsProp ?? []) : attachmentsUncontrolled),\n [isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],\n );\n\n // `id` changes on every announcement so identical messages still update the live region\n const [announcement, setAnnouncementState] = React.useState({ text: '', id: 0 });\n const announce = React.useCallback((text: string) => setAnnouncementState((prev) => ({ text, id: prev.id + 1 })), []);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRootRef = useComposedRefs(forwardedRef, rootRef);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n const fileInputRef = React.useRef<HTMLInputElement>(null);\n\n // Blur-collapse guards: `pickerOpenRef` is true while the native dialog is open,\n // `pressGuardRef` covers the gap between pointerdown on a trigger and its click\n // (Safari blurs the textarea before the click fires).\n const pickerOpenRef = React.useRef(false);\n const pressGuardRef = React.useRef(false);\n const pressGuardTimerRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const pickerRef = React.useRef<{ patterns: string[]; multiple: boolean } | null>(null);\n\n const acceptKey = toArray(accept).join(',');\n const pasteAcceptKey = toArray(pasteAccept).join(',');\n const accepts = React.useMemo(() => toArray(acceptKey), [acceptKey]);\n const pasteAccepts = React.useMemo(() => (pasteAcceptKey ? toArray(pasteAcceptKey) : accepts), [pasteAcceptKey, accepts]);\n\n // Latest props/state for stable callbacks. Synced during render (not in an effect) so\n // child layout effects that call setOpen/setValue see this render's handlers.\n const snapshot = {\n value,\n attachments,\n accepts,\n pasteAccepts,\n multiple,\n maxAttachments,\n maxFileSize,\n disabled,\n readOnly,\n expandOn,\n isValueControlled,\n isOpenControlled,\n isAttachmentsControlled,\n onValueChange,\n onOpenChange,\n onAttachmentsChange,\n onAttachmentReject,\n onSubmit,\n };\n const latest = React.useRef(snapshot);\n // eslint-disable-next-line react-hooks/refs -- read only in callbacks/effects; see comment above\n latest.current = snapshot;\n\n // Attachments set during the current event, before Root re-renders. Cleared at the end\n // of the task so a controlled parent that rejects the change is not overridden.\n const pendingAttachmentsRef = React.useRef<ChatbarAttachment[] | null>(null);\n const getAttachments = React.useCallback(() => pendingAttachmentsRef.current ?? latest.current.attachments, []);\n\n const setOpen = React.useCallback((next: boolean) => {\n if (!latest.current.isOpenControlled) setOpenUncontrolled(next);\n latest.current.onOpenChange?.(next);\n }, []);\n\n const setValue = React.useCallback((next: string) => {\n if (!latest.current.isValueControlled) setValueUncontrolled(next);\n latest.current.onValueChange?.(next);\n }, []);\n\n const setAttachments = React.useCallback((next: ChatbarAttachment[]) => {\n // Back-to-back updates in one event must see each other\n pendingAttachmentsRef.current = next;\n queueMicrotask(() => {\n pendingAttachmentsRef.current = null;\n });\n if (!latest.current.isAttachmentsControlled) setAttachmentsUncontrolled(next);\n latest.current.onAttachmentsChange?.(next);\n }, []);\n\n // Object URLs Chatbar created and still owns\n const ownedUrlsRef = React.useRef<Set<string>>(new Set());\n\n const addFiles = React.useCallback(\n (files: File[], patterns: string[], multiple: boolean = latest.current.multiple): number => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly || files.length === 0) return 0;\n\n const current = getAttachments();\n const next: ChatbarAttachment[] = [];\n const rejected: ChatbarAttachmentRejection[] = [];\n const remainingSlots = typeof cfg.maxAttachments === 'number' ? Math.max(cfg.maxAttachments - current.length, 0) : Infinity;\n const perActionLimit = multiple ? Infinity : 1;\n\n for (const file of files) {\n if (next.length >= remainingSlots || next.length >= perActionLimit) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof cfg.maxFileSize === 'number' && file.size > cfg.maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, patterns)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const url = isImageLike(file.name, file.type) ? URL.createObjectURL(file) : undefined;\n if (url) ownedUrlsRef.current.add(url);\n next.push({ id: createAttachmentId(), name: file.name, size: file.size, type: file.type, file, url, status: 'idle' });\n }\n\n const messages: string[] = [];\n if (next.length > 0) {\n setAttachments(current.concat(next));\n if (cfg.expandOn !== 'none') setOpen(true);\n messages.push(`${plural(next.length, 'file')} attached.`);\n }\n if (rejected.length > 0) {\n cfg.onAttachmentReject?.(rejected);\n messages.push(`${plural(rejected.length, 'file')} could not be attached.`);\n }\n if (messages.length > 0) announce(messages.join(' '));\n return next.length;\n },\n [getAttachments, setAttachments, setOpen, announce],\n );\n\n const appendFiles = React.useCallback((files: File[]) => addFiles(files, latest.current.accepts), [addFiles]);\n const appendFilesFromPaste = React.useCallback((files: File[]) => addFiles(files, latest.current.pasteAccepts), [addFiles]);\n\n const removeAttachment = React.useCallback(\n (id: string) => {\n const current = getAttachments();\n const removed = current.find((a) => a.id === id);\n if (!removed) return;\n setAttachments(current.filter((a) => a.id !== id));\n announce(`Removed ${removed.name}.`);\n },\n [getAttachments, setAttachments, announce],\n );\n\n const submit = React.useCallback(\n (clear: boolean) => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly) return false;\n const current = getAttachments();\n if (!hasText(cfg.value) && current.length === 0) return false;\n const payload = { value: cfg.value, attachments: current };\n // Hand preview URLs to the consumer only when they leave the chatbar; URLs still\n // rendered here stay owned so removing them later revokes them\n if (clear && cfg.onSubmit) {\n for (const att of current) if (att.url) ownedUrlsRef.current.delete(att.url);\n }\n cfg.onSubmit?.(payload);\n if (clear) {\n setValue('');\n setAttachments([]);\n }\n return true;\n },\n [getAttachments, setValue, setAttachments],\n );\n\n // Revoke owned object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n if (owned.size === 0) return;\n const current = new Set(attachments.map((a) => a.url));\n for (const url of Array.from(owned)) {\n if (!current.has(url)) {\n URL.revokeObjectURL(url);\n owned.delete(url);\n }\n }\n }, [attachments]);\n\n // On unmount, revoke URLs only when Chatbar owns the attachment list;\n // controlled attachments may still be rendered by the parent.\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n return () => {\n if (latest.current.isAttachmentsControlled) return;\n for (const url of Array.from(owned)) URL.revokeObjectURL(url);\n owned.clear();\n };\n }, []);\n\n const openFilePicker = React.useCallback((options?: FilePickerOptions) => {\n const cfg = latest.current;\n const input = fileInputRef.current;\n // The picker guard takes over from the press guard\n clearTimeout(pressGuardTimerRef.current);\n pressGuardRef.current = false;\n if (!input || cfg.disabled || cfg.readOnly) return;\n const patterns = options?.accept != null ? toArray(options.accept) : cfg.accepts;\n const multiple = options?.multiple ?? cfg.multiple;\n pickerRef.current = { patterns, multiple };\n input.accept = patterns.join(',');\n input.multiple = multiple;\n pickerOpenRef.current = true;\n input.click();\n // Browsers block the dialog outside a user gesture; if the window kept focus,\n // no dialog opened and no focus/cancel/change event will clear the guard\n setTimeout(() => {\n if (document.hasFocus()) pickerOpenRef.current = false;\n }, 1000);\n }, []);\n\n const beginFilePickerPress = React.useCallback(() => {\n // On touch (notably iOS), the compatibility mousedown, blur and click arrive in later\n // tasks than pointerup, so hold the guard until the click or a timeout\n pressGuardRef.current = true;\n clearTimeout(pressGuardTimerRef.current);\n pressGuardTimerRef.current = setTimeout(() => {\n pressGuardRef.current = false;\n }, 800);\n }, []);\n\n React.useEffect(() => () => clearTimeout(pressGuardTimerRef.current), []);\n\n // Clear the picker guard when the dialog closes, whichever way it closes\n React.useEffect(() => {\n const input = fileInputRef.current;\n const reset = () => {\n pickerOpenRef.current = false;\n };\n window.addEventListener('focus', reset);\n input?.addEventListener('cancel', reset);\n return () => {\n window.removeEventListener('focus', reset);\n input?.removeEventListener('cancel', reset);\n };\n }, []);\n\n const handleFileInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const input = event.currentTarget;\n const files = Array.from(input.files ?? []);\n const picker = pickerRef.current;\n addFiles(files, picker?.patterns ?? latest.current.accepts, picker?.multiple);\n pickerOpenRef.current = false;\n pickerRef.current = null;\n // Reset so selecting the same file again still fires change\n input.value = '';\n },\n [addFiles],\n );\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n onBlurCapture?.(event);\n const cfg = latest.current;\n const rootEl = rootRef.current;\n if (!rootEl || cfg.expandOn === 'none') return;\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget && rootEl.contains(nextTarget)) return;\n if (pickerOpenRef.current || pressGuardRef.current) return;\n if (!hasText(cfg.value) && getAttachments().length === 0) setOpen(false);\n },\n [onBlurCapture, setOpen, getAttachments],\n );\n\n const handleDrop = React.useCallback((files: File[]) => {\n appendFiles(files);\n }, [appendFiles]);\n\n // Validation happens in addFiles so drop, paste and picker share one rule set\n const { getRootProps, isDragActive } = useDropzone({\n onDrop: handleDrop,\n // Drop any earlier message so it is not re-announced when the drag hint goes away\n onDragEnter: () => announce(''),\n noClick: true,\n noKeyboard: true,\n // Textarea handles paste itself; letting the dropzone see it attaches twice\n noPaste: true,\n disabled: !dropzone || disabled || readOnly,\n });\n const dragActive = dropzone && isDragActive;\n\n React.useImperativeHandle(\n apiRef,\n () => ({\n focusTextarea: () => textareaRef.current?.focus({ preventScroll: true }),\n openFilePicker: () => openFilePicker(),\n }),\n [openFilePicker],\n );\n\n // Click-to-focus: focus textarea when clicking non-interactive areas inside the container\n const handleContainerPointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (disabled) return;\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target;\n if (target instanceof Element && target.closest('button, [role=\"button\"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex=\"-1\"])')) return;\n event.preventDefault();\n textareaRef.current?.focus({ preventScroll: true });\n },\n [disabled],\n );\n\n const contextValue = React.useMemo<ChatbarContextValue>(\n () => ({\n open,\n setOpen,\n setValue,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n paste,\n clearOnSubmit,\n multiple,\n textareaRef,\n attachments,\n removeAttachment,\n submit,\n appendFiles,\n appendFilesFromPaste,\n openFilePicker,\n beginFilePickerPress,\n }),\n [\n open, setOpen, setValue, size, expandOn, minLines, maxLines, sendMode, disabled, readOnly, paste,\n clearOnSubmit, multiple, attachments, removeAttachment, submit, appendFiles, appendFilesFromPaste,\n openFilePicker, beginFilePickerPress,\n ],\n );\n\n return (\n <ChatbarContext.Provider value={contextValue}>\n <ChatbarValueContext.Provider value={value}>\n <>\n <div\n {...divProps}\n ref={composedRootRef}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dragActive ? '' : undefined}\n data-accent-color={color}\n data-radius={radius}\n onBlurCapture={handleBlurCapture}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n tabIndex={-1}\n aria-hidden\n style={{ display: 'none' }}\n onChange={handleFileInputChange}\n />\n {notices ? (\n <div className=\"rt-ChatbarNotices\">\n <NoticeSizeContext.Provider value={size}>{notices}</NoticeSizeContext.Provider>\n </div>\n ) : null}\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', flex: '1 1 auto', minHeight: 0 }} onPointerDown={handleContainerPointerDown}>\n <div\n className={classNames('rt-ChatbarBox', `rt-variant-${variant ?? 'raised'}`)}\n style={{ position: 'relative' }}\n data-accent-color={color}\n data-radius={radius}\n >\n <div className=\"rt-ChatbarGrid\">\n {children}\n </div>\n {dragActive && (\n <div className=\"rt-ChatbarDropOverlay\" aria-hidden>\n <div className=\"rt-ChatbarDropContent\">\n <Text emphasis=\"medium\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </div>\n </div>\n {context ? (\n <Text as=\"div\" size={size === '3' ? '2' : '1'} emphasis=\"medium\" className=\"rt-ChatbarContext\">\n {context}\n </Text>\n ) : null}\n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {dragActive ? 'Drop files here to attach.' : <span key={announcement.id}>{announcement.text}</span>}\n </VisuallyHidden>\n </div>\n </>\n </ChatbarValueContext.Provider>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size' | 'rows' | 'value' | 'defaultValue'> {\n asChild?: boolean;\n /**\n * When true, pressing Enter submits (Shift+Enter inserts a newline).\n * Works with every `sendMode`. Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange.\n * - Auto-resizes between minLines and maxLines in a single layout effect, which\n * also opens the Chatbar when content overflows the compact height and\n * `expandOn` is `overflow` or `both`.\n * - Consumer handlers run first; calling `preventDefault` in `onKeyDown` or\n * `onPaste` skips the built-in submit or attach behavior.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onChange,\n onPaste,\n onKeyDown,\n onCompositionStart,\n onCompositionEnd,\n submitOnEnter = false,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n const { open, minLines, maxLines, expandOn, disabled, readOnly, setOpen, setValue, textareaRef, paste, appendFilesFromPaste, size, submit, clearOnSubmit } = ctx;\n const composedRef = useComposedRefs(forwardedRef, textareaRef);\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef(0);\n const paddingRef = React.useRef(0);\n const composingRef = React.useRef(false);\n\n const sizingRef = React.useRef({ open, minLines, maxLines });\n // Declared before the sizing effect so it runs first in the same commit\n useIsomorphicLayoutEffect(() => {\n sizingRef.current = { open, minLines, maxLines };\n }, [open, minLines, maxLines]);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n lineHeightRef.current = parseFloat(computedStyle.lineHeight) || 20;\n paddingRef.current = (parseFloat(computedStyle.paddingTop) || 0) + (parseFloat(computedStyle.paddingBottom) || 0);\n }, [textareaRef]);\n\n // Sizes `el` for the given open state; caller must have set height to 'auto' first\n const applyHeight = React.useCallback((el: HTMLTextAreaElement, isOpen: boolean) => {\n const { minLines: min, maxLines: max } = sizingRef.current;\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n const minHeight = Math.ceil((isOpen ? min : 1) * lineHeight) + padding;\n const maxHeight = Math.ceil((isOpen ? max : 1) * lineHeight) + padding;\n const contentHeight = Math.max(el.scrollHeight, minHeight);\n el.style.height = `${Math.min(contentHeight, maxHeight)}px`;\n const overflowing = contentHeight > maxHeight;\n el.style.overflowY = overflowing ? 'auto' : 'hidden';\n el.style.maxHeight = overflowing ? `${maxHeight}px` : 'none';\n }, []);\n\n // Typography depends on size\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n }, [recomputeMetrics, size]);\n\n // Single place for sizing and overflow auto-open: one height reset, one scrollHeight read\n useIsomorphicLayoutEffect(() => {\n const el = textareaRef.current;\n if (!el) return;\n if (lineHeightRef.current === 0) recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n let isOpen = open;\n if (!open && (expandOn === 'overflow' || expandOn === 'both')) {\n const compactHeight = Math.ceil(lineHeightRef.current) + paddingRef.current;\n if (el.scrollHeight > compactHeight + 1) {\n isOpen = true;\n setOpen(true);\n }\n }\n applyHeight(el, isOpen);\n });\n }, [value, open, expandOn, minLines, maxLines, size, setOpen, textareaRef, recomputeMetrics, applyHeight]);\n\n // Width changes re-wrap text; re-measure only when the width actually changes\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevWidth = -1;\n const ro = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width === prevWidth) return;\n const first = prevWidth === -1;\n prevWidth = width;\n if (first) return;\n recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n applyHeight(el, sizingRef.current.open);\n });\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, applyHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onFocus?.(event);\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n },\n [setValue, onChange],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onPaste?.(event);\n if (event.defaultPrevented || !paste || disabled || readOnly) return;\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === 'file')\n .map((item) => item.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length === 0) return;\n // Suppress the filename/text representation only when a file was actually attached\n if (appendFilesFromPaste(files) > 0) event.preventDefault();\n },\n [paste, disabled, readOnly, onPaste, appendFilesFromPaste],\n );\n\n const handleCompositionStart = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = true;\n onCompositionStart?.(event);\n },\n [onCompositionStart],\n );\n\n const handleCompositionEnd = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = false;\n onCompositionEnd?.(event);\n },\n [onCompositionEnd],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !submitOnEnter) return;\n if (event.key !== 'Enter' || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;\n // Safari fires the IME-confirming Enter after compositionend with keyCode 229\n if (composingRef.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n // Plain Enter never inserts a newline when submitOnEnter is on, even with nothing to send\n event.preventDefault();\n submit(clearOnSubmit);\n },\n [submitOnEnter, onKeyDown, submit, clearOnSubmit],\n );\n\n const Comp = asChild ? Slot : 'textarea';\n return (\n <div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)}>\n <Comp\n {...textareaProps}\n ref={composedRef}\n className=\"rt-ChatbarInput\"\n value={value}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineStart', className)}>\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineEnd', className)}>\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n * `Chatbar.Item`s passed as children follow the attachments in the same row.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n /** `Chatbar.Item`s: things the message refers to that are not files. */\n children?: React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>((props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const hasItems = React.Children.toArray(children).length > 0;\n if (ctx.attachments.length === 0 && !hasItems && !forceMount) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <div>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarAttachmentsRow', className)} role=\"list\" aria-label={divProps['aria-label'] ?? 'Attachments'}>\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"3\" minWidth=\"fit-content\">\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n {children}\n </Flex>\n </ScrollArea>\n </Comp>\n </div>\n );\n});\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/**\n * Moves focus off a pill that is about to unmount, to the next pill's remove\n * button, the previous one's, or the text, so keyboard users are not dropped\n * to <body>.\n */\nfunction moveFocusOffPill(button: HTMLButtonElement, textareaRef: React.RefObject<HTMLTextAreaElement | null>) {\n const pill = button.closest('[role=\"listitem\"]');\n const pills = pill?.parentElement ? Array.from(pill.parentElement.children) : [];\n const index = pill ? pills.indexOf(pill) : -1;\n const neighbour = pills[index + 1] ?? pills[index - 1];\n const nextButton = neighbour?.querySelector<HTMLButtonElement>('.rt-ChatbarItemRemove');\n if (nextButton) nextButton.focus();\n else textareaRef.current?.focus({ preventScroll: true });\n}\n\n/** The pill an attachment and an item share: a lead tile, a label and \u00D7. */\nconst Pill: React.FC<{\n lead: React.ReactNode;\n leadKind: 'image' | 'icon';\n label: React.ReactNode;\n /** Read after the label by screen readers only, e.g. a file's size. */\n detail?: string;\n removeLabel: string;\n onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n}> = ({ lead, leadKind, label, detail, removeLabel, onRemove }) => {\n const ctx = useChatbarContext();\n return (\n <>\n <span className=\"rt-ChatbarItemLead\" data-kind={leadKind} aria-hidden>\n {lead}\n </span>\n <Text className=\"rt-ChatbarItemLabel\" size={ctx.size} truncate>\n {label}\n {detail ? <VisuallyHidden>, {detail}</VisuallyHidden> : null}\n </Text>\n {onRemove && (\n <IconButton className=\"rt-ChatbarItemRemove\" aria-label={removeLabel} size=\"1\" variant=\"ghost\" color=\"gray\" onClick={onRemove}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst STATUS_LABEL: Partial<Record<AttachmentStatus, string>> = { uploading: 'uploading', error: 'failed to upload' };\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : 'div';\n const isImage = !!attachment.url && isImageLike(attachment.name, attachment.type);\n const sizeLabel = `${Math.ceil(attachment.size / 1024)} KB`;\n const statusLabel = attachment.status ? STATUS_LABEL[attachment.status] : undefined;\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = (event: React.MouseEvent<HTMLButtonElement>) => {\n moveFocusOffPill(event.currentTarget, ctx.textareaRef);\n ctx.removeAttachment(attachment.id);\n };\n\n const lead =\n attachment.status === 'uploading' ? (\n <Spinner size=\"1\" />\n ) : isImage ? (\n <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" />\n ) : (\n <FileTextIcon />\n );\n\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames(children ? 'rt-ChatbarAttachment' : 'rt-ChatbarAttachment rt-ChatbarItem', className)}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n data-status={attachment.status}\n title={attachment.name}\n >\n {children ?? (\n <Pill\n lead={lead}\n leadKind={isImage && attachment.status !== 'uploading' ? 'image' : 'icon'}\n label={attachment.name}\n detail={statusLabel ? `${sizeLabel}, ${statusLabel}` : sizeLabel}\n removeLabel={`Remove ${attachment.name}`}\n onRemove={locked ? undefined : handleRemove}\n />\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\n/**\n * Something the message refers to that is not a file: a scene object, a\n * picked mode, a selection. The same pill as an attachment, placed in\n * `Chatbar.AttachmentsRow` as a child. The app owns the list, so removing one\n * calls `onRemove` and nothing else; leave it out for a pill that cannot be\n * removed.\n */\ninterface ItemProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children' | 'color'> {\n /** The label. Also names the remove button: \"Remove {label}\". */\n children: string;\n /** Drawn in the lead tile, tinted with `color`. */\n icon?: React.ReactNode;\n /** A thumbnail for the lead tile, in place of the icon. */\n image?: string;\n /** Tint of the icon tile. Defaults to gray. */\n color?: (typeof accentColors)[number];\n onRemove?: () => void;\n /** Overrides the remove button's label. */\n removeLabel?: string;\n}\n\nconst Item = React.forwardRef<HTMLDivElement, ItemProps>((props, forwardedRef) => {\n const { children, icon, image, color, onRemove, removeLabel, className, ...divProps } = props;\n const ctx = useChatbarContext();\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = onRemove\n ? (event: React.MouseEvent<HTMLButtonElement>) => {\n moveFocusOffPill(event.currentTarget, ctx.textareaRef);\n onRemove();\n }\n : undefined;\n\n return (\n <div\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarItem', className)}\n role=\"listitem\"\n data-accent-color={image ? undefined : (color ?? 'gray')}\n title={children}\n >\n <Pill\n lead={image ? <img className=\"rt-ChatbarAttachmentImage\" src={image} alt=\"\" /> : icon}\n leadKind={image ? 'image' : 'icon'}\n label={children}\n removeLabel={removeLabel ?? `Remove ${children}`}\n onRemove={locked ? undefined : handleRemove}\n />\n </div>\n );\n});\nItem.displayName = 'Chatbar.Item';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n /** Overrides Root `accept` for files chosen through this trigger */\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>((props, forwardedRef) => {\n const { asChild, accept, multiple, disabled: disabledProp, onPointerDown, onClick, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const disabled = disabledProp || ctx.disabled || ctx.readOnly;\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n {...buttonProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachTrigger', buttonProps.className)}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n disabled={disabled}\n onPointerDown={(event: React.PointerEvent<HTMLButtonElement>) => {\n onPointerDown?.(event);\n if (!disabled && !event.defaultPrevented) ctx.beginFilePickerPress();\n }}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (disabled || event.defaultPrevented) return;\n ctx.openFilePicker({ accept, multiple });\n }}\n />\n );\n});\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\n\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <div>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRow', className)}>\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n </div>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\ntype RowSlotProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst RowStart = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowStart', className)} />;\n});\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowEnd', className)} />;\n});\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ntype SendStatus = 'ready' | 'submitted' | 'streaming' | 'error';\n\ntype SendProps = Omit<IconButtonProps, 'aria-label' | 'aria-labelledby' | 'variant' | 'emphasis'> &\n ButtonRankProps & {\n /** Optional override for accessible name. Defaults to \"Send\". */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n asChild?: boolean;\n /** Clear message and attachments after sending. Defaults to Root `clearOnSubmit`. */\n clearOnSend?: boolean;\n /**\n * What the button means. `ready` sends. While a reply is `submitted` or `streaming` and the\n * box is empty, the button STOPS the reply (`onStop`); with a draft in the box it still sends,\n * and the app decides whether sending interrupts the reply. After an `error`, an empty box\n * makes it RETRY (`onRetry`). Default `ready`.\n */\n status?: SendStatus;\n /** Called when the button is pressed to stop a reply. */\n onStop?: () => void;\n /** Called when the button is pressed to retry after an error. */\n onRetry?: () => void;\n /** Accessible name while it stops. Default \"Stop\". */\n stopLabel?: string;\n /** Accessible name while it retries. Default \"Retry\". */\n retryLabel?: string;\n /** Glyph while it stops. Defaults to a square, or a spinner while `submitted`. */\n stopIcon?: React.ReactNode;\n /** Glyph while it retries. */\n retryIcon?: React.ReactNode;\n};\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend,\n disabled,\n children,\n style,\n className,\n size: sizeProp,\n variant: variantProp, emphasis,\n tabIndex,\n onClick,\n status = 'ready',\n onStop,\n onRetry,\n stopLabel = 'Stop',\n retryLabel = 'Retry',\n stopIcon,\n retryIcon,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n\n const hasContent = hasText(value) || ctx.attachments.length > 0;\n const running = status === 'submitted' || status === 'streaming';\n const mode: 'send' | 'stop' | 'retry' = hasContent ? 'send' : running ? 'stop' : status === 'error' ? 'retry' : 'send';\n\n if (ctx.sendMode === 'never' && mode === 'send') return null;\n\n const visible = mode !== 'send' || ctx.sendMode === 'always' || hasContent;\n const inactive = mode === 'send' ? disabled || ctx.disabled || ctx.readOnly || !hasContent : disabled || ctx.disabled;\n\n const sendName = ariaLabel ?? 'Send';\n const labelProps: { 'aria-label': string } | { 'aria-labelledby': string } =\n mode === 'stop' ? { 'aria-label': stopLabel } : mode === 'retry' ? { 'aria-label': retryLabel } : ariaLabelledby ? { 'aria-labelledby': ariaLabelledby } : { 'aria-label': sendName };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || inactive) return;\n if (mode === 'stop') {\n onStop?.();\n return;\n }\n if (mode === 'retry') {\n onRetry?.();\n return;\n }\n const clear = clearOnSend ?? ctx.clearOnSubmit;\n // Clearing hides and disables this button; keep keyboard focus in the composer\n if (ctx.submit(clear) && clear) ctx.textareaRef.current?.focus({ preventScroll: true });\n };\n\n const glyph =\n mode === 'stop' ? (\n stopIcon ?? (status === 'submitted' ? <Spinner size={ctx.size} /> : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden>\n <rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\" />\n </svg>\n ))\n ) : mode === 'retry' ? (\n retryIcon ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n )\n ) : (\n children ?? (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n )\n );\n\n return (\n <IconButton\n {...buttonProps}\n ref={forwardedRef}\n size={sizeProp ?? ctx.size}\n {...(emphasis ? { emphasis } : { variant: variantProp ?? (ctx.open || mode !== 'send' ? 'solid' : 'ghost') })}\n disabled={inactive}\n className={classNames('rt-ChatbarSend', className)}\n style={{ opacity: visible ? 1 : 0, pointerEvents: visible ? undefined : 'none', ...style }}\n // Hidden Send must not be reachable by keyboard or announced\n aria-hidden={visible ? undefined : true}\n tabIndex={visible ? tabIndex : -1}\n asChild={asChild}\n onClick={handleClick}\n data-status={status}\n data-mode={mode}\n {...labelProps}\n >\n {glyph}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport { Root, Textarea, InlineStart, InlineEnd, AttachmentsRow, Attachment, Item, AttachTrigger, Row, RowStart, RowEnd, Send };\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n InlineSlotProps as ChatbarInlineSlotProps,\n AttachmentsRowProps as ChatbarAttachmentsRowProps,\n AttachmentProps as ChatbarAttachmentProps,\n ItemProps as ChatbarItemProps,\n AttachTriggerProps as ChatbarAttachTriggerProps,\n RowProps as ChatbarRowProps,\n RowSlotProps as ChatbarRowSlotProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n ChatbarAttachmentRejection,\n ChatbarRejectReason,\n ChatbarSubmitPayload,\n AttachmentStatus as ChatbarAttachmentStatus,\n ExpandOn as ChatbarExpandOn,\n SendMode as ChatbarSendMode,\n SendStatus as ChatbarSendStatus,\n};\n"],
5
+ "mappings": "iaAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mBAAAE,GAAA,eAAAC,GAAA,mBAAAC,GAAA,cAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,QAAAC,GAAA,WAAAC,GAAA,aAAAC,GAAA,SAAAC,GAAA,aAAAC,KAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBAChC,OAAS,eAAAC,OAAmB,iBAiB5B,IAAMC,GAA4B,OAAO,OAAW,IAAoB,kBAAwB,YAoBhG,SAASC,GAAmBC,EAAyBC,EAA2B,CAC9E,GAAM,CAAE,YAAAC,CAAY,EAAIF,EACxB,GAAI,CAACE,EAAa,CAChBD,EAAQ,EACR,MACF,CACAD,EAAG,YAAc,GACjB,GAAI,CACFC,EAAQ,CACV,QAAE,CACAD,EAAG,YAAcE,CACnB,CACF,CA2EA,IAAMC,GAAuB,gBAA0C,IAAI,EAErEC,GAA4B,gBAAsB,EAAE,EAEpDC,EAA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,SAAAA,CAAS,EAAI,CAAE,QAASD,IAAgB5O,EAAI,MAAQyP,IAAS,OAAS,QAAU,QAAS,EAC3G,SAAUE,EACV,UAAW5G,EAAW,iBAAkBpH,CAAS,EACjD,MAAO,CAAE,QAAS+N,EAAU,EAAI,EAAG,cAAeA,EAAU,OAAY,OAAQ,GAAG9N,CAAM,EAEzF,cAAa8N,EAAU,OAAY,GACnC,SAAUA,EAAUZ,EAAW,GAC/B,QAAS1F,EACT,QAASyG,EACT,cAAad,EACb,YAAWU,EACV,GAAGG,GAEHE,CACH,CAEJ,CAAC,EACDrB,GAAK,YAAc",
6
+ "names": ["chatbar_exports", "__export", "AttachTrigger", "Attachment", "AttachmentsRow", "InlineEnd", "InlineStart", "Item", "Root", "Row", "RowEnd", "RowStart", "Send", "Textarea", "React", "classNames", "useComposedRefs", "useDropzone", "useIsomorphicLayoutEffect", "withoutPlaceholder", "el", "measure", "placeholder", "ChatbarContext", "ChatbarValueContext", "useChatbarContext", "ctx", "toArray", "val", "s", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "IMAGE_EXT_RE", "isImageLike", "hasText", "value", "plural", "n", "word", "attachmentCounter", "createAttachmentId", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "color", "radius", "width", "maxWidth", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "apiRef", "onBlurCapture", "notices", "context", "divProps", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "announcement", "setAnnouncementState", "announce", "text", "prev", "rootRef", "composedRootRef", "useComposedRefs", "textareaRef", "fileInputRef", "pickerOpenRef", "pressGuardRef", "pressGuardTimerRef", "pickerRef", "acceptKey", "pasteAcceptKey", "accepts", "pasteAccepts", "snapshot", "latest", "pendingAttachmentsRef", "getAttachments", "setOpen", "next", "setValue", "setAttachments", "ownedUrlsRef", "addFiles", "files", "cfg", "current", "rejected", "remainingSlots", "perActionLimit", "url", "messages", "appendFiles", "appendFilesFromPaste", "removeAttachment", "id", "removed", "a", "submit", "clear", "payload", "att", "owned", "openFilePicker", "options", "input", "beginFilePickerPress", "reset", "handleFileInputChange", "event", "picker", "handleBlurCapture", "rootEl", "nextTarget", "handleDrop", "getRootProps", "isDragActive", "useDropzone", "dragActive", "handleContainerPointerDown", "target", "contextValue", "classNames", "NoticeSizeContext", "Text", "VisuallyHidden", "Textarea", "asChild", "onFocus", "onChange", "onPaste", "onKeyDown", "onCompositionStart", "onCompositionEnd", "submitOnEnter", "textareaProps", "composedRef", "lineHeightRef", "paddingRef", "composingRef", "sizingRef", "recomputeMetrics", "computedStyle", "applyHeight", "isOpen", "min", "max", "lineHeight", "padding", "minHeight", "maxHeight", "contentHeight", "overflowing", "compactHeight", "prevWidth", "ro", "entries", "first", "handleFocus", "handleChange", "handlePaste", "item", "f", "handleCompositionStart", "handleCompositionEnd", "handleKeyDown", "Comp", "Slot", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "hasItems", "ScrollArea", "Flex", "Attachment", "moveFocusOffPill", "button", "pill", "pills", "index", "nextButton", "Pill", "lead", "leadKind", "label", "detail", "removeLabel", "onRemove", "IconButton", "CloseIcon", "STATUS_LABEL", "attachment", "isImage", "sizeLabel", "statusLabel", "locked", "handleRemove", "Spinner", "FileTextIcon", "Item", "icon", "image", "AttachTrigger", "disabledProp", "onPointerDown", "onClick", "buttonProps", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "sizeProp", "variantProp", "emphasis", "tabIndex", "status", "onStop", "onRetry", "stopLabel", "retryLabel", "stopIcon", "retryIcon", "ariaLabel", "ariaLabelledby", "hasContent", "mode", "visible", "inactive", "labelProps", "handleClick", "glyph"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-VX44UTQ5.js";import{a as e}from"./chunk-ERGJN7FJ.js";import{b as r}from"./chunk-KRJTW535.js";import{c as o}from"./chunk-34KVYDF6.js";var s=["1","2","3","4"],l={size:{type:"enum",className:"rt-r-size",values:s,default:"2",responsive:!0}},i=["raised","surface","soft","outline","ghost"],m={variant:{type:"enum",className:"rt-variant",values:i,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...o,...r,width:e.width,placeholder:{type:"string"}},a=["1","2","3"],c={size:{type:"enum",className:"rt-r-size",values:a,default:"2",responsive:!0},...o,width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"480px"},...t};export{l as a,m as b,c};
2
+ //# sourceMappingURL=chunk-MAI7FEU7.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/combobox.props.tsx"],
4
+ "sourcesContent": ["import { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Shared responsive sizing inherited by Combobox.Root.\n */\nconst comboboxRootPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\n/**\n * Token-aware props specific to Combobox.Trigger.\n */\nconst comboboxTriggerPropDefs = {\n variant: { type: 'enum', className: 'rt-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n width: widthPropDefs.width,\n placeholder: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n width: PropDef<string>;\n placeholder: PropDef<string>;\n};\n\n// The list is a menu, and menus stop at size 3.\nconst contentSizes = ['1', '2', '3'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: contentSizes, default: '2', responsive: true },\n ...colorPropDef,\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\nexport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs };\n"],
5
+ "mappings": "gKAOA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAK3BC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQD,EAAO,QAAS,IAAK,WAAY,EAAK,CAC9F,EAIME,EAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAKlEC,EAA0B,CAC9B,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,EAAiB,QAAS,QAAS,EAC7F,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,MAAOC,EAAc,MACrB,YAAa,CAAE,KAAM,QAAS,CAChC,EAWMC,EAAe,CAAC,IAAK,IAAK,GAAG,EAK7BC,EAA0B,CAC9B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQD,EAAc,QAAS,IAAK,WAAY,EAAK,EACnG,GAAGH,EACH,MAAOE,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGG,CACL",
6
+ "names": ["sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as o}from"./chunk-VX44UTQ5.js";import{a as e}from"./chunk-ERGJN7FJ.js";import{a as t}from"./chunk-NZJGC6ZW.js";var r=["1","2","3","4"],n={...t,align:{type:"enum",className:"rt-r-align",values:["start","center"],default:"center"},size:{type:"enum",className:"rt-r-size",values:r,default:"3",responsive:!0},width:e.width,minWidth:e.minWidth,maxWidth:{...e.maxWidth,default:"600px"},...o};export{n as a};
2
+ //# sourceMappingURL=chunk-MDHXSEGH.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/dialog.props.tsx"],
4
+ "sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst alignValues = ['start', 'center'] as const;\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\nconst dialogContentPropDefs = {\n ...asChildPropDef,\n align: {\n type: 'enum',\n className: 'rt-r-align',\n values: ['start', 'center'],\n default: 'center',\n },\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '3',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '600px' },\n ...heightPropDefs,\n} satisfies {\n align: PropDef<(typeof alignValues)[number]>;\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype DialogContentOwnProps = GetPropDefTypes<\n typeof dialogContentPropDefs & typeof asChildPropDef & typeof widthPropDefs\n>;\n\nexport { dialogContentPropDefs };\nexport type { DialogContentOwnProps };\n"],
5
+ "mappings": "wHAQA,IAAMA,EAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAElCC,EAAwB,CAC5B,GAAGC,EACH,MAAO,CACL,KAAM,OACN,UAAW,aACX,OAAQ,CAAC,QAAS,QAAQ,EAC1B,QAAS,QACX,EACA,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,MAAOG,EAAc,MACrB,SAAUA,EAAc,SACxB,SAAU,CAAE,GAAGA,EAAc,SAAU,QAAS,OAAQ,EACxD,GAAGC,CACL",
6
+ "names": ["contentSizes", "dialogContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-DIGT74P3.js";import{a as o}from"./chunk-UBSLEGQZ.js";import{a as r}from"./chunk-GSTOGDAJ.js";import*as t from"react";import h from"classnames";import{Switch as p}from"radix-ui";var f=t.forwardRef((i,s)=>{let{className:c,color:m,...a}=o(i,e,r);return t.createElement(p.Root,{"data-accent-color":m,...a,asChild:!1,ref:s,className:h("rt-reset","rt-SwitchRoot",c)},t.createElement(p.Thumb,{className:"rt-SwitchThumb"}))});f.displayName="Switch";export{f as a};
2
- //# sourceMappingURL=chunk-YKGLZEXX.js.map
1
+ import{a as e}from"./chunk-KPACVWV4.js";import{a as o}from"./chunk-UBSLEGQZ.js";import{a as r}from"./chunk-GSTOGDAJ.js";import*as t from"react";import h from"classnames";import{Switch as p}from"radix-ui";var f=t.forwardRef((i,s)=>{let{className:c,color:m,...a}=o(i,e,r);return t.createElement(p.Root,{"data-accent-color":m,...a,asChild:!1,ref:s,className:h("rt-reset","rt-SwitchRoot",c)},t.createElement(p.Thumb,{className:"rt-SwitchThumb"}))});f.displayName="Switch";export{f as a};
2
+ //# sourceMappingURL=chunk-MJC4NKYG.js.map
@@ -0,0 +1,2 @@
1
+ import{a as y,b as B}from"./chunk-7BE6N3KY.js";import{a as c}from"./chunk-XZ5XZS5O.js";import{a as m}from"./chunk-7CBZFHSQ.js";import{a as f}from"./chunk-AGAQC4HH.js";import{a as i}from"./chunk-NCDOMH5I.js";import{a as l}from"./chunk-UBSLEGQZ.js";import{a as u}from"./chunk-GSTOGDAJ.js";import*as t from"react";import z from"classnames";import{Slot as M}from"radix-ui";var N=t.forwardRef((o,b)=>{let{size:P=i.size.default}=o,{className:h,children:e,asChild:n,as:s,color:g,radius:R,flush:x,disabled:p=o.loading,...d}=l(o,i,u),C=n?M.Root:s||"button",w=n||!s||["button","input","textarea","select"].includes(s),E=!n&&(!s||s==="button"),T="type"in d,D=t.useId(),a=o.loading?`${D}-loading`:void 0,r=t.useMemo(()=>typeof e=="string"?e:t.isValidElement(e)&&typeof e.props?.children=="string"?e.props.children:"button",[e]),v=t.useMemo(()=>o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":a,"aria-label":`${r} (loading)`}:{},[o.loading,a,r]);return t.createElement(C,{"data-disabled":p||void 0,"data-accent-color":g,"data-radius":R,"data-flush":x?"true":void 0,...d,...v,ref:b,className:z("rt-reset","rt-BaseButton",h),...w&&{disabled:p},...E&&!T?{type:"button"}:{}},o.loading?t.createElement(t.Fragment,null,t.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},e),t.createElement(f,null,t.createElement("span",{id:a},r," is loading, please wait..."),e),t.createElement(m,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},t.createElement("span",null,t.createElement(c,{size:y(P,B),"aria-hidden":"true"})))):e)});N.displayName="BaseButton";export{N as a};
2
+ //# sourceMappingURL=chunk-MOYLXCMW.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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/**\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 * - Comprehensive accessibility support\n * - Polymorphic rendering support\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 flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\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 = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\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-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\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 size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\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": "+RAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WA2DrB,IAAMC,EAAmB,aAA+C,CAACC,EAAOC,IAAiB,CAC/F,GAAM,CAAE,KAAAC,EAAOC,EAAmB,KAAK,OAAQ,EAAIH,EAG7C,CACJ,UAAAI,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,MAAAC,EACA,SAAAC,EAAWX,EAAM,QACjB,GAAGY,CACL,EAAIC,EAAab,EAAOG,EAAoBW,CAAc,EAMpDC,EAAOT,EAAUU,EAAK,KAAQT,GAAM,SAIpCU,EAAqBX,GAAW,CA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,YAAc",
6
+ "names": ["React", "classNames", "Slot", "BaseButton", "props", "forwardedRef", "size", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "flush", "disabled", "baseButtonProps", "extractProps", "marginPropDefs", "Comp", "Slot", "shouldPassDisabled", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "buttonText", "accessibilityProps", "classNames", "VisuallyHidden", "Flex", "Spinner", "mapResponsiveProp", "mapButtonSizeToSpinnerSize"]
7
+ }
@@ -1,5 +1,5 @@
1
- import{a as m}from"./chunk-2N2AQNJH.js";import{a as u}from"./chunk-ELZEAEN2.js";import{a as p}from"./chunk-URLG45A4.js";import*as e from"react";import v from"classnames";var E={loud:"solid",medium:"raised",quiet:"ghost"};function w(t){if(t["aria-label"]||t["aria-labelledby"]||t.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
1
+ import{a as m}from"./chunk-2N2AQNJH.js";import{a as u}from"./chunk-DP3OWU5T.js";import{a as p}from"./chunk-MOYLXCMW.js";import*as e from"react";import v from"classnames";var E={loud:"solid",medium:"raised",quiet:"ghost"};function w(t){if(t["aria-label"]||t["aria-labelledby"]||t.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
2
2
  - aria-label prop with descriptive text
3
3
  - aria-labelledby prop referencing a label element
4
4
  - or visible text children`)}var g=e.forwardRef(({className:t,style:r,tooltip:a,tooltipSide:c="top",tooltipAlign:d="center",tooltipDelayDuration:B,tooltipDisableHoverableContent:f,iconOnly:s=!1,emphasis:o,variant:i,...n},b)=>{let{tooltipId:y,hasTooltip:R,accessibilityProps:h}=m(a);if(s&&(w(n),n.fullWidth=!1),o!==void 0&&i!==void 0)throw new Error("Button: pass `emphasis` or `variant`, not both. They set the same thing.");let P=o!==void 0?E[o]:i,l=e.createElement(p,{...n,variant:P,...h,ref:b,className:v(s?"rt-IconButton":"rt-Button",t),style:r});return R?e.createElement(u,{content:a,side:c,align:d,delayDuration:B,disableHoverableContent:f,id:y},l):l});g.displayName="Button";export{g as a};
5
- //# sourceMappingURL=chunk-Y4IB7KDZ.js.map
5
+ //# sourceMappingURL=chunk-MZQDDG5K.js.map
@@ -0,0 +1,2 @@
1
+ import{b as s}from"./chunk-KRJTW535.js";import{a as e}from"./chunk-NZJGC6ZW.js";import{d as o}from"./chunk-34KVYDF6.js";var a=["1","2","3","4"],t=["raised","solid","soft","surface","outline","ghost"],i={...e,size:{type:"enum",className:"rt-r-size",values:a,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:t,default:"solid"},...o,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},flush:{type:"boolean",default:!1}};export{i as a};
2
+ //# sourceMappingURL=chunk-NCDOMH5I.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 { 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 * - raised: lifted off its ground, with an edge and a shadow\n * - solid: Primary actions that should be noticed first (the default)\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 = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost'] 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 * - 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 */\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 ...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 * 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 flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
+ "mappings": "wHAaA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,OAAO,EA2BpEC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,OAAQ,EACrF,GAAGG,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
+ "names": ["sizes", "variants", "baseButtonPropDefs", "asChildPropDef", "accentColorPropDef", "radiusPropDef"]
7
+ }