@fragiola/primitives-react 0.0.0-stage → 0.0.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 (578) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -2
  3. package/dist/accordion--E-5hjWo.js +210 -0
  4. package/dist/accordion--E-5hjWo.js.map +1 -0
  5. package/dist/accordion.d.ts +4 -0
  6. package/dist/accordion.js +1 -0
  7. package/dist/alert-dialog-7FIAj98B.js +37 -0
  8. package/dist/alert-dialog-7FIAj98B.js.map +1 -0
  9. package/dist/alert-dialog.d.ts +9 -0
  10. package/dist/alert-dialog.js +1 -0
  11. package/dist/aspect-ratio-CUADsevg.js +19 -0
  12. package/dist/aspect-ratio-CUADsevg.js.map +1 -0
  13. package/dist/aspect-ratio.d.ts +3 -0
  14. package/dist/aspect-ratio.js +1 -0
  15. package/dist/async-list-7ljWFMgA.js +35 -0
  16. package/dist/async-list-7ljWFMgA.js.map +1 -0
  17. package/dist/async-list.d.ts +2 -0
  18. package/dist/async-list.js +1 -0
  19. package/dist/autocomplete-virtual-BE8dDDgU.js +56 -0
  20. package/dist/autocomplete-virtual-BE8dDDgU.js.map +1 -0
  21. package/dist/autocomplete-virtual.d.ts +4 -0
  22. package/dist/autocomplete-virtual.js +3 -0
  23. package/dist/autocomplete.d.ts +9 -0
  24. package/dist/autocomplete.js +1 -0
  25. package/dist/avatar-CABjoLs9.js +101 -0
  26. package/dist/avatar-CABjoLs9.js.map +1 -0
  27. package/dist/avatar.d.ts +3 -0
  28. package/dist/avatar.js +1 -0
  29. package/dist/breadcrumbs-nG0Rq3kX.js +69 -0
  30. package/dist/breadcrumbs-nG0Rq3kX.js.map +1 -0
  31. package/dist/breadcrumbs.d.ts +3 -0
  32. package/dist/breadcrumbs.js +1 -0
  33. package/dist/button-B6h8UkhR.js +30 -0
  34. package/dist/button-B6h8UkhR.js.map +1 -0
  35. package/dist/button-props-DWfy1ZSo.js +69 -0
  36. package/dist/button-props-DWfy1ZSo.js.map +1 -0
  37. package/dist/button.d.ts +3 -0
  38. package/dist/button.js +1 -0
  39. package/dist/calendar-preset-Cs-hy-_0.js +70 -0
  40. package/dist/calendar-preset-Cs-hy-_0.js.map +1 -0
  41. package/dist/calendar-preset.d.ts +4 -0
  42. package/dist/calendar-preset.js +3 -0
  43. package/dist/calendar-root-base-CIkiSebb.js +515 -0
  44. package/dist/calendar-root-base-CIkiSebb.js.map +1 -0
  45. package/dist/calendar-row-BO5kyOgq.d.ts +84 -0
  46. package/dist/calendar-value-DCOjO7og.d.ts +23 -0
  47. package/dist/calendar-view-DT9i5Xg_.js +157 -0
  48. package/dist/calendar-view-DT9i5Xg_.js.map +1 -0
  49. package/dist/calendar-view.d.ts +6 -0
  50. package/dist/calendar-view.js +4 -0
  51. package/dist/calendar.d.ts +7 -0
  52. package/dist/calendar.js +1 -0
  53. package/dist/carousel-ClQsQ135.js +436 -0
  54. package/dist/carousel-ClQsQ135.js.map +1 -0
  55. package/dist/carousel.d.ts +4 -0
  56. package/dist/carousel.js +1 -0
  57. package/dist/cascade-select-DZlpKUok.js +582 -0
  58. package/dist/cascade-select-DZlpKUok.js.map +1 -0
  59. package/dist/cascade-select.d.ts +7 -0
  60. package/dist/cascade-select.js +1 -0
  61. package/dist/change-details-CPSkPCNw.d.ts +32 -0
  62. package/dist/checkbox-CbmkKNfv.js +165 -0
  63. package/dist/checkbox-CbmkKNfv.js.map +1 -0
  64. package/dist/checkbox-group-_UrFCUgQ.js +99 -0
  65. package/dist/checkbox-group-_UrFCUgQ.js.map +1 -0
  66. package/dist/checkbox-group-context-CoGqgxBM.js +6 -0
  67. package/dist/checkbox-group-context-CoGqgxBM.js.map +1 -0
  68. package/dist/checkbox-group.d.ts +4 -0
  69. package/dist/checkbox-group.js +1 -0
  70. package/dist/checkbox.d.ts +4 -0
  71. package/dist/checkbox.js +1 -0
  72. package/dist/clipboard-CvgO1qhh.js +189 -0
  73. package/dist/clipboard-CvgO1qhh.js.map +1 -0
  74. package/dist/clipboard.d.ts +4 -0
  75. package/dist/clipboard.js +1 -0
  76. package/dist/collapsible-Dh0TUP6l.js +112 -0
  77. package/dist/collapsible-Dh0TUP6l.js.map +1 -0
  78. package/dist/collapsible.d.ts +4 -0
  79. package/dist/collapsible.js +1 -0
  80. package/dist/color-area-BGo6tZxX.js +311 -0
  81. package/dist/color-area-BGo6tZxX.js.map +1 -0
  82. package/dist/color-area.d.ts +4 -0
  83. package/dist/color-area.js +1 -0
  84. package/dist/color-field-B9QEKyQ1.js +334 -0
  85. package/dist/color-field-B9QEKyQ1.js.map +1 -0
  86. package/dist/color-field.d.ts +4 -0
  87. package/dist/color-field.js +1 -0
  88. package/dist/color-picker-BNOtqWUK.js +276 -0
  89. package/dist/color-picker-BNOtqWUK.js.map +1 -0
  90. package/dist/color-picker-binding-D9xBS_my.js +6 -0
  91. package/dist/color-picker-binding-D9xBS_my.js.map +1 -0
  92. package/dist/color-picker-popover-CV_wP6KG.js +195 -0
  93. package/dist/color-picker-popover-CV_wP6KG.js.map +1 -0
  94. package/dist/color-picker-popover.d.ts +7 -0
  95. package/dist/color-picker-popover.js +1 -0
  96. package/dist/color-picker.d.ts +4 -0
  97. package/dist/color-picker.js +1 -0
  98. package/dist/color-slider-Bw940FJr.js +357 -0
  99. package/dist/color-slider-Bw940FJr.js.map +1 -0
  100. package/dist/color-slider.d.ts +4 -0
  101. package/dist/color-slider.js +1 -0
  102. package/dist/color-swatch-C9ws0xF4.js +37 -0
  103. package/dist/color-swatch-C9ws0xF4.js.map +1 -0
  104. package/dist/color-swatch-picker-CnmTr1SY.js +286 -0
  105. package/dist/color-swatch-picker-CnmTr1SY.js.map +1 -0
  106. package/dist/color-swatch-picker.d.ts +4 -0
  107. package/dist/color-swatch-picker.js +1 -0
  108. package/dist/color-swatch.d.ts +3 -0
  109. package/dist/color-swatch.js +1 -0
  110. package/dist/color-wheel--n8w5fIJ.js +247 -0
  111. package/dist/color-wheel--n8w5fIJ.js.map +1 -0
  112. package/dist/color-wheel.d.ts +4 -0
  113. package/dist/color-wheel.js +1 -0
  114. package/dist/combobox-virtual-BI-l10BE.js +61 -0
  115. package/dist/combobox-virtual-BI-l10BE.js.map +1 -0
  116. package/dist/combobox-virtual.d.ts +4 -0
  117. package/dist/combobox-virtual.js +3 -0
  118. package/dist/combobox.d.ts +9 -0
  119. package/dist/combobox.js +1 -0
  120. package/dist/command-virtual-CxNLxsih.js +56 -0
  121. package/dist/command-virtual-CxNLxsih.js.map +1 -0
  122. package/dist/command-virtual.d.ts +4 -0
  123. package/dist/command-virtual.js +3 -0
  124. package/dist/command.d.ts +5 -0
  125. package/dist/command.js +1 -0
  126. package/dist/context-menu-DGj2L-Sv.js +131 -0
  127. package/dist/context-menu-DGj2L-Sv.js.map +1 -0
  128. package/dist/context-menu.d.ts +8 -0
  129. package/dist/context-menu.js +1 -0
  130. package/dist/date-field-C1nhThPd.js +33 -0
  131. package/dist/date-field-C1nhThPd.js.map +1 -0
  132. package/dist/date-field-root-CzSo5iKL.d.ts +26 -0
  133. package/dist/date-field-root-base-B-050SUC.js +185 -0
  134. package/dist/date-field-root-base-B-050SUC.js.map +1 -0
  135. package/dist/date-field-segment-BoS-ohDh.d.ts +67 -0
  136. package/dist/date-field.d.ts +6 -0
  137. package/dist/date-field.js +1 -0
  138. package/dist/date-picker-input-BCaKff7A.js +29 -0
  139. package/dist/date-picker-input-BCaKff7A.js.map +1 -0
  140. package/dist/date-picker-input-root-base-Cc3mE-NR.d.ts +17 -0
  141. package/dist/date-picker-input-root-base-D4VaBnpf.js +361 -0
  142. package/dist/date-picker-input-root-base-D4VaBnpf.js.map +1 -0
  143. package/dist/date-picker-input.d.ts +7 -0
  144. package/dist/date-picker-input.js +3 -0
  145. package/dist/date-picker-trigger-BKPvZbRg.js +304 -0
  146. package/dist/date-picker-trigger-BKPvZbRg.js.map +1 -0
  147. package/dist/date-picker-trigger-DHsAhBf2.d.ts +51 -0
  148. package/dist/date-picker.d.ts +11 -0
  149. package/dist/date-picker.js +1 -0
  150. package/dist/date-range-field-C-ID01oa.js +34 -0
  151. package/dist/date-range-field-C-ID01oa.js.map +1 -0
  152. package/dist/date-range-field-input-BkLpldTx.js +33 -0
  153. package/dist/date-range-field-input-BkLpldTx.js.map +1 -0
  154. package/dist/date-range-field-input-BwCNo15l.d.ts +13 -0
  155. package/dist/date-range-field-root-CmZ3c7xn.d.ts +31 -0
  156. package/dist/date-range-field-root-base-DWH3nqmz.d.ts +23 -0
  157. package/dist/date-range-field-root-base-z8S5aSCs.js +261 -0
  158. package/dist/date-range-field-root-base-z8S5aSCs.js.map +1 -0
  159. package/dist/date-range-field.d.ts +9 -0
  160. package/dist/date-range-field.js +1 -0
  161. package/dist/date-range-picker-input-DlIdTD-J.js +30 -0
  162. package/dist/date-range-picker-input-DlIdTD-J.js.map +1 -0
  163. package/dist/date-range-picker-input.d.ts +10 -0
  164. package/dist/date-range-picker-input.js +3 -0
  165. package/dist/date-range-picker.d.ts +11 -0
  166. package/dist/date-range-picker.js +1 -0
  167. package/dist/dialog-DDE15qBB.js +33 -0
  168. package/dist/dialog-DDE15qBB.js.map +1 -0
  169. package/dist/dialog-root-base-DDMrqDC9.js +328 -0
  170. package/dist/dialog-root-base-DDMrqDC9.js.map +1 -0
  171. package/dist/dialog-title-BitK2i0A.d.ts +78 -0
  172. package/dist/dialog.d.ts +9 -0
  173. package/dist/dialog.js +1 -0
  174. package/dist/direction-BfW1BOg1.js +22 -0
  175. package/dist/direction-BfW1BOg1.js.map +1 -0
  176. package/dist/direction-context-CiRdNJmu.js +11 -0
  177. package/dist/direction-context-CiRdNJmu.js.map +1 -0
  178. package/dist/direction.d.ts +2 -0
  179. package/dist/direction.js +1 -0
  180. package/dist/drawer-CaPOhMl-.js +302 -0
  181. package/dist/drawer-CaPOhMl-.js.map +1 -0
  182. package/dist/drawer.d.ts +9 -0
  183. package/dist/drawer.js +1 -0
  184. package/dist/drop-zone-q0-5u2cs.js +86 -0
  185. package/dist/drop-zone-q0-5u2cs.js.map +1 -0
  186. package/dist/drop-zone.d.ts +4 -0
  187. package/dist/drop-zone.js +1 -0
  188. package/dist/editable-vU6vYZOD.js +403 -0
  189. package/dist/editable-vU6vYZOD.js.map +1 -0
  190. package/dist/editable.d.ts +4 -0
  191. package/dist/editable.js +1 -0
  192. package/dist/field-DibhXWF6.js +308 -0
  193. package/dist/field-DibhXWF6.js.map +1 -0
  194. package/dist/field.d.ts +4 -0
  195. package/dist/field.js +1 -0
  196. package/dist/fieldset-Cz80P2jc.js +53 -0
  197. package/dist/fieldset-Cz80P2jc.js.map +1 -0
  198. package/dist/fieldset-context-CeaxEBvi.js +6 -0
  199. package/dist/fieldset-context-CeaxEBvi.js.map +1 -0
  200. package/dist/fieldset.d.ts +3 -0
  201. package/dist/fieldset.js +1 -0
  202. package/dist/file-upload-BIRibICU.js +513 -0
  203. package/dist/file-upload-BIRibICU.js.map +1 -0
  204. package/dist/file-upload.d.ts +4 -0
  205. package/dist/file-upload.js +1 -0
  206. package/dist/form-DNAaFPpL.js +87 -0
  207. package/dist/form-DNAaFPpL.js.map +1 -0
  208. package/dist/form-context-BW-nK6kl.js +6 -0
  209. package/dist/form-context-BW-nK6kl.js.map +1 -0
  210. package/dist/form.d.ts +3 -0
  211. package/dist/form.js +1 -0
  212. package/dist/hover-card-CRDpA_zU.js +317 -0
  213. package/dist/hover-card-CRDpA_zU.js.map +1 -0
  214. package/dist/hover-card.d.ts +9 -0
  215. package/dist/hover-card.js +1 -0
  216. package/dist/index-0bXL0iXX.d.ts +25 -0
  217. package/dist/index-6f2s5HfF.d.ts +30 -0
  218. package/dist/index-9WYWziGt.d.ts +42 -0
  219. package/dist/index-B57uQVXT.d.ts +100 -0
  220. package/dist/index-BA629roy.d.ts +52 -0
  221. package/dist/index-BC5bS-vC.d.ts +30 -0
  222. package/dist/index-BDbTYsJR.d.ts +77 -0
  223. package/dist/index-BEaxabvv.d.ts +80 -0
  224. package/dist/index-BLRo_PJD.d.ts +58 -0
  225. package/dist/index-BMt816ZL.d.ts +51 -0
  226. package/dist/index-BQJrDd_G.d.ts +108 -0
  227. package/dist/index-BUJIeLCT.d.ts +37 -0
  228. package/dist/index-BZxd4oqB.d.ts +111 -0
  229. package/dist/index-B_JVgpGe.d.ts +13 -0
  230. package/dist/index-BdxleDV0.d.ts +104 -0
  231. package/dist/index-Be4w9GAc.d.ts +13 -0
  232. package/dist/index-Bht8ohW3.d.ts +31 -0
  233. package/dist/index-Bk1NBvxD.d.ts +75 -0
  234. package/dist/index-BmtcAsQr.d.ts +44 -0
  235. package/dist/index-BmuEv-h3.d.ts +35 -0
  236. package/dist/index-BnPLIkKG.d.ts +31 -0
  237. package/dist/index-BoJU86K5.d.ts +52 -0
  238. package/dist/index-Bq6yByLv.d.ts +50 -0
  239. package/dist/index-Bqt2th2p.d.ts +41 -0
  240. package/dist/index-BrXfSGo2.d.ts +51 -0
  241. package/dist/index-BsvcTJ_x.d.ts +17 -0
  242. package/dist/index-BxcCz-NS.d.ts +36 -0
  243. package/dist/index-C3y4g2fs.d.ts +21 -0
  244. package/dist/index-C8-b81Jh.d.ts +20 -0
  245. package/dist/index-C8KLM25T.d.ts +31 -0
  246. package/dist/index-C9TSddnB.d.ts +140 -0
  247. package/dist/index-CCnaczzE.d.ts +32 -0
  248. package/dist/index-CD6hgnl1.d.ts +86 -0
  249. package/dist/index-CEN3o4Pw.d.ts +35 -0
  250. package/dist/index-CFlhfs3y.d.ts +30 -0
  251. package/dist/index-CIQU06ga.d.ts +36 -0
  252. package/dist/index-CNUEsZ_M.d.ts +51 -0
  253. package/dist/index-CNYBtgVC.d.ts +53 -0
  254. package/dist/index-CQJHcuzo.d.ts +76 -0
  255. package/dist/index-CTw9ONha.d.ts +69 -0
  256. package/dist/index-CU9QnAha.d.ts +32 -0
  257. package/dist/index-CcwKZWPY.d.ts +92 -0
  258. package/dist/index-Cjl7RT2o.d.ts +17 -0
  259. package/dist/index-ClfKp-sZ.d.ts +21 -0
  260. package/dist/index-CqGIxPDB.d.ts +82 -0
  261. package/dist/index-CsXJJ0G8.d.ts +41 -0
  262. package/dist/index-Cyjcq7lp.d.ts +28 -0
  263. package/dist/index-CzB9dDcM.d.ts +22 -0
  264. package/dist/index-D1-zqp2Q.d.ts +44 -0
  265. package/dist/index-D59OFWyx.d.ts +53 -0
  266. package/dist/index-D9lx4wAU.d.ts +21 -0
  267. package/dist/index-DHrnPQEE.d.ts +128 -0
  268. package/dist/index-DHwyHITu.d.ts +131 -0
  269. package/dist/index-DQ68aV2P.d.ts +21 -0
  270. package/dist/index-DQAkgf9_.d.ts +14 -0
  271. package/dist/index-DRow1231.d.ts +31 -0
  272. package/dist/index-DTGZeJU7.d.ts +29 -0
  273. package/dist/index-DU7jtvI8.d.ts +24 -0
  274. package/dist/index-DVjhOpXu.d.ts +42 -0
  275. package/dist/index-DZoqbcd6.d.ts +26 -0
  276. package/dist/index-Da0eVQHO.d.ts +62 -0
  277. package/dist/index-DhNPJa6U.d.ts +31 -0
  278. package/dist/index-DnQAamhU.d.ts +27 -0
  279. package/dist/index-DoFrs7Az.d.ts +16 -0
  280. package/dist/index-DorcIjVk.d.ts +20 -0
  281. package/dist/index-Dx-yMTdt.d.ts +81 -0
  282. package/dist/index-J4LbimqY.d.ts +79 -0
  283. package/dist/index-L6Mp2njJ.d.ts +81 -0
  284. package/dist/index-OmXQjsNi.d.ts +37 -0
  285. package/dist/index-PpCPWRbt.d.ts +30 -0
  286. package/dist/index-Pq-ztBxR.d.ts +34 -0
  287. package/dist/index-Qgz-Dnsj.d.ts +73 -0
  288. package/dist/index-R3h8-VcD.d.ts +32 -0
  289. package/dist/index-WtAHbmtb.d.ts +88 -0
  290. package/dist/index-dKoYaA3K.d.ts +38 -0
  291. package/dist/index-fgqEotIa.d.ts +16 -0
  292. package/dist/index-gvpnQy8T.d.ts +87 -0
  293. package/dist/index-kY3Yo50q.d.ts +68 -0
  294. package/dist/index-ndFpL4W9.d.ts +15 -0
  295. package/dist/index-oLgwTyCz.d.ts +45 -0
  296. package/dist/index-pSrGVYre.d.ts +40 -0
  297. package/dist/index-t4CBZJDG.d.ts +65 -0
  298. package/dist/index-wC8PY0fW.d.ts +16 -0
  299. package/dist/index-wv0Lafz4.d.ts +46 -0
  300. package/dist/index-zEeZUMLc.d.ts +29 -0
  301. package/dist/index.d.ts +125 -0
  302. package/dist/index.js +104 -0
  303. package/dist/label-DN9tJMXl.js +24 -0
  304. package/dist/label-DN9tJMXl.js.map +1 -0
  305. package/dist/label.d.ts +3 -0
  306. package/dist/label.js +1 -0
  307. package/dist/link-D3xYrfPK.js +22 -0
  308. package/dist/link-D3xYrfPK.js.map +1 -0
  309. package/dist/link-props-Shu8RU_5.js +27 -0
  310. package/dist/link-props-Shu8RU_5.js.map +1 -0
  311. package/dist/link.d.ts +3 -0
  312. package/dist/link.js +1 -0
  313. package/dist/listbox-virtual-C4wz3TOa.js +281 -0
  314. package/dist/listbox-virtual-C4wz3TOa.js.map +1 -0
  315. package/dist/listbox-virtual.d.ts +6 -0
  316. package/dist/listbox-virtual.js +3 -0
  317. package/dist/listbox.d.ts +5 -0
  318. package/dist/listbox.js +1 -0
  319. package/dist/live-region-style-Xgiu9ttw.js +48 -0
  320. package/dist/live-region-style-Xgiu9ttw.js.map +1 -0
  321. package/dist/menu-bar-context-1duNlOWo.js +14 -0
  322. package/dist/menu-bar-context-1duNlOWo.js.map +1 -0
  323. package/dist/menu-oZj27rvf.js +123 -0
  324. package/dist/menu-oZj27rvf.js.map +1 -0
  325. package/dist/menu-separator-CzAc4jM8.d.ts +143 -0
  326. package/dist/menu-submenu-trigger-BykOQORL.js +672 -0
  327. package/dist/menu-submenu-trigger-BykOQORL.js.map +1 -0
  328. package/dist/menu.d.ts +10 -0
  329. package/dist/menu.js +1 -0
  330. package/dist/menubar-wjJF54GJ.js +213 -0
  331. package/dist/menubar-wjJF54GJ.js.map +1 -0
  332. package/dist/menubar.d.ts +3 -0
  333. package/dist/menubar.js +1 -0
  334. package/dist/meter-11PgO99t.js +120 -0
  335. package/dist/meter-11PgO99t.js.map +1 -0
  336. package/dist/meter.d.ts +3 -0
  337. package/dist/meter.js +1 -0
  338. package/dist/month-calendar-value-CNJcsqcv.d.ts +5 -0
  339. package/dist/month-calendar-value-D_au-Kbz.js +35 -0
  340. package/dist/month-calendar-value-D_au-Kbz.js.map +1 -0
  341. package/dist/month-calendar.d.ts +6 -0
  342. package/dist/month-calendar.js +1 -0
  343. package/dist/month-picker-DFjFvjo9.js +26 -0
  344. package/dist/month-picker-DFjFvjo9.js.map +1 -0
  345. package/dist/month-picker-root-base-CI7jcllI.js +162 -0
  346. package/dist/month-picker-root-base-CI7jcllI.js.map +1 -0
  347. package/dist/month-picker-root-base-SELhczoy.d.ts +28 -0
  348. package/dist/month-picker.d.ts +10 -0
  349. package/dist/month-picker.js +3 -0
  350. package/dist/month-range-calendar-BmnWB6OD.js +28 -0
  351. package/dist/month-range-calendar-BmnWB6OD.js.map +1 -0
  352. package/dist/month-range-calendar.d.ts +6 -0
  353. package/dist/month-range-calendar.js +3 -0
  354. package/dist/month-range-picker-TfMtxi2X.js +26 -0
  355. package/dist/month-range-picker-TfMtxi2X.js.map +1 -0
  356. package/dist/month-range-picker.d.ts +10 -0
  357. package/dist/month-range-picker.js +3 -0
  358. package/dist/multiple-calendar-EBsuTzYQ.js +133 -0
  359. package/dist/multiple-calendar-EBsuTzYQ.js.map +1 -0
  360. package/dist/multiple-calendar.d.ts +7 -0
  361. package/dist/multiple-calendar.js +3 -0
  362. package/dist/navigation-menu-82shSjXS.js +660 -0
  363. package/dist/navigation-menu-82shSjXS.js.map +1 -0
  364. package/dist/navigation-menu.d.ts +5 -0
  365. package/dist/navigation-menu.js +1 -0
  366. package/dist/number-field-BUNkL15K.js +491 -0
  367. package/dist/number-field-BUNkL15K.js.map +1 -0
  368. package/dist/number-field.d.ts +4 -0
  369. package/dist/number-field.js +1 -0
  370. package/dist/otp-field-BMKBhv0O.js +363 -0
  371. package/dist/otp-field-BMKBhv0O.js.map +1 -0
  372. package/dist/otp-field.d.ts +4 -0
  373. package/dist/otp-field.js +1 -0
  374. package/dist/overlay-handle-DOyqO4oY.js +62 -0
  375. package/dist/overlay-handle-DOyqO4oY.js.map +1 -0
  376. package/dist/overlay-handle-DzzlzKqP.d.ts +16 -0
  377. package/dist/pagination-CMWaQSpr.js +173 -0
  378. package/dist/pagination-CMWaQSpr.js.map +1 -0
  379. package/dist/pagination.d.ts +4 -0
  380. package/dist/pagination.js +1 -0
  381. package/dist/parts-B2E7RN77.d.ts +170 -0
  382. package/dist/parts-BHkvkEgf.js +485 -0
  383. package/dist/parts-BHkvkEgf.js.map +1 -0
  384. package/dist/parts-BJ94V7Kv.d.ts +24 -0
  385. package/dist/parts-BL0sXepP.d.ts +101 -0
  386. package/dist/parts-BjC20sfl.d.ts +19 -0
  387. package/dist/parts-BnbJ2FWv.d.ts +81 -0
  388. package/dist/parts-C688_OLH.js +24 -0
  389. package/dist/parts-C688_OLH.js.map +1 -0
  390. package/dist/parts-C81p8gpg.d.ts +147 -0
  391. package/dist/parts-CDVlldST.js +721 -0
  392. package/dist/parts-CDVlldST.js.map +1 -0
  393. package/dist/parts-CNp1lOIU.js +24 -0
  394. package/dist/parts-CNp1lOIU.js.map +1 -0
  395. package/dist/parts-CXjEfLf7.d.ts +125 -0
  396. package/dist/parts-CrriPiIL.js +29 -0
  397. package/dist/parts-CrriPiIL.js.map +1 -0
  398. package/dist/parts-DVNSEjIO.d.ts +19 -0
  399. package/dist/parts-DmQ9WqOP.js +512 -0
  400. package/dist/parts-DmQ9WqOP.js.map +1 -0
  401. package/dist/parts-DoQQN1Io.d.ts +96 -0
  402. package/dist/parts-VT0Ohb06.js +806 -0
  403. package/dist/parts-VT0Ohb06.js.map +1 -0
  404. package/dist/parts-XRa0gd47.js +350 -0
  405. package/dist/parts-XRa0gd47.js.map +1 -0
  406. package/dist/parts-_ZriSS4p.js +376 -0
  407. package/dist/parts-_ZriSS4p.js.map +1 -0
  408. package/dist/password-input-BQAySlmc.js +212 -0
  409. package/dist/password-input-BQAySlmc.js.map +1 -0
  410. package/dist/password-input.d.ts +4 -0
  411. package/dist/password-input.js +1 -0
  412. package/dist/picker-binding-context-7ci59zS0.js +22 -0
  413. package/dist/picker-binding-context-7ci59zS0.js.map +1 -0
  414. package/dist/popover-C5UaRJpT.js +295 -0
  415. package/dist/popover-C5UaRJpT.js.map +1 -0
  416. package/dist/popover.d.ts +9 -0
  417. package/dist/popover.js +1 -0
  418. package/dist/progress-2d64jFqb.js +141 -0
  419. package/dist/progress-2d64jFqb.js.map +1 -0
  420. package/dist/progress.d.ts +3 -0
  421. package/dist/progress.js +1 -0
  422. package/dist/radio-Mvw36nnF.js +128 -0
  423. package/dist/radio-Mvw36nnF.js.map +1 -0
  424. package/dist/radio-group-D7DchtVK.js +149 -0
  425. package/dist/radio-group-D7DchtVK.js.map +1 -0
  426. package/dist/radio-group-context-DRe2PyiF.js +6 -0
  427. package/dist/radio-group-context-DRe2PyiF.js.map +1 -0
  428. package/dist/radio-group.d.ts +4 -0
  429. package/dist/radio-group.js +1 -0
  430. package/dist/radio.d.ts +3 -0
  431. package/dist/radio.js +1 -0
  432. package/dist/range-calendar-BMxPzzAr.js +32 -0
  433. package/dist/range-calendar-BMxPzzAr.js.map +1 -0
  434. package/dist/range-calendar.d.ts +6 -0
  435. package/dist/range-calendar.js +1 -0
  436. package/dist/rating-DQdIL_nz.js +303 -0
  437. package/dist/rating-DQdIL_nz.js.map +1 -0
  438. package/dist/rating.d.ts +4 -0
  439. package/dist/rating.js +1 -0
  440. package/dist/render-C7XnxB7f.js +40 -0
  441. package/dist/render-C7XnxB7f.js.map +1 -0
  442. package/dist/render-element-DXbUbfgN.js +66 -0
  443. package/dist/render-element-DXbUbfgN.js.map +1 -0
  444. package/dist/render-element-Pwuv2wsL.d.ts +13 -0
  445. package/dist/render.d.ts +3 -0
  446. package/dist/render.js +1 -0
  447. package/dist/roving-context-BVp0I9UN.js +16 -0
  448. package/dist/roving-context-BVp0I9UN.js.map +1 -0
  449. package/dist/scroll-area-CGaVLKik.js +274 -0
  450. package/dist/scroll-area-CGaVLKik.js.map +1 -0
  451. package/dist/scroll-area.d.ts +3 -0
  452. package/dist/scroll-area.js +1 -0
  453. package/dist/search-field-DqGQt6pC.js +207 -0
  454. package/dist/search-field-DqGQt6pC.js.map +1 -0
  455. package/dist/search-field.d.ts +4 -0
  456. package/dist/search-field.js +1 -0
  457. package/dist/segmented-control-BYrnLASo.js +316 -0
  458. package/dist/segmented-control-BYrnLASo.js.map +1 -0
  459. package/dist/segmented-control.d.ts +4 -0
  460. package/dist/segmented-control.js +1 -0
  461. package/dist/select-virtual-9vDaEiye.js +55 -0
  462. package/dist/select-virtual-9vDaEiye.js.map +1 -0
  463. package/dist/select-virtual.d.ts +4 -0
  464. package/dist/select-virtual.js +3 -0
  465. package/dist/select.d.ts +8 -0
  466. package/dist/select.js +1 -0
  467. package/dist/separator-ChAJks2Q.js +18 -0
  468. package/dist/separator-ChAJks2Q.js.map +1 -0
  469. package/dist/separator.d.ts +3 -0
  470. package/dist/separator.js +1 -0
  471. package/dist/slider-DZiqQ18C.js +437 -0
  472. package/dist/slider-DZiqQ18C.js.map +1 -0
  473. package/dist/slider.d.ts +4 -0
  474. package/dist/slider.js +1 -0
  475. package/dist/state-attributes-DhboDeMS.js +14 -0
  476. package/dist/state-attributes-DhboDeMS.js.map +1 -0
  477. package/dist/steps-t_FxFH9P.js +251 -0
  478. package/dist/steps-t_FxFH9P.js.map +1 -0
  479. package/dist/steps.d.ts +4 -0
  480. package/dist/steps.js +1 -0
  481. package/dist/switch-D3zj8gtg.js +137 -0
  482. package/dist/switch-D3zj8gtg.js.map +1 -0
  483. package/dist/switch.d.ts +4 -0
  484. package/dist/switch.js +1 -0
  485. package/dist/tabs-o83wz1hF.js +285 -0
  486. package/dist/tabs-o83wz1hF.js.map +1 -0
  487. package/dist/tabs.d.ts +4 -0
  488. package/dist/tabs.js +1 -0
  489. package/dist/tag-group-gmBdCkE4.js +354 -0
  490. package/dist/tag-group-gmBdCkE4.js.map +1 -0
  491. package/dist/tag-group.d.ts +4 -0
  492. package/dist/tag-group.js +1 -0
  493. package/dist/tags-input-Co9pI732.js +555 -0
  494. package/dist/tags-input-Co9pI732.js.map +1 -0
  495. package/dist/tags-input.d.ts +4 -0
  496. package/dist/tags-input.js +1 -0
  497. package/dist/time-field-qqgemJB1.js +35 -0
  498. package/dist/time-field-qqgemJB1.js.map +1 -0
  499. package/dist/time-field.d.ts +5 -0
  500. package/dist/time-field.js +1 -0
  501. package/dist/time-range-field-BurnJee0.js +36 -0
  502. package/dist/time-range-field-BurnJee0.js.map +1 -0
  503. package/dist/time-range-field.d.ts +7 -0
  504. package/dist/time-range-field.js +1 -0
  505. package/dist/toast-ChdTo_Md.js +341 -0
  506. package/dist/toast-ChdTo_Md.js.map +1 -0
  507. package/dist/toast.d.ts +4 -0
  508. package/dist/toast.js +1 -0
  509. package/dist/toggle-W5tihPuD.js +65 -0
  510. package/dist/toggle-W5tihPuD.js.map +1 -0
  511. package/dist/toggle-group-DpJ794rw.js +73 -0
  512. package/dist/toggle-group-DpJ794rw.js.map +1 -0
  513. package/dist/toggle-group-context-Bp44l1NR.js +6 -0
  514. package/dist/toggle-group-context-Bp44l1NR.js.map +1 -0
  515. package/dist/toggle-group.d.ts +4 -0
  516. package/dist/toggle-group.js +1 -0
  517. package/dist/toggle.d.ts +4 -0
  518. package/dist/toggle.js +1 -0
  519. package/dist/toolbar-DfjePeEZ.js +178 -0
  520. package/dist/toolbar-DfjePeEZ.js.map +1 -0
  521. package/dist/toolbar.d.ts +3 -0
  522. package/dist/toolbar.js +1 -0
  523. package/dist/tooltip-CqZtSspz.js +320 -0
  524. package/dist/tooltip-CqZtSspz.js.map +1 -0
  525. package/dist/tooltip.d.ts +9 -0
  526. package/dist/tooltip.js +1 -0
  527. package/dist/use-color-picker-binding-D0R-FsfF.js +17 -0
  528. package/dist/use-color-picker-binding-D0R-FsfF.js.map +1 -0
  529. package/dist/use-controllable-state-Dm8eNkgP.js +36 -0
  530. package/dist/use-controllable-state-Dm8eNkgP.js.map +1 -0
  531. package/dist/use-element-tpFZ-kuA.js +10 -0
  532. package/dist/use-element-tpFZ-kuA.js.map +1 -0
  533. package/dist/use-field-control-CL_nOU7T.js +131 -0
  534. package/dist/use-field-control-CL_nOU7T.js.map +1 -0
  535. package/dist/use-overlay-portal-Cfv6qtTO.js +18 -0
  536. package/dist/use-overlay-portal-Cfv6qtTO.js.map +1 -0
  537. package/dist/use-overlay-portal-D8GjZ-m7.d.ts +13 -0
  538. package/dist/use-overlay-root-BDO5E_0S.d.ts +23 -0
  539. package/dist/use-overlay-root-eXuUlCpV.js +225 -0
  540. package/dist/use-overlay-root-eXuUlCpV.js.map +1 -0
  541. package/dist/use-overlay-trigger-CxW1Z6Q6.js +74 -0
  542. package/dist/use-overlay-trigger-CxW1Z6Q6.js.map +1 -0
  543. package/dist/use-overlay-trigger-PP99t2ZF.d.ts +11 -0
  544. package/dist/use-panel-transition-CKMdsqPR.js +145 -0
  545. package/dist/use-panel-transition-CKMdsqPR.js.map +1 -0
  546. package/dist/use-positioner-BpxM4U5Y.d.ts +11 -0
  547. package/dist/use-positioner-DtJR980s.js +56 -0
  548. package/dist/use-positioner-DtJR980s.js.map +1 -0
  549. package/dist/use-presence-Cwi_UTLe.js +97 -0
  550. package/dist/use-presence-Cwi_UTLe.js.map +1 -0
  551. package/dist/use-required-context-Cjd_CYnv.js +11 -0
  552. package/dist/use-required-context-Cjd_CYnv.js.map +1 -0
  553. package/dist/use-roving-composite-D0vtGxm8.js +82 -0
  554. package/dist/use-roving-composite-D0vtGxm8.js.map +1 -0
  555. package/dist/use-roving-item-Dxe3phsZ.js +42 -0
  556. package/dist/use-roving-item-Dxe3phsZ.js.map +1 -0
  557. package/dist/use-segment-group--unFuh-Z.js +307 -0
  558. package/dist/use-segment-group--unFuh-Z.js.map +1 -0
  559. package/dist/use-virtual-rows-B5N0qgmT.js +99 -0
  560. package/dist/use-virtual-rows-B5N0qgmT.js.map +1 -0
  561. package/dist/use-virtual-rows-BQFqR0_e.d.ts +16 -0
  562. package/dist/year-calendar-CroBMFMN.js +28 -0
  563. package/dist/year-calendar-CroBMFMN.js.map +1 -0
  564. package/dist/year-calendar.d.ts +6 -0
  565. package/dist/year-calendar.js +3 -0
  566. package/dist/year-picker-DJVxXtPh.js +26 -0
  567. package/dist/year-picker-DJVxXtPh.js.map +1 -0
  568. package/dist/year-picker.d.ts +10 -0
  569. package/dist/year-picker.js +3 -0
  570. package/dist/year-range-calendar-Cz2WYDV2.js +28 -0
  571. package/dist/year-range-calendar-Cz2WYDV2.js.map +1 -0
  572. package/dist/year-range-calendar.d.ts +6 -0
  573. package/dist/year-range-calendar.js +3 -0
  574. package/dist/year-range-picker-9f7L5Hgx.js +26 -0
  575. package/dist/year-range-picker-9f7L5Hgx.js.map +1 -0
  576. package/dist/year-range-picker.d.ts +10 -0
  577. package/dist/year-range-picker.js +3 -0
  578. package/package.json +553 -3
@@ -0,0 +1,304 @@
1
+ import { t as useRequiredContext } from "./use-required-context-Cjd_CYnv.js";
2
+ import { t as renderElement } from "./render-element-DXbUbfgN.js";
3
+ import { t as stateAttributes } from "./state-attributes-DhboDeMS.js";
4
+ import { t as useControllableState } from "./use-controllable-state-Dm8eNkgP.js";
5
+ import { t as useOverlayRoot } from "./use-overlay-root-eXuUlCpV.js";
6
+ import { t as useOverlayPortal } from "./use-overlay-portal-Cfv6qtTO.js";
7
+ import { t as usePositioner } from "./use-positioner-DtJR980s.js";
8
+ import { t as useFieldControl } from "./use-field-control-CL_nOU7T.js";
9
+ import { r as isRange, t as PickerBindingContext } from "./picker-binding-context-7ci59zS0.js";
10
+ import { createContext, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { getTabbables, nextTabbableAfter } from "@fragiola/primitives/focus";
13
+ import { openOverlaySession } from "@fragiola/primitives/overlay";
14
+ import { VISUALLY_HIDDEN_INPUT_STYLE, bridgeForm } from "@fragiola/primitives/form";
15
+ import { toIsoDate } from "@fragiola/primitives/date";
16
+ // src/components/date-picker/date-picker-context.ts
17
+ const DatePickerContext = createContext(null);
18
+ // src/components/date-picker/date-picker-popup.tsx
19
+ const RETURNS_FOCUS = /* @__PURE__ */ new Set([
20
+ "escape-key",
21
+ "item-press",
22
+ "trigger-press"
23
+ ]);
24
+ const RETURNS_FOCUS_UNFOCUSED = /* @__PURE__ */ new Set([
25
+ "outside-press",
26
+ "none",
27
+ "imperative-action"
28
+ ]);
29
+ /** The non-modal dialog holding the bound calendar (spec/calendar.md, pickers). */
30
+ function DatePickerPopup(props) {
31
+ const context = useRequiredContext(DatePickerContext, "DatePicker.Popup");
32
+ const { open, popup, positioner, trigger, setOpen, lastReason } = context;
33
+ useEffect(() => {
34
+ if (!open || popup === null) return;
35
+ return openOverlaySession(popup.ownerDocument, {
36
+ elements: () => [positioner ?? popup],
37
+ ignore: () => [trigger],
38
+ dismiss: (reason, event) => setOpen(false, reason, event),
39
+ focusOut: () => [trigger],
40
+ returnFocus: {
41
+ when: RETURNS_FOCUS,
42
+ whenUnfocused: RETURNS_FOCUS_UNFOCUSED,
43
+ reason: () => lastReason.current ?? "none",
44
+ to: () => trigger
45
+ }
46
+ }).end;
47
+ }, [
48
+ open,
49
+ popup,
50
+ positioner,
51
+ trigger,
52
+ setOpen,
53
+ lastReason
54
+ ]);
55
+ const onKeyDown = (event) => {
56
+ if (event.key !== "Tab" || popup === null || event.defaultPrevented) return;
57
+ const tabbables = getTabbables(popup);
58
+ const active = popup.ownerDocument.activeElement;
59
+ const first = tabbables[0] ?? popup;
60
+ const last = tabbables.at(-1) ?? popup;
61
+ if (event.shiftKey && (active === first || active === popup)) {
62
+ event.preventDefault();
63
+ setOpen(false, "focus-out", event.nativeEvent);
64
+ trigger?.focus();
65
+ } else if (!event.shiftKey && active === last) {
66
+ event.preventDefault();
67
+ const next = trigger ? nextTabbableAfter(trigger, [positioner, popup]) : null;
68
+ setOpen(false, "focus-out", event.nativeEvent);
69
+ next?.focus();
70
+ }
71
+ };
72
+ const status = context.presence.status;
73
+ return renderElement("div", props, {
74
+ open,
75
+ ...context.placed
76
+ }, {
77
+ id: context.popupId,
78
+ role: "dialog",
79
+ "data-primitives-part": `${context.component}-popup`,
80
+ ...stateAttributes({
81
+ open,
82
+ closed: !open,
83
+ side: context.placed.side,
84
+ align: context.placed.align,
85
+ "starting-style": status === "starting",
86
+ "ending-style": status === "ending"
87
+ }),
88
+ onKeyDown
89
+ }, context.setPopup);
90
+ }
91
+ // src/components/date-picker/date-picker-portal.tsx
92
+ /** Moves the positioner to `container` (default: the body) while the popup is mounted. */
93
+ function DatePickerPortal(props) {
94
+ const context = useRequiredContext(DatePickerContext, "DatePicker.Portal");
95
+ return useOverlayPortal(context.presence.mounted, props);
96
+ }
97
+ // src/components/date-picker/date-picker-positioner.tsx
98
+ /** Places the popup next to the trigger (spec/calendar.md, "Positioning"). */
99
+ function DatePickerPositioner({ side, align, sideOffset, alignOffset, collisionPadding, anchor, ...props }) {
100
+ const context = useRequiredContext(DatePickerContext, "DatePicker.Positioner");
101
+ const placed = usePositioner({
102
+ side,
103
+ align,
104
+ sideOffset,
105
+ alignOffset,
106
+ collisionPadding,
107
+ anchor
108
+ }, {
109
+ side: "bottom",
110
+ align: "start"
111
+ }, context.trigger, context.positioner, null, context.presence.mounted);
112
+ const { setPlaced } = context;
113
+ useLayoutEffect(() => setPlaced(placed), [placed, setPlaced]);
114
+ return renderElement("div", props, {
115
+ open: context.open,
116
+ ...placed
117
+ }, {
118
+ role: "presentation",
119
+ hidden: context.presence.mounted ? void 0 : true,
120
+ "data-primitives-part": `${context.component}-positioner`,
121
+ ...stateAttributes({
122
+ open: context.open,
123
+ closed: !context.open,
124
+ side: placed.side,
125
+ align: placed.align
126
+ })
127
+ }, context.setPositioner);
128
+ }
129
+ // src/components/date-picker/date-picker-root-base.tsx
130
+ const NOOP = () => {};
131
+ /**
132
+ * What the form submits: `2026-11-24`, a range `2026-11-25/2026-11-27` (the ISO 8601 interval), or
133
+ * empty with no value (a range is one only once both ends are chosen).
134
+ */
135
+ function formValue(value) {
136
+ if (value === null) return "";
137
+ if (isRange(value)) return `${toIsoDate(value.start)}/${toIsoDate(value.end)}`;
138
+ return toIsoDate(value);
139
+ }
140
+ /**
141
+ * The state of a DatePicker or a DateRangePicker (spec/calendar.md): the open state of its popup,
142
+ * the value the calendar inside binds to, and its form support. Renders no element of its own but
143
+ * the hidden input, after its children, while it has a name.
144
+ */
145
+ function DatePickerRootBase({ component, mode, value: valueProp, defaultValue, onValueChange, min, max, isDateUnavailable, locale, firstDayOfWeek, visibleMonths, calendar, name, required = false, disabled: disabledProp = false, readOnly = false, children, ...overlayProps }) {
146
+ const root = useOverlayRoot(overlayProps);
147
+ const [value, setValue] = useControllableState(valueProp, defaultValue ?? null, onValueChange);
148
+ const input = useRef(null);
149
+ const field = useFieldControl({
150
+ id: root.trigger?.id || root.triggerId,
151
+ labelable: true,
152
+ labelFocuses: true,
153
+ value,
154
+ filled: value !== null,
155
+ input: () => input.current,
156
+ focusTarget: () => root.trigger
157
+ });
158
+ const disabled = disabledProp || field.disabled;
159
+ const formName = field.name ?? name;
160
+ const [placed, setPlaced] = useState({
161
+ side: "bottom",
162
+ align: "start"
163
+ });
164
+ const { setOpen } = root;
165
+ const choose = useCallback((next) => {
166
+ setValue(next, { reason: "item-press" });
167
+ setOpen(false, "item-press");
168
+ }, [setValue, setOpen]);
169
+ const latest = useRef({
170
+ defaultValue,
171
+ setValue,
172
+ trigger: root.trigger,
173
+ reset: field.reset
174
+ });
175
+ latest.current = {
176
+ defaultValue,
177
+ setValue,
178
+ trigger: root.trigger,
179
+ reset: field.reset
180
+ };
181
+ const named = formName !== void 0;
182
+ useEffect(() => {
183
+ const element = input.current;
184
+ if (!named || element === null) return;
185
+ return bridgeForm(element, {
186
+ reset: () => {
187
+ const current = latest.current;
188
+ const initial = current.defaultValue ?? null;
189
+ current.reset();
190
+ current.setValue(initial, { reason: "none" });
191
+ element.value = formValue(initial);
192
+ },
193
+ invalid: () => latest.current.trigger
194
+ });
195
+ }, [named]);
196
+ const options = useMemo(() => ({
197
+ min,
198
+ max,
199
+ isDateUnavailable,
200
+ locale,
201
+ firstDayOfWeek,
202
+ visibleMonths,
203
+ calendar
204
+ }), [
205
+ min,
206
+ max,
207
+ isDateUnavailable,
208
+ locale,
209
+ firstDayOfWeek,
210
+ visibleMonths,
211
+ calendar
212
+ ]);
213
+ const { open } = root;
214
+ const binding = useMemo(() => ({
215
+ mode,
216
+ open,
217
+ value,
218
+ choose,
219
+ options,
220
+ readOnly
221
+ }), [
222
+ mode,
223
+ open,
224
+ value,
225
+ choose,
226
+ options,
227
+ readOnly
228
+ ]);
229
+ const context = useMemo(() => ({
230
+ ...root,
231
+ component,
232
+ placed,
233
+ setPlaced,
234
+ field,
235
+ disabled,
236
+ readOnly,
237
+ required
238
+ }), [
239
+ root,
240
+ component,
241
+ placed,
242
+ field,
243
+ disabled,
244
+ readOnly,
245
+ required
246
+ ]);
247
+ return /* @__PURE__ */ jsxs(DatePickerContext.Provider, {
248
+ value: context,
249
+ children: [/* @__PURE__ */ jsx(PickerBindingContext.Provider, {
250
+ value: binding,
251
+ children
252
+ }), formName === void 0 ? null : /* @__PURE__ */ jsx("input", {
253
+ ref: input,
254
+ "aria-hidden": "true",
255
+ tabIndex: -1,
256
+ name: formName,
257
+ value: formValue(value),
258
+ required,
259
+ disabled,
260
+ onChange: NOOP,
261
+ style: VISUALLY_HIDDEN_INPUT_STYLE,
262
+ "data-primitives-part": `${component}-input`
263
+ })]
264
+ });
265
+ }
266
+ // src/components/date-picker/date-picker-trigger.tsx
267
+ /**
268
+ * Opens the picker; its content is the consumer's (for example the formatted value). Inside a
269
+ * Field, the field's labelable element and focus target (spec/calendar.md, "Forms").
270
+ */
271
+ function DatePickerTrigger(props) {
272
+ const context = useRequiredContext(DatePickerContext, "DatePicker.Trigger");
273
+ const { open, disabled, readOnly, required, field } = context;
274
+ return renderElement("button", props, {
275
+ open,
276
+ disabled,
277
+ readOnly,
278
+ required
279
+ }, {
280
+ type: "button",
281
+ id: context.triggerId,
282
+ disabled,
283
+ "aria-haspopup": "dialog",
284
+ "aria-expanded": open,
285
+ "aria-controls": open ? context.popupId : void 0,
286
+ ...field.aria,
287
+ "data-primitives-part": `${context.component}-trigger`,
288
+ ...field.attributes,
289
+ ...stateAttributes({
290
+ "popup-open": open,
291
+ disabled,
292
+ readonly: readOnly,
293
+ required
294
+ }),
295
+ onClick: (event) => {
296
+ if (!disabled) context.setOpen(!open, "trigger-press", event.nativeEvent);
297
+ },
298
+ onFocus: field.onFocus,
299
+ onBlur: field.onBlur
300
+ }, context.setTrigger);
301
+ }
302
+ export { DatePickerPopup as a, DatePickerPortal as i, DatePickerRootBase as n, DatePickerContext as o, DatePickerPositioner as r, DatePickerTrigger as t };
303
+
304
+ //# sourceMappingURL=date-picker-trigger-BKPvZbRg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker-trigger-BKPvZbRg.js","names":[],"sources":["../src/components/date-picker/date-picker-context.ts","../src/components/date-picker/date-picker-popup.tsx","../src/components/date-picker/date-picker-portal.tsx","../src/components/date-picker/date-picker-positioner.tsx","../src/components/date-picker/date-picker-root-base.tsx","../src/components/date-picker/date-picker-trigger.tsx"],"sourcesContent":["import type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { createContext } from \"react\";\nimport type { FieldControlBinding } from \"../../hooks/use-field-control.ts\";\nimport type { OverlayRoot } from \"../../hooks/use-overlay-root.ts\";\n\n/** The component a picker's parts belong to: their part attribute's prefix. */\nexport type DatePickerComponent = \"date-picker\" | \"date-range-picker\";\n\n/** The pickers whose Root provides this context: the month and year pickers' too (Epic #79). */\nexport type PickerComponent =\n | DatePickerComponent\n | \"month-picker\"\n | \"month-range-picker\"\n | \"year-picker\"\n | \"year-range-picker\";\n\nexport interface DatePickerContextValue extends OverlayRoot {\n component: PickerComponent;\n placed: { side: Side; align: Align };\n setPlaced: (placed: { side: Side; align: Align }) => void;\n /** The enclosing field's binding, for the trigger (spec/field.md). */\n field: FieldControlBinding;\n disabled: boolean;\n readOnly: boolean;\n required: boolean;\n}\n\nexport const DatePickerContext = createContext<DatePickerContextValue | null>(\n null,\n);\n","import { getTabbables, nextTabbableAfter } from \"@fragiola/primitives/focus\";\nimport { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { type KeyboardEvent, useEffect } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { DatePickerContext } from \"./date-picker-context.ts\";\n\nexport interface DatePickerPopupState {\n open: boolean;\n side: Side;\n align: Align;\n}\n\nexport interface DatePickerPopupProps extends PartProps<DatePickerPopupState> {}\n\n// Closing by these returns focus to the trigger; focus leaving does not (spec/calendar.md, \"Focus\").\nconst RETURNS_FOCUS = new Set([\"escape-key\", \"item-press\", \"trigger-press\"]);\n// an outside press returns it only when the press focused nothing (as Popover, D4 §3)\n// and a close made through the controlled `open` (reason `none`), as Popover's\n// (and a handle's or the actions' `imperative-action`, whose focus return is `none`'s)\nconst RETURNS_FOCUS_UNFOCUSED = new Set([\n \"outside-press\",\n \"none\",\n \"imperative-action\",\n]);\n\n/** The non-modal dialog holding the bound calendar (spec/calendar.md, pickers). */\nexport function DatePickerPopup(props: DatePickerPopupProps) {\n const context = useRequiredContext(DatePickerContext, \"DatePicker.Popup\");\n const { open, popup, positioner, trigger, setOpen, lastReason } = context;\n\n useEffect(() => {\n if (!open || popup === null) {\n return undefined;\n }\n // the bound calendar focuses its focused date itself (spec/calendar.md, \"Focus\")\n const session = openOverlaySession(popup.ownerDocument, {\n elements: () => [positioner ?? popup],\n ignore: () => [trigger],\n dismiss: (reason, event) => setOpen(false, reason, event),\n focusOut: () => [trigger],\n returnFocus: {\n when: RETURNS_FOCUS,\n whenUnfocused: RETURNS_FOCUS_UNFOCUSED,\n reason: () => lastReason.current ?? \"none\",\n to: () => trigger,\n },\n });\n return session.end;\n }, [open, popup, positioner, trigger, setOpen, lastReason]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== \"Tab\" || popup === null || event.defaultPrevented) {\n return;\n }\n // in the tab order, the popup's content comes right after the trigger (as popover.md)\n const tabbables = getTabbables(popup);\n const active = popup.ownerDocument.activeElement;\n const first = tabbables[0] ?? popup;\n const last = tabbables.at(-1) ?? popup;\n if (event.shiftKey && (active === first || active === popup)) {\n event.preventDefault();\n setOpen(false, \"focus-out\", event.nativeEvent);\n trigger?.focus();\n } else if (!event.shiftKey && active === last) {\n event.preventDefault();\n const next = trigger\n ? nextTabbableAfter(trigger, [positioner, popup])\n : null;\n setOpen(false, \"focus-out\", event.nativeEvent);\n next?.focus();\n }\n };\n\n const status = context.presence.status;\n return renderElement(\n \"div\",\n props,\n { open, ...context.placed },\n {\n id: context.popupId,\n role: \"dialog\",\n \"data-primitives-part\": `${context.component}-popup`,\n ...stateAttributes({\n open,\n closed: !open,\n side: context.placed.side,\n align: context.placed.align,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n onKeyDown,\n },\n context.setPopup,\n );\n}\n","import {\n type OverlayPortalProps,\n useOverlayPortal,\n} from \"../../hooks/use-overlay-portal.ts\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { DatePickerContext } from \"./date-picker-context.ts\";\n\nexport interface DatePickerPortalProps extends OverlayPortalProps {}\n\n/** Moves the positioner to `container` (default: the body) while the popup is mounted. */\nexport function DatePickerPortal(props: DatePickerPortalProps) {\n const context = useRequiredContext(DatePickerContext, \"DatePicker.Portal\");\n return useOverlayPortal(context.presence.mounted, props);\n}\n","import type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { useLayoutEffect } from \"react\";\nimport {\n type PositionerProps,\n usePositioner,\n} from \"../../hooks/use-positioner.ts\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { DatePickerContext } from \"./date-picker-context.ts\";\n\nexport interface DatePickerPositionerState {\n open: boolean;\n side: Side;\n align: Align;\n}\n\nexport interface DatePickerPositionerProps\n extends PartProps<DatePickerPositionerState>,\n PositionerProps {}\n\n/** Places the popup next to the trigger (spec/calendar.md, \"Positioning\"). */\nexport function DatePickerPositioner({\n side,\n align,\n sideOffset,\n alignOffset,\n collisionPadding,\n anchor,\n ...props\n}: DatePickerPositionerProps) {\n const context = useRequiredContext(\n DatePickerContext,\n \"DatePicker.Positioner\",\n );\n const placed = usePositioner(\n { side, align, sideOffset, alignOffset, collisionPadding, anchor },\n { side: \"bottom\", align: \"start\" },\n context.trigger,\n context.positioner,\n null,\n context.presence.mounted,\n );\n const { setPlaced } = context;\n useLayoutEffect(() => setPlaced(placed), [placed, setPlaced]);\n return renderElement(\n \"div\",\n props,\n { open: context.open, ...placed },\n {\n role: \"presentation\",\n hidden: context.presence.mounted ? undefined : true,\n \"data-primitives-part\": `${context.component}-positioner`,\n ...stateAttributes({\n open: context.open,\n closed: !context.open,\n side: placed.side,\n align: placed.align,\n }),\n },\n context.setPositioner,\n );\n}\n","import { toIsoDate } from \"@fragiola/primitives/date\";\nimport {\n bridgeForm,\n VISUALLY_HIDDEN_INPUT_STYLE,\n} from \"@fragiola/primitives/form\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport {\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { useControllableState } from \"../../hooks/use-controllable-state.ts\";\nimport { useFieldControl } from \"../../hooks/use-field-control.ts\";\nimport {\n type OverlayRootProps,\n useOverlayRoot,\n} from \"../../hooks/use-overlay-root.ts\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\nimport {\n type CalendarMode,\n type CalendarOptions,\n type CalendarValue,\n isRange,\n} from \"../calendar/calendar-value.ts\";\nimport { PickerBindingContext } from \"../calendar/picker-binding-context.ts\";\nimport {\n type DatePickerComponent,\n DatePickerContext,\n} from \"./date-picker-context.ts\";\n\n/** The props both picker roots share (each adds its own typed value). */\nexport interface DatePickerRootSharedProps\n extends OverlayRootProps,\n CalendarOptions {\n /** The form name: the Root renders a hidden input that submits the value (ISO 8601). */\n name?: string;\n /** A form submission needs a value. */\n required?: boolean;\n /** The trigger cannot open the popup, and the value is not submitted. */\n disabled?: boolean;\n /** The value cannot change: the popup opens, its calendar is read-only. */\n readOnly?: boolean;\n children?: ReactNode;\n}\n\nconst NOOP = () => {};\n\n/**\n * What the form submits: `2026-11-24`, a range `2026-11-25/2026-11-27` (the ISO 8601 interval), or\n * empty with no value (a range is one only once both ends are chosen).\n */\nfunction formValue(value: CalendarValue): string {\n if (value === null) {\n return \"\";\n }\n if (isRange(value)) {\n return `${toIsoDate(value.start)}/${toIsoDate(value.end)}`;\n }\n return toIsoDate(value);\n}\n\n/**\n * The state of a DatePicker or a DateRangePicker (spec/calendar.md): the open state of its popup,\n * the value the calendar inside binds to, and its form support. Renders no element of its own but\n * the hidden input, after its children, while it has a name.\n */\nexport function DatePickerRootBase({\n component,\n mode,\n value: valueProp,\n defaultValue,\n onValueChange,\n min,\n max,\n isDateUnavailable,\n locale,\n firstDayOfWeek,\n visibleMonths,\n calendar,\n name,\n required = false,\n disabled: disabledProp = false,\n readOnly = false,\n children,\n ...overlayProps\n}: DatePickerRootSharedProps & {\n component: DatePickerComponent;\n mode: CalendarMode;\n value?: CalendarValue;\n defaultValue?: CalendarValue;\n onValueChange?: (value: CalendarValue, details: ChangeDetails) => void;\n}): ReactNode {\n const root = useOverlayRoot(overlayProps);\n const [value, setValue] = useControllableState<\n CalendarValue,\n ChangeDetails\n >(valueProp, defaultValue ?? null, onValueChange);\n const input = useRef<HTMLInputElement>(null);\n const field = useFieldControl({\n // the trigger's rendered id: the consumer's, else the generated one\n id: root.trigger?.id || root.triggerId,\n labelable: true,\n // a click would open the popup and take the focus away: the label focuses the trigger\n labelFocuses: true,\n value,\n filled: value !== null,\n input: () => input.current,\n focusTarget: () => root.trigger,\n });\n const disabled = disabledProp || field.disabled;\n const formName = field.name ?? name;\n const [placed, setPlaced] = useState<{ side: Side; align: Align }>({\n side: \"bottom\",\n align: \"start\",\n });\n const { setOpen } = root;\n const choose = useCallback(\n (next: CalendarValue) => {\n setValue(next, { reason: \"item-press\" });\n setOpen(false, \"item-press\");\n },\n [setValue, setOpen],\n );\n\n // a form reset returns the value to its default; a failed validation focuses the trigger\n const latest = useRef({\n defaultValue,\n setValue,\n trigger: root.trigger,\n reset: field.reset,\n });\n latest.current = {\n defaultValue,\n setValue,\n trigger: root.trigger,\n reset: field.reset,\n };\n const named = formName !== undefined;\n useEffect(() => {\n const element = input.current;\n if (!named || element === null) {\n return undefined;\n }\n return bridgeForm(element, {\n reset: () => {\n const current = latest.current;\n const initial = current.defaultValue ?? null;\n current.reset();\n current.setValue(initial, { reason: \"none\" });\n element.value = formValue(initial);\n },\n invalid: () => latest.current.trigger,\n });\n }, [named]);\n\n const options = useMemo(\n () => ({\n min,\n max,\n isDateUnavailable,\n locale,\n firstDayOfWeek,\n visibleMonths,\n calendar,\n }),\n [\n min,\n max,\n isDateUnavailable,\n locale,\n firstDayOfWeek,\n visibleMonths,\n calendar,\n ],\n );\n const { open } = root;\n const binding = useMemo(\n () => ({ mode, open, value, choose, options, readOnly }),\n [mode, open, value, choose, options, readOnly],\n );\n const context = useMemo(\n () => ({\n ...root,\n component,\n placed,\n setPlaced,\n field,\n disabled,\n readOnly,\n required,\n }),\n [root, component, placed, field, disabled, readOnly, required],\n );\n return (\n <DatePickerContext.Provider value={context}>\n <PickerBindingContext.Provider value={binding}>\n {children}\n </PickerBindingContext.Provider>\n {formName === undefined ? null : (\n <input\n ref={input}\n aria-hidden=\"true\"\n tabIndex={-1}\n name={formName}\n value={formValue(value)}\n required={required}\n disabled={disabled}\n onChange={NOOP}\n style={VISUALLY_HIDDEN_INPUT_STYLE}\n data-primitives-part={`${component}-input`}\n />\n )}\n </DatePickerContext.Provider>\n );\n}\n","import type { MouseEvent as ReactMouseEvent } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { type PartProps, renderElement } from \"../../utils/render-element.tsx\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { DatePickerContext } from \"./date-picker-context.ts\";\n\nexport interface DatePickerTriggerState {\n open: boolean;\n disabled: boolean;\n readOnly: boolean;\n required: boolean;\n}\n\nexport interface DatePickerTriggerProps\n extends PartProps<DatePickerTriggerState> {}\n\n/**\n * Opens the picker; its content is the consumer's (for example the formatted value). Inside a\n * Field, the field's labelable element and focus target (spec/calendar.md, \"Forms\").\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const context = useRequiredContext(DatePickerContext, \"DatePicker.Trigger\");\n const { open, disabled, readOnly, required, field } = context;\n return renderElement(\n \"button\",\n props,\n { open, disabled, readOnly, required },\n {\n type: \"button\",\n id: context.triggerId,\n disabled,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? context.popupId : undefined,\n ...field.aria,\n \"data-primitives-part\": `${context.component}-trigger`,\n ...field.attributes,\n ...stateAttributes({\n \"popup-open\": open,\n disabled,\n readonly: readOnly,\n required,\n }),\n onClick: (event: ReactMouseEvent) => {\n if (!disabled) {\n context.setOpen(!open, \"trigger-press\", event.nativeEvent);\n }\n },\n onFocus: field.onFocus,\n onBlur: field.onBlur,\n },\n context.setTrigger,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA2BA,MAAa,oBAAoB,cAC7B,IACJ;;ACXA,MAAM,gCAAgB,IAAI,IAAI;CAAC;CAAc;CAAc;AAAe,CAAC;AAI3E,MAAM,0CAA0B,IAAI,IAAI;CACpC;CACA;CACA;AACJ,CAAC;;AAGD,SAAgB,gBAAgB,OAA6B;CACzD,MAAM,UAAU,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1
+ import { t as PartProps } from "./render-element-Pwuv2wsL.js";
2
+ import { t as OverlayPortalProps } from "./use-overlay-portal-D8GjZ-m7.js";
3
+ import { t as OverlayRootProps } from "./use-overlay-root-BDO5E_0S.js";
4
+ import { t as PositionerProps } from "./use-positioner-BpxM4U5Y.js";
5
+ import { t as CalendarOptions } from "./calendar-value-DCOjO7og.js";
6
+ import { ReactNode } from "react";
7
+ import { Align, Side } from "@fragiola/primitives/positioning";
8
+ interface DatePickerPopupState {
9
+ open: boolean;
10
+ side: Side;
11
+ align: Align;
12
+ }
13
+ interface DatePickerPopupProps extends PartProps<DatePickerPopupState> {}
14
+ /** The non-modal dialog holding the bound calendar (spec/calendar.md, pickers). */
15
+ declare function DatePickerPopup(props: DatePickerPopupProps): import("react").ReactNode;
16
+ interface DatePickerPortalProps extends OverlayPortalProps {}
17
+ /** Moves the positioner to `container` (default: the body) while the popup is mounted. */
18
+ declare function DatePickerPortal(props: DatePickerPortalProps): import("react").ReactNode;
19
+ interface DatePickerPositionerState {
20
+ open: boolean;
21
+ side: Side;
22
+ align: Align;
23
+ }
24
+ interface DatePickerPositionerProps extends PartProps<DatePickerPositionerState>, PositionerProps {}
25
+ /** Places the popup next to the trigger (spec/calendar.md, "Positioning"). */
26
+ declare function DatePickerPositioner({ side, align, sideOffset, alignOffset, collisionPadding, anchor, ...props }: DatePickerPositionerProps): import("react").ReactNode;
27
+ /** The props both picker roots share (each adds its own typed value). */
28
+ interface DatePickerRootSharedProps extends OverlayRootProps, CalendarOptions {
29
+ /** The form name: the Root renders a hidden input that submits the value (ISO 8601). */
30
+ name?: string;
31
+ /** A form submission needs a value. */
32
+ required?: boolean;
33
+ /** The trigger cannot open the popup, and the value is not submitted. */
34
+ disabled?: boolean;
35
+ /** The value cannot change: the popup opens, its calendar is read-only. */
36
+ readOnly?: boolean;
37
+ children?: ReactNode;
38
+ }
39
+ interface DatePickerTriggerState {
40
+ open: boolean;
41
+ disabled: boolean;
42
+ readOnly: boolean;
43
+ required: boolean;
44
+ }
45
+ interface DatePickerTriggerProps extends PartProps<DatePickerTriggerState> {}
46
+ /**
47
+ * Opens the picker; its content is the consumer's (for example the formatted value). Inside a
48
+ * Field, the field's labelable element and focus target (spec/calendar.md, "Forms").
49
+ */
50
+ declare function DatePickerTrigger(props: DatePickerTriggerProps): import("react").ReactNode;
51
+ export { DatePickerPositioner as a, DatePickerPortal as c, DatePickerPopupProps as d, DatePickerPopupState as f, DatePickerRootSharedProps as i, DatePickerPortalProps as l, DatePickerTriggerProps as n, DatePickerPositionerProps as o, DatePickerTriggerState as r, DatePickerPositionerState as s, DatePickerTrigger as t, DatePickerPopup as u };
@@ -0,0 +1,11 @@
1
+ import { t as OverlayPortalProps } from "./use-overlay-portal-D8GjZ-m7.js";
2
+ import { t as OverlayRootProps } from "./use-overlay-root-BDO5E_0S.js";
3
+ import { t as PositionerProps } from "./use-positioner-BpxM4U5Y.js";
4
+ import { a as OverlayActions, i as OpenChangeDetails, n as ChangeReason, t as ChangeDetails } from "./change-details-CPSkPCNw.js";
5
+ import { n as RenderProp } from "./render-element-Pwuv2wsL.js";
6
+ import { t as CalendarOptions } from "./calendar-value-DCOjO7og.js";
7
+ import { d as DatePickerPopupProps, f as DatePickerPopupState, i as DatePickerRootSharedProps, l as DatePickerPortalProps, n as DatePickerTriggerProps, o as DatePickerPositionerProps, r as DatePickerTriggerState, s as DatePickerPositionerState } from "./date-picker-trigger-DHsAhBf2.js";
8
+ import { n as DatePickerRootProps, t as DatePicker } from "./parts-BjC20sfl.js";
9
+ import { Align, Side } from "@fragiola/primitives/positioning";
10
+ import { PlainDate } from "@fragiola/primitives/date";
11
+ export { type Align, type CalendarOptions, type ChangeDetails, type ChangeReason, DatePicker, type DatePickerPopupProps, type DatePickerPopupState, type DatePickerPortalProps, type DatePickerPositionerProps, type DatePickerPositionerState, type DatePickerRootProps, type DatePickerRootSharedProps, type DatePickerTriggerProps, type DatePickerTriggerState, type OpenChangeDetails, type OverlayActions, type OverlayPortalProps, type OverlayRootProps, type PlainDate, type PositionerProps, type RenderProp, type Side };
@@ -0,0 +1 @@
1
+ export { t as DatePicker } from "./parts-CNp1lOIU.js";
@@ -0,0 +1,34 @@
1
+ import { u as DateFieldSegment } from "./use-segment-group--unFuh-Z.js";
2
+ import { t as DateRangeFieldInput } from "./date-range-field-input-BkLpldTx.js";
3
+ import { t as DateRangeFieldRootBase } from "./date-range-field-root-base-z8S5aSCs.js";
4
+ import { useState } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { today } from "@fragiola/primitives/date";
7
+ // src/components/date-range-field/date-range-field-root.tsx
8
+ /** A start and an end date typed in segments (spec/date-range-field.md). */
9
+ function DateRangeFieldRoot({ value, defaultValue = null, onValueChange, granularity = "day", placeholderValue, min, max, isDateUnavailable, ...props }) {
10
+ const [todayDate] = useState(() => today());
11
+ return /* @__PURE__ */ jsx(DateRangeFieldRootBase, {
12
+ ...props,
13
+ component: "date-range-field",
14
+ kind: "date",
15
+ granularity,
16
+ value,
17
+ defaultValue,
18
+ onValueChange,
19
+ placeholderValue: placeholderValue ?? todayDate,
20
+ min,
21
+ max,
22
+ isDateUnavailable
23
+ });
24
+ }
25
+ // src/components/date-range-field/parts.ts
26
+ /** spec/date-range-field.md: a start and an end date typed in segments, on DateField's Segment */
27
+ const DateRangeField = {
28
+ Root: DateRangeFieldRoot,
29
+ Input: DateRangeFieldInput,
30
+ Segment: DateFieldSegment
31
+ };
32
+ export { DateRangeField as t };
33
+
34
+ //# sourceMappingURL=date-range-field-C-ID01oa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-field-C-ID01oa.js","names":[],"sources":["../src/components/date-range-field/date-range-field-root.tsx","../src/components/date-range-field/parts.ts"],"sourcesContent":["import {\n type DateRange,\n type PlainDate,\n today,\n} from \"@fragiola/primitives/date\";\nimport type { SegmentGranularity } from \"@fragiola/primitives/segments\";\nimport type { PlainDateTime } from \"@fragiola/primitives/time\";\nimport { useState } from \"react\";\nimport type { ChangeDetails } from \"../../utils/change-details.ts\";\nimport type { DateFieldValue } from \"../date-field/date-field-root.tsx\";\nimport type { DateFieldSystemProps } from \"../date-field/date-field-root-base.tsx\";\nimport {\n DateRangeFieldRootBase,\n type DateRangeFieldRootSharedProps,\n type FieldRange,\n} from \"./date-range-field-root-base.tsx\";\n\n/** A DateRangeField's value: two dates, or two dates and times with a time granularity. */\nexport type DateRangeFieldValue =\n | DateRange\n | { readonly start: PlainDateTime; readonly end: PlainDateTime };\n\nexport interface DateRangeFieldRootProps\n extends DateRangeFieldRootSharedProps,\n DateFieldSystemProps {\n /** `{ start, end }`; `null` while a segment of either end is a placeholder. */\n value?: DateRangeFieldValue | null;\n defaultValue?: DateRangeFieldValue | null;\n onValueChange?: (\n value: DateRangeFieldValue | null,\n details: ChangeDetails,\n ) => void;\n /** `day` (the default), or `hour`, `minute`, `second` for dates and times. */\n granularity?: SegmentGranularity;\n /** What a placeholder segment's first step gives; default: today at midnight. */\n placeholderValue?: DateFieldValue;\n /** Ends before it are invalid (a `PlainDate` counts as its midnight). */\n min?: DateFieldValue;\n /** Ends after it are invalid. */\n max?: DateFieldValue;\n /** A range whose start or end is unavailable is invalid. */\n isDateUnavailable?: (date: PlainDate) => boolean;\n}\n\n/** A start and an end date typed in segments (spec/date-range-field.md). */\nexport function DateRangeFieldRoot({\n value,\n defaultValue = null,\n onValueChange,\n granularity = \"day\",\n placeholderValue,\n min,\n max,\n isDateUnavailable,\n ...props\n}: DateRangeFieldRootProps) {\n // today, read once when the field renders (as the calendars' today)\n const [todayDate] = useState(() => today());\n return (\n <DateRangeFieldRootBase<DateFieldValue>\n {...props}\n component=\"date-range-field\"\n kind=\"date\"\n granularity={granularity}\n value={value as FieldRange<DateFieldValue> | null | undefined}\n defaultValue={defaultValue as FieldRange<DateFieldValue> | null}\n onValueChange={\n onValueChange as\n | ((\n value: FieldRange<DateFieldValue> | null,\n details: ChangeDetails,\n ) => void)\n | undefined\n }\n placeholderValue={placeholderValue ?? todayDate}\n min={min}\n max={max}\n isDateUnavailable={isDateUnavailable}\n />\n );\n}\n","import { DateFieldSegment } from \"../date-field/date-field-segment.tsx\";\nimport { DateRangeFieldInput } from \"./date-range-field-input.tsx\";\nimport { DateRangeFieldRoot } from \"./date-range-field-root.tsx\";\n\n/** spec/date-range-field.md: a start and an end date typed in segments, on DateField's Segment */\nexport const DateRangeField = {\n Root: DateRangeFieldRoot,\n Input: DateRangeFieldInput,\n Segment: DateFieldSegment,\n};\n"],"mappings":";;;;;;;;AA6CA,SAAgB,mBAAmB,EAC/B,OACA,eAAe,MACf,eACA,cAAc,OACd,kBACA,KACA,KACA,mBACA,GAAG,SACqB;CAExB,MAAM,CAAC,aAAa,eAAe,MAAM,CAAC;CAC1C,OACI,oBAAC,wBAAD;EACI,GAAI;EACJ,WAAU;EACV,MAAK;EACQ;EACN;EACO;EAEV;EAOJ,kBAAkB,oBAAoB;EACjC;EACA;EACc;CACtB,CAAA;AAET;;;AC3EA,MAAa,iBAAiB;CAC1B,MAAM;CACN,OAAO;CACP,SAAS;AACb"}
@@ -0,0 +1,33 @@
1
+ import { t as useRequiredContext } from "./use-required-context-Cjd_CYnv.js";
2
+ import { d as DateFieldContext, l as DateFieldInput } from "./use-segment-group--unFuh-Z.js";
3
+ import { a as DateRangeFieldContext } from "./date-range-field-root-base-z8S5aSCs.js";
4
+ import { useId } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ // src/components/date-range-field/date-range-field-input.tsx
7
+ /**
8
+ * The `group` of one end's segments (spec/date-range-field.md, "Anatomy"): named by the
9
+ * consumer (`aria-label`) and, inside a Field, by its label too; its segments by both and their
10
+ * own name ("Stay Start date month").
11
+ */
12
+ function DateRangeFieldInput({ range, ...props }) {
13
+ const group = useRequiredContext(DateRangeFieldContext, "DateRangeField.Input").groups[range];
14
+ const generated = useId();
15
+ const id = typeof props.id === "string" ? props.id : generated;
16
+ const named = props["aria-label"] !== void 0;
17
+ const labelledBy = [group.labelId, named ? id : void 0].filter((part) => part !== void 0).join(" ") || void 0;
18
+ return /* @__PURE__ */ jsx(DateFieldContext.Provider, {
19
+ value: {
20
+ ...group,
21
+ labelId: labelledBy
22
+ },
23
+ children: /* @__PURE__ */ jsx(DateFieldInput, {
24
+ id,
25
+ "aria-labelledby": group.labelId === void 0 ? void 0 : labelledBy,
26
+ "data-range": range,
27
+ ...props
28
+ })
29
+ });
30
+ }
31
+ export { DateRangeFieldInput as t };
32
+
33
+ //# sourceMappingURL=date-range-field-input-BkLpldTx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-field-input-BkLpldTx.js","names":[],"sources":["../src/components/date-range-field/date-range-field-input.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { useRequiredContext } from \"../../hooks/use-required-context.ts\";\nimport { DateFieldContext } from \"../date-field/date-field-context.ts\";\nimport {\n DateFieldInput,\n type DateFieldInputProps,\n} from \"../date-field/date-field-input.tsx\";\nimport {\n DateRangeFieldContext,\n type RangeEnd,\n} from \"./date-range-field-context.ts\";\n\nexport interface DateRangeFieldInputProps extends DateFieldInputProps {\n /** The end whose segments it holds. */\n range: RangeEnd;\n}\n\n/**\n * The `group` of one end's segments (spec/date-range-field.md, \"Anatomy\"): named by the\n * consumer (`aria-label`) and, inside a Field, by its label too; its segments by both and their\n * own name (\"Stay Start date month\").\n */\nexport function DateRangeFieldInput({\n range,\n ...props\n}: DateRangeFieldInputProps) {\n const context = useRequiredContext(\n DateRangeFieldContext,\n \"DateRangeField.Input\",\n );\n const group = context.groups[range];\n const generated = useId();\n const id = typeof props.id === \"string\" ? props.id : generated;\n const named = props[\"aria-label\"] !== undefined;\n const labelledBy =\n [group.labelId, named ? id : undefined]\n .filter((part) => part !== undefined)\n .join(\" \") || undefined;\n return (\n <DateFieldContext.Provider value={{ ...group, labelId: labelledBy }}>\n <DateFieldInput\n id={id}\n aria-labelledby={\n group.labelId === undefined ? undefined : labelledBy\n }\n data-range={range}\n {...props}\n />\n </DateFieldContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsBA,SAAgB,oBAAoB,EAChC,OACA,GAAG,SACsB;CAKzB,MAAM,QAJU,mBACZ,uBACA,sBAEgB,CAAC,CAAC,OAAO;CAC7B,MAAM,YAAY,MAAM;CACxB,MAAM,KAAK,OAAO,MAAM,OAAO,WAAW,MAAM,KAAK;CACrD,MAAM,QAAQ,MAAM,kBAAkB,KAAA;CACtC,MAAM,aACF,CAAC,MAAM,SAAS,QAAQ,KAAK,KAAA,CAAS,CAAC,CAClC,QAAQ,SAAS,SAAS,KAAA,CAAS,CAAC,CACpC,KAAK,GAAG,KAAK,KAAA;CACtB,OACI,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO;GAAE,GAAG;GAAO,SAAS;EAAW;EAC9D,UAAA,oBAAC,gBAAD;GACQ;GACJ,mBACI,MAAM,YAAY,KAAA,IAAY,KAAA,IAAY;GAE9C,cAAY;GACZ,GAAI;EACP,CAAA;CACsB,CAAA;AAEnC"}
@@ -0,0 +1,13 @@
1
+ import { o as DateFieldInputProps } from "./date-field-segment-BoS-ohDh.js";
2
+ import { n as RangeEnd } from "./date-range-field-root-base-DWH3nqmz.js";
3
+ interface DateRangeFieldInputProps extends DateFieldInputProps {
4
+ /** The end whose segments it holds. */
5
+ range: RangeEnd;
6
+ }
7
+ /**
8
+ * The `group` of one end's segments (spec/date-range-field.md, "Anatomy"): named by the
9
+ * consumer (`aria-label`) and, inside a Field, by its label too; its segments by both and their
10
+ * own name ("Stay Start date month").
11
+ */
12
+ declare function DateRangeFieldInput({ range, ...props }: DateRangeFieldInputProps): import("react").JSX.Element;
13
+ export { DateRangeFieldInputProps as n, DateRangeFieldInput as t };
@@ -0,0 +1,31 @@
1
+ import { t as ChangeDetails } from "./change-details-CPSkPCNw.js";
2
+ import { r as DateFieldValue } from "./date-field-root-CzSo5iKL.js";
3
+ import { i as DateFieldSystemProps } from "./date-field-segment-BoS-ohDh.js";
4
+ import { t as DateRangeFieldRootSharedProps } from "./date-range-field-root-base-DWH3nqmz.js";
5
+ import { DateRange, PlainDate } from "@fragiola/primitives/date";
6
+ import { SegmentGranularity } from "@fragiola/primitives/segments";
7
+ import { PlainDateTime } from "@fragiola/primitives/time";
8
+ /** A DateRangeField's value: two dates, or two dates and times with a time granularity. */
9
+ type DateRangeFieldValue = DateRange | {
10
+ readonly start: PlainDateTime;
11
+ readonly end: PlainDateTime;
12
+ };
13
+ interface DateRangeFieldRootProps extends DateRangeFieldRootSharedProps, DateFieldSystemProps {
14
+ /** `{ start, end }`; `null` while a segment of either end is a placeholder. */
15
+ value?: DateRangeFieldValue | null;
16
+ defaultValue?: DateRangeFieldValue | null;
17
+ onValueChange?: (value: DateRangeFieldValue | null, details: ChangeDetails) => void;
18
+ /** `day` (the default), or `hour`, `minute`, `second` for dates and times. */
19
+ granularity?: SegmentGranularity;
20
+ /** What a placeholder segment's first step gives; default: today at midnight. */
21
+ placeholderValue?: DateFieldValue;
22
+ /** Ends before it are invalid (a `PlainDate` counts as its midnight). */
23
+ min?: DateFieldValue;
24
+ /** Ends after it are invalid. */
25
+ max?: DateFieldValue;
26
+ /** A range whose start or end is unavailable is invalid. */
27
+ isDateUnavailable?: (date: PlainDate) => boolean;
28
+ }
29
+ /** A start and an end date typed in segments (spec/date-range-field.md). */
30
+ declare function DateRangeFieldRoot({ value, defaultValue, onValueChange, granularity, placeholderValue, min, max, isDateUnavailable, ...props }: DateRangeFieldRootProps): import("react").JSX.Element;
31
+ export { DateRangeFieldRootProps as n, DateRangeFieldValue as r, DateRangeFieldRoot as t };
@@ -0,0 +1,23 @@
1
+ import { t as PartProps } from "./render-element-Pwuv2wsL.js";
2
+ import { c as DateFieldState } from "./date-field-segment-BoS-ohDh.js";
3
+ import "@fragiola/primitives/date";
4
+ import "@fragiola/primitives/segments";
5
+ import "@fragiola/primitives/time";
6
+ import "@fragiola/primitives/time-zone";
7
+ /** One end of a range: the Input that holds its segments (spec/date-range-field.md). */
8
+ type RangeEnd = "start" | "end";
9
+ /** The props DateRangeField.Root and TimeRangeField.Root share (spec/date-range-field.md, "API"). */
10
+ interface DateRangeFieldRootSharedProps extends PartProps<DateFieldState> {
11
+ /** `12` or `24`; default: the locale's. */
12
+ hourCycle?: 12 | 24;
13
+ /** BCP 47; default: the document's `lang`, then the browser's. */
14
+ locale?: string;
15
+ required?: boolean;
16
+ readOnly?: boolean;
17
+ disabled?: boolean;
18
+ /** The start's hidden input name. */
19
+ startName?: string;
20
+ /** The end's hidden input name. */
21
+ endName?: string;
22
+ }
23
+ export { RangeEnd as n, DateRangeFieldRootSharedProps as t };