@stachelock/ui 0.5.5 → 0.6.2

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 (481) hide show
  1. package/README.md +118 -5
  2. package/dist/AddDeleteButtonGroup.vue_vue_type_script_setup_true_lang-6taLcPq0.js +77 -0
  3. package/dist/{AlertModal.vue_vue_type_script_setup_true_lang-C6q8Mpl4.js → AlertModal.vue_vue_type_script_setup_true_lang-DzhVQdx4.js} +45 -65
  4. package/dist/BackgroundGradientWrapper.vue_vue_type_script_setup_true_lang-C8msTrTn.js +0 -1
  5. package/dist/BarChart.vue_vue_type_script_setup_true_lang-xCb0DCbf.js +0 -1
  6. package/dist/{BaseModal.vue_vue_type_script_setup_true_lang-B67Pt3tW.js → BaseModal.vue_vue_type_script_setup_true_lang--iGzFCnC.js} +42 -44
  7. package/dist/{CalendarHeader.vue_vue_type_script_setup_true_lang-CkSUiLOH.js → CalendarHeader.vue_vue_type_script_setup_true_lang-hGa2MLyo.js} +114 -141
  8. package/dist/CardWrapper.vue_vue_type_script_setup_true_lang-D59QBAi9.js +0 -1
  9. package/dist/CheckboxInput.vue_vue_type_script_setup_true_lang-BikR9rgi.js +0 -1
  10. package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-BigvbBAU.js +331 -0
  11. package/dist/ComingSoon.vue_vue_type_script_setup_true_lang-CJ8FXE42.js +0 -1
  12. package/dist/{DashboardLayout.vue_vue_type_script_setup_true_lang-B0M6-9os.js → DashboardLayout.vue_vue_type_script_setup_true_lang-BAx4gKqh.js} +44 -47
  13. package/dist/{DatepickerInput.vue_vue_type_style_index_0_lang-BdkGLw0H.js → DatepickerInput.vue_vue_type_style_index_0_lang-DbI3619T.js} +23 -24
  14. package/dist/{DayCalendar.vue_vue_type_script_setup_true_lang-8al4Fotu.js → DayCalendar.vue_vue_type_script_setup_true_lang-D-4jcUvI.js} +1 -2
  15. package/dist/DefaultLayout.vue_vue_type_script_setup_true_lang-BZAz6aC-.js +0 -1
  16. package/dist/DisclosureWrapper.vue_vue_type_script_setup_true_lang-CgHPOC-w.js +35 -0
  17. package/dist/{DynamicForm.vue_vue_type_script_setup_true_lang-CxSaO5Cl.js → DynamicForm.vue_vue_type_script_setup_true_lang-BR8Pq7Kw.js} +52 -53
  18. package/dist/{DynamicFormField.vue_vue_type_script_setup_true_lang-CSLSRFM7.js → DynamicFormField.vue_vue_type_script_setup_true_lang-BCVmqg_n.js} +7 -8
  19. package/dist/EmailInput.vue_vue_type_script_setup_true_lang-BicPMIop.js +0 -1
  20. package/dist/EmptyInput.vue_vue_type_script_setup_true_lang-FWDCFF2c.js +0 -1
  21. package/dist/EmptyState.vue_vue_type_script_setup_true_lang-7mcKkOWP.js +0 -1
  22. package/dist/EventCard.vue_vue_type_script_setup_true_lang-B3TP-mWX.js +74 -0
  23. package/dist/EventsList.vue_vue_type_script_setup_true_lang-BTIoGr_e.js +87 -0
  24. package/dist/FileDropzoneInput.vue_vue_type_script_setup_true_lang-BJR-_ngq.js +176 -0
  25. package/dist/{FormErrorWrapper.vue_vue_type_script_setup_true_lang-BQOlG_ab.js → FormErrorWrapper.vue_vue_type_script_setup_true_lang-D7ZAgfPs.js} +12 -13
  26. package/dist/FunnelChart.vue_vue_type_script_setup_true_lang-B4pH6xCV.js +0 -1
  27. package/dist/HeaderLayout.vue_vue_type_script_setup_true_lang-BY2G6hCc.js +0 -1
  28. package/dist/HiddenInput.vue_vue_type_script_setup_true_lang-PtGZ4eLW.js +0 -1
  29. package/dist/{InlineTabs.vue_vue_type_script_setup_true_lang-CD0lnkUm.js → InlineTabs.vue_vue_type_script_setup_true_lang-B5w4yzcZ.js} +1 -2
  30. package/dist/LineChart.vue_vue_type_script_setup_true_lang-DJo0edLJ.js +0 -1
  31. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-swmHdR0_.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C0R4ADBb.js} +1 -2
  32. package/dist/{MonthCalendar.vue_vue_type_style_index_0_lang-Cyzq7A9j.js → MonthCalendar.vue_vue_type_style_index_0_lang-lnKkvJ9u.js} +1 -2
  33. package/dist/NavigationGroup.vue_vue_type_script_setup_true_lang-BWq5fpEm.js +0 -1
  34. package/dist/NavigationItem.vue_vue_type_script_setup_true_lang-C8aX-84Q.js +0 -1
  35. package/dist/{NotificationContainer.vue_vue_type_style_index_0_lang-DSfNw4Ge.js → NotificationContainer.vue_vue_type_style_index_0_lang-CvJRwezr.js} +1 -2
  36. package/dist/{NotificationToast.vue_vue_type_script_setup_true_lang-CU__ORw8.js → NotificationToast.vue_vue_type_script_setup_true_lang-BBWpW4km.js} +61 -64
  37. package/dist/PieChart.vue_vue_type_script_setup_true_lang-e3wsA9O4.js +0 -1
  38. package/dist/ProfileHeaderAvatar.vue_vue_type_script_setup_true_lang-CKCoHD1o.js +0 -1
  39. package/dist/ProjectLogo.vue_vue_type_script_setup_true_lang-DYjp-RNh.js +0 -1
  40. package/dist/{SelectInput.vue_vue_type_script_setup_true_lang-DHiZ-7K2.js → SelectInput.vue_vue_type_script_setup_true_lang-D4GNv0MY.js} +56 -58
  41. package/dist/{SelectTextInput.vue_vue_type_script_setup_true_lang-DYrXW14A.js → SelectTextInput.vue_vue_type_script_setup_true_lang-BVaViHPl.js} +66 -69
  42. package/dist/{SidebarLayout.vue_vue_type_script_setup_true_lang-BJ5jadgZ.js → SidebarLayout.vue_vue_type_script_setup_true_lang-CZ21EVcZ.js} +36 -39
  43. package/dist/SparklineChart.vue_vue_type_script_setup_true_lang-BlNk5ZqM.js +0 -1
  44. package/dist/StatCard.vue_vue_type_script_setup_true_lang-B5SuaSXL.js +66 -0
  45. package/dist/{StepperPanels.vue_vue_type_script_setup_true_lang-D6Fv7iz3.js → StepperPanels.vue_vue_type_script_setup_true_lang-DPLQ9mQn.js} +34 -49
  46. package/dist/SwitchInput.vue_vue_type_script_setup_true_lang-D5Es9AjF.js +200 -0
  47. package/dist/{SwitchInputGroup.vue_vue_type_script_setup_true_lang-CK9JWl4F.js → SwitchInputGroup.vue_vue_type_script_setup_true_lang-DigNYqVZ.js} +1 -2
  48. package/dist/{TabGroup.vue_vue_type_script_setup_true_lang-DVVeOgWH.js → TabGroup.vue_vue_type_script_setup_true_lang-BsbiEA4E.js} +19 -20
  49. package/dist/{TabGroupUnderline.vue_vue_type_script_setup_true_lang-_3XtOn3w.js → TabGroupUnderline.vue_vue_type_script_setup_true_lang-CPcp1-Za.js} +21 -22
  50. package/dist/{TabsInPills.vue_vue_type_script_setup_true_lang-DY1NkXCQ.js → TabsInPills.vue_vue_type_script_setup_true_lang-U5CdRL7s.js} +1 -2
  51. package/dist/{TagifyInput.vue_vue_type_script_setup_true_lang-Da6-pRJ2.js → TagifyInput.vue_vue_type_script_setup_true_lang-BF2mK8JC.js} +14 -15
  52. package/dist/TextAreaInput.vue_vue_type_script_setup_true_lang-Cf0MJobG.js +0 -1
  53. package/dist/UiAvatar.vue_vue_type_script_setup_true_lang-WVY6JbUL.js +0 -1
  54. package/dist/UiBadge.vue_vue_type_script_setup_true_lang-DOtbLb9x.js +0 -1
  55. package/dist/UiButtonGroup.vue_vue_type_script_setup_true_lang-CVwXB-cb.js +0 -1
  56. package/dist/UiCheckbox.vue_vue_type_script_setup_true_lang-BxyM_F-V.js +0 -1
  57. package/dist/UiLoading.vue_vue_type_script_setup_true_lang-rNvtzKbq.js +0 -1
  58. package/dist/{UiMapAll.vue_vue_type_script_setup_true_lang-CMAyvJMk.js → UiMapAll.vue_vue_type_script_setup_true_lang-11yT7mTH.js} +93 -111
  59. package/dist/UiMenu.vue_vue_type_script_setup_true_lang-gnoIJm6x.js +127 -0
  60. package/dist/{UiModal.vue_vue_type_script_setup_true_lang-CpwFUDVU.js → UiModal.vue_vue_type_script_setup_true_lang-BZC7aN7K.js} +41 -43
  61. package/dist/{UiNavLink.vue_vue_type_script_setup_true_lang-DnWMn40M.js → UiNavLink.vue_vue_type_script_setup_true_lang-C5Gicm8o.js} +4 -5
  62. package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-BCh4orZW.js +0 -1
  63. package/dist/UiTable.vue_vue_type_script_setup_true_lang-xGAiJ9rS.js +0 -1
  64. package/dist/UiTransition.vue_vue_type_script_setup_true_lang-C4jb9I-3.js +0 -1
  65. package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-CfKSpLLN.js +0 -1
  66. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -1
  67. package/dist/calendar-DLry-Vik.js +147 -0
  68. package/dist/calendars/CalendarDashboard.js +3 -4
  69. package/dist/calendars/CalendarHeader.js +1 -2
  70. package/dist/calendars/DayCalendar.js +1 -2
  71. package/dist/calendars/EventCard.js +1 -2
  72. package/dist/calendars/EventsList.js +1 -2
  73. package/dist/calendars/MonthCalendar.js +1 -2
  74. package/dist/calendars/WeekCalendar.js +1 -2
  75. package/dist/calendars/YearCalendar.js +0 -1
  76. package/dist/charts/BarChart.js +0 -1
  77. package/dist/charts/BaseChart.js +42 -59
  78. package/dist/charts/FunnelChart.js +0 -1
  79. package/dist/charts/LineChart.js +0 -1
  80. package/dist/charts/PieChart.js +0 -1
  81. package/dist/charts/SparklineChart.js +0 -1
  82. package/dist/charts/StatCard.js +1 -2
  83. package/dist/charts/chartTheme.js +0 -1
  84. package/dist/charts/index.js +1 -2
  85. package/dist/components/Avatar.js +0 -1
  86. package/dist/components/Badge.js +0 -1
  87. package/dist/components/Banner.js +178 -351
  88. package/dist/components/Breadcrumb.js +41 -42
  89. package/dist/components/Button.js +0 -1
  90. package/dist/components/ButtonGroup.js +0 -1
  91. package/dist/components/Checkbox.js +0 -1
  92. package/dist/components/CloudinaryImage.js +51 -81
  93. package/dist/components/Loading.js +0 -1
  94. package/dist/components/LoadingDots.js +0 -1
  95. package/dist/components/LottieAnimation.js +1 -2
  96. package/dist/components/Menu.js +1 -2
  97. package/dist/components/Modal.js +1 -2
  98. package/dist/components/NavLink.js +1 -2
  99. package/dist/components/ProgressBar.js +0 -1
  100. package/dist/components/RadialProgressBar.js +0 -1
  101. package/dist/components/Table.js +0 -1
  102. package/dist/components/Transition.js +0 -1
  103. package/dist/composables/index.js +33 -31
  104. package/dist/composables/useCalendar.js +1 -2
  105. package/dist/composables/useFormValidation.js +0 -1
  106. package/dist/composables/useMap.js +3 -3
  107. package/dist/composables/useModal.js +0 -1
  108. package/dist/composables/useNotifications.js +0 -1
  109. package/dist/composables/useTabs.js +87 -193
  110. package/dist/composables/useTheme.js +0 -1
  111. package/dist/empty-state/ComingSoon.js +0 -1
  112. package/dist/empty-state/EmptyState.js +0 -1
  113. package/dist/empty-state/index.js +0 -1
  114. package/dist/forms/DynamicForm.js +1 -2
  115. package/dist/forms/DynamicFormField.js +1 -2
  116. package/dist/forms/FormFieldWrapper.js +7 -8
  117. package/dist/id-DafBB_QF.js +0 -1
  118. package/dist/index.js +2652 -790
  119. package/dist/inputs/AddDeleteButtonGroup.js +1 -2
  120. package/dist/inputs/CheckboxInput.js +0 -1
  121. package/dist/inputs/ComboboxInput.js +1 -2
  122. package/dist/inputs/DatepickerInput.js +1 -2
  123. package/dist/inputs/EmailInput.js +0 -1
  124. package/dist/inputs/EmptyInput.js +0 -1
  125. package/dist/inputs/FileDropzoneInput.js +1 -2
  126. package/dist/inputs/HiddenInput.js +0 -1
  127. package/dist/inputs/PhoneInput.js +371 -3539
  128. package/dist/inputs/RichTextInput.js +235 -17298
  129. package/dist/inputs/SelectInput.js +1 -2
  130. package/dist/inputs/SelectTextInput.js +1 -2
  131. package/dist/inputs/SwitchInput.js +1 -2
  132. package/dist/inputs/SwitchInputGroup.js +1 -2
  133. package/dist/inputs/TagifyInput.js +1 -2
  134. package/dist/inputs/TextAreaInput.js +0 -1
  135. package/dist/inputs/TextInput.js +7 -8
  136. package/dist/layouts/DashboardLayout.js +1 -2
  137. package/dist/layouts/DefaultLayout.js +0 -1
  138. package/dist/layouts/HeaderLayout.js +0 -1
  139. package/dist/layouts/NavigationGroup.js +0 -1
  140. package/dist/layouts/NavigationItem.js +0 -1
  141. package/dist/layouts/ProfileHeaderAvatar.js +0 -1
  142. package/dist/layouts/ProjectLogo.js +0 -1
  143. package/dist/layouts/SidebarLayout.js +1 -2
  144. package/dist/loading/ContentSkeleton.js +0 -1
  145. package/dist/loading/SmartLoadingIndicator.js +0 -1
  146. package/dist/loading/index.js +0 -1
  147. package/dist/mapThemes-DFE9fZm3.js +0 -1
  148. package/dist/maps/GoogleMap.js +13 -14
  149. package/dist/maps/UiInfoWindow.js +41 -43
  150. package/dist/maps/UiMap.js +28 -31
  151. package/dist/maps/UiMapAll.js +1 -2
  152. package/dist/maps/UiMapMarker.js +1 -2
  153. package/dist/maps/index.js +1 -2
  154. package/dist/modals/AlertModal.js +1 -2
  155. package/dist/modals/BaseModal.js +1 -2
  156. package/dist/modals/ImageCropperModal.js +130 -1666
  157. package/dist/notifications/NotificationContainer.js +1 -2
  158. package/dist/notifications/NotificationToast.js +1 -2
  159. package/dist/notifications/index.js +2 -3
  160. package/dist/src/components/UiBanner.d.ts +1 -1
  161. package/dist/src/components/UiLoadingDots.d.ts +1 -1
  162. package/dist/src/components/UiMenu.d.ts +1 -1
  163. package/dist/src/components/UiModal.d.ts +1 -1
  164. package/dist/src/components/collection-editor/CollectionItemList.d.ts +42 -0
  165. package/dist/src/components/collection-editor/OrganizationsEditor.d.ts +29 -0
  166. package/dist/src/components/collection-editor/RelatedNamesEditor.d.ts +26 -0
  167. package/dist/src/components/collection-editor/SocialLinksEditor.d.ts +26 -0
  168. package/dist/src/components/collection-editor/index.d.ts +5 -0
  169. package/dist/src/components/forms/FormFieldWrapper.d.ts +1 -1
  170. package/dist/src/components/index.d.ts +2 -0
  171. package/dist/src/components/inputs/AddressInput.d.ts +40 -0
  172. package/dist/src/components/inputs/ComboboxInput.d.ts +2 -2
  173. package/dist/src/components/inputs/DatepickerInput.d.ts +19 -19
  174. package/dist/src/components/inputs/EmailInput.d.ts +2 -2
  175. package/dist/src/components/inputs/PhoneInput.d.ts +2 -2
  176. package/dist/src/components/inputs/RichTextInput.d.ts +2 -2
  177. package/dist/src/components/inputs/SelectInput.d.ts +2 -2
  178. package/dist/src/components/inputs/SelectTextInput.d.ts +4 -4
  179. package/dist/src/components/inputs/TagifyInput.d.ts +2 -2
  180. package/dist/src/components/inputs/TextInput.d.ts +3 -3
  181. package/dist/src/components/inputs/index.d.ts +1 -0
  182. package/dist/src/components/layouts/CardLayout.d.ts +1 -1
  183. package/dist/src/components/maps/UiInfoWindow.d.ts +2 -2
  184. package/dist/src/components/maps/UiMap.d.ts +2 -2
  185. package/dist/src/components/maps/UiMapAll.d.ts +10 -10
  186. package/dist/src/components/maps/UiMapMarker.d.ts +2 -2
  187. package/dist/src/components/modals/BaseModal.d.ts +1 -1
  188. package/dist/src/components/profiles/BentoProfileLayout.d.ts +9 -0
  189. package/dist/src/components/profiles/ProfileCard.d.ts +30 -0
  190. package/dist/src/components/profiles/ProfileContactCard.d.ts +12 -0
  191. package/dist/src/components/profiles/ProfileHeaderCard.d.ts +20 -0
  192. package/dist/src/components/profiles/ProfileLocationCard.d.ts +17 -0
  193. package/dist/src/components/profiles/ProfileOrganizationsCard.d.ts +11 -0
  194. package/dist/src/components/profiles/ProfilePersonalCard.d.ts +10 -0
  195. package/dist/src/components/profiles/ProfileProfessionalCard.d.ts +11 -0
  196. package/dist/src/components/profiles/ProfileRelatedNamesCard.d.ts +11 -0
  197. package/dist/src/components/profiles/index.d.ts +9 -0
  198. package/dist/src/composables/index.d.ts +1 -0
  199. package/dist/src/composables/useCollectionEditor.d.ts +64 -0
  200. package/dist/src/composables/useNotifications.d.ts +4 -4
  201. package/dist/src/plugin/configure.d.ts +3 -1
  202. package/dist/src/services/geocoding.service.d.ts +68 -0
  203. package/dist/src/services/index.d.ts +1 -0
  204. package/dist/src/types/address.d.ts +164 -0
  205. package/dist/src/types/collection-editor.d.ts +134 -0
  206. package/dist/src/types/index.d.ts +3 -0
  207. package/dist/src/types/profiles.d.ts +149 -0
  208. package/dist/src/views/inputs/index.d.ts +1 -0
  209. package/dist/stepper/StepperPanels.js +1 -2
  210. package/dist/stepper/index.js +1 -2
  211. package/dist/style.css +1 -1
  212. package/dist/tabs/InlineTabs.js +1 -2
  213. package/dist/tabs/TabGroup.js +1 -2
  214. package/dist/tabs/TabGroupUnderline.js +1 -2
  215. package/dist/tabs/TabsInPills.js +1 -2
  216. package/dist/tabs/index.js +4 -5
  217. package/dist/ui.css +1 -1
  218. package/dist/useCollectionEditor-BYyoAT0U.js +121 -0
  219. package/dist/useEventSegments-B-r_8zCW.js +0 -1
  220. package/dist/useMap-BGg0H582.js +297 -0
  221. package/dist/useSimpleTabs-CSgkChEU.js +0 -1
  222. package/dist/useStringTransform-CSr7nZWg.js +0 -1
  223. package/dist/wrappers/BackgroundGradientWrapper.js +0 -1
  224. package/dist/wrappers/CardWrapper.js +0 -1
  225. package/dist/wrappers/DisclosureWrapper.js +1 -2
  226. package/dist/wrappers/FormErrorWrapper.js +1 -2
  227. package/dist/wrappers/index.js +2 -3
  228. package/package.json +9 -1
  229. package/dist/AddDeleteButtonGroup.vue_vue_type_script_setup_true_lang-CFS3lVF-.js +0 -128
  230. package/dist/AddDeleteButtonGroup.vue_vue_type_script_setup_true_lang-CFS3lVF-.js.map +0 -1
  231. package/dist/AlertModal.vue_vue_type_script_setup_true_lang-C6q8Mpl4.js.map +0 -1
  232. package/dist/BackgroundGradientWrapper.vue_vue_type_script_setup_true_lang-C8msTrTn.js.map +0 -1
  233. package/dist/BarChart.vue_vue_type_script_setup_true_lang-xCb0DCbf.js.map +0 -1
  234. package/dist/Bars3Icon-BdOqcGcY.js +0 -22
  235. package/dist/Bars3Icon-BdOqcGcY.js.map +0 -1
  236. package/dist/BaseModal.vue_vue_type_script_setup_true_lang-B67Pt3tW.js.map +0 -1
  237. package/dist/CalendarHeader.vue_vue_type_script_setup_true_lang-CkSUiLOH.js.map +0 -1
  238. package/dist/CardWrapper.vue_vue_type_script_setup_true_lang-D59QBAi9.js.map +0 -1
  239. package/dist/CheckIcon-BGlsmVwT.js +0 -20
  240. package/dist/CheckIcon-BGlsmVwT.js.map +0 -1
  241. package/dist/CheckboxInput.vue_vue_type_script_setup_true_lang-BikR9rgi.js.map +0 -1
  242. package/dist/ChevronRightIcon-DkUqw988.js +0 -20
  243. package/dist/ChevronRightIcon-DkUqw988.js.map +0 -1
  244. package/dist/ChevronUpDownIcon-Bq_fsgrb.js +0 -20
  245. package/dist/ChevronUpDownIcon-Bq_fsgrb.js.map +0 -1
  246. package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-kEj-NYqm.js +0 -1362
  247. package/dist/ComboboxInput.vue_vue_type_script_setup_true_lang-kEj-NYqm.js.map +0 -1
  248. package/dist/ComingSoon.vue_vue_type_script_setup_true_lang-CJ8FXE42.js.map +0 -1
  249. package/dist/DashboardLayout.vue_vue_type_script_setup_true_lang-B0M6-9os.js.map +0 -1
  250. package/dist/DatepickerInput.vue_vue_type_style_index_0_lang-BdkGLw0H.js.map +0 -1
  251. package/dist/DayCalendar.vue_vue_type_script_setup_true_lang-8al4Fotu.js.map +0 -1
  252. package/dist/DefaultLayout.vue_vue_type_script_setup_true_lang-BZAz6aC-.js.map +0 -1
  253. package/dist/DisclosureWrapper.vue_vue_type_script_setup_true_lang-C7y2bNhW.js +0 -138
  254. package/dist/DisclosureWrapper.vue_vue_type_script_setup_true_lang-C7y2bNhW.js.map +0 -1
  255. package/dist/DynamicForm.vue_vue_type_script_setup_true_lang-CxSaO5Cl.js.map +0 -1
  256. package/dist/DynamicFormField.vue_vue_type_script_setup_true_lang-CSLSRFM7.js.map +0 -1
  257. package/dist/EmailInput.vue_vue_type_script_setup_true_lang-BicPMIop.js.map +0 -1
  258. package/dist/EmptyInput.vue_vue_type_script_setup_true_lang-FWDCFF2c.js.map +0 -1
  259. package/dist/EmptyState.vue_vue_type_script_setup_true_lang-7mcKkOWP.js.map +0 -1
  260. package/dist/EventCard.vue_vue_type_script_setup_true_lang-j1mtKShZ.js +0 -136
  261. package/dist/EventCard.vue_vue_type_script_setup_true_lang-j1mtKShZ.js.map +0 -1
  262. package/dist/EventsList.vue_vue_type_script_setup_true_lang-MhuVi5u8.js +0 -102
  263. package/dist/EventsList.vue_vue_type_script_setup_true_lang-MhuVi5u8.js.map +0 -1
  264. package/dist/ExclamationCircleIcon-DjxYk45_.js +0 -22
  265. package/dist/ExclamationCircleIcon-DjxYk45_.js.map +0 -1
  266. package/dist/ExclamationCircleIcon-DmL8Wwjo.js +0 -36
  267. package/dist/ExclamationCircleIcon-DmL8Wwjo.js.map +0 -1
  268. package/dist/ExclamationTriangleIcon-BNKYmV_J.js +0 -22
  269. package/dist/ExclamationTriangleIcon-BNKYmV_J.js.map +0 -1
  270. package/dist/FileDropzoneInput.vue_vue_type_script_setup_true_lang-CclXceTb.js +0 -211
  271. package/dist/FileDropzoneInput.vue_vue_type_script_setup_true_lang-CclXceTb.js.map +0 -1
  272. package/dist/FormErrorWrapper.vue_vue_type_script_setup_true_lang-BQOlG_ab.js.map +0 -1
  273. package/dist/FunnelChart.vue_vue_type_script_setup_true_lang-B4pH6xCV.js.map +0 -1
  274. package/dist/HeaderLayout.vue_vue_type_script_setup_true_lang-BY2G6hCc.js.map +0 -1
  275. package/dist/HiddenInput.vue_vue_type_script_setup_true_lang-PtGZ4eLW.js.map +0 -1
  276. package/dist/InformationCircleIcon-B322GNIt.js +0 -40
  277. package/dist/InformationCircleIcon-B322GNIt.js.map +0 -1
  278. package/dist/InlineTabs.vue_vue_type_script_setup_true_lang-CD0lnkUm.js.map +0 -1
  279. package/dist/LineChart.vue_vue_type_script_setup_true_lang-DJo0edLJ.js.map +0 -1
  280. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-swmHdR0_.js.map +0 -1
  281. package/dist/MapPinIcon-CSTDUZnD.js +0 -27
  282. package/dist/MapPinIcon-CSTDUZnD.js.map +0 -1
  283. package/dist/MonthCalendar.vue_vue_type_style_index_0_lang-Cyzq7A9j.js.map +0 -1
  284. package/dist/NavigationGroup.vue_vue_type_script_setup_true_lang-BWq5fpEm.js.map +0 -1
  285. package/dist/NavigationItem.vue_vue_type_script_setup_true_lang-C8aX-84Q.js.map +0 -1
  286. package/dist/NotificationContainer.vue_vue_type_style_index_0_lang-DSfNw4Ge.js.map +0 -1
  287. package/dist/NotificationToast.vue_vue_type_script_setup_true_lang-CU__ORw8.js.map +0 -1
  288. package/dist/PieChart.vue_vue_type_script_setup_true_lang-e3wsA9O4.js.map +0 -1
  289. package/dist/PlusIcon-aDFVlB90.js +0 -40
  290. package/dist/PlusIcon-aDFVlB90.js.map +0 -1
  291. package/dist/ProfileHeaderAvatar.vue_vue_type_script_setup_true_lang-CKCoHD1o.js.map +0 -1
  292. package/dist/ProjectLogo.vue_vue_type_script_setup_true_lang-DYjp-RNh.js.map +0 -1
  293. package/dist/SelectInput.vue_vue_type_script_setup_true_lang-DHiZ-7K2.js.map +0 -1
  294. package/dist/SelectTextInput.vue_vue_type_script_setup_true_lang-DYrXW14A.js.map +0 -1
  295. package/dist/SidebarLayout.vue_vue_type_script_setup_true_lang-BJ5jadgZ.js.map +0 -1
  296. package/dist/SparklineChart.vue_vue_type_script_setup_true_lang-BlNk5ZqM.js.map +0 -1
  297. package/dist/StatCard.vue_vue_type_script_setup_true_lang-BfFupfmC.js +0 -111
  298. package/dist/StatCard.vue_vue_type_script_setup_true_lang-BfFupfmC.js.map +0 -1
  299. package/dist/StepperPanels.vue_vue_type_script_setup_true_lang-D6Fv7iz3.js.map +0 -1
  300. package/dist/SwitchInput.vue_vue_type_script_setup_true_lang-C88FcxuK.js +0 -280
  301. package/dist/SwitchInput.vue_vue_type_script_setup_true_lang-C88FcxuK.js.map +0 -1
  302. package/dist/SwitchInputGroup.vue_vue_type_script_setup_true_lang-CK9JWl4F.js.map +0 -1
  303. package/dist/TabGroup.vue_vue_type_script_setup_true_lang-DVVeOgWH.js.map +0 -1
  304. package/dist/TabGroupUnderline.vue_vue_type_script_setup_true_lang-_3XtOn3w.js.map +0 -1
  305. package/dist/TabsInPills.vue_vue_type_script_setup_true_lang-DY1NkXCQ.js.map +0 -1
  306. package/dist/TagifyInput.vue_vue_type_script_setup_true_lang-Da6-pRJ2.js.map +0 -1
  307. package/dist/TextAreaInput.vue_vue_type_script_setup_true_lang-Cf0MJobG.js.map +0 -1
  308. package/dist/UiAvatar.vue_vue_type_script_setup_true_lang-WVY6JbUL.js.map +0 -1
  309. package/dist/UiBadge.vue_vue_type_script_setup_true_lang-DOtbLb9x.js.map +0 -1
  310. package/dist/UiButtonGroup.vue_vue_type_script_setup_true_lang-CVwXB-cb.js.map +0 -1
  311. package/dist/UiCheckbox.vue_vue_type_script_setup_true_lang-BxyM_F-V.js.map +0 -1
  312. package/dist/UiLoading.vue_vue_type_script_setup_true_lang-rNvtzKbq.js.map +0 -1
  313. package/dist/UiMapAll.vue_vue_type_script_setup_true_lang-CMAyvJMk.js.map +0 -1
  314. package/dist/UiMenu.vue_vue_type_script_setup_true_lang-bQdfCzk6.js +0 -330
  315. package/dist/UiMenu.vue_vue_type_script_setup_true_lang-bQdfCzk6.js.map +0 -1
  316. package/dist/UiModal.vue_vue_type_script_setup_true_lang-CpwFUDVU.js.map +0 -1
  317. package/dist/UiNavLink.vue_vue_type_script_setup_true_lang-DnWMn40M.js.map +0 -1
  318. package/dist/UiProgressBar.vue_vue_type_script_setup_true_lang-BCh4orZW.js.map +0 -1
  319. package/dist/UiTable.vue_vue_type_script_setup_true_lang-xGAiJ9rS.js.map +0 -1
  320. package/dist/UiTransition.vue_vue_type_script_setup_true_lang-C4jb9I-3.js.map +0 -1
  321. package/dist/XMarkIcon-Cwy3T6p8.js +0 -22
  322. package/dist/XMarkIcon-Cwy3T6p8.js.map +0 -1
  323. package/dist/XMarkIcon-DNvCkiOy.js +0 -16
  324. package/dist/XMarkIcon-DNvCkiOy.js.map +0 -1
  325. package/dist/YearCalendar.vue_vue_type_script_setup_true_lang-CfKSpLLN.js.map +0 -1
  326. package/dist/_plugin-vue_export-helper-CHgC5LLL.js.map +0 -1
  327. package/dist/active-element-history-BTBNVIJN.js +0 -17
  328. package/dist/active-element-history-BTBNVIJN.js.map +0 -1
  329. package/dist/calculate-active-index-Dim3sT-5.js +0 -55
  330. package/dist/calculate-active-index-Dim3sT-5.js.map +0 -1
  331. package/dist/calendar-BlSSD4nO.js +0 -575
  332. package/dist/calendar-BlSSD4nO.js.map +0 -1
  333. package/dist/calendars/CalendarDashboard.js.map +0 -1
  334. package/dist/calendars/CalendarHeader.js.map +0 -1
  335. package/dist/calendars/DayCalendar.js.map +0 -1
  336. package/dist/calendars/EventCard.js.map +0 -1
  337. package/dist/calendars/EventsList.js.map +0 -1
  338. package/dist/calendars/MonthCalendar.js.map +0 -1
  339. package/dist/calendars/WeekCalendar.js.map +0 -1
  340. package/dist/calendars/YearCalendar.js.map +0 -1
  341. package/dist/charts/BarChart.js.map +0 -1
  342. package/dist/charts/BaseChart.js.map +0 -1
  343. package/dist/charts/FunnelChart.js.map +0 -1
  344. package/dist/charts/LineChart.js.map +0 -1
  345. package/dist/charts/PieChart.js.map +0 -1
  346. package/dist/charts/SparklineChart.js.map +0 -1
  347. package/dist/charts/StatCard.js.map +0 -1
  348. package/dist/charts/chartTheme.js.map +0 -1
  349. package/dist/charts/index.js.map +0 -1
  350. package/dist/components/Avatar.js.map +0 -1
  351. package/dist/components/Badge.js.map +0 -1
  352. package/dist/components/Banner.js.map +0 -1
  353. package/dist/components/Breadcrumb.js.map +0 -1
  354. package/dist/components/Button.js.map +0 -1
  355. package/dist/components/ButtonGroup.js.map +0 -1
  356. package/dist/components/Checkbox.js.map +0 -1
  357. package/dist/components/CloudinaryImage.js.map +0 -1
  358. package/dist/components/Loading.js.map +0 -1
  359. package/dist/components/LoadingDots.js.map +0 -1
  360. package/dist/components/LottieAnimation.js.map +0 -1
  361. package/dist/components/Menu.js.map +0 -1
  362. package/dist/components/Modal.js.map +0 -1
  363. package/dist/components/NavLink.js.map +0 -1
  364. package/dist/components/ProgressBar.js.map +0 -1
  365. package/dist/components/RadialProgressBar.js.map +0 -1
  366. package/dist/components/Table.js.map +0 -1
  367. package/dist/components/Transition.js.map +0 -1
  368. package/dist/composables/index.js.map +0 -1
  369. package/dist/composables/useCalendar.js.map +0 -1
  370. package/dist/composables/useFormValidation.js.map +0 -1
  371. package/dist/composables/useMap.js.map +0 -1
  372. package/dist/composables/useModal.js.map +0 -1
  373. package/dist/composables/useNotifications.js.map +0 -1
  374. package/dist/composables/useTabs.js.map +0 -1
  375. package/dist/composables/useTheme.js.map +0 -1
  376. package/dist/description-C7cRw0tq.js +0 -30
  377. package/dist/description-C7cRw0tq.js.map +0 -1
  378. package/dist/dialog-BJ2Ld8l3.js +0 -499
  379. package/dist/dialog-BJ2Ld8l3.js.map +0 -1
  380. package/dist/empty-state/ComingSoon.js.map +0 -1
  381. package/dist/empty-state/EmptyState.js.map +0 -1
  382. package/dist/empty-state/index.js.map +0 -1
  383. package/dist/env-BZfPsfnF.js +0 -29
  384. package/dist/env-BZfPsfnF.js.map +0 -1
  385. package/dist/form-f8yP4kN-.js +0 -35
  386. package/dist/form-f8yP4kN-.js.map +0 -1
  387. package/dist/forms/DynamicForm.js.map +0 -1
  388. package/dist/forms/DynamicFormField.js.map +0 -1
  389. package/dist/forms/FormFieldWrapper.js.map +0 -1
  390. package/dist/hidden-BSRluD1y.js +0 -15
  391. package/dist/hidden-BSRluD1y.js.map +0 -1
  392. package/dist/id-DafBB_QF.js.map +0 -1
  393. package/dist/index-Dca39bYA.js +0 -2167
  394. package/dist/index-Dca39bYA.js.map +0 -1
  395. package/dist/index.js.map +0 -1
  396. package/dist/inputs/AddDeleteButtonGroup.js.map +0 -1
  397. package/dist/inputs/CheckboxInput.js.map +0 -1
  398. package/dist/inputs/ComboboxInput.js.map +0 -1
  399. package/dist/inputs/DatepickerInput.js.map +0 -1
  400. package/dist/inputs/EmailInput.js.map +0 -1
  401. package/dist/inputs/EmptyInput.js.map +0 -1
  402. package/dist/inputs/FileDropzoneInput.js.map +0 -1
  403. package/dist/inputs/HiddenInput.js.map +0 -1
  404. package/dist/inputs/PhoneInput.js.map +0 -1
  405. package/dist/inputs/RichTextInput.js.map +0 -1
  406. package/dist/inputs/SelectInput.js.map +0 -1
  407. package/dist/inputs/SelectTextInput.js.map +0 -1
  408. package/dist/inputs/SwitchInput.js.map +0 -1
  409. package/dist/inputs/SwitchInputGroup.js.map +0 -1
  410. package/dist/inputs/TagifyInput.js.map +0 -1
  411. package/dist/inputs/TextAreaInput.js.map +0 -1
  412. package/dist/inputs/TextInput.js.map +0 -1
  413. package/dist/keyboard-Dd_2-cFu.js +0 -5
  414. package/dist/keyboard-Dd_2-cFu.js.map +0 -1
  415. package/dist/layouts/DashboardLayout.js.map +0 -1
  416. package/dist/layouts/DefaultLayout.js.map +0 -1
  417. package/dist/layouts/HeaderLayout.js.map +0 -1
  418. package/dist/layouts/NavigationGroup.js.map +0 -1
  419. package/dist/layouts/NavigationItem.js.map +0 -1
  420. package/dist/layouts/ProfileHeaderAvatar.js.map +0 -1
  421. package/dist/layouts/ProjectLogo.js.map +0 -1
  422. package/dist/layouts/SidebarLayout.js.map +0 -1
  423. package/dist/listbox-YaWWZiiG.js +0 -257
  424. package/dist/listbox-YaWWZiiG.js.map +0 -1
  425. package/dist/loading/ContentSkeleton.js.map +0 -1
  426. package/dist/loading/SmartLoadingIndicator.js.map +0 -1
  427. package/dist/loading/index.js.map +0 -1
  428. package/dist/mapThemes-DFE9fZm3.js.map +0 -1
  429. package/dist/maps/GoogleMap.js.map +0 -1
  430. package/dist/maps/UiInfoWindow.js.map +0 -1
  431. package/dist/maps/UiMap.js.map +0 -1
  432. package/dist/maps/UiMapAll.js.map +0 -1
  433. package/dist/maps/UiMapMarker.js.map +0 -1
  434. package/dist/maps/index.js.map +0 -1
  435. package/dist/micro-task-D-oTY33s.js +0 -9
  436. package/dist/micro-task-D-oTY33s.js.map +0 -1
  437. package/dist/modals/AlertModal.js.map +0 -1
  438. package/dist/modals/BaseModal.js.map +0 -1
  439. package/dist/modals/ImageCropperModal.js.map +0 -1
  440. package/dist/notifications/NotificationContainer.js.map +0 -1
  441. package/dist/notifications/NotificationToast.js.map +0 -1
  442. package/dist/notifications/index.js.map +0 -1
  443. package/dist/open-closed-JTEvYTg2.js +0 -19
  444. package/dist/open-closed-JTEvYTg2.js.map +0 -1
  445. package/dist/render-QUUPyNjX.js +0 -101
  446. package/dist/render-QUUPyNjX.js.map +0 -1
  447. package/dist/stepper/StepperPanels.js.map +0 -1
  448. package/dist/stepper/index.js.map +0 -1
  449. package/dist/tabs/InlineTabs.js.map +0 -1
  450. package/dist/tabs/TabGroup.js.map +0 -1
  451. package/dist/tabs/TabGroupUnderline.js.map +0 -1
  452. package/dist/tabs/TabsInPills.js.map +0 -1
  453. package/dist/tabs/index.js.map +0 -1
  454. package/dist/tabs-J5phClGv.js +0 -202
  455. package/dist/tabs-J5phClGv.js.map +0 -1
  456. package/dist/transition-_rPfnoET.js +0 -191
  457. package/dist/transition-_rPfnoET.js.map +0 -1
  458. package/dist/use-outside-click-14T0Zn98.js +0 -151
  459. package/dist/use-outside-click-14T0Zn98.js.map +0 -1
  460. package/dist/use-resolve-button-type-h6n-lm9q.js +0 -20
  461. package/dist/use-resolve-button-type-h6n-lm9q.js.map +0 -1
  462. package/dist/use-text-value-DKnkjK00.js +0 -44
  463. package/dist/use-text-value-DKnkjK00.js.map +0 -1
  464. package/dist/use-tree-walker-Bo9gIb_K.js +0 -16
  465. package/dist/use-tree-walker-Bo9gIb_K.js.map +0 -1
  466. package/dist/useEventSegments-B-r_8zCW.js.map +0 -1
  467. package/dist/useMap-BaZEIoWM.js +0 -525
  468. package/dist/useMap-BaZEIoWM.js.map +0 -1
  469. package/dist/useSimpleTabs-CSgkChEU.js.map +0 -1
  470. package/dist/useStringTransform-CSr7nZWg.js.map +0 -1
  471. package/dist/vue-datepicker-CEn0-fJj.js +0 -4871
  472. package/dist/vue-datepicker-CEn0-fJj.js.map +0 -1
  473. package/dist/vue-router-B3K2xmg_.js +0 -120
  474. package/dist/vue-router-B3K2xmg_.js.map +0 -1
  475. package/dist/vue3-lottie.es-DT4qZE-F.js +0 -7981
  476. package/dist/vue3-lottie.es-DT4qZE-F.js.map +0 -1
  477. package/dist/wrappers/BackgroundGradientWrapper.js.map +0 -1
  478. package/dist/wrappers/CardWrapper.js.map +0 -1
  479. package/dist/wrappers/DisclosureWrapper.js.map +0 -1
  480. package/dist/wrappers/FormErrorWrapper.js.map +0 -1
  481. package/dist/wrappers/index.js.map +0 -1
@@ -1,1362 +0,0 @@
1
- import { computed as O, unref as P, shallowRef as ze, watch as W, triggerRef as me, onScopeDispose as Fe, onUnmounted as Ce, defineComponent as J, ref as D, provide as Re, onMounted as fe, h as ae, Fragment as Ee, watchEffect as ie, inject as ke, nextTick as X, toRaw as q, reactive as Pe, cloneVNode as De, createElementBlock as H, openBlock as _, createVNode as K, withCtx as U, createElementVNode as Q, normalizeClass as Y, createBlock as de, createCommentVNode as G, withModifiers as ce, toDisplayString as oe, renderList as $e } from "vue";
2
- import { useField as Be } from "vee-validate";
3
- import Ne from "./forms/FormFieldWrapper.js";
4
- import { _ as Le } from "./UiLoading.vue_vue_type_script_setup_true_lang-rNvtzKbq.js";
5
- import { g as je } from "./id-DafBB_QF.js";
6
- import { d as _e, e as We } from "./form-f8yP4kN-.js";
7
- import { o as ve, S as Ke } from "./transition-_rPfnoET.js";
8
- import { u as le, o as M, A as se, E as qe, T as pe, i as ne, N as re } from "./render-QUUPyNjX.js";
9
- import { w as He, i as Ue, O as Qe, n as Je } from "./use-outside-click-14T0Zn98.js";
10
- import { s as Ye } from "./use-resolve-button-type-h6n-lm9q.js";
11
- import { u as Ge, c as N, f as be } from "./calculate-active-index-Dim3sT-5.js";
12
- import { i as Xe } from "./use-tree-walker-Bo9gIb_K.js";
13
- import { f as Ze, u as et } from "./hidden-BSRluD1y.js";
14
- import { t as tt, i as ue, l as lt } from "./open-closed-JTEvYTg2.js";
15
- import { o as j } from "./keyboard-Dd_2-cFu.js";
16
- import { t as ge } from "./active-element-history-BTBNVIJN.js";
17
- import { r as st } from "./ChevronUpDownIcon-Bq_fsgrb.js";
18
- import { r as xe } from "./CheckIcon-BGlsmVwT.js";
19
- function te(s, c, e) {
20
- let n = e.initialDeps ?? [], t, a = !0;
21
- function o() {
22
- var l, f, v;
23
- let u;
24
- e.key && ((l = e.debug) != null && l.call(e)) && (u = Date.now());
25
- const i = s();
26
- if (!(i.length !== n.length || i.some((E, w) => n[w] !== E)))
27
- return t;
28
- n = i;
29
- let R;
30
- if (e.key && ((f = e.debug) != null && f.call(e)) && (R = Date.now()), t = c(...i), e.key && ((v = e.debug) != null && v.call(e))) {
31
- const E = Math.round((Date.now() - u) * 100) / 100, w = Math.round((Date.now() - R) * 100) / 100, F = w / 16, $ = (g, I) => {
32
- for (g = String(g); g.length < I; )
33
- g = " " + g;
34
- return g;
35
- };
36
- console.info(
37
- `%c⏱ ${$(w, 5)} /${$(E, 5)} ms`,
38
- `
39
- font-size: .6rem;
40
- font-weight: bold;
41
- color: hsl(${Math.max(
42
- 0,
43
- Math.min(120 - 120 * F, 120)
44
- )}deg 100% 31%);`,
45
- e?.key
46
- );
47
- }
48
- return e?.onChange && !(a && e.skipInitialOnChange) && e.onChange(t), a = !1, t;
49
- }
50
- return o.updateDeps = (l) => {
51
- n = l;
52
- }, o;
53
- }
54
- function ye(s, c) {
55
- if (s === void 0)
56
- throw new Error("Unexpected undefined");
57
- return s;
58
- }
59
- const nt = (s, c) => Math.abs(s - c) < 1.01, ot = (s, c, e) => {
60
- let n;
61
- return function(...t) {
62
- s.clearTimeout(n), n = s.setTimeout(() => c.apply(this, t), e);
63
- };
64
- }, Se = (s) => {
65
- const { offsetWidth: c, offsetHeight: e } = s;
66
- return { width: c, height: e };
67
- }, at = (s) => s, it = (s) => {
68
- const c = Math.max(s.startIndex - s.overscan, 0), e = Math.min(s.endIndex + s.overscan, s.count - 1), n = [];
69
- for (let t = c; t <= e; t++)
70
- n.push(t);
71
- return n;
72
- }, rt = (s, c) => {
73
- const e = s.scrollElement;
74
- if (!e)
75
- return;
76
- const n = s.targetWindow;
77
- if (!n)
78
- return;
79
- const t = (o) => {
80
- const { width: l, height: f } = o;
81
- c({ width: Math.round(l), height: Math.round(f) });
82
- };
83
- if (t(Se(e)), !n.ResizeObserver)
84
- return () => {
85
- };
86
- const a = new n.ResizeObserver((o) => {
87
- const l = () => {
88
- const f = o[0];
89
- if (f?.borderBoxSize) {
90
- const v = f.borderBoxSize[0];
91
- if (v) {
92
- t({ width: v.inlineSize, height: v.blockSize });
93
- return;
94
- }
95
- }
96
- t(Se(e));
97
- };
98
- s.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(l) : l();
99
- });
100
- return a.observe(e, { box: "border-box" }), () => {
101
- a.unobserve(e);
102
- };
103
- }, Oe = {
104
- passive: !0
105
- }, we = typeof window > "u" ? !0 : "onscrollend" in window, ut = (s, c) => {
106
- const e = s.scrollElement;
107
- if (!e)
108
- return;
109
- const n = s.targetWindow;
110
- if (!n)
111
- return;
112
- let t = 0;
113
- const a = s.options.useScrollendEvent && we ? () => {
114
- } : ot(
115
- n,
116
- () => {
117
- c(t, !1);
118
- },
119
- s.options.isScrollingResetDelay
120
- ), o = (u) => () => {
121
- const { horizontal: i, isRtl: b } = s.options;
122
- t = i ? e.scrollLeft * (b && -1 || 1) : e.scrollTop, a(), c(t, u);
123
- }, l = o(!0), f = o(!1);
124
- e.addEventListener("scroll", l, Oe);
125
- const v = s.options.useScrollendEvent && we;
126
- return v && e.addEventListener("scrollend", f, Oe), () => {
127
- e.removeEventListener("scroll", l), v && e.removeEventListener("scrollend", f);
128
- };
129
- }, dt = (s, c, e) => {
130
- if (c?.borderBoxSize) {
131
- const n = c.borderBoxSize[0];
132
- if (n)
133
- return Math.round(
134
- n[e.options.horizontal ? "inlineSize" : "blockSize"]
135
- );
136
- }
137
- return s[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
138
- }, ct = (s, {
139
- adjustments: c = 0,
140
- behavior: e
141
- }, n) => {
142
- var t, a;
143
- const o = s + c;
144
- (a = (t = n.scrollElement) == null ? void 0 : t.scrollTo) == null || a.call(t, {
145
- [n.options.horizontal ? "left" : "top"]: o,
146
- behavior: e
147
- });
148
- };
149
- class vt {
150
- constructor(c) {
151
- this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.currentScrollToIndex = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
152
- let e = null;
153
- const n = () => e || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : e = new this.targetWindow.ResizeObserver((t) => {
154
- t.forEach((a) => {
155
- const o = () => {
156
- this._measureElement(a.target, a);
157
- };
158
- this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
159
- });
160
- }));
161
- return {
162
- disconnect: () => {
163
- var t;
164
- (t = n()) == null || t.disconnect(), e = null;
165
- },
166
- observe: (t) => {
167
- var a;
168
- return (a = n()) == null ? void 0 : a.observe(t, { box: "border-box" });
169
- },
170
- unobserve: (t) => {
171
- var a;
172
- return (a = n()) == null ? void 0 : a.unobserve(t);
173
- }
174
- };
175
- })(), this.range = null, this.setOptions = (e) => {
176
- Object.entries(e).forEach(([n, t]) => {
177
- typeof t > "u" && delete e[n];
178
- }), this.options = {
179
- debug: !1,
180
- initialOffset: 0,
181
- overscan: 1,
182
- paddingStart: 0,
183
- paddingEnd: 0,
184
- scrollPaddingStart: 0,
185
- scrollPaddingEnd: 0,
186
- horizontal: !1,
187
- getItemKey: at,
188
- rangeExtractor: it,
189
- onChange: () => {
190
- },
191
- measureElement: dt,
192
- initialRect: { width: 0, height: 0 },
193
- scrollMargin: 0,
194
- gap: 0,
195
- indexAttribute: "data-index",
196
- initialMeasurementsCache: [],
197
- lanes: 1,
198
- isScrollingResetDelay: 150,
199
- enabled: !0,
200
- isRtl: !1,
201
- useScrollendEvent: !1,
202
- useAnimationFrameWithResizeObserver: !1,
203
- ...e
204
- };
205
- }, this.notify = (e) => {
206
- var n, t;
207
- (t = (n = this.options).onChange) == null || t.call(n, this, e);
208
- }, this.maybeNotify = te(
209
- () => (this.calculateRange(), [
210
- this.isScrolling,
211
- this.range ? this.range.startIndex : null,
212
- this.range ? this.range.endIndex : null
213
- ]),
214
- (e) => {
215
- this.notify(e);
216
- },
217
- {
218
- key: process.env.NODE_ENV !== "production" && "maybeNotify",
219
- debug: () => this.options.debug,
220
- initialDeps: [
221
- this.isScrolling,
222
- this.range ? this.range.startIndex : null,
223
- this.range ? this.range.endIndex : null
224
- ]
225
- }
226
- ), this.cleanup = () => {
227
- this.unsubs.filter(Boolean).forEach((e) => e()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
228
- }, this._didMount = () => () => {
229
- this.cleanup();
230
- }, this._willUpdate = () => {
231
- var e;
232
- const n = this.options.enabled ? this.options.getScrollElement() : null;
233
- if (this.scrollElement !== n) {
234
- if (this.cleanup(), !n) {
235
- this.maybeNotify();
236
- return;
237
- }
238
- this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((e = this.scrollElement) == null ? void 0 : e.window) ?? null, this.elementsCache.forEach((t) => {
239
- this.observer.observe(t);
240
- }), this.unsubs.push(
241
- this.options.observeElementRect(this, (t) => {
242
- this.scrollRect = t, this.maybeNotify();
243
- })
244
- ), this.unsubs.push(
245
- this.options.observeElementOffset(this, (t, a) => {
246
- this.scrollAdjustments = 0, this.scrollDirection = a ? this.getScrollOffset() < t ? "forward" : "backward" : null, this.scrollOffset = t, this.isScrolling = a, this.maybeNotify();
247
- })
248
- ), this._scrollToOffset(this.getScrollOffset(), {
249
- adjustments: void 0,
250
- behavior: void 0
251
- });
252
- }
253
- }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (e, n) => {
254
- const t = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
255
- for (let o = n - 1; o >= 0; o--) {
256
- const l = e[o];
257
- if (t.has(l.lane))
258
- continue;
259
- const f = a.get(
260
- l.lane
261
- );
262
- if (f == null || l.end > f.end ? a.set(l.lane, l) : l.end < f.end && t.set(l.lane, !0), t.size === this.options.lanes)
263
- break;
264
- }
265
- return a.size === this.options.lanes ? Array.from(a.values()).sort((o, l) => o.end === l.end ? o.index - l.index : o.end - l.end)[0] : void 0;
266
- }, this.getMeasurementOptions = te(
267
- () => [
268
- this.options.count,
269
- this.options.paddingStart,
270
- this.options.scrollMargin,
271
- this.options.getItemKey,
272
- this.options.enabled,
273
- this.options.lanes
274
- ],
275
- (e, n, t, a, o, l) => (this.prevLanes !== void 0 && this.prevLanes !== l && (this.lanesChangedFlag = !0), this.prevLanes = l, this.pendingMeasuredCacheIndexes = [], {
276
- count: e,
277
- paddingStart: n,
278
- scrollMargin: t,
279
- getItemKey: a,
280
- enabled: o,
281
- lanes: l
282
- }),
283
- {
284
- key: !1
285
- }
286
- ), this.getMeasurements = te(
287
- () => [this.getMeasurementOptions(), this.itemSizeCache],
288
- ({ count: e, paddingStart: n, scrollMargin: t, getItemKey: a, enabled: o, lanes: l }, f) => {
289
- if (!o)
290
- return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
291
- if (this.laneAssignments.size > e)
292
- for (const b of this.laneAssignments.keys())
293
- b >= e && this.laneAssignments.delete(b);
294
- this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((b) => {
295
- this.itemSizeCache.set(b.key, b.size);
296
- }));
297
- const v = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
298
- this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === e && (this.lanesSettling = !1);
299
- const u = this.measurementsCache.slice(0, v), i = new Array(l).fill(
300
- void 0
301
- );
302
- for (let b = 0; b < v; b++) {
303
- const R = u[b];
304
- R && (i[R.lane] = b);
305
- }
306
- for (let b = v; b < e; b++) {
307
- const R = a(b), E = this.laneAssignments.get(b);
308
- let w, F;
309
- if (E !== void 0 && this.options.lanes > 1) {
310
- w = E;
311
- const z = i[w], p = z !== void 0 ? u[z] : void 0;
312
- F = p ? p.end + this.options.gap : n + t;
313
- } else {
314
- const z = this.options.lanes === 1 ? u[b - 1] : this.getFurthestMeasurement(u, b);
315
- F = z ? z.end + this.options.gap : n + t, w = z ? z.lane : b % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(b, w);
316
- }
317
- const $ = f.get(R), g = typeof $ == "number" ? $ : this.options.estimateSize(b), I = F + g;
318
- u[b] = {
319
- index: b,
320
- start: F,
321
- size: g,
322
- end: I,
323
- key: R,
324
- lane: w
325
- }, i[w] = b;
326
- }
327
- return this.measurementsCache = u, u;
328
- },
329
- {
330
- key: process.env.NODE_ENV !== "production" && "getMeasurements",
331
- debug: () => this.options.debug
332
- }
333
- ), this.calculateRange = te(
334
- () => [
335
- this.getMeasurements(),
336
- this.getSize(),
337
- this.getScrollOffset(),
338
- this.options.lanes
339
- ],
340
- (e, n, t, a) => this.range = e.length > 0 && n > 0 ? ft({
341
- measurements: e,
342
- outerSize: n,
343
- scrollOffset: t,
344
- lanes: a
345
- }) : null,
346
- {
347
- key: process.env.NODE_ENV !== "production" && "calculateRange",
348
- debug: () => this.options.debug
349
- }
350
- ), this.getVirtualIndexes = te(
351
- () => {
352
- let e = null, n = null;
353
- const t = this.calculateRange();
354
- return t && (e = t.startIndex, n = t.endIndex), this.maybeNotify.updateDeps([this.isScrolling, e, n]), [
355
- this.options.rangeExtractor,
356
- this.options.overscan,
357
- this.options.count,
358
- e,
359
- n
360
- ];
361
- },
362
- (e, n, t, a, o) => a === null || o === null ? [] : e({
363
- startIndex: a,
364
- endIndex: o,
365
- overscan: n,
366
- count: t
367
- }),
368
- {
369
- key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
370
- debug: () => this.options.debug
371
- }
372
- ), this.indexFromElement = (e) => {
373
- const n = this.options.indexAttribute, t = e.getAttribute(n);
374
- return t ? parseInt(t, 10) : (console.warn(
375
- `Missing attribute name '${n}={index}' on measured element.`
376
- ), -1);
377
- }, this._measureElement = (e, n) => {
378
- const t = this.indexFromElement(e), a = this.measurementsCache[t];
379
- if (!a)
380
- return;
381
- const o = a.key, l = this.elementsCache.get(o);
382
- l !== e && (l && this.observer.unobserve(l), this.observer.observe(e), this.elementsCache.set(o, e)), e.isConnected && this.resizeItem(t, this.options.measureElement(e, n, this));
383
- }, this.resizeItem = (e, n) => {
384
- const t = this.measurementsCache[e];
385
- if (!t)
386
- return;
387
- const a = this.itemSizeCache.get(t.key) ?? t.size, o = n - a;
388
- o !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(t, o, this) : t.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", o), this._scrollToOffset(this.getScrollOffset(), {
389
- adjustments: this.scrollAdjustments += o,
390
- behavior: void 0
391
- })), this.pendingMeasuredCacheIndexes.push(t.index), this.itemSizeCache = new Map(this.itemSizeCache.set(t.key, n)), this.notify(!1));
392
- }, this.measureElement = (e) => {
393
- if (!e) {
394
- this.elementsCache.forEach((n, t) => {
395
- n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(t));
396
- });
397
- return;
398
- }
399
- this._measureElement(e, void 0);
400
- }, this.getVirtualItems = te(
401
- () => [this.getVirtualIndexes(), this.getMeasurements()],
402
- (e, n) => {
403
- const t = [];
404
- for (let a = 0, o = e.length; a < o; a++) {
405
- const l = e[a], f = n[l];
406
- t.push(f);
407
- }
408
- return t;
409
- },
410
- {
411
- key: process.env.NODE_ENV !== "production" && "getVirtualItems",
412
- debug: () => this.options.debug
413
- }
414
- ), this.getVirtualItemForOffset = (e) => {
415
- const n = this.getMeasurements();
416
- if (n.length !== 0)
417
- return ye(
418
- n[Me(
419
- 0,
420
- n.length - 1,
421
- (t) => ye(n[t]).start,
422
- e
423
- )]
424
- );
425
- }, this.getMaxScrollOffset = () => {
426
- if (!this.scrollElement) return 0;
427
- if ("scrollHeight" in this.scrollElement)
428
- return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
429
- {
430
- const e = this.scrollElement.document.documentElement;
431
- return this.options.horizontal ? e.scrollWidth - this.scrollElement.innerWidth : e.scrollHeight - this.scrollElement.innerHeight;
432
- }
433
- }, this.getOffsetForAlignment = (e, n, t = 0) => {
434
- if (!this.scrollElement) return 0;
435
- const a = this.getSize(), o = this.getScrollOffset();
436
- n === "auto" && (n = e >= o + a ? "end" : "start"), n === "center" ? e += (t - a) / 2 : n === "end" && (e -= a);
437
- const l = this.getMaxScrollOffset();
438
- return Math.max(Math.min(l, e), 0);
439
- }, this.getOffsetForIndex = (e, n = "auto") => {
440
- e = Math.max(0, Math.min(e, this.options.count - 1));
441
- const t = this.measurementsCache[e];
442
- if (!t)
443
- return;
444
- const a = this.getSize(), o = this.getScrollOffset();
445
- if (n === "auto")
446
- if (t.end >= o + a - this.options.scrollPaddingEnd)
447
- n = "end";
448
- else if (t.start <= o + this.options.scrollPaddingStart)
449
- n = "start";
450
- else
451
- return [o, n];
452
- if (n === "end" && e === this.options.count - 1)
453
- return [this.getMaxScrollOffset(), n];
454
- const l = n === "end" ? t.end + this.options.scrollPaddingEnd : t.start - this.options.scrollPaddingStart;
455
- return [
456
- this.getOffsetForAlignment(l, n, t.size),
457
- n
458
- ];
459
- }, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (e, { align: n = "start", behavior: t } = {}) => {
460
- t === "smooth" && this.isDynamicMode() && console.warn(
461
- "The `smooth` scroll behavior is not fully supported with dynamic size."
462
- ), this._scrollToOffset(this.getOffsetForAlignment(e, n), {
463
- adjustments: void 0,
464
- behavior: t
465
- });
466
- }, this.scrollToIndex = (e, { align: n = "auto", behavior: t } = {}) => {
467
- t === "smooth" && this.isDynamicMode() && console.warn(
468
- "The `smooth` scroll behavior is not fully supported with dynamic size."
469
- ), e = Math.max(0, Math.min(e, this.options.count - 1)), this.currentScrollToIndex = e;
470
- let a = 0;
471
- const o = 10, l = (v) => {
472
- if (!this.targetWindow) return;
473
- const u = this.getOffsetForIndex(e, v);
474
- if (!u) {
475
- console.warn("Failed to get offset for index:", e);
476
- return;
477
- }
478
- const [i, b] = u;
479
- this._scrollToOffset(i, { adjustments: void 0, behavior: t }), this.targetWindow.requestAnimationFrame(() => {
480
- const R = () => {
481
- if (this.currentScrollToIndex !== e) return;
482
- const E = this.getScrollOffset(), w = this.getOffsetForIndex(e, b);
483
- if (!w) {
484
- console.warn("Failed to get offset for index:", e);
485
- return;
486
- }
487
- nt(w[0], E) || f(b);
488
- };
489
- this.isDynamicMode() ? this.targetWindow.requestAnimationFrame(R) : R();
490
- });
491
- }, f = (v) => {
492
- this.targetWindow && this.currentScrollToIndex === e && (a++, a < o ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", a, o), this.targetWindow.requestAnimationFrame(() => l(v))) : console.warn(
493
- `Failed to scroll to index ${e} after ${o} attempts.`
494
- ));
495
- };
496
- l(n);
497
- }, this.scrollBy = (e, { behavior: n } = {}) => {
498
- n === "smooth" && this.isDynamicMode() && console.warn(
499
- "The `smooth` scroll behavior is not fully supported with dynamic size."
500
- ), this._scrollToOffset(this.getScrollOffset() + e, {
501
- adjustments: void 0,
502
- behavior: n
503
- });
504
- }, this.getTotalSize = () => {
505
- var e;
506
- const n = this.getMeasurements();
507
- let t;
508
- if (n.length === 0)
509
- t = this.options.paddingStart;
510
- else if (this.options.lanes === 1)
511
- t = ((e = n[n.length - 1]) == null ? void 0 : e.end) ?? 0;
512
- else {
513
- const a = Array(this.options.lanes).fill(null);
514
- let o = n.length - 1;
515
- for (; o >= 0 && a.some((l) => l === null); ) {
516
- const l = n[o];
517
- a[l.lane] === null && (a[l.lane] = l.end), o--;
518
- }
519
- t = Math.max(...a.filter((l) => l !== null));
520
- }
521
- return Math.max(
522
- t - this.options.scrollMargin + this.options.paddingEnd,
523
- 0
524
- );
525
- }, this._scrollToOffset = (e, {
526
- adjustments: n,
527
- behavior: t
528
- }) => {
529
- this.options.scrollToFn(e, { behavior: t, adjustments: n }, this);
530
- }, this.measure = () => {
531
- this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.notify(!1);
532
- }, this.setOptions(c);
533
- }
534
- }
535
- const Me = (s, c, e, n) => {
536
- for (; s <= c; ) {
537
- const t = (s + c) / 2 | 0, a = e(t);
538
- if (a < n)
539
- s = t + 1;
540
- else if (a > n)
541
- c = t - 1;
542
- else
543
- return t;
544
- }
545
- return s > 0 ? s - 1 : 0;
546
- };
547
- function ft({
548
- measurements: s,
549
- outerSize: c,
550
- scrollOffset: e,
551
- lanes: n
552
- }) {
553
- const t = s.length - 1, a = (f) => s[f].start;
554
- if (s.length <= n)
555
- return {
556
- startIndex: 0,
557
- endIndex: t
558
- };
559
- let o = Me(
560
- 0,
561
- t,
562
- a,
563
- e
564
- ), l = o;
565
- if (n === 1)
566
- for (; l < t && s[l].end < e + c; )
567
- l++;
568
- else if (n > 1) {
569
- const f = Array(n).fill(0);
570
- for (; l < t && f.some((u) => u < e + c); ) {
571
- const u = s[l];
572
- f[u.lane] = u.end, l++;
573
- }
574
- const v = Array(n).fill(e + c);
575
- for (; o >= 0 && v.some((u) => u >= e); ) {
576
- const u = s[o];
577
- v[u.lane] = u.start, o--;
578
- }
579
- o = Math.max(0, o - o % n), l = Math.min(t, l + (n - 1 - l % n));
580
- }
581
- return { startIndex: o, endIndex: l };
582
- }
583
- function pt(s) {
584
- const c = new vt(P(s)), e = ze(c), n = c._didMount();
585
- return W(
586
- () => P(s).getScrollElement(),
587
- (t) => {
588
- t && c._willUpdate();
589
- },
590
- {
591
- immediate: !0
592
- }
593
- ), W(
594
- () => P(s),
595
- (t) => {
596
- c.setOptions({
597
- ...t,
598
- onChange: (a, o) => {
599
- var l;
600
- me(e), (l = t.onChange) == null || l.call(t, a, o);
601
- }
602
- }), c._willUpdate(), me(e);
603
- },
604
- {
605
- immediate: !0
606
- }
607
- ), Fe(n), e;
608
- }
609
- function ht(s) {
610
- return pt(
611
- O(() => ({
612
- observeElementRect: rt,
613
- observeElementOffset: ut,
614
- scrollToFn: ct,
615
- ...P(s)
616
- }))
617
- );
618
- }
619
- function mt() {
620
- let s = ve();
621
- return Ce(() => s.dispose()), s;
622
- }
623
- function bt() {
624
- let s = mt();
625
- return (c) => {
626
- s.dispose(), s.nextFrame(c);
627
- };
628
- }
629
- var Ae = ((s) => (s[s.Left = 0] = "Left", s[s.Right = 2] = "Right", s))(Ae || {});
630
- function gt(s, c) {
631
- return s === c;
632
- }
633
- var xt = ((s) => (s[s.Open = 0] = "Open", s[s.Closed = 1] = "Closed", s))(xt || {}), yt = ((s) => (s[s.Single = 0] = "Single", s[s.Multi = 1] = "Multi", s))(yt || {}), St = ((s) => (s[s.Pointer = 0] = "Pointer", s[s.Focus = 1] = "Focus", s[s.Other = 2] = "Other", s))(St || {});
634
- let Te = Symbol("ComboboxContext");
635
- function Z(s) {
636
- let c = ke(Te, null);
637
- if (c === null) {
638
- let e = new Error(`<${s} /> is missing a parent <Combobox /> component.`);
639
- throw Error.captureStackTrace && Error.captureStackTrace(e, Z), e;
640
- }
641
- return c;
642
- }
643
- let Ve = Symbol("VirtualContext"), Ot = J({ name: "VirtualProvider", setup(s, { slots: c }) {
644
- let e = Z("VirtualProvider"), n = O(() => {
645
- let l = M(e.optionsRef);
646
- if (!l) return { start: 0, end: 0 };
647
- let f = window.getComputedStyle(l);
648
- return { start: parseFloat(f.paddingBlockStart || f.paddingTop), end: parseFloat(f.paddingBlockEnd || f.paddingBottom) };
649
- }), t = ht(O(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: e.virtual.value.options.length, estimateSize() {
650
- return 40;
651
- }, getScrollElement() {
652
- return M(e.optionsRef);
653
- }, overscan: 12 }))), a = O(() => {
654
- var l;
655
- return (l = e.virtual.value) == null ? void 0 : l.options;
656
- }), o = D(0);
657
- return W([a], () => {
658
- o.value += 1;
659
- }), Re(Ve, e.virtual.value ? t : null), () => [ae("div", { style: { position: "relative", width: "100%", height: `${t.value.getTotalSize()}px` }, ref: (l) => {
660
- if (l) {
661
- if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || e.activationTrigger.value === 0) return;
662
- e.activeOptionIndex.value !== null && e.virtual.value.options.length > e.activeOptionIndex.value && t.value.scrollToIndex(e.activeOptionIndex.value);
663
- }
664
- } }, t.value.getVirtualItems().map((l) => De(c.default({ option: e.virtual.value.options[l.index], open: e.comboboxState.value === 0 })[0], { key: `${o.value}-${l.index}`, "data-index": l.index, "aria-setsize": e.virtual.value.options.length, "aria-posinset": l.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${l.start}px)`, overflowAnchor: "none" } })))];
665
- } }), wt = J({ name: "Combobox", emits: { "update:modelValue": (s) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(s, { slots: c, attrs: e, emit: n }) {
666
- let t = D(1), a = D(null), o = D(null), l = D(null), f = D(null), v = D({ static: !1, hold: !1 }), u = D([]), i = D(null), b = D(2), R = D(!1);
667
- function E(r = (m) => m) {
668
- let m = i.value !== null ? u.value[i.value] : null, y = r(u.value.slice()), S = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((V, L) => V.dataRef.order.value - L.dataRef.order.value) : Qe(y, (V) => M(V.dataRef.domRef)), T = m ? S.indexOf(m) : null;
669
- return T === -1 && (T = null), { options: S, activeOptionIndex: T };
670
- }
671
- let w = O(() => s.multiple ? 1 : 0), F = O(() => s.nullable), [$, g] = _e(O(() => s.modelValue), (r) => n("update:modelValue", r), O(() => s.defaultValue)), I = O(() => $.value === void 0 ? le(w.value, { 1: [], 0: void 0 }) : $.value), z = null, p = null;
672
- function k(r) {
673
- return le(w.value, { 0() {
674
- return g?.(r);
675
- }, 1: () => {
676
- let m = q(d.value.value).slice(), y = q(r), S = m.findIndex((T) => d.compare(y, q(T)));
677
- return S === -1 ? m.push(y) : m.splice(S, 1), g?.(m);
678
- } });
679
- }
680
- let A = O(() => {
681
- });
682
- W([A], ([r], [m]) => {
683
- if (d.virtual.value && r && m && i.value !== null) {
684
- let y = r.indexOf(m[i.value]);
685
- y !== -1 ? i.value = y : i.value = null;
686
- }
687
- });
688
- let d = { comboboxState: t, value: I, mode: w, compare(r, m) {
689
- if (typeof s.by == "string") {
690
- let y = s.by;
691
- return r?.[y] === m?.[y];
692
- }
693
- return s.by === null ? gt(r, m) : s.by(r, m);
694
- }, calculateIndex(r) {
695
- return d.virtual.value ? s.by === null ? d.virtual.value.options.indexOf(r) : d.virtual.value.options.findIndex((m) => d.compare(m, r)) : u.value.findIndex((m) => d.compare(m.dataRef.value, r));
696
- }, defaultValue: O(() => s.defaultValue), nullable: F, immediate: O(() => !1), virtual: O(() => null), inputRef: o, labelRef: a, buttonRef: l, optionsRef: f, disabled: O(() => s.disabled), options: u, change(r) {
697
- g(r);
698
- }, activeOptionIndex: O(() => {
699
- if (R.value && i.value === null && (d.virtual.value ? d.virtual.value.options.length > 0 : u.value.length > 0)) {
700
- if (d.virtual.value) {
701
- let m = d.virtual.value.options.findIndex((y) => {
702
- var S;
703
- return !((S = d.virtual.value) != null && S.disabled(y));
704
- });
705
- if (m !== -1) return m;
706
- }
707
- let r = u.value.findIndex((m) => !m.dataRef.disabled);
708
- if (r !== -1) return r;
709
- }
710
- return i.value;
711
- }), activationTrigger: b, optionsPropsRef: v, closeCombobox() {
712
- R.value = !1, !s.disabled && t.value !== 1 && (t.value = 1, i.value = null);
713
- }, openCombobox() {
714
- if (R.value = !0, !s.disabled && t.value !== 0) {
715
- if (d.value.value) {
716
- let r = d.calculateIndex(d.value.value);
717
- r !== -1 && (i.value = r);
718
- }
719
- t.value = 0;
720
- }
721
- }, setActivationTrigger(r) {
722
- b.value = r;
723
- }, goToOption(r, m, y) {
724
- R.value = !1, z !== null && cancelAnimationFrame(z), z = requestAnimationFrame(() => {
725
- if (s.disabled || f.value && !v.value.static && t.value === 1) return;
726
- if (d.virtual.value) {
727
- i.value = r === N.Specific ? m : be({ focus: r }, { resolveItems: () => d.virtual.value.options, resolveActiveIndex: () => {
728
- var V, L;
729
- return (L = (V = d.activeOptionIndex.value) != null ? V : d.virtual.value.options.findIndex((h) => {
730
- var x;
731
- return !((x = d.virtual.value) != null && x.disabled(h));
732
- })) != null ? L : null;
733
- }, resolveDisabled: (V) => d.virtual.value.disabled(V), resolveId() {
734
- throw new Error("Function not implemented.");
735
- } }), b.value = y ?? 2;
736
- return;
737
- }
738
- let S = E();
739
- if (S.activeOptionIndex === null) {
740
- let V = S.options.findIndex((L) => !L.dataRef.disabled);
741
- V !== -1 && (S.activeOptionIndex = V);
742
- }
743
- let T = r === N.Specific ? m : be({ focus: r }, { resolveItems: () => S.options, resolveActiveIndex: () => S.activeOptionIndex, resolveId: (V) => V.id, resolveDisabled: (V) => V.dataRef.disabled });
744
- i.value = T, b.value = y ?? 2, u.value = S.options;
745
- });
746
- }, selectOption(r) {
747
- let m = u.value.find((S) => S.id === r);
748
- if (!m) return;
749
- let { dataRef: y } = m;
750
- k(y.value);
751
- }, selectActiveOption() {
752
- if (d.activeOptionIndex.value !== null) {
753
- if (d.virtual.value) k(d.virtual.value.options[d.activeOptionIndex.value]);
754
- else {
755
- let { dataRef: r } = u.value[d.activeOptionIndex.value];
756
- k(r.value);
757
- }
758
- d.goToOption(N.Specific, d.activeOptionIndex.value);
759
- }
760
- }, registerOption(r, m) {
761
- let y = Pe({ id: r, dataRef: m });
762
- if (d.virtual.value) {
763
- u.value.push(y);
764
- return;
765
- }
766
- p && cancelAnimationFrame(p);
767
- let S = E((T) => (T.push(y), T));
768
- i.value === null && d.isSelected(m.value.value) && (S.activeOptionIndex = S.options.indexOf(y)), u.value = S.options, i.value = S.activeOptionIndex, b.value = 2, S.options.some((T) => !M(T.dataRef.domRef)) && (p = requestAnimationFrame(() => {
769
- let T = E();
770
- u.value = T.options, i.value = T.activeOptionIndex;
771
- }));
772
- }, unregisterOption(r, m) {
773
- if (z !== null && cancelAnimationFrame(z), m && (R.value = !0), d.virtual.value) {
774
- u.value = u.value.filter((S) => S.id !== r);
775
- return;
776
- }
777
- let y = E((S) => {
778
- let T = S.findIndex((V) => V.id === r);
779
- return T !== -1 && S.splice(T, 1), S;
780
- });
781
- u.value = y.options, i.value = y.activeOptionIndex, b.value = 2;
782
- }, isSelected(r) {
783
- return le(w.value, { 0: () => d.compare(q(d.value.value), q(r)), 1: () => q(d.value.value).some((m) => d.compare(q(m), q(r))) });
784
- }, isActive(r) {
785
- return i.value === d.calculateIndex(r);
786
- } };
787
- He([o, l, f], () => d.closeCombobox(), O(() => t.value === 0)), Re(Te, d), tt(O(() => le(t.value, { 0: ue.Open, 1: ue.Closed })));
788
- let C = O(() => {
789
- var r;
790
- return (r = M(o)) == null ? void 0 : r.closest("form");
791
- });
792
- return fe(() => {
793
- W([C], () => {
794
- if (!C.value || s.defaultValue === void 0) return;
795
- function r() {
796
- d.change(s.defaultValue);
797
- }
798
- return C.value.addEventListener("reset", r), () => {
799
- var m;
800
- (m = C.value) == null || m.removeEventListener("reset", r);
801
- };
802
- }, { immediate: !0 });
803
- }), () => {
804
- var r, m, y;
805
- let { name: S, disabled: T, form: V, ...L } = s, h = { open: t.value === 0, disabled: T, activeIndex: d.activeOptionIndex.value, activeOption: d.activeOptionIndex.value === null ? null : d.virtual.value ? d.virtual.value.options[(r = d.activeOptionIndex.value) != null ? r : 0] : (y = (m = d.options.value[d.activeOptionIndex.value]) == null ? void 0 : m.dataRef.value) != null ? y : null, value: I.value };
806
- return ae(Ee, [...S != null && I.value != null ? We({ [S]: I.value }).map(([x, B]) => ae(Ze, qe({ features: et.Hidden, key: x, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: V, disabled: T, name: x, value: B }))) : [], se({ theirProps: { ...e, ...pe(L, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: h, slots: c, attrs: e, name: "Combobox" })]);
807
- };
808
- } });
809
- J({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(s, { attrs: c, slots: e }) {
810
- var n;
811
- let t = (n = s.id) != null ? n : `headlessui-combobox-label-${ne()}`, a = Z("ComboboxLabel");
812
- function o() {
813
- var l;
814
- (l = M(a.inputRef)) == null || l.focus({ preventScroll: !0 });
815
- }
816
- return () => {
817
- let l = { open: a.comboboxState.value === 0, disabled: a.disabled.value }, { ...f } = s, v = { id: t, ref: a.labelRef, onClick: o };
818
- return se({ ourProps: v, theirProps: f, slot: l, attrs: c, slots: e, name: "ComboboxLabel" });
819
- };
820
- } });
821
- let It = J({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(s, { attrs: c, slots: e, expose: n }) {
822
- var t;
823
- let a = (t = s.id) != null ? t : `headlessui-combobox-button-${ne()}`, o = Z("ComboboxButton");
824
- n({ el: o.buttonRef, $el: o.buttonRef });
825
- function l(u) {
826
- o.disabled.value || (o.comboboxState.value === 0 ? o.closeCombobox() : (u.preventDefault(), o.openCombobox()), X(() => {
827
- var i;
828
- return (i = M(o.inputRef)) == null ? void 0 : i.focus({ preventScroll: !0 });
829
- }));
830
- }
831
- function f(u) {
832
- switch (u.key) {
833
- case j.ArrowDown:
834
- u.preventDefault(), u.stopPropagation(), o.comboboxState.value === 1 && o.openCombobox(), X(() => {
835
- var i;
836
- return (i = o.inputRef.value) == null ? void 0 : i.focus({ preventScroll: !0 });
837
- });
838
- return;
839
- case j.ArrowUp:
840
- u.preventDefault(), u.stopPropagation(), o.comboboxState.value === 1 && (o.openCombobox(), X(() => {
841
- o.value.value || o.goToOption(N.Last);
842
- })), X(() => {
843
- var i;
844
- return (i = o.inputRef.value) == null ? void 0 : i.focus({ preventScroll: !0 });
845
- });
846
- return;
847
- case j.Escape:
848
- if (o.comboboxState.value !== 0) return;
849
- u.preventDefault(), o.optionsRef.value && !o.optionsPropsRef.value.static && u.stopPropagation(), o.closeCombobox(), X(() => {
850
- var i;
851
- return (i = o.inputRef.value) == null ? void 0 : i.focus({ preventScroll: !0 });
852
- });
853
- return;
854
- }
855
- }
856
- let v = Ye(O(() => ({ as: s.as, type: c.type })), o.buttonRef);
857
- return () => {
858
- var u, i;
859
- let b = { open: o.comboboxState.value === 0, disabled: o.disabled.value, value: o.value.value }, { ...R } = s, E = { ref: o.buttonRef, id: a, type: v.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (u = M(o.optionsRef)) == null ? void 0 : u.id, "aria-expanded": o.comboboxState.value === 0, "aria-labelledby": o.labelRef.value ? [(i = M(o.labelRef)) == null ? void 0 : i.id, a].join(" ") : void 0, disabled: o.disabled.value === !0 ? !0 : void 0, onKeydown: f, onClick: l };
860
- return se({ ourProps: E, theirProps: R, slot: b, attrs: c, slots: e, name: "ComboboxButton" });
861
- };
862
- } }), Ct = J({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (s) => !0 }, setup(s, { emit: c, attrs: e, slots: n, expose: t }) {
863
- var a;
864
- let o = (a = s.id) != null ? a : `headlessui-combobox-input-${ne()}`, l = Z("ComboboxInput"), f = O(() => Ue(M(l.inputRef))), v = { value: !1 };
865
- t({ el: l.inputRef, $el: l.inputRef });
866
- function u() {
867
- l.change(null);
868
- let p = M(l.optionsRef);
869
- p && (p.scrollTop = 0), l.goToOption(N.Nothing);
870
- }
871
- let i = O(() => {
872
- var p;
873
- let k = l.value.value;
874
- return M(l.inputRef) ? typeof s.displayValue < "u" && k !== void 0 ? (p = s.displayValue(k)) != null ? p : "" : typeof k == "string" ? k : "" : "";
875
- });
876
- fe(() => {
877
- W([i, l.comboboxState, f], ([p, k], [A, d]) => {
878
- if (v.value) return;
879
- let C = M(l.inputRef);
880
- C && ((d === 0 && k === 1 || p !== A) && (C.value = p), requestAnimationFrame(() => {
881
- var r;
882
- if (v.value || !C || ((r = f.value) == null ? void 0 : r.activeElement) !== C) return;
883
- let { selectionStart: m, selectionEnd: y } = C;
884
- Math.abs((y ?? 0) - (m ?? 0)) === 0 && m === 0 && C.setSelectionRange(C.value.length, C.value.length);
885
- }));
886
- }, { immediate: !0 }), W([l.comboboxState], ([p], [k]) => {
887
- if (p === 0 && k === 1) {
888
- if (v.value) return;
889
- let A = M(l.inputRef);
890
- if (!A) return;
891
- let d = A.value, { selectionStart: C, selectionEnd: r, selectionDirection: m } = A;
892
- A.value = "", A.value = d, m !== null ? A.setSelectionRange(C, r, m) : A.setSelectionRange(C, r);
893
- }
894
- });
895
- });
896
- let b = D(!1);
897
- function R() {
898
- b.value = !0;
899
- }
900
- function E() {
901
- ve().nextFrame(() => {
902
- b.value = !1;
903
- });
904
- }
905
- let w = bt();
906
- function F(p) {
907
- switch (v.value = !0, w(() => {
908
- v.value = !1;
909
- }), p.key) {
910
- case j.Enter:
911
- if (v.value = !1, l.comboboxState.value !== 0 || b.value) return;
912
- if (p.preventDefault(), p.stopPropagation(), l.activeOptionIndex.value === null) {
913
- l.closeCombobox();
914
- return;
915
- }
916
- l.selectActiveOption(), l.mode.value === 0 && l.closeCombobox();
917
- break;
918
- case j.ArrowDown:
919
- return v.value = !1, p.preventDefault(), p.stopPropagation(), le(l.comboboxState.value, { 0: () => l.goToOption(N.Next), 1: () => l.openCombobox() });
920
- case j.ArrowUp:
921
- return v.value = !1, p.preventDefault(), p.stopPropagation(), le(l.comboboxState.value, { 0: () => l.goToOption(N.Previous), 1: () => {
922
- l.openCombobox(), X(() => {
923
- l.value.value || l.goToOption(N.Last);
924
- });
925
- } });
926
- case j.Home:
927
- if (p.shiftKey) break;
928
- return v.value = !1, p.preventDefault(), p.stopPropagation(), l.goToOption(N.First);
929
- case j.PageUp:
930
- return v.value = !1, p.preventDefault(), p.stopPropagation(), l.goToOption(N.First);
931
- case j.End:
932
- if (p.shiftKey) break;
933
- return v.value = !1, p.preventDefault(), p.stopPropagation(), l.goToOption(N.Last);
934
- case j.PageDown:
935
- return v.value = !1, p.preventDefault(), p.stopPropagation(), l.goToOption(N.Last);
936
- case j.Escape:
937
- if (v.value = !1, l.comboboxState.value !== 0) return;
938
- p.preventDefault(), l.optionsRef.value && !l.optionsPropsRef.value.static && p.stopPropagation(), l.nullable.value && l.mode.value === 0 && l.value.value === null && u(), l.closeCombobox();
939
- break;
940
- case j.Tab:
941
- if (v.value = !1, l.comboboxState.value !== 0) return;
942
- l.mode.value === 0 && l.activationTrigger.value !== 1 && l.selectActiveOption(), l.closeCombobox();
943
- break;
944
- }
945
- }
946
- function $(p) {
947
- c("change", p), l.nullable.value && l.mode.value === 0 && p.target.value === "" && u(), l.openCombobox();
948
- }
949
- function g(p) {
950
- var k, A, d;
951
- let C = (k = p.relatedTarget) != null ? k : ge.find((r) => r !== p.currentTarget);
952
- if (v.value = !1, !((A = M(l.optionsRef)) != null && A.contains(C)) && !((d = M(l.buttonRef)) != null && d.contains(C)) && l.comboboxState.value === 0) return p.preventDefault(), l.mode.value === 0 && (l.nullable.value && l.value.value === null ? u() : l.activationTrigger.value !== 1 && l.selectActiveOption()), l.closeCombobox();
953
- }
954
- function I(p) {
955
- var k, A, d;
956
- let C = (k = p.relatedTarget) != null ? k : ge.find((r) => r !== p.currentTarget);
957
- (A = M(l.buttonRef)) != null && A.contains(C) || (d = M(l.optionsRef)) != null && d.contains(C) || l.disabled.value || l.immediate.value && l.comboboxState.value !== 0 && (l.openCombobox(), ve().nextFrame(() => {
958
- l.setActivationTrigger(1);
959
- }));
960
- }
961
- let z = O(() => {
962
- var p, k, A, d;
963
- return (d = (A = (k = s.defaultValue) != null ? k : l.defaultValue.value !== void 0 ? (p = s.displayValue) == null ? void 0 : p.call(s, l.defaultValue.value) : null) != null ? A : l.defaultValue.value) != null ? d : "";
964
- });
965
- return () => {
966
- var p, k, A, d, C, r, m;
967
- let y = { open: l.comboboxState.value === 0 }, { displayValue: S, onChange: T, ...V } = s, L = { "aria-controls": (p = l.optionsRef.value) == null ? void 0 : p.id, "aria-expanded": l.comboboxState.value === 0, "aria-activedescendant": l.activeOptionIndex.value === null ? void 0 : l.virtual.value ? (k = l.options.value.find((h) => !l.virtual.value.disabled(h.dataRef.value) && l.compare(h.dataRef.value, l.virtual.value.options[l.activeOptionIndex.value]))) == null ? void 0 : k.id : (A = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : A.id, "aria-labelledby": (r = (d = M(l.labelRef)) == null ? void 0 : d.id) != null ? r : (C = M(l.buttonRef)) == null ? void 0 : C.id, "aria-autocomplete": "list", id: o, onCompositionstart: R, onCompositionend: E, onKeydown: F, onInput: $, onFocus: I, onBlur: g, role: "combobox", type: (m = e.type) != null ? m : "text", tabIndex: 0, ref: l.inputRef, defaultValue: z.value, disabled: l.disabled.value === !0 ? !0 : void 0 };
968
- return se({ ourProps: L, theirProps: V, slot: y, attrs: e, slots: n, features: re.RenderStrategy | re.Static, name: "ComboboxInput" });
969
- };
970
- } }), Rt = J({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(s, { attrs: c, slots: e, expose: n }) {
971
- let t = Z("ComboboxOptions"), a = `headlessui-combobox-options-${ne()}`;
972
- n({ el: t.optionsRef, $el: t.optionsRef }), ie(() => {
973
- t.optionsPropsRef.value.static = s.static;
974
- }), ie(() => {
975
- t.optionsPropsRef.value.hold = s.hold;
976
- });
977
- let o = lt(), l = O(() => o !== null ? (o.value & ue.Open) === ue.Open : t.comboboxState.value === 0);
978
- Xe({ container: O(() => M(t.optionsRef)), enabled: O(() => t.comboboxState.value === 0), accept(v) {
979
- return v.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : v.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
980
- }, walk(v) {
981
- v.setAttribute("role", "none");
982
- } });
983
- function f(v) {
984
- v.preventDefault();
985
- }
986
- return () => {
987
- var v, u, i;
988
- let b = { open: t.comboboxState.value === 0 }, R = { "aria-labelledby": (i = (v = M(t.labelRef)) == null ? void 0 : v.id) != null ? i : (u = M(t.buttonRef)) == null ? void 0 : u.id, id: a, ref: t.optionsRef, role: "listbox", "aria-multiselectable": t.mode.value === 1 ? !0 : void 0, onMousedown: f }, E = pe(s, ["hold"]);
989
- return se({ ourProps: R, theirProps: E, slot: b, attrs: c, slots: t.virtual.value && t.comboboxState.value === 0 ? { ...e, default: () => [ae(Ot, {}, e.default)] } : e, features: re.RenderStrategy | re.Static, visible: l.value, name: "ComboboxOptions" });
990
- };
991
- } }), Ie = J({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(s, { slots: c, attrs: e, expose: n }) {
992
- let t = Z("ComboboxOption"), a = `headlessui-combobox-option-${ne()}`, o = D(null), l = O(() => s.disabled);
993
- n({ el: o, $el: o });
994
- let f = O(() => {
995
- var g;
996
- return t.virtual.value ? t.activeOptionIndex.value === t.calculateIndex(s.value) : t.activeOptionIndex.value === null ? !1 : ((g = t.options.value[t.activeOptionIndex.value]) == null ? void 0 : g.id) === a;
997
- }), v = O(() => t.isSelected(s.value)), u = ke(Ve, null), i = O(() => ({ disabled: s.disabled, value: s.value, domRef: o, order: O(() => s.order) }));
998
- fe(() => t.registerOption(a, i)), Ce(() => t.unregisterOption(a, f.value)), ie(() => {
999
- let g = M(o);
1000
- g && u?.value.measureElement(g);
1001
- }), ie(() => {
1002
- t.comboboxState.value === 0 && f.value && (t.virtual.value || t.activationTrigger.value !== 0 && X(() => {
1003
- var g, I;
1004
- return (I = (g = M(o)) == null ? void 0 : g.scrollIntoView) == null ? void 0 : I.call(g, { block: "nearest" });
1005
- }));
1006
- });
1007
- function b(g) {
1008
- g.preventDefault(), g.button === Ae.Left && (l.value || (t.selectOption(a), Je() || requestAnimationFrame(() => {
1009
- var I;
1010
- return (I = M(t.inputRef)) == null ? void 0 : I.focus({ preventScroll: !0 });
1011
- }), t.mode.value === 0 && t.closeCombobox()));
1012
- }
1013
- function R() {
1014
- var g;
1015
- if (s.disabled || (g = t.virtual.value) != null && g.disabled(s.value)) return t.goToOption(N.Nothing);
1016
- let I = t.calculateIndex(s.value);
1017
- t.goToOption(N.Specific, I);
1018
- }
1019
- let E = Ge();
1020
- function w(g) {
1021
- E.update(g);
1022
- }
1023
- function F(g) {
1024
- var I;
1025
- if (!E.wasMoved(g) || s.disabled || (I = t.virtual.value) != null && I.disabled(s.value) || f.value) return;
1026
- let z = t.calculateIndex(s.value);
1027
- t.goToOption(N.Specific, z, 0);
1028
- }
1029
- function $(g) {
1030
- var I;
1031
- E.wasMoved(g) && (s.disabled || (I = t.virtual.value) != null && I.disabled(s.value) || f.value && (t.optionsPropsRef.value.hold || t.goToOption(N.Nothing)));
1032
- }
1033
- return () => {
1034
- let { disabled: g } = s, I = { active: f.value, selected: v.value, disabled: g }, z = { id: a, ref: o, role: "option", tabIndex: g === !0 ? void 0 : -1, "aria-disabled": g === !0 ? !0 : void 0, "aria-selected": v.value, disabled: void 0, onMousedown: b, onFocus: R, onPointerenter: w, onMouseenter: w, onPointermove: F, onMousemove: F, onPointerleave: $, onMouseleave: $ }, p = pe(s, ["order", "value"]);
1035
- return se({ ourProps: z, theirProps: p, slot: I, attrs: e, slots: c, name: "ComboboxOption" });
1036
- };
1037
- } });
1038
- const Et = { class: "sl-w-full" }, kt = { class: "sl-block sl-truncate sl-font-medium" }, Mt = {
1039
- key: 0,
1040
- class: "sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3 sl-text-stachelock-600 dark:sl-text-stachelock-400"
1041
- }, At = {
1042
- key: 1,
1043
- class: "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700 dark:sl-text-slate-200"
1044
- }, Tt = { class: "sl-flex sl-items-center sl-gap-2" }, Vt = {
1045
- key: 2,
1046
- class: "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700 dark:sl-text-slate-200"
1047
- }, zt = { class: "sl-block sl-truncate" }, Ft = { key: 0 }, Pt = 50, el = /* @__PURE__ */ J({
1048
- __name: "ComboboxInput",
1049
- props: {
1050
- name: {},
1051
- items: {},
1052
- label: {},
1053
- placeholder: {},
1054
- disabled: { type: Boolean },
1055
- rules: {},
1056
- validateOnMount: { type: Boolean },
1057
- successMessage: {},
1058
- tertiaryLabel: {},
1059
- itemKey: { default: "id" },
1060
- itemText: { default: "name" },
1061
- customQuery: {},
1062
- loading: { type: Boolean, default: !1 },
1063
- multiple: { type: Boolean, default: !1 },
1064
- showAll: { type: Boolean, default: !1 },
1065
- modelValue: { type: [String, Number, Boolean, null, Object, Array] },
1066
- boxShadow: { type: Boolean, default: !1 }
1067
- },
1068
- emits: ["update:modelValue", "update:query", "blur", "focus"],
1069
- setup(s, { emit: c }) {
1070
- const e = s, n = c, t = je(e.name), a = D(""), { value: o, errorMessage: l, handleChange: f, meta: v, setTouched: u } = Be(
1071
- () => e.name,
1072
- e.rules,
1073
- {
1074
- validateOnMount: e.validateOnMount,
1075
- initialValue: e.modelValue
1076
- }
1077
- ), i = D(
1078
- e.multiple ? Array.isArray(e.modelValue) ? e.modelValue : [] : e.modelValue ?? null
1079
- );
1080
- W(
1081
- () => e.modelValue,
1082
- (h) => {
1083
- if (e.multiple) {
1084
- const x = Array.isArray(h) ? h : [];
1085
- x !== i.value && (i.value = x, o.value = x);
1086
- } else
1087
- h !== i.value && (i.value = h, o.value = h);
1088
- },
1089
- { immediate: !0 }
1090
- ), W(
1091
- i,
1092
- (h) => {
1093
- n("update:modelValue", h);
1094
- }
1095
- );
1096
- const b = O(() => [
1097
- "sl-w-full",
1098
- "sl-border-none",
1099
- "sl-py-2",
1100
- "sl-pl-3",
1101
- "sl-pr-10",
1102
- "sl-text-sm",
1103
- "sl-leading-5",
1104
- "sl-text-gray-900",
1105
- "dark:sl-text-slate-100",
1106
- "placeholder:sl-text-gray-400",
1107
- "dark:placeholder:sl-text-slate-500",
1108
- "focus:sl-outline-none",
1109
- "focus:sl-ring-0",
1110
- "sl-bg-transparent"
1111
- ].join(" ")), R = O(() => {
1112
- const h = [
1113
- "sl-relative",
1114
- "sl-w-full",
1115
- "sl-cursor-default",
1116
- "sl-rounded-lg",
1117
- "sl-bg-white",
1118
- "dark:sl-bg-slate-900",
1119
- "sl-text-left",
1120
- "sl-border",
1121
- "focus-within:sl-ring-2",
1122
- "focus-within:sl-ring-stachelock-500",
1123
- "focus-within:sl-border-stachelock-500",
1124
- "sl-transition-all",
1125
- "sl-duration-200"
1126
- ];
1127
- return e.disabled ? h.push(
1128
- "sl-bg-gray-50",
1129
- "dark:sl-bg-slate-800",
1130
- "sl-cursor-not-allowed",
1131
- "sl-border-gray-200",
1132
- "dark:sl-border-slate-700"
1133
- ) : l.value ? h.push(
1134
- "sl-border-red-300",
1135
- "dark:sl-border-red-500",
1136
- "focus-within:sl-ring-red-500",
1137
- "focus-within:sl-border-red-500"
1138
- ) : v.valid && v.touched ? h.push(
1139
- "sl-border-green-300",
1140
- "dark:sl-border-green-500",
1141
- "focus-within:sl-ring-green-500",
1142
- "focus-within:sl-border-green-500"
1143
- ) : h.push(
1144
- "sl-border-gray-300",
1145
- "dark:sl-border-slate-600",
1146
- "hover:sl-border-gray-400",
1147
- "dark:hover:sl-border-slate-500"
1148
- ), h.join(" ");
1149
- }), E = (h) => {
1150
- const x = h[e.itemKey];
1151
- return x == null ? "" : typeof x == "string" || typeof x == "number" ? x : String(x);
1152
- }, w = (h) => {
1153
- if (!h) return "";
1154
- const x = h[e.itemText];
1155
- return x != null ? String(x) : String(h);
1156
- }, F = D([]), $ = D([]), g = D(1), I = () => {
1157
- const h = g.value * Pt;
1158
- $.value = F.value.slice(0, h), g.value += 1;
1159
- }, z = () => {
1160
- g.value = 1, $.value = [], I();
1161
- }, p = () => {
1162
- if (a.value && a.value !== "")
1163
- if (e.customQuery)
1164
- F.value = e.customQuery(a.value, e.items);
1165
- else {
1166
- const h = a.value.toLowerCase();
1167
- F.value = e.items.filter((x) => w(x).toLowerCase().includes(h));
1168
- }
1169
- else
1170
- F.value = e.items;
1171
- z();
1172
- }, k = O(() => e.items.filter((h) => !h.disabled)), A = (h) => {
1173
- const x = h.target;
1174
- a.value = x.value, n("update:query", a.value), p();
1175
- }, d = (h) => {
1176
- if (e.multiple) {
1177
- const x = Array.isArray(h) ? h : [];
1178
- i.value = x, o.value = x, u(!0), f(x);
1179
- } else
1180
- i.value = h, o.value = h, u(!0), f(h);
1181
- }, C = O(() => {
1182
- if (!e.multiple || !Array.isArray(i.value)) return !1;
1183
- const h = k.value;
1184
- if (h.length === 0) return !1;
1185
- const x = Array.isArray(i.value) ? i.value : [], B = new Set(x.map((ee) => E(ee)));
1186
- return h.every((ee) => B.has(E(ee)));
1187
- }), r = () => {
1188
- e.multiple && (C.value ? i.value = [] : i.value = [...k.value], u(!0), f(i.value), n("update:modelValue", i.value));
1189
- }, m = (h) => e.multiple ? !Array.isArray(h) || h.length === 0 ? "" : h.length === 1 ? w(h[0]) : `${h.length} selected` : w(h), y = O(() => e.multiple || a.value === "" ? null : { [e.itemKey]: null, [e.itemText]: a.value }), S = () => {
1190
- e.multiple || y.value && (e.customQuery ? (n("update:modelValue", a.value), f(a.value)) : (i.value = y.value, f(i.value)));
1191
- }, T = (h) => {
1192
- const x = h.target;
1193
- x.scrollTop + x.clientHeight >= x.scrollHeight && I();
1194
- }, V = (h) => {
1195
- n("focus", h);
1196
- }, L = (h) => {
1197
- !e.multiple && y.value && (i.value = y.value, f(i.value), n("update:modelValue", i.value)), n("blur", h);
1198
- };
1199
- return W(() => e.items, () => {
1200
- p();
1201
- }, { immediate: !0, deep: !0 }), (h, x) => (_(), H("div", Et, [
1202
- K(Ne, {
1203
- id: P(t),
1204
- name: s.name,
1205
- label: s.label,
1206
- disabled: s.disabled,
1207
- optional: !s.rules,
1208
- "tertiary-label": s.tertiaryLabel,
1209
- "box-shadow": s.boxShadow,
1210
- "error-message": P(l),
1211
- "success-message": s.successMessage,
1212
- "is-valid": P(v).valid,
1213
- "is-touched": P(v).touched
1214
- }, {
1215
- "success-message": U(() => [
1216
- s.successMessage ? (_(), H("span", Ft, oe(s.successMessage), 1)) : G("", !0)
1217
- ]),
1218
- default: U(() => [
1219
- K(P(wt), {
1220
- modelValue: i.value,
1221
- "onUpdate:modelValue": [
1222
- x[3] || (x[3] = (B) => i.value = B),
1223
- d
1224
- ],
1225
- disabled: s.disabled,
1226
- multiple: s.multiple
1227
- }, {
1228
- default: U(() => [
1229
- Q("div", {
1230
- class: Y(R.value)
1231
- }, [
1232
- K(P(Ct), {
1233
- id: P(t),
1234
- class: Y(b.value),
1235
- "display-value": m,
1236
- placeholder: s.placeholder || "Type to search...",
1237
- modelValue: a.value,
1238
- "onUpdate:modelValue": x[0] || (x[0] = (B) => a.value = B),
1239
- onInput: A,
1240
- onBlur: L,
1241
- onFocus: V
1242
- }, null, 8, ["id", "class", "placeholder", "modelValue"]),
1243
- K(P(It), { class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2" }, {
1244
- default: U(() => [
1245
- K(P(st), {
1246
- class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-300",
1247
- "aria-hidden": "true"
1248
- })
1249
- ]),
1250
- _: 1
1251
- }),
1252
- K(P(Ke), {
1253
- leave: "sl-transition sl-ease-in sl-duration-100",
1254
- "leave-from": "sl-opacity-100",
1255
- "leave-to": "sl-opacity-0",
1256
- onAfterLeave: x[2] || (x[2] = (B) => a.value = "")
1257
- }, {
1258
- default: U(() => [
1259
- F.value.length > 0 || a.value !== "" || s.multiple && s.showAll ? (_(), de(P(Rt), {
1260
- key: 0,
1261
- class: "sl-absolute sl-z-[9999] sl-mt-1 sl-max-h-60 sl-w-full sl-overflow-auto sl-rounded-md sl-bg-white dark:sl-bg-slate-800 sl-py-1 sl-text-base sl-shadow-lg dark:sl-shadow-slate-900/50 sl-ring-1 sl-ring-black sl-ring-opacity-5 dark:sl-ring-slate-700 focus:sl-outline-none sm:sl-text-sm",
1262
- onScroll: T
1263
- }, {
1264
- default: U(() => [
1265
- s.multiple && s.showAll ? (_(), H("li", {
1266
- key: 0,
1267
- role: "button",
1268
- tabindex: "0",
1269
- onMousedown: x[1] || (x[1] = ce(() => {
1270
- }, ["prevent"])),
1271
- onClick: ce(r, ["prevent", "stop"]),
1272
- class: Y([
1273
- "sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4 sl-text-gray-900 dark:sl-text-slate-200",
1274
- "hover:sl-bg-stachelock-600 hover:sl-text-white"
1275
- ]),
1276
- "data-testid": "select-all-option"
1277
- }, [
1278
- Q("span", kt, oe(C.value ? "Unselect All" : "Select All"), 1),
1279
- C.value ? (_(), H("span", Mt, [
1280
- K(P(xe), {
1281
- class: "sl-h-5 sl-w-5",
1282
- "aria-hidden": "true"
1283
- })
1284
- ])) : G("", !0)
1285
- ], 32)) : G("", !0),
1286
- s.loading ? (_(), H("div", At, [
1287
- Q("div", Tt, [
1288
- K(Le, { size: "sm" }),
1289
- x[4] || (x[4] = Q("span", null, "Loading...", -1))
1290
- ])
1291
- ])) : a.value !== "" && F.value.length === 0 ? (_(), H("div", Vt, " Nothing found. ")) : G("", !0),
1292
- (_(!0), H(Ee, null, $e($.value, (B) => (_(), de(P(Ie), {
1293
- key: E(B),
1294
- value: B,
1295
- as: "template",
1296
- disabled: B.disabled
1297
- }, {
1298
- default: U(({ active: ee, selected: he }) => [
1299
- Q("li", {
1300
- class: Y([
1301
- "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-10 sl-pr-4",
1302
- ee ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200",
1303
- B.disabled ? "sl-opacity-50 sl-cursor-not-allowed" : ""
1304
- ])
1305
- }, [
1306
- Q("span", {
1307
- class: Y([
1308
- "sl-block sl-truncate",
1309
- he ? "sl-font-medium" : "sl-font-normal"
1310
- ])
1311
- }, oe(w(B)), 3),
1312
- he ? (_(), H("span", {
1313
- key: 0,
1314
- class: Y(["sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3", ee ? "sl-text-white" : "sl-text-stachelock-600 dark:sl-text-stachelock-400"])
1315
- }, [
1316
- K(P(xe), {
1317
- class: "sl-h-5 sl-w-5",
1318
- "aria-hidden": "true"
1319
- })
1320
- ], 2)) : G("", !0)
1321
- ], 2)
1322
- ]),
1323
- _: 2
1324
- }, 1032, ["value", "disabled"]))), 128)),
1325
- !s.multiple && y.value ? (_(), de(P(Ie), {
1326
- key: 3,
1327
- value: y.value,
1328
- as: "template"
1329
- }, {
1330
- default: U(({ active: B }) => [
1331
- Q("li", {
1332
- onClick: ce(S, ["prevent", "stop"]),
1333
- class: Y([
1334
- "sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4",
1335
- B ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200"
1336
- ])
1337
- }, [
1338
- Q("span", zt, ' Enter "' + oe(a.value) + '" manually ', 1)
1339
- ], 2)
1340
- ]),
1341
- _: 1
1342
- }, 8, ["value"])) : G("", !0)
1343
- ]),
1344
- _: 1
1345
- })) : G("", !0)
1346
- ]),
1347
- _: 1
1348
- })
1349
- ], 2)
1350
- ]),
1351
- _: 1
1352
- }, 8, ["modelValue", "disabled", "multiple"])
1353
- ]),
1354
- _: 1
1355
- }, 8, ["id", "name", "label", "disabled", "optional", "tertiary-label", "box-shadow", "error-message", "success-message", "is-valid", "is-touched"])
1356
- ]));
1357
- }
1358
- });
1359
- export {
1360
- el as _
1361
- };
1362
- //# sourceMappingURL=ComboboxInput.vue_vue_type_script_setup_true_lang-kEj-NYqm.js.map