@volverjs/ui-vue 0.0.10-beta.1 → 0.0.10-beta.11

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 (182) hide show
  1. package/README.md +64 -1
  2. package/auto-imports.d.ts +1 -1
  3. package/bin/icons.cjs +1 -1
  4. package/bin/icons.js +34 -19
  5. package/dist/components/VvAccordion/VvAccordion.es.js +33 -4
  6. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
  8. package/dist/components/VvAccordion/index.d.ts +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +75 -27
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +5 -5
  12. package/dist/components/VvAction/VvAction.es.js +26 -4
  13. package/dist/components/VvAction/VvAction.umd.js +1 -1
  14. package/dist/components/VvAction/VvAction.vue.d.ts +17 -4
  15. package/dist/components/VvAction/index.d.ts +5 -0
  16. package/dist/components/VvAlert/VvAlert.es.js +96 -45
  17. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  18. package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +136 -66
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
  22. package/dist/components/VvAvatar/VvAvatar.es.js +22 -1
  23. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  24. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +79 -28
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  26. package/dist/components/VvBadge/VvBadge.es.js +39 -8
  27. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  28. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +224 -41
  29. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +15 -3
  31. package/dist/components/VvBreadcrumb/index.d.ts +2 -9
  32. package/dist/components/VvButton/VvButton.es.js +67 -22
  33. package/dist/components/VvButton/VvButton.umd.js +1 -1
  34. package/dist/components/VvButton/VvButton.vue.d.ts +25 -9
  35. package/dist/components/VvButton/index.d.ts +5 -0
  36. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -6
  37. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  38. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -6
  39. package/dist/components/VvCard/VvCard.es.js +47 -16
  40. package/dist/components/VvCard/VvCard.umd.js +1 -1
  41. package/dist/components/VvCheckbox/VvCheckbox.es.js +32 -4
  42. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  43. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +8 -8
  44. package/dist/components/VvCheckbox/index.d.ts +1 -1
  45. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +101 -46
  46. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  47. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
  48. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  49. package/dist/components/VvCombobox/VvCombobox.es.js +625 -379
  50. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  51. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +112 -112
  52. package/dist/components/VvCombobox/index.d.ts +32 -32
  53. package/dist/components/VvDialog/VvDialog.es.js +65 -27
  54. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  55. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  56. package/dist/components/VvDropdown/VvDropdown.es.js +87 -46
  57. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  58. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +203 -189
  59. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +12 -0
  60. package/dist/components/VvDropdown/index.d.ts +32 -32
  61. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +46 -12
  62. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  63. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  64. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +28 -1
  65. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  66. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +40 -8
  67. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  68. package/dist/components/VvIcon/VvIcon.es.js +1 -1
  69. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  70. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  71. package/dist/components/VvInputText/VvInputText.es.js +149 -99
  72. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  73. package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
  74. package/dist/components/VvInputText/index.d.ts +8 -2
  75. package/dist/components/VvNav/VvNav.es.js +115 -63
  76. package/dist/components/VvNav/VvNav.umd.js +1 -1
  77. package/dist/components/VvNav/VvNav.vue.d.ts +32 -12
  78. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  79. package/dist/components/VvNav/index.d.ts +1 -12
  80. package/dist/components/VvNavItem/VvNavItem.es.js +413 -0
  81. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  82. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  83. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  84. package/dist/components/VvProgress/VvProgress.es.js +33 -6
  85. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  86. package/dist/components/VvRadio/VvRadio.es.js +32 -4
  87. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  88. package/dist/components/VvRadio/VvRadio.vue.d.ts +8 -8
  89. package/dist/components/VvRadio/index.d.ts +1 -1
  90. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +101 -46
  91. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  92. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
  93. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  94. package/dist/components/VvSelect/VvSelect.es.js +156 -96
  95. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  96. package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
  97. package/dist/components/VvSelect/index.d.ts +1 -1
  98. package/dist/components/VvTab/VvTab.es.js +214 -99
  99. package/dist/components/VvTab/VvTab.umd.js +1 -1
  100. package/dist/components/VvTab/VvTab.vue.d.ts +40 -11
  101. package/dist/components/VvTab/index.d.ts +9 -3
  102. package/dist/components/VvTextarea/VvTextarea.es.js +123 -77
  103. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  104. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
  105. package/dist/components/VvTooltip/VvTooltip.es.js +40 -9
  106. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  107. package/dist/components/index.d.ts +9 -0
  108. package/dist/components/index.es.js +2015 -1012
  109. package/dist/components/index.umd.js +1 -1
  110. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  111. package/dist/composables/useVolver.d.ts +1 -1
  112. package/dist/directives/index.d.ts +3 -5
  113. package/dist/directives/index.es.js +60 -23
  114. package/dist/directives/index.umd.js +1 -1
  115. package/dist/directives/v-tooltip.es.js +58 -18
  116. package/dist/directives/v-tooltip.umd.js +1 -1
  117. package/dist/icons.es.js +3 -3
  118. package/dist/icons.umd.js +1 -1
  119. package/dist/index.d.ts +3 -1
  120. package/dist/index.es.js +19 -16
  121. package/dist/index.umd.js +1 -1
  122. package/dist/props/index.d.ts +58 -34
  123. package/dist/resolvers/unplugin.d.ts +6 -1
  124. package/dist/resolvers/unplugin.es.js +20 -5
  125. package/dist/resolvers/unplugin.umd.js +1 -1
  126. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +50 -15
  127. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +332 -83
  128. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  129. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  130. package/dist/types/alert.d.ts +13 -0
  131. package/dist/types/floating-ui.d.ts +6 -0
  132. package/dist/types/generic.d.ts +4 -0
  133. package/dist/types/group.d.ts +37 -0
  134. package/dist/types/index.d.ts +5 -0
  135. package/dist/types/nav.d.ts +18 -0
  136. package/package.json +60 -51
  137. package/src/Volver.ts +22 -16
  138. package/src/assets/icons/detailed.json +1 -1
  139. package/src/assets/icons/normal.json +1 -1
  140. package/src/assets/icons/simple.json +1 -1
  141. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  142. package/src/components/VvAction/VvAction.vue +5 -2
  143. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  144. package/src/components/VvBreadcrumb/index.ts +2 -8
  145. package/src/components/VvCombobox/VvCombobox.vue +19 -8
  146. package/src/components/VvCombobox/index.ts +4 -0
  147. package/src/components/VvInputText/VvInputText.vue +2 -2
  148. package/src/components/VvNav/VvNav.vue +30 -50
  149. package/src/components/VvNav/VvNavItem.vue +18 -0
  150. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  151. package/src/components/VvNav/index.ts +2 -15
  152. package/src/components/VvTab/VvTab.vue +63 -35
  153. package/src/components/VvTab/index.ts +10 -4
  154. package/src/components/VvTextarea/VvTextarea.vue +1 -1
  155. package/src/components/index.ts +9 -0
  156. package/src/composables/useUniqueId.ts +2 -2
  157. package/src/directives/index.ts +1 -4
  158. package/src/directives/v-tooltip.ts +19 -10
  159. package/src/index.ts +3 -1
  160. package/src/props/index.ts +27 -3
  161. package/src/resolvers/unplugin.ts +22 -2
  162. package/src/stories/Button/ButtonModifiers.stories.ts +4 -14
  163. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  164. package/src/stories/Nav/Nav.settings.ts +3 -4
  165. package/src/stories/Nav/Nav.test.ts +4 -15
  166. package/src/stories/Tab/Tab.settings.ts +9 -9
  167. package/src/stories/Tab/Tab.stories.ts +2 -2
  168. package/src/stories/Tab/Tab.test.ts +6 -14
  169. package/src/stories/argTypes.ts +1 -1
  170. package/src/types/generic.ts +6 -0
  171. package/src/types/index.ts +5 -0
  172. package/src/types/nav.ts +20 -0
  173. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  174. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  175. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  176. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  177. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  178. package/src/types/generic.d.ts +0 -6
  179. /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
  180. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  181. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  182. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, onMounted, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, isRef, useSlots, renderList, vModelSelect, createSlots, resolveDynamicComponent, toRef, withModifiers, vModelText } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
- import { nanoid } from "nanoid";
4
+ import { uid } from "uid";
5
5
  import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
6
6
  import mitt from "mitt";
7
7
  import { get } from "ts-dot-prop";
@@ -158,6 +158,12 @@ const ActiveProps = {
158
158
  */
159
159
  active: Boolean
160
160
  };
161
+ const CurrentProps = {
162
+ /**
163
+ * Whether the item is current
164
+ */
165
+ current: Boolean
166
+ };
161
167
  const PressedProps = {
162
168
  /**
163
169
  * Whether the item is pressed
@@ -367,6 +373,7 @@ const ActionProps = {
367
373
  ...LabelProps,
368
374
  ...PressedProps,
369
375
  ...ActiveProps,
376
+ ...CurrentProps,
370
377
  ...LinkProps,
371
378
  /**
372
379
  * Button type
@@ -382,10 +389,21 @@ const ActionProps = {
382
389
  ariaLabel: {
383
390
  type: String,
384
391
  default: void 0
392
+ },
393
+ /**
394
+ * Default tag for the action
395
+ */
396
+ defaultTag: {
397
+ type: String,
398
+ default: ActionTag.button
385
399
  }
386
400
  };
387
401
  const VvComboboxEvents = [
388
402
  "update:modelValue",
403
+ "update:search",
404
+ /**
405
+ * @deprecated change:search should not be used, use update:search instead
406
+ */
389
407
  "change:search",
390
408
  "focus",
391
409
  "blur"
@@ -745,7 +763,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
745
763
  color: _ctx.color,
746
764
  onLoad: _ctx.onLoad,
747
765
  icon: unref(icon)
748
- }), null, 16, ["class"])) : createCommentVNode("", true);
766
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
749
767
  };
750
768
  }
751
769
  });
@@ -776,7 +794,7 @@ const VvDropdownProps = {
776
794
  validator: (value) => Object.values(DropdownRole).includes(value)
777
795
  }
778
796
  };
779
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
797
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
780
798
  function useProvideDropdownTrigger({
781
799
  reference,
782
800
  id,
@@ -1186,50 +1204,70 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1186
1204
  }
1187
1205
  };
1188
1206
  return (_ctx, _cache) => {
1189
- return openBlock(), createElementBlock(Fragment, null, [
1190
- createVNode(unref(VvDropdownTriggerProvider), null, {
1191
- default: withCtx(() => [
1192
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1193
- ]),
1194
- _: 3
1195
- }),
1196
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
1197
- default: withCtx(() => [
1198
- withDirectives(createElementVNode("div", {
1199
- ref_key: "floatingEl",
1200
- ref: floatingEl,
1201
- style: normalizeStyle(unref(dropdownPlacement)),
1202
- class: normalizeClass(unref(bemCssClasses))
1203
- }, [
1204
- props.arrow ? (openBlock(), createElementBlock("div", {
1205
- key: 0,
1206
- ref_key: "arrowEl",
1207
- ref: arrowEl,
1208
- style: normalizeStyle(unref(arrowPlacement)),
1209
- class: "vv-dropdown__arrow"
1210
- }, null, 4)) : createCommentVNode("", true),
1211
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1212
- createElementVNode("div", mergeProps(unref(attrs), {
1213
- id: unref(hasId),
1214
- ref_key: "listEl",
1215
- ref: listEl,
1216
- tabindex: !unref(expanded) ? -1 : void 0,
1217
- role: unref(role),
1218
- "aria-labelledby": unref(hasAriaLabelledby),
1219
- class: "vv-dropdown__list"
1220
- }), [
1221
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1222
- role: unref(itemRole)
1223
- })))
1224
- ], 16, _hoisted_1$5),
1225
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1226
- ], 6), [
1227
- [vShow, unref(expanded)]
1228
- ])
1229
- ]),
1230
- _: 3
1231
- }, 16, ["name"])
1232
- ], 64);
1207
+ return openBlock(), createElementBlock(
1208
+ Fragment,
1209
+ null,
1210
+ [
1211
+ createVNode(unref(VvDropdownTriggerProvider), null, {
1212
+ default: withCtx(() => [
1213
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
1214
+ ]),
1215
+ _: 3
1216
+ /* FORWARDED */
1217
+ }),
1218
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
1219
+ default: withCtx(() => [
1220
+ withDirectives(createElementVNode(
1221
+ "div",
1222
+ {
1223
+ ref_key: "floatingEl",
1224
+ ref: floatingEl,
1225
+ style: normalizeStyle(unref(dropdownPlacement)),
1226
+ class: normalizeClass(unref(bemCssClasses))
1227
+ },
1228
+ [
1229
+ props.arrow ? (openBlock(), createElementBlock(
1230
+ "div",
1231
+ {
1232
+ key: 0,
1233
+ ref_key: "arrowEl",
1234
+ ref: arrowEl,
1235
+ style: normalizeStyle(unref(arrowPlacement)),
1236
+ class: "vv-dropdown__arrow"
1237
+ },
1238
+ null,
1239
+ 4
1240
+ /* STYLE */
1241
+ )) : createCommentVNode("v-if", true),
1242
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
1243
+ createElementVNode("div", mergeProps(unref(attrs), {
1244
+ id: unref(hasId),
1245
+ ref_key: "listEl",
1246
+ ref: listEl,
1247
+ tabindex: !unref(expanded) ? -1 : void 0,
1248
+ role: unref(role),
1249
+ "aria-labelledby": unref(hasAriaLabelledby),
1250
+ class: "vv-dropdown__list"
1251
+ }), [
1252
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1253
+ role: unref(itemRole)
1254
+ })))
1255
+ ], 16, _hoisted_1$5),
1256
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1257
+ ],
1258
+ 6
1259
+ /* CLASS, STYLE */
1260
+ ), [
1261
+ [vShow, unref(expanded)]
1262
+ ])
1263
+ ]),
1264
+ _: 3
1265
+ /* FORWARDED */
1266
+ }, 16, ["name"])
1267
+ ],
1268
+ 64
1269
+ /* STABLE_FRAGMENT */
1270
+ );
1233
1271
  };
1234
1272
  }
1235
1273
  });
@@ -1260,13 +1298,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1260
1298
  }
1261
1299
  });
1262
1300
  return (_ctx, _cache) => {
1263
- return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
1264
- ref_key: "element",
1265
- ref: element,
1266
- class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1267
- }), [
1268
- renderSlot(_ctx.$slots, "default")
1269
- ], 16);
1301
+ return openBlock(), createElementBlock(
1302
+ "div",
1303
+ mergeProps({ role: unref(role) }, {
1304
+ ref_key: "element",
1305
+ ref: element,
1306
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
1307
+ }),
1308
+ [
1309
+ renderSlot(_ctx.$slots, "default")
1310
+ ],
1311
+ 16
1312
+ /* FULL_PROPS */
1313
+ );
1270
1314
  };
1271
1315
  }
1272
1316
  });
@@ -1325,11 +1369,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1325
1369
  title: unref(hintLabel)
1326
1370
  }, [
1327
1371
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
1328
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
1372
+ createTextVNode(
1373
+ toDisplayString(unref(hintLabel)),
1374
+ 1
1375
+ /* TEXT */
1376
+ )
1329
1377
  ])
1330
1378
  ], 8, _hoisted_1$4)
1331
1379
  ]),
1332
1380
  _: 3
1381
+ /* FORWARDED */
1333
1382
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
1334
1383
  };
1335
1384
  }
@@ -1350,7 +1399,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1350
1399
  setup(__props) {
1351
1400
  const props = __props;
1352
1401
  return (_ctx, _cache) => {
1353
- return openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(props.label), 1);
1402
+ return openBlock(), createElementBlock(
1403
+ "li",
1404
+ _hoisted_1$3,
1405
+ toDisplayString(props.label),
1406
+ 1
1407
+ /* TEXT */
1408
+ );
1354
1409
  };
1355
1410
  }
1356
1411
  });
@@ -1892,101 +1947,140 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1892
1947
  return option && option.options && option.options.length > 0;
1893
1948
  };
1894
1949
  return (_ctx, _cache) => {
1895
- return openBlock(), createElementBlock("div", {
1896
- class: normalizeClass(unref(bemCssClasses))
1897
- }, [
1898
- _ctx.label ? (openBlock(), createElementBlock("label", {
1899
- key: 0,
1900
- for: unref(hasId)
1901
- }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("", true),
1902
- createElementVNode("div", _hoisted_2$2, [
1903
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1904
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1905
- ])) : createCommentVNode("", true),
1906
- createElementVNode("div", _hoisted_4$1, [
1907
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1908
- key: 0,
1909
- class: "vv-select__icon"
1910
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
1911
- withDirectives(createElementVNode("select", mergeProps({
1912
- id: unref(hasId),
1913
- ref_key: "select",
1914
- ref: select,
1915
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1916
- }, unref(hasAttrs)), [
1917
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1918
- key: 0,
1919
- value: void 0,
1920
- disabled: !_ctx.unselectable,
1921
- hidden: !_ctx.unselectable
1922
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("", true),
1923
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
1924
- return openBlock(), createElementBlock(Fragment, null, [
1925
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
1926
- key: index,
1927
- disabled: unref(isOptionDisabled)(option),
1928
- value: unref(getOptionValue)(option)
1929
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
1930
- key: `group-${index}`,
1931
- disabled: unref(isOptionDisabled)(option),
1932
- label: unref(getOptionLabel)(option)
1933
- }, [
1934
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
1935
- return openBlock(), createElementBlock("option", {
1936
- key: `group-${index}-item-${i}`,
1937
- disabled: unref(isOptionDisabled)(item),
1938
- value: unref(getOptionValue)(item)
1939
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
1940
- }), 128))
1941
- ], 8, _hoisted_8$1))
1942
- ], 64);
1943
- }), 256))
1944
- ], 16, _hoisted_5$1), [
1945
- [vModelSelect, unref(localModelValue)]
1950
+ return openBlock(), createElementBlock(
1951
+ "div",
1952
+ {
1953
+ class: normalizeClass(unref(bemCssClasses))
1954
+ },
1955
+ [
1956
+ _ctx.label ? (openBlock(), createElementBlock("label", {
1957
+ key: 0,
1958
+ for: unref(hasId)
1959
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("v-if", true),
1960
+ createElementVNode("div", _hoisted_2$2, [
1961
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1962
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1963
+ ])) : createCommentVNode("v-if", true),
1964
+ createElementVNode("div", _hoisted_4$1, [
1965
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1966
+ _sfc_main$9,
1967
+ mergeProps({
1968
+ key: 0,
1969
+ class: "vv-select__icon"
1970
+ }, unref(hasIcon)),
1971
+ null,
1972
+ 16
1973
+ /* FULL_PROPS */
1974
+ )) : createCommentVNode("v-if", true),
1975
+ withDirectives(createElementVNode("select", mergeProps({
1976
+ id: unref(hasId),
1977
+ ref_key: "select",
1978
+ ref: select,
1979
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1980
+ }, unref(hasAttrs)), [
1981
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1982
+ key: 0,
1983
+ value: void 0,
1984
+ disabled: !_ctx.unselectable,
1985
+ hidden: !_ctx.unselectable
1986
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$1)) : createCommentVNode("v-if", true),
1987
+ (openBlock(true), createElementBlock(
1988
+ Fragment,
1989
+ null,
1990
+ renderList(_ctx.options, (option, index) => {
1991
+ return openBlock(), createElementBlock(
1992
+ Fragment,
1993
+ null,
1994
+ [
1995
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
1996
+ key: index,
1997
+ disabled: unref(isOptionDisabled)(option),
1998
+ value: unref(getOptionValue)(option)
1999
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$1)) : (openBlock(), createElementBlock("optgroup", {
2000
+ key: `group-${index}`,
2001
+ disabled: unref(isOptionDisabled)(option),
2002
+ label: unref(getOptionLabel)(option)
2003
+ }, [
2004
+ (openBlock(true), createElementBlock(
2005
+ Fragment,
2006
+ null,
2007
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
2008
+ return openBlock(), createElementBlock("option", {
2009
+ key: `group-${index}-item-${i}`,
2010
+ disabled: unref(isOptionDisabled)(item),
2011
+ value: unref(getOptionValue)(item)
2012
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
2013
+ }),
2014
+ 128
2015
+ /* KEYED_FRAGMENT */
2016
+ ))
2017
+ ], 8, _hoisted_8$1))
2018
+ ],
2019
+ 64
2020
+ /* STABLE_FRAGMENT */
2021
+ );
2022
+ }),
2023
+ 256
2024
+ /* UNKEYED_FRAGMENT */
2025
+ ))
2026
+ ], 16, _hoisted_5$1), [
2027
+ [vModelSelect, unref(localModelValue)]
2028
+ ]),
2029
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2030
+ _sfc_main$9,
2031
+ mergeProps({
2032
+ key: 1,
2033
+ class: "vv-select__icon vv-select__icon-after"
2034
+ }, unref(hasIcon)),
2035
+ null,
2036
+ 16
2037
+ /* FULL_PROPS */
2038
+ )) : createCommentVNode("v-if", true)
1946
2039
  ]),
1947
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1948
- key: 1,
1949
- class: "vv-select__icon vv-select__icon-after"
1950
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2040
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
2041
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2042
+ ])) : createCommentVNode("v-if", true)
1951
2043
  ]),
1952
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1953
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1954
- ])) : createCommentVNode("", true)
1955
- ]),
1956
- createVNode(unref(HintSlot), {
1957
- id: unref(hasHintId),
1958
- class: "vv-select__hint"
1959
- }, createSlots({ _: 2 }, [
1960
- _ctx.$slots.hint ? {
1961
- name: "hint",
1962
- fn: withCtx(() => [
1963
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1964
- ]),
1965
- key: "0"
1966
- } : void 0,
1967
- _ctx.$slots.loading ? {
1968
- name: "loading",
1969
- fn: withCtx(() => [
1970
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1971
- ]),
1972
- key: "1"
1973
- } : void 0,
1974
- _ctx.$slots.valid ? {
1975
- name: "valid",
1976
- fn: withCtx(() => [
1977
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1978
- ]),
1979
- key: "2"
1980
- } : void 0,
1981
- _ctx.$slots.invalid ? {
1982
- name: "invalid",
1983
- fn: withCtx(() => [
1984
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1985
- ]),
1986
- key: "3"
1987
- } : void 0
1988
- ]), 1032, ["id"])
1989
- ], 2);
2044
+ createVNode(unref(HintSlot), {
2045
+ id: unref(hasHintId),
2046
+ class: "vv-select__hint"
2047
+ }, createSlots({
2048
+ _: 2
2049
+ /* DYNAMIC */
2050
+ }, [
2051
+ _ctx.$slots.hint ? {
2052
+ name: "hint",
2053
+ fn: withCtx(() => [
2054
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2055
+ ]),
2056
+ key: "0"
2057
+ } : void 0,
2058
+ _ctx.$slots.loading ? {
2059
+ name: "loading",
2060
+ fn: withCtx(() => [
2061
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2062
+ ]),
2063
+ key: "1"
2064
+ } : void 0,
2065
+ _ctx.$slots.valid ? {
2066
+ name: "valid",
2067
+ fn: withCtx(() => [
2068
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2069
+ ]),
2070
+ key: "2"
2071
+ } : void 0,
2072
+ _ctx.$slots.invalid ? {
2073
+ name: "invalid",
2074
+ fn: withCtx(() => [
2075
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2076
+ ]),
2077
+ key: "3"
2078
+ } : void 0
2079
+ ]), 1032, ["id"])
2080
+ ],
2081
+ 2
2082
+ /* CLASS */
2083
+ );
1990
2084
  };
1991
2085
  }
1992
2086
  });
@@ -2005,14 +2099,24 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2005
2099
  const { modifiers } = toRefs(props);
2006
2100
  const bemCssClasses = useModifiers("vv-badge", modifiers);
2007
2101
  return (_ctx, _cache) => {
2008
- return openBlock(), createElementBlock("span", {
2009
- class: normalizeClass(unref(bemCssClasses)),
2010
- role: "status"
2011
- }, [
2012
- renderSlot(_ctx.$slots, "default", {}, () => [
2013
- createTextVNode(toDisplayString(_ctx.value), 1)
2014
- ])
2015
- ], 2);
2102
+ return openBlock(), createElementBlock(
2103
+ "span",
2104
+ {
2105
+ class: normalizeClass(unref(bemCssClasses)),
2106
+ role: "status"
2107
+ },
2108
+ [
2109
+ renderSlot(_ctx.$slots, "default", {}, () => [
2110
+ createTextVNode(
2111
+ toDisplayString(_ctx.value),
2112
+ 1
2113
+ /* TEXT */
2114
+ )
2115
+ ])
2116
+ ],
2117
+ 2
2118
+ /* CLASS */
2119
+ );
2016
2120
  };
2017
2121
  }
2018
2122
  });
@@ -2057,7 +2161,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2057
2161
  case props.href !== void 0:
2058
2162
  return ActionTag.a;
2059
2163
  default:
2060
- return ActionTag.button;
2164
+ return props.defaultTag;
2061
2165
  }
2062
2166
  });
2063
2167
  const hasProps = computed(() => {
@@ -2082,12 +2186,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2082
2186
  to: props.to,
2083
2187
  target: props.target
2084
2188
  };
2085
- default:
2189
+ case ActionTag.button:
2086
2190
  return {
2087
2191
  ...toReturn,
2088
2192
  type: props.type,
2089
2193
  disabled: props.disabled
2090
2194
  };
2195
+ default:
2196
+ return toReturn;
2091
2197
  }
2092
2198
  });
2093
2199
  const onClick = (e) => {
@@ -2113,7 +2219,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2113
2219
  class: {
2114
2220
  active: _ctx.active,
2115
2221
  pressed: unref(pressed),
2116
- disabled: _ctx.disabled
2222
+ disabled: _ctx.disabled,
2223
+ current: _ctx.current
2117
2224
  },
2118
2225
  onClickPassive: onClick,
2119
2226
  onMouseoverPassive: onMouseover,
@@ -2121,10 +2228,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2121
2228
  }), {
2122
2229
  default: withCtx(() => [
2123
2230
  renderSlot(_ctx.$slots, "default", {}, () => [
2124
- createTextVNode(toDisplayString(_ctx.label), 1)
2231
+ createTextVNode(
2232
+ toDisplayString(_ctx.label),
2233
+ 1
2234
+ /* TEXT */
2235
+ )
2125
2236
  ])
2126
2237
  ]),
2127
2238
  _: 3
2239
+ /* FORWARDED */
2128
2240
  }, 16, ["class"]);
2129
2241
  };
2130
2242
  }
@@ -2379,24 +2491,47 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2379
2491
  key: 0,
2380
2492
  class: "vv-button__loading-icon",
2381
2493
  name: _ctx.loadingIcon
2382
- }, null, 8, ["name"])) : createCommentVNode("", true),
2383
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
2384
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2385
- renderSlot(_ctx.$slots, "before"),
2386
- unref(icon) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2387
- key: 0,
2388
- class: "vv-button__icon"
2389
- }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
2390
- unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2391
- renderSlot(_ctx.$slots, "label", {}, () => [
2392
- createTextVNode(toDisplayString(unref(label)), 1)
2393
- ])
2394
- ])) : createCommentVNode("", true),
2395
- renderSlot(_ctx.$slots, "after")
2396
- ], 64))
2494
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
2495
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
2496
+ "span",
2497
+ _hoisted_1$1,
2498
+ toDisplayString(_ctx.loadingLabel),
2499
+ 1
2500
+ /* TEXT */
2501
+ )) : createCommentVNode("v-if", true)
2502
+ ]) : (openBlock(), createElementBlock(
2503
+ Fragment,
2504
+ { key: 1 },
2505
+ [
2506
+ renderSlot(_ctx.$slots, "before"),
2507
+ unref(icon) ? (openBlock(), createBlock(
2508
+ _sfc_main$9,
2509
+ mergeProps({
2510
+ key: 0,
2511
+ class: "vv-button__icon"
2512
+ }, unref(hasIconProps)),
2513
+ null,
2514
+ 16
2515
+ /* FULL_PROPS */
2516
+ )) : createCommentVNode("v-if", true),
2517
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2518
+ renderSlot(_ctx.$slots, "label", {}, () => [
2519
+ createTextVNode(
2520
+ toDisplayString(unref(label)),
2521
+ 1
2522
+ /* TEXT */
2523
+ )
2524
+ ])
2525
+ ])) : createCommentVNode("v-if", true),
2526
+ renderSlot(_ctx.$slots, "after")
2527
+ ],
2528
+ 64
2529
+ /* STABLE_FRAGMENT */
2530
+ ))
2397
2531
  ])
2398
2532
  ]),
2399
2533
  _: 3
2534
+ /* FORWARDED */
2400
2535
  }, 16, ["id", "class"]);
2401
2536
  };
2402
2537
  }
@@ -2479,10 +2614,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2479
2614
  searchText,
2480
2615
  computed(() => Number(props.debounceSearch))
2481
2616
  );
2482
- watch(
2483
- debouncedSearchText,
2484
- () => emit("change:search", debouncedSearchText.value)
2485
- );
2617
+ watch(debouncedSearchText, () => {
2618
+ emit("update:search", debouncedSearchText.value);
2619
+ emit("change:search", debouncedSearchText.value);
2620
+ });
2486
2621
  const expanded = ref(false);
2487
2622
  const toggleExpanded = () => {
2488
2623
  if (props.disabled || props.readonly)
@@ -2553,7 +2688,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2553
2688
  valid: valid.value,
2554
2689
  invalid: invalid.value,
2555
2690
  dirty: isDirty.value,
2556
- focus: focused.value,
2691
+ focus: focused.value || focusedWithin.value || expanded.value,
2557
2692
  floating: floating.value,
2558
2693
  badges: props.badges
2559
2694
  }))
@@ -2630,7 +2765,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2630
2765
  if (!props.keepOpen) {
2631
2766
  collapse();
2632
2767
  }
2633
- if (props.unselectable && value === props.modelValue) {
2768
+ if (Array.isArray(props.modelValue)) {
2769
+ if (props.unselectable && props.modelValue.includes(value)) {
2770
+ toReturn = [];
2771
+ } else {
2772
+ toReturn = [value];
2773
+ }
2774
+ } else if (props.unselectable && value === props.modelValue) {
2634
2775
  toReturn = void 0;
2635
2776
  }
2636
2777
  }
@@ -2706,208 +2847,307 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2706
2847
  key: 0,
2707
2848
  id: unref(hasLabelId),
2708
2849
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
2709
- }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
2710
- createElementVNode("div", {
2711
- ref_key: "wrapperEl",
2712
- ref: wrapperEl,
2713
- class: "vv-select__wrapper"
2714
- }, [
2715
- createVNode(_sfc_main$8, mergeProps({
2716
- ref_key: "dropdownEl",
2717
- ref: dropdownEl,
2718
- modelValue: unref(expanded),
2719
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2720
- }, unref(dropdownProps), {
2721
- role: unref(DropdownRole).listbox,
2722
- onAfterExpand,
2723
- onAfterCollapse
2724
- }), createSlots({
2725
- default: withCtx(({ aria }) => [
2726
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2727
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2728
- ])) : createCommentVNode("", true),
2729
- createElementVNode("div", _hoisted_5, [
2730
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2731
- key: 0,
2732
- class: "vv-select__icon"
2733
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
2734
- createElementVNode("div", mergeProps({
2735
- ref_key: "inputEl",
2736
- ref: inputEl
2737
- }, aria, {
2738
- class: "vv-select__input",
2739
- role: "combobox",
2740
- "aria-expanded": unref(expanded),
2741
- "aria-labelledby": unref(hasLabelId),
2742
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2743
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2744
- tabindex: unref(hasTabindex),
2745
- onClickPassive: onClickInput
2746
- }), [
2747
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2748
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2749
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
2750
- return openBlock(), createBlock(_sfc_main$3, {
2751
- key: index,
2752
- modifiers: _ctx.badgeModifiers,
2753
- class: "vv-select__badge"
2754
- }, {
2755
- default: withCtx(() => [
2756
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
2757
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2758
- key: 0,
2759
- "aria-label": unref(propsDefaults).deselectActionLabel,
2760
- type: "button",
2761
- onClick: withModifiers(($event) => onInput(option), ["stop"])
2762
- }, [
2763
- createVNode(_sfc_main$9, { name: "close" })
2764
- ], 8, _hoisted_8)) : createCommentVNode("", true)
2765
- ]),
2766
- _: 2
2767
- }, 1032, ["modifiers"]);
2768
- }), 128))
2769
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2770
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
2771
- ], 64))
2772
- ])
2773
- ], 16, _hoisted_6),
2774
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2775
- key: 1,
2776
- class: "vv-select__icon vv-select__icon-after"
2777
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2778
- ]),
2779
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2780
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2781
- ])) : createCommentVNode("", true)
2782
- ]),
2783
- items: withCtx(() => {
2784
- var _a;
2785
- return [
2786
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
2787
- return openBlock(), createElementBlock(Fragment, { key: index }, [
2788
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2789
- createVNode(_sfc_main$5, {
2790
- label: unref(getOptionLabel)(option)
2791
- }, null, 8, ["label"]),
2792
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
2793
- option
2794
- ), (item, i) => {
2795
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
2796
- selected: isOptionSelected(item),
2797
- disabled: unref(isOptionDisabled)(item),
2798
- unselectable: _ctx.unselectable,
2799
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2800
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2801
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2802
- }, {
2803
- key: i,
2804
- class: "vv-dropdown-option",
2805
- onClickPassive: ($event) => onInput(item)
2806
- }), {
2807
- default: withCtx(() => [
2808
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2809
- option,
2810
- selectedOptions: unref(selectedOptions),
2811
- selected: isOptionSelected(item),
2812
- disabled: unref(isOptionDisabled)(item)
2813
- })), () => [
2814
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
2815
- ])
2816
- ]),
2817
- _: 2
2818
- }, 1040, ["onClickPassive"]);
2819
- }), 128))
2820
- ], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
2821
- selected: isOptionSelected(option),
2822
- disabled: unref(isOptionDisabled)(option),
2823
- unselectable: _ctx.unselectable,
2824
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2825
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2826
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2827
- }, {
2828
- class: "vv-dropdown-option",
2829
- onClickPassive: ($event) => onInput(option)
2830
- }), {
2831
- default: withCtx(() => [
2832
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2833
- option,
2834
- selectedOptions: unref(selectedOptions),
2835
- selected: isOptionSelected(option),
2836
- disabled: unref(isOptionDisabled)(option)
2837
- })), () => [
2838
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
2839
- ])
2840
- ]),
2841
- _: 2
2842
- }, 1040, ["onClickPassive"]))
2843
- ], 64);
2844
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
2845
- key: 1,
2846
- modifiers: "inert"
2847
- }, {
2848
- default: withCtx(() => [
2849
- renderSlot(_ctx.$slots, "no-options", {}, () => [
2850
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
2851
- ])
2852
- ]),
2853
- _: 3
2854
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
2855
- key: 2,
2856
- modifiers: "inert"
2857
- }, {
2858
- default: withCtx(() => [
2859
- renderSlot(_ctx.$slots, "no-results", {}, () => [
2860
- createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
2850
+ }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("v-if", true),
2851
+ createElementVNode(
2852
+ "div",
2853
+ {
2854
+ ref_key: "wrapperEl",
2855
+ ref: wrapperEl,
2856
+ class: "vv-select__wrapper"
2857
+ },
2858
+ [
2859
+ createVNode(_sfc_main$8, mergeProps({
2860
+ ref_key: "dropdownEl",
2861
+ ref: dropdownEl,
2862
+ modelValue: unref(expanded),
2863
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2864
+ }, unref(dropdownProps), {
2865
+ role: unref(DropdownRole).listbox,
2866
+ onAfterExpand,
2867
+ onAfterCollapse
2868
+ }), createSlots({
2869
+ default: withCtx(({ aria }) => [
2870
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2871
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2872
+ ])) : createCommentVNode("v-if", true),
2873
+ createElementVNode("div", _hoisted_5, [
2874
+ unref(hasIconBefore) ? (openBlock(), createBlock(
2875
+ _sfc_main$9,
2876
+ mergeProps({
2877
+ key: 0,
2878
+ class: "vv-select__icon"
2879
+ }, unref(hasIcon)),
2880
+ null,
2881
+ 16
2882
+ /* FULL_PROPS */
2883
+ )) : createCommentVNode("v-if", true),
2884
+ createElementVNode("div", mergeProps({
2885
+ ref_key: "inputEl",
2886
+ ref: inputEl
2887
+ }, aria, {
2888
+ class: "vv-select__input",
2889
+ role: "combobox",
2890
+ "aria-expanded": unref(expanded),
2891
+ "aria-labelledby": unref(hasLabelId),
2892
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2893
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2894
+ tabindex: unref(hasTabindex),
2895
+ onClickPassive: onClickInput
2896
+ }), [
2897
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2898
+ unref(hasValue) ? (openBlock(), createElementBlock(
2899
+ Fragment,
2900
+ { key: 0 },
2901
+ [
2902
+ !_ctx.badges ? (openBlock(), createElementBlock(
2903
+ "div",
2904
+ _hoisted_7,
2905
+ toDisplayString(unref(hasValue)),
2906
+ 1
2907
+ /* TEXT */
2908
+ )) : (openBlock(true), createElementBlock(
2909
+ Fragment,
2910
+ { key: 1 },
2911
+ renderList(unref(selectedOptions), (option, index) => {
2912
+ return openBlock(), createBlock(_sfc_main$3, {
2913
+ key: index,
2914
+ modifiers: _ctx.badgeModifiers,
2915
+ class: "vv-select__badge"
2916
+ }, {
2917
+ default: withCtx(() => [
2918
+ createTextVNode(
2919
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
2920
+ 1
2921
+ /* TEXT */
2922
+ ),
2923
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2924
+ key: 0,
2925
+ "aria-label": unref(propsDefaults).deselectActionLabel,
2926
+ type: "button",
2927
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
2928
+ }, [
2929
+ createVNode(_sfc_main$9, { name: "close" })
2930
+ ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
2931
+ ]),
2932
+ _: 2
2933
+ /* DYNAMIC */
2934
+ }, 1032, ["modifiers"]);
2935
+ }),
2936
+ 128
2937
+ /* KEYED_FRAGMENT */
2938
+ ))
2939
+ ],
2940
+ 64
2941
+ /* STABLE_FRAGMENT */
2942
+ )) : (openBlock(), createElementBlock(
2943
+ Fragment,
2944
+ { key: 1 },
2945
+ [
2946
+ createTextVNode(
2947
+ toDisplayString(_ctx.placeholder),
2948
+ 1
2949
+ /* TEXT */
2950
+ )
2951
+ ],
2952
+ 64
2953
+ /* STABLE_FRAGMENT */
2954
+ ))
2861
2955
  ])
2862
- ]),
2863
- _: 3
2864
- })) : createCommentVNode("", true)
2865
- ];
2866
- }),
2867
- after: withCtx(() => [
2868
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
2956
+ ], 16, _hoisted_6),
2957
+ unref(hasIconAfter) ? (openBlock(), createBlock(
2958
+ _sfc_main$9,
2959
+ mergeProps({
2960
+ key: 1,
2961
+ class: "vv-select__icon vv-select__icon-after"
2962
+ }, unref(hasIcon)),
2963
+ null,
2964
+ 16
2965
+ /* FULL_PROPS */
2966
+ )) : createCommentVNode("v-if", true)
2967
+ ]),
2968
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2969
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2970
+ ])) : createCommentVNode("v-if", true)
2971
+ ]),
2972
+ items: withCtx(() => {
2869
2973
  var _a;
2870
2974
  return [
2871
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
2872
- key: 0,
2873
- label: unref(propsDefaults).closeLabel,
2874
- modifiers: "secondary",
2875
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
2876
- }, null, 8, ["label"])) : createCommentVNode("", true)
2975
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
2976
+ Fragment,
2977
+ { key: 0 },
2978
+ renderList(unref(filteredOptions), (option, index) => {
2979
+ return openBlock(), createElementBlock(
2980
+ Fragment,
2981
+ { key: index },
2982
+ [
2983
+ isGroup(option) ? (openBlock(), createElementBlock(
2984
+ Fragment,
2985
+ { key: 0 },
2986
+ [
2987
+ createVNode(_sfc_main$5, {
2988
+ label: unref(getOptionLabel)(option)
2989
+ }, null, 8, ["label"]),
2990
+ (openBlock(true), createElementBlock(
2991
+ Fragment,
2992
+ null,
2993
+ renderList(unref(getOptionGrouped)(
2994
+ option
2995
+ ), (item, i) => {
2996
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({
2997
+ selected: isOptionSelected(item),
2998
+ disabled: unref(isOptionDisabled)(item),
2999
+ unselectable: _ctx.unselectable,
3000
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3001
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3002
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3003
+ }, {
3004
+ key: i,
3005
+ class: "vv-dropdown-option",
3006
+ onClickPassive: ($event) => onInput(item)
3007
+ }), {
3008
+ default: withCtx(() => [
3009
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3010
+ option,
3011
+ selectedOptions: unref(selectedOptions),
3012
+ selected: isOptionSelected(item),
3013
+ disabled: unref(isOptionDisabled)(item)
3014
+ })), () => [
3015
+ createTextVNode(
3016
+ toDisplayString(unref(getOptionLabel)(item)),
3017
+ 1
3018
+ /* TEXT */
3019
+ )
3020
+ ])
3021
+ ]),
3022
+ _: 2
3023
+ /* DYNAMIC */
3024
+ }, 1040, ["onClickPassive"]);
3025
+ }),
3026
+ 128
3027
+ /* KEYED_FRAGMENT */
3028
+ ))
3029
+ ],
3030
+ 64
3031
+ /* STABLE_FRAGMENT */
3032
+ )) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
3033
+ selected: isOptionSelected(option),
3034
+ disabled: unref(isOptionDisabled)(option),
3035
+ unselectable: _ctx.unselectable,
3036
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3037
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3038
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3039
+ }, {
3040
+ class: "vv-dropdown-option",
3041
+ onClickPassive: ($event) => onInput(option)
3042
+ }), {
3043
+ default: withCtx(() => [
3044
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3045
+ option,
3046
+ selectedOptions: unref(selectedOptions),
3047
+ selected: isOptionSelected(option),
3048
+ disabled: unref(isOptionDisabled)(option)
3049
+ })), () => [
3050
+ createTextVNode(
3051
+ toDisplayString(unref(getOptionLabel)(option)),
3052
+ 1
3053
+ /* TEXT */
3054
+ )
3055
+ ])
3056
+ ]),
3057
+ _: 2
3058
+ /* DYNAMIC */
3059
+ }, 1040, ["onClickPassive"]))
3060
+ ],
3061
+ 64
3062
+ /* STABLE_FRAGMENT */
3063
+ );
3064
+ }),
3065
+ 128
3066
+ /* KEYED_FRAGMENT */
3067
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
3068
+ key: 1,
3069
+ modifiers: "inert"
3070
+ }, {
3071
+ default: withCtx(() => [
3072
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
3073
+ createTextVNode(
3074
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
3075
+ 1
3076
+ /* TEXT */
3077
+ )
3078
+ ])
3079
+ ]),
3080
+ _: 3
3081
+ /* FORWARDED */
3082
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
3083
+ key: 2,
3084
+ modifiers: "inert"
3085
+ }, {
3086
+ default: withCtx(() => [
3087
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
3088
+ createTextVNode(
3089
+ toDisplayString(unref(propsDefaults).noResultsLabel),
3090
+ 1
3091
+ /* TEXT */
3092
+ )
3093
+ ])
3094
+ ]),
3095
+ _: 3
3096
+ /* FORWARDED */
3097
+ })) : createCommentVNode("v-if", true)
2877
3098
  ];
2878
- })
2879
- ]),
2880
- _: 2
2881
- }, [
2882
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
2883
- name: "before",
2884
- fn: withCtx(() => [
2885
- renderSlot(_ctx.$slots, "dropdown::before"),
2886
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
2887
- key: 0,
2888
- id: unref(hasSearchId),
2889
- ref_key: "inputSearchEl",
2890
- ref: inputSearchEl,
2891
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
2892
- "aria-autocomplete": "list",
2893
- "aria-controls": unref(hasDropdownId),
2894
- autocomplete: "off",
2895
- spellcheck: "false",
2896
- type: "search",
2897
- class: "vv-dropdown__search",
2898
- placeholder: unref(propsDefaults).searchPlaceholder
2899
- }, null, 8, _hoisted_3)), [
2900
- [vModelText, unref(searchText)]
2901
- ]) : createCommentVNode("", true)
3099
+ }),
3100
+ after: withCtx(() => [
3101
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3102
+ var _a;
3103
+ return [
3104
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
3105
+ key: 0,
3106
+ label: unref(propsDefaults).closeLabel,
3107
+ modifiers: "secondary",
3108
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3109
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3110
+ ];
3111
+ })
2902
3112
  ]),
2903
- key: "0"
2904
- } : void 0
2905
- ]), 1040, ["modelValue", "role"])
2906
- ], 512),
3113
+ _: 2
3114
+ /* DYNAMIC */
3115
+ }, [
3116
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
3117
+ name: "before",
3118
+ fn: withCtx(() => [
3119
+ renderSlot(_ctx.$slots, "dropdown::before"),
3120
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
3121
+ key: 0,
3122
+ id: unref(hasSearchId),
3123
+ ref_key: "inputSearchEl",
3124
+ ref: inputSearchEl,
3125
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3126
+ "aria-autocomplete": "list",
3127
+ "aria-controls": unref(hasDropdownId),
3128
+ autocomplete: "off",
3129
+ spellcheck: "false",
3130
+ type: "search",
3131
+ class: "vv-dropdown__search",
3132
+ placeholder: unref(propsDefaults).searchPlaceholder
3133
+ }, null, 8, _hoisted_3)), [
3134
+ [vModelText, unref(searchText)]
3135
+ ]) : createCommentVNode("v-if", true)
3136
+ ]),
3137
+ key: "0"
3138
+ } : void 0
3139
+ ]), 1040, ["modelValue", "role"])
3140
+ ],
3141
+ 512
3142
+ /* NEED_PATCH */
3143
+ ),
2907
3144
  createVNode(unref(HintSlot), {
2908
3145
  id: unref(hasHintId),
2909
3146
  class: "vv-select__hint"
2910
- }, createSlots({ _: 2 }, [
3147
+ }, createSlots({
3148
+ _: 2
3149
+ /* DYNAMIC */
3150
+ }, [
2911
3151
  _ctx.$slots.hint ? {
2912
3152
  name: "hint",
2913
3153
  fn: withCtx(() => [
@@ -2937,9 +3177,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2937
3177
  key: "3"
2938
3178
  } : void 0
2939
3179
  ]), 1032, ["id"])
2940
- ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, unref(selectProps), {
2941
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
2942
- }), null, 16));
3180
+ ], 10, _hoisted_1)) : (openBlock(), createBlock(
3181
+ _sfc_main$4,
3182
+ mergeProps({ key: 1 }, unref(selectProps), {
3183
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
3184
+ }),
3185
+ null,
3186
+ 16
3187
+ /* FULL_PROPS */
3188
+ ));
2943
3189
  };
2944
3190
  }
2945
3191
  });