@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.21

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 (258) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -3
  3. package/auto-imports.d.ts +6 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +23 -16
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
  10. package/dist/components/VvAccordion/index.d.ts +4 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
  14. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  15. package/dist/components/VvAction/VvAction.es.js +58 -13
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
  18. package/dist/components/VvAction/index.d.ts +25 -4
  19. package/dist/components/VvAlert/VvAlert.es.js +195 -152
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
  22. package/dist/components/VvAlert/index.d.ts +9 -5
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  27. package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
  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 +111 -36
  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 +73 -17
  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 +259 -49
  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 +187 -141
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
  46. package/dist/components/VvButton/index.d.ts +41 -14
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +84 -25
  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 +91 -22
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
  58. package/dist/components/VvCheckbox/index.d.ts +45 -12
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +136 -141
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
  77. package/dist/components/VvDropdown/index.d.ts +16 -11
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  81. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  83. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
  84. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  85. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  86. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  88. package/dist/components/VvIcon/index.d.ts +33 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
  92. package/dist/components/VvInputFile/index.d.ts +179 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +331 -293
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
  99. package/dist/components/VvInputText/index.d.ts +71 -29
  100. package/dist/components/VvNav/VvNav.es.js +151 -73
  101. package/dist/components/VvNav/VvNav.umd.js +1 -1
  102. package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
  103. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  104. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +436 -0
  107. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  108. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  109. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  110. package/dist/components/VvProgress/VvProgress.es.js +65 -14
  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 +89 -21
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
  117. package/dist/components/VvRadio/index.d.ts +44 -11
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +248 -226
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
  125. package/dist/components/VvSelect/index.d.ts +48 -14
  126. package/dist/components/VvTab/VvTab.es.js +256 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
  129. package/dist/components/VvTab/index.d.ts +13 -4
  130. package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
  137. package/dist/components/VvTooltip/index.d.ts +4 -1
  138. package/dist/components/common/HintSlot.d.ts +1 -1
  139. package/dist/components/index.d.ts +10 -0
  140. package/dist/components/index.es.js +2902 -1329
  141. package/dist/components/index.umd.js +1 -1
  142. package/dist/composables/alert/useAlert.d.ts +37 -4
  143. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  144. package/dist/composables/index.d.ts +1 -0
  145. package/dist/composables/index.es.js +88 -1
  146. package/dist/composables/index.umd.js +1 -1
  147. package/dist/composables/useBlurhash.d.ts +7 -0
  148. package/dist/composables/useComponentIcon.d.ts +9 -8
  149. package/dist/composables/useVolver.d.ts +1 -1
  150. package/dist/directives/index.d.ts +3 -5
  151. package/dist/directives/index.es.js +92 -31
  152. package/dist/directives/index.umd.js +1 -1
  153. package/dist/directives/v-tooltip.es.js +90 -26
  154. package/dist/directives/v-tooltip.umd.js +1 -1
  155. package/dist/icons.es.js +210 -210
  156. package/dist/icons.umd.js +1 -1
  157. package/dist/index.d.ts +3 -1
  158. package/dist/index.es.js +81 -16
  159. package/dist/index.umd.js +1 -1
  160. package/dist/props/index.d.ts +287 -73
  161. package/dist/resolvers/unplugin.d.ts +6 -1
  162. package/dist/resolvers/unplugin.es.js +78 -10
  163. package/dist/resolvers/unplugin.umd.js +1 -1
  164. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  165. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  166. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  167. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  168. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  169. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  170. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  171. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  172. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  173. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  174. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  175. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  176. package/dist/types/alert.d.ts +13 -0
  177. package/dist/types/blurhash.d.ts +12 -0
  178. package/dist/types/floating-ui.d.ts +6 -0
  179. package/dist/types/generic.d.ts +4 -0
  180. package/dist/types/group.d.ts +37 -0
  181. package/dist/types/index.d.ts +7 -0
  182. package/dist/types/input-file.d.ts +16 -0
  183. package/dist/types/nav.d.ts +18 -0
  184. package/dist/utils/ObjectUtilities.d.ts +0 -1
  185. package/dist/workers/blurhash.d.ts +1 -0
  186. package/package.json +97 -80
  187. package/src/Volver.ts +31 -20
  188. package/src/assets/icons/detailed.json +1 -1
  189. package/src/assets/icons/normal.json +1 -1
  190. package/src/assets/icons/simple.json +1 -1
  191. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  192. package/src/components/VvAction/VvAction.vue +5 -2
  193. package/src/components/VvAlert/index.ts +1 -3
  194. package/src/components/VvAlertGroup/index.ts +2 -1
  195. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  196. package/src/components/VvBreadcrumb/index.ts +2 -8
  197. package/src/components/VvButton/VvButton.vue +6 -6
  198. package/src/components/VvButton/index.ts +2 -4
  199. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  200. package/src/components/VvCombobox/index.ts +4 -0
  201. package/src/components/VvIcon/VvIcon.vue +2 -2
  202. package/src/components/VvIcon/index.ts +35 -48
  203. package/src/components/VvInputFile/VvInputFile.vue +365 -0
  204. package/src/components/VvInputFile/index.ts +116 -0
  205. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  206. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  207. package/src/components/VvInputText/VvInputText.vue +17 -18
  208. package/src/components/VvInputText/index.ts +7 -15
  209. package/src/components/VvNav/VvNav.vue +30 -50
  210. package/src/components/VvNav/VvNavItem.vue +18 -0
  211. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  212. package/src/components/VvNav/index.ts +2 -15
  213. package/src/components/VvSelect/VvSelect.vue +5 -8
  214. package/src/components/VvTab/VvTab.vue +63 -35
  215. package/src/components/VvTab/index.ts +10 -4
  216. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  217. package/src/components/index.ts +10 -0
  218. package/src/composables/index.ts +1 -0
  219. package/src/composables/useBlurhash.ts +76 -0
  220. package/src/composables/useComponentIcon.ts +15 -14
  221. package/src/composables/useUniqueId.ts +2 -2
  222. package/src/directives/index.ts +3 -6
  223. package/src/directives/v-tooltip.ts +19 -10
  224. package/src/index.ts +3 -1
  225. package/src/props/index.ts +115 -27
  226. package/src/resolvers/unplugin.ts +24 -14
  227. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  228. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  229. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  230. package/src/stories/Icon/Icon.settings.ts +3 -3
  231. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  232. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  233. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  234. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  235. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  236. package/src/stories/Nav/Nav.settings.ts +3 -4
  237. package/src/stories/Nav/Nav.test.ts +4 -15
  238. package/src/stories/Tab/Tab.settings.ts +9 -9
  239. package/src/stories/Tab/Tab.stories.ts +2 -2
  240. package/src/stories/Tab/Tab.test.ts +6 -14
  241. package/src/stories/argTypes.ts +1 -1
  242. package/src/types/blurhash.ts +21 -0
  243. package/src/types/generic.ts +6 -0
  244. package/src/types/index.ts +7 -0
  245. package/src/types/input-file.ts +18 -0
  246. package/src/types/nav.ts +20 -0
  247. package/src/utils/ObjectUtilities.ts +0 -11
  248. package/src/workers/blurhash.ts +9 -0
  249. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  250. package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
  251. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  252. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  253. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  254. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  255. package/src/types/generic.d.ts +0 -6
  256. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  257. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  258. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,7 +1,7 @@
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, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
- import { nanoid } from "nanoid";
4
+ import { uid } from "uid";
5
5
  import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
6
6
  import mitt from "mitt";
7
7
  import { get } from "ts-dot-prop";
@@ -97,6 +97,7 @@ const LinkProps = {
97
97
  */
98
98
  target: {
99
99
  type: String,
100
+ default: void 0,
100
101
  validator: (value) => Object.values(AnchorTarget).includes(value)
101
102
  },
102
103
  /**
@@ -111,27 +112,33 @@ const ValidProps = {
111
112
  /**
112
113
  * Valid status
113
114
  */
114
- valid: Boolean,
115
+ valid: { type: Boolean, default: false },
115
116
  /**
116
117
  * Valid label
117
118
  */
118
- validLabel: [String, Array]
119
+ validLabel: { type: [String, Array], default: void 0 }
119
120
  };
120
121
  const InvalidProps = {
121
122
  /**
122
123
  * Invalid status
123
124
  */
124
- invalid: Boolean,
125
+ invalid: {
126
+ type: Boolean,
127
+ default: false
128
+ },
125
129
  /**
126
130
  * Invalid label
127
131
  */
128
- invalidLabel: [String, Array]
132
+ invalidLabel: { type: [String, Array], default: void 0 }
129
133
  };
130
134
  const LoadingProps = {
131
135
  /**
132
136
  * Loading status
133
137
  */
134
- loading: Boolean,
138
+ loading: {
139
+ type: Boolean,
140
+ default: false
141
+ },
135
142
  /**
136
143
  * Loading label
137
144
  */
@@ -144,43 +151,73 @@ const DisabledProps = {
144
151
  /**
145
152
  * Whether the form control is disabled
146
153
  */
147
- disabled: Boolean
154
+ disabled: {
155
+ type: Boolean,
156
+ default: false
157
+ }
148
158
  };
149
159
  const SelectedProps = {
150
160
  /**
151
161
  * Whether the item is selected
152
162
  */
153
- selected: Boolean
163
+ selected: {
164
+ type: Boolean,
165
+ default: false
166
+ }
154
167
  };
155
168
  const ActiveProps = {
156
169
  /**
157
170
  * Whether the item is active
158
171
  */
159
- active: Boolean
172
+ active: {
173
+ type: Boolean,
174
+ default: false
175
+ }
176
+ };
177
+ const CurrentProps = {
178
+ /**
179
+ * Whether the item is current
180
+ */
181
+ current: {
182
+ type: Boolean,
183
+ default: false
184
+ }
160
185
  };
161
186
  const PressedProps = {
162
187
  /**
163
188
  * Whether the item is pressed
164
189
  */
165
- pressed: Boolean
190
+ pressed: {
191
+ type: Boolean,
192
+ default: false
193
+ }
166
194
  };
167
195
  const LabelProps = {
168
196
  /**
169
197
  * The item label
170
198
  */
171
- label: [String, Number]
199
+ label: {
200
+ type: [String, Number],
201
+ default: void 0
202
+ }
172
203
  };
173
204
  const ReadonlyProps = {
174
205
  /**
175
206
  * The value is not editable
176
207
  */
177
- readonly: Boolean
208
+ readonly: {
209
+ type: Boolean,
210
+ default: false
211
+ }
178
212
  };
179
213
  const ModifiersProps = {
180
214
  /**
181
215
  * Component BEM modifiers
182
216
  */
183
- modifiers: [String, Array]
217
+ modifiers: {
218
+ type: [String, Array],
219
+ default: void 0
220
+ }
184
221
  };
185
222
  const HintProps = {
186
223
  hintLabel: { type: String, default: "" }
@@ -211,7 +248,10 @@ const IconProps = {
211
248
  * VvIcon name or props
212
249
  * @see VVIcon
213
250
  */
214
- icon: { type: [String, Object] },
251
+ icon: {
252
+ type: [String, Object],
253
+ default: void 0
254
+ },
215
255
  /**
216
256
  * VvIcon position
217
257
  */
@@ -232,7 +272,10 @@ const FloatingLabelProps = {
232
272
  /**
233
273
  * If true the label will be floating
234
274
  */
235
- floating: Boolean
275
+ floating: {
276
+ type: Boolean,
277
+ default: false
278
+ }
236
279
  };
237
280
  const UnselectableProps = {
238
281
  /**
@@ -268,7 +311,8 @@ const DropdownProps = {
268
311
  * Dropdown show / hide transition name
269
312
  */
270
313
  transitionName: {
271
- type: String
314
+ type: String,
315
+ default: void 0
272
316
  },
273
317
  /**
274
318
  * Offset of the dropdown from the trigger
@@ -336,7 +380,8 @@ const DropdownProps = {
336
380
  * Set dropdown width to the same as the trigger
337
381
  */
338
382
  triggerWidth: {
339
- type: Boolean
383
+ type: Boolean,
384
+ default: false
340
385
  }
341
386
  };
342
387
  const IdNameProps = {
@@ -353,7 +398,10 @@ const AutofocusProps = {
353
398
  * Global attribute autofocus
354
399
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
355
400
  */
356
- autofocus: Boolean
401
+ autofocus: {
402
+ type: Boolean,
403
+ default: false
404
+ }
357
405
  };
358
406
  const AutocompleteProps = {
359
407
  /**
@@ -367,6 +415,7 @@ const ActionProps = {
367
415
  ...LabelProps,
368
416
  ...PressedProps,
369
417
  ...ActiveProps,
418
+ ...CurrentProps,
370
419
  ...LinkProps,
371
420
  /**
372
421
  * Button type
@@ -382,10 +431,21 @@ const ActionProps = {
382
431
  ariaLabel: {
383
432
  type: String,
384
433
  default: void 0
434
+ },
435
+ /**
436
+ * Default tag for the action
437
+ */
438
+ defaultTag: {
439
+ type: String,
440
+ default: ActionTag.button
385
441
  }
386
442
  };
387
443
  const VvComboboxEvents = [
388
444
  "update:modelValue",
445
+ "update:search",
446
+ /**
447
+ * @deprecated change:search should not be used, use update:search instead
448
+ */
389
449
  "change:search",
390
450
  "focus",
391
451
  "blur"
@@ -533,99 +593,9 @@ const VvComboboxProps = {
533
593
  default: false
534
594
  }
535
595
  };
536
- const VvIconProps = {
537
- /**
538
- * Color
539
- */
540
- color: String,
541
- /**
542
- * Width
543
- */
544
- width: {
545
- type: [String, Number]
546
- },
547
- /**
548
- * Height
549
- */
550
- height: {
551
- type: [String, Number]
552
- },
553
- /**
554
- * Icon name
555
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
556
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
557
- */
558
- name: {
559
- type: String,
560
- required: true
561
- },
562
- /**
563
- * By default 'vv'
564
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
565
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
566
- */
567
- provider: {
568
- type: String
569
- },
570
- /**
571
- * The name of icon set.
572
- * Icon default options prefix: simple | normal | detailed
573
- */
574
- prefix: {
575
- type: String,
576
- default: "normal"
577
- },
578
- /**
579
- * Url remote SVG icon
580
- */
581
- src: String,
582
- /**
583
- * Horizontal flip
584
- */
585
- horizontalFlip: Boolean,
586
- /**
587
- * Vertical flip
588
- */
589
- verticalFlip: Boolean,
590
- /**
591
- * String alternative to "horizontalFlip" and "verticalFlip".
592
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
593
- */
594
- flip: String,
595
- /**
596
- * Icon render mode
597
- * 'style' = 'bg' or 'mask', depending on icon content
598
- * 'bg' = span with style using `background`
599
- * 'mask' = span with style using `mask`
600
- * 'svg' = svg
601
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
602
- */
603
- mode: String,
604
- /**
605
- * Toggles inline or block mode
606
- * Example https://docs.iconify.design/icon-components/vue/inline.html
607
- */
608
- inline: Boolean,
609
- /**
610
- * rotates icon
611
- * Example https://docs.iconify.design/icon-components/vue/transform.html
612
- */
613
- rotate: [Number, String],
614
- /**
615
- * A callback that is called when icon data has been loaded
616
- */
617
- onLoad: Function,
618
- /**
619
- * SVG icon string
620
- */
621
- svg: String,
622
- /**
623
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
624
- * @values string | string[]
625
- */
626
- modifiers: {
627
- type: [String, Array]
628
- }
596
+ const VvIconPropsDefaults = {
597
+ prefix: "normal"
598
+ /* normal */
629
599
  };
630
600
  function useVolver() {
631
601
  return inject(INJECTION_KEY_VOLVER);
@@ -658,7 +628,24 @@ const __default__$9 = {
658
628
  };
659
629
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
660
630
  ...__default__$9,
661
- props: VvIconProps,
631
+ props: /* @__PURE__ */ mergeDefaults({
632
+ name: {},
633
+ color: {},
634
+ width: {},
635
+ height: {},
636
+ provider: {},
637
+ prefix: {},
638
+ src: {},
639
+ horizontalFlip: { type: Boolean },
640
+ verticalFlip: { type: Boolean },
641
+ flip: {},
642
+ mode: {},
643
+ inline: { type: Boolean },
644
+ rotate: {},
645
+ onLoad: { type: Function },
646
+ svg: {},
647
+ modifiers: {}
648
+ }, VvIconPropsDefaults),
662
649
  setup(__props) {
663
650
  const props = __props;
664
651
  const hasRotate = computed(() => {
@@ -745,7 +732,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
745
732
  color: _ctx.color,
746
733
  onLoad: _ctx.onLoad,
747
734
  icon: unref(icon)
748
- }), null, 16, ["class"])) : createCommentVNode("", true);
735
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
749
736
  };
750
737
  }
751
738
  });
@@ -776,7 +763,7 @@ const VvDropdownProps = {
776
763
  validator: (value) => Object.values(DropdownRole).includes(value)
777
764
  }
778
765
  };
779
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
766
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
780
767
  function useProvideDropdownTrigger({
781
768
  reference,
782
769
  id,
@@ -849,8 +836,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
849
836
  "leave",
850
837
  "leave-cancelled"
851
838
  ],
852
- setup(__props, { expose: __expose, emit }) {
839
+ setup(__props, { expose: __expose, emit: __emit }) {
853
840
  const props = __props;
841
+ const emit = __emit;
854
842
  const { id } = toRefs(props);
855
843
  const hasId = useUniqueId(id);
856
844
  const attrs = useAttrs();
@@ -1186,50 +1174,70 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1186
1174
  }
1187
1175
  };
1188
1176
  return (_ctx, _cache) => {
1189
- return openBlock(), createElementBlock(Fragment, null, [
1190
- createVNode(unref(VvDropdownTriggerProvider), null, {
1191
- default: withCtx(() => [
1192
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1193
- ]),
1194
- _: 3
1195
- }),
1196
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
1197
- default: withCtx(() => [
1198
- withDirectives(createElementVNode("div", {
1199
- ref_key: "floatingEl",
1200
- ref: floatingEl,
1201
- style: normalizeStyle(unref(dropdownPlacement)),
1202
- class: normalizeClass(unref(bemCssClasses))
1203
- }, [
1204
- props.arrow ? (openBlock(), createElementBlock("div", {
1205
- key: 0,
1206
- ref_key: "arrowEl",
1207
- ref: arrowEl,
1208
- style: normalizeStyle(unref(arrowPlacement)),
1209
- class: "vv-dropdown__arrow"
1210
- }, null, 4)) : createCommentVNode("", true),
1211
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1212
- createElementVNode("div", mergeProps(unref(attrs), {
1213
- id: unref(hasId),
1214
- ref_key: "listEl",
1215
- ref: listEl,
1216
- tabindex: !unref(expanded) ? -1 : void 0,
1217
- role: unref(role),
1218
- "aria-labelledby": unref(hasAriaLabelledby),
1219
- class: "vv-dropdown__list"
1220
- }), [
1221
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1222
- role: unref(itemRole)
1223
- })))
1224
- ], 16, _hoisted_1$5),
1225
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1226
- ], 6), [
1227
- [vShow, unref(expanded)]
1228
- ])
1229
- ]),
1230
- _: 3
1231
- }, 16, ["name"])
1232
- ], 64);
1177
+ return openBlock(), createElementBlock(
1178
+ Fragment,
1179
+ null,
1180
+ [
1181
+ createVNode(unref(VvDropdownTriggerProvider), null, {
1182
+ default: withCtx(() => [
1183
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1184
+ ]),
1185
+ _: 3
1186
+ /* FORWARDED */
1187
+ }),
1188
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
1189
+ default: withCtx(() => [
1190
+ withDirectives(createElementVNode(
1191
+ "div",
1192
+ {
1193
+ ref_key: "floatingEl",
1194
+ ref: floatingEl,
1195
+ style: normalizeStyle(unref(dropdownPlacement)),
1196
+ class: normalizeClass(unref(bemCssClasses))
1197
+ },
1198
+ [
1199
+ props.arrow ? (openBlock(), createElementBlock(
1200
+ "div",
1201
+ {
1202
+ key: 0,
1203
+ ref_key: "arrowEl",
1204
+ ref: arrowEl,
1205
+ style: normalizeStyle(unref(arrowPlacement)),
1206
+ class: "vv-dropdown__arrow"
1207
+ },
1208
+ null,
1209
+ 4
1210
+ /* STYLE */
1211
+ )) : createCommentVNode("v-if", true),
1212
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1213
+ createElementVNode("div", mergeProps(unref(attrs), {
1214
+ id: unref(hasId),
1215
+ ref_key: "listEl",
1216
+ ref: listEl,
1217
+ tabindex: !unref(expanded) ? -1 : void 0,
1218
+ role: unref(role),
1219
+ "aria-labelledby": unref(hasAriaLabelledby),
1220
+ class: "vv-dropdown__list"
1221
+ }), [
1222
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1223
+ role: unref(itemRole)
1224
+ })))
1225
+ ], 16, _hoisted_1$5),
1226
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1227
+ ],
1228
+ 6
1229
+ /* CLASS, STYLE */
1230
+ ), [
1231
+ [vShow, unref(expanded)]
1232
+ ])
1233
+ ]),
1234
+ _: 3
1235
+ /* FORWARDED */
1236
+ }, 16, ["name"])
1237
+ ],
1238
+ 64
1239
+ /* STABLE_FRAGMENT */
1240
+ );
1233
1241
  };
1234
1242
  }
1235
1243
  });
@@ -1260,13 +1268,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1260
1268
  }
1261
1269
  });
1262
1270
  return (_ctx, _cache) => {
1263
- return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
1264
- ref_key: "element",
1265
- ref: element,
1266
- class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1267
- }), [
1268
- renderSlot(_ctx.$slots, "default")
1269
- ], 16);
1271
+ return openBlock(), createElementBlock(
1272
+ "div",
1273
+ mergeProps({ role: unref(role) }, {
1274
+ ref_key: "element",
1275
+ ref: element,
1276
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1277
+ }),
1278
+ [
1279
+ renderSlot(_ctx.$slots, "default")
1280
+ ],
1281
+ 16
1282
+ /* FULL_PROPS */
1283
+ );
1270
1284
  };
1271
1285
  }
1272
1286
  });
@@ -1325,11 +1339,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1325
1339
  title: unref(hintLabel)
1326
1340
  }, [
1327
1341
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
1328
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
1342
+ createTextVNode(
1343
+ toDisplayString(unref(hintLabel)),
1344
+ 1
1345
+ /* TEXT */
1346
+ )
1329
1347
  ])
1330
1348
  ], 8, _hoisted_1$4)
1331
1349
  ]),
1332
1350
  _: 3
1351
+ /* FORWARDED */
1333
1352
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
1334
1353
  };
1335
1354
  }
@@ -1350,7 +1369,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1350
1369
  setup(__props) {
1351
1370
  const props = __props;
1352
1371
  return (_ctx, _cache) => {
1353
- return openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(props.label), 1);
1372
+ return openBlock(), createElementBlock(
1373
+ "li",
1374
+ _hoisted_1$3,
1375
+ toDisplayString(props.label),
1376
+ 1
1377
+ /* TEXT */
1378
+ );
1354
1379
  };
1355
1380
  }
1356
1381
  });
@@ -1689,30 +1714,30 @@ function useComponentFocus(inputTemplateRef, emit) {
1689
1714
  };
1690
1715
  }
1691
1716
  function useComponentIcon(icon, iconPosition) {
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
+ });
1692
1723
  const hasIconBefore = computed(
1693
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
1724
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1694
1725
  );
1695
1726
  const hasIconAfter = computed(
1696
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
1727
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1697
1728
  );
1698
1729
  const hasIconLeft = computed(
1699
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
1730
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1700
1731
  );
1701
1732
  const hasIconRight = computed(
1702
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
1733
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1703
1734
  );
1704
1735
  const hasIconTop = computed(
1705
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
1736
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1706
1737
  );
1707
1738
  const hasIconBottom = computed(
1708
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
1739
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1709
1740
  );
1710
- const hasIcon = computed(() => {
1711
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
1712
- return { name: icon == null ? void 0 : icon.value };
1713
- }
1714
- return icon == null ? void 0 : icon.value;
1715
- });
1716
1741
  return {
1717
1742
  hasIcon,
1718
1743
  hasIconLeft,
@@ -1778,8 +1803,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1778
1803
  ...__default__$4,
1779
1804
  props: VvSelectProps,
1780
1805
  emits: VvSelectEmits,
1781
- setup(__props, { emit }) {
1806
+ setup(__props, { emit: __emit }) {
1782
1807
  const props = __props;
1808
+ const emit = __emit;
1783
1809
  const slots = useSlots();
1784
1810
  const propsDefaults = useDefaults(
1785
1811
  "VvSelect",
@@ -1815,10 +1841,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1815
1841
  focused.value = true;
1816
1842
  }
1817
1843
  });
1818
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
1819
- icon,
1820
- iconPosition
1821
- );
1844
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
1822
1845
  const isDirty = computed(() => !isEmpty(props.modelValue));
1823
1846
  const isDisabled = computed(() => props.disabled || props.readonly);
1824
1847
  const hasTabindex = computed(() => {
@@ -1842,8 +1865,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1842
1865
  loading: loading.value,
1843
1866
  disabled: disabled.value,
1844
1867
  readonly: readonly.value,
1845
- "icon-before": hasIconBefore.value,
1846
- "icon-after": hasIconAfter.value,
1868
+ "icon-before": hasIconBefore.value !== void 0,
1869
+ "icon-after": hasIconAfter.value !== void 0,
1847
1870
  dirty: isDirty.value,
1848
1871
  focus: focused.value,
1849
1872
  floating: floating.value,
@@ -1892,101 +1915,138 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1892
1915
  return option && option.options && option.options.length > 0;
1893
1916
  };
1894
1917
  return (_ctx, _cache) => {
1895
- return openBlock(), createElementBlock("div", {
1896
- class: normalizeClass(unref(bemCssClasses))
1897
- }, [
1898
- _ctx.label ? (openBlock(), createElementBlock("label", {
1899
- key: 0,
1900
- for: unref(hasId)
1901
- }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("", true),
1902
- createElementVNode("div", _hoisted_2$2, [
1903
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1904
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1905
- ])) : createCommentVNode("", true),
1906
- createElementVNode("div", _hoisted_4$1, [
1907
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1908
- key: 0,
1909
- class: "vv-select__icon"
1910
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
1911
- withDirectives(createElementVNode("select", mergeProps({
1912
- id: unref(hasId),
1913
- ref_key: "select",
1914
- ref: select,
1915
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1916
- }, unref(hasAttrs)), [
1917
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1918
- key: 0,
1919
- value: void 0,
1920
- disabled: !_ctx.unselectable,
1921
- hidden: !_ctx.unselectable
1922
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("", true),
1923
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
1924
- return openBlock(), createElementBlock(Fragment, null, [
1925
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
1926
- key: index,
1927
- disabled: unref(isOptionDisabled)(option),
1928
- value: unref(getOptionValue)(option)
1929
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1930
- key: `group-${index}`,
1931
- disabled: unref(isOptionDisabled)(option),
1932
- label: unref(getOptionLabel)(option)
1933
- }, [
1934
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
1935
- return openBlock(), createElementBlock("option", {
1936
- key: `group-${index}-item-${i}`,
1937
- disabled: unref(isOptionDisabled)(item),
1938
- value: unref(getOptionValue)(item)
1939
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
1940
- }), 128))
1941
- ], 8, _hoisted_8$1))
1942
- ], 64);
1943
- }), 256))
1944
- ], 16, _hoisted_5$1), [
1945
- [vModelSelect, unref(localModelValue)]
1918
+ return openBlock(), createElementBlock(
1919
+ "div",
1920
+ {
1921
+ class: normalizeClass(unref(bemCssClasses))
1922
+ },
1923
+ [
1924
+ _ctx.label ? (openBlock(), createElementBlock("label", {
1925
+ key: 0,
1926
+ for: unref(hasId)
1927
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
1928
+ createCommentVNode(" #region native select "),
1929
+ createElementVNode("div", _hoisted_2$2, [
1930
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1931
+ createCommentVNode(" @slot Slot before input "),
1932
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1933
+ ])) : createCommentVNode("v-if", true),
1934
+ createElementVNode("div", _hoisted_4$1, [
1935
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1936
+ _sfc_main$9,
1937
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1938
+ null,
1939
+ 16
1940
+ /* FULL_PROPS */
1941
+ )) : createCommentVNode("v-if", true),
1942
+ withDirectives(createElementVNode("select", mergeProps({
1943
+ id: unref(hasId),
1944
+ ref_key: "select",
1945
+ ref: select,
1946
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1947
+ }, unref(hasAttrs)), [
1948
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1949
+ key: 0,
1950
+ value: void 0,
1951
+ disabled: !_ctx.unselectable,
1952
+ hidden: !_ctx.unselectable
1953
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
1954
+ (openBlock(true), createElementBlock(
1955
+ Fragment,
1956
+ null,
1957
+ renderList(_ctx.options, (option, index) => {
1958
+ return openBlock(), createElementBlock(
1959
+ Fragment,
1960
+ null,
1961
+ [
1962
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
1963
+ key: index,
1964
+ disabled: unref(isOptionDisabled)(option),
1965
+ value: unref(getOptionValue)(option)
1966
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1967
+ key: `group-${index}`,
1968
+ disabled: unref(isOptionDisabled)(option),
1969
+ label: unref(getOptionLabel)(option)
1970
+ }, [
1971
+ (openBlock(true), createElementBlock(
1972
+ Fragment,
1973
+ null,
1974
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
1975
+ return openBlock(), createElementBlock("option", {
1976
+ key: `group-${index}-item-${i}`,
1977
+ disabled: unref(isOptionDisabled)(item),
1978
+ value: unref(getOptionValue)(item)
1979
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
1980
+ }),
1981
+ 128
1982
+ /* KEYED_FRAGMENT */
1983
+ ))
1984
+ ], 8, _hoisted_8$1))
1985
+ ],
1986
+ 64
1987
+ /* STABLE_FRAGMENT */
1988
+ );
1989
+ }),
1990
+ 256
1991
+ /* UNKEYED_FRAGMENT */
1992
+ ))
1993
+ ], 16, _hoisted_5$1), [
1994
+ [vModelSelect, unref(localModelValue)]
1995
+ ]),
1996
+ unref(hasIconAfter) ? (openBlock(), createBlock(
1997
+ _sfc_main$9,
1998
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
1999
+ null,
2000
+ 16
2001
+ /* FULL_PROPS */
2002
+ )) : createCommentVNode("v-if", true)
1946
2003
  ]),
1947
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1948
- key: 1,
1949
- class: "vv-select__icon vv-select__icon-after"
1950
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2004
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
2005
+ createCommentVNode(" @slot Slot after input "),
2006
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2007
+ ])) : createCommentVNode("v-if", true)
1951
2008
  ]),
1952
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1953
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1954
- ])) : createCommentVNode("", true)
1955
- ]),
1956
- createVNode(unref(HintSlot), {
1957
- id: unref(hasHintId),
1958
- class: "vv-select__hint"
1959
- }, createSlots({ _: 2 }, [
1960
- _ctx.$slots.hint ? {
1961
- name: "hint",
1962
- fn: withCtx(() => [
1963
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1964
- ]),
1965
- key: "0"
1966
- } : void 0,
1967
- _ctx.$slots.loading ? {
1968
- name: "loading",
1969
- fn: withCtx(() => [
1970
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1971
- ]),
1972
- key: "1"
1973
- } : void 0,
1974
- _ctx.$slots.valid ? {
1975
- name: "valid",
1976
- fn: withCtx(() => [
1977
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1978
- ]),
1979
- key: "2"
1980
- } : void 0,
1981
- _ctx.$slots.invalid ? {
1982
- name: "invalid",
1983
- fn: withCtx(() => [
1984
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1985
- ]),
1986
- key: "3"
1987
- } : void 0
1988
- ]), 1032, ["id"])
1989
- ], 2);
2009
+ createCommentVNode(" #endregion native select "),
2010
+ createVNode(unref(HintSlot), {
2011
+ id: unref(hasHintId),
2012
+ class: "vv-select__hint"
2013
+ }, createSlots({
2014
+ _: 2
2015
+ /* DYNAMIC */
2016
+ }, [
2017
+ _ctx.$slots.hint ? {
2018
+ name: "hint",
2019
+ fn: withCtx(() => [
2020
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2021
+ ]),
2022
+ key: "0"
2023
+ } : void 0,
2024
+ _ctx.$slots.loading ? {
2025
+ name: "loading",
2026
+ fn: withCtx(() => [
2027
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2028
+ ]),
2029
+ key: "1"
2030
+ } : void 0,
2031
+ _ctx.$slots.valid ? {
2032
+ name: "valid",
2033
+ fn: withCtx(() => [
2034
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2035
+ ]),
2036
+ key: "2"
2037
+ } : void 0,
2038
+ _ctx.$slots.invalid ? {
2039
+ name: "invalid",
2040
+ fn: withCtx(() => [
2041
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2042
+ ]),
2043
+ key: "3"
2044
+ } : void 0
2045
+ ]), 1032, ["id"])
2046
+ ],
2047
+ 2
2048
+ /* CLASS */
2049
+ );
1990
2050
  };
1991
2051
  }
1992
2052
  });
@@ -2005,14 +2065,25 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2005
2065
  const { modifiers } = toRefs(props);
2006
2066
  const bemCssClasses = useModifiers("vv-badge", modifiers);
2007
2067
  return (_ctx, _cache) => {
2008
- return openBlock(), createElementBlock("span", {
2009
- class: normalizeClass(unref(bemCssClasses)),
2010
- role: "status"
2011
- }, [
2012
- renderSlot(_ctx.$slots, "default", {}, () => [
2013
- createTextVNode(toDisplayString(_ctx.value), 1)
2014
- ])
2015
- ], 2);
2068
+ return openBlock(), createElementBlock(
2069
+ "span",
2070
+ {
2071
+ class: normalizeClass(unref(bemCssClasses)),
2072
+ role: "status"
2073
+ },
2074
+ [
2075
+ createCommentVNode(" @slot Default slot "),
2076
+ renderSlot(_ctx.$slots, "default", {}, () => [
2077
+ createTextVNode(
2078
+ toDisplayString(_ctx.value),
2079
+ 1
2080
+ /* TEXT */
2081
+ )
2082
+ ])
2083
+ ],
2084
+ 2
2085
+ /* CLASS */
2086
+ );
2016
2087
  };
2017
2088
  }
2018
2089
  });
@@ -2025,8 +2096,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2025
2096
  ...__default__$2,
2026
2097
  props: VvActionProps,
2027
2098
  emits: VvActionEvents,
2028
- setup(__props, { expose: __expose, emit }) {
2099
+ setup(__props, { expose: __expose, emit: __emit }) {
2029
2100
  const props = __props;
2101
+ const emit = __emit;
2030
2102
  const volver = useVolver();
2031
2103
  const element = ref(null);
2032
2104
  __expose({ $el: element });
@@ -2057,7 +2129,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2057
2129
  case props.href !== void 0:
2058
2130
  return ActionTag.a;
2059
2131
  default:
2060
- return ActionTag.button;
2132
+ return props.defaultTag;
2061
2133
  }
2062
2134
  });
2063
2135
  const hasProps = computed(() => {
@@ -2082,12 +2154,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2082
2154
  to: props.to,
2083
2155
  target: props.target
2084
2156
  };
2085
- default:
2157
+ case ActionTag.button:
2086
2158
  return {
2087
2159
  ...toReturn,
2088
2160
  type: props.type,
2089
2161
  disabled: props.disabled
2090
2162
  };
2163
+ default:
2164
+ return toReturn;
2091
2165
  }
2092
2166
  });
2093
2167
  const onClick = (e) => {
@@ -2113,18 +2187,25 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2113
2187
  class: {
2114
2188
  active: _ctx.active,
2115
2189
  pressed: unref(pressed),
2116
- disabled: _ctx.disabled
2190
+ disabled: _ctx.disabled,
2191
+ current: _ctx.current
2117
2192
  },
2118
2193
  onClickPassive: onClick,
2119
2194
  onMouseoverPassive: onMouseover,
2120
2195
  onMouseleavePassive: onMouseleave
2121
2196
  }), {
2122
2197
  default: withCtx(() => [
2198
+ createCommentVNode(" @slot Default slot "),
2123
2199
  renderSlot(_ctx.$slots, "default", {}, () => [
2124
- createTextVNode(toDisplayString(_ctx.label), 1)
2200
+ createTextVNode(
2201
+ toDisplayString(_ctx.label),
2202
+ 1
2203
+ /* TEXT */
2204
+ )
2125
2205
  ])
2126
2206
  ]),
2127
2207
  _: 3
2208
+ /* FORWARDED */
2128
2209
  }, 16, ["class"]);
2129
2210
  };
2130
2211
  }
@@ -2168,10 +2249,7 @@ const VvButtonProps = {
2168
2249
  ...ModifiersProps,
2169
2250
  ...UnselectableProps,
2170
2251
  ...LoadingProps,
2171
- /**
2172
- * Button icon
2173
- */
2174
- icon: [String, Object],
2252
+ ...IconProps,
2175
2253
  /**
2176
2254
  * Button icon position
2177
2255
  */
@@ -2280,10 +2358,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2280
2358
  ...__default__$1,
2281
2359
  props: VvButtonProps,
2282
2360
  emits: VvButtonEvents,
2283
- setup(__props, { expose: __expose, emit }) {
2361
+ setup(__props, { expose: __expose, emit: __emit }) {
2284
2362
  const props = __props;
2285
2363
  const attrs = useAttrs();
2286
2364
  const slots = useSlots();
2365
+ const emit = __emit;
2287
2366
  const {
2288
2367
  id,
2289
2368
  modifiers,
@@ -2327,9 +2406,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2327
2406
  )
2328
2407
  }))
2329
2408
  );
2330
- const hasIconProps = computed(
2331
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
2332
- );
2409
+ const { hasIcon } = useComponentIcon(icon);
2333
2410
  const toggleValue = computed(() => {
2334
2411
  return props.value !== void 0 ? props.value : name.value;
2335
2412
  });
@@ -2373,30 +2450,67 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2373
2450
  onClick
2374
2451
  }), {
2375
2452
  default: withCtx(() => [
2453
+ createCommentVNode(" @slot Default slot "),
2376
2454
  renderSlot(_ctx.$slots, "default", {}, () => [
2377
- _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
2378
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$9, {
2379
- key: 0,
2380
- class: "vv-button__loading-icon",
2381
- name: _ctx.loadingIcon
2382
- }, null, 8, ["name"])) : createCommentVNode("", true),
2383
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
2384
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2385
- renderSlot(_ctx.$slots, "before"),
2386
- unref(icon) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2387
- key: 0,
2388
- class: "vv-button__icon"
2389
- }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
2390
- unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2391
- renderSlot(_ctx.$slots, "label", {}, () => [
2392
- createTextVNode(toDisplayString(unref(label)), 1)
2455
+ createCommentVNode(" #region loading "),
2456
+ _ctx.loading ? (openBlock(), createElementBlock(
2457
+ Fragment,
2458
+ { key: 0 },
2459
+ [
2460
+ createCommentVNode(" @slot Slot for loading content "),
2461
+ renderSlot(_ctx.$slots, "loading", {}, () => [
2462
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$9, {
2463
+ key: 0,
2464
+ class: "vv-button__loading-icon",
2465
+ name: _ctx.loadingIcon
2466
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
2467
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
2468
+ "span",
2469
+ _hoisted_1$1,
2470
+ toDisplayString(_ctx.loadingLabel),
2471
+ 1
2472
+ /* TEXT */
2473
+ )) : createCommentVNode("v-if", true)
2393
2474
  ])
2394
- ])) : createCommentVNode("", true),
2395
- renderSlot(_ctx.$slots, "after")
2396
- ], 64))
2475
+ ],
2476
+ 64
2477
+ /* STABLE_FRAGMENT */
2478
+ )) : (openBlock(), createElementBlock(
2479
+ Fragment,
2480
+ { key: 1 },
2481
+ [
2482
+ createCommentVNode(" #endregion "),
2483
+ createCommentVNode(" #region button "),
2484
+ createCommentVNode(" @slot Before label and icon "),
2485
+ renderSlot(_ctx.$slots, "before"),
2486
+ unref(hasIcon) ? (openBlock(), createBlock(
2487
+ _sfc_main$9,
2488
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2489
+ null,
2490
+ 16
2491
+ /* FULL_PROPS */
2492
+ )) : createCommentVNode("v-if", true),
2493
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2494
+ createCommentVNode(" @slot Use this slot for button label "),
2495
+ renderSlot(_ctx.$slots, "label", {}, () => [
2496
+ createTextVNode(
2497
+ toDisplayString(unref(label)),
2498
+ 1
2499
+ /* TEXT */
2500
+ )
2501
+ ])
2502
+ ])) : createCommentVNode("v-if", true),
2503
+ createCommentVNode(" @slot After label and icon "),
2504
+ renderSlot(_ctx.$slots, "after")
2505
+ ],
2506
+ 64
2507
+ /* STABLE_FRAGMENT */
2508
+ )),
2509
+ createCommentVNode(" #endregion ")
2397
2510
  ])
2398
2511
  ]),
2399
2512
  _: 3
2513
+ /* FORWARDED */
2400
2514
  }, 16, ["id", "class"]);
2401
2515
  };
2402
2516
  }
@@ -2432,8 +2546,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2432
2546
  ...__default__,
2433
2547
  props: VvComboboxProps,
2434
2548
  emits: VvComboboxEvents,
2435
- setup(__props, { emit }) {
2549
+ setup(__props, { emit: __emit }) {
2436
2550
  const props = __props;
2551
+ const emit = __emit;
2437
2552
  const slots = useSlots();
2438
2553
  const propsDefaults = useDefaults(
2439
2554
  "VvCombobox",
@@ -2479,10 +2594,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2479
2594
  searchText,
2480
2595
  computed(() => Number(props.debounceSearch))
2481
2596
  );
2482
- watch(
2483
- debouncedSearchText,
2484
- () => emit("change:search", debouncedSearchText.value)
2485
- );
2597
+ watch(debouncedSearchText, () => {
2598
+ emit("update:search", debouncedSearchText.value);
2599
+ emit("change:search", debouncedSearchText.value);
2600
+ });
2486
2601
  const expanded = ref(false);
2487
2602
  const toggleExpanded = () => {
2488
2603
  if (props.disabled || props.readonly)
@@ -2533,10 +2648,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2533
2648
  const localLoading = ref(false);
2534
2649
  const isLoading = computed(() => localLoading.value || loading.value);
2535
2650
  const dropdownEl = ref();
2536
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
2537
- icon,
2538
- iconPosition
2539
- );
2651
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
2540
2652
  const isDirty = computed(() => !isEmpty(props.modelValue));
2541
2653
  const hasTabindex = computed(() => {
2542
2654
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -2548,12 +2660,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2548
2660
  disabled: disabled.value,
2549
2661
  loading: isLoading.value,
2550
2662
  readonly: readonly.value,
2551
- "icon-before": Boolean(hasIconBefore.value),
2552
- "icon-after": Boolean(hasIconAfter.value),
2663
+ "icon-before": hasIconBefore.value !== void 0,
2664
+ "icon-after": hasIconAfter.value !== void 0,
2553
2665
  valid: valid.value,
2554
2666
  invalid: invalid.value,
2555
2667
  dirty: isDirty.value,
2556
- focus: focused.value,
2668
+ focus: focused.value || focusedWithin.value || expanded.value,
2557
2669
  floating: floating.value,
2558
2670
  badges: props.badges
2559
2671
  }))
@@ -2630,7 +2742,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2630
2742
  if (!props.keepOpen) {
2631
2743
  collapse();
2632
2744
  }
2633
- if (props.unselectable && value === props.modelValue) {
2745
+ if (Array.isArray(props.modelValue)) {
2746
+ if (props.unselectable && props.modelValue.includes(value)) {
2747
+ toReturn = [];
2748
+ } else {
2749
+ toReturn = [value];
2750
+ }
2751
+ } else if (props.unselectable && value === props.modelValue) {
2634
2752
  toReturn = void 0;
2635
2753
  }
2636
2754
  }
@@ -2706,208 +2824,311 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2706
2824
  key: 0,
2707
2825
  id: unref(hasLabelId),
2708
2826
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
2709
- }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
2710
- createElementVNode("div", {
2711
- ref_key: "wrapperEl",
2712
- ref: wrapperEl,
2713
- class: "vv-select__wrapper"
2714
- }, [
2715
- createVNode(_sfc_main$8, mergeProps({
2716
- ref_key: "dropdownEl",
2717
- ref: dropdownEl,
2718
- modelValue: unref(expanded),
2719
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2720
- }, unref(dropdownProps), {
2721
- role: unref(DropdownRole).listbox,
2722
- onAfterExpand,
2723
- onAfterCollapse
2724
- }), createSlots({
2725
- default: withCtx(({ aria }) => [
2726
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2727
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2728
- ])) : createCommentVNode("", true),
2729
- createElementVNode("div", _hoisted_5, [
2730
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2731
- key: 0,
2732
- class: "vv-select__icon"
2733
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
2734
- createElementVNode("div", mergeProps({
2735
- ref_key: "inputEl",
2736
- ref: inputEl
2737
- }, aria, {
2738
- class: "vv-select__input",
2739
- role: "combobox",
2740
- "aria-expanded": unref(expanded),
2741
- "aria-labelledby": unref(hasLabelId),
2742
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2743
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2744
- tabindex: unref(hasTabindex),
2745
- onClickPassive: onClickInput
2746
- }), [
2747
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2748
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2749
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
2750
- return openBlock(), createBlock(_sfc_main$3, {
2751
- key: index,
2752
- modifiers: _ctx.badgeModifiers,
2753
- class: "vv-select__badge"
2754
- }, {
2755
- default: withCtx(() => [
2756
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
2757
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2758
- key: 0,
2759
- "aria-label": unref(propsDefaults).deselectActionLabel,
2760
- type: "button",
2761
- onClick: withModifiers(($event) => onInput(option), ["stop"])
2762
- }, [
2763
- createVNode(_sfc_main$9, { name: "close" })
2764
- ], 8, _hoisted_8)) : createCommentVNode("", true)
2765
- ]),
2766
- _: 2
2767
- }, 1032, ["modifiers"]);
2768
- }), 128))
2769
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2770
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
2771
- ], 64))
2772
- ])
2773
- ], 16, _hoisted_6),
2774
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2775
- key: 1,
2776
- class: "vv-select__icon vv-select__icon-after"
2777
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2778
- ]),
2779
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2780
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2781
- ])) : createCommentVNode("", true)
2782
- ]),
2783
- items: withCtx(() => {
2784
- var _a;
2785
- return [
2786
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
2787
- return openBlock(), createElementBlock(Fragment, { key: index }, [
2788
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2789
- createVNode(_sfc_main$5, {
2790
- label: unref(getOptionLabel)(option)
2791
- }, null, 8, ["label"]),
2792
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
2793
- option
2794
- ), (item, i) => {
2795
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
2796
- selected: isOptionSelected(item),
2797
- disabled: unref(isOptionDisabled)(item),
2798
- unselectable: _ctx.unselectable,
2799
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2800
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2801
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2802
- }, {
2803
- key: i,
2804
- class: "vv-dropdown-option",
2805
- onClickPassive: ($event) => onInput(item)
2806
- }), {
2807
- default: withCtx(() => [
2808
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2809
- option,
2810
- selectedOptions: unref(selectedOptions),
2811
- selected: isOptionSelected(item),
2812
- disabled: unref(isOptionDisabled)(item)
2813
- })), () => [
2814
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
2815
- ])
2816
- ]),
2817
- _: 2
2818
- }, 1040, ["onClickPassive"]);
2819
- }), 128))
2820
- ], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
2821
- selected: isOptionSelected(option),
2822
- disabled: unref(isOptionDisabled)(option),
2823
- unselectable: _ctx.unselectable,
2824
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2825
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2826
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2827
- }, {
2828
- class: "vv-dropdown-option",
2829
- onClickPassive: ($event) => onInput(option)
2830
- }), {
2831
- default: withCtx(() => [
2832
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2833
- option,
2834
- selectedOptions: unref(selectedOptions),
2835
- selected: isOptionSelected(option),
2836
- disabled: unref(isOptionDisabled)(option)
2837
- })), () => [
2838
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
2839
- ])
2840
- ]),
2841
- _: 2
2842
- }, 1040, ["onClickPassive"]))
2843
- ], 64);
2844
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
2845
- key: 1,
2846
- modifiers: "inert"
2847
- }, {
2848
- default: withCtx(() => [
2849
- renderSlot(_ctx.$slots, "no-options", {}, () => [
2850
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
2851
- ])
2852
- ]),
2853
- _: 3
2854
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
2855
- key: 2,
2856
- modifiers: "inert"
2857
- }, {
2858
- default: withCtx(() => [
2859
- renderSlot(_ctx.$slots, "no-results", {}, () => [
2860
- createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
2827
+ }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
2828
+ createElementVNode(
2829
+ "div",
2830
+ {
2831
+ ref_key: "wrapperEl",
2832
+ ref: wrapperEl,
2833
+ class: "vv-select__wrapper"
2834
+ },
2835
+ [
2836
+ createVNode(_sfc_main$8, mergeProps({
2837
+ ref_key: "dropdownEl",
2838
+ ref: dropdownEl,
2839
+ modelValue: unref(expanded),
2840
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2841
+ }, unref(dropdownProps), {
2842
+ role: unref(DropdownRole).listbox,
2843
+ onAfterExpand,
2844
+ onAfterCollapse
2845
+ }), createSlots({
2846
+ default: withCtx(({ aria }) => [
2847
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2848
+ createCommentVNode(" @slot Slot before input "),
2849
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2850
+ ])) : createCommentVNode("v-if", true),
2851
+ createElementVNode("div", _hoisted_5, [
2852
+ unref(hasIconBefore) ? (openBlock(), createBlock(
2853
+ _sfc_main$9,
2854
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
2855
+ null,
2856
+ 16
2857
+ /* FULL_PROPS */
2858
+ )) : createCommentVNode("v-if", true),
2859
+ createElementVNode("div", mergeProps({
2860
+ ref_key: "inputEl",
2861
+ ref: inputEl
2862
+ }, aria, {
2863
+ class: "vv-select__input",
2864
+ role: "combobox",
2865
+ "aria-expanded": unref(expanded),
2866
+ "aria-labelledby": unref(hasLabelId),
2867
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2868
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2869
+ tabindex: unref(hasTabindex),
2870
+ onClickPassive: onClickInput
2871
+ }), [
2872
+ createCommentVNode(" @slot Slot for value customization "),
2873
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2874
+ unref(hasValue) ? (openBlock(), createElementBlock(
2875
+ Fragment,
2876
+ { key: 0 },
2877
+ [
2878
+ !_ctx.badges ? (openBlock(), createElementBlock(
2879
+ "div",
2880
+ _hoisted_7,
2881
+ toDisplayString(unref(hasValue)),
2882
+ 1
2883
+ /* TEXT */
2884
+ )) : (openBlock(true), createElementBlock(
2885
+ Fragment,
2886
+ { key: 1 },
2887
+ renderList(unref(selectedOptions), (option, index) => {
2888
+ return openBlock(), createBlock(_sfc_main$3, {
2889
+ key: index,
2890
+ modifiers: _ctx.badgeModifiers,
2891
+ class: "vv-select__badge"
2892
+ }, {
2893
+ default: withCtx(() => [
2894
+ createTextVNode(
2895
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
2896
+ 1
2897
+ /* TEXT */
2898
+ ),
2899
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2900
+ key: 0,
2901
+ "aria-label": unref(propsDefaults).deselectActionLabel,
2902
+ type: "button",
2903
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
2904
+ }, [
2905
+ createVNode(_sfc_main$9, { name: "close" })
2906
+ ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
2907
+ ]),
2908
+ _: 2
2909
+ /* DYNAMIC */
2910
+ }, 1032, ["modifiers"]);
2911
+ }),
2912
+ 128
2913
+ /* KEYED_FRAGMENT */
2914
+ ))
2915
+ ],
2916
+ 64
2917
+ /* STABLE_FRAGMENT */
2918
+ )) : (openBlock(), createElementBlock(
2919
+ Fragment,
2920
+ { key: 1 },
2921
+ [
2922
+ createTextVNode(
2923
+ toDisplayString(_ctx.placeholder),
2924
+ 1
2925
+ /* TEXT */
2926
+ )
2927
+ ],
2928
+ 64
2929
+ /* STABLE_FRAGMENT */
2930
+ ))
2861
2931
  ])
2862
- ]),
2863
- _: 3
2864
- })) : createCommentVNode("", true)
2865
- ];
2866
- }),
2867
- after: withCtx(() => [
2868
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
2932
+ ], 16, _hoisted_6),
2933
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2934
+ _sfc_main$9,
2935
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
2936
+ null,
2937
+ 16
2938
+ /* FULL_PROPS */
2939
+ )) : createCommentVNode("v-if", true)
2940
+ ]),
2941
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2942
+ createCommentVNode(" @slot Slot after input "),
2943
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2944
+ ])) : createCommentVNode("v-if", true)
2945
+ ]),
2946
+ items: withCtx(() => {
2869
2947
  var _a;
2870
2948
  return [
2871
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
2872
- key: 0,
2873
- label: unref(propsDefaults).closeLabel,
2874
- modifiers: "secondary",
2875
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
2876
- }, null, 8, ["label"])) : createCommentVNode("", true)
2949
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
2950
+ Fragment,
2951
+ { key: 0 },
2952
+ renderList(unref(filteredOptions), (option, index) => {
2953
+ return openBlock(), createElementBlock(
2954
+ Fragment,
2955
+ { key: index },
2956
+ [
2957
+ isGroup(option) ? (openBlock(), createElementBlock(
2958
+ Fragment,
2959
+ { key: 0 },
2960
+ [
2961
+ createVNode(_sfc_main$5, {
2962
+ label: unref(getOptionLabel)(option)
2963
+ }, null, 8, ["label"]),
2964
+ (openBlock(true), createElementBlock(
2965
+ Fragment,
2966
+ null,
2967
+ renderList(unref(getOptionGrouped)(
2968
+ option
2969
+ ), (item, i) => {
2970
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({
2971
+ selected: isOptionSelected(item),
2972
+ disabled: unref(isOptionDisabled)(item),
2973
+ unselectable: _ctx.unselectable,
2974
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2975
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
2976
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
2977
+ }, {
2978
+ key: i,
2979
+ class: "vv-dropdown-option",
2980
+ onClickPassive: ($event) => onInput(item)
2981
+ }), {
2982
+ default: withCtx(() => [
2983
+ createCommentVNode(" @slot Slot for option customization "),
2984
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2985
+ option,
2986
+ selectedOptions: unref(selectedOptions),
2987
+ selected: isOptionSelected(item),
2988
+ disabled: unref(isOptionDisabled)(item)
2989
+ })), () => [
2990
+ createTextVNode(
2991
+ toDisplayString(unref(getOptionLabel)(item)),
2992
+ 1
2993
+ /* TEXT */
2994
+ )
2995
+ ])
2996
+ ]),
2997
+ _: 2
2998
+ /* DYNAMIC */
2999
+ }, 1040, ["onClickPassive"]);
3000
+ }),
3001
+ 128
3002
+ /* KEYED_FRAGMENT */
3003
+ ))
3004
+ ],
3005
+ 64
3006
+ /* STABLE_FRAGMENT */
3007
+ )) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
3008
+ selected: isOptionSelected(option),
3009
+ disabled: unref(isOptionDisabled)(option),
3010
+ unselectable: _ctx.unselectable,
3011
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3012
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3013
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3014
+ }, {
3015
+ class: "vv-dropdown-option",
3016
+ onClickPassive: ($event) => onInput(option)
3017
+ }), {
3018
+ default: withCtx(() => [
3019
+ createCommentVNode(" @slot Slot for option customization "),
3020
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3021
+ option,
3022
+ selectedOptions: unref(selectedOptions),
3023
+ selected: isOptionSelected(option),
3024
+ disabled: unref(isOptionDisabled)(option)
3025
+ })), () => [
3026
+ createTextVNode(
3027
+ toDisplayString(unref(getOptionLabel)(option)),
3028
+ 1
3029
+ /* TEXT */
3030
+ )
3031
+ ])
3032
+ ]),
3033
+ _: 2
3034
+ /* DYNAMIC */
3035
+ }, 1040, ["onClickPassive"]))
3036
+ ],
3037
+ 64
3038
+ /* STABLE_FRAGMENT */
3039
+ );
3040
+ }),
3041
+ 128
3042
+ /* KEYED_FRAGMENT */
3043
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
3044
+ key: 1,
3045
+ modifiers: "inert"
3046
+ }, {
3047
+ default: withCtx(() => [
3048
+ createCommentVNode(" @slot Slot for no options available "),
3049
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
3050
+ createTextVNode(
3051
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
3052
+ 1
3053
+ /* TEXT */
3054
+ )
3055
+ ])
3056
+ ]),
3057
+ _: 3
3058
+ /* FORWARDED */
3059
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
3060
+ key: 2,
3061
+ modifiers: "inert"
3062
+ }, {
3063
+ default: withCtx(() => [
3064
+ createCommentVNode(" @slot Slot for no results available "),
3065
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
3066
+ createTextVNode(
3067
+ toDisplayString(unref(propsDefaults).noResultsLabel),
3068
+ 1
3069
+ /* TEXT */
3070
+ )
3071
+ ])
3072
+ ]),
3073
+ _: 3
3074
+ /* FORWARDED */
3075
+ })) : createCommentVNode("v-if", true)
2877
3076
  ];
2878
- })
2879
- ]),
2880
- _: 2
2881
- }, [
2882
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
2883
- name: "before",
2884
- fn: withCtx(() => [
2885
- renderSlot(_ctx.$slots, "dropdown::before"),
2886
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
2887
- key: 0,
2888
- id: unref(hasSearchId),
2889
- ref_key: "inputSearchEl",
2890
- ref: inputSearchEl,
2891
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
2892
- "aria-autocomplete": "list",
2893
- "aria-controls": unref(hasDropdownId),
2894
- autocomplete: "off",
2895
- spellcheck: "false",
2896
- type: "search",
2897
- class: "vv-dropdown__search",
2898
- placeholder: unref(propsDefaults).searchPlaceholder
2899
- }, null, 8, _hoisted_3)), [
2900
- [vModelText, unref(searchText)]
2901
- ]) : createCommentVNode("", true)
3077
+ }),
3078
+ after: withCtx(() => [
3079
+ createCommentVNode(" @slot Slot after dropdown items "),
3080
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3081
+ var _a;
3082
+ return [
3083
+ createCommentVNode(" Close button if dropdown custom position is enabled and floating-ui disabled "),
3084
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
3085
+ key: 0,
3086
+ label: unref(propsDefaults).closeLabel,
3087
+ modifiers: "secondary",
3088
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3089
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3090
+ ];
3091
+ })
2902
3092
  ]),
2903
- key: "0"
2904
- } : void 0
2905
- ]), 1040, ["modelValue", "role"])
2906
- ], 512),
3093
+ _: 2
3094
+ /* DYNAMIC */
3095
+ }, [
3096
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
3097
+ name: "before",
3098
+ fn: withCtx(() => [
3099
+ createCommentVNode(" @slot Slot before dropdown items "),
3100
+ renderSlot(_ctx.$slots, "dropdown::before"),
3101
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
3102
+ key: 0,
3103
+ id: unref(hasSearchId),
3104
+ ref_key: "inputSearchEl",
3105
+ ref: inputSearchEl,
3106
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3107
+ "aria-autocomplete": "list",
3108
+ "aria-controls": unref(hasDropdownId),
3109
+ autocomplete: "off",
3110
+ spellcheck: "false",
3111
+ type: "search",
3112
+ class: "vv-dropdown__search",
3113
+ placeholder: unref(propsDefaults).searchPlaceholder
3114
+ }, null, 8, _hoisted_3)), [
3115
+ [vModelText, unref(searchText)]
3116
+ ]) : createCommentVNode("v-if", true)
3117
+ ]),
3118
+ key: "0"
3119
+ } : void 0
3120
+ ]), 1040, ["modelValue", "role"])
3121
+ ],
3122
+ 512
3123
+ /* NEED_PATCH */
3124
+ ),
2907
3125
  createVNode(unref(HintSlot), {
2908
3126
  id: unref(hasHintId),
2909
3127
  class: "vv-select__hint"
2910
- }, createSlots({ _: 2 }, [
3128
+ }, createSlots({
3129
+ _: 2
3130
+ /* DYNAMIC */
3131
+ }, [
2911
3132
  _ctx.$slots.hint ? {
2912
3133
  name: "hint",
2913
3134
  fn: withCtx(() => [
@@ -2937,9 +3158,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2937
3158
  key: "3"
2938
3159
  } : void 0
2939
3160
  ]), 1032, ["id"])
2940
- ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, unref(selectProps), {
2941
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
2942
- }), null, 16));
3161
+ ], 10, _hoisted_1)) : (openBlock(), createBlock(
3162
+ _sfc_main$4,
3163
+ mergeProps({ key: 1 }, unref(selectProps), {
3164
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
3165
+ }),
3166
+ null,
3167
+ 16
3168
+ /* FULL_PROPS */
3169
+ ));
2943
3170
  };
2944
3171
  }
2945
3172
  });