@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
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/select/select.tsx"],"names":["Ark"],"mappings":";;;;;;;;;;;;;;;;;;AAgJA,IAAM,UAAA,GAAa,CAAC,CAAA,KAClB,CAAA,KAAM,MAAA,GAAY,MAAA,GAAY,CAAA,KAAM,IAAA,GAAO,EAAC,GAAI,CAAC,CAAC,CAAA;AAQpD,IAAM,gBAAgB,CAAC;AAAA,EACrB,GAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,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AAA,EACtD,QAAA,EAAA,MAAA,GACG,OAAO,GAAA,CAAI,CAAC,0BACV,IAAA,CAACA,QAAA,CAAI,WAAJ,EACC,QAAA,EAAA;AAAA,0BAAA,GAAA,CAACA,SAAI,cAAA,EAAJ,EAAmB,SAAA,EAAW,iBAAA,EAC5B,gBAAM,KAAA,EACT,CAAA;AAAA,UACC,KAAA,CAAM,KAAA,CAAM,GAAA,CAAI,YAAY;AAAA,SAAA,EAAA,EAJX,KAAA,CAAM,KAK1B,CACD,CAAA,GACD,KAAA,CAAM,IAAI,YAAY,CAAA,EAC5B,CAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,wBAEA,GAAA,CAACA,QAAA,CAAI,YAAA,EAAJ,EAAkB,GAAG,WAAA,EAAa;AAAA;AAAA;AAAA,GACrC;AAGF,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAW,UAAA,EAAY,KAAA;AAAA,MACvB,UAAA,EAAY,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAM;AAAA,MAEtC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-SVKU3GUN.js","sourcesContent":["\"use client\"\n\nimport { useFieldContext } from \"@ark-ui/react/field\"\nimport { Portal } from \"@ark-ui/react/portal\"\nimport { Select as Ark } from \"@ark-ui/react/select\"\nimport {\n type ComponentProps,\n type FocusEvent,\n type ReactNode,\n type Ref,\n useMemo,\n useRef,\n} from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Color } from \"../../lib/colors\"\nimport { controlOpenProps } from \"../../lib/control-open\"\nimport { mergeRefs } from \"../../lib/merge-refs\"\nimport { useOverlayContainer } from \"../../lib/overlay-container\"\nimport { NestedLayer } from \"../../lib/overlay-layer\"\nimport { props } from \"../../lib/props\"\nimport {\n type ClearSectionMode,\n type NormalizedItem,\n normalizeSelectData,\n type RenderableItem,\n type RenderItem,\n type SelectData,\n type SelectValue,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { COMBOBOX_DEFAULT_TRANSLATIONS, type ComboboxTranslations } from \"../combobox/combobox\"\nimport { type FieldProps, FieldShell, fieldA11yProps } from \"../field/field\"\nimport {\n type InputSize,\n type InputVariant,\n inputShell,\n inputSlot,\n placeholderColor,\n shellGap,\n} from \"../input/input\"\nimport { CheckIcon, ChevronIcon, CloseIcon } from \"../popover/icons\"\nimport {\n popoverChevron,\n popoverClearTrigger,\n popoverContent,\n popoverGroupLabel,\n popoverIndicator,\n popoverList,\n popoverOption,\n scrollHighlightedIntoView,\n} from \"../popover/popover\"\n\n/**\n * Select — data-driven single-value picker on Ark UI's Select machine. Pass\n * `data` and it renders: a styled trigger, a popover of options, native form\n * submission (hidden `<select>`), typeahead, and full keyboard / RTL / ARIA from\n * Ark. For a *searchable* picker use `Autocomplete`; for multiple values use\n * `MultiSelect`.\n *\n * - `data` accepts `string[]`, `{ value, label?, disabled? }[]`, or grouped\n * `{ group, items }[]` (see `SelectData`).\n * - Value is a single `string | null`; the machine's array contract is hidden.\n * - Label / description / error come from the built-in `Field` wrapper, so a\n * `Select` is accessible and complete on its own.\n * - `clearable` swaps the chevron for a clear button once a value is set.\n *\n * Palette rides on `data-color`; the trigger reuses the shared input shell and\n * the popover the shared option styling, so Select and Combobox look identical.\n */\n\ntype SelectClassNames = {\n field?: string\n /** The label element itself — e.g. `\"sr-only\"` to keep the accessible name\n * without showing it (pair with a sibling element for a visible label\n * placed elsewhere in the layout). */\n label?: string\n control?: string\n option?: string\n popover?: string\n}\n\nexport type SelectProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled value. */\n value?: SelectValue<Data> | null\n /** Uncontrolled initial value. */\n defaultValue?: SelectValue<Data> | null\n /** Fires with the selected value (or `null` when cleared). */\n onChange?: (value: SelectValue<Data> | null) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including any check\n * affordance. Omit it to render the label + selected check.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder shown while no value is selected. */\n placeholder?: string\n /** Show a clear button (and allow deselecting) once a value is set. */\n clearable?: boolean\n /** Whether the clear button replaces the chevron (`\"replace\"`, default) or sits beside it (`\"both\"`). */\n clearSectionMode?: ClearSectionMode\n /** Inline-start adornment (icon, label). */\n startSlot?: ReactNode\n /** Inline-end adornment — rendered before the chevron / clear button. */\n endSlot?: ReactNode\n size?: InputSize\n variant?: InputVariant\n color?: Color\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Wires the hidden `<select>` into native form submission. */\n name?: string\n /** Forwarded to the trigger; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLButtonElement>) => void\n /** Lands on the trigger `<button>` for focus-on-error. */\n ref?: Ref<HTMLButtonElement>\n /** Render the panel in a Portal so it escapes clipping ancestors.\n * Default `true`. */\n withinPortal?: boolean\n /** Portal target. Defaults to the enclosing `Modal`/`Drawer` when there is\n * one (so the panel stays above it), else `document.body`. */\n container?: HTMLElement | null\n className?: string\n classNames?: SelectClassNames\n /** Overrides the clear button's (`clearTriggerLabel`, default `\"Clear value\"`) and the\n * chevron's (`triggerLabel`, default `\"Show options\"`) accessible names — the same keys as\n * the rest of the combobox family. A partial override keeps the other default. */\n translations?: SelectTranslations\n }\n\n/** Ark's own Select `translations` type (its `clearTriggerLabel`), derived structurally rather\n * than imported from `@zag-js/select`, plus the combobox family's `triggerLabel` for the\n * kit's own chevron button. */\nexport type SelectTranslations = NonNullable<Ark.RootProps<NormalizedItem>[\"translations\"]> &\n Pick<ComboboxTranslations, \"triggerLabel\">\n\n/** Wrap a scalar value into Ark's array contract (or clear with `[]`). */\nconst toArkValue = (v: string | null | undefined): string[] | undefined =>\n v === undefined ? undefined : v === null ? [] : [v]\n\n/**\n * The real, focusable `<button role=\"combobox\">`, split out so it reads the\n * `Field` context from *inside* the wrapping `FieldShell` — `Select` itself\n * renders that shell, so calling `useFieldContext()` at its own top level\n * would run too early.\n */\nconst SelectTrigger = ({\n ref,\n onBlur,\n invalid,\n testId,\n className,\n children,\n}: {\n ref?: Ref<HTMLButtonElement>\n onBlur?: (event: FocusEvent<HTMLButtonElement>) => void\n invalid: boolean\n className?: string\n children: ReactNode\n} & WithTestId) => {\n const field = useFieldContext()\n return (\n <Ark.Trigger\n ref={ref}\n onBlur={onBlur}\n aria-invalid={invalid || undefined}\n {...fieldA11yProps(field)}\n {...props({ \"data-testid\": testId })}\n className={className}\n >\n {children}\n </Ark.Trigger>\n )\n}\n\nexport const Select = <const Data extends SelectData = SelectData>({\n withinPortal = true,\n container,\n data,\n value,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Pick a value\",\n clearable,\n clearSectionMode = \"replace\",\n startSlot,\n endSlot,\n size = \"md\",\n variant = \"default\",\n color,\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n ...selectProps\n}: SelectProps<Data> & Omit<ComponentProps<\"select\">, keyof SelectProps>) => {\n const resolvedTranslations = { ...COMBOBOX_DEFAULT_TRANSLATIONS, ...translations }\n const portalContainer = useOverlayContainer(container)\n const { collection, items, groups } = useMemo(() => normalizeSelectData(data), [data])\n const controlRef = useRef<HTMLDivElement>(null)\n const triggerRef = useRef<HTMLButtonElement>(null)\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 const selected = items.find(({ value: iv }) => value === iv)\n\n const renderOption = (item: NormalizedItem) => (\n <Ark.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={cn(popoverOption({ size }), classNames?.option)}\n >\n {renderItem ? (\n <Ark.ItemContext>\n {(ctx) =>\n renderItem(item as unknown as RenderableItem<Data>, {\n selected: ctx.selected,\n highlighted: ctx.highlighted,\n })\n }\n </Ark.ItemContext>\n ) : (\n <>\n <Ark.ItemText>{item.label}</Ark.ItemText>\n <Ark.ItemIndicator className={popoverIndicator}>\n <CheckIcon />\n </Ark.ItemIndicator>\n </>\n )}\n </Ark.Item>\n )\n\n const control = (\n <Ark.Root\n collection={collection}\n value={toArkValue(value)}\n defaultValue={toArkValue(defaultValue)}\n // The machine's collection is typed by value (`string`); the runtime value\n // always originates from `data`, so narrow it back to the caller's value union.\n onValueChange={\n onChange ? (d) => onChange((d.value[0] ?? null) as SelectValue<Data> | null) : undefined\n }\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n deselectable={clearable}\n translations={resolvedTranslations}\n // Ark anchors Select's positioner to the Trigger, which sits inside the\n // padded `inputShell` Control — so `sameWidth` would inset the panel. Anchor\n // to the full Control instead (matching Combobox), so the panel aligns with\n // and matches the trigger's width.\n positioning={{\n sameWidth: true,\n getAnchorRect: () => controlRef.current?.getBoundingClientRect() ?? null,\n }}\n // Content is an `overflow-hidden` clip wrapper, so the machine's native\n // auto-scroll (which needs Content scrollable) no-ops; route scrolling to\n // the inner List scroller instead.\n scrollToIndexFn={scrollHighlightedIntoView}\n data-color={color}\n // `relative` contains the absolutely positioned hidden input, which would\n // otherwise escape any scroller this control sits in.\n className={cn(\"relative w-full\", className)}\n >\n <Ark.Context>\n {(api) => {\n const showClear = Boolean(clearable) && api.hasSelectedItems && !disabled && !readOnly\n const showChevron = clearSectionMode === \"both\" || !showClear\n return (\n <Ark.Control\n ref={controlRef}\n {...props({\n \"data-invalid\": isInvalid,\n \"data-with-start-slot\": startSlot != null,\n // The trigger always ends in a chevron / clear control.\n \"data-with-end-slot\": true,\n })}\n // Tablet affordance: a tap on the shell's dead zones (padding) opens\n // the menu too, not just the trigger. The trigger, clear and chevron\n // are all buttons, so the helper skips them and they self-handle.\n // Inert when disabled / readOnly, so it never opens where the trigger won't.\n {...(disabled || readOnly ? {} : controlOpenProps(() => api.setOpen(true)))}\n className={cn(inputShell({ size, variant }), \"cursor-pointer\", classNames?.control)}\n >\n <SelectTrigger\n ref={mergeRefs(triggerRef, ref)}\n onBlur={onBlur}\n invalid={isInvalid}\n testId={testId}\n className={cn(\n \"flex min-w-0 flex-1 cursor-pointer items-center bg-transparent text-start outline-none disabled:cursor-not-allowed\",\n // Slots live inside the trigger (not the shell), so re-apply the\n // shell's per-size gap here to space the icon from the value.\n shellGap[size],\n )}\n >\n {startSlot != null && (\n <span className={inputSlot} aria-hidden>\n {startSlot}\n </span>\n )}\n <span className=\"min-w-0 flex-1 truncate text-start\">\n {api.hasSelectedItems ? (\n renderItem && selected ? (\n renderItem(selected as unknown as RenderableItem<Data>, {\n selected: false,\n highlighted: false,\n })\n ) : (\n api.valueAsString\n )\n ) : (\n <span className={placeholderColor}>{placeholder}</span>\n )}\n </span>\n {endSlot != null && <span className={inputSlot}>{endSlot}</span>}\n </SelectTrigger>\n {showClear && (\n <Ark.ClearTrigger className={popoverClearTrigger}>\n <CloseIcon />\n </Ark.ClearTrigger>\n )}\n {showChevron && (\n // A sibling toggle button (the value `Ark.Trigger` can't nest it\n // next to the clear button), so the chevron sits at the far edge\n // like the rest of the family. Focus the trigger first so keyboard\n // nav stays on the combobox; `preventDefault` stops the tap from\n // stealing focus to this button. `tabIndex=-1`: the trigger is the\n // tab stop.\n <button\n type=\"button\"\n tabIndex={-1}\n aria-label={resolvedTranslations.triggerLabel}\n data-chevron\n className={cn(\n popoverChevron,\n \"inline-flex cursor-pointer items-center justify-center rounded-sm data-disabled:cursor-not-allowed\",\n api.open && \"rotate-180\",\n )}\n {...props({\n \"data-disabled\": disabled,\n \"data-readonly\": readOnly,\n })}\n onPointerDown={(event) => event.preventDefault()}\n {...(!(disabled || readOnly) && {\n onClick: () => {\n triggerRef.current?.focus()\n api.setOpen(!api.open)\n },\n })}\n >\n <ChevronIcon />\n </button>\n )}\n </Ark.Control>\n )\n }}\n </Ark.Context>\n\n {/* Holds an enclosing Modal/Drawer/Popover open while the list is; see `lib/overlay-layer.tsx`. */}\n <Ark.Context>{(api) => <NestedLayer open={api.open} />}</Ark.Context>\n <Portal disabled={!withinPortal} container={portalContainer}>\n <Ark.Positioner>\n <Ark.Content data-color={color} className={cn(popoverContent, classNames?.popover)}>\n <Ark.List className={popoverList({ withPaddingTop: true })}>\n {groups\n ? groups.map((group) => (\n <Ark.ItemGroup key={group.group}>\n <Ark.ItemGroupLabel className={popoverGroupLabel}>\n {group.group}\n </Ark.ItemGroupLabel>\n {group.items.map(renderOption)}\n </Ark.ItemGroup>\n ))\n : items.map(renderOption)}\n </Ark.List>\n </Ark.Content>\n </Ark.Positioner>\n </Portal>\n\n <Ark.HiddenSelect {...selectProps} />\n </Ark.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n classNames={{ label: classNames?.label }}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { props } from './chunk-WYCMIIRR.js';
2
2
  import { cn } from './chunk-QP4I37PA.js';
3
- import { Field as Field$1 } from '@ark-ui/react/field';
3
+ import { ark } from '@ark-ui/react/factory';
4
+ import { Field as Field$1, useFieldContext } from '@ark-ui/react/field';
4
5
  import { cva } from 'class-variance-authority';
5
6
  import { jsx, jsxs } from 'react/jsx-runtime';
6
7
 
@@ -68,6 +69,7 @@ var FieldShell = ({
68
69
  className,
69
70
  classNames,
70
71
  testId,
72
+ composite,
71
73
  children
72
74
  }) => {
73
75
  const hasField = label != null || description != null || error != null || Boolean(required);
@@ -84,10 +86,15 @@ var FieldShell = ({
84
86
  className,
85
87
  classNames,
86
88
  testId,
89
+ composite,
87
90
  children
88
91
  }
89
92
  );
90
93
  };
94
+ var CompositeLabel = (labelProps) => {
95
+ const { htmlFor: _htmlFor, ...fieldLabelProps } = useFieldContext().getLabelProps();
96
+ return /* @__PURE__ */ jsx(ark.span, { ...fieldLabelProps, ...labelProps });
97
+ };
91
98
  var Field = ({
92
99
  label,
93
100
  description,
@@ -99,10 +106,12 @@ var Field = ({
99
106
  className,
100
107
  classNames,
101
108
  testId,
109
+ composite,
102
110
  asChild: _asChild,
103
111
  ...rest
104
112
  }) => {
105
113
  const isInvalid = invalid ?? error != null;
114
+ const Label = composite ? CompositeLabel : Field$1.Label;
106
115
  return /* @__PURE__ */ jsxs(
107
116
  Field$1.Root,
108
117
  {
@@ -112,7 +121,7 @@ var Field = ({
112
121
  ...props({ "data-testid": testId }),
113
122
  ...rest,
114
123
  children: [
115
- label != null && /* @__PURE__ */ jsxs(Field$1.Label, { className: cn(fieldLabel({ size }), classNames?.label), children: [
124
+ label != null && /* @__PURE__ */ jsxs(Label, { className: cn(fieldLabel({ size }), classNames?.label), children: [
116
125
  label,
117
126
  required && /* @__PURE__ */ jsx(
118
127
  Field$1.RequiredIndicator,
@@ -145,5 +154,5 @@ var Field = ({
145
154
  };
146
155
 
147
156
  export { Field, FieldShell, fieldA11yProps, fieldLabel, fieldRoot };
148
- //# sourceMappingURL=chunk-FHG54IT5.js.map
149
- //# sourceMappingURL=chunk-FHG54IT5.js.map
157
+ //# sourceMappingURL=chunk-TBTSEPGP.js.map
158
+ //# sourceMappingURL=chunk-TBTSEPGP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/field/field.tsx"],"names":["Ark"],"mappings":";;;;;;;AAqCO,IAAM,SAAA,GAAY,IAAI,+BAAA,EAAiC;AAAA,EAC5D,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,EAAA,EAAI,OAAA,EAAS,EAAA,EAAI,OAAA,EAAS,EAAA,EAAI,SAAA,EAAW,EAAA,EAAI,SAAA,EAAW,EAAA,EAAI,OAAA;AAAQ,GAC9E;AAAA,EACA,eAAA,EAAiB,EAAE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AA,CAAI,SAAA;AAAA,UAAJ;AAAA,YACC,SAAA,EAAW,GAAG,UAAA,CAAW,EAAE,MAAM,CAAA,EAAG,YAAY,KAAK,CAAA;AAAA,YACpD,GAAG,MAAM,EAAE,aAAA,EAAe,UAAU,CAAA,EAAG,MAAM,UAAU,CAAA;AAAA,YAEvD,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-TBTSEPGP.js","sourcesContent":["\"use client\"\n\nimport { ark } from \"@ark-ui/react/factory\"\nimport { Field as Ark, type UseFieldContext, useFieldContext } from \"@ark-ui/react/field\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\"\nimport type { NoAsChild } from \"../../lib/as-child\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\n\n/**\n * Field — label / description / error scaffold for any form control, on top of\n * Ark UI's `Field`. It is the *one* place the family wires accessible names and\n * descriptions: drop a field-aware control inside (the kit's `Input`, `Select`,\n * `Combobox`, … all qualify) and Ark hands it the right `id`,\n * `aria-describedby`, `aria-invalid`, `disabled`, and `required` through\n * context — no manual plumbing per control.\n *\n * - `label` renders a `<label>` bound to the control (click-to-focus).\n * - `description` (helper text) sits between the label and the control.\n * `error` sits below the control and renders independently of it — both\n * can be visible at once. Passing `error` flips the field to `invalid`,\n * which both styles field-aware controls red and associates the message.\n * - `required` adds the semantic flag and a red asterisk in the label.\n * - `size` scales only the field's own typography; set the control's `size`\n * separately (the family components forward both).\n *\n * Every other prop (incl. `disabled`, `readOnly`, `id`) forwards to Ark's\n * `Field.Root`. `asChild` is a compile error: the field renders its label,\n * helper and error rows around the control, which can't live inside one\n * element.\n */\n\n// `relative` contains a `sr-only` label (and any hidden input rendered inside\n// the field): absolutely positioned with no offsets, it would otherwise be laid\n// out against the page and escape any scroller the field sits in.\nexport const fieldRoot = cva(\"relative flex w-full flex-col\", {\n variants: {\n size: { xs: \"gap-1\", sm: \"gap-1\", md: \"gap-1.5\", lg: \"gap-1.5\", xl: \"gap-2\" },\n },\n defaultVariants: { size: \"md\" },\n})\n\nexport const fieldLabel = cva(\n [\n \"inline-flex items-center font-medium select-none text-trim\",\n \"text-gray-light-700 dark:text-gray-dark-300\",\n \"data-disabled:opacity-60\",\n ],\n {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-sm\",\n md: \"text-sm\",\n lg: \"text-md\",\n xl: \"text-lg\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst fieldHelp = cva(\"text-gray-light-600 dark:text-gray-dark-400\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-xs\",\n md: \"text-xs\",\n lg: \"text-sm\",\n xl: \"text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\nconst fieldError = cva(\"text-red-600 dark:text-red-400\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-xs\",\n md: \"text-xs\",\n lg: \"text-sm\",\n xl: \"text-sm\",\n },\n },\n defaultVariants: { size: \"md\" },\n})\n\nexport type FieldSize = NonNullable<VariantProps<typeof fieldRoot>[\"size\"]>\n\n/**\n * `aria-describedby` / `aria-errormessage` / `aria-labelledby` for a control nested\n * in a `Field`. Points `aria-describedby` at the error text id directly once\n * `invalid`, rather than trusting `field.ariaDescribedby`'s own DOM-presence-tracked\n * inclusion of it (a `MutationObserver` check that doesn't reliably catch up for\n * every control) — and adds `aria-errormessage`, which Ark's field getters never\n * emit for any control. `aria-labelledby` points at the id already rendered on\n * `Field`'s own `<label>`: needed because `NumberInput`, `PasswordInput`,\n * `TagsInput`, `Select`, and `SegmentGroup`'s real interactive element isn't\n * `Field`'s own `Ark.Input`, so it never otherwise carries an id matching the\n * label's `htmlFor`.\n */\nexport const fieldA11yProps = (field: UseFieldContext) => ({\n \"aria-describedby\": field?.invalid ? field.ids.errorText : field?.ariaDescribedby,\n \"aria-errormessage\": field?.invalid ? field.ids.errorText : undefined,\n \"aria-labelledby\": field?.ids.label,\n})\n\ntype FieldClassNames = {\n root?: string\n label?: string\n description?: string\n error?: string\n requiredIndicator?: string\n}\n\nexport type FieldProps = NoAsChild<Omit<ComponentPropsWithoutRef<typeof Ark.Root>, \"className\">> &\n VariantProps<typeof fieldRoot> &\n WithTestId & {\n /** Accessible name, rendered as a `<label>` bound to the control. */\n label?: ReactNode\n /** Helper text between the label and the control. */\n description?: ReactNode\n /** Error message below the control; its presence sets `invalid`. */\n error?: ReactNode\n /**\n * The control is a composite — a radio group, a row of inputs — with no single labelable\n * element for the `<label>` to point at. The label then renders as plain text with no `for`\n * (which would otherwise reference an id nothing carries) and names the control only through\n * the `aria-labelledby` that `fieldA11yProps` puts on it.\n */\n composite?: boolean\n /** Styles the field root (matching the kit's other components). */\n className?: string\n classNames?: FieldClassNames\n }\n\n/**\n * Wrap a control in a `Field` only when there's something to wire (label /\n * description / error / required) — otherwise render it bare. The data-driven\n * pickers all end with this, so it lives here instead of five copies. Bare is\n * important: an empty `Field` would still make Ark controls reference a label\n * that isn't rendered.\n */\nexport const FieldShell = ({\n label,\n description,\n error,\n required,\n disabled,\n size,\n className,\n classNames,\n testId,\n composite,\n children,\n}: Pick<\n FieldProps,\n | \"label\"\n | \"description\"\n | \"error\"\n | \"required\"\n | \"disabled\"\n | \"size\"\n | \"className\"\n | \"classNames\"\n | \"testId\"\n | \"composite\"\n> & { children: ReactNode }) => {\n const hasField = label != null || description != null || error != null || Boolean(required)\n if (!hasField) return children\n return (\n <Field\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={className}\n classNames={classNames}\n testId={testId}\n composite={composite}\n >\n {children}\n </Field>\n )\n}\n\n/**\n * `Ark.Label`'s props on a `<span>`, minus its `for`: Ark always binds the label to\n * `field.ids.control`, an id only `Ark.Input` (or a machine reading it, like `NumberInput`'s) ever\n * renders. A composite control has no such element, so the binding would dangle — and a `<label>`\n * with nothing to label is no better. Its name comes from `aria-labelledby` pointing at this\n * span's id instead. Ark's `mergeProps` ignores an `undefined` override, so `htmlFor` has to be\n * left out rather than unset on `Ark.Label`.\n */\nconst CompositeLabel = (labelProps: ComponentPropsWithoutRef<\"span\">) => {\n const { htmlFor: _htmlFor, ...fieldLabelProps } = useFieldContext().getLabelProps()\n return <ark.span {...fieldLabelProps} {...labelProps} />\n}\n\nexport const Field = ({\n label,\n description,\n error,\n required,\n invalid,\n size,\n children,\n className,\n classNames,\n testId,\n composite,\n asChild: _asChild,\n ...rest\n}: FieldProps) => {\n const isInvalid = invalid ?? error != null\n const Label = composite ? CompositeLabel : Ark.Label\n\n return (\n <Ark.Root\n required={required}\n invalid={isInvalid}\n className={cn(fieldRoot({ size }), className, classNames?.root)}\n {...props({ \"data-testid\": testId })}\n {...rest}\n >\n {label != null && (\n <Label className={cn(fieldLabel({ size }), classNames?.label)}>\n {label}\n {required && (\n <Ark.RequiredIndicator\n className={cn(\"ms-0.5 text-red-500\", classNames?.requiredIndicator)}\n >\n *\n </Ark.RequiredIndicator>\n )}\n </Label>\n )}\n\n {description != null && (\n <Ark.HelperText\n className={cn(fieldHelp({ size }), classNames?.description)}\n {...props({ \"data-testid\": testId && `${testId}-description` })}\n >\n {description}\n </Ark.HelperText>\n )}\n\n {children}\n\n {error != null && (\n <Ark.ErrorText\n className={cn(fieldError({ size }), classNames?.error)}\n {...props({ \"data-testid\": testId && `${testId}-error` })}\n >\n {error}\n </Ark.ErrorText>\n )}\n </Ark.Root>\n )\n}\n"]}
@@ -1,8 +1,9 @@
1
+ import { controlIndicator } from './chunk-FOMR74VE.js';
1
2
  import { normalizeSelectData, filterSelectData } from './chunk-TWGCWKRV.js';
2
- import { Combobox } from './chunk-6OLTJYSX.js';
3
- import { inputSlot, inputControlClasses, inputShell } from './chunk-5OQLFX47.js';
4
- import { FieldShell } from './chunk-FHG54IT5.js';
5
- import { popoverClearTrigger, popoverCheckbox } from './chunk-6GDMSENK.js';
3
+ import { COMBOBOX_DEFAULT_TRANSLATIONS, Combobox } from './chunk-PINENGML.js';
4
+ import { inputSlot, inputControlClasses, inputShell } from './chunk-Z6RPMRFH.js';
5
+ import { FieldShell } from './chunk-TBTSEPGP.js';
6
+ import { popoverClearTrigger } from './chunk-LM6F6DLR.js';
6
7
  import { useUncontrolled } from './chunk-BEL75C7N.js';
7
8
  import { CloseIcon, CheckIcon } from './chunk-IG7FBZVM.js';
8
9
  import { props } from './chunk-WYCMIIRR.js';
@@ -37,8 +38,10 @@ var MultiComboboxList = ({
37
38
  error,
38
39
  className,
39
40
  classNames,
40
- testId
41
+ testId,
42
+ translations
41
43
  }) => {
44
+ const clearLabel = translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel;
42
45
  const isInvalid = invalid || error != null;
43
46
  const [value, setSelected] = useUncontrolled({
44
47
  value: valueProp,
@@ -70,7 +73,15 @@ var MultiComboboxList = ({
70
73
  "data-testid": item.testId,
71
74
  className: cn("group/item", classNames?.option),
72
75
  children: (state) => renderItem ? renderItem(item, state) : /* @__PURE__ */ jsxs(Fragment, { children: [
73
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn(popoverCheckbox({ size }), classNames?.checkbox), children: /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
76
+ /* @__PURE__ */ jsx(
77
+ "span",
78
+ {
79
+ "aria-hidden": true,
80
+ "data-state": state.selected ? "checked" : "unchecked",
81
+ className: cn(controlIndicator({ size, variant: "filled" }), classNames?.checkbox),
82
+ children: /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
83
+ }
84
+ ),
74
85
  /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: item.label })
75
86
  ] })
76
87
  },
@@ -124,7 +135,7 @@ var MultiComboboxList = ({
124
135
  "button",
125
136
  {
126
137
  type: "button",
127
- "aria-label": "Clear value",
138
+ "aria-label": clearLabel,
128
139
  "aria-hidden": !showClear,
129
140
  tabIndex: showClear ? 0 : -1,
130
141
  onPointerDown: (event) => event.preventDefault(),
@@ -163,5 +174,5 @@ var MultiComboboxList = ({
163
174
  };
164
175
 
165
176
  export { MultiComboboxList };
166
- //# sourceMappingURL=chunk-HT5JAHR3.js.map
167
- //# sourceMappingURL=chunk-HT5JAHR3.js.map
177
+ //# sourceMappingURL=chunk-UJZIF2BA.js.map
178
+ //# sourceMappingURL=chunk-UJZIF2BA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/multi-combobox-list/multi-combobox-list.tsx"],"names":["ArkCombobox"],"mappings":";;;;;;;;;;;;;;;AA4HO,IAAM,oBAAoB,CAA6C;AAAA,EAC5E,IAAA;AAAA,EACA,KAAA,EAAO,SAAA;AAAA,EACP,YAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA,GAAc,cAAA;AAAA,EACd,KAAA,GAAQ,eAAA;AAAA,EACR,SAAA;AAAA,EACA,SAAA;AAAA,EACA,iBAAA;AAAA,EACA,IAAA,GAAO,IAAA;AAAA,EACP,OAAA,GAAU,UAAA;AAAA,EACV,QAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAAoC;AAClC,EAAA,MAAM,UAAA,GACJ,YAAA,EAAc,iBAAA,IAAqB,6BAAA,CAA8B,iBAAA;AAKnE,EAAA,MAAM,SAAA,GAAY,WAAW,KAAA,IAAS,IAAA;AAEtC,EAAA,MAAM,CAAC,KAAA,EAAO,WAAW,CAAA,GAAI,eAAA,CAAwB;AAAA,IACnD,KAAA,EAAO,SAAA;AAAA,IACP,YAAA,EAAc,gBAAgB,E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ark-ui/react/combobox\"\nimport { SearchIcon } from \"lucide-react\"\nimport { type FocusEvent, type ReactNode, type Ref, useMemo, useState } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport {\n filterSelectData,\n type NormalizedItem,\n normalizeSelectData,\n type RenderableItem,\n type RenderItem,\n type SelectData,\n type SelectValue,\n} from \"../../lib/select-data\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { useUncontrolled } from \"../../lib/use-uncontrolled\"\nimport { controlIndicator } from \"../checkbox/control\"\nimport {\n COMBOBOX_DEFAULT_TRANSLATIONS,\n Combobox,\n type ComboboxTranslations,\n} from \"../combobox/combobox\"\nimport { type FieldProps, FieldShell } from \"../field/field\"\nimport {\n type InputSize,\n type InputVariant,\n inputControlClasses,\n inputShell,\n inputSlot,\n} from \"../input/input\"\nimport { CheckIcon, CloseIcon } from \"../popover/icons\"\nimport { popoverClearTrigger } from \"../popover/popover\"\n\n/**\n * MultiComboboxList — a searchable, multi-value option list with no trigger of\n * its own. Same idea as [`ComboboxList`](/docs/combobox-list) but for several\n * values at once: every option shows a checkbox instead of a single check\n * mark, and picking one doesn't close the list. It renders permanently open —\n * embed it inline inside a container you already control the visibility of\n * (a `Popover`, a `Drawer`, a custom panel).\n *\n * - `data` / `value` / `onChange` match [`MultiSelect`](/docs/multi-select)\n * exactly (`SelectValue<Data>[]`) — but options render as a checkbox list\n * rather than pills in the input, which is lighter in a compact popover.\n * - Type to filter; `clearable` clears every value at once; `maxValues` caps\n * the selection; `hidePickedOptions` drops chosen options from the list.\n * - Label / description / error come from the built-in `Field`, same as the\n * rest of the family — omit them when embedding inside your own popover.\n */\n\ntype MultiComboboxListClassNames = {\n /** The field wrapper (label / description / error). */\n field?: string\n /** The search row (also targeted by `className`). */\n search?: string\n /** The search `<input>`. */\n input?: string\n /** A single option row. */\n option?: string\n /** The checkbox indicator inside an option row. */\n checkbox?: string\n /** The scrollable option list. */\n list?: string\n}\n\nexport type MultiComboboxListProps<Data extends SelectData = SelectData> = Pick<\n FieldProps,\n \"label\" | \"description\" | \"error\" | \"required\"\n> &\n WithTestId & {\n /** Options: `string[]`, `{ value, label?, disabled? }[]`, or `{ group, items }[]`. */\n data: Data\n /** Controlled selected values. */\n value?: SelectValue<Data>[]\n /** Uncontrolled initial selection. */\n defaultValue?: SelectValue<Data>[]\n /** Fires with the full selection on every add / remove. */\n onChange?: (value: SelectValue<Data>[]) => void\n /**\n * Render each option yourself. Receives the (value-narrowed) item and its live\n * `{ selected, highlighted }` state; you own the whole row, including the\n * checkbox affordance. Omit it to render the checkbox + label.\n */\n renderItem?: RenderItem<Data>\n /** Placeholder for the search field. */\n placeholder?: string\n /** Message shown when no option matches. Pass `null` to render nothing. */\n empty?: ReactNode\n /** Show a button that clears every value at once. */\n clearable?: boolean\n /** Cap the number of selected values. */\n maxValues?: number\n /** Hide options that are already selected. */\n hidePickedOptions?: boolean\n size?: InputSize\n /**\n * Search row treatment. Defaults to `\"unstyled\"` (no border/background) since\n * this is normally embedded inside a container that already draws its own\n * chrome; pass `\"default\"` / `\"filled\"` when using it standalone.\n */\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n /** Red invalid state, independent of (and OR'd with) `error`. */\n invalid?: boolean\n /** Name for native form submission (one hidden input per value). */\n name?: string\n /** Forwarded to the search input; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Lands on the focusable search `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n className?: string\n classNames?: MultiComboboxListClassNames\n /** Overrides the clear button's accessible name (`clearTriggerLabel`, default\n * `\"Clear value\"`) — the same key as the rest of the combobox family. */\n translations?: MultiComboboxListTranslations\n }\n\n/** The combobox family's `clearTriggerLabel` — the only family key this always-open list\n * renders (it has no chevron). */\nexport type MultiComboboxListTranslations = Pick<ComboboxTranslations, \"clearTriggerLabel\">\n\nexport const MultiComboboxList = <const Data extends SelectData = SelectData>({\n data,\n value: valueProp,\n defaultValue,\n onChange,\n renderItem,\n placeholder = \"Search…\",\n empty = \"Nothing found\",\n clearable,\n maxValues,\n hidePickedOptions,\n size = \"md\",\n variant = \"unstyled\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n onBlur,\n ref,\n label,\n description,\n error,\n className,\n classNames,\n testId,\n translations,\n}: MultiComboboxListProps<Data>) => {\n const clearLabel =\n translations?.clearTriggerLabel ?? COMBOBOX_DEFAULT_TRANSLATIONS.clearTriggerLabel\n type Item = SelectValue<Data>\n\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 const [value, setSelected] = useUncontrolled<Item[]>({\n value: valueProp,\n defaultValue: defaultValue ?? [],\n onChange,\n })\n const [search, setSearch] = useState(\"\")\n\n const setValues = (next: Item[]) => {\n // Adding past the cap is rejected; removals always pass.\n if (maxValues != null && next.length > value.length && next.length > maxValues) {\n return\n }\n setSelected(next)\n }\n\n // Normalize once per `data`; only the filter re-runs as the query/selection changes.\n const normalized = useMemo(() => normalizeSelectData(data), [data])\n const { collection, items, groups } = useMemo(() => {\n const q = search.trim().toLowerCase()\n const picked = new Set<string>(value)\n return filterSelectData(\n normalized,\n (item) =>\n (!hidePickedOptions || !picked.has(item.value)) &&\n (q === \"\" || item.label.toLowerCase().includes(q)),\n )\n }, [normalized, search, hidePickedOptions, value])\n\n // `canClear` reserves the clear button's box (and the shell's end-slot\n // padding) for the whole time the field is clearable, not just while it\n // has a value — otherwise the button mounting/unmounting shifts the\n // search input's width. `showClear` only toggles visibility/interactivity.\n const canClear = Boolean(clearable) && !disabled && !readOnly\n const showClear = canClear && ((value != null && value.length > 0) || search.length > 0)\n\n const renderOption = (item: NormalizedItem) => (\n <Combobox.Item\n key={item.value}\n item={item}\n data-testid={item.testId}\n className={cn(\"group/item\", classNames?.option)}\n >\n {(state) =>\n renderItem ? (\n renderItem(item as unknown as RenderableItem<Data>, state)\n ) : (\n <>\n {/* Presentational: the option row owns the selection semantics.\n It borrows Checkbox's own box, driven by `data-state` the way\n Ark drives the real one, so the two never drift apart. */}\n <span\n aria-hidden\n data-state={state.selected ? \"checked\" : \"unchecked\"}\n className={cn(controlIndicator({ size, variant: \"filled\" }), classNames?.checkbox)}\n >\n <ArkCombobox.ItemIndicator>\n <CheckIcon />\n </ArkCombobox.ItemIndicator>\n </span>\n <span className=\"min-w-0 flex-1 truncate\">{item.label}</span>\n </>\n )\n }\n </Combobox.Item>\n )\n\n const control = (\n <Combobox.Root<NormalizedItem>\n multiple\n collection={collection}\n value={value}\n // Ark types the values as `string[]`; they always originate from `data`,\n // so narrow them back to the caller's value union.\n onValueChange={(details) => setValues(details.value as Item[])}\n inputValue={search}\n onInputValueChange={(details) => setSearch(details.inputValue)}\n selectionBehavior=\"clear\"\n // There's no trigger to open it — the caller (e.g. a `Popover`) already\n // owns whether this mounts at all, so keep the machine permanently open.\n open\n onOpenChange={() => {}}\n // The caller's own container (Popover, Drawer, …) already owns\n // dismiss-on-outside-click; without this the always-open machine\n // registers its own (functionally inert, since `onOpenChange` is a\n // no-op) listbox dismissable layer, which logs a spurious\n // \"[@zag-js/dismissable] node is `null` or `undefined`\" warning.\n disableLayer\n closeOnSelect={false}\n autoFocus\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n variant={variant}\n className={className}\n >\n <div\n {...props({ \"data-invalid\": isInvalid, \"data-with-end-slot\": canClear })}\n className={cn(\n inputShell({ size, variant }),\n \"rounded-none border-t-0 border-e-0 border-s-0 border-b border-brand-900/20 dark:border-white/15\",\n classNames?.search,\n )}\n >\n <span className={inputSlot} aria-hidden>\n <SearchIcon />\n </span>\n {/* Ark's own Input (a forwardRef) so the caller's `ref` lands on the\n real focusable `<input>` for RHF focus-on-error; the kit's\n `Combobox.Input` wrapper only adds `inputControlClasses`, replicated\n here. `name` is intentionally NOT here — it would submit the typed\n search text, not the selection (see the hidden inputs below). */}\n <ArkCombobox.Input\n placeholder={placeholder}\n onBlur={onBlur}\n ref={ref}\n aria-invalid={isInvalid || undefined}\n {...props({ \"data-testid\": testId })}\n className={cn(inputControlClasses, classNames?.input)}\n />\n {canClear && (\n <button\n type=\"button\"\n aria-label={clearLabel}\n aria-hidden={!showClear}\n tabIndex={showClear ? 0 : -1}\n onPointerDown={(event) => event.preventDefault()}\n onClick={() => {\n setValues([])\n setSearch(\"\")\n }}\n className={cn(popoverClearTrigger, !showClear && \"invisible\")}\n >\n <CloseIcon />\n </button>\n )}\n </div>\n\n <Combobox.Panel className={classNames?.list}>\n {groups\n ? groups.map((group) => (\n <Combobox.Group key={group.group} label={group.group}>\n {group.items.map(renderOption)}\n </Combobox.Group>\n ))\n : items.map(renderOption)}\n {empty != null && <Combobox.Empty>{empty}</Combobox.Empty>}\n </Combobox.Panel>\n\n {/* Hidden inputs carry the real selection so a native `<form>` submits\n the value array (the search input is unnamed). When controlled by a\n form library the value flows through `onChange` instead, and these\n are just submitted alongside it. */}\n {name != null && value.map((v) => <input key={v} type=\"hidden\" name={name} value={v} />)}\n </Combobox.Root>\n )\n\n return (\n <FieldShell\n label={label}\n description={description}\n error={error}\n required={required}\n disabled={disabled}\n size={size}\n className={classNames?.field}\n >\n {control}\n </FieldShell>\n )\n}\n"]}
@@ -1,15 +1,18 @@
1
- import { calendarValueToDate, dateToCalendarValue, fromArkValues, toArkValues } from './chunk-TCWYBVIL.js';
2
- import { ActionIcon } from './chunk-S7N4LGLZ.js';
1
+ import { calendarValueToDate, dateToArkValue, fromArkValues, toArkValues } from './chunk-ZB5VMGKB.js';
2
+ import { useTimeZone } from './chunk-57BTVRRB.js';
3
+ import { useIsomorphicLayoutEffect } from './chunk-BUIHQJGE.js';
4
+ import { ActionIcon } from './chunk-RIP5G47F.js';
3
5
  import { ChevronLeftIcon, ChevronRightIcon } from './chunk-IG7FBZVM.js';
4
6
  import { props } from './chunk-WYCMIIRR.js';
5
- import { focusStyles } from './chunk-B2LCHXUB.js';
7
+ import { focusStyles } from './chunk-INJUILCN.js';
6
8
  import { cn } from './chunk-QP4I37PA.js';
7
- import { DatePicker } from '@ark-ui/react/date-picker';
9
+ import { DatePicker, useDatePickerContext } from '@ark-ui/react/date-picker';
8
10
  import { useLocaleContext } from '@ark-ui/react/locale';
9
- import { getLocalTimeZone } from '@internationalized/date';
11
+ import { useRef } from 'react';
10
12
  import { cva } from 'class-variance-authority';
11
13
  import { match } from 'ts-pattern';
12
14
  import { jsx, jsxs } from 'react/jsx-runtime';
15
+ import { today, isSameDay } from '@internationalized/date';
13
16
 
14
17
  var dayCellTrigger = cva(
15
18
  [
@@ -286,6 +289,29 @@ var CalendarBody = ({
286
289
  )
287
290
  ] })).exhaustive();
288
291
  } });
292
+ var hashArkValues = (values) => values.map(String).join(",");
293
+ var CalendarZoneSync = ({
294
+ timeZone,
295
+ controlled,
296
+ pendingRef
297
+ }) => {
298
+ const api = useDatePickerContext();
299
+ const previous = useRef({ timeZone, value: api.value });
300
+ useIsomorphicLayoutEffect(() => {
301
+ const { timeZone: from, value: before } = previous.current;
302
+ previous.current = { timeZone, value: api.value };
303
+ if (from === timeZone) return;
304
+ const after = controlled ? api.value : before.map((value) => dateToArkValue(calendarValueToDate(value, from), timeZone));
305
+ if (!controlled && after.length > 0) {
306
+ pendingRef.current = hashArkValues(after);
307
+ api.setValue(after);
308
+ }
309
+ const anchorBefore = before[0] ?? today(from);
310
+ const focused = api.focusedValue;
311
+ api.setFocusedValue(isSameDay(focused, anchorBefore) ? after[0] ?? today(timeZone) : focused);
312
+ });
313
+ return null;
314
+ };
289
315
  var resolveCalendarTranslations = (overrides) => overrides;
290
316
  var Calendar = ({
291
317
  range,
@@ -319,9 +345,10 @@ var Calendar = ({
319
345
  }) => {
320
346
  const { locale: contextLocale } = useLocaleContext();
321
347
  const resolvedLocale = locale ?? contextLocale;
322
- const resolvedTimeZone = timeZone ?? getLocalTimeZone();
348
+ const resolvedTimeZone = useTimeZone(timeZone);
323
349
  const isRange = Boolean(range);
324
- return /* @__PURE__ */ jsx(
350
+ const zoneReseed = useRef(null);
351
+ return /* @__PURE__ */ jsxs(
325
352
  DatePicker.Root,
326
353
  {
327
354
  inline: true,
@@ -333,20 +360,22 @@ var Calendar = ({
333
360
  translations: resolveCalendarTranslations(translations),
334
361
  value: toArkValues(value, resolvedTimeZone),
335
362
  defaultValue: toArkValues(defaultValue, resolvedTimeZone),
336
- onValueChange: onChange ? (
337
- // The machine's value is a plain DateValue[]; `range` is a runtime flag here, so
338
- // narrow the result back to the caller's declared shape.
339
- (details) => onChange(
363
+ onValueChange: (details) => {
364
+ if (zoneReseed.current === hashArkValues(details.value)) {
365
+ zoneReseed.current = null;
366
+ return;
367
+ }
368
+ onChange?.(
340
369
  fromArkValues(details.value, isRange, resolvedTimeZone)
341
- )
342
- ) : void 0,
370
+ );
371
+ },
343
372
  onBlur,
344
373
  numOfMonths,
345
374
  fixedWeeks,
346
375
  showWeekNumbers: withWeekNumbers,
347
376
  isDateUnavailable: isDateUnavailable ? (dateValue) => isDateUnavailable(calendarValueToDate(dateValue, resolvedTimeZone), resolvedTimeZone) : void 0,
348
- min: min ? dateToCalendarValue(min, resolvedTimeZone) : void 0,
349
- max: max ? dateToCalendarValue(max, resolvedTimeZone) : void 0,
377
+ min: min ? dateToArkValue(min, resolvedTimeZone) : void 0,
378
+ max: max ? dateToArkValue(max, resolvedTimeZone) : void 0,
350
379
  minView,
351
380
  maxView,
352
381
  disabled,
@@ -356,21 +385,31 @@ var Calendar = ({
356
385
  name,
357
386
  className: cn("inline-flex flex-col", className, classNames?.root),
358
387
  ...props({ "data-testid": testId }),
359
- children: /* @__PURE__ */ jsx(DatePicker.Content, { children: /* @__PURE__ */ jsx(
360
- CalendarBody,
361
- {
362
- numOfMonths,
363
- withWeekNumbers,
364
- renderDay,
365
- size,
366
- timeZone: resolvedTimeZone,
367
- classNames
368
- }
369
- ) })
388
+ children: [
389
+ /* @__PURE__ */ jsx(
390
+ CalendarZoneSync,
391
+ {
392
+ timeZone: resolvedTimeZone,
393
+ controlled: value !== void 0,
394
+ pendingRef: zoneReseed
395
+ }
396
+ ),
397
+ /* @__PURE__ */ jsx(DatePicker.Content, { children: /* @__PURE__ */ jsx(
398
+ CalendarBody,
399
+ {
400
+ numOfMonths,
401
+ withWeekNumbers,
402
+ renderDay,
403
+ size,
404
+ timeZone: resolvedTimeZone,
405
+ classNames
406
+ }
407
+ ) })
408
+ ]
370
409
  }
371
410
  );
372
411
  };
373
412
 
374
- export { Calendar, CalendarBody, calendarGridWidth, resolveCalendarTranslations };
375
- //# sourceMappingURL=chunk-UHNRAI6V.js.map
376
- //# sourceMappingURL=chunk-UHNRAI6V.js.map
413
+ export { Calendar, CalendarBody, CalendarZoneSync, calendarGridWidth, hashArkValues, resolveCalendarTranslations };
414
+ //# sourceMappingURL=chunk-VZBUQNLX.js.map
415
+ //# sourceMappingURL=chunk-VZBUQNLX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/calendar/calendar-body.tsx","../src/components/calendar/calendar-zone-sync.tsx","../src/components/calendar/calendar.tsx"],"names":["Ark","useRef","jsxs","jsx"],"mappings":";;;;;;;;;;;;;;;;AAsDA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB;AAAA,IACE,gEAAA;AAAA,IACA,kEAAA;AAAA,IACA,0DAAA;AAAA,IACA,oBAAA;AAAA,IACA,WAAA,CAAY,EAAE,MAAA,EAAQ,KAAA,EAAO,CAAA;AAAA,IAC7B,oDAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,uNAAA;AAAA,IACA,qGAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsBA,oDAAA;AAAA,IACA,kDAAA;AAAA,IACA,8DAAA;AAAA,IACA,8DAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,yDAAA;AAAA,IACA,mFAAA;AAAA,IACA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MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAA,EAAW,YAAY,IAAI,CAAA;AAAA,MAChE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAanC,QAAA,EAAA;AAAA,wBAAAG,GAAAA;AAAA,UAAC,gBAAA;AAAA,UAAA;AAAA,YACC,QAAA,EAAU,gBAAA;AAAA,YACV,YAAY,KAAA,KAAU,MAAA;AAAA,YACtB,UAAA,EAAY;AAAA;AAAA,SACd;AAAA,wBACAA,GAAAA,CAACH,UAAAA,CAAI,OAAA,EAAJ,EACC,QAAA,kBAAAG,GAAAA;AAAA,UAAC,YAAA;AAAA,UAAA;AAAA,YACC,WAAA;AAAA,YACA,eAAA;AAAA,YACA,SAAA;AAAA,YACA,IAAA;AAAA,YACA,QAAA,EAAU,gBAAA;AAAA,YACV;AAAA;AAAA,SACF,EACF;AAAA;AAAA;AAAA,GACF;AAEJ","file":"chunk-VZBUQNLX.js","sourcesContent":["import { DatePicker as Ark } from \"@ark-ui/react/date-picker\"\nimport { cva } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport { match } from \"ts-pattern\"\nimport { cn } from \"../../lib/cn\"\nimport { calendarValueToDate } from \"../../lib/date-value\"\nimport { focusStyles } from \"../../lib/focus-styles\"\nimport type { Size } from \"../../lib/sizes\"\nimport { ActionIcon } from \"../action-icon/action-icon\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../popover/icons\"\n\n/**\n * CalendarBody — the shared grid module behind both `Calendar` (inline) and, later,\n * `DatePicker` (popover): the RFC §3 \"one implementation, not two\" module. It renders only the\n * grid anatomy (`View` / `ViewControl` / nav triggers / `Table*` / `MonthSelect` / `YearSelect`)\n * — deliberately **not** `Control` / `Content` / `Positioner` / `Trigger` / `ClearTrigger`, the\n * popover-only chrome that belongs to `DatePicker`, not here.\n *\n * Every part below self-connects to the nearest ancestor `Ark.Root` via Ark's own React\n * context, so this module needs no `api` prop threaded in — both `Calendar` and `DatePicker`\n * just mount it as a plain child inside their own differently-configured `Ark.Root`.\n *\n * Not barrel-exported (no export from `calendar/index.ts`) — `DatePicker` reaches it directly\n * via `import { CalendarBody } from \"../calendar/calendar-body\"`, the established cross-folder\n * pattern for a shared internal part (`multi-select.tsx` → `../combobox/combobox`,\n * `drawer.tsx` → `../action-icon/action-icon`).\n */\n\nexport type CalendarBodyClassNames = {\n /** The prev/label/next navigation row. */\n header?: string\n /** Each rendered `<table>` (one per visible month in the day view). */\n table?: string\n /** Each day cell's clickable trigger. */\n day?: string\n}\n\nexport type CalendarBodyProps = {\n /** Months shown side by side in the day view. */\n numOfMonths?: number\n withWeekNumbers?: boolean\n /** Per-day decoration slot (RFC §9's \"event dot\"). Receives a native `Date` — converted from\n * Ark's `DateValue` at the point of the call, via the same `timeZone` the root was configured\n * with — and the day's live selection state. */\n renderDay?: (date: Date, ctx: { isUnavailable: boolean; isSelected: boolean }) => ReactNode\n size?: Size\n /** The time zone the nearest `Ark.Root` was configured with. Required (not read from Ark's\n * own api, which exposes no public `timeZone` getter) so `renderDay`'s Date conversion uses\n * the exact same boundary `Calendar`/`DatePicker` used to build the root's own value —\n * see `lib/date-value.ts`'s module doc on why this one conversion point matters. */\n timeZone: string\n classNames?: CalendarBodyClassNames\n}\n\nconst dayCellTrigger = cva(\n [\n \"relative flex size-full items-center justify-center rounded-xs\",\n \"cursor-pointer select-none tabular-nums transition-colors-radius\",\n \"hover:bg-gray-light-950/20 dark:hover:bg-gray-dark-50/20\",\n \"focus-visible:z-10\",\n focusStyles({ offset: false }),\n \"data-today:font-semibold data-today:text-brand-500\",\n // `!` (important) on bg/text: a day can be `data-today` *and* `data-selected` at once (e.g.\n // the default `new Date()` value), or a range endpoint is simultaneously `data-selected` *and*\n // `data-in-range` (the closed interval includes its own ends) — without `!`, these rules fight\n // over the same `background-color`/`color` and Tailwind's variant ordering (not this class\n // list's order) can win the wrong one, e.g. leaving the selected cell's text the same color\n // as its own solid-fill background, invisible. `data-selected` — the solid highlight — always\n // wins over both.\n \"data-selected:bg-gray-light-950! dark:data-selected:bg-gray-dark-50! data-selected:text-(--c-on-solid)! data-selected:font-semibold data-selected:hover:bg-gray-light-700! dark:data-selected:hover:bg-gray-dark-300!\",\n \"data-in-range:rounded-none data-in-range:bg-gray-light-950/10 dark:data-in-range:bg-gray-dark-50/10\",\n // Pill-cap rounding, split into two independently-true conditions rather than reacting to\n // `data-range-start`/`data-range-end` alone: a lone click (before any second day exists)\n // still carries `data-range-start`, and capping on that alone made the first pick look like\n // an already-established range extending rightward.\n //\n // 1. A genuinely *committed* range exists — `data-range-committed` is set from\n // `api.value.length === 2` in JS, not from the DOM. An earlier version checked whether the\n // *other* endpoint's `data-range-start`/`data-range-end` was present anywhere among the\n // visible months instead — that broke as soon as only one endpoint's month was in view\n // (e.g. the range was set, then the calendar paged away from one end): the other endpoint\n // was never rendered at all, so its attribute could never be found, and the cap silently\n // stopped applying to the *visible* endpoint too, even though the range was still fully\n // committed. `api.value` reflects the committed selection regardless of what's currently\n // paged into view, so this doesn't have that failure mode.\n // 2. A genuine *live hover preview* toward a different day — self-contained on this cell's\n // own attributes, no group lookup needed: `hoveredRangeValue` is `[start, hoveredValue]`\n // sorted chronologically, so the anchor cell gets exactly one of `data-hover-range-start` /\n // `data-hover-range-end` when truly hovering elsewhere (direction decides which), but\n // *both* simultaneously when the pointer is merely resting on the same cell it just\n // clicked (a zero-width hover range) — requiring the other one be *absent* rules out that\n // degenerate, \"changes before you've moved anywhere\" case.\n \"data-range-start:data-range-committed:rounded-s-xs\",\n \"data-range-end:data-range-committed:rounded-e-xs\",\n \"data-hover-range-start:not-data-hover-range-end:rounded-s-xs\",\n \"data-hover-range-end:not-data-hover-range-start:rounded-e-xs\",\n // The degenerate case above (pointer resting on the just-clicked day, `data-hover-range-start`\n // and `data-hover-range-end` both present on this same cell) still falls into `data-in-range`\n // (a zero-width range trivially contains itself), which would otherwise render it\n // `rounded-none` — sharp corners, reading as broken rather than \"just this one day, nothing\n // decided yet.\" Round it fully instead, `!` to beat that `data-in-range:rounded-none`\n // regardless of Tailwind's variant ordering.\n \"data-hover-range-start:data-hover-range-end:rounded-xs!\",\n \"data-outside-range:text-gray-light-500 dark:data-outside-range:text-gray-dark-700\",\n \"data-in-range:data-outside-range:text-gray-light-700 dark:data-in-range:data-outside-range:text-gray-dark-400\",\n \"data-unavailable:pointer-events-none data-unavailable:text-gray-light-300 data-unavailable:line-through dark:data-unavailable:text-gray-dark-700\",\n \"data-disabled:pointer-events-none data-disabled:opacity-40\",\n ],\n {\n variants: {\n size: {\n xs: \"size-7 text-xs\",\n sm: \"size-8 text-xs\",\n md: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n xl: \"size-11 text-base\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\n/** Day-cell pixel size per `size`, matching `dayCellTrigger`'s `size-*` variants (`size-7`..\n * `size-11`) — the day view's own total width. The month/year grids below are plain `<table>`s\n * that would otherwise size to their own (longer) text content instead, so at `numOfMonths ===\n * 1` a month grid comes out *wider* than the day view (overflowing a fixed-width ancestor, e.g.\n * `DatePicker`'s popover column, which is sized off this same geometry via `calendarGridWidth`)\n * and a year grid comes out *narrower* (leaving unfilled space instead of stretching to match).\n * Pinning both to this exact width — `table-fixed` divides it evenly across columns — keeps\n * every view the same footprint. */\nconst DAY_CELL_SIZE: Record<Size, number> = { xs: 28, sm: 32, md: 36, lg: 40, xl: 44 }\n/** Gap between adjacent months in the day view (`gap-6`). */\nconst MONTH_GAP = 24\n\nexport const calendarGridWidth = (size: Size, numOfMonths: number): number =>\n DAY_CELL_SIZE[size] * 7 * numOfMonths + MONTH_GAP * (numOfMonths - 1)\n\nconst gridCellTrigger = cva(\n [\n \"flex w-full items-center justify-center truncate rounded-sm px-2 py-2.5\",\n \"cursor-pointer transition-colors\",\n \"hover:bg-gray-light-100 dark:hover:bg-gray-dark-800\",\n focusStyles({ offset: false }),\n \"data-selected:bg-(--c-solid) data-selected:text-(--c-on-solid) data-selected:hover:bg-(--c-solid-hover)\",\n \"data-disabled:pointer-events-none data-disabled:opacity-40\",\n ],\n {\n variants: {\n size: { xs: \"text-xs\", sm: \"text-xs\", md: \"text-sm\", lg: \"text-base\", xl: \"text-base\" },\n },\n defaultVariants: { size: \"md\" },\n },\n)\n\nconst weekdayHeader =\n \"pb-1 text-center text-xs font-medium text-gray-light-500 dark:text-gray-dark-400\"\n\nconst weekNumberCell = cn(\n \"p-1 align-top text-center text-xs font-medium text-gray-light-500 dark:text-gray-dark-400 h-full\",\n)\n\nconst navIcon = (direction: \"prev\" | \"next\", size: Size | undefined, className?: string) => (\n // The glyphs are physical; prev sits on the inline-start edge, which is the\n // right one under RTL, so both chevrons mirror to keep pointing outward.\n <ActionIcon\n variant=\"subtle\"\n color=\"neutral\"\n size={size}\n className={cn(\"rtl:[&_svg]:rotate-180\", className)}\n >\n {direction === \"prev\" ? <ChevronLeftIcon /> : <ChevronRightIcon />}\n </ActionIcon>\n)\n\n/** `ActionIcon`'s own rendered height per `size` (its `h-7`..`h-12` variants) — the day view's\n * nav row is pinned to this so the prev/next icons and the view-trigger control are the same\n * height, instead of the icons (overlaid on the control, see below) poking out top and bottom of\n * a shorter, text-sized row. */\nconst NAV_ICON_SIZE: Record<Size, number> = { xs: 28, sm: 32, md: 36, lg: 40, xl: 48 }\n\nexport const CalendarBody = ({\n numOfMonths = 1,\n withWeekNumbers,\n renderDay,\n size = \"md\",\n timeZone,\n classNames,\n}: CalendarBodyProps) => (\n <Ark.Context>\n {(api) => {\n const nav = (\n <Ark.ViewControl\n className={cn(\"mb-2 flex items-strech justify-between gap-1\", classNames?.header)}\n >\n <Ark.PrevTrigger asChild>{navIcon(\"prev\", size)}</Ark.PrevTrigger>\n <Ark.ViewTrigger\n className={cn(\n \"transition-colors\",\n \"min-w-0 flex-1 cursor-pointer truncate rounded-sm px-2 py-1 text-center text-sm font-medium\",\n \"hover:bg-gray-light-100 dark:hover:bg-gray-dark-800\",\n focusStyles({ offset: false }),\n \"disabled:pointer-events-none disabled:opacity-50\",\n )}\n >\n {api.visibleRange.end.month === api.visibleRange.start.month\n ? api.visibleRangeText.start\n : api.visibleRangeText.formatted}\n </Ark.ViewTrigger>\n <Ark.NextTrigger asChild>{navIcon(\"next\", size)}</Ark.NextTrigger>\n </Ark.ViewControl>\n )\n\n // A real, two-endpoint committed range — read off the machine's own value, not the DOM, so\n // it stays true regardless of whether either endpoint's month is currently paged into view\n // (see the pill-cap rounding comment in `dayCellTrigger` above).\n const isCommittedRange = api.value.length === 2\n\n return match(api.view)\n .with(\"day\", () => (\n <Ark.View view=\"day\">\n <div\n className=\"grid items-center justify-center\"\n style={{\n gridTemplateColumns: `repeat(${numOfMonths}, auto)`,\n columnGap: MONTH_GAP,\n rowGap: 8,\n }}\n >\n {/* The prev/next icons are overlaid on the control (`absolute`), not given their\n * own grid columns — this row's total width must stay exactly the width of the\n * day tables below (the columns this grid actually has), because `DatePicker`\n * sizes its popover to that exact figure (`calendarGridWidth`, `date-picker.tsx`).\n * Extra icon columns would push this row wider than that budget and force the\n * popover to scroll. */}\n <div\n className={cn(\"relative\", classNames?.header)}\n style={{\n gridColumn: `1 / span ${numOfMonths}`,\n gridRow: 1,\n height: NAV_ICON_SIZE[size],\n }}\n >\n <Ark.PrevTrigger asChild>\n {navIcon(\"prev\", size, \"absolute start-0 top-1/2 z-10 -translate-y-1/2\")}\n </Ark.PrevTrigger>\n {/* One button, not one per month — Ark's month/year view is a single shared grid\n * (confirmed below), so every month's label leads to the exact same destination;\n * splitting it into N `Ark.ViewTrigger`s would only duplicate the same generated\n * `id`/`aria-label` across them. Its own `repeat(numOfMonths, 1fr)` columns land\n * on the exact same boundaries as the day-table columns below (both divide the\n * same total width, with the same gap, into the same number of equal shares —\n * true because every month always renders at the same cell size) — so no width\n * formula is duplicated between this row and the tables, and it degenerates to\n * the `numOfMonths === 1` case for free.\n *\n * The button itself stays full width (so its grid tracks — and hence its click\n * target — line up with the tables below), but its *visible* hover pill is a\n * separate, inset layer (`group-hover`) that stops short of the prev/next icons\n * instead of running the full width underneath them. */}\n <Ark.ViewTrigger\n className={cn(\n \"group relative grid size-full cursor-pointer items-center rounded-sm text-sm font-medium transition-colors\",\n focusStyles({ offset: false }),\n \"disabled:pointer-events-none disabled:opacity-50\",\n )}\n style={{\n gridTemplateColumns: `repeat(${numOfMonths}, 1fr)`,\n columnGap: MONTH_GAP,\n }}\n >\n <span\n aria-hidden\n className=\"pointer-events-none absolute inset-y-0 rounded-sm transition-colors group-hover:bg-gray-light-100 dark:group-hover:bg-gray-dark-800\"\n style={{\n insetInlineStart: NAV_ICON_SIZE[size],\n insetInlineEnd: NAV_ICON_SIZE[size],\n }}\n />\n {Array.from({ length: numOfMonths }, (_, monthIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.\n <span key={monthIndex} className=\"relative min-w-0 truncate text-center\">\n {api.getOffset({ months: monthIndex }).visibleRangeText.start}\n </span>\n ))}\n </Ark.ViewTrigger>\n <Ark.NextTrigger asChild>\n {navIcon(\"next\", size, \"absolute end-0 top-1/2 z-10 -translate-y-1/2\")}\n </Ark.NextTrigger>\n </div>\n\n {Array.from({ length: numOfMonths }, (_, monthIndex) => {\n const offset = api.getOffset({ months: monthIndex })\n return (\n <Ark.Table\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of adjacent months, never reordered.\n key={monthIndex}\n style={{ gridColumn: monthIndex + 1, gridRow: 2 }}\n className={cn(\"border-separate border-spacing-0\", classNames?.table)}\n >\n <Ark.TableHead>\n <Ark.TableRow>\n {withWeekNumbers && <Ark.WeekNumberHeaderCell className={weekdayHeader} />}\n {api.weekDays.map((weekDay) => (\n <Ark.TableHeader key={weekDay.long} className={weekdayHeader}>\n {weekDay.narrow}\n </Ark.TableHeader>\n ))}\n </Ark.TableRow>\n </Ark.TableHead>\n <Ark.TableBody>\n {offset.weeks.map((week, weekIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length run of consecutive weeks, never reordered.\n <Ark.TableRow key={weekIndex}>\n {withWeekNumbers && (\n <Ark.WeekNumberCell weekIndex={weekIndex} week={week}>\n <span className={weekNumberCell}>{api.getWeekNumber(week)}</span>\n </Ark.WeekNumberCell>\n )}\n {week.map((value) => {\n const cellState = renderDay\n ? api.getDayTableCellState({\n value,\n visibleRange: offset.visibleRange,\n })\n : undefined\n return (\n <Ark.TableCell\n key={value.toString()}\n value={value}\n visibleRange={offset.visibleRange}\n >\n <Ark.TableCellTrigger\n data-range-committed={isCommittedRange || undefined}\n className={cn(dayCellTrigger({ size }), classNames?.day)}\n >\n {value.day}\n {cellState &&\n renderDay?.(calendarValueToDate(value, timeZone), {\n isUnavailable: cellState.unavailable,\n isSelected: cellState.selected,\n })}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n )\n })}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n )\n })}\n </div>\n </Ark.View>\n ))\n .with(\"month\", () => (\n <Ark.View view=\"month\">\n {nav}\n <Ark.Table\n className={cn(\"mx-auto table-fixed\", classNames?.table)}\n style={{ width: calendarGridWidth(size, numOfMonths) }}\n >\n <Ark.TableBody>\n {/* \"short\" (e.g. \"Jan\"), not the default \"long\" (\"January\") — the grid's width is\n * pinned to the day view's (see `calendarGridWidth` above), which at a single\n * narrow month can be too tight for full month names across 4 columns. */}\n {api.getMonthsGrid({ columns: 4, format: \"short\" }).map((row, rowIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.\n <Ark.TableRow key={rowIndex}>\n {row.map((month) => (\n <Ark.TableCell key={month.value} value={month.value}>\n <Ark.TableCellTrigger className={gridCellTrigger({ size })}>\n {month.label}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n ))}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n </Ark.View>\n ))\n .with(\"year\", () => (\n <Ark.View view=\"year\">\n {nav}\n <Ark.Table\n columns={5}\n className={cn(\"mx-auto table-fixed\", classNames?.table)}\n style={{ width: calendarGridWidth(size, numOfMonths) }}\n >\n <Ark.TableBody>\n {api.getYearsGrid({ columns: 5 }).map((row, rowIndex) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: a fixed-length grid chunked at render time, never reordered.\n <Ark.TableRow key={rowIndex}>\n {row.map((year) => (\n <Ark.TableCell key={year.value} value={year.value}>\n <Ark.TableCellTrigger className={gridCellTrigger({ size })}>\n {year.label}\n </Ark.TableCellTrigger>\n </Ark.TableCell>\n ))}\n </Ark.TableRow>\n ))}\n </Ark.TableBody>\n </Ark.Table>\n </Ark.View>\n ))\n .exhaustive()\n }}\n </Ark.Context>\n)\n","\"use client\"\n\nimport { type DateValue, useDatePickerContext } from \"@ark-ui/react/date-picker\"\nimport { isSameDay, today } from \"@internationalized/date\"\nimport { type RefObject, useRef } from \"react\"\nimport { calendarValueToDate, dateToArkValue } from \"../../lib/date-value\"\nimport { useIsomorphicLayoutEffect } from \"../../lib/use-isomorphic-layout-effect\"\n\n/** A stable fingerprint of Ark's value array, to recognise one specific `setValue` echo. */\nexport const hashArkValues = (values: DateValue[]): string => values.map(String).join(\",\")\n\n/**\n * The value Ark is about to report back from a zone re-seed, or `null`. The root's\n * `onValueChange` swallows the one change whose hash matches it, because re-expressing the\n * selection in a new zone is not a change the user made.\n */\nexport type ZoneReseedRef = RefObject<string | null>\n\n/**\n * Keeps an Ark `date-picker` machine's selection on the same **instant** when its `timeZone`\n * changes, without remounting it. Renders nothing; mount it inside `Ark.Root`.\n *\n * Ark reads `defaultValue` once, at mount, and from then on holds the selection as a wall-calendar\n * `DateValue`. A grid pick is a plain `CalendarDate` with no zone at all, so on its own a zone\n * change would keep the *day* and silently move the instant the app was handed by `onChange`. The\n * one zone change every SSR app sees is `timeZone=\"auto\"` going from the UTC hydration snapshot\n * to the host zone, and there the uncontrolled `defaultValue` would stay on the UTC day.\n *\n * So, in a layout effect after the render that changed the zone:\n *\n * - **Uncontrolled**: each value is read back as an instant in the *old* zone (what `onChange`\n * reported) and handed to Ark again in the new one, through `api.setValue`. That may land on\n * another calendar day near midnight, which is the point. `pendingRef` marks the echo so the\n * root doesn't report it through `onChange`.\n * - **Controlled**: nothing to do. The root re-derives Ark's `value` from the app's `Date`s in\n * the new zone on every render, which is already the same instant.\n * - **Focus**: the machine's focused day (the keyboard's roving cell, and the month on show)\n * follows its anchor, the selection or else today, when it sat on that anchor before the\n * change. A month the user navigated to stays put. `setFocusedValue` never moves DOM focus.\n *\n * A remount would do all of this too, but it also resets everything the user did since mount: a\n * pick goes back to `defaultValue`, typed text is cleared, and DOM focus drops to `<body>`.\n */\nexport const CalendarZoneSync = ({\n timeZone,\n controlled,\n pendingRef,\n}: {\n timeZone: string\n controlled: boolean\n pendingRef: ZoneReseedRef\n}) => {\n const api = useDatePickerContext()\n const previous = useRef({ timeZone, value: api.value })\n\n // No dependency list on purpose: the previous value has to be the one from the last render,\n // which under a controlled `value` is already the new zone's by the time the zone changes.\n useIsomorphicLayoutEffect(() => {\n const { timeZone: from, value: before } = previous.current\n previous.current = { timeZone, value: api.value }\n if (from === timeZone) return\n\n const after = controlled\n ? api.value\n : before.map((value) => dateToArkValue(calendarValueToDate(value, from), timeZone))\n if (!controlled && after.length > 0) {\n pendingRef.current = hashArkValues(after)\n api.setValue(after)\n }\n\n // `setValue` also moves the focused day onto the new value, so this runs either way: it\n // either confirms that move or puts back a month the user had navigated to.\n const anchorBefore = before[0] ?? today(from)\n const focused = api.focusedValue\n api.setFocusedValue(isSameDay(focused, anchorBefore) ? (after[0] ?? today(timeZone)) : focused)\n })\n\n return null\n}\n","\"use client\"\n\nimport { DatePicker as Ark, type DatePickerDateView as DateView } from \"@ark-ui/react/date-picker\"\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport { type ComponentProps, type ReactNode, useRef } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { DatePredicate } from \"../../lib/date-predicates\"\nimport {\n calendarValueToDate,\n type DateRangeValue,\n dateToArkValue,\n fromArkValues,\n toArkValues,\n} from \"../../lib/date-value\"\nimport type { FormControlProps } from \"../../lib/form-control\"\nimport { useTimeZone } from \"../../lib/intl\"\nimport { props } from \"../../lib/props\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport { CalendarBody, type CalendarBodyClassNames } from \"./calendar-body\"\nimport { CalendarZoneSync, hashArkValues } from \"./calendar-zone-sync\"\n\n/**\n * Calendar — the inline month grid (RFC §9, `docs/rfcs/date-picker.md`): Ark's `date-picker`\n * machine rendered `inline` (no trigger/popover), wrapping the shared `CalendarBody` grid that\n * `DatePicker` will later reuse verbatim inside its own popover.\n *\n * - Value is a native `Date | null` (or `{ start, end }` under `range`) — the machine's\n * `DateValue` array contract never leaks out; `lib/date-value.ts` is the one conversion\n * boundary both directions go through.\n * - Controlled/uncontrolled `value` / `defaultValue` / `onChange` go straight to Ark's own\n * machine, which supports both natively — no `useUncontrolled` needed here.\n * - `isDateUnavailable` / `min` / `max` take native `Date`s and are adapted to Ark's\n * `DateValue`-based signature at this boundary; pair with the `lib/date-predicates.ts`\n * helpers (`disablePast()`, `disableWeekends()`, …).\n * - No `label` / `description` / `error` / `FieldShell` wrap — `Calendar` is a bare widget\n * (like `Table`), not a form field. A `DatePicker` popover is where a field wrapper belongs.\n *\n * <Calendar value={date} onChange={setDate} isDateUnavailable={disableWeekends()} />\n */\n\nexport type CalendarClassNames = CalendarBodyClassNames & {\n /** The outermost `Ark.Root` element. */\n root?: string\n}\n\n/** Ark's own `translations` prop type, derived structurally rather than imported by name —\n * `IntlTranslations` lives in `@zag-js/date-picker`, a transitive dependency of the\n * `@ark-ui/react` peer dep, not one this package declares itself. */\ntype ArkTranslations = NonNullable<ComponentProps<typeof Ark.Root>[\"translations\"]>\n\n/** The subset `CalendarBody`'s rendered anatomy actually exercises — `trigger`/`clearTrigger`\n * only apply when composed under `DatePicker` (a bare `Calendar` never renders a trigger/clear\n * button; harmless no-op keys there). Unset keys fall back to Ark's own English text. */\nexport type CalendarTranslations = Pick<\n ArkTranslations,\n | \"dayCell\"\n | \"trigger\"\n | \"viewTrigger\"\n | \"prevTrigger\"\n | \"nextTrigger\"\n | \"clearTrigger\"\n | \"content\"\n | \"weekColumnHeader\"\n | \"weekNumberCell\"\n>\n\n/** Passes a partial override straight through to `Ark.Root`. Ark's `translations` prop is\n * itself all-optional (since @ark-ui/react 5.38.2), so unset keys fall back to Ark's own\n * English defaults and this kit no longer keeps a copy of them to merge over. That copy was\n * load-bearing when the prop demanded every key at once; keeping it now would only let a\n * stale duplicate override Ark's upstream fixes — which is exactly what happened to\n * `viewTrigger`, whose day-view label named the wrong target view until Ark corrected it. */\nexport const resolveCalendarTranslations = (\n overrides?: Partial<CalendarTranslations>,\n): ArkTranslations | undefined => overrides\n\nexport type CalendarProps<Range extends boolean = false> = FormControlProps<\n Range extends true ? DateRangeValue : Date | null,\n HTMLDivElement\n> &\n WithTestId & {\n /** Select a `{ start, end }` range instead of a single date. */\n range?: Range\n /** Months shown side by side. Default 1. */\n numOfMonths?: number\n /** Restriction predicate over a native `Date`. Compose with `lib/date-predicates.ts`'s helpers.\n * Called with this component's own resolved `timeZone` as its second argument, so a predicate\n * reads the candidate day in the same zone the grid renders it in. */\n isDateUnavailable?: DatePredicate\n min?: Date\n max?: Date\n /** Bounds the view levels reachable via navigation (e.g. `minView=\"month\"` for a month-only\n * picker that never drills into individual days). */\n minView?: DateView\n maxView?: DateView\n /** Per-day decoration slot — the \"event dot\" (RFC §9). */\n renderDay?: (date: Date, ctx: { isUnavailable: boolean; isSelected: boolean }) => ReactNode\n /** Always render 6 week rows (padding with adjacent-month days) instead of however many the\n * visible month(s) actually span (4–6) — keeps the grid's height constant while navigating\n * between months. */\n fixedWeeks?: boolean\n withWeekNumbers?: boolean\n /** Overrides the active locale context. Drives month/day names and first-day-of-week. */\n locale?: string\n /** Overrides the time zone for every `Date ↔ DateValue` conversion. Resolves\n * **prop → `IntlProvider` → host zone**, through `useTimeZone` like `Schedule` — **not** Ark's\n * own machine default (`\"UTC\"`), which is why the resolved zone is forwarded to `Ark.Root`\n * explicitly rather than only used in this component's own conversions (see\n * `lib/date-value.ts`'s module doc). Accepts `\"auto\"` to follow the host zone. */\n timeZone?: string\n /** Overrides Ark's own built-in aria-label/accessible-name strings (day cells, prev/next, the\n * view-cycling header, week numbers) — English by default. Unlike `locale`, nothing here\n * auto-derives; supply your own translated strings. Partial — unset keys keep Ark's default. */\n translations?: Partial<CalendarTranslations>\n size?: Size\n className?: string\n classNames?: CalendarClassNames\n }\n\nexport const Calendar = <Range extends boolean = false>({\n range,\n value,\n defaultValue,\n onChange,\n onBlur,\n numOfMonths = 1,\n isDateUnavailable,\n min,\n max,\n minView,\n maxView,\n renderDay,\n fixedWeeks,\n withWeekNumbers,\n locale,\n timeZone,\n translations,\n size = \"md\",\n disabled,\n readOnly,\n required,\n invalid,\n name,\n id,\n ref,\n className,\n classNames,\n testId,\n}: CalendarProps<Range>) => {\n const { locale: contextLocale } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const resolvedTimeZone = useTimeZone(timeZone)\n const isRange = Boolean(range)\n const zoneReseed = useRef<string | null>(null)\n\n return (\n <Ark.Root\n inline\n ref={ref}\n id={id}\n selectionMode={isRange ? \"range\" : \"single\"}\n locale={resolvedLocale}\n timeZone={resolvedTimeZone}\n translations={resolveCalendarTranslations(translations)}\n value={toArkValues(value, resolvedTimeZone)}\n defaultValue={toArkValues(defaultValue, resolvedTimeZone)}\n onValueChange={(details) => {\n // A zone change re-expresses the selection in the new zone; that echo is not a change.\n if (zoneReseed.current === hashArkValues(details.value)) {\n zoneReseed.current = null\n return\n }\n // The machine's value is a plain DateValue[]; `range` is a runtime flag here, so narrow\n // the result back to the caller's declared shape.\n onChange?.(\n fromArkValues(details.value, isRange, resolvedTimeZone) as Range extends true\n ? DateRangeValue\n : Date | null,\n )\n }}\n onBlur={onBlur}\n numOfMonths={numOfMonths}\n fixedWeeks={fixedWeeks}\n // Ark's own prop — its name doesn't follow this kit's `withX` convention, so it stays\n // `showWeekNumbers` even though our public prop is `withWeekNumbers`.\n showWeekNumbers={withWeekNumbers}\n isDateUnavailable={\n isDateUnavailable\n ? (dateValue) =>\n isDateUnavailable(calendarValueToDate(dateValue, resolvedTimeZone), resolvedTimeZone)\n : undefined\n }\n min={min ? dateToArkValue(min, resolvedTimeZone) : undefined}\n max={max ? dateToArkValue(max, resolvedTimeZone) : undefined}\n minView={minView}\n maxView={maxView}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n invalid={invalid}\n name={name}\n className={cn(\"inline-flex flex-col\", className, classNames?.root)}\n {...props({ \"data-testid\": testId })}\n >\n {/* The machine looks up the currently-focused cell by querying inside the `Content` part\n * (`getFocusedCell` scopes its DOM query to `getContentEl`) to call `.focus()` on it after\n * every arrow-key/Home/End/PageUp/PageDown press — even though `inline` never opens a real\n * popover, that lookup still runs, and with no `Content` element in the DOM at all it\n * always finds nothing, so keyboard navigation updates the machine's internal focus state\n * (visible via `data-focus`) but never moves real DOM focus. `inline` implies `open` (the\n * machine treats it as permanently open), so `Content`'s `hidden={!open}` never hides this. */}\n {/* Ark reads `defaultValue` once, at mount, so a zone change (`timeZone=\"auto\"` going from\n * the UTC hydration snapshot to the host zone, or the app's provider changing) would leave\n * the selection on the old zone's day. This re-seeds it on the same instant in place;\n * see `calendar-zone-sync.tsx` for why it isn't a remount. */}\n <CalendarZoneSync\n timeZone={resolvedTimeZone}\n controlled={value !== undefined}\n pendingRef={zoneReseed}\n />\n <Ark.Content>\n <CalendarBody\n numOfMonths={numOfMonths}\n withWeekNumbers={withWeekNumbers}\n renderDay={renderDay}\n size={size}\n timeZone={resolvedTimeZone}\n classNames={classNames}\n />\n </Ark.Content>\n </Ark.Root>\n )\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 { Dialog } from '@ark-ui/react/dialog';
@@ -212,6 +212,7 @@ var ModalComponent = ({
212
212
  className,
213
213
  classNames,
214
214
  testId,
215
+ translations,
215
216
  ...rest
216
217
  }) => {
217
218
  const hasHeader = title != null || description != null || withCloseButton;
@@ -253,7 +254,13 @@ var ModalComponent = ({
253
254
  title != null && /* @__PURE__ */ jsx(ModalTitle, { className: classNames?.title, children: title }),
254
255
  description != null && /* @__PURE__ */ jsx(ModalDescription, { className: classNames?.description, children: description })
255
256
  ] }),
256
- withCloseButton && /* @__PURE__ */ jsx(ModalCloseTrigger, { className: classNames?.closeButton })
257
+ withCloseButton && /* @__PURE__ */ jsx(
258
+ ModalCloseTrigger,
259
+ {
260
+ "aria-label": translations?.closeTriggerLabel,
261
+ className: classNames?.closeButton
262
+ }
263
+ )
257
264
  ] }),
258
265
  /* @__PURE__ */ jsx(
259
266
  ModalBody,
@@ -291,5 +298,5 @@ var Modal = Object.assign(ModalComponent, {
291
298
  });
292
299
 
293
300
  export { Modal };
294
- //# sourceMappingURL=chunk-JITF6I7N.js.map
295
- //# sourceMappingURL=chunk-JITF6I7N.js.map
301
+ //# sourceMappingURL=chunk-WJOHNCYY.js.map
302
+ //# sourceMappingURL=chunk-WJOHNCYY.js.map