@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,1023 @@
1
+ import { a as useOverlayRoot, n as overlayRootEmits, r as overlayRootProps, t as elementSetter } from "./use-overlay-root-BkyTQIsX.js";
2
+ import { t as useRequiredContext } from "./use-required-context-CPpEkr4Q.js";
3
+ import { n as useProvidedDirection } from "./direction-context-D-C_P6Lm.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 { t as useControllable } from "./use-controllable-B46G4v0A.js";
10
+ import { n as useFieldControl } from "./use-field-control-CdYqr0dK.js";
11
+ import { Fragment, computed, defineComponent, h, nextTick, provide, ref, shallowRef, toRaw, useId, watch } from "vue";
12
+ import { chipArrows, chipKeyTarget, containsFilter, filterItems, includesItem, itemFormValue, itemLabel, queryIsLabel, scrollIntoViewWithin, stepThroughNone, toggleItem } from "@fragiola/primitives/collection";
13
+ import { getDirection } from "@fragiola/primitives/direction";
14
+ import { openOverlaySession } from "@fragiola/primitives/overlay";
15
+ import { VISUALLY_HIDDEN_INPUT_STYLE, bridgeForm } from "@fragiola/primitives/form";
16
+ // src/components/combobox/combobox-context.ts
17
+ const ComboboxKey = Symbol("Combobox");
18
+ const ComboboxItemKey = Symbol("ComboboxItem");
19
+ const ComboboxGroupKey = Symbol("ComboboxGroup");
20
+ /** The chip's element, read when a key or a press removes it. */
21
+ const ComboboxChipKey = Symbol("ComboboxChip");
22
+ /** Whether the list holds no item: no matching entry, or no rendered Item. */
23
+ function isEmpty(context) {
24
+ return context.hasItems() ? context.entries.value.length === 0 : context.itemCount.value === 0;
25
+ }
26
+ /** The rendered items of the list, in order. */
27
+ function orderedItems(context) {
28
+ const list = context.list.value;
29
+ if (list === null) return [];
30
+ return [...list.querySelectorAll("[role=\"option\"]")].map((element) => context.items.get(element)).filter((item) => item !== void 0);
31
+ }
32
+ /** The highlighted item, as registered. */
33
+ function highlightedItem(context) {
34
+ const id = context.highlighted.value;
35
+ if (id === null) return;
36
+ for (const item of context.items.values()) if (item.id === id) return item;
37
+ }
38
+ /** The rendered chips, in value order. */
39
+ function chipElements(context) {
40
+ const chips = context.chips.value;
41
+ if (chips === null) return [];
42
+ return [...chips.querySelectorAll("[data-primitives-part=\"combobox-chip\"]")];
43
+ }
44
+ /**
45
+ * A press on the InputGroup or the Chips, outside their buttons, chips and input: focuses the
46
+ * input and opens the list (spec/combobox.md, "Pointer").
47
+ */
48
+ function pressToOpen(context, event) {
49
+ const target = event.target;
50
+ if (target === null || target === context.trigger.value || target.closest("button, [data-primitives-part=\"combobox-chip\"]") !== null) return;
51
+ event.preventDefault();
52
+ if (context.disabled()) return;
53
+ context.trigger.value?.focus();
54
+ openOnPress(context);
55
+ }
56
+ /** A press on the input opens the list, on the selected item in single mode. */
57
+ function openOnPress(context) {
58
+ if (context.open.value || context.disabled()) return;
59
+ context.pendingHighlight.current = context.multiple() ? null : "selected";
60
+ context.setOpen(true, "input-press");
61
+ }
62
+ // src/components/combobox/combobox-chip.ts
63
+ /** One value of a `multiple` combobox; the arrows move between chips (spec/combobox.md). */
64
+ const ComboboxChip = publicComponent(defineComponent({
65
+ name: "ComboboxChip",
66
+ inheritAttrs: false,
67
+ props: asProp,
68
+ setup(props, { attrs, slots }) {
69
+ const direction = useProvidedDirection();
70
+ const context = useRequiredContext(ComboboxKey, "Combobox.Chip");
71
+ const element = shallowRef(null);
72
+ const setElement = elementSetter(element);
73
+ provide(ComboboxChipKey, () => element.value);
74
+ const onKeydown = (event) => {
75
+ if (context.disabled() || event.ctrlKey || event.metaKey || event.altKey) return;
76
+ const current = event.currentTarget;
77
+ const chips = chipElements(context);
78
+ const index = chips.indexOf(current);
79
+ const action = chipKeyTarget(event.key, index, chips.length, getDirection(current, direction()) === "rtl");
80
+ if (action === null) return;
81
+ if (event.key.length !== 1 || event.key === " ") event.preventDefault();
82
+ if (action.open) context.setOpen(true, "list-navigation");
83
+ const focus = () => {
84
+ (action.focus === "input" ? context.trigger.value : chipElements(context)[action.focus])?.focus();
85
+ };
86
+ if (!action.remove) {
87
+ focus();
88
+ return;
89
+ }
90
+ context.removeAt(index, "none");
91
+ nextTick().then(focus);
92
+ };
93
+ return () => {
94
+ const disabled = context.disabled();
95
+ return renderPart("div", {
96
+ attrs,
97
+ slots
98
+ }, props.as, { disabled }, {
99
+ tabindex: -1,
100
+ "aria-disabled": disabled ? "true" : void 0,
101
+ "data-primitives-part": "combobox-chip",
102
+ ...stateAttributes({ disabled }),
103
+ onKeydown,
104
+ ref: setElement
105
+ });
106
+ };
107
+ }
108
+ }));
109
+ // src/components/combobox/combobox-chip-remove.ts
110
+ /** Removes its chip's value and returns focus to the input. */
111
+ const ComboboxChipRemove = publicComponent(defineComponent({
112
+ name: "ComboboxChipRemove",
113
+ inheritAttrs: false,
114
+ props: asProp,
115
+ setup(props, { attrs, slots }) {
116
+ const context = useRequiredContext(ComboboxKey, "Combobox.ChipRemove");
117
+ const chip = useRequiredContext(ComboboxChipKey, "Combobox.ChipRemove");
118
+ return () => {
119
+ const disabled = context.disabled();
120
+ return renderPart("button", {
121
+ attrs,
122
+ slots
123
+ }, props.as, { disabled }, {
124
+ type: "button",
125
+ tabindex: -1,
126
+ disabled,
127
+ "data-primitives-part": "combobox-chip-remove",
128
+ ...stateAttributes({ disabled }),
129
+ onPointerdown: (event) => event.preventDefault(),
130
+ onClick: () => {
131
+ const element = chip();
132
+ const index = element === null ? -1 : chipElements(context).indexOf(element);
133
+ if (index >= 0) context.removeAt(index, "chip-remove-press");
134
+ context.trigger.value?.focus();
135
+ }
136
+ });
137
+ };
138
+ }
139
+ }));
140
+ // src/components/combobox/combobox-chips.ts
141
+ /** `multiple`: holds the chips and the Input; a `toolbar` while it holds a chip. */
142
+ const ComboboxChips = publicComponent(defineComponent({
143
+ name: "ComboboxChips",
144
+ inheritAttrs: false,
145
+ props: asProp,
146
+ setup(props, { attrs, slots }) {
147
+ const context = useRequiredContext(ComboboxKey, "Combobox.Chips");
148
+ const setChips = elementSetter(context.chips);
149
+ return () => renderPart("div", {
150
+ attrs,
151
+ slots
152
+ }, props.as, {}, {
153
+ role: context.values.value.length > 0 ? "toolbar" : void 0,
154
+ "data-primitives-part": "combobox-chips",
155
+ onMousedown: (event) => pressToOpen(context, event),
156
+ ref: setChips
157
+ });
158
+ }
159
+ }));
160
+ // src/components/combobox/combobox-clear.ts
161
+ /** Clears the text and the value; rendered only while there is a value (spec/combobox.md). */
162
+ const ComboboxClear = publicComponent(defineComponent({
163
+ name: "ComboboxClear",
164
+ inheritAttrs: false,
165
+ props: asProp,
166
+ setup(props, { attrs, slots }) {
167
+ const context = useRequiredContext(ComboboxKey, "Combobox.Clear");
168
+ const setClearButton = elementSetter(context.clearButton);
169
+ return () => {
170
+ if (context.values.value.length === 0) return null;
171
+ const disabled = context.disabled();
172
+ return renderPart("button", {
173
+ attrs,
174
+ slots
175
+ }, props.as, { disabled }, {
176
+ type: "button",
177
+ tabindex: -1,
178
+ disabled,
179
+ "data-primitives-part": "combobox-clear",
180
+ ...stateAttributes({ disabled }),
181
+ onPointerdown: (event) => event.preventDefault(),
182
+ onClick: () => {
183
+ context.clear("clear-press");
184
+ context.trigger.value?.focus();
185
+ },
186
+ ref: setClearButton
187
+ });
188
+ };
189
+ }
190
+ }));
191
+ // src/components/combobox/combobox-empty.ts
192
+ /**
193
+ * A polite live region, always rendered; its children are shown only while the list is empty
194
+ * (spec/combobox.md).
195
+ */
196
+ const ComboboxEmpty = publicComponent(defineComponent({
197
+ name: "ComboboxEmpty",
198
+ inheritAttrs: false,
199
+ props: asProp,
200
+ setup(props, { attrs, slots }) {
201
+ const context = useRequiredContext(ComboboxKey, "Combobox.Empty");
202
+ return () => {
203
+ const empty = isEmpty(context);
204
+ return renderPart("div", {
205
+ attrs,
206
+ slots
207
+ }, props.as, {}, {
208
+ role: "status",
209
+ "aria-live": "polite",
210
+ "aria-atomic": "true",
211
+ "data-primitives-part": "combobox-empty"
212
+ }, () => empty ? slots.default?.({ state: {} }) : []);
213
+ };
214
+ }
215
+ }));
216
+ // src/components/combobox/combobox-group.ts
217
+ /** A `group` of items, named by its GroupLabel (spec/combobox.md). */
218
+ const ComboboxGroup = publicComponent(defineComponent({
219
+ name: "ComboboxGroup",
220
+ inheritAttrs: false,
221
+ props: asProp,
222
+ setup(props, { attrs, slots }) {
223
+ const labelId = `${useId()}-label`;
224
+ provide(ComboboxGroupKey, { labelId });
225
+ return () => renderPart("div", {
226
+ attrs,
227
+ slots
228
+ }, props.as, {}, {
229
+ role: "group",
230
+ "aria-labelledby": labelId,
231
+ "data-primitives-part": "combobox-group"
232
+ });
233
+ }
234
+ }));
235
+ // src/components/combobox/combobox-group-label.ts
236
+ /** Names its Group. */
237
+ const ComboboxGroupLabel = publicComponent(defineComponent({
238
+ name: "ComboboxGroupLabel",
239
+ inheritAttrs: false,
240
+ props: asProp,
241
+ setup(props, { attrs, slots }) {
242
+ const group = useRequiredContext(ComboboxGroupKey, "Combobox.GroupLabel");
243
+ return () => renderPart("div", {
244
+ attrs,
245
+ slots
246
+ }, props.as, {}, {
247
+ id: group.labelId,
248
+ "data-primitives-part": "combobox-group-label"
249
+ });
250
+ }
251
+ }));
252
+ // src/components/combobox/combobox-input.ts
253
+ /**
254
+ * The `combobox`: keeps DOM focus while the list is open; the highlighted item is announced with
255
+ * `aria-activedescendant` (spec/combobox.md, "Keyboard").
256
+ */
257
+ const ComboboxInput = publicComponent(defineComponent({
258
+ name: "ComboboxInput",
259
+ inheritAttrs: false,
260
+ props: asProp,
261
+ setup(props, { attrs, slots }) {
262
+ const direction = useProvidedDirection();
263
+ const context = useRequiredContext(ComboboxKey, "Combobox.Input");
264
+ const setInput = elementSetter(context.trigger);
265
+ const openWith = (highlight, event) => {
266
+ context.pendingHighlight.current = highlight;
267
+ context.setOpen(true, "list-navigation", event);
268
+ };
269
+ const move = (delta) => {
270
+ const items = orderedItems(context);
271
+ const index = items.findIndex((item) => item.id === context.highlighted.value);
272
+ context.highlighted.value = items[stepThroughNone(items.length, index, delta)]?.id ?? null;
273
+ };
274
+ const onKeydown = (event) => {
275
+ const input = event.currentTarget;
276
+ const open = context.open.value;
277
+ switch (event.key) {
278
+ case "ArrowDown":
279
+ case "ArrowUp":
280
+ event.preventDefault();
281
+ if (event.altKey) {
282
+ if (event.key === "ArrowDown" && !open) openWith(null, event);
283
+ else if (event.key === "ArrowUp" && open) context.setOpen(false, "list-navigation", event);
284
+ return;
285
+ }
286
+ if (!open) {
287
+ openWith(event.key === "ArrowDown" ? "first" : "last", event);
288
+ return;
289
+ }
290
+ move(event.key === "ArrowDown" ? 1 : -1);
291
+ return;
292
+ case "Enter":
293
+ if (open) {
294
+ event.preventDefault();
295
+ const active = highlightedItem(context);
296
+ if (active !== void 0 && !active.disabled) context.choose(active.value);
297
+ }
298
+ return;
299
+ case "Escape":
300
+ if (!open && (context.inputValue.value !== "" || context.values.value.length > 0)) {
301
+ event.preventDefault();
302
+ context.clear("escape-key");
303
+ }
304
+ return;
305
+ case "Tab":
306
+ if (open) context.setOpen(false, "focus-out", event);
307
+ return;
308
+ case "Backspace":
309
+ if (context.multiple() && input.value === "" && context.values.value.length > 0) context.removeAt(context.values.value.length - 1, "none");
310
+ return;
311
+ default: {
312
+ const chips = chipElements(context);
313
+ if (context.multiple() && event.key === chipArrows(getDirection(input, direction()) === "rtl").previous && input.selectionStart === 0 && input.selectionEnd === 0 && chips.length > 0) {
314
+ event.preventDefault();
315
+ chips.at(-1)?.focus();
316
+ }
317
+ }
318
+ }
319
+ };
320
+ const onInput = (event) => {
321
+ const element = event.target;
322
+ context.setInputValue(element.value, "input-change");
323
+ nextTick().then(() => {
324
+ if (element.value !== context.inputValue.value) element.value = context.inputValue.value;
325
+ });
326
+ context.highlighted.value = null;
327
+ context.markTyped();
328
+ context.pendingHighlight.current = null;
329
+ if (!context.open.value) context.setOpen(true, "input-change", event);
330
+ };
331
+ return () => {
332
+ const open = context.open.value;
333
+ const disabled = context.disabled();
334
+ const highlighted = context.highlighted.value;
335
+ context.itemCount.value;
336
+ const active = highlighted === null ? void 0 : orderedItems(context).find((item) => item.id === highlighted);
337
+ const { field } = context;
338
+ return renderPart("input", {
339
+ attrs,
340
+ slots
341
+ }, props.as, {
342
+ open,
343
+ disabled
344
+ }, {
345
+ type: "text",
346
+ id: context.triggerId,
347
+ role: "combobox",
348
+ autocomplete: "off",
349
+ disabled,
350
+ value: context.inputValue.value,
351
+ "aria-autocomplete": "list",
352
+ "aria-expanded": open ? "true" : "false",
353
+ "aria-controls": context.listId,
354
+ "aria-activedescendant": open && active ? active.id : void 0,
355
+ ...field.aria(),
356
+ "data-primitives-part": "combobox-input",
357
+ ...field.attributes(),
358
+ ...stateAttributes({
359
+ "popup-open": open,
360
+ disabled
361
+ }),
362
+ onInput,
363
+ onClick: () => openOnPress(context),
364
+ onKeydown,
365
+ onFocus: field.onFocus,
366
+ onBlur: field.onBlur,
367
+ ref: setInput
368
+ });
369
+ };
370
+ }
371
+ }));
372
+ // src/components/combobox/combobox-input-group.ts
373
+ /** Holds the Input and its buttons; anchors the list (spec/combobox.md). */
374
+ const ComboboxInputGroup = publicComponent(defineComponent({
375
+ name: "ComboboxInputGroup",
376
+ inheritAttrs: false,
377
+ props: asProp,
378
+ setup(props, { attrs, slots }) {
379
+ const context = useRequiredContext(ComboboxKey, "Combobox.InputGroup");
380
+ const setInputGroup = elementSetter(context.inputGroup);
381
+ return () => {
382
+ const open = context.open.value;
383
+ const disabled = context.disabled();
384
+ return renderPart("div", {
385
+ attrs,
386
+ slots
387
+ }, props.as, {
388
+ open,
389
+ disabled
390
+ }, {
391
+ role: "group",
392
+ "data-primitives-part": "combobox-input-group",
393
+ ...stateAttributes({
394
+ "popup-open": open,
395
+ disabled
396
+ }),
397
+ onMousedown: (event) => pressToOpen(context, event),
398
+ ref: setInputGroup
399
+ });
400
+ };
401
+ }
402
+ }));
403
+ // src/components/combobox/combobox-item.ts
404
+ /** An `option` (spec/combobox.md). */
405
+ const ComboboxItem = publicComponent(defineComponent({
406
+ name: "ComboboxItem",
407
+ inheritAttrs: false,
408
+ props: {
409
+ ...asProp,
410
+ /** The item: written into the input as `itemToStringLabel(value)` when chosen. */
411
+ value: {
412
+ type: null,
413
+ required: true
414
+ },
415
+ /** Can be highlighted, never chosen. */
416
+ disabled: {
417
+ type: Boolean,
418
+ default: false
419
+ }
420
+ },
421
+ setup(props, { attrs, slots }) {
422
+ const context = useRequiredContext(ComboboxKey, "Combobox.Item");
423
+ const element = shallowRef(null);
424
+ const setElement = elementSetter(element);
425
+ const id = useId();
426
+ const { items, itemCount } = context;
427
+ watch(() => [
428
+ element.value,
429
+ props.value,
430
+ props.disabled
431
+ ], ([node, value, disabled], _, onCleanup) => {
432
+ if (node === null) return;
433
+ items.set(node, {
434
+ value,
435
+ disabled,
436
+ id
437
+ });
438
+ itemCount.value = items.size;
439
+ onCleanup(() => {
440
+ items.delete(node);
441
+ itemCount.value = items.size;
442
+ });
443
+ }, {
444
+ flush: "post",
445
+ immediate: true
446
+ });
447
+ const state = computed(() => ({
448
+ highlighted: context.highlighted.value === id,
449
+ selected: context.isSelected(props.value),
450
+ disabled: props.disabled
451
+ }));
452
+ provide(ComboboxItemKey, state);
453
+ watch(() => [
454
+ state.value.highlighted,
455
+ element.value,
456
+ context.positioner.value
457
+ ], ([highlighted]) => {
458
+ if (highlighted && element.value) scrollIntoViewWithin(element.value, context.positioner.value);
459
+ }, {
460
+ flush: "post",
461
+ immediate: true
462
+ });
463
+ return () => {
464
+ const { highlighted, selected, disabled } = state.value;
465
+ return renderPart("div", {
466
+ attrs,
467
+ slots
468
+ }, props.as, state.value, {
469
+ role: "option",
470
+ id,
471
+ "aria-selected": selected ? "true" : void 0,
472
+ "aria-disabled": disabled ? "true" : void 0,
473
+ "data-primitives-part": "combobox-item",
474
+ ...stateAttributes({
475
+ highlighted,
476
+ selected,
477
+ disabled
478
+ }),
479
+ onPointermove: () => {
480
+ if (!state.value.highlighted) context.highlighted.value = id;
481
+ },
482
+ onPointerdown: (event) => event.preventDefault(),
483
+ onClick: () => {
484
+ if (!props.disabled) context.choose(props.value);
485
+ },
486
+ ref: setElement
487
+ });
488
+ };
489
+ }
490
+ }));
491
+ // src/components/combobox/combobox-item-indicator.ts
492
+ /** Marks a selected item; hidden from assistive technologies (spec/combobox.md). */
493
+ const ComboboxItemIndicator = publicComponent(defineComponent({
494
+ name: "ComboboxItemIndicator",
495
+ inheritAttrs: false,
496
+ props: {
497
+ ...asProp,
498
+ /** Rendered while the item is not selected too. */
499
+ keepMounted: {
500
+ type: Boolean,
501
+ default: false
502
+ }
503
+ },
504
+ setup(props, { attrs, slots }) {
505
+ const item = useRequiredContext(ComboboxItemKey, "Combobox.ItemIndicator");
506
+ return () => {
507
+ const selected = item.value.selected;
508
+ if (!selected && !props.keepMounted) return null;
509
+ return renderPart("span", {
510
+ attrs,
511
+ slots
512
+ }, props.as, { selected }, {
513
+ "aria-hidden": "true",
514
+ "data-primitives-part": "combobox-item-indicator"
515
+ });
516
+ };
517
+ }
518
+ }));
519
+ // src/components/combobox/combobox-list.ts
520
+ /**
521
+ * The `listbox`. With the Root's `items`, its default scoped slot renders each matching entry
522
+ * (`v-slot="{ entry, index }"`: an item, or a group); without them, its content as is. Applies
523
+ * the highlight the keyboard asked for once its items render.
524
+ */
525
+ const ComboboxList = publicComponent(defineComponent({
526
+ name: "ComboboxList",
527
+ inheritAttrs: false,
528
+ props: asProp,
529
+ setup(props, { attrs, slots }) {
530
+ const context = useRequiredContext(ComboboxKey, "Combobox.List");
531
+ const setList = elementSetter(context.list);
532
+ watch(() => [
533
+ context.list.value,
534
+ context.itemCount.value,
535
+ context.open.value
536
+ ], ([list]) => {
537
+ const pending = context.pendingHighlight.current;
538
+ if (list === null || pending === null) return;
539
+ const items = orderedItems(context);
540
+ if (items.length < list.querySelectorAll("[role=\"option\"]").length) return;
541
+ context.pendingHighlight.current = null;
542
+ const selected = context.multiple() ? void 0 : items.find((item) => context.isSelected(item.value));
543
+ const edge = pending === "first" ? items[0] : items.at(-1);
544
+ const target = selected ?? (pending === "selected" ? void 0 : edge);
545
+ context.highlighted.value = target?.id ?? null;
546
+ }, {
547
+ flush: "post",
548
+ immediate: true
549
+ });
550
+ return () => {
551
+ const empty = isEmpty(context);
552
+ return renderPart("div", {
553
+ attrs,
554
+ slots
555
+ }, props.as, { empty }, {
556
+ role: "listbox",
557
+ id: context.listId,
558
+ "aria-multiselectable": context.multiple() ? "true" : void 0,
559
+ "data-primitives-part": "combobox-list",
560
+ ...stateAttributes({ empty }),
561
+ ref: setList
562
+ }, () => context.hasItems() ? context.entries.value.flatMap((entry, index) => slots.default?.({
563
+ entry,
564
+ index,
565
+ state: { empty }
566
+ }) ?? []) : slots.default?.({ state: { empty } }));
567
+ };
568
+ }
569
+ }));
570
+ // src/components/combobox/combobox-popup.ts
571
+ /** The floating container of the list (no role of its own). */
572
+ const ComboboxPopup = publicComponent(defineComponent({
573
+ name: "ComboboxPopup",
574
+ inheritAttrs: false,
575
+ props: asProp,
576
+ setup(props, { attrs, slots }) {
577
+ const context = useRequiredContext(ComboboxKey, "Combobox.Popup");
578
+ const setPopup = elementSetter(context.popup);
579
+ return () => {
580
+ const open = context.open.value;
581
+ const status = context.presence.status.value;
582
+ const placed = context.placed.value;
583
+ return renderPart("div", {
584
+ attrs,
585
+ slots
586
+ }, props.as, {
587
+ open,
588
+ ...placed
589
+ }, {
590
+ "data-primitives-part": "combobox-popup",
591
+ ...stateAttributes({
592
+ open,
593
+ closed: !open,
594
+ side: placed.side,
595
+ align: placed.align,
596
+ "starting-style": status === "starting",
597
+ "ending-style": status === "ending"
598
+ }),
599
+ ref: setPopup
600
+ });
601
+ };
602
+ }
603
+ }));
604
+ // src/components/combobox/combobox-portal.ts
605
+ /** Moves the content to `container` (default: the body) while mounted, or always with `keep-mounted`. */
606
+ const ComboboxPortal = publicComponent(defineComponent({
607
+ name: "ComboboxPortal",
608
+ props: overlayPortalProps,
609
+ setup(props, { slots }) {
610
+ const context = useRequiredContext(ComboboxKey, "Combobox.Portal");
611
+ return useOverlayPortal(context.presence.mounted, props, slots);
612
+ }
613
+ }));
614
+ // src/components/combobox/combobox-positioner.ts
615
+ /**
616
+ * Places the list under the InputGroup (else the Chips, else the Input); the open list is a layer
617
+ * (Escape, outside press).
618
+ */
619
+ const ComboboxPositioner = publicComponent(defineComponent({
620
+ name: "ComboboxPositioner",
621
+ inheritAttrs: false,
622
+ props: {
623
+ ...asProp,
624
+ ...positionerProps
625
+ },
626
+ setup(props, { attrs, slots }) {
627
+ const context = useRequiredContext(ComboboxKey, "Combobox.Positioner");
628
+ const setPositioner = elementSetter(context.positioner);
629
+ const anchor = computed(() => context.inputGroup.value ?? context.chips.value ?? context.trigger.value);
630
+ const placed = usePositioner(props, {
631
+ side: "bottom",
632
+ align: "start"
633
+ }, anchor, context.positioner, null, context.presence.mounted);
634
+ watch(placed, (value) => context.placed.value = value, { immediate: true });
635
+ watch(() => [context.open.value, context.positioner.value], ([open, positioner], _, onCleanup) => {
636
+ if (!open || positioner === null) return;
637
+ onCleanup(openOverlaySession(positioner.ownerDocument, {
638
+ elements: () => [positioner],
639
+ ignore: () => [
640
+ context.trigger.value,
641
+ context.button.value,
642
+ context.inputGroup.value,
643
+ context.chips.value,
644
+ context.clearButton.value
645
+ ],
646
+ dismiss: (reason, event) => context.setOpen(false, reason, event)
647
+ }).end);
648
+ }, {
649
+ flush: "post",
650
+ immediate: true
651
+ });
652
+ return () => {
653
+ const open = context.open.value;
654
+ return renderPart("div", {
655
+ attrs,
656
+ slots
657
+ }, props.as, {
658
+ open,
659
+ ...placed.value
660
+ }, {
661
+ role: "presentation",
662
+ hidden: context.presence.mounted.value ? void 0 : true,
663
+ "data-primitives-part": "combobox-positioner",
664
+ ...stateAttributes({
665
+ open,
666
+ closed: !open,
667
+ side: placed.value.side,
668
+ align: placed.value.align
669
+ }),
670
+ ref: setPositioner
671
+ });
672
+ };
673
+ }
674
+ }));
675
+ // src/components/combobox/combobox-root.ts
676
+ const NONE = [];
677
+ /**
678
+ * Holds the combobox's state (`v-model:value`, `v-model:input-value`, `v-model:open`); renders
679
+ * its hidden form inputs (spec/combobox.md).
680
+ */
681
+ const ComboboxRoot = publicComponent(defineComponent({
682
+ name: "ComboboxRoot",
683
+ props: {
684
+ ...overlayRootProps,
685
+ /** The items, or groups of items: the combobox filters them (spec/combobox.md). */
686
+ items: {
687
+ type: Array,
688
+ default: void 0
689
+ },
690
+ /** Whether an item matches the query; `null` turns filtering off. */
691
+ filter: {
692
+ type: Function,
693
+ default: void 0
694
+ },
695
+ /** The most items the list renders; `-1` for no limit. */
696
+ limit: {
697
+ type: Number,
698
+ default: -1
699
+ },
700
+ locale: {
701
+ type: String,
702
+ default: void 0
703
+ },
704
+ multiple: {
705
+ type: Boolean,
706
+ default: false
707
+ },
708
+ /** The selected item (or `null`), or the selected items with `multiple`. */
709
+ value: {
710
+ type: null,
711
+ default: void 0
712
+ },
713
+ defaultValue: {
714
+ type: null,
715
+ default: void 0
716
+ },
717
+ inputValue: {
718
+ type: String,
719
+ default: void 0
720
+ },
721
+ defaultInputValue: {
722
+ type: String,
723
+ default: void 0
724
+ },
725
+ isItemEqualToValue: {
726
+ type: Function,
727
+ default: void 0
728
+ },
729
+ itemToStringLabel: {
730
+ type: Function,
731
+ default: void 0
732
+ },
733
+ itemToStringValue: {
734
+ type: Function,
735
+ default: void 0
736
+ },
737
+ name: {
738
+ type: String,
739
+ default: void 0
740
+ },
741
+ required: {
742
+ type: Boolean,
743
+ default: false
744
+ },
745
+ disabled: {
746
+ type: Boolean,
747
+ default: false
748
+ }
749
+ },
750
+ emits: {
751
+ ...overlayRootEmits,
752
+ "update:value": (_value) => true,
753
+ valueChange: (_value, _details) => true,
754
+ "update:inputValue": (_value) => true,
755
+ inputValueChange: (_value, _details) => true
756
+ },
757
+ setup(props, { emit, slots, expose }) {
758
+ const root = useOverlayRoot(props, emit);
759
+ expose(root.actions);
760
+ const multiple = () => props.multiple;
761
+ const defaultValue = () => props.defaultValue ?? (props.multiple ? NONE : null);
762
+ const label = (item) => itemLabel(item, props.itemToStringLabel);
763
+ const formValue = (item) => itemFormValue(item, props.itemToStringValue);
764
+ const valueState = useControllable(() => props.value, defaultValue(), (next, details) => {
765
+ emit("update:value", next);
766
+ emit("valueChange", next, details);
767
+ });
768
+ const value = computed(() => valueState.value.value);
769
+ const values = computed(() => {
770
+ const current = value.value;
771
+ if (props.multiple) return current ?? NONE;
772
+ return current === null || current === void 0 ? NONE : [current];
773
+ });
774
+ const inputState = useControllable(() => props.inputValue, props.defaultInputValue ?? (props.multiple ? "" : label(props.value ?? defaultValue())), (next, details) => {
775
+ emit("update:inputValue", next);
776
+ emit("inputValueChange", next, details);
777
+ });
778
+ const inputValue = computed(() => inputState.value.value);
779
+ const hidden = shallowRef(null);
780
+ const field = useFieldControl({
781
+ id: () => root.trigger.value?.id || root.triggerId,
782
+ labelable: true,
783
+ value: () => value.value,
784
+ filled: () => values.value.length > 0,
785
+ input: () => hidden.value,
786
+ focusTarget: () => root.trigger.value
787
+ });
788
+ const disabled = () => props.disabled || field.disabled();
789
+ const highlighted = ref(null);
790
+ const typed = ref(false);
791
+ const pendingHighlight = { current: null };
792
+ const setOpen = (next, reason, event) => {
793
+ const changed = root.setOpen(next, reason, event);
794
+ if ((!next || reason !== "input-change") && (changed || next)) typed.value = false;
795
+ if (next || !changed) return changed;
796
+ highlighted.value = null;
797
+ pendingHighlight.current = null;
798
+ if (reason === "item-press") return changed;
799
+ const text = props.multiple ? "" : label(value.value);
800
+ if (inputValue.value !== text) inputState.set(text, { reason: text === "" ? "input-clear" : "none" });
801
+ return changed;
802
+ };
803
+ const isEqual = (item, other) => props.isItemEqualToValue ? props.isItemEqualToValue(item, other) : Object.is(toRaw(item), toRaw(other));
804
+ const filter = computed(() => props.filter === void 0 ? containsFilter(props.locale) : props.filter);
805
+ const entries = computed(() => {
806
+ const items = props.items;
807
+ if (items === void 0) return NONE;
808
+ const query = inputValue.value.trim();
809
+ const whole = !props.multiple && !typed.value && values.value.length > 0 && queryIsLabel(label(values.value[0]), query, props.locale);
810
+ return filterItems(items, whole ? "" : query, {
811
+ filter: filter.value,
812
+ limit: props.limit,
813
+ itemToString: label
814
+ });
815
+ });
816
+ const context = {
817
+ ...root,
818
+ setOpen,
819
+ field,
820
+ multiple,
821
+ value,
822
+ values,
823
+ inputValue,
824
+ setInputValue: (next, reason) => inputState.set(next, { reason }),
825
+ disabled,
826
+ highlighted,
827
+ isSelected: (item) => includesItem(values.value, item, isEqual),
828
+ choose(item) {
829
+ highlighted.value = null;
830
+ if (!props.multiple) {
831
+ valueState.set(item, { reason: "item-press" });
832
+ inputState.set(label(item), { reason: "item-press" });
833
+ setOpen(false, "item-press");
834
+ return;
835
+ }
836
+ valueState.set(toggleItem(values.value, item, isEqual), { reason: "item-press" });
837
+ if (inputValue.value.trim() !== "") {
838
+ inputState.set("", { reason: "input-clear" });
839
+ setOpen(false, "item-press");
840
+ }
841
+ },
842
+ clear(reason) {
843
+ inputState.set("", { reason });
844
+ valueState.set(props.multiple ? [] : null, { reason });
845
+ highlighted.value = null;
846
+ },
847
+ removeAt(index, reason) {
848
+ valueState.set(values.value.filter((_, at) => at !== index), { reason });
849
+ },
850
+ label,
851
+ hasItems: () => props.items !== void 0,
852
+ entries,
853
+ markTyped: () => {
854
+ typed.value = true;
855
+ },
856
+ items: /* @__PURE__ */ new Map(),
857
+ list: shallowRef(null),
858
+ button: shallowRef(null),
859
+ inputGroup: shallowRef(null),
860
+ chips: shallowRef(null),
861
+ clearButton: shallowRef(null),
862
+ listId: `${useId()}-list`,
863
+ pendingHighlight,
864
+ placed: ref({
865
+ side: "bottom",
866
+ align: "start"
867
+ }),
868
+ itemCount: ref(0)
869
+ };
870
+ provide(ComboboxKey, context);
871
+ watch(hidden, (element, _, onCleanup) => {
872
+ if (element === null) return;
873
+ onCleanup(bridgeForm(element, {
874
+ reset: () => {
875
+ const initial = defaultValue();
876
+ field.reset();
877
+ valueState.set(initial, { reason: "none" });
878
+ inputState.set(props.multiple ? "" : label(initial), { reason: "none" });
879
+ nextTick().then(() => {
880
+ const input = root.trigger.value;
881
+ if (input instanceof HTMLInputElement && input.value !== inputValue.value) input.value = inputValue.value;
882
+ if (!props.multiple) element.value = formValue(value.value);
883
+ });
884
+ },
885
+ invalid: () => root.trigger.value
886
+ }));
887
+ }, { flush: "post" });
888
+ return () => {
889
+ const fieldName = field.name() ?? props.name;
890
+ const isMultiple = props.multiple;
891
+ const count = values.value.length;
892
+ return h(Fragment, [
893
+ slots.default?.(),
894
+ h("input", {
895
+ ref: (element) => {
896
+ hidden.value = element;
897
+ },
898
+ "aria-hidden": "true",
899
+ tabindex: -1,
900
+ name: isMultiple ? void 0 : fieldName,
901
+ value: isMultiple ? "" : formValue(value.value),
902
+ required: isMultiple ? props.required && count === 0 : props.required,
903
+ disabled: disabled(),
904
+ style: VISUALLY_HIDDEN_INPUT_STYLE,
905
+ "data-primitives-part": "combobox-hidden-input"
906
+ }),
907
+ ...isMultiple && fieldName !== void 0 ? values.value.map((item, index) => h("input", {
908
+ key: index,
909
+ type: "hidden",
910
+ name: fieldName,
911
+ value: formValue(item),
912
+ disabled: disabled(),
913
+ "data-primitives-part": "combobox-hidden-input"
914
+ })) : []
915
+ ]);
916
+ };
917
+ }
918
+ }));
919
+ // src/components/combobox/combobox-separator.ts
920
+ /** Between groups; no role of its own (a `listbox` owns only groups and options). */
921
+ const ComboboxSeparator = publicComponent(defineComponent({
922
+ name: "ComboboxSeparator",
923
+ inheritAttrs: false,
924
+ props: asProp,
925
+ setup(props, { attrs, slots }) {
926
+ return () => renderPart("div", {
927
+ attrs,
928
+ slots
929
+ }, props.as, {}, {
930
+ role: "presentation",
931
+ "data-orientation": "horizontal",
932
+ "data-primitives-part": "combobox-separator"
933
+ });
934
+ }
935
+ }));
936
+ // src/components/combobox/combobox-status.ts
937
+ /** A polite live region for the consumer's text (spec/combobox.md). */
938
+ const ComboboxStatus = publicComponent(defineComponent({
939
+ name: "ComboboxStatus",
940
+ inheritAttrs: false,
941
+ props: asProp,
942
+ setup(props, { attrs, slots }) {
943
+ return () => renderPart("div", {
944
+ attrs,
945
+ slots
946
+ }, props.as, {}, {
947
+ role: "status",
948
+ "aria-live": "polite",
949
+ "aria-atomic": "true",
950
+ "data-primitives-part": "combobox-status"
951
+ });
952
+ }
953
+ }));
954
+ // src/components/combobox/parts.ts
955
+ /** spec/combobox.md */
956
+ const Combobox = {
957
+ Root: ComboboxRoot,
958
+ InputGroup: ComboboxInputGroup,
959
+ Input: ComboboxInput,
960
+ Trigger: publicComponent(defineComponent({
961
+ name: "ComboboxTrigger",
962
+ inheritAttrs: false,
963
+ props: asProp,
964
+ setup(props, { attrs, slots }) {
965
+ const context = useRequiredContext(ComboboxKey, "Combobox.Trigger");
966
+ const setButton = elementSetter(context.button);
967
+ return () => {
968
+ const open = context.open.value;
969
+ const disabled = context.disabled();
970
+ return renderPart("button", {
971
+ attrs,
972
+ slots
973
+ }, props.as, {
974
+ open,
975
+ disabled
976
+ }, {
977
+ type: "button",
978
+ tabindex: -1,
979
+ disabled,
980
+ "aria-expanded": open ? "true" : "false",
981
+ "aria-controls": context.listId,
982
+ "data-primitives-part": "combobox-trigger",
983
+ ...stateAttributes({
984
+ "popup-open": open,
985
+ disabled
986
+ }),
987
+ onPointerdown: (event) => event.preventDefault(),
988
+ onClick: (event) => {
989
+ context.pendingHighlight.current = null;
990
+ context.setOpen(!context.open.value, "trigger-press", event);
991
+ context.trigger.value?.focus();
992
+ },
993
+ ref: setButton
994
+ });
995
+ };
996
+ }
997
+ })),
998
+ Clear: ComboboxClear,
999
+ Chips: ComboboxChips,
1000
+ Chip: ComboboxChip,
1001
+ ChipRemove: ComboboxChipRemove,
1002
+ Value: publicComponent(defineComponent({
1003
+ name: "ComboboxValue",
1004
+ setup(_, { slots }) {
1005
+ const context = useRequiredContext(ComboboxKey, "Combobox.Value");
1006
+ return () => slots.default?.({ value: context.value.value }) ?? context.values.value.map(context.label).join(", ");
1007
+ }
1008
+ })),
1009
+ Status: ComboboxStatus,
1010
+ Portal: ComboboxPortal,
1011
+ Positioner: ComboboxPositioner,
1012
+ Popup: ComboboxPopup,
1013
+ Empty: ComboboxEmpty,
1014
+ List: ComboboxList,
1015
+ Group: ComboboxGroup,
1016
+ GroupLabel: ComboboxGroupLabel,
1017
+ Separator: ComboboxSeparator,
1018
+ Item: ComboboxItem,
1019
+ ItemIndicator: ComboboxItemIndicator
1020
+ };
1021
+ export { ComboboxList as n, ComboboxKey as r, Combobox as t };
1022
+
1023
+ //# sourceMappingURL=parts--mC44S1N.js.map