@volverjs/ui-vue 0.0.10-beta.74 → 0.0.10-beta.76

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 (95) hide show
  1. package/README.md +8 -8
  2. package/bin/icons.cjs +1 -1
  3. package/bin/icons.js +3 -3
  4. package/dist/components/VvAccordion/VvAccordion.es.js +9 -9
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +14 -15
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.es.js +10 -13
  9. package/dist/components/VvAction/VvAction.umd.js +1 -1
  10. package/dist/components/VvAlert/VvAlert.es.js +19 -19
  11. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  12. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +19 -19
  13. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +1 -1
  15. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +7 -8
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +1 -1
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +12 -18
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  22. package/dist/components/VvButton/VvButton.es.js +32 -38
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -1
  25. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  26. package/dist/components/VvCard/VvCard.es.js +1 -1
  27. package/dist/components/VvCard/VvCard.umd.js +1 -1
  28. package/dist/components/VvCheckbox/VvCheckbox.es.js +10 -12
  29. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +18 -22
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  32. package/dist/components/VvCombobox/VvCombobox.es.js +266 -285
  33. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  34. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +22 -14
  35. package/dist/components/VvCombobox/index.d.ts +22 -0
  36. package/dist/components/VvDialog/VvDialog.es.js +5 -7
  37. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +10 -15
  39. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -2
  41. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +2 -2
  42. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +11 -14
  43. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  44. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  45. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  46. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +1 -1
  47. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  48. package/dist/components/VvIcon/VvIcon.es.js +5 -5
  49. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  50. package/dist/components/VvInputFile/VvInputFile.es.js +6829 -72
  51. package/dist/components/VvInputFile/VvInputFile.umd.js +7 -1
  52. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +1 -1
  53. package/dist/components/VvInputText/VvInputText.es.js +54 -66
  54. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  55. package/dist/components/VvInputText/VvInputText.vue.d.ts +1 -1
  56. package/dist/components/VvNav/VvNav.es.js +16 -21
  57. package/dist/components/VvNav/VvNav.umd.js +1 -1
  58. package/dist/components/VvNavItem/VvNavItem.es.js +10 -13
  59. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  60. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -1
  61. package/dist/components/VvProgress/VvProgress.es.js +1 -1
  62. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  63. package/dist/components/VvRadio/VvRadio.es.js +10 -12
  64. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  65. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +18 -22
  66. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  67. package/dist/components/VvSelect/VvSelect.es.js +27 -30
  68. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  69. package/dist/components/VvSelect/VvSelect.vue.d.ts +3 -3
  70. package/dist/components/VvTab/VvTab.es.js +18 -25
  71. package/dist/components/VvTab/VvTab.umd.js +1 -1
  72. package/dist/components/VvTextarea/VvTextarea.es.js +47 -57
  73. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  74. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
  75. package/dist/components/VvTooltip/VvTooltip.es.js +1 -1
  76. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  77. package/dist/components/index.es.js +7352 -629
  78. package/dist/components/index.umd.js +7 -1
  79. package/dist/composables/index.es.js +1787 -16
  80. package/dist/composables/index.umd.js +7 -1
  81. package/dist/directives/index.es.js +1782 -15
  82. package/dist/directives/index.umd.js +7 -1
  83. package/dist/directives/v-contextmenu.es.js +1781 -14
  84. package/dist/directives/v-contextmenu.umd.js +7 -1
  85. package/dist/directives/v-tooltip.es.js +1 -1
  86. package/dist/directives/v-tooltip.umd.js +1 -1
  87. package/dist/icons.es.js +3 -3
  88. package/dist/icons.umd.js +1 -1
  89. package/dist/index.es.js +9 -12
  90. package/dist/index.umd.js +1 -1
  91. package/dist/resolvers/unplugin.es.js +1 -1
  92. package/dist/resolvers/unplugin.umd.js +1 -1
  93. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +2 -2
  94. package/dist/stories/Combobox/Combobox.stories.d.ts +1 -0
  95. package/package.json +35 -32
@@ -1,9 +1,9 @@
1
- import { computed, isRef, defineComponent, h, inject, unref, mergeDefaults, ref, toRefs, createBlock, createCommentVNode, openBlock, mergeProps, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, toRef, getCurrentInstance, watch, resolveComponent, resolveDynamicComponent, withCtx, useId, useAttrs, useSlots, Fragment, provide, onMounted, createVNode, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, vShow, nextTick, renderList, vModelSelect, createSlots, withModifiers, withKeys, vModelText } from "vue";
1
+ import { computed, isRef, defineComponent, h, inject, unref, mergeDefaults, ref, toRefs, createBlock, createCommentVNode, openBlock, mergeProps, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, toRef, getCurrentInstance, watch, resolveComponent, resolveDynamicComponent, withCtx, useId, useAttrs, useSlots, Fragment, provide, onMounted, createVNode, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, vShow, nextTick, renderList, vModelSelect, createSlots, mergeModels, useModel, withModifiers, withKeys, vModelText } from "vue";
2
2
  import { iconLoaded, Icon, addIcon } from "@iconify/vue";
3
3
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
4
4
  import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, useElementHover, onKeyStroke, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
5
5
  import mitt from "mitt";
6
- import { get } from "ts-dot-prop";
6
+ import { getProperty } from "dot-prop";
7
7
  const ACTION_ICONS = {
8
8
  clear: "close"
9
9
  };
@@ -519,6 +519,13 @@ const VvComboboxProps = {
519
519
  * Label for no options available
520
520
  */
521
521
  noOptionsLabel: { type: String, default: "No options available" },
522
+ /**
523
+ * Label for selected option not found
524
+ */
525
+ selectedOptionNotFoundLabel: {
526
+ type: String,
527
+ default: "Selected option not found"
528
+ },
522
529
  /**
523
530
  * Label for selected option hint
524
531
  */
@@ -555,6 +562,10 @@ const VvComboboxProps = {
555
562
  * Use input text to search on options
556
563
  */
557
564
  searchable: Boolean,
565
+ /**
566
+ * If true, the search input will retain its value even when the dropdown is closed
567
+ */
568
+ keepSearch: Boolean,
558
569
  /**
559
570
  * Search function to filter options
560
571
  */
@@ -797,7 +808,6 @@ function HintSlotFactory(propsOrRef, slots) {
797
808
  };
798
809
  },
799
810
  render() {
800
- var _a, _b, _c, _d, _e, _f, _g, _h;
801
811
  if (this.isVisible) {
802
812
  let role;
803
813
  if (this.hasInvalidLabelOrSlot) {
@@ -812,7 +822,7 @@ function HintSlotFactory(propsOrRef, slots) {
812
822
  {
813
823
  role
814
824
  },
815
- ((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
825
+ this.$slots.loading?.() ?? this.loadingLabel
816
826
  );
817
827
  }
818
828
  if (this.hasInvalidLabelOrSlot) {
@@ -821,7 +831,7 @@ function HintSlotFactory(propsOrRef, slots) {
821
831
  {
822
832
  role
823
833
  },
824
- ((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
834
+ this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel
825
835
  );
826
836
  }
827
837
  if (this.hasValidLabelOrSlot) {
@@ -830,7 +840,7 @@ function HintSlotFactory(propsOrRef, slots) {
830
840
  {
831
841
  role
832
842
  },
833
- ((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
843
+ this.$slots.valid?.() ?? this.validLabel
834
844
  );
835
845
  }
836
846
  return h(
@@ -838,7 +848,7 @@ function HintSlotFactory(propsOrRef, slots) {
838
848
  {
839
849
  role
840
850
  },
841
- ((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
851
+ this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel
842
852
  );
843
853
  }
844
854
  return null;
@@ -861,7 +871,7 @@ function useModifiers(prefix, modifiers, others) {
861
871
  const toReturn = {
862
872
  [prefix]: true
863
873
  };
864
- const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
874
+ const modifiersArray = typeof modifiers?.value === "string" ? modifiers.value.split(" ") : modifiers?.value;
865
875
  if (modifiersArray) {
866
876
  if (Array.isArray(modifiersArray)) {
867
877
  modifiersArray.forEach((modifier) => {
@@ -915,7 +925,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
915
925
  const { modifiers } = toRefs(props);
916
926
  const bemCssClasses = useModifiers("vv-icon", modifiers);
917
927
  const provider = computed(() => {
918
- return props.provider || (volver == null ? void 0 : volver.iconsProvider);
928
+ return props.provider || volver?.iconsProvider;
919
929
  });
920
930
  const icon = computed(() => {
921
931
  const name = props.name ?? "";
@@ -923,7 +933,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
923
933
  if (iconLoaded(iconName)) {
924
934
  return iconName;
925
935
  }
926
- const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
936
+ const iconsCollection = volver?.iconsCollections.find(
927
937
  (iconsCollection2) => {
928
938
  const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
929
939
  return iconLoaded(icon2);
@@ -947,7 +957,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
947
957
  }
948
958
  function addIconFromSvg(svg) {
949
959
  const svgContentEl = getSvgContent(svg);
950
- const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
960
+ const svgContent = svgContentEl?.innerHTML.trim() || "";
951
961
  if (svgContentEl && svgContent) {
952
962
  addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
953
963
  body: svgContent,
@@ -966,7 +976,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
966
976
  show.value = true;
967
977
  }
968
978
  }).catch((e) => {
969
- throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
979
+ throw new Error(`Error during fetch icon: ${e?.message}`);
970
980
  });
971
981
  }
972
982
  }
@@ -993,28 +1003,28 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
993
1003
  });
994
1004
  function useComponentIcon(icon, iconPosition) {
995
1005
  const hasIcon = computed(() => {
996
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
997
- return { name: icon == null ? void 0 : icon.value };
1006
+ if (typeof icon?.value === "string") {
1007
+ return { name: icon?.value };
998
1008
  }
999
- return icon == null ? void 0 : icon.value;
1009
+ return icon?.value;
1000
1010
  });
1001
1011
  const hasIconBefore = computed(
1002
- () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1012
+ () => iconPosition?.value === Position.before ? hasIcon.value : void 0
1003
1013
  );
1004
1014
  const hasIconAfter = computed(
1005
- () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1015
+ () => iconPosition?.value === Position.after ? hasIcon.value : void 0
1006
1016
  );
1007
1017
  const hasIconLeft = computed(
1008
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1018
+ () => iconPosition?.value === Side.left ? hasIcon.value : void 0
1009
1019
  );
1010
1020
  const hasIconRight = computed(
1011
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1021
+ () => iconPosition?.value === Side.right ? hasIcon.value : void 0
1012
1022
  );
1013
1023
  const hasIconTop = computed(
1014
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1024
+ () => iconPosition?.value === Side.top ? hasIcon.value : void 0
1015
1025
  );
1016
1026
  const hasIconBottom = computed(
1017
- () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1027
+ () => iconPosition?.value === Side.bottom ? hasIcon.value : void 0
1018
1028
  );
1019
1029
  return {
1020
1030
  hasIcon,
@@ -1052,7 +1062,7 @@ const VvInputClearAction = defineComponent({
1052
1062
  setup(props, { emit }) {
1053
1063
  const { hasIcon } = useComponentIcon(computed(() => props.icon));
1054
1064
  function onClick(e) {
1055
- e == null ? void 0 : e.stopPropagation();
1065
+ e?.stopPropagation();
1056
1066
  if (!props.disabled) {
1057
1067
  emit("clear");
1058
1068
  }
@@ -1119,7 +1129,7 @@ function useGroupStateInject(groupKey) {
1119
1129
  const group = inject(groupKey, void 0);
1120
1130
  const isInGroup = computed(() => group !== void 0);
1121
1131
  function getGroupOrLocalRef(propName, props, emit) {
1122
- const groupPropValue = group == null ? void 0 : group[propName];
1132
+ const groupPropValue = group?.[propName];
1123
1133
  if (groupPropValue) {
1124
1134
  return computed({
1125
1135
  get() {
@@ -1203,10 +1213,10 @@ function useGroupProps(props, emit) {
1203
1213
  const modelValue = getGroupOrLocalRef("modelValue", props, emit);
1204
1214
  const toggle = getGroupOrLocalRef("toggle", props);
1205
1215
  const unselectable = getGroupOrLocalRef("unselectable", props);
1206
- const multiple = computed(() => (group == null ? void 0 : group.multiple.value) ?? false);
1216
+ const multiple = computed(() => group?.multiple.value ?? false);
1207
1217
  const modifiers = computed(() => {
1208
1218
  let localModifiers = props.modifiers;
1209
- let groupModifiers = group == null ? void 0 : group.modifiers.value;
1219
+ let groupModifiers = group?.modifiers.value;
1210
1220
  const toReturn = /* @__PURE__ */ new Set();
1211
1221
  if (localModifiers) {
1212
1222
  if (!Array.isArray(localModifiers)) {
@@ -1223,7 +1233,7 @@ function useGroupProps(props, emit) {
1223
1233
  return Array.from(toReturn);
1224
1234
  });
1225
1235
  const disabled = computed(
1226
- () => Boolean(props.disabled || (group == null ? void 0 : group.disabled.value))
1236
+ () => Boolean(props.disabled || group?.disabled.value)
1227
1237
  );
1228
1238
  return {
1229
1239
  // group props
@@ -1283,7 +1293,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1283
1293
  }
1284
1294
  );
1285
1295
  const pressed = computed(() => {
1286
- return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
1296
+ return props.pressed || dropdownExpanded?.value;
1287
1297
  });
1288
1298
  const { role } = useInjectedDropdownAction();
1289
1299
  const hasTag = computed(() => {
@@ -1291,7 +1301,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1291
1301
  case props.disabled:
1292
1302
  return ActionTag.button;
1293
1303
  case props.to !== void 0:
1294
- return (volver == null ? void 0 : volver.nuxt) ? resolveComponent(ActionTag.nuxtLink) : ActionTag.routerLink;
1304
+ return volver?.nuxt ? resolveComponent(ActionTag.nuxtLink) : ActionTag.routerLink;
1295
1305
  case props.href !== void 0:
1296
1306
  return ActionTag.a;
1297
1307
  default:
@@ -1300,10 +1310,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1300
1310
  });
1301
1311
  const hasProps = computed(() => {
1302
1312
  const toReturn = {
1303
- ...dropdownAria == null ? void 0 : dropdownAria.value,
1313
+ ...dropdownAria?.value,
1304
1314
  ariaPressed: pressed.value ? true : void 0,
1305
1315
  ariaLabel: props.ariaLabel,
1306
- role: role == null ? void 0 : role.value
1316
+ role: role?.value
1307
1317
  };
1308
1318
  switch (hasTag.value) {
1309
1319
  case ActionTag.a:
@@ -1331,32 +1341,29 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1331
1341
  }
1332
1342
  });
1333
1343
  function onClick(e) {
1334
- var _a;
1335
1344
  if (props.disabled) {
1336
1345
  e.preventDefault();
1337
1346
  return;
1338
1347
  }
1339
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick) {
1348
+ if (instance?.vnode.props?.onClick) {
1340
1349
  emit("click", e);
1341
1350
  return;
1342
1351
  }
1343
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
1352
+ dropdownEventBus?.emit("click", e);
1344
1353
  }
1345
1354
  function onMouseover(e) {
1346
- var _a;
1347
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
1355
+ if (instance?.vnode.props?.onMouseover) {
1348
1356
  emit("mouseover", e);
1349
1357
  return;
1350
1358
  }
1351
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
1359
+ dropdownEventBus?.emit("mouseover", e);
1352
1360
  }
1353
1361
  function onMouseleave(e) {
1354
- var _a;
1355
- if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
1362
+ if (instance?.vnode.props?.onMouseleave) {
1356
1363
  emit("mouseleave", e);
1357
1364
  return;
1358
1365
  }
1359
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
1366
+ dropdownEventBus?.emit("mouseleave", e);
1360
1367
  }
1361
1368
  return (_ctx, _cache) => {
1362
1369
  return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
@@ -1388,7 +1395,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1388
1395
  }
1389
1396
  });
1390
1397
  function useUniqueId(id) {
1391
- return computed(() => String((id == null ? void 0 : id.value) || useId()));
1398
+ return computed(() => String(id?.value || useId()));
1392
1399
  }
1393
1400
  const _hoisted_1$5 = {
1394
1401
  key: 1,
@@ -1423,12 +1430,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1423
1430
  unselectable
1424
1431
  } = useGroupProps(props, emit);
1425
1432
  const hasId = useUniqueId(id);
1426
- const name = computed(() => (attrs == null ? void 0 : attrs.name) || hasId.value);
1433
+ const name = computed(() => attrs?.name || hasId.value);
1427
1434
  const element = ref(null);
1428
- const $el = computed(() => {
1429
- var _a;
1430
- return (_a = element.value) == null ? void 0 : _a.$el;
1431
- });
1435
+ const $el = computed(() => element.value?.$el);
1432
1436
  __expose({ $el });
1433
1437
  const pressed = computed(() => {
1434
1438
  if (!toggle.value) {
@@ -1450,7 +1454,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1450
1454
  iconPosition.value
1451
1455
  ),
1452
1456
  "icon-only": Boolean(
1453
- (icon == null ? void 0 : icon.value) && !(label == null ? void 0 : label.value) && !slots.default
1457
+ icon?.value && !label?.value && !slots.default
1454
1458
  )
1455
1459
  }))
1456
1460
  );
@@ -1626,8 +1630,7 @@ function useDropdownProvideTrigger({
1626
1630
  });
1627
1631
  },
1628
1632
  render() {
1629
- var _a, _b;
1630
- return h(Fragment, {}, (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a));
1633
+ return h(Fragment, {}, this.$slots.default?.());
1631
1634
  }
1632
1635
  });
1633
1636
  return {
@@ -1704,8 +1707,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1704
1707
  useMutationObserver(
1705
1708
  floatingEl.value,
1706
1709
  () => {
1707
- var _a;
1708
- hasCustomPosition.value = ((_a = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")) == null ? void 0 : _a.trim()) === "true";
1710
+ hasCustomPosition.value = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
1709
1711
  },
1710
1712
  {
1711
1713
  attributeFilter: ["style"],
@@ -1792,11 +1794,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1792
1794
  }
1793
1795
  );
1794
1796
  const dropdownPlacement = computed(() => {
1795
- var _a;
1796
1797
  if (hasCustomPosition.value) {
1797
1798
  return void 0;
1798
1799
  }
1799
- const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
1800
+ const width = props.triggerWidth && referenceEl.value ? `${referenceEl.value?.offsetWidth}px` : void 0;
1800
1801
  return {
1801
1802
  position: strategy.value,
1802
1803
  top: `${y.value ?? 0}px`,
@@ -1810,7 +1811,6 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1810
1811
  () => placement.value.split("-")[0]
1811
1812
  );
1812
1813
  const arrowPlacement = computed(() => {
1813
- var _a, _b, _c, _d, _e;
1814
1814
  if (hasCustomPosition.value) {
1815
1815
  return void 0;
1816
1816
  }
@@ -1821,9 +1821,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1821
1821
  [Side.left]: Side.right
1822
1822
  }[side.value];
1823
1823
  return {
1824
- left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
1825
- top: ((_c = middlewareData.value.arrow) == null ? void 0 : _c.y) !== void 0 ? `${(_d = middlewareData.value.arrow) == null ? void 0 : _d.y}px` : void 0,
1826
- [staticSide]: `${-(((_e = arrowEl.value) == null ? void 0 : _e.offsetWidth) ?? 0) / 2}px`
1824
+ left: middlewareData.value.arrow?.x !== void 0 ? `${middlewareData.value.arrow?.x}px` : void 0,
1825
+ top: middlewareData.value.arrow?.y !== void 0 ? `${middlewareData.value.arrow?.y}px` : void 0,
1826
+ [staticSide]: `${-(arrowEl.value?.offsetWidth ?? 0) / 2}px`
1827
1827
  };
1828
1828
  });
1829
1829
  const modelValue = useVModel(props, "modelValue", emit);
@@ -1860,8 +1860,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1860
1860
  { ignore: [referenceEl] }
1861
1861
  );
1862
1862
  const hasAriaLabelledby = computed(() => {
1863
- var _a, _b;
1864
- return ((_b = (_a = referenceEl.value) == null ? void 0 : _a.getAttribute) == null ? void 0 : _b.call(_a, "id")) ?? void 0;
1863
+ return referenceEl.value?.getAttribute?.("id") ?? void 0;
1865
1864
  });
1866
1865
  const referenceAria = computed(() => ({
1867
1866
  "aria-controls": hasId.value,
@@ -2012,7 +2011,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2012
2011
  onKeyStroke([" ", "Enter"], (e) => {
2013
2012
  const htmlEl = e.target;
2014
2013
  if (expanded.value && focused.value && htmlEl) {
2015
- htmlEl == null ? void 0 : htmlEl.click();
2014
+ htmlEl?.click();
2016
2015
  }
2017
2016
  });
2018
2017
  const dropdownTransitionHandlers = {
@@ -2299,8 +2298,7 @@ function useVvSelectProps() {
2299
2298
  function useDefaults(componentName, propsDefinition, props) {
2300
2299
  const volver = useVolver();
2301
2300
  const volverComponentDefaults = computed(() => {
2302
- var _a;
2303
- if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
2301
+ if (!volver || !volver.defaults.value?.[componentName]) {
2304
2302
  return void 0;
2305
2303
  }
2306
2304
  return volver.defaults.value[componentName];
@@ -2368,7 +2366,7 @@ function useOptions(props) {
2368
2366
  return labelKey.value(option);
2369
2367
  }
2370
2368
  return String(
2371
- labelKey.value ? get(option, labelKey.value) : option
2369
+ labelKey.value ? getProperty(option, labelKey.value) : option
2372
2370
  );
2373
2371
  };
2374
2372
  const getOptionValue = (option) => {
@@ -2378,7 +2376,7 @@ function useOptions(props) {
2378
2376
  if (typeof valueKey.value === "function") {
2379
2377
  return valueKey.value(option);
2380
2378
  }
2381
- return valueKey.value ? get(option, valueKey.value) : option;
2379
+ return valueKey.value ? getProperty(option, valueKey.value) : option;
2382
2380
  };
2383
2381
  const isOptionDisabled = (option) => {
2384
2382
  if (typeof option === "string") {
@@ -2387,7 +2385,7 @@ function useOptions(props) {
2387
2385
  if (typeof disabledKey.value === "function") {
2388
2386
  return disabledKey.value(option);
2389
2387
  }
2390
- return disabledKey.value ? get(option, disabledKey.value) : false;
2388
+ return disabledKey.value ? Boolean(getProperty(option, disabledKey.value)) : false;
2391
2389
  };
2392
2390
  const getOptionGrouped = (option) => {
2393
2391
  if (typeof option == "string") {
@@ -2448,11 +2446,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2448
2446
  } = HintSlotFactory(propsDefaults, slots);
2449
2447
  const { focused } = useComponentFocus(selectEl, emit);
2450
2448
  function isGroup(option) {
2451
- var _a;
2452
2449
  if (typeof option === "string") {
2453
2450
  return false;
2454
2451
  }
2455
- return (_a = option.options) == null ? void 0 : _a.length;
2452
+ return option.options?.length;
2456
2453
  }
2457
2454
  const {
2458
2455
  id,
@@ -2542,7 +2539,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2542
2539
  watch(
2543
2540
  () => props.options,
2544
2541
  (newValue) => {
2545
- if ((newValue == null ? void 0 : newValue.length) && props.autoselectFirst && !isDirty.value) {
2542
+ if (newValue?.length && props.autoselectFirst && !isDirty.value) {
2546
2543
  const firstOptionValue = getOptionValue(newValue[0]);
2547
2544
  localModelValue.value = props.multiple ? [firstOptionValue] : firstOptionValue;
2548
2545
  }
@@ -2746,8 +2743,15 @@ const __default__ = {
2746
2743
  };
2747
2744
  const _sfc_main = /* @__PURE__ */ defineComponent({
2748
2745
  ...__default__,
2749
- props: useVvComboboxProps(),
2750
- emits: ["update:modelValue", "update:search", "update:options", "focus", "blur", "clear", "change:search"],
2746
+ props: /* @__PURE__ */ mergeModels(useVvComboboxProps(), {
2747
+ "search": {
2748
+ type: String,
2749
+ default: "",
2750
+ required: false
2751
+ },
2752
+ "searchModifiers": {}
2753
+ }),
2754
+ emits: /* @__PURE__ */ mergeModels(["update:modelValue", "update:search", "update:options", "focus", "blur", "clear", "change:search"], ["update:search"]),
2751
2755
  setup(__props, { emit: __emit }) {
2752
2756
  const props = __props;
2753
2757
  const emit = __emit;
@@ -2787,7 +2791,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2787
2791
  collapse();
2788
2792
  }
2789
2793
  });
2790
- const searchText = ref("");
2794
+ const searchText = useModel(__props, "search");
2791
2795
  const debouncedSearchText = refDebounced(
2792
2796
  searchText,
2793
2797
  computed(() => Number(props.debounceSearch))
@@ -2822,16 +2826,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2822
2826
  }
2823
2827
  }
2824
2828
  function onAfterCollapse() {
2825
- if (propsDefaults.value.searchable) {
2829
+ if (!propsDefaults.value.keepSearch) {
2826
2830
  searchText.value = "";
2827
2831
  }
2828
2832
  }
2829
2833
  function isGroup(option) {
2830
- var _a;
2831
2834
  if (typeof option === "string") {
2832
2835
  return false;
2833
2836
  }
2834
- return (_a = option.options) == null ? void 0 : _a.length;
2837
+ return option.options?.length;
2835
2838
  }
2836
2839
  const {
2837
2840
  id,
@@ -2925,15 +2928,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2925
2928
  } = useOptions(props);
2926
2929
  const hasOptions = computed(() => {
2927
2930
  const toReturn = [...props.options, ...addedOptions.value];
2928
- for (const localModelValueItem of localModelValue.value) {
2931
+ for (const item of localModelValue.value) {
2929
2932
  if (!toReturn.some((option) => {
2930
2933
  const optionValue = getOptionValue(option);
2931
- if (typeof optionValue === "object") {
2932
- return JSON.stringify(optionValue) === JSON.stringify(localModelValueItem);
2934
+ if (typeof optionValue === "object" && typeof item === "object") {
2935
+ return JSON.stringify(optionValue) === JSON.stringify(item);
2933
2936
  }
2934
- return optionValue === localModelValueItem;
2937
+ return optionValue === item;
2935
2938
  })) {
2936
- toReturn.push(localModelValueItem);
2939
+ toReturn.push(item);
2937
2940
  }
2938
2941
  }
2939
2942
  return toReturn;
@@ -2947,7 +2950,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2947
2950
  return isOptionDisabled(option) || !isSelectable.value && !isOptionSelected(option);
2948
2951
  }
2949
2952
  const filteredOptions = computedAsync(async () => {
2950
- var _a;
2951
2953
  if (propsDefaults.value.searchFunction) {
2952
2954
  localLoading.value = true;
2953
2955
  const toReturn = await Promise.resolve(
@@ -2959,7 +2961,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2959
2961
  localLoading.value = false;
2960
2962
  return toReturn;
2961
2963
  }
2962
- return (_a = hasOptions.value) == null ? void 0 : _a.filter((option) => {
2964
+ return hasOptions.value?.filter((option) => {
2963
2965
  return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
2964
2966
  });
2965
2967
  });
@@ -3024,7 +3026,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3024
3026
  watch(
3025
3027
  hasOptions,
3026
3028
  (newValue) => {
3027
- if ((newValue == null ? void 0 : newValue.length) && props.autoselectFirst && !isDirty.value) {
3029
+ if (newValue?.length && props.autoselectFirst && !isDirty.value) {
3028
3030
  onInput(newValue[0]);
3029
3031
  }
3030
3032
  },
@@ -3092,13 +3094,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3092
3094
  { target: inputEl }
3093
3095
  );
3094
3096
  function onKeyupEnterInputSearch() {
3095
- var _a, _b;
3096
- if ((_a = filteredOptions.value) == null ? void 0 : _a.length) {
3097
+ if (filteredOptions.value?.length) {
3097
3098
  if (filteredOptions.value.length === 1) {
3098
3099
  onInput(filteredOptions.value[0]);
3099
3100
  return;
3100
3101
  }
3101
- (_b = dropdownEl.value) == null ? void 0 : _b.focusFirstListElement();
3102
+ dropdownEl.value?.focusFirstListElement();
3102
3103
  return;
3103
3104
  }
3104
3105
  if (propsDefaults.value.addable) {
@@ -3171,64 +3172,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3171
3172
  tabindex: unref(hasTabindex),
3172
3173
  onClickPassive: onClickInput
3173
3174
  }), [
3174
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3175
- unref(hasValue) ? (openBlock(), createElementBlock(
3176
- Fragment,
3177
- { key: 0 },
3178
- [
3179
- !_ctx.badges ? (openBlock(), createElementBlock(
3180
- "div",
3181
- _hoisted_7,
3182
- toDisplayString(unref(hasValue)),
3183
- 1
3184
- /* TEXT */
3185
- )) : (openBlock(true), createElementBlock(
3186
- Fragment,
3187
- { key: 1 },
3188
- renderList(unref(selectedOptions), (option, index) => {
3189
- return openBlock(), createBlock(_sfc_main$8, {
3190
- key: index,
3191
- modifiers: _ctx.badgeModifiers,
3192
- class: "vv-select__badge"
3193
- }, {
3194
- default: withCtx(() => [
3195
- createTextVNode(
3196
- toDisplayString(unref(getOptionLabel)(option)) + " ",
3197
- 1
3198
- /* TEXT */
3199
- ),
3200
- unref(isUnselectable) ? (openBlock(), createElementBlock("button", {
3201
- key: 0,
3202
- "aria-label": unref(propsDefaults).deselectActionLabel,
3203
- type: "button",
3204
- onClick: withModifiers(($event) => onInput(option), ["stop"])
3205
- }, [
3206
- createVNode(_sfc_main$9, { name: "close" })
3207
- ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
3208
- ]),
3209
- _: 2
3210
- /* DYNAMIC */
3211
- }, 1032, ["modifiers"]);
3212
- }),
3213
- 128
3214
- /* KEYED_FRAGMENT */
3215
- ))
3216
- ],
3217
- 64
3218
- /* STABLE_FRAGMENT */
3219
- )) : (openBlock(), createElementBlock(
3175
+ unref(hasValue) ? renderSlot(_ctx.$slots, "value", normalizeProps(mergeProps({ key: 0 }, { selectedOptions: unref(selectedOptions), onInput })), () => [
3176
+ !_ctx.badges ? (openBlock(), createElementBlock(
3177
+ "div",
3178
+ _hoisted_7,
3179
+ toDisplayString(unref(hasValue)),
3180
+ 1
3181
+ /* TEXT */
3182
+ )) : (openBlock(true), createElementBlock(
3220
3183
  Fragment,
3221
3184
  { key: 1 },
3222
- [
3223
- createTextVNode(
3224
- toDisplayString(_ctx.placeholder),
3225
- 1
3226
- /* TEXT */
3227
- )
3228
- ],
3229
- 64
3230
- /* STABLE_FRAGMENT */
3185
+ renderList(unref(selectedOptions), (option, index) => {
3186
+ return openBlock(), createBlock(_sfc_main$8, {
3187
+ key: index,
3188
+ modifiers: _ctx.badgeModifiers,
3189
+ class: "vv-select__badge"
3190
+ }, {
3191
+ default: withCtx(() => [
3192
+ createTextVNode(
3193
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
3194
+ 1
3195
+ /* TEXT */
3196
+ ),
3197
+ unref(isUnselectable) ? (openBlock(), createElementBlock("button", {
3198
+ key: 0,
3199
+ "aria-label": unref(propsDefaults).deselectActionLabel,
3200
+ type: "button",
3201
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
3202
+ }, [
3203
+ createVNode(_sfc_main$9, { name: "close" })
3204
+ ], 8, _hoisted_8)) : createCommentVNode("v-if", true)
3205
+ ]),
3206
+ _: 2
3207
+ /* DYNAMIC */
3208
+ }, 1032, ["modifiers"]);
3209
+ }),
3210
+ 128
3211
+ /* KEYED_FRAGMENT */
3231
3212
  ))
3213
+ ]) : renderSlot(_ctx.$slots, "placeholder", { key: 1 }, () => [
3214
+ createTextVNode(
3215
+ toDisplayString(_ctx.placeholder),
3216
+ 1
3217
+ /* TEXT */
3218
+ )
3232
3219
  ])
3233
3220
  ], 16, _hoisted_6),
3234
3221
  unref(hasIconAfter) ? (openBlock(), createBlock(
@@ -3251,151 +3238,145 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3251
3238
  renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3252
3239
  ])) : createCommentVNode("v-if", true)
3253
3240
  ]),
3254
- items: withCtx(() => {
3255
- var _a;
3256
- return [
3257
- !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
3258
- Fragment,
3259
- { key: 0 },
3260
- renderList(unref(filteredOptions), (option, index) => {
3261
- return openBlock(), createElementBlock(
3262
- Fragment,
3263
- { key: index },
3264
- [
3265
- isGroup(option) ? (openBlock(), createElementBlock(
3266
- Fragment,
3267
- { key: 0 },
3268
- [
3269
- createVNode(_sfc_main$4, {
3270
- label: unref(getOptionLabel)(option)
3271
- }, null, 8, ["label"]),
3272
- (openBlock(true), createElementBlock(
3273
- Fragment,
3274
- null,
3275
- renderList(unref(getOptionGrouped)(
3276
- option
3277
- ), (item, i) => {
3278
- return openBlock(), createBlock(_sfc_main$2, mergeProps({ ref_for: true }, {
3279
- selected: isOptionSelected(item),
3280
- disabled: isOptionDisabledOrNotSelectable(item),
3281
- unselectable: unref(isUnselectable),
3282
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3283
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3284
- selectedHintLabel: unref(propsDefaults).selectedHintLabel,
3285
- focusOnHover: _ctx.focusOnHover
3286
- }, {
3287
- key: i,
3288
- class: "vv-dropdown-option",
3289
- onClickPassive: ($event) => onInput(item)
3290
- }), {
3291
- default: withCtx(() => [
3292
- renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3293
- option,
3294
- selectedOptions: unref(selectedOptions),
3295
- selected: isOptionSelected(item),
3296
- disabled: isOptionDisabledOrNotSelectable(item)
3297
- }), () => [
3298
- createTextVNode(
3299
- toDisplayString(unref(getOptionLabel)(item)),
3300
- 1
3301
- /* TEXT */
3302
- )
3303
- ])
3304
- ]),
3305
- _: 2
3306
- /* DYNAMIC */
3307
- }, 1040, ["onClickPassive"]);
3308
- }),
3309
- 128
3310
- /* KEYED_FRAGMENT */
3311
- ))
3312
- ],
3313
- 64
3314
- /* STABLE_FRAGMENT */
3315
- )) : (openBlock(), createBlock(_sfc_main$2, mergeProps({
3316
- key: 1,
3317
- ref_for: true
3318
- }, {
3319
- selected: isOptionSelected(option),
3320
- disabled: isOptionDisabledOrNotSelectable(option),
3321
- unselectable: unref(isUnselectable),
3322
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3323
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3324
- selectedHintLabel: unref(propsDefaults).selectedHintLabel,
3325
- focusOnHover: _ctx.focusOnHover
3326
- }, {
3327
- class: "vv-dropdown-option",
3328
- onClickPassive: ($event) => onInput(option)
3329
- }), {
3330
- default: withCtx(() => [
3331
- renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3332
- option,
3333
- selectedOptions: unref(selectedOptions),
3334
- selected: isOptionSelected(option),
3335
- disabled: isOptionDisabledOrNotSelectable(option)
3336
- }), () => [
3337
- createTextVNode(
3338
- toDisplayString(unref(getOptionLabel)(option)),
3339
- 1
3340
- /* TEXT */
3341
- )
3342
- ])
3343
- ]),
3344
- _: 2
3345
- /* DYNAMIC */
3346
- }, 1040, ["onClickPassive"]))
3347
- ],
3348
- 64
3349
- /* STABLE_FRAGMENT */
3350
- );
3351
- }),
3352
- 128
3353
- /* KEYED_FRAGMENT */
3354
- )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$2, {
3355
- key: 1,
3356
- modifiers: "inert"
3357
- }, {
3358
- default: withCtx(() => [
3359
- renderSlot(_ctx.$slots, "no-options", {}, () => [
3360
- createTextVNode(
3361
- toDisplayString(unref(propsDefaults).noOptionsLabel),
3362
- 1
3363
- /* TEXT */
3364
- )
3365
- ])
3366
- ]),
3367
- _: 3
3368
- /* FORWARDED */
3369
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$2, {
3370
- key: 2,
3371
- modifiers: "inert"
3372
- }, {
3373
- default: withCtx(() => [
3374
- renderSlot(_ctx.$slots, "no-results", {}, () => [
3375
- createTextVNode(
3376
- toDisplayString(unref(propsDefaults).addable ? unref(propsDefaults).addOptionHintLabel : unref(propsDefaults).noResultsLabel),
3377
- 1
3378
- /* TEXT */
3379
- )
3380
- ])
3381
- ]),
3382
- _: 3
3383
- /* FORWARDED */
3384
- })) : createCommentVNode("v-if", true)
3385
- ];
3386
- }),
3241
+ items: withCtx(() => [
3242
+ !unref(disabled) && unref(filteredOptions)?.length ? (openBlock(true), createElementBlock(
3243
+ Fragment,
3244
+ { key: 0 },
3245
+ renderList(unref(filteredOptions), (option, index) => {
3246
+ return openBlock(), createElementBlock(
3247
+ Fragment,
3248
+ { key: index },
3249
+ [
3250
+ isGroup(option) ? (openBlock(), createElementBlock(
3251
+ Fragment,
3252
+ { key: 0 },
3253
+ [
3254
+ createVNode(_sfc_main$4, {
3255
+ label: unref(getOptionLabel)(option)
3256
+ }, null, 8, ["label"]),
3257
+ (openBlock(true), createElementBlock(
3258
+ Fragment,
3259
+ null,
3260
+ renderList(unref(getOptionGrouped)(
3261
+ option
3262
+ ), (item, i) => {
3263
+ return openBlock(), createBlock(_sfc_main$2, mergeProps({ ref_for: true }, {
3264
+ selected: isOptionSelected(item),
3265
+ disabled: isOptionDisabledOrNotSelectable(item),
3266
+ unselectable: unref(isUnselectable),
3267
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3268
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3269
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel,
3270
+ focusOnHover: _ctx.focusOnHover
3271
+ }, {
3272
+ key: i,
3273
+ class: "vv-dropdown-option",
3274
+ onClickPassive: ($event) => onInput(item)
3275
+ }), {
3276
+ default: withCtx(() => [
3277
+ renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3278
+ option,
3279
+ selectedOptions: unref(selectedOptions),
3280
+ selected: isOptionSelected(item),
3281
+ disabled: isOptionDisabledOrNotSelectable(item)
3282
+ }), () => [
3283
+ createTextVNode(
3284
+ toDisplayString(unref(getOptionLabel)(item)),
3285
+ 1
3286
+ /* TEXT */
3287
+ )
3288
+ ])
3289
+ ]),
3290
+ _: 2
3291
+ /* DYNAMIC */
3292
+ }, 1040, ["onClickPassive"]);
3293
+ }),
3294
+ 128
3295
+ /* KEYED_FRAGMENT */
3296
+ ))
3297
+ ],
3298
+ 64
3299
+ /* STABLE_FRAGMENT */
3300
+ )) : (openBlock(), createBlock(_sfc_main$2, mergeProps({
3301
+ key: 1,
3302
+ ref_for: true
3303
+ }, {
3304
+ selected: isOptionSelected(option),
3305
+ disabled: isOptionDisabledOrNotSelectable(option),
3306
+ unselectable: unref(isUnselectable),
3307
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3308
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3309
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel,
3310
+ focusOnHover: _ctx.focusOnHover
3311
+ }, {
3312
+ class: "vv-dropdown-option",
3313
+ onClickPassive: ($event) => onInput(option)
3314
+ }), {
3315
+ default: withCtx(() => [
3316
+ renderSlot(_ctx.$slots, "option", mergeProps({ ref_for: true }, {
3317
+ option,
3318
+ selectedOptions: unref(selectedOptions),
3319
+ selected: isOptionSelected(option),
3320
+ disabled: isOptionDisabledOrNotSelectable(option)
3321
+ }), () => [
3322
+ createTextVNode(
3323
+ toDisplayString(unref(getOptionLabel)(option)),
3324
+ 1
3325
+ /* TEXT */
3326
+ )
3327
+ ])
3328
+ ]),
3329
+ _: 2
3330
+ /* DYNAMIC */
3331
+ }, 1040, ["onClickPassive"]))
3332
+ ],
3333
+ 64
3334
+ /* STABLE_FRAGMENT */
3335
+ );
3336
+ }),
3337
+ 128
3338
+ /* KEYED_FRAGMENT */
3339
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$2, {
3340
+ key: 1,
3341
+ modifiers: "inert"
3342
+ }, {
3343
+ default: withCtx(() => [
3344
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
3345
+ createTextVNode(
3346
+ toDisplayString(unref(propsDefaults).addable && searchText.value.length ? unref(propsDefaults).addOptionHintLabel : unref(propsDefaults).noOptionsLabel),
3347
+ 1
3348
+ /* TEXT */
3349
+ )
3350
+ ])
3351
+ ]),
3352
+ _: 3
3353
+ /* FORWARDED */
3354
+ })) : (openBlock(), createBlock(_sfc_main$2, {
3355
+ key: 2,
3356
+ modifiers: "inert"
3357
+ }, {
3358
+ default: withCtx(() => [
3359
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
3360
+ createTextVNode(
3361
+ toDisplayString(unref(propsDefaults).addable ? unref(propsDefaults).addOptionHintLabel : unref(propsDefaults).noResultsLabel),
3362
+ 1
3363
+ /* TEXT */
3364
+ )
3365
+ ])
3366
+ ]),
3367
+ _: 3
3368
+ /* FORWARDED */
3369
+ }))
3370
+ ]),
3387
3371
  after: withCtx(() => [
3388
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3389
- var _a;
3390
- return [
3391
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$6, {
3392
- key: 0,
3393
- label: unref(propsDefaults).closeLabel,
3394
- modifiers: "secondary",
3395
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3396
- }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3397
- ];
3398
- })
3372
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => [
3373
+ unref(dropdownEl)?.customPosition ? (openBlock(), createBlock(_sfc_main$6, {
3374
+ key: 0,
3375
+ label: unref(propsDefaults).closeLabel,
3376
+ modifiers: "secondary",
3377
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3378
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
3379
+ ])
3399
3380
  ]),
3400
3381
  _: 2
3401
3382
  /* DYNAMIC */
@@ -3409,7 +3390,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3409
3390
  id: unref(hasSearchId),
3410
3391
  ref_key: "inputSearchEl",
3411
3392
  ref: inputSearchEl,
3412
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
3393
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchText.value = $event),
3413
3394
  "aria-autocomplete": "list",
3414
3395
  "aria-controls": unref(hasDropdownId),
3415
3396
  autocomplete: "off",
@@ -3419,7 +3400,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3419
3400
  placeholder: unref(propsDefaults).searchPlaceholder,
3420
3401
  onKeyup: withKeys(onKeyupEnterInputSearch, ["enter"])
3421
3402
  }, null, 40, _hoisted_3)), [
3422
- [vModelText, unref(searchText)]
3403
+ [vModelText, searchText.value]
3423
3404
  ]) : createCommentVNode("v-if", true)
3424
3405
  ]),
3425
3406
  key: "0"