@42-central/ui-react 0.19.1 → 0.20.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 (1315) hide show
  1. package/biome/no-gray-scale-class.grit +27 -0
  2. package/dist/{chunk-HCYULRWT.js → chunk-2KN3MI7I.js} +38 -34
  3. package/dist/chunk-2KN3MI7I.js.map +1 -0
  4. package/dist/chunk-2LI3VPDP.js +39 -0
  5. package/dist/chunk-2LI3VPDP.js.map +1 -0
  6. package/dist/{chunk-2NNZHVKD.js → chunk-2OQP7UY4.js} +22 -18
  7. package/dist/chunk-2OQP7UY4.js.map +1 -0
  8. package/dist/{chunk-RKYXG6X7.js → chunk-2TM7UVM2.js} +16 -13
  9. package/dist/chunk-2TM7UVM2.js.map +1 -0
  10. package/dist/chunk-3REFDGOM.js +89 -0
  11. package/dist/chunk-3REFDGOM.js.map +1 -0
  12. package/dist/{chunk-TBTSEPGP.js → chunk-45DFYIK5.js} +9 -7
  13. package/dist/chunk-45DFYIK5.js.map +1 -0
  14. package/dist/{chunk-CYWMES5P.js → chunk-4BGU2UQB.js} +23 -11
  15. package/dist/chunk-4BGU2UQB.js.map +1 -0
  16. package/dist/chunk-4EU6FGGB.js +104 -0
  17. package/dist/chunk-4EU6FGGB.js.map +1 -0
  18. package/dist/{chunk-P3XMBETI.js → chunk-4G3N7UMJ.js} +4 -7
  19. package/dist/chunk-4G3N7UMJ.js.map +1 -0
  20. package/dist/chunk-4TCTMRR5.js +293 -0
  21. package/dist/chunk-4TCTMRR5.js.map +1 -0
  22. package/dist/chunk-5337N3FE.js +176 -0
  23. package/dist/chunk-5337N3FE.js.map +1 -0
  24. package/dist/{chunk-GCGX4FEF.js → chunk-6KER77RS.js} +27 -41
  25. package/dist/chunk-6KER77RS.js.map +1 -0
  26. package/dist/chunk-6N6J2DOE.js +27 -0
  27. package/dist/chunk-6N6J2DOE.js.map +1 -0
  28. package/dist/{chunk-A6MYJTJI.js → chunk-6OV6EJQ2.js} +6 -7
  29. package/dist/chunk-6OV6EJQ2.js.map +1 -0
  30. package/dist/chunk-7AWOMWCQ.js +345 -0
  31. package/dist/chunk-7AWOMWCQ.js.map +1 -0
  32. package/dist/{chunk-Z6RPMRFH.js → chunk-7R4CDHBK.js} +9 -8
  33. package/dist/chunk-7R4CDHBK.js.map +1 -0
  34. package/dist/chunk-7TDHT3QD.js +62 -0
  35. package/dist/chunk-7TDHT3QD.js.map +1 -0
  36. package/dist/chunk-AHM6SGEU.js +15 -0
  37. package/dist/chunk-AHM6SGEU.js.map +1 -0
  38. package/dist/chunk-AZ2VUAGX.js +3 -0
  39. package/dist/chunk-AZ2VUAGX.js.map +1 -0
  40. package/dist/chunk-BUFALAEK.js +337 -0
  41. package/dist/chunk-BUFALAEK.js.map +1 -0
  42. package/dist/chunk-CDHIF2NV.js +340 -0
  43. package/dist/chunk-CDHIF2NV.js.map +1 -0
  44. package/dist/chunk-CQ4M4BSF.js +12 -0
  45. package/dist/chunk-CQ4M4BSF.js.map +1 -0
  46. package/dist/chunk-DHM4IG2O.js +13 -0
  47. package/dist/chunk-DHM4IG2O.js.map +1 -0
  48. package/dist/chunk-DHTSVJ4G.js +948 -0
  49. package/dist/chunk-DHTSVJ4G.js.map +1 -0
  50. package/dist/{chunk-WSIVRDRB.js → chunk-DUPE2CRU.js} +3 -3
  51. package/dist/{chunk-WSIVRDRB.js.map → chunk-DUPE2CRU.js.map} +1 -1
  52. package/dist/chunk-EIBDLRAR.js +30 -0
  53. package/dist/chunk-EIBDLRAR.js.map +1 -0
  54. package/dist/chunk-FUNTJZX7.js +217 -0
  55. package/dist/chunk-FUNTJZX7.js.map +1 -0
  56. package/dist/{chunk-YWRBG23W.js → chunk-FXDLS23K.js} +6 -3
  57. package/dist/chunk-FXDLS23K.js.map +1 -0
  58. package/dist/chunk-FZNPJAGJ.js +62 -0
  59. package/dist/chunk-FZNPJAGJ.js.map +1 -0
  60. package/dist/{chunk-CHTN5AHI.js → chunk-GGT4GJD6.js} +3 -3
  61. package/dist/chunk-GGT4GJD6.js.map +1 -0
  62. package/dist/chunk-GIPQUKCN.js +44 -0
  63. package/dist/chunk-GIPQUKCN.js.map +1 -0
  64. package/dist/chunk-H26K66EU.js +316 -0
  65. package/dist/chunk-H26K66EU.js.map +1 -0
  66. package/dist/chunk-H7INUXZD.js +104 -0
  67. package/dist/chunk-H7INUXZD.js.map +1 -0
  68. package/dist/{chunk-AIQG7IIT.js → chunk-H7WOMZXO.js} +10 -5
  69. package/dist/chunk-H7WOMZXO.js.map +1 -0
  70. package/dist/{chunk-WJOHNCYY.js → chunk-HBFN5W7Q.js} +37 -90
  71. package/dist/chunk-HBFN5W7Q.js.map +1 -0
  72. package/dist/chunk-HBWV5EPU.js +31 -0
  73. package/dist/chunk-HBWV5EPU.js.map +1 -0
  74. package/dist/chunk-HC4XVBP2.js +118 -0
  75. package/dist/chunk-HC4XVBP2.js.map +1 -0
  76. package/dist/chunk-HDRC6ITF.js +93 -0
  77. package/dist/chunk-HDRC6ITF.js.map +1 -0
  78. package/dist/chunk-HDYORQZN.js +23 -0
  79. package/dist/chunk-HDYORQZN.js.map +1 -0
  80. package/dist/chunk-HEQ2H6VO.js +148 -0
  81. package/dist/chunk-HEQ2H6VO.js.map +1 -0
  82. package/dist/chunk-HVOEVB4E.js +80 -0
  83. package/dist/chunk-HVOEVB4E.js.map +1 -0
  84. package/dist/chunk-HX3LNK26.js +193 -0
  85. package/dist/chunk-HX3LNK26.js.map +1 -0
  86. package/dist/{chunk-CSCVTESP.js → chunk-IMP5VHEN.js} +4 -11
  87. package/dist/chunk-IMP5VHEN.js.map +1 -0
  88. package/dist/{chunk-57BTVRRB.js → chunk-IPYHTCFL.js} +3 -3
  89. package/dist/{chunk-57BTVRRB.js.map → chunk-IPYHTCFL.js.map} +1 -1
  90. package/dist/chunk-J2WSKRJW.js +3 -0
  91. package/dist/chunk-J2WSKRJW.js.map +1 -0
  92. package/dist/chunk-J43LSYQO.js +14 -0
  93. package/dist/chunk-J43LSYQO.js.map +1 -0
  94. package/dist/{chunk-Z43YWH4R.js → chunk-JL4QMM46.js} +47 -25
  95. package/dist/chunk-JL4QMM46.js.map +1 -0
  96. package/dist/chunk-JQJ23YQX.js +38 -0
  97. package/dist/chunk-JQJ23YQX.js.map +1 -0
  98. package/dist/{chunk-SVKU3GUN.js → chunk-JYK6JVR3.js} +13 -13
  99. package/dist/chunk-JYK6JVR3.js.map +1 -0
  100. package/dist/chunk-JYKP4RSG.js +304 -0
  101. package/dist/chunk-JYKP4RSG.js.map +1 -0
  102. package/dist/chunk-K6BHDFX3.js +120 -0
  103. package/dist/chunk-K6BHDFX3.js.map +1 -0
  104. package/dist/chunk-K6YASO4L.js +25 -0
  105. package/dist/chunk-K6YASO4L.js.map +1 -0
  106. package/dist/{chunk-64T6Z7BA.js → chunk-KOT4PWGE.js} +107 -95
  107. package/dist/chunk-KOT4PWGE.js.map +1 -0
  108. package/dist/{chunk-RIP5G47F.js → chunk-LJ3GHC4V.js} +13 -11
  109. package/dist/chunk-LJ3GHC4V.js.map +1 -0
  110. package/dist/{chunk-YW6Q6ERX.js → chunk-LSIX2PVU.js} +49 -56
  111. package/dist/chunk-LSIX2PVU.js.map +1 -0
  112. package/dist/chunk-LZWA7V62.js +140 -0
  113. package/dist/chunk-LZWA7V62.js.map +1 -0
  114. package/dist/chunk-MKJKCBRE.js +437 -0
  115. package/dist/chunk-MKJKCBRE.js.map +1 -0
  116. package/dist/{chunk-QIDAXFKK.js → chunk-NJ4RO3CT.js} +52 -18
  117. package/dist/chunk-NJ4RO3CT.js.map +1 -0
  118. package/dist/{chunk-PINENGML.js → chunk-P276SCCV.js} +15 -8
  119. package/dist/chunk-P276SCCV.js.map +1 -0
  120. package/dist/chunk-PAFS7TED.js +85 -0
  121. package/dist/chunk-PAFS7TED.js.map +1 -0
  122. package/dist/chunk-PD4FX34E.js +309 -0
  123. package/dist/chunk-PD4FX34E.js.map +1 -0
  124. package/dist/{chunk-BEL75C7N.js → chunk-PMUCGFY5.js} +6 -4
  125. package/dist/chunk-PMUCGFY5.js.map +1 -0
  126. package/dist/{chunk-4NNGTNPV.js → chunk-Q5ZO2O25.js} +48 -34
  127. package/dist/chunk-Q5ZO2O25.js.map +1 -0
  128. package/dist/{chunk-YKUCSV34.js → chunk-R52P43LZ.js} +7 -13
  129. package/dist/chunk-R52P43LZ.js.map +1 -0
  130. package/dist/{chunk-CZEKZ5HR.js → chunk-R57QP43T.js} +32 -11
  131. package/dist/chunk-R57QP43T.js.map +1 -0
  132. package/dist/{chunk-I4SQQIP5.js → chunk-R5LYFTHA.js} +2 -2
  133. package/dist/chunk-R5LYFTHA.js.map +1 -0
  134. package/dist/{chunk-FOMR74VE.js → chunk-RGLNH7A5.js} +6 -6
  135. package/dist/chunk-RGLNH7A5.js.map +1 -0
  136. package/dist/chunk-RNRD6ER5.js +32 -0
  137. package/dist/chunk-RNRD6ER5.js.map +1 -0
  138. package/dist/{chunk-VZBUQNLX.js → chunk-S4TRYMCU.js} +51 -40
  139. package/dist/chunk-S4TRYMCU.js.map +1 -0
  140. package/dist/chunk-SDVZFXQ2.js +21 -0
  141. package/dist/chunk-SDVZFXQ2.js.map +1 -0
  142. package/dist/{chunk-CTSO6V72.js → chunk-SE3CGQRO.js} +11 -5
  143. package/dist/chunk-SE3CGQRO.js.map +1 -0
  144. package/dist/chunk-TCFB23JT.js +354 -0
  145. package/dist/chunk-TCFB23JT.js.map +1 -0
  146. package/dist/{chunk-BTFBBNRW.js → chunk-THLMW5IU.js} +5 -5
  147. package/dist/{chunk-BTFBBNRW.js.map → chunk-THLMW5IU.js.map} +1 -1
  148. package/dist/{chunk-YQHOKMSV.js → chunk-U2PNMMDB.js} +60 -53
  149. package/dist/chunk-U2PNMMDB.js.map +1 -0
  150. package/dist/{chunk-IRXZHLUL.js → chunk-VALQ2XVA.js} +4 -4
  151. package/dist/chunk-VALQ2XVA.js.map +1 -0
  152. package/dist/{chunk-UJZIF2BA.js → chunk-VVM7JMZS.js} +40 -54
  153. package/dist/chunk-VVM7JMZS.js.map +1 -0
  154. package/dist/{chunk-OGJFDNIS.js → chunk-WFHY6NRQ.js} +85 -54
  155. package/dist/chunk-WFHY6NRQ.js.map +1 -0
  156. package/dist/chunk-WG3BCIU4.js +20 -0
  157. package/dist/chunk-WG3BCIU4.js.map +1 -0
  158. package/dist/{chunk-K5UWVH6P.js → chunk-WR444JRU.js} +35 -26
  159. package/dist/chunk-WR444JRU.js.map +1 -0
  160. package/dist/chunk-XFEPUGUZ.js +15 -0
  161. package/dist/chunk-XFEPUGUZ.js.map +1 -0
  162. package/dist/chunk-XXOR34T4.js +10 -0
  163. package/dist/chunk-XXOR34T4.js.map +1 -0
  164. package/dist/{chunk-VZH6TS7M.js → chunk-Z5WYYDG2.js} +7 -4
  165. package/dist/chunk-Z5WYYDG2.js.map +1 -0
  166. package/dist/{chunk-IG7FBZVM.js → chunk-ZFUTGBJC.js} +13 -12
  167. package/dist/chunk-ZFUTGBJC.js.map +1 -0
  168. package/dist/{chunk-LM6F6DLR.js → chunk-ZN3WYGIQ.js} +18 -9
  169. package/dist/chunk-ZN3WYGIQ.js.map +1 -0
  170. package/dist/{chunk-FAOBC4IS.js → chunk-ZWOZL4XX.js} +38 -28
  171. package/dist/chunk-ZWOZL4XX.js.map +1 -0
  172. package/dist/chunk-ZYX564HO.js +27 -0
  173. package/dist/chunk-ZYX564HO.js.map +1 -0
  174. package/dist/colors.css +16 -8
  175. package/dist/components/accordion/accordion.d.ts +13 -4
  176. package/dist/components/accordion/accordion.d.ts.map +1 -1
  177. package/dist/components/accordion/index.d.ts +1 -1
  178. package/dist/components/accordion/index.d.ts.map +1 -1
  179. package/dist/components/accordion/index.js +27 -15
  180. package/dist/components/accordion/index.js.map +1 -1
  181. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  182. package/dist/components/action-icon/index.js +5 -4
  183. package/dist/components/alert/alert.d.ts +20 -8
  184. package/dist/components/alert/alert.d.ts.map +1 -1
  185. package/dist/components/alert/index.d.ts +1 -1
  186. package/dist/components/alert/index.d.ts.map +1 -1
  187. package/dist/components/alert/index.js +22 -10
  188. package/dist/components/alert/index.js.map +1 -1
  189. package/dist/components/ambient-background/ambient-background.d.ts +13 -3
  190. package/dist/components/ambient-background/ambient-background.d.ts.map +1 -1
  191. package/dist/components/ambient-background/index.js +38 -27
  192. package/dist/components/ambient-background/index.js.map +1 -1
  193. package/dist/components/app-shell/app-shell.d.ts +68 -6
  194. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  195. package/dist/components/app-shell/index.d.ts +1 -1
  196. package/dist/components/app-shell/index.d.ts.map +1 -1
  197. package/dist/components/app-shell/index.js +46 -18
  198. package/dist/components/app-shell/index.js.map +1 -1
  199. package/dist/components/aspect-ratio/aspect-ratio.d.ts +39 -0
  200. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  201. package/dist/components/aspect-ratio/index.d.ts +2 -0
  202. package/dist/components/aspect-ratio/index.d.ts.map +1 -0
  203. package/dist/components/aspect-ratio/index.js +33 -0
  204. package/dist/components/aspect-ratio/index.js.map +1 -0
  205. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  206. package/dist/components/autocomplete/index.js +16 -19
  207. package/dist/components/autocomplete/index.js.map +1 -1
  208. package/dist/components/avatar/avatar.d.ts +14 -2
  209. package/dist/components/avatar/avatar.d.ts.map +1 -1
  210. package/dist/components/avatar/index.d.ts +1 -1
  211. package/dist/components/avatar/index.d.ts.map +1 -1
  212. package/dist/components/avatar/index.js +26 -13
  213. package/dist/components/avatar/index.js.map +1 -1
  214. package/dist/components/badge/badge.d.ts.map +1 -1
  215. package/dist/components/badge/index.js +6 -100
  216. package/dist/components/badge/index.js.map +1 -1
  217. package/dist/components/breadcrumb/breadcrumb.d.ts +21 -5
  218. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  219. package/dist/components/breadcrumb/index.d.ts +1 -1
  220. package/dist/components/breadcrumb/index.d.ts.map +1 -1
  221. package/dist/components/breadcrumb/index.js +30 -6
  222. package/dist/components/breadcrumb/index.js.map +1 -1
  223. package/dist/components/button/button.d.ts +37 -16
  224. package/dist/components/button/button.d.ts.map +1 -1
  225. package/dist/components/button/index.js +5 -4
  226. package/dist/components/button-multi-select/index.js +9 -7
  227. package/dist/components/button-multi-select/index.js.map +1 -1
  228. package/dist/components/button-select/button-select.d.ts.map +1 -1
  229. package/dist/components/button-select/index.js +9 -7
  230. package/dist/components/button-select/index.js.map +1 -1
  231. package/dist/components/calendar/calendar-body.d.ts +10 -1
  232. package/dist/components/calendar/calendar-body.d.ts.map +1 -1
  233. package/dist/components/calendar/calendar.d.ts +24 -7
  234. package/dist/components/calendar/calendar.d.ts.map +1 -1
  235. package/dist/components/calendar/index.d.ts +2 -1
  236. package/dist/components/calendar/index.d.ts.map +1 -1
  237. package/dist/components/calendar/index.js +10 -8
  238. package/dist/components/camera/camera-machine.d.ts +131 -0
  239. package/dist/components/camera/camera-machine.d.ts.map +1 -0
  240. package/dist/components/camera/camera.d.ts +230 -0
  241. package/dist/components/camera/camera.d.ts.map +1 -0
  242. package/dist/components/camera/fake-camera.d.ts +77 -0
  243. package/dist/components/camera/fake-camera.d.ts.map +1 -0
  244. package/dist/components/camera/index.d.ts +5 -0
  245. package/dist/components/camera/index.d.ts.map +1 -0
  246. package/dist/components/camera/index.js +38 -0
  247. package/dist/components/camera/index.js.map +1 -0
  248. package/dist/components/camera/platform.d.ts +21 -0
  249. package/dist/components/camera/platform.d.ts.map +1 -0
  250. package/dist/components/camera/use-camera.d.ts +98 -0
  251. package/dist/components/camera/use-camera.d.ts.map +1 -0
  252. package/dist/components/card/card.d.ts.map +1 -1
  253. package/dist/components/card/index.js +2 -1
  254. package/dist/components/carousel/carousel.d.ts +270 -0
  255. package/dist/components/carousel/carousel.d.ts.map +1 -0
  256. package/dist/components/carousel/index.d.ts +2 -0
  257. package/dist/components/carousel/index.d.ts.map +1 -0
  258. package/dist/components/carousel/index.js +666 -0
  259. package/dist/components/carousel/index.js.map +1 -0
  260. package/dist/components/chart/chart.d.ts +20 -2
  261. package/dist/components/chart/chart.d.ts.map +1 -1
  262. package/dist/components/chart/index.js +11 -1
  263. package/dist/components/chart/index.js.map +1 -1
  264. package/dist/components/chart/styles.css +12 -10
  265. package/dist/components/checkbox/checkbox.d.ts +8 -1
  266. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  267. package/dist/components/checkbox/index.d.ts +1 -1
  268. package/dist/components/checkbox/index.d.ts.map +1 -1
  269. package/dist/components/checkbox/index.js +7 -5
  270. package/dist/components/choice-card-group/choice-card-group.d.ts +1 -1
  271. package/dist/components/choice-card-group/choice-card-group.d.ts.map +1 -1
  272. package/dist/components/choice-card-group/index.js +50 -48
  273. package/dist/components/choice-card-group/index.js.map +1 -1
  274. package/dist/components/circular-progress/circular-progress.d.ts +9 -1
  275. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  276. package/dist/components/circular-progress/index.js +12 -1
  277. package/dist/components/circular-progress/index.js.map +1 -1
  278. package/dist/components/clipboard/clipboard.d.ts +17 -8
  279. package/dist/components/clipboard/clipboard.d.ts.map +1 -1
  280. package/dist/components/clipboard/copy.d.ts +19 -5
  281. package/dist/components/clipboard/copy.d.ts.map +1 -1
  282. package/dist/components/clipboard/index.d.ts +1 -1
  283. package/dist/components/clipboard/index.d.ts.map +1 -1
  284. package/dist/components/clipboard/index.js +60 -23
  285. package/dist/components/clipboard/index.js.map +1 -1
  286. package/dist/components/code/code.d.ts.map +1 -1
  287. package/dist/components/code/index.js +3 -2
  288. package/dist/components/code/index.js.map +1 -1
  289. package/dist/components/code-block/chrome.d.ts +10 -9
  290. package/dist/components/code-block/chrome.d.ts.map +1 -1
  291. package/dist/components/code-block/chrome.js +10 -8
  292. package/dist/components/code-block/code-block.d.ts +6 -11
  293. package/dist/components/code-block/code-block.d.ts.map +1 -1
  294. package/dist/components/code-block/index.d.ts +2 -2
  295. package/dist/components/code-block/index.d.ts.map +1 -1
  296. package/dist/components/code-block/index.js +11 -9
  297. package/dist/components/code-block/index.js.map +1 -1
  298. package/dist/components/code-block/static.d.ts +3 -5
  299. package/dist/components/code-block/static.d.ts.map +1 -1
  300. package/dist/components/code-block/static.js.map +1 -1
  301. package/dist/components/collapse/index.js +2 -2
  302. package/dist/components/combobox/combobox.d.ts +2 -2
  303. package/dist/components/combobox/combobox.d.ts.map +1 -1
  304. package/dist/components/combobox/index.js +10 -8
  305. package/dist/components/combobox-list/combobox-list.d.ts +10 -2
  306. package/dist/components/combobox-list/combobox-list.d.ts.map +1 -1
  307. package/dist/components/combobox-list/combobox-search-row.d.ts +31 -0
  308. package/dist/components/combobox-list/combobox-search-row.d.ts.map +1 -0
  309. package/dist/components/combobox-list/index.d.ts +1 -1
  310. package/dist/components/combobox-list/index.d.ts.map +1 -1
  311. package/dist/components/combobox-list/index.js +13 -10
  312. package/dist/components/compare/compare.d.ts +45 -0
  313. package/dist/components/compare/compare.d.ts.map +1 -0
  314. package/dist/components/compare/index.d.ts +2 -0
  315. package/dist/components/compare/index.d.ts.map +1 -0
  316. package/dist/components/compare/index.js +206 -0
  317. package/dist/components/compare/index.js.map +1 -0
  318. package/dist/components/container/container.d.ts +7 -1
  319. package/dist/components/container/container.d.ts.map +1 -1
  320. package/dist/components/container/index.js.map +1 -1
  321. package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts +13 -12
  322. package/dist/components/data-table/data-table-filter/data-table-date-filter.d.ts.map +1 -1
  323. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts +4 -1
  324. package/dist/components/data-table/data-table-filter/data-table-number-filter.d.ts.map +1 -1
  325. package/dist/components/data-table/data-table-filter/index.d.ts +8 -4
  326. package/dist/components/data-table/data-table-filter/index.d.ts.map +1 -1
  327. package/dist/components/data-table/data-table-header-cell.d.ts +6 -9
  328. package/dist/components/data-table/data-table-header-cell.d.ts.map +1 -1
  329. package/dist/components/data-table/data-table-icons.d.ts +27 -0
  330. package/dist/components/data-table/data-table-icons.d.ts.map +1 -0
  331. package/dist/components/data-table/data-table-pagination.d.ts +18 -3
  332. package/dist/components/data-table/data-table-pagination.d.ts.map +1 -1
  333. package/dist/components/data-table/data-table-stack.d.ts +5 -2
  334. package/dist/components/data-table/data-table-stack.d.ts.map +1 -1
  335. package/dist/components/data-table/data-table-state.d.ts.map +1 -1
  336. package/dist/components/data-table/data-table-toolbar.d.ts +7 -2
  337. package/dist/components/data-table/data-table-toolbar.d.ts.map +1 -1
  338. package/dist/components/data-table/data-table-translations.d.ts +11 -2
  339. package/dist/components/data-table/data-table-translations.d.ts.map +1 -1
  340. package/dist/components/data-table/data-table.d.ts +12 -1
  341. package/dist/components/data-table/data-table.d.ts.map +1 -1
  342. package/dist/components/data-table/index.d.ts +1 -0
  343. package/dist/components/data-table/index.d.ts.map +1 -1
  344. package/dist/components/data-table/index.js +281 -198
  345. package/dist/components/data-table/index.js.map +1 -1
  346. package/dist/components/date-picker/aliases.d.ts +7 -0
  347. package/dist/components/date-picker/aliases.d.ts.map +1 -1
  348. package/dist/components/date-picker/date-picker.d.ts +15 -6
  349. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  350. package/dist/components/date-picker/date-time-text.d.ts +2 -2
  351. package/dist/components/date-picker/date-time-text.d.ts.map +1 -1
  352. package/dist/components/date-picker/index.d.ts +1 -1
  353. package/dist/components/date-picker/index.d.ts.map +1 -1
  354. package/dist/components/date-picker/index.js +23 -20
  355. package/dist/components/date-picker/index.js.map +1 -1
  356. package/dist/components/divider/divider.d.ts +12 -3
  357. package/dist/components/divider/divider.d.ts.map +1 -1
  358. package/dist/components/divider/index.js +2 -1
  359. package/dist/components/download-button/download-button.d.ts +69 -0
  360. package/dist/components/download-button/download-button.d.ts.map +1 -0
  361. package/dist/components/download-button/index.d.ts +2 -0
  362. package/dist/components/download-button/index.d.ts.map +1 -0
  363. package/dist/components/download-button/index.js +13 -0
  364. package/dist/components/download-button/index.js.map +1 -0
  365. package/dist/components/drawer/drawer.d.ts +79 -44
  366. package/dist/components/drawer/drawer.d.ts.map +1 -1
  367. package/dist/components/drawer/index.d.ts +1 -1
  368. package/dist/components/drawer/index.d.ts.map +1 -1
  369. package/dist/components/drawer/index.js +10 -6
  370. package/dist/components/field/field.d.ts +8 -0
  371. package/dist/components/field/field.d.ts.map +1 -1
  372. package/dist/components/field/index.js +2 -1
  373. package/dist/components/figure/figure.d.ts +27 -0
  374. package/dist/components/figure/figure.d.ts.map +1 -0
  375. package/dist/components/figure/index.d.ts +2 -0
  376. package/dist/components/figure/index.d.ts.map +1 -0
  377. package/dist/components/figure/index.js +7 -0
  378. package/dist/components/figure/index.js.map +1 -0
  379. package/dist/components/file-item/file-item.d.ts +178 -0
  380. package/dist/components/file-item/file-item.d.ts.map +1 -0
  381. package/dist/components/file-item/index.d.ts +2 -0
  382. package/dist/components/file-item/index.d.ts.map +1 -0
  383. package/dist/components/file-item/index.js +25 -0
  384. package/dist/components/file-item/index.js.map +1 -0
  385. package/dist/components/file-preview/file-preview.d.ts +189 -0
  386. package/dist/components/file-preview/file-preview.d.ts.map +1 -0
  387. package/dist/components/file-preview/index.d.ts +2 -0
  388. package/dist/components/file-preview/index.d.ts.map +1 -0
  389. package/dist/components/file-preview/index.js +572 -0
  390. package/dist/components/file-preview/index.js.map +1 -0
  391. package/dist/components/file-queue-summary/file-queue-summary.d.ts +35 -0
  392. package/dist/components/file-queue-summary/file-queue-summary.d.ts.map +1 -0
  393. package/dist/components/file-queue-summary/index.d.ts +3 -0
  394. package/dist/components/file-queue-summary/index.d.ts.map +1 -0
  395. package/dist/components/file-queue-summary/index.js +7 -0
  396. package/dist/components/file-queue-summary/index.js.map +1 -0
  397. package/dist/components/file-trigger/file-trigger.d.ts +40 -0
  398. package/dist/components/file-trigger/file-trigger.d.ts.map +1 -0
  399. package/dist/components/file-trigger/index.d.ts +2 -0
  400. package/dist/components/file-trigger/index.d.ts.map +1 -0
  401. package/dist/components/file-trigger/index.js +11 -0
  402. package/dist/components/file-trigger/index.js.map +1 -0
  403. package/dist/components/file-upload/file-upload.d.ts +102 -14
  404. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  405. package/dist/components/file-upload/index.d.ts +1 -1
  406. package/dist/components/file-upload/index.d.ts.map +1 -1
  407. package/dist/components/file-upload/index.js +205 -101
  408. package/dist/components/file-upload/index.js.map +1 -1
  409. package/dist/components/flex/flex.d.ts +14 -2
  410. package/dist/components/flex/flex.d.ts.map +1 -1
  411. package/dist/components/flex/index.js +2 -1
  412. package/dist/components/gallery/gallery.d.ts +77 -0
  413. package/dist/components/gallery/gallery.d.ts.map +1 -0
  414. package/dist/components/gallery/index.d.ts +3 -0
  415. package/dist/components/gallery/index.d.ts.map +1 -0
  416. package/dist/components/gallery/index.js +272 -0
  417. package/dist/components/gallery/index.js.map +1 -0
  418. package/dist/components/gallery/layout.d.ts +96 -0
  419. package/dist/components/gallery/layout.d.ts.map +1 -0
  420. package/dist/components/grid/grid.d.ts +7 -1
  421. package/dist/components/grid/grid.d.ts.map +1 -1
  422. package/dist/components/grid/index.js +2 -10
  423. package/dist/components/grid/index.js.map +1 -1
  424. package/dist/components/hover-card/index.js +4 -3
  425. package/dist/components/hover-card/index.js.map +1 -1
  426. package/dist/components/image/blur-svg.d.ts +11 -0
  427. package/dist/components/image/blur-svg.d.ts.map +1 -0
  428. package/dist/components/image/image.d.ts +126 -0
  429. package/dist/components/image/image.d.ts.map +1 -0
  430. package/dist/components/image/index.d.ts +3 -0
  431. package/dist/components/image/index.d.ts.map +1 -0
  432. package/dist/components/image/index.js +12 -0
  433. package/dist/components/image/index.js.map +1 -0
  434. package/dist/components/image/srcset.d.ts +47 -0
  435. package/dist/components/image/srcset.d.ts.map +1 -0
  436. package/dist/components/image-cropper/image-cropper.d.ts +208 -0
  437. package/dist/components/image-cropper/image-cropper.d.ts.map +1 -0
  438. package/dist/components/image-cropper/index.d.ts +2 -0
  439. package/dist/components/image-cropper/index.d.ts.map +1 -0
  440. package/dist/components/image-cropper/index.js +22 -0
  441. package/dist/components/image-cropper/index.js.map +1 -0
  442. package/dist/components/indicator/index.js +10 -3
  443. package/dist/components/indicator/index.js.map +1 -1
  444. package/dist/components/indicator/indicator.d.ts +21 -8
  445. package/dist/components/indicator/indicator.d.ts.map +1 -1
  446. package/dist/components/input/index.js +3 -2
  447. package/dist/components/input/input.d.ts +1 -1
  448. package/dist/components/input/input.d.ts.map +1 -1
  449. package/dist/components/kbd/index.d.ts +1 -0
  450. package/dist/components/kbd/index.d.ts.map +1 -1
  451. package/dist/components/kbd/index.js +10 -78
  452. package/dist/components/kbd/index.js.map +1 -1
  453. package/dist/components/kbd/kbd.d.ts +45 -3
  454. package/dist/components/kbd/kbd.d.ts.map +1 -1
  455. package/dist/components/lightbox/index.d.ts +2 -0
  456. package/dist/components/lightbox/index.d.ts.map +1 -0
  457. package/dist/components/lightbox/index.js +1922 -0
  458. package/dist/components/lightbox/index.js.map +1 -0
  459. package/dist/components/lightbox/lightbox-controller.d.ts +97 -0
  460. package/dist/components/lightbox/lightbox-controller.d.ts.map +1 -0
  461. package/dist/components/lightbox/lightbox-machine.d.ts +165 -0
  462. package/dist/components/lightbox/lightbox-machine.d.ts.map +1 -0
  463. package/dist/components/lightbox/lightbox-zoom.d.ts +72 -0
  464. package/dist/components/lightbox/lightbox-zoom.d.ts.map +1 -0
  465. package/dist/components/lightbox/lightbox.d.ts +297 -0
  466. package/dist/components/lightbox/lightbox.d.ts.map +1 -0
  467. package/dist/components/mark/index.js +1 -1
  468. package/dist/components/mark/mark.d.ts.map +1 -1
  469. package/dist/components/menu/index.d.ts +1 -1
  470. package/dist/components/menu/index.d.ts.map +1 -1
  471. package/dist/components/menu/index.js +12 -6
  472. package/dist/components/menu/index.js.map +1 -1
  473. package/dist/components/menu/menu-data.d.ts +5 -8
  474. package/dist/components/menu/menu-data.d.ts.map +1 -1
  475. package/dist/components/menu/menu.d.ts +40 -18
  476. package/dist/components/menu/menu.d.ts.map +1 -1
  477. package/dist/components/modal/index.d.ts +1 -1
  478. package/dist/components/modal/index.d.ts.map +1 -1
  479. package/dist/components/modal/index.js +10 -6
  480. package/dist/components/modal/modal.d.ts +25 -19
  481. package/dist/components/modal/modal.d.ts.map +1 -1
  482. package/dist/components/multi-combobox-list/index.d.ts +1 -1
  483. package/dist/components/multi-combobox-list/index.d.ts.map +1 -1
  484. package/dist/components/multi-combobox-list/index.js +15 -12
  485. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts +10 -2
  486. package/dist/components/multi-combobox-list/multi-combobox-list.d.ts.map +1 -1
  487. package/dist/components/multi-select/index.js +25 -19
  488. package/dist/components/multi-select/index.js.map +1 -1
  489. package/dist/components/multi-select/multi-select.d.ts +5 -2
  490. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  491. package/dist/components/nav-link/index.js +9 -6
  492. package/dist/components/nav-link/nav-link.d.ts +5 -2
  493. package/dist/components/nav-link/nav-link.d.ts.map +1 -1
  494. package/dist/components/nav-link/navigation.d.ts +8 -1
  495. package/dist/components/nav-link/navigation.d.ts.map +1 -1
  496. package/dist/components/nav-link/tanstack.js +9 -6
  497. package/dist/components/nav-link/tanstack.js.map +1 -1
  498. package/dist/components/notification/create-notifier.d.ts +4 -1
  499. package/dist/components/notification/create-notifier.d.ts.map +1 -1
  500. package/dist/components/notification/index.d.ts +1 -1
  501. package/dist/components/notification/index.d.ts.map +1 -1
  502. package/dist/components/notification/index.js +59 -21
  503. package/dist/components/notification/index.js.map +1 -1
  504. package/dist/components/notification/notification.d.ts +41 -11
  505. package/dist/components/notification/notification.d.ts.map +1 -1
  506. package/dist/components/number-input/index.d.ts +1 -1
  507. package/dist/components/number-input/index.d.ts.map +1 -1
  508. package/dist/components/number-input/index.js +10 -8
  509. package/dist/components/number-input/number-input.d.ts +9 -1
  510. package/dist/components/number-input/number-input.d.ts.map +1 -1
  511. package/dist/components/overlays/create-overlays.d.ts.map +1 -1
  512. package/dist/components/overlays/dialog-parts.d.ts +59 -0
  513. package/dist/components/overlays/dialog-parts.d.ts.map +1 -0
  514. package/dist/components/overlays/index.js +28 -31
  515. package/dist/components/overlays/index.js.map +1 -1
  516. package/dist/components/overlays/renderer.d.ts.map +1 -1
  517. package/dist/components/overlays/store.d.ts.map +1 -1
  518. package/dist/components/password-input/index.d.ts +1 -1
  519. package/dist/components/password-input/index.d.ts.map +1 -1
  520. package/dist/components/password-input/index.js +13 -5
  521. package/dist/components/password-input/index.js.map +1 -1
  522. package/dist/components/password-input/password-input.d.ts +10 -1
  523. package/dist/components/password-input/password-input.d.ts.map +1 -1
  524. package/dist/components/photo-capture/index.d.ts +4 -0
  525. package/dist/components/photo-capture/index.d.ts.map +1 -0
  526. package/dist/components/photo-capture/index.js +519 -0
  527. package/dist/components/photo-capture/index.js.map +1 -0
  528. package/dist/components/photo-capture/photo-capture-machine.d.ts +74 -0
  529. package/dist/components/photo-capture/photo-capture-machine.d.ts.map +1 -0
  530. package/dist/components/photo-capture/photo-capture.d.ts +192 -0
  531. package/dist/components/photo-capture/photo-capture.d.ts.map +1 -0
  532. package/dist/components/photo-capture/use-photo-capture.d.ts +92 -0
  533. package/dist/components/photo-capture/use-photo-capture.d.ts.map +1 -0
  534. package/dist/components/pill/index.js +5 -3
  535. package/dist/components/pill/pill.d.ts +4 -3
  536. package/dist/components/pill/pill.d.ts.map +1 -1
  537. package/dist/components/pills-input/index.d.ts +1 -1
  538. package/dist/components/pills-input/index.d.ts.map +1 -1
  539. package/dist/components/pills-input/index.js +12 -6
  540. package/dist/components/pills-input/pills-input.d.ts +29 -10
  541. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  542. package/dist/components/pin-input/index.d.ts +1 -1
  543. package/dist/components/pin-input/index.d.ts.map +1 -1
  544. package/dist/components/pin-input/index.js +39 -12
  545. package/dist/components/pin-input/index.js.map +1 -1
  546. package/dist/components/pin-input/pin-input.d.ts +14 -2
  547. package/dist/components/pin-input/pin-input.d.ts.map +1 -1
  548. package/dist/components/popover/icons.d.ts +9 -4
  549. package/dist/components/popover/icons.d.ts.map +1 -1
  550. package/dist/components/popover/index.js +4 -3
  551. package/dist/components/popover/popover.d.ts +12 -8
  552. package/dist/components/popover/popover.d.ts.map +1 -1
  553. package/dist/components/progress/index.js +4 -109
  554. package/dist/components/progress/index.js.map +1 -1
  555. package/dist/components/progress/progress.d.ts +9 -1
  556. package/dist/components/progress/progress.d.ts.map +1 -1
  557. package/dist/components/radio-group/index.js +11 -5
  558. package/dist/components/radio-group/index.js.map +1 -1
  559. package/dist/components/radio-group/radio-group.d.ts +3 -3
  560. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  561. package/dist/components/rating/icons.d.ts +0 -10
  562. package/dist/components/rating/icons.d.ts.map +1 -1
  563. package/dist/components/rating/index.d.ts +1 -1
  564. package/dist/components/rating/index.d.ts.map +1 -1
  565. package/dist/components/rating/index.js +16 -6
  566. package/dist/components/rating/index.js.map +1 -1
  567. package/dist/components/rating/rating.d.ts +18 -8
  568. package/dist/components/rating/rating.d.ts.map +1 -1
  569. package/dist/components/schedule/index.d.ts +6 -23
  570. package/dist/components/schedule/index.d.ts.map +1 -1
  571. package/dist/components/schedule/index.js +3314 -2729
  572. package/dist/components/schedule/index.js.map +1 -1
  573. package/dist/components/schedule/now-cursor-line.d.ts +11 -3
  574. package/dist/components/schedule/now-cursor-line.d.ts.map +1 -1
  575. package/dist/components/schedule/schedule-agenda-list.d.ts +1 -1
  576. package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -1
  577. package/dist/components/schedule/schedule-agenda-view.d.ts +3 -4
  578. package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -1
  579. package/dist/components/schedule/schedule-all-day-row.d.ts +3 -1
  580. package/dist/components/schedule/schedule-all-day-row.d.ts.map +1 -1
  581. package/dist/components/schedule/schedule-create-draft.d.ts.map +1 -1
  582. package/dist/components/schedule/schedule-dates.d.ts +42 -19
  583. package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
  584. package/dist/components/schedule/schedule-day-column.d.ts +111 -0
  585. package/dist/components/schedule/schedule-day-column.d.ts.map +1 -0
  586. package/dist/components/schedule/schedule-days-view.d.ts +2 -2
  587. package/dist/components/schedule/schedule-days-view.d.ts.map +1 -1
  588. package/dist/components/schedule/schedule-drag-ghost.d.ts.map +1 -1
  589. package/dist/components/schedule/schedule-event-chip.d.ts +31 -2
  590. package/dist/components/schedule/schedule-event-chip.d.ts.map +1 -1
  591. package/dist/components/schedule/schedule-event-details-popover.d.ts +57 -0
  592. package/dist/components/schedule/schedule-event-details-popover.d.ts.map +1 -0
  593. package/dist/components/schedule/schedule-event-details.d.ts.map +1 -1
  594. package/dist/components/schedule/schedule-event-list-popover-content.d.ts +4 -1
  595. package/dist/components/schedule/schedule-event-list-popover-content.d.ts.map +1 -1
  596. package/dist/components/schedule/schedule-event-pill.d.ts +68 -0
  597. package/dist/components/schedule/schedule-event-pill.d.ts.map +1 -0
  598. package/dist/components/schedule/schedule-event-styles.d.ts +54 -0
  599. package/dist/components/schedule/schedule-event-styles.d.ts.map +1 -1
  600. package/dist/components/schedule/schedule-geometry.d.ts +10 -8
  601. package/dist/components/schedule/schedule-geometry.d.ts.map +1 -1
  602. package/dist/components/schedule/schedule-grid-gesture.d.ts +24 -2
  603. package/dist/components/schedule/schedule-grid-gesture.d.ts.map +1 -1
  604. package/dist/components/schedule/schedule-icons.d.ts +20 -0
  605. package/dist/components/schedule/schedule-icons.d.ts.map +1 -0
  606. package/dist/components/schedule/schedule-month-view.d.ts +1 -1
  607. package/dist/components/schedule/schedule-month-view.d.ts.map +1 -1
  608. package/dist/components/schedule/schedule-overflow-chip.d.ts +4 -2
  609. package/dist/components/schedule/schedule-overflow-chip.d.ts.map +1 -1
  610. package/dist/components/schedule/schedule-overflow-popover.d.ts +4 -1
  611. package/dist/components/schedule/schedule-overflow-popover.d.ts.map +1 -1
  612. package/dist/components/schedule/schedule-slot-cursor.d.ts +36 -0
  613. package/dist/components/schedule/schedule-slot-cursor.d.ts.map +1 -0
  614. package/dist/components/schedule/schedule-timed-grid-chrome.d.ts +86 -0
  615. package/dist/components/schedule/schedule-timed-grid-chrome.d.ts.map +1 -0
  616. package/dist/components/schedule/schedule-timed-grid.d.ts +3 -1
  617. package/dist/components/schedule/schedule-timed-grid.d.ts.map +1 -1
  618. package/dist/components/schedule/schedule-toolbar.d.ts +33 -10
  619. package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
  620. package/dist/components/schedule/schedule-types.d.ts +103 -15
  621. package/dist/components/schedule/schedule-types.d.ts.map +1 -1
  622. package/dist/components/schedule/schedule-view-pagination-chrome.d.ts +36 -0
  623. package/dist/components/schedule/schedule-view-pagination-chrome.d.ts.map +1 -0
  624. package/dist/components/schedule/schedule-year-view.d.ts +1 -1
  625. package/dist/components/schedule/schedule-year-view.d.ts.map +1 -1
  626. package/dist/components/schedule/schedule.d.ts +0 -18
  627. package/dist/components/schedule/schedule.d.ts.map +1 -1
  628. package/dist/components/schedule/use-chip-keyboard-move.d.ts +45 -0
  629. package/dist/components/schedule/use-chip-keyboard-move.d.ts.map +1 -0
  630. package/dist/components/schedule/use-chip-motion.d.ts +28 -0
  631. package/dist/components/schedule/use-chip-motion.d.ts.map +1 -0
  632. package/dist/components/schedule/use-date-grid-navigation.d.ts +59 -0
  633. package/dist/components/schedule/use-date-grid-navigation.d.ts.map +1 -0
  634. package/dist/components/schedule/use-event-drag.d.ts.map +1 -1
  635. package/dist/components/schedule/use-event-resize.d.ts +10 -2
  636. package/dist/components/schedule/use-event-resize.d.ts.map +1 -1
  637. package/dist/components/schedule/use-schedule-reveal.d.ts +29 -0
  638. package/dist/components/schedule/use-schedule-reveal.d.ts.map +1 -0
  639. package/dist/components/schedule/use-schedule-selection.d.ts +3 -1
  640. package/dist/components/schedule/use-schedule-selection.d.ts.map +1 -1
  641. package/dist/components/schedule/use-timed-grid-announcer.d.ts +21 -0
  642. package/dist/components/schedule/use-timed-grid-announcer.d.ts.map +1 -0
  643. package/dist/components/schedule/use-timed-grid-paging.d.ts +36 -0
  644. package/dist/components/schedule/use-timed-grid-paging.d.ts.map +1 -0
  645. package/dist/components/segment-group/index.js +8 -6
  646. package/dist/components/segment-group/segment-group.d.ts +1 -1
  647. package/dist/components/segment-group/segment-group.d.ts.map +1 -1
  648. package/dist/components/select/index.js +13 -11
  649. package/dist/components/select/select.d.ts.map +1 -1
  650. package/dist/components/skeleton/index.js +2 -1
  651. package/dist/components/slider/index.js +6 -256
  652. package/dist/components/slider/index.js.map +1 -1
  653. package/dist/components/slider/slider.d.ts +18 -10
  654. package/dist/components/slider/slider.d.ts.map +1 -1
  655. package/dist/components/spinner/index.js +2 -1
  656. package/dist/components/spinner/spinner.d.ts +7 -36
  657. package/dist/components/spinner/spinner.d.ts.map +1 -1
  658. package/dist/components/spotlight/context.d.ts +50 -0
  659. package/dist/components/spotlight/context.d.ts.map +1 -0
  660. package/dist/components/spotlight/create-spotlight.d.ts +193 -0
  661. package/dist/components/spotlight/create-spotlight.d.ts.map +1 -0
  662. package/dist/components/spotlight/highlight.d.ts +23 -0
  663. package/dist/components/spotlight/highlight.d.ts.map +1 -0
  664. package/dist/components/spotlight/icons.d.ts +14 -0
  665. package/dist/components/spotlight/icons.d.ts.map +1 -0
  666. package/dist/components/spotlight/index.d.ts +12 -0
  667. package/dist/components/spotlight/index.d.ts.map +1 -0
  668. package/dist/components/spotlight/index.js +1695 -0
  669. package/dist/components/spotlight/index.js.map +1 -0
  670. package/dist/components/spotlight/label.d.ts +9 -0
  671. package/dist/components/spotlight/label.d.ts.map +1 -0
  672. package/dist/components/spotlight/recents.d.ts +29 -0
  673. package/dist/components/spotlight/recents.d.ts.map +1 -0
  674. package/dist/components/spotlight/spotlight-engine.d.ts +86 -0
  675. package/dist/components/spotlight/spotlight-engine.d.ts.map +1 -0
  676. package/dist/components/spotlight/spotlight.d.ts +233 -0
  677. package/dist/components/spotlight/spotlight.d.ts.map +1 -0
  678. package/dist/components/spotlight/static-source.d.ts +32 -0
  679. package/dist/components/spotlight/static-source.d.ts.map +1 -0
  680. package/dist/components/spotlight/store.d.ts +39 -0
  681. package/dist/components/spotlight/store.d.ts.map +1 -0
  682. package/dist/components/spotlight/translations.d.ts +90 -0
  683. package/dist/components/spotlight/translations.d.ts.map +1 -0
  684. package/dist/components/spotlight/types.d.ts +297 -0
  685. package/dist/components/spotlight/types.d.ts.map +1 -0
  686. package/dist/components/spotlight/view.d.ts +139 -0
  687. package/dist/components/spotlight/view.d.ts.map +1 -0
  688. package/dist/components/switch/index.js +7 -6
  689. package/dist/components/switch/index.js.map +1 -1
  690. package/dist/components/switch/switch.d.ts +3 -2
  691. package/dist/components/switch/switch.d.ts.map +1 -1
  692. package/dist/components/table/index.js +3 -1
  693. package/dist/components/table/table.d.ts.map +1 -1
  694. package/dist/components/tabs/index.js +5 -4
  695. package/dist/components/tabs/tabs-data.d.ts +6 -2
  696. package/dist/components/tabs/tabs-data.d.ts.map +1 -1
  697. package/dist/components/tabs/tabs.d.ts +55 -34
  698. package/dist/components/tabs/tabs.d.ts.map +1 -1
  699. package/dist/components/tags-input/index.js +41 -24
  700. package/dist/components/tags-input/index.js.map +1 -1
  701. package/dist/components/tags-input/tags-input.d.ts +12 -5
  702. package/dist/components/tags-input/tags-input.d.ts.map +1 -1
  703. package/dist/components/text/index.js +2 -2
  704. package/dist/components/text/text.d.ts.map +1 -1
  705. package/dist/components/text-input/index.js +3 -2
  706. package/dist/components/text-input/index.js.map +1 -1
  707. package/dist/components/textarea/index.js +3 -2
  708. package/dist/components/textarea/index.js.map +1 -1
  709. package/dist/components/theme-icon/index.js +2 -2
  710. package/dist/components/theme-script/index.js.map +1 -1
  711. package/dist/components/theme-script/theme-script.d.ts +2 -2
  712. package/dist/components/theme-script/theme-script.d.ts.map +1 -1
  713. package/dist/components/time-input/hour-cycle.d.ts +17 -7
  714. package/dist/components/time-input/hour-cycle.d.ts.map +1 -1
  715. package/dist/components/time-input/index.js +21 -20
  716. package/dist/components/time-input/index.js.map +1 -1
  717. package/dist/components/time-input/time-input.d.ts +2 -1
  718. package/dist/components/time-input/time-input.d.ts.map +1 -1
  719. package/dist/components/time-input/time-row.d.ts +20 -1
  720. package/dist/components/time-input/time-row.d.ts.map +1 -1
  721. package/dist/components/timeline/index.d.ts +1 -1
  722. package/dist/components/timeline/index.d.ts.map +1 -1
  723. package/dist/components/timeline/index.js +50 -48
  724. package/dist/components/timeline/index.js.map +1 -1
  725. package/dist/components/timeline/timeline.d.ts +16 -26
  726. package/dist/components/timeline/timeline.d.ts.map +1 -1
  727. package/dist/components/title/index.js +2 -2
  728. package/dist/components/title/title.d.ts.map +1 -1
  729. package/dist/components/tooltip/index.js +3 -2
  730. package/dist/components/tooltip/tooltip.d.ts +6 -4
  731. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  732. package/dist/components/tree-multi-select/index.d.ts +1 -1
  733. package/dist/components/tree-multi-select/index.d.ts.map +1 -1
  734. package/dist/components/tree-multi-select/index.js +111 -247
  735. package/dist/components/tree-multi-select/index.js.map +1 -1
  736. package/dist/components/tree-multi-select/tree-multi-select.d.ts +12 -5
  737. package/dist/components/tree-multi-select/tree-multi-select.d.ts.map +1 -1
  738. package/dist/components/tree-select/index.d.ts +1 -1
  739. package/dist/components/tree-select/index.d.ts.map +1 -1
  740. package/dist/components/tree-select/index.js +104 -320
  741. package/dist/components/tree-select/index.js.map +1 -1
  742. package/dist/components/tree-select/tree-popover.d.ts +126 -0
  743. package/dist/components/tree-select/tree-popover.d.ts.map +1 -0
  744. package/dist/components/tree-select/tree-select.d.ts +24 -2
  745. package/dist/components/tree-select/tree-select.d.ts.map +1 -1
  746. package/dist/index.d.ts +17 -0
  747. package/dist/index.d.ts.map +1 -1
  748. package/dist/index.js +59 -112
  749. package/dist/index.js.map +1 -1
  750. package/dist/lib/as-child.d.ts +1 -1
  751. package/dist/lib/cutout.d.ts +34 -0
  752. package/dist/lib/cutout.d.ts.map +1 -0
  753. package/dist/lib/dev-warn.d.ts +11 -0
  754. package/dist/lib/dev-warn.d.ts.map +1 -1
  755. package/dist/lib/file-kind-icons.d.ts +5 -0
  756. package/dist/lib/file-kind-icons.d.ts.map +1 -0
  757. package/dist/lib/file-queue-summary.d.ts +89 -0
  758. package/dist/lib/file-queue-summary.d.ts.map +1 -0
  759. package/dist/lib/file-queue.d.ts +147 -0
  760. package/dist/lib/file-queue.d.ts.map +1 -0
  761. package/dist/lib/files.d.ts +29 -0
  762. package/dist/lib/files.d.ts.map +1 -0
  763. package/dist/lib/focus-styles.d.ts +46 -7
  764. package/dist/lib/focus-styles.d.ts.map +1 -1
  765. package/dist/lib/gap.d.ts +17 -0
  766. package/dist/lib/gap.d.ts.map +1 -0
  767. package/dist/lib/graphemes.d.ts +10 -0
  768. package/dist/lib/graphemes.d.ts.map +1 -0
  769. package/dist/lib/icons.d.ts +34 -0
  770. package/dist/lib/icons.d.ts.map +1 -0
  771. package/dist/lib/image-file.d.ts +9 -0
  772. package/dist/lib/image-file.d.ts.map +1 -0
  773. package/dist/lib/merge-refs.d.ts +34 -7
  774. package/dist/lib/merge-refs.d.ts.map +1 -1
  775. package/dist/lib/motion/animate.d.ts +42 -0
  776. package/dist/lib/motion/animate.d.ts.map +1 -0
  777. package/dist/lib/motion/easing.d.ts +33 -0
  778. package/dist/lib/motion/easing.d.ts.map +1 -0
  779. package/dist/lib/motion/gesture.d.ts +127 -0
  780. package/dist/lib/motion/gesture.d.ts.map +1 -0
  781. package/dist/lib/motion/morph.d.ts +61 -0
  782. package/dist/lib/motion/morph.d.ts.map +1 -0
  783. package/dist/lib/motion/physics.d.ts +44 -0
  784. package/dist/lib/motion/physics.d.ts.map +1 -0
  785. package/dist/lib/motion/rect.d.ts +39 -0
  786. package/dist/lib/motion/rect.d.ts.map +1 -0
  787. package/dist/lib/motion/reduced-motion.d.ts +23 -0
  788. package/dist/lib/motion/reduced-motion.d.ts.map +1 -0
  789. package/dist/lib/motion/spring.d.ts +80 -0
  790. package/dist/lib/motion/spring.d.ts.map +1 -0
  791. package/dist/lib/motion/tokens.d.ts +43 -0
  792. package/dist/lib/motion/tokens.d.ts.map +1 -0
  793. package/dist/lib/motion/use-gesture.d.ts +36 -0
  794. package/dist/lib/motion/use-gesture.d.ts.map +1 -0
  795. package/dist/lib/open-file.d.ts +82 -0
  796. package/dist/lib/open-file.d.ts.map +1 -0
  797. package/dist/lib/open-index.d.ts +59 -0
  798. package/dist/lib/open-index.d.ts.map +1 -0
  799. package/dist/lib/overlay-layer.d.ts +15 -1
  800. package/dist/lib/overlay-layer.d.ts.map +1 -1
  801. package/dist/lib/radius.d.ts +17 -0
  802. package/dist/lib/radius.d.ts.map +1 -0
  803. package/dist/lib/ratio.d.ts +16 -0
  804. package/dist/lib/ratio.d.ts.map +1 -0
  805. package/dist/lib/save-file.d.ts +52 -0
  806. package/dist/lib/save-file.d.ts.map +1 -0
  807. package/dist/lib/select-data.d.ts +57 -24
  808. package/dist/lib/select-data.d.ts.map +1 -1
  809. package/dist/lib/tree-data.d.ts +7 -2
  810. package/dist/lib/tree-data.d.ts.map +1 -1
  811. package/dist/lib/typography-size.d.ts +27 -8
  812. package/dist/lib/typography-size.d.ts.map +1 -1
  813. package/dist/lib/use-debounced.d.ts +17 -0
  814. package/dist/lib/use-debounced.d.ts.map +1 -0
  815. package/dist/lib/use-disclosure.d.ts.map +1 -1
  816. package/dist/lib/use-document-visibility.d.ts +16 -0
  817. package/dist/lib/use-document-visibility.d.ts.map +1 -0
  818. package/dist/lib/use-element-size.d.ts +42 -0
  819. package/dist/lib/use-element-size.d.ts.map +1 -0
  820. package/dist/lib/use-file-queue.d.ts +62 -0
  821. package/dist/lib/use-file-queue.d.ts.map +1 -0
  822. package/dist/lib/use-hotkey.d.ts +240 -0
  823. package/dist/lib/use-hotkey.d.ts.map +1 -0
  824. package/dist/lib/use-hydrated.d.ts +16 -0
  825. package/dist/lib/use-hydrated.d.ts.map +1 -0
  826. package/dist/lib/use-in-view.d.ts +37 -0
  827. package/dist/lib/use-in-view.d.ts.map +1 -0
  828. package/dist/lib/use-now.d.ts +34 -3
  829. package/dist/lib/use-now.d.ts.map +1 -1
  830. package/dist/lib/use-object-url.d.ts +61 -0
  831. package/dist/lib/use-object-url.d.ts.map +1 -0
  832. package/dist/lib/use-uncontrolled.d.ts.map +1 -1
  833. package/dist/theme.css +184 -16
  834. package/package.json +4 -2
  835. package/src/as-child.contract.test.tsx +221 -6
  836. package/src/biome-plugins.test.ts +34 -4
  837. package/src/colors.css +16 -8
  838. package/src/components/accordion/accordion.test.tsx +45 -2
  839. package/src/components/accordion/accordion.tsx +38 -17
  840. package/src/components/accordion/index.ts +2 -0
  841. package/src/components/action-icon/action-icon.tsx +8 -6
  842. package/src/components/alert/alert.test.tsx +49 -2
  843. package/src/components/alert/alert.tsx +47 -14
  844. package/src/components/alert/index.ts +8 -1
  845. package/src/components/ambient-background/ambient-background.test.tsx +21 -7
  846. package/src/components/ambient-background/ambient-background.tsx +49 -28
  847. package/src/components/app-shell/app-shell.test.tsx +58 -8
  848. package/src/components/app-shell/app-shell.tsx +69 -17
  849. package/src/components/app-shell/index.ts +2 -0
  850. package/src/components/aspect-ratio/aspect-ratio.test.tsx +82 -0
  851. package/src/components/aspect-ratio/aspect-ratio.tsx +63 -0
  852. package/src/components/aspect-ratio/index.ts +1 -0
  853. package/src/components/autocomplete/autocomplete.tsx +9 -14
  854. package/src/components/avatar/avatar.test.tsx +101 -2
  855. package/src/components/avatar/avatar.tsx +65 -15
  856. package/src/components/avatar/index.ts +2 -0
  857. package/src/components/badge/badge.tsx +3 -1
  858. package/src/components/breadcrumb/breadcrumb.test.tsx +46 -0
  859. package/src/components/breadcrumb/breadcrumb.tsx +51 -10
  860. package/src/components/breadcrumb/index.ts +2 -0
  861. package/src/components/button/button.test.tsx +65 -12
  862. package/src/components/button/button.tsx +119 -29
  863. package/src/components/button-select/button-select.tsx +1 -2
  864. package/src/components/calendar/calendar-body.tsx +42 -28
  865. package/src/components/calendar/calendar.test.tsx +89 -0
  866. package/src/components/calendar/calendar.tsx +42 -4
  867. package/src/components/calendar/index.ts +2 -0
  868. package/src/components/camera/camera-machine.test.ts +188 -0
  869. package/src/components/camera/camera-machine.ts +274 -0
  870. package/src/components/camera/camera.test.tsx +580 -0
  871. package/src/components/camera/camera.tsx +938 -0
  872. package/src/components/camera/fake-camera.ts +153 -0
  873. package/src/components/camera/index.ts +36 -0
  874. package/src/components/camera/platform.test.ts +40 -0
  875. package/src/components/camera/platform.ts +53 -0
  876. package/src/components/camera/use-camera.ts +428 -0
  877. package/src/components/card/card.test.tsx +70 -0
  878. package/src/components/card/card.tsx +5 -2
  879. package/src/components/carousel/carousel.test.tsx +757 -0
  880. package/src/components/carousel/carousel.tsx +1115 -0
  881. package/src/components/carousel/index.ts +24 -0
  882. package/src/components/chart/chart.test.tsx +26 -0
  883. package/src/components/chart/chart.tsx +33 -3
  884. package/src/components/chart/styles.css +12 -10
  885. package/src/components/checkbox/checkbox.test.tsx +38 -1
  886. package/src/components/checkbox/checkbox.tsx +34 -10
  887. package/src/components/checkbox/control.ts +3 -3
  888. package/src/components/checkbox/index.ts +6 -1
  889. package/src/components/choice-card-group/choice-card-group.test.tsx +18 -0
  890. package/src/components/choice-card-group/choice-card-group.tsx +78 -58
  891. package/src/components/circular-progress/circular-progress.test.tsx +24 -5
  892. package/src/components/circular-progress/circular-progress.tsx +26 -3
  893. package/src/components/clipboard/clipboard.test.tsx +64 -5
  894. package/src/components/clipboard/clipboard.tsx +62 -16
  895. package/src/components/clipboard/copy.tsx +35 -20
  896. package/src/components/clipboard/index.ts +7 -1
  897. package/src/components/code/code.test.tsx +1 -1
  898. package/src/components/code/code.tsx +2 -1
  899. package/src/components/code-block/chrome.tsx +49 -53
  900. package/src/components/code-block/code-block.test.tsx +34 -13
  901. package/src/components/code-block/code-block.tsx +8 -9
  902. package/src/components/code-block/index.ts +4 -0
  903. package/src/components/code-block/static.tsx +8 -5
  904. package/src/components/combobox/combobox.tsx +14 -6
  905. package/src/components/combobox-list/combobox-list.test.tsx +54 -0
  906. package/src/components/combobox-list/combobox-list.tsx +57 -61
  907. package/src/components/combobox-list/combobox-search-row.tsx +92 -0
  908. package/src/components/combobox-list/index.ts +2 -0
  909. package/src/components/compare/compare.test.tsx +291 -0
  910. package/src/components/compare/compare.tsx +300 -0
  911. package/src/components/compare/index.ts +3 -0
  912. package/src/components/container/container.test.tsx +47 -0
  913. package/src/components/container/container.tsx +8 -2
  914. package/src/components/data-table/data-table-filter/data-table-date-filter.tsx +24 -18
  915. package/src/components/data-table/data-table-filter/data-table-number-filter.tsx +6 -3
  916. package/src/components/data-table/data-table-filter/index.tsx +34 -9
  917. package/src/components/data-table/data-table-filter.test.tsx +72 -0
  918. package/src/components/data-table/data-table-header-cell.tsx +75 -68
  919. package/src/components/data-table/data-table-icons.tsx +79 -0
  920. package/src/components/data-table/data-table-pagination.tsx +55 -19
  921. package/src/components/data-table/data-table-placeholder.tsx +2 -2
  922. package/src/components/data-table/data-table-stack.tsx +19 -25
  923. package/src/components/data-table/data-table-state.ts +4 -5
  924. package/src/components/data-table/data-table-toolbar.tsx +10 -3
  925. package/src/components/data-table/data-table-translations.ts +15 -3
  926. package/src/components/data-table/data-table.test.tsx +300 -13
  927. package/src/components/data-table/data-table.tsx +54 -21
  928. package/src/components/data-table/index.ts +5 -0
  929. package/src/components/date-picker/aliases.tsx +8 -0
  930. package/src/components/date-picker/date-picker.test.tsx +75 -0
  931. package/src/components/date-picker/date-picker.tsx +102 -51
  932. package/src/components/date-picker/date-time-text.test.ts +9 -0
  933. package/src/components/date-picker/date-time-text.ts +12 -4
  934. package/src/components/date-picker/index.ts +1 -0
  935. package/src/components/divider/divider.test.tsx +34 -5
  936. package/src/components/divider/divider.tsx +23 -6
  937. package/src/components/download-button/download-button.test.tsx +253 -0
  938. package/src/components/download-button/download-button.tsx +236 -0
  939. package/src/components/download-button/index.ts +11 -0
  940. package/src/components/drawer/drawer.test.tsx +287 -0
  941. package/src/components/drawer/drawer.tsx +238 -172
  942. package/src/components/drawer/index.ts +4 -11
  943. package/src/components/field/field.test.tsx +115 -0
  944. package/src/components/field/field.tsx +13 -4
  945. package/src/components/figure/figure.test.tsx +133 -0
  946. package/src/components/figure/figure.tsx +137 -0
  947. package/src/components/figure/index.ts +6 -0
  948. package/src/components/file-item/file-item.test.tsx +395 -0
  949. package/src/components/file-item/file-item.tsx +625 -0
  950. package/src/components/file-item/index.ts +22 -0
  951. package/src/components/file-preview/file-preview.test.tsx +479 -0
  952. package/src/components/file-preview/file-preview.tsx +953 -0
  953. package/src/components/file-preview/index.ts +22 -0
  954. package/src/components/file-queue-summary/file-queue-summary.test.tsx +285 -0
  955. package/src/components/file-queue-summary/file-queue-summary.tsx +121 -0
  956. package/src/components/file-queue-summary/index.ts +12 -0
  957. package/src/components/file-trigger/file-trigger.test.tsx +138 -0
  958. package/src/components/file-trigger/file-trigger.tsx +135 -0
  959. package/src/components/file-trigger/index.ts +3 -0
  960. package/src/components/file-upload/file-upload.test.tsx +416 -2
  961. package/src/components/file-upload/file-upload.tsx +391 -136
  962. package/src/components/file-upload/index.ts +11 -1
  963. package/src/components/flex/flex.test.tsx +15 -0
  964. package/src/components/flex/flex.tsx +20 -12
  965. package/src/components/gallery/gallery.test.tsx +436 -0
  966. package/src/components/gallery/gallery.tsx +367 -0
  967. package/src/components/gallery/index.ts +16 -0
  968. package/src/components/gallery/layout.test.ts +158 -0
  969. package/src/components/gallery/layout.ts +168 -0
  970. package/src/components/grid/grid.test.tsx +46 -0
  971. package/src/components/grid/grid.tsx +11 -11
  972. package/src/components/image/blur-svg.ts +54 -0
  973. package/src/components/image/image.test.tsx +481 -0
  974. package/src/components/image/image.tsx +424 -0
  975. package/src/components/image/index.ts +14 -0
  976. package/src/components/image/srcset.test.ts +73 -0
  977. package/src/components/image/srcset.ts +70 -0
  978. package/src/components/image-cropper/image-cropper.test.tsx +446 -0
  979. package/src/components/image-cropper/image-cropper.tsx +745 -0
  980. package/src/components/image-cropper/index.ts +24 -0
  981. package/src/components/indicator/indicator.test.tsx +73 -6
  982. package/src/components/indicator/indicator.tsx +38 -10
  983. package/src/components/input/input.tsx +6 -5
  984. package/src/components/kbd/index.ts +6 -0
  985. package/src/components/kbd/kbd.test.tsx +239 -2
  986. package/src/components/kbd/kbd.tsx +130 -6
  987. package/src/components/lightbox/index.ts +25 -0
  988. package/src/components/lightbox/lightbox-controller.ts +796 -0
  989. package/src/components/lightbox/lightbox-machine.test.ts +460 -0
  990. package/src/components/lightbox/lightbox-machine.ts +285 -0
  991. package/src/components/lightbox/lightbox-zoom.test.ts +130 -0
  992. package/src/components/lightbox/lightbox-zoom.ts +142 -0
  993. package/src/components/lightbox/lightbox.test.tsx +821 -0
  994. package/src/components/lightbox/lightbox.tsx +1301 -0
  995. package/src/components/mark/mark.test.tsx +21 -2
  996. package/src/components/mark/mark.tsx +15 -1
  997. package/src/components/menu/index.ts +4 -0
  998. package/src/components/menu/menu-data.tsx +20 -17
  999. package/src/components/menu/menu.test.tsx +123 -19
  1000. package/src/components/menu/menu.tsx +150 -102
  1001. package/src/components/modal/close-trigger.test.tsx +49 -0
  1002. package/src/components/modal/index.ts +2 -0
  1003. package/src/components/modal/modal.test.tsx +101 -0
  1004. package/src/components/modal/modal.tsx +64 -103
  1005. package/src/components/multi-combobox-list/index.ts +2 -0
  1006. package/src/components/multi-combobox-list/multi-combobox-list.test.tsx +45 -0
  1007. package/src/components/multi-combobox-list/multi-combobox-list.tsx +45 -62
  1008. package/src/components/multi-select/multi-select.test.tsx +10 -2
  1009. package/src/components/multi-select/multi-select.tsx +20 -18
  1010. package/src/components/nav-link/nav-link.test.tsx +43 -0
  1011. package/src/components/nav-link/nav-link.tsx +34 -15
  1012. package/src/components/nav-link/navigation.test.tsx +29 -1
  1013. package/src/components/nav-link/navigation.tsx +45 -22
  1014. package/src/components/notification/create-notifier.tsx +79 -13
  1015. package/src/components/notification/index.ts +2 -0
  1016. package/src/components/notification/notification.test.tsx +252 -1
  1017. package/src/components/notification/notification.tsx +102 -58
  1018. package/src/components/number-input/index.ts +7 -1
  1019. package/src/components/number-input/number-input.test.tsx +45 -0
  1020. package/src/components/number-input/number-input.tsx +34 -27
  1021. package/src/components/overlays/create-overlays.tsx +18 -21
  1022. package/src/components/overlays/dialog-parts.tsx +201 -0
  1023. package/src/components/overlays/overlays.test.tsx +170 -0
  1024. package/src/components/overlays/renderer.tsx +2 -9
  1025. package/src/components/overlays/store.ts +4 -1
  1026. package/src/components/password-input/index.ts +2 -0
  1027. package/src/components/password-input/password-input.test.tsx +30 -0
  1028. package/src/components/password-input/password-input.tsx +17 -3
  1029. package/src/components/photo-capture/index.ts +35 -0
  1030. package/src/components/photo-capture/photo-capture-machine.test.ts +147 -0
  1031. package/src/components/photo-capture/photo-capture-machine.ts +112 -0
  1032. package/src/components/photo-capture/photo-capture.test.tsx +375 -0
  1033. package/src/components/photo-capture/photo-capture.tsx +665 -0
  1034. package/src/components/photo-capture/use-photo-capture.ts +199 -0
  1035. package/src/components/pill/pill.test.tsx +58 -1
  1036. package/src/components/pill/pill.tsx +34 -16
  1037. package/src/components/pills-input/index.ts +1 -0
  1038. package/src/components/pills-input/pills-input.test.ts +14 -14
  1039. package/src/components/pills-input/pills-input.test.tsx +39 -0
  1040. package/src/components/pills-input/pills-input.tsx +70 -32
  1041. package/src/components/pin-input/index.ts +1 -1
  1042. package/src/components/pin-input/pin-input.test.tsx +28 -0
  1043. package/src/components/pin-input/pin-input.tsx +64 -16
  1044. package/src/components/popover/icons.tsx +16 -12
  1045. package/src/components/popover/popover.test.tsx +11 -0
  1046. package/src/components/popover/popover.tsx +21 -11
  1047. package/src/components/progress/progress.test.tsx +17 -5
  1048. package/src/components/progress/progress.tsx +23 -7
  1049. package/src/components/radio-group/radio-group.test.tsx +21 -1
  1050. package/src/components/radio-group/radio-group.tsx +66 -48
  1051. package/src/components/rating/icons.tsx +4 -2
  1052. package/src/components/rating/index.ts +2 -0
  1053. package/src/components/rating/rating.test.tsx +43 -4
  1054. package/src/components/rating/rating.tsx +29 -13
  1055. package/src/components/schedule/index.ts +4 -1
  1056. package/src/components/schedule/now-cursor-line.test.tsx +6 -6
  1057. package/src/components/schedule/now-cursor-line.tsx +29 -15
  1058. package/src/components/schedule/schedule-a11y.test.tsx +847 -0
  1059. package/src/components/schedule/schedule-agenda-list.tsx +25 -44
  1060. package/src/components/schedule/schedule-agenda-view.test.tsx +2 -2
  1061. package/src/components/schedule/schedule-agenda-view.tsx +22 -37
  1062. package/src/components/schedule/schedule-all-day-row.tsx +35 -96
  1063. package/src/components/schedule/schedule-create-draft.tsx +23 -90
  1064. package/src/components/schedule/schedule-dates.test.ts +64 -20
  1065. package/src/components/schedule/schedule-dates.ts +65 -27
  1066. package/src/components/schedule/schedule-day-column.tsx +607 -0
  1067. package/src/components/schedule/schedule-days-view.tsx +40 -49
  1068. package/src/components/schedule/schedule-details-popover.test.tsx +97 -0
  1069. package/src/components/schedule/schedule-drag-ghost.tsx +30 -98
  1070. package/src/components/schedule/schedule-event-chip.tsx +120 -262
  1071. package/src/components/schedule/schedule-event-details-popover.tsx +132 -0
  1072. package/src/components/schedule/schedule-event-details.tsx +6 -7
  1073. package/src/components/schedule/schedule-event-list-popover-content.tsx +9 -5
  1074. package/src/components/schedule/schedule-event-pill.tsx +159 -0
  1075. package/src/components/schedule/schedule-event-styles.ts +71 -0
  1076. package/src/components/schedule/schedule-geometry.test.ts +5 -5
  1077. package/src/components/schedule/schedule-geometry.ts +16 -13
  1078. package/src/components/schedule/schedule-grid-gesture.test.ts +99 -0
  1079. package/src/components/schedule/schedule-grid-gesture.ts +50 -12
  1080. package/src/components/schedule/schedule-icons.test.tsx +105 -0
  1081. package/src/components/schedule/schedule-icons.tsx +40 -0
  1082. package/src/components/schedule/schedule-month-view.test.tsx +118 -2
  1083. package/src/components/schedule/schedule-month-view.tsx +258 -200
  1084. package/src/components/schedule/schedule-overflow-chip.tsx +9 -4
  1085. package/src/components/schedule/schedule-overflow-popover.tsx +5 -0
  1086. package/src/components/schedule/schedule-slot-cursor.tsx +422 -0
  1087. package/src/components/schedule/schedule-timed-grid-chrome.tsx +330 -0
  1088. package/src/components/schedule/schedule-timed-grid.tsx +222 -893
  1089. package/src/components/schedule/schedule-toolbar.tsx +108 -60
  1090. package/src/components/schedule/schedule-types.test.ts +43 -2
  1091. package/src/components/schedule/schedule-types.ts +164 -17
  1092. package/src/components/schedule/schedule-view-pagination-chrome.tsx +101 -0
  1093. package/src/components/schedule/schedule-year-view.test.tsx +86 -1
  1094. package/src/components/schedule/schedule-year-view.tsx +163 -136
  1095. package/src/components/schedule/schedule.test.tsx +275 -7
  1096. package/src/components/schedule/schedule.tsx +36 -242
  1097. package/src/components/schedule/use-chip-keyboard-move.ts +109 -0
  1098. package/src/components/schedule/use-chip-motion.ts +71 -0
  1099. package/src/components/schedule/use-date-grid-navigation.ts +120 -0
  1100. package/src/components/schedule/use-event-drag.ts +1 -23
  1101. package/src/components/schedule/use-event-resize.ts +27 -22
  1102. package/src/components/schedule/use-schedule-reveal.ts +259 -0
  1103. package/src/components/schedule/use-schedule-selection.ts +14 -2
  1104. package/src/components/schedule/use-timed-grid-announcer.test.ts +72 -0
  1105. package/src/components/schedule/use-timed-grid-announcer.ts +42 -0
  1106. package/src/components/schedule/use-timed-grid-paging.ts +118 -0
  1107. package/src/components/segment-group/segment-group.test.tsx +27 -5
  1108. package/src/components/segment-group/segment-group.tsx +35 -28
  1109. package/src/components/select/select.tsx +8 -8
  1110. package/src/components/skeleton/skeleton.tsx +1 -1
  1111. package/src/components/slider/slider.test.tsx +56 -5
  1112. package/src/components/slider/slider.tsx +93 -31
  1113. package/src/components/spinner/spinner.test.tsx +34 -10
  1114. package/src/components/spinner/spinner.tsx +52 -49
  1115. package/src/components/spotlight/context.ts +62 -0
  1116. package/src/components/spotlight/create-spotlight.test.tsx +252 -0
  1117. package/src/components/spotlight/create-spotlight.tsx +515 -0
  1118. package/src/components/spotlight/highlight.test.ts +57 -0
  1119. package/src/components/spotlight/highlight.ts +86 -0
  1120. package/src/components/spotlight/icons.tsx +27 -0
  1121. package/src/components/spotlight/index.ts +68 -0
  1122. package/src/components/spotlight/label.ts +10 -0
  1123. package/src/components/spotlight/recents.test.ts +46 -0
  1124. package/src/components/spotlight/recents.ts +54 -0
  1125. package/src/components/spotlight/spotlight-engine.test.ts +836 -0
  1126. package/src/components/spotlight/spotlight-engine.ts +525 -0
  1127. package/src/components/spotlight/spotlight.test.tsx +2532 -0
  1128. package/src/components/spotlight/spotlight.tsx +1429 -0
  1129. package/src/components/spotlight/static-source.test.ts +71 -0
  1130. package/src/components/spotlight/static-source.ts +62 -0
  1131. package/src/components/spotlight/store.test.ts +122 -0
  1132. package/src/components/spotlight/store.ts +130 -0
  1133. package/src/components/spotlight/translations.ts +124 -0
  1134. package/src/components/spotlight/types.ts +308 -0
  1135. package/src/components/spotlight/view.test.ts +216 -0
  1136. package/src/components/spotlight/view.ts +350 -0
  1137. package/src/components/switch/switch.test.tsx +8 -0
  1138. package/src/components/switch/switch.tsx +12 -8
  1139. package/src/components/table/table.test.tsx +35 -0
  1140. package/src/components/table/table.tsx +28 -4
  1141. package/src/components/tabs/tabs-data.tsx +7 -2
  1142. package/src/components/tabs/tabs.test.tsx +211 -50
  1143. package/src/components/tabs/tabs.tsx +309 -120
  1144. package/src/components/tags-input/tags-input.test.tsx +116 -2
  1145. package/src/components/tags-input/tags-input.tsx +51 -31
  1146. package/src/components/text/text.test.tsx +1 -1
  1147. package/src/components/text/text.tsx +1 -4
  1148. package/src/components/theme-icon/theme-icon.tsx +2 -2
  1149. package/src/components/theme-script/theme-script.test.tsx +52 -0
  1150. package/src/components/theme-script/theme-script.tsx +1 -1
  1151. package/src/components/time-input/hour-cycle.test.ts +37 -0
  1152. package/src/components/time-input/hour-cycle.ts +37 -10
  1153. package/src/components/time-input/time-input.test.tsx +34 -0
  1154. package/src/components/time-input/time-input.tsx +12 -14
  1155. package/src/components/time-input/time-row.test.ts +10 -0
  1156. package/src/components/time-input/time-row.tsx +39 -19
  1157. package/src/components/timeline/index.ts +1 -0
  1158. package/src/components/timeline/timeline.test.tsx +62 -4
  1159. package/src/components/timeline/timeline.tsx +68 -26
  1160. package/src/components/title/title.test.tsx +3 -3
  1161. package/src/components/title/title.tsx +2 -1
  1162. package/src/components/tooltip/tooltip.test.tsx +38 -5
  1163. package/src/components/tooltip/tooltip.tsx +17 -17
  1164. package/src/components/tree-multi-select/index.ts +2 -0
  1165. package/src/components/tree-multi-select/tree-multi-select.test.tsx +137 -3
  1166. package/src/components/tree-multi-select/tree-multi-select.tsx +130 -332
  1167. package/src/components/tree-select/index.ts +7 -1
  1168. package/src/components/tree-select/tree-popover.tsx +484 -0
  1169. package/src/components/tree-select/tree-select.test.tsx +93 -1
  1170. package/src/components/tree-select/tree-select.tsx +117 -415
  1171. package/src/icon-stroke.test.tsx +114 -0
  1172. package/src/index.ts +71 -0
  1173. package/src/lib/as-child.ts +1 -1
  1174. package/src/lib/cn.test.ts +14 -2
  1175. package/src/lib/cutout.test.ts +37 -0
  1176. package/src/lib/cutout.ts +56 -0
  1177. package/src/lib/dev-warn.test.ts +89 -0
  1178. package/src/lib/dev-warn.ts +61 -12
  1179. package/src/lib/file-kind-icons.tsx +29 -0
  1180. package/src/lib/file-queue-summary.test.ts +323 -0
  1181. package/src/lib/file-queue-summary.ts +239 -0
  1182. package/src/lib/file-queue.ts +493 -0
  1183. package/src/lib/files.test.ts +72 -0
  1184. package/src/lib/files.ts +211 -0
  1185. package/src/lib/focus-styles.test.ts +97 -1
  1186. package/src/lib/focus-styles.ts +153 -9
  1187. package/src/lib/gap.ts +17 -0
  1188. package/src/lib/graphemes.test.ts +26 -0
  1189. package/src/lib/graphemes.ts +19 -0
  1190. package/src/lib/icons.test.ts +22 -0
  1191. package/src/lib/icons.ts +40 -0
  1192. package/src/lib/image-file.test.ts +18 -0
  1193. package/src/lib/image-file.ts +21 -0
  1194. package/src/lib/merge-refs.test.tsx +79 -0
  1195. package/src/lib/merge-refs.ts +58 -11
  1196. package/src/lib/motion/animate.test.ts +114 -0
  1197. package/src/lib/motion/animate.ts +88 -0
  1198. package/src/lib/motion/easing.test.ts +57 -0
  1199. package/src/lib/motion/easing.ts +107 -0
  1200. package/src/lib/motion/gesture.test.ts +183 -0
  1201. package/src/lib/motion/gesture.ts +300 -0
  1202. package/src/lib/motion/morph.test.ts +93 -0
  1203. package/src/lib/motion/morph.ts +88 -0
  1204. package/src/lib/motion/physics.test.ts +75 -0
  1205. package/src/lib/motion/physics.ts +61 -0
  1206. package/src/lib/motion/rect.test.ts +52 -0
  1207. package/src/lib/motion/rect.ts +67 -0
  1208. package/src/lib/motion/reduced-motion.test.ts +57 -0
  1209. package/src/lib/motion/reduced-motion.ts +34 -0
  1210. package/src/lib/motion/spring.test.ts +93 -0
  1211. package/src/lib/motion/spring.ts +143 -0
  1212. package/src/lib/motion/tokens.ts +48 -0
  1213. package/src/lib/motion/use-gesture.test.tsx +111 -0
  1214. package/src/lib/motion/use-gesture.ts +133 -0
  1215. package/src/lib/open-file.test.ts +275 -0
  1216. package/src/lib/open-file.ts +351 -0
  1217. package/src/lib/open-index.test.tsx +95 -0
  1218. package/src/lib/open-index.tsx +90 -0
  1219. package/src/lib/overlay-layer.test.tsx +32 -13
  1220. package/src/lib/overlay-layer.tsx +25 -3
  1221. package/src/lib/radius.ts +17 -0
  1222. package/src/lib/ratio.test.ts +31 -0
  1223. package/src/lib/ratio.ts +26 -0
  1224. package/src/lib/save-file.test.ts +91 -0
  1225. package/src/lib/save-file.ts +91 -0
  1226. package/src/lib/select-data.test.tsx +123 -0
  1227. package/src/lib/select-data.ts +130 -44
  1228. package/src/lib/tree-data.ts +9 -4
  1229. package/src/lib/typography-size.ts +28 -8
  1230. package/src/lib/use-container-query.ts +4 -4
  1231. package/src/lib/use-debounced.test.ts +105 -0
  1232. package/src/lib/use-debounced.ts +44 -0
  1233. package/src/lib/use-disclosure.ts +6 -1
  1234. package/src/lib/use-document-visibility.test.tsx +46 -0
  1235. package/src/lib/use-document-visibility.ts +37 -0
  1236. package/src/lib/use-element-size.test.ts +142 -0
  1237. package/src/lib/use-element-size.ts +87 -0
  1238. package/src/lib/use-file-queue.test.tsx +774 -0
  1239. package/src/lib/use-file-queue.ts +114 -0
  1240. package/src/lib/use-hotkey.test.tsx +667 -0
  1241. package/src/lib/use-hotkey.ts +562 -0
  1242. package/src/lib/use-hydrated.test.tsx +43 -0
  1243. package/src/lib/use-hydrated.ts +27 -0
  1244. package/src/lib/use-in-view.test.ts +113 -0
  1245. package/src/lib/use-in-view.ts +69 -0
  1246. package/src/lib/use-now.test.tsx +65 -0
  1247. package/src/lib/use-now.ts +37 -14
  1248. package/src/lib/use-object-url.test.ts +195 -0
  1249. package/src/lib/use-object-url.ts +108 -0
  1250. package/src/lib/use-uncontrolled.test.ts +34 -2
  1251. package/src/lib/use-uncontrolled.ts +7 -2
  1252. package/src/test-setup.ts +65 -1
  1253. package/src/theme.css +184 -16
  1254. package/src/theme.forced-colors.test.tsx +152 -0
  1255. package/src/theme.test.ts +34 -0
  1256. package/src/visually-hidden-containment.test.tsx +32 -0
  1257. package/dist/chunk-2GILNBZW.js +0 -31
  1258. package/dist/chunk-2GILNBZW.js.map +0 -1
  1259. package/dist/chunk-2NNZHVKD.js.map +0 -1
  1260. package/dist/chunk-4NNGTNPV.js.map +0 -1
  1261. package/dist/chunk-64T6Z7BA.js.map +0 -1
  1262. package/dist/chunk-A6MYJTJI.js.map +0 -1
  1263. package/dist/chunk-AIQG7IIT.js.map +0 -1
  1264. package/dist/chunk-BEL75C7N.js.map +0 -1
  1265. package/dist/chunk-CHTN5AHI.js.map +0 -1
  1266. package/dist/chunk-CSCVTESP.js.map +0 -1
  1267. package/dist/chunk-CTSO6V72.js.map +0 -1
  1268. package/dist/chunk-CYWMES5P.js.map +0 -1
  1269. package/dist/chunk-CZEKZ5HR.js.map +0 -1
  1270. package/dist/chunk-DBTJEBMO.js +0 -291
  1271. package/dist/chunk-DBTJEBMO.js.map +0 -1
  1272. package/dist/chunk-FAOBC4IS.js.map +0 -1
  1273. package/dist/chunk-FOMR74VE.js.map +0 -1
  1274. package/dist/chunk-GCGX4FEF.js.map +0 -1
  1275. package/dist/chunk-HCYULRWT.js.map +0 -1
  1276. package/dist/chunk-I4SQQIP5.js.map +0 -1
  1277. package/dist/chunk-IG7FBZVM.js.map +0 -1
  1278. package/dist/chunk-INJUILCN.js +0 -31
  1279. package/dist/chunk-INJUILCN.js.map +0 -1
  1280. package/dist/chunk-IRXZHLUL.js.map +0 -1
  1281. package/dist/chunk-K5UWVH6P.js.map +0 -1
  1282. package/dist/chunk-LM6F6DLR.js.map +0 -1
  1283. package/dist/chunk-MQO42HZL.js +0 -223
  1284. package/dist/chunk-MQO42HZL.js.map +0 -1
  1285. package/dist/chunk-OC7I2CTA.js +0 -8
  1286. package/dist/chunk-OC7I2CTA.js.map +0 -1
  1287. package/dist/chunk-OGJFDNIS.js.map +0 -1
  1288. package/dist/chunk-P3XMBETI.js.map +0 -1
  1289. package/dist/chunk-PINENGML.js.map +0 -1
  1290. package/dist/chunk-PS2PZFXH.js +0 -84
  1291. package/dist/chunk-PS2PZFXH.js.map +0 -1
  1292. package/dist/chunk-QIDAXFKK.js.map +0 -1
  1293. package/dist/chunk-RIP5G47F.js.map +0 -1
  1294. package/dist/chunk-RKYXG6X7.js.map +0 -1
  1295. package/dist/chunk-SVKU3GUN.js.map +0 -1
  1296. package/dist/chunk-TBTSEPGP.js.map +0 -1
  1297. package/dist/chunk-TWGCWKRV.js +0 -44
  1298. package/dist/chunk-TWGCWKRV.js.map +0 -1
  1299. package/dist/chunk-UJZIF2BA.js.map +0 -1
  1300. package/dist/chunk-UVYTJQTJ.js +0 -14
  1301. package/dist/chunk-UVYTJQTJ.js.map +0 -1
  1302. package/dist/chunk-VZBUQNLX.js.map +0 -1
  1303. package/dist/chunk-VZH6TS7M.js.map +0 -1
  1304. package/dist/chunk-WJOHNCYY.js.map +0 -1
  1305. package/dist/chunk-WZB6LPQI.js +0 -47
  1306. package/dist/chunk-WZB6LPQI.js.map +0 -1
  1307. package/dist/chunk-YKUCSV34.js.map +0 -1
  1308. package/dist/chunk-YQHOKMSV.js.map +0 -1
  1309. package/dist/chunk-YW6Q6ERX.js.map +0 -1
  1310. package/dist/chunk-YWRBG23W.js.map +0 -1
  1311. package/dist/chunk-Z43YWH4R.js.map +0 -1
  1312. package/dist/chunk-Z6RPMRFH.js.map +0 -1
  1313. package/dist/components/slider/sliderThumb.d.ts +0 -1
  1314. package/dist/components/slider/sliderThumb.d.ts.map +0 -1
  1315. package/src/components/slider/sliderThumb.tsx +0 -0
@@ -0,0 +1,193 @@
1
+ import { prefersReducedMotion } from './chunk-CQ4M4BSF.js';
2
+
3
+ // src/lib/motion/easing.ts
4
+ var STEP = 10;
5
+ var frames = (duration) => Math.max(1, Math.ceil(duration / STEP));
6
+ var sampleEasing = (easing, count) => Array.from({ length: count + 1 }, (_, i) => easing(i / count));
7
+ var EPSILON = 1e-7;
8
+ function cubicBezier(x1, y1, x2, y2) {
9
+ const cx = 3 * x1;
10
+ const bx = 3 * (x2 - x1) - cx;
11
+ const ax = 1 - cx - bx;
12
+ const cy = 3 * y1;
13
+ const by = 3 * (y2 - y1) - cy;
14
+ const ay = 1 - cy - by;
15
+ const sampleX = (s) => ((ax * s + bx) * s + cx) * s;
16
+ const sampleY = (s) => ((ay * s + by) * s + cy) * s;
17
+ const slopeX = (s) => (3 * ax * s + 2 * bx) * s + cx;
18
+ const newton = (x, s, left) => {
19
+ const error = sampleX(s) - x;
20
+ if (Math.abs(error) < EPSILON) return s;
21
+ const slope = slopeX(s);
22
+ if (left === 0 || Math.abs(slope) < EPSILON) return void 0;
23
+ return newton(x, s - error / slope, left - 1);
24
+ };
25
+ const bisect = (x, lo, hi, left) => {
26
+ const mid = (lo + hi) / 2;
27
+ const error = sampleX(mid) - x;
28
+ if (left === 0 || Math.abs(error) < EPSILON) return mid;
29
+ return error > 0 ? bisect(x, lo, mid, left - 1) : bisect(x, mid, hi, left - 1);
30
+ };
31
+ return (t) => {
32
+ if (t <= 0) return 0;
33
+ if (t >= 1) return 1;
34
+ return sampleY(newton(t, t, 8) ?? bisect(t, 0, 1, 40));
35
+ };
36
+ }
37
+ var piecewise = (stops) => (t) => {
38
+ const last = stops.length - 1;
39
+ if (t <= 0) return stops[0] ?? 0;
40
+ if (t >= 1) return stops[last] ?? 1;
41
+ const at = t * last;
42
+ const i = Math.floor(at);
43
+ const a = stops[i] ?? 0;
44
+ const b = stops[i + 1] ?? a;
45
+ return a + (b - a) * (at - i);
46
+ };
47
+ var numbers = (args) => args.split(",").map((part) => Number(part.trim()));
48
+ function parseEasing(css) {
49
+ const value = css.trim();
50
+ if (value === "linear") return (t) => t;
51
+ const call = value.match(/^(cubic-bezier|linear)\((.*)\)$/);
52
+ if (!call) return void 0;
53
+ const [, name, args = ""] = call;
54
+ const values = numbers(args);
55
+ if (values.some((n) => !Number.isFinite(n))) return void 0;
56
+ if (name === "linear") return values.length >= 2 ? piecewise(values) : void 0;
57
+ const [x1, y1, x2, y2] = values;
58
+ return values.length === 4 && x1 !== void 0 && y1 !== void 0 && x2 !== void 0 && y2 !== void 0 ? cubicBezier(x1, y1, x2, y2) : void 0;
59
+ }
60
+
61
+ // src/lib/motion/spring.ts
62
+ var SPRINGS = {
63
+ /** Things coming to rest: a released drag snapping back, a panel settling. */
64
+ settle: { duration: 400, bounce: 0 },
65
+ /** A release that carries momentum past its target, once, then settles. */
66
+ overshoot: { duration: 450, bounce: 0.18 },
67
+ /** Short corrective moves — a nudge back into bounds. */
68
+ snap: { duration: 250, bounce: 0 }
69
+ };
70
+ var REST = 1e-3;
71
+ function restPhase(zeta) {
72
+ if (zeta < 1) return Math.log(1 / (REST * Math.sqrt(1 - zeta * zeta))) / zeta;
73
+ const newton = (u, left) => {
74
+ const f = Math.log(1 + u) - u - Math.log(REST);
75
+ const next = u - f / (1 / (1 + u) - 1);
76
+ return left === 0 || Math.abs(next - u) < 1e-9 ? next : newton(next, left - 1);
77
+ };
78
+ return newton(10, 20);
79
+ }
80
+ function spring({ duration, bounce, velocity = 0 }) {
81
+ const zeta = 1 - Math.min(Math.max(bounce, 0), 0.95);
82
+ const omega = 2 * Math.PI / duration;
83
+ const settle = Math.ceil(restPhase(zeta) / omega);
84
+ const x0 = -1;
85
+ const displacement = (t) => {
86
+ if (zeta >= 1) {
87
+ const b2 = velocity + omega * x0;
88
+ const decay2 = Math.exp(-omega * t);
89
+ return {
90
+ value: decay2 * (x0 + b2 * t),
91
+ velocity: decay2 * (b2 - omega * (x0 + b2 * t))
92
+ };
93
+ }
94
+ const damped = omega * Math.sqrt(1 - zeta * zeta);
95
+ const b = (velocity + zeta * omega * x0) / damped;
96
+ const decay = Math.exp(-zeta * omega * t);
97
+ const cos = Math.cos(damped * t);
98
+ const sin = Math.sin(damped * t);
99
+ return {
100
+ value: decay * (x0 * cos + b * sin),
101
+ velocity: decay * ((b * damped - zeta * omega * x0) * cos - (x0 * damped + zeta * omega * b) * sin)
102
+ };
103
+ };
104
+ return {
105
+ duration,
106
+ settle,
107
+ at: (t) => {
108
+ if (t <= 0) return { value: 0, velocity };
109
+ if (t >= settle) return { value: 1, velocity: 0 };
110
+ const state = displacement(t);
111
+ return { value: 1 + state.value, velocity: state.velocity };
112
+ }
113
+ };
114
+ }
115
+ var sampleSpring = (s) => {
116
+ const count = frames(s.settle);
117
+ return Array.from({ length: count + 1 }, (_, i) => s.at(i / count * s.settle).value);
118
+ };
119
+ var round = (n) => String(Math.round(n * 1e3) / 1e3);
120
+ var springLinear = (options) => `linear(${sampleSpring(spring(options)).map(round).join(", ")})`;
121
+
122
+ // src/lib/motion/tokens.ts
123
+ var DURATIONS = {
124
+ instant: 100,
125
+ fast: 150,
126
+ normal: 200,
127
+ slow: 300,
128
+ /** `SPRINGS.settle`'s perceived duration — the number to design with. */
129
+ spring: SPRINGS.settle.duration,
130
+ /** What `--ease-spring` must be played over. */
131
+ "spring-settle": spring(SPRINGS.settle).settle,
132
+ /** What `--ease-spring-overshoot` must be played over. */
133
+ "spring-overshoot-settle": spring(SPRINGS.overshoot).settle
134
+ };
135
+ var EASINGS = {
136
+ /** Colours and fades. */
137
+ standard: "cubic-bezier(0.2, 0, 0, 1)",
138
+ /** Large travel: a tab pill, a lightbox morph. */
139
+ emphasized: "cubic-bezier(0.32, 0.72, 0, 1)",
140
+ /** Entering transforms only. Never opacity — two-thirds of its motion lands in
141
+ * the first 15%, so a fade on it reads as a blink. */
142
+ decelerate: "cubic-bezier(0.16, 1, 0.3, 1)",
143
+ /** Exits. */
144
+ accelerate: "cubic-bezier(0.4, 0, 1, 1)",
145
+ /** Modal and drawer entrances: a hair of wind-up before they travel. */
146
+ anticipate: "cubic-bezier(0.18, -0.04, 0.55, 1)",
147
+ /** A one-shot pop past the target and back. */
148
+ overshoot: "cubic-bezier(0.34, 1.56, 0.64, 1)",
149
+ /** `SPRINGS.settle`, to play over `--duration-spring-settle`. */
150
+ spring: springLinear(SPRINGS.settle),
151
+ /** `SPRINGS.overshoot`, to play over `--duration-spring-overshoot-settle`. */
152
+ "spring-overshoot": springLinear(SPRINGS.overshoot)
153
+ };
154
+ var isEase = (name) => Object.hasOwn(EASINGS, name);
155
+
156
+ // src/lib/motion/animate.ts
157
+ var token = (el, name) => typeof getComputedStyle === "function" ? getComputedStyle(el).getPropertyValue(name).trim() : "";
158
+ function parseTime(value) {
159
+ const time = value.match(/^(-?[\d.]+)(ms|s)$/);
160
+ if (!time) return void 0;
161
+ const n = Number(time[1]);
162
+ if (!Number.isFinite(n)) return void 0;
163
+ return time[2] === "s" ? n * 1e3 : n;
164
+ }
165
+ function durationOf(el, duration) {
166
+ if (typeof duration === "number") return duration;
167
+ return parseTime(token(el, `--duration-${duration}`)) ?? DURATIONS[duration];
168
+ }
169
+ function easingOf(el, easing) {
170
+ if (!isEase(easing)) return easing;
171
+ return token(el, `--ease-${easing}`) || EASINGS[easing];
172
+ }
173
+ var settled = (animation) => animation.finished.then(
174
+ () => true,
175
+ () => false
176
+ );
177
+ function animate(el, keyframes, { duration = "normal", easing = "standard", ...options } = {}) {
178
+ if (typeof el.animate !== "function") {
179
+ return { animation: null, finished: Promise.resolve(true), cancel: () => {
180
+ } };
181
+ }
182
+ const ms = prefersReducedMotion() ? 0 : durationOf(el, duration);
183
+ const animation = el.animate(keyframes, {
184
+ ...options,
185
+ duration: ms,
186
+ easing: easingOf(el, easing)
187
+ });
188
+ return { animation, finished: settled(animation), cancel: () => animation.cancel() };
189
+ }
190
+
191
+ export { EASINGS, SPRINGS, animate, durationOf, easingOf, frames, parseEasing, sampleEasing, sampleSpring, spring };
192
+ //# sourceMappingURL=chunk-HX3LNK26.js.map
193
+ //# sourceMappingURL=chunk-HX3LNK26.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/motion/easing.ts","../src/lib/motion/spring.ts","../src/lib/motion/tokens.ts","../src/lib/motion/animate.ts"],"names":["b","decay"],"mappings":";;;AAgBO,IAAM,IAAA,GAAO,EAAA;AAGb,IAAM,MAAA,GAAS,CAAC,QAAA,KAA6B,IAAA,CAAK,GAAA,CAAI,GAAG,IAAA,CAAK,IAAA,CAAK,QAAA,GAAW,IAAI,CAAC;AAGnF,IAAM,eAAe,CAAC,MAAA,EAAgB,KAAA,KAC3C,KAAA,CAAM,KAAK,EAAE,MAAA,EAAQ,KAAA,GAAQ,CAAA,IAAK,CAAC,CAAA,EAAG,MAAM,MAAA,CAAO,CAAA,GAAI,KAAK,CAAC;AAE/D,IAAM,OAAA,GAAU,IAAA;AAOT,SAAS,WAAA,CAAY,EAAA,EAAY,EAAA,EAAY,EAAA,EAAY,EAAA,EAAoB;AAClF,EAAA,MAAM,KAAK,CAAA,GAAI,EAAA;AACf,EAAA,MAAM,EAAA,GAAK,CAAA,IAAK,EAAA,GAAK,EAAA,CAAA,GAAM,EAAA;AAC3B,EAAA,MAAM,EAAA,GAAK,IAAI,EAAA,GAAK,EAAA;AACpB,EAAA,MAAM,KAAK,CAAA,GAAI,EAAA;AACf,EAAA,MAAM,EAAA,GAAK,CAAA,IAAK,EAAA,GAAK,EAAA,CAAA,GAAM,EAAA;AAC3B,EAAA,MAAM,EAAA,GAAK,IAAI,EAAA,GAAK,EAAA;AA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AS,QAAA,CAAS,IAAa,MAAA,EAAwB;AAC5D,EAAA,IAAI,CAAC,MAAA,CAAO,MAAM,CAAA,EAAG,OAAO,MAAA;AAC5B,EAAA,OAAO,MAAM,EAAA,EAAI,CAAA,OAAA,EAAU,MAAM,CAAA,CAAE,CAAA,IAAK,QAAQ,MAAM,CAAA;AACxD;AAEA,IAAM,OAAA,GAAU,CAAC,SAAA,KACf,SAAA,CAAU,QAAA,CAAS,IAAA;AAAA,EACjB,MAAM,IAAA;AAAA,EACN,MAAM;AACR,CAAA;AAEK,SAAS,OAAA,CACd,EAAA,EACA,SAAA,EACA,EAAE,QAAA,GAAW,QAAA,EAAU,MAAA,GAAS,UAAA,EAAY,GAAG,OAAA,EAAQ,GAAoB,EAAC,EAClE;AACV,EAAA,IAAI,OAAO,EAAA,CAAG,OAAA,KAAY,UAAA,EAAY;AAGpC,IAAA,OAAO,EAAE,WAAW,IAAA,EAAM,QAAA,EAAU,QAAQ,OAAA,CAAQ,IAAI,CAAA,EAAG,MAAA,EAAQ,MAAM;AAAA,IAAC,CAAA,EAAE;AAAA,EAC9E;AACA,EAAA,MAAM,KAAK,oBAAA,EAAqB,GAAI,CAAA,GAAI,UAAA,CAAW,IAAI,QAAQ,CAAA;AAC/D,EAAA,MAAM,SAAA,GAAY,EAAA,CAAG,OAAA,CAAQ,SAAA,EAAW;AAAA,IACtC,GAAG,OAAA;AAAA,IACH,QAAA,EAAU,EAAA;AAAA,IACV,MAAA,EAAQ,QAAA,CAAS,EAAA,EAAI,MAAM;AAAA,GAC5B,CAAA;AACD,EAAA,OAAO,EAAE,SAAA,EAAW,QAAA,EAAU,OAAA,CAAQ,SAAS,GAAG,MAAA,EAAQ,MAAM,SAAA,CAAU,MAAA,EAAO,EAAE;AACrF","file":"chunk-HX3LNK26.js","sourcesContent":["/**\n * Easing curves as plain functions of progress, so JS can sample the same\n * curve CSS would play.\n *\n * WAAPI can ease between two keyframes on its own, but not when two elements\n * have to stay in lockstep through a nonlinear relation — the morph's frame\n * and its counter-scaled image drift apart mid-flight if each eases its own\n * pair. Those cases sample the eased progress here, write one keyframe per\n * sample, and play the result with `linear` easing.\n */\n\n/** Maps linear time progress in `[0, 1]` to eased progress. */\nexport type Easing = (t: number) => number\n\n/** ms between samples. Fine enough that the straight segments of a sampled\n * curve read as smooth at 60fps, coarse enough to keep a `linear()` short. */\nexport const STEP = 10\n\n/** Number of segments to sample a curve of `duration` ms into. */\nexport const frames = (duration: number): number => Math.max(1, Math.ceil(duration / STEP))\n\n/** The eased progress at `count + 1` evenly spaced times, ends included. */\nexport const sampleEasing = (easing: Easing, count: number): number[] =>\n Array.from({ length: count + 1 }, (_, i) => easing(i / count))\n\nconst EPSILON = 1e-7\n\n/**\n * A CSS `cubic-bezier()` as a function — the UnitBezier solver browsers use:\n * a few Newton steps on x(s) = t, falling back to bisection where the slope\n * flattens out. The ends are pinned exactly, so a sampled curve always lands.\n */\nexport function cubicBezier(x1: number, y1: number, x2: number, y2: number): Easing {\n const cx = 3 * x1\n const bx = 3 * (x2 - x1) - cx\n const ax = 1 - cx - bx\n const cy = 3 * y1\n const by = 3 * (y2 - y1) - cy\n const ay = 1 - cy - by\n\n const sampleX = (s: number) => ((ax * s + bx) * s + cx) * s\n const sampleY = (s: number) => ((ay * s + by) * s + cy) * s\n const slopeX = (s: number) => (3 * ax * s + 2 * bx) * s + cx\n\n const newton = (x: number, s: number, left: number): number | undefined => {\n const error = sampleX(s) - x\n if (Math.abs(error) < EPSILON) return s\n const slope = slopeX(s)\n if (left === 0 || Math.abs(slope) < EPSILON) return undefined\n return newton(x, s - error / slope, left - 1)\n }\n\n const bisect = (x: number, lo: number, hi: number, left: number): number => {\n const mid = (lo + hi) / 2\n const error = sampleX(mid) - x\n if (left === 0 || Math.abs(error) < EPSILON) return mid\n return error > 0 ? bisect(x, lo, mid, left - 1) : bisect(x, mid, hi, left - 1)\n }\n\n return (t) => {\n if (t <= 0) return 0\n if (t >= 1) return 1\n return sampleY(newton(t, t, 8) ?? bisect(t, 0, 1, 40))\n }\n}\n\n/** A CSS `linear(a, b, …)` with evenly spaced stops — the only form the kit\n * generates — as a function. */\nconst piecewise =\n (stops: readonly number[]): Easing =>\n (t) => {\n const last = stops.length - 1\n if (t <= 0) return stops[0] ?? 0\n if (t >= 1) return stops[last] ?? 1\n const at = t * last\n const i = Math.floor(at)\n const a = stops[i] ?? 0\n const b = stops[i + 1] ?? a\n return a + (b - a) * (at - i)\n }\n\nconst numbers = (args: string) => args.split(\",\").map((part) => Number(part.trim()))\n\n/**\n * Reads a CSS timing function back into an `Easing`: `linear`,\n * `cubic-bezier(…)`, or a `linear(…)` of plain numbers. Anything else —\n * a keyword, `steps()`, a `linear()` with explicit percentages — returns\n * `undefined` so the caller falls back to a curve it knows.\n */\nexport function parseEasing(css: string): Easing | undefined {\n const value = css.trim()\n if (value === \"linear\") return (t) => t\n const call = value.match(/^(cubic-bezier|linear)\\((.*)\\)$/)\n if (!call) return undefined\n const [, name, args = \"\"] = call\n const values = numbers(args)\n if (values.some((n) => !Number.isFinite(n))) return undefined\n if (name === \"linear\") return values.length >= 2 ? piecewise(values) : undefined\n const [x1, y1, x2, y2] = values\n return values.length === 4 &&\n x1 !== undefined &&\n y1 !== undefined &&\n x2 !== undefined &&\n y2 !== undefined\n ? cubicBezier(x1, y1, x2, y2)\n : undefined\n}\n","import { frames } from \"./easing\"\n\n/**\n * A damped spring, solved in closed form — no integration, no frame loop, so\n * any instant can be asked for directly and a test needs no fake timers.\n *\n * Parameterised the way Apple and Framer present springs, by how long and how\n * bouncy rather than by stiffness and damping: the damping ratio is\n * `ζ = 1 − bounce`, so `bounce: 0` is critically damped (the fastest approach\n * that never overshoots) and anything above it overshoots, once noticeably,\n * then settles.\n *\n * `duration` is the *perceived* duration, with Apple's `Spring(duration:\n * bounce:)` mapping: stiffness `(2π / duration)²`, damping `4π·ζ / duration`,\n * unit mass. A 400ms spring looks done at about 400ms (98.6% of the way for\n * `bounce: 0`), then spends a while creeping the last hair into place.\n *\n * That tail is real motion, so a spring also reports `settle`: the ms until\n * the residual displacement is under `REST` (0.1% of the travel). `settle`, not\n * `duration`, is what to play its samples over — cut at `duration` and the\n * last 1.4% would snap. In CSS, `--ease-spring` pairs with\n * `--duration-spring-settle`, which theme.css generates from the same preset.\n *\n * Values are progress: 0 at the start, 1 at the target. Velocity is progress\n * per ms, so a pointer flick of `v` px/ms over a remaining travel of `d` px\n * enters as `velocity: v / d`.\n */\n\nexport type SpringOptions = {\n /** Perceived duration, ms — how long the motion *looks*. */\n duration: number\n /** 0 never overshoots; higher is bouncier. Clamped to `[0, 0.95]`. */\n bounce: number\n /** Starting velocity, in progress per ms. Defaults to 0. */\n velocity?: number\n}\n\nexport type SpringState = {\n /** Progress, 0 → 1. */\n value: number\n /** Progress per ms. */\n velocity: number\n}\n\nexport type Spring = {\n /** Perceived duration, ms, as given. */\n duration: number\n /** ms until at rest — the duration to actually play its samples over. */\n settle: number\n /** The spring's position and velocity `t` ms after it starts. */\n at: (t: number) => SpringState\n}\n\n/** The kit's named springs. `settle` and `overshoot` are also CSS tokens\n * (`--ease-spring`, `--ease-spring-overshoot`), generated by `springLinear`. */\nexport const SPRINGS = {\n /** Things coming to rest: a released drag snapping back, a panel settling. */\n settle: { duration: 400, bounce: 0 },\n /** A release that carries momentum past its target, once, then settles. */\n overshoot: { duration: 450, bounce: 0.18 },\n /** Short corrective moves — a nudge back into bounds. */\n snap: { duration: 250, bounce: 0 },\n} as const satisfies Record<string, SpringOptions>\n\n/** Residual displacement, as a fraction of the travel, left at `settle`. */\nconst REST = 0.001\n\n/**\n * ω₀·t at which exactly `REST` of the envelope is left.\n * Underdamped: the envelope is `e^(−ζu) / √(1−ζ²)`, solved directly.\n * Critically damped: `(1 + u)·e^(−u)` has no closed-form inverse, so a few\n * Newton steps on its log.\n */\nfunction restPhase(zeta: number): number {\n if (zeta < 1) return Math.log(1 / (REST * Math.sqrt(1 - zeta * zeta))) / zeta\n const newton = (u: number, left: number): number => {\n const f = Math.log(1 + u) - u - Math.log(REST)\n const next = u - f / (1 / (1 + u) - 1)\n return left === 0 || Math.abs(next - u) < 1e-9 ? next : newton(next, left - 1)\n }\n return newton(10, 20)\n}\n\nexport function spring({ duration, bounce, velocity = 0 }: SpringOptions): Spring {\n const zeta = 1 - Math.min(Math.max(bounce, 0), 0.95)\n const omega = (2 * Math.PI) / duration\n // Whole ms, rounded up: the residual only shrinks, and tokens stay clean.\n const settle = Math.ceil(restPhase(zeta) / omega)\n // Displacement from the target; starts a full travel short of it.\n const x0 = -1\n\n const displacement = (t: number): SpringState => {\n if (zeta >= 1) {\n const b = velocity + omega * x0\n const decay = Math.exp(-omega * t)\n return {\n value: decay * (x0 + b * t),\n velocity: decay * (b - omega * (x0 + b * t)),\n }\n }\n const damped = omega * Math.sqrt(1 - zeta * zeta)\n const b = (velocity + zeta * omega * x0) / damped\n const decay = Math.exp(-zeta * omega * t)\n const cos = Math.cos(damped * t)\n const sin = Math.sin(damped * t)\n return {\n value: decay * (x0 * cos + b * sin),\n velocity:\n decay * ((b * damped - zeta * omega * x0) * cos - (x0 * damped + zeta * omega * b) * sin),\n }\n }\n\n return {\n duration,\n settle,\n at: (t) => {\n if (t <= 0) return { value: 0, velocity }\n if (t >= settle) return { value: 1, velocity: 0 }\n const state = displacement(t)\n return { value: 1 + state.value, velocity: state.velocity }\n },\n }\n}\n\n/**\n * The spring's progress at evenly spaced instants until it settles, ends\n * exact. Play them as keyframes with `linear` easing over `spring.settle`.\n * Velocity-aware by construction: build the spring with the release velocity\n * and the samples carry the flick into the settle.\n */\nexport const sampleSpring = (s: Spring): number[] => {\n const count = frames(s.settle)\n return Array.from({ length: count + 1 }, (_, i) => s.at((i / count) * s.settle).value)\n}\n\nconst round = (n: number) => String(Math.round(n * 1000) / 1000)\n\n/** The spring as a CSS `linear()` timing function, to play over its *settle*\n * time. The source of `--ease-spring` and `--ease-spring-overshoot` in\n * theme.css; their settle times are `--duration-spring-settle` and\n * `--duration-spring-overshoot-settle`. */\nexport const springLinear = (options: SpringOptions): string =>\n `linear(${sampleSpring(spring(options)).map(round).join(\", \")})`\n","import { SPRINGS, spring, springLinear } from \"./spring\"\n\n/**\n * The motion tokens theme.css declares as `--duration-*` and `--ease-*`,\n * mirrored here as JS fallbacks for when the stylesheet isn't loaded (tests,\n * a consumer that skipped theme.css). theme.test.ts asserts the two agree, so\n * this is a mirror, not a second source of truth.\n */\n\n/** ms. The `-settle` ones are generated: a spring curve's real play time,\n * longer than the perceived duration it was designed at. */\nexport const DURATIONS = {\n instant: 100,\n fast: 150,\n normal: 200,\n slow: 300,\n /** `SPRINGS.settle`'s perceived duration — the number to design with. */\n spring: SPRINGS.settle.duration,\n /** What `--ease-spring` must be played over. */\n \"spring-settle\": spring(SPRINGS.settle).settle,\n /** What `--ease-spring-overshoot` must be played over. */\n \"spring-overshoot-settle\": spring(SPRINGS.overshoot).settle,\n} as const\n\nexport const EASINGS = {\n /** Colours and fades. */\n standard: \"cubic-bezier(0.2, 0, 0, 1)\",\n /** Large travel: a tab pill, a lightbox morph. */\n emphasized: \"cubic-bezier(0.32, 0.72, 0, 1)\",\n /** Entering transforms only. Never opacity — two-thirds of its motion lands in\n * the first 15%, so a fade on it reads as a blink. */\n decelerate: \"cubic-bezier(0.16, 1, 0.3, 1)\",\n /** Exits. */\n accelerate: \"cubic-bezier(0.4, 0, 1, 1)\",\n /** Modal and drawer entrances: a hair of wind-up before they travel. */\n anticipate: \"cubic-bezier(0.18, -0.04, 0.55, 1)\",\n /** A one-shot pop past the target and back. */\n overshoot: \"cubic-bezier(0.34, 1.56, 0.64, 1)\",\n /** `SPRINGS.settle`, to play over `--duration-spring-settle`. */\n spring: springLinear(SPRINGS.settle),\n /** `SPRINGS.overshoot`, to play over `--duration-spring-overshoot-settle`. */\n \"spring-overshoot\": springLinear(SPRINGS.overshoot),\n} as const\n\nexport type Duration = keyof typeof DURATIONS\nexport type Ease = keyof typeof EASINGS\n\nexport const isEase = (name: string): name is Ease => Object.hasOwn(EASINGS, name)\n","import { prefersReducedMotion } from \"./reduced-motion\"\nimport { DURATIONS, type Duration, EASINGS, type Ease, isEase } from \"./tokens\"\n\n/**\n * A thin Web Animations wrapper that speaks the kit's tokens.\n *\n * JS computes, the browser plays: whatever a gesture or a layout measurement\n * decides, the motion itself runs as a WAAPI animation — on the compositor\n * where it can be, and visible to devtools and `pr-record.mjs`'s slow-down\n * like any CSS animation.\n *\n * Named durations and easings resolve through the element's computed style,\n * so a consumer who retunes `--duration-slow` or `--ease-emphasized` in CSS\n * retunes JS-driven motion too; `DURATIONS`/`EASINGS` are only the fallback\n * for when theme.css isn't loaded.\n *\n * Reduced motion plays at 0ms rather than not at all: the element still ends\n * on its final keyframe and `finished` still resolves, so code awaiting the\n * motion (focus after a morph, cleanup after an exit) behaves the same.\n */\n\nexport type AnimateOptions = Omit<KeyframeAnimationOptions, \"duration\" | \"easing\"> & {\n /** A token name or ms. Defaults to `normal`. */\n duration?: Duration | number\n /** A token name or any CSS timing function. Defaults to `standard`. */\n easing?: Ease | (string & {})\n}\n\nexport type Playback = {\n /** The running animation; `null` where the platform has no WAAPI. */\n animation: Animation | null\n /** `true` once it finishes, `false` if it was cancelled first. Never\n * rejects. */\n finished: Promise<boolean>\n cancel: () => void\n}\n\n/** A custom property's value on `el`, or `\"\"` when unset. */\nexport const token = (el: Element, name: string): string =>\n typeof getComputedStyle === \"function\" ? getComputedStyle(el).getPropertyValue(name).trim() : \"\"\n\n/** `\"300ms\"` / `\"0.3s\"` → 300; anything else → `undefined`. */\nfunction parseTime(value: string): number | undefined {\n const time = value.match(/^(-?[\\d.]+)(ms|s)$/)\n if (!time) return undefined\n const n = Number(time[1])\n if (!Number.isFinite(n)) return undefined\n return time[2] === \"s\" ? n * 1000 : n\n}\n\n/** A duration in ms: a number passes through, a token name reads\n * `--duration-<name>` off `el`. */\nexport function durationOf(el: Element, duration: Duration | number): number {\n if (typeof duration === \"number\") return duration\n return parseTime(token(el, `--duration-${duration}`)) ?? DURATIONS[duration]\n}\n\n/** A CSS timing function: a token name reads `--ease-<name>` off `el`, any\n * other string is taken as CSS already. */\nexport function easingOf(el: Element, easing: string): string {\n if (!isEase(easing)) return easing\n return token(el, `--ease-${easing}`) || EASINGS[easing]\n}\n\nconst settled = (animation: Animation): Promise<boolean> =>\n animation.finished.then(\n () => true,\n () => false,\n )\n\nexport function animate(\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes,\n { duration = \"normal\", easing = \"standard\", ...options }: AnimateOptions = {},\n): Playback {\n if (typeof el.animate !== \"function\") {\n // No WAAPI (jsdom without the test stub, a very old engine): nothing\n // moved, and saying so beats a fake animation that ends on no frame.\n return { animation: null, finished: Promise.resolve(true), cancel: () => {} }\n }\n const ms = prefersReducedMotion() ? 0 : durationOf(el, duration)\n const animation = el.animate(keyframes, {\n ...options,\n duration: ms,\n easing: easingOf(el, easing),\n })\n return { animation, finished: settled(animation), cancel: () => animation.cancel() }\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { TYPOGRAPHY_SHADE_CLASSES, TYPOGRAPHY_SIZE_CLASSES, resolveHeadingSize } from './chunk-2GILNBZW.js';
2
1
  import { props } from './chunk-WYCMIIRR.js';
2
+ import { TYPOGRAPHY_SHADE_CLASSES, TYPOGRAPHY_SIZE_CLASSES, resolveHeadingSize } from './chunk-GIPQUKCN.js';
3
3
  import { cn } from './chunk-QP4I37PA.js';
4
4
  import { ark } from '@ark-ui/react';
5
5
  import { cva } from 'class-variance-authority';
@@ -39,14 +39,7 @@ var Text = ({
39
39
  asChild,
40
40
  className: cn(textVariants({ size: resolvedSize, c }), className),
41
41
  children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
42
- prefix !== void 0 && /* @__PURE__ */ jsx(
43
- "span",
44
- {
45
- "aria-hidden": "true",
46
- className: "select-none text-gray-light-600 dark:text-gray-dark-400",
47
- children: prefix
48
- }
49
- ),
42
+ prefix !== void 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("select-none", TYPOGRAPHY_SHADE_CLASSES.muted), children: prefix }),
50
43
  children
51
44
  ] })
52
45
  }
@@ -54,5 +47,5 @@ var Text = ({
54
47
  };
55
48
 
56
49
  export { Text };
57
- //# sourceMappingURL=chunk-CSCVTESP.js.map
58
- //# sourceMappingURL=chunk-CSCVTESP.js.map
50
+ //# sourceMappingURL=chunk-IMP5VHEN.js.map
51
+ //# sourceMappingURL=chunk-IMP5VHEN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/text/text.tsx"],"names":[],"mappings":";;;;;;;AAqCA,IAAM,YAAA,GAAe,IAAI,EAAA,EAAI;AAAA,EAC3B,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,uBAAA;AAAA,IACN,CAAA,EAAG;AAAA,MACD,OAAA,EAAS,EAAA;AAAA,MACT,GAAG;AAAA;AACL,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,IAAA;AAAA,IACN,CAAA,EAAG;AAAA;AAEP,CAAC,CAAA;AAoBM,IAAM,OAAO,CAAC;AAAA,EACnB,SAAA;AAAA,EACA,IAAA;AAAA,EACA,CAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAG;AACL,CAAA,KAAiB;AACf,EAAA,MAAM,IAAA,GAAO,IAAA,GAAO,GAAA,CAAI,IAAA,GAAO,GAAA,CAAI,CAAA;AACnC,EAAA,MAAM,YAAA,GAAe,IAAA,GAAO,kBAAA,CAAmB,IAAI,CAAA,GAAI,MAAA;AACvD,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA,CAAM,EAAE,aAAA,EAAe,QAAQ,CAAA;AAAA,MAClC,GAAG,IAAA;AAAA,MACJ,OAAA;AAAA,MACA,SAAA,EAAW,GAAG,YAAA,CAAa,EAAE,MAAM,YAAA,EAAc,CAAA,EAAG,CAAA,EAAG,SAAS,CAAA;AAAA,MAE/D,QAAA,EAAA,OAAA,GACC,2BAEA,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,QAAA,MAAA,KAAW,MAAA,oBACV,GAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EAAO,SAAA,EAAW,EAAA,CAAG,aAAA,EAAe,wBAAA,CAAyB,KAAK,CAAA,EACjF,QAAA,EAAA,MAAA,EACH,CAAA;AAAA,QAED;AAAA,OAAA,EACH;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-IMP5VHEN.js","sourcesContent":["import { ark, type HTMLArkProps } from \"@ark-ui/react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport type { ReactNode } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport { props } from \"../../lib/props\"\nimport type { WithTestId } from \"../../lib/test-id\"\nimport {\n type HeadingSizeAlias,\n resolveHeadingSize,\n TYPOGRAPHY_SHADE_CLASSES,\n TYPOGRAPHY_SIZE_CLASSES,\n} from \"../../lib/typography-size\"\n\n/**\n * Text — styled paragraph primitive.\n *\n * Pure React Server Component. Renders `<p>` by default and exposes a tight\n * prop surface: size (visual scale) and a `c` shade switch (default / secondary /\n * muted), matching the 42 UI Kit Figma's text-color tiers: `secondary` is\n * `text-secondary` (labels, section headings — gray-700/gray-300) and `muted`\n * is `text-tertiary` (supporting/paragraph text — gray-600/gray-400). For\n * headings use `Title`.\n *\n * `size` also accepts the heading aliases (`h1`..`h6`, `p`) as friendlier\n * names for the same scale — e.g. `size=\"h2\"` is identical to `size=\"3xl\"`.\n * These are visual-only: Text always renders `<p>`/`<span>`, never a\n * heading element, regardless of which size alias is used.\n *\n * The `prefix` slot lets callers prepend a decorative leader (the classic\n * `// ` for the code-themed aesthetic) without compromising assistive tech:\n * - `aria-hidden=\"true\"` keeps screen readers from announcing it\n * - `select-none` keeps it out of clipboard copies\n *\n * Pass `span` when a `<p>` isn't valid HTML where Text is composed — e.g.\n * nested inside a consumer's own paragraph, or inside another phrasing-\n * content-only element. Visually identical; only the tag changes.\n */\nconst textVariants = cva(\"\", {\n variants: {\n size: TYPOGRAPHY_SIZE_CLASSES,\n c: {\n default: \"\",\n ...TYPOGRAPHY_SHADE_CLASSES,\n },\n },\n defaultVariants: {\n size: \"md\",\n c: \"default\",\n },\n})\n\nexport type TextSize = NonNullable<VariantProps<typeof textVariants>[\"size\"]>\n\nexport type TextProps = Omit<HTMLArkProps<\"p\">, \"prefix\"> &\n Omit<VariantProps<typeof textVariants>, \"size\"> &\n WithTestId & {\n /** Visual scale. Also accepts the heading aliases (`h1`..`h6`, `p`). */\n size?: TextSize | HeadingSizeAlias\n /**\n * Decorative prefix rendered inside the paragraph. Hidden from screen\n * readers and the clipboard via `aria-hidden` + `select-none`. Ignored\n * when `asChild` is true — the consumer owns the inner structure.\n */\n prefix?: ReactNode\n /** Renders a `<span>` instead of the default `<p>`. Same styling — only\n * the tag changes, for composing Text where a `<p>` isn't valid HTML. */\n span?: boolean\n }\n\nexport const Text = ({\n className,\n size,\n c,\n prefix,\n span,\n children,\n asChild,\n testId,\n ...rest\n}: TextProps) => {\n const Comp = span ? ark.span : ark.p\n const resolvedSize = size ? resolveHeadingSize(size) : undefined\n return (\n <Comp\n {...props({ \"data-testid\": testId })}\n {...rest}\n asChild={asChild}\n className={cn(textVariants({ size: resolvedSize, c }), className)}\n >\n {asChild ? (\n children\n ) : (\n <>\n {prefix !== undefined && (\n <span aria-hidden=\"true\" className={cn(\"select-none\", TYPOGRAPHY_SHADE_CLASSES.muted)}>\n {prefix}\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n )\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { devWarn } from './chunk-OC7I2CTA.js';
1
+ import { devWarn } from './chunk-6N6J2DOE.js';
2
2
  import { useLocaleContext, LocaleProvider } from '@ark-ui/react/locale';
3
3
  import { getLocalTimeZone } from '@internationalized/date';
4
4
  import { createContext, useSyncExternalStore, useContext, useCallback } from 'react';
@@ -73,5 +73,5 @@ var IntlProvider = ({ locale, timeZone, children }) => {
73
73
  };
74
74
 
75
75
  export { DEFAULT_LOCALE, DEFAULT_TIME_ZONE, IntlProvider, useDirectionCheck, useLocale, useTimeZone };
76
- //# sourceMappingURL=chunk-57BTVRRB.js.map
77
- //# sourceMappingURL=chunk-57BTVRRB.js.map
76
+ //# sourceMappingURL=chunk-IPYHTCFL.js.map
77
+ //# sourceMappingURL=chunk-IPYHTCFL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/intl.tsx"],"names":[],"mappings":";;;;;;AAiCA,IAAM,IAAA,GAAO,MAAA;AAQN,IAAM,cAAA,GAAiB;AAQvB,IAAM,iBAAA,GAAoB;AAcjC,SAAS,oBAAoB,aAAA,EAA2B;AACtD,EAAA,MAAA,CAAO,gBAAA,CAAiB,kBAAkB,aAAa,CAAA;AACvD,EAAA,OAAO,MAAM,MAAA,CAAO,mBAAA,CAAoB,gBAAA,EAAkB,aAAa,CAAA;AACzE;AAEA,SAAS,mBAAA,GAAsB;AAC7B,EAAA,OAAO,UAAU,QAAA,IAAY,cAAA;AAC/B;AAEA,SAAS,yBAAA,GAA4B;AACnC,EAAA,OAAO,cAAA;AACT;AAKA,IAAM,0BAA0B,MAAM;AAAC,CAAA;AAEvC,SAAS,mBAAA,GAAsB;AAC7B,EAAA,OAAO,uBAAA;AACT;AAEA,SAAS,mBAAA,GAAsB;AAI7B,EAAA,OAAO,kBAAiB,IAAK,iBAAA;AAC/B;AAEA,SAAS,yBAAA,GAA4B;AACnC,EAAA,OAAO,iBAAA;AACT;AAEA,IAAM,eAAA,GAAkB,cAAkC,MAAS,CAAA;AAU5D,IAAM,SAAA,GAAY,CAAC,QAAA,KAA8C;AACtE,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAS,GAAI,gBAAA,EAAiB;AAC9C,EAAA,MAAM,YAAY,QAAA,IAAY,QAAA;AAC9B,EAAA,MAAM,UAAA,GAAa,oBAAA;AAAA,IACjB,mBAAA;AAAA,IAC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GAAA,CAAC,eAAA,CAAgB,QAAA,EAAhB,EAAyB,KAAA,EAAO,gBAAA,EAAmB,QAAA,EAAS,CAAA,EAC/D,CAAA;AAEJ","file":"chunk-57BTVRRB.js","sourcesContent":["\"use client\"\n\nimport { LocaleProvider, useLocaleContext } from \"@ark-ui/react/locale\"\nimport { getLocalTimeZone } from \"@internationalized/date\"\nimport { createContext, type ReactNode, useCallback, useContext, useSyncExternalStore } from \"react\"\nimport { devWarn } from \"./dev-warn\"\n\n/**\n * The one seam where \"which locale\" and \"which time zone\" are decided.\n *\n * Every `Intl` constructor takes a locale as its first argument and a `timeZone` as an option,\n * and both have a runtime default — `Intl.DateTimeFormat()` resolves to Node's `en-US` on a\n * server and to the visitor's locale in a browser; `getLocalTimeZone()` resolves to the server's\n * zone (UTC on most hosts) and to the visitor's. Reading either implicitly therefore makes the\n * rendered output a property of *where the code ran*, which is a hydration mismatch waiting for\n * the first visitor configured differently from the build server. So nothing in this kit reads\n * them implicitly: components resolve both through the hooks below, and the value they get is\n * either something the app stated or a documented constant.\n *\n * Locale and time zone stay **fully independent** — separate prop, separate hook, separate\n * per-instance override, no coupling. They share only this module and `IntlProvider`'s single\n * mount point, because the resolution mechanism is the whole of the fix and writing it twice is\n * how the two would drift apart.\n *\n * Locale deliberately needs no context of its own: `IntlProvider` renders Ark's own\n * `LocaleProvider`, so Ark's state machines (`Calendar`, `DatePicker`, `NumberInput`,\n * `FileUpload`) and this kit's own formatting can only ever read one value — and `dir`/RTL comes\n * along for free for the components already reading `useLocaleContext().dir` (`menu.tsx`,\n * `tooltip.tsx`, `hover-card.tsx`). An app that mounts Ark's `LocaleProvider` directly still\n * works. Only the time zone needs a new context, since Ark has no equivalent.\n */\n\n/** Follow the host runtime. Accepted anywhere a locale or zone is: provider, or a single prop. */\nconst AUTO = \"auto\"\n\n/**\n * The locale used when nothing configures one, and what `\"auto\"` reports during SSR and the\n * hydration render. Pinned to the same tag as Ark's own `useLocaleContext()` default so the two\n * halves of a `Calendar` — Ark's machine and this kit's formatting around it — cannot disagree,\n * the same \"one constant, two readers\" reasoning `lib/theme.ts` uses for the theme storage key.\n */\nexport const DEFAULT_LOCALE = \"en-US\"\n\n/**\n * What `timeZone=\"auto\"` reports during SSR and the hydration render, before the host zone is\n * readable. Note this is *not* the default for the `timeZone` prop itself — that is `\"auto\"`\n * (see `useTimeZone`), because a wrong zone is wrong data rather than merely an unfamiliar\n * format. UTC is the one zone every runtime agrees on.\n */\nexport const DEFAULT_TIME_ZONE = \"UTC\"\n\n// `\"auto\"` is resolved through `useSyncExternalStore` with a fixed `getServerSnapshot`, the same\n// shape (and for the same reason) as `use-media-query.ts`, `use-local-storage.ts` and\n// `use-now.ts`: the server and the first client render are handed a value that cannot differ, so\n// hydration always matches, and React swaps in the real one immediately afterwards. A plain\n// `useEffect` would work too, but this way the fallback is declared once next to the real read\n// instead of living in a `useState` initializer somewhere else.\n//\n// Caveat worth knowing before reaching for `\"auto\"` under SSR, carried over from `use-theme.ts`:\n// React does not specify that the post-hydration correction lands before the browser paints, and\n// empirically it does not reliably, so the default value can be visible for a frame. That is the\n// accepted cost of opting in, and precisely why `locale` does not default to `\"auto\"`.\n\nfunction subscribeToLanguage(onStoreChange: () => void) {\n window.addEventListener(\"languagechange\", onStoreChange)\n return () => window.removeEventListener(\"languagechange\", onStoreChange)\n}\n\nfunction getLanguageSnapshot() {\n return navigator.language || DEFAULT_LOCALE\n}\n\nfunction getLanguageServerSnapshot() {\n return DEFAULT_LOCALE\n}\n\n// The host zone has no change event to listen for — a machine moving zone mid-session re-resolves\n// on the next render at worst. `subscribe` still has to return an unsubscribe function, and it\n// has to be a stable reference or `useSyncExternalStore` resubscribes on every render.\nconst unsubscribeFromTimeZone = () => {}\n\nfunction subscribeToTimeZone() {\n return unsubscribeFromTimeZone\n}\n\nfunction getTimeZoneSnapshot() {\n // `getLocalTimeZone()` is `Intl.DateTimeFormat().resolvedOptions().timeZone` behind a cache.\n // This is the only call to it left in the kit, which is the point: one reader of the ambient\n // zone, wrapped in the hydration-safe store, instead of ~13 scattered prop defaults.\n return getLocalTimeZone() || DEFAULT_TIME_ZONE\n}\n\nfunction getTimeZoneServerSnapshot() {\n return DEFAULT_TIME_ZONE\n}\n\nconst TimeZoneContext = createContext<string | undefined>(undefined)\n\n/**\n * The active locale as a concrete BCP-47 tag, never `\"auto\"` and never `undefined`.\n *\n * `override` is the component's own `locale` prop, so precedence reads\n * **prop → provider → `DEFAULT_LOCALE`** — the same shape as `useLinkComponent`.\n *\n * const locale = useLocale(props.locale)\n */\nexport const useLocale = (override?: \"auto\" | (string & {})): string => {\n const { locale: provided } = useLocaleContext()\n const requested = override ?? provided\n const hostLocale = useSyncExternalStore(\n subscribeToLanguage,\n getLanguageSnapshot,\n getLanguageServerSnapshot,\n )\n return requested === AUTO ? hostLocale : requested\n}\n\n/**\n * The active time zone as a concrete IANA name, never `\"auto\"` and never `undefined`.\n *\n * `override` is the component's own `timeZone` prop, so precedence reads\n * **prop → provider → `\"auto\"`**. The default is `\"auto\"` rather than a fixed zone because a\n * wrong zone shows wrong times, not merely an unfamiliar format — and `\"auto\"` costs a\n * client-only app nothing, since `getServerSnapshot` never runs there and the first render is\n * already the true zone.\n *\n * const timeZone = useTimeZone(props.timeZone)\n */\nexport const useTimeZone = (override?: \"auto\" | (string & {})): string => {\n const provided = useContext(TimeZoneContext)\n const requested = override ?? provided ?? AUTO\n const hostTimeZone = useSyncExternalStore(\n subscribeToTimeZone,\n getTimeZoneSnapshot,\n getTimeZoneServerSnapshot,\n )\n return requested === AUTO ? hostTimeZone : requested\n}\n\n// One warning per page, however many components run the check: the fix is a single provider at\n// the app root, so repeating the message per Tabs would only bury it.\nlet warnedDirection = false\n\n/**\n * Dev-only guard for the one RTL setup that silently breaks: direction stated on the DOM\n * (`<html dir=\"rtl\">`, or an ancestor) while no locale says so. Ark derives `dir` from the\n * locale alone and stamps it on every part, so its parts render `ltr` inside an `rtl` page —\n * and its arrow-key handling runs `ltr` too, which is why the kit can't simply let the parts\n * inherit from the DOM: the direction has to be known in JS, i.e. come from `IntlProvider`.\n *\n * Returns a callback ref for an Ark root. It reads the **parent**'s direction, since the root\n * itself carries Ark's stamped `dir`. Runs on attach, so SSR and hydration never see it.\n */\nexport const useDirectionCheck = () => {\n const { dir } = useLocaleContext()\n return useCallback(\n (node: HTMLElement | null) => {\n const parent = node?.parentElement\n if (warnedDirection || !parent) return\n // Computed rather than `closest(\"[dir]\")`, so a CSS-only `direction: rtl` counts too.\n const inherited = getComputedStyle(parent).direction\n if (inherited === dir) return\n warnedDirection = true\n devWarn(\n `[@42/ui-react] This page is dir=\"${inherited}\", but the locale resolves to dir=\"${dir}\", so Ark-backed parts (Tabs, SegmentGroup, Menu…) render and navigate ${dir}. Direction comes from the locale: wrap the app in <IntlProvider locale=\"…\"> with a matching locale. See \"Text direction\" in the Internationalization docs.`,\n )\n },\n [dir],\n )\n}\n\nexport type IntlProviderProps = {\n /** A BCP-47 tag (`\"fr-FR\"`), or `\"auto\"` to follow the browser. Inherited from an outer\n * `IntlProvider` when omitted, and `\"en-US\"` when there is none. */\n locale?: \"auto\" | (string & {})\n /** An IANA zone (`\"Europe/Paris\"`), or `\"auto\"` to follow the host. Inherited from an outer\n * `IntlProvider` when omitted, and `\"auto\"` when there is none. @default \"auto\" */\n timeZone?: \"auto\" | (string & {})\n children?: ReactNode\n}\n\n/**\n * Wrap the app once to state how it formats dates, times and numbers:\n * `<IntlProvider locale=\"fr-FR\" timeZone=\"Europe/Paris\"><App /></IntlProvider>`.\n *\n * Both props are optional and independent — setting only `timeZone` leaves the locale alone, and\n * a nested provider inherits whichever value it doesn't set, so a section can override one\n * without restating the other.\n *\n * It resolves both values and publishes the results, so `\"auto\"` is subscribed to once here\n * rather than once per component, and everything downstream — Ark's machines included — reads a\n * concrete tag and zone.\n *\n * Text direction follows the locale: `locale=\"ar\"` makes every Ark part `rtl`. `<html dir=\"rtl\">`\n * alone never reaches Ark, which is what `useDirectionCheck` warns about in development.\n *\n * This provider carries the inputs to `Intl`, and nothing else. Translated microcopy stays on\n * each component's own `translations` prop by design (`code-style.md`); there is deliberately no\n * message context here.\n */\nexport const IntlProvider = ({ locale, timeZone, children }: IntlProviderProps) => {\n const resolvedLocale = useLocale(locale)\n const resolvedTimeZone = useTimeZone(timeZone)\n\n return (\n <LocaleProvider locale={resolvedLocale}>\n <TimeZoneContext.Provider value={resolvedTimeZone}>{children}</TimeZoneContext.Provider>\n </LocaleProvider>\n )\n}\n"]}
1
+ {"version":3,"sources":["../src/lib/intl.tsx"],"names":[],"mappings":";;;;;;AAiCA,IAAM,IAAA,GAAO,MAAA;AAQN,IAAM,cAAA,GAAiB;AAQvB,IAAM,iBAAA,GAAoB;AAcjC,SAAS,oBAAoB,aAAA,EAA2B;AACtD,EAAA,MAAA,CAAO,gBAAA,CAAiB,kBAAkB,aAAa,CAAA;AACvD,EAAA,OAAO,MAAM,MAAA,CAAO,mBAAA,CAAoB,gBAAA,EAAkB,aAAa,CAAA;AACzE;AAEA,SAAS,mBAAA,GAAsB;AAC7B,EAAA,OAAO,UAAU,QAAA,IAAY,cAAA;AAC/B;AAEA,SAAS,yBAAA,GAA4B;AACnC,EAAA,OAAO,cAAA;AACT;AAKA,IAAM,0BAA0B,MAAM;AAAC,CAAA;AAEvC,SAAS,mBAAA,GAAsB;AAC7B,EAAA,OAAO,uBAAA;AACT;AAEA,SAAS,mBAAA,GAAsB;AAI7B,EAAA,OAAO,kBAAiB,IAAK,iBAAA;AAC/B;AAEA,SAAS,yBAAA,GAA4B;AACnC,EAAA,OAAO,iBAAA;AACT;AAEA,IAAM,eAAA,GAAkB,cAAkC,MAAS,CAAA;AAU5D,IAAM,SAAA,GAAY,CAAC,QAAA,KAA8C;AACtE,EAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAS,GAAI,gBAAA,EAAiB;AAC9C,EAAA,MAAM,YAAY,QAAA,IAAY,QAAA;AAC9B,EAAA,MAAM,UAAA,GAAa,oBAAA;AAAA,IACjB,mBAAA;AA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BAAA,GAAA,CAAC,eAAA,CAAgB,QAAA,EAAhB,EAAyB,KAAA,EAAO,gBAAA,EAAmB,QAAA,EAAS,CAAA,EAC/D,CAAA;AAEJ","file":"chunk-IPYHTCFL.js","sourcesContent":["\"use client\"\n\nimport { LocaleProvider, useLocaleContext } from \"@ark-ui/react/locale\"\nimport { getLocalTimeZone } from \"@internationalized/date\"\nimport { createContext, type ReactNode, useCallback, useContext, useSyncExternalStore } from \"react\"\nimport { devWarn } from \"./dev-warn\"\n\n/**\n * The one seam where \"which locale\" and \"which time zone\" are decided.\n *\n * Every `Intl` constructor takes a locale as its first argument and a `timeZone` as an option,\n * and both have a runtime default — `Intl.DateTimeFormat()` resolves to Node's `en-US` on a\n * server and to the visitor's locale in a browser; `getLocalTimeZone()` resolves to the server's\n * zone (UTC on most hosts) and to the visitor's. Reading either implicitly therefore makes the\n * rendered output a property of *where the code ran*, which is a hydration mismatch waiting for\n * the first visitor configured differently from the build server. So nothing in this kit reads\n * them implicitly: components resolve both through the hooks below, and the value they get is\n * either something the app stated or a documented constant.\n *\n * Locale and time zone stay **fully independent** — separate prop, separate hook, separate\n * per-instance override, no coupling. They share only this module and `IntlProvider`'s single\n * mount point, because the resolution mechanism is the whole of the fix and writing it twice is\n * how the two would drift apart.\n *\n * Locale deliberately needs no context of its own: `IntlProvider` renders Ark's own\n * `LocaleProvider`, so Ark's state machines (`Calendar`, `DatePicker`, `NumberInput`,\n * `FileUpload`) and this kit's own formatting can only ever read one value — and `dir`/RTL comes\n * along for free for the components already reading `useLocaleContext().dir` (`menu.tsx`,\n * `tooltip.tsx`, `hover-card.tsx`). An app that mounts Ark's `LocaleProvider` directly still\n * works. Only the time zone needs a new context, since Ark has no equivalent.\n */\n\n/** Follow the host runtime. Accepted anywhere a locale or zone is: provider, or a single prop. */\nconst AUTO = \"auto\"\n\n/**\n * The locale used when nothing configures one, and what `\"auto\"` reports during SSR and the\n * hydration render. Pinned to the same tag as Ark's own `useLocaleContext()` default so the two\n * halves of a `Calendar` — Ark's machine and this kit's formatting around it — cannot disagree,\n * the same \"one constant, two readers\" reasoning `lib/theme.ts` uses for the theme storage key.\n */\nexport const DEFAULT_LOCALE = \"en-US\"\n\n/**\n * What `timeZone=\"auto\"` reports during SSR and the hydration render, before the host zone is\n * readable. Note this is *not* the default for the `timeZone` prop itself — that is `\"auto\"`\n * (see `useTimeZone`), because a wrong zone is wrong data rather than merely an unfamiliar\n * format. UTC is the one zone every runtime agrees on.\n */\nexport const DEFAULT_TIME_ZONE = \"UTC\"\n\n// `\"auto\"` is resolved through `useSyncExternalStore` with a fixed `getServerSnapshot`, the same\n// shape (and for the same reason) as `use-media-query.ts`, `use-local-storage.ts` and\n// `use-now.ts`: the server and the first client render are handed a value that cannot differ, so\n// hydration always matches, and React swaps in the real one immediately afterwards. A plain\n// `useEffect` would work too, but this way the fallback is declared once next to the real read\n// instead of living in a `useState` initializer somewhere else.\n//\n// Caveat worth knowing before reaching for `\"auto\"` under SSR, carried over from `use-theme.ts`:\n// React does not specify that the post-hydration correction lands before the browser paints, and\n// empirically it does not reliably, so the default value can be visible for a frame. That is the\n// accepted cost of opting in, and precisely why `locale` does not default to `\"auto\"`.\n\nfunction subscribeToLanguage(onStoreChange: () => void) {\n window.addEventListener(\"languagechange\", onStoreChange)\n return () => window.removeEventListener(\"languagechange\", onStoreChange)\n}\n\nfunction getLanguageSnapshot() {\n return navigator.language || DEFAULT_LOCALE\n}\n\nfunction getLanguageServerSnapshot() {\n return DEFAULT_LOCALE\n}\n\n// The host zone has no change event to listen for — a machine moving zone mid-session re-resolves\n// on the next render at worst. `subscribe` still has to return an unsubscribe function, and it\n// has to be a stable reference or `useSyncExternalStore` resubscribes on every render.\nconst unsubscribeFromTimeZone = () => {}\n\nfunction subscribeToTimeZone() {\n return unsubscribeFromTimeZone\n}\n\nfunction getTimeZoneSnapshot() {\n // `getLocalTimeZone()` is `Intl.DateTimeFormat().resolvedOptions().timeZone` behind a cache.\n // This is the only call to it left in the kit, which is the point: one reader of the ambient\n // zone, wrapped in the hydration-safe store, instead of ~13 scattered prop defaults.\n return getLocalTimeZone() || DEFAULT_TIME_ZONE\n}\n\nfunction getTimeZoneServerSnapshot() {\n return DEFAULT_TIME_ZONE\n}\n\nconst TimeZoneContext = createContext<string | undefined>(undefined)\n\n/**\n * The active locale as a concrete BCP-47 tag, never `\"auto\"` and never `undefined`.\n *\n * `override` is the component's own `locale` prop, so precedence reads\n * **prop → provider → `DEFAULT_LOCALE`** — the same shape as `useLinkComponent`.\n *\n * const locale = useLocale(props.locale)\n */\nexport const useLocale = (override?: \"auto\" | (string & {})): string => {\n const { locale: provided } = useLocaleContext()\n const requested = override ?? provided\n const hostLocale = useSyncExternalStore(\n subscribeToLanguage,\n getLanguageSnapshot,\n getLanguageServerSnapshot,\n )\n return requested === AUTO ? hostLocale : requested\n}\n\n/**\n * The active time zone as a concrete IANA name, never `\"auto\"` and never `undefined`.\n *\n * `override` is the component's own `timeZone` prop, so precedence reads\n * **prop → provider → `\"auto\"`**. The default is `\"auto\"` rather than a fixed zone because a\n * wrong zone shows wrong times, not merely an unfamiliar format — and `\"auto\"` costs a\n * client-only app nothing, since `getServerSnapshot` never runs there and the first render is\n * already the true zone.\n *\n * const timeZone = useTimeZone(props.timeZone)\n */\nexport const useTimeZone = (override?: \"auto\" | (string & {})): string => {\n const provided = useContext(TimeZoneContext)\n const requested = override ?? provided ?? AUTO\n const hostTimeZone = useSyncExternalStore(\n subscribeToTimeZone,\n getTimeZoneSnapshot,\n getTimeZoneServerSnapshot,\n )\n return requested === AUTO ? hostTimeZone : requested\n}\n\n// One warning per page, however many components run the check: the fix is a single provider at\n// the app root, so repeating the message per Tabs would only bury it.\nlet warnedDirection = false\n\n/**\n * Dev-only guard for the one RTL setup that silently breaks: direction stated on the DOM\n * (`<html dir=\"rtl\">`, or an ancestor) while no locale says so. Ark derives `dir` from the\n * locale alone and stamps it on every part, so its parts render `ltr` inside an `rtl` page —\n * and its arrow-key handling runs `ltr` too, which is why the kit can't simply let the parts\n * inherit from the DOM: the direction has to be known in JS, i.e. come from `IntlProvider`.\n *\n * Returns a callback ref for an Ark root. It reads the **parent**'s direction, since the root\n * itself carries Ark's stamped `dir`. Runs on attach, so SSR and hydration never see it.\n */\nexport const useDirectionCheck = () => {\n const { dir } = useLocaleContext()\n return useCallback(\n (node: HTMLElement | null) => {\n const parent = node?.parentElement\n if (warnedDirection || !parent) return\n // Computed rather than `closest(\"[dir]\")`, so a CSS-only `direction: rtl` counts too.\n const inherited = getComputedStyle(parent).direction\n if (inherited === dir) return\n warnedDirection = true\n devWarn(\n `[@42/ui-react] This page is dir=\"${inherited}\", but the locale resolves to dir=\"${dir}\", so Ark-backed parts (Tabs, SegmentGroup, Menu…) render and navigate ${dir}. Direction comes from the locale: wrap the app in <IntlProvider locale=\"…\"> with a matching locale. See \"Text direction\" in the Internationalization docs.`,\n )\n },\n [dir],\n )\n}\n\nexport type IntlProviderProps = {\n /** A BCP-47 tag (`\"fr-FR\"`), or `\"auto\"` to follow the browser. Inherited from an outer\n * `IntlProvider` when omitted, and `\"en-US\"` when there is none. */\n locale?: \"auto\" | (string & {})\n /** An IANA zone (`\"Europe/Paris\"`), or `\"auto\"` to follow the host. Inherited from an outer\n * `IntlProvider` when omitted, and `\"auto\"` when there is none. @default \"auto\" */\n timeZone?: \"auto\" | (string & {})\n children?: ReactNode\n}\n\n/**\n * Wrap the app once to state how it formats dates, times and numbers:\n * `<IntlProvider locale=\"fr-FR\" timeZone=\"Europe/Paris\"><App /></IntlProvider>`.\n *\n * Both props are optional and independent — setting only `timeZone` leaves the locale alone, and\n * a nested provider inherits whichever value it doesn't set, so a section can override one\n * without restating the other.\n *\n * It resolves both values and publishes the results, so `\"auto\"` is subscribed to once here\n * rather than once per component, and everything downstream — Ark's machines included — reads a\n * concrete tag and zone.\n *\n * Text direction follows the locale: `locale=\"ar\"` makes every Ark part `rtl`. `<html dir=\"rtl\">`\n * alone never reaches Ark, which is what `useDirectionCheck` warns about in development.\n *\n * This provider carries the inputs to `Intl`, and nothing else. Translated microcopy stays on\n * each component's own `translations` prop by design (`code-style.md`); there is deliberately no\n * message context here.\n */\nexport const IntlProvider = ({ locale, timeZone, children }: IntlProviderProps) => {\n const resolvedLocale = useLocale(locale)\n const resolvedTimeZone = useTimeZone(timeZone)\n\n return (\n <LocaleProvider locale={resolvedLocale}>\n <TimeZoneContext.Provider value={resolvedTimeZone}>{children}</TimeZoneContext.Provider>\n </LocaleProvider>\n )\n}\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=chunk-J2WSKRJW.js.map
3
+ //# sourceMappingURL=chunk-J2WSKRJW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-J2WSKRJW.js"}
@@ -0,0 +1,14 @@
1
+ // src/lib/radius.ts
2
+ var MEDIA_RADIUS = {
3
+ none: "rounded-none",
4
+ xs: "rounded-xs",
5
+ sm: "rounded-sm",
6
+ md: "rounded-md",
7
+ lg: "rounded-lg",
8
+ xl: "rounded-xl",
9
+ full: "rounded-full"
10
+ };
11
+
12
+ export { MEDIA_RADIUS };
13
+ //# sourceMappingURL=chunk-J43LSYQO.js.map
14
+ //# sourceMappingURL=chunk-J43LSYQO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/radius.ts"],"names":[],"mappings":";AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,IAAA,EAAM,cAAA;AAAA,EACN,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,EAAA,EAAI,YAAA;AAAA,EACJ,IAAA,EAAM;AACR","file":"chunk-J43LSYQO.js","sourcesContent":["/**\n * The media corner scale: `Image`, `AspectRatio` and `Figure` take the same\n * `radius` values and default to `xs`, so a photo, the frame around a video\n * and the figure that captions them all round alike. `none` squares them,\n * for media that sits flush against a card's edge.\n */\nexport const MEDIA_RADIUS = {\n none: \"rounded-none\",\n xs: \"rounded-xs\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n} as const\n\nexport type MediaRadius = keyof typeof MEDIA_RADIUS\n"]}
@@ -1,5 +1,5 @@
1
- import { SegmentGroup } from './chunk-HCYULRWT.js';
2
- import { NumberInput } from './chunk-GCGX4FEF.js';
1
+ import { SegmentGroup } from './chunk-2KN3MI7I.js';
2
+ import { NumberInput } from './chunk-6KER77RS.js';
3
3
  import { cn } from './chunk-QP4I37PA.js';
4
4
  import { useLocaleContext } from '@ark-ui/react/locale';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -15,11 +15,25 @@ var resolveHourCycle = ({
15
15
  return Intl.DateTimeFormat(locale, { hour: "numeric" }).resolvedOptions().hourCycle;
16
16
  };
17
17
  var is12Hour = (cycle) => cycle === "h11" || cycle === "h12";
18
- var to12Hour = (hour24) => ({
19
- hour: hour24 % 12 || 12,
20
- period: hour24 < 12 ? "AM" : "PM"
21
- });
22
- var to24Hour = (hour12, period) => period === "PM" ? hour12 % 12 + 12 : hour12 % 12;
18
+ var HOUR_RANGES = {
19
+ h11: { min: 0, max: 11 },
20
+ h12: { min: 1, max: 12 },
21
+ h23: { min: 0, max: 23 },
22
+ h24: { min: 1, max: 24 }
23
+ };
24
+ var toDisplayHour = (hour24, cycle) => {
25
+ const twelveHour = is12Hour(cycle);
26
+ const hour = twelveHour ? hour24 % 12 : hour24;
27
+ return {
28
+ hour: hour === 0 && HOUR_RANGES[cycle].min === 1 ? HOUR_RANGES[cycle].max : hour,
29
+ period: twelveHour ? hour24 < 12 ? "AM" : "PM" : null
30
+ };
31
+ };
32
+ var fromDisplayHour = (hour, period, cycle) => {
33
+ const offset = is12Hour(cycle) && period === "PM" ? 12 : 0;
34
+ if (hour === null) return offset;
35
+ return is12Hour(cycle) ? hour % 12 + offset : hour % 24;
36
+ };
23
37
  var dayPeriodLabels = (locale) => {
24
38
  const dayPeriod = (hour) => new Intl.DateTimeFormat(locale, { hour: "numeric", hour12: true }).formatToParts(new Date(2e3, 0, 1, hour)).find((part) => part.type === "dayPeriod")?.value ?? (hour < 12 ? "AM" : "PM");
25
39
  return { AM: dayPeriod(9), PM: dayPeriod(21) };
@@ -29,13 +43,20 @@ var timeUnitLabels = (locale) => {
29
43
  const unit = (u) => new Intl.NumberFormat(locale, { style: "unit", unit: u, unitDisplay: "narrow" }).formatToParts(1).find((part) => part.type === "unit")?.value ?? UNIT_FALLBACK[u];
30
44
  return { hour: unit("hour"), minute: unit("minute"), second: unit("second") };
31
45
  };
46
+ var TIME_ROW_DEFAULT_TRANSLATIONS = {
47
+ time: "Time",
48
+ hour: "Hour",
49
+ minute: "Minute",
50
+ second: "Second",
51
+ period: "Period"
52
+ };
32
53
  var TIME_FIELD_BASIS_PX = { xs: 64, sm: 72, md: 78, lg: 86, xl: 100 };
33
54
  var timeFieldBasis = {
34
- xs: `basis-[${TIME_FIELD_BASIS_PX.xs}px] min-w-[${TIME_FIELD_BASIS_PX.xs}px]`,
35
- sm: `basis-[${TIME_FIELD_BASIS_PX.sm}px] min-w-[${TIME_FIELD_BASIS_PX.sm}px]`,
36
- md: `basis-[${TIME_FIELD_BASIS_PX.md}px] min-w-[${TIME_FIELD_BASIS_PX.md}px]`,
37
- lg: `basis-[${TIME_FIELD_BASIS_PX.lg}px] min-w-[${TIME_FIELD_BASIS_PX.lg}px]`,
38
- xl: `basis-[${TIME_FIELD_BASIS_PX.xl}px] min-w-[${TIME_FIELD_BASIS_PX.xl}px]`
55
+ xs: "basis-[64px] min-w-[64px]",
56
+ sm: "basis-[72px] min-w-[72px]",
57
+ md: "basis-[78px] min-w-[78px]",
58
+ lg: "basis-[86px] min-w-[86px]",
59
+ xl: "basis-[100px] min-w-[100px]"
39
60
  };
40
61
  var ROW_GAP_PX = 8;
41
62
  var PERIOD_WIDTH_PX = { xs: 60, sm: 74, md: 88, lg: 110, xl: 133 };
@@ -97,6 +118,7 @@ var TimeRow = ({
97
118
  const twelveHour = is12Hour(hourCycle);
98
119
  const units = timeUnitLabels(resolvedLocale);
99
120
  const periodLabels = twelveHour ? dayPeriodLabels(resolvedLocale) : null;
121
+ const t = { ...TIME_ROW_DEFAULT_TRANSLATIONS, ...translations };
100
122
  return (
101
123
  // `flex-wrap`: at a single narrow month under `DatePicker`, Hour/Minute/[Second] fit the
102
124
  // calendar's own width but the AM/PM toggle doesn't (see `timeRowMinWidth`'s comment) — this
@@ -110,7 +132,7 @@ var TimeRow = ({
110
132
  "div",
111
133
  {
112
134
  role: "group",
113
- "aria-label": ariaLabelledBy ? void 0 : ariaLabel ?? translations?.time ?? "Time",
135
+ "aria-label": ariaLabelledBy ? void 0 : ariaLabel ?? t.time,
114
136
  "aria-labelledby": ariaLabelledBy,
115
137
  "aria-describedby": ariaDescribedBy,
116
138
  className: cn("flex flex-wrap items-end gap-2", className),
@@ -121,12 +143,12 @@ var TimeRow = ({
121
143
  {
122
144
  ref,
123
145
  onBlur,
124
- label: translations?.hour ?? "Hour",
146
+ label: t.hour,
125
147
  placeholder,
126
148
  value: hour,
127
149
  onChange: onHourChange,
128
- min: twelveHour ? 1 : 0,
129
- max: twelveHour ? 12 : 23,
150
+ min: HOUR_RANGES[hourCycle].min,
151
+ max: HOUR_RANGES[hourCycle].max,
130
152
  step: 1,
131
153
  wrap: true,
132
154
  formatOptions: { minimumIntegerDigits: 2 },
@@ -135,7 +157,7 @@ var TimeRow = ({
135
157
  disabled,
136
158
  readOnly,
137
159
  invalid,
138
- translations,
160
+ translations: t,
139
161
  suffix: units.hour,
140
162
  className: classNames?.hour,
141
163
  classNames: {
@@ -148,7 +170,7 @@ var TimeRow = ({
148
170
  /* @__PURE__ */ jsx(
149
171
  NumberInput,
150
172
  {
151
- label: translations?.minute ?? "Minute",
173
+ label: t.minute,
152
174
  placeholder,
153
175
  value: minute,
154
176
  onChange: onMinuteChange,
@@ -162,7 +184,7 @@ var TimeRow = ({
162
184
  disabled,
163
185
  readOnly,
164
186
  invalid,
165
- translations,
187
+ translations: t,
166
188
  suffix: units.minute,
167
189
  className: classNames?.minute,
168
190
  classNames: {
@@ -175,7 +197,7 @@ var TimeRow = ({
175
197
  withSeconds && /* @__PURE__ */ jsx(
176
198
  NumberInput,
177
199
  {
178
- label: translations?.second ?? "Second",
200
+ label: t.second,
179
201
  placeholder,
180
202
  value: second ?? null,
181
203
  onChange: onSecondChange,
@@ -189,7 +211,7 @@ var TimeRow = ({
189
211
  disabled,
190
212
  readOnly,
191
213
  invalid,
192
- translations,
214
+ translations: t,
193
215
  suffix: units.second,
194
216
  className: classNames?.second,
195
217
  classNames: {
@@ -206,7 +228,7 @@ var TimeRow = ({
206
228
  { value: "AM", label: periodLabels.AM },
207
229
  { value: "PM", label: periodLabels.PM }
208
230
  ],
209
- label: translations?.period ?? "Period",
231
+ label: t.period,
210
232
  value: period,
211
233
  onChange: (value) => onPeriodChange(value),
212
234
  size,
@@ -223,6 +245,6 @@ var TimeRow = ({
223
245
  );
224
246
  };
225
247
 
226
- export { TimeRow, dayPeriodLabels, is12Hour, resolveHourCycle, timeRowMinWidth, to12Hour, to24Hour };
227
- //# sourceMappingURL=chunk-Z43YWH4R.js.map
228
- //# sourceMappingURL=chunk-Z43YWH4R.js.map
248
+ export { TimeRow, dayPeriodLabels, fromDisplayHour, is12Hour, resolveHourCycle, timeRowMinWidth, toDisplayHour };
249
+ //# sourceMappingURL=chunk-JL4QMM46.js.map
250
+ //# sourceMappingURL=chunk-JL4QMM46.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/time-input/hour-cycle.ts","../src/components/time-input/time-row.tsx"],"names":[],"mappings":";;;;;;;AAQO,IAAM,mBAAmB,CAAC;AAAA,EAC/B,MAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAIiB;AACf,EAAA,IAAI,WAAW,OAAO,SAAA;AACtB,EAAA,IAAI,MAAA,KAAW,MAAA,EA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,EAAM,KAAA,EAAO,aAAa,EAAA;AAAG,eACxC;AAAA,cACA,OAAO,CAAA,CAAE,MAAA;AAAA,cACT,KAAA,EAAO,MAAA;AAAA,cACP,QAAA,EAAU,CAAC,KAAA,KAAU,cAAA,CAAe,KAAoB,CAAA;AAAA,cAGxD,IAAA;AAAA,cACA,QAAA;AAAA,cACA,QAAA;AAAA,cACA,OAAA;AAAA,cACA,WAAW,UAAA,EAAY,MAAA;AAAA,cAOvB,UAAA,EAAY,EAAE,KAAA,EAAO,iBAAA,EAAmB,OAAO,SAAA;AAAU;AAAA;AAC3D;AAAA;AAAA;AAEJ;AAEJ","file":"chunk-JL4QMM46.js","sourcesContent":["export type HourCycle = \"h11\" | \"h12\" | \"h23\" | \"h24\"\n\n/**\n * Resolve 12h vs 24h display (Req #6): an explicit `hourCycle` wins, then\n * `format`, else the locale's own convention via `Intl.DateTimeFormat`. Shared\n * by `TimeInput` and `DatePicker`'s embedded time panel so both pick the same\n * cycle for the same locale.\n */\nexport const resolveHourCycle = ({\n locale,\n format,\n hourCycle,\n}: {\n locale: string\n format?: 12 | 24\n hourCycle?: HourCycle\n}): HourCycle => {\n if (hourCycle) return hourCycle\n if (format !== undefined) return format === 12 ? \"h12\" : \"h23\"\n return Intl.DateTimeFormat(locale, { hour: \"numeric\" }).resolvedOptions().hourCycle as HourCycle\n}\n\n/** Whether a resolved cycle displays 12 hours + AM/PM (`h11`/`h12`) rather than all 24. */\nexport const is12Hour = (cycle: HourCycle): boolean => cycle === \"h11\" || cycle === \"h12\"\n\n/** The hours each cycle displays: `h11` 0–11, `h12` 1–12, `h23` 0–23, `h24` 1–24. In the two\n * cycles that start at 1, midnight (and, for `h12`, noon) reads as the top of the range. */\nexport const HOUR_RANGES: Record<HourCycle, { min: number; max: number }> = {\n h11: { min: 0, max: 11 },\n h12: { min: 1, max: 12 },\n h23: { min: 0, max: 23 },\n h24: { min: 1, max: 24 },\n}\n\n/** Convert a stored 24h hour (`0`–`23`) to the hour `cycle` displays, plus its period in the\n * 12-hour cycles (`null` otherwise) — e.g. midnight is `12` AM in `h12`, `0` AM in `h11`, `0` in\n * `h23` and `24` in `h24`. */\nexport const toDisplayHour = (\n hour24: number,\n cycle: HourCycle,\n): { hour: number; period: \"AM\" | \"PM\" | null } => {\n const twelveHour = is12Hour(cycle)\n const hour = twelveHour ? hour24 % 12 : hour24\n return {\n hour: hour === 0 && HOUR_RANGES[cycle].min === 1 ? HOUR_RANGES[cycle].max : hour,\n period: twelveHour ? (hour24 < 12 ? \"AM\" : \"PM\") : null,\n }\n}\n\n/** The inverse of `toDisplayHour`: a displayed hour (+ period in the 12-hour cycles) back to a\n * stored 24h hour. A missing hour reads as the start of its half of the day — midnight, or noon\n * once PM is picked — and a missing period as AM. */\nexport const fromDisplayHour = (\n hour: number | null,\n period: \"AM\" | \"PM\" | null,\n cycle: HourCycle,\n): number => {\n const offset = is12Hour(cycle) && period === \"PM\" ? 12 : 0\n if (hour === null) return offset\n return is12Hour(cycle) ? (hour % 12) + offset : hour % 24\n}\n\n/** Locale-correct AM/PM display strings (e.g. \"AM\"/\"PM\" en-US, \"午前\"/\"午後\" ja-JP), read via\n * `Intl.DateTimeFormat`'s own `dayPeriod` part rather than a hardcoded English literal. Keyed by\n * the same `\"AM\" | \"PM\"` domain value `toDisplayHour`/`fromDisplayHour` use throughout, so this only ever\n * changes what's *displayed*, never what's stored/serialized. */\nexport const dayPeriodLabels = (locale: string): Record<\"AM\" | \"PM\", string> => {\n const dayPeriod = (hour: number) =>\n new Intl.DateTimeFormat(locale, { hour: \"numeric\", hour12: true })\n .formatToParts(new Date(2000, 0, 1, hour))\n .find((part) => part.type === \"dayPeriod\")?.value ?? (hour < 12 ? \"AM\" : \"PM\")\n return { AM: dayPeriod(9), PM: dayPeriod(21) }\n}\n\n/** Locale-correct narrow unit abbreviations for the Hour/Minute/Second suffix (e.g. \"h\"/\"m\"/\"s\"\n * en-US, \"h\"/\"min\"/\"s\" fr-FR), read via `Intl.NumberFormat`'s own unit formatting rather than\n * hardcoded English literals. */\nconst UNIT_FALLBACK = { hour: \"h\", minute: \"m\", second: \"s\" } as const\n\nexport const timeUnitLabels = (\n locale: string,\n): { hour: string; minute: string; second: string } => {\n const unit = (u: \"hour\" | \"minute\" | \"second\") =>\n new Intl.NumberFormat(locale, { style: \"unit\", unit: u, unitDisplay: \"narrow\" })\n .formatToParts(1)\n .find((part) => part.type === \"unit\")?.value ?? UNIT_FALLBACK[u]\n return { hour: unit(\"hour\"), minute: unit(\"minute\"), second: unit(\"second\") }\n}\n","\"use client\"\n\nimport { useLocaleContext } from \"@ark-ui/react/locale\"\nimport type { FocusEvent, KeyboardEvent, Ref } from \"react\"\nimport { cn } from \"../../lib/cn\"\nimport type { Size } from \"../../lib/sizes\"\nimport type { InputVariant } from \"../input/input\"\nimport { NumberInput, type NumberInputTranslations } from \"../number-input/number-input\"\nimport { SegmentGroup } from \"../segment-group/segment-group\"\nimport {\n dayPeriodLabels,\n HOUR_RANGES,\n type HourCycle,\n is12Hour,\n timeUnitLabels,\n} from \"./hour-cycle\"\n\n/**\n * The HOUR/MINUTE (+ SECOND) + AM/PM row — the piece `TimeInput` wraps with\n * state, and `DatePicker`'s embedded time panel wraps with `api.setTime()`\n * (one implementation, two call sites). Operates entirely in *display* units\n * (the cycle's own hours — 0–11, 1–12, 0–23 or 1–24) — the always-24h stored `hour` conversion\n * happens at the caller's boundary, not here.\n */\n\ntype TimeRowClassNames = {\n hour?: string\n minute?: string\n second?: string\n period?: string\n}\n\n/** Overrides the sr-only accessible names for Hour/Minute/Second/Period — English by default.\n * Arbitrary microcopy with no locale-derivation path (unlike AM/PM and the unit suffixes,\n * which read from `Intl` instead). `incrementLabel`/`decrementLabel` are `NumberInput`'s own\n * keys, forwarded to each field's steppers (defaults `\"Increment\"` / `\"Decrement\"`). */\nexport type TimeRowTranslations = Pick<\n NumberInputTranslations,\n \"incrementLabel\" | \"decrementLabel\"\n> & {\n /** The whole row's group name when nothing visible labels it. Default `\"Time\"`. */\n time?: string\n hour?: string\n minute?: string\n second?: string\n period?: string\n}\n\n/** The row's English accessible names, merged once under `translations`. `NumberInput` keeps\n * its own stepper defaults. */\nconst TIME_ROW_DEFAULT_TRANSLATIONS = {\n time: \"Time\",\n hour: \"Hour\",\n minute: \"Minute\",\n second: \"Second\",\n period: \"Period\",\n} as const satisfies TimeRowTranslations\n\n/** Starting *and floor* size for the Hour/Minute/Second fields, per `size` — `flex-1`'s basis so\n * each field still grows to fill the row, plus an equal `min-width` so it never shrinks back\n * below that. Without the `min-width`, the field's inner `<input>` has `min-w-0` (needed so the\n * value can shrink instead of forcing the row to overflow when it's genuinely too narrow), which\n * otherwise lets `flex-1` starve it arbitrarily close to zero — that's exactly how the `<input>`\n * was measured shrinking to ~11px in a too-narrow `DatePicker` popover column, clipping the\n * 2-digit value. A too-narrow row now genuinely overflows (or wraps, if a wrapping ancestor\n * provides one) instead of silently clipping — the honest failure mode; `DatePicker`'s own\n * column-width fix (`timeRowMinWidth` below) is what actually prevents hitting it in practice.\n *\n * Calibrated against a real measurement, minus `shellGap`'s own per-size pixel value (6/6/8/10/12px\n * for xs/sm/md/lg/xl) — `NumberInput`'s value↔suffix pair no longer carries that gap (glued\n * together in their own nested row, see its own comment), so each field's true minimum content\n * width shrank by exactly that much. */\nexport const TIME_FIELD_BASIS_PX: Record<Size, number> = { xs: 64, sm: 72, md: 78, lg: 86, xl: 100 }\n/** The same widths as Tailwind classes, written out in full: Tailwind finds classes by scanning\n * source text (a consumer's build scans the shipped `dist`), so a class assembled from a template\n * literal is never generated. `time-row.test.ts` keeps these in step with `TIME_FIELD_BASIS_PX`. */\nexport const timeFieldBasis: Record<Size, string> = {\n xs: \"basis-[64px] min-w-[64px]\",\n sm: \"basis-[72px] min-w-[72px]\",\n md: \"basis-[78px] min-w-[78px]\",\n lg: \"basis-[86px] min-w-[86px]\",\n xl: \"basis-[100px] min-w-[100px]\",\n}\n\n/** The row's own gap between Hour/Minute/Second/Period (`gap-2` below) — flat across `size`,\n * unlike each field's *internal* value↔suffix↔steppers gap (`shellGap`, size-dependent). */\nconst ROW_GAP_PX = 8\n\n/** The AM/PM toggle's own natural (unstretched — it's `shrink-0`, not `flex-1`) rendered width\n * per `size`, measured directly rather than estimated. It wraps onto its own line below\n * Hour/Minute (the row's `flex-wrap` below) instead of forcing the whole row wider, so this\n * only matters for `timeRowMinWidth` as a floor *in case* it's ever wider than Hour+Minute\n * themselves — not as an unconditional addition to their combined width (see below). */\nconst PERIOD_WIDTH_PX: Record<Size, number> = { xs: 60, sm: 74, md: 88, lg: 110, xl: 133 }\n\n/** The row's own minimum rendered width for a given configuration. `DatePicker` uses this (see\n * its own `calendarColumnWidth` comment) to keep its popover column at least as wide as the\n * embedded time row needs, instead of only ever sizing off the calendar grid — otherwise the\n * row's `flex-1` + `min-w-0` fields silently shrink below their content size to fit.\n *\n * This is deliberately just Hour/Minute/[Second] at their basis plus the gaps *between* them —\n * not the AM/PM toggle's width added on top. The toggle wraps onto its own line (the row's\n * `flex-wrap` below) rather than forcing the row wider, so at a single narrow month it drops\n * below Hour/Minute instead of pushing the popover past the calendar's own width — the row only\n * needs to be as wide as the toggle itself in the (currently never hit — Hour+Minute together\n * are wider than the toggle at every size) case where that's the larger requirement. */\nexport const timeRowMinWidth = (\n size: Size,\n hourCycle: HourCycle,\n withSeconds: boolean | undefined,\n): number => {\n const fieldCount = 2 + (withSeconds ? 1 : 0)\n const fieldsWidth = fieldCount * TIME_FIELD_BASIS_PX[size] + (fieldCount - 1) * ROW_GAP_PX\n return is12Hour(hourCycle) ? Math.max(fieldsWidth, PERIOD_WIDTH_PX[size]) : fieldsWidth\n}\n\n/** ArrowLeft/ArrowRight at the edge of a field's text moves to the neighbouring field — caret at\n * its far side, so the motion reads as one continuous caret across the row — and from the last\n * number field \"next\" lands on the AM/PM toggle's checked (or first) radio. Inside the toggle the\n * arrows stay the radio group's own (switching AM/PM); Shift+Tab leaves it. `dir=\"rtl\"` mirrors\n * the keys, since the row's visual order is mirrored too. Anything else — a modifier, a\n * selection, a caret mid-text — keeps the native caret movement. */\nconst moveAcrossFields = (event: KeyboardEvent<HTMLDivElement>, dir: \"ltr\" | \"rtl\") => {\n if (event.key !== \"ArrowLeft\" && event.key !== \"ArrowRight\") return\n if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return\n const input = event.target\n if (!(input instanceof HTMLInputElement) || input.type !== \"text\") return\n const { selectionStart, selectionEnd, value } = input\n if (selectionStart !== selectionEnd) return\n const forward = (event.key === \"ArrowRight\") !== (dir === \"rtl\")\n if (forward ? selectionEnd !== value.length : selectionStart !== 0) return\n\n const row = event.currentTarget\n const fields = [...row.querySelectorAll<HTMLInputElement>('input[type=\"text\"]:not(:disabled)')]\n const next =\n fields[fields.indexOf(input) + (forward ? 1 : -1)] ??\n (forward\n ? (row.querySelector<HTMLInputElement>('input[type=\"radio\"]:checked:not(:disabled)') ??\n row.querySelector<HTMLInputElement>('input[type=\"radio\"]:not(:disabled)'))\n : null)\n if (!next) return\n event.preventDefault()\n next.focus()\n if (next.type === \"text\") {\n const caret = forward ? 0 : next.value.length\n next.setSelectionRange(caret, caret)\n }\n}\n\nexport type TimeRowProps = {\n hour: number | null\n minute: number | null\n second?: number | null\n onHourChange: (hour: number | null) => void\n onMinuteChange: (minute: number | null) => void\n onSecondChange?: (second: number | null) => void\n period: \"AM\" | \"PM\" | null\n onPeriodChange: (period: \"AM\" | \"PM\") => void\n hourCycle: HourCycle\n minuteStep?: number\n withSeconds?: boolean\n /** Placeholder shown in each empty Hour/Minute/Second field. Default `\"--\"`. */\n placeholder?: string\n /** Resolves the locale-correct AM/PM labels + Hour/Minute/Second unit suffixes via `Intl`.\n * Falls back to `useLocaleContext()` when omitted. */\n locale?: string\n /** Overrides the sr-only Hour/Minute/Second/Period accessible names. English by default. */\n translations?: TimeRowTranslations\n size?: Size\n variant?: InputVariant\n disabled?: boolean\n readOnly?: boolean\n invalid?: boolean\n /** Lands on the hour field's `<input>` for focus-on-error. */\n ref?: Ref<HTMLInputElement>\n /** Forwarded to the hour field's `<input>`; drives touched/blurred validation. */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void\n /** Names the row's `role=\"group\"` directly when no visible label points at it. Defaults to\n * `translations.time` (`\"Time\"`), so the group is never anonymous. */\n \"aria-label\"?: string\n /** Names the row's `role=\"group\"` from a visible label, e.g. `TimeInput`'s field label or\n * `DatePicker`'s \"Start time\" / \"End time\". Without a name a screen reader enters the group\n * hearing only \"Hour\". */\n \"aria-labelledby\"?: string\n /** Helper / error text read after the group's name. */\n \"aria-describedby\"?: string\n className?: string\n classNames?: TimeRowClassNames\n}\n\nexport const TimeRow = ({\n hour,\n minute,\n second,\n onHourChange,\n onMinuteChange,\n onSecondChange,\n period,\n onPeriodChange,\n hourCycle,\n minuteStep = 1,\n withSeconds,\n placeholder = \"--\",\n locale,\n translations,\n size = \"md\",\n variant = \"default\",\n disabled,\n readOnly,\n invalid,\n ref,\n onBlur,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n className,\n classNames,\n}: TimeRowProps) => {\n const { locale: contextLocale, dir } = useLocaleContext()\n const resolvedLocale = locale ?? contextLocale\n const twelveHour = is12Hour(hourCycle)\n const units = timeUnitLabels(resolvedLocale)\n const periodLabels = twelveHour ? dayPeriodLabels(resolvedLocale) : null\n const t = { ...TIME_ROW_DEFAULT_TRANSLATIONS, ...translations }\n\n return (\n // `flex-wrap`: at a single narrow month under `DatePicker`, Hour/Minute/[Second] fit the\n // calendar's own width but the AM/PM toggle doesn't (see `timeRowMinWidth`'s comment) — this\n // drops it to its own line there instead of forcing the whole popover wider than the\n // calendar to fit it on the same line. No visual change wherever there's already enough\n // width (every other context) — wrapping only kicks in once it's genuinely too narrow.\n // `role=\"group\"`: Hour/Minute/[Second]/Period are the parts of one time value — and the\n // row owns keyboard behaviour across them (`moveAcrossFields`), which a bare `<div>` can't.\n // biome-ignore lint/a11y/useSemanticElements: a `<fieldset>` brings UA border/padding/`min-inline-size` that fight this wrapping flex row, for the same `group` semantics\n <div\n role=\"group\"\n aria-label={ariaLabelledBy ? undefined : (ariaLabel ?? t.time)}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n className={cn(\"flex flex-wrap items-end gap-2\", className)}\n onKeyDown={(event) => moveAcrossFields(event, dir)}\n >\n <NumberInput\n ref={ref}\n onBlur={onBlur}\n label={t.hour}\n placeholder={placeholder}\n value={hour}\n onChange={onHourChange}\n min={HOUR_RANGES[hourCycle].min}\n max={HOUR_RANGES[hourCycle].max}\n step={1}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n // \"Hour\" stays the accessible name (sr-only keeps it in the a11y tree,\n // just visually hidden) — the unit suffix is a decorative stand-in,\n // right next to the value once it's right-aligned (`text-end`).\n translations={t}\n suffix={units.hour}\n className={classNames?.hour}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n <NumberInput\n label={t.minute}\n placeholder={placeholder}\n value={minute}\n onChange={onMinuteChange}\n min={0}\n max={59}\n step={minuteStep}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n translations={t}\n suffix={units.minute}\n className={classNames?.minute}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n {withSeconds && (\n <NumberInput\n label={t.second}\n placeholder={placeholder}\n value={second ?? null}\n onChange={onSecondChange}\n min={0}\n max={59}\n step={1}\n wrap\n formatOptions={{ minimumIntegerDigits: 2 }}\n size={size}\n variant={variant}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n translations={t}\n suffix={units.second}\n className={classNames?.second}\n classNames={{\n field: cn(\"flex-1\", timeFieldBasis[size]),\n label: \"sr-only\",\n input: \"text-end\",\n }}\n />\n )}\n {twelveHour && periodLabels && (\n <SegmentGroup\n data={[\n { value: \"AM\", label: periodLabels.AM },\n { value: \"PM\", label: periodLabels.PM },\n ]}\n label={t.period}\n value={period}\n onChange={(value) => onPeriodChange(value as \"AM\" | \"PM\")}\n // `SegmentGroup`'s sizes match `NumberInput`'s box height exactly, so\n // the AM/PM toggle sits flush with the Hour/Minute fields.\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n className={classNames?.period}\n // Unlike Hour/Minute/Second, the AM/PM toggle has a fixed, small set of labels — it\n // doesn't need (or look right) stretching to share the row's leftover width. `w-auto`\n // cancels the Field wrapper's own default `w-full` (which would otherwise still set its\n // flex-basis to the full row width even without `flex-1`); `shrink-0` keeps it stable.\n // \"Period\" keeps the accessible name (sr-only) but no visible label or suffix — the\n // segment control itself already shows \"AM\"/\"PM\", self-descriptive.\n classNames={{ field: \"w-auto shrink-0\", label: \"sr-only\" }}\n />\n )}\n </div>\n )\n}\n"]}