@volverjs/ui-vue 0.0.10-beta.4 → 0.0.10-beta.40

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 (478) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +146 -49
  3. package/auto-imports.d.ts +7 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +27 -20
  6. package/dist/Volver.d.ts +11 -11
  7. package/dist/components/VvAccordion/VvAccordion.es.js +190 -101
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +30 -8
  10. package/dist/components/VvAccordion/index.d.ts +8 -9
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +450 -170
  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 +84 -33
  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 +228 -193
  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 +549 -485
  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 +7 -15
  27. package/dist/components/VvAvatar/VvAvatar.es.js +65 -22
  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 +128 -49
  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 +77 -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 +307 -262
  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 +95 -40
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +31 -11
  50. package/dist/components/VvButtonGroup/index.d.ts +11 -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 +315 -251
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +106 -34
  58. package/dist/components/VvCheckbox/index.d.ts +47 -14
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +226 -126
  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 +1215 -955
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +600 -680
  66. package/dist/components/VvCombobox/index.d.ts +454 -24
  67. package/dist/components/VvDialog/VvDialog.es.js +180 -176
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +13 -4
  70. package/dist/components/VvDialog/index.d.ts +5 -0
  71. package/dist/components/VvDropdown/VvDropdown.es.js +165 -94
  72. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  73. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +111 -81
  74. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
  75. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
  76. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  77. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
  78. package/dist/components/VvDropdown/index.d.ts +52 -10
  79. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +163 -53
  80. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  81. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
  82. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  83. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  84. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  85. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  86. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.es.js +24 -97
  88. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  89. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  90. package/dist/components/VvIcon/index.d.ts +33 -48
  91. package/dist/components/VvInputFile/VvInputFile.es.js +1789 -0
  92. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  93. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +391 -0
  94. package/dist/components/VvInputFile/index.d.ts +210 -0
  95. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  96. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  97. package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
  98. package/dist/components/VvInputText/VvInputText.es.js +1489 -563
  99. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  100. package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
  101. package/dist/components/VvInputText/index.d.ts +105 -30
  102. package/dist/components/VvNav/VvNav.es.js +160 -75
  103. package/dist/components/VvNav/VvNav.umd.js +1 -1
  104. package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
  105. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  106. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  107. package/dist/components/VvNav/index.d.ts +5 -2
  108. package/dist/components/VvNavItem/VvNavItem.es.js +100 -39
  109. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  110. package/dist/components/VvProgress/VvProgress.es.js +73 -27
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +313 -250
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
  117. package/dist/components/VvRadio/index.d.ts +50 -17
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +224 -125
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +301 -267
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +229 -203
  125. package/dist/components/VvSelect/index.d.ts +181 -15
  126. package/dist/components/VvTab/VvTab.es.js +222 -97
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
  129. package/dist/components/VvTab/index.d.ts +4 -1
  130. package/dist/components/VvTextarea/VvTextarea.es.js +258 -248
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +83 -30
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
  137. package/dist/components/VvTooltip/index.d.ts +5 -2
  138. package/dist/components/common/HintSlot.d.ts +4 -5
  139. package/dist/components/index.d.ts +10 -0
  140. package/dist/components/index.es.js +4241 -2261
  141. package/dist/components/index.umd.js +1 -1
  142. package/dist/composables/alert/useAlert.d.ts +101 -6
  143. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  144. package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
  145. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
  146. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  147. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  148. package/dist/composables/index.d.ts +1 -0
  149. package/dist/composables/index.es.js +94 -5
  150. package/dist/composables/index.umd.js +1 -1
  151. package/dist/composables/useBlurhash.d.ts +7 -0
  152. package/dist/composables/useComponentFocus.d.ts +1 -1
  153. package/dist/composables/useComponentIcon.d.ts +9 -8
  154. package/dist/composables/useOptions.d.ts +4 -4
  155. package/dist/composables/usePersistence.d.ts +3 -0
  156. package/dist/composables/useUniqueId.d.ts +1 -1
  157. package/dist/composables/useVolver.d.ts +1 -1
  158. package/dist/constants.d.ts +34 -32
  159. package/dist/directives/index.d.ts +3 -5
  160. package/dist/directives/index.es.js +104 -45
  161. package/dist/directives/index.umd.js +1 -1
  162. package/dist/directives/v-contextmenu.es.js +1 -1
  163. package/dist/directives/v-contextmenu.umd.js +1 -1
  164. package/dist/directives/v-tooltip.es.js +101 -39
  165. package/dist/directives/v-tooltip.umd.js +1 -1
  166. package/dist/icons.es.js +267 -267
  167. package/dist/icons.umd.js +1 -1
  168. package/dist/index.d.ts +3 -1
  169. package/dist/index.es.js +92 -18
  170. package/dist/index.umd.js +1 -1
  171. package/dist/props/index.d.ts +272 -81
  172. package/dist/resolvers/unplugin.d.ts +6 -1
  173. package/dist/resolvers/unplugin.es.js +87 -10
  174. package/dist/resolvers/unplugin.umd.js +1 -1
  175. package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
  176. package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
  177. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -127
  178. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1437 -495
  179. package/dist/stories/Alert/Alert.settings.d.ts +2 -109
  180. package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
  181. package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
  182. package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
  183. package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
  184. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
  185. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +2 -2
  186. package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
  187. package/dist/stories/Badge/Badge.settings.d.ts +2 -26
  188. package/dist/stories/Badge/Badge.test.d.ts +1 -1
  189. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  190. package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
  191. package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
  192. package/dist/stories/Button/Button.settings.d.ts +2 -194
  193. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
  194. package/dist/stories/Card/Card.settings.d.ts +2 -63
  195. package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
  196. package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
  197. package/dist/stories/Combobox/Combobox.settings.d.ts +2 -609
  198. package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
  199. package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
  200. package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
  201. package/dist/stories/Icon/Icon.settings.d.ts +3 -68
  202. package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
  203. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  204. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  205. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  206. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  207. package/dist/stories/InputText/InputText.settings.d.ts +2 -438
  208. package/dist/stories/Nav/Nav.settings.d.ts +2 -10
  209. package/dist/stories/Progress/Progress.settings.d.ts +2 -27
  210. package/dist/stories/Radio/Radio.settings.d.ts +1 -110
  211. package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
  212. package/dist/stories/Select/Select.settings.d.ts +2 -246
  213. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  214. package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
  215. package/dist/stories/argTypes.d.ts +27 -866
  216. package/dist/test/expect.d.ts +1 -1
  217. package/dist/test/options.d.ts +1 -1
  218. package/dist/test/sleep.d.ts +1 -1
  219. package/dist/types/alert.d.ts +9 -7
  220. package/dist/types/blurhash.d.ts +12 -0
  221. package/dist/types/generic.d.ts +1 -2
  222. package/dist/types/group.d.ts +37 -15
  223. package/dist/types/index.d.ts +7 -0
  224. package/dist/types/input-file.d.ts +16 -0
  225. package/dist/types/nav.d.ts +2 -2
  226. package/dist/utils/ObjectUtilities.d.ts +7 -8
  227. package/dist/workers/blurhash.d.ts +1 -0
  228. package/package.json +239 -246
  229. package/src/Volver.ts +245 -234
  230. package/src/assets/icons/detailed.json +1 -1
  231. package/src/assets/icons/normal.json +1 -1
  232. package/src/assets/icons/simple.json +1 -1
  233. package/src/components/VvAccordion/VvAccordion.vue +163 -100
  234. package/src/components/VvAccordion/index.ts +64 -79
  235. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +223 -105
  236. package/src/components/VvAccordionGroup/index.ts +42 -42
  237. package/src/components/VvAction/VvAction.vue +144 -130
  238. package/src/components/VvAlert/VvAlert.vue +72 -70
  239. package/src/components/VvAlert/index.ts +149 -147
  240. package/src/components/VvAlertGroup/VvAlertGroup.vue +57 -56
  241. package/src/components/VvAlertGroup/index.ts +101 -117
  242. package/src/components/VvAvatar/VvAvatar.vue +20 -14
  243. package/src/components/VvAvatar/index.ts +5 -5
  244. package/src/components/VvAvatarGroup/VvAvatarGroup.vue +58 -53
  245. package/src/components/VvAvatarGroup/index.ts +21 -21
  246. package/src/components/VvBadge/VvBadge.vue +15 -14
  247. package/src/components/VvBadge/index.ts +2 -2
  248. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +50 -48
  249. package/src/components/VvBreadcrumb/index.ts +3 -9
  250. package/src/components/VvButton/VvButton.vue +163 -152
  251. package/src/components/VvButton/index.ts +103 -110
  252. package/src/components/VvButtonGroup/VvButtonGroup.vue +72 -64
  253. package/src/components/VvButtonGroup/index.ts +22 -21
  254. package/src/components/VvCard/VvCard.vue +30 -30
  255. package/src/components/VvCard/index.ts +2 -2
  256. package/src/components/VvCheckbox/VvCheckbox.vue +185 -183
  257. package/src/components/VvCheckbox/index.ts +44 -44
  258. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +88 -87
  259. package/src/components/VvCombobox/VvCombobox.vue +631 -619
  260. package/src/components/VvCombobox/index.ts +189 -164
  261. package/src/components/VvDialog/VvDialog.vue +141 -129
  262. package/src/components/VvDialog/index.ts +38 -36
  263. package/src/components/VvDropdown/VvDropdown.vue +466 -445
  264. package/src/components/VvDropdown/VvDropdownAction.vue +37 -39
  265. package/src/components/VvDropdown/VvDropdownItem.vue +30 -26
  266. package/src/components/VvDropdown/VvDropdownOptgroup.vue +13 -12
  267. package/src/components/VvDropdown/VvDropdownOption.vue +47 -64
  268. package/src/components/VvDropdown/index.ts +61 -27
  269. package/src/components/VvIcon/README.md +1 -1
  270. package/src/components/VvIcon/VvIcon.vue +133 -133
  271. package/src/components/VvIcon/index.ts +84 -97
  272. package/src/components/VvInputFile/VvInputFile.vue +402 -0
  273. package/src/components/VvInputFile/index.ts +141 -0
  274. package/src/components/VvInputText/VvInputClearAction.ts +51 -47
  275. package/src/components/VvInputText/VvInputPasswordAction.ts +66 -62
  276. package/src/components/VvInputText/VvInputStepAction.ts +43 -43
  277. package/src/components/VvInputText/VvInputText.vue +638 -516
  278. package/src/components/VvInputText/VvInputTextActions.ts +86 -86
  279. package/src/components/VvInputText/index.ts +200 -185
  280. package/src/components/VvNav/VvNav.vue +40 -36
  281. package/src/components/VvNav/VvNavItem.vue +12 -12
  282. package/src/components/VvNav/VvNavSeparator.vue +6 -6
  283. package/src/components/VvNav/index.ts +2 -2
  284. package/src/components/VvProgress/VvProgress.vue +27 -27
  285. package/src/components/VvProgress/index.ts +28 -28
  286. package/src/components/VvRadio/VvRadio.vue +115 -112
  287. package/src/components/VvRadio/index.ts +28 -28
  288. package/src/components/VvRadioGroup/VvRadioGroup.vue +91 -90
  289. package/src/components/VvSelect/VvSelect.vue +242 -241
  290. package/src/components/VvSelect/index.ts +81 -63
  291. package/src/components/VvTab/VvTab.vue +79 -69
  292. package/src/components/VvTab/index.ts +12 -12
  293. package/src/components/VvTextarea/VvTextarea.vue +218 -219
  294. package/src/components/VvTextarea/index.ts +35 -35
  295. package/src/components/VvTooltip/VvTooltip.vue +22 -16
  296. package/src/components/VvTooltip/index.ts +12 -12
  297. package/src/components/common/HintSlot.ts +149 -150
  298. package/src/components/index.ts +10 -0
  299. package/src/composables/alert/useAlert.ts +76 -73
  300. package/src/composables/alert/useInjectAlert.ts +1 -1
  301. package/src/composables/alert/useProvideAlert.ts +10 -10
  302. package/src/composables/dropdown/useInjectDropdown.ts +6 -6
  303. package/src/composables/dropdown/useProvideDropdown.ts +63 -63
  304. package/src/composables/group/useInjectedGroupState.ts +46 -42
  305. package/src/composables/group/useProvideGroupState.ts +9 -15
  306. package/src/composables/index.ts +1 -0
  307. package/src/composables/useBlurhash.ts +68 -0
  308. package/src/composables/useComponentFocus.ts +9 -9
  309. package/src/composables/useComponentIcon.ts +36 -35
  310. package/src/composables/useDebouncedInput.ts +25 -25
  311. package/src/composables/useDefaults.ts +77 -76
  312. package/src/composables/useModifiers.ts +29 -29
  313. package/src/composables/useOptions.ts +51 -43
  314. package/src/composables/usePersistence.ts +74 -0
  315. package/src/composables/useTextCount.ts +44 -44
  316. package/src/composables/useUniqueId.ts +3 -2
  317. package/src/composables/useVolver.ts +1 -1
  318. package/src/constants.ts +97 -82
  319. package/src/directives/index.ts +3 -6
  320. package/src/directives/v-contextmenu.ts +34 -34
  321. package/src/directives/v-tooltip.ts +18 -9
  322. package/src/index.ts +6 -4
  323. package/src/props/index.ts +457 -380
  324. package/src/resolvers/unplugin.ts +146 -136
  325. package/src/shims.d.ts +4 -5
  326. package/src/stories/Accordion/Accordion.settings.ts +51 -50
  327. package/src/stories/Accordion/Accordion.stories.ts +21 -21
  328. package/src/stories/Accordion/Accordion.test.ts +56 -54
  329. package/src/stories/Accordion/AccordionSlots.stories.ts +13 -13
  330. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +70 -67
  331. package/src/stories/AccordionGroup/AccordionGroup.stories.ts +41 -39
  332. package/src/stories/AccordionGroup/AccordionGroup.test.ts +49 -45
  333. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +35 -35
  334. package/src/stories/Alert/Alert.settings.ts +117 -116
  335. package/src/stories/Alert/Alert.stories.ts +30 -30
  336. package/src/stories/Alert/Alert.test.ts +78 -80
  337. package/src/stories/Alert/AlertModifiers.stories.ts +45 -45
  338. package/src/stories/Alert/AlertSlots.stories.ts +35 -35
  339. package/src/stories/AlertGroup/AlertGroup.settings.ts +107 -105
  340. package/src/stories/AlertGroup/AlertGroup.stories.ts +25 -25
  341. package/src/stories/AlertGroup/AlertGroup.test.ts +67 -69
  342. package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +68 -68
  343. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +23 -23
  344. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +58 -58
  345. package/src/stories/Avatar/Avatar.settings.ts +29 -29
  346. package/src/stories/Avatar/Avatar.stories.ts +23 -23
  347. package/src/stories/Avatar/Avatar.test.ts +22 -24
  348. package/src/stories/Avatar/AvatarBadge.stories.ts +15 -15
  349. package/src/stories/Avatar/AvatarModifiers.stories.ts +61 -61
  350. package/src/stories/Avatar/AvatarSlots.stories.ts +18 -18
  351. package/src/stories/AvatarGroup/AvatarGroup.settings.ts +54 -53
  352. package/src/stories/AvatarGroup/AvatarGroup.stories.ts +17 -17
  353. package/src/stories/AvatarGroup/AvatarGroup.test.ts +24 -26
  354. package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +15 -15
  355. package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +17 -17
  356. package/src/stories/Badge/Badge.settings.ts +21 -20
  357. package/src/stories/Badge/Badge.stories.ts +24 -24
  358. package/src/stories/Badge/Badge.test.ts +8 -8
  359. package/src/stories/Badge/BadgeSlots.stories.ts +10 -10
  360. package/src/stories/Blurhash/BlurhashComposable.stories.ts +196 -0
  361. package/src/stories/Breadcrumb/Breadcrumb.settings.ts +35 -34
  362. package/src/stories/Breadcrumb/Breadcrumb.stories.ts +23 -23
  363. package/src/stories/Breadcrumb/Breadcrumb.test.ts +44 -43
  364. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +17 -17
  365. package/src/stories/Button/Button.settings.ts +146 -150
  366. package/src/stories/Button/Button.stories.ts +19 -19
  367. package/src/stories/Button/Button.test.ts +41 -42
  368. package/src/stories/Button/ButtonIcon.stories.ts +42 -42
  369. package/src/stories/Button/ButtonLink.stories.ts +24 -24
  370. package/src/stories/Button/ButtonLoading.stories.ts +22 -22
  371. package/src/stories/Button/ButtonModifiers.stories.ts +91 -91
  372. package/src/stories/Button/ButtonSlots.stories.ts +47 -47
  373. package/src/stories/Button/ButtonState.stories.ts +23 -23
  374. package/src/stories/Button/ButtonToggle.stories.ts +30 -30
  375. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -24
  376. package/src/stories/ButtonGroup/ButtonGroup.stories.ts +20 -20
  377. package/src/stories/ButtonGroup/ButtonGroup.test.ts +23 -26
  378. package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +20 -20
  379. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +18 -18
  380. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +22 -22
  381. package/src/stories/Card/Card.settings.ts +49 -48
  382. package/src/stories/Card/Card.stories.ts +22 -22
  383. package/src/stories/Card/Card.test.ts +14 -16
  384. package/src/stories/Card/CardSlots.stories.ts +42 -42
  385. package/src/stories/Checkbox/Checkbox.settings.ts +36 -35
  386. package/src/stories/Checkbox/Checkbox.stories.ts +57 -57
  387. package/src/stories/Checkbox/Checkbox.test.ts +63 -66
  388. package/src/stories/Checkbox/CheckboxBinary.stories.ts +18 -18
  389. package/src/stories/Checkbox/CheckboxSlots.stories.ts +15 -15
  390. package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +9 -9
  391. package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +50 -50
  392. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +63 -67
  393. package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +34 -34
  394. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +23 -23
  395. package/src/stories/Combobox/Combobox.settings.ts +391 -383
  396. package/src/stories/Combobox/Combobox.stories.ts +108 -107
  397. package/src/stories/Combobox/Combobox.test.ts +89 -91
  398. package/src/stories/Combobox/ComboboxIconPosition.stories.ts +25 -24
  399. package/src/stories/Combobox/ComboboxMultiple.stories.ts +23 -22
  400. package/src/stories/Combobox/ComboboxOptions.stories.ts +85 -84
  401. package/src/stories/Combobox/ComboboxSlots.stories.ts +56 -55
  402. package/src/stories/Dialog/Dialog.settings.ts +49 -40
  403. package/src/stories/Dialog/Dialog.stories.ts +28 -28
  404. package/src/stories/Dialog/Dialog.test.ts +49 -54
  405. package/src/stories/Dialog/DialogModifiers.stories.ts +42 -0
  406. package/src/stories/Dialog/DialogSlots.stories.ts +20 -20
  407. package/src/stories/Dropdown/Dropdown.settings.ts +63 -62
  408. package/src/stories/Dropdown/Dropdown.stories.ts +59 -59
  409. package/src/stories/Dropdown/Dropdown.test.ts +9 -13
  410. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +16 -16
  411. package/src/stories/Dropdown/DropdownMultilevel.stories.ts +18 -18
  412. package/src/stories/Dropdown/DropdownSlots.stories.ts +50 -50
  413. package/src/stories/Icon/Icon.settings.ts +66 -65
  414. package/src/stories/Icon/Icon.stories.ts +28 -29
  415. package/src/stories/Icon/IconsCollection.stories.ts +22 -22
  416. package/src/stories/InputFile/InputFile.settings.ts +37 -0
  417. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  418. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  419. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  420. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  421. package/src/stories/InputText/InputText.settings.ts +246 -244
  422. package/src/stories/InputText/InputText.stories.ts +67 -67
  423. package/src/stories/InputText/InputText.test.ts +118 -121
  424. package/src/stories/InputText/InputTextIconPosition.stories.ts +24 -24
  425. package/src/stories/InputText/InputTextLength.stories.ts +33 -33
  426. package/src/stories/InputText/InputTextMask.stories.ts +91 -91
  427. package/src/stories/InputText/InputTextMinMax.stories.ts +30 -30
  428. package/src/stories/InputText/InputTextSlots.stories.ts +20 -20
  429. package/src/stories/InputText/InputTextType.stories.ts +70 -70
  430. package/src/stories/Nav/Nav.settings.ts +27 -27
  431. package/src/stories/Nav/Nav.stories.ts +18 -18
  432. package/src/stories/Nav/Nav.test.ts +10 -12
  433. package/src/stories/Nav/NavModifiers.stories.ts +25 -25
  434. package/src/stories/Progress/Progress.settings.ts +24 -23
  435. package/src/stories/Progress/Progress.stories.ts +23 -23
  436. package/src/stories/Progress/Progress.test.ts +4 -4
  437. package/src/stories/Radio/Radio.settings.ts +9 -9
  438. package/src/stories/Radio/Radio.stories.ts +47 -47
  439. package/src/stories/Radio/Radio.test.ts +54 -57
  440. package/src/stories/Radio/RadioSlots.stories.ts +15 -15
  441. package/src/stories/RadioGroup/RadioGroup.settings.ts +9 -9
  442. package/src/stories/RadioGroup/RadioGroup.stories.ts +51 -52
  443. package/src/stories/RadioGroup/RadioGroup.test.ts +63 -67
  444. package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +35 -35
  445. package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +23 -23
  446. package/src/stories/Select/Select.settings.ts +71 -70
  447. package/src/stories/Select/Select.stories.ts +67 -66
  448. package/src/stories/Select/Select.test.ts +65 -70
  449. package/src/stories/Select/SelectIconPosition.stories.ts +27 -26
  450. package/src/stories/Select/SelectOptions.stories.ts +55 -55
  451. package/src/stories/Select/SelectSlots.stories.ts +21 -20
  452. package/src/stories/Tab/Tab.settings.ts +34 -34
  453. package/src/stories/Tab/Tab.stories.ts +17 -17
  454. package/src/stories/Tab/Tab.test.ts +17 -19
  455. package/src/stories/Textarea/Textarea.settings.ts +79 -77
  456. package/src/stories/Textarea/Textarea.stories.ts +63 -63
  457. package/src/stories/Textarea/Textarea.test.ts +70 -73
  458. package/src/stories/Textarea/TextareaLength.stories.ts +33 -33
  459. package/src/stories/Textarea/TextareaSlots.stories.ts +20 -20
  460. package/src/stories/Textarea/TextareatIconPosition.stories.ts +24 -24
  461. package/src/stories/Tooltip/Tooltip.settings.ts +16 -17
  462. package/src/stories/Tooltip/Tooltip.stories.ts +18 -18
  463. package/src/stories/Tooltip/Tooltip.test.ts +53 -54
  464. package/src/stories/Tooltip/TooltipDirective.stories.ts +37 -37
  465. package/src/stories/argTypes.ts +506 -505
  466. package/src/test/expect.ts +72 -77
  467. package/src/test/options.ts +17 -16
  468. package/src/test/sleep.ts +3 -2
  469. package/src/test/types.d.ts +11 -11
  470. package/src/types/alert.ts +21 -17
  471. package/src/types/blurhash.ts +21 -0
  472. package/src/types/generic.ts +2 -3
  473. package/src/types/group.ts +34 -26
  474. package/src/types/index.ts +7 -0
  475. package/src/types/input-file.ts +18 -0
  476. package/src/types/nav.ts +13 -14
  477. package/src/utils/ObjectUtilities.ts +192 -188
  478. package/src/workers/blurhash.ts +9 -0
@@ -1,10 +1,19 @@
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
4
  import { uid } from "uid";
5
- import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
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
+ const VvIconPropsDefaults = {
9
+ prefix: "normal"
10
+ /* normal */
11
+ };
12
+ var StorageType = /* @__PURE__ */ ((StorageType2) => {
13
+ StorageType2["local"] = "local";
14
+ StorageType2["session"] = "session";
15
+ return StorageType2;
16
+ })(StorageType || {});
8
17
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
9
18
  Strategy2["absolute"] = "absolute";
10
19
  Strategy2["fixed"] = "fixed";
@@ -62,15 +71,10 @@ var DropdownItemRole = /* @__PURE__ */ ((DropdownItemRole2) => {
62
71
  DropdownItemRole2["presentation"] = "presentation";
63
72
  return DropdownItemRole2;
64
73
  })(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
74
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
73
- const INJECTION_KEY_BUTTON_GROUP = Symbol.for("buttonGroup");
75
+ const INJECTION_KEY_BUTTON_GROUP = Symbol.for(
76
+ "buttonGroup"
77
+ );
74
78
  const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
75
79
  "dropdownTrigger"
76
80
  );
@@ -80,6 +84,145 @@ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
80
84
  const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
81
85
  "dropdownAction"
82
86
  );
87
+ function useVolver() {
88
+ return inject(INJECTION_KEY_VOLVER);
89
+ }
90
+ function useModifiers(prefix, modifiers, others) {
91
+ return computed(() => {
92
+ const toReturn = {
93
+ [prefix]: true
94
+ };
95
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
96
+ if (modifiersArray) {
97
+ if (Array.isArray(modifiersArray)) {
98
+ modifiersArray.forEach((modifier) => {
99
+ if (modifier) {
100
+ toReturn[`${prefix}--${modifier}`] = true;
101
+ }
102
+ });
103
+ }
104
+ }
105
+ if (others) {
106
+ Object.keys(others.value).forEach((key) => {
107
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
108
+ });
109
+ }
110
+ return toReturn;
111
+ });
112
+ }
113
+ const __default__$9 = {
114
+ name: "VvIcon"
115
+ };
116
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
117
+ ...__default__$9,
118
+ props: /* @__PURE__ */ mergeDefaults({
119
+ name: {},
120
+ color: {},
121
+ width: {},
122
+ height: {},
123
+ provider: {},
124
+ prefix: {},
125
+ src: {},
126
+ horizontalFlip: { type: Boolean },
127
+ verticalFlip: { type: Boolean },
128
+ flip: {},
129
+ mode: {},
130
+ inline: { type: Boolean },
131
+ rotate: {},
132
+ onLoad: { type: Function },
133
+ svg: {},
134
+ modifiers: {}
135
+ }, VvIconPropsDefaults),
136
+ setup(__props) {
137
+ const props = __props;
138
+ const hasRotate = computed(() => {
139
+ if (typeof props.rotate === "string") {
140
+ return Number.parseFloat(props.rotate);
141
+ }
142
+ return props.rotate;
143
+ });
144
+ const show = ref(true);
145
+ const volver = useVolver();
146
+ const { modifiers } = toRefs(props);
147
+ const bemCssClasses = useModifiers("vv-icon", modifiers);
148
+ const provider = computed(() => {
149
+ return props.provider || (volver == null ? void 0 : volver.iconsProvider);
150
+ });
151
+ const icon = computed(() => {
152
+ const name = props.name ?? "";
153
+ const iconName = `@${provider.value}:${props.prefix}:${name}`;
154
+ if (iconExists(iconName)) {
155
+ return iconName;
156
+ }
157
+ const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
158
+ (iconsCollection2) => {
159
+ const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
160
+ return iconExists(icon2);
161
+ }
162
+ );
163
+ if (iconsCollection) {
164
+ return `@${provider.value}:${iconsCollection.prefix}:${name}`;
165
+ }
166
+ return name;
167
+ });
168
+ function getSvgContent(svg) {
169
+ let dom;
170
+ if (typeof window === "undefined") {
171
+ const { JSDOM } = require("jsdom");
172
+ dom = new JSDOM().window;
173
+ }
174
+ const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
175
+ const svgDomString = domParser.parseFromString(svg, "text/html");
176
+ const svgEl = svgDomString.querySelector("svg");
177
+ return svgEl;
178
+ }
179
+ function addIconFromSvg(svg) {
180
+ const svgContentEl = getSvgContent(svg);
181
+ const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
182
+ if (svgContentEl && svgContent) {
183
+ addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
184
+ body: svgContent,
185
+ // Set height and width from svg content
186
+ height: svgContentEl.viewBox.baseVal.height,
187
+ width: svgContentEl.viewBox.baseVal.width
188
+ });
189
+ }
190
+ }
191
+ if (volver) {
192
+ if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
193
+ show.value = false;
194
+ volver.fetchIcon(props.src).then((svg) => {
195
+ if (svg) {
196
+ addIconFromSvg(svg);
197
+ show.value = true;
198
+ }
199
+ }).catch((e) => {
200
+ throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
201
+ });
202
+ }
203
+ }
204
+ if (props.svg) {
205
+ addIconFromSvg(props.svg);
206
+ }
207
+ return (_ctx, _cache) => {
208
+ return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
209
+ key: 0,
210
+ class: unref(bemCssClasses)
211
+ }, {
212
+ inline: _ctx.inline,
213
+ width: _ctx.width,
214
+ height: _ctx.height,
215
+ horizontalFlip: _ctx.horizontalFlip,
216
+ verticalFlip: _ctx.verticalFlip,
217
+ flip: _ctx.flip,
218
+ rotate: unref(hasRotate),
219
+ color: _ctx.color,
220
+ onLoad: _ctx.onLoad,
221
+ icon: unref(icon)
222
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
223
+ };
224
+ }
225
+ });
83
226
  const LinkProps = {
84
227
  /**
85
228
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -95,10 +238,7 @@ const LinkProps = {
95
238
  /**
96
239
  * Anchor target
97
240
  */
98
- target: {
99
- type: String,
100
- validator: (value) => Object.values(AnchorTarget).includes(value)
101
- },
241
+ target: String,
102
242
  /**
103
243
  * Anchor rel
104
244
  */
@@ -111,27 +251,33 @@ const ValidProps = {
111
251
  /**
112
252
  * Valid status
113
253
  */
114
- valid: Boolean,
254
+ valid: { type: Boolean, default: false },
115
255
  /**
116
256
  * Valid label
117
257
  */
118
- validLabel: [String, Array]
258
+ validLabel: { type: [String, Array], default: void 0 }
119
259
  };
120
260
  const InvalidProps = {
121
261
  /**
122
262
  * Invalid status
123
263
  */
124
- invalid: Boolean,
264
+ invalid: {
265
+ type: Boolean,
266
+ default: false
267
+ },
125
268
  /**
126
269
  * Invalid label
127
270
  */
128
- invalidLabel: [String, Array]
271
+ invalidLabel: { type: [String, Array], default: void 0 }
129
272
  };
130
273
  const LoadingProps = {
131
274
  /**
132
275
  * Loading status
133
276
  */
134
- loading: Boolean,
277
+ loading: {
278
+ type: Boolean,
279
+ default: false
280
+ },
135
281
  /**
136
282
  * Loading label
137
283
  */
@@ -144,49 +290,73 @@ const DisabledProps = {
144
290
  /**
145
291
  * Whether the form control is disabled
146
292
  */
147
- disabled: Boolean
293
+ disabled: {
294
+ type: Boolean,
295
+ default: false
296
+ }
148
297
  };
149
298
  const SelectedProps = {
150
299
  /**
151
300
  * Whether the item is selected
152
301
  */
153
- selected: Boolean
302
+ selected: {
303
+ type: Boolean,
304
+ default: false
305
+ }
154
306
  };
155
307
  const ActiveProps = {
156
308
  /**
157
309
  * Whether the item is active
158
310
  */
159
- active: Boolean
311
+ active: {
312
+ type: Boolean,
313
+ default: false
314
+ }
160
315
  };
161
316
  const CurrentProps = {
162
317
  /**
163
318
  * Whether the item is current
164
319
  */
165
- current: Boolean
320
+ current: {
321
+ type: Boolean,
322
+ default: false
323
+ }
166
324
  };
167
325
  const PressedProps = {
168
326
  /**
169
327
  * Whether the item is pressed
170
328
  */
171
- pressed: Boolean
329
+ pressed: {
330
+ type: Boolean,
331
+ default: false
332
+ }
172
333
  };
173
334
  const LabelProps = {
174
335
  /**
175
336
  * The item label
176
337
  */
177
- label: [String, Number]
338
+ label: {
339
+ type: [String, Number],
340
+ default: void 0
341
+ }
178
342
  };
179
343
  const ReadonlyProps = {
180
344
  /**
181
345
  * The value is not editable
182
346
  */
183
- readonly: Boolean
347
+ readonly: {
348
+ type: Boolean,
349
+ default: false
350
+ }
184
351
  };
185
352
  const ModifiersProps = {
186
353
  /**
187
354
  * Component BEM modifiers
188
355
  */
189
- modifiers: [String, Array]
356
+ modifiers: {
357
+ type: [String, Array],
358
+ default: void 0
359
+ }
190
360
  };
191
361
  const HintProps = {
192
362
  hintLabel: { type: String, default: "" }
@@ -217,7 +387,10 @@ const IconProps = {
217
387
  * VvIcon name or props
218
388
  * @see VVIcon
219
389
  */
220
- icon: { type: [String, Object] },
390
+ icon: {
391
+ type: [String, Object],
392
+ default: void 0
393
+ },
221
394
  /**
222
395
  * VvIcon position
223
396
  */
@@ -238,7 +411,10 @@ const FloatingLabelProps = {
238
411
  /**
239
412
  * If true the label will be floating
240
413
  */
241
- floating: Boolean
414
+ floating: {
415
+ type: Boolean,
416
+ default: false
417
+ }
242
418
  };
243
419
  const UnselectableProps = {
244
420
  /**
@@ -274,7 +450,8 @@ const DropdownProps = {
274
450
  * Dropdown show / hide transition name
275
451
  */
276
452
  transitionName: {
277
- type: String
453
+ type: String,
454
+ default: void 0
278
455
  },
279
456
  /**
280
457
  * Offset of the dropdown from the trigger
@@ -342,7 +519,8 @@ const DropdownProps = {
342
519
  * Set dropdown width to the same as the trigger
343
520
  */
344
521
  triggerWidth: {
345
- type: Boolean
522
+ type: Boolean,
523
+ default: false
346
524
  }
347
525
  };
348
526
  const IdNameProps = {
@@ -359,7 +537,10 @@ const AutofocusProps = {
359
537
  * Global attribute autofocus
360
538
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
361
539
  */
362
- autofocus: Boolean
540
+ autofocus: {
541
+ type: Boolean,
542
+ default: false
543
+ }
363
544
  };
364
545
  const AutocompleteProps = {
365
546
  /**
@@ -387,374 +568,24 @@ const ActionProps = {
387
568
  * Button aria-label
388
569
  */
389
570
  ariaLabel: {
390
- type: String,
391
- default: void 0
392
- }
393
- };
394
- const VvComboboxEvents = [
395
- "update:modelValue",
396
- "change:search",
397
- "focus",
398
- "blur"
399
- ];
400
- const VvComboboxProps = {
401
- ...IdNameProps,
402
- ...TabindexProps,
403
- ...ValidProps,
404
- ...InvalidProps,
405
- ...HintProps,
406
- ...LoadingProps,
407
- ...DisabledProps,
408
- ...ReadonlyProps,
409
- ...ModifiersProps,
410
- ...OptionsProps,
411
- ...IconProps,
412
- ...FloatingLabelProps,
413
- ...UnselectableProps,
414
- ...DropdownProps,
415
- ...LabelProps,
416
- /**
417
- * Dropdown show / hide transition name
418
- */
419
- transitionName: {
420
- type: String,
421
- default: "vv-dropdown--mobile-fade-block"
422
- },
423
- /**
424
- * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
425
- */
426
- modelValue: {
427
- type: [String, Number, Boolean, Object, Array],
428
- default: void 0
429
- },
430
- /**
431
- * Label for no search results
432
- */
433
- noResultsLabel: { type: String, default: "No results" },
434
- /**
435
- * Label for no options available
436
- */
437
- noOptionsLabel: { type: String, default: "No options available" },
438
- /**
439
- * Label for selected option hint
440
- */
441
- selectedHintLabel: { type: String, default: "Selected" },
442
- /**
443
- * Label for deselect action button
444
- */
445
- deselectActionLabel: { type: String, default: "Deselect" },
446
- /**
447
- * Label for select option hint
448
- */
449
- selectHintLabel: { type: String, default: "Press enter to select" },
450
- /**
451
- * Label for deselected option hint
452
- */
453
- deselectHintLabel: { type: String, default: "Press enter to remove" },
454
- /**
455
- * Label close button
456
- */
457
- closeLabel: { type: String, default: "Close" },
458
- /**
459
- * Select input placeholder
460
- */
461
- placeholder: String,
462
- /**
463
- * Use input text to search on options
464
- */
465
- searchable: Boolean,
466
- /**
467
- * Search function to filter options
468
- */
469
- searchFunction: {
470
- type: Function,
471
- default: void 0
472
- },
473
- /**
474
- * On searchable select is the input search placeholder
475
- */
476
- searchPlaceholder: {
477
- type: String,
478
- default: "Search..."
479
- },
480
- /**
481
- * The input search debounce time in ms
482
- */
483
- debounceSearch: {
484
- type: [Number, String],
485
- default: 0
486
- },
487
- /**
488
- * Manage modelValue as string[] or object[]
489
- */
490
- multiple: Boolean,
491
- /**
492
- * The max number of selected values
493
- */
494
- maxValues: [Number, String],
495
- /**
496
- * The select label separator visible to the user
497
- */
498
- separator: { type: String, default: ", " },
499
- /**
500
- * Show native select
501
- */
502
- native: Boolean,
503
- /**
504
- * Show badges
505
- */
506
- badges: Boolean,
507
- /**
508
- * Badge modifiers
509
- */
510
- badgeModifiers: {
511
- type: [String, Array],
512
- default: "action sm"
513
- },
514
- /**
515
- * Set dropdown width to the same as the trigger
516
- */
517
- triggerWidth: {
518
- ...DropdownProps.triggerWidth,
519
- default: true
520
- },
521
- /**
522
- * Dropdown modifiers
523
- */
524
- dropdownModifiers: {
525
- type: [String, Array],
526
- default: "mobile"
527
- },
528
- /**
529
- * Open dropdown on focus
530
- */
531
- autoOpen: {
532
- type: Boolean,
533
- default: false
534
- },
535
- /**
536
- * Keep open dropdown on single select
537
- */
538
- keepOpen: {
539
- type: Boolean,
540
- default: false
541
- }
542
- };
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,
571
+ type: String,
572
+ default: void 0
573
+ },
629
574
  /**
630
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
631
- * @values string | string[]
575
+ * Default tag for the action
632
576
  */
633
- modifiers: {
634
- type: [String, Array]
577
+ defaultTag: {
578
+ type: String,
579
+ default: ActionTag.button
635
580
  }
636
581
  };
637
- function useVolver() {
638
- return inject(INJECTION_KEY_VOLVER);
639
- }
640
- function useModifiers(prefix, modifiers, others) {
641
- return computed(() => {
642
- const toReturn = {
643
- [prefix]: true
644
- };
645
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
646
- if (modifiersArray) {
647
- if (Array.isArray(modifiersArray)) {
648
- modifiersArray.forEach((modifier) => {
649
- if (modifier) {
650
- toReturn[`${prefix}--${modifier}`] = true;
651
- }
652
- });
653
- }
654
- }
655
- if (others) {
656
- Object.keys(others.value).forEach((key) => {
657
- toReturn[`${prefix}--${key}`] = unref(others.value[key]);
658
- });
659
- }
660
- return toReturn;
661
- });
662
- }
663
- const __default__$9 = {
664
- name: "VvIcon"
665
- };
666
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
667
- ...__default__$9,
668
- props: VvIconProps,
669
- setup(__props) {
670
- const props = __props;
671
- const hasRotate = computed(() => {
672
- if (typeof props.rotate === "string") {
673
- return parseFloat(props.rotate);
674
- }
675
- return props.rotate;
676
- });
677
- const show = ref(true);
678
- const volver = useVolver();
679
- const { modifiers } = toRefs(props);
680
- const bemCssClasses = useModifiers("vv-icon", modifiers);
681
- const provider = computed(() => {
682
- return props.provider || (volver == null ? void 0 : volver.iconsProvider);
683
- });
684
- const icon = computed(() => {
685
- const name = props.name ?? "";
686
- const iconName = `@${provider.value}:${props.prefix}:${name}`;
687
- if (iconExists(iconName)) {
688
- return iconName;
689
- }
690
- const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
691
- (iconsCollection2) => {
692
- const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
693
- return iconExists(icon2);
694
- }
695
- );
696
- if (iconsCollection) {
697
- return `@${provider.value}:${iconsCollection.prefix}:${name}`;
698
- }
699
- return name;
700
- });
701
- function getSvgContent(svg) {
702
- let dom;
703
- if (typeof window === "undefined") {
704
- const { JSDOM } = require("jsdom");
705
- dom = new JSDOM().window;
706
- }
707
- const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
708
- const svgDomString = domParser.parseFromString(svg, "text/html");
709
- const svgEl = svgDomString.querySelector("svg");
710
- return svgEl;
711
- }
712
- function addIconFromSvg(svg) {
713
- const svgContentEl = getSvgContent(svg);
714
- const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
715
- if (svgContentEl && svgContent) {
716
- addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
717
- body: svgContent,
718
- // Set height and width from svg content
719
- height: svgContentEl.viewBox.baseVal.height,
720
- width: svgContentEl.viewBox.baseVal.width
721
- });
722
- }
723
- }
724
- if (volver) {
725
- if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
726
- show.value = false;
727
- volver.fetchIcon(props.src).then((svg) => {
728
- if (svg) {
729
- addIconFromSvg(svg);
730
- show.value = true;
731
- }
732
- }).catch((e) => {
733
- throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
734
- });
735
- }
736
- }
737
- if (props.svg) {
738
- addIconFromSvg(props.svg);
739
- }
740
- return (_ctx, _cache) => {
741
- return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
742
- key: 0,
743
- class: unref(bemCssClasses)
744
- }, {
745
- inline: _ctx.inline,
746
- width: _ctx.width,
747
- height: _ctx.height,
748
- horizontalFlip: _ctx.horizontalFlip,
749
- verticalFlip: _ctx.verticalFlip,
750
- flip: _ctx.flip,
751
- rotate: unref(hasRotate),
752
- color: _ctx.color,
753
- onLoad: _ctx.onLoad,
754
- icon: unref(icon)
755
- }), null, 16, ["class"])) : createCommentVNode("", true);
756
- };
757
- }
582
+ ({
583
+ storageType: {
584
+ type: String,
585
+ default: StorageType.local,
586
+ validator: (value) => Object.values(StorageType).includes(value)
587
+ },
588
+ storageKey: String
758
589
  });
759
590
  const VvDropdownProps = {
760
591
  ...IdProps,
@@ -783,7 +614,34 @@ const VvDropdownProps = {
783
614
  validator: (value) => Object.values(DropdownRole).includes(value)
784
615
  }
785
616
  };
786
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
617
+ const VvDropdownItemProps = {
618
+ focusOnHover: {
619
+ type: Boolean,
620
+ default: false
621
+ }
622
+ };
623
+ const VvDropdownOptionProps = {
624
+ ...DisabledProps,
625
+ ...SelectedProps,
626
+ ...UnselectableProps,
627
+ ...ModifiersProps,
628
+ deselectHintLabel: {
629
+ type: String
630
+ },
631
+ selectHintLabel: {
632
+ type: String
633
+ },
634
+ selectedHintLabel: {
635
+ type: String
636
+ },
637
+ focusOnHover: {
638
+ type: Boolean,
639
+ default: false
640
+ }
641
+ };
642
+ function useUniqueId(id) {
643
+ return computed(() => String((id == null ? void 0 : id.value) || uid()));
644
+ }
787
645
  function useProvideDropdownTrigger({
788
646
  reference,
789
647
  id,
@@ -814,14 +672,14 @@ function useProvideDropdownTrigger({
814
672
  }
815
673
  function useProvideDropdownItem({
816
674
  role,
817
- expanded
675
+ ...others
818
676
  }) {
819
677
  const itemRole = computed(
820
678
  () => role.value === DropdownRole.listbox ? DropdownItemRole.option : DropdownItemRole.presentation
821
679
  );
822
680
  provide(INJECTION_KEY_DROPDOWN_ITEM, {
823
681
  role: itemRole,
824
- expanded
682
+ ...others
825
683
  });
826
684
  return { itemRole };
827
685
  }
@@ -843,6 +701,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
843
701
  props: VvDropdownProps,
844
702
  emits: [
845
703
  "update:modelValue",
704
+ "beforeEnter",
705
+ "afterLeave",
846
706
  "beforeExpand",
847
707
  "beforeCollapse",
848
708
  "afterExpand",
@@ -850,14 +710,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
850
710
  "before-enter",
851
711
  "after-leave",
852
712
  "enter",
853
- "after-enter",
854
- "enter-cancelled",
855
- "before-leave",
713
+ "afterEnter",
714
+ "enterCancelled",
715
+ "beforeLeave",
856
716
  "leave",
857
- "leave-cancelled"
717
+ "leaveCancelled"
858
718
  ],
859
- setup(__props, { expose: __expose, emit }) {
719
+ setup(__props, { expose: __expose, emit: __emit }) {
860
720
  const props = __props;
721
+ const emit = __emit;
861
722
  const { id } = toRefs(props);
862
723
  const hasId = useUniqueId(id);
863
724
  const attrs = useAttrs();
@@ -1012,18 +873,18 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1012
873
  modelValue.value = newValue;
1013
874
  }
1014
875
  });
1015
- const show = () => {
876
+ function show() {
1016
877
  expanded.value = true;
1017
- };
1018
- const hide = () => {
878
+ }
879
+ function hide() {
1019
880
  expanded.value = false;
1020
- };
1021
- const toggle = () => {
881
+ }
882
+ function toggle() {
1022
883
  expanded.value = !expanded.value;
1023
- };
1024
- const init = (el) => {
884
+ }
885
+ function init(el) {
1025
886
  referenceEl.value = el;
1026
- };
887
+ }
1027
888
  __expose({
1028
889
  toggle,
1029
890
  show,
@@ -1071,7 +932,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1071
932
  });
1072
933
  bus.on("click", toggle);
1073
934
  const { role, modifiers } = toRefs(props);
1074
- const { itemRole } = useProvideDropdownItem({ role, expanded });
1075
935
  const bemCssClasses = useModifiers(
1076
936
  "vv-dropdown",
1077
937
  modifiers,
@@ -1092,7 +952,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1092
952
  (el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
1093
953
  );
1094
954
  }
1095
- const focusNext = () => {
955
+ function focusNext() {
1096
956
  nextTick(() => {
1097
957
  if (focused.value) {
1098
958
  const focusableElements = getKeyboardFocusableElements(
@@ -1115,8 +975,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1115
975
  }
1116
976
  }
1117
977
  });
1118
- };
1119
- const focusPrev = () => {
978
+ }
979
+ function focusPrev() {
1120
980
  nextTick(() => {
1121
981
  if (focused.value) {
1122
982
  const focusableElements = getKeyboardFocusableElements(
@@ -1139,7 +999,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1139
999
  }
1140
1000
  }
1141
1001
  });
1142
- };
1002
+ }
1003
+ const hovered = useElementHover(floatingEl);
1004
+ const { itemRole } = useProvideDropdownItem({
1005
+ role,
1006
+ expanded,
1007
+ focused,
1008
+ hovered
1009
+ });
1143
1010
  onKeyStroke("Escape", (e) => {
1144
1011
  if (expanded.value) {
1145
1012
  e.preventDefault();
@@ -1167,76 +1034,96 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1167
1034
  const dropdownTransitionHandlers = {
1168
1035
  "before-enter": () => {
1169
1036
  emit(expanded.value ? "beforeExpand" : "beforeCollapse");
1170
- emit("before-enter");
1037
+ emit("beforeEnter");
1171
1038
  },
1172
1039
  "after-leave": () => {
1173
1040
  emit(expanded.value ? "afterExpand" : "afterCollapse");
1174
- emit("after-leave");
1041
+ emit("afterLeave");
1175
1042
  },
1176
- enter: () => {
1043
+ "enter": () => {
1177
1044
  emit("enter");
1178
1045
  },
1179
1046
  "after-enter": () => {
1180
- emit("after-enter");
1047
+ emit("afterEnter");
1181
1048
  },
1182
1049
  "enter-cancelled": () => {
1183
- emit("enter-cancelled");
1050
+ emit("enterCancelled");
1184
1051
  },
1185
1052
  "before-leave": () => {
1186
- emit("before-leave");
1053
+ emit("beforeLeave");
1187
1054
  },
1188
- leave: () => {
1055
+ "leave": () => {
1189
1056
  emit("leave");
1190
1057
  },
1191
1058
  "leave-cancelled": () => {
1192
- emit("leave-cancelled");
1059
+ emit("leaveCancelled");
1193
1060
  }
1194
1061
  };
1195
1062
  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);
1063
+ return openBlock(), createElementBlock(
1064
+ Fragment,
1065
+ null,
1066
+ [
1067
+ createVNode(unref(VvDropdownTriggerProvider), null, {
1068
+ default: withCtx(() => [
1069
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1070
+ ]),
1071
+ _: 3
1072
+ /* FORWARDED */
1073
+ }),
1074
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
1075
+ default: withCtx(() => [
1076
+ withDirectives(createElementVNode(
1077
+ "div",
1078
+ {
1079
+ ref_key: "floatingEl",
1080
+ ref: floatingEl,
1081
+ style: normalizeStyle(unref(dropdownPlacement)),
1082
+ class: normalizeClass(unref(bemCssClasses))
1083
+ },
1084
+ [
1085
+ props.arrow ? (openBlock(), createElementBlock(
1086
+ "div",
1087
+ {
1088
+ key: 0,
1089
+ ref_key: "arrowEl",
1090
+ ref: arrowEl,
1091
+ style: normalizeStyle(unref(arrowPlacement)),
1092
+ class: "vv-dropdown__arrow"
1093
+ },
1094
+ null,
1095
+ 4
1096
+ /* STYLE */
1097
+ )) : createCommentVNode("v-if", true),
1098
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1099
+ createElementVNode("div", mergeProps(unref(attrs), {
1100
+ id: unref(hasId),
1101
+ ref_key: "listEl",
1102
+ ref: listEl,
1103
+ tabindex: !unref(expanded) ? -1 : void 0,
1104
+ role: unref(role),
1105
+ "aria-labelledby": unref(hasAriaLabelledby),
1106
+ class: "vv-dropdown__list"
1107
+ }), [
1108
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1109
+ role: unref(itemRole)
1110
+ })))
1111
+ ], 16, _hoisted_1$5),
1112
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1113
+ ],
1114
+ 6
1115
+ /* CLASS, STYLE */
1116
+ ), [
1117
+ [vShow, unref(expanded)]
1118
+ ])
1119
+ ]),
1120
+ _: 3
1121
+ /* FORWARDED */
1122
+ }, 16, ["name"])
1123
+ ],
1124
+ 64
1125
+ /* STABLE_FRAGMENT */
1126
+ );
1240
1127
  };
1241
1128
  }
1242
1129
  });
@@ -1254,7 +1141,9 @@ const __default__$7 = {
1254
1141
  };
1255
1142
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1256
1143
  ...__default__$7,
1144
+ props: VvDropdownItemProps,
1257
1145
  setup(__props) {
1146
+ const props = __props;
1258
1147
  const { role, expanded } = useInjectedDropdownItem();
1259
1148
  const element = ref(null);
1260
1149
  useProvideDropdownAction({ expanded });
@@ -1262,18 +1151,24 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1262
1151
  const { focused } = useFocus(element);
1263
1152
  const { focused: focusedWithin } = useFocusWithin(element);
1264
1153
  watch(hovered, (newValue) => {
1265
- if (newValue) {
1154
+ if (newValue && props.focusOnHover) {
1266
1155
  focused.value = true;
1267
1156
  }
1268
1157
  });
1269
1158
  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);
1159
+ return openBlock(), createElementBlock(
1160
+ "div",
1161
+ mergeProps({ role: unref(role) }, {
1162
+ ref_key: "element",
1163
+ ref: element,
1164
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1165
+ }),
1166
+ [
1167
+ renderSlot(_ctx.$slots, "default")
1168
+ ],
1169
+ 16
1170
+ /* FULL_PROPS */
1171
+ );
1277
1172
  };
1278
1173
  }
1279
1174
  });
@@ -1283,21 +1178,7 @@ const __default__$6 = {
1283
1178
  };
1284
1179
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1285
1180
  ...__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
- },
1181
+ props: VvDropdownOptionProps,
1301
1182
  setup(__props) {
1302
1183
  const props = __props;
1303
1184
  const { modifiers } = toRefs(props);
@@ -1317,13 +1198,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1317
1198
  if (!props.disabled) {
1318
1199
  return props.selectHintLabel;
1319
1200
  }
1201
+ return "";
1320
1202
  });
1321
1203
  return (_ctx, _cache) => {
1322
1204
  return openBlock(), createBlock(_sfc_main$7, {
1323
1205
  class: normalizeClass(unref(bemCssClasses)),
1324
1206
  tabindex: _ctx.disabled ? -1 : 0,
1325
1207
  "aria-selected": _ctx.selected,
1326
- "aria-disabled": _ctx.disabled
1208
+ "aria-disabled": _ctx.disabled,
1209
+ "focus-on-hover": _ctx.focusOnHover
1327
1210
  }, {
1328
1211
  default: withCtx(() => [
1329
1212
  renderSlot(_ctx.$slots, "default"),
@@ -1332,12 +1215,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1332
1215
  title: unref(hintLabel)
1333
1216
  }, [
1334
1217
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
1335
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
1218
+ createTextVNode(
1219
+ toDisplayString(unref(hintLabel)),
1220
+ 1
1221
+ /* TEXT */
1222
+ )
1336
1223
  ])
1337
1224
  ], 8, _hoisted_1$4)
1338
1225
  ]),
1339
1226
  _: 3
1340
- }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
1227
+ /* FORWARDED */
1228
+ }, 8, ["class", "tabindex", "aria-selected", "aria-disabled", "focus-on-hover"]);
1341
1229
  };
1342
1230
  }
1343
1231
  });
@@ -1357,7 +1245,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1357
1245
  setup(__props) {
1358
1246
  const props = __props;
1359
1247
  return (_ctx, _cache) => {
1360
- return openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(props.label), 1);
1248
+ return openBlock(), createElementBlock(
1249
+ "li",
1250
+ _hoisted_1$3,
1251
+ toDisplayString(props.label),
1252
+ 1
1253
+ /* TEXT */
1254
+ );
1361
1255
  };
1362
1256
  }
1363
1257
  });
@@ -1376,32 +1270,36 @@ function deepEquals(a, b) {
1376
1270
  let i, length, key;
1377
1271
  if (arrA && arrB) {
1378
1272
  length = a.length;
1379
- if (length != b.length)
1273
+ if (length !== b.length)
1380
1274
  return false;
1381
- for (i = length; i-- !== 0; )
1275
+ for (i = length; i-- !== 0; ) {
1382
1276
  if (!deepEquals(a[i], b[i]))
1383
1277
  return false;
1278
+ }
1384
1279
  return true;
1385
1280
  }
1386
- if (arrA != arrB)
1281
+ if (arrA !== arrB)
1387
1282
  return false;
1388
- const dateA = a instanceof Date, dateB = b instanceof Date;
1389
- if (dateA != dateB)
1283
+ const dateA = a instanceof Date;
1284
+ const dateB = b instanceof Date;
1285
+ if (dateA !== dateB)
1390
1286
  return false;
1391
1287
  if (dateA && dateB)
1392
- return a.getTime() == b.getTime();
1393
- const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
1394
- if (regexpA != regexpB)
1288
+ return a.getTime() === b.getTime();
1289
+ const regexpA = a instanceof RegExp;
1290
+ const regexpB = b instanceof RegExp;
1291
+ if (regexpA !== regexpB)
1395
1292
  return false;
1396
1293
  if (regexpA && regexpB)
1397
- return a.toString() == b.toString();
1294
+ return a.toString() === b.toString();
1398
1295
  const keys = Object.keys(a);
1399
1296
  length = keys.length;
1400
1297
  if (length !== Object.keys(b).length)
1401
1298
  return false;
1402
- for (i = length; i-- !== 0; )
1299
+ for (i = length; i-- !== 0; ) {
1403
1300
  if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
1404
1301
  return false;
1302
+ }
1405
1303
  for (i = length; i-- !== 0; ) {
1406
1304
  key = keys[i];
1407
1305
  if (!deepEquals(a[key], b[key]))
@@ -1409,11 +1307,11 @@ function deepEquals(a, b) {
1409
1307
  }
1410
1308
  return true;
1411
1309
  }
1412
- return a !== a && b !== b;
1310
+ return Number.isNaN(a) && Number.isNaN(b);
1413
1311
  }
1414
1312
  function resolveFieldData(data, field) {
1415
1313
  if (data && Object.keys(data).length && field) {
1416
- if (field.indexOf(".") === -1) {
1314
+ if (!field.includes(".")) {
1417
1315
  return data[field];
1418
1316
  } else {
1419
1317
  const fields = field.split(".");
@@ -1632,7 +1530,16 @@ const VvSelectProps = {
1632
1530
  */
1633
1531
  placeholder: String
1634
1532
  };
1635
- const VvSelectEmits = ["update:modelValue", "focus", "blur"];
1533
+ function useVvSelectProps() {
1534
+ return {
1535
+ ...VvSelectProps,
1536
+ options: {
1537
+ ...VvSelectProps.options,
1538
+ type: Array,
1539
+ default: () => []
1540
+ }
1541
+ };
1542
+ }
1636
1543
  function useDefaults(componentName, propsDefinition, props) {
1637
1544
  const volver = useVolver();
1638
1545
  const volverComponentDefaults = computed(() => {
@@ -1696,30 +1603,30 @@ function useComponentFocus(inputTemplateRef, emit) {
1696
1603
  };
1697
1604
  }
1698
1605
  function useComponentIcon(icon, iconPosition) {
1606
+ const hasIcon = computed(() => {
1607
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
1608
+ return { name: icon == null ? void 0 : icon.value };
1609
+ }
1610
+ return icon == null ? void 0 : icon.value;
1611
+ });
1699
1612
  const hasIconBefore = computed(
1700
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
1613
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1701
1614
  );
1702
1615
  const hasIconAfter = computed(
1703
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
1616
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1704
1617
  );
1705
1618
  const hasIconLeft = computed(
1706
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
1619
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1707
1620
  );
1708
1621
  const hasIconRight = computed(
1709
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
1622
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1710
1623
  );
1711
1624
  const hasIconTop = computed(
1712
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
1625
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1713
1626
  );
1714
1627
  const hasIconBottom = computed(
1715
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
1628
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1716
1629
  );
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
1630
  return {
1724
1631
  hasIcon,
1725
1632
  hasIconLeft,
@@ -1733,26 +1640,33 @@ function useComponentIcon(icon, iconPosition) {
1733
1640
  function useOptions(props) {
1734
1641
  const { options, labelKey, valueKey, disabledKey } = toRefs(props);
1735
1642
  const getOptionLabel = (option) => {
1736
- if (typeof option !== "object" && option !== null)
1643
+ if (typeof option === "string") {
1737
1644
  return option;
1645
+ }
1738
1646
  return String(
1739
1647
  typeof labelKey.value === "function" ? labelKey.value(option) : get(option, labelKey.value)
1740
1648
  );
1741
1649
  };
1742
1650
  const getOptionValue = (option) => {
1743
- if (typeof option !== "object" && option !== null)
1651
+ if (typeof option === "string") {
1744
1652
  return option;
1653
+ }
1745
1654
  return typeof valueKey.value === "function" ? valueKey.value(option) : get(option, valueKey.value);
1746
1655
  };
1747
1656
  const isOptionDisabled = (option) => {
1748
- if (typeof option !== "object" && option !== null)
1657
+ if (typeof option === "string") {
1749
1658
  return false;
1659
+ }
1750
1660
  return typeof disabledKey.value === "function" ? disabledKey.value(option) : get(option, disabledKey.value);
1751
1661
  };
1752
1662
  const getOptionGrouped = (option) => {
1753
- if (typeof option !== "object" && option !== null)
1663
+ if (typeof option == "string") {
1754
1664
  return [];
1755
- return option.options || [];
1665
+ }
1666
+ if (typeof option === "object" && option && "options" in option) {
1667
+ return option.options;
1668
+ }
1669
+ return [];
1756
1670
  };
1757
1671
  return {
1758
1672
  options,
@@ -1783,14 +1697,16 @@ const __default__$4 = {
1783
1697
  };
1784
1698
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1785
1699
  ...__default__$4,
1786
- props: VvSelectProps,
1787
- emits: VvSelectEmits,
1788
- setup(__props, { emit }) {
1700
+ props: useVvSelectProps(),
1701
+ emits: ["update:modelValue", "focus", "blur"],
1702
+ setup(__props, { emit: __emit }) {
1789
1703
  const props = __props;
1704
+ const emit = __emit;
1790
1705
  const slots = useSlots();
1706
+ const VvSelectProps2 = useVvSelectProps();
1791
1707
  const propsDefaults = useDefaults(
1792
1708
  "VvSelect",
1793
- VvSelectProps,
1709
+ VvSelectProps2,
1794
1710
  props
1795
1711
  );
1796
1712
  const select = ref();
@@ -1822,10 +1738,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1822
1738
  focused.value = true;
1823
1739
  }
1824
1740
  });
1825
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
1826
- icon,
1827
- iconPosition
1828
- );
1741
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
1829
1742
  const isDirty = computed(() => !isEmpty(props.modelValue));
1830
1743
  const isDisabled = computed(() => props.disabled || props.readonly);
1831
1744
  const hasTabindex = computed(() => {
@@ -1844,28 +1757,28 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1844
1757
  "vv-select",
1845
1758
  modifiers,
1846
1759
  computed(() => ({
1847
- valid: valid.value,
1848
- invalid: invalid.value,
1849
- loading: loading.value,
1850
- disabled: disabled.value,
1851
- readonly: readonly.value,
1852
- "icon-before": hasIconBefore.value,
1853
- "icon-after": hasIconAfter.value,
1854
- dirty: isDirty.value,
1855
- focus: focused.value,
1856
- floating: floating.value,
1857
- multiple: multiple.value
1760
+ "valid": valid.value,
1761
+ "invalid": invalid.value,
1762
+ "loading": loading.value,
1763
+ "disabled": disabled.value,
1764
+ "readonly": readonly.value,
1765
+ "icon-before": hasIconBefore.value !== void 0,
1766
+ "icon-after": hasIconAfter.value !== void 0,
1767
+ "dirty": isDirty.value,
1768
+ "focus": focused.value,
1769
+ "floating": floating.value,
1770
+ "multiple": multiple.value
1858
1771
  }))
1859
1772
  );
1860
1773
  const hasAttrs = computed(() => {
1861
1774
  return {
1862
- name: props.name,
1863
- tabindex: hasTabindex.value,
1864
- disabled: isDisabled.value,
1865
- required: props.required,
1866
- size: props.size,
1867
- autocomplete: props.autocomplete,
1868
- multiple: props.multiple,
1775
+ "name": props.name,
1776
+ "tabindex": hasTabindex.value,
1777
+ "disabled": isDisabled.value,
1778
+ "required": props.required,
1779
+ "size": props.size,
1780
+ "autocomplete": props.autocomplete,
1781
+ "multiple": props.multiple,
1869
1782
  "aria-invalid": isInvalid.value,
1870
1783
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
1871
1784
  "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
@@ -1893,107 +1806,142 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1893
1806
  emit("update:modelValue", newValue);
1894
1807
  }
1895
1808
  });
1896
- const isGroup = (option) => {
1897
- if (typeof option === "string")
1809
+ function isGroup(option) {
1810
+ var _a;
1811
+ if (typeof option === "string") {
1898
1812
  return false;
1899
- return option && option.options && option.options.length > 0;
1900
- };
1813
+ }
1814
+ return (_a = option.options) == null ? void 0 : _a.length;
1815
+ }
1901
1816
  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)]
1953
- ]),
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)
1958
- ]),
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);
1817
+ return openBlock(), createElementBlock(
1818
+ "div",
1819
+ {
1820
+ class: normalizeClass(unref(bemCssClasses))
1821
+ },
1822
+ [
1823
+ _ctx.label ? (openBlock(), createElementBlock("label", {
1824
+ key: 0,
1825
+ for: unref(hasId)
1826
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
1827
+ createElementVNode("div", _hoisted_2$2, [
1828
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1829
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1830
+ ])) : createCommentVNode("v-if", true),
1831
+ createElementVNode("div", _hoisted_4$1, [
1832
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1833
+ _sfc_main$9,
1834
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1835
+ null,
1836
+ 16
1837
+ /* FULL_PROPS */
1838
+ )) : createCommentVNode("v-if", true),
1839
+ withDirectives(createElementVNode("select", mergeProps({
1840
+ id: unref(hasId),
1841
+ ref_key: "select",
1842
+ ref: select,
1843
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1844
+ }, unref(hasAttrs)), [
1845
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1846
+ key: 0,
1847
+ value: void 0,
1848
+ disabled: !_ctx.unselectable,
1849
+ hidden: !_ctx.unselectable
1850
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
1851
+ (openBlock(true), createElementBlock(
1852
+ Fragment,
1853
+ null,
1854
+ renderList(_ctx.options, (option, index) => {
1855
+ return openBlock(), createElementBlock(
1856
+ Fragment,
1857
+ null,
1858
+ [
1859
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
1860
+ key: index,
1861
+ disabled: unref(isOptionDisabled)(option),
1862
+ value: unref(getOptionValue)(option)
1863
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1864
+ key: `group-${index}`,
1865
+ disabled: unref(isOptionDisabled)(option),
1866
+ label: unref(getOptionLabel)(option)
1867
+ }, [
1868
+ (openBlock(true), createElementBlock(
1869
+ Fragment,
1870
+ null,
1871
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
1872
+ return openBlock(), createElementBlock("option", {
1873
+ key: `group-${index}-item-${i}`,
1874
+ disabled: unref(isOptionDisabled)(item),
1875
+ value: unref(getOptionValue)(item)
1876
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
1877
+ }),
1878
+ 128
1879
+ /* KEYED_FRAGMENT */
1880
+ ))
1881
+ ], 8, _hoisted_8$1))
1882
+ ],
1883
+ 64
1884
+ /* STABLE_FRAGMENT */
1885
+ );
1886
+ }),
1887
+ 256
1888
+ /* UNKEYED_FRAGMENT */
1889
+ ))
1890
+ ], 16, _hoisted_5$1), [
1891
+ [vModelSelect, unref(localModelValue)]
1892
+ ]),
1893
+ unref(hasIconAfter) ? (openBlock(), createBlock(
1894
+ _sfc_main$9,
1895
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
1896
+ null,
1897
+ 16
1898
+ /* FULL_PROPS */
1899
+ )) : createCommentVNode("v-if", true)
1900
+ ]),
1901
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1902
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1903
+ ])) : createCommentVNode("v-if", true)
1904
+ ]),
1905
+ createVNode(unref(HintSlot), {
1906
+ id: unref(hasHintId),
1907
+ class: "vv-select__hint"
1908
+ }, createSlots({
1909
+ _: 2
1910
+ /* DYNAMIC */
1911
+ }, [
1912
+ _ctx.$slots.hint ? {
1913
+ name: "hint",
1914
+ fn: withCtx(() => [
1915
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1916
+ ]),
1917
+ key: "0"
1918
+ } : void 0,
1919
+ _ctx.$slots.loading ? {
1920
+ name: "loading",
1921
+ fn: withCtx(() => [
1922
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1923
+ ]),
1924
+ key: "1"
1925
+ } : void 0,
1926
+ _ctx.$slots.valid ? {
1927
+ name: "valid",
1928
+ fn: withCtx(() => [
1929
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1930
+ ]),
1931
+ key: "2"
1932
+ } : void 0,
1933
+ _ctx.$slots.invalid ? {
1934
+ name: "invalid",
1935
+ fn: withCtx(() => [
1936
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1937
+ ]),
1938
+ key: "3"
1939
+ } : void 0
1940
+ ]), 1032, ["id"])
1941
+ ],
1942
+ 2
1943
+ /* CLASS */
1944
+ );
1997
1945
  };
1998
1946
  }
1999
1947
  });
@@ -2012,14 +1960,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2012
1960
  const { modifiers } = toRefs(props);
2013
1961
  const bemCssClasses = useModifiers("vv-badge", modifiers);
2014
1962
  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);
1963
+ return openBlock(), createElementBlock(
1964
+ "span",
1965
+ {
1966
+ class: normalizeClass(unref(bemCssClasses))
1967
+ },
1968
+ [
1969
+ renderSlot(_ctx.$slots, "default", {}, () => [
1970
+ createTextVNode(
1971
+ toDisplayString(_ctx.value),
1972
+ 1
1973
+ /* TEXT */
1974
+ )
1975
+ ])
1976
+ ],
1977
+ 2
1978
+ /* CLASS */
1979
+ );
2023
1980
  };
2024
1981
  }
2025
1982
  });
@@ -2032,8 +1989,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2032
1989
  ...__default__$2,
2033
1990
  props: VvActionProps,
2034
1991
  emits: VvActionEvents,
2035
- setup(__props, { expose: __expose, emit }) {
1992
+ setup(__props, { expose: __expose, emit: __emit }) {
2036
1993
  const props = __props;
1994
+ const emit = __emit;
1995
+ const instance = getCurrentInstance();
2037
1996
  const volver = useVolver();
2038
1997
  const element = ref(null);
2039
1998
  __expose({ $el: element });
@@ -2064,7 +2023,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2064
2023
  case props.href !== void 0:
2065
2024
  return ActionTag.a;
2066
2025
  default:
2067
- return ActionTag.button;
2026
+ return props.defaultTag;
2068
2027
  }
2069
2028
  });
2070
2029
  const hasProps = computed(() => {
@@ -2089,30 +2048,44 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2089
2048
  to: props.to,
2090
2049
  target: props.target
2091
2050
  };
2092
- default:
2051
+ case ActionTag.button:
2093
2052
  return {
2094
2053
  ...toReturn,
2095
2054
  type: props.type,
2096
2055
  disabled: props.disabled
2097
2056
  };
2057
+ default:
2058
+ return toReturn;
2098
2059
  }
2099
2060
  });
2100
- const onClick = (e) => {
2061
+ function onClick(e) {
2062
+ var _a;
2101
2063
  if (props.disabled) {
2102
2064
  e.preventDefault();
2103
2065
  return;
2104
2066
  }
2067
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
2068
+ emit("click", e);
2069
+ return;
2070
+ }
2105
2071
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
2106
- emit("click", e);
2107
- };
2108
- const onMouseover = (e) => {
2072
+ }
2073
+ function onMouseover(e) {
2074
+ var _a;
2075
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
2076
+ emit("mouseover", e);
2077
+ return;
2078
+ }
2109
2079
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
2110
- emit("mouseover", e);
2111
- };
2112
- const onMouseleave = (e) => {
2080
+ }
2081
+ function onMouseleave(e) {
2082
+ var _a;
2083
+ if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
2084
+ emit("mouseleave", e);
2085
+ return;
2086
+ }
2113
2087
  dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
2114
- emit("mouseleave", e);
2115
- };
2088
+ }
2116
2089
  return (_ctx, _cache) => {
2117
2090
  return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
2118
2091
  ref_key: "element",
@@ -2129,23 +2102,28 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2129
2102
  }), {
2130
2103
  default: withCtx(() => [
2131
2104
  renderSlot(_ctx.$slots, "default", {}, () => [
2132
- createTextVNode(toDisplayString(_ctx.label), 1)
2105
+ createTextVNode(
2106
+ toDisplayString(_ctx.label),
2107
+ 1
2108
+ /* TEXT */
2109
+ )
2133
2110
  ])
2134
2111
  ]),
2135
2112
  _: 3
2113
+ /* FORWARDED */
2136
2114
  }, 16, ["class"]);
2137
2115
  };
2138
2116
  }
2139
2117
  });
2140
2118
  function useInjectedGroupState(groupKey) {
2141
2119
  const group = inject(groupKey, void 0);
2142
- const isInGroup = computed(() => !isEmpty(group));
2120
+ const isInGroup = computed(() => group !== void 0);
2143
2121
  function getGroupOrLocalRef(propName, props, emit) {
2144
- if (group == null ? void 0 : group.value) {
2145
- const groupPropValue = unref(group.value)[propName];
2122
+ const groupPropValue = group == null ? void 0 : group[propName];
2123
+ if (groupPropValue) {
2146
2124
  return computed({
2147
2125
  get() {
2148
- return groupPropValue == null ? void 0 : groupPropValue.value;
2126
+ return groupPropValue.value;
2149
2127
  },
2150
2128
  set(value) {
2151
2129
  groupPropValue.value = value;
@@ -2158,8 +2136,9 @@ function useInjectedGroupState(groupKey) {
2158
2136
  return propRef.value;
2159
2137
  },
2160
2138
  set(value) {
2161
- if (emit)
2139
+ if (emit) {
2162
2140
  emit(`update:${propName}`, value);
2141
+ }
2163
2142
  }
2164
2143
  });
2165
2144
  }
@@ -2176,10 +2155,7 @@ const VvButtonProps = {
2176
2155
  ...ModifiersProps,
2177
2156
  ...UnselectableProps,
2178
2157
  ...LoadingProps,
2179
- /**
2180
- * Button icon
2181
- */
2182
- icon: [String, Object],
2158
+ ...IconProps,
2183
2159
  /**
2184
2160
  * Button icon position
2185
2161
  */
@@ -2226,14 +2202,11 @@ function useGroupProps(props, emit) {
2226
2202
  const { id, iconPosition, icon, label, pressed } = toRefs(props);
2227
2203
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
2228
2204
  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);
2205
+ const unselectable = getGroupOrLocalRef("unselectable", props);
2206
+ const multiple = computed(() => (group == null ? void 0 : group.multiple.value) ?? false);
2234
2207
  const modifiers = computed(() => {
2235
2208
  let localModifiers = props.modifiers;
2236
- let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
2209
+ let groupModifiers = group == null ? void 0 : group.modifiers.value;
2237
2210
  const toReturn = /* @__PURE__ */ new Set();
2238
2211
  if (localModifiers) {
2239
2212
  if (!Array.isArray(localModifiers)) {
@@ -2250,10 +2223,7 @@ function useGroupProps(props, emit) {
2250
2223
  return Array.from(toReturn);
2251
2224
  });
2252
2225
  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
- }
2226
+ () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
2257
2227
  );
2258
2228
  return {
2259
2229
  // group props
@@ -2282,14 +2252,16 @@ const _hoisted_2$1 = {
2282
2252
  class: "vv-button__label"
2283
2253
  };
2284
2254
  const __default__$1 = {
2285
- name: "VvButton"
2255
+ name: "VvButton",
2256
+ inheritAttrs: false
2286
2257
  };
2287
2258
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2288
2259
  ...__default__$1,
2289
2260
  props: VvButtonProps,
2290
2261
  emits: VvButtonEvents,
2291
- setup(__props, { expose: __expose, emit }) {
2262
+ setup(__props, { expose: __expose, emit: __emit }) {
2292
2263
  const props = __props;
2264
+ const emit = __emit;
2293
2265
  const attrs = useAttrs();
2294
2266
  const slots = useSlots();
2295
2267
  const {
@@ -2324,10 +2296,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2324
2296
  "vv-button",
2325
2297
  modifiers,
2326
2298
  computed(() => ({
2327
- reverse: [Side.right, Side.bottom].includes(
2299
+ "reverse": [Side.right, Side.bottom].includes(
2328
2300
  iconPosition.value
2329
2301
  ),
2330
- column: [Side.top, Side.bottom].includes(
2302
+ "column": [Side.top, Side.bottom].includes(
2331
2303
  iconPosition.value
2332
2304
  ),
2333
2305
  "icon-only": Boolean(
@@ -2335,13 +2307,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2335
2307
  )
2336
2308
  }))
2337
2309
  );
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
- );
2310
+ const { hasIcon } = useComponentIcon(icon);
2341
2311
  const toggleValue = computed(() => {
2342
2312
  return props.value !== void 0 ? props.value : name.value;
2343
2313
  });
2344
- const onClick = () => {
2314
+ const hasListeners = computed(() => {
2315
+ if (!toggle.value) {
2316
+ return void 0;
2317
+ }
2318
+ return {
2319
+ onClick
2320
+ };
2321
+ });
2322
+ function onClick() {
2345
2323
  if (toggle.value) {
2346
2324
  if (Array.isArray(modelValue.value)) {
2347
2325
  if (contains(toggleValue.value, modelValue.value)) {
@@ -2361,9 +2339,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2361
2339
  }
2362
2340
  modelValue.value = toggleValue.value;
2363
2341
  }
2364
- };
2342
+ }
2365
2343
  return (_ctx, _cache) => {
2366
2344
  return openBlock(), createBlock(_sfc_main$2, mergeProps({
2345
+ ...unref(attrs),
2346
+ ...unref(hasListeners),
2367
2347
  disabled: unref(disabled),
2368
2348
  pressed: unref(pressed),
2369
2349
  active: _ctx.active,
@@ -2377,8 +2357,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2377
2357
  id: unref(hasId),
2378
2358
  ref_key: "element",
2379
2359
  ref: element,
2380
- class: unref(bemCssClasses),
2381
- onClick
2360
+ class: unref(bemCssClasses)
2382
2361
  }), {
2383
2362
  default: withCtx(() => [
2384
2363
  renderSlot(_ctx.$slots, "default", {}, () => [
@@ -2387,28 +2366,204 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2387
2366
  key: 0,
2388
2367
  class: "vv-button__loading-icon",
2389
2368
  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))
2369
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
2370
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
2371
+ "span",
2372
+ _hoisted_1$1,
2373
+ toDisplayString(_ctx.loadingLabel),
2374
+ 1
2375
+ /* TEXT */
2376
+ )) : createCommentVNode("v-if", true)
2377
+ ]) : (openBlock(), createElementBlock(
2378
+ Fragment,
2379
+ { key: 1 },
2380
+ [
2381
+ renderSlot(_ctx.$slots, "before"),
2382
+ unref(hasIcon) ? (openBlock(), createBlock(
2383
+ _sfc_main$9,
2384
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2385
+ null,
2386
+ 16
2387
+ /* FULL_PROPS */
2388
+ )) : createCommentVNode("v-if", true),
2389
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2390
+ renderSlot(_ctx.$slots, "label", {}, () => [
2391
+ createTextVNode(
2392
+ toDisplayString(unref(label)),
2393
+ 1
2394
+ /* TEXT */
2395
+ )
2396
+ ])
2397
+ ])) : createCommentVNode("v-if", true),
2398
+ renderSlot(_ctx.$slots, "after")
2399
+ ],
2400
+ 64
2401
+ /* STABLE_FRAGMENT */
2402
+ ))
2405
2403
  ])
2406
2404
  ]),
2407
2405
  _: 3
2406
+ /* FORWARDED */
2408
2407
  }, 16, ["id", "class"]);
2409
2408
  };
2410
2409
  }
2411
2410
  });
2411
+ const VvComboboxProps = {
2412
+ ...IdNameProps,
2413
+ ...TabindexProps,
2414
+ ...ValidProps,
2415
+ ...InvalidProps,
2416
+ ...HintProps,
2417
+ ...LoadingProps,
2418
+ ...DisabledProps,
2419
+ ...ReadonlyProps,
2420
+ ...ModifiersProps,
2421
+ ...OptionsProps,
2422
+ ...IconProps,
2423
+ ...FloatingLabelProps,
2424
+ ...UnselectableProps,
2425
+ ...DropdownProps,
2426
+ ...LabelProps,
2427
+ /**
2428
+ * Dropdown show / hide transition name
2429
+ */
2430
+ transitionName: {
2431
+ type: String,
2432
+ default: "vv-dropdown--mobile-fade-block"
2433
+ },
2434
+ /**
2435
+ * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
2436
+ */
2437
+ modelValue: {
2438
+ type: [String, Number, Boolean, Object, Array],
2439
+ default: void 0
2440
+ },
2441
+ /**
2442
+ * Label for no search results
2443
+ */
2444
+ noResultsLabel: { type: String, default: "No results" },
2445
+ /**
2446
+ * Label for no options available
2447
+ */
2448
+ noOptionsLabel: { type: String, default: "No options available" },
2449
+ /**
2450
+ * Label for selected option hint
2451
+ */
2452
+ selectedHintLabel: { type: String, default: "Selected" },
2453
+ /**
2454
+ * Label for deselect action button
2455
+ */
2456
+ deselectActionLabel: { type: String, default: "Deselect" },
2457
+ /**
2458
+ * Label for select option hint
2459
+ */
2460
+ selectHintLabel: { type: String, default: "Press enter to select" },
2461
+ /**
2462
+ * Label for deselected option hint
2463
+ */
2464
+ deselectHintLabel: { type: String, default: "Press enter to remove" },
2465
+ /**
2466
+ * Label close button
2467
+ */
2468
+ closeLabel: { type: String, default: "Close" },
2469
+ /**
2470
+ * Select input placeholder
2471
+ */
2472
+ placeholder: String,
2473
+ /**
2474
+ * Use input text to search on options
2475
+ */
2476
+ searchable: Boolean,
2477
+ /**
2478
+ * Search function to filter options
2479
+ */
2480
+ searchFunction: {
2481
+ type: Function,
2482
+ default: void 0
2483
+ },
2484
+ /**
2485
+ * On searchable select is the input search placeholder
2486
+ */
2487
+ searchPlaceholder: {
2488
+ type: String,
2489
+ default: "Search..."
2490
+ },
2491
+ /**
2492
+ * The input search debounce time in ms
2493
+ */
2494
+ debounceSearch: {
2495
+ type: [Number, String],
2496
+ default: 0
2497
+ },
2498
+ /**
2499
+ * Manage modelValue as string[] or object[]
2500
+ */
2501
+ multiple: Boolean,
2502
+ /**
2503
+ * The max number of selected values
2504
+ */
2505
+ maxValues: [Number, String],
2506
+ /**
2507
+ * The select label separator visible to the user
2508
+ */
2509
+ separator: { type: String, default: ", " },
2510
+ /**
2511
+ * Show native select
2512
+ */
2513
+ native: Boolean,
2514
+ /**
2515
+ * Show badges
2516
+ */
2517
+ badges: Boolean,
2518
+ /**
2519
+ * Badge modifiers
2520
+ */
2521
+ badgeModifiers: {
2522
+ type: [String, Array],
2523
+ default: "action sm"
2524
+ },
2525
+ /**
2526
+ * Set dropdown width to the same as the trigger
2527
+ */
2528
+ triggerWidth: {
2529
+ ...DropdownProps.triggerWidth,
2530
+ default: true
2531
+ },
2532
+ /**
2533
+ * Dropdown modifiers
2534
+ */
2535
+ dropdownModifiers: {
2536
+ type: [String, Array],
2537
+ default: "mobile"
2538
+ },
2539
+ /**
2540
+ * Open dropdown on focus
2541
+ */
2542
+ autoOpen: {
2543
+ type: Boolean,
2544
+ default: false
2545
+ },
2546
+ /**
2547
+ * Keep open dropdown on single select
2548
+ */
2549
+ keepOpen: {
2550
+ type: Boolean,
2551
+ default: false
2552
+ }
2553
+ };
2554
+ function useVvComboboxProps() {
2555
+ return {
2556
+ ...VvComboboxProps,
2557
+ options: {
2558
+ ...VvComboboxProps.options,
2559
+ type: Array
2560
+ },
2561
+ searchFunction: {
2562
+ ...VvComboboxProps.searchFunction,
2563
+ type: Function
2564
+ }
2565
+ };
2566
+ }
2412
2567
  const _hoisted_1 = ["id"];
2413
2568
  const _hoisted_2 = ["id", "for"];
2414
2569
  const _hoisted_3 = ["id", "aria-controls", "placeholder"];
@@ -2417,7 +2572,7 @@ const _hoisted_4 = {
2417
2572
  class: "vv-select__input-before"
2418
2573
  };
2419
2574
  const _hoisted_5 = { class: "vv-select__inner" };
2420
- const _hoisted_6 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
2575
+ const _hoisted_6 = ["aria-controls", "aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
2421
2576
  const _hoisted_7 = {
2422
2577
  key: 0,
2423
2578
  class: "vv-select__value"
@@ -2438,22 +2593,25 @@ const __default__ = {
2438
2593
  };
2439
2594
  const _sfc_main = /* @__PURE__ */ defineComponent({
2440
2595
  ...__default__,
2441
- props: VvComboboxProps,
2442
- emits: VvComboboxEvents,
2443
- setup(__props, { emit }) {
2596
+ props: useVvComboboxProps(),
2597
+ emits: ["update:modelValue", "update:search", "change:search", "focus", "blur"],
2598
+ setup(__props, { emit: __emit }) {
2444
2599
  const props = __props;
2600
+ const emit = __emit;
2445
2601
  const slots = useSlots();
2602
+ const VvComboboxProps2 = useVvComboboxProps();
2446
2603
  const propsDefaults = useDefaults(
2447
2604
  "VvCombobox",
2448
- VvComboboxProps,
2605
+ VvComboboxProps2,
2449
2606
  props
2450
2607
  );
2451
- const isGroup = (option) => {
2608
+ function isGroup(option) {
2609
+ var _a;
2452
2610
  if (typeof option === "string") {
2453
2611
  return false;
2454
2612
  }
2455
- return option.options && option.options.length > 0;
2456
- };
2613
+ return (_a = option.options) == null ? void 0 : _a.length;
2614
+ }
2457
2615
  const {
2458
2616
  HintSlot,
2459
2617
  hasHintLabelOrSlot,
@@ -2487,27 +2645,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2487
2645
  searchText,
2488
2646
  computed(() => Number(props.debounceSearch))
2489
2647
  );
2490
- watch(
2491
- debouncedSearchText,
2492
- () => emit("change:search", debouncedSearchText.value)
2493
- );
2648
+ watch(debouncedSearchText, () => {
2649
+ emit("update:search", debouncedSearchText.value);
2650
+ emit("change:search", debouncedSearchText.value);
2651
+ });
2494
2652
  const expanded = ref(false);
2495
- const toggleExpanded = () => {
2653
+ function toggleExpanded() {
2496
2654
  if (props.disabled || props.readonly)
2497
2655
  return;
2498
2656
  expanded.value = !expanded.value;
2499
- };
2500
- const expand = () => {
2657
+ }
2658
+ function expand() {
2501
2659
  if (props.disabled || props.readonly || expanded.value)
2502
2660
  return;
2503
2661
  expanded.value = true;
2504
- };
2505
- const collapse = () => {
2662
+ }
2663
+ function collapse() {
2506
2664
  if (props.disabled || props.readonly || !expanded.value)
2507
2665
  return;
2508
2666
  expanded.value = false;
2509
- };
2510
- const onAfterExpand = () => {
2667
+ }
2668
+ function onAfterExpand() {
2511
2669
  if (propsDefaults.value.searchable) {
2512
2670
  if (inputSearchEl.value) {
2513
2671
  inputSearchEl.value.focus({
@@ -2515,12 +2673,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2515
2673
  });
2516
2674
  }
2517
2675
  }
2518
- };
2519
- const onAfterCollapse = () => {
2676
+ }
2677
+ function onAfterCollapse() {
2520
2678
  if (propsDefaults.value.searchable) {
2521
2679
  searchText.value = "";
2522
2680
  }
2523
- };
2681
+ }
2524
2682
  const {
2525
2683
  id,
2526
2684
  icon,
@@ -2541,10 +2699,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2541
2699
  const localLoading = ref(false);
2542
2700
  const isLoading = computed(() => localLoading.value || loading.value);
2543
2701
  const dropdownEl = ref();
2544
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
2545
- icon,
2546
- iconPosition
2547
- );
2702
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
2548
2703
  const isDirty = computed(() => !isEmpty(props.modelValue));
2549
2704
  const hasTabindex = computed(() => {
2550
2705
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -2553,17 +2708,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2553
2708
  "vv-select",
2554
2709
  modifiers,
2555
2710
  computed(() => ({
2556
- disabled: disabled.value,
2557
- loading: isLoading.value,
2558
- readonly: readonly.value,
2559
- "icon-before": Boolean(hasIconBefore.value),
2560
- "icon-after": Boolean(hasIconAfter.value),
2561
- valid: valid.value,
2562
- invalid: invalid.value,
2563
- dirty: isDirty.value,
2564
- focus: focused.value,
2565
- floating: floating.value,
2566
- badges: props.badges
2711
+ "disabled": disabled.value,
2712
+ "loading": isLoading.value,
2713
+ "readonly": readonly.value,
2714
+ "icon-before": hasIconBefore.value !== void 0,
2715
+ "icon-after": hasIconAfter.value !== void 0,
2716
+ "valid": valid.value,
2717
+ "invalid": invalid.value,
2718
+ "dirty": isDirty.value,
2719
+ "focus": focused.value || focusedWithin.value || expanded.value,
2720
+ "floating": floating.value,
2721
+ "badges": props.badges
2567
2722
  }))
2568
2723
  );
2569
2724
  const {
@@ -2612,10 +2767,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2612
2767
  const hasValue = computed(() => {
2613
2768
  return selectedOptions.value.map((option) => getOptionLabel(option)).join(props.separator);
2614
2769
  });
2615
- const onClickInput = () => {
2770
+ function onClickInput() {
2616
2771
  props.autoOpen ? expand() : toggleExpanded();
2617
- };
2618
- const onInput = (option) => {
2772
+ }
2773
+ function onInput(option) {
2619
2774
  var _a;
2620
2775
  if (props.disabled || props.readonly) {
2621
2776
  return;
@@ -2649,7 +2804,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2649
2804
  }
2650
2805
  }
2651
2806
  emit("update:modelValue", toReturn);
2652
- };
2807
+ }
2653
2808
  const selectProps = computed(() => ({
2654
2809
  id: hasId.value,
2655
2810
  name: props.name,
@@ -2720,208 +2875,307 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2720
2875
  key: 0,
2721
2876
  id: unref(hasLabelId),
2722
2877
  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)
2878
+ }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
2879
+ createElementVNode(
2880
+ "div",
2881
+ {
2882
+ ref_key: "wrapperEl",
2883
+ ref: wrapperEl,
2884
+ class: "vv-select__wrapper"
2885
+ },
2886
+ [
2887
+ createVNode(_sfc_main$8, mergeProps({
2888
+ ref_key: "dropdownEl",
2889
+ ref: dropdownEl,
2890
+ modelValue: unref(expanded),
2891
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2892
+ }, unref(dropdownProps), {
2893
+ role: unref(DropdownRole).listbox,
2894
+ onAfterExpand,
2895
+ onAfterCollapse
2896
+ }), createSlots({
2897
+ default: withCtx(({ aria }) => [
2898
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2899
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2900
+ ])) : createCommentVNode("v-if", true),
2901
+ createElementVNode("div", _hoisted_5, [
2902
+ unref(hasIconBefore) ? (openBlock(), createBlock(
2903
+ _sfc_main$9,
2904
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
2905
+ null,
2906
+ 16
2907
+ /* FULL_PROPS */
2908
+ )) : createCommentVNode("v-if", true),
2909
+ createElementVNode("div", mergeProps({
2910
+ ref_key: "inputEl",
2911
+ ref: inputEl
2912
+ }, aria, {
2913
+ class: "vv-select__input",
2914
+ role: "combobox",
2915
+ "aria-controls": unref(hasDropdownId),
2916
+ "aria-expanded": unref(expanded),
2917
+ "aria-labelledby": unref(hasLabelId),
2918
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2919
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2920
+ tabindex: unref(hasTabindex),
2921
+ onClickPassive: onClickInput
2922
+ }), [
2923
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2924
+ unref(hasValue) ? (openBlock(), createElementBlock(
2925
+ Fragment,
2926
+ { key: 0 },
2927
+ [
2928
+ !_ctx.badges ? (openBlock(), createElementBlock(
2929
+ "div",
2930
+ _hoisted_7,
2931
+ toDisplayString(unref(hasValue)),
2932
+ 1
2933
+ /* TEXT */
2934
+ )) : (openBlock(true), createElementBlock(
2935
+ Fragment,
2936
+ { key: 1 },
2937
+ renderList(unref(selectedOptions), (option, index) => {
2938
+ return openBlock(), createBlock(_sfc_main$3, {
2939
+ key: index,
2940
+ modifiers: _ctx.badgeModifiers,
2941
+ class: "vv-select__badge"
2942
+ }, {
2943
+ default: withCtx(() => [
2944
+ createTextVNode(
2945
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
2946
+ 1
2947
+ /* TEXT */
2948
+ ),
2949
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2950
+ key: 0,
2951
+ "aria-label": unref(propsDefaults).deselectActionLabel,
2952
+ type: "button",
2953
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
2954
+ }, [
2955
+ createVNode(_sfc_main$9, { name: "close" })
2956
+ ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
2957
+ ]),
2958
+ _: 2
2959
+ /* DYNAMIC */
2960
+ }, 1032, ["modifiers"]);
2961
+ }),
2962
+ 128
2963
+ /* KEYED_FRAGMENT */
2964
+ ))
2965
+ ],
2966
+ 64
2967
+ /* STABLE_FRAGMENT */
2968
+ )) : (openBlock(), createElementBlock(
2969
+ Fragment,
2970
+ { key: 1 },
2971
+ [
2972
+ createTextVNode(
2973
+ toDisplayString(_ctx.placeholder),
2974
+ 1
2975
+ /* TEXT */
2976
+ )
2977
+ ],
2978
+ 64
2979
+ /* STABLE_FRAGMENT */
2980
+ ))
2875
2981
  ])
2876
- ]),
2877
- _: 3
2878
- })) : createCommentVNode("", true)
2879
- ];
2880
- }),
2881
- after: withCtx(() => [
2882
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
2982
+ ], 16, _hoisted_6),
2983
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2984
+ _sfc_main$9,
2985
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2986
+ null,
2987
+ 16
2988
+ /* FULL_PROPS */
2989
+ )) : createCommentVNode("v-if", true)
2990
+ ]),
2991
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2992
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2993
+ ])) : createCommentVNode("v-if", true)
2994
+ ]),
2995
+ items: withCtx(() => {
2883
2996
  var _a;
2884
2997
  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)
2998
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
2999
+ Fragment,
3000
+ { key: 0 },
3001
+ renderList(unref(filteredOptions), (option, index) => {
3002
+ return openBlock(), createElementBlock(
3003
+ Fragment,
3004
+ { key: index },
3005
+ [
3006
+ isGroup(option) ? (openBlock(), createElementBlock(
3007
+ Fragment,
3008
+ { key: 0 },
3009
+ [
3010
+ createVNode(_sfc_main$5, {
3011
+ label: unref(getOptionLabel)(option)
3012
+ }, null, 8, ["label"]),
3013
+ (openBlock(true), createElementBlock(
3014
+ Fragment,
3015
+ null,
3016
+ renderList(unref(getOptionGrouped)(
3017
+ option
3018
+ ), (item, i) => {
3019
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({ ref_for: true }, {
3020
+ selected: isOptionSelected(item),
3021
+ disabled: unref(isOptionDisabled)(item),
3022
+ unselectable: _ctx.unselectable,
3023
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3024
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3025
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3026
+ }, {
3027
+ key: i,
3028
+ class: "vv-dropdown-option",
3029
+ "focus-on-hover": "",
3030
+ onClickPassive: ($event) => onInput(item)
3031
+ }), {
3032
+ default: withCtx(() => [
3033
+ renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3034
+ option,
3035
+ selectedOptions: unref(selectedOptions),
3036
+ selected: isOptionSelected(item),
3037
+ disabled: unref(isOptionDisabled)(item)
3038
+ }), () => [
3039
+ createTextVNode(
3040
+ toDisplayString(unref(getOptionLabel)(item)),
3041
+ 1
3042
+ /* TEXT */
3043
+ )
3044
+ ])
3045
+ ]),
3046
+ _: 2
3047
+ /* DYNAMIC */
3048
+ }, 1040, ["onClickPassive"]);
3049
+ }),
3050
+ 128
3051
+ /* KEYED_FRAGMENT */
3052
+ ))
3053
+ ],
3054
+ 64
3055
+ /* STABLE_FRAGMENT */
3056
+ )) : (openBlock(), createBlock(_sfc_main$6, mergeProps({
3057
+ key: 1,
3058
+ ref_for: true
3059
+ }, {
3060
+ selected: isOptionSelected(option),
3061
+ disabled: unref(isOptionDisabled)(option),
3062
+ unselectable: _ctx.unselectable,
3063
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3064
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3065
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3066
+ }, {
3067
+ class: "vv-dropdown-option",
3068
+ "focus-on-hover": "",
3069
+ onClickPassive: ($event) => onInput(option)
3070
+ }), {
3071
+ default: withCtx(() => [
3072
+ renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3073
+ option,
3074
+ selectedOptions: unref(selectedOptions),
3075
+ selected: isOptionSelected(option),
3076
+ disabled: unref(isOptionDisabled)(option)
3077
+ }), () => [
3078
+ createTextVNode(
3079
+ toDisplayString(unref(getOptionLabel)(option)),
3080
+ 1
3081
+ /* TEXT */
3082
+ )
3083
+ ])
3084
+ ]),
3085
+ _: 2
3086
+ /* DYNAMIC */
3087
+ }, 1040, ["onClickPassive"]))
3088
+ ],
3089
+ 64
3090
+ /* STABLE_FRAGMENT */
3091
+ );
3092
+ }),
3093
+ 128
3094
+ /* KEYED_FRAGMENT */
3095
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
3096
+ key: 1,
3097
+ modifiers: "inert"
3098
+ }, {
3099
+ default: withCtx(() => [
3100
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
3101
+ createTextVNode(
3102
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
3103
+ 1
3104
+ /* TEXT */
3105
+ )
3106
+ ])
3107
+ ]),
3108
+ _: 3
3109
+ /* FORWARDED */
3110
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
3111
+ key: 2,
3112
+ modifiers: "inert"
3113
+ }, {
3114
+ default: withCtx(() => [
3115
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
3116
+ createTextVNode(
3117
+ toDisplayString(unref(propsDefaults).noResultsLabel),
3118
+ 1
3119
+ /* TEXT */
3120
+ )
3121
+ ])
3122
+ ]),
3123
+ _: 3
3124
+ /* FORWARDED */
3125
+ })) : createCommentVNode("v-if", true)
2891
3126
  ];
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)
3127
+ }),
3128
+ after: withCtx(() => [
3129
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3130
+ var _a;
3131
+ return [
3132
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
3133
+ key: 0,
3134
+ label: unref(propsDefaults).closeLabel,
3135
+ modifiers: "secondary",
3136
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3137
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3138
+ ];
3139
+ })
2916
3140
  ]),
2917
- key: "0"
2918
- } : void 0
2919
- ]), 1040, ["modelValue", "role"])
2920
- ], 512),
3141
+ _: 2
3142
+ /* DYNAMIC */
3143
+ }, [
3144
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
3145
+ name: "before",
3146
+ fn: withCtx(() => [
3147
+ renderSlot(_ctx.$slots, "dropdown::before"),
3148
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
3149
+ key: 0,
3150
+ id: unref(hasSearchId),
3151
+ ref_key: "inputSearchEl",
3152
+ ref: inputSearchEl,
3153
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3154
+ "aria-autocomplete": "list",
3155
+ "aria-controls": unref(hasDropdownId),
3156
+ autocomplete: "off",
3157
+ spellcheck: "false",
3158
+ type: "search",
3159
+ class: "vv-dropdown__search",
3160
+ placeholder: unref(propsDefaults).searchPlaceholder
3161
+ }, null, 8, _hoisted_3)), [
3162
+ [vModelText, unref(searchText)]
3163
+ ]) : createCommentVNode("v-if", true)
3164
+ ]),
3165
+ key: "0"
3166
+ } : void 0
3167
+ ]), 1040, ["modelValue", "role"])
3168
+ ],
3169
+ 512
3170
+ /* NEED_PATCH */
3171
+ ),
2921
3172
  createVNode(unref(HintSlot), {
2922
3173
  id: unref(hasHintId),
2923
3174
  class: "vv-select__hint"
2924
- }, createSlots({ _: 2 }, [
3175
+ }, createSlots({
3176
+ _: 2
3177
+ /* DYNAMIC */
3178
+ }, [
2925
3179
  _ctx.$slots.hint ? {
2926
3180
  name: "hint",
2927
3181
  fn: withCtx(() => [
@@ -2951,9 +3205,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2951
3205
  key: "3"
2952
3206
  } : void 0
2953
3207
  ]), 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));
3208
+ ], 10, _hoisted_1)) : (openBlock(), createBlock(
3209
+ _sfc_main$4,
3210
+ mergeProps({ key: 1 }, unref(selectProps), {
3211
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
3212
+ }),
3213
+ null,
3214
+ 16
3215
+ /* FULL_PROPS */
3216
+ ));
2957
3217
  };
2958
3218
  }
2959
3219
  });