@42-central/ui-react 0.18.2 → 0.19.1

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 (432) hide show
  1. package/dist/{chunk-YXE4B6X3.js → chunk-2NNZHVKD.js} +3 -3
  2. package/dist/{chunk-YXE4B6X3.js.map → chunk-2NNZHVKD.js.map} +1 -1
  3. package/dist/{chunk-5JHDSVEZ.js → chunk-4NNGTNPV.js} +10 -8
  4. package/dist/chunk-4NNGTNPV.js.map +1 -0
  5. package/dist/{chunk-7NZSTCJO.js → chunk-57BTVRRB.js} +4 -9
  6. package/dist/chunk-57BTVRRB.js.map +1 -0
  7. package/dist/{chunk-S2HWWR2H.js → chunk-64T6Z7BA.js} +3 -3
  8. package/dist/{chunk-S2HWWR2H.js.map → chunk-64T6Z7BA.js.map} +1 -1
  9. package/dist/{chunk-MI2WZRK3.js → chunk-A6MYJTJI.js} +4 -4
  10. package/dist/{chunk-MI2WZRK3.js.map → chunk-A6MYJTJI.js.map} +1 -1
  11. package/dist/{chunk-RQL7FVCS.js → chunk-BTFBBNRW.js} +11 -6
  12. package/dist/chunk-BTFBBNRW.js.map +1 -0
  13. package/dist/{chunk-OWG4BCQR.js → chunk-CYWMES5P.js} +4 -4
  14. package/dist/{chunk-OWG4BCQR.js.map → chunk-CYWMES5P.js.map} +1 -1
  15. package/dist/{chunk-YBJB7FGE.js → chunk-CZEKZ5HR.js} +6 -6
  16. package/dist/chunk-CZEKZ5HR.js.map +1 -0
  17. package/dist/{chunk-HAQJQFE6.js → chunk-DBTJEBMO.js} +11 -4
  18. package/dist/{chunk-HAQJQFE6.js.map → chunk-DBTJEBMO.js.map} +1 -1
  19. package/dist/{chunk-AE7QTLJ5.js → chunk-FAOBC4IS.js} +4 -4
  20. package/dist/{chunk-AE7QTLJ5.js.map → chunk-FAOBC4IS.js.map} +1 -1
  21. package/dist/{chunk-NF5JM2YO.js → chunk-FOMR74VE.js} +3 -3
  22. package/dist/{chunk-NF5JM2YO.js.map → chunk-FOMR74VE.js.map} +1 -1
  23. package/dist/{chunk-FZIHZT5R.js → chunk-GCGX4FEF.js} +16 -10
  24. package/dist/chunk-GCGX4FEF.js.map +1 -0
  25. package/dist/{chunk-B2YJKRNQ.js → chunk-HCYULRWT.js} +13 -9
  26. package/dist/chunk-HCYULRWT.js.map +1 -0
  27. package/dist/{chunk-B2LCHXUB.js → chunk-INJUILCN.js} +9 -4
  28. package/dist/chunk-INJUILCN.js.map +1 -0
  29. package/dist/{chunk-ZDXQ64A7.js → chunk-K5UWVH6P.js} +5 -5
  30. package/dist/{chunk-ZDXQ64A7.js.map → chunk-K5UWVH6P.js.map} +1 -1
  31. package/dist/{chunk-6GDMSENK.js → chunk-LM6F6DLR.js} +3 -24
  32. package/dist/chunk-LM6F6DLR.js.map +1 -0
  33. package/dist/{chunk-KHMFNH3X.js → chunk-MQO42HZL.js} +7 -7
  34. package/dist/chunk-MQO42HZL.js.map +1 -0
  35. package/dist/chunk-OC7I2CTA.js +8 -0
  36. package/dist/chunk-OC7I2CTA.js.map +1 -0
  37. package/dist/{chunk-O23Y5ML4.js → chunk-OGJFDNIS.js} +249 -231
  38. package/dist/chunk-OGJFDNIS.js.map +1 -0
  39. package/dist/{chunk-6OLTJYSX.js → chunk-PINENGML.js} +12 -5
  40. package/dist/chunk-PINENGML.js.map +1 -0
  41. package/dist/{chunk-NSDM3FEB.js → chunk-PS2PZFXH.js} +5 -3
  42. package/dist/chunk-PS2PZFXH.js.map +1 -0
  43. package/dist/{chunk-RAUOFTUH.js → chunk-QIDAXFKK.js} +4 -4
  44. package/dist/{chunk-RAUOFTUH.js.map → chunk-QIDAXFKK.js.map} +1 -1
  45. package/dist/{chunk-S7N4LGLZ.js → chunk-RIP5G47F.js} +4 -4
  46. package/dist/{chunk-S7N4LGLZ.js.map → chunk-RIP5G47F.js.map} +1 -1
  47. package/dist/{chunk-Z2Z5EXVT.js → chunk-RKYXG6X7.js} +3 -3
  48. package/dist/{chunk-Z2Z5EXVT.js.map → chunk-RKYXG6X7.js.map} +1 -1
  49. package/dist/{chunk-WQN64ZHG.js → chunk-SVKU3GUN.js} +10 -6
  50. package/dist/chunk-SVKU3GUN.js.map +1 -0
  51. package/dist/{chunk-FHG54IT5.js → chunk-TBTSEPGP.js} +13 -4
  52. package/dist/chunk-TBTSEPGP.js.map +1 -0
  53. package/dist/{chunk-HT5JAHR3.js → chunk-UJZIF2BA.js} +20 -9
  54. package/dist/chunk-UJZIF2BA.js.map +1 -0
  55. package/dist/{chunk-UHNRAI6V.js → chunk-VZBUQNLX.js} +68 -29
  56. package/dist/chunk-VZBUQNLX.js.map +1 -0
  57. package/dist/{chunk-JITF6I7N.js → chunk-WJOHNCYY.js} +11 -4
  58. package/dist/{chunk-JITF6I7N.js.map → chunk-WJOHNCYY.js.map} +1 -1
  59. package/dist/{chunk-EBREIC3L.js → chunk-YQHOKMSV.js} +26 -8
  60. package/dist/chunk-YQHOKMSV.js.map +1 -0
  61. package/dist/{chunk-WHKKN3ZK.js → chunk-YW6Q6ERX.js} +10 -8
  62. package/dist/chunk-YW6Q6ERX.js.map +1 -0
  63. package/dist/{chunk-PH354ECN.js → chunk-Z43YWH4R.js} +13 -4
  64. package/dist/chunk-Z43YWH4R.js.map +1 -0
  65. package/dist/{chunk-5OQLFX47.js → chunk-Z6RPMRFH.js} +3 -3
  66. package/dist/{chunk-5OQLFX47.js.map → chunk-Z6RPMRFH.js.map} +1 -1
  67. package/dist/{chunk-TCWYBVIL.js → chunk-ZB5VMGKB.js} +10 -7
  68. package/dist/chunk-ZB5VMGKB.js.map +1 -0
  69. package/dist/colors.css +15 -10
  70. package/dist/components/accordion/index.js +1 -1
  71. package/dist/components/action-icon/index.js +3 -3
  72. package/dist/components/alert/index.js +3 -3
  73. package/dist/components/app-shell/index.js +4 -4
  74. package/dist/components/autocomplete/autocomplete.d.ts +8 -1
  75. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  76. package/dist/components/autocomplete/index.d.ts +1 -1
  77. package/dist/components/autocomplete/index.d.ts.map +1 -1
  78. package/dist/components/autocomplete/index.js +10 -7
  79. package/dist/components/autocomplete/index.js.map +1 -1
  80. package/dist/components/badge/index.js +1 -1
  81. package/dist/components/button/index.js +3 -3
  82. package/dist/components/button-multi-select/index.js +5 -5
  83. package/dist/components/button-select/index.js +5 -5
  84. package/dist/components/calendar/calendar-zone-sync.d.ts +41 -0
  85. package/dist/components/calendar/calendar-zone-sync.d.ts.map +1 -0
  86. package/dist/components/calendar/calendar.d.ts +6 -5
  87. package/dist/components/calendar/calendar.d.ts.map +1 -1
  88. package/dist/components/calendar/index.js +8 -5
  89. package/dist/components/chart/chart.d.ts +17 -10
  90. package/dist/components/chart/chart.d.ts.map +1 -1
  91. package/dist/components/chart/index.js +50 -7
  92. package/dist/components/chart/index.js.map +1 -1
  93. package/dist/components/chart/styles.css +100 -0
  94. package/dist/components/checkbox/index.js +4 -4
  95. package/dist/components/choice-card-group/index.d.ts.map +1 -1
  96. package/dist/components/choice-card-group/index.js +4 -3
  97. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  98. package/dist/components/circular-progress/index.js.map +1 -1
  99. package/dist/components/clipboard/clipboard.d.ts.map +1 -1
  100. package/dist/components/clipboard/copy.d.ts.map +1 -1
  101. package/dist/components/clipboard/index.js +5 -5
  102. package/dist/components/clipboard/index.js.map +1 -1
  103. package/dist/components/code-block/chrome.js +4 -4
  104. package/dist/components/code-block/index.js +5 -5
  105. package/dist/components/combobox/combobox.d.ts +20 -1
  106. package/dist/components/combobox/combobox.d.ts.map +1 -1
  107. package/dist/components/combobox/index.d.ts +1 -1
  108. package/dist/components/combobox/index.d.ts.map +1 -1
  109. package/dist/components/combobox/index.js +4 -4
  110. package/dist/components/combobox-list/combobox-list.d.ts +8 -1
  111. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  112. package/dist/components/combobox-list/index.d.ts +1 -1
  113. package/dist/components/combobox-list/index.d.ts.map +1 -1
  114. package/dist/components/combobox-list/index.js +5 -5
  115. package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
  116. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
  117. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
  118. package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +4 -1
  119. package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -1
  120. package/dist/components/data-table/data-table-filter/index.d.ts +5 -1
  121. package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
  122. package/dist/components/data-table/data-table-header-cell.d.ts +11 -15
  123. package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
  124. package/dist/components/data-table/data-table-meta.d.ts +2 -2
  125. package/dist/components/data-table/data-table-meta.d.ts.map +1 -1
  126. package/dist/components/data-table/data-table-pagination.d.ts +3 -0
  127. package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
  128. package/dist/components/data-table/data-table-stack.d.ts +5 -2
  129. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  130. package/dist/components/data-table/data-table-toolbar.d.ts +3 -1
  131. package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
  132. package/dist/components/data-table/data-table-translations.d.ts +68 -0
  133. package/dist/components/data-table/data-table-translations.d.ts.map +1 -0
  134. package/dist/components/data-table/data-table.d.ts +5 -8
  135. package/dist/components/data-table/data-table.d.ts.map +1 -1
  136. package/dist/components/data-table/index.d.ts +2 -1
  137. package/dist/components/data-table/index.d.ts.map +1 -1
  138. package/dist/components/data-table/index.js +162 -79
  139. package/dist/components/data-table/index.js.map +1 -1
  140. package/dist/components/date-picker/date-picker.d.ts +13 -9
  141. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  142. package/dist/components/date-picker/index.js +16 -15
  143. package/dist/components/date-picker/index.js.map +1 -1
  144. package/dist/components/drawer/drawer.d.ts +9 -1
  145. package/dist/components/drawer/drawer.d.ts.map +1 -1
  146. package/dist/components/drawer/index.d.ts +1 -1
  147. package/dist/components/drawer/index.d.ts.map +1 -1
  148. package/dist/components/drawer/index.js +4 -4
  149. package/dist/components/field/field.d.ts +9 -2
  150. package/dist/components/field/field.d.ts.map +1 -1
  151. package/dist/components/field/index.js +1 -1
  152. package/dist/components/file-upload/file-upload.d.ts +13 -2
  153. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  154. package/dist/components/file-upload/index.d.ts +1 -1
  155. package/dist/components/file-upload/index.d.ts.map +1 -1
  156. package/dist/components/file-upload/index.js +16 -7
  157. package/dist/components/file-upload/index.js.map +1 -1
  158. package/dist/components/hover-card/index.js +1 -1
  159. package/dist/components/input/index.js +2 -2
  160. package/dist/components/kbd/index.js +1 -1
  161. package/dist/components/menu/index.js +2 -2
  162. package/dist/components/modal/index.d.ts +1 -1
  163. package/dist/components/modal/index.d.ts.map +1 -1
  164. package/dist/components/modal/index.js +4 -4
  165. package/dist/components/modal/modal.d.ts +9 -1
  166. package/dist/components/modal/modal.d.ts.map +1 -1
  167. package/dist/components/multi-combobox-list/index.d.ts +1 -1
  168. package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
  169. package/dist/components/multi-combobox-list/index.js +7 -5
  170. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +8 -1
  171. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  172. package/dist/components/multi-select/index.d.ts +1 -1
  173. package/dist/components/multi-select/index.d.ts.map +1 -1
  174. package/dist/components/multi-select/index.js +20 -9
  175. package/dist/components/multi-select/index.js.map +1 -1
  176. package/dist/components/multi-select/multi-select.d.ts +11 -1
  177. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  178. package/dist/components/nav-link/index.d.ts +1 -1
  179. package/dist/components/nav-link/index.d.ts.map +1 -1
  180. package/dist/components/nav-link/index.js +2 -2
  181. package/dist/components/nav-link/nav-link.d.ts +12 -0
  182. package/dist/components/nav-link/nav-link.d.ts.map +1 -1
  183. package/dist/components/nav-link/navigation.d.ts +3 -1
  184. package/dist/components/nav-link/navigation.d.ts.map +1 -1
  185. package/dist/components/nav-link/tanstack.js +2 -2
  186. package/dist/components/notification/create-notifier.d.ts +12 -1
  187. package/dist/components/notification/create-notifier.d.ts.map +1 -1
  188. package/dist/components/notification/index.d.ts +2 -2
  189. package/dist/components/notification/index.d.ts.map +1 -1
  190. package/dist/components/notification/index.js +9 -6
  191. package/dist/components/notification/index.js.map +1 -1
  192. package/dist/components/notification/notification.d.ts +14 -1
  193. package/dist/components/notification/notification.d.ts.map +1 -1
  194. package/dist/components/number-input/index.d.ts +1 -1
  195. package/dist/components/number-input/index.d.ts.map +1 -1
  196. package/dist/components/number-input/index.js +4 -4
  197. package/dist/components/number-input/number-input.d.ts +20 -2
  198. package/dist/components/number-input/number-input.d.ts.map +1 -1
  199. package/dist/components/overlays/index.js +6 -6
  200. package/dist/components/password-input/index.d.ts +1 -1
  201. package/dist/components/password-input/index.d.ts.map +1 -1
  202. package/dist/components/password-input/index.js +68 -7
  203. package/dist/components/password-input/index.js.map +1 -1
  204. package/dist/components/password-input/password-input.d.ts +45 -6
  205. package/dist/components/password-input/password-input.d.ts.map +1 -1
  206. package/dist/components/pill/index.js +2 -2
  207. package/dist/components/pills-input/index.js +5 -5
  208. package/dist/components/pin-input/index.js +2 -2
  209. package/dist/components/popover/index.js +1 -1
  210. package/dist/components/popover/popover.d.ts +0 -10
  211. package/dist/components/popover/popover.d.ts.map +1 -1
  212. package/dist/components/progress/index.js.map +1 -1
  213. package/dist/components/progress/progress.d.ts.map +1 -1
  214. package/dist/components/radio-group/index.js +3 -3
  215. package/dist/components/rating/index.js +2 -2
  216. package/dist/components/rating/index.js.map +1 -1
  217. package/dist/components/rating/rating.d.ts.map +1 -1
  218. package/dist/components/schedule/index.js +60 -48
  219. package/dist/components/schedule/index.js.map +1 -1
  220. package/dist/components/schedule/now-cursor-line.d.ts +10 -5
  221. package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
  222. package/dist/components/schedule/schedule-dates.d.ts +11 -26
  223. package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
  224. package/dist/components/schedule/schedule-event-chip.d.ts +4 -1
  225. package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
  226. package/dist/components/schedule/schedule-event-details.d.ts +3 -2
  227. package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
  228. package/dist/components/schedule/schedule-geometry.d.ts +20 -21
  229. package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
  230. package/dist/components/schedule/schedule-grid-gesture.d.ts +5 -9
  231. package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
  232. package/dist/components/schedule/schedule-segments.d.ts +2 -3
  233. package/dist/components/schedule/schedule-segments.d.ts.map +1 -1
  234. package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
  235. package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
  236. package/dist/components/segment-group/index.js +4 -3
  237. package/dist/components/segment-group/segment-group.d.ts +3 -2
  238. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  239. package/dist/components/select/index.d.ts +1 -1
  240. package/dist/components/select/index.d.ts.map +1 -1
  241. package/dist/components/select/index.js +6 -4
  242. package/dist/components/select/select.d.ts +12 -2
  243. package/dist/components/select/select.d.ts.map +1 -1
  244. package/dist/components/slider/index.js +2 -2
  245. package/dist/components/spinner/index.js +1 -1
  246. package/dist/components/spinner/spinner.d.ts.map +1 -1
  247. package/dist/components/switch/index.js +2 -2
  248. package/dist/components/table/index.js +1 -1
  249. package/dist/components/table/table.d.ts.map +1 -1
  250. package/dist/components/tabs/index.js +4 -3
  251. package/dist/components/tabs/tabs.d.ts +3 -1
  252. package/dist/components/tabs/tabs.d.ts.map +1 -1
  253. package/dist/components/tags-input/index.d.ts +1 -1
  254. package/dist/components/tags-input/index.d.ts.map +1 -1
  255. package/dist/components/tags-input/index.js +9 -7
  256. package/dist/components/tags-input/index.js.map +1 -1
  257. package/dist/components/tags-input/tags-input.d.ts +9 -2
  258. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  259. package/dist/components/text-input/index.js +2 -2
  260. package/dist/components/textarea/index.js +2 -2
  261. package/dist/components/theme-icon/index.js +2 -2
  262. package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
  263. package/dist/components/time-input/index.js +24 -8
  264. package/dist/components/time-input/index.js.map +1 -1
  265. package/dist/components/time-input/time-input.d.ts.map +1 -1
  266. package/dist/components/time-input/time-row.d.ts +16 -3
  267. package/dist/components/time-input/time-row.d.ts.map +1 -1
  268. package/dist/components/timeline/index.js +11 -3
  269. package/dist/components/timeline/index.js.map +1 -1
  270. package/dist/components/timeline/timeline.d.ts.map +1 -1
  271. package/dist/components/tooltip/index.js +2 -2
  272. package/dist/components/tree-multi-select/index.d.ts +1 -1
  273. package/dist/components/tree-multi-select/index.d.ts.map +1 -1
  274. package/dist/components/tree-multi-select/index.js +62 -44
  275. package/dist/components/tree-multi-select/index.js.map +1 -1
  276. package/dist/components/tree-multi-select/tree-multi-select.d.ts +10 -1
  277. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  278. package/dist/components/tree-select/index.d.ts +1 -1
  279. package/dist/components/tree-select/index.d.ts.map +1 -1
  280. package/dist/components/tree-select/index.js +45 -15
  281. package/dist/components/tree-select/index.js.map +1 -1
  282. package/dist/components/tree-select/tree-select.d.ts +10 -1
  283. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  284. package/dist/index.js +3 -2
  285. package/dist/index.js.map +1 -1
  286. package/dist/lib/date-value.d.ts +14 -1
  287. package/dist/lib/date-value.d.ts.map +1 -1
  288. package/dist/lib/focus-styles.d.ts +13 -5
  289. package/dist/lib/focus-styles.d.ts.map +1 -1
  290. package/dist/theme.css +24 -2
  291. package/package.json +1 -1
  292. package/src/colors.css +15 -10
  293. package/src/components/autocomplete/autocomplete.test.tsx +32 -0
  294. package/src/components/autocomplete/autocomplete.tsx +17 -5
  295. package/src/components/autocomplete/index.ts +5 -1
  296. package/src/components/button/button.test.tsx +6 -0
  297. package/src/components/calendar/calendar-zone-sync.tsx +79 -0
  298. package/src/components/calendar/calendar.test.tsx +134 -14
  299. package/src/components/calendar/calendar.tsx +36 -22
  300. package/src/components/chart/chart.test.tsx +115 -8
  301. package/src/components/chart/chart.tsx +115 -25
  302. package/src/components/chart/styles.css +100 -0
  303. package/src/components/choice-card-group/index.ts +2 -0
  304. package/src/components/circular-progress/circular-progress.tsx +2 -0
  305. package/src/components/clipboard/clipboard.test.tsx +54 -22
  306. package/src/components/clipboard/clipboard.tsx +2 -0
  307. package/src/components/clipboard/copy.tsx +2 -0
  308. package/src/components/clipboard/index.ts +3 -3
  309. package/src/components/combobox/combobox.test.tsx +22 -0
  310. package/src/components/combobox/combobox.tsx +20 -0
  311. package/src/components/combobox/index.ts +1 -0
  312. package/src/components/combobox-list/combobox-list.test.tsx +19 -0
  313. package/src/components/combobox-list/combobox-list.tsx +16 -2
  314. package/src/components/combobox-list/index.ts +5 -1
  315. package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +5 -4
  316. package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +16 -2
  317. package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +9 -1
  318. package/src/components/data-table/data-table-filter/index.tsx +15 -1
  319. package/src/components/data-table/data-table-filter.test.tsx +33 -0
  320. package/src/components/data-table/data-table-header-cell.tsx +37 -22
  321. package/src/components/data-table/data-table-meta.ts +2 -2
  322. package/src/components/data-table/data-table-pagination.tsx +6 -0
  323. package/src/components/data-table/data-table-stack.tsx +26 -14
  324. package/src/components/data-table/data-table-toolbar.tsx +4 -1
  325. package/src/components/data-table/data-table-translations.ts +105 -0
  326. package/src/components/data-table/data-table.test.tsx +121 -0
  327. package/src/components/data-table/data-table.tsx +37 -17
  328. package/src/components/data-table/index.ts +9 -1
  329. package/src/components/date-picker/date-picker.test.tsx +197 -5
  330. package/src/components/date-picker/date-picker.tsx +42 -16
  331. package/src/components/drawer/drawer.tsx +14 -1
  332. package/src/components/drawer/index.ts +1 -0
  333. package/src/components/field/field.tsx +29 -3
  334. package/src/components/file-upload/file-upload.test.tsx +21 -0
  335. package/src/components/file-upload/file-upload.tsx +26 -3
  336. package/src/components/file-upload/index.ts +1 -1
  337. package/src/components/modal/index.ts +1 -0
  338. package/src/components/modal/modal-translations.test.tsx +27 -0
  339. package/src/components/modal/modal.tsx +14 -1
  340. package/src/components/multi-combobox-list/index.ts +5 -1
  341. package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +19 -0
  342. package/src/components/multi-combobox-list/multi-combobox-list.tsx +26 -4
  343. package/src/components/multi-select/index.ts +1 -1
  344. package/src/components/multi-select/multi-select.test.tsx +38 -0
  345. package/src/components/multi-select/multi-select.tsx +28 -4
  346. package/src/components/nav-link/index.ts +6 -1
  347. package/src/components/nav-link/nav-link.test.tsx +16 -0
  348. package/src/components/nav-link/nav-link.tsx +19 -1
  349. package/src/components/nav-link/navigation.test.tsx +18 -0
  350. package/src/components/nav-link/navigation.tsx +8 -4
  351. package/src/components/notification/create-notifier.tsx +20 -4
  352. package/src/components/notification/index.ts +7 -1
  353. package/src/components/notification/notification.test.tsx +49 -0
  354. package/src/components/notification/notification.tsx +39 -5
  355. package/src/components/number-input/index.ts +1 -1
  356. package/src/components/number-input/number-input.test.tsx +37 -0
  357. package/src/components/number-input/number-input.tsx +33 -4
  358. package/src/components/password-input/index.ts +5 -1
  359. package/src/components/password-input/password-input.test.tsx +201 -4
  360. package/src/components/password-input/password-input.tsx +162 -13
  361. package/src/components/popover/popover.tsx +0 -29
  362. package/src/components/progress/index.ts +3 -3
  363. package/src/components/progress/progress.tsx +2 -0
  364. package/src/components/rating/rating.tsx +2 -0
  365. package/src/components/schedule/now-cursor-line.test.tsx +56 -28
  366. package/src/components/schedule/now-cursor-line.tsx +30 -16
  367. package/src/components/schedule/schedule-agenda-view.test.tsx +1 -1
  368. package/src/components/schedule/schedule-dates.test.ts +19 -0
  369. package/src/components/schedule/schedule-dates.ts +16 -30
  370. package/src/components/schedule/schedule-details-popover.test.tsx +77 -6
  371. package/src/components/schedule/schedule-event-chip.tsx +17 -6
  372. package/src/components/schedule/schedule-event-details.test.tsx +38 -0
  373. package/src/components/schedule/schedule-event-details.tsx +7 -5
  374. package/src/components/schedule/schedule-geometry.test.ts +21 -18
  375. package/src/components/schedule/schedule-geometry.ts +37 -24
  376. package/src/components/schedule/schedule-grid-gesture.ts +5 -9
  377. package/src/components/schedule/schedule-segments.ts +2 -3
  378. package/src/components/schedule/schedule-timed-grid.tsx +43 -20
  379. package/src/components/schedule/schedule.test.tsx +34 -11
  380. package/src/components/schedule/use-event-resize.ts +6 -13
  381. package/src/components/segment-group/segment-group.test.tsx +23 -0
  382. package/src/components/segment-group/segment-group.tsx +13 -7
  383. package/src/components/select/index.ts +1 -1
  384. package/src/components/select/select.test.tsx +32 -0
  385. package/src/components/select/select.tsx +15 -1
  386. package/src/components/spinner/spinner.test.tsx +26 -0
  387. package/src/components/spinner/spinner.tsx +4 -1
  388. package/src/components/table/table.test.tsx +13 -0
  389. package/src/components/table/table.tsx +9 -5
  390. package/src/components/tabs/tabs.test.tsx +11 -0
  391. package/src/components/tabs/tabs.tsx +6 -4
  392. package/src/components/tags-input/index.ts +1 -1
  393. package/src/components/tags-input/tags-input.test.tsx +28 -0
  394. package/src/components/tags-input/tags-input.tsx +17 -1
  395. package/src/components/theme-icon/theme-icon.tsx +8 -3
  396. package/src/components/time-input/time-input.test.tsx +75 -0
  397. package/src/components/time-input/time-input.tsx +27 -3
  398. package/src/components/time-input/time-row.tsx +27 -3
  399. package/src/components/timeline/timeline.test.tsx +4 -1
  400. package/src/components/timeline/timeline.tsx +11 -3
  401. package/src/components/tree-multi-select/index.ts +5 -1
  402. package/src/components/tree-multi-select/tree-multi-select.test.tsx +72 -0
  403. package/src/components/tree-multi-select/tree-multi-select.tsx +156 -115
  404. package/src/components/tree-select/index.ts +1 -1
  405. package/src/components/tree-select/tree-select.test.tsx +69 -0
  406. package/src/components/tree-select/tree-select.tsx +128 -74
  407. package/src/lib/date-value.test.ts +19 -0
  408. package/src/lib/date-value.ts +21 -5
  409. package/src/lib/focus-styles.test.ts +21 -2
  410. package/src/lib/focus-styles.ts +24 -5
  411. package/src/theme.css +24 -2
  412. package/src/use-client-barrels.test.ts +80 -0
  413. package/dist/chunk-5JHDSVEZ.js.map +0 -1
  414. package/dist/chunk-6GDMSENK.js.map +0 -1
  415. package/dist/chunk-6OLTJYSX.js.map +0 -1
  416. package/dist/chunk-7NZSTCJO.js.map +0 -1
  417. package/dist/chunk-B2LCHXUB.js.map +0 -1
  418. package/dist/chunk-B2YJKRNQ.js.map +0 -1
  419. package/dist/chunk-EBREIC3L.js.map +0 -1
  420. package/dist/chunk-FHG54IT5.js.map +0 -1
  421. package/dist/chunk-FZIHZT5R.js.map +0 -1
  422. package/dist/chunk-HT5JAHR3.js.map +0 -1
  423. package/dist/chunk-KHMFNH3X.js.map +0 -1
  424. package/dist/chunk-NSDM3FEB.js.map +0 -1
  425. package/dist/chunk-O23Y5ML4.js.map +0 -1
  426. package/dist/chunk-PH354ECN.js.map +0 -1
  427. package/dist/chunk-RQL7FVCS.js.map +0 -1
  428. package/dist/chunk-TCWYBVIL.js.map +0 -1
  429. package/dist/chunk-UHNRAI6V.js.map +0 -1
  430. package/dist/chunk-WHKKN3ZK.js.map +0 -1
  431. package/dist/chunk-WQN64ZHG.js.map +0 -1
  432. package/dist/chunk-YBJB7FGE.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { props } from './chunk-WYCMIIRR.js';
2
- import { focusStyles } from './chunk-B2LCHXUB.js';
2
+ import { focusStyles } from './chunk-INJUILCN.js';
3
3
  import { cn } from './chunk-QP4I37PA.js';
4
4
  import { ark } from '@ark-ui/react';
5
5
  import { cva } from 'class-variance-authority';
@@ -35,10 +35,15 @@ var themeIconVariants = cva(
35
35
  subtle: "bg-transparent text-(--c-text) border-transparent",
36
36
  // Palette-independent neutral surface. Unlike ActionIcon's
37
37
  // high-contrast inverted `default` (a black/white button look),
38
- // this stays a muted card in both themes.
38
+ // this stays a muted card in both themes. It sits on the kit's
39
+ // translucent surface recipe (the quiet `bg-black/3 dark:bg-white/4`
40
+ // fill plus the hairline `border-brand-900/20 dark:border-white/15`,
41
+ // as `Kbd` and `Card` do) rather than an opaque gray step, so the tile
42
+ // reads on whatever surface hosts it. Light mode darkens because a
43
+ // bare `bg-white/4` vanishes on a near-white page.
39
44
  default: [
40
- "bg-gray-light-100/50 text-gray-light-700 border-gray-light-300/50",
41
- "dark:bg-gray-dark-800/50 dark:text-gray-dark-300 dark:border-gray-dark-700/50"
45
+ "bg-black/3 text-gray-light-700 border-brand-900/20",
46
+ "dark:bg-white/4 dark:text-gray-dark-300 dark:border-white/15"
42
47
  ]
43
48
  },
44
49
  size: {
@@ -86,5 +91,5 @@ var ThemeIcon = ({
86
91
  );
87
92
 
88
93
  export { ThemeIcon };
89
- //# sourceMappingURL=chunk-RQL7FVCS.js.map
90
- //# sourceMappingURL=chunk-RQL7FVCS.js.map
94
+ //# sourceMappingURL=chunk-BTFBBNRW.js.map
95
+ //# sourceMappingURL=chunk-BTFBBNRW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/theme-icon/theme-icon.tsx"],"names":[],"mappings":";;;;;;;AAuBA,IAAM,iBAAA,GAAoB,GAAA;AAAA,EACxB;AAAA,IACE,yCAAA;AAAA,IACA,oCAAA;AAAA,IACA,mBAAA;AAAA,IACA,8CAAA;AAAA;AAAA;AAAA,IAGA,WAAA;AAAY,GACd;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAYP,MAAA,EACE,6FAAA;AAAA,QACF,KAAA,EAAO,kDAAA;AAAA,QACP,OAAA,EAAS,mDAAA;AAAA,QACT,MAAA,EAAQ,mDAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASR,OAAA,EAAS;AAAA,UACP,oDAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,oBAAA;AAAA,QACJ,EAAA,EAAI,sBAAA;AAAA,QACJ,EAAA,EAAI,oBAAA;AAAA,QACJ,EAAA,EAAI,qBAAA;AAAA,QACJ,EAAA,EAAI;AAAA,OACN;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,EAAA,EAAI,YAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM,IAAA;AAAA,MACN,MAAA,EAAQ;AAAA;AACV;AAEJ,CAAA;AAaO,IAAM,YAAY,CAAC;AAAA,EACxB,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,GAAA;AAAA,EAAC,GAAA,CAAI,GAAA;AAAA,EAAJ;AAAA,IACC,OAAA;AAAA,IACA,YAAA,EAAY,KAAA;AAAA,IACZ,gBAAc,OAAA,IAAW,SAAA;AAAA,IACzB,SAAA,EAAW,GAAG,iBAAA,CAAkB,EAAE,SAAS,IAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,SAAS,CAAA;AAAA,IACpE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN","file":"chunk-BTFBBNRW.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * ThemeIcon — square, non-interactive icon-display box. Visually related to\n * `ActionIcon` (same size/radius scales) but deliberately **not** its\n * (variant × color) look: every variant here is a muted, low-saturation\n * surface — just enough contrast to read as \"raised above the page,\" never\n * a vivid CTA-style fill. There's no hover state and no cursor affordance,\n * because this is a display, not a control.\n *\n * `asChild` renders the single child as the root, so it composes on top of\n * an interactive element (e.g. wrap a `Link`) when the icon itself needs to\n * be clickable. The kit's focus ring (`focusStyles`) rides along for that\n * case and stays inert on the default `<div>` — but reach for `ActionIcon`\n * when an interactive icon is the common case, since it also supplies the\n * `aria-label`, disabled and loading handling a real trigger needs.\n */\nconst themeIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"aspect-square shrink-0 select-none\",\n \"rounded-lg border\",\n \"[&_svg]:shrink-0 [&_svg]:pointer-events-none\",\n // Inert on the default non-focusable <div>; applies once `asChild`\n // renders ThemeIcon onto a real <a>/<button>. See `focusStyles`.\n focusStyles(),\n ],\n {\n variants: {\n variant: {\n // A translucent wash of `--c-solid` (not the opaque token) so the\n // fill blends with whatever surface it sits on instead of reading\n // as a painted CTA block. The border mixes in black on top of that\n // same var — a fixed darkening, not another opacity step of it —\n // so it reads as a recessed edge in both themes; some colors (neutral\n // in particular) have a dark-mode `--c-solid` that's lighter than\n // its own soft/text steps, which would flip a same-var-opacity\n // border the wrong way. This is the ThemeIcon-specific reading of\n // \"filled\": raised, not loud. Button/Badge/ActionIcon's `filled`\n // (opaque bg-(--c-solid)) would look like a button here —\n // intentionally not reused.\n filled:\n \"bg-(--c-solid)/15 text-(--c-text) border-[color-mix(in_oklab,var(--c-solid)_35%,black_65%)]\",\n light: \"bg-(--c-soft) text-(--c-text) border-transparent\",\n outline: \"bg-transparent text-(--c-text) border-(--c-solid)\",\n subtle: \"bg-transparent text-(--c-text) border-transparent\",\n // Palette-independent neutral surface. Unlike ActionIcon's\n // high-contrast inverted `default` (a black/white button look),\n // this stays a muted card in both themes. It sits on the kit's\n // translucent surface recipe (the quiet `bg-black/3 dark:bg-white/4`\n // fill plus the hairline `border-brand-900/20 dark:border-white/15`,\n // as `Kbd` and `Card` do) rather than an opaque gray step, so the tile\n // reads on whatever surface hosts it. Light mode darkens because a\n // bare `bg-white/4` vanishes on a near-white page.\n default: [\n \"bg-black/3 text-gray-light-700 border-brand-900/20\",\n \"dark:bg-white/4 dark:text-gray-dark-300 dark:border-white/15\",\n ],\n },\n size: {\n xs: \"h-7 [&_svg]:size-5\",\n sm: \"h-8 [&_svg]:size-5.5\",\n md: \"h-9 [&_svg]:size-6\",\n lg: \"h-10 [&_svg]:size-7\",\n xl: \"h-12 [&_svg]:size-8\",\n },\n radius: {\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"md\",\n radius: \"md\",\n },\n },\n)\n\nexport type ThemeIconVariant = NonNullable<VariantProps<typeof themeIconVariants>[\"variant\"]>\nexport type ThemeIconSize = NonNullable<VariantProps<typeof themeIconVariants>[\"size\"]>\nexport type ThemeIconRadius = NonNullable<VariantProps<typeof themeIconVariants>[\"radius\"]>\n\nexport type ThemeIconProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof themeIconVariants> &\n WithTestId & {\n /** Accent palette. Re-exported as `Color` from `@42/ui-react`. */\n color?: Color\n }\n\nexport const ThemeIcon = ({\n className,\n variant,\n size,\n radius,\n color,\n asChild,\n testId,\n ...rest\n}: ThemeIconProps) => (\n <ark.div\n asChild={asChild}\n data-color={color}\n data-variant={variant ?? \"default\"}\n className={cn(themeIconVariants({ variant, size, radius }), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n"]}
@@ -1,5 +1,5 @@
1
- import { controlIndicator } from './chunk-NF5JM2YO.js';
2
- import { fieldLabel, FieldShell, fieldRoot } from './chunk-FHG54IT5.js';
1
+ import { controlIndicator } from './chunk-FOMR74VE.js';
2
+ import { fieldLabel, FieldShell, fieldRoot } from './chunk-TBTSEPGP.js';
3
3
  import { CheckIcon } from './chunk-IG7FBZVM.js';
4
4
  import { props } from './chunk-WYCMIIRR.js';
5
5
  import { cn } from './chunk-QP4I37PA.js';
@@ -89,5 +89,5 @@ var Checkbox = ({
89
89
  };
90
90
 
91
91
  export { Checkbox };
92
- //# sourceMappingURL=chunk-OWG4BCQR.js.map
93
- //# sourceMappingURL=chunk-OWG4BCQR.js.map
92
+ //# sourceMappingURL=chunk-CYWMES5P.js.map
93
+ //# sourceMappingURL=chunk-CYWMES5P.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/checkbox/checkbox.tsx"],"names":["Ark"],"mappings":";;;;;;;;;AAmFO,IAAM,WAAW,CAAC;AAAA,EACvB,OAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAAqB;AAGnB,EAAA,MAAM,SAAA,GAAY,WAAW,KAAA,IAAS,IAAA;AAKtC,EAAA,MAAM,QAAA,GAAW,KAAA,IAAS,IAAA,KAAS,WAAA,IAAe,QAAQ,KAAA,IAAS,IAAA,CAAA;AAEnE,EAAA,MAAM,SAAA,GAAY,SAAS,IAAA,oBACzB,IAAA;AAAA,IAACA,UAAA,CAAI,KAAA;AAAA,IAAJ;AAAA,MACC,SAAA,EAAW,EAAA,C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CAAA;AAAA,QAEC,QAAA,mBACC,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,SAAA,CAAU,EAAE,IAAA,EAAM,CAAA,EAAG,UAAA,EAAY,KAAK,CAAA,EACtD,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,0BACD,GAAA,CAAC,UAAA,EAAA,EAAW,WAAA,EAA0B,KAAA,EAAc,IAAA,EAClD,QAAA,kBAAA,GAAA,CAACA,UAAA,CAAI,WAAA,EAAJ,EAAgB,GAAA,EAAU,MAAA,EAAgB,CAAA,EAC7C;AAAA,SAAA,EACF,oBAEA,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,0BACD,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,WAAA;AAAA,cACA,KAAA;AAAA,cACA,IAAA;AAAA,cACA,WAAW,UAAA,EAAY,KAAA;AAAA,cAEvB,QAAA,kBAAA,GAAA,CAACA,UAAA,CAAI,WAAA,EAAJ,EAAgB,KAAU,MAAA,EAAgB;AAAA;AAAA;AAC7C,SAAA,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-OWG4BCQR.js","sourcesContent":["\"use client\"\n\nimport { Checkbox as Ark } from \"@ark-ui/react/checkbox\"\nimport { Minus } from \"lucide-react\"\nimport type { FocusEvent, ReactNode, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { FieldShell, fieldLabel, fieldRoot } from \"../field/field\"\nimport { CheckIcon } from \"../popover/icons\"\nimport { type ControlIndicatorVariant, controlIndicator } from \"./control\"\n\n/**\n * Checkbox — a single boolean (or tri-state) control on Ark UI's Checkbox\n * machine. The label sits inline beside the box, rendered through the\n * checkbox's own `Ark.Label` part (not `Field`'s) so it stays correctly\n * wired to the hidden input's `aria-labelledby` and — critically — carries no\n * layout footprint when it's visually hidden (e.g. `classNames.label:\n * \"sr-only\"`): an absolutely-positioned flex child isn't a flex item at all,\n * so it can't pick up the root's `gap-2`. `description` / `error` live below\n * it via the shared `Field` scaffold, so a `Checkbox` is accessible and\n * complete on its own. Implements the kit's `FormControlProps` contract: the\n * `ref` and `onBlur` land on the submittable hidden `<input>`, and `name`\n * wires it into native form submission.\n *\n * - The checked state is `boolean | \"indeterminate\"`; `onCheckedChange`\n * hands you that next value directly (the indeterminate state never sets\n * itself — drive it from the parent, e.g. a \"select all\" header).\n * - `invalid` is OR'd with `error != null`, matching the rest of the family,\n * so a form library can flip the red state independently of the message.\n *\n * Two `variant`s decide the checked fill: `default` is a neutral, monochrome\n * box (palette-independent), while `filled` tints the checked fill with the\n * active palette via `data-color` + the `--c-solid` slot var. The box is\n * palette-independent at rest, and the focus ring is always the brand ring.\n */\n\nexport type CheckboxProps = WithTestId & {\n /** Controlled checked state. `\"indeterminate\"` renders the partial mark. */\n checked?: boolean | \"indeterminate\"\n /** Uncontrolled initial checked state. */\n defaultChecked?: boolean | \"indeterminate\"\n /** Fires with the next checked state (a value, not a DOM event). */\n onCheckedChange?: (checked: boolean | \"indeterminate\") => void\n /** Inline label beside the box. */\n label?: ReactNode\n /** Helper text above the control. */\n description?: ReactNode\n /** Error message below the control; its presence sets the invalid state. */\n error?: ReactNode\n /** Required flag (and, with a label, the red asterisk). */\n required?: boolean\n /** Red invalid state, OR'd with `error != null`. */\n invalid?: boolean\n /** Dims and blocks interaction. */\n disabled?: boolean\n /** Keeps full contrast but blocks edits. */\n readOnly?: boolean\n size?: Size\n /** Checked-fill treatment: `default` (monochrome) or `filled` (palette-colored). */\n variant?: ControlIndicatorVariant\n color?: Color\n /** Field name for native form submission. */\n name?: string\n /** Submitted value when checked (defaults to `\"on\"`). */\n value?: string\n /** Explicit id for label association. */\n id?: string\n /** Lands on the hidden `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the hidden `<input>`; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n className?: string\n classNames?: {\n root?: string\n control?: string\n label?: string\n field?: string\n }\n}\n\nexport const Checkbox = ({\n checked,\n defaultChecked,\n onCheckedChange,\n label,\n description,\n error,\n required,\n invalid,\n disabled,\n readOnly,\n size = \"md\",\n variant,\n color,\n name,\n value,\n id,\n ref,\n onBlur,\n className,\n classNames,\n testId,\n}: CheckboxProps) => {\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n // A visible label above description/error needs the two grouped into one\n // flex-col item, or they'd land side by side in the root's row instead of\n // stacked. Label-only (incl. sr-only) never needs this extra wrapper.\n const hasStack = label != null && (description != null || error != null)\n\n const labelNode = label != null && (\n <Ark.Label\n className={cn(fieldLabel({ size }), !hasStack && \"min-w-0 flex-1\", classNames?.label)}\n >\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ms-0.5 text-red-500\">\n *\n </span>\n )}\n </Ark.Label>\n )\n\n return (\n <Ark.Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange ? (d) => onCheckedChange(d.checked) : undefined}\n invalid={isInvalid}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n value={value}\n id={id}\n data-color={color}\n {...props({ \"data-testid\": testId })}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\n \"relative inline-flex items-center gap-2 select-none\",\n className,\n classNames?.root,\n )}\n >\n <Ark.Control className={cn(controlIndicator({ size, variant }), classNames?.control)}>\n <Ark.Indicator>\n <CheckIcon />\n </Ark.Indicator>\n <Ark.Indicator indeterminate>\n <Minus />\n </Ark.Indicator>\n </Ark.Control>\n\n {hasStack ? (\n <div className={cn(fieldRoot({ size }), classNames?.field)}>\n {labelNode}\n <FieldShell description={description} error={error} size={size}>\n <Ark.HiddenInput ref={ref} onBlur={onBlur} />\n </FieldShell>\n </div>\n ) : (\n <>\n {labelNode}\n <FieldShell\n description={description}\n error={error}\n size={size}\n className={classNames?.field}\n >\n <Ark.HiddenInput ref={ref} onBlur={onBlur} />\n </FieldShell>\n </>\n )}\n </Ark.Root>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/components/checkbox/checkbox.tsx"],"names":["Ark"],"mappings":";;;;;;;;;AAmFO,IAAM,WAAW,CAAC;AAAA,EACvB,OAAA;AAAA,EACA,cAAA;AAAA,EACA,eAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,KAAqB;AAGnB,EAAA,MAAM,SAAA,GAAY,WAAW,KAAA,IAAS,IAAA;AAKtC,EAAA,MAAM,QAAA,GAAW,KAAA,IAAS,IAAA,KAAS,WAAA,IAAe,QAAQ,KAAA,IAAS,IAAA,CAAA;AAEnE,EAAA,MAAM,SAAA,GAAY,SAAS,IAAA,oBACzB,IAAA;AAAA,IAACA,UAAA,CAAI,KAAA;AAAA,IAAJ;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,UAAA,CAAW,EAAE,IAAA,EAAM,CAAA,EAAG,CAAC,QAAA,IAAY,gBAAA,EAAkB,UAAA,EAAY,KAAK,CAAA;AAAA,MAEnF,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,4BACC,GAAA,CAAC,MAAA,EAAA,EAAK,eAAY,MAAA,EAAO,SAAA,EAAU,uBAAsB,QAAA,EAAA,GAAA,EAEzD;AAAA;AAAA;AAAA,GAEJ;AAGF,EAAA,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A,CAAI,WAAA,EAAJ,EAAgB,GAAA,EAAU,MAAA,EAAgB,CAAA,EAC7C;AAAA,SAAA,EACF,oBAEA,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,UAAA,SAAA;AAAA,0BACD,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,WAAA;AAAA,cACA,KAAA;AAAA,cACA,IAAA;AAAA,cACA,WAAW,UAAA,EAAY,KAAA;AAAA,cAEvB,QAAA,kBAAA,GAAA,CAACA,UAAA,CAAI,WAAA,EAAJ,EAAgB,KAAU,MAAA,EAAgB;AAAA;AAAA;AAC7C,SAAA,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-CYWMES5P.js","sourcesContent":["\"use client\"\n\nimport { Checkbox as Ark } from \"@ark-ui/react/checkbox\"\nimport { Minus } from \"lucide-react\"\nimport type { FocusEvent, ReactNode, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { FieldShell, fieldLabel, fieldRoot } from \"../field/field\"\nimport { CheckIcon } from \"../popover/icons\"\nimport { type ControlIndicatorVariant, controlIndicator } from \"./control\"\n\n/**\n * Checkbox — a single boolean (or tri-state) control on Ark UI's Checkbox\n * machine. The label sits inline beside the box, rendered through the\n * checkbox's own `Ark.Label` part (not `Field`'s) so it stays correctly\n * wired to the hidden input's `aria-labelledby` and — critically — carries no\n * layout footprint when it's visually hidden (e.g. `classNames.label:\n * \"sr-only\"`): an absolutely-positioned flex child isn't a flex item at all,\n * so it can't pick up the root's `gap-2`. `description` / `error` live below\n * it via the shared `Field` scaffold, so a `Checkbox` is accessible and\n * complete on its own. Implements the kit's `FormControlProps` contract: the\n * `ref` and `onBlur` land on the submittable hidden `<input>`, and `name`\n * wires it into native form submission.\n *\n * - The checked state is `boolean | \"indeterminate\"`; `onCheckedChange`\n * hands you that next value directly (the indeterminate state never sets\n * itself — drive it from the parent, e.g. a \"select all\" header).\n * - `invalid` is OR'd with `error != null`, matching the rest of the family,\n * so a form library can flip the red state independently of the message.\n *\n * Two `variant`s decide the checked fill: `default` is a neutral, monochrome\n * box (palette-independent), while `filled` tints the checked fill with the\n * active palette via `data-color` + the `--c-solid` slot var. The box is\n * palette-independent at rest, and the focus ring is always the brand ring.\n */\n\nexport type CheckboxProps = WithTestId & {\n /** Controlled checked state. `\"indeterminate\"` renders the partial mark. */\n checked?: boolean | \"indeterminate\"\n /** Uncontrolled initial checked state. */\n defaultChecked?: boolean | \"indeterminate\"\n /** Fires with the next checked state (a value, not a DOM event). */\n onCheckedChange?: (checked: boolean | \"indeterminate\") => void\n /** Inline label beside the box. */\n label?: ReactNode\n /** Helper text above the control. */\n description?: ReactNode\n /** Error message below the control; its presence sets the invalid state. */\n error?: ReactNode\n /** Required flag (and, with a label, the red asterisk). */\n required?: boolean\n /** Red invalid state, OR'd with `error != null`. */\n invalid?: boolean\n /** Dims and blocks interaction. */\n disabled?: boolean\n /** Keeps full contrast but blocks edits. */\n readOnly?: boolean\n size?: Size\n /** Checked-fill treatment: `default` (monochrome) or `filled` (palette-colored). */\n variant?: ControlIndicatorVariant\n color?: Color\n /** Field name for native form submission. */\n name?: string\n /** Submitted value when checked (defaults to `\"on\"`). */\n value?: string\n /** Explicit id for label association. */\n id?: string\n /** Lands on the hidden `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the hidden `<input>`; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n className?: string\n classNames?: {\n root?: string\n control?: string\n label?: string\n field?: string\n }\n}\n\nexport const Checkbox = ({\n checked,\n defaultChecked,\n onCheckedChange,\n label,\n description,\n error,\n required,\n invalid,\n disabled,\n readOnly,\n size = \"md\",\n variant,\n color,\n name,\n value,\n id,\n ref,\n onBlur,\n className,\n classNames,\n testId,\n}: CheckboxProps) => {\n // Red state is driven independently of the `Field` error slot so a form\n // library can flip it from `fieldState.invalid` (see FormControlProps).\n const isInvalid = invalid || error != null\n\n // A visible label above description/error needs the two grouped into one\n // flex-col item, or they'd land side by side in the root's row instead of\n // stacked. Label-only (incl. sr-only) never needs this extra wrapper.\n const hasStack = label != null && (description != null || error != null)\n\n const labelNode = label != null && (\n <Ark.Label\n className={cn(fieldLabel({ size }), !hasStack && \"min-w-0 flex-1\", classNames?.label)}\n >\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ms-0.5 text-red-500\">\n *\n </span>\n )}\n </Ark.Label>\n )\n\n return (\n <Ark.Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange ? (d) => onCheckedChange(d.checked) : undefined}\n invalid={isInvalid}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n value={value}\n id={id}\n data-color={color}\n {...props({ \"data-testid\": testId })}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\n \"relative inline-flex items-center gap-2 select-none\",\n className,\n classNames?.root,\n )}\n >\n <Ark.Control className={cn(controlIndicator({ size, variant }), classNames?.control)}>\n <Ark.Indicator>\n <CheckIcon />\n </Ark.Indicator>\n <Ark.Indicator indeterminate>\n <Minus />\n </Ark.Indicator>\n </Ark.Control>\n\n {hasStack ? (\n <div className={cn(fieldRoot({ size }), classNames?.field)}>\n {labelNode}\n <FieldShell description={description} error={error} size={size}>\n <Ark.HiddenInput ref={ref} onBlur={onBlur} />\n </FieldShell>\n </div>\n ) : (\n <>\n {labelNode}\n <FieldShell\n description={description}\n error={error}\n size={size}\n className={classNames?.field}\n >\n <Ark.HiddenInput ref={ref} onBlur={onBlur} />\n </FieldShell>\n </>\n )}\n </Ark.Root>\n )\n}\n"]}
@@ -17,7 +17,7 @@ var tableVariants = cva(
17
17
  "[&_tbody_td]:border-brand-900/20 dark:[&_tbody_td]:border-white/15",
18
18
  // Cells
19
19
  "[&_td]:align-middle",
20
- "[&_th]:text-left [&_th]:align-middle [&_th]:font-medium [&_th]:text-gray-light-800 dark:[&_th]:text-gray-dark-200",
20
+ "[&_th]:text-start [&_th]:align-middle [&_th]:font-medium [&_th]:text-gray-light-800 dark:[&_th]:text-gray-dark-200",
21
21
  // Header — subtle fill + a bottom separator that survives sticky. Same
22
22
  // brand-tinted fill Popover/Modal/Drawer use for their own surface, at
23
23
  // the same /90 light /85 dark opacity recipe.
@@ -101,7 +101,7 @@ var TableContent = ({ className, classNames, testId, ...rest }) => /* @__PURE__
101
101
  ...props({ "data-testid": testId }),
102
102
  ...rest,
103
103
  className: cn(
104
- "w-full border-separate border-spacing-0 text-left text-gray-light-900 dark:text-gray-dark-25",
104
+ "w-full border-separate border-spacing-0 text-start text-gray-light-900 dark:text-gray-dark-25",
105
105
  classNames?.table
106
106
  )
107
107
  }
@@ -110,14 +110,14 @@ var TableContent = ({ className, classNames, testId, ...rest }) => /* @__PURE__
110
110
  "div",
111
111
  {
112
112
  "aria-hidden": "true",
113
- className: "table-fade-start pointer-events-none absolute inset-y-0 left-0 w-6"
113
+ className: "table-fade-start pointer-events-none absolute inset-y-0 start-0 w-6 rtl:-scale-x-100"
114
114
  }
115
115
  ),
116
116
  /* @__PURE__ */ jsx(
117
117
  "div",
118
118
  {
119
119
  "aria-hidden": "true",
120
- className: "table-fade-end pointer-events-none absolute inset-y-0 right-0 w-6"
120
+ className: "table-fade-end pointer-events-none absolute inset-y-0 end-0 w-6 rtl:-scale-x-100"
121
121
  }
122
122
  )
123
123
  ] });
@@ -183,5 +183,5 @@ var Table = Object.assign(TableRoot, {
183
183
  });
184
184
 
185
185
  export { Table };
186
- //# sourceMappingURL=chunk-YBJB7FGE.js.map
187
- //# sourceMappingURL=chunk-YBJB7FGE.js.map
186
+ //# sourceMappingURL=chunk-CZEKZ5HR.js.map
187
+ //# sourceMappingURL=chunk-CZEKZ5HR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/table/table.tsx"],"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EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAKF,IAAM,eAAA,GAAkB,CAAC,EAAE,SAAA,EAAW,QAAQ,KAAA,EAAO,MAAA,EAAQ,GAAG,IAAA,EAAK,qBACnE,GAAA;AAAA,EAAC,GAAA,CAAI,EAAA;AAAA,EAAJ;AAAA,IACC,KAAA;AAAA,IACC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAKF,IAAM,YAAY,CAAC,EAAE,WAAW,MAAA,EAAQ,GAAG,MAAK,qBAC9C,GAAA;AAAA,EAAC,GAAA,CAAI,EAAA;AAAA,EAAJ;AAAA,IACE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG,IAAA;AAAA,IACJ,SAAA,EAAW,SAAA,GAAY,EAAA,CAAG,SAAS,CAAA,GAAI;AAAA;AACzC,CAAA;AAGK,IAAM,KAAA,GAAQ,MAAA,CAAO,MAAA,CAAO,SAAA,EAAW;AAAA,EAC5C,OAAA,EAAS,YAAA;AAAA,EACT,KAAA,EAAO,UAAA;AAAA,EACP,OAAA,EAAS,YAAA;AAAA,EACT,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,IAAA,EAAM,SAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,UAAA,EAAY,eAAA;AAAA,EACZ,IAAA,EAAM;AACR,CAAC","file":"chunk-CZEKZ5HR.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * The outermost element: a bordered, rounded surface that `overflow-hidden`\n * clips. Clipping is what keeps the rounded corners intact once the inner\n * scroll region shows a scrollbar (a scrollbar on the *rounded* element would\n * otherwise square off its corners). `flex flex-col` lets an optional\n * `Table.Toolbar` stack above the scroll region.\n *\n * `contain-layout` stops a bug that only shows up when this sits inside an\n * ancestor chain with no *definite* height (e.g. a CSS Grid track sized off\n * `min-height`, not `height` — common when a page fills the viewport via a\n * grid). Without it, a browser can size that indefinite ancestor off this\n * box's unclipped descendants' natural size — the *actual* content behind\n * an internal `overflow-auto`/`max-h-*` scroll region, not its rendered,\n * already-clipped size — inflating the whole page's scroll height in\n * proportion to row count despite this box's own height staying correct.\n * `contain: layout` declares this subtree's size as fully self-contained, so\n * an indefinite ancestor sizes off its real (bounded) box instead. Doesn't\n * affect `stickyHeader`/`stickyFooter` (governed by the nearest *scrolling*\n * ancestor, not containing-block/layout-containment rules) or the absolute-\n * positioned `.table-fade-*` overlays (already resolve against\n * `.table-scroll-frame`'s own `position: relative` in theme.css).\n */\nconst tableContainer = cn(\n \"flex w-full flex-col overflow-hidden contain-layout\",\n // Brand-derived border, matching InputBase/Popover/Modal/Drawer's shell\n // (border-brand-900/20 dark:border-white/15) rather than a neutral gray.\n \"rounded-sm border border-brand-900/20 dark:border-white/15\",\n)\n\n/**\n * All table styling rides on the container as descendant-selector classes, so\n * the part components stay dumb and `size` / `striped` / sticky can live on\n * `<Table>` (the root) without React context — keeping the whole thing a pure\n * Server Component. Every variant value is a static class string so Tailwind\n * v4's scanner keeps it.\n *\n * The `<table>` uses `border-collapse: separate` (see `TableContent`): collapsed\n * borders detach from sticky `<thead>` / `<tfoot>` while scrolling, so the\n * header/footer separators are cell borders (`thead th` bottom, `tfoot td/th`\n * top) that stay put when pinned.\n */\nconst tableVariants = cva(\n [\n // Row separators — on cells, since separate-mode ignores <tr> borders.\n \"[&_tbody_tr:not(:last-child)_td]:border-b\",\n \"[&_tbody_td]:border-brand-900/20 dark:[&_tbody_td]:border-white/15\",\n // Cells\n \"[&_td]:align-middle\",\n \"[&_th]:text-start [&_th]:align-middle [&_th]:font-medium [&_th]:text-gray-light-800 dark:[&_th]:text-gray-dark-200\",\n // Header — subtle fill + a bottom separator that survives sticky. Same\n // brand-tinted fill Popover/Modal/Drawer use for their own surface, at\n // the same /90 light /85 dark opacity recipe.\n \"[&_thead]:bg-brand-50/90 dark:[&_thead]:bg-brand-950/85\",\n \"[&_thead_th]:border-b [&_thead_th]:border-brand-900/20 dark:[&_thead_th]:border-white/15\",\n // Footer — subtle fill + a top separator that survives sticky.\n \"[&_tfoot]:bg-brand-50/90 dark:[&_tfoot]:bg-brand-950/85 [&_tfoot]:font-medium\",\n \"[&_tfoot_th]:border-t [&_tfoot_td]:border-t\",\n \"[&_tfoot_th]:border-brand-900/20 [&_tfoot_td]:border-brand-900/20 dark:[&_tfoot_th]:border-white/15 dark:[&_tfoot_td]:border-white/15\",\n // Excludes a `data-placeholder` row (an empty/error/loading state, e.g.\n // `DataTable`'s) — it has no row to hover, so it shouldn't tint like one.\n // Black/white wash, same convention as Popover/Menu/TreeSelect's own row\n // highlight — background-dependent instead of a fixed per-theme gray.\n \"[&_tbody_tr:not([data-placeholder]):hover]:bg-black/5! dark:[&_tbody_tr:not([data-placeholder]):hover]:bg-white/8! [&_tbody_tr]:transition-colors\",\n ],\n {\n variants: {\n // Cell padding + text scale, keyed to the kit's canonical `Size` scale.\n size: {\n xs: \"text-xs [&_th]:px-2 [&_td]:px-2 [&_th]:py-1 [&_td]:py-1\",\n sm: \"text-sm [&_th]:px-2.5 [&_td]:px-2.5 [&_th]:py-1.5 [&_td]:py-1.5\",\n md: \"text-sm [&_th]:px-3 [&_td]:px-3 [&_th]:py-2.5 [&_td]:py-2.5\",\n lg: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-3 [&_td]:py-3\",\n xl: \"text-base [&_th]:px-4 [&_td]:px-4 [&_th]:py-4 [&_td]:py-4\",\n },\n striped: {\n true: \"[&_tbody_tr:nth-child(even)]:bg-black/3 dark:[&_tbody_tr:nth-child(even)]:bg-white/4\",\n false: \"\",\n },\n },\n defaultVariants: { size: \"md\", striped: false },\n },\n)\n\n/** Pin the whole `<thead>` to the top of the scroll region; `backdrop-blur`\n * keeps scrolled body rows legible behind the translucent header fill. */\nconst stickyHeaderClasses =\n \"[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10 [&_thead]:backdrop-blur-lg\"\n\n/** Pin the whole `<tfoot>` (e.g. a totals row) to the bottom of the scroll region. */\nconst stickyFooterClasses =\n \"[&_tfoot]:sticky [&_tfoot]:bottom-0 [&_tfoot]:z-10 [&_tfoot]:backdrop-blur-lg\"\n\n/** `Table`'s density scale — the kit's canonical `Size` (xs–xl). */\nexport type TableSize = Size\n\nexport type TableProps = HTMLArkProps<\"div\"> &\n VariantProps<typeof tableVariants> &\n WithTestId & {\n /** Pins the header row during vertical scroll. Needs a bounded height —\n * set `max-h-*` on `Table` or `Table.Content`. */\n stickyHeader?: boolean\n /** Pins a `Table.Foot` row (e.g. totals) to the bottom during vertical\n * scroll. Same bounded-height requirement as `stickyHeader`. */\n stickyFooter?: boolean\n }\n\n/**\n * Table — a dumb, styled semantic `<table>` inside a bordered, rounded surface.\n * Pure React Server Component (no `\"use client\"`): static markup, no state, so\n * it's safe in an RSC tree and usable for static / MDX tables. Composed from\n * namespaced parts: an optional non-table header (`Table.Toolbar` +\n * `Table.Title` for a title and actions), a `Table.Content` scroll region that\n * holds the `<table>`, and the semantic parts `Table.Head` / `Table.Body` /\n * `Table.Foot` / `Table.Row` / `Table.HeaderCell` / `Table.Cell`.\n *\n * Density (`size`), `striped`, and `stickyHeader` / `stickyFooter` ride on\n * `<Table>` and style the table via descendant selectors. To pin a header or\n * footer, give the scroll region a bounded height (`max-h-*` on `Table` or\n * `Table.Content`). The rounded border is `overflow-hidden`, so the corners\n * stay intact even once a scrollbar appears. There is no `variant`×`color`\n * axis — a table retints from `:root` slot vars via CSS.\n *\n * <Table striped size=\"sm\" stickyHeader className=\"max-h-80\">\n * <Table.Toolbar>\n * <Table.Title>Users</Table.Title>\n * <Button size=\"sm\">Add</Button>\n * </Table.Toolbar>\n * <Table.Content>\n * <Table.Head>\n * <Table.Row>\n * <Table.HeaderCell>Name</Table.HeaderCell>\n * <Table.HeaderCell className=\"text-right\">Age</Table.HeaderCell>\n * </Table.Row>\n * </Table.Head>\n * <Table.Body>\n * <Table.Row>\n * <Table.Cell>Ada</Table.Cell>\n * <Table.Cell className=\"text-right\">36</Table.Cell>\n * </Table.Row>\n * </Table.Body>\n * </Table.Content>\n * </Table>\n */\nconst TableRoot = ({\n className,\n size,\n striped,\n stickyHeader,\n stickyFooter,\n testId,\n ...rest\n}: TableProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n tableContainer,\n tableVariants({ size, striped }),\n stickyHeader && stickyHeaderClasses,\n stickyFooter && stickyFooterClasses,\n className,\n )}\n />\n)\n\nexport type TableToolbarProps = HTMLArkProps<\"div\"> & WithTestId\n\n/** Non-`<table>` header bar: a title + actions row above the scroll region,\n * separated by a bottom border. `shrink-0` so it never collapses when the\n * content scrolls. */\nconst TableToolbar = ({ className, testId, ...rest }: TableToolbarProps) => (\n <ark.div\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"flex shrink-0 items-center justify-between gap-2 border-b border-brand-900/20 px-3 ps-5 py-3 dark:border-white/15\",\n className,\n )}\n />\n)\n\nexport type TableTitleProps = HTMLArkProps<\"h3\"> & WithTestId\n\nconst TableTitle = ({ className, testId, ...rest }: TableTitleProps) => (\n <ark.h3\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\"font-semibold tracking-normal\", className)}\n />\n)\n\nexport type TableContentProps = HTMLArkProps<\"table\"> &\n WithTestId & {\n /** Style the inner `<table>` element; `className` targets the scroll region. */\n classNames?: { table?: string }\n }\n\n/** The scroll region + the `<table>`, framed so horizontal scroll affordances\n * (soft edge shadows on each side with more to scroll) can overlay it. `className`\n * bounds the scroll surface (`max-h-*` here bounds a sticky header/footer);\n * `classNames.table` styles the `<table>`. `border-separate` keeps sticky\n * header/footer borders. The `table-scroll-*` / `table-fade-*` classes are the\n * scroll-driven-animation affordance defined in theme.css. */\nconst TableContent = ({ className, classNames, testId, ...rest }: TableContentProps) => (\n <div className={cn(\"table-scroll-frame flex min-h-0 flex-1 flex-col\", className)}>\n <div className=\"table-scroll-x min-h-0 w-full flex-1 overflow-auto\">\n <ark.table\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={cn(\n \"w-full border-separate border-spacing-0 text-start text-gray-light-900 dark:text-gray-dark-25\",\n classNames?.table,\n )}\n />\n </div>\n {/* Horizontal scroll affordance — a soft shadow on each side that still has\n content to scroll to (pure CSS, hidden where unsupported). Pinned to the\n inline edges; a gradient has no logical direction, so `rtl:-scale-x-100`\n mirrors each shadow to fade inward from its own edge. The scroll-driven\n reveal needs no flip: its timeline's progress runs from the inline start\n in either direction. */}\n <div\n aria-hidden=\"true\"\n className=\"table-fade-start pointer-events-none absolute inset-y-0 start-0 w-6 rtl:-scale-x-100\"\n />\n <div\n aria-hidden=\"true\"\n className=\"table-fade-end pointer-events-none absolute inset-y-0 end-0 w-6 rtl:-scale-x-100\"\n />\n </div>\n)\n\nexport type TableHeadProps = HTMLArkProps<\"thead\"> & WithTestId\n\n// Parts are dumb: all styling is driven by the root's descendant selectors, so\n// they just forward a caller className (through `cn` when present).\nconst TableHead = ({ className, testId, ...rest }: TableHeadProps) => (\n <ark.thead\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableBodyProps = HTMLArkProps<\"tbody\"> & WithTestId\n\nconst TableBody = ({ className, testId, ...rest }: TableBodyProps) => (\n <ark.tbody\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableFootProps = HTMLArkProps<\"tfoot\"> & WithTestId\n\nconst TableFoot = ({ className, testId, ...rest }: TableFootProps) => (\n <ark.tfoot\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableRowProps = HTMLArkProps<\"tr\"> & WithTestId\n\nconst TableRow = ({ className, testId, ...rest }: TableRowProps) => (\n <ark.tr\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableHeaderCellProps = HTMLArkProps<\"th\"> & WithTestId\n\nconst TableHeaderCell = ({ className, scope = \"col\", testId, ...rest }: TableHeaderCellProps) => (\n <ark.th\n scope={scope}\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport type TableCellProps = HTMLArkProps<\"td\"> & WithTestId\n\nconst TableCell = ({ className, testId, ...rest }: TableCellProps) => (\n <ark.td\n {...props({ \"data-testid\": testId })}\n {...rest}\n className={className ? cn(className) : undefined}\n />\n)\n\nexport const Table = Object.assign(TableRoot, {\n Toolbar: TableToolbar,\n Title: TableTitle,\n Content: TableContent,\n Head: TableHead,\n Body: TableBody,\n Foot: TableFoot,\n Row: TableRow,\n HeaderCell: TableHeaderCell,\n Cell: TableCell,\n})\n"]}
@@ -1,6 +1,6 @@
1
1
  import { useLayerGuard, OverlayLayerProvider } from './chunk-AIQG7IIT.js';
2
2
  import { OverlayContainerProvider } from './chunk-7P32XCEU.js';
3
- import { ActionIcon } from './chunk-S7N4LGLZ.js';
3
+ import { ActionIcon } from './chunk-RIP5G47F.js';
4
4
  import { props } from './chunk-WYCMIIRR.js';
5
5
  import { cn } from './chunk-QP4I37PA.js';
6
6
  import { Drawer as Drawer$1 } from '@ark-ui/react/drawer';
@@ -202,6 +202,7 @@ var Drawer = ({
202
202
  className,
203
203
  classNames,
204
204
  testId,
205
+ translations,
205
206
  ...rest
206
207
  }) => {
207
208
  const hasHeader = title != null || description != null || withCloseButton;
@@ -244,7 +245,13 @@ var Drawer = ({
244
245
  title != null && /* @__PURE__ */ jsx(DrawerTitle, { className: classNames?.title, children: title }),
245
246
  description != null && /* @__PURE__ */ jsx(DrawerDescription, { className: classNames?.description, children: description })
246
247
  ] }),
247
- withCloseButton && /* @__PURE__ */ jsx(DrawerCloseTrigger, { className: classNames?.closeButton })
248
+ withCloseButton && /* @__PURE__ */ jsx(
249
+ DrawerCloseTrigger,
250
+ {
251
+ "aria-label": translations?.closeTriggerLabel,
252
+ className: classNames?.closeButton
253
+ }
254
+ )
248
255
  ] }),
249
256
  /* @__PURE__ */ jsx(
250
257
  DrawerBody,
@@ -280,5 +287,5 @@ Drawer.Body = DrawerBody;
280
287
  Drawer.Footer = DrawerFooter;
281
288
 
282
289
  export { Drawer, DrawerBackdrop, DrawerBody, DrawerCloseTrigger, DrawerContext, DrawerDescription, DrawerFooter, DrawerGrabber, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger };
283
- //# sourceMappingURL=chunk-HAQJQFE6.js.map
284
- //# sourceMappingURL=chunk-HAQJQFE6.js.map
290
+ //# sourceMappingURL=chunk-DBTJEBMO.js.map
291
+ //# sourceMappingURL=chunk-DBTJEBMO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/drawer/drawer.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;AAiCA,IAAM,kBAAA,GAAqB;AAAA,EACzB,KAAA,EAAO,OAAA;AAAA,EACP,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,MAAA,EAAQ;AACV,CAAA;AAEA,IAAM,QAAA,GAAW,CAAC,CAAA,KAAuB,CAAA,KAAM,WAAW,CAAA,KAAM,KAAA;AAGhE,IAAM,WAAA,GAAoC;AAAA,EACxC,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI;AACN,CAAA;AACA,I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AA,CAAO,IAAA,GAAO,UAAA;AACd,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,QAAA,GAAW,cAAA;AAClB,MAAA,CAAO,UAAA,GAAa,gBAAA;AACpB,MAAA,CAAO,KAAA,GAAQ,WAAA;AACf,MAAA,CAAO,WAAA,GAAc,iBAAA;AACrB,MAAA,CAAO,YAAA,GAAe,kBAAA;AACtB,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,MAAA,GAAS,YAAA;AAChB,MAAA,CAAO,IAAA,GAAO,UAAA;AACd,MAAA,CAAO,MAAA,GAAS,YAAA","file":"chunk-HAQJQFE6.js","sourcesContent":["\"use client\"\n\nimport { Drawer as Ark } from \"@ark-ui/react/drawer\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { cva } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\nimport { type ComponentPropsWithoutRef, type ReactNode, useRef } from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { OverlayContainerProvider } from \"../../lib/overlay-container\"\nimport { OverlayLayerProvider, useLayerGuard } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\n\n/**\n * Drawer — edge-anchored panel on top of Ark UI's Drawer state machine. Ark\n * owns swipe-to-dismiss, snap points, focus-trap, scroll-lock and the\n * `data-state=\"open|closed\"` attribute; this wrapper adds an RTL-aware\n * `placement` prop (Ark has none) by writing `data-placement` on the positioner\n * + content and deriving Ark's logical `swipeDirection`. Docking, sizing and\n * the slide animation are pure CSS keyed on `[data-placement]` (see\n * `theme.css`), so `start`/`end` flip automatically under `dir=\"rtl\"`.\n *\n * Mirrors `Modal`'s dual API: high-level `<Drawer open placement size … >` plus\n * low-level parts (`Drawer.Root`, `Drawer.Content`, …). Padding flows through\n * the `--drawer-px` CSS var.\n */\n\nexport type DrawerPlacement = \"start\" | \"end\" | \"top\" | \"bottom\"\n\n/** placement → Ark logical swipe axis (RTL handled by Ark for start/end). */\nconst PLACEMENT_TO_SWIPE = {\n start: \"start\",\n end: \"end\",\n top: \"up\",\n bottom: \"down\",\n} as const\n\nconst isInline = (p: DrawerPlacement) => p === \"start\" || p === \"end\"\n\n/** Inline placements size on width; block placements size on height. */\nconst INLINE_SIZE: Record<Size, string> = {\n xs: \"w-[18rem]\",\n sm: \"w-[22rem]\",\n md: \"w-[28rem]\",\n lg: \"w-[34rem]\",\n xl: \"w-[42rem]\",\n}\nconst BLOCK_SIZE: Record<Size, string> = {\n xs: \"h-[30dvh]\",\n sm: \"h-[40dvh]\",\n md: \"h-[55dvh]\",\n lg: \"h-[70dvh]\",\n xl: \"h-[85dvh]\",\n}\n\nconst PADDING: Record<Size, string> = {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n}\n\nconst drawerBackdrop = cva([\n \"fixed inset-0 z-[calc(var(--modal-z,150)+var(--layer-index,0))] bg-black/50 backdrop-blur-lg\",\n \"data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out\",\n])\n\nconst drawerPositioner = cva(\n \"fixed inset-0 z-[calc(var(--modal-z,150)+var(--layer-index,0))] flex\",\n {\n variants: {\n placement: {\n start: \"items-stretch justify-start\",\n end: \"items-stretch justify-end\",\n top: \"items-start justify-stretch\",\n bottom: \"items-end justify-stretch\",\n },\n },\n defaultVariants: { placement: \"end\" },\n },\n)\n\nexport type DrawerPositionerProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Positioner>>\n\n/** Publishes itself as the portal target for any overlay opened inside the\n * drawer, so a Menu/Select/DatePicker in a drawer body stays above the panel\n * instead of behind it. See `lib/overlay-container.tsx`. */\nconst DrawerPositioner = ({ children, asChild: _asChild, ...rest }: DrawerPositionerProps) => {\n const positioner = useRef<HTMLDivElement>(null)\n return (\n <Ark.Positioner ref={positioner} {...rest}>\n <OverlayContainerProvider value={positioner}>{children}</OverlayContainerProvider>\n </Ark.Positioner>\n )\n}\n\nconst drawerContent = cva([\n \"relative flex flex-col overflow-hidden\",\n \"bg-brand-50 text-gray-light-900 shadow-2xl\",\n \"dark:bg-brand-950 dark:text-gray-dark-25\",\n \"focus:outline-none\",\n // border on the docked edge only — keyed by data-placement in theme.css\n \"data-[placement=start]:border-e data-[placement=end]:border-s\",\n \"data-[placement=top]:border-b data-[placement=bottom]:border-t\",\n \"border-brand-900/20 dark:border-white/15\",\n \"data-[state=open]:animate-drawer-in data-[state=closed]:animate-drawer-out\",\n])\n\n// ---------------------------------------------------------------------------\n// Low-level parts\n// ---------------------------------------------------------------------------\n\nexport type DrawerRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\n/** Ark's root, plus the nested-layer guard: while a picker opened inside the\n * drawer is open, an outside click closes the picker only, not the drawer\n * under it. See `lib/overlay-layer.tsx`. */\nexport const DrawerRoot = ({ onPointerDownOutside, children, ...rest }: DrawerRootProps) => {\n const guard = useLayerGuard(onPointerDownOutside)\n return (\n <Ark.Root onPointerDownOutside={guard.onPointerDownOutside} {...rest}>\n <OverlayLayerProvider value={guard.layers}>{children}</OverlayLayerProvider>\n </Ark.Root>\n )\n}\nexport const DrawerTrigger = Ark.Trigger\nexport const DrawerContext = Ark.Context\n\nexport type DrawerBackdropProps = ComponentPropsWithoutRef<typeof Ark.Backdrop> & WithTestId\n\nexport const DrawerBackdrop = ({ className, testId, ...rest }: DrawerBackdropProps) => (\n <Ark.Backdrop\n className={cn(drawerBackdrop(), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerTitleProps = ComponentPropsWithoutRef<typeof Ark.Title> & WithTestId\n\nexport const DrawerTitle = ({ className, testId, ...rest }: DrawerTitleProps) => (\n <Ark.Title\n className={cn(\"text-lg font-semibold leading-tight\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerDescriptionProps = ComponentPropsWithoutRef<typeof Ark.Description> & WithTestId\n\nexport const DrawerDescription = ({ className, testId, ...rest }: DrawerDescriptionProps) => (\n <Ark.Description\n className={cn(\"text-sm text-gray-light-500 dark:text-gray-dark-400\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerCloseTriggerProps = ComponentPropsWithoutRef<typeof Ark.CloseTrigger> &\n WithTestId & {\n \"aria-label\"?: string\n }\n\nexport const DrawerCloseTrigger = ({\n children,\n className,\n \"aria-label\": ariaLabel,\n testId,\n asChild,\n ...rest\n}: DrawerCloseTriggerProps) =>\n asChild ? (\n // The consumer's element (a \"Cancel\" button, say) replaces the kit's icon\n // button outright, rather than nesting inside it.\n <Ark.CloseTrigger\n asChild\n aria-label={ariaLabel}\n className={className}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </Ark.CloseTrigger>\n ) : (\n <Ark.CloseTrigger asChild {...rest}>\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size=\"sm\"\n aria-label={ariaLabel ?? \"Close\"}\n className={className}\n testId={testId}\n >\n {children ?? <X />}\n </ActionIcon>\n </Ark.CloseTrigger>\n )\n\nexport type DrawerGrabberProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Grabber>> &\n WithTestId\n\nexport const DrawerGrabber = ({\n className,\n testId,\n asChild: _asChild,\n ...rest\n}: DrawerGrabberProps) => (\n <Ark.Grabber\n className={cn(\n \"flex shrink-0 cursor-grab touch-none items-center justify-center py-2\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <Ark.GrabberIndicator className=\"h-1.5 w-20 rounded-full bg-gray-light-300 dark:bg-gray-dark-700\" />\n </Ark.Grabber>\n)\n\nexport type DrawerHeaderProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerHeader = ({ className, testId, ...rest }: DrawerHeaderProps) => (\n <div\n className={cn(\n \"flex items-start justify-between gap-4 px-(--drawer-px,1.25rem) pt-(--drawer-px,1.25rem) pb-3\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerBodyProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerBody = ({ className, testId, ...rest }: DrawerBodyProps) => (\n <div\n className={cn(\"flex-1 overflow-y-auto px-(--drawer-px,1.25rem) py-1\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerFooterProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerFooter = ({ className, testId, ...rest }: DrawerFooterProps) => (\n <div\n className={cn(\n \"flex items-center justify-end gap-2 px-(--drawer-px,1.25rem) pb-(--drawer-px,1.25rem) pt-4\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\n// ---------------------------------------------------------------------------\n// High-level props-driven Drawer\n// ---------------------------------------------------------------------------\n\ntype ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\nexport type DrawerClassNames = Partial<\n Record<\n | \"backdrop\"\n | \"positioner\"\n | \"content\"\n | \"header\"\n | \"title\"\n | \"description\"\n | \"body\"\n | \"grabber\"\n | \"closeButton\",\n string\n >\n>\n\nexport type DrawerProps = Omit<\n ArkRootProps,\n \"open\" | \"defaultOpen\" | \"onOpenChange\" | \"children\" | \"swipeDirection\"\n> &\n WithTestId & {\n /** Controlled open state. */\n open?: boolean\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean\n /** Fires with the next open state. Flattened from Ark's `{ open }`. */\n onOpenChange?: (open: boolean) => void\n /** Fires on close (any source) — Escape, backdrop click, swipe, or a controlled `onOpenChange`. */\n onClose?: () => void\n /** RTL-aware docking edge. @default \"end\" */\n placement?: DrawerPlacement\n size?: Size\n title?: ReactNode\n description?: ReactNode\n /** Render the default close button in the header. @default true */\n withCloseButton?: boolean\n /** Show the drag grabber handle. @default false */\n withGrabber?: boolean\n /**\n * Render the dimming backdrop. Set `false` when an ancestor (e.g. the modals\n * manager) draws a single shared backdrop for the whole overlay stack.\n * @default true\n */\n withBackdrop?: boolean\n /** Inner padding token; sets `--drawer-px`. @default \"md\" */\n padding?: Size\n closeOnEscape?: boolean\n closeOnInteractOutside?: boolean\n /** Fires after the exit animation completes — the manager unmounts on this. */\n onExitComplete?: () => void\n /** Portal target. Defaults to `document.body`. */\n container?: HTMLElement | null\n children?: ReactNode\n className?: string\n classNames?: DrawerClassNames\n }\n\nexport const Drawer = ({\n open,\n defaultOpen,\n onOpenChange,\n onClose,\n placement = \"end\",\n size = \"md\",\n title,\n description,\n withCloseButton = true,\n withGrabber = false,\n withBackdrop = true,\n padding = \"md\",\n closeOnEscape,\n closeOnInteractOutside,\n onExitComplete,\n container,\n children,\n className,\n classNames,\n testId,\n ...rest\n}: DrawerProps) => {\n const hasHeader = title != null || description != null || withCloseButton\n const sizeClass = isInline(placement)\n ? `${INLINE_SIZE[size]} h-full max-w-[90vw]`\n : `${BLOCK_SIZE[size]} w-full max-h-[90dvh]`\n\n return (\n <DrawerRoot\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={({ open: next }) => {\n onOpenChange?.(next)\n if (!next) onClose?.()\n }}\n swipeDirection={PLACEMENT_TO_SWIPE[placement]}\n closeOnEscape={closeOnEscape}\n closeOnInteractOutside={closeOnInteractOutside}\n // Unmount the whole content tree (incl. the `fixed inset-0` positioner)\n // on close — otherwise the positioner lingers as a transparent overlay\n // that swallows page clicks. `lazyMount` keeps it out of the DOM until\n // first open.\n lazyMount\n unmountOnExit\n modal={withBackdrop}\n onExitComplete={onExitComplete}\n {...rest}\n >\n <Portal container={container ? { current: container } : undefined}>\n {withBackdrop && <DrawerBackdrop className={classNames?.backdrop} />}\n <DrawerPositioner\n data-placement={placement}\n className={cn(drawerPositioner({ placement }), classNames?.positioner)}\n >\n <Ark.Content\n data-placement={placement}\n style={{ [\"--drawer-px\" as string]: PADDING[padding] }}\n className={cn(drawerContent(), sizeClass, className, classNames?.content)}\n {...props({ \"data-testid\": testId })}\n >\n {withGrabber && <DrawerGrabber className={classNames?.grabber} />}\n {hasHeader && (\n <DrawerHeader className={classNames?.header}>\n <div className=\"flex flex-col gap-1\">\n {title != null && (\n <DrawerTitle className={classNames?.title}>{title}</DrawerTitle>\n )}\n {description != null && (\n <DrawerDescription className={classNames?.description}>\n {description}\n </DrawerDescription>\n )}\n </div>\n {withCloseButton && <DrawerCloseTrigger className={classNames?.closeButton} />}\n </DrawerHeader>\n )}\n <DrawerBody\n className={cn(\n !hasHeader && !withGrabber && \"pt-(--drawer-px,1.25rem)\",\n \"pb-(--drawer-px,1.25rem)\",\n classNames?.body,\n )}\n >\n {children}\n </DrawerBody>\n </Ark.Content>\n </DrawerPositioner>\n </Portal>\n </DrawerRoot>\n )\n}\n\nDrawer.Root = DrawerRoot\nDrawer.Trigger = DrawerTrigger\nDrawer.Context = DrawerContext\nDrawer.Backdrop = DrawerBackdrop\nDrawer.Positioner = DrawerPositioner\nDrawer.Title = DrawerTitle\nDrawer.Description = DrawerDescription\nDrawer.CloseTrigger = DrawerCloseTrigger\nDrawer.Grabber = DrawerGrabber\nDrawer.Header = DrawerHeader\nDrawer.Body = DrawerBody\nDrawer.Footer = DrawerFooter\n"]}
1
+ {"version":3,"sources":["../src/components/drawer/drawer.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;AAiCA,IAAM,kBAAA,GAAqB;AAAA,EACzB,KAAA,EAAO,OAAA;AAAA,EACP,GAAA,EAAK,KAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,MAAA,EAAQ;AACV,CAAA;AAEA,IAAM,QAAA,GAAW,CAAC,CAAA,KAAuB,CAAA,KAAM,WAAW,CAAA,KAAM,KAAA;AAGhE,IAAM,WAAA,GAAoC;AAAA,EACxC,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EAC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AAA,wBACA,UAAA,EAAY;AAAA,uBACd;AAAA,sBAEC;AAAA;AAAA;AACH;AAAA;AAAA;AACF;AAAA;AACF,OAAA,EACF;AAAA;AAAA,GACF;AAEJ;AAEA,MAAA,CAAO,IAAA,GAAO,UAAA;AACd,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,QAAA,GAAW,cAAA;AAClB,MAAA,CAAO,UAAA,GAAa,gBAAA;AACpB,MAAA,CAAO,KAAA,GAAQ,WAAA;AACf,MAAA,CAAO,WAAA,GAAc,iBAAA;AACrB,MAAA,CAAO,YAAA,GAAe,kBAAA;AACtB,MAAA,CAAO,OAAA,GAAU,aAAA;AACjB,MAAA,CAAO,MAAA,GAAS,YAAA;AAChB,MAAA,CAAO,IAAA,GAAO,UAAA;AACd,MAAA,CAAO,MAAA,GAAS,YAAA","file":"chunk-DBTJEBMO.js","sourcesContent":["\"use client\"\n\nimport { Drawer as Ark } from \"@ark-ui/react/drawer\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { cva } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\nimport { type ComponentPropsWithoutRef, type ReactNode, useRef } from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { OverlayContainerProvider } from \"../../lib/overlay-container\"\nimport { OverlayLayerProvider, useLayerGuard } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\n\n/**\n * Drawer — edge-anchored panel on top of Ark UI's Drawer state machine. Ark\n * owns swipe-to-dismiss, snap points, focus-trap, scroll-lock and the\n * `data-state=\"open|closed\"` attribute; this wrapper adds an RTL-aware\n * `placement` prop (Ark has none) by writing `data-placement` on the positioner\n * + content and deriving Ark's logical `swipeDirection`. Docking, sizing and\n * the slide animation are pure CSS keyed on `[data-placement]` (see\n * `theme.css`), so `start`/`end` flip automatically under `dir=\"rtl\"`.\n *\n * Mirrors `Modal`'s dual API: high-level `<Drawer open placement size … >` plus\n * low-level parts (`Drawer.Root`, `Drawer.Content`, …). Padding flows through\n * the `--drawer-px` CSS var.\n */\n\nexport type DrawerPlacement = \"start\" | \"end\" | \"top\" | \"bottom\"\n\n/** placement → Ark logical swipe axis (RTL handled by Ark for start/end). */\nconst PLACEMENT_TO_SWIPE = {\n start: \"start\",\n end: \"end\",\n top: \"up\",\n bottom: \"down\",\n} as const\n\nconst isInline = (p: DrawerPlacement) => p === \"start\" || p === \"end\"\n\n/** Inline placements size on width; block placements size on height. */\nconst INLINE_SIZE: Record<Size, string> = {\n xs: \"w-[18rem]\",\n sm: \"w-[22rem]\",\n md: \"w-[28rem]\",\n lg: \"w-[34rem]\",\n xl: \"w-[42rem]\",\n}\nconst BLOCK_SIZE: Record<Size, string> = {\n xs: \"h-[30dvh]\",\n sm: \"h-[40dvh]\",\n md: \"h-[55dvh]\",\n lg: \"h-[70dvh]\",\n xl: \"h-[85dvh]\",\n}\n\nconst PADDING: Record<Size, string> = {\n xs: \"0.75rem\",\n sm: \"1rem\",\n md: \"1.25rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n}\n\nconst drawerBackdrop = cva([\n \"fixed inset-0 z-[calc(var(--modal-z,150)+var(--layer-index,0))] bg-black/50 backdrop-blur-lg\",\n \"data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out\",\n])\n\nconst drawerPositioner = cva(\n \"fixed inset-0 z-[calc(var(--modal-z,150)+var(--layer-index,0))] flex\",\n {\n variants: {\n placement: {\n start: \"items-stretch justify-start\",\n end: \"items-stretch justify-end\",\n top: \"items-start justify-stretch\",\n bottom: \"items-end justify-stretch\",\n },\n },\n defaultVariants: { placement: \"end\" },\n },\n)\n\nexport type DrawerPositionerProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Positioner>>\n\n/** Publishes itself as the portal target for any overlay opened inside the\n * drawer, so a Menu/Select/DatePicker in a drawer body stays above the panel\n * instead of behind it. See `lib/overlay-container.tsx`. */\nconst DrawerPositioner = ({ children, asChild: _asChild, ...rest }: DrawerPositionerProps) => {\n const positioner = useRef<HTMLDivElement>(null)\n return (\n <Ark.Positioner ref={positioner} {...rest}>\n <OverlayContainerProvider value={positioner}>{children}</OverlayContainerProvider>\n </Ark.Positioner>\n )\n}\n\nconst drawerContent = cva([\n \"relative flex flex-col overflow-hidden\",\n \"bg-brand-50 text-gray-light-900 shadow-2xl\",\n \"dark:bg-brand-950 dark:text-gray-dark-25\",\n \"focus:outline-none\",\n // border on the docked edge only — keyed by data-placement in theme.css\n \"data-[placement=start]:border-e data-[placement=end]:border-s\",\n \"data-[placement=top]:border-b data-[placement=bottom]:border-t\",\n \"border-brand-900/20 dark:border-white/15\",\n \"data-[state=open]:animate-drawer-in data-[state=closed]:animate-drawer-out\",\n])\n\n// ---------------------------------------------------------------------------\n// Low-level parts\n// ---------------------------------------------------------------------------\n\nexport type DrawerRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\n/** Ark's root, plus the nested-layer guard: while a picker opened inside the\n * drawer is open, an outside click closes the picker only, not the drawer\n * under it. See `lib/overlay-layer.tsx`. */\nexport const DrawerRoot = ({ onPointerDownOutside, children, ...rest }: DrawerRootProps) => {\n const guard = useLayerGuard(onPointerDownOutside)\n return (\n <Ark.Root onPointerDownOutside={guard.onPointerDownOutside} {...rest}>\n <OverlayLayerProvider value={guard.layers}>{children}</OverlayLayerProvider>\n </Ark.Root>\n )\n}\nexport const DrawerTrigger = Ark.Trigger\nexport const DrawerContext = Ark.Context\n\nexport type DrawerBackdropProps = ComponentPropsWithoutRef<typeof Ark.Backdrop> & WithTestId\n\nexport const DrawerBackdrop = ({ className, testId, ...rest }: DrawerBackdropProps) => (\n <Ark.Backdrop\n className={cn(drawerBackdrop(), className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerTitleProps = ComponentPropsWithoutRef<typeof Ark.Title> & WithTestId\n\nexport const DrawerTitle = ({ className, testId, ...rest }: DrawerTitleProps) => (\n <Ark.Title\n className={cn(\"text-lg font-semibold leading-tight\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerDescriptionProps = ComponentPropsWithoutRef<typeof Ark.Description> & WithTestId\n\nexport const DrawerDescription = ({ className, testId, ...rest }: DrawerDescriptionProps) => (\n <Ark.Description\n className={cn(\"text-sm text-gray-light-500 dark:text-gray-dark-400\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerCloseTriggerProps = ComponentPropsWithoutRef<typeof Ark.CloseTrigger> &\n WithTestId & {\n \"aria-label\"?: string\n }\n\nexport const DrawerCloseTrigger = ({\n children,\n className,\n \"aria-label\": ariaLabel,\n testId,\n asChild,\n ...rest\n}: DrawerCloseTriggerProps) =>\n asChild ? (\n // The consumer's element (a \"Cancel\" button, say) replaces the kit's icon\n // button outright, rather than nesting inside it.\n <Ark.CloseTrigger\n asChild\n aria-label={ariaLabel}\n className={className}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {children}\n </Ark.CloseTrigger>\n ) : (\n <Ark.CloseTrigger asChild {...rest}>\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size=\"sm\"\n aria-label={ariaLabel ?? \"Close\"}\n className={className}\n testId={testId}\n >\n {children ?? <X />}\n </ActionIcon>\n </Ark.CloseTrigger>\n )\n\nexport type DrawerGrabberProps = NoAsChild<ComponentPropsWithoutRef<typeof Ark.Grabber>> &\n WithTestId\n\nexport const DrawerGrabber = ({\n className,\n testId,\n asChild: _asChild,\n ...rest\n}: DrawerGrabberProps) => (\n <Ark.Grabber\n className={cn(\n \"flex shrink-0 cursor-grab touch-none items-center justify-center py-2\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n <Ark.GrabberIndicator className=\"h-1.5 w-20 rounded-full bg-gray-light-300 dark:bg-gray-dark-700\" />\n </Ark.Grabber>\n)\n\nexport type DrawerHeaderProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerHeader = ({ className, testId, ...rest }: DrawerHeaderProps) => (\n <div\n className={cn(\n \"flex items-start justify-between gap-4 px-(--drawer-px,1.25rem) pt-(--drawer-px,1.25rem) pb-3\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerBodyProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerBody = ({ className, testId, ...rest }: DrawerBodyProps) => (\n <div\n className={cn(\"flex-1 overflow-y-auto px-(--drawer-px,1.25rem) py-1\", className)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport type DrawerFooterProps = ComponentPropsWithoutRef<\"div\"> & WithTestId\n\nexport const DrawerFooter = ({ className, testId, ...rest }: DrawerFooterProps) => (\n <div\n className={cn(\n \"flex items-center justify-end gap-2 px-(--drawer-px,1.25rem) pb-(--drawer-px,1.25rem) pt-4\",\n className,\n )}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\n// ---------------------------------------------------------------------------\n// High-level props-driven Drawer\n// ---------------------------------------------------------------------------\n\ntype ArkRootProps = ComponentPropsWithoutRef<typeof Ark.Root>\n\nexport type DrawerClassNames = Partial<\n Record<\n | \"backdrop\"\n | \"positioner\"\n | \"content\"\n | \"header\"\n | \"title\"\n | \"description\"\n | \"body\"\n | \"grabber\"\n | \"closeButton\",\n string\n >\n>\n\nexport type DrawerProps = Omit<\n ArkRootProps,\n \"open\" | \"defaultOpen\" | \"onOpenChange\" | \"children\" | \"swipeDirection\"\n> &\n WithTestId & {\n /** Controlled open state. */\n open?: boolean\n /** Uncontrolled initial open state. */\n defaultOpen?: boolean\n /** Fires with the next open state. Flattened from Ark's `{ open }`. */\n onOpenChange?: (open: boolean) => void\n /** Fires on close (any source) — Escape, backdrop click, swipe, or a controlled `onOpenChange`. */\n onClose?: () => void\n /** RTL-aware docking edge. @default \"end\" */\n placement?: DrawerPlacement\n size?: Size\n title?: ReactNode\n description?: ReactNode\n /** Render the default close button in the header. @default true */\n withCloseButton?: boolean\n /** Show the drag grabber handle. @default false */\n withGrabber?: boolean\n /**\n * Render the dimming backdrop. Set `false` when an ancestor (e.g. the modals\n * manager) draws a single shared backdrop for the whole overlay stack.\n * @default true\n */\n withBackdrop?: boolean\n /** Inner padding token; sets `--drawer-px`. @default \"md\" */\n padding?: Size\n closeOnEscape?: boolean\n closeOnInteractOutside?: boolean\n /** Fires after the exit animation completes — the manager unmounts on this. */\n onExitComplete?: () => void\n /** Portal target. Defaults to `document.body`. */\n container?: HTMLElement | null\n children?: ReactNode\n className?: string\n classNames?: DrawerClassNames\n /** Overrides the default close button's accessible name (`closeTriggerLabel`, default\n * `\"Close\"`). The compound `DrawerCloseTrigger` part takes a plain `aria-label` instead. */\n translations?: DrawerTranslations\n }\n\n/** The ready-made drawer's wording — `closeTriggerLabel` follows Ark's naming for the\n * same control. */\nexport type DrawerTranslations = { closeTriggerLabel?: string }\n\nexport const Drawer = ({\n open,\n defaultOpen,\n onOpenChange,\n onClose,\n placement = \"end\",\n size = \"md\",\n title,\n description,\n withCloseButton = true,\n withGrabber = false,\n withBackdrop = true,\n padding = \"md\",\n closeOnEscape,\n closeOnInteractOutside,\n onExitComplete,\n container,\n children,\n className,\n classNames,\n testId,\n translations,\n ...rest\n}: DrawerProps) => {\n const hasHeader = title != null || description != null || withCloseButton\n const sizeClass = isInline(placement)\n ? `${INLINE_SIZE[size]} h-full max-w-[90vw]`\n : `${BLOCK_SIZE[size]} w-full max-h-[90dvh]`\n\n return (\n <DrawerRoot\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={({ open: next }) => {\n onOpenChange?.(next)\n if (!next) onClose?.()\n }}\n swipeDirection={PLACEMENT_TO_SWIPE[placement]}\n closeOnEscape={closeOnEscape}\n closeOnInteractOutside={closeOnInteractOutside}\n // Unmount the whole content tree (incl. the `fixed inset-0` positioner)\n // on close — otherwise the positioner lingers as a transparent overlay\n // that swallows page clicks. `lazyMount` keeps it out of the DOM until\n // first open.\n lazyMount\n unmountOnExit\n modal={withBackdrop}\n onExitComplete={onExitComplete}\n {...rest}\n >\n <Portal container={container ? { current: container } : undefined}>\n {withBackdrop && <DrawerBackdrop className={classNames?.backdrop} />}\n <DrawerPositioner\n data-placement={placement}\n className={cn(drawerPositioner({ placement }), classNames?.positioner)}\n >\n <Ark.Content\n data-placement={placement}\n style={{ [\"--drawer-px\" as string]: PADDING[padding] }}\n className={cn(drawerContent(), sizeClass, className, classNames?.content)}\n {...props({ \"data-testid\": testId })}\n >\n {withGrabber && <DrawerGrabber className={classNames?.grabber} />}\n {hasHeader && (\n <DrawerHeader className={classNames?.header}>\n <div className=\"flex flex-col gap-1\">\n {title != null && (\n <DrawerTitle className={classNames?.title}>{title}</DrawerTitle>\n )}\n {description != null && (\n <DrawerDescription className={classNames?.description}>\n {description}\n </DrawerDescription>\n )}\n </div>\n {withCloseButton && (\n <DrawerCloseTrigger\n aria-label={translations?.closeTriggerLabel}\n className={classNames?.closeButton}\n />\n )}\n </DrawerHeader>\n )}\n <DrawerBody\n className={cn(\n !hasHeader && !withGrabber && \"pt-(--drawer-px,1.25rem)\",\n \"pb-(--drawer-px,1.25rem)\",\n classNames?.body,\n )}\n >\n {children}\n </DrawerBody>\n </Ark.Content>\n </DrawerPositioner>\n </Portal>\n </DrawerRoot>\n )\n}\n\nDrawer.Root = DrawerRoot\nDrawer.Trigger = DrawerTrigger\nDrawer.Context = DrawerContext\nDrawer.Backdrop = DrawerBackdrop\nDrawer.Positioner = DrawerPositioner\nDrawer.Title = DrawerTitle\nDrawer.Description = DrawerDescription\nDrawer.CloseTrigger = DrawerCloseTrigger\nDrawer.Grabber = DrawerGrabber\nDrawer.Header = DrawerHeader\nDrawer.Body = DrawerBody\nDrawer.Footer = DrawerFooter\n"]}
@@ -1,5 +1,5 @@
1
- import { PillGroupContext, pill } from './chunk-Z2Z5EXVT.js';
2
- import { inputSlot, inputShell, inputControlClasses } from './chunk-5OQLFX47.js';
1
+ import { PillGroupContext, pill } from './chunk-RKYXG6X7.js';
2
+ import { inputSlot, inputShell, inputControlClasses } from './chunk-Z6RPMRFH.js';
3
3
  import { props } from './chunk-WYCMIIRR.js';
4
4
  import { cn } from './chunk-QP4I37PA.js';
5
5
  import { ark } from '@ark-ui/react';
@@ -220,5 +220,5 @@ var PillsInput = Object.assign(PillsInputBase, {
220
220
  });
221
221
 
222
222
  export { PillOverflowCounter, PillsInput, pillsContent, pillsShell, usePillOverflow };
223
- //# sourceMappingURL=chunk-AE7QTLJ5.js.map
224
- //# sourceMappingURL=chunk-AE7QTLJ5.js.map
223
+ //# sourceMappingURL=chunk-FAOBC4IS.js.map
224
+ //# sourceMappingURL=chunk-FAOBC4IS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/pills-input/pills-input.tsx"],"names":[],"mappings":";;;;;;;;;AAoDO,IAAM,UAAA,GAAa,GAAG,aAAa;AAMnC,IAAM,YAAA,GAAe,IAAI,2DAAA,EAA6D;AAAA,EAC3F,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,OAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;AAAA;AACN,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAC3B,CAAC;AAKD,IAAM,kBAAA,GAAqB,OAAO,QAAA,KAAa,WAAA,GAAc,eAAA,GAAkB,SAAA;AAWxE,SAAS,gBAAA,CAAiB,YAAsB,QAAA,EAA0B;AAC/E,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,IAAI,UAAU,MAAA,CAAO,iBAAA;AACrB,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,UAAA,CAAW,QAAQ,C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A,EAAW,CAAC,KAAA,KAAU;AACpB,MAAA,IAAI,gBAAgB,KAAA,CAAM,GAAA,KAAQ,eAAe,KAAA,CAAM,aAAA,CAAc,UAAU,EAAA,EAAI;AACjF,QAAA,YAAA,EAAa;AAAA,MACf;AACA,MAAA,SAAA,GAAY,KAAK,CAAA;AAAA,IACnB,CAAA;AAAA,IACC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN,CAAA;AAGK,IAAM,UAAA,GAAa,MAAA,CAAO,MAAA,CAAO,cAAA,EAAgB;AAAA,EACtD,KAAA,EAAO;AACT,CAAC","file":"chunk-AE7QTLJ5.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva } from \"class-variance-authority\"\nimport {\n Children,\n type ComponentPropsWithoutRef,\n cloneElement,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type InputSize,\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n} from \"../input/input\"\nimport { PillGroupContext, type PillSize, pill } from \"../pill/pill\"\n\n/**\n * PillsInput — a multi-line input shell that lays out `Pill`s alongside a search\n * field. Same chrome as `Input` (border, focus ring, invalid / disabled states)\n * but it wraps as values accumulate. It's the visual `MultiSelect` and\n * `TagsInput` mount as their target.\n *\n * - It reuses `Input`'s slot layout: a `startSlot` / `endSlot` flank a\n * `pillsContent` region that holds the `Pill`s + the field and is the only\n * thing that wraps, so a trailing control (chevron, clear) pins to the edge\n * instead of wrapping inline with the pills.\n * - Host `Pill`s + a single `PillsInputField` inside it (pills first, field\n * last). The shell sets the pill `size` / `disabled` through context, so the\n * pills match with no prop drilling.\n * - `maxLines` caps the pills at N rows and collapses the rest into a static\n * \"+N\" counter (measured, since pills have variable widths).\n *\n * Presentational by design: the value state lives with the consumer.\n */\n\n/** The pills *row*: same single-line flex shell as `inputShell`, just text-cursor\n * for the click-to-focus affordance. Layout/wrap live on `pillsContent`. */\nexport const pillsShell = cn(\"cursor-text\")\n\n/** The wrapping region inside a pills shell — holds the pills + field, grows to\n * fill the row (`flex-1`), and is the only element that wraps, so the shell's\n * start/end slots stay pinned as `shrink-0` siblings. Gap tracks `inputShell`'s\n * per-size gap so pill spacing is unchanged from the flat layout. */\nexport const pillsContent = cva(\"flex min-w-0 flex-1 flex-wrap items-center py-1 gap-y-0.5\", {\n variants: {\n size: {\n xs: \"gap-1.5\",\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-2.5\",\n xl: \"gap-3\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\n// `useLayoutEffect` measures before paint (no flash); fall back to `useEffect`\n// on the server so SSR doesn't warn. Measurement is client-only anyway — the\n// server render shows every pill, which is the correct no-cap fallback.\nconst useIsoLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect\n\n/**\n * Pure row-grouping math behind `usePillOverflow` (exported for testing).\n *\n * Given each measured pill's `offsetTop` (in document order), count how many\n * fit within `maxLines` wrapped rows. A jump in `offsetTop` (beyond a sub-pixel\n * epsilon) marks a new row. When the pills overflow, reserve one slot on the\n * last visible row for the \"+N\" counter (it's narrower than a typical pill, so\n * dropping one always makes room).\n */\nexport function visiblePillCount(offsetTops: number[], maxLines: number): number {\n let rows = 0\n let lastTop = Number.NEGATIVE_INFINITY\n for (let i = 0; i < offsetTops.length; i++) {\n const top = offsetTops[i] ?? lastTop\n if (top - lastTop > 1) {\n rows += 1\n lastTop = top\n if (rows > maxLines) {\n // `i` begins the row past the cap — keep the rows before it, minus one\n // for the counter.\n return Math.max(0, i - 1)\n }\n }\n }\n return offsetTops.length\n}\n\n/**\n * Like `visiblePillCount`, but also keeps the trailing input field on the last\n * visible row (exported for testing).\n *\n * `visiblePillCount` only reasons about pills, so when the last visible row is\n * packed, the field — which is `min-w-16` and the last flex child — can't claim\n * its minimum width and wraps onto a new line. A flex item wraps exactly when\n * the space left on its row drops below its `min-width`, so we drop pills until\n * the last visible pill leaves room on its row for `gap + fieldMinWidth` (plus\n * the `+N` counter, once anything is hidden). Pills are passed as their measured\n * `{ top, right }` in a single coordinate space; removing a trailing pill never\n * reflows the ones before it, so each drop is checked against real geometry.\n */\nexport function pillCountWithField(\n pills: { top: number; right: number }[],\n maxLines: number,\n rowRight: number,\n trailing: { fieldMinWidth: number; counterWidth: number; gap: number },\n): number {\n const total = pills.length\n const { fieldMinWidth, counterWidth, gap } = trailing\n // Start from the pill-only cap (already reserves one slot for the counter on\n // overflow), then back off until the field's minimum fits on the last row.\n let visible = visiblePillCount(\n pills.map((p) => p.top),\n maxLines,\n )\n while (visible > 0) {\n const last = pills[visible - 1]\n if (last == null) break\n // Hiding any pill surfaces the \"+N\" counter, which shares the last row.\n const needsCounter = visible < total\n const trailingWidth = gap + fieldMinWidth + (needsCounter ? counterWidth + gap : 0)\n if (last.right + trailingWidth <= rowRight) break\n visible--\n }\n return visible\n}\n\n/**\n * Measure how many pills fit within `maxLines` rows and how many overflow.\n *\n * Line caps are width-dependent (pills vary in width), so this measures the DOM.\n * Pills to be measured must carry `data-overflow-item`; the trailing field and\n * the counter must NOT (they would corrupt row detection) — instead the field\n * carries `data-overflow-field` and the counter `data-overflow-counter` so the\n * hook can locate and measure them without mistaking them for pills. The hook\n * renders the full set during a pre-paint \"measuring\" pass, groups pills into\n * rows, then settles on a `visibleCount` — reserving the last row for the \"+N\"\n * chip and, when a field is present, its `min-width` too, so the field never\n * wraps onto a new line (see `pillCountWithField`). Re-measures on width change\n * only (ignoring the height change our own slicing causes, which would loop).\n *\n * `measuring` is exposed so consumers can render the counter during the\n * measuring pass (it is otherwise hidden when nothing overflows), letting the\n * hook measure its real width for the last-row reservation.\n */\nexport function usePillOverflow({\n maxLines,\n count,\n}: {\n /** Cap the rendered pills at this many rows. Omit to render every pill. */\n maxLines?: number\n /** Total number of pills — drives re-measurement on add / remove. */\n count: number\n}): {\n containerRef: RefObject<HTMLDivElement | null>\n visibleCount: number\n hiddenCount: number\n measuring: boolean\n} {\n const containerRef = useRef<HTMLDivElement>(null)\n const [visibleCount, setVisibleCount] = useState(count)\n // While true, every pill is rendered so the DOM reflects the full set; flipped\n // off (pre-paint) once the cutoff is computed.\n const [measuring, setMeasuring] = useState(true)\n const lastWidth = useRef(0)\n\n // Any change to the inputs re-enters a full-render measuring pass.\n useIsoLayoutEffect(() => {\n setMeasuring(true)\n }, [count, maxLines])\n\n useIsoLayoutEffect(() => {\n if (!measuring) return\n const container = containerRef.current\n if (maxLines == null || container == null) {\n setVisibleCount(count)\n setMeasuring(false)\n return\n }\n const items = Array.from(container.querySelectorAll<HTMLElement>(\"[data-overflow-item]\"))\n lastWidth.current = container.clientWidth\n\n const fieldEl = container.querySelector<HTMLElement>(\"[data-overflow-field]\")\n if (fieldEl == null) {\n // No trailing field (e.g. TreeMultiSelect's read-only trigger) — pills +\n // counter only, the original behavior.\n setVisibleCount(\n visiblePillCount(\n items.map((el) => el.offsetTop),\n maxLines,\n ),\n )\n setMeasuring(false)\n return\n }\n\n // Field-aware: reserve the field's min width (and the counter slot) on the\n // last visible row. Measure in viewport coords via `getBoundingClientRect`\n // so pill edges and the row's right edge share one coordinate space\n // regardless of `offsetParent` (the positioned shell, not this container).\n const style = getComputedStyle(container)\n const gap = Number.parseFloat(style.columnGap || style.gap) || 0\n const rowRight = container.getBoundingClientRect().right\n const fieldMinWidth = Number.parseFloat(getComputedStyle(fieldEl).minWidth) || 0\n const counterEl = container.querySelector<HTMLElement>(\"[data-overflow-counter]\")\n const counterWidth = counterEl?.getBoundingClientRect().width ?? 0\n const pills = items.map((el) => {\n const rect = el.getBoundingClientRect()\n return { top: rect.top, right: rect.right }\n })\n setVisibleCount(\n pillCountWithField(pills, maxLines, rowRight, { fieldMinWidth, counterWidth, gap }),\n )\n setMeasuring(false)\n }, [measuring, count, maxLines])\n\n // Re-measure when the field's width changes (a wider field reveals more\n // pills again). Ignore height-only changes — our own slicing shrinks the\n // height and would otherwise feed back into an infinite measure loop.\n useIsoLayoutEffect(() => {\n const container = containerRef.current\n if (maxLines == null || container == null || typeof ResizeObserver === \"undefined\") {\n return\n }\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0\n if (Math.abs(width - lastWidth.current) < 1) return\n lastWidth.current = width\n setMeasuring(true)\n })\n observer.observe(container)\n return () => observer.disconnect()\n }, [maxLines])\n\n const resolved = maxLines == null || measuring ? count : Math.min(visibleCount, count)\n return {\n containerRef,\n visibleCount: resolved,\n hiddenCount: Math.max(0, count - resolved),\n measuring,\n }\n}\n\nexport type PillOverflowCounterProps = {\n /** How many pills are hidden. */\n count: number\n size?: PillSize\n className?: string\n}\n\n/** Static \"+N\" chip the pill controls render at the end of the visible rows.\n * Non-interactive: the visible \"+N\" is its own accessible text, and the full\n * set stays reachable via the dropdown (where one exists) or the consumer's\n * own state. */\nexport const PillOverflowCounter = ({\n count,\n size = \"md\",\n className,\n}: PillOverflowCounterProps) => (\n <span data-overflow-counter className={cn(pill({ size }), \"tabular-nums\", className)}>\n +{count}\n </span>\n)\n\ntype PillsInputClassNames = {\n root?: string\n content?: string\n startSlot?: string\n endSlot?: string\n}\n\nexport type PillsInputProps = NoAsChild<Omit<HTMLArkProps<\"div\">, \"color\">> &\n WithTestId & {\n size?: InputSize\n variant?: InputVariant\n color?: Color\n invalid?: boolean\n disabled?: boolean\n pointer?: boolean\n /** Cap the pills at N rows; the rest collapse into a static \"+N\" counter. */\n maxLines?: number\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before any trailing control. */\n endSlot?: ReactNode\n classNames?: PillsInputClassNames\n }\n\n/**\n * PillsInput — the wrapping input shell for multi-value fields. Host `Pill`s\n * and a single `PillsInput.Field` inside; the shell sizes and disables them\n * through context. Presentational by design: it holds no value state.\n *\n * `testId` here lands on the shell `<div>` itself — useful when `PillsInput`\n * is used bare. `PillsInput.Field` has its own `testId`, landing on the real\n * focusable `<input>`; prefer that one when targeting the field.\n */\nconst PillsInputBase = ({\n size = \"md\",\n variant = \"default\",\n color,\n invalid,\n disabled,\n pointer,\n maxLines,\n startSlot,\n endSlot,\n className,\n classNames,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: PillsInputProps) => {\n // Convention: pills first, the field last. Only the pills feed the line cap;\n // the field always stays visible (it is never sliced away).\n const items = Children.toArray(children)\n const field = items.length > 0 ? items[items.length - 1] : null\n const pills = items.length > 0 ? items.slice(0, -1) : []\n\n const { containerRef, visibleCount, hiddenCount, measuring } = usePillOverflow({\n maxLines,\n count: pills.length,\n })\n\n const renderedPills = (maxLines == null ? pills : pills.slice(0, visibleCount)).map((child, i) =>\n isValidElement(child)\n ? cloneElement(child as ReactElement<Record<string, unknown>>, {\n key: child.key ?? i,\n \"data-overflow-item\": true,\n })\n : child,\n )\n\n return (\n <PillGroupContext.Provider value={{ size, disabled }}>\n <ark.div\n data-color={color}\n {...props({\n \"data-invalid\": invalid,\n \"data-disabled\": disabled,\n \"data-pointer\": pointer,\n // Slot-aware padding in `inputShell` — see InputBase for the rationale.\n \"data-with-start-slot\": startSlot != null,\n \"data-with-end-slot\": endSlot != null,\n \"data-testid\": testId,\n })}\n className={cn(inputShell({ size, variant }), pillsShell, className, classNames?.root)}\n {...rest}\n >\n {startSlot != null && (\n <span className={cn(inputSlot, classNames?.startSlot)} aria-hidden>\n {startSlot}\n </span>\n )}\n <div ref={containerRef} className={cn(pillsContent({ size }), classNames?.content)}>\n {renderedPills}\n {/* Mounted during the measuring pass so the hook can size the last-row\n reservation off the real counter, but kept `invisible` then (still\n measurable) so it never paints on the SSR HTML before the first\n measure. Only mounts while measuring when a cap is configured. */}\n {(hiddenCount > 0 || (measuring && maxLines != null)) && (\n <PillOverflowCounter\n count={measuring ? pills.length : hiddenCount}\n size={size}\n className={measuring ? \"invisible\" : undefined}\n />\n )}\n {field}\n </div>\n {endSlot != null && <span className={cn(inputSlot, classNames?.endSlot)}>{endSlot}</span>}\n </ark.div>\n </PillGroupContext.Provider>\n )\n}\n\nexport type PillsInputFieldProps = ComponentPropsWithoutRef<\"input\"> &\n WithTestId & {\n /** Fired on Backspace when the field is empty — pop the last value. */\n onRemoveLast?: () => void\n }\n\nconst PillsInputField = ({\n className,\n onRemoveLast,\n onKeyDown,\n testId,\n ...rest\n}: PillsInputFieldProps) => (\n <input\n // The trailing field the overflow hook keeps on the last visible row.\n data-overflow-field\n // Grow to fill the line, but keep a clickable minimum when empty. Overrides\n // `inputControlClasses`' `w-full min-w-0` so pills can share the row.\n className={cn(inputControlClasses, \"w-auto min-w-16\", className)}\n onKeyDown={(event) => {\n if (onRemoveLast && event.key === \"Backspace\" && event.currentTarget.value === \"\") {\n onRemoveLast()\n }\n onKeyDown?.(event)\n }}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport const PillsInput = Object.assign(PillsInputBase, {\n Field: PillsInputField,\n})\n"]}
1
+ {"version":3,"sources":["../src/components/pills-input/pills-input.tsx"],"names":[],"mappings":";;;;;;;;;AAoDO,IAAM,UAAA,GAAa,GAAG,aAAa;AAMnC,IAAM,YAAA,GAAe,IAAI,2DAAA,EAA6D;AAAA,EAC3F,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI,OAAA;AAAA,MACJ,EAAA,EAAI,SAAA;AAAA,MACJ,EAAA,EAAI;AAAA;AACN,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA;AAC3B,CAAC;AAKD,IAAM,kBAAA,GAAqB,OAAO,QAAA,KAAa,WAAA,GAAc,eAAA,GAAkB,SAAA;AAWxE,SAAS,gBAAA,CAA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AG;AACL,CAAA,qBACE,GAAA;AAAA,EAAC,OAAA;AAAA,EAAA;AAAA,IAEC,qBAAA,EAAmB,IAAA;AAAA,IAGnB,SAAA,EAAW,EAAA,CAAG,mBAAA,EAAqB,iBAAA,EAAmB,SAAS,CAAA;AAAA,IAC/D,SAAA,EAAW,CAAC,KAAA,KAAU;AACpB,MAAA,IAAI,gBAAgB,KAAA,CAAM,GAAA,KAAQ,eAAe,KAAA,CAAM,aAAA,CAAc,UAAU,EAAA,EAAI;AACjF,QAAA,YAAA,EAAa;AAAA,MACf;AACA,MAAA,SAAA,GAAY,KAAK,CAAA;AAAA,IACnB,CAAA;AAAA,IACC,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,IAClC,GAAG;AAAA;AACN,CAAA;AAGK,IAAM,UAAA,GAAa,MAAA,CAAO,MAAA,CAAO,cAAA,EAAgB;AAAA,EACtD,KAAA,EAAO;AACT,CAAC","file":"chunk-FAOBC4IS.js","sourcesContent":["\"use client\"\n\nimport { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva } from \"class-variance-authority\"\nimport {\n Children,\n type ComponentPropsWithoutRef,\n cloneElement,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type InputSize,\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n} from \"../input/input\"\nimport { PillGroupContext, type PillSize, pill } from \"../pill/pill\"\n\n/**\n * PillsInput — a multi-line input shell that lays out `Pill`s alongside a search\n * field. Same chrome as `Input` (border, focus ring, invalid / disabled states)\n * but it wraps as values accumulate. It's the visual `MultiSelect` and\n * `TagsInput` mount as their target.\n *\n * - It reuses `Input`'s slot layout: a `startSlot` / `endSlot` flank a\n * `pillsContent` region that holds the `Pill`s + the field and is the only\n * thing that wraps, so a trailing control (chevron, clear) pins to the edge\n * instead of wrapping inline with the pills.\n * - Host `Pill`s + a single `PillsInputField` inside it (pills first, field\n * last). The shell sets the pill `size` / `disabled` through context, so the\n * pills match with no prop drilling.\n * - `maxLines` caps the pills at N rows and collapses the rest into a static\n * \"+N\" counter (measured, since pills have variable widths).\n *\n * Presentational by design: the value state lives with the consumer.\n */\n\n/** The pills *row*: same single-line flex shell as `inputShell`, just text-cursor\n * for the click-to-focus affordance. Layout/wrap live on `pillsContent`. */\nexport const pillsShell = cn(\"cursor-text\")\n\n/** The wrapping region inside a pills shell — holds the pills + field, grows to\n * fill the row (`flex-1`), and is the only element that wraps, so the shell's\n * start/end slots stay pinned as `shrink-0` siblings. Gap tracks `inputShell`'s\n * per-size gap so pill spacing is unchanged from the flat layout. */\nexport const pillsContent = cva(\"flex min-w-0 flex-1 flex-wrap items-center py-1 gap-y-0.5\", {\n variants: {\n size: {\n xs: \"gap-1.5\",\n sm: \"gap-1.5\",\n md: \"gap-2\",\n lg: \"gap-2.5\",\n xl: \"gap-3\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\n// `useLayoutEffect` measures before paint (no flash); fall back to `useEffect`\n// on the server so SSR doesn't warn. Measurement is client-only anyway — the\n// server render shows every pill, which is the correct no-cap fallback.\nconst useIsoLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect\n\n/**\n * Pure row-grouping math behind `usePillOverflow` (exported for testing).\n *\n * Given each measured pill's `offsetTop` (in document order), count how many\n * fit within `maxLines` wrapped rows. A jump in `offsetTop` (beyond a sub-pixel\n * epsilon) marks a new row. When the pills overflow, reserve one slot on the\n * last visible row for the \"+N\" counter (it's narrower than a typical pill, so\n * dropping one always makes room).\n */\nexport function visiblePillCount(offsetTops: number[], maxLines: number): number {\n let rows = 0\n let lastTop = Number.NEGATIVE_INFINITY\n for (let i = 0; i < offsetTops.length; i++) {\n const top = offsetTops[i] ?? lastTop\n if (top - lastTop > 1) {\n rows += 1\n lastTop = top\n if (rows > maxLines) {\n // `i` begins the row past the cap — keep the rows before it, minus one\n // for the counter.\n return Math.max(0, i - 1)\n }\n }\n }\n return offsetTops.length\n}\n\n/**\n * Like `visiblePillCount`, but also keeps the trailing input field on the last\n * visible row (exported for testing).\n *\n * `visiblePillCount` only reasons about pills, so when the last visible row is\n * packed, the field — which is `min-w-16` and the last flex child — can't claim\n * its minimum width and wraps onto a new line. A flex item wraps exactly when\n * the space left on its row drops below its `min-width`, so we drop pills until\n * the last visible pill leaves room on its row for `gap + fieldMinWidth` (plus\n * the `+N` counter, once anything is hidden). Pills are passed as their measured\n * `{ top, right }` in a single coordinate space; removing a trailing pill never\n * reflows the ones before it, so each drop is checked against real geometry.\n */\nexport function pillCountWithField(\n pills: { top: number; right: number }[],\n maxLines: number,\n rowRight: number,\n trailing: { fieldMinWidth: number; counterWidth: number; gap: number },\n): number {\n const total = pills.length\n const { fieldMinWidth, counterWidth, gap } = trailing\n // Start from the pill-only cap (already reserves one slot for the counter on\n // overflow), then back off until the field's minimum fits on the last row.\n let visible = visiblePillCount(\n pills.map((p) => p.top),\n maxLines,\n )\n while (visible > 0) {\n const last = pills[visible - 1]\n if (last == null) break\n // Hiding any pill surfaces the \"+N\" counter, which shares the last row.\n const needsCounter = visible < total\n const trailingWidth = gap + fieldMinWidth + (needsCounter ? counterWidth + gap : 0)\n if (last.right + trailingWidth <= rowRight) break\n visible--\n }\n return visible\n}\n\n/**\n * Measure how many pills fit within `maxLines` rows and how many overflow.\n *\n * Line caps are width-dependent (pills vary in width), so this measures the DOM.\n * Pills to be measured must carry `data-overflow-item`; the trailing field and\n * the counter must NOT (they would corrupt row detection) — instead the field\n * carries `data-overflow-field` and the counter `data-overflow-counter` so the\n * hook can locate and measure them without mistaking them for pills. The hook\n * renders the full set during a pre-paint \"measuring\" pass, groups pills into\n * rows, then settles on a `visibleCount` — reserving the last row for the \"+N\"\n * chip and, when a field is present, its `min-width` too, so the field never\n * wraps onto a new line (see `pillCountWithField`). Re-measures on width change\n * only (ignoring the height change our own slicing causes, which would loop).\n *\n * `measuring` is exposed so consumers can render the counter during the\n * measuring pass (it is otherwise hidden when nothing overflows), letting the\n * hook measure its real width for the last-row reservation.\n */\nexport function usePillOverflow({\n maxLines,\n count,\n}: {\n /** Cap the rendered pills at this many rows. Omit to render every pill. */\n maxLines?: number\n /** Total number of pills — drives re-measurement on add / remove. */\n count: number\n}): {\n containerRef: RefObject<HTMLDivElement | null>\n visibleCount: number\n hiddenCount: number\n measuring: boolean\n} {\n const containerRef = useRef<HTMLDivElement>(null)\n const [visibleCount, setVisibleCount] = useState(count)\n // While true, every pill is rendered so the DOM reflects the full set; flipped\n // off (pre-paint) once the cutoff is computed.\n const [measuring, setMeasuring] = useState(true)\n const lastWidth = useRef(0)\n\n // Any change to the inputs re-enters a full-render measuring pass.\n useIsoLayoutEffect(() => {\n setMeasuring(true)\n }, [count, maxLines])\n\n useIsoLayoutEffect(() => {\n if (!measuring) return\n const container = containerRef.current\n if (maxLines == null || container == null) {\n setVisibleCount(count)\n setMeasuring(false)\n return\n }\n const items = Array.from(container.querySelectorAll<HTMLElement>(\"[data-overflow-item]\"))\n lastWidth.current = container.clientWidth\n\n const fieldEl = container.querySelector<HTMLElement>(\"[data-overflow-field]\")\n if (fieldEl == null) {\n // No trailing field (e.g. TreeMultiSelect's read-only trigger) — pills +\n // counter only, the original behavior.\n setVisibleCount(\n visiblePillCount(\n items.map((el) => el.offsetTop),\n maxLines,\n ),\n )\n setMeasuring(false)\n return\n }\n\n // Field-aware: reserve the field's min width (and the counter slot) on the\n // last visible row. Measure in viewport coords via `getBoundingClientRect`\n // so pill edges and the row's right edge share one coordinate space\n // regardless of `offsetParent` (the positioned shell, not this container).\n const style = getComputedStyle(container)\n const gap = Number.parseFloat(style.columnGap || style.gap) || 0\n const rowRight = container.getBoundingClientRect().right\n const fieldMinWidth = Number.parseFloat(getComputedStyle(fieldEl).minWidth) || 0\n const counterEl = container.querySelector<HTMLElement>(\"[data-overflow-counter]\")\n const counterWidth = counterEl?.getBoundingClientRect().width ?? 0\n const pills = items.map((el) => {\n const rect = el.getBoundingClientRect()\n return { top: rect.top, right: rect.right }\n })\n setVisibleCount(\n pillCountWithField(pills, maxLines, rowRight, { fieldMinWidth, counterWidth, gap }),\n )\n setMeasuring(false)\n }, [measuring, count, maxLines])\n\n // Re-measure when the field's width changes (a wider field reveals more\n // pills again). Ignore height-only changes — our own slicing shrinks the\n // height and would otherwise feed back into an infinite measure loop.\n useIsoLayoutEffect(() => {\n const container = containerRef.current\n if (maxLines == null || container == null || typeof ResizeObserver === \"undefined\") {\n return\n }\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0\n if (Math.abs(width - lastWidth.current) < 1) return\n lastWidth.current = width\n setMeasuring(true)\n })\n observer.observe(container)\n return () => observer.disconnect()\n }, [maxLines])\n\n const resolved = maxLines == null || measuring ? count : Math.min(visibleCount, count)\n return {\n containerRef,\n visibleCount: resolved,\n hiddenCount: Math.max(0, count - resolved),\n measuring,\n }\n}\n\nexport type PillOverflowCounterProps = {\n /** How many pills are hidden. */\n count: number\n size?: PillSize\n className?: string\n}\n\n/** Static \"+N\" chip the pill controls render at the end of the visible rows.\n * Non-interactive: the visible \"+N\" is its own accessible text, and the full\n * set stays reachable via the dropdown (where one exists) or the consumer's\n * own state. */\nexport const PillOverflowCounter = ({\n count,\n size = \"md\",\n className,\n}: PillOverflowCounterProps) => (\n <span data-overflow-counter className={cn(pill({ size }), \"tabular-nums\", className)}>\n +{count}\n </span>\n)\n\ntype PillsInputClassNames = {\n root?: string\n content?: string\n startSlot?: string\n endSlot?: string\n}\n\nexport type PillsInputProps = NoAsChild<Omit<HTMLArkProps<\"div\">, \"color\">> &\n WithTestId & {\n size?: InputSize\n variant?: InputVariant\n color?: Color\n invalid?: boolean\n disabled?: boolean\n pointer?: boolean\n /** Cap the pills at N rows; the rest collapse into a static \"+N\" counter. */\n maxLines?: number\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before any trailing control. */\n endSlot?: ReactNode\n classNames?: PillsInputClassNames\n }\n\n/**\n * PillsInput — the wrapping input shell for multi-value fields. Host `Pill`s\n * and a single `PillsInput.Field` inside; the shell sizes and disables them\n * through context. Presentational by design: it holds no value state.\n *\n * `testId` here lands on the shell `<div>` itself — useful when `PillsInput`\n * is used bare. `PillsInput.Field` has its own `testId`, landing on the real\n * focusable `<input>`; prefer that one when targeting the field.\n */\nconst PillsInputBase = ({\n size = \"md\",\n variant = \"default\",\n color,\n invalid,\n disabled,\n pointer,\n maxLines,\n startSlot,\n endSlot,\n className,\n classNames,\n children,\n testId,\n asChild: _asChild,\n ...rest\n}: PillsInputProps) => {\n // Convention: pills first, the field last. Only the pills feed the line cap;\n // the field always stays visible (it is never sliced away).\n const items = Children.toArray(children)\n const field = items.length > 0 ? items[items.length - 1] : null\n const pills = items.length > 0 ? items.slice(0, -1) : []\n\n const { containerRef, visibleCount, hiddenCount, measuring } = usePillOverflow({\n maxLines,\n count: pills.length,\n })\n\n const renderedPills = (maxLines == null ? pills : pills.slice(0, visibleCount)).map((child, i) =>\n isValidElement(child)\n ? cloneElement(child as ReactElement<Record<string, unknown>>, {\n key: child.key ?? i,\n \"data-overflow-item\": true,\n })\n : child,\n )\n\n return (\n <PillGroupContext.Provider value={{ size, disabled }}>\n <ark.div\n data-color={color}\n {...props({\n \"data-invalid\": invalid,\n \"data-disabled\": disabled,\n \"data-pointer\": pointer,\n // Slot-aware padding in `inputShell` — see InputBase for the rationale.\n \"data-with-start-slot\": startSlot != null,\n \"data-with-end-slot\": endSlot != null,\n \"data-testid\": testId,\n })}\n className={cn(inputShell({ size, variant }), pillsShell, className, classNames?.root)}\n {...rest}\n >\n {startSlot != null && (\n <span className={cn(inputSlot, classNames?.startSlot)} aria-hidden>\n {startSlot}\n </span>\n )}\n <div ref={containerRef} className={cn(pillsContent({ size }), classNames?.content)}>\n {renderedPills}\n {/* Mounted during the measuring pass so the hook can size the last-row\n reservation off the real counter, but kept `invisible` then (still\n measurable) so it never paints on the SSR HTML before the first\n measure. Only mounts while measuring when a cap is configured. */}\n {(hiddenCount > 0 || (measuring && maxLines != null)) && (\n <PillOverflowCounter\n count={measuring ? pills.length : hiddenCount}\n size={size}\n className={measuring ? \"invisible\" : undefined}\n />\n )}\n {field}\n </div>\n {endSlot != null && <span className={cn(inputSlot, classNames?.endSlot)}>{endSlot}</span>}\n </ark.div>\n </PillGroupContext.Provider>\n )\n}\n\nexport type PillsInputFieldProps = ComponentPropsWithoutRef<\"input\"> &\n WithTestId & {\n /** Fired on Backspace when the field is empty — pop the last value. */\n onRemoveLast?: () => void\n }\n\nconst PillsInputField = ({\n className,\n onRemoveLast,\n onKeyDown,\n testId,\n ...rest\n}: PillsInputFieldProps) => (\n <input\n // The trailing field the overflow hook keeps on the last visible row.\n data-overflow-field\n // Grow to fill the line, but keep a clickable minimum when empty. Overrides\n // `inputControlClasses`' `w-full min-w-0` so pills can share the row.\n className={cn(inputControlClasses, \"w-auto min-w-16\", className)}\n onKeyDown={(event) => {\n if (onRemoveLast && event.key === \"Backspace\" && event.currentTarget.value === \"\") {\n onRemoveLast()\n }\n onKeyDown?.(event)\n }}\n {...props({ \"data-testid\": testId })}\n {...rest}\n />\n)\n\nexport const PillsInput = Object.assign(PillsInputBase, {\n Field: PillsInputField,\n})\n"]}
@@ -1,4 +1,4 @@
1
- import { focusStyles } from './chunk-B2LCHXUB.js';
1
+ import { focusStyles } from './chunk-INJUILCN.js';
2
2
  import { cva } from 'class-variance-authority';
3
3
 
4
4
  var controlIndicator = cva(
@@ -53,5 +53,5 @@ var controlIndicator = cva(
53
53
  );
54
54
 
55
55
  export { controlIndicator };
56
- //# sourceMappingURL=chunk-NF5JM2YO.js.map
57
- //# sourceMappingURL=chunk-NF5JM2YO.js.map
56
+ //# sourceMappingURL=chunk-FOMR74VE.js.map
57
+ //# sourceMappingURL=chunk-FOMR74VE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/checkbox/control.ts"],"names":[],"mappings":";;;AAuBO,IAAM,gBAAA,GAAmB,GAAA;AAAA,EAC9B;AAAA,IACE,0HAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,+EAAA;AAAA;AAAA,IAEA,qBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA,CAAY,EAAE,MAAA,EAAQ,oBAAA,EAAsB,CAAA;AAAA;AAAA,IAE5C,6BAAA;AAAA;AAAA,IAEA,gBAAA;AAAA;AAAA,IAEA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA,MAER,OAAA,EAAS;AAAA;AAAA,QAEP,OAAA,EAAS;AAAA,UACP,2HAAA;AAAA,UACA;AAAA,SACF;AAAA;AAAA,QAEA,MAAA,EAAQ;AAAA,UACN,6EAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,kDAAA;AAAA,QACJ,EAAA,EAAI,kDAAA;AAAA,QACJ,EAAA,EAAI,oDAAA;AAAA,QACJ,EAAA,EAAI,gDAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA,EAAM,SAAS,SAAA;AAAU;AAEtD","file":"chunk-NF5JM2YO.js","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\"\nimport { focusStyles } from \"../../lib/focus-styles\"\n\n/**\n * `controlIndicator` — the bordered box surface shared by the kit's\n * **selection** controls (`Checkbox` and `RadioGroup`). It draws the neutral\n * resting square, the palette-filled checked / indeterminate state, the focus\n * ring, and the invalid / disabled affordances; the consumer drops the actual\n * mark (a check, a minus, or a dot) inside it.\n *\n * It is deliberately shape-agnostic. `Checkbox` uses it as-is (a rounded\n * square holding a `CheckIcon` / `MinusIcon`). `Radio` imports this same cva\n * and layers `rounded-full` on top, swapping the icon for a centered dot — so\n * the two controls share one resting surface, one fill, one focus ring, and\n * one invalid state, and only diverge on the corner radius and the mark.\n *\n * Color is orthogonal: the box references the active palette only through the\n * slot vars (`--c-solid` for the fill / focus ring, `--c-on-solid` for the\n * mark), so it tints from whatever `data-color` sits on the root.\n *\n * @example Radio reuse\n * cn(controlIndicator({ size }), \"rounded-full\") // + a centered dot child\n */\nexport const controlIndicator = cva(\n [\n \"inline-flex shrink-0 items-center justify-center border transition-[background-color,border-color,box-shadow] box-border\",\n // Resting surface — the page's own ramp (`brand-50` / `brand-950`), so\n // the unchecked box reads as a hole punched in the page rather than a\n // foreign gray square. Opaque on purpose, unlike the translucent\n // `bg-white/4` of the input shell: the box has to hide whatever sits\n // under it (a ChoiceCard's tinted fill) to read as empty.\n \"bg-brand-50 dark:bg-brand-950 border-gray-light-700 dark:border-gray-dark-300\",\n // The mark inherits the on-solid foreground.\n \"text-(--c-on-solid)\",\n // The kit's standard focus ring, keyed off Zag's `data-focus-visible`\n // (the real focus is on the hidden input, so `:focus-visible` never\n // matches this box). Brand, regardless of the control's palette. It\n // lives in the base so every variant and both shapes (square, and\n // Radio's `rounded-full`) carry the same ring — no variant sets `ring-*`.\n focusStyles({ source: \"data-focus-visible\" }),\n // Invalid wins over the palette: red border.\n \"data-invalid:border-red-500\",\n // Default cursor\n \"cursor-pointer\",\n // Disabled affordances.\n \"data-disabled:opacity-60 data-disabled:cursor-not-allowed\",\n ],\n {\n variants: {\n // Each variant owns its checked / indeterminate fill.\n variant: {\n // Monochrome, palette-independent.\n default: [\n \"dark:data-[state=checked]:bg-gray-dark-100 data-[state=checked]:bg-gray-light-900 data-[state=checked]:border-transparent\",\n \"dark:data-[state=indeterminate]:bg-gray-dark-100 data-[state=indeterminate]:bg-gray-light-900 data-[state=indeterminate]:border-transparent\",\n ],\n // Palette solid, via the slot var.\n filled: [\n \"data-[state=checked]:bg-(--c-solid) data-[state=checked]:border-(--c-solid)\",\n \"data-[state=indeterminate]:bg-(--c-solid) data-[state=indeterminate]:border-(--c-solid)\",\n ],\n },\n size: {\n xs: \"size-3.5 rounded-xs [&_svg]:block [&_svg]:size-3\",\n sm: \"size-4 rounded-xs [&_svg]:block [&_svg]:size-3.5\",\n md: \"size-4.5 rounded-sm [&_svg]:block [&_svg]:size-3.5\",\n lg: \"size-5 rounded-sm [&_svg]:block [&_svg]:size-4\",\n xl: \"size-6 rounded-sm [&_svg]:block [&_svg]:size-5\",\n },\n },\n defaultVariants: { size: \"md\", variant: \"default\" },\n },\n)\n\nexport type ControlIndicatorSize = NonNullable<VariantProps<typeof controlIndicator>[\"size\"]>\nexport type ControlIndicatorVariant = NonNullable<VariantProps<typeof controlIndicator>[\"variant\"]>\n"]}
1
+ {"version":3,"sources":["../src/components/checkbox/control.ts"],"names":[],"mappings":";;;AAuBO,IAAM,gBAAA,GAAmB,GAAA;AAAA,EAC9B;AAAA,IACE,0HAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,+EAAA;AAAA;AAAA,IAEA,qBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA,CAAY,EAAE,MAAA,EAAQ,oBAAA,EAAsB,CAAA;AAAA;AAAA,IAE5C,6BAAA;AAAA;AAAA,IAEA,gBAAA;AAAA;AAAA,IAEA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA,MAER,OAAA,EAAS;AAAA;AAAA,QAEP,OAAA,EAAS;AAAA,UACP,2HAAA;AAAA,UACA;AAAA,SACF;AAAA;AAAA,QAEA,MAAA,EAAQ;AAAA,UACN,6EAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,kDAAA;AAAA,QACJ,EAAA,EAAI,kDAAA;AAAA,QACJ,EAAA,EAAI,oDAAA;AAAA,QACJ,EAAA,EAAI,gDAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB,EAAE,IAAA,EAAM,IAAA,EAAM,SAAS,SAAA;AAAU;AAEtD","file":"chunk-FOMR74VE.js","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\"\nimport { focusStyles } from \"../../lib/focus-styles\"\n\n/**\n * `controlIndicator` — the bordered box surface shared by the kit's\n * **selection** controls (`Checkbox` and `RadioGroup`). It draws the neutral\n * resting square, the palette-filled checked / indeterminate state, the focus\n * ring, and the invalid / disabled affordances; the consumer drops the actual\n * mark (a check, a minus, or a dot) inside it.\n *\n * It is deliberately shape-agnostic. `Checkbox` uses it as-is (a rounded\n * square holding a `CheckIcon` / `MinusIcon`). `Radio` imports this same cva\n * and layers `rounded-full` on top, swapping the icon for a centered dot — so\n * the two controls share one resting surface, one fill, one focus ring, and\n * one invalid state, and only diverge on the corner radius and the mark.\n *\n * Color is orthogonal: the box references the active palette only through the\n * slot vars (`--c-solid` for the fill / focus ring, `--c-on-solid` for the\n * mark), so it tints from whatever `data-color` sits on the root.\n *\n * @example Radio reuse\n * cn(controlIndicator({ size }), \"rounded-full\") // + a centered dot child\n */\nexport const controlIndicator = cva(\n [\n \"inline-flex shrink-0 items-center justify-center border transition-[background-color,border-color,box-shadow] box-border\",\n // Resting surface — the page's own ramp (`brand-50` / `brand-950`), so\n // the unchecked box reads as a hole punched in the page rather than a\n // foreign gray square. Opaque on purpose, unlike the translucent\n // `bg-white/4` of the input shell: the box has to hide whatever sits\n // under it (a ChoiceCard's tinted fill) to read as empty.\n \"bg-brand-50 dark:bg-brand-950 border-gray-light-700 dark:border-gray-dark-300\",\n // The mark inherits the on-solid foreground.\n \"text-(--c-on-solid)\",\n // The kit's standard focus ring, keyed off Zag's `data-focus-visible`\n // (the real focus is on the hidden input, so `:focus-visible` never\n // matches this box). Brand, regardless of the control's palette. It\n // lives in the base so every variant and both shapes (square, and\n // Radio's `rounded-full`) carry the same ring — no variant sets `ring-*`.\n focusStyles({ source: \"data-focus-visible\" }),\n // Invalid wins over the palette: red border.\n \"data-invalid:border-red-500\",\n // Default cursor\n \"cursor-pointer\",\n // Disabled affordances.\n \"data-disabled:opacity-60 data-disabled:cursor-not-allowed\",\n ],\n {\n variants: {\n // Each variant owns its checked / indeterminate fill.\n variant: {\n // Monochrome, palette-independent.\n default: [\n \"dark:data-[state=checked]:bg-gray-dark-100 data-[state=checked]:bg-gray-light-900 data-[state=checked]:border-transparent\",\n \"dark:data-[state=indeterminate]:bg-gray-dark-100 data-[state=indeterminate]:bg-gray-light-900 data-[state=indeterminate]:border-transparent\",\n ],\n // Palette solid, via the slot var.\n filled: [\n \"data-[state=checked]:bg-(--c-solid) data-[state=checked]:border-(--c-solid)\",\n \"data-[state=indeterminate]:bg-(--c-solid) data-[state=indeterminate]:border-(--c-solid)\",\n ],\n },\n size: {\n xs: \"size-3.5 rounded-xs [&_svg]:block [&_svg]:size-3\",\n sm: \"size-4 rounded-xs [&_svg]:block [&_svg]:size-3.5\",\n md: \"size-4.5 rounded-sm [&_svg]:block [&_svg]:size-3.5\",\n lg: \"size-5 rounded-sm [&_svg]:block [&_svg]:size-4\",\n xl: \"size-6 rounded-sm [&_svg]:block [&_svg]:size-5\",\n },\n },\n defaultVariants: { size: \"md\", variant: \"default\" },\n },\n)\n\nexport type ControlIndicatorSize = NonNullable<VariantProps<typeof controlIndicator>[\"size\"]>\nexport type ControlIndicatorVariant = NonNullable<VariantProps<typeof controlIndicator>[\"variant\"]>\n"]}