@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31

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 (294) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +106 -10
  3. package/auto-imports.d.ts +7 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +22 -15
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
  10. package/dist/components/VvAccordion/index.d.ts +8 -9
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
  14. package/dist/components/VvAccordionGroup/index.d.ts +14 -6
  15. package/dist/components/VvAction/VvAction.es.js +78 -27
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
  18. package/dist/components/VvAction/index.d.ts +25 -9
  19. package/dist/components/VvAlert/VvAlert.es.js +204 -171
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
  22. package/dist/components/VvAlert/index.d.ts +17 -9
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -14
  27. package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  34. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  35. package/dist/components/VvBadge/VvBadge.es.js +78 -28
  36. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  37. package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
  38. package/dist/components/VvBadge/index.d.ts +4 -1
  39. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +291 -252
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
  46. package/dist/components/VvButton/index.d.ts +51 -29
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +86 -36
  52. package/dist/components/VvCard/VvCard.umd.js +1 -1
  53. package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
  54. package/dist/components/VvCard/index.d.ts +4 -1
  55. package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
  58. package/dist/components/VvCheckbox/index.d.ts +47 -14
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
  66. package/dist/components/VvCombobox/index.d.ts +62 -26
  67. package/dist/components/VvDialog/VvDialog.es.js +140 -153
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
  77. package/dist/components/VvDropdown/index.d.ts +52 -10
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
  81. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  83. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  84. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  85. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  86. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  87. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  88. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  89. package/dist/components/VvIcon/index.d.ts +33 -48
  90. package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
  91. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  92. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
  93. package/dist/components/VvInputFile/index.d.ts +200 -0
  94. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  95. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  96. package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
  97. package/dist/components/VvInputText/VvInputText.es.js +1237 -324
  98. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  99. package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
  100. package/dist/components/VvInputText/index.d.ts +99 -29
  101. package/dist/components/VvNav/VvNav.es.js +135 -56
  102. package/dist/components/VvNav/VvNav.umd.js +1 -1
  103. package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
  104. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  105. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  106. package/dist/components/VvNav/index.d.ts +5 -2
  107. package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
  108. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  109. package/dist/components/VvProgress/VvProgress.es.js +72 -26
  110. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  111. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  112. package/dist/components/VvProgress/index.d.ts +4 -1
  113. package/dist/components/VvRadio/VvRadio.es.js +160 -103
  114. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  115. package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
  116. package/dist/components/VvRadio/index.d.ts +50 -17
  117. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
  118. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  119. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
  120. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  121. package/dist/components/VvSelect/VvSelect.es.js +251 -238
  122. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  123. package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
  124. package/dist/components/VvSelect/index.d.ts +48 -14
  125. package/dist/components/VvTab/VvTab.es.js +191 -75
  126. package/dist/components/VvTab/VvTab.umd.js +1 -1
  127. package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
  128. package/dist/components/VvTab/index.d.ts +4 -1
  129. package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
  130. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  131. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
  132. package/dist/components/VvTextarea/index.d.ts +68 -19
  133. package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
  134. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  135. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
  136. package/dist/components/VvTooltip/index.d.ts +5 -2
  137. package/dist/components/common/HintSlot.d.ts +1 -1
  138. package/dist/components/index.d.ts +10 -0
  139. package/dist/components/index.es.js +3534 -1650
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +99 -4
  142. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  143. package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
  144. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
  145. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  146. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  147. package/dist/composables/index.d.ts +1 -0
  148. package/dist/composables/index.es.js +92 -3
  149. package/dist/composables/index.umd.js +1 -1
  150. package/dist/composables/useBlurhash.d.ts +7 -0
  151. package/dist/composables/useComponentIcon.d.ts +9 -8
  152. package/dist/composables/usePersistence.d.ts +2 -0
  153. package/dist/composables/useVolver.d.ts +1 -1
  154. package/dist/constants.d.ts +34 -32
  155. package/dist/directives/index.d.ts +3 -5
  156. package/dist/directives/index.es.js +99 -43
  157. package/dist/directives/index.umd.js +1 -1
  158. package/dist/directives/v-tooltip.es.js +97 -38
  159. package/dist/directives/v-tooltip.umd.js +1 -1
  160. package/dist/icons.es.js +267 -267
  161. package/dist/icons.umd.js +1 -1
  162. package/dist/index.d.ts +3 -1
  163. package/dist/index.es.js +90 -16
  164. package/dist/index.umd.js +1 -1
  165. package/dist/props/index.d.ts +272 -81
  166. package/dist/resolvers/unplugin.d.ts +6 -1
  167. package/dist/resolvers/unplugin.es.js +87 -10
  168. package/dist/resolvers/unplugin.umd.js +1 -1
  169. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
  170. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
  171. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  172. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  173. package/dist/stories/Button/Button.settings.d.ts +0 -1
  174. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  175. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  176. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  177. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  178. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  179. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  180. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  181. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  182. package/dist/test/expect.d.ts +1 -1
  183. package/dist/types/alert.d.ts +9 -7
  184. package/dist/types/blurhash.d.ts +12 -0
  185. package/dist/types/generic.d.ts +1 -2
  186. package/dist/types/group.d.ts +37 -15
  187. package/dist/types/index.d.ts +7 -0
  188. package/dist/types/input-file.d.ts +16 -0
  189. package/dist/types/nav.d.ts +2 -2
  190. package/dist/utils/ObjectUtilities.d.ts +0 -1
  191. package/dist/workers/blurhash.d.ts +1 -0
  192. package/package.json +78 -78
  193. package/src/Volver.ts +31 -20
  194. package/src/assets/icons/detailed.json +1 -1
  195. package/src/assets/icons/normal.json +1 -1
  196. package/src/assets/icons/simple.json +1 -1
  197. package/src/components/VvAccordion/VvAccordion.vue +121 -58
  198. package/src/components/VvAccordion/index.ts +8 -23
  199. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
  200. package/src/components/VvAccordionGroup/index.ts +6 -6
  201. package/src/components/VvAction/VvAction.vue +17 -5
  202. package/src/components/VvAlert/index.ts +14 -9
  203. package/src/components/VvAlertGroup/index.ts +3 -15
  204. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  205. package/src/components/VvBreadcrumb/index.ts +2 -8
  206. package/src/components/VvButton/VvButton.vue +17 -7
  207. package/src/components/VvButton/index.ts +9 -16
  208. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  209. package/src/components/VvCheckbox/index.ts +2 -2
  210. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  211. package/src/components/VvCombobox/VvCombobox.vue +15 -12
  212. package/src/components/VvCombobox/index.ts +4 -0
  213. package/src/components/VvDropdown/VvDropdown.vue +11 -2
  214. package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
  215. package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
  216. package/src/components/VvDropdown/index.ts +35 -1
  217. package/src/components/VvIcon/VvIcon.vue +2 -2
  218. package/src/components/VvIcon/index.ts +35 -48
  219. package/src/components/VvInputFile/VvInputFile.vue +395 -0
  220. package/src/components/VvInputFile/index.ts +135 -0
  221. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  222. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  223. package/src/components/VvInputText/VvInputText.vue +141 -33
  224. package/src/components/VvInputText/index.ts +31 -16
  225. package/src/components/VvNav/VvNav.vue +4 -2
  226. package/src/components/VvRadio/index.ts +5 -5
  227. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  228. package/src/components/VvSelect/VvSelect.vue +5 -8
  229. package/src/components/VvTab/VvTab.vue +5 -1
  230. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  231. package/src/components/index.ts +10 -0
  232. package/src/composables/alert/useAlert.ts +12 -9
  233. package/src/composables/dropdown/useProvideDropdown.ts +4 -4
  234. package/src/composables/group/useInjectedGroupState.ts +20 -16
  235. package/src/composables/group/useProvideGroupState.ts +10 -15
  236. package/src/composables/index.ts +1 -0
  237. package/src/composables/useBlurhash.ts +76 -0
  238. package/src/composables/useComponentIcon.ts +15 -14
  239. package/src/composables/usePersistence.ts +76 -0
  240. package/src/composables/useUniqueId.ts +2 -2
  241. package/src/constants.ts +47 -32
  242. package/src/directives/index.ts +3 -6
  243. package/src/directives/v-tooltip.ts +19 -10
  244. package/src/index.ts +3 -1
  245. package/src/props/index.ts +108 -31
  246. package/src/resolvers/unplugin.ts +24 -14
  247. package/src/stories/Accordion/Accordion.test.ts +1 -1
  248. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  249. package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
  250. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  251. package/src/stories/Alert/Alert.test.ts +1 -1
  252. package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
  253. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  254. package/src/stories/Avatar/Avatar.test.ts +1 -1
  255. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  256. package/src/stories/Badge/Badge.test.ts +1 -1
  257. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  258. package/src/stories/Button/Button.settings.ts +1 -4
  259. package/src/stories/Button/Button.test.ts +1 -1
  260. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  261. package/src/stories/Card/Card.test.ts +1 -1
  262. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  263. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
  264. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  265. package/src/stories/Combobox/Combobox.test.ts +1 -1
  266. package/src/stories/Dialog/Dialog.test.ts +2 -2
  267. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  268. package/src/stories/Icon/Icon.settings.ts +3 -3
  269. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  270. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  271. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  272. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  273. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  274. package/src/stories/InputText/InputText.test.ts +1 -1
  275. package/src/stories/Nav/Nav.test.ts +1 -1
  276. package/src/stories/Progress/Progress.test.ts +1 -1
  277. package/src/stories/Radio/Radio.test.ts +1 -1
  278. package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
  279. package/src/stories/Select/Select.test.ts +1 -1
  280. package/src/stories/Tab/Tab.settings.ts +2 -2
  281. package/src/stories/Tab/Tab.test.ts +1 -1
  282. package/src/stories/Textarea/Textarea.test.ts +1 -1
  283. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  284. package/src/stories/argTypes.ts +1 -1
  285. package/src/test/expect.ts +2 -4
  286. package/src/types/alert.ts +11 -7
  287. package/src/types/blurhash.ts +21 -0
  288. package/src/types/generic.ts +3 -3
  289. package/src/types/group.ts +22 -14
  290. package/src/types/index.ts +7 -0
  291. package/src/types/input-file.ts +18 -0
  292. package/src/types/nav.ts +2 -3
  293. package/src/utils/ObjectUtilities.ts +0 -11
  294. package/src/workers/blurhash.ts +9 -0
@@ -1,10 +1,15 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
1
+ import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, getCurrentInstance, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
- import { nanoid } from "nanoid";
5
- import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
4
+ import { uid } from "uid";
5
+ import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
6
6
  import mitt from "mitt";
7
7
  import { get } from "ts-dot-prop";
8
+ var StorageType = /* @__PURE__ */ ((StorageType2) => {
9
+ StorageType2["local"] = "local";
10
+ StorageType2["session"] = "session";
11
+ return StorageType2;
12
+ })(StorageType || {});
8
13
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
9
14
  Strategy2["absolute"] = "absolute";
10
15
  Strategy2["fixed"] = "fixed";
@@ -62,15 +67,10 @@ var DropdownItemRole = /* @__PURE__ */ ((DropdownItemRole2) => {
62
67
  DropdownItemRole2["presentation"] = "presentation";
63
68
  return DropdownItemRole2;
64
69
  })(DropdownItemRole || {});
65
- var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
66
- AnchorTarget2["_blank"] = "_blank";
67
- AnchorTarget2["_self"] = "_self";
68
- AnchorTarget2["_parent"] = "_parent";
69
- AnchorTarget2["_top"] = "_top";
70
- return AnchorTarget2;
71
- })(AnchorTarget || {});
72
70
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
73
- const INJECTION_KEY_BUTTON_GROUP = Symbol.for("buttonGroup");
71
+ const INJECTION_KEY_BUTTON_GROUP = Symbol.for(
72
+ "buttonGroup"
73
+ );
74
74
  const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
75
75
  "dropdownTrigger"
76
76
  );
@@ -95,10 +95,7 @@ const LinkProps = {
95
95
  /**
96
96
  * Anchor target
97
97
  */
98
- target: {
99
- type: String,
100
- validator: (value) => Object.values(AnchorTarget).includes(value)
101
- },
98
+ target: String,
102
99
  /**
103
100
  * Anchor rel
104
101
  */
@@ -111,27 +108,33 @@ const ValidProps = {
111
108
  /**
112
109
  * Valid status
113
110
  */
114
- valid: Boolean,
111
+ valid: { type: Boolean, default: false },
115
112
  /**
116
113
  * Valid label
117
114
  */
118
- validLabel: [String, Array]
115
+ validLabel: { type: [String, Array], default: void 0 }
119
116
  };
120
117
  const InvalidProps = {
121
118
  /**
122
119
  * Invalid status
123
120
  */
124
- invalid: Boolean,
121
+ invalid: {
122
+ type: Boolean,
123
+ default: false
124
+ },
125
125
  /**
126
126
  * Invalid label
127
127
  */
128
- invalidLabel: [String, Array]
128
+ invalidLabel: { type: [String, Array], default: void 0 }
129
129
  };
130
130
  const LoadingProps = {
131
131
  /**
132
132
  * Loading status
133
133
  */
134
- loading: Boolean,
134
+ loading: {
135
+ type: Boolean,
136
+ default: false
137
+ },
135
138
  /**
136
139
  * Loading label
137
140
  */
@@ -144,49 +147,73 @@ const DisabledProps = {
144
147
  /**
145
148
  * Whether the form control is disabled
146
149
  */
147
- disabled: Boolean
150
+ disabled: {
151
+ type: Boolean,
152
+ default: false
153
+ }
148
154
  };
149
155
  const SelectedProps = {
150
156
  /**
151
157
  * Whether the item is selected
152
158
  */
153
- selected: Boolean
159
+ selected: {
160
+ type: Boolean,
161
+ default: false
162
+ }
154
163
  };
155
164
  const ActiveProps = {
156
165
  /**
157
166
  * Whether the item is active
158
167
  */
159
- active: Boolean
168
+ active: {
169
+ type: Boolean,
170
+ default: false
171
+ }
160
172
  };
161
173
  const CurrentProps = {
162
174
  /**
163
175
  * Whether the item is current
164
176
  */
165
- current: Boolean
177
+ current: {
178
+ type: Boolean,
179
+ default: false
180
+ }
166
181
  };
167
182
  const PressedProps = {
168
183
  /**
169
184
  * Whether the item is pressed
170
185
  */
171
- pressed: Boolean
186
+ pressed: {
187
+ type: Boolean,
188
+ default: false
189
+ }
172
190
  };
173
191
  const LabelProps = {
174
192
  /**
175
193
  * The item label
176
194
  */
177
- label: [String, Number]
195
+ label: {
196
+ type: [String, Number],
197
+ default: void 0
198
+ }
178
199
  };
179
200
  const ReadonlyProps = {
180
201
  /**
181
202
  * The value is not editable
182
203
  */
183
- readonly: Boolean
204
+ readonly: {
205
+ type: Boolean,
206
+ default: false
207
+ }
184
208
  };
185
209
  const ModifiersProps = {
186
210
  /**
187
211
  * Component BEM modifiers
188
212
  */
189
- modifiers: [String, Array]
213
+ modifiers: {
214
+ type: [String, Array],
215
+ default: void 0
216
+ }
190
217
  };
191
218
  const HintProps = {
192
219
  hintLabel: { type: String, default: "" }
@@ -217,7 +244,10 @@ const IconProps = {
217
244
  * VvIcon name or props
218
245
  * @see VVIcon
219
246
  */
220
- icon: { type: [String, Object] },
247
+ icon: {
248
+ type: [String, Object],
249
+ default: void 0
250
+ },
221
251
  /**
222
252
  * VvIcon position
223
253
  */
@@ -238,7 +268,10 @@ const FloatingLabelProps = {
238
268
  /**
239
269
  * If true the label will be floating
240
270
  */
241
- floating: Boolean
271
+ floating: {
272
+ type: Boolean,
273
+ default: false
274
+ }
242
275
  };
243
276
  const UnselectableProps = {
244
277
  /**
@@ -274,7 +307,8 @@ const DropdownProps = {
274
307
  * Dropdown show / hide transition name
275
308
  */
276
309
  transitionName: {
277
- type: String
310
+ type: String,
311
+ default: void 0
278
312
  },
279
313
  /**
280
314
  * Offset of the dropdown from the trigger
@@ -342,7 +376,8 @@ const DropdownProps = {
342
376
  * Set dropdown width to the same as the trigger
343
377
  */
344
378
  triggerWidth: {
345
- type: Boolean
379
+ type: Boolean,
380
+ default: false
346
381
  }
347
382
  };
348
383
  const IdNameProps = {
@@ -359,7 +394,10 @@ const AutofocusProps = {
359
394
  * Global attribute autofocus
360
395
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
361
396
  */
362
- autofocus: Boolean
397
+ autofocus: {
398
+ type: Boolean,
399
+ default: false
400
+ }
363
401
  };
364
402
  const AutocompleteProps = {
365
403
  /**
@@ -389,10 +427,29 @@ const ActionProps = {
389
427
  ariaLabel: {
390
428
  type: String,
391
429
  default: void 0
430
+ },
431
+ /**
432
+ * Default tag for the action
433
+ */
434
+ defaultTag: {
435
+ type: String,
436
+ default: ActionTag.button
392
437
  }
393
438
  };
439
+ ({
440
+ storageType: {
441
+ type: String,
442
+ default: StorageType.local,
443
+ validator: (value) => Object.values(StorageType).includes(value)
444
+ },
445
+ storageKey: String
446
+ });
394
447
  const VvComboboxEvents = [
395
448
  "update:modelValue",
449
+ "update:search",
450
+ /**
451
+ * @deprecated change:search should not be used, use update:search instead
452
+ */
396
453
  "change:search",
397
454
  "focus",
398
455
  "blur"
@@ -540,99 +597,9 @@ const VvComboboxProps = {
540
597
  default: false
541
598
  }
542
599
  };
543
- const VvIconProps = {
544
- /**
545
- * Color
546
- */
547
- color: String,
548
- /**
549
- * Width
550
- */
551
- width: {
552
- type: [String, Number]
553
- },
554
- /**
555
- * Height
556
- */
557
- height: {
558
- type: [String, Number]
559
- },
560
- /**
561
- * Icon name
562
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
563
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
564
- */
565
- name: {
566
- type: String,
567
- required: true
568
- },
569
- /**
570
- * By default 'vv'
571
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
572
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
573
- */
574
- provider: {
575
- type: String
576
- },
577
- /**
578
- * The name of icon set.
579
- * Icon default options prefix: simple | normal | detailed
580
- */
581
- prefix: {
582
- type: String,
583
- default: "normal"
584
- },
585
- /**
586
- * Url remote SVG icon
587
- */
588
- src: String,
589
- /**
590
- * Horizontal flip
591
- */
592
- horizontalFlip: Boolean,
593
- /**
594
- * Vertical flip
595
- */
596
- verticalFlip: Boolean,
597
- /**
598
- * String alternative to "horizontalFlip" and "verticalFlip".
599
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
600
- */
601
- flip: String,
602
- /**
603
- * Icon render mode
604
- * 'style' = 'bg' or 'mask', depending on icon content
605
- * 'bg' = span with style using `background`
606
- * 'mask' = span with style using `mask`
607
- * 'svg' = svg
608
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
609
- */
610
- mode: String,
611
- /**
612
- * Toggles inline or block mode
613
- * Example https://docs.iconify.design/icon-components/vue/inline.html
614
- */
615
- inline: Boolean,
616
- /**
617
- * rotates icon
618
- * Example https://docs.iconify.design/icon-components/vue/transform.html
619
- */
620
- rotate: [Number, String],
621
- /**
622
- * A callback that is called when icon data has been loaded
623
- */
624
- onLoad: Function,
625
- /**
626
- * SVG icon string
627
- */
628
- svg: String,
629
- /**
630
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
631
- * @values string | string[]
632
- */
633
- modifiers: {
634
- type: [String, Array]
635
- }
600
+ const VvIconPropsDefaults = {
601
+ prefix: "normal"
602
+ /* normal */
636
603
  };
637
604
  function useVolver() {
638
605
  return inject(INJECTION_KEY_VOLVER);
@@ -665,7 +632,24 @@ const __default__$9 = {
665
632
  };
666
633
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
667
634
  ...__default__$9,
668
- props: VvIconProps,
635
+ props: /* @__PURE__ */ mergeDefaults({
636
+ name: {},
637
+ color: {},
638
+ width: {},
639
+ height: {},
640
+ provider: {},
641
+ prefix: {},
642
+ src: {},
643
+ horizontalFlip: { type: Boolean },
644
+ verticalFlip: { type: Boolean },
645
+ flip: {},
646
+ mode: {},
647
+ inline: { type: Boolean },
648
+ rotate: {},
649
+ onLoad: { type: Function },
650
+ svg: {},
651
+ modifiers: {}
652
+ }, VvIconPropsDefaults),
669
653
  setup(__props) {
670
654
  const props = __props;
671
655
  const hasRotate = computed(() => {
@@ -752,7 +736,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
752
736
  color: _ctx.color,
753
737
  onLoad: _ctx.onLoad,
754
738
  icon: unref(icon)
755
- }), null, 16, ["class"])) : createCommentVNode("", true);
739
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
756
740
  };
757
741
  }
758
742
  });
@@ -783,7 +767,32 @@ const VvDropdownProps = {
783
767
  validator: (value) => Object.values(DropdownRole).includes(value)
784
768
  }
785
769
  };
786
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
770
+ const VvDropdownItemProps = {
771
+ focusOnHover: {
772
+ type: Boolean,
773
+ default: false
774
+ }
775
+ };
776
+ const VvDropdownOptionProps = {
777
+ ...DisabledProps,
778
+ ...SelectedProps,
779
+ ...UnselectableProps,
780
+ ...ModifiersProps,
781
+ deselectHintLabel: {
782
+ type: String
783
+ },
784
+ selectHintLabel: {
785
+ type: String
786
+ },
787
+ selectedHintLabel: {
788
+ type: String
789
+ },
790
+ focusOnHover: {
791
+ type: Boolean,
792
+ default: false
793
+ }
794
+ };
795
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
787
796
  function useProvideDropdownTrigger({
788
797
  reference,
789
798
  id,
@@ -814,14 +823,14 @@ function useProvideDropdownTrigger({
814
823
  }
815
824
  function useProvideDropdownItem({
816
825
  role,
817
- expanded
826
+ ...others
818
827
  }) {
819
828
  const itemRole = computed(
820
829
  () => role.value === DropdownRole.listbox ? DropdownItemRole.option : DropdownItemRole.presentation
821
830
  );
822
831
  provide(INJECTION_KEY_DROPDOWN_ITEM, {
823
832
  role: itemRole,
824
- expanded
833
+ ...others
825
834
  });
826
835
  return { itemRole };
827
836
  }
@@ -856,8 +865,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
856
865
  "leave",
857
866
  "leave-cancelled"
858
867
  ],
859
- setup(__props, { expose: __expose, emit }) {
868
+ setup(__props, { expose: __expose, emit: __emit }) {
860
869
  const props = __props;
870
+ const emit = __emit;
861
871
  const { id } = toRefs(props);
862
872
  const hasId = useUniqueId(id);
863
873
  const attrs = useAttrs();
@@ -1071,7 +1081,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1071
1081
  });
1072
1082
  bus.on("click", toggle);
1073
1083
  const { role, modifiers } = toRefs(props);
1074
- const { itemRole } = useProvideDropdownItem({ role, expanded });
1075
1084
  const bemCssClasses = useModifiers(
1076
1085
  "vv-dropdown",
1077
1086
  modifiers,
@@ -1140,6 +1149,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1140
1149
  }
1141
1150
  });
1142
1151
  };
1152
+ const hovered = useElementHover(floatingEl);
1153
+ const { itemRole } = useProvideDropdownItem({
1154
+ role,
1155
+ expanded,
1156
+ focused,
1157
+ hovered
1158
+ });
1143
1159
  onKeyStroke("Escape", (e) => {
1144
1160
  if (expanded.value) {
1145
1161
  e.preventDefault();
@@ -1193,50 +1209,70 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1193
1209
  }
1194
1210
  };
1195
1211
  return (_ctx, _cache) => {
1196
- return openBlock(), createElementBlock(Fragment, null, [
1197
- createVNode(unref(VvDropdownTriggerProvider), null, {
1198
- default: withCtx(() => [
1199
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1200
- ]),
1201
- _: 3
1202
- }),
1203
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
1204
- default: withCtx(() => [
1205
- withDirectives(createElementVNode("div", {
1206
- ref_key: "floatingEl",
1207
- ref: floatingEl,
1208
- style: normalizeStyle(unref(dropdownPlacement)),
1209
- class: normalizeClass(unref(bemCssClasses))
1210
- }, [
1211
- props.arrow ? (openBlock(), createElementBlock("div", {
1212
- key: 0,
1213
- ref_key: "arrowEl",
1214
- ref: arrowEl,
1215
- style: normalizeStyle(unref(arrowPlacement)),
1216
- class: "vv-dropdown__arrow"
1217
- }, null, 4)) : createCommentVNode("", true),
1218
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1219
- createElementVNode("div", mergeProps(unref(attrs), {
1220
- id: unref(hasId),
1221
- ref_key: "listEl",
1222
- ref: listEl,
1223
- tabindex: !unref(expanded) ? -1 : void 0,
1224
- role: unref(role),
1225
- "aria-labelledby": unref(hasAriaLabelledby),
1226
- class: "vv-dropdown__list"
1227
- }), [
1228
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1229
- role: unref(itemRole)
1230
- })))
1231
- ], 16, _hoisted_1$5),
1232
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1233
- ], 6), [
1234
- [vShow, unref(expanded)]
1235
- ])
1236
- ]),
1237
- _: 3
1238
- }, 16, ["name"])
1239
- ], 64);
1212
+ return openBlock(), createElementBlock(
1213
+ Fragment,
1214
+ null,
1215
+ [
1216
+ createVNode(unref(VvDropdownTriggerProvider), null, {
1217
+ default: withCtx(() => [
1218
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1219
+ ]),
1220
+ _: 3
1221
+ /* FORWARDED */
1222
+ }),
1223
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
1224
+ default: withCtx(() => [
1225
+ withDirectives(createElementVNode(
1226
+ "div",
1227
+ {
1228
+ ref_key: "floatingEl",
1229
+ ref: floatingEl,
1230
+ style: normalizeStyle(unref(dropdownPlacement)),
1231
+ class: normalizeClass(unref(bemCssClasses))
1232
+ },
1233
+ [
1234
+ props.arrow ? (openBlock(), createElementBlock(
1235
+ "div",
1236
+ {
1237
+ key: 0,
1238
+ ref_key: "arrowEl",
1239
+ ref: arrowEl,
1240
+ style: normalizeStyle(unref(arrowPlacement)),
1241
+ class: "vv-dropdown__arrow"
1242
+ },
1243
+ null,
1244
+ 4
1245
+ /* STYLE */
1246
+ )) : createCommentVNode("v-if", true),
1247
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1248
+ createElementVNode("div", mergeProps(unref(attrs), {
1249
+ id: unref(hasId),
1250
+ ref_key: "listEl",
1251
+ ref: listEl,
1252
+ tabindex: !unref(expanded) ? -1 : void 0,
1253
+ role: unref(role),
1254
+ "aria-labelledby": unref(hasAriaLabelledby),
1255
+ class: "vv-dropdown__list"
1256
+ }), [
1257
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1258
+ role: unref(itemRole)
1259
+ })))
1260
+ ], 16, _hoisted_1$5),
1261
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1262
+ ],
1263
+ 6
1264
+ /* CLASS, STYLE */
1265
+ ), [
1266
+ [vShow, unref(expanded)]
1267
+ ])
1268
+ ]),
1269
+ _: 3
1270
+ /* FORWARDED */
1271
+ }, 16, ["name"])
1272
+ ],
1273
+ 64
1274
+ /* STABLE_FRAGMENT */
1275
+ );
1240
1276
  };
1241
1277
  }
1242
1278
  });
@@ -1254,7 +1290,9 @@ const __default__$7 = {
1254
1290
  };
1255
1291
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1256
1292
  ...__default__$7,
1293
+ props: VvDropdownItemProps,
1257
1294
  setup(__props) {
1295
+ const props = __props;
1258
1296
  const { role, expanded } = useInjectedDropdownItem();
1259
1297
  const element = ref(null);
1260
1298
  useProvideDropdownAction({ expanded });
@@ -1262,18 +1300,24 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1262
1300
  const { focused } = useFocus(element);
1263
1301
  const { focused: focusedWithin } = useFocusWithin(element);
1264
1302
  watch(hovered, (newValue) => {
1265
- if (newValue) {
1303
+ if (newValue && props.focusOnHover) {
1266
1304
  focused.value = true;
1267
1305
  }
1268
1306
  });
1269
1307
  return (_ctx, _cache) => {
1270
- return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
1271
- ref_key: "element",
1272
- ref: element,
1273
- class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1274
- }), [
1275
- renderSlot(_ctx.$slots, "default")
1276
- ], 16);
1308
+ return openBlock(), createElementBlock(
1309
+ "div",
1310
+ mergeProps({ role: unref(role) }, {
1311
+ ref_key: "element",
1312
+ ref: element,
1313
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1314
+ }),
1315
+ [
1316
+ renderSlot(_ctx.$slots, "default")
1317
+ ],
1318
+ 16
1319
+ /* FULL_PROPS */
1320
+ );
1277
1321
  };
1278
1322
  }
1279
1323
  });
@@ -1283,21 +1327,7 @@ const __default__$6 = {
1283
1327
  };
1284
1328
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1285
1329
  ...__default__$6,
1286
- props: {
1287
- ...DisabledProps,
1288
- ...SelectedProps,
1289
- ...UnselectableProps,
1290
- ...ModifiersProps,
1291
- deselectHintLabel: {
1292
- type: String
1293
- },
1294
- selectHintLabel: {
1295
- type: String
1296
- },
1297
- selectedHintLabel: {
1298
- type: String
1299
- }
1300
- },
1330
+ props: VvDropdownOptionProps,
1301
1331
  setup(__props) {
1302
1332
  const props = __props;
1303
1333
  const { modifiers } = toRefs(props);
@@ -1317,13 +1347,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1317
1347
  if (!props.disabled) {
1318
1348
  return props.selectHintLabel;
1319
1349
  }
1350
+ return "";
1320
1351
  });
1321
1352
  return (_ctx, _cache) => {
1322
1353
  return openBlock(), createBlock(_sfc_main$7, {
1323
1354
  class: normalizeClass(unref(bemCssClasses)),
1324
1355
  tabindex: _ctx.disabled ? -1 : 0,
1325
1356
  "aria-selected": _ctx.selected,
1326
- "aria-disabled": _ctx.disabled
1357
+ "aria-disabled": _ctx.disabled,
1358
+ "focus-on-hover": _ctx.focusOnHover
1327
1359
  }, {
1328
1360
  default: withCtx(() => [
1329
1361
  renderSlot(_ctx.$slots, "default"),
@@ -1332,12 +1364,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1332
1364
  title: unref(hintLabel)
1333
1365
  }, [
1334
1366
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
1335
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
1367
+ createTextVNode(
1368
+ toDisplayString(unref(hintLabel)),
1369
+ 1
1370
+ /* TEXT */
1371
+ )
1336
1372
  ])
1337
1373
  ], 8, _hoisted_1$4)
1338
1374
  ]),
1339
1375
  _: 3
1340
- }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
1376
+ /* FORWARDED */
1377
+ }, 8, ["class", "tabindex", "aria-selected", "aria-disabled", "focus-on-hover"]);
1341
1378
  };
1342
1379
  }
1343
1380
  });
@@ -1357,7 +1394,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1357
1394
  setup(__props) {
1358
1395
  const props = __props;
1359
1396
  return (_ctx, _cache) => {
1360
- return openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(props.label), 1);
1397
+ return openBlock(), createElementBlock(
1398
+ "li",
1399
+ _hoisted_1$3,
1400
+ toDisplayString(props.label),
1401
+ 1
1402
+ /* TEXT */
1403
+ );
1361
1404
  };
1362
1405
  }
1363
1406
  });
@@ -1696,30 +1739,30 @@ function useComponentFocus(inputTemplateRef, emit) {
1696
1739
  };
1697
1740
  }
1698
1741
  function useComponentIcon(icon, iconPosition) {
1742
+ const hasIcon = computed(() => {
1743
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
1744
+ return { name: icon == null ? void 0 : icon.value };
1745
+ }
1746
+ return icon == null ? void 0 : icon.value;
1747
+ });
1699
1748
  const hasIconBefore = computed(
1700
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
1749
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1701
1750
  );
1702
1751
  const hasIconAfter = computed(
1703
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
1752
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1704
1753
  );
1705
1754
  const hasIconLeft = computed(
1706
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
1755
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1707
1756
  );
1708
1757
  const hasIconRight = computed(
1709
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
1758
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1710
1759
  );
1711
1760
  const hasIconTop = computed(
1712
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
1761
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1713
1762
  );
1714
1763
  const hasIconBottom = computed(
1715
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
1764
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1716
1765
  );
1717
- const hasIcon = computed(() => {
1718
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
1719
- return { name: icon == null ? void 0 : icon.value };
1720
- }
1721
- return icon == null ? void 0 : icon.value;
1722
- });
1723
1766
  return {
1724
1767
  hasIcon,
1725
1768
  hasIconLeft,
@@ -1785,8 +1828,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1785
1828
  ...__default__$4,
1786
1829
  props: VvSelectProps,
1787
1830
  emits: VvSelectEmits,
1788
- setup(__props, { emit }) {
1831
+ setup(__props, { emit: __emit }) {
1789
1832
  const props = __props;
1833
+ const emit = __emit;
1790
1834
  const slots = useSlots();
1791
1835
  const propsDefaults = useDefaults(
1792
1836
  "VvSelect",
@@ -1822,10 +1866,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1822
1866
  focused.value = true;
1823
1867
  }
1824
1868
  });
1825
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
1826
- icon,
1827
- iconPosition
1828
- );
1869
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
1829
1870
  const isDirty = computed(() => !isEmpty(props.modelValue));
1830
1871
  const isDisabled = computed(() => props.disabled || props.readonly);
1831
1872
  const hasTabindex = computed(() => {
@@ -1849,8 +1890,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1849
1890
  loading: loading.value,
1850
1891
  disabled: disabled.value,
1851
1892
  readonly: readonly.value,
1852
- "icon-before": hasIconBefore.value,
1853
- "icon-after": hasIconAfter.value,
1893
+ "icon-before": hasIconBefore.value !== void 0,
1894
+ "icon-after": hasIconAfter.value !== void 0,
1854
1895
  dirty: isDirty.value,
1855
1896
  focus: focused.value,
1856
1897
  floating: floating.value,
@@ -1899,101 +1940,134 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1899
1940
  return option && option.options && option.options.length > 0;
1900
1941
  };
1901
1942
  return (_ctx, _cache) => {
1902
- return openBlock(), createElementBlock("div", {
1903
- class: normalizeClass(unref(bemCssClasses))
1904
- }, [
1905
- _ctx.label ? (openBlock(), createElementBlock("label", {
1906
- key: 0,
1907
- for: unref(hasId)
1908
- }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("", true),
1909
- createElementVNode("div", _hoisted_2$2, [
1910
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1911
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1912
- ])) : createCommentVNode("", true),
1913
- createElementVNode("div", _hoisted_4$1, [
1914
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1915
- key: 0,
1916
- class: "vv-select__icon"
1917
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
1918
- withDirectives(createElementVNode("select", mergeProps({
1919
- id: unref(hasId),
1920
- ref_key: "select",
1921
- ref: select,
1922
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1923
- }, unref(hasAttrs)), [
1924
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1925
- key: 0,
1926
- value: void 0,
1927
- disabled: !_ctx.unselectable,
1928
- hidden: !_ctx.unselectable
1929
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("", true),
1930
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
1931
- return openBlock(), createElementBlock(Fragment, null, [
1932
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
1933
- key: index,
1934
- disabled: unref(isOptionDisabled)(option),
1935
- value: unref(getOptionValue)(option)
1936
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1937
- key: `group-${index}`,
1938
- disabled: unref(isOptionDisabled)(option),
1939
- label: unref(getOptionLabel)(option)
1940
- }, [
1941
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
1942
- return openBlock(), createElementBlock("option", {
1943
- key: `group-${index}-item-${i}`,
1944
- disabled: unref(isOptionDisabled)(item),
1945
- value: unref(getOptionValue)(item)
1946
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
1947
- }), 128))
1948
- ], 8, _hoisted_8$1))
1949
- ], 64);
1950
- }), 256))
1951
- ], 16, _hoisted_5$1), [
1952
- [vModelSelect, unref(localModelValue)]
1943
+ return openBlock(), createElementBlock(
1944
+ "div",
1945
+ {
1946
+ class: normalizeClass(unref(bemCssClasses))
1947
+ },
1948
+ [
1949
+ _ctx.label ? (openBlock(), createElementBlock("label", {
1950
+ key: 0,
1951
+ for: unref(hasId)
1952
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
1953
+ createElementVNode("div", _hoisted_2$2, [
1954
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1955
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1956
+ ])) : createCommentVNode("v-if", true),
1957
+ createElementVNode("div", _hoisted_4$1, [
1958
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1959
+ _sfc_main$9,
1960
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1961
+ null,
1962
+ 16
1963
+ /* FULL_PROPS */
1964
+ )) : createCommentVNode("v-if", true),
1965
+ withDirectives(createElementVNode("select", mergeProps({
1966
+ id: unref(hasId),
1967
+ ref_key: "select",
1968
+ ref: select,
1969
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1970
+ }, unref(hasAttrs)), [
1971
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1972
+ key: 0,
1973
+ value: void 0,
1974
+ disabled: !_ctx.unselectable,
1975
+ hidden: !_ctx.unselectable
1976
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
1977
+ (openBlock(true), createElementBlock(
1978
+ Fragment,
1979
+ null,
1980
+ renderList(_ctx.options, (option, index) => {
1981
+ return openBlock(), createElementBlock(
1982
+ Fragment,
1983
+ null,
1984
+ [
1985
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
1986
+ key: index,
1987
+ disabled: unref(isOptionDisabled)(option),
1988
+ value: unref(getOptionValue)(option)
1989
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1990
+ key: `group-${index}`,
1991
+ disabled: unref(isOptionDisabled)(option),
1992
+ label: unref(getOptionLabel)(option)
1993
+ }, [
1994
+ (openBlock(true), createElementBlock(
1995
+ Fragment,
1996
+ null,
1997
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
1998
+ return openBlock(), createElementBlock("option", {
1999
+ key: `group-${index}-item-${i}`,
2000
+ disabled: unref(isOptionDisabled)(item),
2001
+ value: unref(getOptionValue)(item)
2002
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
2003
+ }),
2004
+ 128
2005
+ /* KEYED_FRAGMENT */
2006
+ ))
2007
+ ], 8, _hoisted_8$1))
2008
+ ],
2009
+ 64
2010
+ /* STABLE_FRAGMENT */
2011
+ );
2012
+ }),
2013
+ 256
2014
+ /* UNKEYED_FRAGMENT */
2015
+ ))
2016
+ ], 16, _hoisted_5$1), [
2017
+ [vModelSelect, unref(localModelValue)]
2018
+ ]),
2019
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2020
+ _sfc_main$9,
2021
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2022
+ null,
2023
+ 16
2024
+ /* FULL_PROPS */
2025
+ )) : createCommentVNode("v-if", true)
1953
2026
  ]),
1954
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1955
- key: 1,
1956
- class: "vv-select__icon vv-select__icon-after"
1957
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2027
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
2028
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2029
+ ])) : createCommentVNode("v-if", true)
1958
2030
  ]),
1959
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1960
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1961
- ])) : createCommentVNode("", true)
1962
- ]),
1963
- createVNode(unref(HintSlot), {
1964
- id: unref(hasHintId),
1965
- class: "vv-select__hint"
1966
- }, createSlots({ _: 2 }, [
1967
- _ctx.$slots.hint ? {
1968
- name: "hint",
1969
- fn: withCtx(() => [
1970
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1971
- ]),
1972
- key: "0"
1973
- } : void 0,
1974
- _ctx.$slots.loading ? {
1975
- name: "loading",
1976
- fn: withCtx(() => [
1977
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1978
- ]),
1979
- key: "1"
1980
- } : void 0,
1981
- _ctx.$slots.valid ? {
1982
- name: "valid",
1983
- fn: withCtx(() => [
1984
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1985
- ]),
1986
- key: "2"
1987
- } : void 0,
1988
- _ctx.$slots.invalid ? {
1989
- name: "invalid",
1990
- fn: withCtx(() => [
1991
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1992
- ]),
1993
- key: "3"
1994
- } : void 0
1995
- ]), 1032, ["id"])
1996
- ], 2);
2031
+ createVNode(unref(HintSlot), {
2032
+ id: unref(hasHintId),
2033
+ class: "vv-select__hint"
2034
+ }, createSlots({
2035
+ _: 2
2036
+ /* DYNAMIC */
2037
+ }, [
2038
+ _ctx.$slots.hint ? {
2039
+ name: "hint",
2040
+ fn: withCtx(() => [
2041
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2042
+ ]),
2043
+ key: "0"
2044
+ } : void 0,
2045
+ _ctx.$slots.loading ? {
2046
+ name: "loading",
2047
+ fn: withCtx(() => [
2048
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2049
+ ]),
2050
+ key: "1"
2051
+ } : void 0,
2052
+ _ctx.$slots.valid ? {
2053
+ name: "valid",
2054
+ fn: withCtx(() => [
2055
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2056
+ ]),
2057
+ key: "2"
2058
+ } : void 0,
2059
+ _ctx.$slots.invalid ? {
2060
+ name: "invalid",
2061
+ fn: withCtx(() => [
2062
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2063
+ ]),
2064
+ key: "3"
2065
+ } : void 0
2066
+ ]), 1032, ["id"])
2067
+ ],
2068
+ 2
2069
+ /* CLASS */
2070
+ );
1997
2071
  };
1998
2072
  }
1999
2073
  });
@@ -2012,14 +2086,24 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2012
2086
  const { modifiers } = toRefs(props);
2013
2087
  const bemCssClasses = useModifiers("vv-badge", modifiers);
2014
2088
  return (_ctx, _cache) => {
2015
- return openBlock(), createElementBlock("span", {
2016
- class: normalizeClass(unref(bemCssClasses)),
2017
- role: "status"
2018
- }, [
2019
- renderSlot(_ctx.$slots, "default", {}, () => [
2020
- createTextVNode(toDisplayString(_ctx.value), 1)
2021
- ])
2022
- ], 2);
2089
+ return openBlock(), createElementBlock(
2090
+ "span",
2091
+ {
2092
+ class: normalizeClass(unref(bemCssClasses)),
2093
+ role: "status"
2094
+ },
2095
+ [
2096
+ renderSlot(_ctx.$slots, "default", {}, () => [
2097
+ createTextVNode(
2098
+ toDisplayString(_ctx.value),
2099
+ 1
2100
+ /* TEXT */
2101
+ )
2102
+ ])
2103
+ ],
2104
+ 2
2105
+ /* CLASS */
2106
+ );
2023
2107
  };
2024
2108
  }
2025
2109
  });
@@ -2032,8 +2116,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2032
2116
  ...__default__$2,
2033
2117
  props: VvActionProps,
2034
2118
  emits: VvActionEvents,
2035
- setup(__props, { expose: __expose, emit }) {
2119
+ setup(__props, { expose: __expose, emit: __emit }) {
2036
2120
  const props = __props;
2121
+ const emit = __emit;
2122
+ const instance = getCurrentInstance();
2037
2123
  const volver = useVolver();
2038
2124
  const element = ref(null);
2039
2125
  __expose({ $el: element });
@@ -2064,7 +2150,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2064
2150
  case props.href !== void 0:
2065
2151
  return ActionTag.a;
2066
2152
  default:
2067
- return ActionTag.button;
2153
+ return props.defaultTag;
2068
2154
  }
2069
2155
  });
2070
2156
  const hasProps = computed(() => {
@@ -2089,29 +2175,43 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2089
2175
  to: props.to,
2090
2176
  target: props.target
2091
2177
  };
2092
- default:
2178
+ case ActionTag.button:
2093
2179
  return {
2094
2180
  ...toReturn,
2095
2181
  type: props.type,
2096
2182
  disabled: props.disabled
2097
2183
  };
2184
+ default:
2185
+ return toReturn;
2098
2186
  }
2099
2187
  });
2100
2188
  const onClick = (e) => {
2189
+ var _a;
2101
2190
  if (props.disabled) {
2102
2191
  e.preventDefault();
2103
2192
  return;
2104
2193
  }
2194
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
2195
+ emit("click", e);
2196
+ return;
2197
+ }
2105
2198
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
2106
- emit("click", e);
2107
2199
  };
2108
2200
  const onMouseover = (e) => {
2201
+ var _a;
2202
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
2203
+ emit("mouseover", e);
2204
+ return;
2205
+ }
2109
2206
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
2110
- emit("mouseover", e);
2111
2207
  };
2112
2208
  const onMouseleave = (e) => {
2209
+ var _a;
2210
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
2211
+ emit("mouseleave", e);
2212
+ return;
2213
+ }
2113
2214
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
2114
- emit("mouseleave", e);
2115
2215
  };
2116
2216
  return (_ctx, _cache) => {
2117
2217
  return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
@@ -2129,23 +2229,28 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2129
2229
  }), {
2130
2230
  default: withCtx(() => [
2131
2231
  renderSlot(_ctx.$slots, "default", {}, () => [
2132
- createTextVNode(toDisplayString(_ctx.label), 1)
2232
+ createTextVNode(
2233
+ toDisplayString(_ctx.label),
2234
+ 1
2235
+ /* TEXT */
2236
+ )
2133
2237
  ])
2134
2238
  ]),
2135
2239
  _: 3
2240
+ /* FORWARDED */
2136
2241
  }, 16, ["class"]);
2137
2242
  };
2138
2243
  }
2139
2244
  });
2140
2245
  function useInjectedGroupState(groupKey) {
2141
2246
  const group = inject(groupKey, void 0);
2142
- const isInGroup = computed(() => !isEmpty(group));
2247
+ const isInGroup = computed(() => group !== void 0);
2143
2248
  function getGroupOrLocalRef(propName, props, emit) {
2144
- if (group == null ? void 0 : group.value) {
2145
- const groupPropValue = unref(group.value)[propName];
2249
+ const groupPropValue = group == null ? void 0 : group[propName];
2250
+ if (groupPropValue) {
2146
2251
  return computed({
2147
2252
  get() {
2148
- return groupPropValue == null ? void 0 : groupPropValue.value;
2253
+ return groupPropValue.value;
2149
2254
  },
2150
2255
  set(value) {
2151
2256
  groupPropValue.value = value;
@@ -2158,8 +2263,9 @@ function useInjectedGroupState(groupKey) {
2158
2263
  return propRef.value;
2159
2264
  },
2160
2265
  set(value) {
2161
- if (emit)
2266
+ if (emit) {
2162
2267
  emit(`update:${propName}`, value);
2268
+ }
2163
2269
  }
2164
2270
  });
2165
2271
  }
@@ -2176,10 +2282,7 @@ const VvButtonProps = {
2176
2282
  ...ModifiersProps,
2177
2283
  ...UnselectableProps,
2178
2284
  ...LoadingProps,
2179
- /**
2180
- * Button icon
2181
- */
2182
- icon: [String, Object],
2285
+ ...IconProps,
2183
2286
  /**
2184
2287
  * Button icon position
2185
2288
  */
@@ -2226,14 +2329,11 @@ function useGroupProps(props, emit) {
2226
2329
  const { id, iconPosition, icon, label, pressed } = toRefs(props);
2227
2330
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
2228
2331
  const toggle = getGroupOrLocalRef("toggle", props);
2229
- const unselectable = getGroupOrLocalRef(
2230
- "unselectable",
2231
- props
2232
- );
2233
- const multiple = computed(() => (group == null ? void 0 : group.value.multiple.value) ?? false);
2332
+ const unselectable = getGroupOrLocalRef("unselectable", props);
2333
+ const multiple = computed(() => (group == null ? void 0 : group.multiple.value) ?? false);
2234
2334
  const modifiers = computed(() => {
2235
2335
  let localModifiers = props.modifiers;
2236
- let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
2336
+ let groupModifiers = group == null ? void 0 : group.modifiers.value;
2237
2337
  const toReturn = /* @__PURE__ */ new Set();
2238
2338
  if (localModifiers) {
2239
2339
  if (!Array.isArray(localModifiers)) {
@@ -2250,10 +2350,7 @@ function useGroupProps(props, emit) {
2250
2350
  return Array.from(toReturn);
2251
2351
  });
2252
2352
  const disabled = computed(
2253
- () => {
2254
- var _a;
2255
- return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
2256
- }
2353
+ () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
2257
2354
  );
2258
2355
  return {
2259
2356
  // group props
@@ -2282,16 +2379,18 @@ const _hoisted_2$1 = {
2282
2379
  class: "vv-button__label"
2283
2380
  };
2284
2381
  const __default__$1 = {
2285
- name: "VvButton"
2382
+ name: "VvButton",
2383
+ inheritAttrs: false
2286
2384
  };
2287
2385
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2288
2386
  ...__default__$1,
2289
2387
  props: VvButtonProps,
2290
2388
  emits: VvButtonEvents,
2291
- setup(__props, { expose: __expose, emit }) {
2389
+ setup(__props, { expose: __expose, emit: __emit }) {
2292
2390
  const props = __props;
2293
2391
  const attrs = useAttrs();
2294
2392
  const slots = useSlots();
2393
+ const emit = __emit;
2295
2394
  const {
2296
2395
  id,
2297
2396
  modifiers,
@@ -2335,12 +2434,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2335
2434
  )
2336
2435
  }))
2337
2436
  );
2338
- const hasIconProps = computed(
2339
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
2340
- );
2437
+ const { hasIcon } = useComponentIcon(icon);
2341
2438
  const toggleValue = computed(() => {
2342
2439
  return props.value !== void 0 ? props.value : name.value;
2343
2440
  });
2441
+ const hasListeners = computed(() => {
2442
+ if (!toggle.value) {
2443
+ return void 0;
2444
+ }
2445
+ return {
2446
+ onClick
2447
+ };
2448
+ });
2344
2449
  const onClick = () => {
2345
2450
  if (toggle.value) {
2346
2451
  if (Array.isArray(modelValue.value)) {
@@ -2364,6 +2469,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2364
2469
  };
2365
2470
  return (_ctx, _cache) => {
2366
2471
  return openBlock(), createBlock(_sfc_main$2, mergeProps({
2472
+ ...unref(attrs),
2473
+ ...unref(hasListeners),
2367
2474
  disabled: unref(disabled),
2368
2475
  pressed: unref(pressed),
2369
2476
  active: _ctx.active,
@@ -2377,8 +2484,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2377
2484
  id: unref(hasId),
2378
2485
  ref_key: "element",
2379
2486
  ref: element,
2380
- class: unref(bemCssClasses),
2381
- onClick
2487
+ class: unref(bemCssClasses)
2382
2488
  }), {
2383
2489
  default: withCtx(() => [
2384
2490
  renderSlot(_ctx.$slots, "default", {}, () => [
@@ -2387,24 +2493,44 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2387
2493
  key: 0,
2388
2494
  class: "vv-button__loading-icon",
2389
2495
  name: _ctx.loadingIcon
2390
- }, null, 8, ["name"])) : createCommentVNode("", true),
2391
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
2392
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2393
- renderSlot(_ctx.$slots, "before"),
2394
- unref(icon) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2395
- key: 0,
2396
- class: "vv-button__icon"
2397
- }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
2398
- unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2399
- renderSlot(_ctx.$slots, "label", {}, () => [
2400
- createTextVNode(toDisplayString(unref(label)), 1)
2401
- ])
2402
- ])) : createCommentVNode("", true),
2403
- renderSlot(_ctx.$slots, "after")
2404
- ], 64))
2496
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
2497
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
2498
+ "span",
2499
+ _hoisted_1$1,
2500
+ toDisplayString(_ctx.loadingLabel),
2501
+ 1
2502
+ /* TEXT */
2503
+ )) : createCommentVNode("v-if", true)
2504
+ ]) : (openBlock(), createElementBlock(
2505
+ Fragment,
2506
+ { key: 1 },
2507
+ [
2508
+ renderSlot(_ctx.$slots, "before"),
2509
+ unref(hasIcon) ? (openBlock(), createBlock(
2510
+ _sfc_main$9,
2511
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2512
+ null,
2513
+ 16
2514
+ /* FULL_PROPS */
2515
+ )) : createCommentVNode("v-if", true),
2516
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2517
+ renderSlot(_ctx.$slots, "label", {}, () => [
2518
+ createTextVNode(
2519
+ toDisplayString(unref(label)),
2520
+ 1
2521
+ /* TEXT */
2522
+ )
2523
+ ])
2524
+ ])) : createCommentVNode("v-if", true),
2525
+ renderSlot(_ctx.$slots, "after")
2526
+ ],
2527
+ 64
2528
+ /* STABLE_FRAGMENT */
2529
+ ))
2405
2530
  ])
2406
2531
  ]),
2407
2532
  _: 3
2533
+ /* FORWARDED */
2408
2534
  }, 16, ["id", "class"]);
2409
2535
  };
2410
2536
  }
@@ -2440,8 +2566,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2440
2566
  ...__default__,
2441
2567
  props: VvComboboxProps,
2442
2568
  emits: VvComboboxEvents,
2443
- setup(__props, { emit }) {
2569
+ setup(__props, { emit: __emit }) {
2444
2570
  const props = __props;
2571
+ const emit = __emit;
2445
2572
  const slots = useSlots();
2446
2573
  const propsDefaults = useDefaults(
2447
2574
  "VvCombobox",
@@ -2487,10 +2614,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2487
2614
  searchText,
2488
2615
  computed(() => Number(props.debounceSearch))
2489
2616
  );
2490
- watch(
2491
- debouncedSearchText,
2492
- () => emit("change:search", debouncedSearchText.value)
2493
- );
2617
+ watch(debouncedSearchText, () => {
2618
+ emit("update:search", debouncedSearchText.value);
2619
+ emit("change:search", debouncedSearchText.value);
2620
+ });
2494
2621
  const expanded = ref(false);
2495
2622
  const toggleExpanded = () => {
2496
2623
  if (props.disabled || props.readonly)
@@ -2541,10 +2668,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2541
2668
  const localLoading = ref(false);
2542
2669
  const isLoading = computed(() => localLoading.value || loading.value);
2543
2670
  const dropdownEl = ref();
2544
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
2545
- icon,
2546
- iconPosition
2547
- );
2671
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
2548
2672
  const isDirty = computed(() => !isEmpty(props.modelValue));
2549
2673
  const hasTabindex = computed(() => {
2550
2674
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -2556,12 +2680,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2556
2680
  disabled: disabled.value,
2557
2681
  loading: isLoading.value,
2558
2682
  readonly: readonly.value,
2559
- "icon-before": Boolean(hasIconBefore.value),
2560
- "icon-after": Boolean(hasIconAfter.value),
2683
+ "icon-before": hasIconBefore.value !== void 0,
2684
+ "icon-after": hasIconAfter.value !== void 0,
2561
2685
  valid: valid.value,
2562
2686
  invalid: invalid.value,
2563
2687
  dirty: isDirty.value,
2564
- focus: focused.value,
2688
+ focus: focused.value || focusedWithin.value || expanded.value,
2565
2689
  floating: floating.value,
2566
2690
  badges: props.badges
2567
2691
  }))
@@ -2720,208 +2844,303 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2720
2844
  key: 0,
2721
2845
  id: unref(hasLabelId),
2722
2846
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
2723
- }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
2724
- createElementVNode("div", {
2725
- ref_key: "wrapperEl",
2726
- ref: wrapperEl,
2727
- class: "vv-select__wrapper"
2728
- }, [
2729
- createVNode(_sfc_main$8, mergeProps({
2730
- ref_key: "dropdownEl",
2731
- ref: dropdownEl,
2732
- modelValue: unref(expanded),
2733
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2734
- }, unref(dropdownProps), {
2735
- role: unref(DropdownRole).listbox,
2736
- onAfterExpand,
2737
- onAfterCollapse
2738
- }), createSlots({
2739
- default: withCtx(({ aria }) => [
2740
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2741
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2742
- ])) : createCommentVNode("", true),
2743
- createElementVNode("div", _hoisted_5, [
2744
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2745
- key: 0,
2746
- class: "vv-select__icon"
2747
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
2748
- createElementVNode("div", mergeProps({
2749
- ref_key: "inputEl",
2750
- ref: inputEl
2751
- }, aria, {
2752
- class: "vv-select__input",
2753
- role: "combobox",
2754
- "aria-expanded": unref(expanded),
2755
- "aria-labelledby": unref(hasLabelId),
2756
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2757
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2758
- tabindex: unref(hasTabindex),
2759
- onClickPassive: onClickInput
2760
- }), [
2761
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2762
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2763
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
2764
- return openBlock(), createBlock(_sfc_main$3, {
2765
- key: index,
2766
- modifiers: _ctx.badgeModifiers,
2767
- class: "vv-select__badge"
2768
- }, {
2769
- default: withCtx(() => [
2770
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
2771
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2772
- key: 0,
2773
- "aria-label": unref(propsDefaults).deselectActionLabel,
2774
- type: "button",
2775
- onClick: withModifiers(($event) => onInput(option), ["stop"])
2776
- }, [
2777
- createVNode(_sfc_main$9, { name: "close" })
2778
- ], 8, _hoisted_8)) : createCommentVNode("", true)
2779
- ]),
2780
- _: 2
2781
- }, 1032, ["modifiers"]);
2782
- }), 128))
2783
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2784
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
2785
- ], 64))
2786
- ])
2787
- ], 16, _hoisted_6),
2788
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2789
- key: 1,
2790
- class: "vv-select__icon vv-select__icon-after"
2791
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2792
- ]),
2793
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2794
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2795
- ])) : createCommentVNode("", true)
2796
- ]),
2797
- items: withCtx(() => {
2798
- var _a;
2799
- return [
2800
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
2801
- return openBlock(), createElementBlock(Fragment, { key: index }, [
2802
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2803
- createVNode(_sfc_main$5, {
2804
- label: unref(getOptionLabel)(option)
2805
- }, null, 8, ["label"]),
2806
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
2807
- option
2808
- ), (item, i) => {
2809
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
2810
- selected: isOptionSelected(item),
2811
- disabled: unref(isOptionDisabled)(item),
2812
- unselectable: _ctx.unselectable,
2813
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2814
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2815
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2816
- }, {
2817
- key: i,
2818
- class: "vv-dropdown-option",
2819
- onClickPassive: ($event) => onInput(item)
2820
- }), {
2821
- default: withCtx(() => [
2822
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2823
- option,
2824
- selectedOptions: unref(selectedOptions),
2825
- selected: isOptionSelected(item),
2826
- disabled: unref(isOptionDisabled)(item)
2827
- })), () => [
2828
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
2829
- ])
2830
- ]),
2831
- _: 2
2832
- }, 1040, ["onClickPassive"]);
2833
- }), 128))
2834
- ], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
2835
- selected: isOptionSelected(option),
2836
- disabled: unref(isOptionDisabled)(option),
2837
- unselectable: _ctx.unselectable,
2838
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2839
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2840
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2841
- }, {
2842
- class: "vv-dropdown-option",
2843
- onClickPassive: ($event) => onInput(option)
2844
- }), {
2845
- default: withCtx(() => [
2846
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2847
- option,
2848
- selectedOptions: unref(selectedOptions),
2849
- selected: isOptionSelected(option),
2850
- disabled: unref(isOptionDisabled)(option)
2851
- })), () => [
2852
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
2853
- ])
2854
- ]),
2855
- _: 2
2856
- }, 1040, ["onClickPassive"]))
2857
- ], 64);
2858
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
2859
- key: 1,
2860
- modifiers: "inert"
2861
- }, {
2862
- default: withCtx(() => [
2863
- renderSlot(_ctx.$slots, "no-options", {}, () => [
2864
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
2865
- ])
2866
- ]),
2867
- _: 3
2868
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
2869
- key: 2,
2870
- modifiers: "inert"
2871
- }, {
2872
- default: withCtx(() => [
2873
- renderSlot(_ctx.$slots, "no-results", {}, () => [
2874
- createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
2847
+ }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
2848
+ createElementVNode(
2849
+ "div",
2850
+ {
2851
+ ref_key: "wrapperEl",
2852
+ ref: wrapperEl,
2853
+ class: "vv-select__wrapper"
2854
+ },
2855
+ [
2856
+ createVNode(_sfc_main$8, mergeProps({
2857
+ ref_key: "dropdownEl",
2858
+ ref: dropdownEl,
2859
+ modelValue: unref(expanded),
2860
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2861
+ }, unref(dropdownProps), {
2862
+ role: unref(DropdownRole).listbox,
2863
+ onAfterExpand,
2864
+ onAfterCollapse
2865
+ }), createSlots({
2866
+ default: withCtx(({ aria }) => [
2867
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2868
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2869
+ ])) : createCommentVNode("v-if", true),
2870
+ createElementVNode("div", _hoisted_5, [
2871
+ unref(hasIconBefore) ? (openBlock(), createBlock(
2872
+ _sfc_main$9,
2873
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
2874
+ null,
2875
+ 16
2876
+ /* FULL_PROPS */
2877
+ )) : createCommentVNode("v-if", true),
2878
+ createElementVNode("div", mergeProps({
2879
+ ref_key: "inputEl",
2880
+ ref: inputEl
2881
+ }, aria, {
2882
+ class: "vv-select__input",
2883
+ role: "combobox",
2884
+ "aria-expanded": unref(expanded),
2885
+ "aria-labelledby": unref(hasLabelId),
2886
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2887
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2888
+ tabindex: unref(hasTabindex),
2889
+ onClickPassive: onClickInput
2890
+ }), [
2891
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2892
+ unref(hasValue) ? (openBlock(), createElementBlock(
2893
+ Fragment,
2894
+ { key: 0 },
2895
+ [
2896
+ !_ctx.badges ? (openBlock(), createElementBlock(
2897
+ "div",
2898
+ _hoisted_7,
2899
+ toDisplayString(unref(hasValue)),
2900
+ 1
2901
+ /* TEXT */
2902
+ )) : (openBlock(true), createElementBlock(
2903
+ Fragment,
2904
+ { key: 1 },
2905
+ renderList(unref(selectedOptions), (option, index) => {
2906
+ return openBlock(), createBlock(_sfc_main$3, {
2907
+ key: index,
2908
+ modifiers: _ctx.badgeModifiers,
2909
+ class: "vv-select__badge"
2910
+ }, {
2911
+ default: withCtx(() => [
2912
+ createTextVNode(
2913
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
2914
+ 1
2915
+ /* TEXT */
2916
+ ),
2917
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2918
+ key: 0,
2919
+ "aria-label": unref(propsDefaults).deselectActionLabel,
2920
+ type: "button",
2921
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
2922
+ }, [
2923
+ createVNode(_sfc_main$9, { name: "close" })
2924
+ ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
2925
+ ]),
2926
+ _: 2
2927
+ /* DYNAMIC */
2928
+ }, 1032, ["modifiers"]);
2929
+ }),
2930
+ 128
2931
+ /* KEYED_FRAGMENT */
2932
+ ))
2933
+ ],
2934
+ 64
2935
+ /* STABLE_FRAGMENT */
2936
+ )) : (openBlock(), createElementBlock(
2937
+ Fragment,
2938
+ { key: 1 },
2939
+ [
2940
+ createTextVNode(
2941
+ toDisplayString(_ctx.placeholder),
2942
+ 1
2943
+ /* TEXT */
2944
+ )
2945
+ ],
2946
+ 64
2947
+ /* STABLE_FRAGMENT */
2948
+ ))
2875
2949
  ])
2876
- ]),
2877
- _: 3
2878
- })) : createCommentVNode("", true)
2879
- ];
2880
- }),
2881
- after: withCtx(() => [
2882
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
2950
+ ], 16, _hoisted_6),
2951
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2952
+ _sfc_main$9,
2953
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2954
+ null,
2955
+ 16
2956
+ /* FULL_PROPS */
2957
+ )) : createCommentVNode("v-if", true)
2958
+ ]),
2959
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2960
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2961
+ ])) : createCommentVNode("v-if", true)
2962
+ ]),
2963
+ items: withCtx(() => {
2883
2964
  var _a;
2884
2965
  return [
2885
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
2886
- key: 0,
2887
- label: unref(propsDefaults).closeLabel,
2888
- modifiers: "secondary",
2889
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
2890
- }, null, 8, ["label"])) : createCommentVNode("", true)
2966
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
2967
+ Fragment,
2968
+ { key: 0 },
2969
+ renderList(unref(filteredOptions), (option, index) => {
2970
+ return openBlock(), createElementBlock(
2971
+ Fragment,
2972
+ { key: index },
2973
+ [
2974
+ isGroup(option) ? (openBlock(), createElementBlock(
2975
+ Fragment,
2976
+ { key: 0 },
2977
+ [
2978
+ createVNode(_sfc_main$5, {
2979
+ label: unref(getOptionLabel)(option)
2980
+ }, null, 8, ["label"]),
2981
+ (openBlock(true), createElementBlock(
2982
+ Fragment,
2983
+ null,
2984
+ renderList(unref(getOptionGrouped)(
2985
+ option
2986
+ ), (item, i) => {
2987
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({
2988
+ selected: isOptionSelected(item),
2989
+ disabled: unref(isOptionDisabled)(item),
2990
+ unselectable: _ctx.unselectable,
2991
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2992
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
2993
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
2994
+ }, {
2995
+ key: i,
2996
+ class: "vv-dropdown-option",
2997
+ "focus-on-hover": "",
2998
+ onClickPassive: ($event) => onInput(item)
2999
+ }), {
3000
+ default: withCtx(() => [
3001
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3002
+ option,
3003
+ selectedOptions: unref(selectedOptions),
3004
+ selected: isOptionSelected(item),
3005
+ disabled: unref(isOptionDisabled)(item)
3006
+ })), () => [
3007
+ createTextVNode(
3008
+ toDisplayString(unref(getOptionLabel)(item)),
3009
+ 1
3010
+ /* TEXT */
3011
+ )
3012
+ ])
3013
+ ]),
3014
+ _: 2
3015
+ /* DYNAMIC */
3016
+ }, 1040, ["onClickPassive"]);
3017
+ }),
3018
+ 128
3019
+ /* KEYED_FRAGMENT */
3020
+ ))
3021
+ ],
3022
+ 64
3023
+ /* STABLE_FRAGMENT */
3024
+ )) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
3025
+ selected: isOptionSelected(option),
3026
+ disabled: unref(isOptionDisabled)(option),
3027
+ unselectable: _ctx.unselectable,
3028
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3029
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3030
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3031
+ }, {
3032
+ class: "vv-dropdown-option",
3033
+ "focus-on-hover": "",
3034
+ onClickPassive: ($event) => onInput(option)
3035
+ }), {
3036
+ default: withCtx(() => [
3037
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3038
+ option,
3039
+ selectedOptions: unref(selectedOptions),
3040
+ selected: isOptionSelected(option),
3041
+ disabled: unref(isOptionDisabled)(option)
3042
+ })), () => [
3043
+ createTextVNode(
3044
+ toDisplayString(unref(getOptionLabel)(option)),
3045
+ 1
3046
+ /* TEXT */
3047
+ )
3048
+ ])
3049
+ ]),
3050
+ _: 2
3051
+ /* DYNAMIC */
3052
+ }, 1040, ["onClickPassive"]))
3053
+ ],
3054
+ 64
3055
+ /* STABLE_FRAGMENT */
3056
+ );
3057
+ }),
3058
+ 128
3059
+ /* KEYED_FRAGMENT */
3060
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
3061
+ key: 1,
3062
+ modifiers: "inert"
3063
+ }, {
3064
+ default: withCtx(() => [
3065
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
3066
+ createTextVNode(
3067
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
3068
+ 1
3069
+ /* TEXT */
3070
+ )
3071
+ ])
3072
+ ]),
3073
+ _: 3
3074
+ /* FORWARDED */
3075
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
3076
+ key: 2,
3077
+ modifiers: "inert"
3078
+ }, {
3079
+ default: withCtx(() => [
3080
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
3081
+ createTextVNode(
3082
+ toDisplayString(unref(propsDefaults).noResultsLabel),
3083
+ 1
3084
+ /* TEXT */
3085
+ )
3086
+ ])
3087
+ ]),
3088
+ _: 3
3089
+ /* FORWARDED */
3090
+ })) : createCommentVNode("v-if", true)
2891
3091
  ];
2892
- })
2893
- ]),
2894
- _: 2
2895
- }, [
2896
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
2897
- name: "before",
2898
- fn: withCtx(() => [
2899
- renderSlot(_ctx.$slots, "dropdown::before"),
2900
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
2901
- key: 0,
2902
- id: unref(hasSearchId),
2903
- ref_key: "inputSearchEl",
2904
- ref: inputSearchEl,
2905
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
2906
- "aria-autocomplete": "list",
2907
- "aria-controls": unref(hasDropdownId),
2908
- autocomplete: "off",
2909
- spellcheck: "false",
2910
- type: "search",
2911
- class: "vv-dropdown__search",
2912
- placeholder: unref(propsDefaults).searchPlaceholder
2913
- }, null, 8, _hoisted_3)), [
2914
- [vModelText, unref(searchText)]
2915
- ]) : createCommentVNode("", true)
3092
+ }),
3093
+ after: withCtx(() => [
3094
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3095
+ var _a;
3096
+ return [
3097
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
3098
+ key: 0,
3099
+ label: unref(propsDefaults).closeLabel,
3100
+ modifiers: "secondary",
3101
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3102
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3103
+ ];
3104
+ })
2916
3105
  ]),
2917
- key: "0"
2918
- } : void 0
2919
- ]), 1040, ["modelValue", "role"])
2920
- ], 512),
3106
+ _: 2
3107
+ /* DYNAMIC */
3108
+ }, [
3109
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
3110
+ name: "before",
3111
+ fn: withCtx(() => [
3112
+ renderSlot(_ctx.$slots, "dropdown::before"),
3113
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
3114
+ key: 0,
3115
+ id: unref(hasSearchId),
3116
+ ref_key: "inputSearchEl",
3117
+ ref: inputSearchEl,
3118
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3119
+ "aria-autocomplete": "list",
3120
+ "aria-controls": unref(hasDropdownId),
3121
+ autocomplete: "off",
3122
+ spellcheck: "false",
3123
+ type: "search",
3124
+ class: "vv-dropdown__search",
3125
+ placeholder: unref(propsDefaults).searchPlaceholder
3126
+ }, null, 8, _hoisted_3)), [
3127
+ [vModelText, unref(searchText)]
3128
+ ]) : createCommentVNode("v-if", true)
3129
+ ]),
3130
+ key: "0"
3131
+ } : void 0
3132
+ ]), 1040, ["modelValue", "role"])
3133
+ ],
3134
+ 512
3135
+ /* NEED_PATCH */
3136
+ ),
2921
3137
  createVNode(unref(HintSlot), {
2922
3138
  id: unref(hasHintId),
2923
3139
  class: "vv-select__hint"
2924
- }, createSlots({ _: 2 }, [
3140
+ }, createSlots({
3141
+ _: 2
3142
+ /* DYNAMIC */
3143
+ }, [
2925
3144
  _ctx.$slots.hint ? {
2926
3145
  name: "hint",
2927
3146
  fn: withCtx(() => [
@@ -2951,9 +3170,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2951
3170
  key: "3"
2952
3171
  } : void 0
2953
3172
  ]), 1032, ["id"])
2954
- ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, unref(selectProps), {
2955
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
2956
- }), null, 16));
3173
+ ], 10, _hoisted_1)) : (openBlock(), createBlock(
3174
+ _sfc_main$4,
3175
+ mergeProps({ key: 1 }, unref(selectProps), {
3176
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
3177
+ }),
3178
+ null,
3179
+ 16
3180
+ /* FULL_PROPS */
3181
+ ));
2957
3182
  };
2958
3183
  }
2959
3184
  });