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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +64 -1
  2. package/auto-imports.d.ts +1 -1
  3. package/bin/icons.cjs +1 -1
  4. package/bin/icons.js +34 -19
  5. package/dist/components/VvAccordion/VvAccordion.es.js +33 -4
  6. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -4
  8. package/dist/components/VvAccordion/index.d.ts +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +75 -27
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +5 -5
  12. package/dist/components/VvAction/VvAction.es.js +26 -4
  13. package/dist/components/VvAction/VvAction.umd.js +1 -1
  14. package/dist/components/VvAction/VvAction.vue.d.ts +17 -4
  15. package/dist/components/VvAction/index.d.ts +5 -0
  16. package/dist/components/VvAlert/VvAlert.es.js +96 -45
  17. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  18. package/dist/components/VvAlert/VvAlert.vue.d.ts +4 -4
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +136 -66
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +4 -4
  22. package/dist/components/VvAvatar/VvAvatar.es.js +22 -1
  23. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  24. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +79 -28
  25. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  26. package/dist/components/VvBadge/VvBadge.es.js +39 -8
  27. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  28. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +224 -41
  29. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  30. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +14 -3
  31. package/dist/components/VvBreadcrumb/index.d.ts +2 -9
  32. package/dist/components/VvButton/VvButton.es.js +70 -25
  33. package/dist/components/VvButton/VvButton.umd.js +1 -1
  34. package/dist/components/VvButton/VvButton.vue.d.ts +25 -9
  35. package/dist/components/VvButton/index.d.ts +5 -0
  36. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -6
  37. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  38. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -6
  39. package/dist/components/VvCard/VvCard.es.js +47 -16
  40. package/dist/components/VvCard/VvCard.umd.js +1 -1
  41. package/dist/components/VvCheckbox/VvCheckbox.es.js +35 -7
  42. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  43. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +8 -8
  44. package/dist/components/VvCheckbox/index.d.ts +1 -1
  45. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +106 -51
  46. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  47. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
  48. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  49. package/dist/components/VvCombobox/VvCombobox.es.js +635 -400
  50. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  51. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +112 -112
  52. package/dist/components/VvCombobox/index.d.ts +32 -32
  53. package/dist/components/VvDialog/VvDialog.es.js +65 -27
  54. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  55. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  56. package/dist/components/VvDropdown/VvDropdown.es.js +87 -46
  57. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  58. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +203 -189
  59. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +12 -0
  60. package/dist/components/VvDropdown/index.d.ts +32 -32
  61. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +46 -12
  62. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  63. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  64. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +28 -1
  65. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  66. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +40 -8
  67. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  68. package/dist/components/VvIcon/VvIcon.es.js +1 -1
  69. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  70. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  71. package/dist/components/VvInputText/VvInputText.es.js +149 -99
  72. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  73. package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
  74. package/dist/components/VvInputText/index.d.ts +8 -2
  75. package/dist/components/VvNav/VvNav.es.js +115 -63
  76. package/dist/components/VvNav/VvNav.umd.js +1 -1
  77. package/dist/components/VvNav/VvNav.vue.d.ts +31 -12
  78. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  79. package/dist/components/VvNav/index.d.ts +1 -12
  80. package/dist/components/VvNavItem/VvNavItem.es.js +413 -0
  81. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  82. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  83. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  84. package/dist/components/VvProgress/VvProgress.es.js +33 -6
  85. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  86. package/dist/components/VvRadio/VvRadio.es.js +35 -7
  87. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  88. package/dist/components/VvRadio/VvRadio.vue.d.ts +8 -8
  89. package/dist/components/VvRadio/index.d.ts +1 -1
  90. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +106 -51
  91. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  92. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
  93. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  94. package/dist/components/VvSelect/VvSelect.es.js +159 -99
  95. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  96. package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
  97. package/dist/components/VvSelect/index.d.ts +1 -1
  98. package/dist/components/VvTab/VvTab.es.js +214 -99
  99. package/dist/components/VvTab/VvTab.umd.js +1 -1
  100. package/dist/components/VvTab/VvTab.vue.d.ts +40 -11
  101. package/dist/components/VvTab/index.d.ts +9 -3
  102. package/dist/components/VvTextarea/VvTextarea.es.js +123 -77
  103. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  104. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
  105. package/dist/components/VvTooltip/VvTooltip.es.js +40 -9
  106. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  107. package/dist/components/index.es.js +1593 -1012
  108. package/dist/components/index.umd.js +1 -1
  109. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  110. package/dist/composables/useOptions.d.ts +1 -1
  111. package/dist/composables/useVolver.d.ts +1 -1
  112. package/dist/directives/index.d.ts +3 -5
  113. package/dist/directives/index.es.js +60 -23
  114. package/dist/directives/index.umd.js +1 -1
  115. package/dist/directives/v-tooltip.es.js +58 -18
  116. package/dist/directives/v-tooltip.umd.js +1 -1
  117. package/dist/icons.es.js +3 -3
  118. package/dist/icons.umd.js +1 -1
  119. package/dist/index.d.ts +3 -1
  120. package/dist/index.es.js +19 -16
  121. package/dist/index.umd.js +1 -1
  122. package/dist/props/index.d.ts +58 -34
  123. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +50 -15
  124. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +332 -83
  125. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  126. package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +1 -0
  127. package/dist/stories/InputText/InputTextMask.stories.d.ts +1 -1
  128. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  129. package/dist/types/alert.d.ts +13 -0
  130. package/dist/types/floating-ui.d.ts +6 -0
  131. package/dist/types/generic.d.ts +4 -0
  132. package/dist/types/group.d.ts +37 -0
  133. package/dist/types/index.d.ts +5 -0
  134. package/dist/types/nav.d.ts +17 -0
  135. package/package.json +61 -52
  136. package/src/Volver.ts +22 -16
  137. package/src/assets/icons/detailed.json +1 -1
  138. package/src/assets/icons/normal.json +1 -1
  139. package/src/assets/icons/simple.json +1 -1
  140. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  141. package/src/components/VvAction/VvAction.vue +5 -2
  142. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  143. package/src/components/VvBreadcrumb/index.ts +2 -8
  144. package/src/components/VvCombobox/VvCombobox.vue +32 -33
  145. package/src/components/VvCombobox/index.ts +4 -0
  146. package/src/components/VvInputText/VvInputText.vue +2 -2
  147. package/src/components/VvNav/VvNav.vue +30 -50
  148. package/src/components/VvNav/VvNavItem.vue +18 -0
  149. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  150. package/src/components/VvNav/index.ts +2 -15
  151. package/src/components/VvSelect/VvSelect.vue +4 -4
  152. package/src/components/VvTab/VvTab.vue +63 -35
  153. package/src/components/VvTab/index.ts +10 -4
  154. package/src/components/VvTextarea/VvTextarea.vue +1 -1
  155. package/src/composables/useOptions.ts +2 -2
  156. package/src/composables/useUniqueId.ts +2 -2
  157. package/src/directives/index.ts +1 -4
  158. package/src/directives/v-tooltip.ts +19 -10
  159. package/src/index.ts +3 -1
  160. package/src/props/index.ts +27 -3
  161. package/src/stories/Button/ButtonModifiers.stories.ts +4 -14
  162. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  163. package/src/stories/Combobox/ComboboxOptions.stories.ts +18 -0
  164. package/src/stories/InputText/InputTextMask.stories.ts +1 -1
  165. package/src/stories/Nav/Nav.settings.ts +3 -4
  166. package/src/stories/Nav/Nav.test.ts +4 -15
  167. package/src/stories/Tab/Tab.settings.ts +9 -9
  168. package/src/stories/Tab/Tab.stories.ts +2 -2
  169. package/src/stories/Tab/Tab.test.ts +6 -14
  170. package/src/stories/argTypes.ts +1 -1
  171. package/src/types/generic.ts +6 -0
  172. package/src/types/index.ts +5 -0
  173. package/src/types/nav.ts +19 -0
  174. package/src/utils/ObjectUtilities.ts +3 -2
  175. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  176. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  177. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  178. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  179. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  180. package/src/types/generic.d.ts +0 -6
  181. /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
  182. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  183. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  184. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,5 +1,5 @@
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
- import { nanoid } from "nanoid";
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, createVNode, useSlots, h, onMounted, withDirectives, vModelCheckbox, createSlots, nextTick, Transition, toHandlers, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio } from "vue";
2
+ import { uid } from "uid";
3
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";
@@ -165,6 +165,12 @@ const ActiveProps = {
165
165
  */
166
166
  active: Boolean
167
167
  };
168
+ const CurrentProps = {
169
+ /**
170
+ * Whether the item is current
171
+ */
172
+ current: Boolean
173
+ };
168
174
  const PressedProps = {
169
175
  /**
170
176
  * Whether the item is pressed
@@ -480,6 +486,7 @@ const ActionProps = {
480
486
  ...LabelProps,
481
487
  ...PressedProps,
482
488
  ...ActiveProps,
489
+ ...CurrentProps,
483
490
  ...LinkProps,
484
491
  /**
485
492
  * Button type
@@ -495,13 +502,26 @@ const ActionProps = {
495
502
  ariaLabel: {
496
503
  type: String,
497
504
  default: void 0
505
+ },
506
+ /**
507
+ * Default tag for the action
508
+ */
509
+ defaultTag: {
510
+ type: String,
511
+ default: ActionTag.button
512
+ }
513
+ };
514
+ const NavProps = {
515
+ items: {
516
+ type: Array,
517
+ default: () => []
498
518
  }
499
519
  };
500
520
  function equals(obj1, obj2, field) {
501
- if (field)
521
+ if (field) {
502
522
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
503
- else
504
- return deepEquals(obj1, obj2);
523
+ }
524
+ return deepEquals(obj1, obj2);
505
525
  }
506
526
  function deepEquals(a, b) {
507
527
  if (a === b)
@@ -737,18 +757,18 @@ function useModifiers(prefix, modifiers, others) {
737
757
  const _hoisted_1$i = ["id", "open"];
738
758
  const _hoisted_2$d = ["aria-controls", "aria-expanded"];
739
759
  const _hoisted_3$7 = ["aria-hidden"];
740
- const __default__$n = {
760
+ const __default__$o = {
741
761
  name: "VvAccordion"
742
762
  };
743
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
744
- ...__default__$n,
763
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
764
+ ...__default__$o,
745
765
  props: VvAccordionProps,
746
766
  emits: VvAccordionEvents,
747
767
  setup(__props, { emit }) {
748
768
  const props = __props;
749
769
  const attrs = useAttrs();
750
770
  const accordionName = computed(
751
- () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
771
+ () => props.name || (attrs == null ? void 0 : attrs.id) || uid()
752
772
  );
753
773
  const {
754
774
  modifiers,
@@ -821,7 +841,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
821
841
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(onClick)(), ["prevent"]))
822
842
  }, [
823
843
  renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
824
- createTextVNode(toDisplayString(unref(title)), 1)
844
+ createTextVNode(
845
+ toDisplayString(unref(title)),
846
+ 1
847
+ /* TEXT */
848
+ )
825
849
  ])
826
850
  ], 8, _hoisted_2$d),
827
851
  createElementVNode("div", {
@@ -829,7 +853,11 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
829
853
  class: "vv-accordion__content"
830
854
  }, [
831
855
  renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ open: unref(isOpen) })), () => [
832
- createTextVNode(toDisplayString(unref(content)), 1)
856
+ createTextVNode(
857
+ toDisplayString(unref(content)),
858
+ 1
859
+ /* TEXT */
860
+ )
833
861
  ])
834
862
  ], 8, _hoisted_3$7)
835
863
  ], 10, _hoisted_1$i);
@@ -885,11 +913,11 @@ function useProvideGroupState(groupState) {
885
913
  computed(() => groupState)
886
914
  );
887
915
  }
888
- const __default__$m = {
916
+ const __default__$n = {
889
917
  name: "VvAccordionGroup"
890
918
  };
891
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
892
- ...__default__$m,
919
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
920
+ ...__default__$n,
893
921
  props: VvAccordionGroupProps,
894
922
  emits: VvAccordionGroupEvents,
895
923
  setup(__props, { emit }) {
@@ -951,29 +979,48 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
951
979
  }))
952
980
  );
953
981
  return (_ctx, _cache) => {
954
- return openBlock(), createElementBlock("div", {
955
- class: normalizeClass(unref(bemCssClasses))
956
- }, [
957
- renderSlot(_ctx.$slots, "default", {}, () => [
958
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
959
- return openBlock(), createBlock(_sfc_main$q, mergeProps({
960
- key: item.title
961
- }, {
962
- name: item.name,
963
- title: item.title,
964
- content: item.content
965
- }), {
966
- header: withCtx((data) => [
967
- renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
968
- ]),
969
- details: withCtx((data) => [
970
- renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
971
- ]),
972
- _: 2
973
- }, 1040);
974
- }), 128))
975
- ])
976
- ], 2);
982
+ return openBlock(), createElementBlock(
983
+ "div",
984
+ {
985
+ class: normalizeClass(unref(bemCssClasses))
986
+ },
987
+ [
988
+ renderSlot(_ctx.$slots, "default", {}, () => [
989
+ (openBlock(true), createElementBlock(
990
+ Fragment,
991
+ null,
992
+ renderList(unref(items), (item) => {
993
+ return openBlock(), createBlock(
994
+ _sfc_main$r,
995
+ mergeProps({
996
+ key: item.title
997
+ }, {
998
+ name: item.name,
999
+ title: item.title,
1000
+ content: item.content
1001
+ }),
1002
+ {
1003
+ header: withCtx((data) => [
1004
+ renderSlot(_ctx.$slots, `header::${item.name}`, normalizeProps(guardReactiveProps(data)))
1005
+ ]),
1006
+ details: withCtx((data) => [
1007
+ renderSlot(_ctx.$slots, `details::${item.name}`, normalizeProps(guardReactiveProps(data)))
1008
+ ]),
1009
+ _: 2
1010
+ /* DYNAMIC */
1011
+ },
1012
+ 1040
1013
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1014
+ );
1015
+ }),
1016
+ 128
1017
+ /* KEYED_FRAGMENT */
1018
+ ))
1019
+ ])
1020
+ ],
1021
+ 2
1022
+ /* CLASS */
1023
+ );
977
1024
  };
978
1025
  }
979
1026
  });
@@ -991,11 +1038,11 @@ function useInjectedDropdownItem() {
991
1038
  function useInjectedDropdownAction() {
992
1039
  return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
993
1040
  }
994
- const __default__$l = {
1041
+ const __default__$m = {
995
1042
  name: "VvAction"
996
1043
  };
997
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
998
- ...__default__$l,
1044
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1045
+ ...__default__$m,
999
1046
  props: VvActionProps,
1000
1047
  emits: VvActionEvents,
1001
1048
  setup(__props, { expose: __expose, emit }) {
@@ -1030,7 +1077,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1030
1077
  case props.href !== void 0:
1031
1078
  return ActionTag.a;
1032
1079
  default:
1033
- return ActionTag.button;
1080
+ return props.defaultTag;
1034
1081
  }
1035
1082
  });
1036
1083
  const hasProps = computed(() => {
@@ -1055,12 +1102,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1055
1102
  to: props.to,
1056
1103
  target: props.target
1057
1104
  };
1058
- default:
1105
+ case ActionTag.button:
1059
1106
  return {
1060
1107
  ...toReturn,
1061
1108
  type: props.type,
1062
1109
  disabled: props.disabled
1063
1110
  };
1111
+ default:
1112
+ return toReturn;
1064
1113
  }
1065
1114
  });
1066
1115
  const onClick = (e) => {
@@ -1086,7 +1135,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1086
1135
  class: {
1087
1136
  active: _ctx.active,
1088
1137
  pressed: unref(pressed),
1089
- disabled: _ctx.disabled
1138
+ disabled: _ctx.disabled,
1139
+ current: _ctx.current
1090
1140
  },
1091
1141
  onClickPassive: onClick,
1092
1142
  onMouseoverPassive: onMouseover,
@@ -1094,10 +1144,15 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1094
1144
  }), {
1095
1145
  default: withCtx(() => [
1096
1146
  renderSlot(_ctx.$slots, "default", {}, () => [
1097
- createTextVNode(toDisplayString(_ctx.label), 1)
1147
+ createTextVNode(
1148
+ toDisplayString(_ctx.label),
1149
+ 1
1150
+ /* TEXT */
1151
+ )
1098
1152
  ])
1099
1153
  ]),
1100
1154
  _: 3
1155
+ /* FORWARDED */
1101
1156
  }, 16, ["class"]);
1102
1157
  };
1103
1158
  }
@@ -1196,11 +1251,11 @@ const VvIconProps = {
1196
1251
  type: [String, Array]
1197
1252
  }
1198
1253
  };
1199
- const __default__$k = {
1254
+ const __default__$l = {
1200
1255
  name: "VvIcon"
1201
1256
  };
1202
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
1203
- ...__default__$k,
1257
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1258
+ ...__default__$l,
1204
1259
  props: VvIconProps,
1205
1260
  setup(__props) {
1206
1261
  const props = __props;
@@ -1288,14 +1343,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1288
1343
  color: _ctx.color,
1289
1344
  onLoad: _ctx.onLoad,
1290
1345
  icon: unref(icon)
1291
- }), null, 16, ["class"])) : createCommentVNode("", true);
1346
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
1292
1347
  };
1293
1348
  }
1294
1349
  });
1295
1350
  function useInjectedAlertGroup() {
1296
1351
  return inject(INJECTION_KEY_ALERT_GROUP, {});
1297
1352
  }
1298
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
1353
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
1299
1354
  const VvAlertProps = {
1300
1355
  ...IdProps,
1301
1356
  ...ModifiersProps,
@@ -1443,7 +1498,13 @@ const _hoisted_1$h = {
1443
1498
  };
1444
1499
  const _hoisted_2$c = ["id"];
1445
1500
  const _hoisted_3$6 = ["aria-label"];
1446
- const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("div", { class: "vv-alert__close-mask" }, null, -1);
1501
+ const _hoisted_4$5 = /* @__PURE__ */ createElementVNode(
1502
+ "div",
1503
+ { class: "vv-alert__close-mask" },
1504
+ null,
1505
+ -1
1506
+ /* HOISTED */
1507
+ );
1447
1508
  const _hoisted_5$4 = [
1448
1509
  _hoisted_4$5
1449
1510
  ];
@@ -1455,11 +1516,11 @@ const _hoisted_7$4 = {
1455
1516
  key: 2,
1456
1517
  class: "vv-alert__footer"
1457
1518
  };
1458
- const __default__$j = {
1519
+ const __default__$k = {
1459
1520
  name: "VvAlert"
1460
1521
  };
1461
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1462
- ...__default__$j,
1522
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1523
+ ...__default__$k,
1463
1524
  props: VvAlertProps,
1464
1525
  emits: VvAlertEvents,
1465
1526
  setup(__props, { expose: __expose, emit }) {
@@ -1467,47 +1528,71 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1467
1528
  const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit);
1468
1529
  __expose({ close });
1469
1530
  return (_ctx, _cache) => {
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, [
1501
- renderSlot(_ctx.$slots, "default", {}, () => [
1502
- createTextVNode(toDisplayString(_ctx.content), 1)
1503
- ])
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);
1531
+ return openBlock(), createElementBlock(
1532
+ "div",
1533
+ normalizeProps(guardReactiveProps(unref(hasProps))),
1534
+ [
1535
+ _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, [
1536
+ unref(hasIcon) ? (openBlock(), createBlock(
1537
+ _sfc_main$o,
1538
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }),
1539
+ null,
1540
+ 16
1541
+ /* FULL_PROPS */
1542
+ )) : createCommentVNode("v-if", true),
1543
+ renderSlot(_ctx.$slots, "header", {}, () => [
1544
+ renderSlot(_ctx.$slots, "title::before"),
1545
+ _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
1546
+ key: 0,
1547
+ id: unref(hasTitleId),
1548
+ class: "vv-alert__title"
1549
+ }, [
1550
+ renderSlot(_ctx.$slots, "title", {}, () => [
1551
+ createTextVNode(
1552
+ toDisplayString(_ctx.title),
1553
+ 1
1554
+ /* TEXT */
1555
+ )
1556
+ ])
1557
+ ], 8, _hoisted_2$c)) : createCommentVNode("v-if", true),
1558
+ renderSlot(_ctx.$slots, "title::after")
1559
+ ]),
1560
+ renderSlot(_ctx.$slots, "close", normalizeProps(guardReactiveProps({ close: unref(close) })), () => [
1561
+ _ctx.dismissable || _ctx.autoClose ? (openBlock(), createElementBlock("button", {
1562
+ key: 0,
1563
+ class: "vv-alert__close",
1564
+ type: "button",
1565
+ "aria-label": _ctx.closeLabel,
1566
+ onClick: _cache[0] || (_cache[0] = withModifiers(
1567
+ //@ts-ignore
1568
+ (...args) => unref(close) && unref(close)(...args),
1569
+ ["stop"]
1570
+ ))
1571
+ }, _hoisted_5$4, 8, _hoisted_3$6)) : createCommentVNode("v-if", true)
1572
+ ])
1573
+ ])) : createCommentVNode("v-if", true),
1574
+ _ctx.$slots.default || _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
1575
+ renderSlot(_ctx.$slots, "default", {}, () => [
1576
+ createTextVNode(
1577
+ toDisplayString(_ctx.content),
1578
+ 1
1579
+ /* TEXT */
1580
+ )
1581
+ ])
1582
+ ])) : createCommentVNode("v-if", true),
1583
+ _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", _hoisted_7$4, [
1584
+ renderSlot(_ctx.$slots, "footer", {}, () => [
1585
+ createTextVNode(
1586
+ toDisplayString(_ctx.footer),
1587
+ 1
1588
+ /* TEXT */
1589
+ )
1590
+ ])
1591
+ ])) : createCommentVNode("v-if", true)
1592
+ ],
1593
+ 16
1594
+ /* FULL_PROPS */
1595
+ );
1511
1596
  };
1512
1597
  }
1513
1598
  });
@@ -1515,25 +1600,35 @@ const VvBadgeProps = {
1515
1600
  ...ModifiersProps,
1516
1601
  value: [String, Number]
1517
1602
  };
1518
- const __default__$i = {
1603
+ const __default__$j = {
1519
1604
  name: "VvBadge"
1520
1605
  };
1521
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1522
- ...__default__$i,
1606
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1607
+ ...__default__$j,
1523
1608
  props: VvBadgeProps,
1524
1609
  setup(__props) {
1525
1610
  const props = __props;
1526
1611
  const { modifiers } = toRefs(props);
1527
1612
  const bemCssClasses = useModifiers("vv-badge", modifiers);
1528
1613
  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);
1614
+ return openBlock(), createElementBlock(
1615
+ "span",
1616
+ {
1617
+ class: normalizeClass(unref(bemCssClasses)),
1618
+ role: "status"
1619
+ },
1620
+ [
1621
+ renderSlot(_ctx.$slots, "default", {}, () => [
1622
+ createTextVNode(
1623
+ toDisplayString(_ctx.value),
1624
+ 1
1625
+ /* TEXT */
1626
+ )
1627
+ ])
1628
+ ],
1629
+ 2
1630
+ /* CLASS */
1631
+ );
1537
1632
  };
1538
1633
  }
1539
1634
  });
@@ -1543,56 +1638,81 @@ const VvBreadcrumbProps = {
1543
1638
  };
1544
1639
  const _hoisted_1$g = { class: "vv-breadcrumb__list" };
1545
1640
  const _hoisted_2$b = ["content"];
1546
- const __default__$h = {
1641
+ const __default__$i = {
1547
1642
  name: "VvBreadcrumb"
1548
1643
  };
1549
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1550
- ...__default__$h,
1644
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1645
+ ...__default__$i,
1551
1646
  props: VvBreadcrumbProps,
1552
1647
  setup(__props) {
1553
1648
  const props = __props;
1554
1649
  const { modifiers } = toRefs(props);
1555
1650
  const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
1651
+ const length = computed(() => {
1652
+ var _a;
1653
+ return ((_a = props.routes) == null ? void 0 : _a.length) ?? 0;
1654
+ });
1655
+ const isLast = (index) => index === length.value - 1;
1556
1656
  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
1657
+ return openBlock(), createElementBlock(
1658
+ "nav",
1659
+ {
1660
+ class: normalizeClass(unref(bemCssClasses)),
1661
+ "aria-label": "breadcrumbs"
1662
+ },
1663
+ [
1664
+ createElementVNode("ol", _hoisted_1$g, [
1665
+ (openBlock(true), createElementBlock(
1666
+ Fragment,
1667
+ null,
1668
+ renderList(_ctx.routes, ({ label, ...route }, index) => {
1669
+ return openBlock(), createElementBlock(
1670
+ "li",
1671
+ {
1672
+ key: `${label}-${index}`,
1673
+ class: normalizeClass(
1674
+ !isLast(index) ? "vv-breadcrumb__item" : "vv-breadcrumb__item-active"
1675
+ ),
1676
+ itemprop: "itemListElement",
1677
+ itemtype: "https://schema.org/ListItem",
1678
+ itemscope: ""
1679
+ },
1680
+ [
1681
+ createVNode(_sfc_main$p, mergeProps(route, {
1682
+ class: !isLast(index) ? "vv-breadcrumb__link" : "vv-breadcrumb__label",
1683
+ "aria-current": isLast(index) ? "page" : void 0,
1684
+ itemprop: "item",
1685
+ "default-tag": "span"
1686
+ }), {
1687
+ default: withCtx(() => [
1688
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
1689
+ createTextVNode(
1690
+ toDisplayString(label),
1691
+ 1
1692
+ /* TEXT */
1693
+ )
1694
+ ])
1695
+ ]),
1696
+ _: 2
1697
+ /* DYNAMIC */
1698
+ }, 1040, ["class", "aria-current"]),
1699
+ createElementVNode("meta", {
1700
+ itemprop: "position",
1701
+ content: `${index + 1}`
1702
+ }, null, 8, _hoisted_2$b)
1703
+ ],
1704
+ 2
1705
+ /* CLASS */
1706
+ );
1569
1707
  }),
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);
1708
+ 128
1709
+ /* KEYED_FRAGMENT */
1710
+ ))
1711
+ ])
1712
+ ],
1713
+ 2
1714
+ /* CLASS */
1715
+ );
1596
1716
  };
1597
1717
  }
1598
1718
  });
@@ -1708,11 +1828,11 @@ const _hoisted_2$a = {
1708
1828
  key: 1,
1709
1829
  class: "vv-button__label"
1710
1830
  };
1711
- const __default__$g = {
1831
+ const __default__$h = {
1712
1832
  name: "VvButton"
1713
1833
  };
1714
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1715
- ...__default__$g,
1834
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1835
+ ...__default__$h,
1716
1836
  props: VvButtonProps,
1717
1837
  emits: VvButtonEvents,
1718
1838
  setup(__props, { expose: __expose, emit }) {
@@ -1790,7 +1910,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1790
1910
  }
1791
1911
  };
1792
1912
  return (_ctx, _cache) => {
1793
- return openBlock(), createBlock(_sfc_main$o, mergeProps({
1913
+ return openBlock(), createBlock(_sfc_main$p, mergeProps({
1794
1914
  disabled: unref(disabled),
1795
1915
  pressed: unref(pressed),
1796
1916
  active: _ctx.active,
@@ -1810,28 +1930,51 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1810
1930
  default: withCtx(() => [
1811
1931
  renderSlot(_ctx.$slots, "default", {}, () => [
1812
1932
  _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
1813
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$n, {
1933
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$o, {
1814
1934
  key: 0,
1815
1935
  class: "vv-button__loading-icon",
1816
1936
  name: _ctx.loadingIcon
1817
- }, null, 8, ["name"])) : createCommentVNode("", true),
1818
- _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$f, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
1819
- ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1820
- renderSlot(_ctx.$slots, "before"),
1821
- unref(icon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
1822
- key: 0,
1823
- class: "vv-button__icon"
1824
- }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
1825
- unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$a, [
1826
- renderSlot(_ctx.$slots, "label", {}, () => [
1827
- createTextVNode(toDisplayString(unref(label)), 1)
1828
- ])
1829
- ])) : createCommentVNode("", true),
1830
- renderSlot(_ctx.$slots, "after")
1831
- ], 64))
1937
+ }, null, 8, ["name"])) : createCommentVNode("v-if", true),
1938
+ _ctx.loadingLabel ? (openBlock(), createElementBlock(
1939
+ "span",
1940
+ _hoisted_1$f,
1941
+ toDisplayString(_ctx.loadingLabel),
1942
+ 1
1943
+ /* TEXT */
1944
+ )) : createCommentVNode("v-if", true)
1945
+ ]) : (openBlock(), createElementBlock(
1946
+ Fragment,
1947
+ { key: 1 },
1948
+ [
1949
+ renderSlot(_ctx.$slots, "before"),
1950
+ unref(icon) ? (openBlock(), createBlock(
1951
+ _sfc_main$o,
1952
+ mergeProps({
1953
+ key: 0,
1954
+ class: "vv-button__icon"
1955
+ }, unref(hasIconProps)),
1956
+ null,
1957
+ 16
1958
+ /* FULL_PROPS */
1959
+ )) : createCommentVNode("v-if", true),
1960
+ unref(label) ? (openBlock(), createElementBlock("span", _hoisted_2$a, [
1961
+ renderSlot(_ctx.$slots, "label", {}, () => [
1962
+ createTextVNode(
1963
+ toDisplayString(unref(label)),
1964
+ 1
1965
+ /* TEXT */
1966
+ )
1967
+ ])
1968
+ ])) : createCommentVNode("v-if", true),
1969
+ renderSlot(_ctx.$slots, "after")
1970
+ ],
1971
+ 64
1972
+ /* STABLE_FRAGMENT */
1973
+ ))
1832
1974
  ])
1833
1975
  ]),
1834
1976
  _: 3
1977
+ /* FORWARDED */
1835
1978
  }, 16, ["id", "class"]);
1836
1979
  };
1837
1980
  }
@@ -1855,11 +1998,11 @@ const VvButtonGroupProps = {
1855
1998
  }
1856
1999
  };
1857
2000
  const VvButtonGroupEvents = ["update:modelValue"];
1858
- const __default__$f = {
2001
+ const __default__$g = {
1859
2002
  name: "VvButtonGroup"
1860
2003
  };
1861
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1862
- ...__default__$f,
2004
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2005
+ ...__default__$g,
1863
2006
  props: VvButtonGroupProps,
1864
2007
  emits: VvButtonGroupEvents,
1865
2008
  setup(__props, { emit }) {
@@ -1904,12 +2047,18 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1904
2047
  });
1905
2048
  const bemCssClasses = useModifiers("vv-button-group", modifiers);
1906
2049
  return (_ctx, _cache) => {
1907
- return openBlock(), createElementBlock("div", {
1908
- class: normalizeClass(unref(bemCssClasses)),
1909
- role: "group"
1910
- }, [
1911
- renderSlot(_ctx.$slots, "default")
1912
- ], 2);
2050
+ return openBlock(), createElementBlock(
2051
+ "div",
2052
+ {
2053
+ class: normalizeClass(unref(bemCssClasses)),
2054
+ role: "group"
2055
+ },
2056
+ [
2057
+ renderSlot(_ctx.$slots, "default")
2058
+ ],
2059
+ 2
2060
+ /* CLASS */
2061
+ );
1913
2062
  };
1914
2063
  }
1915
2064
  });
@@ -1929,33 +2078,43 @@ const _hoisted_3$5 = {
1929
2078
  key: 2,
1930
2079
  class: "vv-card__footer"
1931
2080
  };
1932
- const __default__$e = {
2081
+ const __default__$f = {
1933
2082
  name: "VvCard"
1934
2083
  };
1935
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1936
- ...__default__$e,
2084
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2085
+ ...__default__$f,
1937
2086
  props: VvCardProps,
1938
2087
  setup(__props) {
1939
2088
  const props = __props;
1940
2089
  const { modifiers } = toRefs(props);
1941
2090
  const bemCssClasses = useModifiers("vv-card", modifiers);
1942
2091
  return (_ctx, _cache) => {
1943
- return openBlock(), createElementBlock("article", {
1944
- class: normalizeClass(unref(bemCssClasses))
1945
- }, [
1946
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$e, [
1947
- renderSlot(_ctx.$slots, "header", {}, () => [
1948
- createTextVNode(toDisplayString(_ctx.title), 1)
1949
- ])
1950
- ])) : createCommentVNode("", true),
1951
- renderSlot(_ctx.$slots, "default"),
1952
- _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
1953
- renderSlot(_ctx.$slots, "content")
1954
- ])) : createCommentVNode("", true),
1955
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$5, [
1956
- renderSlot(_ctx.$slots, "footer")
1957
- ])) : createCommentVNode("", true)
1958
- ], 2);
2092
+ return openBlock(), createElementBlock(
2093
+ "article",
2094
+ {
2095
+ class: normalizeClass(unref(bemCssClasses))
2096
+ },
2097
+ [
2098
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_1$e, [
2099
+ renderSlot(_ctx.$slots, "header", {}, () => [
2100
+ createTextVNode(
2101
+ toDisplayString(_ctx.title),
2102
+ 1
2103
+ /* TEXT */
2104
+ )
2105
+ ])
2106
+ ])) : createCommentVNode("v-if", true),
2107
+ renderSlot(_ctx.$slots, "default"),
2108
+ _ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
2109
+ renderSlot(_ctx.$slots, "content")
2110
+ ])) : createCommentVNode("v-if", true),
2111
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$5, [
2112
+ renderSlot(_ctx.$slots, "footer")
2113
+ ])) : createCommentVNode("v-if", true)
2114
+ ],
2115
+ 2
2116
+ /* CLASS */
2117
+ );
1959
2118
  };
1960
2119
  }
1961
2120
  });
@@ -2182,11 +2341,11 @@ function useDefaults(componentName, propsDefinition, props) {
2182
2341
  }
2183
2342
  const _hoisted_1$d = ["for"];
2184
2343
  const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
2185
- const __default__$d = {
2344
+ const __default__$e = {
2186
2345
  name: "VvCheckbox"
2187
2346
  };
2188
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2189
- ...__default__$d,
2347
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2348
+ ...__default__$e,
2190
2349
  props: VvCheckboxProps,
2191
2350
  emits: VvCheckboxEvents,
2192
2351
  setup(__props, { emit }) {
@@ -2333,12 +2492,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2333
2492
  [vModelCheckbox, unref(localModelValue)]
2334
2493
  ]),
2335
2494
  renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
2336
- createTextVNode(toDisplayString(_ctx.label), 1)
2495
+ createTextVNode(
2496
+ toDisplayString(_ctx.label),
2497
+ 1
2498
+ /* TEXT */
2499
+ )
2337
2500
  ]),
2338
2501
  createVNode(unref(HintSlot), {
2339
2502
  id: unref(hasHintId),
2340
2503
  class: "vv-checkbox__hint"
2341
- }, createSlots({ _: 2 }, [
2504
+ }, createSlots({
2505
+ _: 2
2506
+ /* DYNAMIC */
2507
+ }, [
2342
2508
  _ctx.$slots.hint ? {
2343
2509
  name: "hint",
2344
2510
  fn: withCtx(() => [
@@ -2388,7 +2554,7 @@ function useOptions(props) {
2388
2554
  return option;
2389
2555
  return typeof valueKey.value === "function" ? valueKey.value(option) : get(option, valueKey.value);
2390
2556
  };
2391
- const getOptionDisabled = (option) => {
2557
+ const isOptionDisabled = (option) => {
2392
2558
  if (typeof option !== "object" && option !== null)
2393
2559
  return false;
2394
2560
  return typeof disabledKey.value === "function" ? disabledKey.value(option) : get(option, disabledKey.value);
@@ -2402,17 +2568,17 @@ function useOptions(props) {
2402
2568
  options,
2403
2569
  getOptionLabel,
2404
2570
  getOptionValue,
2405
- getOptionDisabled,
2571
+ isOptionDisabled,
2406
2572
  getOptionGrouped
2407
2573
  };
2408
2574
  }
2409
2575
  const _hoisted_1$c = ["textContent"];
2410
2576
  const _hoisted_2$7 = { class: "vv-checkbox-group__wrapper" };
2411
- const __default__$c = {
2577
+ const __default__$d = {
2412
2578
  name: "VvCheckboxGroup"
2413
2579
  };
2414
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2415
- ...__default__$c,
2580
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2581
+ ...__default__$d,
2416
2582
  props: VvCheckboxGroupProps,
2417
2583
  emits: VvCheckboxGroupEvents,
2418
2584
  setup(__props, { emit }) {
@@ -2455,54 +2621,85 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2455
2621
  };
2456
2622
  const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
2457
2623
  return (_ctx, _cache) => {
2458
- return openBlock(), createElementBlock("fieldset", {
2459
- class: normalizeClass(unref(bemCssClasses))
2460
- }, [
2461
- _ctx.label ? (openBlock(), createElementBlock("legend", {
2462
- key: 0,
2463
- textContent: toDisplayString(_ctx.label)
2464
- }, null, 8, _hoisted_1$c)) : createCommentVNode("", true),
2465
- createElementVNode("div", _hoisted_2$7, [
2466
- _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
2467
- return openBlock(), createBlock(_sfc_main$g, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2468
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
2469
- ]),
2470
- createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
2471
- _ctx.$slots.hint ? {
2472
- name: "hint",
2473
- fn: withCtx(() => [
2474
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2475
- ]),
2476
- key: "0"
2477
- } : void 0,
2478
- _ctx.$slots.loading ? {
2479
- name: "loading",
2480
- fn: withCtx(() => [
2481
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2482
- ]),
2483
- key: "1"
2484
- } : void 0,
2485
- _ctx.$slots.valid ? {
2486
- name: "valid",
2487
- fn: withCtx(() => [
2488
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2489
- ]),
2490
- key: "2"
2491
- } : void 0,
2492
- _ctx.$slots.invalid ? {
2493
- name: "invalid",
2494
- fn: withCtx(() => [
2495
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2624
+ return openBlock(), createElementBlock(
2625
+ "fieldset",
2626
+ {
2627
+ class: normalizeClass(unref(bemCssClasses))
2628
+ },
2629
+ [
2630
+ _ctx.label ? (openBlock(), createElementBlock("legend", {
2631
+ key: 0,
2632
+ textContent: toDisplayString(_ctx.label)
2633
+ }, null, 8, _hoisted_1$c)) : createCommentVNode("v-if", true),
2634
+ createElementVNode("div", _hoisted_2$7, [
2635
+ _ctx.options.length > 0 ? (openBlock(true), createElementBlock(
2636
+ Fragment,
2637
+ { key: 0 },
2638
+ renderList(_ctx.options, (option, index) => {
2639
+ return openBlock(), createBlock(
2640
+ _sfc_main$h,
2641
+ mergeProps({ key: index }, getOptionProps(option, index)),
2642
+ null,
2643
+ 16
2644
+ /* FULL_PROPS */
2645
+ );
2646
+ }),
2647
+ 128
2648
+ /* KEYED_FRAGMENT */
2649
+ )) : renderSlot(_ctx.$slots, "default", { key: 1 })
2650
+ ]),
2651
+ createVNode(
2652
+ unref(HintSlot),
2653
+ { class: "vv-checkbox-group__hint" },
2654
+ createSlots({
2655
+ _: 2
2656
+ /* DYNAMIC */
2657
+ }, [
2658
+ _ctx.$slots.hint ? {
2659
+ name: "hint",
2660
+ fn: withCtx(() => [
2661
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2662
+ ]),
2663
+ key: "0"
2664
+ } : void 0,
2665
+ _ctx.$slots.loading ? {
2666
+ name: "loading",
2667
+ fn: withCtx(() => [
2668
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2669
+ ]),
2670
+ key: "1"
2671
+ } : void 0,
2672
+ _ctx.$slots.valid ? {
2673
+ name: "valid",
2674
+ fn: withCtx(() => [
2675
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2676
+ ]),
2677
+ key: "2"
2678
+ } : void 0,
2679
+ _ctx.$slots.invalid ? {
2680
+ name: "invalid",
2681
+ fn: withCtx(() => [
2682
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
2683
+ ]),
2684
+ key: "3"
2685
+ } : void 0
2496
2686
  ]),
2497
- key: "3"
2498
- } : void 0
2499
- ]), 1024)
2500
- ], 2);
2687
+ 1024
2688
+ /* DYNAMIC_SLOTS */
2689
+ )
2690
+ ],
2691
+ 2
2692
+ /* CLASS */
2693
+ );
2501
2694
  };
2502
2695
  }
2503
2696
  });
2504
2697
  const VvComboboxEvents = [
2505
2698
  "update:modelValue",
2699
+ "update:search",
2700
+ /**
2701
+ * @deprecated change:search should not be used, use update:search instead
2702
+ */
2506
2703
  "change:search",
2507
2704
  "focus",
2508
2705
  "blur"
@@ -2727,12 +2924,12 @@ function useProvideDropdownAction({
2727
2924
  });
2728
2925
  }
2729
2926
  const _hoisted_1$b = ["id", "tabindex", "role", "aria-labelledby"];
2730
- const __default__$b = {
2927
+ const __default__$c = {
2731
2928
  name: "VvDropdown",
2732
2929
  inheritAttrs: false
2733
2930
  };
2734
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2735
- ...__default__$b,
2931
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2932
+ ...__default__$c,
2736
2933
  props: VvDropdownProps,
2737
2934
  emits: [
2738
2935
  "update:modelValue",
@@ -3086,58 +3283,78 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3086
3283
  }
3087
3284
  };
3088
3285
  return (_ctx, _cache) => {
3089
- return openBlock(), createElementBlock(Fragment, null, [
3090
- createVNode(unref(VvDropdownTriggerProvider), null, {
3091
- default: withCtx(() => [
3092
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
3093
- ]),
3094
- _: 3
3095
- }),
3096
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
3097
- default: withCtx(() => [
3098
- withDirectives(createElementVNode("div", {
3099
- ref_key: "floatingEl",
3100
- ref: floatingEl,
3101
- style: normalizeStyle(unref(dropdownPlacement)),
3102
- class: normalizeClass(unref(bemCssClasses))
3103
- }, [
3104
- props.arrow ? (openBlock(), createElementBlock("div", {
3105
- key: 0,
3106
- ref_key: "arrowEl",
3107
- ref: arrowEl,
3108
- style: normalizeStyle(unref(arrowPlacement)),
3109
- class: "vv-dropdown__arrow"
3110
- }, null, 4)) : createCommentVNode("", true),
3111
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
3112
- createElementVNode("div", mergeProps(unref(attrs), {
3113
- id: unref(hasId),
3114
- ref_key: "listEl",
3115
- ref: listEl,
3116
- tabindex: !unref(expanded) ? -1 : void 0,
3117
- role: unref(role),
3118
- "aria-labelledby": unref(hasAriaLabelledby),
3119
- class: "vv-dropdown__list"
3120
- }), [
3121
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
3122
- role: unref(itemRole)
3123
- })))
3124
- ], 16, _hoisted_1$b),
3125
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
3126
- ], 6), [
3127
- [vShow, unref(expanded)]
3128
- ])
3129
- ]),
3130
- _: 3
3131
- }, 16, ["name"])
3132
- ], 64);
3286
+ return openBlock(), createElementBlock(
3287
+ Fragment,
3288
+ null,
3289
+ [
3290
+ createVNode(unref(VvDropdownTriggerProvider), null, {
3291
+ default: withCtx(() => [
3292
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
3293
+ ]),
3294
+ _: 3
3295
+ /* FORWARDED */
3296
+ }),
3297
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
3298
+ default: withCtx(() => [
3299
+ withDirectives(createElementVNode(
3300
+ "div",
3301
+ {
3302
+ ref_key: "floatingEl",
3303
+ ref: floatingEl,
3304
+ style: normalizeStyle(unref(dropdownPlacement)),
3305
+ class: normalizeClass(unref(bemCssClasses))
3306
+ },
3307
+ [
3308
+ props.arrow ? (openBlock(), createElementBlock(
3309
+ "div",
3310
+ {
3311
+ key: 0,
3312
+ ref_key: "arrowEl",
3313
+ ref: arrowEl,
3314
+ style: normalizeStyle(unref(arrowPlacement)),
3315
+ class: "vv-dropdown__arrow"
3316
+ },
3317
+ null,
3318
+ 4
3319
+ /* STYLE */
3320
+ )) : createCommentVNode("v-if", true),
3321
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
3322
+ createElementVNode("div", mergeProps(unref(attrs), {
3323
+ id: unref(hasId),
3324
+ ref_key: "listEl",
3325
+ ref: listEl,
3326
+ tabindex: !unref(expanded) ? -1 : void 0,
3327
+ role: unref(role),
3328
+ "aria-labelledby": unref(hasAriaLabelledby),
3329
+ class: "vv-dropdown__list"
3330
+ }), [
3331
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
3332
+ role: unref(itemRole)
3333
+ })))
3334
+ ], 16, _hoisted_1$b),
3335
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
3336
+ ],
3337
+ 6
3338
+ /* CLASS, STYLE */
3339
+ ), [
3340
+ [vShow, unref(expanded)]
3341
+ ])
3342
+ ]),
3343
+ _: 3
3344
+ /* FORWARDED */
3345
+ }, 16, ["name"])
3346
+ ],
3347
+ 64
3348
+ /* STABLE_FRAGMENT */
3349
+ );
3133
3350
  };
3134
3351
  }
3135
3352
  });
3136
- const __default__$a = {
3353
+ const __default__$b = {
3137
3354
  name: "VvDropdownItem"
3138
3355
  };
3139
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
3140
- ...__default__$a,
3356
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3357
+ ...__default__$b,
3141
3358
  setup(__props) {
3142
3359
  const { role, expanded } = useInjectedDropdownItem();
3143
3360
  const element = ref(null);
@@ -3151,22 +3368,28 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3151
3368
  }
3152
3369
  });
3153
3370
  return (_ctx, _cache) => {
3154
- return openBlock(), createElementBlock("div", mergeProps({ role: unref(role) }, {
3155
- ref_key: "element",
3156
- ref: element,
3157
- class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
3158
- }), [
3159
- renderSlot(_ctx.$slots, "default")
3160
- ], 16);
3371
+ return openBlock(), createElementBlock(
3372
+ "div",
3373
+ mergeProps({ role: unref(role) }, {
3374
+ ref_key: "element",
3375
+ ref: element,
3376
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
3377
+ }),
3378
+ [
3379
+ renderSlot(_ctx.$slots, "default")
3380
+ ],
3381
+ 16
3382
+ /* FULL_PROPS */
3383
+ );
3161
3384
  };
3162
3385
  }
3163
3386
  });
3164
3387
  const _hoisted_1$a = ["title"];
3165
- const __default__$9 = {
3388
+ const __default__$a = {
3166
3389
  name: "VvDropdownOption"
3167
3390
  };
3168
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
3169
- ...__default__$9,
3391
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3392
+ ...__default__$a,
3170
3393
  props: {
3171
3394
  ...DisabledProps,
3172
3395
  ...SelectedProps,
@@ -3203,7 +3426,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3203
3426
  }
3204
3427
  });
3205
3428
  return (_ctx, _cache) => {
3206
- return openBlock(), createBlock(_sfc_main$d, {
3429
+ return openBlock(), createBlock(_sfc_main$e, {
3207
3430
  class: normalizeClass(unref(bemCssClasses)),
3208
3431
  tabindex: _ctx.disabled ? -1 : 0,
3209
3432
  "aria-selected": _ctx.selected,
@@ -3216,11 +3439,16 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3216
3439
  title: unref(hintLabel)
3217
3440
  }, [
3218
3441
  renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps({ disabled: _ctx.disabled, selected: _ctx.selected, unselectable: _ctx.unselectable })), () => [
3219
- createTextVNode(toDisplayString(unref(hintLabel)), 1)
3442
+ createTextVNode(
3443
+ toDisplayString(unref(hintLabel)),
3444
+ 1
3445
+ /* TEXT */
3446
+ )
3220
3447
  ])
3221
3448
  ], 8, _hoisted_1$a)
3222
3449
  ]),
3223
3450
  _: 3
3451
+ /* FORWARDED */
3224
3452
  }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]);
3225
3453
  };
3226
3454
  }
@@ -3230,18 +3458,24 @@ const _hoisted_1$9 = {
3230
3458
  role: "presentation",
3231
3459
  tabindex: "-1"
3232
3460
  };
3233
- const __default__$8 = {
3461
+ const __default__$9 = {
3234
3462
  name: "VvDropdownOptgroup"
3235
3463
  };
3236
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3237
- ...__default__$8,
3464
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3465
+ ...__default__$9,
3238
3466
  props: {
3239
3467
  ...LabelProps
3240
3468
  },
3241
3469
  setup(__props) {
3242
3470
  const props = __props;
3243
3471
  return (_ctx, _cache) => {
3244
- return openBlock(), createElementBlock("li", _hoisted_1$9, toDisplayString(props.label), 1);
3472
+ return openBlock(), createElementBlock(
3473
+ "li",
3474
+ _hoisted_1$9,
3475
+ toDisplayString(props.label),
3476
+ 1
3477
+ /* TEXT */
3478
+ );
3245
3479
  };
3246
3480
  }
3247
3481
  });
@@ -3354,11 +3588,11 @@ const _hoisted_10 = {
3354
3588
  key: 1,
3355
3589
  class: "vv-select__input-after"
3356
3590
  };
3357
- const __default__$7 = {
3591
+ const __default__$8 = {
3358
3592
  name: "VvSelect"
3359
3593
  };
3360
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3361
- ...__default__$7,
3594
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3595
+ ...__default__$8,
3362
3596
  props: VvSelectProps,
3363
3597
  emits: VvSelectEmits,
3364
3598
  setup(__props, { emit }) {
@@ -3455,7 +3689,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3455
3689
  const {
3456
3690
  getOptionLabel,
3457
3691
  getOptionValue,
3458
- getOptionDisabled,
3692
+ isOptionDisabled,
3459
3693
  getOptionGrouped
3460
3694
  } = useOptions(props);
3461
3695
  const localModelValue = computed({
@@ -3475,101 +3709,140 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3475
3709
  return option && option.options && option.options.length > 0;
3476
3710
  };
3477
3711
  return (_ctx, _cache) => {
3478
- return openBlock(), createElementBlock("div", {
3479
- class: normalizeClass(unref(bemCssClasses))
3480
- }, [
3481
- _ctx.label ? (openBlock(), createElementBlock("label", {
3482
- key: 0,
3483
- for: unref(hasId)
3484
- }, toDisplayString(_ctx.label), 9, _hoisted_1$8)) : createCommentVNode("", true),
3485
- createElementVNode("div", _hoisted_2$6, [
3486
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
3487
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3488
- ])) : createCommentVNode("", true),
3489
- createElementVNode("div", _hoisted_4$4, [
3490
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3491
- key: 0,
3492
- class: "vv-select__icon"
3493
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
3494
- withDirectives(createElementVNode("select", mergeProps({
3495
- id: unref(hasId),
3496
- ref_key: "select",
3497
- ref: select,
3498
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
3499
- }, unref(hasAttrs)), [
3500
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
3501
- key: 0,
3502
- value: void 0,
3503
- disabled: !_ctx.unselectable,
3504
- hidden: !_ctx.unselectable
3505
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$3)) : createCommentVNode("", true),
3506
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
3507
- return openBlock(), createElementBlock(Fragment, null, [
3508
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
3509
- key: index,
3510
- disabled: unref(getOptionDisabled)(option),
3511
- value: unref(getOptionValue)(option)
3512
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$3)) : (openBlock(), createElementBlock("optgroup", {
3513
- key: `group-${index}`,
3514
- disabled: unref(getOptionDisabled)(option),
3515
- label: unref(getOptionLabel)(option)
3516
- }, [
3517
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
3518
- return openBlock(), createElementBlock("option", {
3519
- key: `group-${index}-item-${i}`,
3520
- disabled: unref(getOptionDisabled)(item),
3521
- value: unref(getOptionValue)(item)
3522
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
3523
- }), 128))
3524
- ], 8, _hoisted_8$2))
3525
- ], 64);
3526
- }), 256))
3527
- ], 16, _hoisted_5$3), [
3528
- [vModelSelect, unref(localModelValue)]
3529
- ]),
3530
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3531
- key: 1,
3532
- class: "vv-select__icon vv-select__icon-after"
3533
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
3534
- ]),
3535
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
3536
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3537
- ])) : createCommentVNode("", true)
3538
- ]),
3539
- createVNode(unref(HintSlot), {
3540
- id: unref(hasHintId),
3541
- class: "vv-select__hint"
3542
- }, createSlots({ _: 2 }, [
3543
- _ctx.$slots.hint ? {
3544
- name: "hint",
3545
- fn: withCtx(() => [
3546
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3547
- ]),
3548
- key: "0"
3549
- } : void 0,
3550
- _ctx.$slots.loading ? {
3551
- name: "loading",
3552
- fn: withCtx(() => [
3553
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3554
- ]),
3555
- key: "1"
3556
- } : void 0,
3557
- _ctx.$slots.valid ? {
3558
- name: "valid",
3559
- fn: withCtx(() => [
3560
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3561
- ]),
3562
- key: "2"
3563
- } : void 0,
3564
- _ctx.$slots.invalid ? {
3565
- name: "invalid",
3566
- fn: withCtx(() => [
3567
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3712
+ return openBlock(), createElementBlock(
3713
+ "div",
3714
+ {
3715
+ class: normalizeClass(unref(bemCssClasses))
3716
+ },
3717
+ [
3718
+ _ctx.label ? (openBlock(), createElementBlock("label", {
3719
+ key: 0,
3720
+ for: unref(hasId)
3721
+ }, toDisplayString(_ctx.label), 9, _hoisted_1$8)) : createCommentVNode("v-if", true),
3722
+ createElementVNode("div", _hoisted_2$6, [
3723
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
3724
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3725
+ ])) : createCommentVNode("v-if", true),
3726
+ createElementVNode("div", _hoisted_4$4, [
3727
+ unref(hasIconBefore) ? (openBlock(), createBlock(
3728
+ _sfc_main$o,
3729
+ mergeProps({
3730
+ key: 0,
3731
+ class: "vv-select__icon"
3732
+ }, unref(hasIcon)),
3733
+ null,
3734
+ 16
3735
+ /* FULL_PROPS */
3736
+ )) : createCommentVNode("v-if", true),
3737
+ withDirectives(createElementVNode("select", mergeProps({
3738
+ id: unref(hasId),
3739
+ ref_key: "select",
3740
+ ref: select,
3741
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
3742
+ }, unref(hasAttrs)), [
3743
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
3744
+ key: 0,
3745
+ value: void 0,
3746
+ disabled: !_ctx.unselectable,
3747
+ hidden: !_ctx.unselectable
3748
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6$3)) : createCommentVNode("v-if", true),
3749
+ (openBlock(true), createElementBlock(
3750
+ Fragment,
3751
+ null,
3752
+ renderList(_ctx.options, (option, index) => {
3753
+ return openBlock(), createElementBlock(
3754
+ Fragment,
3755
+ null,
3756
+ [
3757
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
3758
+ key: index,
3759
+ disabled: unref(isOptionDisabled)(option),
3760
+ value: unref(getOptionValue)(option)
3761
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7$3)) : (openBlock(), createElementBlock("optgroup", {
3762
+ key: `group-${index}`,
3763
+ disabled: unref(isOptionDisabled)(option),
3764
+ label: unref(getOptionLabel)(option)
3765
+ }, [
3766
+ (openBlock(true), createElementBlock(
3767
+ Fragment,
3768
+ null,
3769
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
3770
+ return openBlock(), createElementBlock("option", {
3771
+ key: `group-${index}-item-${i}`,
3772
+ disabled: unref(isOptionDisabled)(item),
3773
+ value: unref(getOptionValue)(item)
3774
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9$1);
3775
+ }),
3776
+ 128
3777
+ /* KEYED_FRAGMENT */
3778
+ ))
3779
+ ], 8, _hoisted_8$2))
3780
+ ],
3781
+ 64
3782
+ /* STABLE_FRAGMENT */
3783
+ );
3784
+ }),
3785
+ 256
3786
+ /* UNKEYED_FRAGMENT */
3787
+ ))
3788
+ ], 16, _hoisted_5$3), [
3789
+ [vModelSelect, unref(localModelValue)]
3790
+ ]),
3791
+ unref(hasIconAfter) ? (openBlock(), createBlock(
3792
+ _sfc_main$o,
3793
+ mergeProps({
3794
+ key: 1,
3795
+ class: "vv-select__icon vv-select__icon-after"
3796
+ }, unref(hasIcon)),
3797
+ null,
3798
+ 16
3799
+ /* FULL_PROPS */
3800
+ )) : createCommentVNode("v-if", true)
3568
3801
  ]),
3569
- key: "3"
3570
- } : void 0
3571
- ]), 1032, ["id"])
3572
- ], 2);
3802
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
3803
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3804
+ ])) : createCommentVNode("v-if", true)
3805
+ ]),
3806
+ createVNode(unref(HintSlot), {
3807
+ id: unref(hasHintId),
3808
+ class: "vv-select__hint"
3809
+ }, createSlots({
3810
+ _: 2
3811
+ /* DYNAMIC */
3812
+ }, [
3813
+ _ctx.$slots.hint ? {
3814
+ name: "hint",
3815
+ fn: withCtx(() => [
3816
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3817
+ ]),
3818
+ key: "0"
3819
+ } : void 0,
3820
+ _ctx.$slots.loading ? {
3821
+ name: "loading",
3822
+ fn: withCtx(() => [
3823
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3824
+ ]),
3825
+ key: "1"
3826
+ } : void 0,
3827
+ _ctx.$slots.valid ? {
3828
+ name: "valid",
3829
+ fn: withCtx(() => [
3830
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3831
+ ]),
3832
+ key: "2"
3833
+ } : void 0,
3834
+ _ctx.$slots.invalid ? {
3835
+ name: "invalid",
3836
+ fn: withCtx(() => [
3837
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
3838
+ ]),
3839
+ key: "3"
3840
+ } : void 0
3841
+ ]), 1032, ["id"])
3842
+ ],
3843
+ 2
3844
+ /* CLASS */
3845
+ );
3573
3846
  };
3574
3847
  }
3575
3848
  });
@@ -3591,17 +3864,17 @@ const _hoisted_9 = {
3591
3864
  key: 1,
3592
3865
  class: "vv-select__input-after"
3593
3866
  };
3594
- const __default__$6 = {
3867
+ const __default__$7 = {
3595
3868
  name: "VvCombobox",
3596
3869
  components: {
3597
- VvDropdown: _sfc_main$e,
3598
- VvDropdownOption: _sfc_main$c,
3599
- VvDropdownOptgroup: _sfc_main$b,
3600
- VvButton: _sfc_main$j
3870
+ VvDropdown: _sfc_main$f,
3871
+ VvDropdownOption: _sfc_main$d,
3872
+ VvDropdownOptgroup: _sfc_main$c,
3873
+ VvButton: _sfc_main$k
3601
3874
  }
3602
3875
  };
3603
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3604
- ...__default__$6,
3876
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3877
+ ...__default__$7,
3605
3878
  props: VvComboboxProps,
3606
3879
  emits: VvComboboxEvents,
3607
3880
  setup(__props, { emit }) {
@@ -3651,10 +3924,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3651
3924
  searchText,
3652
3925
  computed(() => Number(props.debounceSearch))
3653
3926
  );
3654
- watch(
3655
- debouncedSearchText,
3656
- () => emit("change:search", debouncedSearchText.value)
3657
- );
3927
+ watch(debouncedSearchText, () => {
3928
+ emit("update:search", debouncedSearchText.value);
3929
+ emit("change:search", debouncedSearchText.value);
3930
+ });
3658
3931
  const expanded = ref(false);
3659
3932
  const toggleExpanded = () => {
3660
3933
  if (props.disabled || props.readonly)
@@ -3725,7 +3998,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3725
3998
  valid: valid.value,
3726
3999
  invalid: invalid.value,
3727
4000
  dirty: isDirty.value,
3728
- focus: focused.value,
4001
+ focus: focused.value || focusedWithin.value || expanded.value,
3729
4002
  floating: floating.value,
3730
4003
  badges: props.badges
3731
4004
  }))
@@ -3733,8 +4006,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3733
4006
  const {
3734
4007
  getOptionLabel,
3735
4008
  getOptionValue,
3736
- getOptionDisabled,
3737
- getOptionGrouped
4009
+ getOptionGrouped,
4010
+ isOptionDisabled
3738
4011
  } = useOptions(props);
3739
4012
  const filteredOptions = computedAsync(async () => {
3740
4013
  var _a;
@@ -3753,19 +4026,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3753
4026
  return getOptionLabel(option).toLowerCase().includes(debouncedSearchText.value.toLowerCase().trim());
3754
4027
  });
3755
4028
  });
3756
- function getOptionSelected(option) {
4029
+ function isOptionSelected(option) {
3757
4030
  if (Array.isArray(props.modelValue)) {
3758
4031
  return contains(option, props.modelValue) || contains(getOptionValue(option), props.modelValue);
3759
4032
  }
3760
4033
  return equals(option, props.modelValue) || equals(getOptionValue(option), props.modelValue);
3761
4034
  }
3762
4035
  const selectedOptions = computed(() => {
3763
- let selectedValues = [];
3764
- if (Array.isArray(props.modelValue)) {
3765
- selectedValues = props.modelValue;
3766
- } else if (props.modelValue) {
3767
- selectedValues = [props.modelValue];
3768
- }
3769
4036
  const options = props.options.reduce(
3770
4037
  (acc, value) => {
3771
4038
  if (isGroup(value)) {
@@ -3776,12 +4043,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3776
4043
  []
3777
4044
  );
3778
4045
  return options.filter((option) => {
3779
- if (isGroup(option)) {
3780
- return getOptionGrouped(option).some(
3781
- (item) => selectedValues.includes(getOptionValue(item))
3782
- );
3783
- }
3784
- return selectedValues.includes(getOptionValue(option));
4046
+ return isOptionSelected(option);
3785
4047
  });
3786
4048
  });
3787
4049
  const hasValue = computed(() => {
@@ -3813,7 +4075,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3813
4075
  if (!props.keepOpen) {
3814
4076
  collapse();
3815
4077
  }
3816
- if (props.unselectable && value === props.modelValue) {
4078
+ if (Array.isArray(props.modelValue)) {
4079
+ if (props.unselectable && props.modelValue.includes(value)) {
4080
+ toReturn = [];
4081
+ } else {
4082
+ toReturn = [value];
4083
+ }
4084
+ } else if (props.unselectable && value === props.modelValue) {
3817
4085
  toReturn = void 0;
3818
4086
  }
3819
4087
  }
@@ -3889,208 +4157,307 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3889
4157
  key: 0,
3890
4158
  id: unref(hasLabelId),
3891
4159
  for: unref(propsDefaults).searchable ? unref(hasSearchId) : void 0
3892
- }, toDisplayString(_ctx.label), 9, _hoisted_2$5)) : createCommentVNode("", true),
3893
- createElementVNode("div", {
3894
- ref_key: "wrapperEl",
3895
- ref: wrapperEl,
3896
- class: "vv-select__wrapper"
3897
- }, [
3898
- createVNode(_sfc_main$e, mergeProps({
3899
- ref_key: "dropdownEl",
3900
- ref: dropdownEl,
3901
- modelValue: unref(expanded),
3902
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
3903
- }, unref(dropdownProps), {
3904
- role: unref(DropdownRole).listbox,
3905
- onAfterExpand,
3906
- onAfterCollapse
3907
- }), createSlots({
3908
- default: withCtx(({ aria }) => [
3909
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
3910
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3911
- ])) : createCommentVNode("", true),
3912
- createElementVNode("div", _hoisted_5$2, [
3913
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3914
- key: 0,
3915
- class: "vv-select__icon"
3916
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
3917
- createElementVNode("div", mergeProps({
3918
- ref_key: "inputEl",
3919
- ref: inputEl
3920
- }, aria, {
3921
- class: "vv-select__input",
3922
- role: "combobox",
3923
- "aria-expanded": unref(expanded),
3924
- "aria-labelledby": unref(hasLabelId),
3925
- "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
3926
- "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
3927
- tabindex: unref(hasTabindex),
3928
- onClickPassive: onClickInput
3929
- }), [
3930
- renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3931
- unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3932
- !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3933
- return openBlock(), createBlock(_sfc_main$l, {
3934
- key: index,
3935
- modifiers: _ctx.badgeModifiers,
3936
- class: "vv-select__badge"
3937
- }, {
3938
- default: withCtx(() => [
3939
- createTextVNode(toDisplayString(unref(getOptionLabel)(option)) + " ", 1),
3940
- _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
3941
- key: 0,
3942
- "aria-label": unref(propsDefaults).deselectActionLabel,
3943
- type: "button",
3944
- onClick: withModifiers(($event) => onInput(option), ["stop"])
3945
- }, [
3946
- createVNode(_sfc_main$n, { name: "close" })
3947
- ], 8, _hoisted_8$1)) : createCommentVNode("", true)
3948
- ]),
3949
- _: 2
3950
- }, 1032, ["modifiers"]);
3951
- }), 128))
3952
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3953
- createTextVNode(toDisplayString(_ctx.placeholder), 1)
3954
- ], 64))
3955
- ])
3956
- ], 16, _hoisted_6$2),
3957
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3958
- key: 1,
3959
- class: "vv-select__icon vv-select__icon-after"
3960
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
3961
- ]),
3962
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
3963
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
3964
- ])) : createCommentVNode("", true)
3965
- ]),
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)
4160
+ }, toDisplayString(_ctx.label), 9, _hoisted_2$5)) : createCommentVNode("v-if", true),
4161
+ createElementVNode(
4162
+ "div",
4163
+ {
4164
+ ref_key: "wrapperEl",
4165
+ ref: wrapperEl,
4166
+ class: "vv-select__wrapper"
4167
+ },
4168
+ [
4169
+ createVNode(_sfc_main$f, mergeProps({
4170
+ ref_key: "dropdownEl",
4171
+ ref: dropdownEl,
4172
+ modelValue: unref(expanded),
4173
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(expanded) ? expanded.value = $event : null)
4174
+ }, unref(dropdownProps), {
4175
+ role: unref(DropdownRole).listbox,
4176
+ onAfterExpand,
4177
+ onAfterCollapse
4178
+ }), createSlots({
4179
+ default: withCtx(({ aria }) => [
4180
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
4181
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
4182
+ ])) : createCommentVNode("v-if", true),
4183
+ createElementVNode("div", _hoisted_5$2, [
4184
+ unref(hasIconBefore) ? (openBlock(), createBlock(
4185
+ _sfc_main$o,
4186
+ mergeProps({
4187
+ key: 0,
4188
+ class: "vv-select__icon"
4189
+ }, unref(hasIcon)),
4190
+ null,
4191
+ 16
4192
+ /* FULL_PROPS */
4193
+ )) : createCommentVNode("v-if", true),
4194
+ createElementVNode("div", mergeProps({
4195
+ ref_key: "inputEl",
4196
+ ref: inputEl
4197
+ }, aria, {
4198
+ class: "vv-select__input",
4199
+ role: "combobox",
4200
+ "aria-expanded": unref(expanded),
4201
+ "aria-labelledby": unref(hasLabelId),
4202
+ "aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
4203
+ "aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0,
4204
+ tabindex: unref(hasTabindex),
4205
+ onClickPassive: onClickInput
4206
+ }), [
4207
+ renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
4208
+ unref(hasValue) ? (openBlock(), createElementBlock(
4209
+ Fragment,
4210
+ { key: 0 },
4211
+ [
4212
+ !_ctx.badges ? (openBlock(), createElementBlock(
4213
+ "div",
4214
+ _hoisted_7$2,
4215
+ toDisplayString(unref(hasValue)),
4216
+ 1
4217
+ /* TEXT */
4218
+ )) : (openBlock(true), createElementBlock(
4219
+ Fragment,
4220
+ { key: 1 },
4221
+ renderList(unref(selectedOptions), (option, index) => {
4222
+ return openBlock(), createBlock(_sfc_main$m, {
4223
+ key: index,
4224
+ modifiers: _ctx.badgeModifiers,
4225
+ class: "vv-select__badge"
4226
+ }, {
4227
+ default: withCtx(() => [
4228
+ createTextVNode(
4229
+ toDisplayString(unref(getOptionLabel)(option)) + " ",
4230
+ 1
4231
+ /* TEXT */
4232
+ ),
4233
+ _ctx.unselectable && !unref(readonly) && !unref(disabled) ? (openBlock(), createElementBlock("button", {
4234
+ key: 0,
4235
+ "aria-label": unref(propsDefaults).deselectActionLabel,
4236
+ type: "button",
4237
+ onClick: withModifiers(($event) => onInput(option), ["stop"])
4238
+ }, [
4239
+ createVNode(_sfc_main$o, { name: "close" })
4240
+ ], 8, _hoisted_8$1)) : createCommentVNode("v-if", true)
4241
+ ]),
4242
+ _: 2
4243
+ /* DYNAMIC */
4244
+ }, 1032, ["modifiers"]);
4245
+ }),
4246
+ 128
4247
+ /* KEYED_FRAGMENT */
4248
+ ))
4249
+ ],
4250
+ 64
4251
+ /* STABLE_FRAGMENT */
4252
+ )) : (openBlock(), createElementBlock(
4253
+ Fragment,
4254
+ { key: 1 },
4255
+ [
4256
+ createTextVNode(
4257
+ toDisplayString(_ctx.placeholder),
4258
+ 1
4259
+ /* TEXT */
4260
+ )
4261
+ ],
4262
+ 64
4263
+ /* STABLE_FRAGMENT */
4264
+ ))
4044
4265
  ])
4045
- ]),
4046
- _: 3
4047
- })) : createCommentVNode("", true)
4048
- ];
4049
- }),
4050
- after: withCtx(() => [
4051
- renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
4266
+ ], 16, _hoisted_6$2),
4267
+ unref(hasIconAfter) ? (openBlock(), createBlock(
4268
+ _sfc_main$o,
4269
+ mergeProps({
4270
+ key: 1,
4271
+ class: "vv-select__icon vv-select__icon-after"
4272
+ }, unref(hasIcon)),
4273
+ null,
4274
+ 16
4275
+ /* FULL_PROPS */
4276
+ )) : createCommentVNode("v-if", true)
4277
+ ]),
4278
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_9, [
4279
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
4280
+ ])) : createCommentVNode("v-if", true)
4281
+ ]),
4282
+ items: withCtx(() => {
4052
4283
  var _a;
4053
4284
  return [
4054
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$j, {
4055
- key: 0,
4056
- label: unref(propsDefaults).closeLabel,
4057
- modifiers: "secondary",
4058
- onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
4059
- }, null, 8, ["label"])) : createCommentVNode("", true)
4285
+ !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(
4286
+ Fragment,
4287
+ { key: 0 },
4288
+ renderList(unref(filteredOptions), (option, index) => {
4289
+ return openBlock(), createElementBlock(
4290
+ Fragment,
4291
+ { key: index },
4292
+ [
4293
+ isGroup(option) ? (openBlock(), createElementBlock(
4294
+ Fragment,
4295
+ { key: 0 },
4296
+ [
4297
+ createVNode(_sfc_main$c, {
4298
+ label: unref(getOptionLabel)(option)
4299
+ }, null, 8, ["label"]),
4300
+ (openBlock(true), createElementBlock(
4301
+ Fragment,
4302
+ null,
4303
+ renderList(unref(getOptionGrouped)(
4304
+ option
4305
+ ), (item, i) => {
4306
+ return openBlock(), createBlock(_sfc_main$d, mergeProps({
4307
+ selected: isOptionSelected(item),
4308
+ disabled: unref(isOptionDisabled)(item),
4309
+ unselectable: _ctx.unselectable,
4310
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
4311
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
4312
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
4313
+ }, {
4314
+ key: i,
4315
+ class: "vv-dropdown-option",
4316
+ onClickPassive: ($event) => onInput(item)
4317
+ }), {
4318
+ default: withCtx(() => [
4319
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4320
+ option,
4321
+ selectedOptions: unref(selectedOptions),
4322
+ selected: isOptionSelected(item),
4323
+ disabled: unref(isOptionDisabled)(item)
4324
+ })), () => [
4325
+ createTextVNode(
4326
+ toDisplayString(unref(getOptionLabel)(item)),
4327
+ 1
4328
+ /* TEXT */
4329
+ )
4330
+ ])
4331
+ ]),
4332
+ _: 2
4333
+ /* DYNAMIC */
4334
+ }, 1040, ["onClickPassive"]);
4335
+ }),
4336
+ 128
4337
+ /* KEYED_FRAGMENT */
4338
+ ))
4339
+ ],
4340
+ 64
4341
+ /* STABLE_FRAGMENT */
4342
+ )) : (openBlock(), createBlock(_sfc_main$d, mergeProps({ key: 1 }, {
4343
+ selected: isOptionSelected(option),
4344
+ disabled: unref(isOptionDisabled)(option),
4345
+ unselectable: _ctx.unselectable,
4346
+ deselectHintLabel: unref(propsDefaults).deselectHintLabel,
4347
+ selectHintLabel: unref(propsDefaults).selectHintLabel,
4348
+ selectedHintLabel: unref(propsDefaults).selectedHintLabel
4349
+ }, {
4350
+ class: "vv-dropdown-option",
4351
+ onClickPassive: ($event) => onInput(option)
4352
+ }), {
4353
+ default: withCtx(() => [
4354
+ renderSlot(_ctx.$slots, "option", normalizeProps(guardReactiveProps({
4355
+ option,
4356
+ selectedOptions: unref(selectedOptions),
4357
+ selected: isOptionSelected(option),
4358
+ disabled: unref(isOptionDisabled)(option)
4359
+ })), () => [
4360
+ createTextVNode(
4361
+ toDisplayString(unref(getOptionLabel)(option)),
4362
+ 1
4363
+ /* TEXT */
4364
+ )
4365
+ ])
4366
+ ]),
4367
+ _: 2
4368
+ /* DYNAMIC */
4369
+ }, 1040, ["onClickPassive"]))
4370
+ ],
4371
+ 64
4372
+ /* STABLE_FRAGMENT */
4373
+ );
4374
+ }),
4375
+ 128
4376
+ /* KEYED_FRAGMENT */
4377
+ )) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$d, {
4378
+ key: 1,
4379
+ modifiers: "inert"
4380
+ }, {
4381
+ default: withCtx(() => [
4382
+ renderSlot(_ctx.$slots, "no-options", {}, () => [
4383
+ createTextVNode(
4384
+ toDisplayString(unref(propsDefaults).noOptionsLabel),
4385
+ 1
4386
+ /* TEXT */
4387
+ )
4388
+ ])
4389
+ ]),
4390
+ _: 3
4391
+ /* FORWARDED */
4392
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$d, {
4393
+ key: 2,
4394
+ modifiers: "inert"
4395
+ }, {
4396
+ default: withCtx(() => [
4397
+ renderSlot(_ctx.$slots, "no-results", {}, () => [
4398
+ createTextVNode(
4399
+ toDisplayString(unref(propsDefaults).noResultsLabel),
4400
+ 1
4401
+ /* TEXT */
4402
+ )
4403
+ ])
4404
+ ]),
4405
+ _: 3
4406
+ /* FORWARDED */
4407
+ })) : createCommentVNode("v-if", true)
4060
4408
  ];
4061
- })
4062
- ]),
4063
- _: 2
4064
- }, [
4065
- unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
4066
- name: "before",
4067
- fn: withCtx(() => [
4068
- renderSlot(_ctx.$slots, "dropdown::before"),
4069
- unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
4070
- key: 0,
4071
- id: unref(hasSearchId),
4072
- ref_key: "inputSearchEl",
4073
- ref: inputSearchEl,
4074
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
4075
- "aria-autocomplete": "list",
4076
- "aria-controls": unref(hasDropdownId),
4077
- autocomplete: "off",
4078
- spellcheck: "false",
4079
- type: "search",
4080
- class: "vv-dropdown__search",
4081
- placeholder: unref(propsDefaults).searchPlaceholder
4082
- }, null, 8, _hoisted_3$3)), [
4083
- [vModelText, unref(searchText)]
4084
- ]) : createCommentVNode("", true)
4409
+ }),
4410
+ after: withCtx(() => [
4411
+ renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
4412
+ var _a;
4413
+ return [
4414
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$k, {
4415
+ key: 0,
4416
+ label: unref(propsDefaults).closeLabel,
4417
+ modifiers: "secondary",
4418
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(dropdownEl).hide())
4419
+ }, null, 8, ["label"])) : createCommentVNode("v-if", true)
4420
+ ];
4421
+ })
4085
4422
  ]),
4086
- key: "0"
4087
- } : void 0
4088
- ]), 1040, ["modelValue", "role"])
4089
- ], 512),
4423
+ _: 2
4424
+ /* DYNAMIC */
4425
+ }, [
4426
+ unref(propsDefaults).searchable || _ctx.$slots["dropdown::before"] ? {
4427
+ name: "before",
4428
+ fn: withCtx(() => [
4429
+ renderSlot(_ctx.$slots, "dropdown::before"),
4430
+ unref(propsDefaults).searchable && !unref(disabled) ? withDirectives((openBlock(), createElementBlock("input", {
4431
+ key: 0,
4432
+ id: unref(hasSearchId),
4433
+ ref_key: "inputSearchEl",
4434
+ ref: inputSearchEl,
4435
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchText) ? searchText.value = $event : null),
4436
+ "aria-autocomplete": "list",
4437
+ "aria-controls": unref(hasDropdownId),
4438
+ autocomplete: "off",
4439
+ spellcheck: "false",
4440
+ type: "search",
4441
+ class: "vv-dropdown__search",
4442
+ placeholder: unref(propsDefaults).searchPlaceholder
4443
+ }, null, 8, _hoisted_3$3)), [
4444
+ [vModelText, unref(searchText)]
4445
+ ]) : createCommentVNode("v-if", true)
4446
+ ]),
4447
+ key: "0"
4448
+ } : void 0
4449
+ ]), 1040, ["modelValue", "role"])
4450
+ ],
4451
+ 512
4452
+ /* NEED_PATCH */
4453
+ ),
4090
4454
  createVNode(unref(HintSlot), {
4091
4455
  id: unref(hasHintId),
4092
4456
  class: "vv-select__hint"
4093
- }, createSlots({ _: 2 }, [
4457
+ }, createSlots({
4458
+ _: 2
4459
+ /* DYNAMIC */
4460
+ }, [
4094
4461
  _ctx.$slots.hint ? {
4095
4462
  name: "hint",
4096
4463
  fn: withCtx(() => [
@@ -4120,9 +4487,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4120
4487
  key: "3"
4121
4488
  } : void 0
4122
4489
  ]), 1032, ["id"])
4123
- ], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$a, mergeProps({ key: 1 }, unref(selectProps), {
4124
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
4125
- }), null, 16));
4490
+ ], 10, _hoisted_1$7)) : (openBlock(), createBlock(
4491
+ _sfc_main$b,
4492
+ mergeProps({ key: 1 }, unref(selectProps), {
4493
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
4494
+ }),
4495
+ null,
4496
+ 16
4497
+ /* FULL_PROPS */
4498
+ ));
4126
4499
  };
4127
4500
  }
4128
4501
  });
@@ -4175,11 +4548,11 @@ const _hoisted_4$2 = {
4175
4548
  key: 1,
4176
4549
  class: "vv-dialog__footer"
4177
4550
  };
4178
- const __default__$5 = {
4551
+ const __default__$6 = {
4179
4552
  name: "VvDialog"
4180
4553
  };
4181
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4182
- ...__default__$5,
4554
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4555
+ ...__default__$6,
4183
4556
  props: VvDialogProps,
4184
4557
  emits: VvDialogEvents,
4185
4558
  setup(__props, { expose: __expose, emit }) {
@@ -4265,7 +4638,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4265
4638
  }
4266
4639
  };
4267
4640
  return (_ctx, _cache) => {
4268
- return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers)), {
4641
+ return openBlock(), createBlock(Transition, mergeProps({ name: unref(transitioName) }, toHandlers(dialogTransitionHandlers), { persisted: "" }), {
4269
4642
  default: withCtx(() => [
4270
4643
  withDirectives(createElementVNode("dialog", mergeProps(unref(dialogAttrs), {
4271
4644
  ref_key: "dialogEl",
@@ -4273,36 +4646,53 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4273
4646
  class: unref(dialogClass),
4274
4647
  onCancel: withModifiers(onCancel, ["stop", "prevent"])
4275
4648
  }), [
4276
- createElementVNode("article", {
4277
- ref_key: "modalWrapper",
4278
- ref: modalWrapper,
4279
- class: "vv-dialog__wrapper"
4280
- }, [
4281
- _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_2$4, [
4282
- renderSlot(_ctx.$slots, "header", {}, () => [
4283
- createTextVNode(toDisplayString(_ctx.title) + " ", 1),
4284
- createElementVNode("button", {
4285
- type: "button",
4286
- "aria-label": "Close",
4287
- class: "vv-dialog__close",
4288
- onClickPassive: close
4289
- }, [
4290
- createVNode(_sfc_main$n, { name: "close" })
4291
- ], 32)
4292
- ])
4293
- ])) : createCommentVNode("", true),
4294
- createElementVNode("div", _hoisted_3$2, [
4295
- renderSlot(_ctx.$slots, "default")
4296
- ]),
4297
- _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
4298
- renderSlot(_ctx.$slots, "footer")
4299
- ])) : createCommentVNode("", true)
4300
- ], 512)
4649
+ createElementVNode(
4650
+ "article",
4651
+ {
4652
+ ref_key: "modalWrapper",
4653
+ ref: modalWrapper,
4654
+ class: "vv-dialog__wrapper"
4655
+ },
4656
+ [
4657
+ _ctx.$slots.header || _ctx.title ? (openBlock(), createElementBlock("header", _hoisted_2$4, [
4658
+ renderSlot(_ctx.$slots, "header", {}, () => [
4659
+ createTextVNode(
4660
+ toDisplayString(_ctx.title) + " ",
4661
+ 1
4662
+ /* TEXT */
4663
+ ),
4664
+ createElementVNode(
4665
+ "button",
4666
+ {
4667
+ type: "button",
4668
+ "aria-label": "Close",
4669
+ class: "vv-dialog__close",
4670
+ onClickPassive: close
4671
+ },
4672
+ [
4673
+ createVNode(_sfc_main$o, { name: "close" })
4674
+ ],
4675
+ 32
4676
+ /* HYDRATE_EVENTS */
4677
+ )
4678
+ ])
4679
+ ])) : createCommentVNode("v-if", true),
4680
+ createElementVNode("div", _hoisted_3$2, [
4681
+ renderSlot(_ctx.$slots, "default")
4682
+ ]),
4683
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4$2, [
4684
+ renderSlot(_ctx.$slots, "footer")
4685
+ ])) : createCommentVNode("v-if", true)
4686
+ ],
4687
+ 512
4688
+ /* NEED_PATCH */
4689
+ )
4301
4690
  ], 16, _hoisted_1$6), [
4302
4691
  [vShow, unref(isOpened)]
4303
4692
  ])
4304
4693
  ]),
4305
4694
  _: 3
4695
+ /* FORWARDED */
4306
4696
  }, 16, ["name"]);
4307
4697
  };
4308
4698
  }
@@ -4497,7 +4887,7 @@ const VvInputTextProps = {
4497
4887
  };
4498
4888
  const VvInputPasswordAction = defineComponent({
4499
4889
  components: {
4500
- VvIcon: _sfc_main$n
4890
+ VvIcon: _sfc_main$o
4501
4891
  },
4502
4892
  props: {
4503
4893
  disabled: {
@@ -4541,7 +4931,7 @@ const VvInputPasswordAction = defineComponent({
4541
4931
  };
4542
4932
  },
4543
4933
  render() {
4544
- const icon = h(_sfc_main$n, {
4934
+ const icon = h(_sfc_main$o, {
4545
4935
  name: this.activeIcon,
4546
4936
  class: "vv-input-text__icon"
4547
4937
  });
@@ -4560,7 +4950,7 @@ const VvInputPasswordAction = defineComponent({
4560
4950
  });
4561
4951
  const VvInputStepAction = defineComponent({
4562
4952
  components: {
4563
- VvIcon: _sfc_main$n
4953
+ VvIcon: _sfc_main$o
4564
4954
  },
4565
4955
  props: {
4566
4956
  disabled: {
@@ -4605,7 +4995,7 @@ const VvInputStepAction = defineComponent({
4605
4995
  });
4606
4996
  const VvInputClearAction = defineComponent({
4607
4997
  components: {
4608
- VvIcon: _sfc_main$n
4998
+ VvIcon: _sfc_main$o
4609
4999
  },
4610
5000
  props: {
4611
5001
  disabled: {
@@ -4634,7 +5024,7 @@ const VvInputClearAction = defineComponent({
4634
5024
  };
4635
5025
  },
4636
5026
  render() {
4637
- const icon = h(_sfc_main$n, {
5027
+ const icon = h(_sfc_main$o, {
4638
5028
  name: this.icon,
4639
5029
  class: "vv-input-text__icon"
4640
5030
  });
@@ -4655,7 +5045,7 @@ function VvInputTextActionsFactory(type, parentProps) {
4655
5045
  return {
4656
5046
  name: "VvInputTextActions",
4657
5047
  components: {
4658
- VvIcon: _sfc_main$n,
5048
+ VvIcon: _sfc_main$o,
4659
5049
  VvInputPasswordAction,
4660
5050
  VvInputStepAction,
4661
5051
  VvInputClearAction
@@ -4802,11 +5192,11 @@ const _hoisted_8 = {
4802
5192
  key: 6,
4803
5193
  class: "vv-input-text__limit"
4804
5194
  };
4805
- const __default__$4 = {
5195
+ const __default__$5 = {
4806
5196
  name: "VvInputText"
4807
5197
  };
4808
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4809
- ...__default__$4,
5198
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5199
+ ...__default__$5,
4810
5200
  props: VvInputTextProps,
4811
5201
  emits: VvInputTextEvents,
4812
5202
  setup(__props, { expose: __expose, emit }) {
@@ -4973,7 +5363,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4973
5363
  return;
4974
5364
  }
4975
5365
  inputEl.value.stepUp();
4976
- localModelValue.value = unref(inputEl).value;
5366
+ localModelValue.value = Number(unref(inputEl).value);
4977
5367
  }
4978
5368
  };
4979
5369
  const onStepDown = () => {
@@ -4983,7 +5373,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4983
5373
  return;
4984
5374
  }
4985
5375
  inputEl.value.stepDown();
4986
- localModelValue.value = unref(inputEl).value;
5376
+ localModelValue.value = Number(unref(inputEl).value);
4987
5377
  }
4988
5378
  };
4989
5379
  const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
@@ -5147,174 +5537,227 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5147
5537
  emit("keydown", event);
5148
5538
  };
5149
5539
  return (_ctx, _cache) => {
5150
- return openBlock(), createElementBlock("div", {
5151
- class: normalizeClass(unref(bemCssClasses))
5152
- }, [
5153
- unref(label) ? (openBlock(), createElementBlock("label", {
5154
- key: 0,
5155
- for: unref(hasId),
5156
- class: "vv-input-text__label"
5157
- }, toDisplayString(unref(label)), 9, _hoisted_1$5)) : createCommentVNode("", true),
5158
- createElementVNode("div", _hoisted_2$3, [
5159
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
5160
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5161
- ])) : createCommentVNode("", true),
5162
- createElementVNode("div", {
5163
- ref_key: "innerEl",
5164
- ref: innerEl,
5165
- class: "vv-input-text__inner",
5166
- onClick: withModifiers(onClickInner, ["stop"])
5167
- }, [
5168
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5169
- key: 0,
5170
- class: "vv-input-text__icon"
5171
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
5172
- createElementVNode("input", mergeProps({
5173
- id: unref(hasId),
5174
- ref_key: "inputEl",
5175
- ref: inputEl
5176
- }, unref(hasAttrs), {
5177
- style: unref(hasStyle),
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),
5182
- (_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
5183
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5184
- createTextVNode(toDisplayString(_ctx.unit), 1)
5540
+ return openBlock(), createElementBlock(
5541
+ "div",
5542
+ {
5543
+ class: normalizeClass(unref(bemCssClasses))
5544
+ },
5545
+ [
5546
+ unref(label) ? (openBlock(), createElementBlock("label", {
5547
+ key: 0,
5548
+ for: unref(hasId),
5549
+ class: "vv-input-text__label"
5550
+ }, toDisplayString(unref(label)), 9, _hoisted_1$5)) : createCommentVNode("v-if", true),
5551
+ createElementVNode("div", _hoisted_2$3, [
5552
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
5553
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5554
+ ])) : createCommentVNode("v-if", true),
5555
+ createElementVNode("div", {
5556
+ ref_key: "innerEl",
5557
+ ref: innerEl,
5558
+ class: "vv-input-text__inner",
5559
+ onClick: withModifiers(onClickInner, ["stop"])
5560
+ }, [
5561
+ unref(hasIconBefore) ? (openBlock(), createBlock(
5562
+ _sfc_main$o,
5563
+ mergeProps({
5564
+ key: 0,
5565
+ class: "vv-input-text__icon"
5566
+ }, unref(hasIcon)),
5567
+ null,
5568
+ 16
5569
+ /* FULL_PROPS */
5570
+ )) : createCommentVNode("v-if", true),
5571
+ createElementVNode("input", mergeProps({
5572
+ id: unref(hasId),
5573
+ ref_key: "inputEl",
5574
+ ref: inputEl
5575
+ }, unref(hasAttrs), {
5576
+ style: unref(hasStyle),
5577
+ onKeyup: _cache[0] || (_cache[0] = ($event) => emit("keyup", $event)),
5578
+ onKeydown: onKeyDown,
5579
+ onKeypress: _cache[1] || (_cache[1] = ($event) => emit("keypress", $event))
5580
+ }), null, 16, _hoisted_5$1),
5581
+ (_ctx.unit || _ctx.$slots.unit) && unref(isDirty) ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
5582
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5583
+ createTextVNode(
5584
+ toDisplayString(_ctx.unit),
5585
+ 1
5586
+ /* TEXT */
5587
+ )
5588
+ ])
5589
+ ])) : createCommentVNode("v-if", true)
5590
+ ], 8, _hoisted_4$1),
5591
+ unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(
5592
+ _sfc_main$o,
5593
+ mergeProps({
5594
+ key: 1,
5595
+ class: "vv-input-text__icon vv-input-text__icon-after"
5596
+ }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)),
5597
+ null,
5598
+ 16
5599
+ /* FULL_PROPS */
5600
+ )) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
5601
+ key: 2,
5602
+ onTogglePassword
5603
+ })) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
5604
+ key: 3,
5605
+ onStepUp,
5606
+ onStepDown
5607
+ })) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
5608
+ key: 4,
5609
+ onClear
5610
+ })) : createCommentVNode("v-if", true),
5611
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
5612
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5613
+ ])) : createCommentVNode("v-if", true),
5614
+ unref(count) ? (openBlock(), createElementBlock("span", _hoisted_8, [
5615
+ renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5616
+ createTextVNode(
5617
+ toDisplayString(unref(countFormatted)),
5618
+ 1
5619
+ /* TEXT */
5620
+ )
5185
5621
  ])
5186
- ])) : createCommentVNode("", true)
5187
- ], 8, _hoisted_4$1),
5188
- unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5189
- key: 1,
5190
- class: "vv-input-text__icon vv-input-text__icon-after"
5191
- }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
5192
- key: 2,
5193
- onTogglePassword
5194
- })) : unref(isNumber) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(NumberInputActions), {
5195
- key: 3,
5196
- onStepUp,
5197
- onStepDown
5198
- })) : unref(isSearch) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(SearchInputActions), {
5199
- key: 4,
5200
- onClear
5201
- })) : createCommentVNode("", true),
5202
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
5203
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5204
- ])) : createCommentVNode("", true),
5205
- unref(count) ? (openBlock(), createElementBlock("span", _hoisted_8, [
5206
- renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5207
- createTextVNode(toDisplayString(unref(countFormatted)), 1)
5208
- ])
5209
- ])) : createCommentVNode("", true)
5210
- ]),
5211
- createVNode(unref(HintSlot), {
5212
- id: unref(hasHintId),
5213
- class: "vv-input-text__hint"
5214
- }, createSlots({ _: 2 }, [
5215
- _ctx.$slots.hint ? {
5216
- name: "hint",
5217
- fn: withCtx(() => [
5218
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5219
- ]),
5220
- key: "0"
5221
- } : void 0,
5222
- _ctx.$slots.loading ? {
5223
- name: "loading",
5224
- fn: withCtx(() => [
5225
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5226
- ]),
5227
- key: "1"
5228
- } : void 0,
5229
- _ctx.$slots.valid ? {
5230
- name: "valid",
5231
- fn: withCtx(() => [
5232
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5233
- ]),
5234
- key: "2"
5235
- } : void 0,
5236
- _ctx.$slots.invalid ? {
5237
- name: "invalid",
5238
- fn: withCtx(() => [
5239
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5240
- ]),
5241
- key: "3"
5242
- } : void 0
5243
- ]), 1032, ["id"])
5244
- ], 2);
5622
+ ])) : createCommentVNode("v-if", true)
5623
+ ]),
5624
+ createVNode(unref(HintSlot), {
5625
+ id: unref(hasHintId),
5626
+ class: "vv-input-text__hint"
5627
+ }, createSlots({
5628
+ _: 2
5629
+ /* DYNAMIC */
5630
+ }, [
5631
+ _ctx.$slots.hint ? {
5632
+ name: "hint",
5633
+ fn: withCtx(() => [
5634
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5635
+ ]),
5636
+ key: "0"
5637
+ } : void 0,
5638
+ _ctx.$slots.loading ? {
5639
+ name: "loading",
5640
+ fn: withCtx(() => [
5641
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5642
+ ]),
5643
+ key: "1"
5644
+ } : void 0,
5645
+ _ctx.$slots.valid ? {
5646
+ name: "valid",
5647
+ fn: withCtx(() => [
5648
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5649
+ ]),
5650
+ key: "2"
5651
+ } : void 0,
5652
+ _ctx.$slots.invalid ? {
5653
+ name: "invalid",
5654
+ fn: withCtx(() => [
5655
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5656
+ ]),
5657
+ key: "3"
5658
+ } : void 0
5659
+ ]), 1032, ["id"])
5660
+ ],
5661
+ 2
5662
+ /* CLASS */
5663
+ );
5245
5664
  };
5246
5665
  }
5247
5666
  });
5248
5667
  const VvNavProps = {
5249
5668
  ...ModifiersProps,
5250
- items: {
5251
- type: Array,
5252
- required: true,
5253
- default: () => []
5254
- }
5669
+ ...NavProps
5255
5670
  };
5256
5671
  const VvNavEvents = ["click"];
5257
5672
  const _hoisted_1$4 = {
5258
- class: "vv-nav__menu",
5259
- role: "menu",
5260
- "aria-busy": "true"
5673
+ class: "vv-nav__item",
5674
+ role: "presentation"
5675
+ };
5676
+ const __default__$4 = {
5677
+ name: "VvNavItem",
5678
+ inheritAttrs: false
5261
5679
  };
5680
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5681
+ ...__default__$4,
5682
+ setup(__props) {
5683
+ return (_ctx, _cache) => {
5684
+ return openBlock(), createElementBlock("li", _hoisted_1$4, [
5685
+ createVNode(
5686
+ _sfc_main$p,
5687
+ mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }),
5688
+ {
5689
+ default: withCtx(() => [
5690
+ renderSlot(_ctx.$slots, "default")
5691
+ ]),
5692
+ _: 3
5693
+ /* FORWARDED */
5694
+ },
5695
+ 16
5696
+ /* FULL_PROPS */
5697
+ )
5698
+ ]);
5699
+ };
5700
+ }
5701
+ });
5702
+ const _hoisted_1$3 = ["onClick"];
5262
5703
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5263
5704
  __name: "VvNav",
5264
5705
  props: VvNavProps,
5265
5706
  emits: VvNavEvents,
5266
5707
  setup(__props, { emit }) {
5267
5708
  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) {
5709
+ const { modifiers } = toRefs(props);
5710
+ const onClick = (event) => {
5711
+ var _a;
5712
+ const target = event.target;
5713
+ if (target == null ? void 0 : target.dataset.index) {
5714
+ const index = parseInt(target.dataset.index);
5715
+ const item = (_a = props.items) == null ? void 0 : _a[index];
5716
+ if (!item || (item == null ? void 0 : item.disabled)) {
5717
+ return;
5718
+ }
5281
5719
  emit("click", item);
5282
- activeItem.value = item.id;
5283
5720
  }
5284
- }
5721
+ };
5722
+ const bemCssClasses = useModifiers("vv-nav", modifiers);
5285
5723
  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);
5724
+ return openBlock(), createElementBlock(
5725
+ "nav",
5726
+ {
5727
+ class: normalizeClass(unref(bemCssClasses))
5728
+ },
5729
+ [
5730
+ createElementVNode("ul", {
5731
+ class: "vv-nav__menu",
5732
+ role: "menu",
5733
+ "aria-busy": "true",
5734
+ onClick: withModifiers(onClick, ["stop"])
5735
+ }, [
5736
+ renderSlot(_ctx.$slots, "default", {}, () => [
5737
+ (openBlock(true), createElementBlock(
5738
+ Fragment,
5739
+ null,
5740
+ renderList(_ctx.items, ({ on = {}, ...item }, index) => {
5741
+ return openBlock(), createBlock(_sfc_main$7, mergeProps({
5742
+ key: index,
5743
+ "data-index": index
5744
+ }, item, toHandlers(on)), {
5745
+ default: withCtx(() => [
5746
+ renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps({ item, index })))
5747
+ ]),
5748
+ _: 2
5749
+ /* DYNAMIC */
5750
+ }, 1040, ["data-index"]);
5751
+ }),
5752
+ 128
5753
+ /* KEYED_FRAGMENT */
5754
+ ))
5755
+ ])
5756
+ ], 8, _hoisted_1$3)
5757
+ ],
5758
+ 2
5759
+ /* CLASS */
5760
+ );
5318
5761
  };
5319
5762
  }
5320
5763
  });
@@ -5365,12 +5808,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
5365
5808
  computed(() => ({ indeterminate: indeterminate.value }))
5366
5809
  );
5367
5810
  return (_ctx, _cache) => {
5368
- return openBlock(), createElementBlock("progress", mergeProps({ role: "progressbar" }, {
5369
- class: unref(bemCssClasses),
5370
- ariaLabel: unref(ariaLabel),
5371
- max: unref(max),
5372
- value: unref(value)
5373
- }), null, 16);
5811
+ return openBlock(), createElementBlock(
5812
+ "progress",
5813
+ mergeProps({ role: "progressbar" }, {
5814
+ class: unref(bemCssClasses),
5815
+ ariaLabel: unref(ariaLabel),
5816
+ max: unref(max),
5817
+ value: unref(value)
5818
+ }),
5819
+ null,
5820
+ 16
5821
+ /* FULL_PROPS */
5822
+ );
5374
5823
  };
5375
5824
  }
5376
5825
  });
@@ -5407,7 +5856,7 @@ function useGroupProps(props, emit) {
5407
5856
  disabled
5408
5857
  };
5409
5858
  }
5410
- const _hoisted_1$3 = ["for"];
5859
+ const _hoisted_1$2 = ["for"];
5411
5860
  const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
5412
5861
  const __default__$2 = {
5413
5862
  name: "VvRadio"
@@ -5498,12 +5947,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5498
5947
  [vModelRadio, unref(localModelValue)]
5499
5948
  ]),
5500
5949
  renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
5501
- createTextVNode(toDisplayString(_ctx.label), 1)
5950
+ createTextVNode(
5951
+ toDisplayString(_ctx.label),
5952
+ 1
5953
+ /* TEXT */
5954
+ )
5502
5955
  ]),
5503
5956
  createVNode(unref(HintSlot), {
5504
5957
  id: unref(hasHintId),
5505
5958
  class: "vv-radio__hint"
5506
- }, createSlots({ _: 2 }, [
5959
+ }, createSlots({
5960
+ _: 2
5961
+ /* DYNAMIC */
5962
+ }, [
5507
5963
  _ctx.$slots.hint ? {
5508
5964
  name: "hint",
5509
5965
  fn: withCtx(() => [
@@ -5533,13 +5989,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5533
5989
  key: "3"
5534
5990
  } : void 0
5535
5991
  ]), 1032, ["id"])
5536
- ], 10, _hoisted_1$3);
5992
+ ], 10, _hoisted_1$2);
5537
5993
  };
5538
5994
  }
5539
5995
  });
5540
5996
  const VvRadioGroupProps = CheckboxRadioGroupProps;
5541
5997
  const VvRadioGroupEvents = ["update:modelValue", "change"];
5542
- const _hoisted_1$2 = ["textContent"];
5998
+ const _hoisted_1$1 = ["textContent"];
5543
5999
  const _hoisted_2$1 = { class: "vv-radio-group__wrapper" };
5544
6000
  const __default__$1 = {
5545
6001
  name: "VvRadioGroup"
@@ -5588,62 +6044,94 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5588
6044
  };
5589
6045
  const { HintSlot, hintSlotScope } = HintSlotFactory(propsDefaults, slots);
5590
6046
  return (_ctx, _cache) => {
5591
- return openBlock(), createElementBlock("fieldset", {
5592
- class: normalizeClass(unref(bemCssClasses))
5593
- }, [
5594
- _ctx.label ? (openBlock(), createElementBlock("legend", {
5595
- key: 0,
5596
- textContent: toDisplayString(_ctx.label)
5597
- }, null, 8, _hoisted_1$2)) : createCommentVNode("", true),
5598
- createElementVNode("div", _hoisted_2$1, [
5599
- _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
5600
- return openBlock(), createBlock(_sfc_main$4, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
5601
- }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
5602
- ]),
5603
- createVNode(unref(HintSlot), { class: "vv-radio-group__hint" }, createSlots({ _: 2 }, [
5604
- _ctx.$slots.hint ? {
5605
- name: "hint",
5606
- fn: withCtx(() => [
5607
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5608
- ]),
5609
- key: "0"
5610
- } : void 0,
5611
- _ctx.$slots.loading ? {
5612
- name: "loading",
5613
- fn: withCtx(() => [
5614
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5615
- ]),
5616
- key: "1"
5617
- } : void 0,
5618
- _ctx.$slots.valid ? {
5619
- name: "valid",
5620
- fn: withCtx(() => [
5621
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5622
- ]),
5623
- key: "2"
5624
- } : void 0,
5625
- _ctx.$slots.invalid ? {
5626
- name: "invalid",
5627
- fn: withCtx(() => [
5628
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6047
+ return openBlock(), createElementBlock(
6048
+ "fieldset",
6049
+ {
6050
+ class: normalizeClass(unref(bemCssClasses))
6051
+ },
6052
+ [
6053
+ _ctx.label ? (openBlock(), createElementBlock("legend", {
6054
+ key: 0,
6055
+ textContent: toDisplayString(_ctx.label)
6056
+ }, null, 8, _hoisted_1$1)) : createCommentVNode("v-if", true),
6057
+ createElementVNode("div", _hoisted_2$1, [
6058
+ _ctx.options.length > 0 ? (openBlock(true), createElementBlock(
6059
+ Fragment,
6060
+ { key: 0 },
6061
+ renderList(_ctx.options, (option, index) => {
6062
+ return openBlock(), createBlock(
6063
+ _sfc_main$4,
6064
+ mergeProps({ key: index }, getOptionProps(option, index)),
6065
+ null,
6066
+ 16
6067
+ /* FULL_PROPS */
6068
+ );
6069
+ }),
6070
+ 128
6071
+ /* KEYED_FRAGMENT */
6072
+ )) : renderSlot(_ctx.$slots, "default", { key: 1 })
6073
+ ]),
6074
+ createVNode(
6075
+ unref(HintSlot),
6076
+ { class: "vv-radio-group__hint" },
6077
+ createSlots({
6078
+ _: 2
6079
+ /* DYNAMIC */
6080
+ }, [
6081
+ _ctx.$slots.hint ? {
6082
+ name: "hint",
6083
+ fn: withCtx(() => [
6084
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6085
+ ]),
6086
+ key: "0"
6087
+ } : void 0,
6088
+ _ctx.$slots.loading ? {
6089
+ name: "loading",
6090
+ fn: withCtx(() => [
6091
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6092
+ ]),
6093
+ key: "1"
6094
+ } : void 0,
6095
+ _ctx.$slots.valid ? {
6096
+ name: "valid",
6097
+ fn: withCtx(() => [
6098
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6099
+ ]),
6100
+ key: "2"
6101
+ } : void 0,
6102
+ _ctx.$slots.invalid ? {
6103
+ name: "invalid",
6104
+ fn: withCtx(() => [
6105
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6106
+ ]),
6107
+ key: "3"
6108
+ } : void 0
5629
6109
  ]),
5630
- key: "3"
5631
- } : void 0
5632
- ]), 1024)
5633
- ], 2);
6110
+ 1024
6111
+ /* DYNAMIC_SLOTS */
6112
+ )
6113
+ ],
6114
+ 2
6115
+ /* CLASS */
6116
+ );
5634
6117
  };
5635
6118
  }
5636
6119
  });
5637
6120
  const VvTabProps = {
5638
6121
  ...ModifiersProps,
6122
+ navModifiers: {
6123
+ type: [String, Array]
6124
+ },
6125
+ modelValue: {
6126
+ type: String,
6127
+ default: ""
6128
+ },
5639
6129
  items: {
5640
6130
  type: Array,
5641
- required: true,
5642
6131
  default: () => []
5643
6132
  }
5644
6133
  };
5645
- const VvTabEvents = ["click"];
5646
- const _hoisted_1$1 = ["id"];
6134
+ const VvTabEvents = ["update:modelValue"];
5647
6135
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5648
6136
  __name: "VvTab",
5649
6137
  props: VvTabProps,
@@ -5651,41 +6139,99 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5651
6139
  setup(__props, { emit }) {
5652
6140
  const props = __props;
5653
6141
  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
- });
6142
+ const tabKeys = computed(() => {
6143
+ return items.value.reduce((acc, item) => {
6144
+ if (item.tab) {
6145
+ acc.push(item.tab);
6146
+ }
6147
+ return acc;
6148
+ }, []);
5663
6149
  });
5664
- function onClick(item) {
5665
- if (!item.disabled) {
5666
- emit("click", item);
5667
- activeTab.value = item.id;
6150
+ const localModelValue = ref();
6151
+ const activeTabKey = computed({
6152
+ get: () => {
6153
+ var _a;
6154
+ return props.modelValue || localModelValue.value || ((_a = tabKeys.value) == null ? void 0 : _a[0]);
6155
+ },
6156
+ set: (newValue) => {
6157
+ localModelValue.value = newValue;
6158
+ emit("update:modelValue", newValue);
5668
6159
  }
5669
- }
6160
+ });
6161
+ const hasNavModifiers = computed(() => {
6162
+ var _a;
6163
+ return [
6164
+ "tabs",
6165
+ ...Array.isArray(props.navModifiers) ? props.navModifiers : ((_a = props.navModifiers) == null ? void 0 : _a.split(" ")) ?? []
6166
+ ];
6167
+ });
6168
+ const onNavClick = (item) => {
6169
+ if (item.tab) {
6170
+ activeTabKey.value = item.tab;
6171
+ }
6172
+ };
6173
+ const navItems = computed(
6174
+ () => props.items.map((item) => ({
6175
+ current: item.tab === activeTabKey.value,
6176
+ ...item
6177
+ }))
6178
+ );
6179
+ const bemCssClasses = useModifiers("vv-tab", modifiers);
5670
6180
  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);
6181
+ return openBlock(), createElementBlock(
6182
+ "div",
6183
+ {
6184
+ class: normalizeClass(unref(bemCssClasses))
6185
+ },
6186
+ [
6187
+ createVNode(
6188
+ _sfc_main$6,
6189
+ mergeProps({
6190
+ items: unref(navItems),
6191
+ modifiers: unref(hasNavModifiers)
6192
+ }, { onClick: onNavClick }),
6193
+ {
6194
+ item: withCtx(({ item, index }) => [
6195
+ renderSlot(_ctx.$slots, "nav-item", normalizeProps(guardReactiveProps({ item, index })))
6196
+ ]),
6197
+ _: 3
6198
+ /* FORWARDED */
6199
+ },
6200
+ 16
6201
+ /* FULL_PROPS */
6202
+ ),
6203
+ (openBlock(true), createElementBlock(
6204
+ Fragment,
6205
+ null,
6206
+ renderList(unref(items), (item, index) => {
6207
+ return openBlock(), createElementBlock(
6208
+ Fragment,
6209
+ { key: index },
6210
+ [
6211
+ item.tab ? (openBlock(), createElementBlock(
6212
+ "article",
6213
+ {
6214
+ key: 0,
6215
+ class: normalizeClass([{ target: unref(activeTabKey) === item.tab }, "vv-tab__panel"])
6216
+ },
6217
+ [
6218
+ renderSlot(_ctx.$slots, `panel::${item.tab}`)
6219
+ ],
6220
+ 2
6221
+ /* CLASS */
6222
+ )) : createCommentVNode("v-if", true)
6223
+ ],
6224
+ 64
6225
+ /* STABLE_FRAGMENT */
6226
+ );
6227
+ }),
6228
+ 128
6229
+ /* KEYED_FRAGMENT */
6230
+ ))
6231
+ ],
6232
+ 2
6233
+ /* CLASS */
6234
+ );
5689
6235
  };
5690
6236
  }
5691
6237
  });
@@ -5833,7 +6379,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5833
6379
  "icon-after": hasIconAfter.value,
5834
6380
  floating: props.floating && !isEmpty(props.label),
5835
6381
  dirty: isDirty.value,
5836
- focused: focused.value,
6382
+ focus: focused.value,
5837
6383
  resizable: props.resizable
5838
6384
  }))
5839
6385
  );
@@ -5870,81 +6416,106 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5870
6416
  localModelValue.value = void 0;
5871
6417
  };
5872
6418
  return (_ctx, _cache) => {
5873
- return openBlock(), createElementBlock("div", {
5874
- class: normalizeClass(unref(bemCssClasses))
5875
- }, [
5876
- unref(label) ? (openBlock(), createElementBlock("label", {
5877
- key: 0,
5878
- for: unref(hasId),
5879
- class: "vv-textarea__label"
5880
- }, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("", true),
5881
- createElementVNode("div", _hoisted_2, [
5882
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
5883
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5884
- ])) : createCommentVNode("", true),
5885
- createElementVNode("div", _hoisted_4, [
5886
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5887
- key: 0,
5888
- class: "vv-textarea__icon"
5889
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
5890
- withDirectives(createElementVNode("textarea", mergeProps({
5891
- id: unref(hasId),
5892
- ref_key: "textarea",
5893
- ref: textarea,
5894
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
5895
- }, unref(hasAttrs), {
5896
- onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
5897
- }), null, 16, _hoisted_5), [
5898
- [vModelText, unref(localModelValue)]
6419
+ return openBlock(), createElementBlock(
6420
+ "div",
6421
+ {
6422
+ class: normalizeClass(unref(bemCssClasses))
6423
+ },
6424
+ [
6425
+ unref(label) ? (openBlock(), createElementBlock("label", {
6426
+ key: 0,
6427
+ for: unref(hasId),
6428
+ class: "vv-textarea__label"
6429
+ }, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("v-if", true),
6430
+ createElementVNode("div", _hoisted_2, [
6431
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
6432
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
6433
+ ])) : createCommentVNode("v-if", true),
6434
+ createElementVNode("div", _hoisted_4, [
6435
+ unref(hasIconBefore) ? (openBlock(), createBlock(
6436
+ _sfc_main$o,
6437
+ mergeProps({
6438
+ key: 0,
6439
+ class: "vv-textarea__icon"
6440
+ }, unref(hasIcon)),
6441
+ null,
6442
+ 16
6443
+ /* FULL_PROPS */
6444
+ )) : createCommentVNode("v-if", true),
6445
+ withDirectives(createElementVNode("textarea", mergeProps({
6446
+ id: unref(hasId),
6447
+ ref_key: "textarea",
6448
+ ref: textarea,
6449
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
6450
+ }, unref(hasAttrs), {
6451
+ onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
6452
+ }), null, 16, _hoisted_5), [
6453
+ [vModelText, unref(localModelValue)]
6454
+ ]),
6455
+ unref(hasIconAfter) ? (openBlock(), createBlock(
6456
+ _sfc_main$o,
6457
+ mergeProps({
6458
+ key: 1,
6459
+ class: "vv-textarea__icon vv-textarea__icon-after"
6460
+ }, unref(hasIcon)),
6461
+ null,
6462
+ 16
6463
+ /* FULL_PROPS */
6464
+ )) : createCommentVNode("v-if", true)
5899
6465
  ]),
5900
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5901
- key: 1,
5902
- class: "vv-textarea__icon vv-textarea__icon-after"
5903
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
6466
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
6467
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
6468
+ ])) : createCommentVNode("v-if", true),
6469
+ unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
6470
+ renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
6471
+ createTextVNode(
6472
+ toDisplayString(unref(countFormatted)),
6473
+ 1
6474
+ /* TEXT */
6475
+ )
6476
+ ])
6477
+ ])) : createCommentVNode("v-if", true)
5904
6478
  ]),
5905
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
5906
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
5907
- ])) : createCommentVNode("", true),
5908
- unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
5909
- renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
5910
- createTextVNode(toDisplayString(unref(countFormatted)), 1)
5911
- ])
5912
- ])) : createCommentVNode("", true)
5913
- ]),
5914
- createVNode(unref(HintSlot), {
5915
- id: unref(hasHintId),
5916
- class: "vv-textarea__hint"
5917
- }, createSlots({ _: 2 }, [
5918
- _ctx.$slots.hint ? {
5919
- name: "hint",
5920
- fn: withCtx(() => [
5921
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5922
- ]),
5923
- key: "0"
5924
- } : void 0,
5925
- _ctx.$slots.loading ? {
5926
- name: "loading",
5927
- fn: withCtx(() => [
5928
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5929
- ]),
5930
- key: "1"
5931
- } : void 0,
5932
- _ctx.$slots.valid ? {
5933
- name: "valid",
5934
- fn: withCtx(() => [
5935
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5936
- ]),
5937
- key: "2"
5938
- } : void 0,
5939
- _ctx.$slots.invalid ? {
5940
- name: "invalid",
5941
- fn: withCtx(() => [
5942
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
5943
- ]),
5944
- key: "3"
5945
- } : void 0
5946
- ]), 1032, ["id"])
5947
- ], 2);
6479
+ createVNode(unref(HintSlot), {
6480
+ id: unref(hasHintId),
6481
+ class: "vv-textarea__hint"
6482
+ }, createSlots({
6483
+ _: 2
6484
+ /* DYNAMIC */
6485
+ }, [
6486
+ _ctx.$slots.hint ? {
6487
+ name: "hint",
6488
+ fn: withCtx(() => [
6489
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6490
+ ]),
6491
+ key: "0"
6492
+ } : void 0,
6493
+ _ctx.$slots.loading ? {
6494
+ name: "loading",
6495
+ fn: withCtx(() => [
6496
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6497
+ ]),
6498
+ key: "1"
6499
+ } : void 0,
6500
+ _ctx.$slots.valid ? {
6501
+ name: "valid",
6502
+ fn: withCtx(() => [
6503
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6504
+ ]),
6505
+ key: "2"
6506
+ } : void 0,
6507
+ _ctx.$slots.invalid ? {
6508
+ name: "invalid",
6509
+ fn: withCtx(() => [
6510
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
6511
+ ]),
6512
+ key: "3"
6513
+ } : void 0
6514
+ ]), 1032, ["id"])
6515
+ ],
6516
+ 2
6517
+ /* CLASS */
6518
+ );
5948
6519
  };
5949
6520
  }
5950
6521
  });
@@ -5976,40 +6547,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5976
6547
  }))
5977
6548
  );
5978
6549
  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);
6550
+ return openBlock(), createElementBlock(
6551
+ "span",
6552
+ {
6553
+ class: normalizeClass(unref(bemCssClasses)),
6554
+ role: "tooltip",
6555
+ inert: ""
6556
+ },
6557
+ [
6558
+ renderSlot(_ctx.$slots, "default", {}, () => [
6559
+ createTextVNode(
6560
+ toDisplayString(_ctx.value),
6561
+ 1
6562
+ /* TEXT */
6563
+ )
6564
+ ])
6565
+ ],
6566
+ 2
6567
+ /* CLASS */
6568
+ );
5988
6569
  };
5989
6570
  }
5990
6571
  });
5991
6572
  export {
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,
6573
+ _sfc_main$r as VvAccordion,
6574
+ _sfc_main$q as VvAccordionGroup,
6575
+ _sfc_main$p as VvAction,
6576
+ _sfc_main$n as VvAlert,
6577
+ _sfc_main$m as VvBadge,
6578
+ _sfc_main$l as VvBreadcrumb,
6579
+ _sfc_main$k as VvButton,
6580
+ _sfc_main$j as VvButtonGroup,
6581
+ _sfc_main$i as VvCard,
6582
+ _sfc_main$h as VvCheckbox,
6583
+ _sfc_main$g as VvCheckboxGroup,
6584
+ _sfc_main$a as VvCombobox,
6585
+ _sfc_main$9 as VvDialog,
6586
+ _sfc_main$f as VvDropdown,
6587
+ _sfc_main$o as VvIcon,
6588
+ _sfc_main$8 as VvInputText,
6008
6589
  _sfc_main$6 as VvNav,
6009
6590
  _sfc_main$5 as VvProgress,
6010
6591
  _sfc_main$4 as VvRadio,
6011
6592
  _sfc_main$3 as VvRadioGroup,
6012
- _sfc_main$a as VvSelect,
6593
+ _sfc_main$b as VvSelect,
6013
6594
  _sfc_main$2 as VvTab,
6014
6595
  _sfc_main$1 as VvTextarea,
6015
6596
  _sfc_main as VvTooltip