@volverjs/ui-vue 0.0.9 → 0.0.10-beta.10

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 (184) 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 +14 -3
  31. package/dist/components/VvBreadcrumb/index.d.ts +2 -9
  32. package/dist/components/VvButton/VvButton.es.js +70 -25
  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 +35 -7
  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 +106 -51
  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 +635 -400
  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 +31 -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 +35 -7
  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 +106 -51
  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 +159 -99
  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.es.js +1593 -1012
  108. package/dist/components/index.umd.js +1 -1
  109. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  110. package/dist/composables/useOptions.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/stories/AccordionGroup/AccordionGroup.stories.d.ts +50 -15
  124. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +332 -83
  125. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  126. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +1 -0
  127. package/dist/stories/InputText/InputTextMask.stories.d.ts +1 -1
  128. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  129. package/dist/types/alert.d.ts +13 -0
  130. package/dist/types/floating-ui.d.ts +6 -0
  131. package/dist/types/generic.d.ts +4 -0
  132. package/dist/types/group.d.ts +37 -0
  133. package/dist/types/index.d.ts +5 -0
  134. package/dist/types/nav.d.ts +17 -0
  135. package/package.json +61 -52
  136. package/src/Volver.ts +22 -16
  137. package/src/assets/icons/detailed.json +1 -1
  138. package/src/assets/icons/normal.json +1 -1
  139. package/src/assets/icons/simple.json +1 -1
  140. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  141. package/src/components/VvAction/VvAction.vue +5 -2
  142. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  143. package/src/components/VvBreadcrumb/index.ts +2 -8
  144. package/src/components/VvCombobox/VvCombobox.vue +32 -33
  145. package/src/components/VvCombobox/index.ts +4 -0
  146. package/src/components/VvInputText/VvInputText.vue +2 -2
  147. package/src/components/VvNav/VvNav.vue +30 -50
  148. package/src/components/VvNav/VvNavItem.vue +18 -0
  149. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  150. package/src/components/VvNav/index.ts +2 -15
  151. package/src/components/VvSelect/VvSelect.vue +4 -4
  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/composables/useOptions.ts +2 -2
  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/stories/Button/ButtonModifiers.stories.ts +4 -14
  162. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  163. package/src/stories/Combobox/ComboboxOptions.stories.ts +18 -0
  164. package/src/stories/InputText/InputTextMask.stories.ts +1 -1
  165. package/src/stories/Nav/Nav.settings.ts +3 -4
  166. package/src/stories/Nav/Nav.test.ts +4 -15
  167. package/src/stories/Tab/Tab.settings.ts +9 -9
  168. package/src/stories/Tab/Tab.stories.ts +2 -2
  169. package/src/stories/Tab/Tab.test.ts +6 -14
  170. package/src/stories/argTypes.ts +1 -1
  171. package/src/types/generic.ts +6 -0
  172. package/src/types/index.ts +5 -0
  173. package/src/types/nav.ts +19 -0
  174. package/src/utils/ObjectUtilities.ts +3 -2
  175. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  176. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  177. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  178. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  179. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  180. package/src/types/generic.d.ts +0 -6
  181. /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
  182. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  183. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  184. /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,15 +1399,21 @@ 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
  });
1357
1412
  function equals(obj1, obj2, field) {
1358
- if (field)
1413
+ if (field) {
1359
1414
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
1360
- else
1361
- return deepEquals(obj1, obj2);
1415
+ }
1416
+ return deepEquals(obj1, obj2);
1362
1417
  }
1363
1418
  function deepEquals(a, b) {
1364
1419
  if (a === b)
@@ -1737,7 +1792,7 @@ function useOptions(props) {
1737
1792
  return option;
1738
1793
  return typeof valueKey.value === "function" ? valueKey.value(option) : get(option, valueKey.value);
1739
1794
  };
1740
- const getOptionDisabled = (option) => {
1795
+ const isOptionDisabled = (option) => {
1741
1796
  if (typeof option !== "object" && option !== null)
1742
1797
  return false;
1743
1798
  return typeof disabledKey.value === "function" ? disabledKey.value(option) : get(option, disabledKey.value);
@@ -1751,7 +1806,7 @@ function useOptions(props) {
1751
1806
  options,
1752
1807
  getOptionLabel,
1753
1808
  getOptionValue,
1754
- getOptionDisabled,
1809
+ isOptionDisabled,
1755
1810
  getOptionGrouped
1756
1811
  };
1757
1812
  }
@@ -1872,7 +1927,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1872
1927
  const {
1873
1928
  getOptionLabel,
1874
1929
  getOptionValue,
1875
- getOptionDisabled,
1930
+ isOptionDisabled,
1876
1931
  getOptionGrouped
1877
1932
  } = useOptions(props);
1878
1933
  const localModelValue = computed({
@@ -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(getOptionDisabled)(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(getOptionDisabled)(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(getOptionDisabled)(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
  }))
@@ -2561,8 +2696,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2561
2696
  const {
2562
2697
  getOptionLabel,
2563
2698
  getOptionValue,
2564
- getOptionDisabled,
2565
- getOptionGrouped
2699
+ getOptionGrouped,
2700
+ isOptionDisabled
2566
2701
  } = useOptions(props);
2567
2702
  const filteredOptions = computedAsync(async () => {
2568
2703
  var _a;
@@ -2581,19 +2716,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2581
2716
  return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
2582
2717
  });
2583
2718
  });
2584
- function getOptionSelected(option) {
2719
+ function isOptionSelected(option) {
2585
2720
  if (Array.isArray(props.modelValue)) {
2586
2721
  return contains(option, props.modelValue) || contains(getOptionValue(option), props.modelValue);
2587
2722
  }
2588
2723
  return equals(option, props.modelValue) || equals(getOptionValue(option), props.modelValue);
2589
2724
  }
2590
2725
  const selectedOptions = computed(() => {
2591
- let selectedValues = [];
2592
- if (Array.isArray(props.modelValue)) {
2593
- selectedValues = props.modelValue;
2594
- } else if (props.modelValue) {
2595
- selectedValues = [props.modelValue];
2596
- }
2597
2726
  const options = props.options.reduce(
2598
2727
  (acc, value) => {
2599
2728
  if (isGroup(value)) {
@@ -2604,12 +2733,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2604
2733
  []
2605
2734
  );
2606
2735
  return options.filter((option) => {
2607
- if (isGroup(option)) {
2608
- return getOptionGrouped(option).some(
2609
- (item) => selectedValues.includes(getOptionValue(item))
2610
- );
2611
- }
2612
- return selectedValues.includes(getOptionValue(option));
2736
+ return isOptionSelected(option);
2613
2737
  });
2614
2738
  });
2615
2739
  const hasValue = computed(() => {
@@ -2641,7 +2765,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2641
2765
  if (!props.keepOpen) {
2642
2766
  collapse();
2643
2767
  }
2644
- 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) {
2645
2775
  toReturn = void 0;
2646
2776
  }
2647
2777
  }
@@ -2717,208 +2847,307 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2717
2847
  key: 0,
2718
2848
  id: unref(hasLabelId),
2719
2849
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
2720
- }, toDisplayString(_ctx.label), 9, _hoisted_2)) : createCommentVNode("", true),
2721
- createElementVNode("div", {
2722
- ref_key: "wrapperEl",
2723
- ref: wrapperEl,
2724
- class: "vv-select__wrapper"
2725
- }, [
2726
- createVNode(_sfc_main$8, mergeProps({
2727
- ref_key: "dropdownEl",
2728
- ref: dropdownEl,
2729
- modelValue: unref(expanded),
2730
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2731
- }, unref(dropdownProps), {
2732
- role: unref(DropdownRole).listbox,
2733
- onAfterExpand,
2734
- onAfterCollapse
2735
- }), createSlots({
2736
- default: withCtx(({ aria }) => [
2737
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4, [
2738
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2739
- ])) : createCommentVNode("", true),
2740
- createElementVNode("div", _hoisted_5, [
2741
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2742
- key: 0,
2743
- class: "vv-select__icon"
2744
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
2745
- createElementVNode("div", mergeProps({
2746
- ref_key: "inputEl",
2747
- ref: inputEl
2748
- }, aria, {
2749
- class: "vv-select__input",
2750
- role: "combobox",
2751
- "aria-expanded": unref(expanded),
2752
- "aria-labelledby": unref(hasLabelId),
2753
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
2754
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
2755
- tabindex: unref(hasTabindex),
2756
- onClickPassive: onClickInput
2757
- }), [
2758
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2759
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2760
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
2761
- return openBlock(), createBlock(_sfc_main$3, {
2762
- key: index,
2763
- modifiers: _ctx.badgeModifiers,
2764
- class: "vv-select__badge"
2765
- }, {
2766
- default: withCtx(() => [
2767
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
2768
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
2769
- key: 0,
2770
- "aria-label": unref(propsDefaults).deselectActionLabel,
2771
- type: "button",
2772
- onClick: withModifiers(($event) => onInput(option), ["stop"])
2773
- }, [
2774
- createVNode(_sfc_main$9, { name: "close" })
2775
- ], 8, _hoisted_8)) : createCommentVNode("", true)
2776
- ]),
2777
- _: 2
2778
- }, 1032, ["modifiers"]);
2779
- }), 128))
2780
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2781
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
2782
- ], 64))
2783
- ])
2784
- ], 16, _hoisted_6),
2785
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2786
- key: 1,
2787
- class: "vv-select__icon vv-select__icon-after"
2788
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
2789
- ]),
2790
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
2791
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
2792
- ])) : createCommentVNode("", true)
2793
- ]),
2794
- items: withCtx(() => {
2795
- var _a;
2796
- return [
2797
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
2798
- return openBlock(), createElementBlock(Fragment, { key: index }, [
2799
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2800
- createVNode(_sfc_main$5, {
2801
- label: unref(getOptionLabel)(option)
2802
- }, null, 8, ["label"]),
2803
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
2804
- option
2805
- ), (item, i) => {
2806
- return openBlock(), createBlock(_sfc_main$6, mergeProps({
2807
- disabled: unref(getOptionDisabled)(item),
2808
- selected: getOptionSelected(item),
2809
- unselectable: _ctx.unselectable,
2810
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2811
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2812
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2813
- }, {
2814
- key: i,
2815
- class: "vv-dropdown-option",
2816
- onClickPassive: ($event) => onInput(item)
2817
- }), {
2818
- default: withCtx(() => [
2819
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2820
- option,
2821
- selectedOptions: unref(selectedOptions),
2822
- selected: getOptionSelected(item),
2823
- disabled: unref(getOptionDisabled)(item)
2824
- })), () => [
2825
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
2826
- ])
2827
- ]),
2828
- _: 2
2829
- }, 1040, ["onClickPassive"]);
2830
- }), 128))
2831
- ], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
2832
- disabled: unref(getOptionDisabled)(option),
2833
- selected: getOptionSelected(option),
2834
- unselectable: _ctx.unselectable,
2835
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
2836
- selectHintLabel: unref(propsDefaults).selectHintLabel,
2837
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
2838
- }, {
2839
- class: "vv-dropdown-option",
2840
- onClickPassive: ($event) => onInput(option)
2841
- }), {
2842
- default: withCtx(() => [
2843
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
2844
- option,
2845
- selectedOptions: unref(selectedOptions),
2846
- selected: getOptionSelected(option),
2847
- disabled: unref(getOptionDisabled)(option)
2848
- })), () => [
2849
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
2850
- ])
2851
- ]),
2852
- _: 2
2853
- }, 1040, ["onClickPassive"]))
2854
- ], 64);
2855
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
2856
- key: 1,
2857
- modifiers: "inert"
2858
- }, {
2859
- default: withCtx(() => [
2860
- renderSlot(_ctx.$slots, "no-options", {}, () => [
2861
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
2862
- ])
2863
- ]),
2864
- _: 3
2865
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$6, {
2866
- key: 2,
2867
- modifiers: "inert"
2868
- }, {
2869
- default: withCtx(() => [
2870
- renderSlot(_ctx.$slots, "no-results", {}, () => [
2871
- 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
+ ))
2872
2955
  ])
2873
- ]),
2874
- _: 3
2875
- })) : createCommentVNode("", true)
2876
- ];
2877
- }),
2878
- after: withCtx(() => [
2879
- 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(() => {
2880
2973
  var _a;
2881
2974
  return [
2882
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$1, {
2883
- key: 0,
2884
- label: unref(propsDefaults).closeLabel,
2885
- modifiers: "secondary",
2886
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
2887
- }, 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)
2888
3098
  ];
2889
- })
2890
- ]),
2891
- _: 2
2892
- }, [
2893
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
2894
- name: "before",
2895
- fn: withCtx(() => [
2896
- renderSlot(_ctx.$slots, "dropdown::before"),
2897
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
2898
- key: 0,
2899
- id: unref(hasSearchId),
2900
- ref_key: "inputSearchEl",
2901
- ref: inputSearchEl,
2902
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
2903
- "aria-autocomplete": "list",
2904
- "aria-controls": unref(hasDropdownId),
2905
- autocomplete: "off",
2906
- spellcheck: "false",
2907
- type: "search",
2908
- class: "vv-dropdown__search",
2909
- placeholder: unref(propsDefaults).searchPlaceholder
2910
- }, null, 8, _hoisted_3)), [
2911
- [vModelText, unref(searchText)]
2912
- ]) : 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
+ })
2913
3112
  ]),
2914
- key: "0"
2915
- } : void 0
2916
- ]), 1040, ["modelValue", "role"])
2917
- ], 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
+ ),
2918
3144
  createVNode(unref(HintSlot), {
2919
3145
  id: unref(hasHintId),
2920
3146
  class: "vv-select__hint"
2921
- }, createSlots({ _: 2 }, [
3147
+ }, createSlots({
3148
+ _: 2
3149
+ /* DYNAMIC */
3150
+ }, [
2922
3151
  _ctx.$slots.hint ? {
2923
3152
  name: "hint",
2924
3153
  fn: withCtx(() => [
@@ -2948,9 +3177,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2948
3177
  key: "3"
2949
3178
  } : void 0
2950
3179
  ]), 1032, ["id"])
2951
- ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, unref(selectProps), {
2952
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
2953
- }), 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
+ ));
2954
3189
  };
2955
3190
  }
2956
3191
  });