@42-central/ui-react 0.18.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) 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/components/accordion/index.js +1 -1
  70. package/dist/components/action-icon/index.js +3 -3
  71. package/dist/components/alert/index.js +3 -3
  72. package/dist/components/app-shell/index.js +4 -4
  73. package/dist/components/autocomplete/autocomplete.d.ts +8 -1
  74. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  75. package/dist/components/autocomplete/index.d.ts +1 -1
  76. package/dist/components/autocomplete/index.d.ts.map +1 -1
  77. package/dist/components/autocomplete/index.js +10 -7
  78. package/dist/components/autocomplete/index.js.map +1 -1
  79. package/dist/components/badge/index.js +1 -1
  80. package/dist/components/button/index.js +3 -3
  81. package/dist/components/button-multi-select/index.js +5 -5
  82. package/dist/components/button-select/index.js +5 -5
  83. package/dist/components/calendar/calendar-zone-sync.d.ts +41 -0
  84. package/dist/components/calendar/calendar-zone-sync.d.ts.map +1 -0
  85. package/dist/components/calendar/calendar.d.ts +6 -5
  86. package/dist/components/calendar/calendar.d.ts.map +1 -1
  87. package/dist/components/calendar/index.js +8 -5
  88. package/dist/components/chart/chart.d.ts +17 -10
  89. package/dist/components/chart/chart.d.ts.map +1 -1
  90. package/dist/components/chart/index.js +50 -7
  91. package/dist/components/chart/index.js.map +1 -1
  92. package/dist/components/chart/styles.css +100 -0
  93. package/dist/components/checkbox/index.js +4 -4
  94. package/dist/components/choice-card-group/index.d.ts.map +1 -1
  95. package/dist/components/choice-card-group/index.js +4 -3
  96. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  97. package/dist/components/circular-progress/index.js.map +1 -1
  98. package/dist/components/clipboard/clipboard.d.ts.map +1 -1
  99. package/dist/components/clipboard/copy.d.ts.map +1 -1
  100. package/dist/components/clipboard/index.js +5 -5
  101. package/dist/components/clipboard/index.js.map +1 -1
  102. package/dist/components/code-block/chrome.js +4 -4
  103. package/dist/components/code-block/index.js +5 -5
  104. package/dist/components/combobox/combobox.d.ts +20 -1
  105. package/dist/components/combobox/combobox.d.ts.map +1 -1
  106. package/dist/components/combobox/index.d.ts +1 -1
  107. package/dist/components/combobox/index.d.ts.map +1 -1
  108. package/dist/components/combobox/index.js +4 -4
  109. package/dist/components/combobox-list/combobox-list.d.ts +8 -1
  110. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  111. package/dist/components/combobox-list/index.d.ts +1 -1
  112. package/dist/components/combobox-list/index.d.ts.map +1 -1
  113. package/dist/components/combobox-list/index.js +5 -5
  114. package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
  115. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
  116. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
  117. package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts +4 -1
  118. package/dist/components/data-table/data-table-filter/data-table-select-filter.d.ts.map +1 -1
  119. package/dist/components/data-table/data-table-filter/index.d.ts +5 -1
  120. package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
  121. package/dist/components/data-table/data-table-header-cell.d.ts +11 -15
  122. package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
  123. package/dist/components/data-table/data-table-meta.d.ts +2 -2
  124. package/dist/components/data-table/data-table-meta.d.ts.map +1 -1
  125. package/dist/components/data-table/data-table-pagination.d.ts +3 -0
  126. package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
  127. package/dist/components/data-table/data-table-stack.d.ts +6 -3
  128. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  129. package/dist/components/data-table/data-table-toolbar.d.ts +3 -1
  130. package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
  131. package/dist/components/data-table/data-table-translations.d.ts +68 -0
  132. package/dist/components/data-table/data-table-translations.d.ts.map +1 -0
  133. package/dist/components/data-table/data-table.d.ts +5 -8
  134. package/dist/components/data-table/data-table.d.ts.map +1 -1
  135. package/dist/components/data-table/index.d.ts +2 -1
  136. package/dist/components/data-table/index.d.ts.map +1 -1
  137. package/dist/components/data-table/index.js +206 -84
  138. package/dist/components/data-table/index.js.map +1 -1
  139. package/dist/components/date-picker/date-picker.d.ts +13 -9
  140. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  141. package/dist/components/date-picker/index.js +16 -15
  142. package/dist/components/date-picker/index.js.map +1 -1
  143. package/dist/components/drawer/drawer.d.ts +9 -1
  144. package/dist/components/drawer/drawer.d.ts.map +1 -1
  145. package/dist/components/drawer/index.d.ts +1 -1
  146. package/dist/components/drawer/index.d.ts.map +1 -1
  147. package/dist/components/drawer/index.js +4 -4
  148. package/dist/components/field/field.d.ts +9 -2
  149. package/dist/components/field/field.d.ts.map +1 -1
  150. package/dist/components/field/index.js +1 -1
  151. package/dist/components/file-upload/file-upload.d.ts +13 -2
  152. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  153. package/dist/components/file-upload/index.d.ts +1 -1
  154. package/dist/components/file-upload/index.d.ts.map +1 -1
  155. package/dist/components/file-upload/index.js +16 -7
  156. package/dist/components/file-upload/index.js.map +1 -1
  157. package/dist/components/hover-card/index.js +1 -1
  158. package/dist/components/input/index.js +2 -2
  159. package/dist/components/kbd/index.js +30 -15
  160. package/dist/components/kbd/index.js.map +1 -1
  161. package/dist/components/kbd/kbd.d.ts.map +1 -1
  162. package/dist/components/menu/index.js +2 -2
  163. package/dist/components/modal/index.d.ts +1 -1
  164. package/dist/components/modal/index.d.ts.map +1 -1
  165. package/dist/components/modal/index.js +4 -4
  166. package/dist/components/modal/modal.d.ts +9 -1
  167. package/dist/components/modal/modal.d.ts.map +1 -1
  168. package/dist/components/multi-combobox-list/index.d.ts +1 -1
  169. package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
  170. package/dist/components/multi-combobox-list/index.js +7 -5
  171. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +8 -1
  172. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  173. package/dist/components/multi-select/index.d.ts +1 -1
  174. package/dist/components/multi-select/index.d.ts.map +1 -1
  175. package/dist/components/multi-select/index.js +20 -9
  176. package/dist/components/multi-select/index.js.map +1 -1
  177. package/dist/components/multi-select/multi-select.d.ts +11 -1
  178. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  179. package/dist/components/nav-link/index.d.ts +1 -1
  180. package/dist/components/nav-link/index.d.ts.map +1 -1
  181. package/dist/components/nav-link/index.js +2 -2
  182. package/dist/components/nav-link/nav-link.d.ts +12 -0
  183. package/dist/components/nav-link/nav-link.d.ts.map +1 -1
  184. package/dist/components/nav-link/navigation.d.ts +3 -1
  185. package/dist/components/nav-link/navigation.d.ts.map +1 -1
  186. package/dist/components/nav-link/tanstack.js +2 -2
  187. package/dist/components/notification/create-notifier.d.ts +12 -1
  188. package/dist/components/notification/create-notifier.d.ts.map +1 -1
  189. package/dist/components/notification/index.d.ts +2 -2
  190. package/dist/components/notification/index.d.ts.map +1 -1
  191. package/dist/components/notification/index.js +9 -6
  192. package/dist/components/notification/index.js.map +1 -1
  193. package/dist/components/notification/notification.d.ts +14 -1
  194. package/dist/components/notification/notification.d.ts.map +1 -1
  195. package/dist/components/number-input/index.d.ts +1 -1
  196. package/dist/components/number-input/index.d.ts.map +1 -1
  197. package/dist/components/number-input/index.js +4 -4
  198. package/dist/components/number-input/number-input.d.ts +20 -2
  199. package/dist/components/number-input/number-input.d.ts.map +1 -1
  200. package/dist/components/overlays/index.js +6 -6
  201. package/dist/components/password-input/index.d.ts +1 -1
  202. package/dist/components/password-input/index.d.ts.map +1 -1
  203. package/dist/components/password-input/index.js +68 -7
  204. package/dist/components/password-input/index.js.map +1 -1
  205. package/dist/components/password-input/password-input.d.ts +45 -6
  206. package/dist/components/password-input/password-input.d.ts.map +1 -1
  207. package/dist/components/pill/index.js +2 -2
  208. package/dist/components/pills-input/index.js +5 -5
  209. package/dist/components/pin-input/index.js +2 -2
  210. package/dist/components/popover/index.js +1 -1
  211. package/dist/components/popover/popover.d.ts +0 -10
  212. package/dist/components/popover/popover.d.ts.map +1 -1
  213. package/dist/components/progress/index.js.map +1 -1
  214. package/dist/components/progress/progress.d.ts.map +1 -1
  215. package/dist/components/radio-group/index.js +3 -3
  216. package/dist/components/rating/index.js +2 -2
  217. package/dist/components/rating/index.js.map +1 -1
  218. package/dist/components/rating/rating.d.ts.map +1 -1
  219. package/dist/components/schedule/index.js +62 -49
  220. package/dist/components/schedule/index.js.map +1 -1
  221. package/dist/components/schedule/now-cursor-line.d.ts +10 -5
  222. package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
  223. package/dist/components/schedule/schedule-dates.d.ts +11 -26
  224. package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
  225. package/dist/components/schedule/schedule-event-chip.d.ts +4 -1
  226. package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
  227. package/dist/components/schedule/schedule-event-details.d.ts +3 -2
  228. package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
  229. package/dist/components/schedule/schedule-geometry.d.ts +20 -21
  230. package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
  231. package/dist/components/schedule/schedule-grid-gesture.d.ts +5 -9
  232. package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
  233. package/dist/components/schedule/schedule-segments.d.ts +2 -3
  234. package/dist/components/schedule/schedule-segments.d.ts.map +1 -1
  235. package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
  236. package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
  237. package/dist/components/segment-group/index.js +4 -3
  238. package/dist/components/segment-group/segment-group.d.ts +3 -2
  239. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  240. package/dist/components/select/index.d.ts +1 -1
  241. package/dist/components/select/index.d.ts.map +1 -1
  242. package/dist/components/select/index.js +6 -4
  243. package/dist/components/select/select.d.ts +12 -2
  244. package/dist/components/select/select.d.ts.map +1 -1
  245. package/dist/components/slider/index.js +2 -2
  246. package/dist/components/spinner/index.js +1 -1
  247. package/dist/components/spinner/spinner.d.ts.map +1 -1
  248. package/dist/components/switch/index.js +3 -3
  249. package/dist/components/switch/index.js.map +1 -1
  250. package/dist/components/switch/switch.d.ts +2 -0
  251. package/dist/components/switch/switch.d.ts.map +1 -1
  252. package/dist/components/table/index.js +1 -1
  253. package/dist/components/table/table.d.ts.map +1 -1
  254. package/dist/components/tabs/index.js +4 -3
  255. package/dist/components/tabs/tabs.d.ts +3 -1
  256. package/dist/components/tabs/tabs.d.ts.map +1 -1
  257. package/dist/components/tags-input/index.d.ts +1 -1
  258. package/dist/components/tags-input/index.d.ts.map +1 -1
  259. package/dist/components/tags-input/index.js +9 -7
  260. package/dist/components/tags-input/index.js.map +1 -1
  261. package/dist/components/tags-input/tags-input.d.ts +9 -2
  262. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  263. package/dist/components/text-input/index.js +2 -2
  264. package/dist/components/textarea/index.js +2 -2
  265. package/dist/components/theme-icon/index.js +2 -2
  266. package/dist/components/theme-icon/theme-icon.d.ts.map +1 -1
  267. package/dist/components/time-input/index.js +24 -8
  268. package/dist/components/time-input/index.js.map +1 -1
  269. package/dist/components/time-input/time-input.d.ts.map +1 -1
  270. package/dist/components/time-input/time-row.d.ts +16 -3
  271. package/dist/components/time-input/time-row.d.ts.map +1 -1
  272. package/dist/components/timeline/index.js +6 -3
  273. package/dist/components/timeline/index.js.map +1 -1
  274. package/dist/components/timeline/timeline.d.ts.map +1 -1
  275. package/dist/components/tooltip/index.js +2 -2
  276. package/dist/components/tree-multi-select/index.d.ts +1 -1
  277. package/dist/components/tree-multi-select/index.d.ts.map +1 -1
  278. package/dist/components/tree-multi-select/index.js +62 -44
  279. package/dist/components/tree-multi-select/index.js.map +1 -1
  280. package/dist/components/tree-multi-select/tree-multi-select.d.ts +10 -1
  281. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  282. package/dist/components/tree-select/index.d.ts +1 -1
  283. package/dist/components/tree-select/index.d.ts.map +1 -1
  284. package/dist/components/tree-select/index.js +45 -15
  285. package/dist/components/tree-select/index.js.map +1 -1
  286. package/dist/components/tree-select/tree-select.d.ts +10 -1
  287. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  288. package/dist/index.js +3 -2
  289. package/dist/index.js.map +1 -1
  290. package/dist/lib/date-value.d.ts +14 -1
  291. package/dist/lib/date-value.d.ts.map +1 -1
  292. package/dist/lib/focus-styles.d.ts +13 -5
  293. package/dist/lib/focus-styles.d.ts.map +1 -1
  294. package/dist/theme.css +1 -2
  295. package/package.json +1 -1
  296. package/src/components/autocomplete/autocomplete.test.tsx +32 -0
  297. package/src/components/autocomplete/autocomplete.tsx +17 -5
  298. package/src/components/autocomplete/index.ts +5 -1
  299. package/src/components/button/button.test.tsx +6 -0
  300. package/src/components/calendar/calendar-zone-sync.tsx +79 -0
  301. package/src/components/calendar/calendar.test.tsx +134 -14
  302. package/src/components/calendar/calendar.tsx +36 -22
  303. package/src/components/chart/chart.test.tsx +115 -8
  304. package/src/components/chart/chart.tsx +115 -25
  305. package/src/components/chart/styles.css +100 -0
  306. package/src/components/choice-card-group/index.ts +2 -0
  307. package/src/components/circular-progress/circular-progress.tsx +2 -0
  308. package/src/components/clipboard/clipboard.test.tsx +54 -22
  309. package/src/components/clipboard/clipboard.tsx +2 -0
  310. package/src/components/clipboard/copy.tsx +2 -0
  311. package/src/components/clipboard/index.ts +3 -3
  312. package/src/components/combobox/combobox.test.tsx +22 -0
  313. package/src/components/combobox/combobox.tsx +20 -0
  314. package/src/components/combobox/index.ts +1 -0
  315. package/src/components/combobox-list/combobox-list.test.tsx +19 -0
  316. package/src/components/combobox-list/combobox-list.tsx +16 -2
  317. package/src/components/combobox-list/index.ts +5 -1
  318. package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +5 -4
  319. package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +16 -2
  320. package/src/components/data-table/data-table-filter/data-table-select-filter.tsx +9 -1
  321. package/src/components/data-table/data-table-filter/index.tsx +15 -1
  322. package/src/components/data-table/data-table-filter.test.tsx +33 -0
  323. package/src/components/data-table/data-table-header-cell.tsx +37 -22
  324. package/src/components/data-table/data-table-meta.ts +2 -2
  325. package/src/components/data-table/data-table-pagination.tsx +6 -0
  326. package/src/components/data-table/data-table-stack.tsx +31 -17
  327. package/src/components/data-table/data-table-toolbar.tsx +4 -1
  328. package/src/components/data-table/data-table-translations.ts +105 -0
  329. package/src/components/data-table/data-table.test.tsx +212 -0
  330. package/src/components/data-table/data-table.tsx +92 -23
  331. package/src/components/data-table/index.ts +9 -1
  332. package/src/components/date-picker/date-picker.test.tsx +197 -5
  333. package/src/components/date-picker/date-picker.tsx +42 -16
  334. package/src/components/drawer/drawer.tsx +14 -1
  335. package/src/components/drawer/index.ts +1 -0
  336. package/src/components/field/field.tsx +29 -3
  337. package/src/components/file-upload/file-upload.test.tsx +21 -0
  338. package/src/components/file-upload/file-upload.tsx +26 -3
  339. package/src/components/file-upload/index.ts +1 -1
  340. package/src/components/kbd/kbd.test.tsx +31 -0
  341. package/src/components/kbd/kbd.tsx +29 -14
  342. package/src/components/modal/index.ts +1 -0
  343. package/src/components/modal/modal-translations.test.tsx +27 -0
  344. package/src/components/modal/modal.tsx +14 -1
  345. package/src/components/multi-combobox-list/index.ts +5 -1
  346. package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +19 -0
  347. package/src/components/multi-combobox-list/multi-combobox-list.tsx +26 -4
  348. package/src/components/multi-select/index.ts +1 -1
  349. package/src/components/multi-select/multi-select.test.tsx +38 -0
  350. package/src/components/multi-select/multi-select.tsx +28 -4
  351. package/src/components/nav-link/index.ts +6 -1
  352. package/src/components/nav-link/nav-link.test.tsx +16 -0
  353. package/src/components/nav-link/nav-link.tsx +19 -1
  354. package/src/components/nav-link/navigation.test.tsx +18 -0
  355. package/src/components/nav-link/navigation.tsx +8 -4
  356. package/src/components/notification/create-notifier.tsx +20 -4
  357. package/src/components/notification/index.ts +7 -1
  358. package/src/components/notification/notification.test.tsx +49 -0
  359. package/src/components/notification/notification.tsx +39 -5
  360. package/src/components/number-input/index.ts +1 -1
  361. package/src/components/number-input/number-input.test.tsx +37 -0
  362. package/src/components/number-input/number-input.tsx +33 -4
  363. package/src/components/password-input/index.ts +5 -1
  364. package/src/components/password-input/password-input.test.tsx +201 -4
  365. package/src/components/password-input/password-input.tsx +162 -13
  366. package/src/components/popover/popover.tsx +0 -29
  367. package/src/components/progress/index.ts +3 -3
  368. package/src/components/progress/progress.tsx +2 -0
  369. package/src/components/rating/rating.tsx +2 -0
  370. package/src/components/schedule/now-cursor-line.test.tsx +74 -27
  371. package/src/components/schedule/now-cursor-line.tsx +40 -17
  372. package/src/components/schedule/schedule-agenda-view.test.tsx +1 -1
  373. package/src/components/schedule/schedule-dates.test.ts +19 -0
  374. package/src/components/schedule/schedule-dates.ts +16 -30
  375. package/src/components/schedule/schedule-details-popover.test.tsx +77 -6
  376. package/src/components/schedule/schedule-event-chip.tsx +17 -6
  377. package/src/components/schedule/schedule-event-details.test.tsx +38 -0
  378. package/src/components/schedule/schedule-event-details.tsx +7 -5
  379. package/src/components/schedule/schedule-geometry.test.ts +21 -18
  380. package/src/components/schedule/schedule-geometry.ts +37 -24
  381. package/src/components/schedule/schedule-grid-gesture.ts +5 -9
  382. package/src/components/schedule/schedule-segments.ts +2 -3
  383. package/src/components/schedule/schedule-timed-grid.tsx +43 -20
  384. package/src/components/schedule/schedule.test.tsx +34 -11
  385. package/src/components/schedule/use-event-resize.ts +6 -13
  386. package/src/components/segment-group/segment-group.test.tsx +23 -0
  387. package/src/components/segment-group/segment-group.tsx +13 -7
  388. package/src/components/select/index.ts +1 -1
  389. package/src/components/select/select.test.tsx +32 -0
  390. package/src/components/select/select.tsx +15 -1
  391. package/src/components/spinner/spinner.test.tsx +26 -0
  392. package/src/components/spinner/spinner.tsx +4 -1
  393. package/src/components/switch/switch.test.tsx +12 -0
  394. package/src/components/switch/switch.tsx +3 -1
  395. package/src/components/table/table.test.tsx +13 -0
  396. package/src/components/table/table.tsx +9 -5
  397. package/src/components/tabs/tabs.test.tsx +11 -0
  398. package/src/components/tabs/tabs.tsx +6 -4
  399. package/src/components/tags-input/index.ts +1 -1
  400. package/src/components/tags-input/tags-input.test.tsx +28 -0
  401. package/src/components/tags-input/tags-input.tsx +17 -1
  402. package/src/components/theme-icon/theme-icon.tsx +8 -3
  403. package/src/components/time-input/time-input.test.tsx +75 -0
  404. package/src/components/time-input/time-input.tsx +27 -3
  405. package/src/components/time-input/time-row.tsx +27 -3
  406. package/src/components/timeline/timeline.tsx +6 -3
  407. package/src/components/tree-multi-select/index.ts +5 -1
  408. package/src/components/tree-multi-select/tree-multi-select.test.tsx +72 -0
  409. package/src/components/tree-multi-select/tree-multi-select.tsx +156 -115
  410. package/src/components/tree-select/index.ts +1 -1
  411. package/src/components/tree-select/tree-select.test.tsx +69 -0
  412. package/src/components/tree-select/tree-select.tsx +128 -74
  413. package/src/lib/date-value.test.ts +19 -0
  414. package/src/lib/date-value.ts +21 -5
  415. package/src/lib/focus-styles.test.ts +21 -2
  416. package/src/lib/focus-styles.ts +24 -5
  417. package/src/theme.css +1 -2
  418. package/src/use-client-barrels.test.ts +80 -0
  419. package/dist/chunk-5JHDSVEZ.js.map +0 -1
  420. package/dist/chunk-6GDMSENK.js.map +0 -1
  421. package/dist/chunk-6OLTJYSX.js.map +0 -1
  422. package/dist/chunk-7NZSTCJO.js.map +0 -1
  423. package/dist/chunk-B2LCHXUB.js.map +0 -1
  424. package/dist/chunk-B2YJKRNQ.js.map +0 -1
  425. package/dist/chunk-EBREIC3L.js.map +0 -1
  426. package/dist/chunk-FHG54IT5.js.map +0 -1
  427. package/dist/chunk-FZIHZT5R.js.map +0 -1
  428. package/dist/chunk-HT5JAHR3.js.map +0 -1
  429. package/dist/chunk-KHMFNH3X.js.map +0 -1
  430. package/dist/chunk-NSDM3FEB.js.map +0 -1
  431. package/dist/chunk-O23Y5ML4.js.map +0 -1
  432. package/dist/chunk-PH354ECN.js.map +0 -1
  433. package/dist/chunk-RQL7FVCS.js.map +0 -1
  434. package/dist/chunk-TCWYBVIL.js.map +0 -1
  435. package/dist/chunk-UHNRAI6V.js.map +0 -1
  436. package/dist/chunk-WHKKN3ZK.js.map +0 -1
  437. package/dist/chunk-WQN64ZHG.js.map +0 -1
  438. package/dist/chunk-YBJB7FGE.js.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import { fireEvent, render, screen, waitFor } from "@testing-library/react"
2
+ import type { ReactElement } from "react"
2
3
  import { renderToStaticMarkup } from "react-dom/server"
3
4
  import { describe, expect, it, vi } from "vitest"
4
5
  import { dateToCalendarValue } from "../../lib/date-value"
6
+ import { IntlProvider } from "../../lib/intl"
5
7
  import { DateRangePicker, DateTimePicker, DateTimeRangePicker } from "./aliases"
6
8
  import { DatePicker } from "./date-picker"
7
9
 
@@ -10,8 +12,7 @@ import { DatePicker } from "./date-picker"
10
12
  // time-input.test.tsx / calendar.test.tsx).
11
13
  const flush = () => new Promise((resolve) => setTimeout(resolve, 0))
12
14
 
13
- // UTC has a fixed (never-DST) offset, so a day-grid cell's own calendar arithmetic serializes
14
- // identically to constructing the same instant directly here (see calendar.test.tsx).
15
+ // The zone the fixtures below are written in (see calendar.test.tsx).
15
16
  const TZ = "UTC"
16
17
  const utc = (year: number, month: number, day: number) => new Date(Date.UTC(year, month, day))
17
18
 
@@ -27,11 +28,13 @@ const openTrigger = (container: HTMLElement) => {
27
28
  fireEvent.click(container.querySelector('[data-part="trigger"]') as HTMLElement)
28
29
  }
29
30
 
30
- /** The clickable day-cell trigger for a given date. Queried off `document.body`, not a render
31
- * `container` — the calendar grid lives inside the portaled `Content`. */
31
+ /** The clickable day-cell trigger for the day a `Date` falls on in `TZ`. Queried off
32
+ * `document.body`, not a render `container` — the calendar grid lives inside the portaled
33
+ * `Content`. A cell's `data-value` is a zone-free `CalendarDate` or `CalendarDateTime`, so it
34
+ * matches on the day alone. */
32
35
  const dayTrigger = (date: Date): HTMLElement | null =>
33
36
  document.body.querySelector(
34
- `[role="button"][data-value="${dateToCalendarValue(date, TZ).toString()}"]`,
37
+ `[role="button"][data-value^="${dateToCalendarValue(date, TZ).toString().slice(0, 10)}"]`,
35
38
  )
36
39
 
37
40
  describe("DatePicker — trigger", () => {
@@ -356,6 +359,46 @@ describe("DatePicker — withTime", () => {
356
359
  expect(onChange).not.toHaveBeenCalled()
357
360
  })
358
361
 
362
+ it('names the single time row\'s group "Time"', async () => {
363
+ const { container } = render(<DatePicker label="Meeting" timeZone={TZ} withTime format={12} />)
364
+ await flush()
365
+ openTrigger(container)
366
+ await flush()
367
+ const group = screen.getByRole("group", { name: "Time" })
368
+ expect(group.contains(at(screen.getAllByRole("spinbutton", { name: "Hour" }), 0))).toBe(true)
369
+ })
370
+
371
+ it('names the range time rows "Start time" / "End time", translatable', async () => {
372
+ const { container } = render(
373
+ <DatePicker
374
+ range
375
+ timeZone={TZ}
376
+ withTime
377
+ format={24}
378
+ translations={{ startTime: "Début", endTime: "Fin" }}
379
+ />,
380
+ )
381
+ await flush()
382
+ openTrigger(container)
383
+ await flush()
384
+ const start = screen.getByRole("group", { name: "Début" })
385
+ const end = screen.getByRole("group", { name: "Fin" })
386
+ expect(start).not.toBe(end)
387
+ expect(start.querySelectorAll("input").length).toBeGreaterThan(0)
388
+ expect(end.querySelectorAll("input").length).toBeGreaterThan(0)
389
+ })
390
+
391
+ it("leaves no label[for] pointing at a missing id in the time rows", async () => {
392
+ const { container } = render(<DatePicker range timeZone={TZ} withTime format={12} />)
393
+ await flush()
394
+ openTrigger(container)
395
+ await flush()
396
+ const orphaned = [...document.querySelectorAll("label[for]")].filter(
397
+ (label) => !document.getElementById(label.getAttribute("for") ?? ""),
398
+ )
399
+ expect(orphaned.map((label) => label.textContent)).toEqual([])
400
+ })
401
+
359
402
  it("the embedded time row defaults to -- placeholders", async () => {
360
403
  const { container } = render(<DatePicker timeZone={TZ} withTime format={24} />)
361
404
  await flush()
@@ -697,3 +740,152 @@ describe("DatePicker — typeable + withTime", () => {
697
740
  await waitFor(() => expect(field(container).value).toBe("15/07/2026 09:06"))
698
741
  })
699
742
  })
743
+
744
+ describe("DatePicker — IntlProvider time zone", () => {
745
+ // Same instant as calendar.test.tsx's provider tests: 10:30 UTC reads as the 16th in
746
+ // Kiritimati and the 14th in Midway, never as the host's 15th.
747
+ const instant = new Date("2026-07-15T10:30:00Z")
748
+ const field = (container: HTMLElement) =>
749
+ container.querySelector('input[data-part="input"]') as HTMLInputElement
750
+
751
+ it("formats in the provider's time zone when no prop is set", async () => {
752
+ const { container } = render(
753
+ <IntlProvider timeZone="Pacific/Kiritimati">
754
+ <DatePicker typeable withTime locale="fr-FR" defaultValue={instant} />
755
+ </IntlProvider>,
756
+ )
757
+ await flush()
758
+ expect(field(container).value).toBe("16/07/2026 00:30")
759
+ })
760
+
761
+ it("re-reads an uncontrolled defaultValue when the zone changes after mount", async () => {
762
+ // `timeZone="auto"` under SSR: UTC for the hydration render, the host zone one render later.
763
+ const picker = <DatePicker typeable withTime locale="fr-FR" defaultValue={instant} />
764
+ const { container, rerender } = render(
765
+ <IntlProvider timeZone="Pacific/Midway">{picker}</IntlProvider>,
766
+ )
767
+ await flush()
768
+ expect(field(container).value).toBe("14/07/2026 23:30")
769
+ rerender(<IntlProvider timeZone="Pacific/Kiritimati">{picker}</IntlProvider>)
770
+ await waitFor(() => expect(field(container).value).toBe("16/07/2026 00:30"))
771
+ })
772
+
773
+ // Midway (UTC−11) and Kiritimati (UTC+14) are a day and an hour apart, so every instant below
774
+ // reads as a different calendar day after the switch: the assertions can tell "kept the
775
+ // instant" (the day moves) from "kept the day" or "reset to defaultValue".
776
+ const midway = (picker: ReactElement) => (
777
+ <IntlProvider timeZone="Pacific/Midway">{picker}</IntlProvider>
778
+ )
779
+ const kiritimati = (picker: ReactElement) => (
780
+ <IntlProvider timeZone="Pacific/Kiritimati">{picker}</IntlProvider>
781
+ )
782
+
783
+ it("keeps a picked date's instant, onChange and focus across a zone change", async () => {
784
+ const onChange = vi.fn()
785
+ const picker = <DatePicker locale="fr-FR" defaultValue={instant} onChange={onChange} />
786
+ const { container, rerender } = render(midway(picker))
787
+ await flush()
788
+ openTrigger(container)
789
+ await flush()
790
+ fireEvent.click(
791
+ document.body.querySelector('[role="button"][data-value^="2026-07-20"]') as HTMLElement,
792
+ )
793
+ await waitFor(() => expect(onChange).toHaveBeenCalledTimes(1))
794
+ // Ark keeps the selection's time of day on a new pick: the 20th at 23:30 in Midway, which is
795
+ // 00:30 on the 22nd in Kiritimati. The old remount showed `defaultValue`'s 16th instead.
796
+ expect(onChange).toHaveBeenLastCalledWith(new Date("2026-07-21T10:30:00Z"))
797
+ const trigger = container.querySelector('[data-part="trigger"]') as HTMLElement
798
+ trigger.focus()
799
+ expect(trigger.textContent).toContain("20/07/2026")
800
+
801
+ rerender(kiritimati(picker))
802
+ await waitFor(() => expect(trigger.textContent).toContain("22/07/2026"))
803
+ expect(onChange).toHaveBeenCalledTimes(1)
804
+ expect(document.activeElement).toBe(trigger)
805
+ })
806
+
807
+ it("keeps a typed and committed date across a zone change, with focus in the field", async () => {
808
+ const onChange = vi.fn()
809
+ const picker = <DatePicker typeable locale="fr-FR" onChange={onChange} />
810
+ const { container, rerender } = render(midway(picker))
811
+ await flush()
812
+ const input = field(container)
813
+ input.focus()
814
+ fireEvent.change(input, { target: { value: "20/07/2026" } })
815
+ fireEvent.keyDown(input, { key: "Enter" })
816
+ await waitFor(() => expect(onChange).toHaveBeenCalledTimes(1))
817
+ expect(onChange).toHaveBeenLastCalledWith(new Date("2026-07-20T11:00:00Z"))
818
+
819
+ rerender(kiritimati(picker))
820
+ await waitFor(() => expect(input.value).toBe("21/07/2026"))
821
+ expect(onChange).toHaveBeenCalledTimes(1)
822
+ expect(document.activeElement).toBe(input)
823
+ })
824
+
825
+ it("keeps a typed and committed date + time across a zone change", async () => {
826
+ const onChange = vi.fn()
827
+ const picker = <DatePicker typeable withTime locale="fr-FR" onChange={onChange} />
828
+ const { container, rerender } = render(midway(picker))
829
+ await flush()
830
+ const input = field(container)
831
+ input.focus()
832
+ fireEvent.change(input, { target: { value: "20/07/2026 14:30" } })
833
+ fireEvent.keyDown(input, { key: "Enter" })
834
+ await waitFor(() => expect(onChange).toHaveBeenCalledTimes(1))
835
+ expect(onChange).toHaveBeenLastCalledWith(new Date("2026-07-21T01:30:00Z"))
836
+
837
+ rerender(kiritimati(picker))
838
+ await waitFor(() => expect(input.value).toBe("21/07/2026 15:30"))
839
+ expect(onChange).toHaveBeenCalledTimes(1)
840
+ expect(document.activeElement).toBe(input)
841
+
842
+ // The next commit is a real change, read in the new zone.
843
+ fireEvent.change(input, { target: { value: "22/07/2026 15:30" } })
844
+ fireEvent.keyDown(input, { key: "Enter" })
845
+ await waitFor(() => expect(onChange).toHaveBeenCalledTimes(2))
846
+ expect(onChange).toHaveBeenLastCalledWith(new Date("2026-07-22T01:30:00Z"))
847
+ })
848
+
849
+ it("keeps text typed but not yet committed across a zone change", async () => {
850
+ const picker = <DatePicker typeable locale="fr-FR" />
851
+ const { container, rerender } = render(midway(picker))
852
+ await flush()
853
+ const input = field(container)
854
+ input.focus()
855
+ fireEvent.change(input, { target: { value: "20/07/2026" } })
856
+ rerender(kiritimati(picker))
857
+ await flush()
858
+ await flush()
859
+ expect(input.value).toBe("20/07/2026")
860
+ expect(document.activeElement).toBe(input)
861
+ })
862
+
863
+ it("re-derives a controlled value in the new zone without calling onChange", async () => {
864
+ const onChange = vi.fn()
865
+ const picker = (
866
+ <DatePicker typeable withTime locale="fr-FR" value={instant} onChange={onChange} />
867
+ )
868
+ const { container, rerender } = render(midway(picker))
869
+ await flush()
870
+ expect(field(container).value).toBe("14/07/2026 23:30")
871
+ rerender(kiritimati(picker))
872
+ await waitFor(() => expect(field(container).value).toBe("16/07/2026 00:30"))
873
+ expect(onChange).not.toHaveBeenCalled()
874
+ })
875
+
876
+ it("lets the timeZone prop override the provider", async () => {
877
+ const { container } = render(
878
+ <IntlProvider timeZone="Pacific/Kiritimati">
879
+ <DatePicker
880
+ typeable
881
+ withTime
882
+ locale="fr-FR"
883
+ timeZone="Pacific/Midway"
884
+ defaultValue={instant}
885
+ />
886
+ </IntlProvider>,
887
+ )
888
+ await flush()
889
+ expect(field(container).value).toBe("14/07/2026 23:30")
890
+ })
891
+ })
@@ -10,20 +10,21 @@ import {
10
10
  import { useFieldContext } from "@ark-ui/react/field"
11
11
  import { useLocaleContext } from "@ark-ui/react/locale"
12
12
  import { Portal } from "@ark-ui/react/portal"
13
- import { DateFormatter, getLocalTimeZone, toCalendarDateTime, today } from "@internationalized/date"
14
- import { type FocusEvent, type ReactNode, type Ref, useRef, useState } from "react"
13
+ import { DateFormatter, toCalendarDateTime, today } from "@internationalized/date"
14
+ import { type FocusEvent, type ReactNode, type Ref, useId, useRef, useState } from "react"
15
15
  import { cn } from "../../lib/cn"
16
16
  import { controlOpenProps } from "../../lib/control-open"
17
17
  import type { DatePredicate } from "../../lib/date-predicates"
18
18
  import {
19
19
  calendarValueToDate,
20
20
  type DateRangeValue,
21
- dateToCalendarValue,
21
+ dateToArkValue,
22
22
  fromArkValues,
23
23
  toArkValues,
24
24
  } from "../../lib/date-value"
25
25
  import { focusStyles } from "../../lib/focus-styles"
26
26
  import type { FormControlProps } from "../../lib/form-control"
27
+ import { useTimeZone } from "../../lib/intl"
27
28
  import { mergeRefs } from "../../lib/merge-refs"
28
29
  import { useOverlayContainer } from "../../lib/overlay-container"
29
30
  import { NestedLayer } from "../../lib/overlay-layer"
@@ -38,6 +39,7 @@ import {
38
39
  type CalendarBodyClassNames,
39
40
  calendarGridWidth,
40
41
  } from "../calendar/calendar-body"
42
+ import { CalendarZoneSync, hashArkValues } from "../calendar/calendar-zone-sync"
41
43
  import { type FieldProps, FieldShell, fieldA11yProps } from "../field/field"
42
44
  import {
43
45
  type InputVariant,
@@ -130,13 +132,13 @@ const datePickerIconTrigger = cn(
130
132
  const pad = (n: number) => String(n).padStart(2, "0")
131
133
 
132
134
  /** Hidden-input serialization. `DateValue#toString()` isn't safe to call directly here: a
133
- * `ZonedDateTime` (what our own `dateToCalendarValue` produces for a `defaultValue`/`value`
134
- * passed in) stringifies with a full offset + IANA zone suffix, while a plain `CalendarDate`
135
- * (what a day-grid click produces) stringifies as a clean date — two different formats for the
136
- * same picked day depending on provenance. Read the wall-calendar fields directly instead.
137
- * Whether to append the time portion is driven by the picker's own `withTime` flag, not by
138
- * whether the value happens to carry an `hour` field — a `ZonedDateTime` always has one (even
139
- * at local midnight), so that structural check can't tell "date-only" from "with time" apart. */
135
+ * `CalendarDateTime` (what our own `dateToArkValue` produces for a `defaultValue`/`value` passed
136
+ * in) stringifies with a time, while a plain `CalendarDate` (what a day-grid click produces)
137
+ * stringifies as a clean date — two different formats for the same picked day depending on
138
+ * provenance. Read the wall-calendar fields directly instead. Whether to append the time portion
139
+ * is driven by the picker's own `withTime` flag, not by whether the value happens to carry an
140
+ * `hour` field — a `CalendarDateTime` always has one (even at local midnight), so that structural
141
+ * check can't tell "date-only" from "with time" apart. */
140
142
  export const serializeDateValue = (value: DateValue, withTime: boolean): string => {
141
143
  const date = `${value.year}-${pad(value.month)}-${pad(value.day)}`
142
144
  if (!withTime) return date
@@ -245,8 +247,10 @@ export type DatePickerProps<Range extends boolean = false> = FormControlProps<
245
247
  /** Overrides the active locale context. Drives month/day names, first-day-of-week, and the
246
248
  * embedded time row's 12h/24h default. */
247
249
  locale?: string
248
- /** Overrides the local time zone for every `Date ↔ DateValue` conversion. Default
249
- * `getLocalTimeZone()` — **not** Ark's own machine default (`"UTC"`). */
250
+ /** Overrides the time zone for every `Date ↔ DateValue` conversion. Resolves
251
+ * **prop → `IntlProvider` → host zone**, through `useTimeZone` like `Calendar` and
252
+ * `Schedule` — **not** Ark's own machine default (`"UTC"`). Accepts `"auto"` to follow the
253
+ * host zone. */
250
254
  timeZone?: string
251
255
  /** Force 12-hour or 24-hour display for the embedded time row, overriding the locale default. */
252
256
  format?: 12 | 24
@@ -425,6 +429,8 @@ const setTimeOrToday = (
425
429
  export type TimePanelRowProps = {
426
430
  value: DateValue | undefined
427
431
  onSetTime: (time: { hour: number; minute: number; second?: number }) => void
432
+ /** Visible label above the row, which also names its `role="group"` ("Start time" / "End
433
+ * time" under `range`). Without it the group is named `translations.time` (`"Time"`). */
428
434
  label?: string
429
435
  disabled?: boolean
430
436
  hourCycle: HourCycle
@@ -465,11 +471,17 @@ const TimePanelRow = ({
465
471
  const display = toDisplayTime(value, twelveHour)
466
472
  const patch = (partial: Partial<DisplayTime>) =>
467
473
  onSetTime(fromDisplayTime({ ...display, ...partial }, twelveHour))
474
+ const labelId = useId()
468
475
 
469
476
  return (
470
477
  <div className={cn("flex flex-col gap-1", classNames?.root)}>
471
- {label && <span className={timePanelLabel}>{label}</span>}
478
+ {label && (
479
+ <span id={labelId} className={timePanelLabel}>
480
+ {label}
481
+ </span>
482
+ )}
472
483
  <TimeRow
484
+ aria-labelledby={label ? labelId : undefined}
473
485
  hour={display.hour}
474
486
  minute={display.minute}
475
487
  second={display.second}
@@ -626,7 +638,7 @@ const DatePickerImpl = <Range extends boolean = false>({
626
638
  const portalContainer = useOverlayContainer(container)
627
639
  const { locale: contextLocale } = useLocaleContext()
628
640
  const resolvedLocale = locale ?? contextLocale
629
- const resolvedTimeZone = timeZone ?? getLocalTimeZone()
641
+ const resolvedTimeZone = useTimeZone(timeZone)
630
642
  const resolvedHourCycle = resolveHourCycle({ locale: resolvedLocale, format, hourCycle })
631
643
  const isInvalid = invalid || error != null
632
644
  const isRange = Boolean(range)
@@ -652,6 +664,7 @@ const DatePickerImpl = <Range extends boolean = false>({
652
664
  onChange,
653
665
  })
654
666
  const [staged, setStaged] = useState<Value>(committed)
667
+ const zoneReseed = useRef<string | null>(null)
655
668
 
656
669
  return (
657
670
  <FieldShell
@@ -686,6 +699,11 @@ const DatePickerImpl = <Range extends boolean = false>({
686
699
  value={toArkValues(withConfirm ? staged : value, resolvedTimeZone)}
687
700
  defaultValue={withConfirm ? undefined : toArkValues(defaultValue, resolvedTimeZone)}
688
701
  onValueChange={(details) => {
702
+ // A zone change re-expresses the selection in the new zone; that echo is not a change.
703
+ if (zoneReseed.current === hashArkValues(details.value)) {
704
+ zoneReseed.current = null
705
+ return
706
+ }
689
707
  const next = fromArkValues(details.value, isRange, resolvedTimeZone) as Value
690
708
  if (withConfirm) setStaged(next)
691
709
  else onChange?.(next)
@@ -702,8 +720,8 @@ const DatePickerImpl = <Range extends boolean = false>({
702
720
  )
703
721
  : undefined
704
722
  }
705
- min={min ? dateToCalendarValue(min, resolvedTimeZone) : undefined}
706
- max={max ? dateToCalendarValue(max, resolvedTimeZone) : undefined}
723
+ min={min ? dateToArkValue(min, resolvedTimeZone) : undefined}
724
+ max={max ? dateToArkValue(max, resolvedTimeZone) : undefined}
707
725
  // The typed date+time input shows (and Ark syncs into it) the same numeric text it parses.
708
726
  format={
709
727
  withTime && showTypeableInput
@@ -724,6 +742,14 @@ const DatePickerImpl = <Range extends boolean = false>({
724
742
  invalid={isInvalid}
725
743
  className={cn("w-full", className)}
726
744
  >
745
+ {/* Keeps the selection, and the typeable input's text, on the same instant when the zone
746
+ * changes, in place rather than by remounting; see `calendar-zone-sync.tsx`. Under
747
+ * `withConfirm` Ark's value is the staged `Date`, so it is controlled either way. */}
748
+ <CalendarZoneSync
749
+ timeZone={resolvedTimeZone}
750
+ controlled={withConfirm || value !== undefined}
751
+ pendingRef={zoneReseed}
752
+ />
727
753
  <Ark.Context>
728
754
  {(api) => (
729
755
  <>
@@ -317,8 +317,15 @@ export type DrawerProps = Omit<
317
317
  children?: ReactNode
318
318
  className?: string
319
319
  classNames?: DrawerClassNames
320
+ /** Overrides the default close button's accessible name (`closeTriggerLabel`, default
321
+ * `"Close"`). The compound `DrawerCloseTrigger` part takes a plain `aria-label` instead. */
322
+ translations?: DrawerTranslations
320
323
  }
321
324
 
325
+ /** The ready-made drawer's wording — `closeTriggerLabel` follows Ark's naming for the
326
+ * same control. */
327
+ export type DrawerTranslations = { closeTriggerLabel?: string }
328
+
322
329
  export const Drawer = ({
323
330
  open,
324
331
  defaultOpen,
@@ -340,6 +347,7 @@ export const Drawer = ({
340
347
  className,
341
348
  classNames,
342
349
  testId,
350
+ translations,
343
351
  ...rest
344
352
  }: DrawerProps) => {
345
353
  const hasHeader = title != null || description != null || withCloseButton
@@ -393,7 +401,12 @@ export const Drawer = ({
393
401
  </DrawerDescription>
394
402
  )}
395
403
  </div>
396
- {withCloseButton && <DrawerCloseTrigger className={classNames?.closeButton} />}
404
+ {withCloseButton && (
405
+ <DrawerCloseTrigger
406
+ aria-label={translations?.closeTriggerLabel}
407
+ className={classNames?.closeButton}
408
+ />
409
+ )}
397
410
  </DrawerHeader>
398
411
  )}
399
412
  <DrawerBody
@@ -17,5 +17,6 @@ export {
17
17
  DrawerRoot,
18
18
  type DrawerRootProps,
19
19
  DrawerTitle,
20
+ type DrawerTranslations,
20
21
  DrawerTrigger,
21
22
  } from "./drawer"
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
- import { Field as Ark, type UseFieldContext } from "@ark-ui/react/field"
3
+ import { ark } from "@ark-ui/react/factory"
4
+ import { Field as Ark, type UseFieldContext, useFieldContext } from "@ark-ui/react/field"
4
5
  import { cva, type VariantProps } from "class-variance-authority"
5
6
  import type { ComponentPropsWithoutRef, ReactNode } from "react"
6
7
  import type { NoAsChild } from "../../lib/as-child"
@@ -124,6 +125,13 @@ export type FieldProps = NoAsChild<Omit<ComponentPropsWithoutRef<typeof Ark.Root
124
125
  description?: ReactNode
125
126
  /** Error message below the control; its presence sets `invalid`. */
126
127
  error?: ReactNode
128
+ /**
129
+ * The control is a composite — a radio group, a row of inputs — with no single labelable
130
+ * element for the `<label>` to point at. The label then renders as plain text with no `for`
131
+ * (which would otherwise reference an id nothing carries) and names the control only through
132
+ * the `aria-labelledby` that `fieldA11yProps` puts on it.
133
+ */
134
+ composite?: boolean
127
135
  /** Styles the field root (matching the kit's other components). */
128
136
  className?: string
129
137
  classNames?: FieldClassNames
@@ -146,6 +154,7 @@ export const FieldShell = ({
146
154
  className,
147
155
  classNames,
148
156
  testId,
157
+ composite,
149
158
  children,
150
159
  }: Pick<
151
160
  FieldProps,
@@ -158,6 +167,7 @@ export const FieldShell = ({
158
167
  | "className"
159
168
  | "classNames"
160
169
  | "testId"
170
+ | "composite"
161
171
  > & { children: ReactNode }) => {
162
172
  const hasField = label != null || description != null || error != null || Boolean(required)
163
173
  if (!hasField) return children
@@ -172,12 +182,26 @@ export const FieldShell = ({
172
182
  className={className}
173
183
  classNames={classNames}
174
184
  testId={testId}
185
+ composite={composite}
175
186
  >
176
187
  {children}
177
188
  </Field>
178
189
  )
179
190
  }
180
191
 
192
+ /**
193
+ * `Ark.Label`'s props on a `<span>`, minus its `for`: Ark always binds the label to
194
+ * `field.ids.control`, an id only `Ark.Input` (or a machine reading it, like `NumberInput`'s) ever
195
+ * renders. A composite control has no such element, so the binding would dangle — and a `<label>`
196
+ * with nothing to label is no better. Its name comes from `aria-labelledby` pointing at this
197
+ * span's id instead. Ark's `mergeProps` ignores an `undefined` override, so `htmlFor` has to be
198
+ * left out rather than unset on `Ark.Label`.
199
+ */
200
+ const CompositeLabel = (labelProps: ComponentPropsWithoutRef<"span">) => {
201
+ const { htmlFor: _htmlFor, ...fieldLabelProps } = useFieldContext().getLabelProps()
202
+ return <ark.span {...fieldLabelProps} {...labelProps} />
203
+ }
204
+
181
205
  export const Field = ({
182
206
  label,
183
207
  description,
@@ -189,10 +213,12 @@ export const Field = ({
189
213
  className,
190
214
  classNames,
191
215
  testId,
216
+ composite,
192
217
  asChild: _asChild,
193
218
  ...rest
194
219
  }: FieldProps) => {
195
220
  const isInvalid = invalid ?? error != null
221
+ const Label = composite ? CompositeLabel : Ark.Label
196
222
 
197
223
  return (
198
224
  <Ark.Root
@@ -203,7 +229,7 @@ export const Field = ({
203
229
  {...rest}
204
230
  >
205
231
  {label != null && (
206
- <Ark.Label className={cn(fieldLabel({ size }), classNames?.label)}>
232
+ <Label className={cn(fieldLabel({ size }), classNames?.label)}>
207
233
  {label}
208
234
  {required && (
209
235
  <Ark.RequiredIndicator
@@ -212,7 +238,7 @@ export const Field = ({
212
238
  *
213
239
  </Ark.RequiredIndicator>
214
240
  )}
215
- </Ark.Label>
241
+ </Label>
216
242
  )}
217
243
 
218
244
  {description != null && (
@@ -45,3 +45,24 @@ describe("FileUpload", () => {
45
45
  expect(dropzone.contains(screen.getByText(/drop files here or click to browse/i))).toBe(true)
46
46
  })
47
47
  })
48
+
49
+ describe("FileUpload translations", () => {
50
+ const file = new File(["x"], "cv.pdf", { type: "application/pdf" })
51
+
52
+ it("names each file's remove button and the browse button from translations", () => {
53
+ render(
54
+ <FileUpload
55
+ withButton
56
+ value={[file]}
57
+ translations={{ deleteFile: (f) => `Retirer ${f.name}`, browseFiles: "Parcourir" }}
58
+ />,
59
+ )
60
+ expect(screen.getByRole("button", { name: "Retirer cv.pdf" })).toBeTruthy()
61
+ expect(screen.getByRole("button", { name: "Parcourir" })).toBeTruthy()
62
+ })
63
+
64
+ it("keeps the English defaults for the keys a partial override omits", () => {
65
+ render(<FileUpload withButton value={[file]} translations={{ browseFiles: "Parcourir" }} />)
66
+ expect(screen.getByRole("button", { name: "Remove cv.pdf" })).toBeTruthy()
67
+ })
68
+ })
@@ -11,7 +11,7 @@ import {
11
11
  FileVideo,
12
12
  UploadCloud,
13
13
  } from "lucide-react"
14
- import type { ReactNode, Ref } from "react"
14
+ import type { ComponentProps, ReactNode, Ref } from "react"
15
15
  import { match, P } from "ts-pattern"
16
16
  import { cn } from "../../lib/cn"
17
17
  import { props } from "../../lib/props"
@@ -84,8 +84,26 @@ export type FileUploadProps = Pick<FieldProps, "label" | "description" | "error"
84
84
  hint?: ReactNode
85
85
  className?: string
86
86
  classNames?: FileUploadClassNames
87
+ /** Overrides the browse button's text and the accessible names — see
88
+ * `FileUploadTranslations`. A partial override keeps the other defaults. */
89
+ translations?: FileUploadTranslations
87
90
  }
88
91
 
92
+ /** Ark's own FileUpload `translations` type, derived structurally rather than imported from
93
+ * `@zag-js/file-upload`: `deleteFile(file)` names each file's remove button (default
94
+ * `` `Remove ${file.name}` ``), `dropzone` and `itemPreview(file)` keep Ark's English
95
+ * defaults. Plus `browseFiles`, the `withButton` trigger's text (default `"Browse files"`). */
96
+ export type FileUploadTranslations = NonNullable<
97
+ ComponentProps<typeof Ark.Root>["translations"]
98
+ > & {
99
+ browseFiles?: ReactNode
100
+ }
101
+
102
+ const FILE_UPLOAD_DEFAULT_TRANSLATIONS = {
103
+ deleteFile: (file: File) => `Remove ${file.name}`,
104
+ browseFiles: "Browse files",
105
+ } as const satisfies FileUploadTranslations
106
+
89
107
  export const FileUpload = ({
90
108
  value,
91
109
  onChange,
@@ -108,7 +126,12 @@ export const FileUpload = ({
108
126
  className,
109
127
  classNames,
110
128
  testId,
129
+ translations,
111
130
  }: FileUploadProps) => {
131
+ const { browseFiles, ...arkTranslations } = {
132
+ ...FILE_UPLOAD_DEFAULT_TRANSLATIONS,
133
+ ...translations,
134
+ }
112
135
  // Red state is driven independently of the `Field` error slot so a form
113
136
  // library can flip it from `fieldState.invalid` (see FormControlProps).
114
137
  const isInvalid = invalid || error != null
@@ -125,6 +148,7 @@ export const FileUpload = ({
125
148
  invalid={isInvalid}
126
149
  name={name}
127
150
  id={id}
151
+ translations={arkTranslations}
128
152
  onFileChange={onChange ? (d) => onChange(d.acceptedFiles) : undefined}
129
153
  // `relative` contains the absolutely positioned hidden input, which would
130
154
  // otherwise escape any scroller this control sits in.
@@ -167,7 +191,7 @@ export const FileUpload = ({
167
191
  type="button"
168
192
  disabled={disabled}
169
193
  >
170
- Browse files
194
+ {browseFiles}
171
195
  </Button>
172
196
  </Ark.Trigger>
173
197
  )}
@@ -197,7 +221,6 @@ export const FileUpload = ({
197
221
  <Ark.ItemSizeText className="text-xs text-gray-light-600 dark:text-gray-dark-400" />
198
222
  </div>
199
223
  <Ark.ItemDeleteTrigger
200
- aria-label={`Remove ${file.name}`}
201
224
  className={cn(
202
225
  "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm me-1",
203
226
  "text-gray-light-500 dark:text-gray-dark-400",
@@ -1,3 +1,3 @@
1
1
  "use client"
2
2
 
3
- export { FileUpload, type FileUploadProps } from "./file-upload"
3
+ export { FileUpload, type FileUploadProps, type FileUploadTranslations } from "./file-upload"
@@ -17,4 +17,35 @@ describe("Kbd", () => {
17
17
  const trigger = screen.getByRole("button", { name: "⌘K" })
18
18
  expect(trigger.className).toContain("focus-visible:ring-brand-500")
19
19
  })
20
+
21
+ it("pairs the light-mode surface with a dark-mode one, so the cap never vanishes", () => {
22
+ render(<Kbd>K</Kbd>)
23
+ const cls = screen.getByText("K").className
24
+ // `bg-white/4` alone is invisible on a near-white page.
25
+ expect(cls).toContain("bg-black/3")
26
+ expect(cls).toContain("dark:bg-white/4")
27
+ })
28
+
29
+ it("sets regular weight, so fallback symbol glyphs are not bolded", () => {
30
+ render(<Kbd>⌘</Kbd>)
31
+ const cls = screen.getByText("⌘").className
32
+ expect(cls).toContain("font-normal")
33
+ expect(cls).not.toContain("font-medium")
34
+ })
35
+
36
+ it.each([
37
+ ["sm", "text-xs"],
38
+ ["md", "text-sm"],
39
+ ["lg", "text-base"],
40
+ ] as const)("uses a legible type step at size %s", (size, text) => {
41
+ render(<Kbd size={size}>Esc</Kbd>)
42
+ expect(screen.getByText("Esc").className).toContain(text)
43
+ })
44
+
45
+ it("draws a 1.5px non-scaling stroke on an inner svg at every size", () => {
46
+ render(<Kbd>K</Kbd>)
47
+ const cls = screen.getByText("K").className
48
+ expect(cls).toContain("[&_svg]:stroke-[1.5]")
49
+ expect(cls).toContain("[&_svg_*]:[vector-effect:non-scaling-stroke]")
50
+ })
20
51
  })