@fragiola/primitives-vue 0.0.0-stage → 0.1.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 (544) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +21 -0
  3. package/README.md +41 -2
  4. package/dist/accordion-CmKuKHkK.js +278 -0
  5. package/dist/accordion-CmKuKHkK.js.map +1 -0
  6. package/dist/accordion.d.ts +4 -0
  7. package/dist/accordion.js +1 -0
  8. package/dist/alert-dialog-CPG51QOk.js +38 -0
  9. package/dist/alert-dialog-CPG51QOk.js.map +1 -0
  10. package/dist/alert-dialog.d.ts +9 -0
  11. package/dist/alert-dialog.js +1 -0
  12. package/dist/aspect-ratio-Ba7GaRnV.js +37 -0
  13. package/dist/aspect-ratio-Ba7GaRnV.js.map +1 -0
  14. package/dist/aspect-ratio.d.ts +3 -0
  15. package/dist/aspect-ratio.js +1 -0
  16. package/dist/async-list-Dc8wqcxe.js +39 -0
  17. package/dist/async-list-Dc8wqcxe.js.map +1 -0
  18. package/dist/async-list.d.ts +2 -0
  19. package/dist/async-list.js +1 -0
  20. package/dist/autocomplete-virtual-D_2Wuih7.js +55 -0
  21. package/dist/autocomplete-virtual-D_2Wuih7.js.map +1 -0
  22. package/dist/autocomplete-virtual.d.ts +2 -0
  23. package/dist/autocomplete-virtual.js +3 -0
  24. package/dist/autocomplete.d.ts +6 -0
  25. package/dist/autocomplete.js +1 -0
  26. package/dist/avatar-DdDGa6x7.js +166 -0
  27. package/dist/avatar-DdDGa6x7.js.map +1 -0
  28. package/dist/avatar.d.ts +3 -0
  29. package/dist/avatar.js +1 -0
  30. package/dist/breadcrumbs-BFAjlnC_.js +131 -0
  31. package/dist/breadcrumbs-BFAjlnC_.js.map +1 -0
  32. package/dist/breadcrumbs.d.ts +3 -0
  33. package/dist/breadcrumbs.js +1 -0
  34. package/dist/button-DVUcUCXc.js +56 -0
  35. package/dist/button-DVUcUCXc.js.map +1 -0
  36. package/dist/button-attributes-Ue6sUse5.js +83 -0
  37. package/dist/button-attributes-Ue6sUse5.js.map +1 -0
  38. package/dist/button.d.ts +3 -0
  39. package/dist/button.js +1 -0
  40. package/dist/calendar-preset-Bjc7rcNX.js +84 -0
  41. package/dist/calendar-preset-Bjc7rcNX.js.map +1 -0
  42. package/dist/calendar-preset.d.ts +3 -0
  43. package/dist/calendar-preset.js +3 -0
  44. package/dist/calendar-prev-button-jluYmM-3.js +307 -0
  45. package/dist/calendar-prev-button-jluYmM-3.js.map +1 -0
  46. package/dist/calendar-root-base-C9dfkl55.js +310 -0
  47. package/dist/calendar-root-base-C9dfkl55.js.map +1 -0
  48. package/dist/calendar-view-Djy5iHGK.js +160 -0
  49. package/dist/calendar-view-Djy5iHGK.js.map +1 -0
  50. package/dist/calendar-view.d.ts +4 -0
  51. package/dist/calendar-view.js +4 -0
  52. package/dist/calendar.d.ts +5 -0
  53. package/dist/calendar.js +1 -0
  54. package/dist/carousel-BOacnCmz.js +553 -0
  55. package/dist/carousel-BOacnCmz.js.map +1 -0
  56. package/dist/carousel.d.ts +4 -0
  57. package/dist/carousel.js +1 -0
  58. package/dist/cascade-select-B-Nf6eOA.js +697 -0
  59. package/dist/cascade-select-B-Nf6eOA.js.map +1 -0
  60. package/dist/cascade-select.d.ts +6 -0
  61. package/dist/cascade-select.js +1 -0
  62. package/dist/change-details-Bc4-Xzdm.d.ts +37 -0
  63. package/dist/checkbox-D5NvqFgS.js +230 -0
  64. package/dist/checkbox-D5NvqFgS.js.map +1 -0
  65. package/dist/checkbox-group-C3XftlZd.js +104 -0
  66. package/dist/checkbox-group-C3XftlZd.js.map +1 -0
  67. package/dist/checkbox-group-context-C0Z5sWM1.js +5 -0
  68. package/dist/checkbox-group-context-C0Z5sWM1.js.map +1 -0
  69. package/dist/checkbox-group.d.ts +4 -0
  70. package/dist/checkbox-group.js +1 -0
  71. package/dist/checkbox.d.ts +4 -0
  72. package/dist/checkbox.js +1 -0
  73. package/dist/clipboard-BM-4-lTv.js +195 -0
  74. package/dist/clipboard-BM-4-lTv.js.map +1 -0
  75. package/dist/clipboard.d.ts +4 -0
  76. package/dist/clipboard.js +1 -0
  77. package/dist/collapsible-DSCxhlQN.js +158 -0
  78. package/dist/collapsible-DSCxhlQN.js.map +1 -0
  79. package/dist/collapsible.d.ts +4 -0
  80. package/dist/collapsible.js +1 -0
  81. package/dist/color-area-uEHPo-Nq.js +350 -0
  82. package/dist/color-area-uEHPo-Nq.js.map +1 -0
  83. package/dist/color-area.d.ts +4 -0
  84. package/dist/color-area.js +1 -0
  85. package/dist/color-field-Di2IbTa3.js +384 -0
  86. package/dist/color-field-Di2IbTa3.js.map +1 -0
  87. package/dist/color-field.d.ts +4 -0
  88. package/dist/color-field.js +1 -0
  89. package/dist/color-picker-BgFgq5R0.js +311 -0
  90. package/dist/color-picker-BgFgq5R0.js.map +1 -0
  91. package/dist/color-picker-binding-CJ-Cbxbj.js +5 -0
  92. package/dist/color-picker-binding-CJ-Cbxbj.js.map +1 -0
  93. package/dist/color-picker-popover-Dx6LX0V3.js +233 -0
  94. package/dist/color-picker-popover-Dx6LX0V3.js.map +1 -0
  95. package/dist/color-picker-popover.d.ts +6 -0
  96. package/dist/color-picker-popover.js +1 -0
  97. package/dist/color-picker.d.ts +4 -0
  98. package/dist/color-picker.js +1 -0
  99. package/dist/color-slider-BCqoolnY.js +410 -0
  100. package/dist/color-slider-BCqoolnY.js.map +1 -0
  101. package/dist/color-slider.d.ts +4 -0
  102. package/dist/color-slider.js +1 -0
  103. package/dist/color-swatch-C-8IN28V.js +54 -0
  104. package/dist/color-swatch-C-8IN28V.js.map +1 -0
  105. package/dist/color-swatch-picker-CU1wrhjX.js +312 -0
  106. package/dist/color-swatch-picker-CU1wrhjX.js.map +1 -0
  107. package/dist/color-swatch-picker.d.ts +4 -0
  108. package/dist/color-swatch-picker.js +1 -0
  109. package/dist/color-swatch.d.ts +3 -0
  110. package/dist/color-swatch.js +1 -0
  111. package/dist/color-wheel-F_BoXKON.js +284 -0
  112. package/dist/color-wheel-F_BoXKON.js.map +1 -0
  113. package/dist/color-wheel.d.ts +4 -0
  114. package/dist/color-wheel.js +1 -0
  115. package/dist/combobox-virtual-DTRTVq5N.js +56 -0
  116. package/dist/combobox-virtual-DTRTVq5N.js.map +1 -0
  117. package/dist/combobox-virtual.d.ts +2 -0
  118. package/dist/combobox-virtual.js +3 -0
  119. package/dist/combobox.d.ts +6 -0
  120. package/dist/combobox.js +1 -0
  121. package/dist/command-virtual-LoTBDEY5.js +59 -0
  122. package/dist/command-virtual-LoTBDEY5.js.map +1 -0
  123. package/dist/command-virtual.d.ts +3 -0
  124. package/dist/command-virtual.js +3 -0
  125. package/dist/command.d.ts +4 -0
  126. package/dist/command.js +1 -0
  127. package/dist/context-menu-zdHIGS9E.js +151 -0
  128. package/dist/context-menu-zdHIGS9E.js.map +1 -0
  129. package/dist/context-menu.d.ts +7 -0
  130. package/dist/context-menu.js +1 -0
  131. package/dist/date-field-pgSTZiPb.js +78 -0
  132. package/dist/date-field-pgSTZiPb.js.map +1 -0
  133. package/dist/date-field-root-base-CYLuAykm.js +212 -0
  134. package/dist/date-field-root-base-CYLuAykm.js.map +1 -0
  135. package/dist/date-field.d.ts +4 -0
  136. package/dist/date-field.js +1 -0
  137. package/dist/date-picker-input-CiuuRiWZ.js +16 -0
  138. package/dist/date-picker-input-CiuuRiWZ.js.map +1 -0
  139. package/dist/date-picker-input-root-base-ExPSLeKw.js +318 -0
  140. package/dist/date-picker-input-root-base-ExPSLeKw.js.map +1 -0
  141. package/dist/date-picker-input.d.ts +4 -0
  142. package/dist/date-picker-input.js +3 -0
  143. package/dist/date-picker-trigger-C2BlzvfR.js +349 -0
  144. package/dist/date-picker-trigger-C2BlzvfR.js.map +1 -0
  145. package/dist/date-picker.d.ts +6 -0
  146. package/dist/date-picker.js +1 -0
  147. package/dist/date-range-field-Bygmkl5c.js +80 -0
  148. package/dist/date-range-field-Bygmkl5c.js.map +1 -0
  149. package/dist/date-range-field-input-CivpQMYd.js +69 -0
  150. package/dist/date-range-field-input-CivpQMYd.js.map +1 -0
  151. package/dist/date-range-field-root-base-BP26TSWz.js +267 -0
  152. package/dist/date-range-field-root-base-BP26TSWz.js.map +1 -0
  153. package/dist/date-range-field.d.ts +4 -0
  154. package/dist/date-range-field.js +1 -0
  155. package/dist/date-range-picker-input-BUNCCXUY.js +17 -0
  156. package/dist/date-range-picker-input-BUNCCXUY.js.map +1 -0
  157. package/dist/date-range-picker-input.d.ts +4 -0
  158. package/dist/date-range-picker-input.js +3 -0
  159. package/dist/date-range-picker.d.ts +7 -0
  160. package/dist/date-range-picker.js +1 -0
  161. package/dist/dialog-MNjIMCfA.js +38 -0
  162. package/dist/dialog-MNjIMCfA.js.map +1 -0
  163. package/dist/dialog-root-base-jbZipaoQ.js +329 -0
  164. package/dist/dialog-root-base-jbZipaoQ.js.map +1 -0
  165. package/dist/dialog-viewport-tYqWTs9Q.d.ts +54 -0
  166. package/dist/dialog.d.ts +9 -0
  167. package/dist/dialog.js +1 -0
  168. package/dist/direction-CN_deiZU.js +30 -0
  169. package/dist/direction-CN_deiZU.js.map +1 -0
  170. package/dist/direction-context-D-C_P6Lm.js +19 -0
  171. package/dist/direction-context-D-C_P6Lm.js.map +1 -0
  172. package/dist/direction.d.ts +2 -0
  173. package/dist/direction.js +1 -0
  174. package/dist/drawer-BcnuGtEt.js +357 -0
  175. package/dist/drawer-BcnuGtEt.js.map +1 -0
  176. package/dist/drawer.d.ts +9 -0
  177. package/dist/drawer.js +1 -0
  178. package/dist/drop-zone-vFJ5Kvsy.js +98 -0
  179. package/dist/drop-zone-vFJ5Kvsy.js.map +1 -0
  180. package/dist/drop-zone.d.ts +4 -0
  181. package/dist/drop-zone.js +1 -0
  182. package/dist/editable-CabzXgiN.js +436 -0
  183. package/dist/editable-CabzXgiN.js.map +1 -0
  184. package/dist/editable.d.ts +4 -0
  185. package/dist/editable.js +1 -0
  186. package/dist/field-DQ2d5nhC.js +397 -0
  187. package/dist/field-DQ2d5nhC.js.map +1 -0
  188. package/dist/field.d.ts +4 -0
  189. package/dist/field.js +1 -0
  190. package/dist/fieldset-CmmDzOPs.js +80 -0
  191. package/dist/fieldset-CmmDzOPs.js.map +1 -0
  192. package/dist/fieldset-context-DtEOoG6M.js +5 -0
  193. package/dist/fieldset-context-DtEOoG6M.js.map +1 -0
  194. package/dist/fieldset.d.ts +3 -0
  195. package/dist/fieldset.js +1 -0
  196. package/dist/file-upload-_Hh-STdv.js +644 -0
  197. package/dist/file-upload-_Hh-STdv.js.map +1 -0
  198. package/dist/file-upload.d.ts +4 -0
  199. package/dist/file-upload.js +1 -0
  200. package/dist/form-context-DBnVT1lw.js +5 -0
  201. package/dist/form-context-DBnVT1lw.js.map +1 -0
  202. package/dist/form-s9HijjTL.js +92 -0
  203. package/dist/form-s9HijjTL.js.map +1 -0
  204. package/dist/form.d.ts +3 -0
  205. package/dist/form.js +1 -0
  206. package/dist/hover-card-rmd0fD17.js +355 -0
  207. package/dist/hover-card-rmd0fD17.js.map +1 -0
  208. package/dist/hover-card.d.ts +9 -0
  209. package/dist/hover-card.js +1 -0
  210. package/dist/index-5WtjXdX9.d.ts +63 -0
  211. package/dist/index-5eBkkEtv.d.ts +36 -0
  212. package/dist/index-B-vqAG6g.d.ts +33 -0
  213. package/dist/index-B1uYYVtV.d.ts +18 -0
  214. package/dist/index-B8E3X1CK.d.ts +66 -0
  215. package/dist/index-B8Ufhgzu.d.ts +36 -0
  216. package/dist/index-BJz7OWbi.d.ts +88 -0
  217. package/dist/index-BMjRueuv.d.ts +40 -0
  218. package/dist/index-BP7Tmb0E.d.ts +95 -0
  219. package/dist/index-Bbb1Zgwo.d.ts +50 -0
  220. package/dist/index-BdJFU5tH.d.ts +28 -0
  221. package/dist/index-BdfnRo-h.d.ts +55 -0
  222. package/dist/index-BniQvFN-.d.ts +38 -0
  223. package/dist/index-Bt0B-8RV.d.ts +14 -0
  224. package/dist/index-BuWJcRPC.d.ts +18 -0
  225. package/dist/index-Byf0GNd9.d.ts +41 -0
  226. package/dist/index-BzHLkAWU.d.ts +35 -0
  227. package/dist/index-C-QYKtWy.d.ts +28 -0
  228. package/dist/index-C7nh2Oil.d.ts +40 -0
  229. package/dist/index-CDKebSlA.d.ts +41 -0
  230. package/dist/index-CFPqV6qJ.d.ts +72 -0
  231. package/dist/index-CRJv_zWm.d.ts +37 -0
  232. package/dist/index-CTzUalDO.d.ts +76 -0
  233. package/dist/index-CZHLD5cJ.d.ts +17 -0
  234. package/dist/index-Cgwn5qgy.d.ts +88 -0
  235. package/dist/index-Ch4h1DFC.d.ts +55 -0
  236. package/dist/index-Cj3B9gY_.d.ts +50 -0
  237. package/dist/index-Cj6NwCBD.d.ts +44 -0
  238. package/dist/index-CkDThwop.d.ts +21 -0
  239. package/dist/index-Cn-D14iz.d.ts +13 -0
  240. package/dist/index-CpTiLSql.d.ts +53 -0
  241. package/dist/index-CqP363e5.d.ts +118 -0
  242. package/dist/index-Cv4dRdEa.d.ts +72 -0
  243. package/dist/index-CyI637MF.d.ts +37 -0
  244. package/dist/index-D11YCkvR.d.ts +42 -0
  245. package/dist/index-D3yyJGzf.d.ts +74 -0
  246. package/dist/index-D5PbKxcs.d.ts +26 -0
  247. package/dist/index-DAYklR-H.d.ts +18 -0
  248. package/dist/index-DIZSgXHM.d.ts +79 -0
  249. package/dist/index-DZckp3H0.d.ts +37 -0
  250. package/dist/index-DaqoBvQf.d.ts +56 -0
  251. package/dist/index-Df9i45Gr.d.ts +65 -0
  252. package/dist/index-DqI6n06W.d.ts +59 -0
  253. package/dist/index-Drp7svmT.d.ts +30 -0
  254. package/dist/index-DxsUcSGT.d.ts +99 -0
  255. package/dist/index-Dyyi-1mv.d.ts +35 -0
  256. package/dist/index-I2ewgOGz.d.ts +76 -0
  257. package/dist/index-JGhlANKo.d.ts +24 -0
  258. package/dist/index-KASc7z5u.d.ts +38 -0
  259. package/dist/index-LTcmDERY.d.ts +65 -0
  260. package/dist/index-Mf2RPgmw.d.ts +38 -0
  261. package/dist/index-NdY27G_d.d.ts +58 -0
  262. package/dist/index-QO79pDtI.d.ts +70 -0
  263. package/dist/index-S0FIwOSw.d.ts +59 -0
  264. package/dist/index-UxsyZS_A.d.ts +23 -0
  265. package/dist/index-W8aOtVIu.d.ts +40 -0
  266. package/dist/index-WC9xwMaX.d.ts +34 -0
  267. package/dist/index-Xwb9OtVU.d.ts +7 -0
  268. package/dist/index-ZWJJ2V_J.d.ts +49 -0
  269. package/dist/index-_Q_N8ZbU.d.ts +35 -0
  270. package/dist/index-bC3hHzam.d.ts +101 -0
  271. package/dist/index-baY49J-s.d.ts +15 -0
  272. package/dist/index-dCTvA7uS.d.ts +20 -0
  273. package/dist/index-mhpoLESL.d.ts +77 -0
  274. package/dist/index-p3t0BKd4.d.ts +22 -0
  275. package/dist/index-sgaMj_3p.d.ts +69 -0
  276. package/dist/index-tSLNRqTo.d.ts +33 -0
  277. package/dist/index-t_lSQgLA.d.ts +1346 -0
  278. package/dist/index-uL1dEAhG.d.ts +28 -0
  279. package/dist/index.d.ts +79 -0
  280. package/dist/index.js +106 -0
  281. package/dist/label-Ce-gIayi.js +35 -0
  282. package/dist/label-Ce-gIayi.js.map +1 -0
  283. package/dist/label.d.ts +3 -0
  284. package/dist/label.js +1 -0
  285. package/dist/labelled-part-DB2rXJFG.js +56 -0
  286. package/dist/labelled-part-DB2rXJFG.js.map +1 -0
  287. package/dist/link-CZ3ISaPX.js +42 -0
  288. package/dist/link-CZ3ISaPX.js.map +1 -0
  289. package/dist/link-attributes-D9UusWws.js +29 -0
  290. package/dist/link-attributes-D9UusWws.js.map +1 -0
  291. package/dist/link.d.ts +3 -0
  292. package/dist/link.js +1 -0
  293. package/dist/listbox-virtual-He6BWlPj.js +291 -0
  294. package/dist/listbox-virtual-He6BWlPj.js.map +1 -0
  295. package/dist/listbox-virtual.d.ts +5 -0
  296. package/dist/listbox-virtual.js +3 -0
  297. package/dist/listbox.d.ts +4 -0
  298. package/dist/listbox.js +1 -0
  299. package/dist/live-region-style-9ofmajhO.js +46 -0
  300. package/dist/live-region-style-9ofmajhO.js.map +1 -0
  301. package/dist/menu-D7TVxPdb.js +144 -0
  302. package/dist/menu-D7TVxPdb.js.map +1 -0
  303. package/dist/menu-bar-context-k5vMlwmW.js +13 -0
  304. package/dist/menu-bar-context-k5vMlwmW.js.map +1 -0
  305. package/dist/menu-submenu-trigger-ClI2Pm4X.js +885 -0
  306. package/dist/menu-submenu-trigger-ClI2Pm4X.js.map +1 -0
  307. package/dist/menu-submenu-trigger-DNH8_uUB.d.ts +127 -0
  308. package/dist/menu.d.ts +10 -0
  309. package/dist/menu.js +1 -0
  310. package/dist/menubar-CQn3AOiQ.js +212 -0
  311. package/dist/menubar-CQn3AOiQ.js.map +1 -0
  312. package/dist/menubar.d.ts +3 -0
  313. package/dist/menubar.js +1 -0
  314. package/dist/meter-7Qd_WaUY.js +202 -0
  315. package/dist/meter-7Qd_WaUY.js.map +1 -0
  316. package/dist/meter.d.ts +3 -0
  317. package/dist/meter.js +1 -0
  318. package/dist/month-calendar-root-base-VcD8ZNW5.js +354 -0
  319. package/dist/month-calendar-root-base-VcD8ZNW5.js.map +1 -0
  320. package/dist/month-calendar.d.ts +5 -0
  321. package/dist/month-calendar.js +1 -0
  322. package/dist/month-picker-DzOYqW1S.js +15 -0
  323. package/dist/month-picker-DzOYqW1S.js.map +1 -0
  324. package/dist/month-picker-root-base-ByMK_Mfq.js +158 -0
  325. package/dist/month-picker-root-base-ByMK_Mfq.js.map +1 -0
  326. package/dist/month-picker.d.ts +7 -0
  327. package/dist/month-picker.js +3 -0
  328. package/dist/month-range-calendar-CJAWu1-Z.js +18 -0
  329. package/dist/month-range-calendar-CJAWu1-Z.js.map +1 -0
  330. package/dist/month-range-calendar.d.ts +5 -0
  331. package/dist/month-range-calendar.js +3 -0
  332. package/dist/month-range-picker-CRJDG2HG.js +15 -0
  333. package/dist/month-range-picker-CRJDG2HG.js.map +1 -0
  334. package/dist/month-range-picker.d.ts +8 -0
  335. package/dist/month-range-picker.js +3 -0
  336. package/dist/multiple-calendar-BIb2zfBH.js +176 -0
  337. package/dist/multiple-calendar-BIb2zfBH.js.map +1 -0
  338. package/dist/multiple-calendar.d.ts +5 -0
  339. package/dist/multiple-calendar.js +3 -0
  340. package/dist/navigation-menu-COTxGol_.js +727 -0
  341. package/dist/navigation-menu-COTxGol_.js.map +1 -0
  342. package/dist/navigation-menu.d.ts +5 -0
  343. package/dist/navigation-menu.js +1 -0
  344. package/dist/number-field-CqxEnwiS.js +581 -0
  345. package/dist/number-field-CqxEnwiS.js.map +1 -0
  346. package/dist/number-field.d.ts +4 -0
  347. package/dist/number-field.js +1 -0
  348. package/dist/otp-field-DIDuypLU.js +420 -0
  349. package/dist/otp-field-DIDuypLU.js.map +1 -0
  350. package/dist/otp-field.d.ts +4 -0
  351. package/dist/otp-field.js +1 -0
  352. package/dist/overlay-handle-DUptsQOb.js +42 -0
  353. package/dist/overlay-handle-DUptsQOb.js.map +1 -0
  354. package/dist/overlay-handle-DzC9LJQo.d.ts +16 -0
  355. package/dist/overlay-portal-Cmn7Dt7E.d.ts +30 -0
  356. package/dist/overlay-portal-ZNtXmoFd.js +32 -0
  357. package/dist/overlay-portal-ZNtXmoFd.js.map +1 -0
  358. package/dist/pagination-BNUjFYxK.js +264 -0
  359. package/dist/pagination-BNUjFYxK.js.map +1 -0
  360. package/dist/pagination.d.ts +4 -0
  361. package/dist/pagination.js +1 -0
  362. package/dist/parts--mC44S1N.js +1023 -0
  363. package/dist/parts--mC44S1N.js.map +1 -0
  364. package/dist/parts-BP00C3Q5.js +874 -0
  365. package/dist/parts-BP00C3Q5.js.map +1 -0
  366. package/dist/parts-CMh29O5y.js +14 -0
  367. package/dist/parts-CMh29O5y.js.map +1 -0
  368. package/dist/parts-CZqNGRqe.js +20 -0
  369. package/dist/parts-CZqNGRqe.js.map +1 -0
  370. package/dist/parts-DMy2yQZs.js +254 -0
  371. package/dist/parts-DMy2yQZs.js.map +1 -0
  372. package/dist/parts-DVv0aov9.js +14 -0
  373. package/dist/parts-DVv0aov9.js.map +1 -0
  374. package/dist/parts-M3ThgZzl.js +489 -0
  375. package/dist/parts-M3ThgZzl.js.map +1 -0
  376. package/dist/parts-stPOp8dr.js +451 -0
  377. package/dist/parts-stPOp8dr.js.map +1 -0
  378. package/dist/parts-uxRkRrFr.js +668 -0
  379. package/dist/parts-uxRkRrFr.js.map +1 -0
  380. package/dist/password-input-DC39W-do.js +231 -0
  381. package/dist/password-input-DC39W-do.js.map +1 -0
  382. package/dist/password-input.d.ts +4 -0
  383. package/dist/password-input.js +1 -0
  384. package/dist/popover-BaQTGAYJ.js +328 -0
  385. package/dist/popover-BaQTGAYJ.js.map +1 -0
  386. package/dist/popover.d.ts +9 -0
  387. package/dist/popover.js +1 -0
  388. package/dist/progress-DH1Xrj73.js +219 -0
  389. package/dist/progress-DH1Xrj73.js.map +1 -0
  390. package/dist/progress.d.ts +3 -0
  391. package/dist/progress.js +1 -0
  392. package/dist/public-component-AV8E7mGp.js +8 -0
  393. package/dist/public-component-AV8E7mGp.js.map +1 -0
  394. package/dist/public-component-DYpU9aDh.d.ts +33 -0
  395. package/dist/radio-B9YCSnFs.js +159 -0
  396. package/dist/radio-B9YCSnFs.js.map +1 -0
  397. package/dist/radio-group-CmSF4FTc.js +173 -0
  398. package/dist/radio-group-CmSF4FTc.js.map +1 -0
  399. package/dist/radio-group-context-C196JZ9D.js +5 -0
  400. package/dist/radio-group-context-C196JZ9D.js.map +1 -0
  401. package/dist/radio-group.d.ts +4 -0
  402. package/dist/radio-group.js +1 -0
  403. package/dist/radio.d.ts +3 -0
  404. package/dist/radio.js +1 -0
  405. package/dist/range-calendar-BDbNdL75.js +20 -0
  406. package/dist/range-calendar-BDbNdL75.js.map +1 -0
  407. package/dist/range-calendar.d.ts +5 -0
  408. package/dist/range-calendar.js +1 -0
  409. package/dist/rating-oC2t52av.js +351 -0
  410. package/dist/rating-oC2t52av.js.map +1 -0
  411. package/dist/rating.d.ts +4 -0
  412. package/dist/rating.js +1 -0
  413. package/dist/render-part-B5XVbHaS.js +36 -0
  414. package/dist/render-part-B5XVbHaS.js.map +1 -0
  415. package/dist/render-part-BaTKiWBp.d.ts +28 -0
  416. package/dist/render.d.ts +3 -0
  417. package/dist/render.js +3 -0
  418. package/dist/roving-context-LyHQFJqZ.js +32 -0
  419. package/dist/roving-context-LyHQFJqZ.js.map +1 -0
  420. package/dist/scroll-area-_EApTP33.js +328 -0
  421. package/dist/scroll-area-_EApTP33.js.map +1 -0
  422. package/dist/scroll-area.d.ts +3 -0
  423. package/dist/scroll-area.js +1 -0
  424. package/dist/search-field-DJIr926A.js +221 -0
  425. package/dist/search-field-DJIr926A.js.map +1 -0
  426. package/dist/search-field.d.ts +4 -0
  427. package/dist/search-field.js +1 -0
  428. package/dist/segmented-control-BMvmqBpR.js +389 -0
  429. package/dist/segmented-control-BMvmqBpR.js.map +1 -0
  430. package/dist/segmented-control.d.ts +4 -0
  431. package/dist/segmented-control.js +1 -0
  432. package/dist/select-virtual-BwZrX4bh.js +53 -0
  433. package/dist/select-virtual-BwZrX4bh.js.map +1 -0
  434. package/dist/select-virtual.d.ts +3 -0
  435. package/dist/select-virtual.js +3 -0
  436. package/dist/select.d.ts +6 -0
  437. package/dist/select.js +1 -0
  438. package/dist/separator-SgHyzEHB.js +42 -0
  439. package/dist/separator-SgHyzEHB.js.map +1 -0
  440. package/dist/separator.d.ts +3 -0
  441. package/dist/separator.js +1 -0
  442. package/dist/slider-DU5Cx7yj.js +539 -0
  443. package/dist/slider-DU5Cx7yj.js.map +1 -0
  444. package/dist/slider.d.ts +4 -0
  445. package/dist/slider.js +1 -0
  446. package/dist/state-attributes-DhboDeMS.js +14 -0
  447. package/dist/state-attributes-DhboDeMS.js.map +1 -0
  448. package/dist/steps-Dl_mMqRB.js +363 -0
  449. package/dist/steps-Dl_mMqRB.js.map +1 -0
  450. package/dist/steps.d.ts +4 -0
  451. package/dist/steps.js +1 -0
  452. package/dist/switch-CT9QBKOs.js +183 -0
  453. package/dist/switch-CT9QBKOs.js.map +1 -0
  454. package/dist/switch.d.ts +4 -0
  455. package/dist/switch.js +1 -0
  456. package/dist/tabs-BhVbQ7AV.js +369 -0
  457. package/dist/tabs-BhVbQ7AV.js.map +1 -0
  458. package/dist/tabs.d.ts +4 -0
  459. package/dist/tabs.js +1 -0
  460. package/dist/tag-group-DdpjWmzb.js +422 -0
  461. package/dist/tag-group-DdpjWmzb.js.map +1 -0
  462. package/dist/tag-group.d.ts +4 -0
  463. package/dist/tag-group.js +1 -0
  464. package/dist/tags-input-Iw3mST3A.js +627 -0
  465. package/dist/tags-input-Iw3mST3A.js.map +1 -0
  466. package/dist/tags-input.d.ts +4 -0
  467. package/dist/tags-input.js +1 -0
  468. package/dist/time-field-5Ghk_4SZ.js +76 -0
  469. package/dist/time-field-5Ghk_4SZ.js.map +1 -0
  470. package/dist/time-field.d.ts +4 -0
  471. package/dist/time-field.js +1 -0
  472. package/dist/time-range-field-DNOZQK4F.js +77 -0
  473. package/dist/time-range-field-DNOZQK4F.js.map +1 -0
  474. package/dist/time-range-field.d.ts +4 -0
  475. package/dist/time-range-field.js +1 -0
  476. package/dist/toast-DBKxX79M.js +426 -0
  477. package/dist/toast-DBKxX79M.js.map +1 -0
  478. package/dist/toast.d.ts +3 -0
  479. package/dist/toast.js +1 -0
  480. package/dist/toggle-Cca0PFQv.js +101 -0
  481. package/dist/toggle-Cca0PFQv.js.map +1 -0
  482. package/dist/toggle-group-DTUrLX_H.js +102 -0
  483. package/dist/toggle-group-DTUrLX_H.js.map +1 -0
  484. package/dist/toggle-group-context-gMEC8r-Z.js +5 -0
  485. package/dist/toggle-group-context-gMEC8r-Z.js.map +1 -0
  486. package/dist/toggle-group.d.ts +4 -0
  487. package/dist/toggle-group.js +1 -0
  488. package/dist/toggle.d.ts +4 -0
  489. package/dist/toggle.js +1 -0
  490. package/dist/toolbar-WU8JwFd0.js +272 -0
  491. package/dist/toolbar-WU8JwFd0.js.map +1 -0
  492. package/dist/toolbar.d.ts +3 -0
  493. package/dist/toolbar.js +1 -0
  494. package/dist/tooltip-C1kKsTSh.js +358 -0
  495. package/dist/tooltip-C1kKsTSh.js.map +1 -0
  496. package/dist/tooltip.d.ts +9 -0
  497. package/dist/tooltip.js +1 -0
  498. package/dist/use-color-picker-binding-BrG-whys.js +32 -0
  499. package/dist/use-color-picker-binding-BrG-whys.js.map +1 -0
  500. package/dist/use-controllable-B46G4v0A.js +30 -0
  501. package/dist/use-controllable-B46G4v0A.js.map +1 -0
  502. package/dist/use-field-control-CdYqr0dK.js +109 -0
  503. package/dist/use-field-control-CdYqr0dK.js.map +1 -0
  504. package/dist/use-overlay-root-BkyTQIsX.js +296 -0
  505. package/dist/use-overlay-root-BkyTQIsX.js.map +1 -0
  506. package/dist/use-overlay-trigger-D9OXZ_6K.d.ts +12 -0
  507. package/dist/use-overlay-trigger-KM35pX0a.js +61 -0
  508. package/dist/use-overlay-trigger-KM35pX0a.js.map +1 -0
  509. package/dist/use-panel-transition-DF7f1nmF.js +112 -0
  510. package/dist/use-panel-transition-DF7f1nmF.js.map +1 -0
  511. package/dist/use-panel-transition-r_BlVRob.d.ts +2 -0
  512. package/dist/use-positioner-BD24G6q1.js +73 -0
  513. package/dist/use-positioner-BD24G6q1.js.map +1 -0
  514. package/dist/use-positioner-D98pYl_K.d.ts +12 -0
  515. package/dist/use-presence-BcvBOTDI.d.ts +3 -0
  516. package/dist/use-required-context-CPpEkr4Q.js +11 -0
  517. package/dist/use-required-context-CPpEkr4Q.js.map +1 -0
  518. package/dist/use-roving-composite-CW0mE_VU.js +71 -0
  519. package/dist/use-roving-composite-CW0mE_VU.js.map +1 -0
  520. package/dist/use-roving-item-B9Cil5Rq.js +42 -0
  521. package/dist/use-roving-item-B9Cil5Rq.js.map +1 -0
  522. package/dist/use-segment-group-CAlwM3KP.js +304 -0
  523. package/dist/use-segment-group-CAlwM3KP.js.map +1 -0
  524. package/dist/use-virtual-rows-DesBexmk.js +142 -0
  525. package/dist/use-virtual-rows-DesBexmk.js.map +1 -0
  526. package/dist/virtual-list-BNvYqnFf.js +49 -0
  527. package/dist/virtual-list-BNvYqnFf.js.map +1 -0
  528. package/dist/year-calendar-cYl3WHEM.js +18 -0
  529. package/dist/year-calendar-cYl3WHEM.js.map +1 -0
  530. package/dist/year-calendar.d.ts +5 -0
  531. package/dist/year-calendar.js +3 -0
  532. package/dist/year-picker-DYQZbF1h.js +15 -0
  533. package/dist/year-picker-DYQZbF1h.js.map +1 -0
  534. package/dist/year-picker.d.ts +8 -0
  535. package/dist/year-picker.js +3 -0
  536. package/dist/year-range-calendar-ODgfmdiv.js +18 -0
  537. package/dist/year-range-calendar-ODgfmdiv.js.map +1 -0
  538. package/dist/year-range-calendar.d.ts +5 -0
  539. package/dist/year-range-calendar.js +3 -0
  540. package/dist/year-range-picker-DKXlcy7I.js +15 -0
  541. package/dist/year-range-picker-DKXlcy7I.js.map +1 -0
  542. package/dist/year-range-picker.d.ts +8 -0
  543. package/dist/year-range-picker.js +3 -0
  544. package/package.json +548 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload-_Hh-STdv.js","names":[],"sources":["../src/components/file-upload/file-upload-context.ts","../src/components/file-upload/use-native-listener.ts","../src/components/file-upload/file-upload-clear-trigger.ts","../src/components/file-upload/file-upload-dropzone.ts","../src/components/file-upload/file-upload-hidden-input.ts","../src/components/file-upload/file-upload-item.ts","../src/components/file-upload/use-file-upload-item.ts","../src/components/file-upload/file-upload-item-delete-trigger.ts","../src/components/file-upload/file-upload-item-group.ts","../src/components/file-upload/file-upload-item-name.ts","../src/components/file-upload/file-upload-item-preview.ts","../src/components/file-upload/file-upload-item-preview-image.ts","../src/components/file-upload/file-upload-item-size-text.ts","../src/components/file-upload/file-upload-label.ts","../src/components/file-upload/file-upload-root.ts","../src/components/file-upload/file-upload-trigger.ts","../src/components/file-upload/parts.ts"],"sourcesContent":["import type { FileRejection } from \"@fragiola/primitives/file\";\nimport type { ComputedRef, InjectionKey } from \"vue\";\nimport type { ChangeReason } from \"../../utils/change-details.ts\";\n\n/** The state every part renders with (spec/file-upload.md, \"API\"). */\nexport interface FileUploadState {\n /** The accepted files. */\n value: File[];\n /** The last pick's rejected files, with their reasons. */\n rejectedFiles: FileRejection<File>[];\n disabled: boolean;\n /** No accepted file. */\n empty: boolean;\n /** A drag of files is over the Dropzone. */\n dropTarget: boolean;\n}\n\n/** An Item's state: the Root's, and its file. */\nexport interface FileUploadItemState extends FileUploadState {\n file: File;\n rejected: boolean;\n /** A rejected file's reasons (`[]` for an accepted one). */\n reasons: readonly string[];\n}\n\nexport interface FileUploadContext {\n state: ComputedRef<FileUploadState>;\n inputId: () => string;\n labelId: string;\n name: () => string | undefined;\n accept: () => string | undefined;\n multiple: () => boolean;\n capture: () => \"user\" | \"environment\" | undefined;\n required: () => boolean;\n locale: () => string | undefined;\n /** The Field's state attributes and the Root's own, for every part. */\n attributes: ComputedRef<Record<string, string>>;\n setLabelled: (labelled: boolean) => void;\n setInput: (element: unknown) => void;\n setTrigger: (element: unknown) => void;\n setDropzone: (element: unknown) => void;\n setDropTarget: (active: boolean) => void;\n /** New files from the dialog, a drop or a paste. */\n pick: (files: File[], reason: ChangeReason, event: Event) => void;\n openDialog: () => void;\n /** Removes a file from the value or the rejected list, moving the focus on. */\n remove: (file: File, event: Event, button: HTMLElement) => void;\n clear: (event: Event) => void;\n}\n\nexport const FileUploadKey: InjectionKey<FileUploadContext> =\n Symbol(\"FileUpload\");\n\nexport interface FileUploadItemContext {\n file: () => File;\n rejected: ComputedRef<boolean>;\n reasons: ComputedRef<readonly string[]>;\n attributes: ComputedRef<Record<string, string>>;\n}\n\nexport const FileUploadItemKey: InjectionKey<FileUploadItemContext> =\n Symbol(\"FileUploadItem\");\n","import { type ShallowRef, watch } from \"vue\";\n\n/**\n * A native listener on a part's element while it is mounted: Vue's event invoker skips events\n * whose timestamp is older than the handler under a fixed test clock (AGENTS.md, \"Gotchas\").\n */\nexport function useNativeListener<K extends keyof HTMLElementEventMap>(\n element: ShallowRef<HTMLElement | null>,\n type: K,\n listener: (event: HTMLElementEventMap[K], element: HTMLElement) => void,\n): void {\n watch(\n element,\n (target, _, onCleanup) => {\n if (target === null) {\n return;\n }\n const handle = (event: HTMLElementEventMap[K]) =>\n listener(event, target);\n target.addEventListener(type, handle);\n onCleanup(() => target.removeEventListener(type, handle));\n },\n { flush: \"post\" },\n );\n}\n","import { defineComponent, shallowRef } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\nimport { useNativeListener } from \"./use-native-listener.ts\";\n\n/** Removes every file; hidden while there is none (spec/file-upload.md). */\nexport const FileUploadClearTrigger: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadClearTrigger\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.ClearTrigger\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n useNativeListener(element, \"click\", (event) =>\n context.clear(event),\n );\n return () => {\n const state = context.state.value;\n return renderPart(\"button\", { attrs, slots }, props.as, state, {\n type: \"button\",\n disabled: state.disabled,\n hidden:\n (state.empty && state.rejectedFiles.length === 0) ||\n undefined,\n \"data-primitives-part\": \"file-upload-clear-trigger\",\n ...context.attributes.value,\n ref: setElement,\n });\n };\n },\n }),\n);\n","import { defineComponent, shallowRef, watch } from \"vue\";\nimport { useFileDropTarget } from \"../../composables/use-file-drop-target.ts\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\n\n/**\n * DropZone's drop target inside a FileUpload (spec/file-upload.md): its drops and pastes are the\n * Root's picks, its press opens the HiddenInput's dialog.\n */\nexport const FileUploadDropzone: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadDropzone\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.Dropzone\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setOwn = elementSetter(element);\n const setElement = (value: unknown) => {\n setOwn(value);\n context.setDropzone(value);\n };\n const disabled = () => context.state.value.disabled;\n const dropTarget = useFileDropTarget(element, {\n disabled,\n onFiles: context.pick,\n onDropTargetChange: (active) => context.setDropTarget(active),\n onActivate: context.openDialog,\n });\n watch(disabled, (next) => {\n if (next) {\n context.setDropTarget(false);\n }\n });\n return () => {\n const isDisabled = disabled();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n role: \"button\",\n tabindex: isDisabled ? undefined : 0,\n \"aria-disabled\": isDisabled ? \"true\" : undefined,\n \"data-primitives-part\": \"file-upload-dropzone\",\n ...context.attributes.value,\n ...stateAttributes({ \"drop-target\": dropTarget.value }),\n ref: setElement,\n },\n );\n };\n },\n }),\n);\n","import { VISUALLY_HIDDEN_INPUT_STYLE } from \"@fragiola/primitives/form\";\nimport { defineComponent, shallowRef } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\nimport { useNativeListener } from \"./use-native-listener.ts\";\n\n/**\n * The native file input: the form's control, its files the value (spec/file-upload.md, \"Forms\").\n * Hidden from the tab order and the accessibility tree; the Trigger and the Dropzone open it.\n */\nexport const FileUploadHiddenInput: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadHiddenInput\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.HiddenInput\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setOwn = elementSetter(element);\n const setElement = (value: unknown) => {\n setOwn(value);\n context.setInput(value);\n };\n useNativeListener(element, \"change\", (event, input) => {\n const files = [...((input as HTMLInputElement).files ?? [])];\n if (files.length > 0) {\n context.pick(files, \"input-change\", event);\n }\n });\n return () => {\n const state = context.state.value;\n return renderPart(\n \"input\",\n { attrs, slots },\n props.as,\n state,\n {\n type: \"file\",\n id: context.inputId(),\n name: context.name(),\n accept: context.accept(),\n multiple: context.multiple(),\n capture: context.capture(),\n required: context.required(),\n disabled: state.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\",\n style: VISUALLY_HIDDEN_INPUT_STYLE,\n \"data-primitives-part\": \"file-upload-hidden-input\",\n ref: setElement,\n },\n () => [],\n );\n };\n },\n }),\n);\n","import { computed, defineComponent, type PropType, provide } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport {\n FileUploadItemKey,\n type FileUploadItemState,\n FileUploadKey,\n} from \"./file-upload-context.ts\";\n\nexport interface FileUploadItemProps {\n /** The Item's file: an accepted one, or a rejected one. */\n file: File;\n}\n\nconst NO_REASONS: readonly string[] = [];\n\n/** One file, accepted or rejected (spec/file-upload.md). */\nexport const FileUploadItem: PartComponent<\n FileUploadItemProps,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItem\",\n inheritAttrs: false,\n props: {\n ...asProp,\n file: { type: Object as PropType<File>, required: true },\n },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.Item\",\n );\n const rejection = computed(() => {\n const state = context.state.value;\n const found = state.rejectedFiles.find(\n (entry) => entry.file === props.file,\n );\n return found !== undefined && !state.value.includes(props.file)\n ? found\n : undefined;\n });\n const rejected = computed(() => rejection.value !== undefined);\n const reasons = computed(\n () => rejection.value?.reasons ?? NO_REASONS,\n );\n const attributes = computed(() => ({\n ...context.attributes.value,\n ...stateAttributes({ rejected: rejected.value }),\n }));\n provide(FileUploadItemKey, {\n file: () => props.file,\n rejected,\n reasons,\n attributes,\n });\n return () =>\n renderPart(\n \"li\",\n { attrs, slots },\n props.as,\n {\n ...context.state.value,\n file: props.file,\n rejected: rejected.value,\n reasons: reasons.value,\n },\n {\n \"data-primitives-part\": \"file-upload-item\",\n ...attributes.value,\n },\n );\n },\n }),\n);\n","import { type ComputedRef, computed } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type FileUploadContext,\n type FileUploadItemContext,\n FileUploadItemKey,\n type FileUploadItemState,\n FileUploadKey,\n} from \"./file-upload-context.ts\";\n\n/** An Item part's contexts and state. */\nexport function useFileUploadItem(part: string): {\n root: FileUploadContext;\n item: FileUploadItemContext;\n state: ComputedRef<FileUploadItemState>;\n} {\n const root = useRequiredContext(FileUploadKey, part);\n const item = useRequiredContext(FileUploadItemKey, part);\n const state = computed<FileUploadItemState>(() => ({\n ...root.state.value,\n file: item.file(),\n rejected: item.rejected.value,\n reasons: item.reasons.value,\n }));\n return { root, item, state };\n}\n","import { defineComponent, shallowRef } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport type { FileUploadItemState } from \"./file-upload-context.ts\";\nimport { useFileUploadItem } from \"./use-file-upload-item.ts\";\nimport { useNativeListener } from \"./use-native-listener.ts\";\n\n/** Removes the Item's file, moving the focus on (spec/file-upload.md, \"Focus\"). */\nexport const FileUploadItemDeleteTrigger: PartComponent<\n Record<never, never>,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemDeleteTrigger\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const { root, item, state } = useFileUploadItem(\n \"FileUpload.ItemDeleteTrigger\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n useNativeListener(element, \"click\", (event, button) =>\n root.remove(item.file(), event, button),\n );\n return () =>\n renderPart(\"button\", { attrs, slots }, props.as, state.value, {\n type: \"button\",\n disabled: state.value.disabled,\n \"data-primitives-part\": \"file-upload-item-delete-trigger\",\n ...item.attributes.value,\n ref: setElement,\n });\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\n\n/** The list of Items (spec/file-upload.md). */\nexport const FileUploadItemGroup: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemGroup\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.ItemGroup\",\n );\n return () =>\n renderPart(\n \"ul\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n \"data-primitives-part\": \"file-upload-item-group\",\n ...context.attributes.value,\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport type { FileUploadItemState } from \"./file-upload-context.ts\";\nimport { useFileUploadItem } from \"./use-file-upload-item.ts\";\n\n/** The Item's file name, unless the app gives content (spec/file-upload.md). */\nexport const FileUploadItemName: PartComponent<\n Record<never, never>,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemName\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const { item, state } = useFileUploadItem(\"FileUpload.ItemName\");\n return () =>\n renderPart(\n \"span\",\n { attrs, slots },\n props.as,\n state.value,\n {\n \"data-primitives-part\": \"file-upload-item-name\",\n ...item.attributes.value,\n },\n () =>\n slots.default?.({ state: state.value }) ??\n item.file().name,\n );\n },\n }),\n);\n","import { acceptsFile } from \"@fragiola/primitives/file\";\nimport { defineComponent } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport type { FileUploadItemState } from \"./file-upload-context.ts\";\nimport { useFileUploadItem } from \"./use-file-upload-item.ts\";\n\nexport interface FileUploadItemPreviewProps {\n /** The files it previews, an `accept` pattern (default `\"image/*\"`). */\n type?: string;\n}\n\n/** A preview, rendered only for a file of its type (spec/file-upload.md). */\nexport const FileUploadItemPreview: PartComponent<\n FileUploadItemPreviewProps,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemPreview\",\n inheritAttrs: false,\n props: { ...asProp, type: { type: String, default: \"image/*\" } },\n setup(props, { attrs, slots }) {\n const { item, state } = useFileUploadItem(\"FileUpload.ItemPreview\");\n return () => {\n if (!acceptsFile(item.file(), props.type)) {\n return null;\n }\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n state.value,\n {\n \"data-primitives-part\": \"file-upload-item-preview\",\n ...item.attributes.value,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent, shallowRef, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport type { FileUploadItemState } from \"./file-upload-context.ts\";\nimport { useFileUploadItem } from \"./use-file-upload-item.ts\";\n\n/**\n * The Item's file as an image, through an object URL made once mounted and revoked when it\n * unmounts or its file changes (spec/file-upload.md); `alt` is the app's.\n */\nexport const FileUploadItemPreviewImage: PartComponent<\n Record<never, never>,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemPreviewImage\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const { item, state } = useFileUploadItem(\n \"FileUpload.ItemPreviewImage\",\n );\n const image = shallowRef<HTMLElement | null>(null);\n const setImage = elementSetter(image);\n const src = shallowRef<string>();\n watch(\n [image, item.file],\n ([element, file], _, onCleanup) => {\n const url = element?.ownerDocument.defaultView?.URL;\n if (url === undefined) {\n return;\n }\n const objectUrl = url.createObjectURL(file);\n src.value = objectUrl;\n onCleanup(() => url.revokeObjectURL(objectUrl));\n },\n { flush: \"post\" },\n );\n return () =>\n renderPart(\n \"img\",\n { attrs, slots },\n props.as,\n state.value,\n {\n src: src.value,\n \"data-primitives-part\":\n \"file-upload-item-preview-image\",\n ...item.attributes.value,\n ref: setImage,\n },\n () => [],\n );\n },\n }),\n);\n","import { formatFileSize } from \"@fragiola/primitives/file\";\nimport { defineComponent } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport type { FileUploadItemState } from \"./file-upload-context.ts\";\nimport { useFileUploadItem } from \"./use-file-upload-item.ts\";\n\n/** The Item's file size in the locale's bytes, unless the app gives content (spec/file-upload.md). */\nexport const FileUploadItemSizeText: PartComponent<\n Record<never, never>,\n FileUploadItemState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadItemSizeText\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const { root, item, state } = useFileUploadItem(\n \"FileUpload.ItemSizeText\",\n );\n return () =>\n renderPart(\n \"span\",\n { attrs, slots },\n props.as,\n state.value,\n {\n \"data-primitives-part\": \"file-upload-item-size-text\",\n ...item.attributes.value,\n },\n () =>\n slots.default?.({ state: state.value }) ??\n formatFileSize(item.file().size, root.locale()),\n );\n },\n }),\n);\n","import { defineComponent, onBeforeUnmount, onMounted } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\n\n/** The label of the HiddenInput (a press opens the dialog), naming the Root (spec/file-upload.md). */\nexport const FileUploadLabel: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadLabel\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.Label\",\n );\n onMounted(() => context.setLabelled(true));\n onBeforeUnmount(() => context.setLabelled(false));\n return () =>\n renderPart(\n \"label\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n id: context.labelId,\n for: context.inputId(),\n \"data-primitives-part\": \"file-upload-label\",\n ...context.attributes.value,\n },\n );\n },\n }),\n);\n","import { announceText } from \"@fragiola/primitives/clipboard\";\nimport {\n acceptAttribute,\n assignFiles,\n checkFiles,\n type FileAccept,\n type FileRejection,\n fieldFiles,\n} from \"@fragiola/primitives/file\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport {\n computed,\n defineComponent,\n h,\n type PropType,\n provide,\n type SlotsType,\n shallowRef,\n useId,\n type VNode,\n watch,\n} from \"vue\";\nimport { useControllable } from \"../../composables/use-controllable.ts\";\nimport { useFieldControl } from \"../../composables/use-field-control.ts\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport type {\n ChangeDetails,\n ChangeReason,\n} from \"../../utils/change-details.ts\";\nimport { LIVE_REGION_STYLE } from \"../../utils/live-region-style.ts\";\nimport {\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport {\n type AsProp,\n asProp,\n type RenderSlotProps,\n renderPart,\n} from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\n\n/** What `announcement` receives after a pick. */\nexport interface FileUploadPickDetails extends ChangeDetails {\n /** The accepted files after the pick. */\n value: File[];\n /** The pick's accepted files. */\n acceptedFiles: File[];\n rejectedFiles: FileRejection<File>[];\n}\n\nexport interface FileUploadRootSlots {\n default?: (scope: FileUploadState) => VNode[];\n render?: (scope: RenderSlotProps<FileUploadState>) => VNode[];\n}\n\nexport interface FileUploadRootProps {\n as?: AsProp;\n /** The accepted files (`v-model:value`). */\n value?: File[];\n defaultValue?: File[];\n accept?: FileAccept;\n /** At most this many files (default `1`: a new pick replaces the file). */\n maxFiles?: number;\n minFileSize?: number;\n maxFileSize?: number;\n validate?: (\n file: File,\n value: readonly File[],\n ) => readonly string[] | null | undefined;\n name?: string;\n required?: boolean;\n disabled?: boolean;\n capture?: \"user\" | \"environment\";\n /** The HiddenInput's id. */\n id?: string;\n /** ItemSizeText's locale (default: the runtime's). */\n locale?: string;\n /** The text announced (politely) after each pick. */\n announcement?: (details: FileUploadPickDetails) => string;\n}\n\nexport type FileUploadRootEmits = {\n \"update:value\": (value: File[]) => true;\n valueChange: (value: File[], details: ChangeDetails) => true;\n fileReject: (\n rejections: FileRejection<File>[],\n details: ChangeDetails,\n ) => true;\n};\n\nconst NO_FILES: File[] = [];\nconst DELETE_SELECTOR =\n '[data-primitives-part=\"file-upload-item-delete-trigger\"]';\n\n/**\n * A form control holding a list of files (spec/file-upload.md): the checks of each pick, the\n * accepted and rejected lists, the hidden file input its files are assigned to, the Field binding,\n * and a polite live region it renders as its last child.\n */\nexport const FileUploadRoot: PublicComponent<\n FileUploadRootProps,\n FileUploadRootSlots,\n FileUploadRootEmits\n> = publicComponent(\n defineComponent({\n name: \"FileUploadRoot\",\n inheritAttrs: false,\n props: {\n ...asProp,\n value: { type: Array as PropType<File[]>, default: undefined },\n defaultValue: {\n type: Array as PropType<File[]>,\n default: undefined,\n },\n accept: {\n type: [String, Array] as PropType<FileAccept>,\n default: undefined,\n },\n maxFiles: { type: Number, default: 1 },\n minFileSize: { type: Number, default: undefined },\n maxFileSize: { type: Number, default: undefined },\n validate: {\n type: Function as PropType<\n (\n file: File,\n value: readonly File[],\n ) => readonly string[] | null | undefined\n >,\n default: undefined,\n },\n name: { type: String, default: undefined },\n required: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n capture: {\n type: String as PropType<\"user\" | \"environment\">,\n default: undefined,\n },\n id: { type: String, default: undefined },\n locale: { type: String, default: undefined },\n announcement: {\n type: Function as PropType<\n (details: FileUploadPickDetails) => string\n >,\n default: undefined,\n },\n },\n emits: {\n \"update:value\": (_value: File[]) => true,\n valueChange: (_value: File[], _details: ChangeDetails) => true,\n fileReject: (\n _rejections: FileRejection<File>[],\n _details: ChangeDetails,\n ) => true,\n },\n slots: Object as SlotsType<FileUploadRootSlots>,\n setup(props, { attrs, slots, emit }) {\n // read at reset time too: a form reset takes the current default\n const defaultValue = () => props.defaultValue ?? NO_FILES;\n const own = useControllable<File[], ChangeDetails>(\n () => props.value,\n defaultValue(),\n (next, details) => {\n emit(\"update:value\", next);\n emit(\"valueChange\", next, details);\n },\n );\n const value = own.value;\n const rejectedFiles = shallowRef<FileRejection<File>[]>([]);\n const dropTarget = shallowRef(false);\n const labelled = shallowRef(false);\n const input = shallowRef<HTMLElement | null>(null);\n const trigger = shallowRef<HTMLElement | null>(null);\n const dropzone = shallowRef<HTMLElement | null>(null);\n const root = shallowRef<HTMLElement | null>(null);\n const announcer = shallowRef<HTMLElement | null>(null);\n const setAnnouncer = elementSetter(announcer);\n const setRoot = elementSetter(root);\n // a pick re-assigns the input's files even when the value did not change (the dialog\n // wrote the picked files into it)\n const syncs = shallowRef(0);\n const generatedId = useId();\n const inputId = () => props.id ?? `${generatedId}input`;\n const labelId = `${generatedId}label`;\n const fileInput = () => input.value as HTMLInputElement | null;\n\n const fieldValue = computed(() => fieldFiles(value.value));\n const field = useFieldControl({\n id: inputId,\n labelable: true,\n value: () => fieldValue.value,\n filled: () => value.value.length > 0,\n input: fileInput,\n focusTarget: () => trigger.value ?? dropzone.value,\n });\n const disabled = () => props.disabled || field.disabled();\n\n watch(\n [input, value, syncs],\n () => {\n const element = fileInput();\n if (element !== null) {\n assignFiles(element, value.value);\n }\n },\n { flush: \"post\" },\n );\n\n const pick = (\n files: File[],\n reason: ChangeReason,\n event: Event,\n ) => {\n if (disabled()) {\n return;\n }\n const result = checkFiles(value.value, files, {\n accept: props.accept,\n maxFiles: props.maxFiles,\n minFileSize: props.minFileSize,\n maxFileSize: props.maxFileSize,\n validate: props.validate,\n });\n syncs.value += 1;\n rejectedFiles.value = result.rejected;\n const details = { reason, event };\n if (result.accepted.length > 0) {\n own.set(result.value, details);\n }\n if (result.rejected.length > 0) {\n emit(\"fileReject\", result.rejected, details);\n }\n if (props.announcement !== undefined && announcer.value) {\n announceText(\n announcer.value,\n props.announcement({\n value: result.value,\n acceptedFiles: result.accepted,\n rejectedFiles: result.rejected,\n reason,\n event,\n }),\n );\n }\n };\n const openDialog = () => {\n if (!disabled()) {\n fileInput()?.click();\n }\n };\n const focusControl = () =>\n (trigger.value ?? dropzone.value)?.focus();\n const remove = (file: File, event: Event, button: HTMLElement) => {\n // the focus moves to the next delete button, else the previous one, else the\n // Trigger (spec/file-upload.md, \"Focus\"), in the button's ItemGroup\n const scope =\n button.closest(\n '[data-primitives-part=\"file-upload-item-group\"]',\n ) ?? root.value;\n const buttons = [\n ...(scope?.querySelectorAll<HTMLElement>(DELETE_SELECTOR) ??\n []),\n ];\n const index = buttons.indexOf(button);\n const next =\n index === -1\n ? undefined\n : (buttons[index + 1] ?? buttons[index - 1]);\n if (next !== undefined) {\n next.focus();\n } else {\n focusControl();\n }\n if (value.value.includes(file)) {\n own.set(\n value.value.filter((entry: File) => entry !== file),\n { reason: \"delete-press\", event },\n );\n } else {\n rejectedFiles.value = rejectedFiles.value.filter(\n (entry) => entry.file !== file,\n );\n }\n };\n const clear = (event: Event) => {\n focusControl();\n rejectedFiles.value = [];\n if (value.value.length > 0) {\n own.set([], { reason: \"clear-press\", event });\n }\n };\n\n // a form reset returns to the default value (spec/file-upload.md, \"Forms\")\n watch(\n input,\n (element, _, onCleanup) => {\n if (element === null) {\n return;\n }\n onCleanup(\n bridgeForm(element as HTMLInputElement, {\n reset: () => {\n field.reset();\n rejectedFiles.value = [];\n syncs.value += 1;\n own.set(defaultValue(), { reason: \"none\" });\n },\n invalid: () => trigger.value ?? dropzone.value,\n }),\n );\n },\n { flush: \"post\" },\n );\n\n const state = computed<FileUploadState>(() => ({\n value: value.value,\n rejectedFiles: rejectedFiles.value,\n disabled: disabled(),\n empty: value.value.length === 0,\n dropTarget: dropTarget.value,\n }));\n const attributes = computed(() => ({\n ...field.attributes(),\n ...stateAttributes({\n disabled: state.value.disabled,\n empty: state.value.empty,\n \"drop-target\": state.value.dropTarget,\n }),\n }));\n provide(FileUploadKey, {\n state,\n inputId,\n labelId,\n name: () => field.name() ?? props.name,\n accept: () => acceptAttribute(props.accept),\n multiple: () => props.maxFiles > 1,\n capture: () => props.capture,\n required: () => props.required,\n locale: () => props.locale,\n attributes,\n setLabelled: (next) => {\n labelled.value = next;\n },\n setInput: elementSetter(input),\n setTrigger: elementSetter(trigger),\n setDropzone: elementSetter(dropzone),\n setDropTarget: (active) => {\n dropTarget.value = active;\n },\n pick,\n openDialog,\n remove,\n clear,\n });\n\n const onFocusin = () => field.onFocus();\n const onFocusout = (event: FocusEvent) => {\n const next = event.relatedTarget;\n if (next instanceof Node && root.value?.contains(next)) {\n return;\n }\n field.onBlur();\n };\n\n return () => {\n const aria = field.aria();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n state.value,\n {\n role: \"group\",\n \"aria-labelledby\": field.inField\n ? aria[\"aria-labelledby\"]\n : labelled.value\n ? labelId\n : undefined,\n \"aria-describedby\": aria[\"aria-describedby\"],\n \"aria-invalid\": aria[\"aria-invalid\"],\n \"data-primitives-part\": \"file-upload-root\",\n ...attributes.value,\n onFocusin,\n onFocusout,\n ref: setRoot,\n },\n () => [\n ...(slots.default?.(state.value) ?? []),\n // the toolkit writes its text: it renders no children\n h(\"span\", {\n ref: setAnnouncer,\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"file-upload-announcer\",\n style: LIVE_REGION_STYLE,\n }),\n ],\n );\n };\n },\n }),\n);\n","import { defineComponent, shallowRef } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { FileUploadKey, type FileUploadState } from \"./file-upload-context.ts\";\nimport { useNativeListener } from \"./use-native-listener.ts\";\n\n/** The button that opens the file dialog (spec/file-upload.md). */\nexport const FileUploadTrigger: PartComponent<\n Record<never, never>,\n FileUploadState\n> = publicComponent(\n defineComponent({\n name: \"FileUploadTrigger\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n FileUploadKey,\n \"FileUpload.Trigger\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setOwn = elementSetter(element);\n const setElement = (value: unknown) => {\n setOwn(value);\n context.setTrigger(value);\n };\n useNativeListener(element, \"click\", () => context.openDialog());\n return () =>\n renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n type: \"button\",\n disabled: context.state.value.disabled,\n \"data-primitives-part\": \"file-upload-trigger\",\n ...context.attributes.value,\n ref: setElement,\n },\n );\n },\n }),\n);\n","import { FileUploadClearTrigger } from \"./file-upload-clear-trigger.ts\";\nimport { FileUploadDropzone } from \"./file-upload-dropzone.ts\";\nimport { FileUploadHiddenInput } from \"./file-upload-hidden-input.ts\";\nimport { FileUploadItem } from \"./file-upload-item.ts\";\nimport { FileUploadItemDeleteTrigger } from \"./file-upload-item-delete-trigger.ts\";\nimport { FileUploadItemGroup } from \"./file-upload-item-group.ts\";\nimport { FileUploadItemName } from \"./file-upload-item-name.ts\";\nimport { FileUploadItemPreview } from \"./file-upload-item-preview.ts\";\nimport { FileUploadItemPreviewImage } from \"./file-upload-item-preview-image.ts\";\nimport { FileUploadItemSizeText } from \"./file-upload-item-size-text.ts\";\nimport { FileUploadLabel } from \"./file-upload-label.ts\";\nimport { FileUploadRoot } from \"./file-upload-root.ts\";\nimport { FileUploadTrigger } from \"./file-upload-trigger.ts\";\n\n/** spec/file-upload.md */\nexport const FileUpload = {\n Root: FileUploadRoot,\n Label: FileUploadLabel,\n Dropzone: FileUploadDropzone,\n Trigger: FileUploadTrigger,\n HiddenInput: FileUploadHiddenInput,\n ItemGroup: FileUploadItemGroup,\n Item: FileUploadItem,\n ItemName: FileUploadItemName,\n ItemSizeText: FileUploadItemSizeText,\n ItemPreview: FileUploadItemPreview,\n ItemPreviewImage: FileUploadItemPreviewImage,\n ItemDeleteTrigger: FileUploadItemDeleteTrigger,\n ClearTrigger: FileUploadClearTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;AAkDA,MAAa,gBACT,OAAO,YAAY;AASvB,MAAa,oBACT,OAAO,gBAAgB;;;;;;ACvD3B,SAAgB,kBACZ,SACA,MACA,UACI;CACJ,MACI,UACC,QAAQ,GAAG,cAAc;EACtB,IAAI,WAAW,MACX;EAEJ,MAAM,UAAU,UACZ,SAAS,OAAO,MAAM;EAC1B,OAAO,iBAAiB,MAAM,MAAM;EACpC,gBAAgB,OAAO,oBAAoB,MAAM,MAAM,CAAC;CAC5D,GACA,EAAE,OAAO,OAAO,CACpB;AACJ;;;ACZA,MAAa,yBAGT,gBACA,gBAAgB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a;IACT,MAAM,OAAO,MAAM,KAAK;IACxB,OAAO,WACH,OACA;KAAE;KAAO;IAAM,GACf,MAAM,IACN,MAAM,OACN;KACI,MAAM;KACN,mBAAmB,MAAM,UACnB,KAAK,qBACL,SAAS,QACP,UACA,KAAA;KACR,oBAAoB,KAAK;KACzB,gBAAgB,KAAK;KACrB,wBAAwB;KACxB,GAAG,WAAW;KACd;KACA;KACA,KAAK;IACT,SACM,CACF,GAAI,MAAM,UAAU,MAAM,KAAK,KAAK,CAAC,GAErC,EAAE,QAAQ;KACN,KAAK;KACL,aAAa;KACb,eAAe;KACf,wBAAwB;KACxB,OAAO;IACX,CAAC,CACL,CACJ;GACJ;EACJ;CACJ,CAAC,CEjYK;CACN,OAAO;CACP,UAAU;CACV,SDJA,gBACA,gBAAgB;EACZ,MAAM;EACN,cAAc;EACd,OAAO;EACP,MAAM,OAAO,EAAE,OAAO,SAAS;GAC3B,MAAM,UAAU,mBACZ,eACA,oBACJ;GACA,MAAM,UAAU,WAA+B,IAAI;GACnD,MAAM,SAAS,cAAc,OAAO;GACpC,MAAM,cAAc,UAAmB;IACnC,OAAO,KAAK;IACZ,QAAQ,WAAW,KAAK;GAC5B;GACA,kBAAkB,SAAS,eAAe,QAAQ,WAAW,CAAC;GAC9D,aACI,WACI,UACA;IAAE;IAAO;GAAM,GACf,MAAM,IACN,QAAQ,MAAM,OACd;IACI,MAAM;IACN,UAAU,QAAQ,MAAM,MAAM;IAC9B,wBAAwB;IACxB,GAAG,QAAQ,WAAW;IACtB,KAAK;GACT,CACJ;EACR;CACJ,CAAC,CC5BQ;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,UAAU;CACV,cAAc;CACd,aAAa;CACb,kBAAkB;CAClB,mBAAmB;CACnB,cAAc;AAClB"}
@@ -0,0 +1,4 @@
1
+ import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
+ import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
+ import { a as FileUpload, c as FileUploadRootProps, d as FileUploadItemProps, f as FileUploadItemState, i as FileRejectionReason, l as FileUploadRootSlots, n as FileAccept, o as FileUploadPickDetails, p as FileUploadState, r as FileRejection, s as FileUploadRootEmits, t as CheckedFile, u as FileUploadItemPreviewProps } from "./index-Cgwn5qgy.js";
4
+ export { type ChangeDetails, type ChangeReason, type CheckedFile, type FileAccept, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadItemPreviewProps, type FileUploadItemProps, type FileUploadItemState, type FileUploadPickDetails, type FileUploadRootEmits, type FileUploadRootProps, type FileUploadRootSlots, type FileUploadState, type RenderSlotProps };
@@ -0,0 +1 @@
1
+ export { t as FileUpload } from "./file-upload-_Hh-STdv.js";
@@ -0,0 +1,5 @@
1
+ // src/components/field/form-context.ts
2
+ const FormKey = Symbol("Form");
3
+ export { FormKey as t };
4
+
5
+ //# sourceMappingURL=form-context-DBnVT1lw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-context-DBnVT1lw.js","names":[],"sources":["../src/components/field/form-context.ts"],"sourcesContent":["import type {\n FieldValidationMode,\n FormErrors,\n} from \"@fragiola/primitives/form\";\nimport type { InjectionKey, ShallowRef } from \"vue\";\n\n/** A field, as the enclosing Form sees it (spec/form.md, \"A submission\"). */\nexport interface FormField {\n name: () => string | undefined;\n /** Validates as on a submission attempt; whether the field is invalid now. */\n submitAttempt: () => boolean;\n /** The element the Form focuses when it is the first invalid field. */\n focusTarget: () => HTMLElement | null;\n}\n\n/**\n * What a Form gives the fields inside it (spec/form.md). It lives with the Field, which reads it:\n * Form is built on Field, never the other way round.\n */\nexport interface FormContext {\n validationMode: () => FieldValidationMode;\n /** The Form's copy of its server errors. */\n errors: ShallowRef<FormErrors>;\n /** Drops a field's errors (its value changed). */\n clearErrors: (name: string) => void;\n register: (field: FormField) => () => void;\n}\n\nexport const FormKey: InjectionKey<FormContext> = Symbol(\"Form\");\n"],"mappings":";AA4BA,MAAa,UAAqC,OAAO,MAAM"}
@@ -0,0 +1,92 @@
1
+ import { t as elementSetter } from "./use-overlay-root-BkyTQIsX.js";
2
+ import { t as publicComponent } from "./public-component-AV8E7mGp.js";
3
+ import { n as renderPart, t as asProp } from "./render-part-B5XVbHaS.js";
4
+ import { t as FormKey } from "./form-context-DBnVT1lw.js";
5
+ import { defineComponent, nextTick, provide, shallowRef, watch } from "vue";
6
+ import { firstInDocumentOrder, focusFieldControl, formErrorsFor, guardFormSubmit, withoutFormErrors } from "@fragiola/primitives/form";
7
+ // src/components/form/form.ts
8
+ const NO_ERRORS = {};
9
+ /** Focuses the first of these fields, in document order, that has a focus target. */
10
+ function focusFirst(fields) {
11
+ const target = firstInDocumentOrder(fields.map((field) => field.focusTarget()));
12
+ if (target !== null) focusFieldControl(target);
13
+ }
14
+ /**
15
+ * A native `form` that validates its Fields itself (`novalidate`): a submission shows every error,
16
+ * focuses the first invalid field and is blocked while one is invalid, before any `@submit` of the
17
+ * consumer's runs; it shows server errors on the fields they name (spec/form.md).
18
+ */
19
+ const Form = publicComponent(defineComponent({
20
+ name: "FormRoot",
21
+ inheritAttrs: false,
22
+ props: {
23
+ ...asProp,
24
+ /** Server errors, keyed by the fields' `name`; the Form keeps its own copy. */
25
+ errors: {
26
+ type: Object,
27
+ default: void 0
28
+ },
29
+ /** The default of every Field inside it (default `"onSubmit"`). */
30
+ validationMode: {
31
+ type: String,
32
+ default: "onSubmit"
33
+ }
34
+ },
35
+ emits: {
36
+ /** A field's value changed while the Form had errors for it: the errors left. */
37
+ clearErrors: (_errors) => true },
38
+ setup(props, { attrs, slots, emit }) {
39
+ const errors = shallowRef(props.errors ?? NO_ERRORS);
40
+ const fields = /* @__PURE__ */ new Set();
41
+ let submitted = false;
42
+ watch(() => props.errors, (next) => {
43
+ errors.value = next ?? NO_ERRORS;
44
+ if (submitted) {
45
+ submitted = false;
46
+ nextTick().then(() => focusFirst([...fields].filter((field) => formErrorsFor(errors.value, field.name()).length > 0)));
47
+ }
48
+ });
49
+ provide(FormKey, {
50
+ validationMode: () => props.validationMode,
51
+ errors,
52
+ clearErrors(name) {
53
+ const next = withoutFormErrors(errors.value, name);
54
+ if (next !== errors.value) {
55
+ errors.value = next;
56
+ emit("clearErrors", next);
57
+ }
58
+ },
59
+ register(field) {
60
+ fields.add(field);
61
+ return () => {
62
+ fields.delete(field);
63
+ };
64
+ }
65
+ });
66
+ const element = shallowRef(null);
67
+ const setElement = elementSetter(element);
68
+ const attempt = () => {
69
+ const invalid = [...fields].filter((field) => field.submitAttempt());
70
+ if (invalid.length > 0) {
71
+ focusFirst(invalid);
72
+ return false;
73
+ }
74
+ submitted = true;
75
+ return true;
76
+ };
77
+ watch(element, (form, _, onCleanup) => {
78
+ if (form instanceof HTMLFormElement) onCleanup(guardFormSubmit(form, attempt));
79
+ }, { flush: "post" });
80
+ return () => renderPart("form", {
81
+ attrs,
82
+ slots
83
+ }, props.as, {}, {
84
+ novalidate: true,
85
+ "data-primitives-part": "form-root",
86
+ ref: setElement
87
+ });
88
+ }
89
+ }));
90
+ export { Form as t };
91
+
92
+ //# sourceMappingURL=form-s9HijjTL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-s9HijjTL.js","names":[],"sources":["../src/components/form/form.ts"],"sourcesContent":["import {\n type FieldValidationMode,\n type FormErrors,\n firstInDocumentOrder,\n focusFieldControl,\n formErrorsFor,\n guardFormSubmit,\n withoutFormErrors,\n} from \"@fragiola/primitives/form\";\nimport {\n defineComponent,\n nextTick,\n type PropType,\n provide,\n shallowRef,\n watch,\n} from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { type FormField, FormKey } from \"../field/form-context.ts\";\n\nexport type FormState = Record<never, never>;\n\nexport interface FormProps {\n /** Server errors, keyed by the fields' `name`; the Form keeps its own copy. */\n errors?: FormErrors;\n /** The default of every Field inside it (default `\"onSubmit\"`). */\n validationMode?: FieldValidationMode;\n}\n\nexport type FormEmits = {\n /** A field's value changed while the Form had errors for it: the errors left. */\n clearErrors: (errors: FormErrors) => true;\n};\n\nconst NO_ERRORS: FormErrors = {};\n\n/** Focuses the first of these fields, in document order, that has a focus target. */\nfunction focusFirst(fields: readonly FormField[]): void {\n const target = firstInDocumentOrder(\n fields.map((field) => field.focusTarget()),\n );\n if (target !== null) {\n focusFieldControl(target);\n }\n}\n\n/**\n * A native `form` that validates its Fields itself (`novalidate`): a submission shows every error,\n * focuses the first invalid field and is blocked while one is invalid, before any `@submit` of the\n * consumer's runs; it shows server errors on the fields they name (spec/form.md).\n */\nexport const Form: PartComponent<FormProps, FormState, FormEmits> =\n publicComponent(\n defineComponent({\n // a single-word name would read as the `form` element\n name: \"FormRoot\",\n inheritAttrs: false,\n props: {\n ...asProp,\n /** Server errors, keyed by the fields' `name`; the Form keeps its own copy. */\n errors: {\n type: Object as PropType<FormErrors>,\n default: undefined,\n },\n /** The default of every Field inside it (default `\"onSubmit\"`). */\n validationMode: {\n type: String as PropType<FieldValidationMode>,\n default: \"onSubmit\",\n },\n },\n emits: {\n /** A field's value changed while the Form had errors for it: the errors left. */\n clearErrors: (_errors: FormErrors) => true,\n },\n setup(props, { attrs, slots, emit }) {\n const errors = shallowRef<FormErrors>(\n props.errors ?? NO_ERRORS,\n );\n const fields = new Set<FormField>();\n // a submission went on: the next `errors` is the server's answer\n let submitted = false;\n watch(\n () => props.errors,\n (next) => {\n errors.value = next ?? NO_ERRORS;\n if (submitted) {\n submitted = false;\n // once the fields rendered the new errors: the first field the\n // server's answer names\n void nextTick().then(() =>\n focusFirst(\n [...fields].filter(\n (field) =>\n formErrorsFor(\n errors.value,\n field.name(),\n ).length > 0,\n ),\n ),\n );\n }\n },\n );\n provide(FormKey, {\n validationMode: () => props.validationMode,\n errors,\n clearErrors(name) {\n const next = withoutFormErrors(errors.value, name);\n if (next !== errors.value) {\n errors.value = next;\n emit(\"clearErrors\", next);\n }\n },\n register(field) {\n fields.add(field);\n return () => {\n fields.delete(field);\n };\n },\n });\n\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n const attempt = () => {\n // every field validates and shows its errors, the first invalid takes focus\n const invalid = [...fields].filter((field) =>\n field.submitAttempt(),\n );\n if (invalid.length > 0) {\n focusFirst(invalid);\n return false;\n }\n submitted = true;\n return true;\n };\n watch(\n element,\n (form, _, onCleanup) => {\n if (form instanceof HTMLFormElement) {\n onCleanup(guardFormSubmit(form, attempt));\n }\n },\n { flush: \"post\" },\n );\n return () =>\n renderPart(\n \"form\",\n { attrs, slots },\n props.as,\n {},\n {\n novalidate: true,\n \"data-primitives-part\": \"form-root\",\n ref: setElement,\n },\n );\n },\n }),\n );\n"],"mappings":";;;;;;;AAuCA,MAAM,YAAwB,CAAC;;AAG/B,SAAS,WAAW,QAAoC;CACpD,MAAM,SAAS,qBACX,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC,CAC7C;CACA,IAAI,WAAW,MACX,kBAAkB,MAAM;AAEhC;;;;;;AAOA,MAAa,OACT,gBACI,gBAAgB;CAEZ,MAAM;CACN,cAAc;CACd,OAAO;EACH,GAAG;;EAEH,QAAQ;GACJ,MAAM;GACN,SAAS,KAAA;EACb;;EAEA,gBAAgB;GACZ,MAAM;GACN,SAAS;EACb;CACJ;CACA,OAAO;;AAEH,cAAc,YAAwB,KAC1C;CACA,MAAM,OAAO,EAAE,OAAO,OAAO,QAAQ;EACjC,MAAM,SAAS,WACX,MAAM,UAAU,SACpB;EACA,MAAM,yBAAS,IAAI,IAAe;EAElC,IAAI,YAAY;EAChB,YACU,MAAM,SACX,SAAS;GACN,OAAO,QAAQ,QAAQ;GACvB,IAAI,WAAW;IACX,YAAY;IAGP,SAAS,CAAC,CAAC,WACZ,WACI,CAAC,GAAG,MAAM,CAAC,CAAC,QACP,UACG,cACI,OAAO,OACP,MAAM,KAAK,CACf,CAAC,CAAC,SAAS,CACnB,CACJ,CACJ;GACJ;EACJ,CACJ;EACA,QAAQ,SAAS;GACb,sBAAsB,MAAM;GAC5B;GACA,YAAY,MAAM;IACd,MAAM,OAAO,kBAAkB,OAAO,OAAO,IAAI;IACjD,IAAI,SAAS,OAAO,OAAO;KACvB,OAAO,QAAQ;KACf,KAAK,eAAe,IAAI;IAC5B;GACJ;GACA,SAAS,OAAO;IACZ,OAAO,IAAI,KAAK;IAChB,aAAa;KACT,OAAO,OAAO,KAAK;IACvB;GACJ;EACJ,CAAC;EAED,MAAM,UAAU,WAA+B,IAAI;EACnD,MAAM,aAAa,cAAc,OAAO;EACxC,MAAM,gBAAgB;GAElB,MAAM,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC,QAAQ,UAChC,MAAM,cAAc,CACxB;GACA,IAAI,QAAQ,SAAS,GAAG;IACpB,WAAW,OAAO;IAClB,OAAO;GACX;GACA,YAAY;GACZ,OAAO;EACX;EACA,MACI,UACC,MAAM,GAAG,cAAc;GACpB,IAAI,gBAAgB,iBAChB,UAAU,gBAAgB,MAAM,OAAO,CAAC;EAEhD,GACA,EAAE,OAAO,OAAO,CACpB;EACA,aACI,WACI,QACA;GAAE;GAAO;EAAM,GACf,MAAM,IACN,CAAC,GACD;GACI,YAAY;GACZ,wBAAwB;GACxB,KAAK;EACT,CACJ;CACR;AACJ,CAAC,CACL"}
package/dist/form.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
2
+ import { a as FormProps, i as FormEmits, n as FormErrors, o as FormState, r as Form, t as FieldValidationMode } from "./index-CkDThwop.js";
3
+ export { type FieldValidationMode, Form, type FormEmits, type FormErrors, type FormProps, type FormState, type RenderSlotProps };
package/dist/form.js ADDED
@@ -0,0 +1 @@
1
+ export { t as Form } from "./form-s9HijjTL.js";
@@ -0,0 +1,355 @@
1
+ import { t as OverlayHandleStore } from "./overlay-handle-DUptsQOb.js";
2
+ import { a as useOverlayRoot, i as overlayTriggerRootProps, n as overlayRootEmits, r as overlayRootProps, t as elementSetter } from "./use-overlay-root-BkyTQIsX.js";
3
+ import { t as useRequiredContext } from "./use-required-context-CPpEkr4Q.js";
4
+ import { t as publicComponent } from "./public-component-AV8E7mGp.js";
5
+ import { n as renderPart, t as asProp } from "./render-part-B5XVbHaS.js";
6
+ import { t as stateAttributes } from "./state-attributes-DhboDeMS.js";
7
+ import { n as useOverlayPortal, t as overlayPortalProps } from "./overlay-portal-ZNtXmoFd.js";
8
+ import { n as usePositioner, t as positionerProps } from "./use-positioner-BD24G6q1.js";
9
+ import { n as useAttachHandle, r as useOverlayTrigger, t as overlayTriggerProps } from "./use-overlay-trigger-KM35pX0a.js";
10
+ import { defineComponent, onBeforeUnmount, provide, ref, shallowRef, watch } from "vue";
11
+ import { openOverlaySession } from "@fragiola/primitives/overlay";
12
+ import { trackHoverBridge } from "@fragiola/primitives/pointer";
13
+ import { createHoverIntent } from "@fragiola/primitives/hover";
14
+ // src/components/hover-card/hover-card-handle.ts
15
+ /** Creates a HoverCard handle (`HoverCard.createHandle`), for Triggers outside the Root. */
16
+ const createHoverCardHandle = () => new OverlayHandleStore("hover-card");
17
+ // src/components/hover-card/hover-card-context.ts
18
+ const HoverCardKey = Symbol("HoverCard");
19
+ // src/components/hover-card/hover-card-arrow.ts
20
+ const HoverCardArrow = publicComponent(defineComponent({
21
+ name: "HoverCardArrow",
22
+ inheritAttrs: false,
23
+ props: asProp,
24
+ setup(props, { attrs, slots }) {
25
+ const context = useRequiredContext(HoverCardKey, "HoverCard.Arrow");
26
+ const setArrow = elementSetter(context.arrow);
27
+ return () => {
28
+ const placed = context.placed.value;
29
+ return renderPart("div", {
30
+ attrs,
31
+ slots
32
+ }, props.as, placed, {
33
+ "aria-hidden": "true",
34
+ "data-primitives-part": "hover-card-arrow",
35
+ ...stateAttributes({
36
+ open: context.open.value,
37
+ closed: !context.open.value,
38
+ side: placed.side,
39
+ align: placed.align
40
+ }),
41
+ ref: setArrow
42
+ });
43
+ };
44
+ }
45
+ }));
46
+ // src/components/hover-card/hover-card-backdrop.ts
47
+ const HoverCardBackdrop = publicComponent(defineComponent({
48
+ name: "HoverCardBackdrop",
49
+ inheritAttrs: false,
50
+ props: asProp,
51
+ setup(props, { attrs, slots }) {
52
+ const context = useRequiredContext(HoverCardKey, "HoverCard.Backdrop");
53
+ return () => {
54
+ const open = context.open.value;
55
+ const status = context.presence.status.value;
56
+ return renderPart("div", {
57
+ attrs,
58
+ slots
59
+ }, props.as, { open }, {
60
+ role: "presentation",
61
+ hidden: context.presence.mounted.value ? void 0 : true,
62
+ "data-primitives-part": "hover-card-backdrop",
63
+ ...stateAttributes({
64
+ open,
65
+ closed: !open,
66
+ "starting-style": status === "starting",
67
+ "ending-style": status === "ending"
68
+ }),
69
+ style: { pointerEvents: "none" }
70
+ });
71
+ };
72
+ }
73
+ }));
74
+ // src/components/hover-card/hover-card-popup.ts
75
+ const HoverCardPopup = publicComponent(defineComponent({
76
+ name: "HoverCardPopup",
77
+ inheritAttrs: false,
78
+ props: asProp,
79
+ setup(props, { attrs, slots }) {
80
+ const context = useRequiredContext(HoverCardKey, "HoverCard.Popup");
81
+ const setPopup = elementSetter(context.popup);
82
+ watch(() => [
83
+ context.open.value,
84
+ context.popup.value,
85
+ context.positioner.value
86
+ ], ([open, popup, positioner], _, onCleanup) => {
87
+ if (!open || popup === null) return;
88
+ onCleanup(openOverlaySession(popup.ownerDocument, {
89
+ elements: () => [positioner ?? popup],
90
+ ignore: () => context.triggers.value,
91
+ dismiss: (reason, event) => context.setOpen(false, reason, event)
92
+ }).end);
93
+ }, {
94
+ flush: "post",
95
+ immediate: true
96
+ });
97
+ const onFocusout = (event) => {
98
+ const next = event.relatedTarget;
99
+ if (!context.open.value || !(next instanceof Node) || context.popup.value?.contains(next) || context.positioner.value?.contains(next) || context.triggers.value.some((trigger) => trigger.contains(next))) return;
100
+ context.setOpen(false, "focus-out", event);
101
+ };
102
+ return () => {
103
+ const open = context.open.value;
104
+ const instant = context.instant.value;
105
+ const placed = context.placed.value;
106
+ const status = context.presence.status.value;
107
+ return renderPart("div", {
108
+ attrs,
109
+ slots
110
+ }, props.as, {
111
+ open,
112
+ instant,
113
+ ...placed
114
+ }, {
115
+ id: context.popupId,
116
+ tabindex: -1,
117
+ "data-primitives-part": "hover-card-popup",
118
+ ...stateAttributes({
119
+ open,
120
+ closed: !open,
121
+ side: placed.side,
122
+ align: placed.align,
123
+ instant,
124
+ "starting-style": status === "starting",
125
+ "ending-style": status === "ending"
126
+ }),
127
+ onFocusout,
128
+ ref: setPopup
129
+ });
130
+ };
131
+ }
132
+ }));
133
+ // src/components/hover-card/hover-card-portal.ts
134
+ /** Moves the content to `container` (default: the body) while mounted, or always with `keep-mounted`. */
135
+ const HoverCardPortal = publicComponent(defineComponent({
136
+ name: "HoverCardPortal",
137
+ props: overlayPortalProps,
138
+ setup(props, { slots }) {
139
+ const context = useRequiredContext(HoverCardKey, "HoverCard.Portal");
140
+ return useOverlayPortal(context.presence.mounted, props, slots);
141
+ }
142
+ }));
143
+ // src/components/hover-card/hover-card-positioner.ts
144
+ const HoverCardPositioner = publicComponent(defineComponent({
145
+ name: "HoverCardPositioner",
146
+ inheritAttrs: false,
147
+ props: {
148
+ ...asProp,
149
+ ...positionerProps
150
+ },
151
+ setup(props, { attrs, slots }) {
152
+ const context = useRequiredContext(HoverCardKey, "HoverCard.Positioner");
153
+ const setPositioner = elementSetter(context.positioner);
154
+ const placed = usePositioner(props, {
155
+ side: "bottom",
156
+ align: "center"
157
+ }, context.trigger, context.positioner, context.arrow, context.presence.mounted);
158
+ watch(placed, (value) => context.placed.value = value, { immediate: true });
159
+ return () => {
160
+ const open = context.open.value;
161
+ return renderPart("div", {
162
+ attrs,
163
+ slots
164
+ }, props.as, {
165
+ open,
166
+ ...placed.value
167
+ }, {
168
+ role: "presentation",
169
+ hidden: context.presence.mounted.value ? void 0 : true,
170
+ "data-primitives-part": "hover-card-positioner",
171
+ ...stateAttributes({
172
+ open,
173
+ closed: !open,
174
+ side: placed.value.side,
175
+ align: placed.value.align
176
+ }),
177
+ ref: setPositioner
178
+ });
179
+ };
180
+ }
181
+ }));
182
+ // src/components/hover-card/hover-card-root.ts
183
+ const HoverCardRoot = publicComponent(defineComponent({
184
+ name: "HoverCardRoot",
185
+ props: {
186
+ ...overlayRootProps,
187
+ ...overlayTriggerRootProps,
188
+ /** ms before a hovered or keyboard-focused trigger opens it. */
189
+ delay: {
190
+ type: Number,
191
+ default: 600
192
+ },
193
+ /** ms before it closes once the pointer left the trigger and the card. */
194
+ closeDelay: {
195
+ type: Number,
196
+ default: 300
197
+ },
198
+ handle: {
199
+ type: Object,
200
+ default: void 0
201
+ }
202
+ },
203
+ emits: overlayRootEmits,
204
+ setup(props, { emit, slots, expose }) {
205
+ const root = useOverlayRoot(props, emit);
206
+ const instant = ref(false);
207
+ let openedByHover = false;
208
+ let hovered = null;
209
+ let pending = {
210
+ reason: "trigger-hover",
211
+ trigger: null,
212
+ event: void 0
213
+ };
214
+ const show = (reason, isInstant, event, from) => {
215
+ const wasByHover = openedByHover;
216
+ openedByHover = reason === "trigger-hover";
217
+ if (root.setOpen(true, reason, event, from)) instant.value = isInstant;
218
+ else openedByHover = wasByHover;
219
+ };
220
+ const hide = (reason, event) => {
221
+ root.setOpen(false, reason, event);
222
+ };
223
+ const intent = createHoverIntent({
224
+ open: () => show(pending.reason, false, pending.event, pending.trigger),
225
+ close: () => hide("trigger-hover")
226
+ });
227
+ onBeforeUnmount(intent.cancel);
228
+ watch(() => root.open.value, (open) => {
229
+ if (!open) intent.cancel();
230
+ });
231
+ watch(() => [
232
+ root.open.value,
233
+ root.trigger.value,
234
+ root.popup.value
235
+ ], ([open, trigger, popup], _, onCleanup) => {
236
+ if (!open || !openedByHover || trigger === null) return;
237
+ onCleanup(trackHoverBridge(trigger, popup, {
238
+ inside: () => intent.cancel(),
239
+ outside: () => {
240
+ if (hovered !== null && hovered !== trigger && hovered.isConnected && root.triggers.value.includes(hovered)) {
241
+ intent.cancel();
242
+ return;
243
+ }
244
+ intent.leave(props.closeDelay);
245
+ }
246
+ }));
247
+ }, { immediate: true });
248
+ const context = {
249
+ ...root,
250
+ intentStart(reason, from, event) {
251
+ if (reason === "trigger-hover") hovered = from;
252
+ if (root.open.value) {
253
+ intent.cancel();
254
+ if (from !== root.trigger.value) show(reason, true, event, from);
255
+ return;
256
+ }
257
+ pending = {
258
+ reason,
259
+ trigger: from,
260
+ event
261
+ };
262
+ intent.enter(props.delay);
263
+ },
264
+ hoverEnd(from) {
265
+ if (hovered === from) hovered = null;
266
+ if (!root.open.value) intent.cancel();
267
+ },
268
+ blur(from, event) {
269
+ const next = event.relatedTarget;
270
+ if (!root.open.value) {
271
+ if (pending.reason === "trigger-focus") intent.cancel();
272
+ return;
273
+ }
274
+ if (from !== root.trigger.value) return;
275
+ if (next instanceof Node && (root.popup.value?.contains(next) || root.positioner.value?.contains(next))) return;
276
+ intent.cancel();
277
+ hide("trigger-focus", event);
278
+ },
279
+ instant,
280
+ arrow: shallowRef(null),
281
+ placed: ref({
282
+ side: "bottom",
283
+ align: "center"
284
+ })
285
+ };
286
+ provide(HoverCardKey, context);
287
+ useAttachHandle(() => props.handle, context);
288
+ expose(root.actions);
289
+ return () => slots.default?.({ payload: root.payload.value });
290
+ }
291
+ }));
292
+ // src/components/hover-card/hover-card-trigger.ts
293
+ function isFocusVisible(element) {
294
+ try {
295
+ return element.matches(":focus-visible");
296
+ } catch {
297
+ return true;
298
+ }
299
+ }
300
+ // src/components/hover-card/parts.ts
301
+ /** spec/hover-card.md */
302
+ const HoverCard = {
303
+ Root: HoverCardRoot,
304
+ Trigger: publicComponent(defineComponent({
305
+ name: "HoverCardTrigger",
306
+ inheritAttrs: false,
307
+ props: {
308
+ ...asProp,
309
+ ...overlayTriggerProps,
310
+ handle: {
311
+ type: Object,
312
+ default: void 0
313
+ }
314
+ },
315
+ setup(props, { attrs, slots }) {
316
+ const trigger = useOverlayTrigger(HoverCardKey, "HoverCard.Trigger", props);
317
+ const setTrigger = elementSetter(trigger.element);
318
+ return () => {
319
+ const root = trigger.root.value;
320
+ const active = trigger.active.value;
321
+ return renderPart("a", {
322
+ attrs,
323
+ slots
324
+ }, props.as, { open: active }, {
325
+ id: trigger.id.value,
326
+ "data-primitives-part": "hover-card-trigger",
327
+ ...stateAttributes({ "popup-open": active }),
328
+ onPointerenter: (event) => {
329
+ if (event.pointerType !== "touch") root?.intentStart("trigger-hover", event.currentTarget, event);
330
+ },
331
+ onPointerleave: (event) => {
332
+ if (event.pointerType !== "touch") root?.hoverEnd(event.currentTarget);
333
+ },
334
+ onFocus: (event) => {
335
+ const target = event.currentTarget;
336
+ if (isFocusVisible(target)) root?.intentStart("trigger-focus", target, event);
337
+ },
338
+ onBlur: (event) => {
339
+ root?.blur(event.currentTarget, event);
340
+ },
341
+ ref: setTrigger
342
+ });
343
+ };
344
+ }
345
+ })),
346
+ Portal: HoverCardPortal,
347
+ Backdrop: HoverCardBackdrop,
348
+ Positioner: HoverCardPositioner,
349
+ Popup: HoverCardPopup,
350
+ Arrow: HoverCardArrow,
351
+ createHandle: createHoverCardHandle
352
+ };
353
+ export { createHoverCardHandle as n, HoverCard as t };
354
+
355
+ //# sourceMappingURL=hover-card-rmd0fD17.js.map