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

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 (251) 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 +67 -13
  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 +111 -37
  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 +56 -12
  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 +188 -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 +230 -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 +71 -16
  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 +257 -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 +165 -137
  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 +67 -15
  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 +79 -24
  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 +89 -21
  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 +168 -66
  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 +721 -527
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +145 -72
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +133 -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 +61 -35
  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 +80 -21
  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 +21 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1558 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +190 -0
  92. package/dist/components/VvInputFile/index.d.ts +74 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +266 -242
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +153 -46
  99. package/dist/components/VvInputText/index.d.ts +69 -18
  100. package/dist/components/VvNav/VvNav.es.js +150 -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.d.ts → VvNavSeparator.vue.d.ts} +1 -1
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +435 -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 +168 -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 +244 -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 +251 -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 +225 -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/index.d.ts +10 -0
  139. package/dist/components/index.es.js +2635 -1301
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +37 -4
  142. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  143. package/dist/composables/index.d.ts +1 -0
  144. package/dist/composables/index.es.js +88 -1
  145. package/dist/composables/index.umd.js +1 -1
  146. package/dist/composables/useBlurhash.d.ts +7 -0
  147. package/dist/composables/useComponentIcon.d.ts +9 -8
  148. package/dist/composables/useVolver.d.ts +1 -1
  149. package/dist/directives/index.d.ts +3 -5
  150. package/dist/directives/index.es.js +92 -31
  151. package/dist/directives/index.umd.js +1 -1
  152. package/dist/directives/v-tooltip.es.js +90 -26
  153. package/dist/directives/v-tooltip.umd.js +1 -1
  154. package/dist/icons.es.js +6 -6
  155. package/dist/icons.umd.js +1 -1
  156. package/dist/index.d.ts +3 -1
  157. package/dist/index.es.js +81 -16
  158. package/dist/index.umd.js +1 -1
  159. package/dist/props/index.d.ts +287 -73
  160. package/dist/resolvers/unplugin.d.ts +6 -1
  161. package/dist/resolvers/unplugin.es.js +78 -10
  162. package/dist/resolvers/unplugin.umd.js +1 -1
  163. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  164. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  165. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  166. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  167. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  168. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  169. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  170. package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
  171. package/dist/stories/InputFile/InputFileModifiers.stories.d.ts +9 -0
  172. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +6 -0
  173. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  174. package/dist/types/alert.d.ts +13 -0
  175. package/dist/types/blurhash.d.ts +12 -0
  176. package/dist/types/floating-ui.d.ts +6 -0
  177. package/dist/types/generic.d.ts +4 -0
  178. package/dist/types/group.d.ts +37 -0
  179. package/dist/types/index.d.ts +7 -0
  180. package/dist/types/input-file.d.ts +14 -0
  181. package/dist/types/nav.d.ts +18 -0
  182. package/dist/utils/ObjectUtilities.d.ts +0 -1
  183. package/dist/workers/blurhash.d.ts +1 -0
  184. package/package.json +91 -74
  185. package/src/Volver.ts +31 -20
  186. package/src/assets/icons/detailed.json +1 -1
  187. package/src/assets/icons/normal.json +1 -1
  188. package/src/assets/icons/simple.json +1 -1
  189. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  190. package/src/components/VvAction/VvAction.vue +5 -2
  191. package/src/components/VvAlert/index.ts +1 -3
  192. package/src/components/VvAlertGroup/index.ts +2 -1
  193. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  194. package/src/components/VvBreadcrumb/index.ts +2 -8
  195. package/src/components/VvButton/VvButton.vue +6 -6
  196. package/src/components/VvButton/index.ts +2 -4
  197. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  198. package/src/components/VvCombobox/index.ts +4 -0
  199. package/src/components/VvIcon/VvIcon.vue +2 -2
  200. package/src/components/VvIcon/index.ts +22 -48
  201. package/src/components/VvInputFile/VvInputFile.vue +302 -0
  202. package/src/components/VvInputFile/index.ts +38 -0
  203. package/src/components/VvInputText/VvInputText.vue +13 -14
  204. package/src/components/VvNav/VvNav.vue +30 -50
  205. package/src/components/VvNav/VvNavItem.vue +18 -0
  206. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  207. package/src/components/VvNav/index.ts +2 -15
  208. package/src/components/VvSelect/VvSelect.vue +5 -8
  209. package/src/components/VvTab/VvTab.vue +63 -35
  210. package/src/components/VvTab/index.ts +10 -4
  211. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  212. package/src/components/index.ts +10 -0
  213. package/src/composables/index.ts +1 -0
  214. package/src/composables/useBlurhash.ts +76 -0
  215. package/src/composables/useComponentIcon.ts +15 -14
  216. package/src/composables/useUniqueId.ts +2 -2
  217. package/src/directives/index.ts +3 -6
  218. package/src/directives/v-tooltip.ts +19 -10
  219. package/src/index.ts +3 -1
  220. package/src/props/index.ts +115 -27
  221. package/src/resolvers/unplugin.ts +24 -14
  222. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  223. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  224. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  225. package/src/stories/Icon/Icon.settings.ts +3 -3
  226. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  227. package/src/stories/InputFile/InputFile.stories.ts +98 -0
  228. package/src/stories/InputFile/InputFileModifiers.stories.ts +51 -0
  229. package/src/stories/InputFile/InputFileSlots.stories.ts +25 -0
  230. package/src/stories/Nav/Nav.settings.ts +3 -4
  231. package/src/stories/Nav/Nav.test.ts +4 -15
  232. package/src/stories/Tab/Tab.settings.ts +9 -9
  233. package/src/stories/Tab/Tab.stories.ts +2 -2
  234. package/src/stories/Tab/Tab.test.ts +6 -14
  235. package/src/stories/argTypes.ts +1 -1
  236. package/src/types/blurhash.ts +21 -0
  237. package/src/types/generic.ts +6 -0
  238. package/src/types/index.ts +7 -0
  239. package/src/types/input-file.ts +16 -0
  240. package/src/types/nav.ts +20 -0
  241. package/src/utils/ObjectUtilities.ts +0 -11
  242. package/src/workers/blurhash.ts +9 -0
  243. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  244. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  245. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  246. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  247. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  248. package/src/types/generic.d.ts +0 -6
  249. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  250. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  251. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,10 +1,10 @@
1
- import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createVNode, createSlots, nextTick, Transition, toHandlers, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
2
- import { nanoid } from "nanoid";
1
+ import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, mergeDefaults, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, onMounted, withDirectives, vModelCheckbox, createSlots, nextTick, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio, onBeforeUnmount } from "vue";
2
+ import { uid } from "uid";
3
3
  import { useToggle, useStorage, useVModel, useMutationObserver, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
4
4
  import { iconExists, Icon, addIcon } from "@iconify/vue";
5
+ import mitt from "mitt";
5
6
  import { get } from "ts-dot-prop";
6
7
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
7
- import mitt from "mitt";
8
8
  import { useIMask } from "vue-imask";
9
9
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
10
10
  Strategy2["absolute"] = "absolute";
@@ -104,6 +104,7 @@ const LinkProps = {
104
104
  */
105
105
  target: {
106
106
  type: String,
107
+ default: void 0,
107
108
  validator: (value) => Object.values(AnchorTarget).includes(value)
108
109
  },
109
110
  /**
@@ -118,27 +119,33 @@ const ValidProps = {
118
119
  /**
119
120
  * Valid status
120
121
  */
121
- valid: Boolean,
122
+ valid: { type: Boolean, default: false },
122
123
  /**
123
124
  * Valid label
124
125
  */
125
- validLabel: [String, Array]
126
+ validLabel: { type: [String, Array], default: void 0 }
126
127
  };
127
128
  const InvalidProps = {
128
129
  /**
129
130
  * Invalid status
130
131
  */
131
- invalid: Boolean,
132
+ invalid: {
133
+ type: Boolean,
134
+ default: false
135
+ },
132
136
  /**
133
137
  * Invalid label
134
138
  */
135
- invalidLabel: [String, Array]
139
+ invalidLabel: { type: [String, Array], default: void 0 }
136
140
  };
137
141
  const LoadingProps = {
138
142
  /**
139
143
  * Loading status
140
144
  */
141
- loading: Boolean,
145
+ loading: {
146
+ type: Boolean,
147
+ default: false
148
+ },
142
149
  /**
143
150
  * Loading label
144
151
  */
@@ -151,43 +158,73 @@ const DisabledProps = {
151
158
  /**
152
159
  * Whether the form control is disabled
153
160
  */
154
- disabled: Boolean
161
+ disabled: {
162
+ type: Boolean,
163
+ default: false
164
+ }
155
165
  };
156
166
  const SelectedProps = {
157
167
  /**
158
168
  * Whether the item is selected
159
169
  */
160
- selected: Boolean
170
+ selected: {
171
+ type: Boolean,
172
+ default: false
173
+ }
161
174
  };
162
175
  const ActiveProps = {
163
176
  /**
164
177
  * Whether the item is active
165
178
  */
166
- active: Boolean
179
+ active: {
180
+ type: Boolean,
181
+ default: false
182
+ }
183
+ };
184
+ const CurrentProps = {
185
+ /**
186
+ * Whether the item is current
187
+ */
188
+ current: {
189
+ type: Boolean,
190
+ default: false
191
+ }
167
192
  };
168
193
  const PressedProps = {
169
194
  /**
170
195
  * Whether the item is pressed
171
196
  */
172
- pressed: Boolean
197
+ pressed: {
198
+ type: Boolean,
199
+ default: false
200
+ }
173
201
  };
174
202
  const LabelProps = {
175
203
  /**
176
204
  * The item label
177
205
  */
178
- label: [String, Number]
206
+ label: {
207
+ type: [String, Number],
208
+ default: void 0
209
+ }
179
210
  };
180
211
  const ReadonlyProps = {
181
212
  /**
182
213
  * The value is not editable
183
214
  */
184
- readonly: Boolean
215
+ readonly: {
216
+ type: Boolean,
217
+ default: false
218
+ }
185
219
  };
186
220
  const ModifiersProps = {
187
221
  /**
188
222
  * Component BEM modifiers
189
223
  */
190
- modifiers: [String, Array]
224
+ modifiers: {
225
+ type: [String, Array],
226
+ default: void 0
227
+ }
191
228
  };
192
229
  const HintProps = {
193
230
  hintLabel: { type: String, default: "" }
@@ -227,14 +264,20 @@ const DebounceProps = {
227
264
  /**
228
265
  * Milliseconds to wait before emitting the input event
229
266
  */
230
- debounce: [Number, String]
267
+ debounce: {
268
+ type: [Number, String],
269
+ default: void 0
270
+ }
231
271
  };
232
272
  const IconProps = {
233
273
  /**
234
274
  * VvIcon name or props
235
275
  * @see VVIcon
236
276
  */
237
- icon: { type: [String, Object] },
277
+ icon: {
278
+ type: [String, Object],
279
+ default: void 0
280
+ },
238
281
  /**
239
282
  * VvIcon position
240
283
  */
@@ -255,7 +298,10 @@ const FloatingLabelProps = {
255
298
  /**
256
299
  * If true the label will be floating
257
300
  */
258
- floating: Boolean
301
+ floating: {
302
+ type: Boolean,
303
+ default: false
304
+ }
259
305
  };
260
306
  const UnselectableProps = {
261
307
  /**
@@ -291,7 +337,8 @@ const DropdownProps = {
291
337
  * Dropdown show / hide transition name
292
338
  */
293
339
  transitionName: {
294
- type: String
340
+ type: String,
341
+ default: void 0
295
342
  },
296
343
  /**
297
344
  * Offset of the dropdown from the trigger
@@ -359,7 +406,8 @@ const DropdownProps = {
359
406
  * Set dropdown width to the same as the trigger
360
407
  */
361
408
  triggerWidth: {
362
- type: Boolean
409
+ type: Boolean,
410
+ default: false
363
411
  }
364
412
  };
365
413
  const IdNameProps = {
@@ -376,7 +424,10 @@ const AutofocusProps = {
376
424
  * Global attribute autofocus
377
425
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
378
426
  */
379
- autofocus: Boolean
427
+ autofocus: {
428
+ type: Boolean,
429
+ default: false
430
+ }
380
431
  };
381
432
  const AutocompleteProps = {
382
433
  /**
@@ -408,28 +459,34 @@ const InputTextareaProps = {
408
459
  * Available for input types: text, search, url, tel, email, password
409
460
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
410
461
  */
411
- minlength: [String, Number],
462
+ minlength: { type: [String, Number], default: void 0 },
412
463
  /**
413
464
  * Input / Textarea maxlength
414
465
  * Maximum length (number of characters) of value
415
466
  * Available for input types: text, search, url, tel, email, password
416
467
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
417
468
  */
418
- maxlength: [String, Number],
469
+ maxlength: { type: [String, Number], default: void 0 },
419
470
  /**
420
471
  * Input / Textarea placeholder
421
472
  * Text that appears in the form control when it has no value set
422
473
  * Available for input types: text, search, url, tel, email, password, number
423
474
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
424
475
  */
425
- placeholder: String,
476
+ placeholder: {
477
+ type: String,
478
+ default: void 0
479
+ },
426
480
  /**
427
481
  * Input / Textarea required
428
482
  * A value is required or must be check for the form to be submittable
429
483
  * Available for all input types except color
430
484
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
431
485
  */
432
- required: Boolean
486
+ required: {
487
+ type: Boolean,
488
+ default: false
489
+ }
433
490
  };
434
491
  const CheckboxRadioProps = {
435
492
  ...IdNameProps,
@@ -446,11 +503,17 @@ const CheckboxRadioProps = {
446
503
  * Input value
447
504
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
448
505
  */
449
- value: [String, Number, Boolean],
506
+ value: {
507
+ type: [String, Number, Boolean],
508
+ default: void 0
509
+ },
450
510
  /**
451
511
  * Input value
452
512
  */
453
- modelValue: [Object, Number, Boolean, String]
513
+ modelValue: {
514
+ type: [Object, Number, Boolean, String],
515
+ default: void 0
516
+ }
454
517
  };
455
518
  const CheckboxRadioGroupProps = {
456
519
  ...ValidProps,
@@ -465,7 +528,10 @@ const CheckboxRadioGroupProps = {
465
528
  /**
466
529
  * Input value
467
530
  */
468
- modelValue: [String, Array, Boolean, Number, Symbol],
531
+ modelValue: {
532
+ type: [String, Array, Boolean, Number, Symbol],
533
+ default: void 0
534
+ },
469
535
  /**
470
536
  * Input name
471
537
  */
@@ -473,13 +539,17 @@ const CheckboxRadioGroupProps = {
473
539
  /**
474
540
  * If true, the group will be displayed in a vertical column
475
541
  */
476
- vertical: Boolean
542
+ vertical: {
543
+ type: Boolean,
544
+ default: false
545
+ }
477
546
  };
478
547
  const ActionProps = {
479
548
  ...DisabledProps,
480
549
  ...LabelProps,
481
550
  ...PressedProps,
482
551
  ...ActiveProps,
552
+ ...CurrentProps,
483
553
  ...LinkProps,
484
554
  /**
485
555
  * Button type
@@ -495,6 +565,19 @@ const ActionProps = {
495
565
  ariaLabel: {
496
566
  type: String,
497
567
  default: void 0
568
+ },
569
+ /**
570
+ * Default tag for the action
571
+ */
572
+ defaultTag: {
573
+ type: String,
574
+ default: ActionTag.button
575
+ }
576
+ };
577
+ const NavProps = {
578
+ items: {
579
+ type: Array,
580
+ default: () => []
498
581
  }
499
582
  };
500
583
  function equals(obj1, obj2, field) {
@@ -734,21 +817,22 @@ function useModifiers(prefix, modifiers, others) {
734
817
  return toReturn;
735
818
  });
736
819
  }
737
- const _hoisted_1$i = ["id", "open"];
738
- const _hoisted_2$d = ["aria-controls", "aria-expanded"];
739
- const _hoisted_3$7 = ["aria-hidden"];
740
- const __default__$n = {
820
+ const _hoisted_1$l = ["id", "open"];
821
+ const _hoisted_2$f = ["aria-controls", "aria-expanded"];
822
+ const _hoisted_3$8 = ["aria-hidden"];
823
+ const __default__$r = {
741
824
  name: "VvAccordion"
742
825
  };
743
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
744
- ...__default__$n,
826
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
827
+ ...__default__$r,
745
828
  props: VvAccordionProps,
746
829
  emits: VvAccordionEvents,
747
- setup(__props, { emit }) {
830
+ setup(__props, { emit: __emit }) {
748
831
  const props = __props;
749
832
  const attrs = useAttrs();
833
+ const emit = __emit;
750
834
  const accordionName = computed(
751
- () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
835
+ () => props.name || (attrs == null ? void 0 : attrs.id) || uid()
752
836
  );
753
837
  const {
754
838
  modifiers,
@@ -821,18 +905,26 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
821
905
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
822
906
  }, [
823
907
  renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
824
- createTextVNode(toDisplayString(unref(title)), 1)
908
+ createTextVNode(
909
+ toDisplayString(unref(title)),
910
+ 1
911
+ /* TEXT */
912
+ )
825
913
  ])
826
- ], 8, _hoisted_2$d),
914
+ ], 8, _hoisted_2$f),
827
915
  createElementVNode("div", {
828
916
  "aria-hidden": !unref(isOpen),
829
917
  class: "vv-accordion__content"
830
918
  }, [
831
919
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
832
- createTextVNode(toDisplayString(unref(content)), 1)
920
+ createTextVNode(
921
+ toDisplayString(unref(content)),
922
+ 1
923
+ /* TEXT */
924
+ )
833
925
  ])
834
- ], 8, _hoisted_3$7)
835
- ], 10, _hoisted_1$i);
926
+ ], 8, _hoisted_3$8)
927
+ ], 10, _hoisted_1$l);
836
928
  };
837
929
  }
838
930
  });
@@ -885,15 +977,16 @@ function useProvideGroupState(groupState) {
885
977
  computed(() => groupState)
886
978
  );
887
979
  }
888
- const __default__$m = {
980
+ const __default__$q = {
889
981
  name: "VvAccordionGroup"
890
982
  };
891
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
892
- ...__default__$m,
983
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
984
+ ...__default__$q,
893
985
  props: VvAccordionGroupProps,
894
986
  emits: VvAccordionGroupEvents,
895
- setup(__props, { emit }) {
987
+ setup(__props, { emit: __emit }) {
896
988
  const props = __props;
989
+ const emit = __emit;
897
990
  const { disabled, collapse, modifiers, itemModifiers, items, not } = toRefs(props);
898
991
  watchEffect(() => {
899
992
  if (typeof props.modelValue === "string" && collapse.value) {
@@ -951,29 +1044,48 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
951
1044
  }))
952
1045
  );
953
1046
  return (_ctx, _cache) => {
954
- return openBlock(), createElementBlock("div", {
955
- class: normalizeClass(unref(bemCssClasses))
956
- }, [
957
- renderSlot(_ctx.$slots, "default", {}, () => [
958
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
959
- return openBlock(), createBlock(_sfc_main$q, mergeProps({
960
- key: item.title
961
- }, {
962
- name: item.name,
963
- title: item.title,
964
- content: item.content
965
- }), {
966
- header: withCtx((data) => [
967
- renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
968
- ]),
969
- details: withCtx((data) => [
970
- renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
971
- ]),
972
- _: 2
973
- }, 1040);
974
- }), 128))
975
- ])
976
- ], 2);
1047
+ return openBlock(), createElementBlock(
1048
+ "div",
1049
+ {
1050
+ class: normalizeClass(unref(bemCssClasses))
1051
+ },
1052
+ [
1053
+ renderSlot(_ctx.$slots, "default", {}, () => [
1054
+ (openBlock(true), createElementBlock(
1055
+ Fragment,
1056
+ null,
1057
+ renderList(unref(items), (item) => {
1058
+ return openBlock(), createBlock(
1059
+ _sfc_main$x,
1060
+ mergeProps({
1061
+ key: item.title
1062
+ }, {
1063
+ name: item.name,
1064
+ title: item.title,
1065
+ content: item.content
1066
+ }),
1067
+ {
1068
+ header: withCtx((data) => [
1069
+ renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
1070
+ ]),
1071
+ details: withCtx((data) => [
1072
+ renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
1073
+ ]),
1074
+ _: 2
1075
+ /* DYNAMIC */
1076
+ },
1077
+ 1040
1078
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1079
+ );
1080
+ }),
1081
+ 128
1082
+ /* KEYED_FRAGMENT */
1083
+ ))
1084
+ ])
1085
+ ],
1086
+ 2
1087
+ /* CLASS */
1088
+ );
977
1089
  };
978
1090
  }
979
1091
  });
@@ -991,15 +1103,16 @@ function useInjectedDropdownItem() {
991
1103
  function useInjectedDropdownAction() {
992
1104
  return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
993
1105
  }
994
- const __default__$l = {
1106
+ const __default__$p = {
995
1107
  name: "VvAction"
996
1108
  };
997
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
998
- ...__default__$l,
1109
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1110
+ ...__default__$p,
999
1111
  props: VvActionProps,
1000
1112
  emits: VvActionEvents,
1001
- setup(__props, { expose: __expose, emit }) {
1113
+ setup(__props, { expose: __expose, emit: __emit }) {
1002
1114
  const props = __props;
1115
+ const emit = __emit;
1003
1116
  const volver = useVolver();
1004
1117
  const element = ref(null);
1005
1118
  __expose({ $el: element });
@@ -1030,7 +1143,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1030
1143
  case props.href !== void 0:
1031
1144
  return ActionTag.a;
1032
1145
  default:
1033
- return ActionTag.button;
1146
+ return props.defaultTag;
1034
1147
  }
1035
1148
  });
1036
1149
  const hasProps = computed(() => {
@@ -1055,12 +1168,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1055
1168
  to: props.to,
1056
1169
  target: props.target
1057
1170
  };
1058
- default:
1171
+ case ActionTag.button:
1059
1172
  return {
1060
1173
  ...toReturn,
1061
1174
  type: props.type,
1062
1175
  disabled: props.disabled
1063
1176
  };
1177
+ default:
1178
+ return toReturn;
1064
1179
  }
1065
1180
  });
1066
1181
  const onClick = (e) => {
@@ -1086,7 +1201,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1086
1201
  class: {
1087
1202
  active: _ctx.active,
1088
1203
  pressed: unref(pressed),
1089
- disabled: _ctx.disabled
1204
+ disabled: _ctx.disabled,
1205
+ current: _ctx.current
1090
1206
  },
1091
1207
  onClickPassive: onClick,
1092
1208
  onMouseoverPassive: onMouseover,
@@ -1094,114 +1210,46 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1094
1210
  }), {
1095
1211
  default: withCtx(() => [
1096
1212
  renderSlot(_ctx.$slots, "default", {}, () => [
1097
- createTextVNode(toDisplayString(_ctx.label), 1)
1213
+ createTextVNode(
1214
+ toDisplayString(_ctx.label),
1215
+ 1
1216
+ /* TEXT */
1217
+ )
1098
1218
  ])
1099
1219
  ]),
1100
1220
  _: 3
1221
+ /* FORWARDED */
1101
1222
  }, 16, ["class"]);
1102
1223
  };
1103
1224
  }
1104
1225
  });
1105
- const VvIconProps = {
1106
- /**
1107
- * Color
1108
- */
1109
- color: String,
1110
- /**
1111
- * Width
1112
- */
1113
- width: {
1114
- type: [String, Number]
1115
- },
1116
- /**
1117
- * Height
1118
- */
1119
- height: {
1120
- type: [String, Number]
1121
- },
1122
- /**
1123
- * Icon name
1124
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
1125
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
1126
- */
1127
- name: {
1128
- type: String,
1129
- required: true
1130
- },
1131
- /**
1132
- * By default 'vv'
1133
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
1134
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
1135
- */
1136
- provider: {
1137
- type: String
1138
- },
1139
- /**
1140
- * The name of icon set.
1141
- * Icon default options prefix: simple | normal | detailed
1142
- */
1143
- prefix: {
1144
- type: String,
1145
- default: "normal"
1146
- },
1147
- /**
1148
- * Url remote SVG icon
1149
- */
1150
- src: String,
1151
- /**
1152
- * Horizontal flip
1153
- */
1154
- horizontalFlip: Boolean,
1155
- /**
1156
- * Vertical flip
1157
- */
1158
- verticalFlip: Boolean,
1159
- /**
1160
- * String alternative to "horizontalFlip" and "verticalFlip".
1161
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
1162
- */
1163
- flip: String,
1164
- /**
1165
- * Icon render mode
1166
- * 'style' = 'bg' or 'mask', depending on icon content
1167
- * 'bg' = span with style using `background`
1168
- * 'mask' = span with style using `mask`
1169
- * 'svg' = svg
1170
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
1171
- */
1172
- mode: String,
1173
- /**
1174
- * Toggles inline or block mode
1175
- * Example https://docs.iconify.design/icon-components/vue/inline.html
1176
- */
1177
- inline: Boolean,
1178
- /**
1179
- * rotates icon
1180
- * Example https://docs.iconify.design/icon-components/vue/transform.html
1181
- */
1182
- rotate: [Number, String],
1183
- /**
1184
- * A callback that is called when icon data has been loaded
1185
- */
1186
- onLoad: Function,
1187
- /**
1188
- * SVG icon string
1189
- */
1190
- svg: String,
1191
- /**
1192
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
1193
- * @values string | string[]
1194
- */
1195
- modifiers: {
1196
- type: [String, Array]
1197
- }
1226
+ const VvIconPropsDefaults = {
1227
+ prefix: "normal"
1228
+ /* normal */
1198
1229
  };
1199
- const __default__$k = {
1230
+ const __default__$o = {
1200
1231
  name: "VvIcon"
1201
1232
  };
1202
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
1203
- ...__default__$k,
1204
- props: VvIconProps,
1233
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
1234
+ ...__default__$o,
1235
+ props: /* @__PURE__ */ mergeDefaults({
1236
+ name: {},
1237
+ color: {},
1238
+ width: {},
1239
+ height: {},
1240
+ provider: {},
1241
+ prefix: {},
1242
+ src: {},
1243
+ horizontalFlip: { type: Boolean },
1244
+ verticalFlip: { type: Boolean },
1245
+ flip: {},
1246
+ mode: {},
1247
+ inline: { type: Boolean },
1248
+ rotate: {},
1249
+ onLoad: { type: Function },
1250
+ svg: {},
1251
+ modifiers: {}
1252
+ }, VvIconPropsDefaults),
1205
1253
  setup(__props) {
1206
1254
  const props = __props;
1207
1255
  const hasRotate = computed(() => {
@@ -1288,14 +1336,49 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1288
1336
  color: _ctx.color,
1289
1337
  onLoad: _ctx.onLoad,
1290
1338
  icon: unref(icon)
1291
- }), null, 16, ["class"])) : createCommentVNode("", true);
1339
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
1292
1340
  };
1293
1341
  }
1294
1342
  });
1295
1343
  function useInjectedAlertGroup() {
1296
1344
  return inject(INJECTION_KEY_ALERT_GROUP, {});
1297
1345
  }
1298
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
1346
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
1347
+ function useComponentIcon(icon, iconPosition) {
1348
+ const hasIcon = computed(() => {
1349
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
1350
+ return { name: icon == null ? void 0 : icon.value };
1351
+ }
1352
+ return icon == null ? void 0 : icon.value;
1353
+ });
1354
+ const hasIconBefore = computed(
1355
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1356
+ );
1357
+ const hasIconAfter = computed(
1358
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1359
+ );
1360
+ const hasIconLeft = computed(
1361
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1362
+ );
1363
+ const hasIconRight = computed(
1364
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1365
+ );
1366
+ const hasIconTop = computed(
1367
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1368
+ );
1369
+ const hasIconBottom = computed(
1370
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1371
+ );
1372
+ return {
1373
+ hasIcon,
1374
+ hasIconLeft,
1375
+ hasIconRight,
1376
+ hasIconTop,
1377
+ hasIconBottom,
1378
+ hasIconBefore,
1379
+ hasIconAfter
1380
+ };
1381
+ }
1299
1382
  const VvAlertProps = {
1300
1383
  ...IdProps,
1301
1384
  ...ModifiersProps,
@@ -1372,9 +1455,7 @@ const useVvAlert = (props, emit) => {
1372
1455
  const { bus } = useInjectedAlertGroup();
1373
1456
  const hasId = useUniqueId(computed(() => props.id));
1374
1457
  const hasTitleId = computed(() => `${hasId.value}-title`);
1375
- const hasIcon = computed(
1376
- () => typeof props.icon === "string" ? { name: props.icon } : props.icon
1377
- );
1458
+ const { hasIcon } = useComponentIcon(computed(() => props.icon));
1378
1459
  const hasClass = useModifiers(
1379
1460
  "vv-alert",
1380
1461
  computed(() => props.modifiers),
@@ -1437,103 +1518,482 @@ const useVvAlert = (props, emit) => {
1437
1518
  }))
1438
1519
  };
1439
1520
  };
1440
- const _hoisted_1$h = {
1521
+ const _hoisted_1$k = {
1441
1522
  key: 0,
1442
1523
  class: "vv-alert__header"
1443
1524
  };
1444
- const _hoisted_2$c = ["id"];
1445
- const _hoisted_3$6 = ["aria-label"];
1446
- const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "vv-alert__close-mask" }, null, -1);
1447
- const _hoisted_5$4 = [
1525
+ const _hoisted_2$e = ["id"];
1526
+ const _hoisted_3$7 = ["aria-label"];
1527
+ const _hoisted_4$5 = /* @__PURE__ */ createElementVNode(
1528
+ "div",
1529
+ { class: "vv-alert__close-mask" },
1530
+ null,
1531
+ -1
1532
+ /* HOISTED */
1533
+ );
1534
+ const _hoisted_5$5 = [
1448
1535
  _hoisted_4$5
1449
1536
  ];
1450
- const _hoisted_6$4 = {
1537
+ const _hoisted_6$5 = {
1451
1538
  key: 1,
1452
1539
  class: "vv-alert__content"
1453
1540
  };
1454
- const _hoisted_7$4 = {
1541
+ const _hoisted_7$5 = {
1455
1542
  key: 2,
1456
1543
  class: "vv-alert__footer"
1457
1544
  };
1458
- const __default__$j = {
1545
+ const __default__$n = {
1459
1546
  name: "VvAlert"
1460
1547
  };
1461
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1462
- ...__default__$j,
1548
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1549
+ ...__default__$n,
1463
1550
  props: VvAlertProps,
1464
1551
  emits: VvAlertEvents,
1465
- setup(__props, { expose: __expose, emit }) {
1552
+ setup(__props, { expose: __expose, emit: __emit }) {
1466
1553
  const props = __props;
1554
+ const emit = __emit;
1467
1555
  const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
1468
1556
  __expose({ close });
1469
1557
  return (_ctx, _cache) => {
1470
- return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(hasProps))), [
1471
- _ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
1472
- unref(hasIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }), null, 16)) : createCommentVNode("", true),
1473
- renderSlot(_ctx.$slots, "header", {}, () => [
1474
- renderSlot(_ctx.$slots, "title::before"),
1475
- _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
1476
- key: 0,
1477
- id: unref(hasTitleId),
1478
- class: "vv-alert__title"
1479
- }, [
1480
- renderSlot(_ctx.$slots, "title", {}, () => [
1481
- createTextVNode(toDisplayString(_ctx.title), 1)
1482
- ])
1483
- ], 8, _hoisted_2$c)) : createCommentVNode("", true),
1484
- renderSlot(_ctx.$slots, "title::after")
1485
- ]),
1486
- renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
1487
- _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
1488
- key: 0,
1489
- class: "vv-alert__close",
1490
- type: "button",
1491
- "aria-label": _ctx.closeLabel,
1492
- onClick: _cache[0] || (_cache[0] = withModifiers(
1493
- //@ts-ignore
1494
- (...args) => unref(close) && unref(close)(...args),
1495
- ["stop"]
1496
- ))
1497
- }, _hoisted_5$4, 8, _hoisted_3$6)) : createCommentVNode("", true)
1498
- ])
1499
- ])) : createCommentVNode("", true),
1500
- _ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
1501
- renderSlot(_ctx.$slots, "default", {}, () => [
1502
- createTextVNode(toDisplayString(_ctx.content), 1)
1503
- ])
1504
- ])) : createCommentVNode("", true),
1505
- _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
1506
- renderSlot(_ctx.$slots, "footer", {}, () => [
1507
- createTextVNode(toDisplayString(_ctx.footer), 1)
1508
- ])
1509
- ])) : createCommentVNode("", true)
1510
- ], 16);
1558
+ return openBlock(), createElementBlock(
1559
+ "div",
1560
+ normalizeProps(guardReactiveProps(unref(hasProps))),
1561
+ [
1562
+ _ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1$k, [
1563
+ unref(hasIcon) ? (openBlock(), createBlock(
1564
+ _sfc_main$u,
1565
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }),
1566
+ null,
1567
+ 16
1568
+ /* FULL_PROPS */
1569
+ )) : createCommentVNode("v-if", true),
1570
+ renderSlot(_ctx.$slots, "header", {}, () => [
1571
+ renderSlot(_ctx.$slots, "title::before"),
1572
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
1573
+ key: 0,
1574
+ id: unref(hasTitleId),
1575
+ class: "vv-alert__title"
1576
+ }, [
1577
+ renderSlot(_ctx.$slots, "title", {}, () => [
1578
+ createTextVNode(
1579
+ toDisplayString(_ctx.title),
1580
+ 1
1581
+ /* TEXT */
1582
+ )
1583
+ ])
1584
+ ], 8, _hoisted_2$e)) : createCommentVNode("v-if", true),
1585
+ renderSlot(_ctx.$slots, "title::after")
1586
+ ]),
1587
+ renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
1588
+ _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
1589
+ key: 0,
1590
+ class: "vv-alert__close",
1591
+ type: "button",
1592
+ "aria-label": _ctx.closeLabel,
1593
+ onClick: _cache[0] || (_cache[0] = withModifiers(
1594
+ //@ts-ignore
1595
+ (...args) => unref(close) && unref(close)(...args),
1596
+ ["stop"]
1597
+ ))
1598
+ }, _hoisted_5$5, 8, _hoisted_3$7)) : createCommentVNode("v-if", true)
1599
+ ])
1600
+ ])) : createCommentVNode("v-if", true),
1601
+ _ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$5, [
1602
+ renderSlot(_ctx.$slots, "default", {}, () => [
1603
+ createTextVNode(
1604
+ toDisplayString(_ctx.content),
1605
+ 1
1606
+ /* TEXT */
1607
+ )
1608
+ ])
1609
+ ])) : createCommentVNode("v-if", true),
1610
+ _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$5, [
1611
+ renderSlot(_ctx.$slots, "footer", {}, () => [
1612
+ createTextVNode(
1613
+ toDisplayString(_ctx.footer),
1614
+ 1
1615
+ /* TEXT */
1616
+ )
1617
+ ])
1618
+ ])) : createCommentVNode("v-if", true)
1619
+ ],
1620
+ 16
1621
+ /* FULL_PROPS */
1622
+ );
1511
1623
  };
1512
1624
  }
1513
1625
  });
1514
- const VvBadgeProps = {
1626
+ function useProvideAlertGroup({
1627
+ name
1628
+ }) {
1629
+ const bus = mitt();
1630
+ provide(INJECTION_KEY_ALERT_GROUP, {
1631
+ name,
1632
+ bus
1633
+ });
1634
+ return bus;
1635
+ }
1636
+ const VvAlertGroupProps = {
1515
1637
  ...ModifiersProps,
1516
- value: [String, Number]
1517
- };
1518
- const __default__$i = {
1519
- name: "VvBadge"
1638
+ name: {
1639
+ type: String,
1640
+ required: true
1641
+ },
1642
+ items: {
1643
+ type: Array,
1644
+ default: () => []
1645
+ },
1646
+ stack: {
1647
+ type: Boolean,
1648
+ default: false
1649
+ },
1650
+ reverse: {
1651
+ type: Boolean,
1652
+ default: false
1653
+ },
1654
+ inline: {
1655
+ type: String,
1656
+ default: void 0
1657
+ },
1658
+ block: {
1659
+ type: String,
1660
+ default: void 0
1661
+ },
1662
+ position: {
1663
+ type: String,
1664
+ default: void 0
1665
+ },
1666
+ transition: {
1667
+ type: String,
1668
+ default: void 0
1669
+ }
1520
1670
  };
1521
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1522
- ...__default__$i,
1523
- props: VvBadgeProps,
1524
- setup(__props) {
1525
- const props = __props;
1526
- const { modifiers } = toRefs(props);
1527
- const bemCssClasses = useModifiers("vv-badge", modifiers);
1528
- return (_ctx, _cache) => {
1529
- return openBlock(), createElementBlock("span", {
1671
+ const VvAlertGroupEvents = [
1672
+ "close",
1673
+ "before-enter",
1674
+ "after-leave",
1675
+ "enter",
1676
+ "after-enter",
1677
+ "enter-cancelled",
1678
+ "before-leave",
1679
+ "leave",
1680
+ "leave-cancelled"
1681
+ ];
1682
+ const useVvAlertGroup = (props, emit) => {
1683
+ const bus = useProvideAlertGroup({ name: computed(() => props.name) });
1684
+ if (props.block && !props.inline || !props.block && props.inline) {
1685
+ console.warn(
1686
+ `[VvAlertGroup]: block and inline props must coexist at the same time.`
1687
+ );
1688
+ }
1689
+ const hasClass = computed(() => {
1690
+ const toReturn = [
1691
+ useModifiers(
1692
+ "vv-alert-group",
1693
+ computed(() => props.modifiers),
1694
+ computed(() => ({
1695
+ stack: props.stack,
1696
+ reverse: props.reverse,
1697
+ absolute: props.position === "absolute",
1698
+ fixed: props.position === "fixed"
1699
+ }))
1700
+ ).value
1701
+ ];
1702
+ if (props.inline && props.block) {
1703
+ toReturn.push(`vv-alert-group--${props.block}-${props.inline}`);
1704
+ }
1705
+ return toReturn;
1706
+ });
1707
+ const hasTransition = computed(() => {
1708
+ if (props.transition) {
1709
+ return props.transition;
1710
+ }
1711
+ if (!props.position) {
1712
+ return "vv-alert--fade";
1713
+ }
1714
+ if (props.inline === "start") {
1715
+ return "vv-alert--fade-inline-start";
1716
+ }
1717
+ if (props.inline === "end") {
1718
+ return "vv-alert--fade-inline-end";
1719
+ }
1720
+ if (props.block === "top") {
1721
+ return "vv-alert--fade-block-top";
1722
+ }
1723
+ if (props.block === "bottom") {
1724
+ return "vv-alert--fade-block-bottom";
1725
+ }
1726
+ return "vv-alert--fade";
1727
+ });
1728
+ bus.on("close", (id) => {
1729
+ emit("close", id);
1730
+ });
1731
+ return {
1732
+ hasTransition,
1733
+ hasProps: computed(() => ({
1734
+ class: hasClass.value
1735
+ }))
1736
+ };
1737
+ };
1738
+ const __default__$m = {
1739
+ name: "VvAlertGroup"
1740
+ };
1741
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1742
+ ...__default__$m,
1743
+ props: VvAlertGroupProps,
1744
+ emits: VvAlertGroupEvents,
1745
+ setup(__props, { emit: __emit }) {
1746
+ const props = __props;
1747
+ const emit = __emit;
1748
+ const { hasProps, hasTransition } = useVvAlertGroup(props, emit);
1749
+ const alertGroupTransitionHandlers = {
1750
+ "before-enter": () => {
1751
+ emit("before-enter");
1752
+ },
1753
+ "after-leave": () => {
1754
+ emit("after-leave");
1755
+ },
1756
+ enter: () => {
1757
+ emit("enter");
1758
+ },
1759
+ "after-enter": () => {
1760
+ emit("after-enter");
1761
+ },
1762
+ "enter-cancelled": () => {
1763
+ emit("enter-cancelled");
1764
+ },
1765
+ "before-leave": () => {
1766
+ emit("before-leave");
1767
+ },
1768
+ leave: () => {
1769
+ emit("leave");
1770
+ },
1771
+ "leave-cancelled": () => {
1772
+ emit("leave-cancelled");
1773
+ }
1774
+ };
1775
+ return (_ctx, _cache) => {
1776
+ return openBlock(), createElementBlock(
1777
+ "div",
1778
+ normalizeProps(guardReactiveProps(unref(hasProps))),
1779
+ [
1780
+ renderSlot(_ctx.$slots, "before"),
1781
+ createVNode(TransitionGroup, mergeProps({
1782
+ tag: "div",
1783
+ role: "group",
1784
+ name: unref(hasTransition),
1785
+ class: "vv-alert-group__list"
1786
+ }, toHandlers(alertGroupTransitionHandlers)), {
1787
+ default: withCtx(() => [
1788
+ renderSlot(_ctx.$slots, "default", {}, () => [
1789
+ (openBlock(true), createElementBlock(
1790
+ Fragment,
1791
+ null,
1792
+ renderList(_ctx.items, (item) => {
1793
+ return openBlock(), createBlock(
1794
+ _sfc_main$t,
1795
+ mergeProps(item, {
1796
+ key: item.id
1797
+ }),
1798
+ null,
1799
+ 16
1800
+ /* FULL_PROPS */
1801
+ );
1802
+ }),
1803
+ 128
1804
+ /* KEYED_FRAGMENT */
1805
+ ))
1806
+ ])
1807
+ ]),
1808
+ _: 3
1809
+ /* FORWARDED */
1810
+ }, 16, ["name"]),
1811
+ renderSlot(_ctx.$slots, "after")
1812
+ ],
1813
+ 16
1814
+ /* FULL_PROPS */
1815
+ );
1816
+ };
1817
+ }
1818
+ });
1819
+ const VvAvatarProps = {
1820
+ ...ModifiersProps,
1821
+ /**
1822
+ * Image src for avatar
1823
+ */
1824
+ imgSrc: String
1825
+ };
1826
+ const _hoisted_1$j = ["role", "aria-label"];
1827
+ const _hoisted_2$d = ["src"];
1828
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1829
+ __name: "VvAvatar",
1830
+ props: VvAvatarProps,
1831
+ setup(__props) {
1832
+ const props = __props;
1833
+ const { modifiers } = toRefs(props);
1834
+ const bemCssClasses = useModifiers("vv-avatar", modifiers);
1835
+ return (_ctx, _cache) => {
1836
+ return openBlock(), createElementBlock("span", {
1530
1837
  class: normalizeClass(unref(bemCssClasses)),
1531
- role: "status"
1838
+ role: _ctx.imgSrc ? void 0 : "img",
1839
+ "aria-label": _ctx.imgSrc ? void 0 : "avatar"
1532
1840
  }, [
1533
1841
  renderSlot(_ctx.$slots, "default", {}, () => [
1534
- createTextVNode(toDisplayString(_ctx.value), 1)
1842
+ _ctx.imgSrc ? (openBlock(), createElementBlock("img", {
1843
+ key: 0,
1844
+ src: _ctx.imgSrc,
1845
+ alt: "avatar"
1846
+ }, null, 8, _hoisted_2$d)) : createCommentVNode("v-if", true)
1535
1847
  ])
1536
- ], 2);
1848
+ ], 10, _hoisted_1$j);
1849
+ };
1850
+ }
1851
+ });
1852
+ const VvAvatarGroupProps = {
1853
+ ...ModifiersProps,
1854
+ /**
1855
+ * avatar items
1856
+ */
1857
+ items: {
1858
+ type: Array,
1859
+ default: () => [],
1860
+ required: true
1861
+ },
1862
+ toShow: {
1863
+ type: Number,
1864
+ default: 3
1865
+ },
1866
+ totalItems: {
1867
+ type: Number
1868
+ },
1869
+ avatarModifiers: [String, Array]
1870
+ };
1871
+ const _hoisted_1$i = { key: 0 };
1872
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1873
+ __name: "VvAvatarGroup",
1874
+ props: VvAvatarGroupProps,
1875
+ setup(__props) {
1876
+ const props = __props;
1877
+ const { modifiers, items, toShow, totalItems, avatarModifiers } = toRefs(props);
1878
+ const bemCssClasses = useModifiers("vv-avatar-group", modifiers);
1879
+ const stringModifiers = computed(() => {
1880
+ if ((avatarModifiers == null ? void 0 : avatarModifiers.value) && Array.isArray(avatarModifiers == null ? void 0 : avatarModifiers.value)) {
1881
+ return avatarModifiers.value.join(" ");
1882
+ }
1883
+ return (avatarModifiers == null ? void 0 : avatarModifiers.value) || "";
1884
+ });
1885
+ const avatarItems = computed(() => {
1886
+ return items.value.slice(0, toShow.value).map((item) => {
1887
+ let modifiers2 = [];
1888
+ let itemModifiers = [];
1889
+ if (avatarModifiers == null ? void 0 : avatarModifiers.value) {
1890
+ modifiers2 = Array.isArray(avatarModifiers == null ? void 0 : avatarModifiers.value) ? avatarModifiers == null ? void 0 : avatarModifiers.value : [avatarModifiers == null ? void 0 : avatarModifiers.value];
1891
+ }
1892
+ if (item.modifiers) {
1893
+ itemModifiers = Array.isArray(item.modifiers) ? item.modifiers : [item.modifiers];
1894
+ }
1895
+ return {
1896
+ ...item,
1897
+ key: item.key || useUniqueId().value,
1898
+ modifiers: [...modifiers2, ...itemModifiers]
1899
+ };
1900
+ });
1901
+ });
1902
+ return (_ctx, _cache) => {
1903
+ return openBlock(), createElementBlock(
1904
+ "span",
1905
+ {
1906
+ class: normalizeClass(unref(bemCssClasses))
1907
+ },
1908
+ [
1909
+ renderSlot(_ctx.$slots, "default", {}, () => [
1910
+ (openBlock(true), createElementBlock(
1911
+ Fragment,
1912
+ null,
1913
+ renderList(unref(avatarItems), (avatarItem) => {
1914
+ return openBlock(), createBlock(
1915
+ _sfc_main$r,
1916
+ mergeProps({
1917
+ key: avatarItem.key
1918
+ }, {
1919
+ modifiers: avatarItem.modifiers,
1920
+ imgSrc: avatarItem.imgSrc
1921
+ }),
1922
+ {
1923
+ default: withCtx(() => [
1924
+ avatarItem.text ? (openBlock(), createElementBlock(
1925
+ "span",
1926
+ _hoisted_1$i,
1927
+ toDisplayString(avatarItem.text),
1928
+ 1
1929
+ /* TEXT */
1930
+ )) : createCommentVNode("v-if", true)
1931
+ ]),
1932
+ _: 2
1933
+ /* DYNAMIC */
1934
+ },
1935
+ 1040
1936
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1937
+ );
1938
+ }),
1939
+ 128
1940
+ /* KEYED_FRAGMENT */
1941
+ )),
1942
+ (unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$r, {
1943
+ key: 0,
1944
+ modifiers: `${unref(stringModifiers)} surface bordered`
1945
+ }, {
1946
+ default: withCtx(() => [
1947
+ createTextVNode(
1948
+ toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`),
1949
+ 1
1950
+ /* TEXT */
1951
+ )
1952
+ ]),
1953
+ _: 1
1954
+ /* STABLE */
1955
+ }, 8, ["modifiers"])) : createCommentVNode("v-if", true)
1956
+ ])
1957
+ ],
1958
+ 2
1959
+ /* CLASS */
1960
+ );
1961
+ };
1962
+ }
1963
+ });
1964
+ const VvBadgeProps = {
1965
+ ...ModifiersProps,
1966
+ value: [String, Number]
1967
+ };
1968
+ const __default__$l = {
1969
+ name: "VvBadge"
1970
+ };
1971
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1972
+ ...__default__$l,
1973
+ props: VvBadgeProps,
1974
+ setup(__props) {
1975
+ const props = __props;
1976
+ const { modifiers } = toRefs(props);
1977
+ const bemCssClasses = useModifiers("vv-badge", modifiers);
1978
+ return (_ctx, _cache) => {
1979
+ return openBlock(), createElementBlock(
1980
+ "span",
1981
+ {
1982
+ class: normalizeClass(unref(bemCssClasses)),
1983
+ role: "status"
1984
+ },
1985
+ [
1986
+ renderSlot(_ctx.$slots, "default", {}, () => [
1987
+ createTextVNode(
1988
+ toDisplayString(_ctx.value),
1989
+ 1
1990
+ /* TEXT */
1991
+ )
1992
+ ])
1993
+ ],
1994
+ 2
1995
+ /* CLASS */
1996
+ );
1537
1997
  };
1538
1998
  }
1539
1999
  });
@@ -1541,58 +2001,83 @@ const VvBreadcrumbProps = {
1541
2001
  ...ModifiersProps,
1542
2002
  routes: Array
1543
2003
  };
1544
- const _hoisted_1$g = { class: "vv-breadcrumb__list" };
1545
- const _hoisted_2$b = ["content"];
1546
- const __default__$h = {
2004
+ const _hoisted_1$h = { class: "vv-breadcrumb__list" };
2005
+ const _hoisted_2$c = ["content"];
2006
+ const __default__$k = {
1547
2007
  name: "VvBreadcrumb"
1548
2008
  };
1549
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1550
- ...__default__$h,
2009
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2010
+ ...__default__$k,
1551
2011
  props: VvBreadcrumbProps,
1552
2012
  setup(__props) {
1553
2013
  const props = __props;
1554
2014
  const { modifiers } = toRefs(props);
1555
2015
  const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
2016
+ const length = computed(() => {
2017
+ var _a;
2018
+ return ((_a = props.routes) == null ? void 0 : _a.length) ?? 0;
2019
+ });
2020
+ const isLast = (index) => index === length.value - 1;
1556
2021
  return (_ctx, _cache) => {
1557
- return openBlock(), createElementBlock("nav", {
1558
- class: normalizeClass(unref(bemCssClasses)),
1559
- "aria-label": "breadcrumbs"
1560
- }, [
1561
- createElementVNode("ol", _hoisted_1$g, [
1562
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
1563
- var _a, _b, _c, _d;
1564
- return openBlock(), createElementBlock("li", {
1565
- key: `${route.label}-${index}`,
1566
- class: normalizeClass({
1567
- "vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
1568
- "vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
2022
+ return openBlock(), createElementBlock(
2023
+ "nav",
2024
+ {
2025
+ class: normalizeClass(unref(bemCssClasses)),
2026
+ "aria-label": "breadcrumbs"
2027
+ },
2028
+ [
2029
+ createElementVNode("ol", _hoisted_1$h, [
2030
+ (openBlock(true), createElementBlock(
2031
+ Fragment,
2032
+ null,
2033
+ renderList(_ctx.routes, ({ label, ...route }, index) => {
2034
+ return openBlock(), createElementBlock(
2035
+ "li",
2036
+ {
2037
+ key: `${label}-${index}`,
2038
+ class: normalizeClass(
2039
+ !isLast(index) ? "vv-breadcrumb__item" : "vv-breadcrumb__item-active"
2040
+ ),
2041
+ itemprop: "itemListElement",
2042
+ itemtype: "https://schema.org/ListItem",
2043
+ itemscope: ""
2044
+ },
2045
+ [
2046
+ createVNode(_sfc_main$v, mergeProps(route, {
2047
+ class: !isLast(index) ? "vv-breadcrumb__link" : "vv-breadcrumb__label",
2048
+ "aria-current": isLast(index) ? "page" : void 0,
2049
+ itemprop: "item",
2050
+ "default-tag": "span"
2051
+ }), {
2052
+ default: withCtx(() => [
2053
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
2054
+ createTextVNode(
2055
+ toDisplayString(label),
2056
+ 1
2057
+ /* TEXT */
2058
+ )
2059
+ ])
2060
+ ]),
2061
+ _: 2
2062
+ /* DYNAMIC */
2063
+ }, 1040, ["class", "aria-current"]),
2064
+ createElementVNode("meta", {
2065
+ itemprop: "position",
2066
+ content: `${index + 1}`
2067
+ }, null, 8, _hoisted_2$c)
2068
+ ],
2069
+ 2
2070
+ /* CLASS */
2071
+ );
1569
2072
  }),
1570
- itemprop: "itemListElement",
1571
- itemtype: "https://schema.org/ListItem",
1572
- itemscope: ""
1573
- }, [
1574
- (openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
1575
- class: {
1576
- "vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
1577
- },
1578
- "aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
1579
- itemprop: "item"
1580
- }), {
1581
- default: withCtx(() => [
1582
- renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
1583
- createTextVNode(toDisplayString(route.label), 1)
1584
- ])
1585
- ]),
1586
- _: 2
1587
- }, 1040, ["class", "aria-current"])),
1588
- createElementVNode("meta", {
1589
- itemprop: "position",
1590
- content: `${index + 1}`
1591
- }, null, 8, _hoisted_2$b)
1592
- ], 2);
1593
- }), 128))
1594
- ])
1595
- ], 2);
2073
+ 128
2074
+ /* KEYED_FRAGMENT */
2075
+ ))
2076
+ ])
2077
+ ],
2078
+ 2
2079
+ /* CLASS */
2080
+ );
1596
2081
  };
1597
2082
  }
1598
2083
  });
@@ -1603,10 +2088,7 @@ const VvButtonProps = {
1603
2088
  ...ModifiersProps,
1604
2089
  ...UnselectableProps,
1605
2090
  ...LoadingProps,
1606
- /**
1607
- * Button icon
1608
- */
1609
- icon: [String, Object],
2091
+ ...IconProps,
1610
2092
  /**
1611
2093
  * Button icon position
1612
2094
  */
@@ -1700,25 +2182,26 @@ function useGroupProps$2(props, emit) {
1700
2182
  label
1701
2183
  };
1702
2184
  }
1703
- const _hoisted_1$f = {
2185
+ const _hoisted_1$g = {
1704
2186
  key: 1,
1705
2187
  class: "vv-button__label"
1706
2188
  };
1707
- const _hoisted_2$a = {
2189
+ const _hoisted_2$b = {
1708
2190
  key: 1,
1709
2191
  class: "vv-button__label"
1710
2192
  };
1711
- const __default__$g = {
2193
+ const __default__$j = {
1712
2194
  name: "VvButton"
1713
2195
  };
1714
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1715
- ...__default__$g,
2196
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2197
+ ...__default__$j,
1716
2198
  props: VvButtonProps,
1717
2199
  emits: VvButtonEvents,
1718
- setup(__props, { expose: __expose, emit }) {
2200
+ setup(__props, { expose: __expose, emit: __emit }) {
1719
2201
  const props = __props;
1720
2202
  const attrs = useAttrs();
1721
2203
  const slots = useSlots();
2204
+ const emit = __emit;
1722
2205
  const {
1723
2206
  id,
1724
2207
  modifiers,
@@ -1762,9 +2245,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1762
2245
  )
1763
2246
  }))
1764
2247
  );
1765
- const hasIconProps = computed(
1766
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
1767
- );
2248
+ const { hasIcon } = useComponentIcon(icon);
1768
2249
  const toggleValue = computed(() => {
1769
2250
  return props.value !== void 0 ? props.value : name.value;
1770
2251
  });
@@ -1790,7 +2271,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1790
2271
  }
1791
2272
  };
1792
2273
  return (_ctx, _cache) => {
1793
- return openBlock(), createBlock(_sfc_main$o, mergeProps({
2274
+ return openBlock(), createBlock(_sfc_main$v, mergeProps({
1794
2275
  disabled: unref(disabled),
1795
2276
  pressed: unref(pressed),
1796
2277
  active: _ctx.active,
@@ -1810,28 +2291,48 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1810
2291
  default: withCtx(() => [
1811
2292
  renderSlot(_ctx.$slots, "default", {}, () => [
1812
2293
  _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
1813
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$n, {
2294
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$u, {
1814
2295
  key: 0,
1815
2296
  class: "vv-button__loading-icon",
1816
2297
  name: _ctx.loadingIcon
1817
- }, null, 8, ["name"])) : createCommentVNode("", true),
1818
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$f, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
1819
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1820
- renderSlot(_ctx.$slots, "before"),
1821
- unref(icon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
1822
- key: 0,
1823
- class: "vv-button__icon"
1824
- }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
1825
- unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$a, [
1826
- renderSlot(_ctx.$slots, "label", {}, () => [
1827
- createTextVNode(toDisplayString(unref(label)), 1)
1828
- ])
1829
- ])) : createCommentVNode("", true),
1830
- renderSlot(_ctx.$slots, "after")
1831
- ], 64))
2298
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
2299
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
2300
+ "span",
2301
+ _hoisted_1$g,
2302
+ toDisplayString(_ctx.loadingLabel),
2303
+ 1
2304
+ /* TEXT */
2305
+ )) : createCommentVNode("v-if", true)
2306
+ ]) : (openBlock(), createElementBlock(
2307
+ Fragment,
2308
+ { key: 1 },
2309
+ [
2310
+ renderSlot(_ctx.$slots, "before"),
2311
+ unref(hasIcon) ? (openBlock(), createBlock(
2312
+ _sfc_main$u,
2313
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2314
+ null,
2315
+ 16
2316
+ /* FULL_PROPS */
2317
+ )) : createCommentVNode("v-if", true),
2318
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$b, [
2319
+ renderSlot(_ctx.$slots, "label", {}, () => [
2320
+ createTextVNode(
2321
+ toDisplayString(unref(label)),
2322
+ 1
2323
+ /* TEXT */
2324
+ )
2325
+ ])
2326
+ ])) : createCommentVNode("v-if", true),
2327
+ renderSlot(_ctx.$slots, "after")
2328
+ ],
2329
+ 64
2330
+ /* STABLE_FRAGMENT */
2331
+ ))
1832
2332
  ])
1833
2333
  ]),
1834
2334
  _: 3
2335
+ /* FORWARDED */
1835
2336
  }, 16, ["id", "class"]);
1836
2337
  };
1837
2338
  }
@@ -1855,14 +2356,15 @@ const VvButtonGroupProps = {
1855
2356
  }
1856
2357
  };
1857
2358
  const VvButtonGroupEvents = ["update:modelValue"];
1858
- const __default__$f = {
2359
+ const __default__$i = {
1859
2360
  name: "VvButtonGroup"
1860
2361
  };
1861
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1862
- ...__default__$f,
2362
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2363
+ ...__default__$i,
1863
2364
  props: VvButtonGroupProps,
1864
2365
  emits: VvButtonGroupEvents,
1865
- setup(__props, { emit }) {
2366
+ setup(__props, { emit: __emit }) {
2367
+ const emit = __emit;
1866
2368
  const props = __props;
1867
2369
  const {
1868
2370
  disabled,
@@ -1904,12 +2406,18 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1904
2406
  });
1905
2407
  const bemCssClasses = useModifiers("vv-button-group", modifiers);
1906
2408
  return (_ctx, _cache) => {
1907
- return openBlock(), createElementBlock("div", {
1908
- class: normalizeClass(unref(bemCssClasses)),
1909
- role: "group"
1910
- }, [
1911
- renderSlot(_ctx.$slots, "default")
1912
- ], 2);
2409
+ return openBlock(), createElementBlock(
2410
+ "div",
2411
+ {
2412
+ class: normalizeClass(unref(bemCssClasses)),
2413
+ role: "group"
2414
+ },
2415
+ [
2416
+ renderSlot(_ctx.$slots, "default")
2417
+ ],
2418
+ 2
2419
+ /* CLASS */
2420
+ );
1913
2421
  };
1914
2422
  }
1915
2423
  });
@@ -1917,45 +2425,55 @@ const VvCardProps = {
1917
2425
  ...ModifiersProps,
1918
2426
  title: String
1919
2427
  };
1920
- const _hoisted_1$e = {
2428
+ const _hoisted_1$f = {
1921
2429
  key: 0,
1922
2430
  class: "vv-card__header"
1923
2431
  };
1924
- const _hoisted_2$9 = {
2432
+ const _hoisted_2$a = {
1925
2433
  key: 1,
1926
2434
  class: "vv-card__content"
1927
2435
  };
1928
- const _hoisted_3$5 = {
2436
+ const _hoisted_3$6 = {
1929
2437
  key: 2,
1930
2438
  class: "vv-card__footer"
1931
2439
  };
1932
- const __default__$e = {
2440
+ const __default__$h = {
1933
2441
  name: "VvCard"
1934
2442
  };
1935
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1936
- ...__default__$e,
2443
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
2444
+ ...__default__$h,
1937
2445
  props: VvCardProps,
1938
2446
  setup(__props) {
1939
2447
  const props = __props;
1940
2448
  const { modifiers } = toRefs(props);
1941
2449
  const bemCssClasses = useModifiers("vv-card", modifiers);
1942
2450
  return (_ctx, _cache) => {
1943
- return openBlock(), createElementBlock("article", {
1944
- class: normalizeClass(unref(bemCssClasses))
1945
- }, [
1946
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$e, [
1947
- renderSlot(_ctx.$slots, "header", {}, () => [
1948
- createTextVNode(toDisplayString(_ctx.title), 1)
1949
- ])
1950
- ])) : createCommentVNode("", true),
1951
- renderSlot(_ctx.$slots, "default"),
1952
- _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
1953
- renderSlot(_ctx.$slots, "content")
1954
- ])) : createCommentVNode("", true),
1955
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$5, [
1956
- renderSlot(_ctx.$slots, "footer")
1957
- ])) : createCommentVNode("", true)
1958
- ], 2);
2451
+ return openBlock(), createElementBlock(
2452
+ "article",
2453
+ {
2454
+ class: normalizeClass(unref(bemCssClasses))
2455
+ },
2456
+ [
2457
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$f, [
2458
+ renderSlot(_ctx.$slots, "header", {}, () => [
2459
+ createTextVNode(
2460
+ toDisplayString(_ctx.title),
2461
+ 1
2462
+ /* TEXT */
2463
+ )
2464
+ ])
2465
+ ])) : createCommentVNode("v-if", true),
2466
+ renderSlot(_ctx.$slots, "default"),
2467
+ _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
2468
+ renderSlot(_ctx.$slots, "content")
2469
+ ])) : createCommentVNode("v-if", true),
2470
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$6, [
2471
+ renderSlot(_ctx.$slots, "footer")
2472
+ ])) : createCommentVNode("v-if", true)
2473
+ ],
2474
+ 2
2475
+ /* CLASS */
2476
+ );
1959
2477
  };
1960
2478
  }
1961
2479
  });
@@ -2180,17 +2698,18 @@ function useDefaults(componentName, propsDefinition, props) {
2180
2698
  }, {});
2181
2699
  });
2182
2700
  }
2183
- const _hoisted_1$d = ["for"];
2184
- const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
2185
- const __default__$d = {
2701
+ const _hoisted_1$e = ["for"];
2702
+ const _hoisted_2$9 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
2703
+ const __default__$g = {
2186
2704
  name: "VvCheckbox"
2187
2705
  };
2188
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2189
- ...__default__$d,
2706
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2707
+ ...__default__$g,
2190
2708
  props: VvCheckboxProps,
2191
2709
  emits: VvCheckboxEvents,
2192
- setup(__props, { emit }) {
2710
+ setup(__props, { emit: __emit }) {
2193
2711
  const props = __props;
2712
+ const emit = __emit;
2194
2713
  const slots = useSlots();
2195
2714
  const propsDefaults = useDefaults(
2196
2715
  "VvCheckbox",
@@ -2329,16 +2848,23 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2329
2848
  "aria-invalid": unref(isInvalid),
2330
2849
  "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2331
2850
  "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
2332
- }, null, 8, _hoisted_2$8), [
2851
+ }, null, 8, _hoisted_2$9), [
2333
2852
  [vModelCheckbox, unref(localModelValue)]
2334
2853
  ]),
2335
2854
  renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
2336
- createTextVNode(toDisplayString(_ctx.label), 1)
2855
+ createTextVNode(
2856
+ toDisplayString(_ctx.label),
2857
+ 1
2858
+ /* TEXT */
2859
+ )
2337
2860
  ]),
2338
2861
  createVNode(unref(HintSlot), {
2339
2862
  id: unref(hasHintId),
2340
2863
  class: "vv-checkbox__hint"
2341
- }, createSlots({ _: 2 }, [
2864
+ }, createSlots({
2865
+ _: 2
2866
+ /* DYNAMIC */
2867
+ }, [
2342
2868
  _ctx.$slots.hint ? {
2343
2869
  name: "hint",
2344
2870
  fn: withCtx(() => [
@@ -2368,7 +2894,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2368
2894
  key: "3"
2369
2895
  } : void 0
2370
2896
  ]), 1032, ["id"])
2371
- ], 10, _hoisted_1$d);
2897
+ ], 10, _hoisted_1$e);
2372
2898
  };
2373
2899
  }
2374
2900
  });
@@ -2406,17 +2932,18 @@ function useOptions(props) {
2406
2932
  getOptionGrouped
2407
2933
  };
2408
2934
  }
2409
- const _hoisted_1$c = ["textContent"];
2410
- const _hoisted_2$7 = { class: "vv-checkbox-group__wrapper" };
2411
- const __default__$c = {
2935
+ const _hoisted_1$d = ["textContent"];
2936
+ const _hoisted_2$8 = { class: "vv-checkbox-group__wrapper" };
2937
+ const __default__$f = {
2412
2938
  name: "VvCheckboxGroup"
2413
2939
  };
2414
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2415
- ...__default__$c,
2940
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2941
+ ...__default__$f,
2416
2942
  props: VvCheckboxGroupProps,
2417
2943
  emits: VvCheckboxGroupEvents,
2418
- setup(__props, { emit }) {
2944
+ setup(__props, { emit: __emit }) {
2419
2945
  const props = __props;
2946
+ const emit = __emit;
2420
2947
  const slots = useSlots();
2421
2948
  const propsDefaults = useDefaults(
2422
2949
  "VvCheckboxGroup",
@@ -2455,54 +2982,85 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2455
2982
  };
2456
2983
  const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
2457
2984
  return (_ctx, _cache) => {
2458
- return openBlock(), createElementBlock("fieldset", {
2459
- class: normalizeClass(unref(bemCssClasses))
2460
- }, [
2461
- _ctx.label ? (openBlock(), createElementBlock("legend", {
2462
- key: 0,
2463
- textContent: toDisplayString(_ctx.label)
2464
- }, null, 8, _hoisted_1$c)) : createCommentVNode("", true),
2465
- createElementVNode("div", _hoisted_2$7, [
2466
- _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
2467
- return openBlock(), createBlock(_sfc_main$g, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2468
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
2469
- ]),
2470
- createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
2471
- _ctx.$slots.hint ? {
2472
- name: "hint",
2473
- fn: withCtx(() => [
2474
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2475
- ]),
2476
- key: "0"
2477
- } : void 0,
2478
- _ctx.$slots.loading ? {
2479
- name: "loading",
2480
- fn: withCtx(() => [
2481
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2482
- ]),
2483
- key: "1"
2484
- } : void 0,
2485
- _ctx.$slots.valid ? {
2486
- name: "valid",
2487
- fn: withCtx(() => [
2488
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2489
- ]),
2490
- key: "2"
2491
- } : void 0,
2492
- _ctx.$slots.invalid ? {
2493
- name: "invalid",
2494
- fn: withCtx(() => [
2495
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2985
+ return openBlock(), createElementBlock(
2986
+ "fieldset",
2987
+ {
2988
+ class: normalizeClass(unref(bemCssClasses))
2989
+ },
2990
+ [
2991
+ _ctx.label ? (openBlock(), createElementBlock("legend", {
2992
+ key: 0,
2993
+ textContent: toDisplayString(_ctx.label)
2994
+ }, null, 8, _hoisted_1$d)) : createCommentVNode("v-if", true),
2995
+ createElementVNode("div", _hoisted_2$8, [
2996
+ _ctx.options.length > 0 ? (openBlock(true), createElementBlock(
2997
+ Fragment,
2998
+ { key: 0 },
2999
+ renderList(_ctx.options, (option, index) => {
3000
+ return openBlock(), createBlock(
3001
+ _sfc_main$k,
3002
+ mergeProps({ key: index }, getOptionProps(option, index)),
3003
+ null,
3004
+ 16
3005
+ /* FULL_PROPS */
3006
+ );
3007
+ }),
3008
+ 128
3009
+ /* KEYED_FRAGMENT */
3010
+ )) : renderSlot(_ctx.$slots, "default", { key: 1 })
3011
+ ]),
3012
+ createVNode(
3013
+ unref(HintSlot),
3014
+ { class: "vv-checkbox-group__hint" },
3015
+ createSlots({
3016
+ _: 2
3017
+ /* DYNAMIC */
3018
+ }, [
3019
+ _ctx.$slots.hint ? {
3020
+ name: "hint",
3021
+ fn: withCtx(() => [
3022
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3023
+ ]),
3024
+ key: "0"
3025
+ } : void 0,
3026
+ _ctx.$slots.loading ? {
3027
+ name: "loading",
3028
+ fn: withCtx(() => [
3029
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3030
+ ]),
3031
+ key: "1"
3032
+ } : void 0,
3033
+ _ctx.$slots.valid ? {
3034
+ name: "valid",
3035
+ fn: withCtx(() => [
3036
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3037
+ ]),
3038
+ key: "2"
3039
+ } : void 0,
3040
+ _ctx.$slots.invalid ? {
3041
+ name: "invalid",
3042
+ fn: withCtx(() => [
3043
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3044
+ ]),
3045
+ key: "3"
3046
+ } : void 0
2496
3047
  ]),
2497
- key: "3"
2498
- } : void 0
2499
- ]), 1024)
2500
- ], 2);
3048
+ 1024
3049
+ /* DYNAMIC_SLOTS */
3050
+ )
3051
+ ],
3052
+ 2
3053
+ /* CLASS */
3054
+ );
2501
3055
  };
2502
3056
  }
2503
3057
  });
2504
3058
  const VvComboboxEvents = [
2505
3059
  "update:modelValue",
3060
+ "update:search",
3061
+ /**
3062
+ * @deprecated change:search should not be used, use update:search instead
3063
+ */
2506
3064
  "change:search",
2507
3065
  "focus",
2508
3066
  "blur"
@@ -2726,13 +3284,13 @@ function useProvideDropdownAction({
2726
3284
  expanded
2727
3285
  });
2728
3286
  }
2729
- const _hoisted_1$b = ["id", "tabindex", "role", "aria-labelledby"];
2730
- const __default__$b = {
3287
+ const _hoisted_1$c = ["id", "tabindex", "role", "aria-labelledby"];
3288
+ const __default__$e = {
2731
3289
  name: "VvDropdown",
2732
3290
  inheritAttrs: false
2733
3291
  };
2734
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2735
- ...__default__$b,
3292
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3293
+ ...__default__$e,
2736
3294
  props: VvDropdownProps,
2737
3295
  emits: [
2738
3296
  "update:modelValue",
@@ -2749,8 +3307,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2749
3307
  "leave",
2750
3308
  "leave-cancelled"
2751
3309
  ],
2752
- setup(__props, { expose: __expose, emit }) {
3310
+ setup(__props, { expose: __expose, emit: __emit }) {
2753
3311
  const props = __props;
3312
+ const emit = __emit;
2754
3313
  const { id } = toRefs(props);
2755
3314
  const hasId = useUniqueId(id);
2756
3315
  const attrs = useAttrs();
@@ -3086,58 +3645,78 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3086
3645
  }
3087
3646
  };
3088
3647
  return (_ctx, _cache) => {
3089
- return openBlock(), createElementBlock(Fragment, null, [
3090
- createVNode(unref(VvDropdownTriggerProvider), null, {
3091
- default: withCtx(() => [
3092
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
3093
- ]),
3094
- _: 3
3095
- }),
3096
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
3097
- default: withCtx(() => [
3098
- withDirectives(createElementVNode("div", {
3099
- ref_key: "floatingEl",
3100
- ref: floatingEl,
3101
- style: normalizeStyle(unref(dropdownPlacement)),
3102
- class: normalizeClass(unref(bemCssClasses))
3103
- }, [
3104
- props.arrow ? (openBlock(), createElementBlock("div", {
3105
- key: 0,
3106
- ref_key: "arrowEl",
3107
- ref: arrowEl,
3108
- style: normalizeStyle(unref(arrowPlacement)),
3109
- class: "vv-dropdown__arrow"
3110
- }, null, 4)) : createCommentVNode("", true),
3111
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
3112
- createElementVNode("div", mergeProps(unref(attrs), {
3113
- id: unref(hasId),
3114
- ref_key: "listEl",
3115
- ref: listEl,
3116
- tabindex: !unref(expanded) ? -1 : void 0,
3117
- role: unref(role),
3118
- "aria-labelledby": unref(hasAriaLabelledby),
3119
- class: "vv-dropdown__list"
3120
- }), [
3121
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
3122
- role: unref(itemRole)
3123
- })))
3124
- ], 16, _hoisted_1$b),
3125
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
3126
- ], 6), [
3127
- [vShow, unref(expanded)]
3128
- ])
3129
- ]),
3130
- _: 3
3131
- }, 16, ["name"])
3132
- ], 64);
3648
+ return openBlock(), createElementBlock(
3649
+ Fragment,
3650
+ null,
3651
+ [
3652
+ createVNode(unref(VvDropdownTriggerProvider), null, {
3653
+ default: withCtx(() => [
3654
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
3655
+ ]),
3656
+ _: 3
3657
+ /* FORWARDED */
3658
+ }),
3659
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
3660
+ default: withCtx(() => [
3661
+ withDirectives(createElementVNode(
3662
+ "div",
3663
+ {
3664
+ ref_key: "floatingEl",
3665
+ ref: floatingEl,
3666
+ style: normalizeStyle(unref(dropdownPlacement)),
3667
+ class: normalizeClass(unref(bemCssClasses))
3668
+ },
3669
+ [
3670
+ props.arrow ? (openBlock(), createElementBlock(
3671
+ "div",
3672
+ {
3673
+ key: 0,
3674
+ ref_key: "arrowEl",
3675
+ ref: arrowEl,
3676
+ style: normalizeStyle(unref(arrowPlacement)),
3677
+ class: "vv-dropdown__arrow"
3678
+ },
3679
+ null,
3680
+ 4
3681
+ /* STYLE */
3682
+ )) : createCommentVNode("v-if", true),
3683
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
3684
+ createElementVNode("div", mergeProps(unref(attrs), {
3685
+ id: unref(hasId),
3686
+ ref_key: "listEl",
3687
+ ref: listEl,
3688
+ tabindex: !unref(expanded) ? -1 : void 0,
3689
+ role: unref(role),
3690
+ "aria-labelledby": unref(hasAriaLabelledby),
3691
+ class: "vv-dropdown__list"
3692
+ }), [
3693
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
3694
+ role: unref(itemRole)
3695
+ })))
3696
+ ], 16, _hoisted_1$c),
3697
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
3698
+ ],
3699
+ 6
3700
+ /* CLASS, STYLE */
3701
+ ), [
3702
+ [vShow, unref(expanded)]
3703
+ ])
3704
+ ]),
3705
+ _: 3
3706
+ /* FORWARDED */
3707
+ }, 16, ["name"])
3708
+ ],
3709
+ 64
3710
+ /* STABLE_FRAGMENT */
3711
+ );
3133
3712
  };
3134
3713
  }
3135
3714
  });
3136
- const __default__$a = {
3715
+ const __default__$d = {
3137
3716
  name: "VvDropdownItem"
3138
3717
  };
3139
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
3140
- ...__default__$a,
3718
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
3719
+ ...__default__$d,
3141
3720
  setup(__props) {
3142
3721
  const { role, expanded } = useInjectedDropdownItem();
3143
3722
  const element = ref(null);
@@ -3151,22 +3730,28 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3151
3730
  }
3152
3731
  });
3153
3732
  return (_ctx, _cache) => {
3154
- return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
3155
- ref_key: "element",
3156
- ref: element,
3157
- class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
3158
- }), [
3159
- renderSlot(_ctx.$slots, "default")
3160
- ], 16);
3733
+ return openBlock(), createElementBlock(
3734
+ "div",
3735
+ mergeProps({ role: unref(role) }, {
3736
+ ref_key: "element",
3737
+ ref: element,
3738
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
3739
+ }),
3740
+ [
3741
+ renderSlot(_ctx.$slots, "default")
3742
+ ],
3743
+ 16
3744
+ /* FULL_PROPS */
3745
+ );
3161
3746
  };
3162
3747
  }
3163
3748
  });
3164
- const _hoisted_1$a = ["title"];
3165
- const __default__$9 = {
3749
+ const _hoisted_1$b = ["title"];
3750
+ const __default__$c = {
3166
3751
  name: "VvDropdownOption"
3167
3752
  };
3168
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
3169
- ...__default__$9,
3753
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
3754
+ ...__default__$c,
3170
3755
  props: {
3171
3756
  ...DisabledProps,
3172
3757
  ...SelectedProps,
@@ -3203,7 +3788,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3203
3788
  }
3204
3789
  });
3205
3790
  return (_ctx, _cache) => {
3206
- return openBlock(), createBlock(_sfc_main$d, {
3791
+ return openBlock(), createBlock(_sfc_main$h, {
3207
3792
  class: normalizeClass(unref(bemCssClasses)),
3208
3793
  tabindex: _ctx.disabled ? -1 : 0,
3209
3794
  "aria-selected": _ctx.selected,
@@ -3216,32 +3801,43 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3216
3801
  title: unref(hintLabel)
3217
3802
  }, [
3218
3803
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
3219
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
3804
+ createTextVNode(
3805
+ toDisplayString(unref(hintLabel)),
3806
+ 1
3807
+ /* TEXT */
3808
+ )
3220
3809
  ])
3221
- ], 8, _hoisted_1$a)
3810
+ ], 8, _hoisted_1$b)
3222
3811
  ]),
3223
3812
  _: 3
3813
+ /* FORWARDED */
3224
3814
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
3225
3815
  };
3226
3816
  }
3227
3817
  });
3228
- const _hoisted_1$9 = {
3818
+ const _hoisted_1$a = {
3229
3819
  class: "vv-dropdown-optgroup",
3230
3820
  role: "presentation",
3231
3821
  tabindex: "-1"
3232
3822
  };
3233
- const __default__$8 = {
3823
+ const __default__$b = {
3234
3824
  name: "VvDropdownOptgroup"
3235
3825
  };
3236
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3237
- ...__default__$8,
3826
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
3827
+ ...__default__$b,
3238
3828
  props: {
3239
3829
  ...LabelProps
3240
3830
  },
3241
3831
  setup(__props) {
3242
3832
  const props = __props;
3243
3833
  return (_ctx, _cache) => {
3244
- return openBlock(), createElementBlock("li", _hoisted_1$9, toDisplayString(props.label), 1);
3834
+ return openBlock(), createElementBlock(
3835
+ "li",
3836
+ _hoisted_1$a,
3837
+ toDisplayString(props.label),
3838
+ 1
3839
+ /* TEXT */
3840
+ );
3245
3841
  };
3246
3842
  }
3247
3843
  });
@@ -3303,66 +3899,32 @@ function useComponentFocus(inputTemplateRef, emit) {
3303
3899
  focused
3304
3900
  };
3305
3901
  }
3306
- function useComponentIcon(icon, iconPosition) {
3307
- const hasIconBefore = computed(
3308
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
3309
- );
3310
- const hasIconAfter = computed(
3311
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
3312
- );
3313
- const hasIconLeft = computed(
3314
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
3315
- );
3316
- const hasIconRight = computed(
3317
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
3318
- );
3319
- const hasIconTop = computed(
3320
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
3321
- );
3322
- const hasIconBottom = computed(
3323
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
3324
- );
3325
- const hasIcon = computed(() => {
3326
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
3327
- return { name: icon == null ? void 0 : icon.value };
3328
- }
3329
- return icon == null ? void 0 : icon.value;
3330
- });
3331
- return {
3332
- hasIcon,
3333
- hasIconLeft,
3334
- hasIconRight,
3335
- hasIconTop,
3336
- hasIconBottom,
3337
- hasIconBefore,
3338
- hasIconAfter
3339
- };
3340
- }
3341
- const _hoisted_1$8 = ["for"];
3342
- const _hoisted_2$6 = { class: "vv-select__wrapper" };
3343
- const _hoisted_3$4 = {
3902
+ const _hoisted_1$9 = ["for"];
3903
+ const _hoisted_2$7 = { class: "vv-select__wrapper" };
3904
+ const _hoisted_3$5 = {
3344
3905
  key: 0,
3345
3906
  class: "vv-select__input-before"
3346
3907
  };
3347
3908
  const _hoisted_4$4 = { class: "vv-select__inner" };
3348
- const _hoisted_5$3 = ["id"];
3349
- const _hoisted_6$3 = ["disabled", "hidden"];
3350
- const _hoisted_7$3 = ["disabled", "value"];
3909
+ const _hoisted_5$4 = ["id"];
3910
+ const _hoisted_6$4 = ["disabled", "hidden"];
3911
+ const _hoisted_7$4 = ["disabled", "value"];
3351
3912
  const _hoisted_8$2 = ["disabled", "label"];
3352
- const _hoisted_9$1 = ["disabled", "value"];
3353
- const _hoisted_10 = {
3913
+ const _hoisted_9$2 = ["disabled", "value"];
3914
+ const _hoisted_10$1 = {
3354
3915
  key: 1,
3355
3916
  class: "vv-select__input-after"
3356
3917
  };
3357
- const __default__$7 = {
3918
+ const __default__$a = {
3358
3919
  name: "VvSelect"
3359
3920
  };
3360
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3361
- ...__default__$7,
3921
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3922
+ ...__default__$a,
3362
3923
  props: VvSelectProps,
3363
3924
  emits: VvSelectEmits,
3364
- setup(__props, { emit }) {
3925
+ setup(__props, { emit: __emit }) {
3365
3926
  const props = __props;
3927
+ const emit = __emit;
3366
3928
  const slots = useSlots();
3367
3929
  const propsDefaults = useDefaults(
3368
3930
  "VvSelect",
@@ -3398,10 +3960,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3398
3960
  focused.value = true;
3399
3961
  }
3400
3962
  });
3401
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
3402
- icon,
3403
- iconPosition
3404
- );
3963
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
3405
3964
  const isDirty = computed(() => !isEmpty(props.modelValue));
3406
3965
  const isDisabled = computed(() => props.disabled || props.readonly);
3407
3966
  const hasTabindex = computed(() => {
@@ -3425,8 +3984,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3425
3984
  loading: loading.value,
3426
3985
  disabled: disabled.value,
3427
3986
  readonly: readonly.value,
3428
- "icon-before": hasIconBefore.value,
3429
- "icon-after": hasIconAfter.value,
3987
+ "icon-before": hasIconBefore.value !== void 0,
3988
+ "icon-after": hasIconAfter.value !== void 0,
3430
3989
  dirty: isDirty.value,
3431
3990
  focus: focused.value,
3432
3991
  floating: floating.value,
@@ -3475,137 +4034,171 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3475
4034
  return option && option.options && option.options.length > 0;
3476
4035
  };
3477
4036
  return (_ctx, _cache) => {
3478
- return openBlock(), createElementBlock("div", {
3479
- class: normalizeClass(unref(bemCssClasses))
3480
- }, [
3481
- _ctx.label ? (openBlock(), createElementBlock("label", {
3482
- key: 0,
3483
- for: unref(hasId)
3484
- }, toDisplayString(_ctx.label), 9, _hoisted_1$8)) : createCommentVNode("", true),
3485
- createElementVNode("div", _hoisted_2$6, [
3486
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
3487
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3488
- ])) : createCommentVNode("", true),
3489
- createElementVNode("div", _hoisted_4$4, [
3490
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3491
- key: 0,
3492
- class: "vv-select__icon"
3493
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
3494
- withDirectives(createElementVNode("select", mergeProps({
3495
- id: unref(hasId),
3496
- ref_key: "select",
3497
- ref: select,
3498
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
3499
- }, unref(hasAttrs)), [
3500
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
3501
- key: 0,
3502
- value: void 0,
3503
- disabled: !_ctx.unselectable,
3504
- hidden: !_ctx.unselectable
3505
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$3)) : createCommentVNode("", true),
3506
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
3507
- return openBlock(), createElementBlock(Fragment, null, [
3508
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
3509
- key: index,
3510
- disabled: unref(isOptionDisabled)(option),
3511
- value: unref(getOptionValue)(option)
3512
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$3)) : (openBlock(), createElementBlock("optgroup", {
3513
- key: `group-${index}`,
3514
- disabled: unref(isOptionDisabled)(option),
3515
- label: unref(getOptionLabel)(option)
3516
- }, [
3517
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
3518
- return openBlock(), createElementBlock("option", {
3519
- key: `group-${index}-item-${i}`,
3520
- disabled: unref(isOptionDisabled)(item),
3521
- value: unref(getOptionValue)(item)
3522
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
3523
- }), 128))
3524
- ], 8, _hoisted_8$2))
3525
- ], 64);
3526
- }), 256))
3527
- ], 16, _hoisted_5$3), [
3528
- [vModelSelect, unref(localModelValue)]
4037
+ return openBlock(), createElementBlock(
4038
+ "div",
4039
+ {
4040
+ class: normalizeClass(unref(bemCssClasses))
4041
+ },
4042
+ [
4043
+ _ctx.label ? (openBlock(), createElementBlock("label", {
4044
+ key: 0,
4045
+ for: unref(hasId)
4046
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$9)) : createCommentVNode("v-if", true),
4047
+ createElementVNode("div", _hoisted_2$7, [
4048
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
4049
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
4050
+ ])) : createCommentVNode("v-if", true),
4051
+ createElementVNode("div", _hoisted_4$4, [
4052
+ unref(hasIconBefore) ? (openBlock(), createBlock(
4053
+ _sfc_main$u,
4054
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
4055
+ null,
4056
+ 16
4057
+ /* FULL_PROPS */
4058
+ )) : createCommentVNode("v-if", true),
4059
+ withDirectives(createElementVNode("select", mergeProps({
4060
+ id: unref(hasId),
4061
+ ref_key: "select",
4062
+ ref: select,
4063
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
4064
+ }, unref(hasAttrs)), [
4065
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
4066
+ key: 0,
4067
+ value: void 0,
4068
+ disabled: !_ctx.unselectable,
4069
+ hidden: !_ctx.unselectable
4070
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$4)) : createCommentVNode("v-if", true),
4071
+ (openBlock(true), createElementBlock(
4072
+ Fragment,
4073
+ null,
4074
+ renderList(_ctx.options, (option, index) => {
4075
+ return openBlock(), createElementBlock(
4076
+ Fragment,
4077
+ null,
4078
+ [
4079
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
4080
+ key: index,
4081
+ disabled: unref(isOptionDisabled)(option),
4082
+ value: unref(getOptionValue)(option)
4083
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$4)) : (openBlock(), createElementBlock("optgroup", {
4084
+ key: `group-${index}`,
4085
+ disabled: unref(isOptionDisabled)(option),
4086
+ label: unref(getOptionLabel)(option)
4087
+ }, [
4088
+ (openBlock(true), createElementBlock(
4089
+ Fragment,
4090
+ null,
4091
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
4092
+ return openBlock(), createElementBlock("option", {
4093
+ key: `group-${index}-item-${i}`,
4094
+ disabled: unref(isOptionDisabled)(item),
4095
+ value: unref(getOptionValue)(item)
4096
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$2);
4097
+ }),
4098
+ 128
4099
+ /* KEYED_FRAGMENT */
4100
+ ))
4101
+ ], 8, _hoisted_8$2))
4102
+ ],
4103
+ 64
4104
+ /* STABLE_FRAGMENT */
4105
+ );
4106
+ }),
4107
+ 256
4108
+ /* UNKEYED_FRAGMENT */
4109
+ ))
4110
+ ], 16, _hoisted_5$4), [
4111
+ [vModelSelect, unref(localModelValue)]
4112
+ ]),
4113
+ unref(hasIconAfter) ? (openBlock(), createBlock(
4114
+ _sfc_main$u,
4115
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4116
+ null,
4117
+ 16
4118
+ /* FULL_PROPS */
4119
+ )) : createCommentVNode("v-if", true)
3529
4120
  ]),
3530
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3531
- key: 1,
3532
- class: "vv-select__icon vv-select__icon-after"
3533
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
4121
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
4122
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
4123
+ ])) : createCommentVNode("v-if", true)
3534
4124
  ]),
3535
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
3536
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3537
- ])) : createCommentVNode("", true)
3538
- ]),
3539
- createVNode(unref(HintSlot), {
3540
- id: unref(hasHintId),
3541
- class: "vv-select__hint"
3542
- }, createSlots({ _: 2 }, [
3543
- _ctx.$slots.hint ? {
3544
- name: "hint",
3545
- fn: withCtx(() => [
3546
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3547
- ]),
3548
- key: "0"
3549
- } : void 0,
3550
- _ctx.$slots.loading ? {
3551
- name: "loading",
3552
- fn: withCtx(() => [
3553
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3554
- ]),
3555
- key: "1"
3556
- } : void 0,
3557
- _ctx.$slots.valid ? {
3558
- name: "valid",
3559
- fn: withCtx(() => [
3560
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3561
- ]),
3562
- key: "2"
3563
- } : void 0,
3564
- _ctx.$slots.invalid ? {
3565
- name: "invalid",
3566
- fn: withCtx(() => [
3567
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3568
- ]),
3569
- key: "3"
3570
- } : void 0
3571
- ]), 1032, ["id"])
3572
- ], 2);
4125
+ createVNode(unref(HintSlot), {
4126
+ id: unref(hasHintId),
4127
+ class: "vv-select__hint"
4128
+ }, createSlots({
4129
+ _: 2
4130
+ /* DYNAMIC */
4131
+ }, [
4132
+ _ctx.$slots.hint ? {
4133
+ name: "hint",
4134
+ fn: withCtx(() => [
4135
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4136
+ ]),
4137
+ key: "0"
4138
+ } : void 0,
4139
+ _ctx.$slots.loading ? {
4140
+ name: "loading",
4141
+ fn: withCtx(() => [
4142
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4143
+ ]),
4144
+ key: "1"
4145
+ } : void 0,
4146
+ _ctx.$slots.valid ? {
4147
+ name: "valid",
4148
+ fn: withCtx(() => [
4149
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4150
+ ]),
4151
+ key: "2"
4152
+ } : void 0,
4153
+ _ctx.$slots.invalid ? {
4154
+ name: "invalid",
4155
+ fn: withCtx(() => [
4156
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
4157
+ ]),
4158
+ key: "3"
4159
+ } : void 0
4160
+ ]), 1032, ["id"])
4161
+ ],
4162
+ 2
4163
+ /* CLASS */
4164
+ );
3573
4165
  };
3574
4166
  }
3575
4167
  });
3576
- const _hoisted_1$7 = ["id"];
3577
- const _hoisted_2$5 = ["id", "for"];
3578
- const _hoisted_3$3 = ["id", "aria-controls", "placeholder"];
4168
+ const _hoisted_1$8 = ["id"];
4169
+ const _hoisted_2$6 = ["id", "for"];
4170
+ const _hoisted_3$4 = ["id", "aria-controls", "placeholder"];
3579
4171
  const _hoisted_4$3 = {
3580
4172
  key: 0,
3581
4173
  class: "vv-select__input-before"
3582
4174
  };
3583
- const _hoisted_5$2 = { class: "vv-select__inner" };
3584
- const _hoisted_6$2 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
3585
- const _hoisted_7$2 = {
4175
+ const _hoisted_5$3 = { class: "vv-select__inner" };
4176
+ const _hoisted_6$3 = ["aria-expanded", "aria-labelledby", "aria-describedby", "aria-errormessage", "tabindex"];
4177
+ const _hoisted_7$3 = {
3586
4178
  key: 0,
3587
4179
  class: "vv-select__value"
3588
4180
  };
3589
4181
  const _hoisted_8$1 = ["aria-label", "onClick"];
3590
- const _hoisted_9 = {
4182
+ const _hoisted_9$1 = {
3591
4183
  key: 1,
3592
4184
  class: "vv-select__input-after"
3593
4185
  };
3594
- const __default__$6 = {
4186
+ const __default__$9 = {
3595
4187
  name: "VvCombobox",
3596
4188
  components: {
3597
- VvDropdown: _sfc_main$e,
3598
- VvDropdownOption: _sfc_main$c,
3599
- VvDropdownOptgroup: _sfc_main$b,
3600
- VvButton: _sfc_main$j
4189
+ VvDropdown: _sfc_main$i,
4190
+ VvDropdownOption: _sfc_main$g,
4191
+ VvDropdownOptgroup: _sfc_main$f,
4192
+ VvButton: _sfc_main$n
3601
4193
  }
3602
4194
  };
3603
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3604
- ...__default__$6,
4195
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4196
+ ...__default__$9,
3605
4197
  props: VvComboboxProps,
3606
4198
  emits: VvComboboxEvents,
3607
- setup(__props, { emit }) {
4199
+ setup(__props, { emit: __emit }) {
3608
4200
  const props = __props;
4201
+ const emit = __emit;
3609
4202
  const slots = useSlots();
3610
4203
  const propsDefaults = useDefaults(
3611
4204
  "VvCombobox",
@@ -3651,10 +4244,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3651
4244
  searchText,
3652
4245
  computed(() => Number(props.debounceSearch))
3653
4246
  );
3654
- watch(
3655
- debouncedSearchText,
3656
- () => emit("change:search", debouncedSearchText.value)
3657
- );
4247
+ watch(debouncedSearchText, () => {
4248
+ emit("update:search", debouncedSearchText.value);
4249
+ emit("change:search", debouncedSearchText.value);
4250
+ });
3658
4251
  const expanded = ref(false);
3659
4252
  const toggleExpanded = () => {
3660
4253
  if (props.disabled || props.readonly)
@@ -3705,10 +4298,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3705
4298
  const localLoading = ref(false);
3706
4299
  const isLoading = computed(() => localLoading.value || loading.value);
3707
4300
  const dropdownEl = ref();
3708
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
3709
- icon,
3710
- iconPosition
3711
- );
4301
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
3712
4302
  const isDirty = computed(() => !isEmpty(props.modelValue));
3713
4303
  const hasTabindex = computed(() => {
3714
4304
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -3720,12 +4310,12 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3720
4310
  disabled: disabled.value,
3721
4311
  loading: isLoading.value,
3722
4312
  readonly: readonly.value,
3723
- "icon-before": Boolean(hasIconBefore.value),
3724
- "icon-after": Boolean(hasIconAfter.value),
4313
+ "icon-before": hasIconBefore.value !== void 0,
4314
+ "icon-after": hasIconAfter.value !== void 0,
3725
4315
  valid: valid.value,
3726
4316
  invalid: invalid.value,
3727
4317
  dirty: isDirty.value,
3728
- focus: focused.value,
4318
+ focus: focused.value || focusedWithin.value || expanded.value,
3729
4319
  floating: floating.value,
3730
4320
  badges: props.badges
3731
4321
  }))
@@ -3802,7 +4392,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3802
4392
  if (!props.keepOpen) {
3803
4393
  collapse();
3804
4394
  }
3805
- if (props.unselectable && value === props.modelValue) {
4395
+ if (Array.isArray(props.modelValue)) {
4396
+ if (props.unselectable && props.modelValue.includes(value)) {
4397
+ toReturn = [];
4398
+ } else {
4399
+ toReturn = [value];
4400
+ }
4401
+ } else if (props.unselectable && value === props.modelValue) {
3806
4402
  toReturn = void 0;
3807
4403
  }
3808
4404
  }
@@ -3878,208 +4474,301 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3878
4474
  key: 0,
3879
4475
  id: unref(hasLabelId),
3880
4476
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
3881
- }, toDisplayString(_ctx.label), 9, _hoisted_2$5)) : createCommentVNode("", true),
3882
- createElementVNode("div", {
3883
- ref_key: "wrapperEl",
3884
- ref: wrapperEl,
3885
- class: "vv-select__wrapper"
3886
- }, [
3887
- createVNode(_sfc_main$e, mergeProps({
3888
- ref_key: "dropdownEl",
3889
- ref: dropdownEl,
3890
- modelValue: unref(expanded),
3891
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
3892
- }, unref(dropdownProps), {
3893
- role: unref(DropdownRole).listbox,
3894
- onAfterExpand,
3895
- onAfterCollapse
3896
- }), createSlots({
3897
- default: withCtx(({ aria }) => [
3898
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
3899
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3900
- ])) : createCommentVNode("", true),
3901
- createElementVNode("div", _hoisted_5$2, [
3902
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3903
- key: 0,
3904
- class: "vv-select__icon"
3905
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
3906
- createElementVNode("div", mergeProps({
3907
- ref_key: "inputEl",
3908
- ref: inputEl
3909
- }, aria, {
3910
- class: "vv-select__input",
3911
- role: "combobox",
3912
- "aria-expanded": unref(expanded),
3913
- "aria-labelledby": unref(hasLabelId),
3914
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
3915
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
3916
- tabindex: unref(hasTabindex),
3917
- onClickPassive: onClickInput
3918
- }), [
3919
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3920
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3921
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3922
- return openBlock(), createBlock(_sfc_main$l, {
3923
- key: index,
3924
- modifiers: _ctx.badgeModifiers,
3925
- class: "vv-select__badge"
3926
- }, {
3927
- default: withCtx(() => [
3928
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
3929
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
3930
- key: 0,
3931
- "aria-label": unref(propsDefaults).deselectActionLabel,
3932
- type: "button",
3933
- onClick: withModifiers(($event) => onInput(option), ["stop"])
3934
- }, [
3935
- createVNode(_sfc_main$n, { name: "close" })
3936
- ], 8, _hoisted_8$1)) : createCommentVNode("", true)
3937
- ]),
3938
- _: 2
3939
- }, 1032, ["modifiers"]);
3940
- }), 128))
3941
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3942
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
3943
- ], 64))
3944
- ])
3945
- ], 16, _hoisted_6$2),
3946
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3947
- key: 1,
3948
- class: "vv-select__icon vv-select__icon-after"
3949
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
3950
- ]),
3951
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
3952
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3953
- ])) : createCommentVNode("", true)
3954
- ]),
3955
- items: withCtx(() => {
3956
- var _a;
3957
- return [
3958
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
3959
- return openBlock(), createElementBlock(Fragment, { key: index }, [
3960
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3961
- createVNode(_sfc_main$b, {
3962
- label: unref(getOptionLabel)(option)
3963
- }, null, 8, ["label"]),
3964
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
3965
- option
3966
- ), (item, i) => {
3967
- return openBlock(), createBlock(_sfc_main$c, mergeProps({
3968
- selected: isOptionSelected(item),
3969
- disabled: unref(isOptionDisabled)(item),
3970
- unselectable: _ctx.unselectable,
3971
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3972
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3973
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
3974
- }, {
3975
- key: i,
3976
- class: "vv-dropdown-option",
3977
- onClickPassive: ($event) => onInput(item)
3978
- }), {
3979
- default: withCtx(() => [
3980
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3981
- option,
3982
- selectedOptions: unref(selectedOptions),
3983
- selected: isOptionSelected(item),
3984
- disabled: unref(isOptionDisabled)(item)
3985
- })), () => [
3986
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
3987
- ])
3988
- ]),
3989
- _: 2
3990
- }, 1040, ["onClickPassive"]);
3991
- }), 128))
3992
- ], 64)) : (openBlock(), createBlock(_sfc_main$c, mergeProps({ key: 1 }, {
3993
- selected: isOptionSelected(option),
3994
- disabled: unref(isOptionDisabled)(option),
3995
- unselectable: _ctx.unselectable,
3996
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3997
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3998
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
3999
- }, {
4000
- class: "vv-dropdown-option",
4001
- onClickPassive: ($event) => onInput(option)
4002
- }), {
4003
- default: withCtx(() => [
4004
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4005
- option,
4006
- selectedOptions: unref(selectedOptions),
4007
- selected: isOptionSelected(option),
4008
- disabled: unref(isOptionDisabled)(option)
4009
- })), () => [
4010
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
4011
- ])
4012
- ]),
4013
- _: 2
4014
- }, 1040, ["onClickPassive"]))
4015
- ], 64);
4016
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$c, {
4017
- key: 1,
4018
- modifiers: "inert"
4019
- }, {
4020
- default: withCtx(() => [
4021
- renderSlot(_ctx.$slots, "no-options", {}, () => [
4022
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
4023
- ])
4024
- ]),
4025
- _: 3
4026
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$c, {
4027
- key: 2,
4028
- modifiers: "inert"
4029
- }, {
4030
- default: withCtx(() => [
4031
- renderSlot(_ctx.$slots, "no-results", {}, () => [
4032
- createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
4477
+ }, toDisplayString(_ctx.label), 9, _hoisted_2$6)) : createCommentVNode("v-if", true),
4478
+ createElementVNode(
4479
+ "div",
4480
+ {
4481
+ ref_key: "wrapperEl",
4482
+ ref: wrapperEl,
4483
+ class: "vv-select__wrapper"
4484
+ },
4485
+ [
4486
+ createVNode(_sfc_main$i, mergeProps({
4487
+ ref_key: "dropdownEl",
4488
+ ref: dropdownEl,
4489
+ modelValue: unref(expanded),
4490
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
4491
+ }, unref(dropdownProps), {
4492
+ role: unref(DropdownRole).listbox,
4493
+ onAfterExpand,
4494
+ onAfterCollapse
4495
+ }), createSlots({
4496
+ default: withCtx(({ aria }) => [
4497
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
4498
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
4499
+ ])) : createCommentVNode("v-if", true),
4500
+ createElementVNode("div", _hoisted_5$3, [
4501
+ unref(hasIconBefore) ? (openBlock(), createBlock(
4502
+ _sfc_main$u,
4503
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
4504
+ null,
4505
+ 16
4506
+ /* FULL_PROPS */
4507
+ )) : createCommentVNode("v-if", true),
4508
+ createElementVNode("div", mergeProps({
4509
+ ref_key: "inputEl",
4510
+ ref: inputEl
4511
+ }, aria, {
4512
+ class: "vv-select__input",
4513
+ role: "combobox",
4514
+ "aria-expanded": unref(expanded),
4515
+ "aria-labelledby": unref(hasLabelId),
4516
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
4517
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
4518
+ tabindex: unref(hasTabindex),
4519
+ onClickPassive: onClickInput
4520
+ }), [
4521
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
4522
+ unref(hasValue) ? (openBlock(), createElementBlock(
4523
+ Fragment,
4524
+ { key: 0 },
4525
+ [
4526
+ !_ctx.badges ? (openBlock(), createElementBlock(
4527
+ "div",
4528
+ _hoisted_7$3,
4529
+ toDisplayString(unref(hasValue)),
4530
+ 1
4531
+ /* TEXT */
4532
+ )) : (openBlock(true), createElementBlock(
4533
+ Fragment,
4534
+ { key: 1 },
4535
+ renderList(unref(selectedOptions), (option, index) => {
4536
+ return openBlock(), createBlock(_sfc_main$p, {
4537
+ key: index,
4538
+ modifiers: _ctx.badgeModifiers,
4539
+ class: "vv-select__badge"
4540
+ }, {
4541
+ default: withCtx(() => [
4542
+ createTextVNode(
4543
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
4544
+ 1
4545
+ /* TEXT */
4546
+ ),
4547
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
4548
+ key: 0,
4549
+ "aria-label": unref(propsDefaults).deselectActionLabel,
4550
+ type: "button",
4551
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
4552
+ }, [
4553
+ createVNode(_sfc_main$u, { name: "close" })
4554
+ ], 8, _hoisted_8$1)) : createCommentVNode("v-if", true)
4555
+ ]),
4556
+ _: 2
4557
+ /* DYNAMIC */
4558
+ }, 1032, ["modifiers"]);
4559
+ }),
4560
+ 128
4561
+ /* KEYED_FRAGMENT */
4562
+ ))
4563
+ ],
4564
+ 64
4565
+ /* STABLE_FRAGMENT */
4566
+ )) : (openBlock(), createElementBlock(
4567
+ Fragment,
4568
+ { key: 1 },
4569
+ [
4570
+ createTextVNode(
4571
+ toDisplayString(_ctx.placeholder),
4572
+ 1
4573
+ /* TEXT */
4574
+ )
4575
+ ],
4576
+ 64
4577
+ /* STABLE_FRAGMENT */
4578
+ ))
4033
4579
  ])
4034
- ]),
4035
- _: 3
4036
- })) : createCommentVNode("", true)
4037
- ];
4038
- }),
4039
- after: withCtx(() => [
4040
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
4580
+ ], 16, _hoisted_6$3),
4581
+ unref(hasIconAfter) ? (openBlock(), createBlock(
4582
+ _sfc_main$u,
4583
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4584
+ null,
4585
+ 16
4586
+ /* FULL_PROPS */
4587
+ )) : createCommentVNode("v-if", true)
4588
+ ]),
4589
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
4590
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
4591
+ ])) : createCommentVNode("v-if", true)
4592
+ ]),
4593
+ items: withCtx(() => {
4041
4594
  var _a;
4042
4595
  return [
4043
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$j, {
4044
- key: 0,
4045
- label: unref(propsDefaults).closeLabel,
4046
- modifiers: "secondary",
4047
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
4048
- }, null, 8, ["label"])) : createCommentVNode("", true)
4596
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
4597
+ Fragment,
4598
+ { key: 0 },
4599
+ renderList(unref(filteredOptions), (option, index) => {
4600
+ return openBlock(), createElementBlock(
4601
+ Fragment,
4602
+ { key: index },
4603
+ [
4604
+ isGroup(option) ? (openBlock(), createElementBlock(
4605
+ Fragment,
4606
+ { key: 0 },
4607
+ [
4608
+ createVNode(_sfc_main$f, {
4609
+ label: unref(getOptionLabel)(option)
4610
+ }, null, 8, ["label"]),
4611
+ (openBlock(true), createElementBlock(
4612
+ Fragment,
4613
+ null,
4614
+ renderList(unref(getOptionGrouped)(
4615
+ option
4616
+ ), (item, i) => {
4617
+ return openBlock(), createBlock(_sfc_main$g, mergeProps({
4618
+ selected: isOptionSelected(item),
4619
+ disabled: unref(isOptionDisabled)(item),
4620
+ unselectable: _ctx.unselectable,
4621
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
4622
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
4623
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
4624
+ }, {
4625
+ key: i,
4626
+ class: "vv-dropdown-option",
4627
+ onClickPassive: ($event) => onInput(item)
4628
+ }), {
4629
+ default: withCtx(() => [
4630
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4631
+ option,
4632
+ selectedOptions: unref(selectedOptions),
4633
+ selected: isOptionSelected(item),
4634
+ disabled: unref(isOptionDisabled)(item)
4635
+ })), () => [
4636
+ createTextVNode(
4637
+ toDisplayString(unref(getOptionLabel)(item)),
4638
+ 1
4639
+ /* TEXT */
4640
+ )
4641
+ ])
4642
+ ]),
4643
+ _: 2
4644
+ /* DYNAMIC */
4645
+ }, 1040, ["onClickPassive"]);
4646
+ }),
4647
+ 128
4648
+ /* KEYED_FRAGMENT */
4649
+ ))
4650
+ ],
4651
+ 64
4652
+ /* STABLE_FRAGMENT */
4653
+ )) : (openBlock(), createBlock(_sfc_main$g, mergeProps({ key: 1 }, {
4654
+ selected: isOptionSelected(option),
4655
+ disabled: unref(isOptionDisabled)(option),
4656
+ unselectable: _ctx.unselectable,
4657
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
4658
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
4659
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
4660
+ }, {
4661
+ class: "vv-dropdown-option",
4662
+ onClickPassive: ($event) => onInput(option)
4663
+ }), {
4664
+ default: withCtx(() => [
4665
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4666
+ option,
4667
+ selectedOptions: unref(selectedOptions),
4668
+ selected: isOptionSelected(option),
4669
+ disabled: unref(isOptionDisabled)(option)
4670
+ })), () => [
4671
+ createTextVNode(
4672
+ toDisplayString(unref(getOptionLabel)(option)),
4673
+ 1
4674
+ /* TEXT */
4675
+ )
4676
+ ])
4677
+ ]),
4678
+ _: 2
4679
+ /* DYNAMIC */
4680
+ }, 1040, ["onClickPassive"]))
4681
+ ],
4682
+ 64
4683
+ /* STABLE_FRAGMENT */
4684
+ );
4685
+ }),
4686
+ 128
4687
+ /* KEYED_FRAGMENT */
4688
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$g, {
4689
+ key: 1,
4690
+ modifiers: "inert"
4691
+ }, {
4692
+ default: withCtx(() => [
4693
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
4694
+ createTextVNode(
4695
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
4696
+ 1
4697
+ /* TEXT */
4698
+ )
4699
+ ])
4700
+ ]),
4701
+ _: 3
4702
+ /* FORWARDED */
4703
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$g, {
4704
+ key: 2,
4705
+ modifiers: "inert"
4706
+ }, {
4707
+ default: withCtx(() => [
4708
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
4709
+ createTextVNode(
4710
+ toDisplayString(unref(propsDefaults).noResultsLabel),
4711
+ 1
4712
+ /* TEXT */
4713
+ )
4714
+ ])
4715
+ ]),
4716
+ _: 3
4717
+ /* FORWARDED */
4718
+ })) : createCommentVNode("v-if", true)
4049
4719
  ];
4050
- })
4051
- ]),
4052
- _: 2
4053
- }, [
4054
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
4055
- name: "before",
4056
- fn: withCtx(() => [
4057
- renderSlot(_ctx.$slots, "dropdown::before"),
4058
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
4059
- key: 0,
4060
- id: unref(hasSearchId),
4061
- ref_key: "inputSearchEl",
4062
- ref: inputSearchEl,
4063
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
4064
- "aria-autocomplete": "list",
4065
- "aria-controls": unref(hasDropdownId),
4066
- autocomplete: "off",
4067
- spellcheck: "false",
4068
- type: "search",
4069
- class: "vv-dropdown__search",
4070
- placeholder: unref(propsDefaults).searchPlaceholder
4071
- }, null, 8, _hoisted_3$3)), [
4072
- [vModelText, unref(searchText)]
4073
- ]) : createCommentVNode("", true)
4720
+ }),
4721
+ after: withCtx(() => [
4722
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
4723
+ var _a;
4724
+ return [
4725
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$n, {
4726
+ key: 0,
4727
+ label: unref(propsDefaults).closeLabel,
4728
+ modifiers: "secondary",
4729
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
4730
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
4731
+ ];
4732
+ })
4074
4733
  ]),
4075
- key: "0"
4076
- } : void 0
4077
- ]), 1040, ["modelValue", "role"])
4078
- ], 512),
4734
+ _: 2
4735
+ /* DYNAMIC */
4736
+ }, [
4737
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
4738
+ name: "before",
4739
+ fn: withCtx(() => [
4740
+ renderSlot(_ctx.$slots, "dropdown::before"),
4741
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
4742
+ key: 0,
4743
+ id: unref(hasSearchId),
4744
+ ref_key: "inputSearchEl",
4745
+ ref: inputSearchEl,
4746
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
4747
+ "aria-autocomplete": "list",
4748
+ "aria-controls": unref(hasDropdownId),
4749
+ autocomplete: "off",
4750
+ spellcheck: "false",
4751
+ type: "search",
4752
+ class: "vv-dropdown__search",
4753
+ placeholder: unref(propsDefaults).searchPlaceholder
4754
+ }, null, 8, _hoisted_3$4)), [
4755
+ [vModelText, unref(searchText)]
4756
+ ]) : createCommentVNode("v-if", true)
4757
+ ]),
4758
+ key: "0"
4759
+ } : void 0
4760
+ ]), 1040, ["modelValue", "role"])
4761
+ ],
4762
+ 512
4763
+ /* NEED_PATCH */
4764
+ ),
4079
4765
  createVNode(unref(HintSlot), {
4080
4766
  id: unref(hasHintId),
4081
4767
  class: "vv-select__hint"
4082
- }, createSlots({ _: 2 }, [
4768
+ }, createSlots({
4769
+ _: 2
4770
+ /* DYNAMIC */
4771
+ }, [
4083
4772
  _ctx.$slots.hint ? {
4084
4773
  name: "hint",
4085
4774
  fn: withCtx(() => [
@@ -4109,9 +4798,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4109
4798
  key: "3"
4110
4799
  } : void 0
4111
4800
  ]), 1032, ["id"])
4112
- ], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$a, mergeProps({ key: 1 }, unref(selectProps), {
4113
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
4114
- }), null, 16));
4801
+ ], 10, _hoisted_1$8)) : (openBlock(), createBlock(
4802
+ _sfc_main$e,
4803
+ mergeProps({ key: 1 }, unref(selectProps), {
4804
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
4805
+ }),
4806
+ null,
4807
+ 16
4808
+ /* FULL_PROPS */
4809
+ ));
4115
4810
  };
4116
4811
  }
4117
4812
  });
@@ -4154,25 +4849,25 @@ const VvDialogProps = {
4154
4849
  */
4155
4850
  keepOpen: { type: Boolean, default: false }
4156
4851
  };
4157
- const _hoisted_1$6 = ["onCancel"];
4158
- const _hoisted_2$4 = {
4852
+ const _hoisted_1$7 = {
4159
4853
  key: 0,
4160
4854
  class: "vv-dialog__header"
4161
4855
  };
4162
- const _hoisted_3$2 = { class: "vv-dialog__content" };
4163
- const _hoisted_4$2 = {
4856
+ const _hoisted_2$5 = { class: "vv-dialog__content" };
4857
+ const _hoisted_3$3 = {
4164
4858
  key: 1,
4165
4859
  class: "vv-dialog__footer"
4166
4860
  };
4167
- const __default__$5 = {
4861
+ const __default__$8 = {
4168
4862
  name: "VvDialog"
4169
4863
  };
4170
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4171
- ...__default__$5,
4864
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
4865
+ ...__default__$8,
4172
4866
  props: VvDialogProps,
4173
4867
  emits: VvDialogEvents,
4174
- setup(__props, { expose: __expose, emit }) {
4868
+ setup(__props, { expose: __expose, emit: __emit }) {
4175
4869
  const props = __props;
4870
+ const emit = __emit;
4176
4871
  const dialogEl = ref();
4177
4872
  const modelValue = useVModel(props, "modelValue", emit);
4178
4873
  const localModelValue = ref(false);
@@ -4254,48 +4949,116 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4254
4949
  }
4255
4950
  };
4256
4951
  return (_ctx, _cache) => {
4257
- return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
4952
+ return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers), { persisted: "" }), {
4258
4953
  default: withCtx(() => [
4259
- withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
4260
- ref_key: "dialogEl",
4261
- ref: dialogEl,
4262
- class: unref(dialogClass),
4263
- onCancel: withModifiers(onCancel, ["stop", "prevent"])
4264
- }), [
4265
- createElementVNode("article", {
4266
- ref_key: "modalWrapper",
4267
- ref: modalWrapper,
4268
- class: "vv-dialog__wrapper"
4269
- }, [
4270
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_2$4, [
4271
- renderSlot(_ctx.$slots, "header", {}, () => [
4272
- createTextVNode(toDisplayString(_ctx.title) + " ", 1),
4273
- createElementVNode("button", {
4274
- type: "button",
4275
- "aria-label": "Close",
4276
- class: "vv-dialog__close",
4277
- onClickPassive: close
4278
- }, [
4279
- createVNode(_sfc_main$n, { name: "close" })
4280
- ], 32)
4281
- ])
4282
- ])) : createCommentVNode("", true),
4283
- createElementVNode("div", _hoisted_3$2, [
4284
- renderSlot(_ctx.$slots, "default")
4285
- ]),
4286
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
4287
- renderSlot(_ctx.$slots, "footer")
4288
- ])) : createCommentVNode("", true)
4289
- ], 512)
4290
- ], 16, _hoisted_1$6), [
4954
+ withDirectives(createElementVNode(
4955
+ "dialog",
4956
+ mergeProps(unref(dialogAttrs), {
4957
+ ref_key: "dialogEl",
4958
+ ref: dialogEl,
4959
+ class: unref(dialogClass),
4960
+ onCancel: withModifiers(onCancel, ["stop", "prevent"])
4961
+ }),
4962
+ [
4963
+ createElementVNode(
4964
+ "article",
4965
+ {
4966
+ ref_key: "modalWrapper",
4967
+ ref: modalWrapper,
4968
+ class: "vv-dialog__wrapper"
4969
+ },
4970
+ [
4971
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$7, [
4972
+ renderSlot(_ctx.$slots, "header", {}, () => [
4973
+ createTextVNode(
4974
+ toDisplayString(_ctx.title) + " ",
4975
+ 1
4976
+ /* TEXT */
4977
+ ),
4978
+ createElementVNode(
4979
+ "button",
4980
+ {
4981
+ type: "button",
4982
+ "aria-label": "Close",
4983
+ class: "vv-dialog__close",
4984
+ onClickPassive: close
4985
+ },
4986
+ [
4987
+ createVNode(_sfc_main$u, { name: "close" })
4988
+ ],
4989
+ 32
4990
+ /* NEED_HYDRATION */
4991
+ )
4992
+ ])
4993
+ ])) : createCommentVNode("v-if", true),
4994
+ createElementVNode("div", _hoisted_2$5, [
4995
+ renderSlot(_ctx.$slots, "default")
4996
+ ]),
4997
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$3, [
4998
+ renderSlot(_ctx.$slots, "footer")
4999
+ ])) : createCommentVNode("v-if", true)
5000
+ ],
5001
+ 512
5002
+ /* NEED_PATCH */
5003
+ )
5004
+ ],
5005
+ 16
5006
+ /* FULL_PROPS */
5007
+ ), [
4291
5008
  [vShow, unref(isOpened)]
4292
5009
  ])
4293
5010
  ]),
4294
5011
  _: 3
5012
+ /* FORWARDED */
4295
5013
  }, 16, ["name"]);
4296
5014
  };
4297
5015
  }
4298
5016
  });
5017
+ const __default__$7 = {
5018
+ name: "VvDropdownAction"
5019
+ };
5020
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5021
+ ...__default__$7,
5022
+ props: {
5023
+ ...ActionProps,
5024
+ ...ModifiersProps
5025
+ },
5026
+ setup(__props) {
5027
+ const props = __props;
5028
+ const { modifiers } = toRefs(props);
5029
+ const bemCssClasses = useModifiers("vv-dropdown-action", modifiers);
5030
+ return (_ctx, _cache) => {
5031
+ return openBlock(), createBlock(_sfc_main$h, null, {
5032
+ default: withCtx(() => [
5033
+ createVNode(_sfc_main$v, mergeProps({
5034
+ disabled: _ctx.disabled,
5035
+ pressed: _ctx.pressed,
5036
+ active: _ctx.active,
5037
+ type: _ctx.type,
5038
+ to: _ctx.to,
5039
+ href: _ctx.href,
5040
+ target: _ctx.target,
5041
+ rel: _ctx.rel
5042
+ }, { class: unref(bemCssClasses) }), {
5043
+ default: withCtx(() => [
5044
+ renderSlot(_ctx.$slots, "default", {}, () => [
5045
+ createTextVNode(
5046
+ toDisplayString(_ctx.label),
5047
+ 1
5048
+ /* TEXT */
5049
+ )
5050
+ ])
5051
+ ]),
5052
+ _: 3
5053
+ /* FORWARDED */
5054
+ }, 16, ["class"])
5055
+ ]),
5056
+ _: 3
5057
+ /* FORWARDED */
5058
+ });
5059
+ };
5060
+ }
5061
+ });
4299
5062
  const INPUT_TYPES = {
4300
5063
  TEXT: "text",
4301
5064
  PASSWORD: "password",
@@ -4486,7 +5249,7 @@ const VvInputTextProps = {
4486
5249
  };
4487
5250
  const VvInputPasswordAction = defineComponent({
4488
5251
  components: {
4489
- VvIcon: _sfc_main$n
5252
+ VvIcon: _sfc_main$u
4490
5253
  },
4491
5254
  props: {
4492
5255
  disabled: {
@@ -4530,7 +5293,7 @@ const VvInputPasswordAction = defineComponent({
4530
5293
  };
4531
5294
  },
4532
5295
  render() {
4533
- const icon = h(_sfc_main$n, {
5296
+ const icon = h(_sfc_main$u, {
4534
5297
  name: this.activeIcon,
4535
5298
  class: "vv-input-text__icon"
4536
5299
  });
@@ -4549,7 +5312,7 @@ const VvInputPasswordAction = defineComponent({
4549
5312
  });
4550
5313
  const VvInputStepAction = defineComponent({
4551
5314
  components: {
4552
- VvIcon: _sfc_main$n
5315
+ VvIcon: _sfc_main$u
4553
5316
  },
4554
5317
  props: {
4555
5318
  disabled: {
@@ -4594,7 +5357,7 @@ const VvInputStepAction = defineComponent({
4594
5357
  });
4595
5358
  const VvInputClearAction = defineComponent({
4596
5359
  components: {
4597
- VvIcon: _sfc_main$n
5360
+ VvIcon: _sfc_main$u
4598
5361
  },
4599
5362
  props: {
4600
5363
  disabled: {
@@ -4623,7 +5386,7 @@ const VvInputClearAction = defineComponent({
4623
5386
  };
4624
5387
  },
4625
5388
  render() {
4626
- const icon = h(_sfc_main$n, {
5389
+ const icon = h(_sfc_main$u, {
4627
5390
  name: this.icon,
4628
5391
  class: "vv-input-text__icon"
4629
5392
  });
@@ -4644,7 +5407,7 @@ function VvInputTextActionsFactory(type, parentProps) {
4644
5407
  return {
4645
5408
  name: "VvInputTextActions",
4646
5409
  components: {
4647
- VvIcon: _sfc_main$n,
5410
+ VvIcon: _sfc_main$u,
4648
5411
  VvInputPasswordAction,
4649
5412
  VvInputStepAction,
4650
5413
  VvInputClearAction
@@ -4771,35 +5534,35 @@ function useTextCount(text, options) {
4771
5534
  formatted
4772
5535
  };
4773
5536
  }
4774
- const _hoisted_1$5 = ["for"];
4775
- const _hoisted_2$3 = { class: "vv-input-text__wrapper" };
4776
- const _hoisted_3$1 = {
5537
+ const _hoisted_1$6 = ["for"];
5538
+ const _hoisted_2$4 = { class: "vv-input-text__wrapper" };
5539
+ const _hoisted_3$2 = {
4777
5540
  key: 0,
4778
5541
  class: "vv-input-text__input-before"
4779
5542
  };
4780
- const _hoisted_4$1 = ["onClick"];
4781
- const _hoisted_5$1 = ["id"];
4782
- const _hoisted_6$1 = {
5543
+ const _hoisted_4$2 = ["id"];
5544
+ const _hoisted_5$2 = {
4783
5545
  key: 1,
4784
5546
  class: "vv-input-text__unit"
4785
5547
  };
4786
- const _hoisted_7$1 = {
5548
+ const _hoisted_6$2 = {
4787
5549
  key: 5,
4788
5550
  class: "vv-input-text__input-after"
4789
5551
  };
4790
- const _hoisted_8 = {
5552
+ const _hoisted_7$2 = {
4791
5553
  key: 6,
4792
5554
  class: "vv-input-text__limit"
4793
5555
  };
4794
- const __default__$4 = {
5556
+ const __default__$6 = {
4795
5557
  name: "VvInputText"
4796
5558
  };
4797
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4798
- ...__default__$4,
5559
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5560
+ ...__default__$6,
4799
5561
  props: VvInputTextProps,
4800
5562
  emits: VvInputTextEvents,
4801
- setup(__props, { expose: __expose, emit }) {
5563
+ setup(__props, { expose: __expose, emit: __emit }) {
4802
5564
  const props = __props;
5565
+ const emit = __emit;
4803
5566
  const slots = useSlots();
4804
5567
  const propsDefaults = useDefaults(
4805
5568
  "VvInputText",
@@ -4962,7 +5725,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4962
5725
  return;
4963
5726
  }
4964
5727
  inputEl.value.stepUp();
4965
- localModelValue.value = unref(inputEl).value;
5728
+ localModelValue.value = Number(unref(inputEl).value);
4966
5729
  }
4967
5730
  };
4968
5731
  const onStepDown = () => {
@@ -4972,18 +5735,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4972
5735
  return;
4973
5736
  }
4974
5737
  inputEl.value.stepDown();
4975
- localModelValue.value = unref(inputEl).value;
5738
+ localModelValue.value = Number(unref(inputEl).value);
4976
5739
  }
4977
5740
  };
4978
5741
  const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
4979
5742
  const onClear = () => {
4980
5743
  localModelValue.value = "";
4981
5744
  };
4982
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
4983
- icon,
4984
- iconPosition
4985
- );
4986
- const defaultAfterIcon = computed(() => {
5745
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
5746
+ const iconAfter = computed(() => {
5747
+ if (hasIconAfter.value !== void 0) {
5748
+ return hasIconAfter.value;
5749
+ }
4987
5750
  switch (props.type) {
4988
5751
  case INPUT_TYPES.COLOR:
4989
5752
  return { name: TYPES_ICON.COLOR };
@@ -4994,9 +5757,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4994
5757
  return { name: TYPES_ICON.DATE };
4995
5758
  case INPUT_TYPES.TIME:
4996
5759
  return { name: TYPES_ICON.TIME };
4997
- default:
4998
- return "";
4999
5760
  }
5761
+ return void 0;
5000
5762
  });
5001
5763
  const { formatted: countFormatted } = useTextCount(localModelValue, {
5002
5764
  mode: count.value,
@@ -5027,8 +5789,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5027
5789
  loading: loading.value,
5028
5790
  disabled: props.disabled,
5029
5791
  readonly: props.readonly,
5030
- "icon-before": hasIconBefore.value,
5031
- "icon-after": hasIconAfter.value || !isEmpty(defaultAfterIcon),
5792
+ "icon-before": hasIconBefore.value !== void 0,
5793
+ "icon-after": iconAfter.value !== void 0,
5032
5794
  floating: props.floating && !isEmpty(props.label),
5033
5795
  dirty: isDirty.value,
5034
5796
  focus: isFocused.value,
@@ -5136,177 +5898,250 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5136
5898
  emit("keydown", event);
5137
5899
  };
5138
5900
  return (_ctx, _cache) => {
5139
- return openBlock(), createElementBlock("div", {
5140
- class: normalizeClass(unref(bemCssClasses))
5141
- }, [
5142
- unref(label) ? (openBlock(), createElementBlock("label", {
5143
- key: 0,
5144
- for: unref(hasId),
5145
- class: "vv-input-text__label"
5146
- }, toDisplayString(unref(label)), 9, _hoisted_1$5)) : createCommentVNode("", true),
5147
- createElementVNode("div", _hoisted_2$3, [
5148
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
5149
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5150
- ])) : createCommentVNode("", true),
5151
- createElementVNode("div", {
5152
- ref_key: "innerEl",
5153
- ref: innerEl,
5154
- class: "vv-input-text__inner",
5155
- onClick: withModifiers(onClickInner, ["stop"])
5156
- }, [
5157
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5158
- key: 0,
5159
- class: "vv-input-text__icon"
5160
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
5161
- createElementVNode("input", mergeProps({
5162
- id: unref(hasId),
5163
- ref_key: "inputEl",
5164
- ref: inputEl
5165
- }, unref(hasAttrs), {
5166
- style: unref(hasStyle),
5167
- onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
5168
- onKeydown: onKeyDown,
5169
- onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
5170
- }), null, 16, _hoisted_5$1),
5171
- (_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
5172
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5173
- createTextVNode(toDisplayString(_ctx.unit), 1)
5174
- ])
5175
- ])) : createCommentVNode("", true)
5176
- ], 8, _hoisted_4$1),
5177
- unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5178
- key: 1,
5179
- class: "vv-input-text__icon vv-input-text__icon-after"
5180
- }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
5181
- key: 2,
5182
- onTogglePassword
5183
- })) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
5184
- key: 3,
5185
- onStepUp,
5186
- onStepDown
5187
- })) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
5188
- key: 4,
5189
- onClear
5190
- })) : createCommentVNode("", true),
5191
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
5192
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5193
- ])) : createCommentVNode("", true),
5194
- unref(count) ? (openBlock(), createElementBlock("span", _hoisted_8, [
5195
- renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5196
- createTextVNode(toDisplayString(unref(countFormatted)), 1)
5197
- ])
5198
- ])) : createCommentVNode("", true)
5199
- ]),
5200
- createVNode(unref(HintSlot), {
5201
- id: unref(hasHintId),
5202
- class: "vv-input-text__hint"
5203
- }, createSlots({ _: 2 }, [
5204
- _ctx.$slots.hint ? {
5205
- name: "hint",
5206
- fn: withCtx(() => [
5207
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5208
- ]),
5209
- key: "0"
5210
- } : void 0,
5211
- _ctx.$slots.loading ? {
5212
- name: "loading",
5213
- fn: withCtx(() => [
5214
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5215
- ]),
5216
- key: "1"
5217
- } : void 0,
5218
- _ctx.$slots.valid ? {
5219
- name: "valid",
5220
- fn: withCtx(() => [
5221
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5222
- ]),
5223
- key: "2"
5224
- } : void 0,
5225
- _ctx.$slots.invalid ? {
5226
- name: "invalid",
5227
- fn: withCtx(() => [
5228
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5229
- ]),
5230
- key: "3"
5231
- } : void 0
5232
- ]), 1032, ["id"])
5233
- ], 2);
5901
+ return openBlock(), createElementBlock(
5902
+ "div",
5903
+ {
5904
+ class: normalizeClass(unref(bemCssClasses))
5905
+ },
5906
+ [
5907
+ unref(label) ? (openBlock(), createElementBlock("label", {
5908
+ key: 0,
5909
+ for: unref(hasId),
5910
+ class: "vv-input-text__label"
5911
+ }, toDisplayString(unref(label)), 9, _hoisted_1$6)) : createCommentVNode("v-if", true),
5912
+ createElementVNode("div", _hoisted_2$4, [
5913
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
5914
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5915
+ ])) : createCommentVNode("v-if", true),
5916
+ createElementVNode(
5917
+ "div",
5918
+ {
5919
+ ref_key: "innerEl",
5920
+ ref: innerEl,
5921
+ class: "vv-input-text__inner",
5922
+ onClick: withModifiers(onClickInner, ["stop"])
5923
+ },
5924
+ [
5925
+ unref(hasIconBefore) ? (openBlock(), createBlock(
5926
+ _sfc_main$u,
5927
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-input-text__icon" }),
5928
+ null,
5929
+ 16
5930
+ /* FULL_PROPS */
5931
+ )) : createCommentVNode("v-if", true),
5932
+ createElementVNode("input", mergeProps({
5933
+ id: unref(hasId),
5934
+ ref_key: "inputEl",
5935
+ ref: inputEl
5936
+ }, unref(hasAttrs), {
5937
+ style: unref(hasStyle),
5938
+ onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
5939
+ onKeydown: onKeyDown,
5940
+ onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
5941
+ }), null, 16, _hoisted_4$2),
5942
+ (_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
5943
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5944
+ createTextVNode(
5945
+ toDisplayString(_ctx.unit),
5946
+ 1
5947
+ /* TEXT */
5948
+ )
5949
+ ])
5950
+ ])) : createCommentVNode("v-if", true)
5951
+ ],
5952
+ 512
5953
+ /* NEED_PATCH */
5954
+ ),
5955
+ unref(iconAfter) ? (openBlock(), createBlock(
5956
+ _sfc_main$u,
5957
+ mergeProps({ key: 1 }, unref(iconAfter), { class: "vv-input-text__icon vv-input-text__icon-after" }),
5958
+ null,
5959
+ 16
5960
+ /* FULL_PROPS */
5961
+ )) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
5962
+ key: 2,
5963
+ onTogglePassword
5964
+ })) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
5965
+ key: 3,
5966
+ onStepUp,
5967
+ onStepDown
5968
+ })) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
5969
+ key: 4,
5970
+ onClear
5971
+ })) : createCommentVNode("v-if", true),
5972
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
5973
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5974
+ ])) : createCommentVNode("v-if", true),
5975
+ unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7$2, [
5976
+ renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5977
+ createTextVNode(
5978
+ toDisplayString(unref(countFormatted)),
5979
+ 1
5980
+ /* TEXT */
5981
+ )
5982
+ ])
5983
+ ])) : createCommentVNode("v-if", true)
5984
+ ]),
5985
+ createVNode(unref(HintSlot), {
5986
+ id: unref(hasHintId),
5987
+ class: "vv-input-text__hint"
5988
+ }, createSlots({
5989
+ _: 2
5990
+ /* DYNAMIC */
5991
+ }, [
5992
+ _ctx.$slots.hint ? {
5993
+ name: "hint",
5994
+ fn: withCtx(() => [
5995
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5996
+ ]),
5997
+ key: "0"
5998
+ } : void 0,
5999
+ _ctx.$slots.loading ? {
6000
+ name: "loading",
6001
+ fn: withCtx(() => [
6002
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6003
+ ]),
6004
+ key: "1"
6005
+ } : void 0,
6006
+ _ctx.$slots.valid ? {
6007
+ name: "valid",
6008
+ fn: withCtx(() => [
6009
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6010
+ ]),
6011
+ key: "2"
6012
+ } : void 0,
6013
+ _ctx.$slots.invalid ? {
6014
+ name: "invalid",
6015
+ fn: withCtx(() => [
6016
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6017
+ ]),
6018
+ key: "3"
6019
+ } : void 0
6020
+ ]), 1032, ["id"])
6021
+ ],
6022
+ 2
6023
+ /* CLASS */
6024
+ );
5234
6025
  };
5235
6026
  }
5236
6027
  });
5237
6028
  const VvNavProps = {
5238
6029
  ...ModifiersProps,
5239
- items: {
5240
- type: Array,
5241
- required: true,
5242
- default: () => []
5243
- }
6030
+ ...NavProps
5244
6031
  };
5245
6032
  const VvNavEvents = ["click"];
5246
- const _hoisted_1$4 = {
5247
- class: "vv-nav__menu",
5248
- role: "menu",
5249
- "aria-busy": "true"
6033
+ const _hoisted_1$5 = {
6034
+ class: "vv-nav__item",
6035
+ role: "presentation"
5250
6036
  };
5251
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6037
+ const __default__$5 = {
6038
+ name: "VvNavItem",
6039
+ inheritAttrs: false
6040
+ };
6041
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
6042
+ ...__default__$5,
6043
+ setup(__props) {
6044
+ return (_ctx, _cache) => {
6045
+ return openBlock(), createElementBlock("li", _hoisted_1$5, [
6046
+ createVNode(
6047
+ _sfc_main$v,
6048
+ mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }),
6049
+ {
6050
+ default: withCtx(() => [
6051
+ renderSlot(_ctx.$slots, "default")
6052
+ ]),
6053
+ _: 3
6054
+ /* FORWARDED */
6055
+ },
6056
+ 16
6057
+ /* FULL_PROPS */
6058
+ )
6059
+ ]);
6060
+ };
6061
+ }
6062
+ });
6063
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5252
6064
  __name: "VvNav",
5253
6065
  props: VvNavProps,
5254
6066
  emits: VvNavEvents,
5255
- setup(__props, { emit }) {
6067
+ setup(__props, { emit: __emit }) {
5256
6068
  const props = __props;
5257
- const { modifiers, items } = toRefs(props);
5258
- const activeItem = ref(null);
5259
- const bemCssClasses = useModifiers("vv-nav", modifiers);
5260
- const localItems = computed(() => {
5261
- return items.value.map((item, index) => {
5262
- return {
5263
- ...item,
5264
- id: item.id || `nav-item_${index}`
5265
- };
5266
- });
5267
- });
5268
- function onClick(item) {
5269
- if (!item.disabled) {
6069
+ const { modifiers } = toRefs(props);
6070
+ const emit = __emit;
6071
+ const onClick = (event) => {
6072
+ var _a;
6073
+ const target = event.target;
6074
+ if (target == null ? void 0 : target.dataset.index) {
6075
+ const index = parseInt(target.dataset.index);
6076
+ const item = (_a = props.items) == null ? void 0 : _a[index];
6077
+ if (!item || (item == null ? void 0 : item.disabled)) {
6078
+ return;
6079
+ }
5270
6080
  emit("click", item);
5271
- activeItem.value = item.id;
5272
6081
  }
5273
- }
6082
+ };
6083
+ const bemCssClasses = useModifiers("vv-nav", modifiers);
5274
6084
  return (_ctx, _cache) => {
5275
- return openBlock(), createElementBlock("nav", {
5276
- class: normalizeClass(unref(bemCssClasses))
5277
- }, [
5278
- createElementVNode("ul", _hoisted_1$4, [
5279
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (navItem) => {
5280
- return openBlock(), createElementBlock("li", {
5281
- key: navItem.id,
5282
- class: "vv-nav__item",
5283
- role: "presentation"
5284
- }, [
5285
- createVNode(_sfc_main$o, mergeProps({
5286
- disabled: navItem.disabled,
5287
- to: navItem.to,
5288
- href: navItem.href,
5289
- tabindex: 0
5290
- }, {
5291
- class: [{
5292
- current: unref(activeItem) == navItem.id,
5293
- disabled: navItem.disabled
5294
- }, "vv-nav__item-label"]
5295
- }, toHandlers(navItem.on), {
5296
- onClick: ($event) => onClick(navItem)
5297
- }), {
5298
- default: withCtx(() => [
5299
- createTextVNode(toDisplayString(navItem.title), 1)
5300
- ]),
5301
- _: 2
5302
- }, 1040, ["class", "onClick"])
5303
- ]);
5304
- }), 128))
5305
- ])
5306
- ], 2);
6085
+ return openBlock(), createElementBlock(
6086
+ "nav",
6087
+ {
6088
+ class: normalizeClass(unref(bemCssClasses))
6089
+ },
6090
+ [
6091
+ createElementVNode("ul", {
6092
+ class: "vv-nav__menu",
6093
+ role: "menu",
6094
+ "aria-busy": "true",
6095
+ onClick: withModifiers(onClick, ["stop"])
6096
+ }, [
6097
+ renderSlot(_ctx.$slots, "default", {}, () => [
6098
+ (openBlock(true), createElementBlock(
6099
+ Fragment,
6100
+ null,
6101
+ renderList(_ctx.items, ({ on = {}, data, ...item }, index) => {
6102
+ return openBlock(), createBlock(_sfc_main$9, mergeProps({
6103
+ key: index,
6104
+ "data-index": index
6105
+ }, item, toHandlers(on)), {
6106
+ default: withCtx(() => [
6107
+ renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps({ item, data, index })))
6108
+ ]),
6109
+ _: 2
6110
+ /* DYNAMIC */
6111
+ }, 1040, ["data-index"]);
6112
+ }),
6113
+ 128
6114
+ /* KEYED_FRAGMENT */
6115
+ ))
6116
+ ])
6117
+ ])
6118
+ ],
6119
+ 2
6120
+ /* CLASS */
6121
+ );
5307
6122
  };
5308
6123
  }
5309
6124
  });
6125
+ const _sfc_main$7 = {
6126
+ name: "VvNavSeparator"
6127
+ };
6128
+ const _export_sfc = (sfc, props) => {
6129
+ const target = sfc.__vccOpts || sfc;
6130
+ for (const [key, val] of props) {
6131
+ target[key] = val;
6132
+ }
6133
+ return target;
6134
+ };
6135
+ const _hoisted_1$4 = {
6136
+ class: "vv-nav__separator",
6137
+ role: "separator"
6138
+ };
6139
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6140
+ return openBlock(), createElementBlock("li", _hoisted_1$4, [
6141
+ renderSlot(_ctx.$slots, "default")
6142
+ ]);
6143
+ }
6144
+ const VvNavSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]);
5310
6145
  const VvProgressProps = {
5311
6146
  ...ModifiersProps,
5312
6147
  /**
@@ -5337,11 +6172,11 @@ const VvProgressProps = {
5337
6172
  required: true
5338
6173
  }
5339
6174
  };
5340
- const __default__$3 = {
6175
+ const __default__$4 = {
5341
6176
  name: "VvProgress"
5342
6177
  };
5343
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5344
- ...__default__$3,
6178
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6179
+ ...__default__$4,
5345
6180
  props: VvProgressProps,
5346
6181
  setup(__props) {
5347
6182
  const props = __props;
@@ -5354,12 +6189,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5354
6189
  computed(() => ({ indeterminate: indeterminate.value }))
5355
6190
  );
5356
6191
  return (_ctx, _cache) => {
5357
- return openBlock(), createElementBlock("progress", mergeProps({ role: "progressbar" }, {
5358
- class: unref(bemCssClasses),
5359
- ariaLabel: unref(ariaLabel),
5360
- max: unref(max),
5361
- value: unref(value)
5362
- }), null, 16);
6192
+ return openBlock(), createElementBlock(
6193
+ "progress",
6194
+ mergeProps({ role: "progressbar" }, {
6195
+ class: unref(bemCssClasses),
6196
+ ariaLabel: unref(ariaLabel),
6197
+ max: unref(max),
6198
+ value: unref(value)
6199
+ }),
6200
+ null,
6201
+ 16
6202
+ /* FULL_PROPS */
6203
+ );
5363
6204
  };
5364
6205
  }
5365
6206
  });
@@ -5397,16 +6238,17 @@ function useGroupProps(props, emit) {
5397
6238
  };
5398
6239
  }
5399
6240
  const _hoisted_1$3 = ["for"];
5400
- const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
5401
- const __default__$2 = {
6241
+ const _hoisted_2$3 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
6242
+ const __default__$3 = {
5402
6243
  name: "VvRadio"
5403
6244
  };
5404
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5405
- ...__default__$2,
6245
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
6246
+ ...__default__$3,
5406
6247
  props: VvRadioProps,
5407
6248
  emits: VvRadioEvents,
5408
- setup(__props, { emit }) {
6249
+ setup(__props, { emit: __emit }) {
5409
6250
  const props = __props;
6251
+ const emit = __emit;
5410
6252
  const slots = useSlots();
5411
6253
  const propsDefaults = useDefaults(
5412
6254
  "VvRadio",
@@ -5483,16 +6325,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5483
6325
  "aria-invalid": unref(isInvalid),
5484
6326
  "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
5485
6327
  "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
5486
- }, null, 8, _hoisted_2$2), [
6328
+ }, null, 8, _hoisted_2$3), [
5487
6329
  [vModelRadio, unref(localModelValue)]
5488
6330
  ]),
5489
6331
  renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
5490
- createTextVNode(toDisplayString(_ctx.label), 1)
6332
+ createTextVNode(
6333
+ toDisplayString(_ctx.label),
6334
+ 1
6335
+ /* TEXT */
6336
+ )
5491
6337
  ]),
5492
6338
  createVNode(unref(HintSlot), {
5493
6339
  id: unref(hasHintId),
5494
6340
  class: "vv-radio__hint"
5495
- }, createSlots({ _: 2 }, [
6341
+ }, createSlots({
6342
+ _: 2
6343
+ /* DYNAMIC */
6344
+ }, [
5496
6345
  _ctx.$slots.hint ? {
5497
6346
  name: "hint",
5498
6347
  fn: withCtx(() => [
@@ -5529,16 +6378,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5529
6378
  const VvRadioGroupProps = CheckboxRadioGroupProps;
5530
6379
  const VvRadioGroupEvents = ["update:modelValue", "change"];
5531
6380
  const _hoisted_1$2 = ["textContent"];
5532
- const _hoisted_2$1 = { class: "vv-radio-group__wrapper" };
5533
- const __default__$1 = {
6381
+ const _hoisted_2$2 = { class: "vv-radio-group__wrapper" };
6382
+ const __default__$2 = {
5534
6383
  name: "VvRadioGroup"
5535
6384
  };
5536
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5537
- ...__default__$1,
6385
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6386
+ ...__default__$2,
5538
6387
  props: VvRadioGroupProps,
5539
6388
  emits: VvRadioGroupEvents,
5540
- setup(__props, { emit }) {
6389
+ setup(__props, { emit: __emit }) {
5541
6390
  const props = __props;
6391
+ const emit = __emit;
5542
6392
  const slots = useSlots();
5543
6393
  const propsDefaults = useDefaults(
5544
6394
  "VvRadioGroup",
@@ -5577,104 +6427,195 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5577
6427
  };
5578
6428
  const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
5579
6429
  return (_ctx, _cache) => {
5580
- return openBlock(), createElementBlock("fieldset", {
5581
- class: normalizeClass(unref(bemCssClasses))
5582
- }, [
5583
- _ctx.label ? (openBlock(), createElementBlock("legend", {
5584
- key: 0,
5585
- textContent: toDisplayString(_ctx.label)
5586
- }, null, 8, _hoisted_1$2)) : createCommentVNode("", true),
5587
- createElementVNode("div", _hoisted_2$1, [
5588
- _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
5589
- return openBlock(), createBlock(_sfc_main$4, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
5590
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
5591
- ]),
5592
- createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
5593
- _ctx.$slots.hint ? {
5594
- name: "hint",
5595
- fn: withCtx(() => [
5596
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5597
- ]),
5598
- key: "0"
5599
- } : void 0,
5600
- _ctx.$slots.loading ? {
5601
- name: "loading",
5602
- fn: withCtx(() => [
5603
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5604
- ]),
5605
- key: "1"
5606
- } : void 0,
5607
- _ctx.$slots.valid ? {
5608
- name: "valid",
5609
- fn: withCtx(() => [
5610
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5611
- ]),
5612
- key: "2"
5613
- } : void 0,
5614
- _ctx.$slots.invalid ? {
5615
- name: "invalid",
5616
- fn: withCtx(() => [
5617
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6430
+ return openBlock(), createElementBlock(
6431
+ "fieldset",
6432
+ {
6433
+ class: normalizeClass(unref(bemCssClasses))
6434
+ },
6435
+ [
6436
+ _ctx.label ? (openBlock(), createElementBlock("legend", {
6437
+ key: 0,
6438
+ textContent: toDisplayString(_ctx.label)
6439
+ }, null, 8, _hoisted_1$2)) : createCommentVNode("v-if", true),
6440
+ createElementVNode("div", _hoisted_2$2, [
6441
+ _ctx.options.length > 0 ? (openBlock(true), createElementBlock(
6442
+ Fragment,
6443
+ { key: 0 },
6444
+ renderList(_ctx.options, (option, index) => {
6445
+ return openBlock(), createBlock(
6446
+ _sfc_main$5,
6447
+ mergeProps({ key: index }, getOptionProps(option, index)),
6448
+ null,
6449
+ 16
6450
+ /* FULL_PROPS */
6451
+ );
6452
+ }),
6453
+ 128
6454
+ /* KEYED_FRAGMENT */
6455
+ )) : renderSlot(_ctx.$slots, "default", { key: 1 })
6456
+ ]),
6457
+ createVNode(
6458
+ unref(HintSlot),
6459
+ { class: "vv-radio-group__hint" },
6460
+ createSlots({
6461
+ _: 2
6462
+ /* DYNAMIC */
6463
+ }, [
6464
+ _ctx.$slots.hint ? {
6465
+ name: "hint",
6466
+ fn: withCtx(() => [
6467
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6468
+ ]),
6469
+ key: "0"
6470
+ } : void 0,
6471
+ _ctx.$slots.loading ? {
6472
+ name: "loading",
6473
+ fn: withCtx(() => [
6474
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6475
+ ]),
6476
+ key: "1"
6477
+ } : void 0,
6478
+ _ctx.$slots.valid ? {
6479
+ name: "valid",
6480
+ fn: withCtx(() => [
6481
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6482
+ ]),
6483
+ key: "2"
6484
+ } : void 0,
6485
+ _ctx.$slots.invalid ? {
6486
+ name: "invalid",
6487
+ fn: withCtx(() => [
6488
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6489
+ ]),
6490
+ key: "3"
6491
+ } : void 0
5618
6492
  ]),
5619
- key: "3"
5620
- } : void 0
5621
- ]), 1024)
5622
- ], 2);
6493
+ 1024
6494
+ /* DYNAMIC_SLOTS */
6495
+ )
6496
+ ],
6497
+ 2
6498
+ /* CLASS */
6499
+ );
5623
6500
  };
5624
6501
  }
5625
6502
  });
5626
6503
  const VvTabProps = {
5627
6504
  ...ModifiersProps,
6505
+ navModifiers: {
6506
+ type: [String, Array]
6507
+ },
6508
+ modelValue: {
6509
+ type: String,
6510
+ default: ""
6511
+ },
5628
6512
  items: {
5629
6513
  type: Array,
5630
- required: true,
5631
6514
  default: () => []
5632
6515
  }
5633
6516
  };
5634
- const VvTabEvents = ["click"];
5635
- const _hoisted_1$1 = ["id"];
5636
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6517
+ const VvTabEvents = ["update:modelValue"];
6518
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5637
6519
  __name: "VvTab",
5638
6520
  props: VvTabProps,
5639
6521
  emits: VvTabEvents,
5640
- setup(__props, { emit }) {
6522
+ setup(__props, { emit: __emit }) {
5641
6523
  const props = __props;
6524
+ const emit = __emit;
5642
6525
  const { modifiers, items } = toRefs(props);
5643
- const activeTab = ref(null);
5644
- const bemCssClasses = useModifiers("vv-tab", modifiers);
5645
- const localItems = computed(() => {
5646
- return items.value.map((item, index) => {
5647
- return {
5648
- ...item,
5649
- id: item.id || `tab-item_${index}`
5650
- };
5651
- });
6526
+ const tabKeys = computed(() => {
6527
+ return items.value.reduce((acc, item) => {
6528
+ if (item.tab) {
6529
+ acc.push(item.tab);
6530
+ }
6531
+ return acc;
6532
+ }, []);
5652
6533
  });
5653
- function onClick(item) {
5654
- if (!item.disabled) {
5655
- emit("click", item);
5656
- activeTab.value = item.id;
6534
+ const localModelValue = ref();
6535
+ const activeTabKey = computed({
6536
+ get: () => {
6537
+ var _a;
6538
+ return props.modelValue || localModelValue.value || ((_a = tabKeys.value) == null ? void 0 : _a[0]);
6539
+ },
6540
+ set: (newValue) => {
6541
+ localModelValue.value = newValue;
6542
+ emit("update:modelValue", newValue);
5657
6543
  }
5658
- }
6544
+ });
6545
+ const hasNavModifiers = computed(() => {
6546
+ var _a;
6547
+ return [
6548
+ "tabs",
6549
+ ...Array.isArray(props.navModifiers) ? props.navModifiers : ((_a = props.navModifiers) == null ? void 0 : _a.split(" ")) ?? []
6550
+ ];
6551
+ });
6552
+ const onNavClick = (item) => {
6553
+ if (item.tab) {
6554
+ activeTabKey.value = item.tab;
6555
+ }
6556
+ };
6557
+ const navItems = computed(
6558
+ () => props.items.map((item) => ({
6559
+ current: item.tab === activeTabKey.value,
6560
+ ...item
6561
+ }))
6562
+ );
6563
+ const bemCssClasses = useModifiers("vv-tab", modifiers);
5659
6564
  return (_ctx, _cache) => {
5660
- return openBlock(), createElementBlock("div", {
5661
- class: normalizeClass(unref(bemCssClasses))
5662
- }, [
5663
- createVNode(_sfc_main$6, {
5664
- items: unref(localItems),
5665
- modifiers: "tabs full",
5666
- onClick
5667
- }, null, 8, ["items"]),
5668
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (item) => {
5669
- return openBlock(), createElementBlock("article", {
5670
- id: item.id,
5671
- key: item.id,
5672
- class: normalizeClass([{ target: unref(activeTab) === item.id }, "vv-tab__panel"])
5673
- }, [
5674
- renderSlot(_ctx.$slots, `${item.id}`)
5675
- ], 10, _hoisted_1$1);
5676
- }), 128))
5677
- ], 2);
6565
+ return openBlock(), createElementBlock(
6566
+ "div",
6567
+ {
6568
+ class: normalizeClass(unref(bemCssClasses))
6569
+ },
6570
+ [
6571
+ createVNode(
6572
+ _sfc_main$8,
6573
+ mergeProps({
6574
+ items: unref(navItems),
6575
+ modifiers: unref(hasNavModifiers)
6576
+ }, { onClick: onNavClick }),
6577
+ {
6578
+ item: withCtx(({ item, data, index }) => [
6579
+ renderSlot(_ctx.$slots, "nav-item", normalizeProps(guardReactiveProps({ item, data, index })))
6580
+ ]),
6581
+ _: 3
6582
+ /* FORWARDED */
6583
+ },
6584
+ 16
6585
+ /* FULL_PROPS */
6586
+ ),
6587
+ (openBlock(true), createElementBlock(
6588
+ Fragment,
6589
+ null,
6590
+ renderList(unref(items), (item, index) => {
6591
+ return openBlock(), createElementBlock(
6592
+ Fragment,
6593
+ { key: index },
6594
+ [
6595
+ item.tab ? (openBlock(), createElementBlock(
6596
+ "article",
6597
+ {
6598
+ key: 0,
6599
+ class: normalizeClass([{ target: unref(activeTabKey) === item.tab }, "vv-tab__panel"])
6600
+ },
6601
+ [
6602
+ renderSlot(_ctx.$slots, `panel::${item.tab}`)
6603
+ ],
6604
+ 2
6605
+ /* CLASS */
6606
+ )) : createCommentVNode("v-if", true)
6607
+ ],
6608
+ 64
6609
+ /* STABLE_FRAGMENT */
6610
+ );
6611
+ }),
6612
+ 128
6613
+ /* KEYED_FRAGMENT */
6614
+ ))
6615
+ ],
6616
+ 2
6617
+ /* CLASS */
6618
+ );
5678
6619
  };
5679
6620
  }
5680
6621
  });
@@ -5720,31 +6661,32 @@ const VvTextareaProps = {
5720
6661
  */
5721
6662
  resizable: Boolean
5722
6663
  };
5723
- const _hoisted_1 = ["for"];
5724
- const _hoisted_2 = { class: "vv-textarea__wrapper" };
5725
- const _hoisted_3 = {
6664
+ const _hoisted_1$1 = ["for"];
6665
+ const _hoisted_2$1 = { class: "vv-textarea__wrapper" };
6666
+ const _hoisted_3$1 = {
5726
6667
  key: 0,
5727
6668
  class: "vv-textarea__input-before"
5728
6669
  };
5729
- const _hoisted_4 = { class: "vv-textarea__inner" };
5730
- const _hoisted_5 = ["id"];
5731
- const _hoisted_6 = {
6670
+ const _hoisted_4$1 = { class: "vv-textarea__inner" };
6671
+ const _hoisted_5$1 = ["id"];
6672
+ const _hoisted_6$1 = {
5732
6673
  key: 1,
5733
6674
  class: "vv-textarea__input-after"
5734
6675
  };
5735
- const _hoisted_7 = {
6676
+ const _hoisted_7$1 = {
5736
6677
  key: 2,
5737
6678
  class: "vv-textarea__limit"
5738
6679
  };
5739
- const __default__ = {
6680
+ const __default__$1 = {
5740
6681
  name: "VvTextarea"
5741
6682
  };
5742
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5743
- ...__default__,
6683
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6684
+ ...__default__$1,
5744
6685
  props: VvTextareaProps,
5745
6686
  emits: VvTextareaEvents,
5746
- setup(__props, { emit }) {
6687
+ setup(__props, { emit: __emit }) {
5747
6688
  const props = __props;
6689
+ const emit = __emit;
5748
6690
  const slots = useSlots();
5749
6691
  const propsDefaults = useDefaults(
5750
6692
  "VvTextarea",
@@ -5773,10 +6715,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5773
6715
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
5774
6716
  );
5775
6717
  const localModelValue = useDebouncedInput(modelValue, emit, debounce == null ? void 0 : debounce.value);
5776
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
5777
- icon,
5778
- iconPosition
5779
- );
6718
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
5780
6719
  const { focused } = useComponentFocus(textarea, emit);
5781
6720
  const isVisible = useElementVisibility(textarea);
5782
6721
  watch(isVisible, (newValue) => {
@@ -5818,11 +6757,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5818
6757
  loading: loading.value,
5819
6758
  disabled: props.disabled,
5820
6759
  readonly: props.readonly,
5821
- "icon-before": hasIconBefore.value,
5822
- "icon-after": hasIconAfter.value,
6760
+ "icon-before": hasIconBefore.value !== void 0,
6761
+ "icon-after": hasIconAfter.value !== void 0,
5823
6762
  floating: props.floating && !isEmpty(props.label),
5824
6763
  dirty: isDirty.value,
5825
- focused: focused.value,
6764
+ focus: focused.value,
5826
6765
  resizable: props.resizable
5827
6766
  }))
5828
6767
  );
@@ -5859,81 +6798,100 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5859
6798
  localModelValue.value = void 0;
5860
6799
  };
5861
6800
  return (_ctx, _cache) => {
5862
- return openBlock(), createElementBlock("div", {
5863
- class: normalizeClass(unref(bemCssClasses))
5864
- }, [
5865
- unref(label) ? (openBlock(), createElementBlock("label", {
5866
- key: 0,
5867
- for: unref(hasId),
5868
- class: "vv-textarea__label"
5869
- }, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("", true),
5870
- createElementVNode("div", _hoisted_2, [
5871
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
5872
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5873
- ])) : createCommentVNode("", true),
5874
- createElementVNode("div", _hoisted_4, [
5875
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5876
- key: 0,
5877
- class: "vv-textarea__icon"
5878
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
5879
- withDirectives(createElementVNode("textarea", mergeProps({
5880
- id: unref(hasId),
5881
- ref_key: "textarea",
5882
- ref: textarea,
5883
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
5884
- }, unref(hasAttrs), {
5885
- onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
5886
- }), null, 16, _hoisted_5), [
5887
- [vModelText, unref(localModelValue)]
6801
+ return openBlock(), createElementBlock(
6802
+ "div",
6803
+ {
6804
+ class: normalizeClass(unref(bemCssClasses))
6805
+ },
6806
+ [
6807
+ unref(label) ? (openBlock(), createElementBlock("label", {
6808
+ key: 0,
6809
+ for: unref(hasId),
6810
+ class: "vv-textarea__label"
6811
+ }, toDisplayString(unref(label)), 9, _hoisted_1$1)) : createCommentVNode("v-if", true),
6812
+ createElementVNode("div", _hoisted_2$1, [
6813
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
6814
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
6815
+ ])) : createCommentVNode("v-if", true),
6816
+ createElementVNode("div", _hoisted_4$1, [
6817
+ unref(hasIconBefore) ? (openBlock(), createBlock(
6818
+ _sfc_main$u,
6819
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-textarea__icon" }),
6820
+ null,
6821
+ 16
6822
+ /* FULL_PROPS */
6823
+ )) : createCommentVNode("v-if", true),
6824
+ withDirectives(createElementVNode("textarea", mergeProps({
6825
+ id: unref(hasId),
6826
+ ref_key: "textarea",
6827
+ ref: textarea,
6828
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
6829
+ }, unref(hasAttrs), {
6830
+ onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
6831
+ }), null, 16, _hoisted_5$1), [
6832
+ [vModelText, unref(localModelValue)]
6833
+ ]),
6834
+ unref(hasIconAfter) ? (openBlock(), createBlock(
6835
+ _sfc_main$u,
6836
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-textarea__icon vv-textarea__icon-after" }),
6837
+ null,
6838
+ 16
6839
+ /* FULL_PROPS */
6840
+ )) : createCommentVNode("v-if", true)
5888
6841
  ]),
5889
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5890
- key: 1,
5891
- class: "vv-textarea__icon vv-textarea__icon-after"
5892
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
6842
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
6843
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
6844
+ ])) : createCommentVNode("v-if", true),
6845
+ unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7$1, [
6846
+ renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
6847
+ createTextVNode(
6848
+ toDisplayString(unref(countFormatted)),
6849
+ 1
6850
+ /* TEXT */
6851
+ )
6852
+ ])
6853
+ ])) : createCommentVNode("v-if", true)
5893
6854
  ]),
5894
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
5895
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5896
- ])) : createCommentVNode("", true),
5897
- unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
5898
- renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5899
- createTextVNode(toDisplayString(unref(countFormatted)), 1)
5900
- ])
5901
- ])) : createCommentVNode("", true)
5902
- ]),
5903
- createVNode(unref(HintSlot), {
5904
- id: unref(hasHintId),
5905
- class: "vv-textarea__hint"
5906
- }, createSlots({ _: 2 }, [
5907
- _ctx.$slots.hint ? {
5908
- name: "hint",
5909
- fn: withCtx(() => [
5910
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5911
- ]),
5912
- key: "0"
5913
- } : void 0,
5914
- _ctx.$slots.loading ? {
5915
- name: "loading",
5916
- fn: withCtx(() => [
5917
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5918
- ]),
5919
- key: "1"
5920
- } : void 0,
5921
- _ctx.$slots.valid ? {
5922
- name: "valid",
5923
- fn: withCtx(() => [
5924
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5925
- ]),
5926
- key: "2"
5927
- } : void 0,
5928
- _ctx.$slots.invalid ? {
5929
- name: "invalid",
5930
- fn: withCtx(() => [
5931
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5932
- ]),
5933
- key: "3"
5934
- } : void 0
5935
- ]), 1032, ["id"])
5936
- ], 2);
6855
+ createVNode(unref(HintSlot), {
6856
+ id: unref(hasHintId),
6857
+ class: "vv-textarea__hint"
6858
+ }, createSlots({
6859
+ _: 2
6860
+ /* DYNAMIC */
6861
+ }, [
6862
+ _ctx.$slots.hint ? {
6863
+ name: "hint",
6864
+ fn: withCtx(() => [
6865
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6866
+ ]),
6867
+ key: "0"
6868
+ } : void 0,
6869
+ _ctx.$slots.loading ? {
6870
+ name: "loading",
6871
+ fn: withCtx(() => [
6872
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6873
+ ]),
6874
+ key: "1"
6875
+ } : void 0,
6876
+ _ctx.$slots.valid ? {
6877
+ name: "valid",
6878
+ fn: withCtx(() => [
6879
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6880
+ ]),
6881
+ key: "2"
6882
+ } : void 0,
6883
+ _ctx.$slots.invalid ? {
6884
+ name: "invalid",
6885
+ fn: withCtx(() => [
6886
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6887
+ ]),
6888
+ key: "3"
6889
+ } : void 0
6890
+ ]), 1032, ["id"])
6891
+ ],
6892
+ 2
6893
+ /* CLASS */
6894
+ );
5937
6895
  };
5938
6896
  }
5939
6897
  });
@@ -5951,7 +6909,7 @@ const VvTooltipProps = {
5951
6909
  type: String
5952
6910
  }
5953
6911
  };
5954
- const _sfc_main = /* @__PURE__ */ defineComponent({
6912
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5955
6913
  __name: "VvTooltip",
5956
6914
  props: VvTooltipProps,
5957
6915
  setup(__props) {
@@ -5965,41 +6923,417 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5965
6923
  }))
5966
6924
  );
5967
6925
  return (_ctx, _cache) => {
5968
- return openBlock(), createElementBlock("span", {
5969
- class: normalizeClass(unref(bemCssClasses)),
5970
- role: "tooltip",
5971
- inert: ""
5972
- }, [
5973
- renderSlot(_ctx.$slots, "default", {}, () => [
5974
- createTextVNode(toDisplayString(_ctx.value), 1)
5975
- ])
5976
- ], 2);
6926
+ return openBlock(), createElementBlock(
6927
+ "span",
6928
+ {
6929
+ class: normalizeClass(unref(bemCssClasses)),
6930
+ role: "tooltip",
6931
+ inert: ""
6932
+ },
6933
+ [
6934
+ renderSlot(_ctx.$slots, "default", {}, () => [
6935
+ createTextVNode(
6936
+ toDisplayString(_ctx.value),
6937
+ 1
6938
+ /* TEXT */
6939
+ )
6940
+ ])
6941
+ ],
6942
+ 2
6943
+ /* CLASS */
6944
+ );
6945
+ };
6946
+ }
6947
+ });
6948
+ const VvInputFileProps = {
6949
+ ...ModifiersProps,
6950
+ ...ValidProps,
6951
+ ...InvalidProps,
6952
+ ...HintProps,
6953
+ ...LabelProps,
6954
+ ...LoadingProps,
6955
+ ...ReadonlyProps,
6956
+ name: { type: String },
6957
+ id: { type: String },
6958
+ modelValue: {
6959
+ type: Object,
6960
+ required: true
6961
+ },
6962
+ max: [Number, String],
6963
+ labelButton: { type: String, default: "Image" },
6964
+ loading: Boolean,
6965
+ accept: String,
6966
+ placeholder: String,
6967
+ multiple: Boolean,
6968
+ iconLeft: String,
6969
+ iconRight: String
6970
+ };
6971
+ const _hoisted_1 = ["for"];
6972
+ const _hoisted_2 = { class: "vv-input-file__preview" };
6973
+ const _hoisted_3 = ["src", "alt"];
6974
+ const _hoisted_4 = { class: "vv-input-file__wrapper" };
6975
+ const _hoisted_5 = ["id", "readonly", "placeholder", "aria-describedby", "aria-invalid", "aria-errormessage", "multiple", "accept", "name"];
6976
+ const _hoisted_6 = { class: "vv-input-file__list" };
6977
+ const _hoisted_7 = ["onClick"];
6978
+ const _hoisted_8 = ["onClick"];
6979
+ const _hoisted_9 = { class: "vv-input-file__item-name cursor-pointer" };
6980
+ const _hoisted_10 = { class: "vv-input-file__item-info" };
6981
+ const _hoisted_11 = ["onClick"];
6982
+ const __default__ = {
6983
+ name: "VvInputFile"
6984
+ };
6985
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6986
+ ...__default__,
6987
+ props: VvInputFileProps,
6988
+ emits: ["update:modelValue"],
6989
+ setup(__props, { emit: __emit }) {
6990
+ const props = __props;
6991
+ const emit = __emit;
6992
+ const slots = useSlots();
6993
+ const propsDefaults = useDefaults(
6994
+ "VvInputFile",
6995
+ VvInputFileProps,
6996
+ props
6997
+ );
6998
+ const { modifiers, id, readonly } = toRefs(props);
6999
+ const hasId = useUniqueId(id);
7000
+ const hasHintId = computed(() => `${hasId.value}-hint`);
7001
+ const bemCssClasses = useModifiers(
7002
+ "vv-input-file",
7003
+ modifiers,
7004
+ computed(() => ({
7005
+ dragging: isDragging.value,
7006
+ loading: props.loading,
7007
+ valid: props.valid === true,
7008
+ invalid: props.invalid === true,
7009
+ "icon-before": !!props.iconLeft,
7010
+ "icon-after": !!props.iconRight
7011
+ }))
7012
+ );
7013
+ const {
7014
+ HintSlot,
7015
+ hasHintLabelOrSlot,
7016
+ hasInvalidLabelOrSlot,
7017
+ hintSlotScope
7018
+ } = HintSlotFactory(propsDefaults, slots);
7019
+ const localModelValue = useVModel(props, "modelValue", emit);
7020
+ const files = computed(() => {
7021
+ var _a;
7022
+ if (!localModelValue.value || !Array.isArray(localModelValue.value) && !((_a = localModelValue.value) == null ? void 0 : _a.name)) {
7023
+ return [];
7024
+ }
7025
+ return Array.isArray(localModelValue.value) ? localModelValue.value : [localModelValue.value];
7026
+ });
7027
+ const hasMax = computed(() => {
7028
+ return typeof props.max === "string" ? parseInt(props.max) : props.max;
7029
+ });
7030
+ const hasDropArea = computed(() => {
7031
+ var _a;
7032
+ return (_a = modifiers == null ? void 0 : modifiers.value) == null ? void 0 : _a.includes("drop-area");
7033
+ });
7034
+ const isMultiple = computed(() => {
7035
+ if (!props.multiple) {
7036
+ return false;
7037
+ }
7038
+ if (!hasMax.value) {
7039
+ return true;
7040
+ }
7041
+ return hasMax.value - files.value.length > 1;
7042
+ });
7043
+ const isDragging = ref(false);
7044
+ const inputEl = ref();
7045
+ const onDragenter = () => {
7046
+ isDragging.value = true;
7047
+ };
7048
+ const onDragleave = () => {
7049
+ isDragging.value = false;
7050
+ };
7051
+ const onDrop = (event) => {
7052
+ var _a, _b;
7053
+ if (!((_a = event.dataTransfer) == null ? void 0 : _a.files)) {
7054
+ return;
7055
+ }
7056
+ isDragging.value = false;
7057
+ addFiles((_b = event.dataTransfer) == null ? void 0 : _b.files);
7058
+ };
7059
+ const onChange = () => {
7060
+ var _a;
7061
+ if (!((_a = inputEl.value) == null ? void 0 : _a.files)) {
7062
+ return;
7063
+ }
7064
+ addFiles(inputEl.value.files);
7065
+ inputEl.value.value = "";
7066
+ };
7067
+ const addFiles = (uploadedFiles) => {
7068
+ if (!props.multiple) {
7069
+ if (Array.isArray(localModelValue.value)) {
7070
+ localModelValue.value = [...uploadedFiles];
7071
+ return;
7072
+ }
7073
+ localModelValue.value = uploadedFiles[0];
7074
+ return;
7075
+ }
7076
+ let toReturn = [];
7077
+ if (!Array.isArray(localModelValue.value) && localModelValue.value) {
7078
+ toReturn = [localModelValue.value];
7079
+ } else {
7080
+ toReturn = localModelValue.value && Array.isArray(localModelValue.value) ? [...localModelValue.value] : toReturn;
7081
+ }
7082
+ for (const file of uploadedFiles) {
7083
+ if (hasMax.value && toReturn.length >= hasMax.value) {
7084
+ break;
7085
+ }
7086
+ toReturn.push(file);
7087
+ }
7088
+ localModelValue.value = toReturn;
7089
+ };
7090
+ const onClick = () => {
7091
+ if (!inputEl.value) {
7092
+ return;
7093
+ }
7094
+ if (!readonly.value) {
7095
+ inputEl.value.click();
7096
+ }
7097
+ };
7098
+ const onClickRemoveFile = (index) => {
7099
+ if (!Array.isArray(localModelValue.value)) {
7100
+ localModelValue.value = void 0;
7101
+ return;
7102
+ }
7103
+ const toReturn = [...localModelValue.value];
7104
+ toReturn.splice(index, 1);
7105
+ localModelValue.value = toReturn;
7106
+ };
7107
+ const currentFileIndex = ref(0);
7108
+ const previewSrc = computed(() => {
7109
+ if (files.value.length === 0) {
7110
+ return;
7111
+ }
7112
+ if (files.value[currentFileIndex.value] instanceof File) {
7113
+ return URL.createObjectURL(
7114
+ files.value[currentFileIndex.value]
7115
+ );
7116
+ }
7117
+ return files.value[currentFileIndex.value].url;
7118
+ });
7119
+ onBeforeUnmount(() => {
7120
+ if (previewSrc.value) {
7121
+ URL.revokeObjectURL(previewSrc.value);
7122
+ }
7123
+ });
7124
+ const sizeInKiB = (size2) => {
7125
+ if (!size2) {
7126
+ return;
7127
+ }
7128
+ return Math.floor(size2 / 1024);
7129
+ };
7130
+ const onClickDownloadFile = (file) => {
7131
+ const link = document.createElement("a");
7132
+ if (file instanceof File) {
7133
+ link.href = URL.createObjectURL(file);
7134
+ } else if (file.url) {
7135
+ link.href = file.url;
7136
+ }
7137
+ link.setAttribute("download", file.name);
7138
+ document.body.appendChild(link);
7139
+ link.click();
7140
+ };
7141
+ return (_ctx, _cache) => {
7142
+ return openBlock(), createElementBlock(
7143
+ "div",
7144
+ {
7145
+ class: normalizeClass(unref(bemCssClasses))
7146
+ },
7147
+ [
7148
+ _ctx.label ? (openBlock(), createElementBlock("label", {
7149
+ key: 0,
7150
+ for: unref(hasId)
7151
+ }, toDisplayString(_ctx.label), 9, _hoisted_1)) : createCommentVNode("v-if", true),
7152
+ hasDropArea.value ? (openBlock(), createElementBlock(
7153
+ "div",
7154
+ {
7155
+ key: 1,
7156
+ class: "vv-input-file__drop-area",
7157
+ onDragenter: withModifiers(onDragenter, ["prevent", "stop"]),
7158
+ onDragleave: withModifiers(onDragleave, ["prevent", "stop"]),
7159
+ onDrop: withModifiers(onDrop, ["prevent", "stop"]),
7160
+ onDragover: _cache[0] || (_cache[0] = withModifiers(() => {
7161
+ }, ["prevent", "stop"])),
7162
+ onClick: withModifiers(onClick, ["stop"])
7163
+ },
7164
+ [
7165
+ renderSlot(_ctx.$slots, "drop-area", {}, () => [
7166
+ !unref(readonly) ? (openBlock(), createBlock(_sfc_main$n, {
7167
+ key: 0,
7168
+ modifiers: "action",
7169
+ "aria-label": "upload",
7170
+ label: !previewSrc.value ? _ctx.labelButton : void 0,
7171
+ class: normalizeClass([{
7172
+ "absolute top-8 right-8": previewSrc.value
7173
+ }, "z-1"]),
7174
+ icon: !previewSrc.value ? "image" : isMultiple.value ? "add" : "edit",
7175
+ onClick: withModifiers(onClick, ["stop"])
7176
+ }, null, 8, ["label", "class", "icon"])) : createCommentVNode("v-if", true),
7177
+ createElementVNode("picture", _hoisted_2, [
7178
+ previewSrc.value ? (openBlock(), createElementBlock("img", {
7179
+ key: 0,
7180
+ src: previewSrc.value,
7181
+ alt: files.value[currentFileIndex.value].name
7182
+ }, null, 8, _hoisted_3)) : createCommentVNode("v-if", true)
7183
+ ])
7184
+ ])
7185
+ ],
7186
+ 32
7187
+ /* NEED_HYDRATION */
7188
+ )) : createCommentVNode("v-if", true),
7189
+ createElementVNode("div", _hoisted_4, [
7190
+ _ctx.iconLeft ? (openBlock(), createBlock(_sfc_main$u, {
7191
+ key: 0,
7192
+ name: _ctx.iconLeft
7193
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
7194
+ createElementVNode("input", {
7195
+ id: unref(hasId),
7196
+ ref_key: "inputEl",
7197
+ ref: inputEl,
7198
+ readonly: unref(readonly),
7199
+ placeholder: _ctx.placeholder,
7200
+ "aria-describedby": unref(hasHintLabelOrSlot) ? hasHintId.value : void 0,
7201
+ "aria-invalid": _ctx.invalid,
7202
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? hasHintId.value : void 0,
7203
+ multiple: isMultiple.value,
7204
+ accept: _ctx.accept,
7205
+ type: "file",
7206
+ name: _ctx.name,
7207
+ onChange
7208
+ }, null, 40, _hoisted_5),
7209
+ _ctx.iconRight ? (openBlock(), createBlock(_sfc_main$u, {
7210
+ key: 1,
7211
+ name: _ctx.iconRight
7212
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true)
7213
+ ]),
7214
+ createElementVNode("ul", _hoisted_6, [
7215
+ (openBlock(true), createElementBlock(
7216
+ Fragment,
7217
+ null,
7218
+ renderList(files.value, (file, index) => {
7219
+ return openBlock(), createElementBlock("li", {
7220
+ key: index,
7221
+ class: "vv-input-file__item",
7222
+ onClick: withModifiers(($event) => currentFileIndex.value = index, ["stop"])
7223
+ }, [
7224
+ createElementVNode("button", {
7225
+ type: "button",
7226
+ class: "vv-input-file__item-icon cursor-pointer",
7227
+ title: "Download",
7228
+ "aria-label": "download-file",
7229
+ onClick: withModifiers(($event) => onClickDownloadFile(file), ["stop"])
7230
+ }, [
7231
+ createVNode(_sfc_main$u, { name: "download" })
7232
+ ], 8, _hoisted_8),
7233
+ createElementVNode(
7234
+ "div",
7235
+ _hoisted_9,
7236
+ toDisplayString(file.name),
7237
+ 1
7238
+ /* TEXT */
7239
+ ),
7240
+ createElementVNode(
7241
+ "small",
7242
+ _hoisted_10,
7243
+ toDisplayString(sizeInKiB(file.size)) + " KB ",
7244
+ 1
7245
+ /* TEXT */
7246
+ ),
7247
+ !unref(readonly) ? (openBlock(), createElementBlock("button", {
7248
+ key: 0,
7249
+ type: "button",
7250
+ class: "vv-input-file__item-remove",
7251
+ title: "Remove",
7252
+ "aria-label": "remove-file",
7253
+ onClick: withModifiers(($event) => onClickRemoveFile(index), ["stop"])
7254
+ }, null, 8, _hoisted_11)) : createCommentVNode("v-if", true)
7255
+ ], 8, _hoisted_7);
7256
+ }),
7257
+ 128
7258
+ /* KEYED_FRAGMENT */
7259
+ ))
7260
+ ]),
7261
+ createVNode(unref(HintSlot), {
7262
+ id: hasHintId.value,
7263
+ class: "vv-input-file__hint"
7264
+ }, createSlots({
7265
+ _: 2
7266
+ /* DYNAMIC */
7267
+ }, [
7268
+ _ctx.$slots.hint ? {
7269
+ name: "hint",
7270
+ fn: withCtx(() => [
7271
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
7272
+ ]),
7273
+ key: "0"
7274
+ } : void 0,
7275
+ _ctx.$slots.loading ? {
7276
+ name: "loading",
7277
+ fn: withCtx(() => [
7278
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
7279
+ ]),
7280
+ key: "1"
7281
+ } : void 0,
7282
+ _ctx.$slots.valid ? {
7283
+ name: "valid",
7284
+ fn: withCtx(() => [
7285
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
7286
+ ]),
7287
+ key: "2"
7288
+ } : void 0,
7289
+ _ctx.$slots.invalid ? {
7290
+ name: "invalid",
7291
+ fn: withCtx(() => [
7292
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
7293
+ ]),
7294
+ key: "3"
7295
+ } : void 0
7296
+ ]), 1032, ["id"])
7297
+ ],
7298
+ 2
7299
+ /* CLASS */
7300
+ );
5977
7301
  };
5978
7302
  }
5979
7303
  });
5980
7304
  export {
5981
- _sfc_main$q as VvAccordion,
5982
- _sfc_main$p as VvAccordionGroup,
5983
- _sfc_main$o as VvAction,
5984
- _sfc_main$m as VvAlert,
5985
- _sfc_main$l as VvBadge,
5986
- _sfc_main$k as VvBreadcrumb,
5987
- _sfc_main$j as VvButton,
5988
- _sfc_main$i as VvButtonGroup,
5989
- _sfc_main$h as VvCard,
5990
- _sfc_main$g as VvCheckbox,
5991
- _sfc_main$f as VvCheckboxGroup,
5992
- _sfc_main$9 as VvCombobox,
5993
- _sfc_main$8 as VvDialog,
5994
- _sfc_main$e as VvDropdown,
5995
- _sfc_main$n as VvIcon,
5996
- _sfc_main$7 as VvInputText,
5997
- _sfc_main$6 as VvNav,
5998
- _sfc_main$5 as VvProgress,
5999
- _sfc_main$4 as VvRadio,
6000
- _sfc_main$3 as VvRadioGroup,
6001
- _sfc_main$a as VvSelect,
6002
- _sfc_main$2 as VvTab,
6003
- _sfc_main$1 as VvTextarea,
6004
- _sfc_main as VvTooltip
7305
+ _sfc_main$x as VvAccordion,
7306
+ _sfc_main$w as VvAccordionGroup,
7307
+ _sfc_main$v as VvAction,
7308
+ _sfc_main$t as VvAlert,
7309
+ _sfc_main$s as VvAlertGroup,
7310
+ _sfc_main$r as VvAvatar,
7311
+ _sfc_main$q as VvAvatarGroup,
7312
+ _sfc_main$p as VvBadge,
7313
+ _sfc_main$o as VvBreadcrumb,
7314
+ _sfc_main$n as VvButton,
7315
+ _sfc_main$m as VvButtonGroup,
7316
+ _sfc_main$l as VvCard,
7317
+ _sfc_main$k as VvCheckbox,
7318
+ _sfc_main$j as VvCheckboxGroup,
7319
+ _sfc_main$d as VvCombobox,
7320
+ _sfc_main$c as VvDialog,
7321
+ _sfc_main$i as VvDropdown,
7322
+ _sfc_main$b as VvDropdownAction,
7323
+ _sfc_main$h as VvDropdownItem,
7324
+ _sfc_main$f as VvDropdownOptgroup,
7325
+ _sfc_main$g as VvDropdownOption,
7326
+ _sfc_main$u as VvIcon,
7327
+ _sfc_main as VvInputFile,
7328
+ _sfc_main$a as VvInputText,
7329
+ _sfc_main$8 as VvNav,
7330
+ _sfc_main$9 as VvNavItem,
7331
+ VvNavSeparator,
7332
+ _sfc_main$6 as VvProgress,
7333
+ _sfc_main$5 as VvRadio,
7334
+ _sfc_main$4 as VvRadioGroup,
7335
+ _sfc_main$e as VvSelect,
7336
+ _sfc_main$3 as VvTab,
7337
+ _sfc_main$2 as VvTextarea,
7338
+ _sfc_main$1 as VvTooltip
6005
7339
  };