@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.4

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 (135) hide show
  1. package/dist/components/VvAccordion/VvAccordion.es.js +9 -2
  2. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +9 -2
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +1 -1
  6. package/dist/components/VvAction/VvAction.es.js +9 -1
  7. package/dist/components/VvAction/VvAction.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.vue.d.ts +3 -0
  9. package/dist/components/VvAction/index.d.ts +1 -0
  10. package/dist/components/VvAlert/VvAlert.es.js +9 -2
  11. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  12. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +9 -2
  13. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  14. package/dist/components/VvAvatar/VvAvatar.es.js +7 -0
  15. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  16. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +9 -2
  17. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  18. package/dist/components/VvBadge/VvBadge.es.js +7 -0
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +7 -0
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  22. package/dist/components/VvButton/VvButton.es.js +11 -3
  23. package/dist/components/VvButton/VvButton.umd.js +1 -1
  24. package/dist/components/VvButton/VvButton.vue.d.ts +6 -3
  25. package/dist/components/VvButton/index.d.ts +1 -0
  26. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +7 -0
  27. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  28. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  29. package/dist/components/VvCard/VvCard.es.js +7 -0
  30. package/dist/components/VvCard/VvCard.umd.js +1 -1
  31. package/dist/components/VvCheckbox/VvCheckbox.es.js +9 -2
  32. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  33. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -3
  34. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +9 -2
  35. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  36. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +3 -3
  37. package/dist/components/VvCombobox/VvCombobox.es.js +18 -4
  38. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  39. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +37 -37
  40. package/dist/components/VvCombobox/index.d.ts +13 -11
  41. package/dist/components/VvDialog/VvDialog.es.js +7 -0
  42. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  43. package/dist/components/VvDropdown/VvDropdown.es.js +9 -2
  44. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  45. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +31 -31
  46. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +3 -0
  47. package/dist/components/VvDropdown/index.d.ts +10 -10
  48. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +9 -1
  49. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  50. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +7 -0
  51. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  52. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +7 -0
  53. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  54. package/dist/components/VvInputText/VvInputClearAction.d.ts +1 -1
  55. package/dist/components/VvInputText/VvInputText.es.js +9 -2
  56. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  57. package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
  58. package/dist/components/VvNav/VvNav.es.js +69 -56
  59. package/dist/components/VvNav/VvNav.umd.js +1 -1
  60. package/dist/components/VvNav/VvNav.vue.d.ts +12 -8
  61. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  62. package/dist/components/VvNav/index.d.ts +1 -12
  63. package/dist/components/VvNavItem/VvNavItem.es.js +392 -0
  64. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  65. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  66. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  67. package/dist/components/VvProgress/VvProgress.es.js +7 -0
  68. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  69. package/dist/components/VvRadio/VvRadio.es.js +9 -2
  70. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  71. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -3
  72. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +9 -2
  73. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  74. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +3 -3
  75. package/dist/components/VvSelect/VvSelect.es.js +9 -2
  76. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  77. package/dist/components/VvSelect/VvSelect.vue.d.ts +7 -7
  78. package/dist/components/VvTab/VvTab.es.js +127 -87
  79. package/dist/components/VvTab/VvTab.umd.js +1 -1
  80. package/dist/components/VvTab/VvTab.vue.d.ts +19 -6
  81. package/dist/components/VvTab/index.d.ts +9 -3
  82. package/dist/components/VvTextarea/VvTextarea.es.js +9 -2
  83. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  84. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +3 -3
  85. package/dist/components/VvTooltip/VvTooltip.es.js +7 -0
  86. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  87. package/dist/components/index.es.js +249 -203
  88. package/dist/components/index.umd.js +1 -1
  89. package/dist/directives/index.es.js +7 -0
  90. package/dist/directives/index.umd.js +1 -1
  91. package/dist/directives/v-tooltip.es.js +7 -0
  92. package/dist/directives/v-tooltip.umd.js +1 -1
  93. package/dist/icons.es.js +3 -3
  94. package/dist/icons.umd.js +1 -1
  95. package/dist/props/index.d.ts +29 -12
  96. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +5 -5
  97. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +31 -31
  98. package/dist/stories/Tab/Tab.settings.d.ts +3 -23
  99. package/dist/types/alert.d.ts +13 -0
  100. package/dist/types/floating-ui.d.ts +6 -0
  101. package/dist/types/generic.d.ts +5 -0
  102. package/dist/types/group.d.ts +37 -0
  103. package/dist/types/nav.d.ts +17 -0
  104. package/package.json +51 -43
  105. package/src/assets/icons/detailed.json +1 -1
  106. package/src/assets/icons/normal.json +1 -1
  107. package/src/assets/icons/simple.json +1 -1
  108. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  109. package/src/components/VvAction/VvAction.vue +1 -0
  110. package/src/components/VvCombobox/VvCombobox.vue +11 -4
  111. package/src/components/VvNav/VvNav.vue +29 -51
  112. package/src/components/VvNav/VvNavItem.vue +18 -0
  113. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  114. package/src/components/VvNav/index.ts +2 -15
  115. package/src/components/VvTab/VvTab.vue +60 -36
  116. package/src/components/VvTab/index.ts +10 -4
  117. package/src/composables/useUniqueId.ts +2 -2
  118. package/src/props/index.ts +19 -3
  119. package/src/stories/Nav/Nav.settings.ts +3 -4
  120. package/src/stories/Nav/Nav.test.ts +4 -15
  121. package/src/stories/Tab/Tab.settings.ts +8 -8
  122. package/src/stories/Tab/Tab.stories.ts +2 -2
  123. package/src/stories/Tab/Tab.test.ts +6 -14
  124. package/src/stories/argTypes.ts +1 -1
  125. package/src/types/nav.ts +19 -0
  126. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  127. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  128. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  129. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  130. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  131. /package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +0 -0
  132. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  133. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  134. /package/src/types/{generic.d.ts → generic.ts} +0 -0
  135. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,5 +1,5 @@
1
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";
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
@@ -497,6 +504,12 @@ const ActionProps = {
497
504
  default: void 0
498
505
  }
499
506
  };
507
+ const NavProps = {
508
+ items: {
509
+ type: Array,
510
+ default: () => []
511
+ }
512
+ };
500
513
  function equals(obj1, obj2, field) {
501
514
  if (field) {
502
515
  return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
@@ -737,18 +750,18 @@ function useModifiers(prefix, modifiers, others) {
737
750
  const _hoisted_1$i = ["id", "open"];
738
751
  const _hoisted_2$d = ["aria-controls", "aria-expanded"];
739
752
  const _hoisted_3$7 = ["aria-hidden"];
740
- const __default__$n = {
753
+ const __default__$o = {
741
754
  name: "VvAccordion"
742
755
  };
743
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
744
- ...__default__$n,
756
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
757
+ ...__default__$o,
745
758
  props: VvAccordionProps,
746
759
  emits: VvAccordionEvents,
747
760
  setup(__props, { emit }) {
748
761
  const props = __props;
749
762
  const attrs = useAttrs();
750
763
  const accordionName = computed(
751
- () => props.name || (attrs == null ? void 0 : attrs.id) || nanoid()
764
+ () => props.name || (attrs == null ? void 0 : attrs.id) || uid()
752
765
  );
753
766
  const {
754
767
  modifiers,
@@ -885,11 +898,11 @@ function useProvideGroupState(groupState) {
885
898
  computed(() => groupState)
886
899
  );
887
900
  }
888
- const __default__$m = {
901
+ const __default__$n = {
889
902
  name: "VvAccordionGroup"
890
903
  };
891
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
892
- ...__default__$m,
904
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
905
+ ...__default__$n,
893
906
  props: VvAccordionGroupProps,
894
907
  emits: VvAccordionGroupEvents,
895
908
  setup(__props, { emit }) {
@@ -956,7 +969,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
956
969
  }, [
957
970
  renderSlot(_ctx.$slots, "default", {}, () => [
958
971
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
959
- return openBlock(), createBlock(_sfc_main$q, mergeProps({
972
+ return openBlock(), createBlock(_sfc_main$r, mergeProps({
960
973
  key: item.title
961
974
  }, {
962
975
  name: item.name,
@@ -991,11 +1004,11 @@ function useInjectedDropdownItem() {
991
1004
  function useInjectedDropdownAction() {
992
1005
  return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
993
1006
  }
994
- const __default__$l = {
1007
+ const __default__$m = {
995
1008
  name: "VvAction"
996
1009
  };
997
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
998
- ...__default__$l,
1010
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1011
+ ...__default__$m,
999
1012
  props: VvActionProps,
1000
1013
  emits: VvActionEvents,
1001
1014
  setup(__props, { expose: __expose, emit }) {
@@ -1086,7 +1099,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1086
1099
  class: {
1087
1100
  active: _ctx.active,
1088
1101
  pressed: unref(pressed),
1089
- disabled: _ctx.disabled
1102
+ disabled: _ctx.disabled,
1103
+ current: _ctx.current
1090
1104
  },
1091
1105
  onClickPassive: onClick,
1092
1106
  onMouseoverPassive: onMouseover,
@@ -1196,11 +1210,11 @@ const VvIconProps = {
1196
1210
  type: [String, Array]
1197
1211
  }
1198
1212
  };
1199
- const __default__$k = {
1213
+ const __default__$l = {
1200
1214
  name: "VvIcon"
1201
1215
  };
1202
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
1203
- ...__default__$k,
1216
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1217
+ ...__default__$l,
1204
1218
  props: VvIconProps,
1205
1219
  setup(__props) {
1206
1220
  const props = __props;
@@ -1295,7 +1309,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1295
1309
  function useInjectedAlertGroup() {
1296
1310
  return inject(INJECTION_KEY_ALERT_GROUP, {});
1297
1311
  }
1298
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
1312
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
1299
1313
  const VvAlertProps = {
1300
1314
  ...IdProps,
1301
1315
  ...ModifiersProps,
@@ -1455,11 +1469,11 @@ const _hoisted_7$4 = {
1455
1469
  key: 2,
1456
1470
  class: "vv-alert__footer"
1457
1471
  };
1458
- const __default__$j = {
1472
+ const __default__$k = {
1459
1473
  name: "VvAlert"
1460
1474
  };
1461
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
1462
- ...__default__$j,
1475
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1476
+ ...__default__$k,
1463
1477
  props: VvAlertProps,
1464
1478
  emits: VvAlertEvents,
1465
1479
  setup(__props, { expose: __expose, emit }) {
@@ -1469,7 +1483,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1469
1483
  return (_ctx, _cache) => {
1470
1484
  return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(hasProps))), [
1471
1485
  _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),
1486
+ unref(hasIcon) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-alert__icon" }), null, 16)) : createCommentVNode("", true),
1473
1487
  renderSlot(_ctx.$slots, "header", {}, () => [
1474
1488
  renderSlot(_ctx.$slots, "title::before"),
1475
1489
  _ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("strong", {
@@ -1515,11 +1529,11 @@ const VvBadgeProps = {
1515
1529
  ...ModifiersProps,
1516
1530
  value: [String, Number]
1517
1531
  };
1518
- const __default__$i = {
1532
+ const __default__$j = {
1519
1533
  name: "VvBadge"
1520
1534
  };
1521
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
1522
- ...__default__$i,
1535
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1536
+ ...__default__$j,
1523
1537
  props: VvBadgeProps,
1524
1538
  setup(__props) {
1525
1539
  const props = __props;
@@ -1543,11 +1557,11 @@ const VvBreadcrumbProps = {
1543
1557
  };
1544
1558
  const _hoisted_1$g = { class: "vv-breadcrumb__list" };
1545
1559
  const _hoisted_2$b = ["content"];
1546
- const __default__$h = {
1560
+ const __default__$i = {
1547
1561
  name: "VvBreadcrumb"
1548
1562
  };
1549
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
1550
- ...__default__$h,
1563
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1564
+ ...__default__$i,
1551
1565
  props: VvBreadcrumbProps,
1552
1566
  setup(__props) {
1553
1567
  const props = __props;
@@ -1708,11 +1722,11 @@ const _hoisted_2$a = {
1708
1722
  key: 1,
1709
1723
  class: "vv-button__label"
1710
1724
  };
1711
- const __default__$g = {
1725
+ const __default__$h = {
1712
1726
  name: "VvButton"
1713
1727
  };
1714
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1715
- ...__default__$g,
1728
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1729
+ ...__default__$h,
1716
1730
  props: VvButtonProps,
1717
1731
  emits: VvButtonEvents,
1718
1732
  setup(__props, { expose: __expose, emit }) {
@@ -1790,7 +1804,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1790
1804
  }
1791
1805
  };
1792
1806
  return (_ctx, _cache) => {
1793
- return openBlock(), createBlock(_sfc_main$o, mergeProps({
1807
+ return openBlock(), createBlock(_sfc_main$p, mergeProps({
1794
1808
  disabled: unref(disabled),
1795
1809
  pressed: unref(pressed),
1796
1810
  active: _ctx.active,
@@ -1810,7 +1824,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1810
1824
  default: withCtx(() => [
1811
1825
  renderSlot(_ctx.$slots, "default", {}, () => [
1812
1826
  _ctx.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }, () => [
1813
- _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$n, {
1827
+ _ctx.loadingIcon ? (openBlock(), createBlock(_sfc_main$o, {
1814
1828
  key: 0,
1815
1829
  class: "vv-button__loading-icon",
1816
1830
  name: _ctx.loadingIcon
@@ -1818,7 +1832,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1818
1832
  _ctx.loadingLabel ? (openBlock(), createElementBlock("span", _hoisted_1$f, toDisplayString(_ctx.loadingLabel), 1)) : createCommentVNode("", true)
1819
1833
  ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1820
1834
  renderSlot(_ctx.$slots, "before"),
1821
- unref(icon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
1835
+ unref(icon) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
1822
1836
  key: 0,
1823
1837
  class: "vv-button__icon"
1824
1838
  }, unref(hasIconProps)), null, 16)) : createCommentVNode("", true),
@@ -1855,11 +1869,11 @@ const VvButtonGroupProps = {
1855
1869
  }
1856
1870
  };
1857
1871
  const VvButtonGroupEvents = ["update:modelValue"];
1858
- const __default__$f = {
1872
+ const __default__$g = {
1859
1873
  name: "VvButtonGroup"
1860
1874
  };
1861
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
1862
- ...__default__$f,
1875
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1876
+ ...__default__$g,
1863
1877
  props: VvButtonGroupProps,
1864
1878
  emits: VvButtonGroupEvents,
1865
1879
  setup(__props, { emit }) {
@@ -1929,11 +1943,11 @@ const _hoisted_3$5 = {
1929
1943
  key: 2,
1930
1944
  class: "vv-card__footer"
1931
1945
  };
1932
- const __default__$e = {
1946
+ const __default__$f = {
1933
1947
  name: "VvCard"
1934
1948
  };
1935
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1936
- ...__default__$e,
1949
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1950
+ ...__default__$f,
1937
1951
  props: VvCardProps,
1938
1952
  setup(__props) {
1939
1953
  const props = __props;
@@ -2182,11 +2196,11 @@ function useDefaults(componentName, propsDefinition, props) {
2182
2196
  }
2183
2197
  const _hoisted_1$d = ["for"];
2184
2198
  const _hoisted_2$8 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
2185
- const __default__$d = {
2199
+ const __default__$e = {
2186
2200
  name: "VvCheckbox"
2187
2201
  };
2188
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
2189
- ...__default__$d,
2202
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2203
+ ...__default__$e,
2190
2204
  props: VvCheckboxProps,
2191
2205
  emits: VvCheckboxEvents,
2192
2206
  setup(__props, { emit }) {
@@ -2408,11 +2422,11 @@ function useOptions(props) {
2408
2422
  }
2409
2423
  const _hoisted_1$c = ["textContent"];
2410
2424
  const _hoisted_2$7 = { class: "vv-checkbox-group__wrapper" };
2411
- const __default__$c = {
2425
+ const __default__$d = {
2412
2426
  name: "VvCheckboxGroup"
2413
2427
  };
2414
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
2415
- ...__default__$c,
2428
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2429
+ ...__default__$d,
2416
2430
  props: VvCheckboxGroupProps,
2417
2431
  emits: VvCheckboxGroupEvents,
2418
2432
  setup(__props, { emit }) {
@@ -2464,7 +2478,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2464
2478
  }, null, 8, _hoisted_1$c)) : createCommentVNode("", true),
2465
2479
  createElementVNode("div", _hoisted_2$7, [
2466
2480
  _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);
2481
+ return openBlock(), createBlock(_sfc_main$h, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
2468
2482
  }), 128)) : renderSlot(_ctx.$slots, "default", { key: 1 })
2469
2483
  ]),
2470
2484
  createVNode(unref(HintSlot), { class: "vv-checkbox-group__hint" }, createSlots({ _: 2 }, [
@@ -2727,12 +2741,12 @@ function useProvideDropdownAction({
2727
2741
  });
2728
2742
  }
2729
2743
  const _hoisted_1$b = ["id", "tabindex", "role", "aria-labelledby"];
2730
- const __default__$b = {
2744
+ const __default__$c = {
2731
2745
  name: "VvDropdown",
2732
2746
  inheritAttrs: false
2733
2747
  };
2734
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
2735
- ...__default__$b,
2748
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2749
+ ...__default__$c,
2736
2750
  props: VvDropdownProps,
2737
2751
  emits: [
2738
2752
  "update:modelValue",
@@ -3133,11 +3147,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3133
3147
  };
3134
3148
  }
3135
3149
  });
3136
- const __default__$a = {
3150
+ const __default__$b = {
3137
3151
  name: "VvDropdownItem"
3138
3152
  };
3139
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
3140
- ...__default__$a,
3153
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3154
+ ...__default__$b,
3141
3155
  setup(__props) {
3142
3156
  const { role, expanded } = useInjectedDropdownItem();
3143
3157
  const element = ref(null);
@@ -3162,11 +3176,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3162
3176
  }
3163
3177
  });
3164
3178
  const _hoisted_1$a = ["title"];
3165
- const __default__$9 = {
3179
+ const __default__$a = {
3166
3180
  name: "VvDropdownOption"
3167
3181
  };
3168
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
3169
- ...__default__$9,
3182
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
3183
+ ...__default__$a,
3170
3184
  props: {
3171
3185
  ...DisabledProps,
3172
3186
  ...SelectedProps,
@@ -3203,7 +3217,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3203
3217
  }
3204
3218
  });
3205
3219
  return (_ctx, _cache) => {
3206
- return openBlock(), createBlock(_sfc_main$d, {
3220
+ return openBlock(), createBlock(_sfc_main$e, {
3207
3221
  class: normalizeClass(unref(bemCssClasses)),
3208
3222
  tabindex: _ctx.disabled ? -1 : 0,
3209
3223
  "aria-selected": _ctx.selected,
@@ -3230,11 +3244,11 @@ const _hoisted_1$9 = {
3230
3244
  role: "presentation",
3231
3245
  tabindex: "-1"
3232
3246
  };
3233
- const __default__$8 = {
3247
+ const __default__$9 = {
3234
3248
  name: "VvDropdownOptgroup"
3235
3249
  };
3236
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
3237
- ...__default__$8,
3250
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
3251
+ ...__default__$9,
3238
3252
  props: {
3239
3253
  ...LabelProps
3240
3254
  },
@@ -3354,11 +3368,11 @@ const _hoisted_10 = {
3354
3368
  key: 1,
3355
3369
  class: "vv-select__input-after"
3356
3370
  };
3357
- const __default__$7 = {
3371
+ const __default__$8 = {
3358
3372
  name: "VvSelect"
3359
3373
  };
3360
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
3361
- ...__default__$7,
3374
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
3375
+ ...__default__$8,
3362
3376
  props: VvSelectProps,
3363
3377
  emits: VvSelectEmits,
3364
3378
  setup(__props, { emit }) {
@@ -3487,7 +3501,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3487
3501
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3488
3502
  ])) : createCommentVNode("", true),
3489
3503
  createElementVNode("div", _hoisted_4$4, [
3490
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3504
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
3491
3505
  key: 0,
3492
3506
  class: "vv-select__icon"
3493
3507
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -3527,7 +3541,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3527
3541
  ], 16, _hoisted_5$3), [
3528
3542
  [vModelSelect, unref(localModelValue)]
3529
3543
  ]),
3530
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3544
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
3531
3545
  key: 1,
3532
3546
  class: "vv-select__icon vv-select__icon-after"
3533
3547
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -3591,17 +3605,17 @@ const _hoisted_9 = {
3591
3605
  key: 1,
3592
3606
  class: "vv-select__input-after"
3593
3607
  };
3594
- const __default__$6 = {
3608
+ const __default__$7 = {
3595
3609
  name: "VvCombobox",
3596
3610
  components: {
3597
- VvDropdown: _sfc_main$e,
3598
- VvDropdownOption: _sfc_main$c,
3599
- VvDropdownOptgroup: _sfc_main$b,
3600
- VvButton: _sfc_main$j
3611
+ VvDropdown: _sfc_main$f,
3612
+ VvDropdownOption: _sfc_main$d,
3613
+ VvDropdownOptgroup: _sfc_main$c,
3614
+ VvButton: _sfc_main$k
3601
3615
  }
3602
3616
  };
3603
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3604
- ...__default__$6,
3617
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
3618
+ ...__default__$7,
3605
3619
  props: VvComboboxProps,
3606
3620
  emits: VvComboboxEvents,
3607
3621
  setup(__props, { emit }) {
@@ -3802,7 +3816,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3802
3816
  if (!props.keepOpen) {
3803
3817
  collapse();
3804
3818
  }
3805
- if (props.unselectable && value === props.modelValue) {
3819
+ if (Array.isArray(props.modelValue)) {
3820
+ if (props.unselectable && props.modelValue.includes(value)) {
3821
+ toReturn = [];
3822
+ } else {
3823
+ toReturn = [value];
3824
+ }
3825
+ } else if (props.unselectable && value === props.modelValue) {
3806
3826
  toReturn = void 0;
3807
3827
  }
3808
3828
  }
@@ -3884,7 +3904,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3884
3904
  ref: wrapperEl,
3885
3905
  class: "vv-select__wrapper"
3886
3906
  }, [
3887
- createVNode(_sfc_main$e, mergeProps({
3907
+ createVNode(_sfc_main$f, mergeProps({
3888
3908
  ref_key: "dropdownEl",
3889
3909
  ref: dropdownEl,
3890
3910
  modelValue: unref(expanded),
@@ -3899,7 +3919,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3899
3919
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
3900
3920
  ])) : createCommentVNode("", true),
3901
3921
  createElementVNode("div", _hoisted_5$2, [
3902
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3922
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
3903
3923
  key: 0,
3904
3924
  class: "vv-select__icon"
3905
3925
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -3919,7 +3939,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3919
3939
  renderSlot(_ctx.$slots, "value", normalizeProps(guardReactiveProps({ selectedOptions: unref(selectedOptions), onInput })), () => [
3920
3940
  unref(hasValue) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3921
3941
  !_ctx.badges ? (openBlock(), createElementBlock("div", _hoisted_7$2, toDisplayString(unref(hasValue)), 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(selectedOptions), (option, index) => {
3922
- return openBlock(), createBlock(_sfc_main$l, {
3942
+ return openBlock(), createBlock(_sfc_main$m, {
3923
3943
  key: index,
3924
3944
  modifiers: _ctx.badgeModifiers,
3925
3945
  class: "vv-select__badge"
@@ -3932,7 +3952,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3932
3952
  type: "button",
3933
3953
  onClick: withModifiers(($event) => onInput(option), ["stop"])
3934
3954
  }, [
3935
- createVNode(_sfc_main$n, { name: "close" })
3955
+ createVNode(_sfc_main$o, { name: "close" })
3936
3956
  ], 8, _hoisted_8$1)) : createCommentVNode("", true)
3937
3957
  ]),
3938
3958
  _: 2
@@ -3943,7 +3963,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3943
3963
  ], 64))
3944
3964
  ])
3945
3965
  ], 16, _hoisted_6$2),
3946
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
3966
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
3947
3967
  key: 1,
3948
3968
  class: "vv-select__icon vv-select__icon-after"
3949
3969
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -3958,13 +3978,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3958
3978
  !unref(disabled) && ((_a = unref(filteredOptions)) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(filteredOptions), (option, index) => {
3959
3979
  return openBlock(), createElementBlock(Fragment, { key: index }, [
3960
3980
  isGroup(option) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3961
- createVNode(_sfc_main$b, {
3981
+ createVNode(_sfc_main$c, {
3962
3982
  label: unref(getOptionLabel)(option)
3963
3983
  }, null, 8, ["label"]),
3964
3984
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(
3965
3985
  option
3966
3986
  ), (item, i) => {
3967
- return openBlock(), createBlock(_sfc_main$c, mergeProps({
3987
+ return openBlock(), createBlock(_sfc_main$d, mergeProps({
3968
3988
  selected: isOptionSelected(item),
3969
3989
  disabled: unref(isOptionDisabled)(item),
3970
3990
  unselectable: _ctx.unselectable,
@@ -3989,7 +4009,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3989
4009
  _: 2
3990
4010
  }, 1040, ["onClickPassive"]);
3991
4011
  }), 128))
3992
- ], 64)) : (openBlock(), createBlock(_sfc_main$c, mergeProps({ key: 1 }, {
4012
+ ], 64)) : (openBlock(), createBlock(_sfc_main$d, mergeProps({ key: 1 }, {
3993
4013
  selected: isOptionSelected(option),
3994
4014
  disabled: unref(isOptionDisabled)(option),
3995
4015
  unselectable: _ctx.unselectable,
@@ -4013,7 +4033,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4013
4033
  _: 2
4014
4034
  }, 1040, ["onClickPassive"]))
4015
4035
  ], 64);
4016
- }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$c, {
4036
+ }), 128)) : !_ctx.options.length ? (openBlock(), createBlock(_sfc_main$d, {
4017
4037
  key: 1,
4018
4038
  modifiers: "inert"
4019
4039
  }, {
@@ -4023,7 +4043,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4023
4043
  ])
4024
4044
  ]),
4025
4045
  _: 3
4026
- })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$c, {
4046
+ })) : !unref(disabled) ? (openBlock(), createBlock(_sfc_main$d, {
4027
4047
  key: 2,
4028
4048
  modifiers: "inert"
4029
4049
  }, {
@@ -4040,7 +4060,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4040
4060
  renderSlot(_ctx.$slots, "dropdown::after", {}, () => {
4041
4061
  var _a;
4042
4062
  return [
4043
- ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$j, {
4063
+ ((_a = unref(dropdownEl)) == null ? void 0 : _a.customPosition) ? (openBlock(), createBlock(_sfc_main$k, {
4044
4064
  key: 0,
4045
4065
  label: unref(propsDefaults).closeLabel,
4046
4066
  modifiers: "secondary",
@@ -4109,7 +4129,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4109
4129
  key: "3"
4110
4130
  } : void 0
4111
4131
  ]), 1032, ["id"])
4112
- ], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$a, mergeProps({ key: 1 }, unref(selectProps), {
4132
+ ], 10, _hoisted_1$7)) : (openBlock(), createBlock(_sfc_main$b, mergeProps({ key: 1 }, unref(selectProps), {
4113
4133
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
4114
4134
  }), null, 16));
4115
4135
  };
@@ -4164,11 +4184,11 @@ const _hoisted_4$2 = {
4164
4184
  key: 1,
4165
4185
  class: "vv-dialog__footer"
4166
4186
  };
4167
- const __default__$5 = {
4187
+ const __default__$6 = {
4168
4188
  name: "VvDialog"
4169
4189
  };
4170
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4171
- ...__default__$5,
4190
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
4191
+ ...__default__$6,
4172
4192
  props: VvDialogProps,
4173
4193
  emits: VvDialogEvents,
4174
4194
  setup(__props, { expose: __expose, emit }) {
@@ -4276,7 +4296,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4276
4296
  class: "vv-dialog__close",
4277
4297
  onClickPassive: close
4278
4298
  }, [
4279
- createVNode(_sfc_main$n, { name: "close" })
4299
+ createVNode(_sfc_main$o, { name: "close" })
4280
4300
  ], 32)
4281
4301
  ])
4282
4302
  ])) : createCommentVNode("", true),
@@ -4486,7 +4506,7 @@ const VvInputTextProps = {
4486
4506
  };
4487
4507
  const VvInputPasswordAction = defineComponent({
4488
4508
  components: {
4489
- VvIcon: _sfc_main$n
4509
+ VvIcon: _sfc_main$o
4490
4510
  },
4491
4511
  props: {
4492
4512
  disabled: {
@@ -4530,7 +4550,7 @@ const VvInputPasswordAction = defineComponent({
4530
4550
  };
4531
4551
  },
4532
4552
  render() {
4533
- const icon = h(_sfc_main$n, {
4553
+ const icon = h(_sfc_main$o, {
4534
4554
  name: this.activeIcon,
4535
4555
  class: "vv-input-text__icon"
4536
4556
  });
@@ -4549,7 +4569,7 @@ const VvInputPasswordAction = defineComponent({
4549
4569
  });
4550
4570
  const VvInputStepAction = defineComponent({
4551
4571
  components: {
4552
- VvIcon: _sfc_main$n
4572
+ VvIcon: _sfc_main$o
4553
4573
  },
4554
4574
  props: {
4555
4575
  disabled: {
@@ -4594,7 +4614,7 @@ const VvInputStepAction = defineComponent({
4594
4614
  });
4595
4615
  const VvInputClearAction = defineComponent({
4596
4616
  components: {
4597
- VvIcon: _sfc_main$n
4617
+ VvIcon: _sfc_main$o
4598
4618
  },
4599
4619
  props: {
4600
4620
  disabled: {
@@ -4623,7 +4643,7 @@ const VvInputClearAction = defineComponent({
4623
4643
  };
4624
4644
  },
4625
4645
  render() {
4626
- const icon = h(_sfc_main$n, {
4646
+ const icon = h(_sfc_main$o, {
4627
4647
  name: this.icon,
4628
4648
  class: "vv-input-text__icon"
4629
4649
  });
@@ -4644,7 +4664,7 @@ function VvInputTextActionsFactory(type, parentProps) {
4644
4664
  return {
4645
4665
  name: "VvInputTextActions",
4646
4666
  components: {
4647
- VvIcon: _sfc_main$n,
4667
+ VvIcon: _sfc_main$o,
4648
4668
  VvInputPasswordAction,
4649
4669
  VvInputStepAction,
4650
4670
  VvInputClearAction
@@ -4791,11 +4811,11 @@ const _hoisted_8 = {
4791
4811
  key: 6,
4792
4812
  class: "vv-input-text__limit"
4793
4813
  };
4794
- const __default__$4 = {
4814
+ const __default__$5 = {
4795
4815
  name: "VvInputText"
4796
4816
  };
4797
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4798
- ...__default__$4,
4817
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
4818
+ ...__default__$5,
4799
4819
  props: VvInputTextProps,
4800
4820
  emits: VvInputTextEvents,
4801
4821
  setup(__props, { expose: __expose, emit }) {
@@ -5154,7 +5174,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5154
5174
  class: "vv-input-text__inner",
5155
5175
  onClick: withModifiers(onClickInner, ["stop"])
5156
5176
  }, [
5157
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5177
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
5158
5178
  key: 0,
5159
5179
  class: "vv-input-text__icon"
5160
5180
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -5174,7 +5194,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5174
5194
  ])
5175
5195
  ])) : createCommentVNode("", true)
5176
5196
  ], 8, _hoisted_4$1),
5177
- unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5197
+ unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
5178
5198
  key: 1,
5179
5199
  class: "vv-input-text__icon vv-input-text__icon-after"
5180
5200
  }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)), null, 16)) : unref(isPassword) && !_ctx.hideActions && unref(isClickable) ? (openBlock(), createBlock(unref(PasswordInputActions), {
@@ -5236,73 +5256,72 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5236
5256
  });
5237
5257
  const VvNavProps = {
5238
5258
  ...ModifiersProps,
5239
- items: {
5240
- type: Array,
5241
- required: true,
5242
- default: () => []
5243
- }
5259
+ ...NavProps
5244
5260
  };
5245
5261
  const VvNavEvents = ["click"];
5246
5262
  const _hoisted_1$4 = {
5247
- class: "vv-nav__menu",
5248
- role: "menu",
5249
- "aria-busy": "true"
5263
+ class: "vv-nav__item",
5264
+ role: "presentation"
5265
+ };
5266
+ const __default__$4 = {
5267
+ name: "VvNavItem",
5268
+ inheritAttrs: false
5250
5269
  };
5270
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5271
+ ...__default__$4,
5272
+ setup(__props) {
5273
+ return (_ctx, _cache) => {
5274
+ return openBlock(), createElementBlock("li", _hoisted_1$4, [
5275
+ createVNode(_sfc_main$p, mergeProps(_ctx.$attrs, { class: "vv-nav__item-label" }), {
5276
+ default: withCtx(() => [
5277
+ renderSlot(_ctx.$slots, "default")
5278
+ ]),
5279
+ _: 3
5280
+ }, 16)
5281
+ ]);
5282
+ };
5283
+ }
5284
+ });
5285
+ const _hoisted_1$3 = ["onClick"];
5251
5286
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5252
5287
  __name: "VvNav",
5253
5288
  props: VvNavProps,
5254
5289
  emits: VvNavEvents,
5255
5290
  setup(__props, { emit }) {
5256
5291
  const props = __props;
5257
- const { modifiers, items } = toRefs(props);
5258
- const activeItem = ref(null);
5259
- const bemCssClasses = useModifiers("vv-nav", modifiers);
5260
- const localItems = computed(() => {
5261
- return items.value.map((item, index) => {
5262
- return {
5263
- ...item,
5264
- id: item.id || `nav-item_${index}`
5265
- };
5266
- });
5267
- });
5268
- function onClick(item) {
5269
- if (!item.disabled) {
5292
+ const { modifiers } = toRefs(props);
5293
+ const onClick = (event) => {
5294
+ var _a;
5295
+ const target = event.target;
5296
+ if (target == null ? void 0 : target.dataset.index) {
5297
+ const index = parseInt(target.dataset.index);
5298
+ const item = (_a = props.items) == null ? void 0 : _a[index];
5299
+ if (!item || (item == null ? void 0 : item.disabled)) {
5300
+ return;
5301
+ }
5270
5302
  emit("click", item);
5271
- activeItem.value = item.id;
5272
5303
  }
5273
- }
5304
+ };
5305
+ const bemCssClasses = useModifiers("vv-nav", modifiers);
5274
5306
  return (_ctx, _cache) => {
5275
5307
  return openBlock(), createElementBlock("nav", {
5276
5308
  class: normalizeClass(unref(bemCssClasses))
5277
5309
  }, [
5278
- createElementVNode("ul", _hoisted_1$4, [
5279
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (navItem) => {
5280
- return openBlock(), createElementBlock("li", {
5281
- key: navItem.id,
5282
- class: "vv-nav__item",
5283
- role: "presentation"
5284
- }, [
5285
- createVNode(_sfc_main$o, mergeProps({
5286
- disabled: navItem.disabled,
5287
- to: navItem.to,
5288
- href: navItem.href,
5289
- tabindex: 0
5290
- }, {
5291
- class: [{
5292
- current: unref(activeItem) == navItem.id,
5293
- disabled: navItem.disabled
5294
- }, "vv-nav__item-label"]
5295
- }, toHandlers(navItem.on), {
5296
- onClick: ($event) => onClick(navItem)
5297
- }), {
5298
- default: withCtx(() => [
5299
- createTextVNode(toDisplayString(navItem.title), 1)
5300
- ]),
5301
- _: 2
5302
- }, 1040, ["class", "onClick"])
5303
- ]);
5304
- }), 128))
5305
- ])
5310
+ createElementVNode("ul", {
5311
+ class: "vv-nav__menu",
5312
+ role: "menu",
5313
+ "aria-busy": "true",
5314
+ onClick: withModifiers(onClick, ["stop"])
5315
+ }, [
5316
+ renderSlot(_ctx.$slots, "default", {}, () => [
5317
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, ({ on = {}, ...item }, index) => {
5318
+ return openBlock(), createBlock(_sfc_main$7, mergeProps({
5319
+ key: index,
5320
+ "data-index": index
5321
+ }, item, toHandlers(on)), null, 16, ["data-index"]);
5322
+ }), 128))
5323
+ ])
5324
+ ], 8, _hoisted_1$3)
5306
5325
  ], 2);
5307
5326
  };
5308
5327
  }
@@ -5396,7 +5415,7 @@ function useGroupProps(props, emit) {
5396
5415
  disabled
5397
5416
  };
5398
5417
  }
5399
- const _hoisted_1$3 = ["for"];
5418
+ const _hoisted_1$2 = ["for"];
5400
5419
  const _hoisted_2$2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
5401
5420
  const __default__$2 = {
5402
5421
  name: "VvRadio"
@@ -5522,13 +5541,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
5522
5541
  key: "3"
5523
5542
  } : void 0
5524
5543
  ]), 1032, ["id"])
5525
- ], 10, _hoisted_1$3);
5544
+ ], 10, _hoisted_1$2);
5526
5545
  };
5527
5546
  }
5528
5547
  });
5529
5548
  const VvRadioGroupProps = CheckboxRadioGroupProps;
5530
5549
  const VvRadioGroupEvents = ["update:modelValue", "change"];
5531
- const _hoisted_1$2 = ["textContent"];
5550
+ const _hoisted_1$1 = ["textContent"];
5532
5551
  const _hoisted_2$1 = { class: "vv-radio-group__wrapper" };
5533
5552
  const __default__$1 = {
5534
5553
  name: "VvRadioGroup"
@@ -5583,7 +5602,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5583
5602
  _ctx.label ? (openBlock(), createElementBlock("legend", {
5584
5603
  key: 0,
5585
5604
  textContent: toDisplayString(_ctx.label)
5586
- }, null, 8, _hoisted_1$2)) : createCommentVNode("", true),
5605
+ }, null, 8, _hoisted_1$1)) : createCommentVNode("", true),
5587
5606
  createElementVNode("div", _hoisted_2$1, [
5588
5607
  _ctx.options.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.options, (option, index) => {
5589
5608
  return openBlock(), createBlock(_sfc_main$4, mergeProps({ key: index }, getOptionProps(option, index)), null, 16);
@@ -5625,14 +5644,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
5625
5644
  });
5626
5645
  const VvTabProps = {
5627
5646
  ...ModifiersProps,
5647
+ navModifiers: {
5648
+ type: [String, Array]
5649
+ },
5650
+ modelValue: {
5651
+ type: String,
5652
+ default: ""
5653
+ },
5628
5654
  items: {
5629
5655
  type: Array,
5630
- required: true,
5631
5656
  default: () => []
5632
5657
  }
5633
5658
  };
5634
- const VvTabEvents = ["click"];
5635
- const _hoisted_1$1 = ["id"];
5659
+ const VvTabEvents = ["update:modelValue"];
5636
5660
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5637
5661
  __name: "VvTab",
5638
5662
  props: VvTabProps,
@@ -5640,39 +5664,61 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
5640
5664
  setup(__props, { emit }) {
5641
5665
  const props = __props;
5642
5666
  const { modifiers, items } = toRefs(props);
5643
- const activeTab = ref(null);
5644
- const bemCssClasses = useModifiers("vv-tab", modifiers);
5645
- const localItems = computed(() => {
5646
- return items.value.map((item, index) => {
5647
- return {
5648
- ...item,
5649
- id: item.id || `tab-item_${index}`
5650
- };
5651
- });
5667
+ const tabKeys = computed(() => {
5668
+ return items.value.reduce((acc, item) => {
5669
+ if (item.tab) {
5670
+ acc.push(item.tab);
5671
+ }
5672
+ return acc;
5673
+ }, []);
5652
5674
  });
5653
- function onClick(item) {
5654
- if (!item.disabled) {
5655
- emit("click", item);
5656
- activeTab.value = item.id;
5675
+ const localModelValue = ref();
5676
+ const activeTabKey = computed({
5677
+ get: () => {
5678
+ var _a;
5679
+ return props.modelValue || localModelValue.value || ((_a = tabKeys.value) == null ? void 0 : _a[0]);
5680
+ },
5681
+ set: (newValue) => {
5682
+ localModelValue.value = newValue;
5683
+ emit("update:modelValue", newValue);
5657
5684
  }
5658
- }
5685
+ });
5686
+ const hasNavModifiers = computed(() => {
5687
+ var _a;
5688
+ return [
5689
+ "tabs",
5690
+ ...Array.isArray(props.navModifiers) ? props.navModifiers : ((_a = props.navModifiers) == null ? void 0 : _a.split(" ")) ?? []
5691
+ ];
5692
+ });
5693
+ const onNavClick = (item) => {
5694
+ if (item.tab) {
5695
+ activeTabKey.value = item.tab;
5696
+ }
5697
+ };
5698
+ const navItems = computed(
5699
+ () => props.items.map((item) => ({
5700
+ current: item.tab === activeTabKey.value,
5701
+ ...item
5702
+ }))
5703
+ );
5704
+ const bemCssClasses = useModifiers("vv-tab", modifiers);
5659
5705
  return (_ctx, _cache) => {
5660
5706
  return openBlock(), createElementBlock("div", {
5661
5707
  class: normalizeClass(unref(bemCssClasses))
5662
5708
  }, [
5663
- createVNode(_sfc_main$6, {
5664
- items: unref(localItems),
5665
- modifiers: "tabs full",
5666
- onClick
5667
- }, null, 8, ["items"]),
5668
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(localItems), (item) => {
5669
- return openBlock(), createElementBlock("article", {
5670
- id: item.id,
5671
- key: item.id,
5672
- class: normalizeClass([{ target: unref(activeTab) === item.id }, "vv-tab__panel"])
5673
- }, [
5674
- renderSlot(_ctx.$slots, `${item.id}`)
5675
- ], 10, _hoisted_1$1);
5709
+ createVNode(_sfc_main$6, mergeProps({
5710
+ items: unref(navItems),
5711
+ modifiers: unref(hasNavModifiers)
5712
+ }, { onClick: onNavClick }), null, 16),
5713
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item, index) => {
5714
+ return openBlock(), createElementBlock(Fragment, { key: index }, [
5715
+ item.tab ? (openBlock(), createElementBlock("article", {
5716
+ key: 0,
5717
+ class: normalizeClass([{ target: unref(activeTabKey) === item.tab }, "vv-tab__panel"])
5718
+ }, [
5719
+ renderSlot(_ctx.$slots, `panel::${item.tab}`)
5720
+ ], 2)) : createCommentVNode("", true)
5721
+ ], 64);
5676
5722
  }), 128))
5677
5723
  ], 2);
5678
5724
  };
@@ -5872,7 +5918,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5872
5918
  renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
5873
5919
  ])) : createCommentVNode("", true),
5874
5920
  createElementVNode("div", _hoisted_4, [
5875
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5921
+ unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
5876
5922
  key: 0,
5877
5923
  class: "vv-textarea__icon"
5878
5924
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
@@ -5886,7 +5932,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5886
5932
  }), null, 16, _hoisted_5), [
5887
5933
  [vModelText, unref(localModelValue)]
5888
5934
  ]),
5889
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$n, mergeProps({
5935
+ unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$o, mergeProps({
5890
5936
  key: 1,
5891
5937
  class: "vv-textarea__icon vv-textarea__icon-after"
5892
5938
  }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
@@ -5978,27 +6024,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
5978
6024
  }
5979
6025
  });
5980
6026
  export {
5981
- _sfc_main$q as VvAccordion,
5982
- _sfc_main$p as VvAccordionGroup,
5983
- _sfc_main$o as VvAction,
5984
- _sfc_main$m as VvAlert,
5985
- _sfc_main$l as VvBadge,
5986
- _sfc_main$k as VvBreadcrumb,
5987
- _sfc_main$j as VvButton,
5988
- _sfc_main$i as VvButtonGroup,
5989
- _sfc_main$h as VvCard,
5990
- _sfc_main$g as VvCheckbox,
5991
- _sfc_main$f as VvCheckboxGroup,
5992
- _sfc_main$9 as VvCombobox,
5993
- _sfc_main$8 as VvDialog,
5994
- _sfc_main$e as VvDropdown,
5995
- _sfc_main$n as VvIcon,
5996
- _sfc_main$7 as VvInputText,
6027
+ _sfc_main$r as VvAccordion,
6028
+ _sfc_main$q as VvAccordionGroup,
6029
+ _sfc_main$p as VvAction,
6030
+ _sfc_main$n as VvAlert,
6031
+ _sfc_main$m as VvBadge,
6032
+ _sfc_main$l as VvBreadcrumb,
6033
+ _sfc_main$k as VvButton,
6034
+ _sfc_main$j as VvButtonGroup,
6035
+ _sfc_main$i as VvCard,
6036
+ _sfc_main$h as VvCheckbox,
6037
+ _sfc_main$g as VvCheckboxGroup,
6038
+ _sfc_main$a as VvCombobox,
6039
+ _sfc_main$9 as VvDialog,
6040
+ _sfc_main$f as VvDropdown,
6041
+ _sfc_main$o as VvIcon,
6042
+ _sfc_main$8 as VvInputText,
5997
6043
  _sfc_main$6 as VvNav,
5998
6044
  _sfc_main$5 as VvProgress,
5999
6045
  _sfc_main$4 as VvRadio,
6000
6046
  _sfc_main$3 as VvRadioGroup,
6001
- _sfc_main$a as VvSelect,
6047
+ _sfc_main$b as VvSelect,
6002
6048
  _sfc_main$2 as VvTab,
6003
6049
  _sfc_main$1 as VvTextarea,
6004
6050
  _sfc_main as VvTooltip