@volverjs/ui-vue 0.0.9-beta.2 → 0.0.9-beta.21

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 (146) hide show
  1. package/README.md +3 -3
  2. package/auto-imports.d.ts +2 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +15 -7
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +15 -7
  5. package/dist/components/VvAction/VvAction.es.js +17 -8
  6. package/dist/components/VvAction/VvAction.umd.js +1 -1
  7. package/dist/components/VvAction/VvAction.vue.d.ts +9 -0
  8. package/dist/components/VvAction/index.d.ts +4 -0
  9. package/dist/components/VvAlert/VvAlert.es.js +22 -13
  10. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  11. package/dist/components/VvAlert/VvAlert.vue.d.ts +6 -6
  12. package/dist/components/VvAlert/index.d.ts +3 -3
  13. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +22 -13
  14. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  15. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +6 -6
  16. package/dist/components/VvAlertGroup/index.d.ts +2 -2
  17. package/dist/components/VvAvatar/VvAvatar.es.js +15 -7
  18. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +15 -7
  19. package/dist/components/VvBadge/VvBadge.es.js +15 -7
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +15 -7
  21. package/dist/components/VvButton/VvButton.es.js +19 -9
  22. package/dist/components/VvButton/VvButton.umd.js +1 -1
  23. package/dist/components/VvButton/VvButton.vue.d.ts +9 -0
  24. package/dist/components/VvButton/index.d.ts +4 -0
  25. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +15 -7
  26. package/dist/components/VvCard/VvCard.es.js +15 -7
  27. package/dist/components/VvCheckbox/VvCheckbox.es.js +99 -21
  28. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  29. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +105 -22
  31. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  32. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +4 -4
  33. package/dist/components/VvCombobox/VvCombobox.es.js +256 -191
  34. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  35. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +329 -101
  36. package/dist/components/VvCombobox/index.d.ts +123 -37
  37. package/dist/components/VvDialog/VvDialog.es.js +50 -37
  38. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  39. package/dist/components/VvDropdown/VvDropdown.es.js +32 -18
  40. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  41. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +300 -92
  42. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +9 -0
  43. package/dist/components/VvDropdown/index.d.ts +99 -30
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -8
  45. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  46. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +15 -7
  47. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +15 -7
  48. package/dist/components/VvInputText/VvInputText.es.js +279 -116
  49. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  50. package/dist/components/VvInputText/VvInputText.vue.d.ts +23 -41
  51. package/dist/components/VvInputText/index.d.ts +15 -33
  52. package/dist/components/VvNav/VvNav.es.js +18 -9
  53. package/dist/components/VvNav/VvNav.umd.js +1 -1
  54. package/dist/components/VvNav/index.d.ts +1 -1
  55. package/dist/components/VvProgress/VvProgress.es.js +15 -7
  56. package/dist/components/VvRadio/VvRadio.es.js +99 -21
  57. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  58. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  59. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +105 -22
  60. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  61. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +4 -4
  62. package/dist/components/VvSelect/VvSelect.es.js +95 -21
  63. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  64. package/dist/components/VvSelect/VvSelect.vue.d.ts +5 -5
  65. package/dist/components/VvTab/VvTab.es.js +18 -9
  66. package/dist/components/VvTab/VvTab.umd.js +1 -1
  67. package/dist/components/VvTextarea/VvTextarea.es.js +103 -26
  68. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  69. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
  70. package/dist/components/VvTooltip/VvTooltip.es.js +15 -7
  71. package/dist/components/common/HintSlot.d.ts +4 -3
  72. package/dist/components/index.d.ts +5 -0
  73. package/dist/components/index.es.js +1212 -626
  74. package/dist/components/index.umd.js +1 -1
  75. package/dist/composables/alert/useAlert.d.ts +27 -0
  76. package/dist/composables/index.d.ts +1 -0
  77. package/dist/composables/index.es.js +81 -0
  78. package/dist/composables/index.umd.js +1 -0
  79. package/dist/constants.d.ts +14 -0
  80. package/dist/directives/index.es.js +15 -7
  81. package/dist/directives/v-tooltip.es.js +15 -7
  82. package/dist/icons.es.js +3 -3
  83. package/dist/icons.umd.js +1 -1
  84. package/dist/props/index.d.ts +107 -31
  85. package/dist/resolvers/unplugin.es.js +3 -0
  86. package/dist/resolvers/unplugin.umd.js +1 -1
  87. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -2
  88. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +54 -269
  89. package/dist/stories/Alert/Alert.settings.d.ts +3 -7
  90. package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +2 -2
  91. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +6 -0
  92. package/dist/stories/Button/Button.settings.d.ts +3 -13
  93. package/dist/stories/Combobox/Combobox.settings.d.ts +117 -19
  94. package/dist/stories/InputText/InputText.settings.d.ts +31 -9
  95. package/dist/stories/InputText/InputText.stories.d.ts +0 -1
  96. package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
  97. package/dist/stories/Nav/Nav.settings.d.ts +3 -21
  98. package/package.json +75 -66
  99. package/src/assets/icons/detailed.json +1 -1
  100. package/src/assets/icons/normal.json +1 -1
  101. package/src/assets/icons/simple.json +1 -1
  102. package/src/components/VvAction/VvAction.vue +2 -1
  103. package/src/components/VvAlert/VvAlert.vue +5 -1
  104. package/src/components/VvAlert/index.ts +3 -3
  105. package/src/components/VvAlertGroup/VvAlertGroup.vue +2 -0
  106. package/src/components/VvButton/VvButton.vue +1 -0
  107. package/src/components/VvCheckbox/VvCheckbox.vue +8 -1
  108. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +8 -1
  109. package/src/components/VvCombobox/VvCombobox.vue +43 -23
  110. package/src/components/VvCombobox/index.ts +24 -0
  111. package/src/components/VvDialog/VvDialog.vue +22 -19
  112. package/src/components/VvDropdown/VvDropdown.vue +24 -18
  113. package/src/components/VvInputText/VvInputText.vue +177 -55
  114. package/src/components/VvInputText/index.ts +32 -34
  115. package/src/components/VvNav/VvNav.vue +1 -1
  116. package/src/components/VvNav/index.ts +1 -1
  117. package/src/components/VvRadio/VvRadio.vue +8 -1
  118. package/src/components/VvRadioGroup/VvRadioGroup.vue +8 -1
  119. package/src/components/VvSelect/VvSelect.vue +8 -1
  120. package/src/components/VvTextarea/VvTextarea.vue +16 -6
  121. package/src/components/common/HintSlot.ts +26 -13
  122. package/src/components/index.ts +5 -0
  123. package/src/composables/alert/useAlert.ts +103 -0
  124. package/src/composables/index.ts +1 -0
  125. package/src/constants.ts +26 -0
  126. package/src/props/index.ts +14 -11
  127. package/src/resolvers/unplugin.ts +3 -0
  128. package/src/stories/Alert/Alert.settings.ts +3 -1
  129. package/src/stories/AlertGroup/AlertGroup.test.ts +13 -0
  130. package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +3 -3
  131. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +118 -0
  132. package/src/stories/Button/Button.settings.ts +5 -3
  133. package/src/stories/Combobox/Combobox.settings.ts +119 -2
  134. package/src/stories/Combobox/Combobox.test.ts +1 -1
  135. package/src/stories/InputText/InputText.settings.ts +36 -15
  136. package/src/stories/InputText/InputText.stories.ts +4 -12
  137. package/src/stories/InputText/InputText.test.ts +31 -15
  138. package/src/stories/InputText/InputTextMask.stories.ts +122 -0
  139. package/src/stories/Nav/Nav.settings.ts +3 -1
  140. package/src/stories/Tab/Tab.stories.ts +3 -3
  141. package/src/stories/Textarea/TextareaLength.stories.ts +1 -1
  142. package/src/types/alert.d.ts +20 -0
  143. /package/dist/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue.d.ts +0 -0
  144. /package/dist/components/{VvNavSeparator → VvNav}/VvNavSeparator.d.ts +0 -0
  145. /package/src/components/{VvNavItemTitle → VvNav}/VvNavItemTitle.vue +0 -0
  146. /package/src/components/{VvNavSeparator → VvNav}/VvNavSeparator.ts +0 -0
@@ -1,11 +1,16 @@
1
- import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createVNode, createSlots, nextTick, Transition, toHandlers, normalizeStyle, vShow, vModelSelect, vModelText, vModelDynamic, vModelRadio } from "vue";
1
+ import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createVNode, createSlots, nextTick, Transition, toHandlers, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
2
2
  import { nanoid } from "nanoid";
3
- import { useToggle, useStorage, useVModel, useMutationObserver, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced } from "@vueuse/core";
3
+ import { useToggle, useStorage, useVModel, useMutationObserver, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
4
4
  import { iconExists, Icon, addIcon } from "@iconify/vue";
5
5
  import { get } from "ts-dot-prop";
6
6
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
7
7
  import mitt from "mitt";
8
- import { Mask } from "maska";
8
+ import { useIMask } from "vue-imask";
9
+ var Strategy = /* @__PURE__ */ ((Strategy2) => {
10
+ Strategy2["absolute"] = "absolute";
11
+ Strategy2["fixed"] = "fixed";
12
+ return Strategy2;
13
+ })(Strategy || {});
9
14
  var Side = /* @__PURE__ */ ((Side2) => {
10
15
  Side2["left"] = "left";
11
16
  Side2["right"] = "right";
@@ -79,6 +84,9 @@ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for(
79
84
  const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for(
80
85
  "dropdownAction"
81
86
  );
87
+ const INJECTION_KEY_ALERT_GROUP = Symbol.for(
88
+ "alertGroup"
89
+ );
82
90
  const LinkProps = {
83
91
  /**
84
92
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
@@ -269,19 +277,15 @@ const DropdownProps = {
269
277
  placement: {
270
278
  type: String,
271
279
  default: Side.bottom,
272
- validator: (value) => {
273
- return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
274
- }
280
+ validator: (value) => Object.values(Side).includes(value) || Object.values(Placement).includes(value)
275
281
  },
276
282
  /**
277
283
  * Dropdown strategy
278
284
  */
279
285
  strategy: {
280
286
  type: String,
281
- default: "absolute",
282
- validator: (value) => {
283
- return ["fixed", "absolute"].includes(value);
284
- }
287
+ default: void 0,
288
+ validator: (value) => Object.values(Strategy).includes(value)
285
289
  },
286
290
  /**
287
291
  * Dropdown show / hide transition name
@@ -484,6 +488,13 @@ const ActionProps = {
484
488
  type: String,
485
489
  default: ButtonType.button,
486
490
  validator: (value) => Object.values(ButtonType).includes(value)
491
+ },
492
+ /**
493
+ * Button aria-label
494
+ */
495
+ ariaLabel: {
496
+ type: String,
497
+ default: void 0
487
498
  }
488
499
  };
489
500
  function equals(obj1, obj2, field) {
@@ -723,14 +734,14 @@ function useModifiers(prefix, modifiers, others) {
723
734
  return toReturn;
724
735
  });
725
736
  }
726
- const _hoisted_1$f = ["id", "open"];
727
- const _hoisted_2$c = ["aria-controls", "aria-expanded"];
728
- const _hoisted_3$6 = ["aria-hidden"];
729
- const __default__$m = {
737
+ const _hoisted_1$i = ["id", "open"];
738
+ const _hoisted_2$d = ["aria-controls", "aria-expanded"];
739
+ const _hoisted_3$7 = ["aria-hidden"];
740
+ const __default__$n = {
730
741
  name: "VvAccordion"
731
742
  };
732
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
733
- ...__default__$m,
743
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
744
+ ...__default__$n,
734
745
  props: VvAccordionProps,
735
746
  emits: VvAccordionEvents,
736
747
  setup(__props, { emit }) {
@@ -812,7 +823,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
812
823
  renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
813
824
  createTextVNode(toDisplayString(unref(title)), 1)
814
825
  ])
815
- ], 8, _hoisted_2$c),
826
+ ], 8, _hoisted_2$d),
816
827
  createElementVNode("div", {
817
828
  "aria-hidden": !unref(isOpen),
818
829
  class: "vv-accordion__content"
@@ -820,8 +831,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
820
831
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
821
832
  createTextVNode(toDisplayString(unref(content)), 1)
822
833
  ])
823
- ], 8, _hoisted_3$6)
824
- ], 10, _hoisted_1$f);
834
+ ], 8, _hoisted_3$7)
835
+ ], 10, _hoisted_1$i);
825
836
  };
826
837
  }
827
838
  });
@@ -874,11 +885,11 @@ function useProvideGroupState(groupState) {
874
885
  computed(() => groupState)
875
886
  );
876
887
  }
877
- const __default__$l = {
888
+ const __default__$m = {
878
889
  name: "VvAccordionGroup"
879
890
  };
880
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
881
- ...__default__$l,
891
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
892
+ ...__default__$m,
882
893
  props: VvAccordionGroupProps,
883
894
  emits: VvAccordionGroupEvents,
884
895
  setup(__props, { emit }) {
@@ -945,7 +956,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
945
956
  }, [
946
957
  renderSlot(_ctx.$slots, "default", {}, () => [
947
958
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
948
- return openBlock(), createBlock(_sfc_main$m, mergeProps({
959
+ return openBlock(), createBlock(_sfc_main$q, mergeProps({
949
960
  key: item.title
950
961
  }, {
951
962
  name: item.name,
@@ -966,88 +977,128 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
966
977
  };
967
978
  }
968
979
  });
969
- const VvBadgeProps = {
970
- ...ModifiersProps,
971
- value: [String, Number]
972
- };
973
- const __default__$k = {
974
- name: "VvBadge"
980
+ const VvActionEvents = ["click", "mouseover", "mouseleave"];
981
+ const VvActionProps = ActionProps;
982
+ function useVolver() {
983
+ return inject(INJECTION_KEY_VOLVER);
984
+ }
985
+ function useInjectedDropdownTrigger() {
986
+ return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
987
+ }
988
+ function useInjectedDropdownItem() {
989
+ return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
990
+ }
991
+ function useInjectedDropdownAction() {
992
+ return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
993
+ }
994
+ const __default__$l = {
995
+ name: "VvAction"
975
996
  };
976
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
977
- ...__default__$k,
978
- props: VvBadgeProps,
979
- setup(__props) {
997
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
998
+ ...__default__$l,
999
+ props: VvActionProps,
1000
+ emits: VvActionEvents,
1001
+ setup(__props, { expose: __expose, emit }) {
980
1002
  const props = __props;
981
- const { modifiers } = toRefs(props);
982
- const bemCssClasses = useModifiers("vv-badge", modifiers);
983
- return (_ctx, _cache) => {
984
- return openBlock(), createElementBlock("span", {
985
- class: normalizeClass(unref(bemCssClasses)),
986
- role: "status"
987
- }, [
988
- renderSlot(_ctx.$slots, "default", {}, () => [
989
- createTextVNode(toDisplayString(_ctx.value), 1)
990
- ])
991
- ], 2);
1003
+ const volver = useVolver();
1004
+ const element = ref(null);
1005
+ __expose({ $el: element });
1006
+ const {
1007
+ reference: dropdownTriggerReference,
1008
+ bus: dropdownEventBus,
1009
+ aria: dropdownAria,
1010
+ expanded: dropdownExpanded
1011
+ } = useInjectedDropdownTrigger();
1012
+ watch(
1013
+ () => element.value,
1014
+ (newValue) => {
1015
+ if (dropdownTriggerReference) {
1016
+ dropdownTriggerReference.value = newValue;
1017
+ }
1018
+ }
1019
+ );
1020
+ const pressed = computed(() => {
1021
+ return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
1022
+ });
1023
+ const { role } = useInjectedDropdownAction();
1024
+ const hasTag = computed(() => {
1025
+ switch (true) {
1026
+ case props.disabled:
1027
+ return ActionTag.button;
1028
+ case props.to !== void 0:
1029
+ return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
1030
+ case props.href !== void 0:
1031
+ return ActionTag.a;
1032
+ default:
1033
+ return ActionTag.button;
1034
+ }
1035
+ });
1036
+ const hasProps = computed(() => {
1037
+ const toReturn = {
1038
+ ...dropdownAria == null ? void 0 : dropdownAria.value,
1039
+ ariaPressed: pressed.value ? true : void 0,
1040
+ ariaLabel: props.ariaLabel,
1041
+ role: role == null ? void 0 : role.value
1042
+ };
1043
+ switch (hasTag.value) {
1044
+ case ActionTag.a:
1045
+ return {
1046
+ ...toReturn,
1047
+ href: props.href,
1048
+ target: props.target,
1049
+ rel: props.rel
1050
+ };
1051
+ case ActionTag.routerLink:
1052
+ case ActionTag.nuxtLink:
1053
+ return {
1054
+ ...toReturn,
1055
+ to: props.to,
1056
+ target: props.target
1057
+ };
1058
+ default:
1059
+ return {
1060
+ ...toReturn,
1061
+ type: props.type,
1062
+ disabled: props.disabled
1063
+ };
1064
+ }
1065
+ });
1066
+ const onClick = (e) => {
1067
+ if (props.disabled) {
1068
+ e.preventDefault();
1069
+ return;
1070
+ }
1071
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
1072
+ emit("click", e);
1073
+ };
1074
+ const onMouseover = (e) => {
1075
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
1076
+ emit("mouseover", e);
1077
+ };
1078
+ const onMouseleave = (e) => {
1079
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
1080
+ emit("mouseleave", e);
992
1081
  };
993
- }
994
- });
995
- const VvBreadcrumbProps = {
996
- ...ModifiersProps,
997
- routes: Array
998
- };
999
- const _hoisted_1$e = { class: "vv-breadcrumb__list" };
1000
- const _hoisted_2$b = ["content"];
1001
- const __default__$j = {
1002
- name: "VvBreadcrumb"
1003
- };
1004
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1005
- ...__default__$j,
1006
- props: VvBreadcrumbProps,
1007
- setup(__props) {
1008
- const props = __props;
1009
- const { modifiers } = toRefs(props);
1010
- const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
1011
1082
  return (_ctx, _cache) => {
1012
- return openBlock(), createElementBlock("nav", {
1013
- class: normalizeClass(unref(bemCssClasses)),
1014
- "aria-label": "breadcrumbs"
1015
- }, [
1016
- createElementVNode("ol", _hoisted_1$e, [
1017
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
1018
- var _a, _b, _c, _d;
1019
- return openBlock(), createElementBlock("li", {
1020
- key: `${route.label}-${index}`,
1021
- class: normalizeClass({
1022
- "vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
1023
- "vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
1024
- }),
1025
- itemprop: "itemListElement",
1026
- itemtype: "https://schema.org/ListItem",
1027
- itemscope: ""
1028
- }, [
1029
- (openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
1030
- class: {
1031
- "vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
1032
- },
1033
- "aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
1034
- itemprop: "item"
1035
- }), {
1036
- default: withCtx(() => [
1037
- renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
1038
- createTextVNode(toDisplayString(route.label), 1)
1039
- ])
1040
- ]),
1041
- _: 2
1042
- }, 1040, ["class", "aria-current"])),
1043
- createElementVNode("meta", {
1044
- itemprop: "position",
1045
- content: `${index + 1}`
1046
- }, null, 8, _hoisted_2$b)
1047
- ], 2);
1048
- }), 128))
1049
- ])
1050
- ], 2);
1083
+ return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
1084
+ ref_key: "element",
1085
+ ref: element,
1086
+ class: {
1087
+ active: _ctx.active,
1088
+ pressed: unref(pressed),
1089
+ disabled: _ctx.disabled
1090
+ },
1091
+ onClickPassive: onClick,
1092
+ onMouseoverPassive: onMouseover,
1093
+ onMouseleavePassive: onMouseleave
1094
+ }), {
1095
+ default: withCtx(() => [
1096
+ renderSlot(_ctx.$slots, "default", {}, () => [
1097
+ createTextVNode(toDisplayString(_ctx.label), 1)
1098
+ ])
1099
+ ]),
1100
+ _: 3
1101
+ }, 16, ["class"]);
1051
1102
  };
1052
1103
  }
1053
1104
  });
@@ -1145,14 +1196,11 @@ const VvIconProps = {
1145
1196
  type: [String, Array]
1146
1197
  }
1147
1198
  };
1148
- function useVolver() {
1149
- return inject(INJECTION_KEY_VOLVER);
1150
- }
1151
- const __default__$i = {
1199
+ const __default__$k = {
1152
1200
  name: "VvIcon"
1153
1201
  };
1154
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1155
- ...__default__$i,
1202
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1203
+ ...__default__$k,
1156
1204
  props: VvIconProps,
1157
1205
  setup(__props) {
1158
1206
  const props = __props;
@@ -1244,124 +1292,307 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1244
1292
  };
1245
1293
  }
1246
1294
  });
1247
- const VvActionEvents = ["click", "mouseover", "mouseleave"];
1248
- const VvActionProps = ActionProps;
1249
- function useInjectedDropdownTrigger() {
1250
- return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
1251
- }
1252
- function useInjectedDropdownItem() {
1253
- return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
1254
- }
1255
- function useInjectedDropdownAction() {
1256
- return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
1295
+ function useInjectedAlertGroup() {
1296
+ return inject(INJECTION_KEY_ALERT_GROUP, {});
1257
1297
  }
1258
- const __default__$h = {
1259
- name: "VvAction"
1298
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
1299
+ const VvAlertProps = {
1300
+ ...IdProps,
1301
+ ...ModifiersProps,
1302
+ ...IconProps,
1303
+ /**
1304
+ * The alert is dismissable
1305
+ * @default false
1306
+ * @type boolean
1307
+ */
1308
+ dismissable: {
1309
+ type: Boolean,
1310
+ default: false
1311
+ },
1312
+ /**
1313
+ * The alert auto close after the specified time in milliseconds
1314
+ * @default 0
1315
+ * @type number
1316
+ */
1317
+ autoClose: {
1318
+ type: Number,
1319
+ default: 0
1320
+ },
1321
+ /**
1322
+ * The alert close label
1323
+ * @default 'Close'
1324
+ * @type string
1325
+ */
1326
+ closeLabel: {
1327
+ type: String,
1328
+ default: "Close"
1329
+ },
1330
+ /**
1331
+ * The alert title
1332
+ * @default ''
1333
+ * @type string
1334
+ */
1335
+ title: {
1336
+ type: String,
1337
+ default: void 0
1338
+ },
1339
+ /**
1340
+ * The alert content
1341
+ * @default ''
1342
+ * @type string
1343
+ */
1344
+ content: {
1345
+ type: String,
1346
+ default: void 0
1347
+ },
1348
+ /**
1349
+ * The alert footer
1350
+ * @default ''
1351
+ * @type string
1352
+ */
1353
+ footer: {
1354
+ type: String,
1355
+ default: void 0
1356
+ },
1357
+ /**
1358
+ * The alert role
1359
+ * @default 'alert'
1360
+ * @type string
1361
+ * @values 'alert', 'alertdialog'
1362
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alert_Role
1363
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alertdialog_role
1364
+ */
1365
+ role: {
1366
+ type: String,
1367
+ default: "alert"
1368
+ }
1260
1369
  };
1261
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1262
- ...__default__$h,
1263
- props: VvActionProps,
1264
- emits: VvActionEvents,
1265
- setup(__props, { expose: __expose, emit }) {
1266
- const props = __props;
1267
- const volver = useVolver();
1268
- const element = ref(null);
1269
- __expose({ $el: element });
1270
- const {
1271
- reference: dropdownTriggerReference,
1272
- bus: dropdownEventBus,
1273
- aria: dropdownAria,
1274
- expanded: dropdownExpanded
1275
- } = useInjectedDropdownTrigger();
1276
- watch(
1277
- () => element.value,
1278
- (newValue) => {
1279
- if (dropdownTriggerReference) {
1280
- dropdownTriggerReference.value = newValue;
1281
- }
1282
- }
1283
- );
1284
- const pressed = computed(() => {
1285
- return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
1286
- });
1287
- const { role } = useInjectedDropdownAction();
1288
- const hasTag = computed(() => {
1289
- switch (true) {
1290
- case props.disabled:
1291
- return ActionTag.button;
1292
- case props.to !== void 0:
1293
- return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
1294
- case props.href !== void 0:
1295
- return ActionTag.a;
1296
- default:
1297
- return ActionTag.button;
1298
- }
1299
- });
1300
- const hasProps = computed(() => {
1301
- const toReturn = {
1302
- ...dropdownAria == null ? void 0 : dropdownAria.value,
1303
- "aria-pressed": pressed.value ? true : void 0,
1304
- role: role == null ? void 0 : role.value
1305
- };
1306
- switch (hasTag.value) {
1307
- case ActionTag.a:
1308
- return {
1309
- ...toReturn,
1310
- href: props.href,
1311
- target: props.target,
1312
- rel: props.rel
1313
- };
1314
- case ActionTag.routerLink:
1315
- case ActionTag.nuxtLink:
1316
- return {
1317
- ...toReturn,
1318
- to: props.to,
1319
- target: props.target
1320
- };
1321
- default:
1322
- return {
1323
- ...toReturn,
1324
- type: props.type,
1325
- disabled: props.disabled
1326
- };
1327
- }
1328
- });
1329
- const onClick = (e) => {
1330
- if (props.disabled) {
1331
- e.preventDefault();
1370
+ const VvAlertEvents = ["close"];
1371
+ const useVvAlert = (props, emit) => {
1372
+ const { bus } = useInjectedAlertGroup();
1373
+ const hasId = useUniqueId(computed(() => props.id));
1374
+ const hasTitleId = computed(() => `${hasId.value}-title`);
1375
+ const hasIcon = computed(
1376
+ () => typeof props.icon === "string" ? { name: props.icon } : props.icon
1377
+ );
1378
+ const hasClass = useModifiers(
1379
+ "vv-alert",
1380
+ computed(() => props.modifiers),
1381
+ computed(() => ({
1382
+ dismissable: props.autoClose > 0 || props.dismissable,
1383
+ "auto-close": props.autoClose > 0,
1384
+ hover: isMouseover.value
1385
+ }))
1386
+ );
1387
+ const hasStyle = computed(() => ({
1388
+ "--alert-duration": `${props.autoClose}ms`
1389
+ }));
1390
+ const close = () => {
1391
+ if (timeout) {
1392
+ clearTimeout(timeout);
1393
+ }
1394
+ emit("close", hasId.value);
1395
+ bus == null ? void 0 : bus.emit("close", hasId.value);
1396
+ };
1397
+ let timeout;
1398
+ watch(
1399
+ () => props.autoClose,
1400
+ (value) => {
1401
+ if (value > 0) {
1402
+ timeout = setTimeout(close, value);
1332
1403
  return;
1333
1404
  }
1334
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
1335
- emit("click", e);
1336
- };
1337
- const onMouseover = (e) => {
1338
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
1339
- emit("mouseover", e);
1340
- };
1341
- const onMouseleave = (e) => {
1342
- dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
1343
- emit("mouseleave", e);
1344
- };
1405
+ if (timeout) {
1406
+ clearTimeout(timeout);
1407
+ }
1408
+ },
1409
+ {
1410
+ immediate: true
1411
+ }
1412
+ );
1413
+ const isMouseover = ref(false);
1414
+ const onMouseover = withModifiers(() => {
1415
+ isMouseover.value = true;
1416
+ if (timeout) {
1417
+ clearTimeout(timeout);
1418
+ }
1419
+ }, ["passive"]);
1420
+ const onMouseleave = withModifiers(() => {
1421
+ isMouseover.value = false;
1422
+ if (props.autoClose > 0) {
1423
+ timeout = setTimeout(close, props.autoClose);
1424
+ }
1425
+ }, ["passive"]);
1426
+ return {
1427
+ close,
1428
+ hasIcon,
1429
+ hasTitleId,
1430
+ hasProps: computed(() => ({
1431
+ onMouseover,
1432
+ onMouseleave,
1433
+ class: hasClass.value,
1434
+ style: hasStyle.value,
1435
+ role: props.role,
1436
+ "aria-labelledby": hasTitleId.value
1437
+ }))
1438
+ };
1439
+ };
1440
+ const _hoisted_1$h = {
1441
+ key: 0,
1442
+ class: "vv-alert__header"
1443
+ };
1444
+ const _hoisted_2$c = ["id"];
1445
+ const _hoisted_3$6 = ["aria-label"];
1446
+ const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "vv-alert__close-mask" }, null, -1);
1447
+ const _hoisted_5$4 = [
1448
+ _hoisted_4$5
1449
+ ];
1450
+ const _hoisted_6$4 = {
1451
+ key: 1,
1452
+ class: "vv-alert__content"
1453
+ };
1454
+ const _hoisted_7$4 = {
1455
+ key: 2,
1456
+ class: "vv-alert__footer"
1457
+ };
1458
+ const __default__$j = {
1459
+ name: "VvAlert"
1460
+ };
1461
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1462
+ ...__default__$j,
1463
+ props: VvAlertProps,
1464
+ emits: VvAlertEvents,
1465
+ setup(__props, { expose: __expose, emit }) {
1466
+ const props = __props;
1467
+ const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
1468
+ __expose({ close });
1345
1469
  return (_ctx, _cache) => {
1346
- return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
1347
- ref_key: "element",
1348
- ref: element,
1349
- class: {
1350
- active: _ctx.active,
1351
- pressed: unref(pressed),
1352
- disabled: _ctx.disabled
1353
- },
1354
- onClickPassive: onClick,
1355
- onMouseoverPassive: onMouseover,
1356
- onMouseleavePassive: onMouseleave
1357
- }), {
1358
- default: withCtx(() => [
1470
+ return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(hasProps))), [
1471
+ _ctx.$slots.header || _ctx.$slots.title || _ctx.$slots.close || _ctx.$slots["title::before"] || _ctx.$slots["title::after"] || _ctx.title || _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
1472
+ unref(hasIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }), null, 16)) : createCommentVNode("", true),
1473
+ renderSlot(_ctx.$slots, "header", {}, () => [
1474
+ renderSlot(_ctx.$slots, "title::before"),
1475
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
1476
+ key: 0,
1477
+ id: unref(hasTitleId),
1478
+ class: "vv-alert__title"
1479
+ }, [
1480
+ renderSlot(_ctx.$slots, "title", {}, () => [
1481
+ createTextVNode(toDisplayString(_ctx.title), 1)
1482
+ ])
1483
+ ], 8, _hoisted_2$c)) : createCommentVNode("", true),
1484
+ renderSlot(_ctx.$slots, "title::after")
1485
+ ]),
1486
+ renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
1487
+ _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
1488
+ key: 0,
1489
+ class: "vv-alert__close",
1490
+ type: "button",
1491
+ "aria-label": _ctx.closeLabel,
1492
+ onClick: _cache[0] || (_cache[0] = withModifiers(
1493
+ //@ts-ignore
1494
+ (...args) => unref(close) && unref(close)(...args),
1495
+ ["stop"]
1496
+ ))
1497
+ }, _hoisted_5$4, 8, _hoisted_3$6)) : createCommentVNode("", true)
1498
+ ])
1499
+ ])) : createCommentVNode("", true),
1500
+ _ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
1359
1501
  renderSlot(_ctx.$slots, "default", {}, () => [
1360
- createTextVNode(toDisplayString(_ctx.label), 1)
1502
+ createTextVNode(toDisplayString(_ctx.content), 1)
1361
1503
  ])
1362
- ]),
1363
- _: 3
1364
- }, 16, ["class"]);
1504
+ ])) : createCommentVNode("", true),
1505
+ _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
1506
+ renderSlot(_ctx.$slots, "footer", {}, () => [
1507
+ createTextVNode(toDisplayString(_ctx.footer), 1)
1508
+ ])
1509
+ ])) : createCommentVNode("", true)
1510
+ ], 16);
1511
+ };
1512
+ }
1513
+ });
1514
+ const VvBadgeProps = {
1515
+ ...ModifiersProps,
1516
+ value: [String, Number]
1517
+ };
1518
+ const __default__$i = {
1519
+ name: "VvBadge"
1520
+ };
1521
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1522
+ ...__default__$i,
1523
+ props: VvBadgeProps,
1524
+ setup(__props) {
1525
+ const props = __props;
1526
+ const { modifiers } = toRefs(props);
1527
+ const bemCssClasses = useModifiers("vv-badge", modifiers);
1528
+ return (_ctx, _cache) => {
1529
+ return openBlock(), createElementBlock("span", {
1530
+ class: normalizeClass(unref(bemCssClasses)),
1531
+ role: "status"
1532
+ }, [
1533
+ renderSlot(_ctx.$slots, "default", {}, () => [
1534
+ createTextVNode(toDisplayString(_ctx.value), 1)
1535
+ ])
1536
+ ], 2);
1537
+ };
1538
+ }
1539
+ });
1540
+ const VvBreadcrumbProps = {
1541
+ ...ModifiersProps,
1542
+ routes: Array
1543
+ };
1544
+ const _hoisted_1$g = { class: "vv-breadcrumb__list" };
1545
+ const _hoisted_2$b = ["content"];
1546
+ const __default__$h = {
1547
+ name: "VvBreadcrumb"
1548
+ };
1549
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1550
+ ...__default__$h,
1551
+ props: VvBreadcrumbProps,
1552
+ setup(__props) {
1553
+ const props = __props;
1554
+ const { modifiers } = toRefs(props);
1555
+ const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
1556
+ return (_ctx, _cache) => {
1557
+ return openBlock(), createElementBlock("nav", {
1558
+ class: normalizeClass(unref(bemCssClasses)),
1559
+ "aria-label": "breadcrumbs"
1560
+ }, [
1561
+ createElementVNode("ol", _hoisted_1$g, [
1562
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
1563
+ var _a, _b, _c, _d;
1564
+ return openBlock(), createElementBlock("li", {
1565
+ key: `${route.label}-${index}`,
1566
+ class: normalizeClass({
1567
+ "vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
1568
+ "vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
1569
+ }),
1570
+ itemprop: "itemListElement",
1571
+ itemtype: "https://schema.org/ListItem",
1572
+ itemscope: ""
1573
+ }, [
1574
+ (openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
1575
+ class: {
1576
+ "vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
1577
+ },
1578
+ "aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
1579
+ itemprop: "item"
1580
+ }), {
1581
+ default: withCtx(() => [
1582
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
1583
+ createTextVNode(toDisplayString(route.label), 1)
1584
+ ])
1585
+ ]),
1586
+ _: 2
1587
+ }, 1040, ["class", "aria-current"])),
1588
+ createElementVNode("meta", {
1589
+ itemprop: "position",
1590
+ content: `${index + 1}`
1591
+ }, null, 8, _hoisted_2$b)
1592
+ ], 2);
1593
+ }), 128))
1594
+ ])
1595
+ ], 2);
1365
1596
  };
1366
1597
  }
1367
1598
  });
@@ -1469,8 +1700,7 @@ function useGroupProps$2(props, emit) {
1469
1700
  label
1470
1701
  };
1471
1702
  }
1472
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
1473
- const _hoisted_1$d = {
1703
+ const _hoisted_1$f = {
1474
1704
  key: 1,
1475
1705
  class: "vv-button__label"
1476
1706
  };
@@ -1481,7 +1711,7 @@ const _hoisted_2$a = {
1481
1711
  const __default__$g = {
1482
1712
  name: "VvButton"
1483
1713
  };
1484
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1714
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1485
1715
  ...__default__$g,
1486
1716
  props: VvButtonProps,
1487
1717
  emits: VvButtonEvents,
@@ -1560,7 +1790,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1560
1790
  }
1561
1791
  };
1562
1792
  return (_ctx, _cache) => {
1563
- return openBlock(), createBlock(_sfc_main$h, mergeProps({
1793
+ return openBlock(), createBlock(_sfc_main$o, mergeProps({
1564
1794
  disabled: unref(disabled),
1565
1795
  pressed: unref(pressed),
1566
1796
  active: _ctx.active,
@@ -1568,7 +1798,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1568
1798
  to: _ctx.to,
1569
1799
  href: _ctx.href,
1570
1800
  target: _ctx.target,
1571
- rel: _ctx.rel
1801
+ rel: _ctx.rel,
1802
+ ariaLabel: _ctx.ariaLabel
1572
1803
  }, {
1573
1804
  id: unref(hasId),
1574
1805
  ref_key: "element",
@@ -1579,15 +1810,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1579
1810
  default: withCtx(() => [
1580
1811
  renderSlot(_ctx.$slots, "default", {}, () => [
1581
1812
  _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
1582
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$i, {
1813
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$n, {
1583
1814
  key: 0,
1584
1815
  class: "vv-button__loading-icon",
1585
1816
  name: _ctx.loadingIcon
1586
1817
  }, null, 8, ["name"])) : createCommentVNode("", true),
1587
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$d, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
1818
+ _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$f, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
1588
1819
  ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1589
1820
  renderSlot(_ctx.$slots, "before"),
1590
- unref(icon) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
1821
+ unref(icon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
1591
1822
  key: 0,
1592
1823
  class: "vv-button__icon"
1593
1824
  }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
@@ -1627,7 +1858,7 @@ const VvButtonGroupEvents = ["update:modelValue"];
1627
1858
  const __default__$f = {
1628
1859
  name: "VvButtonGroup"
1629
1860
  };
1630
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
1861
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1631
1862
  ...__default__$f,
1632
1863
  props: VvButtonGroupProps,
1633
1864
  emits: VvButtonGroupEvents,
@@ -1686,7 +1917,7 @@ const VvCardProps = {
1686
1917
  ...ModifiersProps,
1687
1918
  title: String
1688
1919
  };
1689
- const _hoisted_1$c = {
1920
+ const _hoisted_1$e = {
1690
1921
  key: 0,
1691
1922
  class: "vv-card__header"
1692
1923
  };
@@ -1701,7 +1932,7 @@ const _hoisted_3$5 = {
1701
1932
  const __default__$e = {
1702
1933
  name: "VvCard"
1703
1934
  };
1704
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
1935
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1705
1936
  ...__default__$e,
1706
1937
  props: VvCardProps,
1707
1938
  setup(__props) {
@@ -1712,7 +1943,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1712
1943
  return openBlock(), createElementBlock("article", {
1713
1944
  class: normalizeClass(unref(bemCssClasses))
1714
1945
  }, [
1715
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$c, [
1946
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$e, [
1716
1947
  renderSlot(_ctx.$slots, "header", {}, () => [
1717
1948
  createTextVNode(toDisplayString(_ctx.title), 1)
1718
1949
  ])
@@ -1784,19 +2015,27 @@ function joinLines(items) {
1784
2015
  }
1785
2016
  return items;
1786
2017
  }
1787
- function HintSlotFactory(props, slots) {
1788
- const invalidLabel = computed(() => joinLines(props.invalidLabel));
1789
- const validLabel = computed(() => joinLines(props.validLabel));
1790
- const loadingLabel = computed(() => props.loadingLabel);
1791
- const hintLabel = computed(() => props.hintLabel);
2018
+ function HintSlotFactory(propsOrRef, slots) {
2019
+ const props = computed(() => {
2020
+ if (isRef(propsOrRef)) {
2021
+ return propsOrRef.value;
2022
+ }
2023
+ return propsOrRef;
2024
+ });
2025
+ const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
2026
+ const validLabel = computed(() => joinLines(props.value.validLabel));
2027
+ const loadingLabel = computed(() => props.value.loadingLabel);
2028
+ const hintLabel = computed(() => props.value.hintLabel);
1792
2029
  const hasLoadingLabelOrSlot = computed(
1793
- () => Boolean(props.loading && (slots.loading || loadingLabel.value))
2030
+ () => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
1794
2031
  );
1795
2032
  const hasInvalidLabelOrSlot = computed(
1796
- () => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
2033
+ () => !hasLoadingLabelOrSlot.value && Boolean(
2034
+ props.value.invalid && (slots.invalid || invalidLabel.value)
2035
+ )
1797
2036
  );
1798
2037
  const hasValidLabelOrSlot = computed(
1799
- () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
2038
+ () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
1800
2039
  );
1801
2040
  const hasHintLabelOrSlot = computed(
1802
2041
  () => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
@@ -1805,10 +2044,10 @@ function HintSlotFactory(props, slots) {
1805
2044
  () => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
1806
2045
  );
1807
2046
  const hintSlotScope = computed(() => ({
1808
- modelValue: props.modelValue,
1809
- valid: props.valid,
1810
- invalid: props.invalid,
1811
- loading: props.loading
2047
+ modelValue: props.value.modelValue,
2048
+ valid: props.value.valid,
2049
+ invalid: props.value.invalid,
2050
+ loading: props.value.loading
1812
2051
  }));
1813
2052
  const HintSlot = defineComponent({
1814
2053
  name: "HintSlot",
@@ -1888,18 +2127,76 @@ function HintSlotFactory(props, slots) {
1888
2127
  HintSlot
1889
2128
  };
1890
2129
  }
1891
- const _hoisted_1$b = ["for"];
2130
+ function useDefaults(componentName, propsDefinition, props) {
2131
+ const volver = useVolver();
2132
+ const volverComponentDefaults = computed(() => {
2133
+ var _a;
2134
+ if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
2135
+ return void 0;
2136
+ }
2137
+ return volver.defaults.value[componentName];
2138
+ });
2139
+ return computed(() => {
2140
+ if (volverComponentDefaults.value === void 0) {
2141
+ return props;
2142
+ }
2143
+ const componentDefaults = volverComponentDefaults.value;
2144
+ const simplifiedPropsDefinition = propsDefinition;
2145
+ const simplifiedProps = props;
2146
+ return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
2147
+ const propValue = simplifiedProps[key];
2148
+ acc[key] = propValue;
2149
+ if (key in componentDefaults) {
2150
+ if (Array.isArray(simplifiedPropsDefinition[key])) {
2151
+ const typeArray = simplifiedPropsDefinition[key];
2152
+ if (typeArray.length) {
2153
+ const typeFunction = typeArray[0];
2154
+ if (typeFunction === propValue) {
2155
+ acc[key] = componentDefaults[key];
2156
+ }
2157
+ }
2158
+ }
2159
+ if (typeof simplifiedPropsDefinition[key] === "function") {
2160
+ const typeFunction = simplifiedPropsDefinition[key];
2161
+ if (typeFunction() === propValue) {
2162
+ acc[key] = componentDefaults[key];
2163
+ }
2164
+ }
2165
+ if (typeof simplifiedPropsDefinition[key] === "object") {
2166
+ let defaultValue = simplifiedPropsDefinition[key].default;
2167
+ if (typeof defaultValue === "function") {
2168
+ defaultValue = defaultValue();
2169
+ }
2170
+ if (typeof defaultValue === "object") {
2171
+ if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
2172
+ acc[key] = componentDefaults[key];
2173
+ }
2174
+ } else if (defaultValue === propValue) {
2175
+ acc[key] = componentDefaults[key];
2176
+ }
2177
+ }
2178
+ }
2179
+ return acc;
2180
+ }, {});
2181
+ });
2182
+ }
2183
+ const _hoisted_1$d = ["for"];
1892
2184
  const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
1893
2185
  const __default__$d = {
1894
2186
  name: "VvCheckbox"
1895
2187
  };
1896
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2188
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1897
2189
  ...__default__$d,
1898
2190
  props: VvCheckboxProps,
1899
2191
  emits: VvCheckboxEvents,
1900
2192
  setup(__props, { emit }) {
1901
2193
  const props = __props;
1902
2194
  const slots = useSlots();
2195
+ const propsDefaults = useDefaults(
2196
+ "VvCheckbox",
2197
+ VvCheckboxProps,
2198
+ props
2199
+ );
1903
2200
  const {
1904
2201
  id,
1905
2202
  disabled,
@@ -2012,7 +2309,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2012
2309
  hasHintLabelOrSlot,
2013
2310
  hasInvalidLabelOrSlot,
2014
2311
  hintSlotScope
2015
- } = HintSlotFactory(props, slots);
2312
+ } = HintSlotFactory(propsDefaults, slots);
2016
2313
  return (_ctx, _cache) => {
2017
2314
  return openBlock(), createElementBlock("label", {
2018
2315
  class: normalizeClass(unref(bemCssClasses)),
@@ -2071,7 +2368,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2071
2368
  key: "3"
2072
2369
  } : void 0
2073
2370
  ]), 1032, ["id"])
2074
- ], 10, _hoisted_1$b);
2371
+ ], 10, _hoisted_1$d);
2075
2372
  };
2076
2373
  }
2077
2374
  });
@@ -2109,18 +2406,23 @@ function useOptions(props) {
2109
2406
  getOptionGrouped
2110
2407
  };
2111
2408
  }
2112
- const _hoisted_1$a = ["textContent"];
2409
+ const _hoisted_1$c = ["textContent"];
2113
2410
  const _hoisted_2$7 = { class: "vv-checkbox-group__wrapper" };
2114
2411
  const __default__$c = {
2115
2412
  name: "VvCheckboxGroup"
2116
2413
  };
2117
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2414
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2118
2415
  ...__default__$c,
2119
2416
  props: VvCheckboxGroupProps,
2120
2417
  emits: VvCheckboxGroupEvents,
2121
2418
  setup(__props, { emit }) {
2122
2419
  const props = __props;
2123
2420
  const slots = useSlots();
2421
+ const propsDefaults = useDefaults(
2422
+ "VvCheckboxGroup",
2423
+ VvCheckboxGroupProps,
2424
+ props
2425
+ );
2124
2426
  const modelValue = useVModel(props, "modelValue", emit);
2125
2427
  const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
2126
2428
  useProvideGroupState({
@@ -2151,7 +2453,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2151
2453
  value: getOptionValue(option)
2152
2454
  };
2153
2455
  };
2154
- const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots);
2456
+ const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
2155
2457
  return (_ctx, _cache) => {
2156
2458
  return openBlock(), createElementBlock("fieldset", {
2157
2459
  class: normalizeClass(unref(bemCssClasses))
@@ -2159,10 +2461,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2159
2461
  _ctx.label ? (openBlock(), createElementBlock("legend", {
2160
2462
  key: 0,
2161
2463
  textContent: toDisplayString(_ctx.label)
2162
- }, null, 8, _hoisted_1$a)) : createCommentVNode("", true),
2464
+ }, null, 8, _hoisted_1$c)) : createCommentVNode("", true),
2163
2465
  createElementVNode("div", _hoisted_2$7, [
2164
2466
  _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
2165
- return openBlock(), createBlock(_sfc_main$d, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2467
+ return openBlock(), createBlock(_sfc_main$g, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2166
2468
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
2167
2469
  ]),
2168
2470
  createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
@@ -2221,6 +2523,13 @@ const VvComboboxProps = {
2221
2523
  ...UnselectableProps,
2222
2524
  ...DropdownProps,
2223
2525
  ...LabelProps,
2526
+ /**
2527
+ * Dropdown show / hide transition name
2528
+ */
2529
+ transitionName: {
2530
+ type: String,
2531
+ default: "vv-dropdown--mobile-fade-block"
2532
+ },
2224
2533
  /**
2225
2534
  * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
2226
2535
  */
@@ -2252,6 +2561,10 @@ const VvComboboxProps = {
2252
2561
  * Label for deselected option hint
2253
2562
  */
2254
2563
  deselectHintLabel: { type: String, default: "Press enter to remove" },
2564
+ /**
2565
+ * Label close button
2566
+ */
2567
+ closeLabel: { type: String, default: "Close" },
2255
2568
  /**
2256
2569
  * Select input placeholder
2257
2570
  */
@@ -2260,6 +2573,13 @@ const VvComboboxProps = {
2260
2573
  * Use input text to search on options
2261
2574
  */
2262
2575
  searchable: Boolean,
2576
+ /**
2577
+ * Search function to filter options
2578
+ */
2579
+ searchFunction: {
2580
+ type: Function,
2581
+ default: void 0
2582
+ },
2263
2583
  /**
2264
2584
  * On searchable select is the input search placeholder
2265
2585
  */
@@ -2406,12 +2726,12 @@ function useProvideDropdownAction({
2406
2726
  expanded
2407
2727
  });
2408
2728
  }
2409
- const _hoisted_1$9 = ["id", "tabindex", "role", "aria-labelledby"];
2729
+ const _hoisted_1$b = ["id", "tabindex", "role", "aria-labelledby"];
2410
2730
  const __default__$b = {
2411
2731
  name: "VvDropdown",
2412
2732
  inheritAttrs: false
2413
2733
  };
2414
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2734
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2415
2735
  ...__default__$b,
2416
2736
  props: VvDropdownProps,
2417
2737
  emits: [
@@ -2472,7 +2792,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2472
2792
  }
2473
2793
  } else if (props.flip) {
2474
2794
  if (typeof props.flip === "boolean") {
2475
- toReturn.push(flip());
2795
+ toReturn.push(flip({ fallbackStrategy: "initialPlacement" }));
2476
2796
  } else {
2477
2797
  toReturn.push(flip(props.flip));
2478
2798
  }
@@ -2524,27 +2844,33 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2524
2844
  }
2525
2845
  return toReturn;
2526
2846
  });
2527
- const { x, y, strategy, middlewareData, placement } = useFloating(
2847
+ const { x, y, middlewareData, placement, strategy } = useFloating(
2528
2848
  referenceEl,
2529
2849
  floatingEl,
2530
2850
  {
2531
- whileElementsMounted: autoUpdate,
2851
+ whileElementsMounted: (...args) => {
2852
+ return autoUpdate(...args, {
2853
+ animationFrame: props.strategy === Strategy.fixed
2854
+ });
2855
+ },
2532
2856
  placement: computed(() => props.placement),
2533
2857
  strategy: computed(() => props.strategy),
2534
2858
  middleware
2535
2859
  }
2536
2860
  );
2537
2861
  const dropdownPlacement = computed(() => {
2862
+ var _a;
2538
2863
  if (hasCustomPosition.value) {
2539
2864
  return void 0;
2540
2865
  }
2866
+ const width = props.triggerWidth && referenceEl.value ? `${(_a = referenceEl.value) == null ? void 0 : _a.offsetWidth}px` : void 0;
2541
2867
  return {
2542
2868
  position: strategy.value,
2543
2869
  top: `${y.value ?? 0}px`,
2544
2870
  left: `${x.value ?? 0}px`,
2545
- maxWidth: maxWidth.value,
2871
+ maxWidth: width ? void 0 : maxWidth.value,
2546
2872
  maxHeight: maxHeight.value,
2547
- width: props.triggerWidth && referenceEl.value ? `${referenceEl.value.offsetWidth}px` : void 0
2873
+ width
2548
2874
  };
2549
2875
  });
2550
2876
  const side = computed(
@@ -2556,10 +2882,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2556
2882
  return void 0;
2557
2883
  }
2558
2884
  const staticSide = {
2559
- top: "bottom",
2560
- right: "left",
2561
- bottom: "top",
2562
- left: "right"
2885
+ [Side.top]: Side.bottom,
2886
+ [Side.right]: Side.left,
2887
+ [Side.bottom]: Side.top,
2888
+ [Side.left]: Side.right
2563
2889
  }[side.value];
2564
2890
  return {
2565
2891
  left: ((_a = middlewareData.value.arrow) == null ? void 0 : _a.x) !== void 0 ? `${(_b = middlewareData.value.arrow) == null ? void 0 : _b.x}px` : void 0,
@@ -2615,7 +2941,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2615
2941
  onClickOutside(
2616
2942
  floatingEl,
2617
2943
  () => {
2618
- if (!props.keepOpen) {
2944
+ if (!props.keepOpen && expanded.value) {
2619
2945
  expanded.value = false;
2620
2946
  }
2621
2947
  },
@@ -2653,7 +2979,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2653
2979
  }
2654
2980
  return [
2655
2981
  ...element.querySelectorAll(
2656
- 'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
2982
+ 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
2657
2983
  )
2658
2984
  ].filter(
2659
2985
  (el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
@@ -2795,7 +3121,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2795
3121
  renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
2796
3122
  role: unref(itemRole)
2797
3123
  })))
2798
- ], 16, _hoisted_1$9),
3124
+ ], 16, _hoisted_1$b),
2799
3125
  renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
2800
3126
  ], 6), [
2801
3127
  [vShow, unref(expanded)]
@@ -2810,7 +3136,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2810
3136
  const __default__$a = {
2811
3137
  name: "VvDropdownItem"
2812
3138
  };
2813
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3139
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2814
3140
  ...__default__$a,
2815
3141
  setup(__props) {
2816
3142
  const { role, expanded } = useInjectedDropdownItem();
@@ -2835,11 +3161,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2835
3161
  };
2836
3162
  }
2837
3163
  });
2838
- const _hoisted_1$8 = ["title"];
3164
+ const _hoisted_1$a = ["title"];
2839
3165
  const __default__$9 = {
2840
3166
  name: "VvDropdownOption"
2841
3167
  };
2842
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3168
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2843
3169
  ...__default__$9,
2844
3170
  props: {
2845
3171
  ...DisabledProps,
@@ -2877,7 +3203,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2877
3203
  }
2878
3204
  });
2879
3205
  return (_ctx, _cache) => {
2880
- return openBlock(), createBlock(_sfc_main$a, {
3206
+ return openBlock(), createBlock(_sfc_main$d, {
2881
3207
  class: normalizeClass(unref(bemCssClasses)),
2882
3208
  tabindex: _ctx.disabled ? -1 : 0,
2883
3209
  "aria-selected": _ctx.selected,
@@ -2892,14 +3218,14 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2892
3218
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
2893
3219
  createTextVNode(toDisplayString(unref(hintLabel)), 1)
2894
3220
  ])
2895
- ], 8, _hoisted_1$8)
3221
+ ], 8, _hoisted_1$a)
2896
3222
  ]),
2897
3223
  _: 3
2898
3224
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
2899
3225
  };
2900
3226
  }
2901
3227
  });
2902
- const _hoisted_1$7 = {
3228
+ const _hoisted_1$9 = {
2903
3229
  class: "vv-dropdown-optgroup",
2904
3230
  role: "presentation",
2905
3231
  tabindex: "-1"
@@ -2907,7 +3233,7 @@ const _hoisted_1$7 = {
2907
3233
  const __default__$8 = {
2908
3234
  name: "VvDropdownOptgroup"
2909
3235
  };
2910
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3236
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2911
3237
  ...__default__$8,
2912
3238
  props: {
2913
3239
  ...LabelProps
@@ -2915,7 +3241,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2915
3241
  setup(__props) {
2916
3242
  const props = __props;
2917
3243
  return (_ctx, _cache) => {
2918
- return openBlock(), createElementBlock("li", _hoisted_1$7, toDisplayString(props.label), 1);
3244
+ return openBlock(), createElementBlock("li", _hoisted_1$9, toDisplayString(props.label), 1);
2919
3245
  };
2920
3246
  }
2921
3247
  });
@@ -3012,13 +3338,13 @@ function useComponentIcon(icon, iconPosition) {
3012
3338
  hasIconAfter
3013
3339
  };
3014
3340
  }
3015
- const _hoisted_1$6 = ["for"];
3341
+ const _hoisted_1$8 = ["for"];
3016
3342
  const _hoisted_2$6 = { class: "vv-select__wrapper" };
3017
3343
  const _hoisted_3$4 = {
3018
3344
  key: 0,
3019
3345
  class: "vv-select__input-before"
3020
3346
  };
3021
- const _hoisted_4$3 = { class: "vv-select__inner" };
3347
+ const _hoisted_4$4 = { class: "vv-select__inner" };
3022
3348
  const _hoisted_5$3 = ["id"];
3023
3349
  const _hoisted_6$3 = ["disabled", "hidden"];
3024
3350
  const _hoisted_7$3 = ["disabled", "value"];
@@ -3031,20 +3357,25 @@ const _hoisted_10 = {
3031
3357
  const __default__$7 = {
3032
3358
  name: "VvSelect"
3033
3359
  };
3034
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3360
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3035
3361
  ...__default__$7,
3036
3362
  props: VvSelectProps,
3037
3363
  emits: VvSelectEmits,
3038
3364
  setup(__props, { emit }) {
3039
3365
  const props = __props;
3040
3366
  const slots = useSlots();
3367
+ const propsDefaults = useDefaults(
3368
+ "VvSelect",
3369
+ VvSelectProps,
3370
+ props
3371
+ );
3041
3372
  const select = ref();
3042
3373
  const {
3043
3374
  HintSlot,
3044
3375
  hasHintLabelOrSlot,
3045
3376
  hasInvalidLabelOrSlot,
3046
3377
  hintSlotScope
3047
- } = HintSlotFactory(props, slots);
3378
+ } = HintSlotFactory(propsDefaults, slots);
3048
3379
  const {
3049
3380
  id,
3050
3381
  modifiers,
@@ -3150,13 +3481,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3150
3481
  _ctx.label ? (openBlock(), createElementBlock("label", {
3151
3482
  key: 0,
3152
3483
  for: unref(hasId)
3153
- }, toDisplayString(_ctx.label), 9, _hoisted_1$6)) : createCommentVNode("", true),
3484
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$8)) : createCommentVNode("", true),
3154
3485
  createElementVNode("div", _hoisted_2$6, [
3155
3486
  _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
3156
3487
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3157
3488
  ])) : createCommentVNode("", true),
3158
- createElementVNode("div", _hoisted_4$3, [
3159
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
3489
+ createElementVNode("div", _hoisted_4$4, [
3490
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3160
3491
  key: 0,
3161
3492
  class: "vv-select__icon"
3162
3493
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -3196,7 +3527,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3196
3527
  ], 16, _hoisted_5$3), [
3197
3528
  [vModelSelect, unref(localModelValue)]
3198
3529
  ]),
3199
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
3530
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3200
3531
  key: 1,
3201
3532
  class: "vv-select__icon vv-select__icon-after"
3202
3533
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -3242,63 +3573,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
3242
3573
  };
3243
3574
  }
3244
3575
  });
3245
- function useDefaults(componentName, propsDefinition, props) {
3246
- const volver = useVolver();
3247
- const volverComponentDefaults = computed(() => {
3248
- var _a;
3249
- if (!volver || !((_a = volver.defaults.value) == null ? void 0 : _a[componentName])) {
3250
- return void 0;
3251
- }
3252
- return volver.defaults.value[componentName];
3253
- });
3254
- return computed(() => {
3255
- if (volverComponentDefaults.value === void 0) {
3256
- return props;
3257
- }
3258
- const componentDefaults = volverComponentDefaults.value;
3259
- const simplifiedPropsDefinition = propsDefinition;
3260
- const simplifiedProps = props;
3261
- return Object.keys(simplifiedPropsDefinition).reduce((acc, key) => {
3262
- const propValue = simplifiedProps[key];
3263
- acc[key] = propValue;
3264
- if (key in componentDefaults) {
3265
- if (Array.isArray(simplifiedPropsDefinition[key])) {
3266
- const typeArray = simplifiedPropsDefinition[key];
3267
- if (typeArray.length) {
3268
- const typeFunction = typeArray[0];
3269
- if (typeFunction === propValue) {
3270
- acc[key] = componentDefaults[key];
3271
- }
3272
- }
3273
- }
3274
- if (typeof simplifiedPropsDefinition[key] === "function") {
3275
- const typeFunction = simplifiedPropsDefinition[key];
3276
- if (typeFunction() === propValue) {
3277
- acc[key] = componentDefaults[key];
3278
- }
3279
- }
3280
- if (typeof simplifiedPropsDefinition[key] === "object") {
3281
- let defaultValue = simplifiedPropsDefinition[key].default;
3282
- if (typeof defaultValue === "function") {
3283
- defaultValue = defaultValue();
3284
- }
3285
- if (typeof defaultValue === "object") {
3286
- if (JSON.stringify(defaultValue) === JSON.stringify(propValue)) {
3287
- acc[key] = componentDefaults[key];
3288
- }
3289
- } else if (defaultValue === propValue) {
3290
- acc[key] = componentDefaults[key];
3291
- }
3292
- }
3293
- }
3294
- return acc;
3295
- }, {});
3296
- });
3297
- }
3298
- const _hoisted_1$5 = ["id"];
3576
+ const _hoisted_1$7 = ["id"];
3299
3577
  const _hoisted_2$5 = ["id", "for"];
3300
3578
  const _hoisted_3$3 = ["id", "aria-controls", "placeholder"];
3301
- const _hoisted_4$2 = {
3579
+ const _hoisted_4$3 = {
3302
3580
  key: 0,
3303
3581
  class: "vv-select__input-before"
3304
3582
  };
@@ -3316,13 +3594,13 @@ const _hoisted_9 = {
3316
3594
  const __default__$6 = {
3317
3595
  name: "VvCombobox",
3318
3596
  components: {
3319
- VvDropdown: _sfc_main$b,
3320
- VvDropdownOption: _sfc_main$9,
3321
- VvDropdownOptgroup: _sfc_main$8,
3322
- VvButton: _sfc_main$g
3597
+ VvDropdown: _sfc_main$e,
3598
+ VvDropdownOption: _sfc_main$c,
3599
+ VvDropdownOptgroup: _sfc_main$b,
3600
+ VvButton: _sfc_main$j
3323
3601
  }
3324
3602
  };
3325
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3603
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3326
3604
  ...__default__$6,
3327
3605
  props: VvComboboxProps,
3328
3606
  emits: VvComboboxEvents,
@@ -3345,7 +3623,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3345
3623
  hasHintLabelOrSlot,
3346
3624
  hasInvalidLabelOrSlot,
3347
3625
  hintSlotScope
3348
- } = HintSlotFactory(props, slots);
3626
+ } = HintSlotFactory(propsDefaults, slots);
3349
3627
  const inputEl = ref(null);
3350
3628
  const inputSearchEl = ref(null);
3351
3629
  const wrapperEl = ref(null);
@@ -3371,7 +3649,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3371
3649
  const searchText = ref("");
3372
3650
  const debouncedSearchText = refDebounced(
3373
3651
  searchText,
3374
- Number(props.debounceSearch)
3652
+ computed(() => Number(props.debounceSearch))
3375
3653
  );
3376
3654
  watch(
3377
3655
  debouncedSearchText,
@@ -3394,7 +3672,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3394
3672
  expanded.value = false;
3395
3673
  };
3396
3674
  const onAfterExpand = () => {
3397
- if (searchable.value) {
3675
+ if (propsDefaults.value.searchable) {
3398
3676
  if (inputSearchEl.value) {
3399
3677
  inputSearchEl.value.focus({
3400
3678
  preventScroll: true
@@ -3403,7 +3681,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3403
3681
  }
3404
3682
  };
3405
3683
  const onAfterCollapse = () => {
3406
- if (searchable.value) {
3684
+ if (propsDefaults.value.searchable) {
3407
3685
  searchText.value = "";
3408
3686
  }
3409
3687
  };
@@ -3417,14 +3695,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3417
3695
  loading,
3418
3696
  valid,
3419
3697
  invalid,
3420
- floating,
3421
- searchable
3698
+ floating
3422
3699
  } = toRefs(props);
3423
3700
  const hasId = useUniqueId(id);
3424
3701
  const hasHintId = computed(() => `${hasId.value}-hint`);
3425
3702
  const hasDropdownId = computed(() => `${hasId.value}-dropdown`);
3426
3703
  const hasSearchId = computed(() => `${hasId.value}-search`);
3427
3704
  const hasLabelId = computed(() => `${hasId.value}-label`);
3705
+ const localLoading = ref(false);
3706
+ const isLoading = computed(() => localLoading.value || loading.value);
3428
3707
  const dropdownEl = ref();
3429
3708
  const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
3430
3709
  icon,
@@ -3439,7 +3718,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3439
3718
  modifiers,
3440
3719
  computed(() => ({
3441
3720
  disabled: disabled.value,
3442
- loading: loading.value,
3721
+ loading: isLoading.value,
3443
3722
  readonly: readonly.value,
3444
3723
  "icon-before": Boolean(hasIconBefore.value),
3445
3724
  "icon-after": Boolean(hasIconAfter.value),
@@ -3457,8 +3736,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3457
3736
  getOptionDisabled,
3458
3737
  getOptionGrouped
3459
3738
  } = useOptions(props);
3460
- const filteredOptions = computed(() => {
3739
+ const filteredOptions = computedAsync(async () => {
3461
3740
  var _a;
3741
+ if (propsDefaults.value.searchFunction) {
3742
+ localLoading.value = true;
3743
+ const toReturn = await Promise.resolve(
3744
+ propsDefaults.value.searchFunction(
3745
+ debouncedSearchText.value,
3746
+ props.options
3747
+ )
3748
+ );
3749
+ localLoading.value = false;
3750
+ return toReturn;
3751
+ }
3462
3752
  return (_a = props.options) == null ? void 0 : _a.filter((option) => {
3463
3753
  return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
3464
3754
  });
@@ -3476,12 +3766,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3476
3766
  } else if (props.modelValue) {
3477
3767
  selectedValues = [props.modelValue];
3478
3768
  }
3479
- const options = props.options.reduce((acc, value) => {
3480
- if (isGroup(value)) {
3481
- return [...acc, ...getOptionGrouped(value)];
3482
- }
3483
- return [...acc, value];
3484
- }, []);
3769
+ const options = props.options.reduce(
3770
+ (acc, value) => {
3771
+ if (isGroup(value)) {
3772
+ return [...acc, ...getOptionGrouped(value)];
3773
+ }
3774
+ return [...acc, value];
3775
+ },
3776
+ []
3777
+ );
3485
3778
  return options.filter((option) => {
3486
3779
  if (isGroup(option)) {
3487
3780
  return getOptionGrouped(option).some(
@@ -3535,7 +3828,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3535
3828
  invalid: invalid.value,
3536
3829
  invalidLabel: propsDefaults.value.invalidLabel,
3537
3830
  hintLabel: propsDefaults.value.hintLabel,
3538
- loading: loading.value,
3831
+ loading: isLoading.value,
3539
3832
  loadingLabel: propsDefaults.value.loadingLabel,
3540
3833
  disabled: disabled.value,
3541
3834
  readonly: readonly.value,
@@ -3563,7 +3856,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3563
3856
  flip: propsDefaults.value.flip,
3564
3857
  autoPlacement: propsDefaults.value.autoPlacement,
3565
3858
  arrow: propsDefaults.value.arrow,
3566
- autofocusFirst: searchable.value ? false : propsDefaults.value.autofocusFirst,
3859
+ autofocusFirst: propsDefaults.value.searchable ? true : propsDefaults.value.autofocusFirst,
3567
3860
  triggerWidth: propsDefaults.value.triggerWidth,
3568
3861
  modifiers: propsDefaults.value.dropdownModifiers
3569
3862
  }));
@@ -3595,14 +3888,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3595
3888
  _ctx.label ? (openBlock(), createElementBlock("label", {
3596
3889
  key: 0,
3597
3890
  id: unref(hasLabelId),
3598
- for: unref(searchable) ? unref(hasSearchId) : void 0
3891
+ for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
3599
3892
  }, toDisplayString(_ctx.label), 9, _hoisted_2$5)) : createCommentVNode("", true),
3600
3893
  createElementVNode("div", {
3601
3894
  ref_key: "wrapperEl",
3602
3895
  ref: wrapperEl,
3603
3896
  class: "vv-select__wrapper"
3604
3897
  }, [
3605
- createVNode(_sfc_main$b, mergeProps({
3898
+ createVNode(_sfc_main$e, mergeProps({
3606
3899
  ref_key: "dropdownEl",
3607
3900
  ref: dropdownEl,
3608
3901
  modelValue: unref(expanded),
@@ -3613,11 +3906,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3613
3906
  onAfterCollapse
3614
3907
  }), createSlots({
3615
3908
  default: withCtx(({ aria }) => [
3616
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
3909
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
3617
3910
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3618
3911
  ])) : createCommentVNode("", true),
3619
3912
  createElementVNode("div", _hoisted_5$2, [
3620
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
3913
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3621
3914
  key: 0,
3622
3915
  class: "vv-select__icon"
3623
3916
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -3637,7 +3930,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3637
3930
  renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3638
3931
  unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3639
3932
  !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3640
- return openBlock(), createBlock(_sfc_main$k, {
3933
+ return openBlock(), createBlock(_sfc_main$l, {
3641
3934
  key: index,
3642
3935
  modifiers: _ctx.badgeModifiers,
3643
3936
  class: "vv-select__badge"
@@ -3647,9 +3940,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3647
3940
  _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
3648
3941
  key: 0,
3649
3942
  "aria-label": unref(propsDefaults).deselectActionLabel,
3943
+ type: "button",
3650
3944
  onClick: withModifiers(($event) => onInput(option), ["stop"])
3651
3945
  }, [
3652
- createVNode(_sfc_main$i, { name: "close" })
3946
+ createVNode(_sfc_main$n, { name: "close" })
3653
3947
  ], 8, _hoisted_8$1)) : createCommentVNode("", true)
3654
3948
  ]),
3655
3949
  _: 2
@@ -3660,7 +3954,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3660
3954
  ], 64))
3661
3955
  ])
3662
3956
  ], 16, _hoisted_6$2),
3663
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
3957
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3664
3958
  key: 1,
3665
3959
  class: "vv-select__icon vv-select__icon-after"
3666
3960
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -3669,107 +3963,110 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3669
3963
  renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3670
3964
  ])) : createCommentVNode("", true)
3671
3965
  ]),
3672
- items: withCtx(() => [
3673
- unref(filteredOptions).length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
3674
- return openBlock(), createElementBlock(Fragment, { key: index }, [
3675
- isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3676
- createVNode(_sfc_main$8, {
3677
- label: unref(getOptionLabel)(option)
3678
- }, null, 8, ["label"]),
3679
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
3680
- option
3681
- ), (item, i) => {
3682
- return openBlock(), createBlock(_sfc_main$9, mergeProps({
3683
- disabled: unref(getOptionDisabled)(item),
3684
- selected: getOptionSelected(item),
3685
- unselectable: _ctx.unselectable,
3686
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3687
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3688
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
3689
- }, {
3690
- key: i,
3691
- class: "vv-dropdown-option",
3692
- onClickPassive: ($event) => onInput(item)
3693
- }), {
3694
- default: withCtx(() => [
3695
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3696
- option,
3697
- selectedOptions: unref(selectedOptions),
3698
- selected: getOptionSelected(item),
3699
- disabled: unref(getOptionDisabled)(item)
3700
- })), () => [
3701
- createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
3702
- ])
3703
- ]),
3704
- _: 2
3705
- }, 1040, ["onClickPassive"]);
3706
- }), 128))
3707
- ], 64)) : (openBlock(), createBlock(_sfc_main$9, mergeProps({ key: 1 }, {
3708
- disabled: unref(getOptionDisabled)(option),
3709
- selected: getOptionSelected(option),
3710
- unselectable: _ctx.unselectable,
3711
- deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3712
- selectHintLabel: unref(propsDefaults).selectHintLabel,
3713
- selectedHintLabel: unref(propsDefaults).selectedHintLabel
3714
- }, {
3715
- class: "vv-dropdown-option",
3716
- onClickPassive: ($event) => onInput(option)
3717
- }), {
3718
- default: withCtx(() => [
3719
- renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3720
- option,
3721
- selectedOptions: unref(selectedOptions),
3722
- selected: getOptionSelected(option),
3723
- disabled: unref(getOptionDisabled)(option)
3724
- })), () => [
3725
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
3726
- ])
3727
- ]),
3728
- _: 2
3729
- }, 1040, ["onClickPassive"]))
3730
- ], 64);
3731
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$9, {
3732
- key: 1,
3733
- modifiers: "inert"
3734
- }, {
3735
- default: withCtx(() => [
3736
- renderSlot(_ctx.$slots, "no-options", {}, () => [
3737
- createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
3738
- ])
3739
- ]),
3740
- _: 3
3741
- })) : (openBlock(), createBlock(_sfc_main$9, {
3742
- key: 2,
3743
- modifiers: "inert"
3744
- }, {
3745
- default: withCtx(() => [
3746
- renderSlot(_ctx.$slots, "no-results", {}, () => [
3747
- createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
3748
- ])
3749
- ]),
3750
- _: 3
3751
- }))
3752
- ]),
3966
+ items: withCtx(() => {
3967
+ var _a;
3968
+ return [
3969
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
3970
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
3971
+ isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3972
+ createVNode(_sfc_main$b, {
3973
+ label: unref(getOptionLabel)(option)
3974
+ }, null, 8, ["label"]),
3975
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
3976
+ option
3977
+ ), (item, i) => {
3978
+ return openBlock(), createBlock(_sfc_main$c, mergeProps({
3979
+ disabled: unref(getOptionDisabled)(item),
3980
+ selected: getOptionSelected(item),
3981
+ unselectable: _ctx.unselectable,
3982
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
3983
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
3984
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
3985
+ }, {
3986
+ key: i,
3987
+ class: "vv-dropdown-option",
3988
+ onClickPassive: ($event) => onInput(item)
3989
+ }), {
3990
+ default: withCtx(() => [
3991
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
3992
+ option,
3993
+ selectedOptions: unref(selectedOptions),
3994
+ selected: getOptionSelected(item),
3995
+ disabled: unref(getOptionDisabled)(item)
3996
+ })), () => [
3997
+ createTextVNode(toDisplayString(unref(getOptionLabel)(item)), 1)
3998
+ ])
3999
+ ]),
4000
+ _: 2
4001
+ }, 1040, ["onClickPassive"]);
4002
+ }), 128))
4003
+ ], 64)) : (openBlock(), createBlock(_sfc_main$c, mergeProps({ key: 1 }, {
4004
+ disabled: unref(getOptionDisabled)(option),
4005
+ selected: getOptionSelected(option),
4006
+ unselectable: _ctx.unselectable,
4007
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
4008
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
4009
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
4010
+ }, {
4011
+ class: "vv-dropdown-option",
4012
+ onClickPassive: ($event) => onInput(option)
4013
+ }), {
4014
+ default: withCtx(() => [
4015
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4016
+ option,
4017
+ selectedOptions: unref(selectedOptions),
4018
+ selected: getOptionSelected(option),
4019
+ disabled: unref(getOptionDisabled)(option)
4020
+ })), () => [
4021
+ createTextVNode(toDisplayString(unref(getOptionLabel)(option)), 1)
4022
+ ])
4023
+ ]),
4024
+ _: 2
4025
+ }, 1040, ["onClickPassive"]))
4026
+ ], 64);
4027
+ }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$c, {
4028
+ key: 1,
4029
+ modifiers: "inert"
4030
+ }, {
4031
+ default: withCtx(() => [
4032
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
4033
+ createTextVNode(toDisplayString(unref(propsDefaults).noOptionsLabel), 1)
4034
+ ])
4035
+ ]),
4036
+ _: 3
4037
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$c, {
4038
+ key: 2,
4039
+ modifiers: "inert"
4040
+ }, {
4041
+ default: withCtx(() => [
4042
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
4043
+ createTextVNode(toDisplayString(unref(propsDefaults).noResultsLabel), 1)
4044
+ ])
4045
+ ]),
4046
+ _: 3
4047
+ })) : createCommentVNode("", true)
4048
+ ];
4049
+ }),
3753
4050
  after: withCtx(() => [
3754
4051
  renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
3755
4052
  var _a;
3756
4053
  return [
3757
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$g, {
4054
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$j, {
3758
4055
  key: 0,
3759
- label: "Close",
4056
+ label: unref(propsDefaults).closeLabel,
3760
4057
  modifiers: "secondary",
3761
4058
  onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
3762
- })) : createCommentVNode("", true)
4059
+ }, null, 8, ["label"])) : createCommentVNode("", true)
3763
4060
  ];
3764
4061
  })
3765
4062
  ]),
3766
4063
  _: 2
3767
4064
  }, [
3768
- unref(searchable) || _ctx.$slots["dropdown::before"] ? {
4065
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
3769
4066
  name: "before",
3770
4067
  fn: withCtx(() => [
3771
4068
  renderSlot(_ctx.$slots, "dropdown::before"),
3772
- unref(searchable) ? withDirectives((openBlock(), createElementBlock("input", {
4069
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
3773
4070
  key: 0,
3774
4071
  id: unref(hasSearchId),
3775
4072
  ref_key: "inputSearchEl",
@@ -3783,7 +4080,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3783
4080
  class: "vv-dropdown__search",
3784
4081
  placeholder: unref(propsDefaults).searchPlaceholder
3785
4082
  }, null, 8, _hoisted_3$3)), [
3786
- [vShow, unref(expanded)],
3787
4083
  [vModelText, unref(searchText)]
3788
4084
  ]) : createCommentVNode("", true)
3789
4085
  ]),
@@ -3824,7 +4120,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3824
4120
  key: "3"
3825
4121
  } : void 0
3826
4122
  ]), 1032, ["id"])
3827
- ], 10, _hoisted_1$5)) : (openBlock(), createBlock(_sfc_main$7, mergeProps({ key: 1 }, unref(selectProps), {
4123
+ ], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$a, mergeProps({ key: 1 }, unref(selectProps), {
3828
4124
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
3829
4125
  }), null, 16));
3830
4126
  };
@@ -3869,35 +4165,36 @@ const VvDialogProps = {
3869
4165
  */
3870
4166
  keepOpen: { type: Boolean, default: false }
3871
4167
  };
3872
- const _hoisted_1$4 = {
4168
+ const _hoisted_1$6 = ["onCancel"];
4169
+ const _hoisted_2$4 = {
3873
4170
  key: 0,
3874
4171
  class: "vv-dialog__header"
3875
4172
  };
3876
- const _hoisted_2$4 = { class: "vv-dialog__content" };
3877
- const _hoisted_3$2 = {
4173
+ const _hoisted_3$2 = { class: "vv-dialog__content" };
4174
+ const _hoisted_4$2 = {
3878
4175
  key: 1,
3879
4176
  class: "vv-dialog__footer"
3880
4177
  };
3881
4178
  const __default__$5 = {
3882
4179
  name: "VvDialog"
3883
4180
  };
3884
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4181
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
3885
4182
  ...__default__$5,
3886
4183
  props: VvDialogProps,
3887
4184
  emits: VvDialogEvents,
3888
4185
  setup(__props, { expose: __expose, emit }) {
3889
4186
  const props = __props;
3890
4187
  const dialogEl = ref();
4188
+ const modelValue = useVModel(props, "modelValue", emit);
3891
4189
  const localModelValue = ref(false);
3892
- const modelValue = computed({
3893
- get() {
3894
- return props.modelValue ?? localModelValue.value;
3895
- },
3896
- set(value) {
3897
- if (props.modelValue === void 0) {
3898
- localModelValue.value = value;
4190
+ const isOpened = computed({
4191
+ get: () => modelValue.value ?? localModelValue.value,
4192
+ set: (newValue) => {
4193
+ if (modelValue.value === void 0) {
4194
+ localModelValue.value = newValue;
4195
+ return;
3899
4196
  }
3900
- emit("update:modelValue", value);
4197
+ modelValue.value = newValue;
3901
4198
  }
3902
4199
  });
3903
4200
  const modalWrapper = ref(null);
@@ -3916,14 +4213,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3916
4213
  const transitioName = computed(() => `vv-dialog--${props.transition}`);
3917
4214
  const dialogTransitionHandlers = {
3918
4215
  "before-enter": () => {
3919
- var _a;
3920
- (_a = dialogEl.value) == null ? void 0 : _a.showModal();
4216
+ var _a, _b;
4217
+ if (!((_a = dialogEl.value) == null ? void 0 : _a.open)) {
4218
+ (_b = dialogEl.value) == null ? void 0 : _b.showModal();
4219
+ }
3921
4220
  emit("open");
3922
4221
  emit("before-enter");
3923
4222
  },
3924
4223
  "after-leave": () => {
3925
- var _a;
3926
- (_a = dialogEl.value) == null ? void 0 : _a.close();
4224
+ var _a, _b;
4225
+ if ((_a = dialogEl.value) == null ? void 0 : _a.open) {
4226
+ (_b = dialogEl.value) == null ? void 0 : _b.close();
4227
+ }
3927
4228
  emit("close");
3928
4229
  emit("after-leave");
3929
4230
  },
@@ -3948,36 +4249,36 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3948
4249
  };
3949
4250
  onClickOutside(modalWrapper, () => {
3950
4251
  if (!props.keepOpen) {
3951
- modelValue.value = false;
4252
+ close();
3952
4253
  }
3953
4254
  });
3954
4255
  function close() {
3955
- modelValue.value = false;
4256
+ isOpened.value = false;
3956
4257
  }
3957
4258
  function open() {
3958
- modelValue.value = true;
4259
+ isOpened.value = true;
3959
4260
  }
3960
4261
  __expose({ close, open });
3961
- onKeyStroke("Escape", (e) => {
3962
- if (modelValue.value) {
3963
- e.preventDefault();
4262
+ const onCancel = () => {
4263
+ if (!props.keepOpen) {
3964
4264
  close();
3965
4265
  }
3966
- });
4266
+ };
3967
4267
  return (_ctx, _cache) => {
3968
4268
  return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
3969
4269
  default: withCtx(() => [
3970
4270
  withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
3971
4271
  ref_key: "dialogEl",
3972
4272
  ref: dialogEl,
3973
- class: unref(dialogClass)
4273
+ class: unref(dialogClass),
4274
+ onCancel: withModifiers(onCancel, ["stop", "prevent"])
3974
4275
  }), [
3975
4276
  createElementVNode("article", {
3976
4277
  ref_key: "modalWrapper",
3977
4278
  ref: modalWrapper,
3978
4279
  class: "vv-dialog__wrapper"
3979
4280
  }, [
3980
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$4, [
4281
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_2$4, [
3981
4282
  renderSlot(_ctx.$slots, "header", {}, () => [
3982
4283
  createTextVNode(toDisplayString(_ctx.title) + " ", 1),
3983
4284
  createElementVNode("button", {
@@ -3986,19 +4287,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3986
4287
  class: "vv-dialog__close",
3987
4288
  onClickPassive: close
3988
4289
  }, [
3989
- createVNode(_sfc_main$i, { name: "close" })
4290
+ createVNode(_sfc_main$n, { name: "close" })
3990
4291
  ], 32)
3991
4292
  ])
3992
4293
  ])) : createCommentVNode("", true),
3993
- createElementVNode("div", _hoisted_2$4, [
4294
+ createElementVNode("div", _hoisted_3$2, [
3994
4295
  renderSlot(_ctx.$slots, "default")
3995
4296
  ]),
3996
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$2, [
4297
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
3997
4298
  renderSlot(_ctx.$slots, "footer")
3998
4299
  ])) : createCommentVNode("", true)
3999
4300
  ], 512)
4000
- ], 16), [
4001
- [vShow, unref(modelValue)]
4301
+ ], 16, _hoisted_1$6), [
4302
+ [vShow, unref(isOpened)]
4002
4303
  ])
4003
4304
  ]),
4004
4305
  _: 3
@@ -4029,7 +4330,23 @@ const TYPES_ICON = {
4029
4330
  COLOR: "color",
4030
4331
  SEARCH: "close"
4031
4332
  };
4032
- const VvInputTextEvents = ["update:modelValue", "focus", "blur", "keyup"];
4333
+ const VvInputTextEvents = [
4334
+ "update:modelValue",
4335
+ "update:masked",
4336
+ "accept",
4337
+ "accept:typed",
4338
+ "accept:masked",
4339
+ "accept:unmasked",
4340
+ "complete",
4341
+ "complete:typed",
4342
+ "complete:masked",
4343
+ "complete:unmasked",
4344
+ "focus",
4345
+ "blur",
4346
+ "keyup",
4347
+ "keydown",
4348
+ "keypress"
4349
+ ];
4033
4350
  const VvInputTextProps = {
4034
4351
  ...InputTextareaProps,
4035
4352
  /**
@@ -4136,44 +4453,19 @@ const VvInputTextProps = {
4136
4453
  default: "Clear"
4137
4454
  },
4138
4455
  /**
4139
- * Input mask, only for text type
4140
- * @see https://beholdr.github.io/maska/
4456
+ * iMask options
4457
+ * @see https://imask.js.org/guide.html
4141
4458
  */
4142
- mask: {
4143
- type: String,
4144
- default: void 0
4145
- },
4146
- /**
4147
- * Show mask before typing
4148
- * @see https://beholdr.github.io/maska/#/?id=maskinput-options
4149
- */
4150
- maskEager: {
4151
- type: Boolean,
4152
- default: false
4153
- },
4154
- /**
4155
- * Write values reverse (ex. for numbers)
4156
- * @see https://beholdr.github.io/maska/#/?id=maskinput-options
4157
- */
4158
- maskReversed: {
4159
- type: Boolean,
4160
- default: false
4161
- },
4162
- /**
4163
- * Add mask custom tokens
4164
- * @see https://beholdr.github.io/maska/#/?id=custom-tokens
4165
- */
4166
- maskTokens: {
4459
+ iMask: {
4167
4460
  type: Object,
4168
4461
  default: void 0
4169
4462
  },
4170
4463
  /**
4171
- * Replace default tokens
4172
- * @see https://beholdr.github.io/maska/#/?id=custom-tokens
4464
+ * Masked value
4173
4465
  */
4174
- maskTokensReplace: {
4175
- type: Boolean,
4176
- default: false
4466
+ masked: {
4467
+ type: String,
4468
+ default: void 0
4177
4469
  },
4178
4470
  /**
4179
4471
  * Adjust input width to content
@@ -4194,11 +4486,18 @@ const VvInputTextProps = {
4194
4486
  */
4195
4487
  unit: {
4196
4488
  type: String
4489
+ },
4490
+ /**
4491
+ * Select input text on focus
4492
+ */
4493
+ selectOnFocus: {
4494
+ type: Boolean,
4495
+ default: false
4197
4496
  }
4198
4497
  };
4199
4498
  const VvInputPasswordAction = defineComponent({
4200
4499
  components: {
4201
- VvIcon: _sfc_main$i
4500
+ VvIcon: _sfc_main$n
4202
4501
  },
4203
4502
  props: {
4204
4503
  disabled: {
@@ -4242,7 +4541,7 @@ const VvInputPasswordAction = defineComponent({
4242
4541
  };
4243
4542
  },
4244
4543
  render() {
4245
- const icon = h(_sfc_main$i, {
4544
+ const icon = h(_sfc_main$n, {
4246
4545
  name: this.activeIcon,
4247
4546
  class: "vv-input-text__icon"
4248
4547
  });
@@ -4261,7 +4560,7 @@ const VvInputPasswordAction = defineComponent({
4261
4560
  });
4262
4561
  const VvInputStepAction = defineComponent({
4263
4562
  components: {
4264
- VvIcon: _sfc_main$i
4563
+ VvIcon: _sfc_main$n
4265
4564
  },
4266
4565
  props: {
4267
4566
  disabled: {
@@ -4306,7 +4605,7 @@ const VvInputStepAction = defineComponent({
4306
4605
  });
4307
4606
  const VvInputClearAction = defineComponent({
4308
4607
  components: {
4309
- VvIcon: _sfc_main$i
4608
+ VvIcon: _sfc_main$n
4310
4609
  },
4311
4610
  props: {
4312
4611
  disabled: {
@@ -4335,7 +4634,7 @@ const VvInputClearAction = defineComponent({
4335
4634
  };
4336
4635
  },
4337
4636
  render() {
4338
- const icon = h(_sfc_main$i, {
4637
+ const icon = h(_sfc_main$n, {
4339
4638
  name: this.icon,
4340
4639
  class: "vv-input-text__icon"
4341
4640
  });
@@ -4356,7 +4655,7 @@ function VvInputTextActionsFactory(type, parentProps) {
4356
4655
  return {
4357
4656
  name: "VvInputTextActions",
4358
4657
  components: {
4359
- VvIcon: _sfc_main$i,
4658
+ VvIcon: _sfc_main$n,
4360
4659
  VvInputPasswordAction,
4361
4660
  VvInputStepAction,
4362
4661
  VvInputClearAction
@@ -4483,7 +4782,7 @@ function useTextCount(text, options) {
4483
4782
  formatted
4484
4783
  };
4485
4784
  }
4486
- const _hoisted_1$3 = ["for"];
4785
+ const _hoisted_1$5 = ["for"];
4487
4786
  const _hoisted_2$3 = { class: "vv-input-text__wrapper" };
4488
4787
  const _hoisted_3$1 = {
4489
4788
  key: 0,
@@ -4506,16 +4805,18 @@ const _hoisted_8 = {
4506
4805
  const __default__$4 = {
4507
4806
  name: "VvInputText"
4508
4807
  };
4509
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4808
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4510
4809
  ...__default__$4,
4511
4810
  props: VvInputTextProps,
4512
4811
  emits: VvInputTextEvents,
4513
4812
  setup(__props, { expose: __expose, emit }) {
4514
4813
  const props = __props;
4515
4814
  const slots = useSlots();
4516
- const inputEl = ref();
4517
- const innerEl = ref();
4518
- __expose({ $inner: innerEl });
4815
+ const propsDefaults = useDefaults(
4816
+ "VvInputText",
4817
+ VvInputTextProps,
4818
+ props
4819
+ );
4519
4820
  const {
4520
4821
  id,
4521
4822
  icon,
@@ -4525,39 +4826,131 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4525
4826
  count,
4526
4827
  valid,
4527
4828
  invalid,
4528
- loading
4829
+ loading,
4830
+ debounce,
4831
+ maxlength,
4832
+ minlength,
4833
+ type,
4834
+ iMask,
4835
+ step
4529
4836
  } = toRefs(props);
4530
4837
  const hasId = useUniqueId(id);
4531
4838
  const hasHintId = computed(() => `${hasId.value}-hint`);
4532
4839
  const inputTextPlaceholder = computed(
4533
4840
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
4534
4841
  );
4535
- const localModelValue = useDebouncedInput(
4536
- modelValue,
4537
- emit,
4538
- props.debounce,
4842
+ const maskReady = ref(false);
4843
+ const { el, mask, typed, masked, unmasked } = useIMask(
4844
+ computed(
4845
+ () => (iMask == null ? void 0 : iMask.value) ?? {
4846
+ mask: /./
4847
+ }
4848
+ ),
4539
4849
  {
4540
- getter: (value) => {
4541
- if (mask.value) {
4542
- return mask.value.masked(value ?? "");
4850
+ emit,
4851
+ onAccept: () => {
4852
+ if (!maskReady.value) {
4853
+ return;
4543
4854
  }
4544
- return value;
4545
- },
4546
- setter: (value) => {
4547
- if (mask.value) {
4548
- value = mask.value.unmasked(value);
4855
+ emit("update:masked", masked.value);
4856
+ if (type.value === INPUT_TYPES.NUMBER) {
4857
+ if (masked.value === "") {
4858
+ if (localModelValue.value === null || localModelValue.value === void 0) {
4859
+ return;
4860
+ }
4861
+ localModelValue.value = void 0;
4862
+ return;
4863
+ }
4864
+ if (typeof typed.value !== "number") {
4865
+ localModelValue.value = Number(typed.value);
4866
+ return;
4867
+ }
4868
+ localModelValue.value = typed.value;
4869
+ return;
4870
+ }
4871
+ if (type.value === INPUT_TYPES.DATE) {
4872
+ if (el.value instanceof HTMLInputElement && el.value.type === "date") {
4873
+ localModelValue.value = el.value.value;
4874
+ return;
4875
+ }
4876
+ let date = typed.value;
4877
+ if (date === null || date === "") {
4878
+ if (!localModelValue.value) {
4879
+ return;
4880
+ }
4881
+ localModelValue.value = "";
4882
+ return;
4883
+ }
4884
+ if (!(date instanceof Date)) {
4885
+ date = new Date(date);
4886
+ }
4887
+ localModelValue.value = `${date.getFullYear()}-${("0" + (date.getMonth() + 1)).slice(-2)}-${("0" + date.getDate()).slice(-2)}`;
4888
+ return;
4889
+ }
4890
+ if (type.value === INPUT_TYPES.DATETIME_LOCAL) {
4891
+ if (el.value instanceof HTMLInputElement && el.value.type === "datetime-local") {
4892
+ localModelValue.value = el.value.value;
4893
+ return;
4894
+ }
4895
+ let date = typed.value;
4896
+ if (date === null || date === "") {
4897
+ if (!localModelValue.value) {
4898
+ return;
4899
+ }
4900
+ localModelValue.value = "";
4901
+ return;
4902
+ }
4903
+ if (!(typed.value instanceof Date)) {
4904
+ date = new Date(date);
4905
+ }
4906
+ localModelValue.value = `${date.getFullYear()}-${("0" + (date.getMonth() + 1)).slice(-2)}-${("0" + date.getDate()).slice(-2)}T${("0" + date.getHours()).slice(-2)}:${("0" + date.getMinutes()).slice(-2)}`;
4907
+ return;
4549
4908
  }
4550
- if (props.type === INPUT_TYPES.NUMBER) {
4551
- return Number(value);
4909
+ if (!localModelValue.value && !unmasked.value) {
4910
+ return;
4552
4911
  }
4553
- return value;
4912
+ localModelValue.value = unmasked.value;
4913
+ }
4914
+ }
4915
+ );
4916
+ onMounted(() => {
4917
+ if (mask.value) {
4918
+ maskReady.value = true;
4919
+ typed.value = localModelValue.value ?? "";
4920
+ }
4921
+ });
4922
+ watch(
4923
+ () => props.modelValue,
4924
+ (newValue) => {
4925
+ var _a;
4926
+ if (mask.value) {
4927
+ typed.value = newValue && ((_a = iMask == null ? void 0 : iMask.value) == null ? void 0 : _a.mask) === Date ? new Date(newValue) : newValue ?? "";
4554
4928
  }
4555
4929
  }
4556
4930
  );
4931
+ watch(
4932
+ () => props.masked,
4933
+ (newValue) => {
4934
+ masked.value = newValue ?? "";
4935
+ }
4936
+ );
4937
+ const inputEl = el;
4938
+ const innerEl = ref();
4939
+ __expose({ $inner: innerEl });
4940
+ const localModelValue = useDebouncedInput(
4941
+ modelValue,
4942
+ emit,
4943
+ (debounce == null ? void 0 : debounce.value) ?? 0
4944
+ );
4557
4945
  const { focused } = useComponentFocus(inputEl, emit);
4558
4946
  const isFocused = computed(
4559
4947
  () => focused.value && !props.disabled && !props.readonly
4560
4948
  );
4949
+ watch(isFocused, (newValue) => {
4950
+ if (newValue && propsDefaults.value.selectOnFocus && inputEl.value) {
4951
+ inputEl.value.select();
4952
+ }
4953
+ });
4561
4954
  const isVisible = useElementVisibility(inputEl);
4562
4955
  watch(isVisible, (newValue) => {
4563
4956
  if (newValue && props.autofocus && !props.disabled && !props.readonly) {
@@ -4575,19 +4968,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4575
4968
  const isNumber = computed(() => props.type === INPUT_TYPES.NUMBER);
4576
4969
  const onStepUp = () => {
4577
4970
  if (isClickable.value) {
4971
+ if (iMask == null ? void 0 : iMask.value) {
4972
+ typed.value = typed.value + Number((step == null ? void 0 : step.value) ?? 1);
4973
+ return;
4974
+ }
4578
4975
  inputEl.value.stepUp();
4579
4976
  localModelValue.value = unref(inputEl).value;
4580
4977
  }
4581
4978
  };
4582
4979
  const onStepDown = () => {
4583
4980
  if (isClickable.value) {
4981
+ if (iMask == null ? void 0 : iMask.value) {
4982
+ typed.value = typed.value - Number((step == null ? void 0 : step.value) ?? 1);
4983
+ return;
4984
+ }
4584
4985
  inputEl.value.stepDown();
4585
4986
  localModelValue.value = unref(inputEl).value;
4586
4987
  }
4587
4988
  };
4588
4989
  const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
4589
4990
  const onClear = () => {
4590
- localModelValue.value = void 0;
4991
+ localModelValue.value = "";
4591
4992
  };
4592
4993
  const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
4593
4994
  icon,
@@ -4609,9 +5010,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4609
5010
  }
4610
5011
  });
4611
5012
  const { formatted: countFormatted } = useTextCount(localModelValue, {
4612
- mode: props.count,
4613
- upperLimit: Number(props.maxlength),
4614
- lowerLimit: Number(props.minlength)
5013
+ mode: count.value,
5014
+ upperLimit: Number(maxlength == null ? void 0 : maxlength.value),
5015
+ lowerLimit: Number(minlength == null ? void 0 : minlength.value)
4615
5016
  });
4616
5017
  const isClickable = computed(() => !props.disabled && !props.readonly);
4617
5018
  const hasTabindex = computed(
@@ -4646,17 +5047,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4646
5047
  }))
4647
5048
  );
4648
5049
  const hasAttrs = computed(() => {
4649
- const type = (() => {
5050
+ const type2 = (() => {
4650
5051
  if (isPassword.value && showPassword.value) {
4651
5052
  return INPUT_TYPES.TEXT;
4652
5053
  }
4653
5054
  if (isDateTime.value && !isDirty.value && !focused.value) {
4654
5055
  return INPUT_TYPES.TEXT;
4655
5056
  }
5057
+ if (iMask == null ? void 0 : iMask.value) {
5058
+ return INPUT_TYPES.TEXT;
5059
+ }
4656
5060
  return props.type;
4657
5061
  })();
4658
5062
  const toReturn = {
4659
- type,
5063
+ type: type2,
4660
5064
  name: props.name,
4661
5065
  tabindex: hasTabindex.value,
4662
5066
  disabled: props.disabled,
@@ -4667,20 +5071,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4667
5071
  "aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
4668
5072
  "aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
4669
5073
  };
4670
- if (type === INPUT_TYPES.DATE || type === INPUT_TYPES.MONTH || type === INPUT_TYPES.WEEK || type === INPUT_TYPES.TIME || type === INPUT_TYPES.DATETIME_LOCAL || type === INPUT_TYPES.NUMBER) {
5074
+ if (type2 === INPUT_TYPES.DATE || type2 === INPUT_TYPES.MONTH || type2 === INPUT_TYPES.WEEK || type2 === INPUT_TYPES.TIME || type2 === INPUT_TYPES.DATETIME_LOCAL || type2 === INPUT_TYPES.NUMBER) {
4671
5075
  toReturn.step = props.step;
4672
5076
  toReturn.max = props.max !== void 0 ? String(props.max) : void 0;
4673
5077
  toReturn.min = props.min !== void 0 ? String(props.min) : void 0;
4674
5078
  }
4675
- if (type === INPUT_TYPES.TEXT || type === INPUT_TYPES.SEARCH || type === INPUT_TYPES.URL || type === INPUT_TYPES.TEL || type === INPUT_TYPES.EMAIL || type === INPUT_TYPES.PASSWORD || type === INPUT_TYPES.NUMBER) {
5079
+ if (type2 === INPUT_TYPES.TEXT || type2 === INPUT_TYPES.SEARCH || type2 === INPUT_TYPES.URL || type2 === INPUT_TYPES.TEL || type2 === INPUT_TYPES.EMAIL || type2 === INPUT_TYPES.PASSWORD || type2 === INPUT_TYPES.NUMBER) {
4676
5080
  toReturn.placeholder = inputTextPlaceholder.value;
4677
5081
  }
4678
- if (type === INPUT_TYPES.TEXT || type === INPUT_TYPES.SEARCH || type === INPUT_TYPES.URL || type === INPUT_TYPES.TEL || type === INPUT_TYPES.EMAIL || type === INPUT_TYPES.PASSWORD) {
5082
+ if (type2 === INPUT_TYPES.TEXT || type2 === INPUT_TYPES.SEARCH || type2 === INPUT_TYPES.URL || type2 === INPUT_TYPES.TEL || type2 === INPUT_TYPES.EMAIL || type2 === INPUT_TYPES.PASSWORD) {
4679
5083
  toReturn.minlength = props.minlength;
4680
5084
  toReturn.maxlength = props.maxlength;
4681
5085
  toReturn.pattern = props.pattern;
4682
5086
  }
4683
- if (type === INPUT_TYPES.EMAIL) {
5087
+ if (type2 === INPUT_TYPES.EMAIL) {
4684
5088
  toReturn.multiple = props.multiple;
4685
5089
  }
4686
5090
  return toReturn;
@@ -4699,7 +5103,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4699
5103
  hasHintLabelOrSlot,
4700
5104
  hasInvalidLabelOrSlot,
4701
5105
  hintSlotScope
4702
- } = HintSlotFactory(props, slots);
5106
+ } = HintSlotFactory(propsDefaults, slots);
4703
5107
  const PasswordInputActions = VvInputTextActionsFactory(
4704
5108
  INPUT_TYPES.PASSWORD,
4705
5109
  props
@@ -4712,31 +5116,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4712
5116
  INPUT_TYPES.SEARCH,
4713
5117
  props
4714
5118
  );
4715
- const mask = ref();
4716
- watch(
4717
- [
4718
- () => props.mask,
4719
- () => props.type,
4720
- () => props.maskEager,
4721
- () => props.maskReversed,
4722
- () => props.maskTokens,
4723
- () => props.maskTokensReplace
4724
- ],
4725
- ([newMask, newType, eager, reversed, tokens, tokensReplace]) => {
4726
- if (newMask && newType === INPUT_TYPES.TEXT) {
4727
- mask.value = new Mask({
4728
- mask: newMask,
4729
- eager,
4730
- reversed,
4731
- tokens,
4732
- tokensReplace
4733
- });
4734
- return;
4735
- }
4736
- mask.value = void 0;
4737
- },
4738
- { immediate: true }
4739
- );
4740
5119
  const onClickInner = () => {
4741
5120
  if (isClickable.value) {
4742
5121
  focused.value = true;
@@ -4750,6 +5129,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4750
5129
  width: localModelValue.value !== void 0 ? `${String(localModelValue.value).length + 1}ch` : void 0
4751
5130
  };
4752
5131
  });
5132
+ const onKeyDown = (event) => {
5133
+ switch (event.code) {
5134
+ case "ArrowUp":
5135
+ if (isNumber.value) {
5136
+ onStepUp();
5137
+ event.preventDefault();
5138
+ }
5139
+ break;
5140
+ case "ArrowDown":
5141
+ if (isNumber.value) {
5142
+ onStepDown();
5143
+ event.preventDefault();
5144
+ }
5145
+ break;
5146
+ }
5147
+ emit("keydown", event);
5148
+ };
4753
5149
  return (_ctx, _cache) => {
4754
5150
  return openBlock(), createElementBlock("div", {
4755
5151
  class: normalizeClass(unref(bemCssClasses))
@@ -4758,7 +5154,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4758
5154
  key: 0,
4759
5155
  for: unref(hasId),
4760
5156
  class: "vv-input-text__label"
4761
- }, toDisplayString(unref(label)), 9, _hoisted_1$3)) : createCommentVNode("", true),
5157
+ }, toDisplayString(unref(label)), 9, _hoisted_1$5)) : createCommentVNode("", true),
4762
5158
  createElementVNode("div", _hoisted_2$3, [
4763
5159
  _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
4764
5160
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
@@ -4769,28 +5165,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4769
5165
  class: "vv-input-text__inner",
4770
5166
  onClick: withModifiers(onClickInner, ["stop"])
4771
5167
  }, [
4772
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
5168
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
4773
5169
  key: 0,
4774
5170
  class: "vv-input-text__icon"
4775
5171
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
4776
- withDirectives(createElementVNode("input", mergeProps({
5172
+ createElementVNode("input", mergeProps({
4777
5173
  id: unref(hasId),
4778
5174
  ref_key: "inputEl",
4779
- ref: inputEl,
4780
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
5175
+ ref: inputEl
4781
5176
  }, unref(hasAttrs), {
4782
5177
  style: unref(hasStyle),
4783
- onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
4784
- }), null, 16, _hoisted_5$1), [
4785
- [vModelDynamic, unref(localModelValue)]
4786
- ]),
5178
+ onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
5179
+ onKeydown: onKeyDown,
5180
+ onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
5181
+ }), null, 16, _hoisted_5$1),
4787
5182
  (_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
4788
5183
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
4789
5184
  createTextVNode(toDisplayString(_ctx.unit), 1)
4790
5185
  ])
4791
5186
  ])) : createCommentVNode("", true)
4792
5187
  ], 8, _hoisted_4$1),
4793
- unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
5188
+ unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
4794
5189
  key: 1,
4795
5190
  class: "vv-input-text__icon vv-input-text__icon-after"
4796
5191
  }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
@@ -4850,6 +5245,79 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4850
5245
  };
4851
5246
  }
4852
5247
  });
5248
+ const VvNavProps = {
5249
+ ...ModifiersProps,
5250
+ items: {
5251
+ type: Array,
5252
+ required: true,
5253
+ default: () => []
5254
+ }
5255
+ };
5256
+ const VvNavEvents = ["click"];
5257
+ const _hoisted_1$4 = {
5258
+ class: "vv-nav__menu",
5259
+ role: "menu",
5260
+ "aria-busy": "true"
5261
+ };
5262
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5263
+ __name: "VvNav",
5264
+ props: VvNavProps,
5265
+ emits: VvNavEvents,
5266
+ setup(__props, { emit }) {
5267
+ const props = __props;
5268
+ const { modifiers, items } = toRefs(props);
5269
+ const activeItem = ref(null);
5270
+ const bemCssClasses = useModifiers("vv-nav", modifiers);
5271
+ const localItems = computed(() => {
5272
+ return items.value.map((item, index) => {
5273
+ return {
5274
+ ...item,
5275
+ id: item.id || `nav-item_${index}`
5276
+ };
5277
+ });
5278
+ });
5279
+ function onClick(item) {
5280
+ if (!item.disabled) {
5281
+ emit("click", item);
5282
+ activeItem.value = item.id;
5283
+ }
5284
+ }
5285
+ return (_ctx, _cache) => {
5286
+ return openBlock(), createElementBlock("nav", {
5287
+ class: normalizeClass(unref(bemCssClasses))
5288
+ }, [
5289
+ createElementVNode("ul", _hoisted_1$4, [
5290
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (navItem) => {
5291
+ return openBlock(), createElementBlock("li", {
5292
+ key: navItem.id,
5293
+ class: "vv-nav__item",
5294
+ role: "presentation"
5295
+ }, [
5296
+ createVNode(_sfc_main$o, mergeProps({
5297
+ disabled: navItem.disabled,
5298
+ to: navItem.to,
5299
+ href: navItem.href,
5300
+ tabindex: 0
5301
+ }, {
5302
+ class: [{
5303
+ current: unref(activeItem) == navItem.id,
5304
+ disabled: navItem.disabled
5305
+ }, "vv-nav__item-label"]
5306
+ }, toHandlers(navItem.on), {
5307
+ onClick: ($event) => onClick(navItem)
5308
+ }), {
5309
+ default: withCtx(() => [
5310
+ createTextVNode(toDisplayString(navItem.title), 1)
5311
+ ]),
5312
+ _: 2
5313
+ }, 1040, ["class", "onClick"])
5314
+ ]);
5315
+ }), 128))
5316
+ ])
5317
+ ], 2);
5318
+ };
5319
+ }
5320
+ });
4853
5321
  const VvProgressProps = {
4854
5322
  ...ModifiersProps,
4855
5323
  /**
@@ -4883,7 +5351,7 @@ const VvProgressProps = {
4883
5351
  const __default__$3 = {
4884
5352
  name: "VvProgress"
4885
5353
  };
4886
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5354
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4887
5355
  ...__default__$3,
4888
5356
  props: VvProgressProps,
4889
5357
  setup(__props) {
@@ -4939,18 +5407,23 @@ function useGroupProps(props, emit) {
4939
5407
  disabled
4940
5408
  };
4941
5409
  }
4942
- const _hoisted_1$2 = ["for"];
5410
+ const _hoisted_1$3 = ["for"];
4943
5411
  const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
4944
5412
  const __default__$2 = {
4945
5413
  name: "VvRadio"
4946
5414
  };
4947
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5415
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4948
5416
  ...__default__$2,
4949
5417
  props: VvRadioProps,
4950
5418
  emits: VvRadioEvents,
4951
5419
  setup(__props, { emit }) {
4952
5420
  const props = __props;
4953
5421
  const slots = useSlots();
5422
+ const propsDefaults = useDefaults(
5423
+ "VvRadio",
5424
+ VvRadioProps,
5425
+ props
5426
+ );
4954
5427
  const { id, disabled, readonly, modelValue, valid, invalid } = useGroupProps(props, emit);
4955
5428
  const hasId = useUniqueId(id);
4956
5429
  const hasHintId = computed(() => `${hasId.value}-hint`);
@@ -5001,7 +5474,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5001
5474
  hasHintLabelOrSlot,
5002
5475
  hasInvalidLabelOrSlot,
5003
5476
  hintSlotScope
5004
- } = HintSlotFactory(props, slots);
5477
+ } = HintSlotFactory(propsDefaults, slots);
5005
5478
  return (_ctx, _cache) => {
5006
5479
  return openBlock(), createElementBlock("label", {
5007
5480
  class: normalizeClass(unref(bemCssClasses)),
@@ -5060,24 +5533,29 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5060
5533
  key: "3"
5061
5534
  } : void 0
5062
5535
  ]), 1032, ["id"])
5063
- ], 10, _hoisted_1$2);
5536
+ ], 10, _hoisted_1$3);
5064
5537
  };
5065
5538
  }
5066
5539
  });
5067
5540
  const VvRadioGroupProps = CheckboxRadioGroupProps;
5068
5541
  const VvRadioGroupEvents = ["update:modelValue", "change"];
5069
- const _hoisted_1$1 = ["textContent"];
5542
+ const _hoisted_1$2 = ["textContent"];
5070
5543
  const _hoisted_2$1 = { class: "vv-radio-group__wrapper" };
5071
5544
  const __default__$1 = {
5072
5545
  name: "VvRadioGroup"
5073
5546
  };
5074
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5547
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5075
5548
  ...__default__$1,
5076
5549
  props: VvRadioGroupProps,
5077
5550
  emits: VvRadioGroupEvents,
5078
5551
  setup(__props, { emit }) {
5079
5552
  const props = __props;
5080
5553
  const slots = useSlots();
5554
+ const propsDefaults = useDefaults(
5555
+ "VvRadioGroup",
5556
+ VvRadioGroupProps,
5557
+ props
5558
+ );
5081
5559
  const modelValue = useVModel(props, "modelValue", emit);
5082
5560
  const { disabled, readonly, vertical, valid, invalid, modifiers } = toRefs(props);
5083
5561
  useProvideGroupState({
@@ -5108,7 +5586,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5108
5586
  value: getOptionValue(option)
5109
5587
  };
5110
5588
  };
5111
- const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots);
5589
+ const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
5112
5590
  return (_ctx, _cache) => {
5113
5591
  return openBlock(), createElementBlock("fieldset", {
5114
5592
  class: normalizeClass(unref(bemCssClasses))
@@ -5116,10 +5594,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5116
5594
  _ctx.label ? (openBlock(), createElementBlock("legend", {
5117
5595
  key: 0,
5118
5596
  textContent: toDisplayString(_ctx.label)
5119
- }, null, 8, _hoisted_1$1)) : createCommentVNode("", true),
5597
+ }, null, 8, _hoisted_1$2)) : createCommentVNode("", true),
5120
5598
  createElementVNode("div", _hoisted_2$1, [
5121
5599
  _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
5122
- return openBlock(), createBlock(_sfc_main$2, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
5600
+ return openBlock(), createBlock(_sfc_main$4, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
5123
5601
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
5124
5602
  ]),
5125
5603
  createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
@@ -5156,6 +5634,61 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5156
5634
  };
5157
5635
  }
5158
5636
  });
5637
+ const VvTabProps = {
5638
+ ...ModifiersProps,
5639
+ items: {
5640
+ type: Array,
5641
+ required: true,
5642
+ default: () => []
5643
+ }
5644
+ };
5645
+ const VvTabEvents = ["click"];
5646
+ const _hoisted_1$1 = ["id"];
5647
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5648
+ __name: "VvTab",
5649
+ props: VvTabProps,
5650
+ emits: VvTabEvents,
5651
+ setup(__props, { emit }) {
5652
+ const props = __props;
5653
+ const { modifiers, items } = toRefs(props);
5654
+ const activeTab = ref(null);
5655
+ const bemCssClasses = useModifiers("vv-tab", modifiers);
5656
+ const localItems = computed(() => {
5657
+ return items.value.map((item, index) => {
5658
+ return {
5659
+ ...item,
5660
+ id: item.id || `tab-item_${index}`
5661
+ };
5662
+ });
5663
+ });
5664
+ function onClick(item) {
5665
+ if (!item.disabled) {
5666
+ emit("click", item);
5667
+ activeTab.value = item.id;
5668
+ }
5669
+ }
5670
+ return (_ctx, _cache) => {
5671
+ return openBlock(), createElementBlock("div", {
5672
+ class: normalizeClass(unref(bemCssClasses))
5673
+ }, [
5674
+ createVNode(_sfc_main$6, {
5675
+ items: unref(localItems),
5676
+ modifiers: "tabs full",
5677
+ onClick
5678
+ }, null, 8, ["items"]),
5679
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (item) => {
5680
+ return openBlock(), createElementBlock("article", {
5681
+ id: item.id,
5682
+ key: item.id,
5683
+ class: normalizeClass([{ target: unref(activeTab) === item.id }, "vv-tab__panel"])
5684
+ }, [
5685
+ renderSlot(_ctx.$slots, `${item.id}`)
5686
+ ], 10, _hoisted_1$1);
5687
+ }), 128))
5688
+ ], 2);
5689
+ };
5690
+ }
5691
+ });
5159
5692
  const WRAP = {
5160
5693
  hard: "hard",
5161
5694
  soft: "soft"
@@ -5217,13 +5750,18 @@ const _hoisted_7 = {
5217
5750
  const __default__ = {
5218
5751
  name: "VvTextarea"
5219
5752
  };
5220
- const _sfc_main = /* @__PURE__ */ defineComponent({
5753
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5221
5754
  ...__default__,
5222
5755
  props: VvTextareaProps,
5223
5756
  emits: VvTextareaEvents,
5224
5757
  setup(__props, { emit }) {
5225
5758
  const props = __props;
5226
5759
  const slots = useSlots();
5760
+ const propsDefaults = useDefaults(
5761
+ "VvTextarea",
5762
+ VvTextareaProps,
5763
+ props
5764
+ );
5227
5765
  const textarea = ref();
5228
5766
  const {
5229
5767
  id,
@@ -5235,14 +5773,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5235
5773
  valid,
5236
5774
  invalid,
5237
5775
  loading,
5238
- modifiers
5776
+ modifiers,
5777
+ debounce,
5778
+ minlength,
5779
+ maxlength
5239
5780
  } = toRefs(props);
5240
5781
  const hasId = useUniqueId(id);
5241
5782
  const hasHintId = computed(() => `${hasId.value}-hint`);
5242
5783
  const hasPlaceholder = computed(
5243
5784
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
5244
5785
  );
5245
- const localModelValue = useDebouncedInput(modelValue, emit, props.debounce);
5786
+ const localModelValue = useDebouncedInput(modelValue, emit, debounce == null ? void 0 : debounce.value);
5246
5787
  const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
5247
5788
  icon,
5248
5789
  iconPosition
@@ -5255,9 +5796,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5255
5796
  }
5256
5797
  });
5257
5798
  const { formatted: countFormatted } = useTextCount(localModelValue, {
5258
- mode: props.count,
5259
- upperLimit: Number(props.maxlength),
5260
- lowerLimit: Number(props.minlength)
5799
+ mode: count == null ? void 0 : count.value,
5800
+ upperLimit: Number(maxlength == null ? void 0 : maxlength.value),
5801
+ lowerLimit: Number(minlength == null ? void 0 : minlength.value)
5261
5802
  });
5262
5803
  const isClickable = computed(() => !props.disabled && !props.readonly);
5263
5804
  const hasTabindex = computed(
@@ -5278,7 +5819,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5278
5819
  hasHintLabelOrSlot,
5279
5820
  hasInvalidLabelOrSlot,
5280
5821
  hintSlotScope
5281
- } = HintSlotFactory(props, slots);
5822
+ } = HintSlotFactory(propsDefaults, slots);
5282
5823
  const bemCssClasses = useModifiers(
5283
5824
  "vv-textarea",
5284
5825
  modifiers,
@@ -5342,7 +5883,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5342
5883
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5343
5884
  ])) : createCommentVNode("", true),
5344
5885
  createElementVNode("div", _hoisted_4, [
5345
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
5886
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5346
5887
  key: 0,
5347
5888
  class: "vv-textarea__icon"
5348
5889
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -5356,7 +5897,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5356
5897
  }), null, 16, _hoisted_5), [
5357
5898
  [vModelText, unref(localModelValue)]
5358
5899
  ]),
5359
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$i, mergeProps({
5900
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5360
5901
  key: 1,
5361
5902
  class: "vv-textarea__icon vv-textarea__icon-after"
5362
5903
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -5407,24 +5948,69 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5407
5948
  };
5408
5949
  }
5409
5950
  });
5951
+ const VvTooltipProps = {
5952
+ ...ModifiersProps,
5953
+ /**
5954
+ * Define the tooltip position
5955
+ * @default Side.bottom
5956
+ */
5957
+ position: {
5958
+ type: String,
5959
+ default: Side.bottom
5960
+ },
5961
+ value: {
5962
+ type: String
5963
+ }
5964
+ };
5965
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5966
+ __name: "VvTooltip",
5967
+ props: VvTooltipProps,
5968
+ setup(__props) {
5969
+ const props = __props;
5970
+ const { modifiers } = toRefs(props);
5971
+ const bemCssClasses = useModifiers(
5972
+ "vv-tooltip",
5973
+ modifiers,
5974
+ computed(() => ({
5975
+ [props.position]: true
5976
+ }))
5977
+ );
5978
+ return (_ctx, _cache) => {
5979
+ return openBlock(), createElementBlock("span", {
5980
+ class: normalizeClass(unref(bemCssClasses)),
5981
+ role: "tooltip",
5982
+ inert: ""
5983
+ }, [
5984
+ renderSlot(_ctx.$slots, "default", {}, () => [
5985
+ createTextVNode(toDisplayString(_ctx.value), 1)
5986
+ ])
5987
+ ], 2);
5988
+ };
5989
+ }
5990
+ });
5410
5991
  export {
5411
- _sfc_main$m as VvAccordion,
5412
- _sfc_main$l as VvAccordionGroup,
5413
- _sfc_main$k as VvBadge,
5414
- _sfc_main$j as VvBreadcrumb,
5415
- _sfc_main$g as VvButton,
5416
- _sfc_main$f as VvButtonGroup,
5417
- _sfc_main$e as VvCard,
5418
- _sfc_main$d as VvCheckbox,
5419
- _sfc_main$c as VvCheckboxGroup,
5420
- _sfc_main$6 as VvCombobox,
5421
- _sfc_main$5 as VvDialog,
5422
- _sfc_main$b as VvDropdown,
5423
- _sfc_main$i as VvIcon,
5424
- _sfc_main$4 as VvInputText,
5425
- _sfc_main$3 as VvProgress,
5426
- _sfc_main$2 as VvRadio,
5427
- _sfc_main$1 as VvRadioGroup,
5428
- _sfc_main$7 as VvSelect,
5429
- _sfc_main as VvTextarea
5992
+ _sfc_main$q as VvAccordion,
5993
+ _sfc_main$p as VvAccordionGroup,
5994
+ _sfc_main$o as VvAction,
5995
+ _sfc_main$m as VvAlert,
5996
+ _sfc_main$l as VvBadge,
5997
+ _sfc_main$k as VvBreadcrumb,
5998
+ _sfc_main$j as VvButton,
5999
+ _sfc_main$i as VvButtonGroup,
6000
+ _sfc_main$h as VvCard,
6001
+ _sfc_main$g as VvCheckbox,
6002
+ _sfc_main$f as VvCheckboxGroup,
6003
+ _sfc_main$9 as VvCombobox,
6004
+ _sfc_main$8 as VvDialog,
6005
+ _sfc_main$e as VvDropdown,
6006
+ _sfc_main$n as VvIcon,
6007
+ _sfc_main$7 as VvInputText,
6008
+ _sfc_main$6 as VvNav,
6009
+ _sfc_main$5 as VvProgress,
6010
+ _sfc_main$4 as VvRadio,
6011
+ _sfc_main$3 as VvRadioGroup,
6012
+ _sfc_main$a as VvSelect,
6013
+ _sfc_main$2 as VvTab,
6014
+ _sfc_main$1 as VvTextarea,
6015
+ _sfc_main as VvTooltip
5430
6016
  };