@volverjs/ui-vue 0.0.7 → 0.0.8-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 (43) hide show
  1. package/auto-imports.d.ts +1 -0
  2. package/dist/components/VvAlert/VvAlert.es.js +27 -18
  3. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  4. package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -0
  5. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +27 -18
  6. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  7. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +4 -3
  8. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  9. package/dist/components/VvCombobox/VvCombobox.es.js +555 -106
  10. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  11. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +3 -0
  12. package/dist/components/VvCombobox/index.d.ts +1 -0
  13. package/dist/components/VvDropdown/VvDropdown.es.js +56 -28
  14. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  15. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +11 -2
  16. package/dist/components/VvDropdown/index.d.ts +7 -1
  17. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +4 -3
  18. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  19. package/dist/components/VvSelect/VvSelect.es.js +4 -3
  20. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  21. package/dist/components/index.es.js +110 -58
  22. package/dist/components/index.umd.js +1 -1
  23. package/dist/icons.es.js +3 -3
  24. package/dist/icons.umd.js +1 -1
  25. package/dist/stories/Alert/Alert.settings.d.ts +10 -0
  26. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +1 -0
  27. package/package.json +37 -33
  28. package/src/assets/icons/detailed.json +1 -1
  29. package/src/assets/icons/normal.json +1 -1
  30. package/src/assets/icons/simple.json +1 -1
  31. package/src/components/VvAlert/VvAlert.vue +29 -11
  32. package/src/components/VvCombobox/VvCombobox.vue +48 -26
  33. package/src/components/VvCombobox/index.ts +1 -0
  34. package/src/components/VvDropdown/VvDropdown.vue +59 -26
  35. package/src/components/VvDropdown/index.ts +8 -2
  36. package/src/composables/useOptions.ts +4 -3
  37. package/src/stories/Alert/Alert.settings.ts +10 -0
  38. package/src/stories/Alert/Alert.test.ts +8 -4
  39. package/src/stories/Combobox/Combobox.settings.ts +22 -1
  40. package/src/stories/Combobox/Combobox.test.ts +5 -6
  41. package/src/stories/Combobox/ComboboxOptions.stories.ts +18 -0
  42. package/src/stories/Select/Select.test.ts +3 -3
  43. package/src/stories/Tooltip/Tooltip.test.ts +3 -1
@@ -1,9 +1,10 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, provide, h, Fragment, useAttrs, watch, nextTick, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, createTextVNode, toDisplayString, useSlots, isRef, renderList, vModelSelect, createSlots, withModifiers, vModelText } from "vue";
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, useSlots, isRef, 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
4
  import { nanoid } from "nanoid";
5
- import { useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
5
+ import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
6
6
  import mitt from "mitt";
7
+ import { get } from "ts-dot-prop";
7
8
  var Side = /* @__PURE__ */ ((Side2) => {
8
9
  Side2["left"] = "left";
9
10
  Side2["right"] = "right";
@@ -33,6 +34,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
33
34
  ButtonType2["reset"] = "reset";
34
35
  return ButtonType2;
35
36
  })(ButtonType || {});
37
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
38
+ ActionTag2["nuxtLink"] = "nuxt-link";
39
+ ActionTag2["routerLink"] = "router-link";
40
+ ActionTag2["a"] = "a";
41
+ ActionTag2["button"] = "button";
42
+ return ActionTag2;
43
+ })(ActionTag || {});
36
44
  var ActionRoles = /* @__PURE__ */ ((ActionRoles2) => {
37
45
  ActionRoles2["button"] = "button";
38
46
  ActionRoles2["link"] = "link";
@@ -57,6 +65,7 @@ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
57
65
  return AnchorTarget2;
58
66
  })(AnchorTarget || {});
59
67
  const INJECTION_KEY_VOLVER = Symbol.for("volver");
68
+ const INJECTION_KEY_BUTTON_GROUP = Symbol.for("buttonGroup");
60
69
  const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for(
61
70
  "dropdownTrigger"
62
71
  );
@@ -352,7 +361,7 @@ const AutocompleteProps = {
352
361
  */
353
362
  autocomplete: { type: String, default: "off" }
354
363
  };
355
- ({
364
+ const ActionProps = {
356
365
  ...DisabledProps,
357
366
  ...LabelProps,
358
367
  ...PressedProps,
@@ -366,7 +375,7 @@ const AutocompleteProps = {
366
375
  default: ButtonType.button,
367
376
  validator: (value) => Object.values(ButtonType).includes(value)
368
377
  }
369
- });
378
+ };
370
379
  const VvComboboxEvents = [
371
380
  "update:modelValue",
372
381
  "change:search",
@@ -480,7 +489,8 @@ const VvComboboxProps = {
480
489
  * Dropdown modifiers
481
490
  */
482
491
  dropdownModifiers: {
483
- type: [String, Array]
492
+ type: [String, Array],
493
+ default: "mobile"
484
494
  },
485
495
  /**
486
496
  * Open dropdown on focus
@@ -617,11 +627,11 @@ function useModifiers(prefix, modifiers, others) {
617
627
  return toReturn;
618
628
  });
619
629
  }
620
- const __default__$7 = {
630
+ const __default__$9 = {
621
631
  name: "VvIcon"
622
632
  };
623
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
624
- ...__default__$7,
633
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
634
+ ...__default__$9,
625
635
  props: VvIconProps,
626
636
  setup(__props) {
627
637
  const props = __props;
@@ -715,8 +725,14 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
715
725
  });
716
726
  const VvDropdownProps = {
717
727
  ...IdProps,
718
- ...ModifiersProps,
719
728
  ...DropdownProps,
729
+ /**
730
+ * Component BEM modifiers
731
+ */
732
+ modifiers: {
733
+ type: [String, Array],
734
+ default: "mobile"
735
+ },
720
736
  /**
721
737
  * Show / hide dropdown programmatically
722
738
  */
@@ -790,13 +806,13 @@ function useProvideDropdownAction({
790
806
  expanded
791
807
  });
792
808
  }
793
- const _hoisted_1$4 = ["id", "tabindex", "role", "aria-labelledby"];
794
- const __default__$6 = {
809
+ const _hoisted_1$5 = ["id", "tabindex", "role", "aria-labelledby"];
810
+ const __default__$8 = {
795
811
  name: "VvDropdown",
796
812
  inheritAttrs: false
797
813
  };
798
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
799
- ...__default__$6,
814
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
815
+ ...__default__$8,
800
816
  props: VvDropdownProps,
801
817
  emits: [
802
818
  "update:modelValue",
@@ -813,7 +829,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
813
829
  const maxWidth = ref("auto");
814
830
  const maxHeight = ref("auto");
815
831
  const localReferenceEl = ref(null);
816
- const floatingEl = ref(null);
832
+ const floatingEl = ref();
817
833
  const arrowEl = ref(null);
818
834
  const listEl = ref(null);
819
835
  const referenceEl = computed({
@@ -822,6 +838,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
822
838
  localReferenceEl.value = newValue;
823
839
  }
824
840
  });
841
+ const dropdownCustomPosition = ref();
842
+ const onChangeDropdownCustomPosition = () => {
843
+ var _a;
844
+ dropdownCustomPosition.value = (_a = window.getComputedStyle(floatingEl.value).getPropertyValue("--dropdown-custom-position")) == null ? void 0 : _a.trim();
845
+ };
846
+ onMounted(() => {
847
+ useMutationObserver(floatingEl.value, onChangeDropdownCustomPosition, {
848
+ attributeFilter: ["style"],
849
+ window
850
+ });
851
+ });
825
852
  const middleware = computed(() => {
826
853
  const toReturn = [];
827
854
  if (props.autoPlacement) {
@@ -896,14 +923,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
896
923
  middleware
897
924
  }
898
925
  );
899
- const dropdownPlacement = computed(() => ({
900
- position: strategy.value,
901
- top: `${y.value ?? 0}px`,
902
- left: `${x.value ?? 0}px`,
903
- maxWidth: maxWidth.value,
904
- maxHeight: maxHeight.value,
905
- width: props.triggerWidth && referenceEl.value ? `${referenceEl.value.offsetWidth}px` : void 0
906
- }));
926
+ const dropdownPlacement = computed(() => {
927
+ if ((dropdownCustomPosition == null ? void 0 : dropdownCustomPosition.value) === "true") {
928
+ return {};
929
+ }
930
+ return {
931
+ position: strategy.value,
932
+ top: `${y.value ?? 0}px`,
933
+ left: `${x.value ?? 0}px`,
934
+ maxWidth: maxWidth.value,
935
+ maxHeight: maxHeight.value,
936
+ width: props.triggerWidth && referenceEl.value ? `${referenceEl.value.offsetWidth}px` : void 0
937
+ };
938
+ });
907
939
  const side = computed(() => placement.value.split("-")[0]);
908
940
  const staticSide = computed(
909
941
  () => ({
@@ -915,6 +947,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
915
947
  );
916
948
  const arrowPlacement = computed(() => {
917
949
  var _a, _b, _c, _d;
950
+ if ((dropdownCustomPosition == null ? void 0 : dropdownCustomPosition.value) === "true") {
951
+ return {};
952
+ }
918
953
  if (["bottom", "top"].includes(staticSide.value)) {
919
954
  return {
920
955
  right: `${((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) ?? 0}px`,
@@ -950,7 +985,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
950
985
  const init = (el) => {
951
986
  referenceEl.value = el;
952
987
  };
953
- __expose({ toggle, show, hide, init });
988
+ __expose({ toggle, show, hide, init, dropdownCustomPosition });
954
989
  watch(expanded, (newValue) => {
955
990
  if (newValue && props.autofocusFirst) {
956
991
  nextTick(() => {
@@ -958,7 +993,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
958
993
  floatingEl.value
959
994
  );
960
995
  if (focusableElements.length > 0) {
961
- focusableElements[0].focus();
996
+ focusableElements[0].focus({
997
+ preventScroll: true
998
+ });
962
999
  }
963
1000
  });
964
1001
  }
@@ -1023,9 +1060,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1023
1060
  document.activeElement
1024
1061
  );
1025
1062
  if (activeElementIndex < focusableElements.length - 1) {
1026
- focusableElements[activeElementIndex + 1].focus();
1063
+ focusableElements[activeElementIndex + 1].focus({
1064
+ preventScroll: true
1065
+ });
1027
1066
  } else {
1028
- focusableElements[0].focus();
1067
+ focusableElements[0].focus({
1068
+ preventScroll: true
1069
+ });
1029
1070
  }
1030
1071
  }
1031
1072
  });
@@ -1043,9 +1084,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1043
1084
  document.activeElement
1044
1085
  );
1045
1086
  if (activeElementIndex > 0) {
1046
- focusableElements[activeElementIndex - 1].focus();
1087
+ focusableElements[activeElementIndex - 1].focus({
1088
+ preventScroll: true
1089
+ });
1047
1090
  } else {
1048
- focusableElements[focusableElements.length - 1].focus();
1091
+ focusableElements[focusableElements.length - 1].focus({
1092
+ preventScroll: true
1093
+ });
1049
1094
  }
1050
1095
  }
1051
1096
  });
@@ -1069,10 +1114,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1069
1114
  }
1070
1115
  });
1071
1116
  onKeyStroke([" ", "Enter"], (e) => {
1072
- if (expanded.value && focused.value && e.target !== document.activeElement) {
1073
- e.preventDefault();
1074
- const activeElement = document.activeElement;
1075
- activeElement.click();
1117
+ const htmlEl = e.target;
1118
+ if (expanded.value && focused.value && htmlEl) {
1119
+ htmlEl == null ? void 0 : htmlEl.click();
1076
1120
  }
1077
1121
  });
1078
1122
  const onTransitionBeforeEnter = () => {
@@ -1120,7 +1164,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1120
1164
  renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
1121
1165
  role: unref(itemRole)
1122
1166
  })))
1123
- ], 16, _hoisted_1$4),
1167
+ ], 16, _hoisted_1$5),
1124
1168
  renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
1125
1169
  ], 6), [
1126
1170
  [vShow, unref(expanded)]
@@ -1132,14 +1176,20 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1132
1176
  };
1133
1177
  }
1134
1178
  });
1179
+ function useInjectedDropdownTrigger() {
1180
+ return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
1181
+ }
1135
1182
  function useInjectedDropdownItem() {
1136
1183
  return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
1137
1184
  }
1138
- const __default__$5 = {
1185
+ function useInjectedDropdownAction() {
1186
+ return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
1187
+ }
1188
+ const __default__$7 = {
1139
1189
  name: "VvDropdownItem"
1140
1190
  };
1141
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1142
- ...__default__$5,
1191
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1192
+ ...__default__$7,
1143
1193
  setup(__props) {
1144
1194
  const { role, expanded } = useInjectedDropdownItem();
1145
1195
  const element = ref(null);
@@ -1163,12 +1213,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1163
1213
  };
1164
1214
  }
1165
1215
  });
1166
- const _hoisted_1$3 = ["title"];
1167
- const __default__$4 = {
1216
+ const _hoisted_1$4 = ["title"];
1217
+ const __default__$6 = {
1168
1218
  name: "VvDropdownOption"
1169
1219
  };
1170
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1171
- ...__default__$4,
1220
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1221
+ ...__default__$6,
1172
1222
  props: {
1173
1223
  ...DisabledProps,
1174
1224
  ...SelectedProps,
@@ -1205,7 +1255,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1205
1255
  }
1206
1256
  });
1207
1257
  return (_ctx, _cache) => {
1208
- return openBlock(), createBlock(_sfc_main$5, {
1258
+ return openBlock(), createBlock(_sfc_main$7, {
1209
1259
  class: normalizeClass(unref(bemCssClasses)),
1210
1260
  tabindex: _ctx.disabled ? -1 : 0,
1211
1261
  "aria-selected": _ctx.selected,
@@ -1220,30 +1270,30 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1220
1270
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
1221
1271
  createTextVNode(toDisplayString(unref(hintLabel)), 1)
1222
1272
  ])
1223
- ], 8, _hoisted_1$3)
1273
+ ], 8, _hoisted_1$4)
1224
1274
  ]),
1225
1275
  _: 3
1226
1276
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
1227
1277
  };
1228
1278
  }
1229
1279
  });
1230
- const _hoisted_1$2 = {
1280
+ const _hoisted_1$3 = {
1231
1281
  class: "vv-dropdown-optgroup",
1232
1282
  role: "presentation",
1233
1283
  tabindex: "-1"
1234
1284
  };
1235
- const __default__$3 = {
1285
+ const __default__$5 = {
1236
1286
  name: "VvDropdownOptgroup"
1237
1287
  };
1238
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1239
- ...__default__$3,
1288
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1289
+ ...__default__$5,
1240
1290
  props: {
1241
1291
  ...LabelProps
1242
1292
  },
1243
1293
  setup(__props) {
1244
1294
  const props = __props;
1245
1295
  return (_ctx, _cache) => {
1246
- return openBlock(), createElementBlock("li", _hoisted_1$2, toDisplayString(props.label), 1);
1296
+ return openBlock(), createElementBlock("li", _hoisted_1$3, toDisplayString(props.label), 1);
1247
1297
  };
1248
1298
  }
1249
1299
  });
@@ -1561,18 +1611,18 @@ function useOptions(props) {
1561
1611
  if (typeof option !== "object" && option !== null)
1562
1612
  return option;
1563
1613
  return String(
1564
- typeof labelKey.value === "function" ? labelKey.value(option) : option[labelKey.value]
1614
+ typeof labelKey.value === "function" ? labelKey.value(option) : get(option, labelKey.value)
1565
1615
  );
1566
1616
  };
1567
1617
  const getOptionValue = (option) => {
1568
1618
  if (typeof option !== "object" && option !== null)
1569
1619
  return option;
1570
- return typeof valueKey.value === "function" ? valueKey.value(option) : option[valueKey.value];
1620
+ return typeof valueKey.value === "function" ? valueKey.value(option) : get(option, valueKey.value);
1571
1621
  };
1572
1622
  const getOptionDisabled = (option) => {
1573
1623
  if (typeof option !== "object" && option !== null)
1574
1624
  return false;
1575
- return typeof disabledKey.value === "function" ? disabledKey.value(option) : option[disabledKey.value];
1625
+ return typeof disabledKey.value === "function" ? disabledKey.value(option) : get(option, disabledKey.value);
1576
1626
  };
1577
1627
  const getOptionGrouped = (option) => {
1578
1628
  if (typeof option !== "object" && option !== null)
@@ -1587,8 +1637,8 @@ function useOptions(props) {
1587
1637
  getOptionGrouped
1588
1638
  };
1589
1639
  }
1590
- const _hoisted_1$1 = ["for"];
1591
- const _hoisted_2$1 = { class: "vv-select__wrapper" };
1640
+ const _hoisted_1$2 = ["for"];
1641
+ const _hoisted_2$2 = { class: "vv-select__wrapper" };
1592
1642
  const _hoisted_3$1 = {
1593
1643
  key: 0,
1594
1644
  class: "vv-select__input-before"
@@ -1603,11 +1653,11 @@ const _hoisted_10 = {
1603
1653
  key: 1,
1604
1654
  class: "vv-select__input-after"
1605
1655
  };
1606
- const __default__$2 = {
1656
+ const __default__$4 = {
1607
1657
  name: "VvSelect"
1608
1658
  };
1609
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1610
- ...__default__$2,
1659
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1660
+ ...__default__$4,
1611
1661
  props: VvSelectProps,
1612
1662
  emits: VvSelectEmits,
1613
1663
  setup(__props, { emit }) {
@@ -1725,13 +1775,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1725
1775
  _ctx.label ? (openBlock(), createElementBlock("label", {
1726
1776
  key: 0,
1727
1777
  for: unref(hasId)
1728
- }, toDisplayString(_ctx.label), 9, _hoisted_1$1)) : createCommentVNode("", true),
1729
- createElementVNode("div", _hoisted_2$1, [
1778
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$2)) : createCommentVNode("", true),
1779
+ createElementVNode("div", _hoisted_2$2, [
1730
1780
  _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
1731
1781
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1732
1782
  ])) : createCommentVNode("", true),
1733
1783
  createElementVNode("div", _hoisted_4$1, [
1734
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$7, mergeProps({
1784
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1735
1785
  key: 0,
1736
1786
  class: "vv-select__icon"
1737
1787
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -1771,7 +1821,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1771
1821
  ], 16, _hoisted_5$1), [
1772
1822
  [vModelSelect, unref(localModelValue)]
1773
1823
  ]),
1774
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$7, mergeProps({
1824
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
1775
1825
  key: 1,
1776
1826
  class: "vv-select__icon vv-select__icon-after"
1777
1827
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -1821,11 +1871,11 @@ const VvBadgeProps = {
1821
1871
  ...ModifiersProps,
1822
1872
  value: [String, Number]
1823
1873
  };
1824
- const __default__$1 = {
1874
+ const __default__$3 = {
1825
1875
  name: "VvBadge"
1826
1876
  };
1827
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1828
- ...__default__$1,
1877
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1878
+ ...__default__$3,
1829
1879
  props: VvBadgeProps,
1830
1880
  setup(__props) {
1831
1881
  const props = __props;
@@ -1843,6 +1893,389 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1843
1893
  };
1844
1894
  }
1845
1895
  });
1896
+ const VvActionEvents = ["click", "mouseover", "mouseleave"];
1897
+ const VvActionProps = ActionProps;
1898
+ const __default__$2 = {
1899
+ name: "VvAction"
1900
+ };
1901
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1902
+ ...__default__$2,
1903
+ props: VvActionProps,
1904
+ emits: VvActionEvents,
1905
+ setup(__props, { expose: __expose, emit }) {
1906
+ const props = __props;
1907
+ const volver = useVolver();
1908
+ const element = ref(null);
1909
+ __expose({ $el: element });
1910
+ const {
1911
+ reference: dropdownTriggerReference,
1912
+ bus: dropdownEventBus,
1913
+ aria: dropdownAria,
1914
+ expanded: dropdownExpanded
1915
+ } = useInjectedDropdownTrigger();
1916
+ watch(
1917
+ () => element.value,
1918
+ (newValue) => {
1919
+ if (dropdownTriggerReference) {
1920
+ dropdownTriggerReference.value = newValue;
1921
+ }
1922
+ }
1923
+ );
1924
+ const pressed = computed(() => {
1925
+ return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
1926
+ });
1927
+ const { role } = useInjectedDropdownAction();
1928
+ const hasTag = computed(() => {
1929
+ switch (true) {
1930
+ case props.disabled:
1931
+ return ActionTag.button;
1932
+ case props.to !== void 0:
1933
+ return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
1934
+ case props.href !== void 0:
1935
+ return ActionTag.a;
1936
+ default:
1937
+ return ActionTag.button;
1938
+ }
1939
+ });
1940
+ const hasProps = computed(() => {
1941
+ const toReturn = {
1942
+ ...dropdownAria == null ? void 0 : dropdownAria.value,
1943
+ "aria-pressed": pressed.value ? true : void 0,
1944
+ role: role == null ? void 0 : role.value
1945
+ };
1946
+ switch (hasTag.value) {
1947
+ case ActionTag.a:
1948
+ return {
1949
+ ...toReturn,
1950
+ href: props.href,
1951
+ target: props.target,
1952
+ rel: props.rel
1953
+ };
1954
+ case ActionTag.routerLink:
1955
+ case ActionTag.nuxtLink:
1956
+ return {
1957
+ ...toReturn,
1958
+ to: props.to,
1959
+ target: props.target
1960
+ };
1961
+ default:
1962
+ return {
1963
+ ...toReturn,
1964
+ type: props.type,
1965
+ disabled: props.disabled
1966
+ };
1967
+ }
1968
+ });
1969
+ const onClick = (e) => {
1970
+ if (props.disabled) {
1971
+ e.preventDefault();
1972
+ return;
1973
+ }
1974
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
1975
+ emit("click", e);
1976
+ };
1977
+ const onMouseover = (e) => {
1978
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
1979
+ emit("mouseover", e);
1980
+ };
1981
+ const onMouseleave = (e) => {
1982
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
1983
+ emit("mouseleave", e);
1984
+ };
1985
+ return (_ctx, _cache) => {
1986
+ return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
1987
+ ref_key: "element",
1988
+ ref: element,
1989
+ class: {
1990
+ active: _ctx.active,
1991
+ pressed: unref(pressed),
1992
+ disabled: _ctx.disabled
1993
+ },
1994
+ onClickPassive: onClick,
1995
+ onMouseoverPassive: onMouseover,
1996
+ onMouseleavePassive: onMouseleave
1997
+ }), {
1998
+ default: withCtx(() => [
1999
+ renderSlot(_ctx.$slots, "default", {}, () => [
2000
+ createTextVNode(toDisplayString(_ctx.label), 1)
2001
+ ])
2002
+ ]),
2003
+ _: 3
2004
+ }, 16, ["class"]);
2005
+ };
2006
+ }
2007
+ });
2008
+ function useInjectedGroupState(groupKey) {
2009
+ const group = inject(groupKey, void 0);
2010
+ const isInGroup = computed(() => !isEmpty(group));
2011
+ function getGroupOrLocalRef(propName, props, emit) {
2012
+ if (group == null ? void 0 : group.value) {
2013
+ const groupPropValue = unref(group.value)[propName];
2014
+ return computed({
2015
+ get() {
2016
+ return groupPropValue == null ? void 0 : groupPropValue.value;
2017
+ },
2018
+ set(value) {
2019
+ groupPropValue.value = value;
2020
+ }
2021
+ });
2022
+ }
2023
+ const propRef = toRef(props, propName);
2024
+ return computed({
2025
+ get() {
2026
+ return propRef.value;
2027
+ },
2028
+ set(value) {
2029
+ if (emit)
2030
+ emit(`update:${propName}`, value);
2031
+ }
2032
+ });
2033
+ }
2034
+ return {
2035
+ group,
2036
+ isInGroup,
2037
+ getGroupOrLocalRef
2038
+ };
2039
+ }
2040
+ const VvButtonEvents = ["update:modelValue"];
2041
+ const VvButtonProps = {
2042
+ ...ActionProps,
2043
+ ...IdProps,
2044
+ ...ModifiersProps,
2045
+ ...UnselectableProps,
2046
+ ...LoadingProps,
2047
+ /**
2048
+ * Button icon
2049
+ */
2050
+ icon: [String, Object],
2051
+ /**
2052
+ * Button icon position
2053
+ */
2054
+ iconPosition: {
2055
+ type: String,
2056
+ default: Side.left,
2057
+ validator: (value) => Object.values(Side).includes(value)
2058
+ },
2059
+ /**
2060
+ * Loading icon
2061
+ */
2062
+ loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
2063
+ /**
2064
+ * Enable button toggle
2065
+ */
2066
+ toggle: {
2067
+ type: Boolean,
2068
+ default: false
2069
+ },
2070
+ /**
2071
+ * Button toggle value
2072
+ */
2073
+ value: {
2074
+ type: [String, Number, Boolean],
2075
+ default: void 0
2076
+ },
2077
+ /**
2078
+ * Value associated with the unchecked state
2079
+ */
2080
+ uncheckedValue: {
2081
+ type: [String, Number, Boolean],
2082
+ default: void 0
2083
+ },
2084
+ /**
2085
+ * Button toggle model value
2086
+ */
2087
+ modelValue: {
2088
+ type: [String, Number, Boolean],
2089
+ default: void 0
2090
+ }
2091
+ };
2092
+ function useGroupProps(props, emit) {
2093
+ const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_BUTTON_GROUP);
2094
+ const { id, iconPosition, icon, label, pressed } = toRefs(props);
2095
+ const modelValue = getGroupOrLocalRef("modelValue", props, emit);
2096
+ const toggle = getGroupOrLocalRef("toggle", props);
2097
+ const unselectable = getGroupOrLocalRef(
2098
+ "unselectable",
2099
+ props
2100
+ );
2101
+ const multiple = computed(() => (group == null ? void 0 : group.value.multiple.value) ?? false);
2102
+ const modifiers = computed(() => {
2103
+ let localModifiers = props.modifiers;
2104
+ let groupModifiers = group == null ? void 0 : group.value.modifiers.value;
2105
+ const toReturn = /* @__PURE__ */ new Set();
2106
+ if (localModifiers) {
2107
+ if (!Array.isArray(localModifiers)) {
2108
+ localModifiers = localModifiers.split(" ");
2109
+ }
2110
+ localModifiers.forEach((modifier) => toReturn.add(modifier));
2111
+ }
2112
+ if (groupModifiers) {
2113
+ if (!Array.isArray(groupModifiers)) {
2114
+ groupModifiers = groupModifiers.split(" ");
2115
+ }
2116
+ groupModifiers.forEach((modifier) => toReturn.add(modifier));
2117
+ }
2118
+ return Array.from(toReturn);
2119
+ });
2120
+ const disabled = computed(
2121
+ () => {
2122
+ var _a;
2123
+ return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
2124
+ }
2125
+ );
2126
+ return {
2127
+ // group props
2128
+ group,
2129
+ isInGroup,
2130
+ modelValue,
2131
+ toggle,
2132
+ unselectable,
2133
+ multiple,
2134
+ modifiers,
2135
+ disabled,
2136
+ // local props
2137
+ id,
2138
+ pressed,
2139
+ iconPosition,
2140
+ icon,
2141
+ label
2142
+ };
2143
+ }
2144
+ const _hoisted_1$1 = {
2145
+ key: 1,
2146
+ class: "vv-button__label"
2147
+ };
2148
+ const _hoisted_2$1 = {
2149
+ key: 1,
2150
+ class: "vv-button__label"
2151
+ };
2152
+ const __default__$1 = {
2153
+ name: "VvButton"
2154
+ };
2155
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2156
+ ...__default__$1,
2157
+ props: VvButtonProps,
2158
+ emits: VvButtonEvents,
2159
+ setup(__props, { expose: __expose, emit }) {
2160
+ const props = __props;
2161
+ const attrs = useAttrs();
2162
+ const slots = useSlots();
2163
+ const {
2164
+ id,
2165
+ modifiers,
2166
+ iconPosition,
2167
+ icon,
2168
+ label,
2169
+ modelValue,
2170
+ disabled,
2171
+ toggle,
2172
+ unselectable
2173
+ } = useGroupProps(props, emit);
2174
+ const hasId = useUniqueId(id);
2175
+ const name = computed(() => (attrs == null ? void 0 : attrs.name) || hasId.value);
2176
+ const element = ref(null);
2177
+ const $el = computed(() => {
2178
+ var _a;
2179
+ return (_a = element.value) == null ? void 0 : _a.$el;
2180
+ });
2181
+ __expose({ $el });
2182
+ const pressed = computed(() => {
2183
+ if (!toggle.value) {
2184
+ return props.pressed;
2185
+ }
2186
+ if (Array.isArray(modelValue.value)) {
2187
+ return contains(name.value, modelValue.value);
2188
+ }
2189
+ return equals(name.value, modelValue.value);
2190
+ });
2191
+ const bemCssClasses = useModifiers(
2192
+ "vv-button",
2193
+ modifiers,
2194
+ computed(() => ({
2195
+ reverse: [Side.right, Side.bottom].includes(
2196
+ iconPosition.value
2197
+ ),
2198
+ column: [Side.top, Side.bottom].includes(
2199
+ iconPosition.value
2200
+ ),
2201
+ "icon-only": Boolean(
2202
+ (icon == null ? void 0 : icon.value) && !(label == null ? void 0 : label.value) && !slots.default
2203
+ )
2204
+ }))
2205
+ );
2206
+ const hasIconProps = computed(
2207
+ () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
2208
+ );
2209
+ const toggleValue = computed(() => {
2210
+ return props.value !== void 0 ? props.value : name.value;
2211
+ });
2212
+ const onClick = () => {
2213
+ if (toggle.value) {
2214
+ if (Array.isArray(modelValue.value)) {
2215
+ if (contains(toggleValue.value, modelValue.value)) {
2216
+ if (unselectable.value) {
2217
+ modelValue.value = modelValue.value.filter(
2218
+ (n) => n !== toggleValue.value
2219
+ );
2220
+ }
2221
+ return;
2222
+ }
2223
+ modelValue.value.push(toggleValue.value);
2224
+ return;
2225
+ }
2226
+ if (toggleValue.value === modelValue.value && unselectable.value) {
2227
+ modelValue.value = props.uncheckedValue;
2228
+ return;
2229
+ }
2230
+ modelValue.value = toggleValue.value;
2231
+ }
2232
+ };
2233
+ return (_ctx, _cache) => {
2234
+ return openBlock(), createBlock(_sfc_main$2, mergeProps({
2235
+ disabled: unref(disabled),
2236
+ pressed: unref(pressed),
2237
+ active: _ctx.active,
2238
+ type: _ctx.type,
2239
+ to: _ctx.to,
2240
+ href: _ctx.href,
2241
+ target: _ctx.target,
2242
+ rel: _ctx.rel
2243
+ }, {
2244
+ id: unref(hasId),
2245
+ ref_key: "element",
2246
+ ref: element,
2247
+ class: unref(bemCssClasses),
2248
+ onClick
2249
+ }), {
2250
+ default: withCtx(() => [
2251
+ renderSlot(_ctx.$slots, "default", {}, () => [
2252
+ _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
2253
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$9, {
2254
+ key: 0,
2255
+ class: "vv-button__loading-icon",
2256
+ name: _ctx.loadingIcon
2257
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2258
+ _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
2259
+ ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2260
+ renderSlot(_ctx.$slots, "before"),
2261
+ unref(icon) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2262
+ key: 0,
2263
+ class: "vv-button__icon"
2264
+ }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
2265
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
2266
+ renderSlot(_ctx.$slots, "label", {}, () => [
2267
+ createTextVNode(toDisplayString(unref(label)), 1)
2268
+ ])
2269
+ ])) : createCommentVNode("", true),
2270
+ renderSlot(_ctx.$slots, "after")
2271
+ ], 64))
2272
+ ])
2273
+ ]),
2274
+ _: 3
2275
+ }, 16, ["id", "class"]);
2276
+ };
2277
+ }
2278
+ });
1846
2279
  function useDefaults(componentName, propsDefinition, props) {
1847
2280
  const volver = useVolver();
1848
2281
  const volverComponentDefaults = computed(() => {
@@ -1916,7 +2349,12 @@ const _hoisted_9 = {
1916
2349
  };
1917
2350
  const __default__ = {
1918
2351
  name: "VvCombobox",
1919
- components: { VvDropdown: _sfc_main$6, VvDropdownOption: _sfc_main$4, VvDropdownOptgroup: _sfc_main$3 }
2352
+ components: {
2353
+ VvDropdown: _sfc_main$8,
2354
+ VvDropdownOption: _sfc_main$6,
2355
+ VvDropdownOptgroup: _sfc_main$5,
2356
+ VvButton: _sfc_main$1
2357
+ }
1920
2358
  };
1921
2359
  const _sfc_main = /* @__PURE__ */ defineComponent({
1922
2360
  ...__default__,
@@ -1992,7 +2430,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1992
2430
  const onAfterExpand = () => {
1993
2431
  if (searchable.value) {
1994
2432
  if (inputSearchEl.value) {
1995
- inputSearchEl.value.focus();
2433
+ inputSearchEl.value.focus({
2434
+ preventScroll: true
2435
+ });
1996
2436
  }
1997
2437
  }
1998
2438
  };
@@ -2019,6 +2459,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2019
2459
  const hasDropdownId = computed(() => `${hasId.value}-dropdown`);
2020
2460
  const hasSearchId = computed(() => `${hasId.value}-search`);
2021
2461
  const hasLabelId = computed(() => `${hasId.value}-label`);
2462
+ const dropdownEl = ref();
2022
2463
  const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
2023
2464
  icon,
2024
2465
  iconPosition
@@ -2132,33 +2573,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2132
2573
  loadingLabel: propsDefaults.value.loadingLabel,
2133
2574
  disabled: disabled.value,
2134
2575
  readonly: readonly.value,
2135
- modifiers: props.modifiers,
2136
- options: props.options,
2137
- labelKey: props.labelKey,
2138
- valueKey: props.valueKey,
2139
- icon: props.icon,
2140
- iconPosition: props.iconPosition,
2141
- floating: props.floating,
2142
- unselectable: props.unselectable,
2143
- multiple: props.multiple,
2144
- label: props.label,
2145
- placeholder: props.placeholder,
2576
+ modifiers: propsDefaults.value.modifiers,
2577
+ options: propsDefaults.value.options,
2578
+ labelKey: propsDefaults.value.labelKey,
2579
+ valueKey: propsDefaults.value.valueKey,
2580
+ icon: propsDefaults.value.icon,
2581
+ iconPosition: propsDefaults.value.iconPosition,
2582
+ floating: propsDefaults.value.floating,
2583
+ unselectable: propsDefaults.value.unselectable,
2584
+ multiple: propsDefaults.value.multiple,
2585
+ label: propsDefaults.value.label,
2586
+ placeholder: propsDefaults.value.placeholder,
2146
2587
  modelValue: props.modelValue
2147
2588
  }));
2148
2589
  const dropdownProps = computed(() => ({
2149
2590
  id: hasDropdownId.value,
2150
2591
  reference: wrapperEl.value,
2151
- placement: props.placement,
2152
- strategy: props.strategy,
2153
- transitionName: props.transitionName,
2154
- offset: props.offset,
2155
- shift: props.shift,
2156
- flip: props.flip,
2157
- autoPlacement: props.autoPlacement,
2158
- arrow: props.arrow,
2159
- autofocusFirst: searchable.value ? false : props.autofocusFirst,
2160
- triggerWidth: props.triggerWidth,
2161
- modifiers: props.dropdownModifiers
2592
+ placement: propsDefaults.value.placement,
2593
+ strategy: propsDefaults.value.strategy,
2594
+ transitionName: propsDefaults.value.transitionName,
2595
+ offset: propsDefaults.value.offset,
2596
+ shift: propsDefaults.value.shift,
2597
+ flip: propsDefaults.value.flip,
2598
+ autoPlacement: propsDefaults.value.autoPlacement,
2599
+ arrow: propsDefaults.value.arrow,
2600
+ autofocusFirst: searchable.value ? false : propsDefaults.value.autofocusFirst,
2601
+ triggerWidth: propsDefaults.value.triggerWidth,
2602
+ modifiers: propsDefaults.value.dropdownModifiers
2162
2603
  }));
2163
2604
  const slotProps = computed(() => ({
2164
2605
  valid: props.valid,
@@ -2195,9 +2636,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2195
2636
  ref: wrapperEl,
2196
2637
  class: "vv-select__wrapper"
2197
2638
  }, [
2198
- createVNode(_sfc_main$6, mergeProps({
2639
+ createVNode(_sfc_main$8, mergeProps({
2640
+ ref_key: "dropdownEl",
2641
+ ref: dropdownEl,
2199
2642
  modelValue: unref(expanded),
2200
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2643
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
2201
2644
  }, unref(dropdownProps), {
2202
2645
  role: unref(DropdownRole).listbox,
2203
2646
  onAfterExpand,
@@ -2208,7 +2651,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2208
2651
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
2209
2652
  ])) : createCommentVNode("", true),
2210
2653
  createElementVNode("div", _hoisted_5, [
2211
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$7, mergeProps({
2654
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2212
2655
  key: 0,
2213
2656
  class: "vv-select__icon"
2214
2657
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -2228,7 +2671,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2228
2671
  renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
2229
2672
  unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2230
2673
  !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
2231
- return openBlock(), createBlock(_sfc_main$1, {
2674
+ return openBlock(), createBlock(_sfc_main$3, {
2232
2675
  key: index,
2233
2676
  modifiers: _ctx.badgeModifiers,
2234
2677
  class: "vv-select__badge"
@@ -2240,7 +2683,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2240
2683
  "aria-label": unref(propsDefaults).deselectActionLabel,
2241
2684
  onClick: withModifiers(($event) => onInput(option), ["stop"])
2242
2685
  }, [
2243
- createVNode(_sfc_main$7, { name: "close" })
2686
+ createVNode(_sfc_main$9, { name: "close" })
2244
2687
  ], 8, _hoisted_8)) : createCommentVNode("", true)
2245
2688
  ]),
2246
2689
  _: 2
@@ -2251,7 +2694,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2251
2694
  ], 64))
2252
2695
  ])
2253
2696
  ], 16, _hoisted_6),
2254
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$7, mergeProps({
2697
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$9, mergeProps({
2255
2698
  key: 1,
2256
2699
  class: "vv-select__icon vv-select__icon-after"
2257
2700
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -2264,13 +2707,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2264
2707
  unref(filteredOptions).length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
2265
2708
  return openBlock(), createElementBlock(Fragment, { key: index }, [
2266
2709
  isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2267
- createVNode(_sfc_main$3, {
2710
+ createVNode(_sfc_main$5, {
2268
2711
  label: unref(getOptionLabel)(option)
2269
2712
  }, null, 8, ["label"]),
2270
2713
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
2271
2714
  option
2272
2715
  ), (item, i) => {
2273
- return openBlock(), createBlock(_sfc_main$4, mergeProps({
2716
+ return openBlock(), createBlock(_sfc_main$6, mergeProps({
2274
2717
  disabled: unref(getOptionDisabled)(item),
2275
2718
  selected: getOptionSelected(item),
2276
2719
  unselectable: _ctx.unselectable,
@@ -2295,7 +2738,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2295
2738
  _: 2
2296
2739
  }, 1040, ["onClickPassive"]);
2297
2740
  }), 128))
2298
- ], 64)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, {
2741
+ ], 64)) : (openBlock(), createBlock(_sfc_main$6, mergeProps({ key: 1 }, {
2299
2742
  disabled: unref(getOptionDisabled)(option),
2300
2743
  selected: getOptionSelected(option),
2301
2744
  unselectable: _ctx.unselectable,
@@ -2319,7 +2762,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2319
2762
  _: 2
2320
2763
  }, 1040, ["onClickPassive"]))
2321
2764
  ], 64);
2322
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$4, {
2765
+ }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$6, {
2323
2766
  key: 1,
2324
2767
  modifiers: "inert"
2325
2768
  }, {
@@ -2329,7 +2772,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2329
2772
  ])
2330
2773
  ]),
2331
2774
  _: 3
2332
- })) : (openBlock(), createBlock(_sfc_main$4, {
2775
+ })) : (openBlock(), createBlock(_sfc_main$6, {
2333
2776
  key: 2,
2334
2777
  modifiers: "inert"
2335
2778
  }, {
@@ -2341,6 +2784,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2341
2784
  _: 3
2342
2785
  }))
2343
2786
  ]),
2787
+ after: withCtx(() => [
2788
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
2789
+ var _a;
2790
+ return [
2791
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.dropdownCustomPosition) === "true" ? (openBlock(), createBlock(_sfc_main$1, {
2792
+ key: 0,
2793
+ label: "Close",
2794
+ modifiers: "secondary",
2795
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
2796
+ })) : createCommentVNode("", true)
2797
+ ];
2798
+ })
2799
+ ]),
2344
2800
  _: 2
2345
2801
  }, [
2346
2802
  unref(searchable) || _ctx.$slots["dropdown::before"] ? {
@@ -2366,13 +2822,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2366
2822
  ]) : createCommentVNode("", true)
2367
2823
  ]),
2368
2824
  key: "0"
2369
- } : void 0,
2370
- _ctx.$slots["dropdown::after"] ? {
2371
- name: "after",
2372
- fn: withCtx(() => [
2373
- renderSlot(_ctx.$slots, "dropdown::after")
2374
- ]),
2375
- key: "1"
2376
2825
  } : void 0
2377
2826
  ]), 1040, ["modelValue", "role"])
2378
2827
  ], 512),
@@ -2409,8 +2858,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2409
2858
  key: "3"
2410
2859
  } : void 0
2411
2860
  ]), 1032, ["id"])
2412
- ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$2, mergeProps({ key: 1 }, unref(selectProps), {
2413
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => emit("update:modelValue", $event))
2861
+ ], 10, _hoisted_1)) : (openBlock(), createBlock(_sfc_main$4, mergeProps({ key: 1 }, unref(selectProps), {
2862
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
2414
2863
  }), null, 16));
2415
2864
  };
2416
2865
  }