@volverjs/ui-vue 0.0.3 → 0.0.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 (145) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +52 -13
  3. package/dist/Volver.d.ts +5 -1
  4. package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
  5. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  8. package/dist/components/VvAction/VvAction.es.js +170 -0
  9. package/dist/components/VvAction/VvAction.umd.js +1 -0
  10. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  11. package/dist/components/VvAction/index.d.ts +24 -0
  12. package/dist/components/VvBadge/VvBadge.es.js +86 -16
  13. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  14. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
  15. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  16. package/dist/components/VvButton/VvButton.es.js +434 -251
  17. package/dist/components/VvButton/VvButton.umd.js +1 -1
  18. package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
  19. package/dist/components/VvButton/index.d.ts +22 -67
  20. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
  21. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  22. package/dist/components/VvCard/VvCard.es.js +38 -25
  23. package/dist/components/VvCard/VvCard.umd.js +1 -1
  24. package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
  25. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  26. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
  27. package/dist/components/VvCheckbox/index.d.ts +1 -1
  28. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
  31. package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
  32. package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
  33. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  34. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
  35. package/dist/components/VvCombobox/index.d.ts +18 -13
  36. package/dist/components/VvDialog/VvDialog.es.js +139 -64
  37. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
  39. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
  41. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  42. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  43. package/dist/components/VvDropdown/index.d.ts +6 -9
  44. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
  45. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  46. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
  47. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  48. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
  49. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  50. package/dist/components/VvIcon/VvIcon.es.js +48 -32
  51. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  52. package/dist/components/VvInputText/VvInputText.es.js +508 -344
  53. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  54. package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
  55. package/dist/components/VvInputText/index.d.ts +13 -2
  56. package/dist/components/VvProgress/VvProgress.es.js +90 -20
  57. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  58. package/dist/components/VvRadio/VvRadio.es.js +305 -125
  59. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  60. package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
  61. package/dist/components/VvRadio/index.d.ts +1 -1
  62. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
  63. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  64. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
  65. package/dist/components/VvRadioGroup/index.d.ts +1 -1
  66. package/dist/components/VvSelect/VvSelect.es.js +371 -216
  67. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  68. package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
  69. package/dist/components/VvSelect/index.d.ts +5 -5
  70. package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
  71. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  72. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
  73. package/dist/components/VvTextarea/index.d.ts +5 -5
  74. package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
  75. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  76. package/dist/components/index.es.js +1913 -1521
  77. package/dist/components/index.umd.js +1 -1
  78. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  79. package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
  80. package/dist/constants.d.ts +30 -0
  81. package/dist/directives/index.es.js +128 -0
  82. package/dist/directives/index.umd.js +1 -0
  83. package/dist/directives/v-tooltip.es.js +126 -0
  84. package/dist/directives/v-tooltip.umd.js +1 -0
  85. package/dist/icons.es.js +3 -3
  86. package/dist/icons.umd.js +1 -1
  87. package/dist/index.es.js +2102 -1761
  88. package/dist/index.umd.js +1 -1
  89. package/dist/props/index.d.ts +179 -11
  90. package/dist/resolvers/unplugin.d.ts +8 -8
  91. package/dist/resolvers/unplugin.es.js +51 -30
  92. package/dist/resolvers/unplugin.umd.js +1 -1
  93. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  94. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  95. package/package.json +60 -34
  96. package/src/Volver.ts +12 -5
  97. package/src/assets/icons/detailed.json +1 -1
  98. package/src/assets/icons/normal.json +1 -1
  99. package/src/assets/icons/simple.json +1 -1
  100. package/src/components/VvAction/VvAction.vue +144 -0
  101. package/src/components/VvAction/index.ts +5 -0
  102. package/src/components/VvButton/VvButton.vue +31 -114
  103. package/src/components/VvButton/index.ts +6 -79
  104. package/src/components/VvCombobox/VvCombobox.vue +54 -42
  105. package/src/components/VvCombobox/index.ts +11 -9
  106. package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
  107. package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
  108. package/src/components/VvDropdown/index.ts +4 -9
  109. package/src/components/VvSelect/index.ts +2 -4
  110. package/src/composables/dropdown/useInjectDropdown.ts +1 -1
  111. package/src/composables/dropdown/useProvideDropdown.ts +7 -9
  112. package/src/composables/useModifiers.ts +4 -7
  113. package/src/constants.ts +36 -0
  114. package/src/props/index.ts +106 -14
  115. package/src/resolvers/unplugin.ts +81 -48
  116. package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
  117. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
  118. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  119. package/src/stories/Button/Button.stories.mdx +4 -2
  120. package/src/stories/Button/Button.test.ts +3 -1
  121. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  122. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  123. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  124. package/src/stories/Card/Card.stories.mdx +2 -1
  125. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  126. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  127. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  128. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  129. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  130. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  131. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  132. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  133. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  134. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  135. package/src/stories/Icon/Icon.stories.mdx +2 -1
  136. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  137. package/src/stories/InputText/InputText.stories.mdx +2 -1
  138. package/src/stories/Progress/Progress.stories.mdx +2 -1
  139. package/src/stories/Radio/Radio.stories.mdx +2 -1
  140. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  141. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  142. package/src/stories/Select/Select.stories.mdx +2 -1
  143. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  144. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  145. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
@@ -1,9 +1,130 @@
1
- import { defineComponent as K, openBlock as i, createElementBlock as y, unref as t, normalizeClass as ee, withModifiers as st, createElementVNode as M, renderSlot as $, normalizeProps as F, guardReactiveProps as j, createTextVNode as Z, toDisplayString as H, Fragment as ne, renderList as ke, createBlock as W, mergeProps as G, withCtx as ce, resolveDynamicComponent as nt, createCommentVNode as w, withDirectives as Se, isRef as Ae, vModelCheckbox as $t, createVNode as de, Transition as rt, normalizeStyle as Je, vShow as je, vModelSelect as kt, createSlots as At, vModelText as it, toHandlers as Ct, vModelDynamic as wt, vModelRadio as Et } from "vue";
2
- import { nanoid as It } from "nanoid";
3
- import { iconExists as Be, Icon as Pt, addIcon as Ot } from "@iconify/vue";
4
- import { autoPlacement as Qe, flip as Ze, shift as et, size as tt, offset as He, arrow as Dt, useFloating as Bt, autoUpdate as Rt } from "@floating-ui/vue";
5
- var ge = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(ge || {}), ut = /* @__PURE__ */ ((o) => (o.topStart = "top-start", o.topEnd = "top-end", o.bottomStart = "bottom-start", o.bottomEnd = "bottom-end", o.leftStart = "left-start", o.leftEnd = "left-end", o.rightStart = "right-start", o.rightEnd = "right-end", o))(ut || {}), We = /* @__PURE__ */ ((o) => (o.before = "before", o.after = "after", o))(We || {});
6
- const dt = Symbol.for("buttonGroup"), ct = Symbol.for("radioGroup"), vt = Symbol.for("checkGroup"), pt = Symbol.for("accordionGroup"), Tt = {
1
+ import { unref as a, inject as We, computed as n, toRef as il, toRefs as G, defineComponent as j, useAttrs as yt, ref as N, openBlock as f, createElementBlock as g, normalizeClass as le, withModifiers as Tt, createElementVNode as M, renderSlot as V, normalizeProps as K, guardReactiveProps as z, createTextVNode as Y, toDisplayString as T, isRef as Ee, provide as gt, watchEffect as _t, Fragment as ie, renderList as Ne, createBlock as H, mergeProps as R, withCtx as te, resolveDynamicComponent as Nt, createCommentVNode as C, watch as ve, useSlots as Ae, h as be, onMounted as ul, withDirectives as Oe, vModelCheckbox as dl, createVNode as pe, nextTick as Xe, Transition as Rt, normalizeStyle as It, vShow as St, vModelSelect as cl, createSlots as vl, vModelText as Ht, toHandlers as fl, vModelDynamic as pl, vModelRadio as ml } from "vue";
2
+ import { nanoid as Mt } from "nanoid";
3
+ import { useToggle as bl, toReactive as hl, useVModel as et, onClickOutside as xt, useFocusWithin as Vt, onKeyStroke as He, useElementHover as yl, useFocus as Gt, useElementVisibility as $t, refDebounced as gl } from "@vueuse/core";
4
+ import { iconExists as Ye, Icon as _l, addIcon as Sl } from "@iconify/vue";
5
+ import { autoPlacement as Et, flip as Pt, shift as Ot, size as Dt, offset as ct, arrow as Vl, useFloating as $l, autoUpdate as kl } from "@floating-ui/vue";
6
+ import Al from "mitt";
7
+ var fe = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(fe || {}), jt = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(jt || {}), Ge = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(Ge || {}), pt = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(pt || {}), ke = /* @__PURE__ */ ((t) => (t.nuxtLink = "nuxt-link", t.routerLink = "router-link", t.a = "a", t.button = "button", t))(ke || {}), Wt = /* @__PURE__ */ ((t) => (t.button = "button", t.link = "link", t.menuitem = "menuitem", t))(Wt || {}), je = /* @__PURE__ */ ((t) => (t.listbox = "listbox", t.menu = "menu", t))(je || {}), mt = /* @__PURE__ */ ((t) => (t.option = "option", t.presentation = "presentation", t))(mt || {}), Ut = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(Ut || {});
8
+ const wl = Symbol.for("volver"), Ft = Symbol.for("buttonGroup"), Kt = Symbol.for("radioGroup"), zt = Symbol.for("checkGroup"), qt = Symbol.for("accordionGroup"), Yt = Symbol.for("dropdownTrigger"), Jt = Symbol.for("dropdownItem"), Xt = Symbol.for("dropdownAction");
9
+ function Pe(t, l, e) {
10
+ return e ? Ze(t, e) === Ze(l, e) : bt(t, l);
11
+ }
12
+ function bt(t, l) {
13
+ if (t === l)
14
+ return !0;
15
+ if (t && l && typeof t == "object" && typeof l == "object") {
16
+ const e = Array.isArray(t), s = Array.isArray(l);
17
+ let o, c, u;
18
+ if (e && s) {
19
+ if (c = t.length, c != l.length)
20
+ return !1;
21
+ for (o = c; o-- !== 0; )
22
+ if (!bt(t[o], l[o]))
23
+ return !1;
24
+ return !0;
25
+ }
26
+ if (e != s)
27
+ return !1;
28
+ const v = t instanceof Date, d = l instanceof Date;
29
+ if (v != d)
30
+ return !1;
31
+ if (v && d)
32
+ return t.getTime() == l.getTime();
33
+ const p = t instanceof RegExp, r = l instanceof RegExp;
34
+ if (p != r)
35
+ return !1;
36
+ if (p && r)
37
+ return t.toString() == l.toString();
38
+ const i = Object.keys(t);
39
+ if (c = i.length, c !== Object.keys(l).length)
40
+ return !1;
41
+ for (o = c; o-- !== 0; )
42
+ if (!Object.prototype.hasOwnProperty.call(l, i[o]))
43
+ return !1;
44
+ for (o = c; o-- !== 0; )
45
+ if (u = i[o], !bt(t[u], l[u]))
46
+ return !1;
47
+ return !0;
48
+ }
49
+ return t !== t && l !== l;
50
+ }
51
+ function Ze(t, l) {
52
+ if (t && Object.keys(t).length && l) {
53
+ if (l.indexOf(".") === -1)
54
+ return t[l];
55
+ {
56
+ const e = l.split(".");
57
+ let s = t;
58
+ for (let o = 0, c = e.length; o < c; ++o) {
59
+ if (t == null)
60
+ return null;
61
+ s = s[e[o]];
62
+ }
63
+ return s;
64
+ }
65
+ } else
66
+ return null;
67
+ }
68
+ function Cl(t, l) {
69
+ let e = -1;
70
+ if (l) {
71
+ for (let s = 0; s < l.length; s++)
72
+ if (Pe(l[s], t)) {
73
+ e = s;
74
+ break;
75
+ }
76
+ }
77
+ return e;
78
+ }
79
+ function Ce(t, l) {
80
+ if (t != null && l && l.length) {
81
+ for (const e of l)
82
+ if (Pe(t, e))
83
+ return !0;
84
+ }
85
+ return !1;
86
+ }
87
+ function ge(t) {
88
+ return ((l) => l == null || l === "" || Array.isArray(l) && l.length === 0 || !(l instanceof Date) && typeof l == "object" && Object.keys(l).length === 0)(a(t));
89
+ }
90
+ function Il(t, l) {
91
+ const e = Cl(t, l);
92
+ return e > -1 ? l.filter((s, o) => o !== e) : l;
93
+ }
94
+ function El(t) {
95
+ return typeof t == "string" || t instanceof String;
96
+ }
97
+ function tt(t) {
98
+ const l = We(t, void 0), e = n(() => !ge(l));
99
+ function s(o, c, u) {
100
+ if (l != null && l.value) {
101
+ const d = a(l.value)[o];
102
+ return n({
103
+ get() {
104
+ return d == null ? void 0 : d.value;
105
+ },
106
+ set(p) {
107
+ d.value = p;
108
+ }
109
+ });
110
+ }
111
+ const v = il(c, o);
112
+ return n({
113
+ get() {
114
+ return v.value;
115
+ },
116
+ set(d) {
117
+ u && u(`update:${o}`, d);
118
+ }
119
+ });
120
+ }
121
+ return {
122
+ group: l,
123
+ isInGroup: e,
124
+ getGroupOrLocalRef: s
125
+ };
126
+ }
127
+ const Pl = {
7
128
  /**
8
129
  * Accordion name
9
130
  */
@@ -31,97 +152,109 @@ const dt = Symbol.for("buttonGroup"), ct = Symbol.for("radioGroup"), vt = Symbol
31
152
  * If true, the accordion will be disabled
32
153
  */
33
154
  disabled: Boolean
34
- }, xt = ["update:modelValue"];
35
- function Mt(o, n) {
36
- const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(
37
- pt
38
- ), { title: c, content: u } = toRefs(o), v = a("modelValue", o, n), m = a("disabled", o), d = a("collapse", o), l = a("modifiers", o);
155
+ }, Ol = ["update:modelValue"];
156
+ function Dl(t, l) {
157
+ const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(
158
+ qt
159
+ ), { title: c, content: u } = G(t), v = o("modelValue", t, l), d = o("disabled", t), p = o("collapse", t), r = o("modifiers", t);
39
160
  return {
40
161
  // group props
41
162
  modelValue: v,
42
- disabled: m,
43
- isInGroup: r,
163
+ disabled: d,
164
+ isInGroup: s,
44
165
  group: e,
45
- collapse: d,
46
- modifiers: l,
166
+ collapse: p,
167
+ modifiers: r,
47
168
  // local props
48
169
  title: c,
49
170
  content: u
50
171
  };
51
172
  }
52
- const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-hidden"], Gt = {
173
+ function X(t, l, e) {
174
+ return n(() => {
175
+ const s = {
176
+ [t]: !0
177
+ }, o = typeof (l == null ? void 0 : l.value) == "string" ? l.value.split(" ") : l == null ? void 0 : l.value;
178
+ return o && Array.isArray(o) && o.forEach((c) => {
179
+ s[`${t}--${c}`] = !0;
180
+ }), e && Object.keys(e.value).forEach((c) => {
181
+ s[`${t}--${c}`] = a(e.value[c]);
182
+ }), s;
183
+ });
184
+ }
185
+ const Ll = ["id", "open"], Bl = ["aria-controls", "aria-expanded"], Tl = ["aria-hidden"], Nl = {
53
186
  name: "VvAccordion"
54
- }, Ut = /* @__PURE__ */ K({
55
- ...Gt,
56
- props: Tt,
57
- emits: xt,
58
- setup(o, { emit: n }) {
59
- const e = o, r = useAttrs(), a = computed(
60
- () => e.name || (r == null ? void 0 : r.id) || It()
187
+ }, Rl = /* @__PURE__ */ j({
188
+ ...Nl,
189
+ props: Pl,
190
+ emits: Ol,
191
+ setup(t, { emit: l }) {
192
+ const e = t, s = yt(), o = n(
193
+ () => e.name || (s == null ? void 0 : s.id) || Mt()
61
194
  ), {
62
195
  modifiers: c,
63
196
  title: u,
64
197
  content: v,
65
- disabled: m,
66
- collapse: d,
67
- modelValue: l,
68
- isInGroup: s
69
- } = Mt(e, n), p = ref(!1), g = computed({
70
- get: () => s.value ? d.value && Array.isArray(l.value) ? l.value.includes(a.value) : l.value === a.value : l.value === void 0 ? p.value : l.value,
71
- set: (b) => {
72
- if (s.value) {
73
- if (d.value && Array.isArray(l.value)) {
74
- if (b) {
75
- l.value.push(a.value);
198
+ disabled: d,
199
+ collapse: p,
200
+ modelValue: r,
201
+ isInGroup: i
202
+ } = Dl(e, l), b = N(!1), _ = n({
203
+ get: () => i.value ? p.value && Array.isArray(r.value) ? r.value.includes(o.value) : r.value === o.value : r.value === void 0 ? b.value : r.value,
204
+ set: (y) => {
205
+ if (i.value) {
206
+ if (p.value && Array.isArray(r.value)) {
207
+ if (y) {
208
+ r.value.push(o.value);
76
209
  return;
77
210
  }
78
- l.value = l.value.filter(
79
- (S) => S !== a.value
211
+ r.value = r.value.filter(
212
+ (m) => m !== o.value
80
213
  );
81
214
  return;
82
215
  }
83
- l.value = b ? a.value : null;
216
+ r.value = y ? o.value : null;
84
217
  return;
85
218
  }
86
- if (l.value === void 0 && typeof b == "boolean") {
87
- p.value = b;
219
+ if (r.value === void 0 && typeof y == "boolean") {
220
+ b.value = y;
88
221
  return;
89
222
  }
90
- l.value = b;
223
+ r.value = y;
91
224
  }
92
- }), k = useBemModifiers(
225
+ }), k = X(
93
226
  "vv-accordion",
94
227
  c,
95
- computed(() => ({
96
- disabled: m.value
228
+ n(() => ({
229
+ disabled: d.value
97
230
  }))
98
- ), C = useToggle(g);
99
- return (b, S) => (i(), y("details", {
100
- id: t(a),
101
- class: ee(t(k)),
102
- open: t(g),
103
- onClick: S[0] || (S[0] = st((I) => t(C)(), ["prevent"]))
231
+ ), A = bl(_);
232
+ return (y, m) => (f(), g("details", {
233
+ id: a(o),
234
+ class: le(a(k)),
235
+ open: a(_),
236
+ onClick: m[0] || (m[0] = Tt((I) => a(A)(), ["prevent"]))
104
237
  }, [
105
238
  M("summary", {
106
- "aria-controls": t(a),
107
- "aria-expanded": t(g),
239
+ "aria-controls": a(o),
240
+ "aria-expanded": a(_),
108
241
  class: "vv-collapse__summary"
109
242
  }, [
110
- $(b.$slots, "summary", F(j({ open: t(g) })), () => [
111
- Z(H(t(u)), 1)
243
+ V(y.$slots, "summary", K(z({ open: a(_) })), () => [
244
+ Y(T(a(u)), 1)
112
245
  ])
113
- ], 8, Nt),
246
+ ], 8, Bl),
114
247
  M("div", {
115
- "aria-hidden": !t(g),
248
+ "aria-hidden": !a(_),
116
249
  class: "vv-collapse__content"
117
250
  }, [
118
- $(b.$slots, "details", F(j({ open: t(g) })), () => [
119
- Z(H(t(v)), 1)
251
+ V(y.$slots, "details", K(z({ open: a(_) })), () => [
252
+ Y(T(a(v)), 1)
120
253
  ])
121
- ], 8, Ht)
122
- ], 10, Lt));
254
+ ], 8, Tl)
255
+ ], 10, Ll));
123
256
  }
124
- }), Wt = {
257
+ }), Hl = {
125
258
  /**
126
259
  * VModel
127
260
  */
@@ -150,93 +283,171 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
150
283
  * If true, the accordion items will be disabled
151
284
  */
152
285
  disabled: Boolean
153
- }, Ft = ["update:modelValue"], jt = {
286
+ }, Ml = ["update:modelValue"];
287
+ function lt(t) {
288
+ if (Object.keys(t).some(
289
+ (l) => l !== "key" && !Ee(t[l])
290
+ ))
291
+ throw Error("One or more groupState props aren't ref.");
292
+ gt(
293
+ t.key,
294
+ n(() => t)
295
+ );
296
+ }
297
+ const xl = {
154
298
  name: "VvAccordionGroup"
155
- }, Qa = /* @__PURE__ */ K({
156
- ...jt,
157
- props: Wt,
158
- emits: Ft,
159
- setup(o, { emit: n }) {
160
- const e = o, { disabled: r, collapse: a, modifiers: c, itemModifiers: u, items: v } = toRefs(e);
161
- watchEffect(() => {
162
- typeof e.modelValue == "string" && a.value && console.warn(
299
+ }, ds = /* @__PURE__ */ j({
300
+ ...xl,
301
+ props: Hl,
302
+ emits: Ml,
303
+ setup(t, { emit: l }) {
304
+ const e = t, { disabled: s, collapse: o, modifiers: c, itemModifiers: u, items: v } = G(e);
305
+ _t(() => {
306
+ typeof e.modelValue == "string" && o.value && console.warn(
163
307
  "[VvAccordionGroup]: modelValue is a string but collapse is true."
164
308
  );
165
309
  });
166
- const m = ref([]), d = computed({
310
+ const d = N([]), p = n({
167
311
  get: () => {
168
- var s;
169
- return e.modelValue !== void 0 ? a.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : a.value ? m.value : (s = m.value) == null ? void 0 : s[0];
312
+ var i;
313
+ return e.modelValue !== void 0 ? o.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : o.value ? d.value : (i = d.value) == null ? void 0 : i[0];
170
314
  },
171
- set: (s) => {
315
+ set: (i) => {
172
316
  if (e.modelValue !== void 0)
173
- return (Array.isArray(e.modelValue) || a.value) && !Array.isArray(s) && (s = [s]), n("update:modelValue", s);
174
- m.value = Array.isArray(s) ? s : [s];
317
+ return (Array.isArray(e.modelValue) || o.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i);
318
+ d.value = Array.isArray(i) ? i : [i];
175
319
  }
176
320
  });
177
- useProvideGroupState({
178
- key: pt,
179
- modelValue: d,
180
- disabled: r,
181
- collapse: a,
321
+ lt({
322
+ key: qt,
323
+ modelValue: p,
324
+ disabled: s,
325
+ collapse: o,
182
326
  modifiers: u
183
327
  });
184
- const l = useBemModifiers(
328
+ const r = X(
185
329
  "vv-accordion-group",
186
330
  c,
187
- computed(() => ({
188
- disabled: r.value
331
+ n(() => ({
332
+ disabled: s.value
189
333
  }))
190
334
  );
191
- return (s, p) => (i(), y("div", {
192
- class: ee(t(l))
335
+ return (i, b) => (f(), g("div", {
336
+ class: le(a(r))
193
337
  }, [
194
- $(s.$slots, "default", {}, () => [
195
- (i(!0), y(ne, null, ke(t(v), (g) => (i(), W(Ut, G({
196
- key: g.title
338
+ V(i.$slots, "default", {}, () => [
339
+ (f(!0), g(ie, null, Ne(a(v), (_) => (f(), H(Rl, R({
340
+ key: _.title
197
341
  }, {
198
- name: g.name,
199
- title: g.title,
200
- content: g.content
342
+ name: _.name,
343
+ title: _.title,
344
+ content: _.content
201
345
  }), {
202
- header: ce((k) => [
203
- $(s.$slots, `header::${g.name}`, F(j(k)))
346
+ header: te((k) => [
347
+ V(i.$slots, `header::${_.name}`, K(z(k)))
204
348
  ]),
205
- details: ce((k) => [
206
- $(s.$slots, `details::${g.name}`, F(j(k)))
349
+ details: te((k) => [
350
+ V(i.$slots, `details::${_.name}`, K(z(k)))
207
351
  ]),
208
352
  _: 2
209
353
  }, 1040))), 128))
210
354
  ])
211
355
  ], 2));
212
356
  }
213
- }), Ie = {
357
+ }), Gl = {
358
+ /**
359
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
360
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
361
+ */
362
+ to: {
363
+ type: [String, Object]
364
+ },
365
+ /**
366
+ * Anchor href
367
+ */
368
+ href: String,
369
+ /**
370
+ * Anchor target
371
+ */
372
+ target: {
373
+ type: String,
374
+ validator: (t) => Object.values(Ut).includes(t)
375
+ },
376
+ /**
377
+ * Anchor rel
378
+ */
379
+ rel: {
380
+ type: String,
381
+ default: "noopener noreferrer"
382
+ }
383
+ }, Ue = {
384
+ /**
385
+ * Valid status
386
+ */
214
387
  valid: Boolean,
388
+ /**
389
+ * Valid label
390
+ */
215
391
  validLabel: [String, Array]
216
- }, Pe = {
392
+ }, Fe = {
393
+ /**
394
+ * Invalid status
395
+ */
217
396
  invalid: Boolean,
397
+ /**
398
+ * Invalid label
399
+ */
218
400
  invalidLabel: [String, Array]
219
- }, qe = {
401
+ }, at = {
402
+ /**
403
+ * Loading status
404
+ */
220
405
  loading: Boolean,
221
- loadingLabel: String
222
- }, Ce = {
406
+ /**
407
+ * Loading label
408
+ */
409
+ loadingLabel: {
410
+ type: String,
411
+ default: "Loading..."
412
+ }
413
+ }, De = {
223
414
  /**
224
415
  * Whether the form control is disabled
225
416
  */
226
417
  disabled: Boolean
227
- }, Oe = {
418
+ }, jl = {
419
+ /**
420
+ * Whether the item is selected
421
+ */
422
+ selected: Boolean
423
+ }, Wl = {
424
+ /**
425
+ * Whether the item is active
426
+ */
427
+ active: Boolean
428
+ }, Ul = {
429
+ /**
430
+ * Whether the item is pressed
431
+ */
432
+ pressed: Boolean
433
+ }, Me = {
434
+ /**
435
+ * The item label
436
+ */
437
+ label: [String, Number]
438
+ }, Ke = {
228
439
  /**
229
440
  * The value is not editable
230
441
  */
231
442
  readonly: Boolean
232
- }, ve = {
443
+ }, me = {
233
444
  /**
234
445
  * Component BEM modifiers
235
446
  */
236
447
  modifiers: [String, Array]
237
- }, De = {
448
+ }, ze = {
238
449
  hintLabel: { type: String, default: "" }
239
- }, Ke = {
450
+ }, kt = {
240
451
  /**
241
452
  * List of options, can be string[] or object[]
242
453
  */
@@ -256,21 +467,21 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
256
467
  * Used when options are objects: key to use for option disabled
257
468
  */
258
469
  disabledKey: { type: [String, Function], default: "disabled" }
259
- }, qt = {
470
+ }, Fl = {
260
471
  /**
261
472
  * Show character limit
262
473
  */
263
474
  count: {
264
475
  type: [Boolean, String],
265
476
  default: !1,
266
- validator: (o) => [!0, !1, "limit", "countdown"].includes(o)
477
+ validator: (t) => [!0, !1, "limit", "countdown"].includes(t)
267
478
  }
268
- }, Kt = {
479
+ }, Kl = {
269
480
  /**
270
481
  * Milliseconds to wait before emitting the input event
271
482
  */
272
483
  debounce: [Number, String]
273
- }, ze = {
484
+ }, At = {
274
485
  /**
275
486
  * VvIcon name or props
276
487
  * @see VVIcon
@@ -281,39 +492,39 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
281
492
  */
282
493
  iconPosition: {
283
494
  type: String,
284
- default: We.before,
285
- validation: (o) => Object.values(We).includes(o)
495
+ default: Ge.before,
496
+ validation: (t) => Object.values(Ge).includes(t)
286
497
  }
287
- }, Te = {
498
+ }, ot = {
288
499
  /**
289
500
  * Global attribute tabindex
290
501
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
291
502
  */
292
503
  tabindex: { type: [String, Number], default: 0 }
293
- }, Xe = {
504
+ }, wt = {
294
505
  /**
295
506
  * If true the label will be floating
296
507
  */
297
508
  floating: Boolean
298
- }, xe = {
509
+ }, qe = {
299
510
  /**
300
511
  * If true the input will be unselectable
301
512
  */
302
513
  unselectable: { type: Boolean, default: !0 }
303
- }, Me = {
514
+ }, st = {
304
515
  /**
305
516
  * Global attribute id
306
517
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
307
518
  */
308
519
  id: [String, Number]
309
- }, Fe = {
520
+ }, ht = {
310
521
  /**
311
522
  * Dropdown placement
312
523
  */
313
524
  placement: {
314
525
  type: String,
315
- default: ge.bottom,
316
- validator: (o) => Object.values(ge).includes(o) || Object.values(ut).includes(o)
526
+ default: fe.bottom,
527
+ validator: (t) => Object.values(fe).includes(t) || Object.values(jt).includes(t)
317
528
  },
318
529
  /**
319
530
  * Dropdown show / hide transition name
@@ -389,42 +600,43 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
389
600
  triggerWidth: {
390
601
  type: Boolean
391
602
  }
392
- }, Le = {
393
- ...Me,
603
+ }, nt = {
604
+ ...st,
394
605
  /**
395
606
  * Input / Textarea name
396
607
  * Name of the form control. Submitted with the form as part of a name/value pair
397
608
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
398
609
  */
399
610
  name: { type: String, required: !0 }
400
- }, ft = {
611
+ }, Qt = {
401
612
  /**
402
613
  * Global attribute autofocus
403
614
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
404
615
  */
405
616
  autofocus: Boolean
406
- }, mt = {
617
+ }, Zt = {
407
618
  /**
408
619
  * Global attribute autocomplete
409
620
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
410
621
  */
411
622
  autocomplete: { type: String, default: "off" }
412
- }, bt = {
413
- ...Le,
414
- ...ft,
415
- ...mt,
416
- ...Te,
417
- ...Ce,
418
- ...Oe,
419
- ...Ie,
420
- ...Pe,
623
+ }, el = {
624
+ ...nt,
625
+ ...Qt,
626
+ ...Zt,
627
+ ...ot,
421
628
  ...De,
422
- ...qe,
423
- ...ve,
424
- ...qt,
425
- ...Kt,
629
+ ...Ke,
630
+ ...Ue,
631
+ ...Fe,
426
632
  ...ze,
427
- ...Xe,
633
+ ...at,
634
+ ...me,
635
+ ...Fl,
636
+ ...Kl,
637
+ ...At,
638
+ ...wt,
639
+ ...Me,
428
640
  /**
429
641
  * Input / Textarea minlength
430
642
  * Minimum length (number of characters) of value
@@ -452,20 +664,17 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
452
664
  * Available for all input types except color
453
665
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
454
666
  */
455
- required: Boolean,
456
- /**
457
- * <label> value for the Input / Textarea
458
- */
459
- label: String
460
- }, ht = {
461
- ...Le,
462
- ...Te,
463
- ...Ie,
464
- ...Pe,
667
+ required: Boolean
668
+ }, tl = {
669
+ ...nt,
670
+ ...ot,
671
+ ...Ue,
672
+ ...Fe,
673
+ ...ze,
465
674
  ...De,
466
- ...Ce,
467
- ...Oe,
468
- ...ve,
675
+ ...Ke,
676
+ ...me,
677
+ ...Me,
469
678
  /**
470
679
  * Input value
471
680
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
@@ -474,27 +683,20 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
474
683
  /**
475
684
  * Input value
476
685
  */
477
- modelValue: [Object, Number, Boolean, String],
478
- /**
479
- * <label> for input
480
- */
481
- label: String
482
- }, yt = {
483
- ...Ie,
484
- ...Pe,
485
- ...Ke,
686
+ modelValue: [Object, Number, Boolean, String]
687
+ }, ll = {
688
+ ...Ue,
689
+ ...Fe,
690
+ ...kt,
691
+ ...ze,
486
692
  ...De,
487
- ...Ce,
488
- ...Oe,
489
- ...ve,
693
+ ...Ke,
694
+ ...me,
695
+ ...Me,
490
696
  /**
491
697
  * Input value
492
698
  */
493
699
  modelValue: [String, Array],
494
- /**
495
- * Input label
496
- */
497
- label: String,
498
700
  /**
499
701
  * Input name
500
702
  */
@@ -503,76 +705,76 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
503
705
  * If true, the group will be displayed in a vertical column
504
706
  */
505
707
  vertical: Boolean
506
- }, zt = {
507
- ...ve,
708
+ }, al = {
709
+ ...De,
710
+ ...Me,
711
+ ...Ul,
712
+ ...Wl,
713
+ ...Gl,
714
+ /**
715
+ * Button type
716
+ */
717
+ type: {
718
+ type: String,
719
+ default: pt.button,
720
+ validator: (t) => Object.values(pt).includes(t)
721
+ }
722
+ }, zl = {
723
+ ...me,
508
724
  value: [String, Number]
509
- }, Xt = {
725
+ }, ql = {
510
726
  name: "VvBadge"
511
- }, Yt = /* @__PURE__ */ K({
512
- ...Xt,
513
- props: zt,
514
- setup(o) {
515
- const n = o, { modifiers: e } = toRefs(n), r = useBemModifiers("vv-badge", e);
516
- return (a, c) => (i(), y("span", {
517
- class: ee(t(r)),
727
+ }, Yl = /* @__PURE__ */ j({
728
+ ...ql,
729
+ props: zl,
730
+ setup(t) {
731
+ const l = t, { modifiers: e } = G(l), s = X("vv-badge", e);
732
+ return (o, c) => (f(), g("span", {
733
+ class: le(a(s)),
518
734
  role: "status"
519
735
  }, [
520
- $(a.$slots, "default", {}, () => [
521
- Z(H(a.value), 1)
736
+ V(o.$slots, "default", {}, () => [
737
+ Y(T(o.value), 1)
522
738
  ])
523
739
  ], 2));
524
740
  }
525
- });
526
- function Jt(o, n, e) {
527
- return computed(() => {
528
- const r = {
529
- [o]: !0
530
- };
531
- let a = unref(n);
532
- return a && (!Array.isArray(a) && typeof a == "string" && (a = a.split(" ")), Array.isArray(a) && a.forEach((c) => {
533
- r[`${o}--${c}`] = !0;
534
- })), e && Object.keys(e.value).forEach((c) => {
535
- r[`${o}--${c}`] = unref(e.value[c]);
536
- }), r;
537
- });
538
- }
539
- const Qt = {
540
- ...ve,
741
+ }), Jl = {
742
+ ...me,
541
743
  routes: Array
542
- }, Zt = { class: "vv-breadcrumb__list" }, eo = ["content"], to = {
744
+ }, Xl = { class: "vv-breadcrumb__list" }, Ql = ["content"], Zl = {
543
745
  name: "VvBreadcrumb"
544
- }, Za = /* @__PURE__ */ K({
545
- ...to,
546
- props: Qt,
547
- setup(o) {
548
- const n = o, { modifiers: e } = toRefs(n), r = Jt("vv-breadcrumb", e);
549
- return (a, c) => (i(), y("nav", {
550
- class: ee(t(r)),
746
+ }, cs = /* @__PURE__ */ j({
747
+ ...Zl,
748
+ props: Jl,
749
+ setup(t) {
750
+ const l = t, { modifiers: e } = G(l), s = X("vv-breadcrumb", e);
751
+ return (o, c) => (f(), g("nav", {
752
+ class: le(a(s)),
551
753
  "aria-label": "breadcrumbs"
552
754
  }, [
553
- M("ol", Zt, [
554
- (i(!0), y(ne, null, ke(a.routes, (u, v) => {
555
- var m, d, l, s;
556
- return i(), y("li", {
755
+ M("ol", Xl, [
756
+ (f(!0), g(ie, null, Ne(o.routes, (u, v) => {
757
+ var d, p, r, i;
758
+ return f(), g("li", {
557
759
  key: `${u.label}-${v}`,
558
- class: ee({
559
- "vv-breadcrumb__item": v < Number((m = a.routes) == null ? void 0 : m.length) - 1,
560
- "vv-breadcrumb__item-active": v === Number((d = a.routes) == null ? void 0 : d.length) - 1
760
+ class: le({
761
+ "vv-breadcrumb__item": v < Number((d = o.routes) == null ? void 0 : d.length) - 1,
762
+ "vv-breadcrumb__item-active": v === Number((p = o.routes) == null ? void 0 : p.length) - 1
561
763
  }),
562
764
  itemprop: "itemListElement",
563
765
  itemtype: "https://schema.org/ListItem",
564
766
  itemscope: ""
565
767
  }, [
566
- (i(), W(nt(u.to ? "router-link" : u.href ? "a" : "span"), G(u, {
768
+ (f(), H(Nt(u.to ? "router-link" : u.href ? "a" : "span"), R(u, {
567
769
  class: {
568
- "vv-breadcrumb__link": v < Number((l = a.routes) == null ? void 0 : l.length) - 1
770
+ "vv-breadcrumb__link": v < Number((r = o.routes) == null ? void 0 : r.length) - 1
569
771
  },
570
- "aria-current": v === Number((s = a.routes) == null ? void 0 : s.length) - 1 ? "page" : void 0,
772
+ "aria-current": v === Number((i = o.routes) == null ? void 0 : i.length) - 1 ? "page" : void 0,
571
773
  itemprop: "item"
572
774
  }), {
573
- default: ce(() => [
574
- $(a.$slots, "label", F(j({ route: u, index: v })), () => [
575
- Z(H(u.label), 1)
775
+ default: te(() => [
776
+ V(o.$slots, "label", K(z({ route: u, index: v })), () => [
777
+ Y(T(u.label), 1)
576
778
  ])
577
779
  ]),
578
780
  _: 2
@@ -580,13 +782,13 @@ const Qt = {
580
782
  M("meta", {
581
783
  itemprop: "position",
582
784
  content: `${v + 1}`
583
- }, null, 8, eo)
785
+ }, null, 8, Ql)
584
786
  ], 2);
585
787
  }), 128))
586
788
  ])
587
789
  ], 2));
588
790
  }
589
- }), oo = {
791
+ }), ea = {
590
792
  /**
591
793
  * Color
592
794
  */
@@ -679,66 +881,170 @@ const Qt = {
679
881
  modifiers: {
680
882
  type: [String, Array]
681
883
  }
682
- }, ao = {
884
+ };
885
+ function ol() {
886
+ return We(wl);
887
+ }
888
+ const ta = {
683
889
  name: "VvIcon"
684
- }, J = /* @__PURE__ */ K({
685
- ...ao,
686
- props: oo,
687
- setup(o) {
688
- const n = o, e = ref(!0), r = useVolver(), { modifiers: a } = toRefs(n), c = useBemModifiers("vv-icon", a), u = computed(() => n.provider || (r == null ? void 0 : r.provider)), v = computed(() => {
689
- const l = n.name ?? "", s = `@${u.value}:${n.prefix}:${n.name}`;
690
- return Be(l) ? l : Be(s) ? s : (r == null ? void 0 : r.iconsCollections.find(
691
- (p) => {
692
- const g = `@${u.value}:${p.prefix}:${l}`;
693
- if (Be(g))
694
- return g;
890
+ }, ee = /* @__PURE__ */ j({
891
+ ...ta,
892
+ props: ea,
893
+ setup(t) {
894
+ const l = t, e = N(!0), s = ol(), { modifiers: o } = G(l), c = X("vv-icon", o), u = n(() => l.provider || (s == null ? void 0 : s.provider)), v = n(() => {
895
+ const r = l.name ?? "", i = `@${u.value}:${l.prefix}:${l.name}`;
896
+ return Ye(r) ? r : Ye(i) ? i : (s == null ? void 0 : s.iconsCollections.find(
897
+ (b) => {
898
+ const _ = `@${u.value}:${b.prefix}:${r}`;
899
+ if (Ye(_))
900
+ return _;
695
901
  }
696
- )) || l;
902
+ )) || r;
697
903
  });
698
- function m(l) {
699
- let s = null;
904
+ function d(r) {
905
+ let i = null;
700
906
  if (typeof window > "u") {
701
- const { JSDOM: C } = require("jsdom");
702
- s = new C().window;
907
+ const { JSDOM: A } = require("jsdom");
908
+ i = new A().window;
703
909
  }
704
- return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
910
+ return (i ? new i.DOMParser() : new window.DOMParser()).parseFromString(r, "text/html").querySelector("svg");
705
911
  }
706
- function d(l) {
707
- const s = m(l), p = (s == null ? void 0 : s.innerHTML.trim()) || "";
708
- s && p && Ot(`@${u.value}:${n.prefix}:${n.name}`, {
709
- body: p,
912
+ function p(r) {
913
+ const i = d(r), b = (i == null ? void 0 : i.innerHTML.trim()) || "";
914
+ i && b && Sl(`@${u.value}:${l.prefix}:${l.name}`, {
915
+ body: b,
710
916
  // Set height and width from svg content
711
- height: s.viewBox.baseVal.height,
712
- width: s.viewBox.baseVal.width
917
+ height: i.viewBox.baseVal.height,
918
+ width: i.viewBox.baseVal.width
713
919
  });
714
920
  }
715
- return r && (n.src && !Be(`@${u.value}:${n.prefix}:${n.name}`) ? (e.value = !1, r.fetchIcon(n.src).then((l) => {
716
- l && (d(l), e.value = !0);
717
- }).catch((l) => {
718
- throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
719
- })) : n.svg && d(n.svg)), (l, s) => t(e) ? (i(), W(t(Pt), G({
921
+ return s && (l.src && !Ye(`@${u.value}:${l.prefix}:${l.name}`) ? (e.value = !1, s.fetchIcon(l.src).then((r) => {
922
+ r && (p(r), e.value = !0);
923
+ }).catch((r) => {
924
+ throw new Error(`During fetch icon: ${r == null ? void 0 : r.message}`);
925
+ })) : l.svg && p(l.svg)), (r, i) => a(e) ? (f(), H(a(_l), R({
720
926
  key: 0,
721
- class: t(c)
927
+ class: a(c)
722
928
  }, {
723
- inline: l.inline,
724
- width: l.width,
725
- height: l.height,
726
- horizontalFlip: l.horizontalFlip,
727
- verticalFlip: l.verticalFlip,
728
- flip: l.flip,
729
- rotate: l.rotate,
730
- color: l.color,
731
- onLoad: l.onLoad,
732
- icon: t(v)
733
- }), null, 16, ["class"])) : w("", !0);
929
+ inline: r.inline,
930
+ width: r.width,
931
+ height: r.height,
932
+ horizontalFlip: r.horizontalFlip,
933
+ verticalFlip: r.verticalFlip,
934
+ flip: r.flip,
935
+ rotate: r.rotate,
936
+ color: r.color,
937
+ onLoad: r.onLoad,
938
+ icon: a(v)
939
+ }), null, 16, ["class"])) : C("", !0);
734
940
  }
735
- });
736
- var gt = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(gt || {}), ye = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ye || {}), _t = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(_t || {});
737
- const lo = ["update:modelValue"], so = {
738
- ...Me,
739
- ...ve,
740
- ...Ce,
741
- ...xe,
941
+ }), la = ["click", "mouseover", "mouseleave"], aa = al;
942
+ function oa() {
943
+ return We(Yt, {});
944
+ }
945
+ function sa() {
946
+ return We(Jt, {});
947
+ }
948
+ function na() {
949
+ return We(Xt, {});
950
+ }
951
+ const ra = {
952
+ name: "VvAction"
953
+ }, ia = /* @__PURE__ */ j({
954
+ ...ra,
955
+ props: aa,
956
+ emits: la,
957
+ setup(t, { expose: l, emit: e }) {
958
+ const s = t, o = ol(), c = N(null);
959
+ l({ $el: c });
960
+ const {
961
+ reference: u,
962
+ bus: v,
963
+ aria: d,
964
+ expanded: p
965
+ } = oa();
966
+ ve(
967
+ () => c.value,
968
+ (m) => {
969
+ u && (u.value = m);
970
+ }
971
+ );
972
+ const r = n(() => s.pressed || (p == null ? void 0 : p.value)), { role: i } = na(), b = n(() => {
973
+ switch (!0) {
974
+ case s.disabled:
975
+ return ke.button;
976
+ case s.to !== void 0:
977
+ return o != null && o.nuxt ? ke.nuxtLink : ke.routerLink;
978
+ case s.href !== void 0:
979
+ return ke.a;
980
+ default:
981
+ return ke.button;
982
+ }
983
+ }), _ = n(() => {
984
+ const m = {
985
+ ...d == null ? void 0 : d.value,
986
+ "aria-pressed": r.value ? !0 : void 0,
987
+ role: i
988
+ };
989
+ switch (b.value) {
990
+ case ke.a:
991
+ return {
992
+ ...m,
993
+ href: s.href,
994
+ target: s.target,
995
+ rel: s.rel
996
+ };
997
+ case ke.routerLink:
998
+ case ke.nuxtLink:
999
+ return {
1000
+ ...m,
1001
+ to: s.to,
1002
+ target: s.target
1003
+ };
1004
+ default:
1005
+ return {
1006
+ ...m,
1007
+ type: s.type,
1008
+ disabled: s.disabled
1009
+ };
1010
+ }
1011
+ }), k = (m) => {
1012
+ if (s.disabled) {
1013
+ m.preventDefault();
1014
+ return;
1015
+ }
1016
+ v == null || v.emit("click", m), e("click", m);
1017
+ }, A = (m) => {
1018
+ v == null || v.emit("mouseover", m), e("mouseover", m);
1019
+ }, y = (m) => {
1020
+ v == null || v.emit("mouseleave", m), e("mouseleave", m);
1021
+ };
1022
+ return (m, I) => (f(), H(Nt(a(b)), R(a(_), {
1023
+ ref_key: "element",
1024
+ ref: c,
1025
+ class: {
1026
+ active: m.active,
1027
+ pressed: a(r),
1028
+ disabled: m.disabled
1029
+ },
1030
+ onClickPassive: k,
1031
+ onMouseoverPassive: A,
1032
+ onMouseleavePassive: y
1033
+ }), {
1034
+ default: te(() => [
1035
+ V(m.$slots, "default", {}, () => [
1036
+ Y(T(m.label), 1)
1037
+ ])
1038
+ ]),
1039
+ _: 3
1040
+ }, 16, ["class"]));
1041
+ }
1042
+ }), ua = ["update:modelValue"], da = {
1043
+ ...al,
1044
+ ...st,
1045
+ ...me,
1046
+ ...qe,
1047
+ ...at,
742
1048
  /**
743
1049
  * Button icon
744
1050
  */
@@ -748,260 +1054,160 @@ const lo = ["update:modelValue"], so = {
748
1054
  */
749
1055
  iconPosition: {
750
1056
  type: String,
751
- default: ge.left,
752
- validator: (o) => Object.values(ge).includes(o)
1057
+ default: fe.left,
1058
+ validator: (t) => Object.values(fe).includes(t)
753
1059
  },
754
- /**
755
- * Button label
756
- */
757
- label: [String, Number],
758
- /**
759
- * Loading status
760
- */
761
- loading: Boolean,
762
1060
  /**
763
1061
  * Loading icon
764
1062
  */
765
1063
  loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
766
- /**
767
- * Loading label
768
- */
769
- loadingLabel: {
770
- type: String,
771
- default: "Loading..."
772
- },
773
- /**
774
- * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
775
- * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
776
- */
777
- to: {
778
- type: [String, Object]
779
- },
780
- /**
781
- * Link href
782
- */
783
- href: String,
784
- /**
785
- * Link target
786
- */
787
- target: {
788
- type: String,
789
- validator: (o) => Object.values(_t).includes(o)
790
- },
791
- active: Boolean,
792
- /**
793
- * Button pressed mode
794
- */
795
- pressed: Boolean,
796
- /**
797
- * Link rel
798
- */
799
- rel: {
800
- type: String,
801
- default: "noopener noreferrer"
802
- },
803
- /**
804
- * Button type
805
- */
806
- type: {
807
- type: String,
808
- default: "button",
809
- validator: (o) => Object.values(gt).includes(o)
810
- },
811
1064
  toggle: {
812
1065
  type: Boolean,
813
1066
  default: !1
814
1067
  },
815
1068
  modelValue: String
816
1069
  };
817
- function no(o, n) {
818
- var S;
819
- const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(dt), {
1070
+ function ca(t, l) {
1071
+ var m;
1072
+ const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(Ft), {
820
1073
  id: c,
821
1074
  iconPosition: u,
822
1075
  icon: v,
823
- label: m,
824
- pressed: d,
825
- modifiers: l
826
- } = toRefs(o), s = a("modelValue", o, n), p = a("disabled", o), g = a("toggle", o), k = a(
1076
+ label: d,
1077
+ pressed: p,
1078
+ modifiers: r
1079
+ } = G(t), i = o("modelValue", t, l), b = o("disabled", t), _ = o("toggle", t), k = o(
827
1080
  "unselectable",
828
- o
829
- ), C = ((S = e == null ? void 0 : e.value) == null ? void 0 : S.multiple) ?? ref(!1), b = computed(() => {
830
- var E;
831
- const I = l != null && l.value ? Array.isArray(l.value) ? l.value : [l.value] : [], B = (E = e == null ? void 0 : e.value.itemModifiers) != null && E.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
832
- return [...I, ...B];
1081
+ t
1082
+ ), A = ((m = e == null ? void 0 : e.value) == null ? void 0 : m.multiple) ?? N(!1), y = n(() => {
1083
+ var D;
1084
+ const I = r != null && r.value ? Array.isArray(r.value) ? r.value : r.value.split(" ") : [], O = (D = e == null ? void 0 : e.value.itemModifiers) != null && D.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : e.value.itemModifiers.value.split(" ") : [];
1085
+ return [...I, ...O];
833
1086
  });
834
1087
  return {
835
1088
  // group props
836
1089
  group: e,
837
- isInGroup: r,
838
- modelValue: s,
839
- disabled: p,
840
- toggle: g,
1090
+ isInGroup: s,
1091
+ modelValue: i,
1092
+ disabled: b,
1093
+ toggle: _,
841
1094
  unselectable: k,
842
- multiple: C,
1095
+ multiple: A,
843
1096
  // local props
844
1097
  id: c,
845
- modifiers: b,
846
- pressed: d,
1098
+ modifiers: y,
1099
+ pressed: p,
847
1100
  iconPosition: u,
848
1101
  icon: v,
849
- label: m
1102
+ label: d
850
1103
  };
851
1104
  }
852
- const ro = {
1105
+ const Le = (t) => n(() => String((t == null ? void 0 : t.value) || Mt())), va = {
853
1106
  key: 1,
854
1107
  class: "vv-button__label"
855
- }, io = {
1108
+ }, fa = {
856
1109
  key: 1,
857
1110
  class: "vv-button__label"
858
- }, uo = {
1111
+ }, pa = {
859
1112
  name: "VvButton"
860
- }, el = /* @__PURE__ */ K({
861
- ...uo,
862
- props: so,
863
- emits: lo,
864
- setup(o, { expose: n, emit: e }) {
865
- const r = o, a = useAttrs(), c = useSlots(), {
1113
+ }, vs = /* @__PURE__ */ j({
1114
+ ...pa,
1115
+ props: da,
1116
+ emits: ua,
1117
+ setup(t, { expose: l, emit: e }) {
1118
+ const s = t, o = yt(), c = Ae(), {
866
1119
  id: u,
867
1120
  modifiers: v,
868
- iconPosition: m,
869
- icon: d,
870
- label: l,
871
- modelValue: s,
872
- disabled: p,
873
- toggle: g,
1121
+ iconPosition: d,
1122
+ icon: p,
1123
+ label: r,
1124
+ modelValue: i,
1125
+ disabled: b,
1126
+ toggle: _,
874
1127
  unselectable: k
875
- } = no(r, e), C = useUniqueId(u), b = computed(() => (a == null ? void 0 : a.name) || C.value), S = useVolver(), I = ref(null);
876
- n({ $el: I });
877
- const {
878
- reference: B,
879
- bus: E,
880
- aria: O
881
- } = useInjectedDropdownTrigger();
882
- watch(
883
- () => I.value,
884
- (A) => {
885
- B && (B.value = A);
886
- }
887
- );
888
- const { role: L } = useInjectedDropdownAction(), q = computed(() => {
889
- switch (!0) {
890
- case p.value:
891
- return ye.button;
892
- case r.to !== void 0:
893
- return S != null && S.nuxt ? ye.nuxtLink : ye.routerLink;
894
- case r.href !== void 0:
895
- return ye.a;
896
- default:
897
- return ye.button;
898
- }
899
- }), Q = computed(() => g.value ? Array.isArray(s.value) ? contains(b.value, s.value) : equals(b.value, s.value) : r.pressed), P = useBemModifiers(
1128
+ } = ca(s, e), A = Le(u), y = n(() => (o == null ? void 0 : o.name) || A.value), m = N(null), I = n(() => {
1129
+ var w;
1130
+ return (w = m.value) == null ? void 0 : w.$el;
1131
+ });
1132
+ l({ $el: I });
1133
+ const O = n(() => _.value ? Array.isArray(i.value) ? Ce(y.value, i.value) : Pe(y.value, i.value) : s.pressed), D = X(
900
1134
  "vv-button",
901
1135
  v,
902
- computed(() => ({
903
- active: r.active,
904
- pressed: Q.value,
905
- disabled: p.value,
906
- reverse: [ge.right, ge.bottom].includes(m.value),
907
- column: [ge.top, ge.bottom].includes(m.value),
908
- iconOnly: Boolean((d == null ? void 0 : d.value) && !(l != null && l.value) && !c.default)
1136
+ n(() => ({
1137
+ reverse: [fe.right, fe.bottom].includes(d.value),
1138
+ column: [fe.top, fe.bottom].includes(d.value),
1139
+ "icon-only": Boolean(
1140
+ (p == null ? void 0 : p.value) && !(r != null && r.value) && !c.default
1141
+ )
909
1142
  }))
910
- ), T = computed(
911
- () => typeof (d == null ? void 0 : d.value) == "string" ? { name: d == null ? void 0 : d.value } : d == null ? void 0 : d.value
912
- ), U = computed(() => {
913
- const A = {
914
- ...O == null ? void 0 : O.value,
915
- "aria-pressed": Q.value ? !0 : void 0,
916
- class: P.value,
917
- role: L
918
- };
919
- switch (q.value) {
920
- case ye.a:
921
- return {
922
- ...A,
923
- role: A.role ?? "button",
924
- href: r.href,
925
- target: r.target,
926
- rel: r.rel
927
- };
928
- case ye.routerLink:
929
- case ye.nuxtLink:
930
- return {
931
- ...A,
932
- role: A.role ?? "button",
933
- to: r.to,
934
- target: r.target
935
- };
936
- default:
937
- return {
938
- ...A,
939
- type: r.type,
940
- disabled: p.value
941
- };
942
- }
943
- }), te = (A) => {
944
- if (E == null || E.emit("click", A), g.value) {
945
- if (Array.isArray(s.value)) {
946
- if (contains(b.value, s.value)) {
947
- k.value && (s.value = s.value.filter(
948
- (oe) => oe !== b.value
1143
+ ), L = n(
1144
+ () => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
1145
+ ), x = () => {
1146
+ if (_.value) {
1147
+ if (Array.isArray(i.value)) {
1148
+ if (Ce(y.value, i.value)) {
1149
+ k.value && (i.value = i.value.filter(
1150
+ (w) => w !== y.value
949
1151
  ));
950
1152
  return;
951
1153
  }
952
- s.value.push(b.value);
1154
+ i.value.push(y.value);
953
1155
  return;
954
1156
  }
955
- if (equals(b, s.value) && k.value) {
956
- s.value = void 0;
1157
+ if (Pe(y.value, i.value) && k.value) {
1158
+ i.value = void 0;
957
1159
  return;
958
1160
  }
959
- s.value = b.value;
1161
+ i.value = y.value;
960
1162
  }
961
- }, re = (A) => {
962
- E == null || E.emit("mouseover", A);
963
- }, ie = (A) => {
964
- E == null || E.emit("mouseleave", A);
965
1163
  };
966
- return (A, oe) => (i(), W(nt(t(q)), G(t(U), {
967
- id: t(C),
968
- ref_key: "$el",
969
- ref: I,
970
- onClickPassive: te,
971
- onMouseoverPassive: re,
972
- onMouseleavePassive: ie
1164
+ return (w, se) => (f(), H(ia, R({
1165
+ disabled: a(b),
1166
+ pressed: a(O),
1167
+ active: w.active,
1168
+ type: w.type,
1169
+ to: w.to,
1170
+ href: w.href,
1171
+ target: w.target,
1172
+ rel: w.rel
1173
+ }, {
1174
+ id: a(A),
1175
+ ref_key: "element",
1176
+ ref: m,
1177
+ class: a(D),
1178
+ onClick: x
973
1179
  }), {
974
- default: ce(() => [
975
- $(A.$slots, "default", {}, () => [
976
- A.loading ? $(A.$slots, "loading", { key: 0 }, () => [
977
- A.loadingIcon ? (i(), W(J, {
1180
+ default: te(() => [
1181
+ V(w.$slots, "default", {}, () => [
1182
+ w.loading ? V(w.$slots, "loading", { key: 0 }, () => [
1183
+ w.loadingIcon ? (f(), H(ee, {
978
1184
  key: 0,
979
1185
  class: "vv-button__loading-icon",
980
- name: A.loadingIcon
981
- }, null, 8, ["name"])) : w("", !0),
982
- A.loadingLabel ? (i(), y("span", ro, H(A.loadingLabel), 1)) : w("", !0)
983
- ]) : (i(), y(ne, { key: 1 }, [
984
- $(A.$slots, "before"),
985
- t(d) ? (i(), W(J, G({
1186
+ name: w.loadingIcon
1187
+ }, null, 8, ["name"])) : C("", !0),
1188
+ w.loadingLabel ? (f(), g("span", va, T(w.loadingLabel), 1)) : C("", !0)
1189
+ ]) : (f(), g(ie, { key: 1 }, [
1190
+ V(w.$slots, "before"),
1191
+ a(p) ? (f(), H(ee, R({
986
1192
  key: 0,
987
1193
  class: "vv-button__icon"
988
- }, t(T)), null, 16)) : w("", !0),
989
- t(l) ? (i(), y("span", io, [
990
- $(A.$slots, "label", {}, () => [
991
- Z(H(t(l)), 1)
1194
+ }, a(L)), null, 16)) : C("", !0),
1195
+ a(r) ? (f(), g("span", fa, [
1196
+ V(w.$slots, "label", {}, () => [
1197
+ Y(T(a(r)), 1)
992
1198
  ])
993
- ])) : w("", !0),
994
- $(A.$slots, "after")
1199
+ ])) : C("", !0),
1200
+ V(w.$slots, "after")
995
1201
  ], 64))
996
1202
  ])
997
1203
  ]),
998
1204
  _: 3
999
- }, 16, ["id"]));
1205
+ }, 16, ["id", "class"]));
1000
1206
  }
1001
- }), co = {
1002
- ...ve,
1003
- ...Ce,
1004
- ...xe,
1207
+ }), ma = {
1208
+ ...me,
1209
+ ...De,
1210
+ ...qe,
1005
1211
  /**
1006
1212
  * String or String[] of css classes (modifiers) that will be provided to each button'
1007
1213
  */
@@ -1009,86 +1215,86 @@ const ro = {
1009
1215
  toggle: { type: Boolean, default: !1 },
1010
1216
  multiple: { type: Boolean, default: !1 },
1011
1217
  modelValue: { type: [String, Array], default: void 0 }
1012
- }, vo = ["update:modelValue"], po = {
1218
+ }, ba = ["update:modelValue"], ha = {
1013
1219
  name: "VvButtonGroup"
1014
- }, tl = /* @__PURE__ */ K({
1015
- ...po,
1016
- props: co,
1017
- emits: vo,
1018
- setup(o, { emit: n }) {
1019
- const e = o, {
1020
- disabled: r,
1021
- toggle: a,
1220
+ }, fs = /* @__PURE__ */ j({
1221
+ ...ha,
1222
+ props: ma,
1223
+ emits: ba,
1224
+ setup(t, { emit: l }) {
1225
+ const e = t, {
1226
+ disabled: s,
1227
+ toggle: o,
1022
1228
  modifiers: c,
1023
1229
  multiple: u,
1024
1230
  unselectable: v,
1025
- itemModifiers: m
1026
- } = toRefs(e);
1027
- watchEffect(() => {
1231
+ itemModifiers: d
1232
+ } = G(e);
1233
+ _t(() => {
1028
1234
  typeof e.modelValue == "string" && u.value && console.warn(
1029
1235
  "[VvButtonGroup]: modelValue is a string but multiple is true."
1030
1236
  );
1031
1237
  });
1032
- const d = computed({
1238
+ const p = n({
1033
1239
  get: () => u.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
1034
- set: (s) => (s !== void 0 && (Array.isArray(e.modelValue) || u.value) && !Array.isArray(s) && (s = [s]), n("update:modelValue", s))
1240
+ set: (i) => (i !== void 0 && (Array.isArray(e.modelValue) || u.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i))
1035
1241
  });
1036
- useProvideGroupState({
1037
- key: dt,
1038
- modelValue: d,
1039
- disabled: r,
1040
- toggle: a,
1242
+ lt({
1243
+ key: Ft,
1244
+ modelValue: p,
1245
+ disabled: s,
1246
+ toggle: o,
1041
1247
  multiple: u,
1042
1248
  unselectable: v,
1043
- itemModifiers: m
1249
+ itemModifiers: d
1044
1250
  });
1045
- const l = useBemModifiers("vv-button-group", c);
1046
- return (s, p) => (i(), y("div", {
1047
- class: ee(t(l)),
1251
+ const r = X("vv-button-group", c);
1252
+ return (i, b) => (f(), g("div", {
1253
+ class: le(a(r)),
1048
1254
  role: "group"
1049
1255
  }, [
1050
- $(s.$slots, "default")
1256
+ V(i.$slots, "default")
1051
1257
  ], 2));
1052
1258
  }
1053
- }), fo = {
1259
+ }), ya = {
1054
1260
  title: String,
1055
1261
  modifiers: [String, Array]
1056
- }, mo = {
1262
+ }, ga = {
1057
1263
  key: 0,
1058
1264
  class: "vv-card__header"
1059
- }, bo = {
1265
+ }, _a = {
1060
1266
  key: 1,
1061
1267
  class: "vv-card__content"
1062
- }, ho = {
1268
+ }, Sa = {
1063
1269
  key: 2,
1064
1270
  class: "vv-card__footer"
1065
- }, yo = {
1271
+ }, Va = {
1066
1272
  name: "VvCard"
1067
- }, ol = /* @__PURE__ */ K({
1068
- ...yo,
1069
- props: fo,
1070
- setup(o) {
1071
- const n = o, { modifiers: e } = toRefs(n), r = useBemModifiers("vv-card", e);
1072
- return (a, c) => (i(), y("article", {
1073
- class: ee(t(r))
1273
+ }, ps = /* @__PURE__ */ j({
1274
+ ...Va,
1275
+ props: ya,
1276
+ setup(t) {
1277
+ const l = t, { modifiers: e } = G(l), s = X("vv-card", e);
1278
+ return (o, c) => (f(), g("article", {
1279
+ class: le(a(s))
1074
1280
  }, [
1075
- a.$slots.header || a.title ? (i(), y("header", mo, [
1076
- $(a.$slots, "header", {}, () => [
1077
- Z(H(a.title), 1)
1281
+ o.$slots.header || o.title ? (f(), g("header", ga, [
1282
+ V(o.$slots, "header", {}, () => [
1283
+ Y(T(o.title), 1)
1078
1284
  ])
1079
- ])) : w("", !0),
1080
- $(a.$slots, "default"),
1081
- a.$slots.content ? (i(), y("div", bo, [
1082
- $(a.$slots, "content")
1083
- ])) : w("", !0),
1084
- a.$slots.footer ? (i(), y("footer", ho, [
1085
- $(a.$slots, "footer")
1086
- ])) : w("", !0)
1285
+ ])) : C("", !0),
1286
+ V(o.$slots, "default"),
1287
+ o.$slots.content ? (f(), g("div", _a, [
1288
+ V(o.$slots, "content")
1289
+ ])) : C("", !0),
1290
+ o.$slots.footer ? (f(), g("footer", Sa, [
1291
+ V(o.$slots, "footer")
1292
+ ])) : C("", !0)
1087
1293
  ], 2));
1088
1294
  }
1089
- }), go = {
1090
- ...ht,
1091
- ...ve,
1295
+ }), $a = {
1296
+ ...tl,
1297
+ ...me,
1092
1298
  /**
1093
1299
  * If true, the input will be indeterminated
1094
1300
  */
@@ -1101,9 +1307,9 @@ const ro = {
1101
1307
  * If true, the input will be displayed as a switch
1102
1308
  */
1103
1309
  switch: Boolean
1104
- }, _o = ["click", "update:modelValue", "change", "blur"];
1105
- function So(o, n) {
1106
- const { group: e, isInGroup: r, getGroupOrLocalRef: a } = useInjectedGroupState(vt), { id: c, switch: u, indeterminate: v } = toRefs(o), m = a("modelValue", o, n), d = a("readonly", o), l = a("disabled", o), s = a("valid", o), p = a("invalid", o);
1310
+ }, ka = ["click", "update:modelValue", "change", "blur"];
1311
+ function Aa(t, l) {
1312
+ const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(zt), { id: c, switch: u, indeterminate: v } = G(t), d = o("modelValue", t, l), p = o("readonly", t), r = o("disabled", t), i = o("valid", t), b = o("invalid", t);
1107
1313
  return {
1108
1314
  // local props
1109
1315
  id: c,
@@ -1111,44 +1317,44 @@ function So(o, n) {
1111
1317
  indeterminate: v,
1112
1318
  // global props
1113
1319
  group: e,
1114
- isInGroup: r,
1115
- modelValue: m,
1116
- readonly: d,
1117
- disabled: l,
1118
- valid: s,
1119
- invalid: p
1320
+ isInGroup: s,
1321
+ modelValue: d,
1322
+ readonly: p,
1323
+ disabled: r,
1324
+ valid: i,
1325
+ invalid: b
1120
1326
  };
1121
1327
  }
1122
- function Re(o) {
1123
- return Array.isArray(o) ? o.filter((n) => isString(n)).join(" ") : o;
1328
+ function Je(t) {
1329
+ return Array.isArray(t) ? t.filter((l) => El(l)).join(" ") : t;
1124
1330
  }
1125
- function Ve(o, n) {
1331
+ function Be(t, l) {
1126
1332
  const {
1127
1333
  invalid: e,
1128
- valid: r,
1129
- hint: a,
1334
+ valid: s,
1335
+ hint: o,
1130
1336
  loading: c
1131
- } = n, {
1337
+ } = l, {
1132
1338
  hintLabel: u,
1133
1339
  modelValue: v,
1134
- valid: m,
1135
- validLabel: d,
1136
- invalid: l,
1137
- invalidLabel: s,
1138
- ...p
1139
- } = toRefs(o), g = resolveFieldData(p, "loading"), k = resolveFieldData(p, "loadingLabel"), C = computed(() => l.value ? !!(l.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !isEmpty(s)) : !1), b = computed(
1140
- () => !!(u && u.value || a)
1141
- ), S = computed(
1142
- () => !!(d && d.value || r)
1143
- ), I = computed(
1144
- () => !!(g != null && g.value && c || g != null && g.value && (k != null && k.value))
1145
- ), B = computed(
1146
- () => b.value || S.value || C.value || I.value
1340
+ valid: d,
1341
+ validLabel: p,
1342
+ invalid: r,
1343
+ invalidLabel: i,
1344
+ ...b
1345
+ } = G(t), _ = Ze(b, "loading"), k = Ze(b, "loadingLabel"), A = n(() => r.value ? !!(r.value && e || i != null && i.value && Array.isArray(i.value) && i.value.length > 0 || i != null && i.value && !ge(i)) : !1), y = n(
1346
+ () => !!(u && u.value || o)
1347
+ ), m = n(
1348
+ () => !!(p && p.value || s)
1349
+ ), I = n(
1350
+ () => !!(_ != null && _.value && c || _ != null && _.value && (k != null && k.value))
1351
+ ), O = n(
1352
+ () => y.value || m.value || A.value || I.value
1147
1353
  );
1148
1354
  return {
1149
- hasInvalid: C,
1150
- hasHint: b,
1151
- hasValid: S,
1355
+ hasInvalid: A,
1356
+ hasHint: y,
1357
+ hasValid: m,
1152
1358
  hasLoading: I,
1153
1359
  HintSlot: {
1154
1360
  name: "HintSlot",
@@ -1158,31 +1364,31 @@ function Ve(o, n) {
1158
1364
  default: () => ({})
1159
1365
  }
1160
1366
  },
1161
- setup(E) {
1162
- const O = computed(() => {
1163
- const L = toReactive({
1367
+ setup(D) {
1368
+ const L = n(() => {
1369
+ const x = hl({
1164
1370
  hintLabel: u,
1165
1371
  modelValue: v,
1166
- valid: m,
1167
- validLabel: d,
1168
- invalid: l,
1169
- invalidLabel: s,
1170
- loading: g,
1372
+ valid: d,
1373
+ validLabel: p,
1374
+ invalid: r,
1375
+ invalidLabel: i,
1376
+ loading: _,
1171
1377
  loadingLabel: k,
1172
- ...E.params
1378
+ ...D.params
1173
1379
  });
1174
- return l != null && l.value ? (e == null ? void 0 : e(L)) || Re(s == null ? void 0 : s.value) || (u == null ? void 0 : u.value) : m != null && m.value ? (r == null ? void 0 : r(L)) || Re(d == null ? void 0 : d.value) || (u == null ? void 0 : u.value) : g != null && g.value ? (c == null ? void 0 : c(L)) || Re(k == null ? void 0 : k.value) || (u == null ? void 0 : u.value) : (a == null ? void 0 : a(L)) || Re(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
1380
+ return r != null && r.value ? (e == null ? void 0 : e(x)) || Je(i == null ? void 0 : i.value) || (u == null ? void 0 : u.value) : d != null && d.value ? (s == null ? void 0 : s(x)) || Je(p == null ? void 0 : p.value) || (u == null ? void 0 : u.value) : _ != null && _.value ? (c == null ? void 0 : c(x)) || Je(k == null ? void 0 : k.value) || (u == null ? void 0 : u.value) : (o == null ? void 0 : o(x)) || Je(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
1175
1381
  });
1176
1382
  return {
1177
- isVisible: B,
1178
- hasInvalid: C,
1179
- hasValid: S,
1180
- hintContent: O
1383
+ isVisible: O,
1384
+ hasInvalid: A,
1385
+ hasValid: m,
1386
+ hintContent: L
1181
1387
  };
1182
1388
  },
1183
1389
  render() {
1184
1390
  if (this.isVisible)
1185
- return h(
1391
+ return be(
1186
1392
  "small",
1187
1393
  {
1188
1394
  role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
@@ -1193,167 +1399,178 @@ function Ve(o, n) {
1193
1399
  }
1194
1400
  };
1195
1401
  }
1196
- const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ko = {
1402
+ const wa = ["for"], Ca = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ia = {
1197
1403
  name: "VvCheckbox"
1198
- }, Ao = /* @__PURE__ */ K({
1199
- ...ko,
1200
- props: go,
1201
- emits: _o,
1202
- setup(o, { emit: n }) {
1203
- const e = o, r = useSlots(), {
1204
- id: a,
1404
+ }, Ea = /* @__PURE__ */ j({
1405
+ ...Ia,
1406
+ props: $a,
1407
+ emits: ka,
1408
+ setup(t, { emit: l }) {
1409
+ const e = t, s = Ae(), {
1410
+ id: o,
1205
1411
  disabled: c,
1206
1412
  readonly: u,
1207
1413
  valid: v,
1208
- invalid: m,
1209
- propsSwitch: d,
1210
- modelValue: l,
1211
- indeterminate: s,
1212
- isInGroup: p
1213
- } = So(e, n), g = useUniqueId(a), k = computed(() => S.value ? -1 : e.tabindex), C = ref(), b = computed(
1214
- () => e.uncheckedValue !== void 0 && !p.value
1215
- ), S = computed(() => c.value || u.value), I = computed(() => {
1216
- if (m.value === !0)
1414
+ invalid: d,
1415
+ propsSwitch: p,
1416
+ modelValue: r,
1417
+ indeterminate: i,
1418
+ isInGroup: b
1419
+ } = Aa(e, l), _ = Le(o), k = n(() => m.value ? -1 : e.tabindex), A = N(), y = n(
1420
+ () => e.uncheckedValue !== void 0 && !b.value
1421
+ ), m = n(() => c.value || u.value), I = n(() => {
1422
+ if (d.value === !0)
1217
1423
  return !0;
1218
1424
  if (v.value === !0)
1219
1425
  return !1;
1220
- }), B = computed(() => b.value ? l.value === e.value : Array.isArray(l.value) ? contains(e.value, l.value) : equals(e.value, l.value)), E = computed(() => !!(s.value || !B.value && b.value && e.uncheckedValue !== l.value)), O = computed(() => {
1221
- if (!b.value)
1426
+ }), O = n(() => y.value ? r.value === e.value : Array.isArray(r.value) ? Ce(e.value, r.value) : Pe(e.value, r.value)), D = n(() => !!(i.value || !O.value && y.value && e.uncheckedValue !== r.value)), L = n(() => {
1427
+ if (!y.value)
1222
1428
  return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
1223
- }), L = computed({
1429
+ }), x = n({
1224
1430
  get() {
1225
- return B.value;
1431
+ return O.value;
1226
1432
  },
1227
- set(T) {
1228
- if (b.value)
1229
- l.value = T ? e.value : e.uncheckedValue;
1230
- else if (Array.isArray(l.value) || p.value) {
1231
- const U = new Set(
1232
- Array.isArray(l.value) ? l.value : l.value !== void 0 ? [l.value] : []
1433
+ set(W) {
1434
+ if (y.value)
1435
+ r.value = W ? e.value : e.uncheckedValue;
1436
+ else if (Array.isArray(r.value) || b.value) {
1437
+ const F = new Set(
1438
+ Array.isArray(r.value) ? r.value : r.value !== void 0 ? [r.value] : []
1233
1439
  );
1234
- T ? U.add(e.value) : U.delete(e.value), l.value = [...U];
1440
+ W ? F.add(e.value) : F.delete(e.value), r.value = [...F];
1235
1441
  } else
1236
- l.value = T ? e.value : void 0;
1237
- n("change", T);
1442
+ r.value = W ? e.value : void 0;
1443
+ l("change", W);
1238
1444
  }
1239
- }), { modifiers: q } = toRefs(e), Q = useBemModifiers(
1445
+ }), { modifiers: w } = G(e), se = X(
1240
1446
  "vv-checkbox",
1241
- q,
1242
- computed(() => ({
1243
- switch: d.value,
1447
+ w,
1448
+ n(() => ({
1449
+ switch: p.value,
1244
1450
  valid: v.value,
1245
- invalid: m.value,
1451
+ invalid: d.value,
1246
1452
  disabled: c.value,
1247
1453
  readonly: u.value,
1248
- indeterminate: s.value
1454
+ indeterminate: i.value
1249
1455
  }))
1250
1456
  );
1251
- watchEffect(() => {
1252
- b.value && Array.isArray(l.value) && console.warn(
1457
+ _t(() => {
1458
+ y.value && Array.isArray(r.value) && console.warn(
1253
1459
  "[VvCheckbox] The model value is an array but the component is in binary mode."
1254
1460
  );
1255
- }), watch(
1256
- () => E.value,
1257
- (T) => {
1258
- T ? C.value.indeterminate = !0 : C.value.indeterminate = !1;
1461
+ }), ve(
1462
+ () => D.value,
1463
+ (W) => {
1464
+ W ? A.value.indeterminate = !0 : A.value.indeterminate = !1;
1259
1465
  }
1260
- ), onMounted(() => {
1261
- E.value && (C.value.indeterminate = !0);
1466
+ ), ul(() => {
1467
+ D.value && (A.value.indeterminate = !0);
1262
1468
  });
1263
- const { HintSlot: P } = Ve(e, r);
1264
- return (T, U) => (i(), y("label", {
1265
- class: ee(t(Q)),
1266
- for: t(g)
1469
+ const { HintSlot: P } = Be(e, s);
1470
+ return (W, F) => (f(), g("label", {
1471
+ class: le(a(se)),
1472
+ for: a(_)
1267
1473
  }, [
1268
- Se(M("input", {
1269
- id: t(g),
1474
+ Oe(M("input", {
1475
+ id: a(_),
1270
1476
  ref_key: "input",
1271
- ref: C,
1272
- "onUpdate:modelValue": U[0] || (U[0] = (te) => Ae(L) ? L.value = te : null),
1477
+ ref: A,
1478
+ "onUpdate:modelValue": F[0] || (F[0] = (ue) => Ee(x) ? x.value = ue : null),
1273
1479
  type: "checkbox",
1274
1480
  class: "vv-checkbox__input",
1275
- name: T.name,
1276
- disabled: t(S),
1277
- value: t(O),
1278
- tabindex: t(k),
1279
- "aria-invalid": t(I)
1280
- }, null, 8, $o), [
1281
- [$t, t(L)]
1481
+ name: W.name,
1482
+ disabled: a(m),
1483
+ value: a(L),
1484
+ tabindex: a(k),
1485
+ "aria-invalid": a(I)
1486
+ }, null, 8, Ca), [
1487
+ [dl, a(x)]
1282
1488
  ]),
1283
- $(T.$slots, "default", { value: t(l) }, () => [
1284
- Z(H(T.label), 1)
1489
+ V(W.$slots, "default", { value: a(r) }, () => [
1490
+ Y(T(W.label), 1)
1285
1491
  ]),
1286
- de(t(P), {
1492
+ pe(a(P), {
1287
1493
  class: "vv-checkbox__hint",
1288
- params: { value: t(l) }
1494
+ params: { value: a(r) }
1289
1495
  }, null, 8, ["params"])
1290
- ], 10, Vo));
1496
+ ], 10, wa));
1291
1497
  }
1292
- }), Co = yt, wo = ["update:modelValue", "change"], Eo = ["textContent"], Io = { class: "vv-checkbox-group__wrapper" }, Po = {
1498
+ }), Pa = ll, Oa = ["update:modelValue", "change"];
1499
+ function rt(t) {
1500
+ const { options: l, labelKey: e, valueKey: s, disabledKey: o } = G(t);
1501
+ return {
1502
+ options: l,
1503
+ getOptionLabel: (d) => typeof d != "object" && d !== null ? d : typeof e.value == "function" ? e.value(d) : d[e.value],
1504
+ getOptionValue: (d) => typeof d != "object" && d !== null ? d : typeof s.value == "function" ? s.value(d) : d[s.value],
1505
+ getOptionDisabled: (d) => typeof d != "object" && d !== null ? !1 : typeof o.value == "function" ? o.value(d) : d[o.value]
1506
+ };
1507
+ }
1508
+ const Da = ["textContent"], La = { class: "vv-checkbox-group__wrapper" }, Ba = {
1293
1509
  name: "VvCheckboxGroup"
1294
- }, al = /* @__PURE__ */ K({
1295
- ...Po,
1296
- props: Co,
1297
- emits: wo,
1298
- setup(o, { emit: n }) {
1299
- const e = o, r = useSlots(), a = useVModel(e, "modelValue", n), { disabled: c, readonly: u, vertical: v, valid: m, invalid: d, modifiers: l } = toRefs(e);
1300
- useProvideGroupState({
1301
- key: vt,
1302
- modelValue: a,
1510
+ }, ms = /* @__PURE__ */ j({
1511
+ ...Ba,
1512
+ props: Pa,
1513
+ emits: Oa,
1514
+ setup(t, { emit: l }) {
1515
+ const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: c, readonly: u, vertical: v, valid: d, invalid: p, modifiers: r } = G(e);
1516
+ lt({
1517
+ key: zt,
1518
+ modelValue: o,
1303
1519
  disabled: c,
1304
1520
  readonly: u,
1305
- valid: m,
1306
- invalid: d
1521
+ valid: d,
1522
+ invalid: p
1307
1523
  });
1308
- const { getOptionLabel: s, getOptionValue: p } = useOptions(e), g = useBemModifiers(
1524
+ const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
1309
1525
  "vv-checkbox-group",
1310
- l,
1311
- computed(() => ({
1526
+ r,
1527
+ n(() => ({
1312
1528
  disabled: c.value,
1313
1529
  readonly: u.value,
1314
1530
  horizontal: !v.value,
1315
- valid: m.value,
1316
- invalid: d.value
1531
+ valid: d.value,
1532
+ invalid: p.value
1317
1533
  }))
1318
- ), k = (b, S) => ({
1319
- id: `${e.name}_opt${S}`,
1534
+ ), k = (y, m) => ({
1535
+ id: `${e.name}_opt${m}`,
1320
1536
  name: e.name,
1321
- label: s(b),
1322
- value: p(b)
1323
- }), { HintSlot: C } = Ve(e, r);
1324
- return (b, S) => (i(), y("fieldset", {
1325
- class: ee(t(g))
1537
+ label: i(y),
1538
+ value: b(y)
1539
+ }), { HintSlot: A } = Be(e, s);
1540
+ return (y, m) => (f(), g("fieldset", {
1541
+ class: le(a(_))
1326
1542
  }, [
1327
- b.label ? (i(), y("legend", {
1543
+ y.label ? (f(), g("legend", {
1328
1544
  key: 0,
1329
- textContent: H(b.label)
1330
- }, null, 8, Eo)) : w("", !0),
1331
- M("div", Io, [
1332
- b.options.length > 0 ? (i(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (i(), W(Ao, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
1545
+ textContent: T(y.label)
1546
+ }, null, 8, Da)) : C("", !0),
1547
+ M("div", La, [
1548
+ y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Ea, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
1333
1549
  ]),
1334
- de(t(C), { class: "vv-checkbox-group__hint" })
1550
+ pe(a(A), { class: "vv-checkbox-group__hint" })
1335
1551
  ], 2));
1336
1552
  }
1337
- }), Oo = [
1553
+ }), Ta = [
1338
1554
  "update:modelValue",
1339
1555
  "change:search",
1340
1556
  "focus",
1341
1557
  "blur"
1342
- ], Do = {
1343
- ...Le,
1344
- ...Te,
1345
- ...Ie,
1346
- ...Pe,
1558
+ ], Na = {
1559
+ ...nt,
1560
+ ...ot,
1561
+ ...Ue,
1562
+ ...Fe,
1563
+ ...ze,
1564
+ ...at,
1347
1565
  ...De,
1348
- ...qe,
1349
- ...Ce,
1350
- ...Oe,
1351
- ...ve,
1352
1566
  ...Ke,
1353
- ...ze,
1354
- ...Xe,
1355
- ...xe,
1356
- ...Fe,
1567
+ ...me,
1568
+ ...kt,
1569
+ ...At,
1570
+ ...wt,
1571
+ ...qe,
1572
+ ...ht,
1573
+ ...Me,
1357
1574
  /**
1358
1575
  * modelValue can be a string, number, boolean, object or array of string, number, boolean, object
1359
1576
  */
@@ -1361,30 +1578,30 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
1361
1578
  type: [String, Number, Boolean, Object, Array],
1362
1579
  default: void 0
1363
1580
  },
1364
- /**
1365
- * Select input label
1366
- */
1367
- label: String,
1368
1581
  /**
1369
1582
  * Label for no search results
1370
1583
  */
1371
1584
  noResultsLabel: { type: String, default: "No results" },
1585
+ /**
1586
+ * Label for no options available
1587
+ */
1588
+ noOptionsLabel: { type: String, default: "No options available" },
1372
1589
  /**
1373
1590
  * Label for selected option hint
1374
1591
  */
1375
- selectedLabel: { type: String, default: "Selected" },
1592
+ selectedHintLabel: { type: String, default: "Selected" },
1376
1593
  /**
1377
- * Label for deselect button
1594
+ * Label for deselect action button
1378
1595
  */
1379
- deselectLabel: { type: String, default: "Deselect" },
1596
+ deselectActionLabel: { type: String, default: "Deselect" },
1380
1597
  /**
1381
1598
  * Label for select option hint
1382
1599
  */
1383
- pressToSelectLabel: { type: String, default: "Press enter to select" },
1600
+ selectHintLabel: { type: String, default: "Press enter to select" },
1384
1601
  /**
1385
1602
  * Label for deselected option hint
1386
1603
  */
1387
- pressToDeselectLabel: { type: String, default: "Press enter to remove" },
1604
+ deselectHintLabel: { type: String, default: "Press enter to remove" },
1388
1605
  /**
1389
1606
  * Select input placeholder
1390
1607
  */
@@ -1438,7 +1655,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
1438
1655
  * Set dropdown width to the same as the trigger
1439
1656
  */
1440
1657
  triggerWidth: {
1441
- ...Fe.triggerWidth,
1658
+ ...ht.triggerWidth,
1442
1659
  default: !0
1443
1660
  },
1444
1661
  /**
@@ -1455,10 +1672,10 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
1455
1672
  * Close dropdown on select (not multiple)
1456
1673
  */
1457
1674
  autoClose: Boolean
1458
- }, ot = ["listbox", "menu"], Bo = {
1459
- ...Me,
1460
- ...ve,
1461
- ...Fe,
1675
+ }, Ra = {
1676
+ ...st,
1677
+ ...me,
1678
+ ...ht,
1462
1679
  /**
1463
1680
  * Show / hide dropdown programmatically
1464
1681
  */
@@ -1478,258 +1695,362 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
1478
1695
  */
1479
1696
  role: {
1480
1697
  type: String,
1481
- default: ot[1],
1482
- validator: (o) => ot.includes(o)
1698
+ default: je.menu,
1699
+ validator: (t) => Object.values(je).includes(t)
1483
1700
  }
1484
- }, Ro = ["id", "tabindex", "role", "aria-labelledby"], To = {
1701
+ };
1702
+ function Ha({
1703
+ reference: t,
1704
+ id: l,
1705
+ expanded: e,
1706
+ aria: s
1707
+ }) {
1708
+ const o = Al(), c = j({
1709
+ name: "VvDropdownTriggerProvider",
1710
+ provide() {
1711
+ return {
1712
+ [Yt]: {
1713
+ reference: t,
1714
+ id: l,
1715
+ expanded: e,
1716
+ aria: s,
1717
+ bus: o
1718
+ }
1719
+ };
1720
+ },
1721
+ setup() {
1722
+ return {};
1723
+ },
1724
+ render() {
1725
+ var u, v;
1726
+ return be(ie, {}, (v = (u = this.$slots).default) == null ? void 0 : v.call(u));
1727
+ }
1728
+ });
1729
+ return {
1730
+ bus: o,
1731
+ component: c
1732
+ };
1733
+ }
1734
+ function Ma({
1735
+ role: t,
1736
+ expanded: l
1737
+ }) {
1738
+ const e = n(
1739
+ () => t.value === je.listbox ? mt.option : mt.presentation
1740
+ );
1741
+ return gt(Jt, {
1742
+ role: e,
1743
+ expanded: l
1744
+ }), { itemRole: e };
1745
+ }
1746
+ function xa({
1747
+ expanded: t
1748
+ }) {
1749
+ gt(Xt, {
1750
+ role: Wt.menuitem,
1751
+ expanded: t
1752
+ });
1753
+ }
1754
+ const Ga = ["id", "tabindex", "role", "aria-labelledby"], ja = {
1485
1755
  name: "VvDropdown",
1486
1756
  inheritAttrs: !1
1487
- }, St = /* @__PURE__ */ K({
1488
- ...To,
1489
- props: Bo,
1757
+ }, sl = /* @__PURE__ */ j({
1758
+ ...ja,
1759
+ props: Ra,
1490
1760
  emits: ["update:modelValue"],
1491
- setup(o, { emit: n }) {
1492
- const e = o, { id: r } = toRefs(e), a = useUniqueId(r), c = useAttrs(), u = ref("auto"), v = ref("auto"), m = ref(null), d = ref(null), l = ref(null), s = ref(null), p = computed({
1493
- get: () => e.reference ?? m.value,
1494
- set: (f) => {
1495
- m.value = f;
1761
+ setup(t, { emit: l }) {
1762
+ const e = t, { id: s } = G(e), o = Le(s), c = yt(), u = N("auto"), v = N("auto"), d = N(null), p = N(null), r = N(null), i = N(null), b = n({
1763
+ get: () => e.reference ?? d.value,
1764
+ set: (h) => {
1765
+ d.value = h;
1496
1766
  }
1497
- }), g = computed(() => {
1498
- const f = [];
1499
- if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? f.push(Qe()) : f.push(
1500
- Qe(e.autoPlacement)
1501
- ) : e.flip && (typeof e.flip == "boolean" ? f.push(Ze()) : f.push(Ze(e.flip))), e.shift && (typeof e.shift == "boolean" ? f.push(et()) : f.push(et(e.shift))), e.size) {
1502
- const x = ({
1503
- availableWidth: ue,
1504
- availableHeight: he
1767
+ }), _ = n(() => {
1768
+ const h = [];
1769
+ if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? h.push(Et()) : h.push(
1770
+ Et(e.autoPlacement)
1771
+ ) : e.flip && (typeof e.flip == "boolean" ? h.push(Pt()) : h.push(Pt(e.flip))), e.shift && (typeof e.shift == "boolean" ? h.push(Ot()) : h.push(Ot(e.shift))), e.size) {
1772
+ const U = ({
1773
+ availableWidth: ce,
1774
+ availableHeight: $e
1505
1775
  }) => {
1506
- u.value = `${ue}px`, v.value = `${he}px`;
1776
+ u.value = `${ce}px`, v.value = `${$e}px`;
1507
1777
  };
1508
- typeof e.size == "boolean" ? f.push(
1509
- tt({
1510
- apply: x
1778
+ typeof e.size == "boolean" ? h.push(
1779
+ Dt({
1780
+ apply: U
1511
1781
  })
1512
- ) : f.push(
1513
- tt({
1782
+ ) : h.push(
1783
+ Dt({
1514
1784
  ...e.size,
1515
- apply: x
1785
+ apply: U
1516
1786
  })
1517
1787
  );
1518
1788
  }
1519
- return e.offset && (f.push(He(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? f.push(He(Number(e.offset))) : f.push(He(e.offset))), e.arrow && f.push(
1520
- Dt({
1521
- element: l
1789
+ return e.offset && (h.push(ct(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? h.push(ct(Number(e.offset))) : h.push(ct(e.offset))), e.arrow && h.push(
1790
+ Vl({
1791
+ element: r
1522
1792
  })
1523
- ), f;
1524
- }), { x: k, y: C, strategy: b, middlewareData: S, placement: I } = Bt(
1793
+ ), h;
1794
+ }), { x: k, y: A, strategy: y, middlewareData: m, placement: I } = $l(
1795
+ b,
1525
1796
  p,
1526
- d,
1527
1797
  {
1528
- whileElementsMounted: Rt,
1798
+ whileElementsMounted: kl,
1529
1799
  placement: e.placement,
1530
- middleware: g
1800
+ middleware: _
1531
1801
  }
1532
- ), B = computed(() => ({
1533
- position: b.value,
1534
- top: `${C.value ?? 0}px`,
1802
+ ), O = n(() => ({
1803
+ position: y.value,
1804
+ top: `${A.value ?? 0}px`,
1535
1805
  left: `${k.value ?? 0}px`,
1536
1806
  maxWidth: u.value,
1537
1807
  maxHeight: v.value,
1538
- width: e.triggerWidth && p.value ? `${p.value.offsetWidth}px` : void 0
1539
- })), E = computed(() => I.value.split("-")[0]), O = computed(
1808
+ width: e.triggerWidth && b.value ? `${b.value.offsetWidth}px` : void 0
1809
+ })), D = n(() => I.value.split("-")[0]), L = n(
1540
1810
  () => ({
1541
1811
  top: "bottom",
1542
1812
  right: "left",
1543
1813
  bottom: "top",
1544
1814
  left: "right"
1545
- })[E.value] ?? "bottom"
1546
- ), L = computed(() => {
1547
- var f, x, ue, he;
1548
- return ["bottom", "top"].includes(O.value) ? {
1549
- right: `${((f = S.value.arrow) == null ? void 0 : f.x) ?? 0}px`,
1550
- [O.value]: `${-(((x = l.value) == null ? void 0 : x.offsetWidth) ?? 0) / 2}px`
1815
+ })[D.value] ?? "bottom"
1816
+ ), x = n(() => {
1817
+ var h, U, ce, $e;
1818
+ return ["bottom", "top"].includes(L.value) ? {
1819
+ right: `${((h = m.value.arrow) == null ? void 0 : h.x) ?? 0}px`,
1820
+ [L.value]: `${-(((U = r.value) == null ? void 0 : U.offsetWidth) ?? 0) / 2}px`
1551
1821
  } : {
1552
- top: `${((ue = S.value.arrow) == null ? void 0 : ue.y) ?? 0}px`,
1553
- [O.value]: `${-(((he = l.value) == null ? void 0 : he.offsetWidth) ?? 0) / 2}px`
1822
+ top: `${((ce = m.value.arrow) == null ? void 0 : ce.y) ?? 0}px`,
1823
+ [L.value]: `${-((($e = r.value) == null ? void 0 : $e.offsetWidth) ?? 0) / 2}px`
1554
1824
  };
1555
- }), q = useVModel(e, "modelValue", n), Q = ref(!1), P = computed({
1556
- get: () => q.value ?? Q.value,
1557
- set: (f) => {
1558
- if (q.value === void 0) {
1559
- Q.value = f;
1825
+ }), w = et(e, "modelValue", l), se = N(!1), P = n({
1826
+ get: () => w.value ?? se.value,
1827
+ set: (h) => {
1828
+ if (w.value === void 0) {
1829
+ se.value = h;
1560
1830
  return;
1561
1831
  }
1562
- q.value = f;
1832
+ w.value = h;
1563
1833
  }
1564
- }), T = () => {
1834
+ }), W = () => {
1565
1835
  P.value = !0;
1566
- }, U = () => {
1836
+ }, F = () => {
1567
1837
  P.value = !1;
1568
- }, te = () => {
1838
+ }, ue = () => {
1569
1839
  P.value = !P.value;
1570
- }, re = (f) => {
1571
- p.value = f;
1840
+ }, he = (h) => {
1841
+ b.value = h;
1572
1842
  };
1573
- watch(P, (f) => {
1574
- f && e.autofocusFirst && nextTick(() => {
1575
- const x = ae(
1576
- d.value
1843
+ ve(P, (h) => {
1844
+ h && e.autofocusFirst && Xe(() => {
1845
+ const U = ae(
1846
+ p.value
1577
1847
  );
1578
- x.length > 0 && x[0].focus();
1848
+ U.length > 0 && U[0].focus();
1579
1849
  });
1580
- }), onClickOutside(
1581
- d,
1850
+ }), xt(
1851
+ p,
1582
1852
  () => {
1583
1853
  e.autoClose && (P.value = !1);
1584
1854
  },
1585
- { ignore: [p] }
1855
+ { ignore: [b] }
1586
1856
  );
1587
- const ie = computed(() => {
1588
- var f;
1589
- return ((f = p.value) == null ? void 0 : f.getAttribute("id")) ?? void 0;
1590
- }), A = computed(() => ({
1591
- "aria-controls": a.value,
1857
+ const ye = n(() => {
1858
+ var h;
1859
+ return ((h = b.value) == null ? void 0 : h.getAttribute("id")) ?? void 0;
1860
+ }), ne = n(() => ({
1861
+ "aria-controls": o.value,
1592
1862
  "aria-haspopup": !0,
1593
1863
  "aria-expanded": P.value
1594
- })), { component: oe, bus: fe } = useProvideDropdownTrigger({
1595
- reference: p,
1596
- id: a,
1864
+ })), { component: de, bus: _e } = Ha({
1865
+ reference: b,
1866
+ id: o,
1597
1867
  expanded: P,
1598
- aria: A
1868
+ aria: ne
1599
1869
  });
1600
- fe.on("click", te);
1601
- const { role: se, modifiers: be } = toRefs(e), { itemRole: z } = useProvideDropdownItem({ role: se, expanded: P }), R = useBemModifiers(
1870
+ _e.on("click", ue);
1871
+ const { role: re, modifiers: Ve } = G(e), { itemRole: J } = Ma({ role: re, expanded: P }), B = X(
1602
1872
  "vv-dropdown",
1603
- be,
1604
- computed(() => ({
1873
+ Ve,
1874
+ n(() => ({
1605
1875
  arrow: e.arrow
1606
1876
  }))
1607
- ), { focused: X } = useFocusWithin(d);
1608
- function ae(f) {
1609
- return f ? [
1610
- ...f.querySelectorAll(
1877
+ ), { focused: Q } = Vt(p);
1878
+ function ae(h) {
1879
+ return h ? [
1880
+ ...h.querySelectorAll(
1611
1881
  'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
1612
1882
  )
1613
1883
  ].filter(
1614
- (x) => !x.hasAttribute("disabled") && !x.getAttribute("aria-hidden")
1884
+ (U) => !U.hasAttribute("disabled") && !U.getAttribute("aria-hidden")
1615
1885
  ) : [];
1616
1886
  }
1617
- const me = () => {
1618
- nextTick(() => {
1619
- if (X.value) {
1620
- const f = ae(
1621
- d.value
1887
+ const Se = () => {
1888
+ Xe(() => {
1889
+ if (Q.value) {
1890
+ const h = ae(
1891
+ p.value
1622
1892
  );
1623
- if (f.length === 0 || !document.activeElement)
1893
+ if (h.length === 0 || !document.activeElement)
1624
1894
  return;
1625
- const x = f.indexOf(
1895
+ const U = h.indexOf(
1626
1896
  document.activeElement
1627
1897
  );
1628
- x < f.length - 1 ? f[x + 1].focus() : f[0].focus();
1898
+ U < h.length - 1 ? h[U + 1].focus() : h[0].focus();
1629
1899
  }
1630
1900
  });
1631
- }, pe = () => {
1632
- nextTick(() => {
1633
- if (X.value) {
1634
- const f = ae(
1635
- d.value
1901
+ }, we = () => {
1902
+ Xe(() => {
1903
+ if (Q.value) {
1904
+ const h = ae(
1905
+ p.value
1636
1906
  );
1637
- if (f.length === 0 || !document.activeElement)
1907
+ if (h.length === 0 || !document.activeElement)
1638
1908
  return;
1639
- const x = f.indexOf(
1909
+ const U = h.indexOf(
1640
1910
  document.activeElement
1641
1911
  );
1642
- x > 0 ? f[x - 1].focus() : f[f.length - 1].focus();
1912
+ U > 0 ? h[U - 1].focus() : h[h.length - 1].focus();
1643
1913
  }
1644
1914
  });
1645
1915
  };
1646
- return onKeyStroke("Escape", (f) => {
1647
- P.value && (f.preventDefault(), U());
1648
- }), onKeyStroke("ArrowDown", (f) => {
1649
- P.value && X.value && (f.preventDefault(), me());
1650
- }), onKeyStroke("ArrowUp", (f) => {
1651
- P.value && X.value && (f.preventDefault(), pe());
1652
- }), onKeyStroke([" ", "Enter"], (f) => {
1653
- P.value && X.value && (f.preventDefault(), document.activeElement.click());
1654
- }), (f, x) => (i(), y(ne, null, [
1655
- de(t(oe), null, {
1656
- default: ce(() => [
1657
- $(f.$slots, "default", F(j({ init: re, show: T, hide: U, toggle: te, expanded: t(P), aria: t(A) })))
1916
+ return He("Escape", (h) => {
1917
+ P.value && (h.preventDefault(), F());
1918
+ }), He("ArrowDown", (h) => {
1919
+ P.value && Q.value && (h.preventDefault(), Se());
1920
+ }), He("ArrowUp", (h) => {
1921
+ P.value && Q.value && (h.preventDefault(), we());
1922
+ }), He([" ", "Enter"], (h) => {
1923
+ P.value && Q.value && (h.preventDefault(), document.activeElement.click());
1924
+ }), (h, U) => (f(), g(ie, null, [
1925
+ pe(a(de), null, {
1926
+ default: te(() => [
1927
+ V(h.$slots, "default", K(z({ init: he, show: W, hide: F, toggle: ue, expanded: a(P), aria: a(ne) })))
1658
1928
  ]),
1659
1929
  _: 3
1660
1930
  }),
1661
- de(rt, { name: f.transitionName }, {
1662
- default: ce(() => [
1663
- Se(M("div", {
1931
+ pe(Rt, { name: h.transitionName }, {
1932
+ default: te(() => [
1933
+ Oe(M("div", {
1664
1934
  ref_key: "floatingEl",
1665
- ref: d,
1666
- style: Je(t(B)),
1667
- class: ee(t(R))
1935
+ ref: p,
1936
+ style: It(a(O)),
1937
+ class: le(a(B))
1668
1938
  }, [
1669
- e.arrow ? (i(), y("div", {
1939
+ e.arrow ? (f(), g("div", {
1670
1940
  key: 0,
1671
1941
  ref_key: "arrowEl",
1672
- ref: l,
1673
- style: Je(t(L)),
1942
+ ref: r,
1943
+ style: It(a(x)),
1674
1944
  class: "vv-dropdown__arrow"
1675
- }, null, 4)) : w("", !0),
1676
- $(f.$slots, "before", F(j({ expanded: t(P) }))),
1677
- M("ul", G(t(c), {
1678
- id: t(a),
1945
+ }, null, 4)) : C("", !0),
1946
+ V(h.$slots, "before", K(z({ expanded: a(P) }))),
1947
+ M("ul", R(a(c), {
1948
+ id: a(o),
1679
1949
  ref_key: "listEl",
1680
- ref: s,
1681
- tabindex: t(P) ? void 0 : -1,
1682
- role: t(se),
1683
- "aria-labelledby": t(ie),
1950
+ ref: i,
1951
+ tabindex: a(P) ? void 0 : -1,
1952
+ role: a(re),
1953
+ "aria-labelledby": a(ye),
1684
1954
  class: "vv-dropdown__list"
1685
1955
  }), [
1686
- $(f.$slots, "items", F(j({
1687
- role: t(z)
1956
+ V(h.$slots, "items", K(z({
1957
+ role: a(J)
1688
1958
  })))
1689
- ], 16, Ro),
1690
- $(f.$slots, "after", F(j({ expanded: t(P) })))
1959
+ ], 16, Ga),
1960
+ V(h.$slots, "after", K(z({ expanded: a(P) })))
1691
1961
  ], 6), [
1692
- [je, t(P)]
1962
+ [St, a(P)]
1693
1963
  ])
1694
1964
  ]),
1695
1965
  _: 3
1696
1966
  }, 8, ["name"])
1697
1967
  ], 64));
1698
1968
  }
1699
- }), xo = {
1969
+ }), Wa = {
1700
1970
  name: "VvDropdownItem"
1701
- }, Vt = /* @__PURE__ */ K({
1702
- ...xo,
1703
- setup(o) {
1704
- const { role: n, expanded: e } = useInjectedDropdownItem(), r = ref(null);
1705
- useProvideDropdownAction({ expanded: e });
1706
- const a = useElementHover(r), { focused: c } = useFocus(r), { focused: u } = useFocusWithin(r);
1707
- return watch(a, (v) => {
1971
+ }, Ua = /* @__PURE__ */ j({
1972
+ ...Wa,
1973
+ setup(t) {
1974
+ const { role: l, expanded: e } = sa(), s = N(null);
1975
+ xa({ expanded: e });
1976
+ const o = yl(s), { focused: c } = Gt(s), { focused: u } = Vt(s);
1977
+ return ve(o, (v) => {
1708
1978
  v && (c.value = !0);
1709
- }), (v, m) => (i(), y("li", G({ role: t(n) }, {
1979
+ }), (v, d) => (f(), g("li", R({ role: a(l) }, {
1710
1980
  ref_key: "element",
1711
- ref: r,
1712
- class: ["vv-dropdown__item", { "focus-visible": t(c) || t(u) }]
1981
+ ref: s,
1982
+ class: ["vv-dropdown__item", { "focus-visible": a(c) || a(u) }]
1713
1983
  }), [
1714
- $(v.$slots, "default")
1984
+ V(v.$slots, "default")
1715
1985
  ], 16));
1716
1986
  }
1717
- }), Mo = {
1718
- ...Le,
1719
- ...ft,
1720
- ...mt,
1721
- ...Te,
1722
- ...Ie,
1723
- ...Pe,
1987
+ }), Fa = { class: "vv-dropdown-option__hint" }, Ka = {
1988
+ name: "VvDropdownOption"
1989
+ }, Qe = /* @__PURE__ */ j({
1990
+ ...Ka,
1991
+ props: {
1992
+ ...De,
1993
+ ...jl,
1994
+ ...qe,
1995
+ ...me,
1996
+ deselectHintLabel: {
1997
+ type: String
1998
+ },
1999
+ selectHintLabel: {
2000
+ type: String
2001
+ },
2002
+ selectedHintLabel: {
2003
+ type: String
2004
+ }
2005
+ },
2006
+ setup(t) {
2007
+ const l = t, { modifiers: e } = G(l), s = X(
2008
+ "vv-dropdown-option",
2009
+ e,
2010
+ n(() => ({
2011
+ disabled: l.disabled,
2012
+ selected: l.selected,
2013
+ unselectable: l.unselectable && l.selected
2014
+ }))
2015
+ );
2016
+ return (o, c) => (f(), H(Ua, {
2017
+ class: le(a(s)),
2018
+ tabindex: o.disabled ? -1 : 0,
2019
+ "aria-selected": o.selected,
2020
+ "aria-disabled": o.disabled
2021
+ }, {
2022
+ default: te(() => [
2023
+ V(o.$slots, "default"),
2024
+ M("span", Fa, [
2025
+ V(o.$slots, "hint", K(z({ disabled: o.disabled, selected: o.selected, unselectable: o.unselectable })), () => [
2026
+ o.selected ? (f(), g(ie, { key: 0 }, [
2027
+ Y(T(o.unselectable ? t.deselectHintLabel : t.selectedHintLabel), 1)
2028
+ ], 64)) : o.disabled ? C("", !0) : (f(), g(ie, { key: 1 }, [
2029
+ Y(T(t.selectHintLabel), 1)
2030
+ ], 64))
2031
+ ])
2032
+ ])
2033
+ ]),
2034
+ _: 3
2035
+ }, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]));
2036
+ }
2037
+ }), za = {
2038
+ ...nt,
2039
+ ...Qt,
2040
+ ...Zt,
2041
+ ...ot,
2042
+ ...Ue,
2043
+ ...Fe,
2044
+ ...ze,
2045
+ ...at,
1724
2046
  ...De,
1725
- ...qe,
1726
- ...Ce,
1727
- ...Oe,
1728
- ...ve,
1729
2047
  ...Ke,
1730
- ...ze,
1731
- ...Xe,
1732
- ...xe,
2048
+ ...me,
2049
+ ...kt,
2050
+ ...At,
2051
+ ...wt,
2052
+ ...qe,
2053
+ ...Me,
1733
2054
  /**
1734
2055
  * This Boolean attribute indicates that multiple options can be selected in the list.
1735
2056
  * If it is not specified, then only one option can be selected at a time.
@@ -1756,270 +2077,299 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
1756
2077
  type: [String, Number, Boolean, Object, Array],
1757
2078
  default: void 0
1758
2079
  },
1759
- /**
1760
- * <label> value for the select
1761
- */
1762
- label: String,
1763
2080
  /**
1764
2081
  * Select placeholder
1765
2082
  */
1766
2083
  placeholder: String
1767
- }, Lo = ["update:modelValue", "focus", "blur"], No = ["for"], Ho = { class: "vv-select__wrapper" }, Go = {
2084
+ }, qa = ["update:modelValue", "focus", "blur"];
2085
+ function it(t, l) {
2086
+ const { focused: e } = Gt(t);
2087
+ return ve(e, (s) => {
2088
+ l(s ? "focus" : "blur", a(t));
2089
+ }), {
2090
+ focused: e
2091
+ };
2092
+ }
2093
+ function ut(t, l) {
2094
+ const e = n(
2095
+ () => Boolean((t == null ? void 0 : t.value) && l.value === Ge.before)
2096
+ ), s = n(
2097
+ () => Boolean((t == null ? void 0 : t.value) && l.value === Ge.after)
2098
+ ), o = n(
2099
+ () => Boolean((t == null ? void 0 : t.value) && l.value === fe.left)
2100
+ ), c = n(
2101
+ () => Boolean((t == null ? void 0 : t.value) && l.value === fe.right)
2102
+ ), u = n(
2103
+ () => Boolean((t == null ? void 0 : t.value) && l.value === fe.top)
2104
+ ), v = n(
2105
+ () => Boolean((t == null ? void 0 : t.value) && l.value === fe.bottom)
2106
+ );
2107
+ return {
2108
+ hasIcon: n(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
2109
+ hasIconLeft: o,
2110
+ hasIconRight: c,
2111
+ hasIconTop: u,
2112
+ hasIconBottom: v,
2113
+ hasIconBefore: e,
2114
+ hasIconAfter: s
2115
+ };
2116
+ }
2117
+ const Ya = ["for"], Ja = { class: "vv-select__wrapper" }, Xa = {
1768
2118
  key: 0,
1769
2119
  class: "vv-select__input-before"
1770
- }, Uo = { class: "vv-select__inner" }, Wo = ["id"], Fo = ["disabled", "hidden"], jo = ["disabled", "value"], qo = {
2120
+ }, Qa = { class: "vv-select__inner" }, Za = ["id"], eo = ["disabled", "hidden"], to = ["disabled", "value"], lo = {
1771
2121
  key: 1,
1772
2122
  class: "vv-select__input-after"
1773
- }, Ko = {
2123
+ }, ao = {
1774
2124
  name: "VvSelect"
1775
- }, zo = /* @__PURE__ */ K({
1776
- ...Ko,
1777
- props: Mo,
1778
- emits: Lo,
1779
- setup(o, { emit: n }) {
1780
- const e = o, r = useSlots(), a = ref(), { HintSlot: c, hasHint: u, hasInvalid: v } = Ve(e, r), {
1781
- id: m,
1782
- modifiers: d,
1783
- disabled: l,
1784
- readonly: s,
1785
- loading: p,
1786
- icon: g,
2125
+ }, oo = /* @__PURE__ */ j({
2126
+ ...ao,
2127
+ props: za,
2128
+ emits: qa,
2129
+ setup(t, { emit: l }) {
2130
+ const e = t, s = Ae(), o = N(), { HintSlot: c, hasHint: u, hasInvalid: v } = Be(e, s), {
2131
+ id: d,
2132
+ modifiers: p,
2133
+ disabled: r,
2134
+ readonly: i,
2135
+ loading: b,
2136
+ icon: _,
1787
2137
  iconPosition: k,
1788
- invalid: C,
1789
- valid: b,
1790
- floating: S,
2138
+ invalid: A,
2139
+ valid: y,
2140
+ floating: m,
1791
2141
  multiple: I
1792
- } = toRefs(e), B = useUniqueId(m), E = computed(() => `${B.value}-hint`), { focused: O } = useComponentFocus(a, n), L = useElementVisibility(a);
1793
- watch(L, (R) => {
1794
- R && e.autofocus && (O.value = !0);
2142
+ } = G(e), O = Le(d), D = n(() => `${O.value}-hint`), { focused: L } = it(o, l), x = $t(o);
2143
+ ve(x, (B) => {
2144
+ B && e.autofocus && (L.value = !0);
1795
2145
  });
1796
- const { hasIcon: q, hasIconBefore: Q, hasIconAfter: P } = useComponentIcon(
1797
- g,
2146
+ const { hasIcon: w, hasIconBefore: se, hasIconAfter: P } = ut(
2147
+ _,
1798
2148
  k
1799
- ), T = computed(() => !isEmpty(e.modelValue)), U = computed(() => e.disabled || e.readonly), te = computed(() => U.value ? -1 : e.tabindex), re = computed(() => {
2149
+ ), W = n(() => !ge(e.modelValue)), F = n(() => e.disabled || e.readonly), ue = n(() => F.value ? -1 : e.tabindex), he = n(() => {
1800
2150
  if (e.invalid === !0)
1801
2151
  return !0;
1802
2152
  if (e.valid === !0)
1803
2153
  return !1;
1804
- }), ie = useBemModifiers(
2154
+ }), ye = X(
1805
2155
  "vv-select",
1806
- d,
1807
- computed(() => ({
1808
- valid: b.value,
1809
- invalid: C.value,
1810
- loading: p.value,
1811
- disabled: l.value,
1812
- readonly: s.value,
1813
- "icon-before": Q.value,
2156
+ p,
2157
+ n(() => ({
2158
+ valid: y.value,
2159
+ invalid: A.value,
2160
+ loading: b.value,
2161
+ disabled: r.value,
2162
+ readonly: i.value,
2163
+ "icon-before": se.value,
1814
2164
  "icon-after": P.value,
1815
- dirty: T.value,
1816
- focus: O.value,
1817
- floating: S.value,
2165
+ dirty: W.value,
2166
+ focus: L.value,
2167
+ floating: m.value,
1818
2168
  multiple: I.value
1819
2169
  }))
1820
- ), A = computed(() => ({
2170
+ ), ne = n(() => ({
1821
2171
  name: e.name,
1822
- tabindex: te.value,
1823
- disabled: U.value,
2172
+ tabindex: ue.value,
2173
+ disabled: F.value,
1824
2174
  required: e.required,
1825
2175
  size: e.size,
1826
2176
  autocomplete: e.autocomplete,
1827
2177
  multiple: e.multiple,
1828
- "aria-invalid": re.value,
1829
- "aria-describedby": !v.value && u.value ? E.value : void 0,
1830
- "aria-errormessage": v.value ? E.value : void 0
1831
- })), oe = computed(() => ({
2178
+ "aria-invalid": he.value,
2179
+ "aria-describedby": !v.value && u.value ? D.value : void 0,
2180
+ "aria-errormessage": v.value ? D.value : void 0
2181
+ })), de = n(() => ({
1832
2182
  valid: e.valid,
1833
2183
  invalid: e.invalid,
1834
2184
  modelValue: e.modelValue
1835
- })), { getOptionLabel: fe, getOptionValue: se, getOptionDisabled: be } = useOptions(e), z = computed({
2185
+ })), { getOptionLabel: _e, getOptionValue: re, getOptionDisabled: Ve } = rt(e), J = n({
1836
2186
  get: () => e.modelValue,
1837
- set: (R) => {
1838
- Array.isArray(R) && (R = R.filter((X) => X !== void 0)), n("update:modelValue", R);
2187
+ set: (B) => {
2188
+ Array.isArray(B) && (B = B.filter((Q) => Q !== void 0)), l("update:modelValue", B);
1839
2189
  }
1840
2190
  });
1841
- return (R, X) => (i(), y("div", {
1842
- class: ee(t(ie))
2191
+ return (B, Q) => (f(), g("div", {
2192
+ class: le(a(ye))
1843
2193
  }, [
1844
- R.label ? (i(), y("label", {
2194
+ B.label ? (f(), g("label", {
1845
2195
  key: 0,
1846
- for: t(B)
1847
- }, H(R.label), 9, No)) : w("", !0),
1848
- M("div", Ho, [
1849
- R.$slots.before ? (i(), y("div", Go, [
1850
- $(R.$slots, "before", F(j(t(oe))))
1851
- ])) : w("", !0),
1852
- M("div", Uo, [
1853
- t(Q) ? (i(), W(J, G({
2196
+ for: a(O)
2197
+ }, T(B.label), 9, Ya)) : C("", !0),
2198
+ M("div", Ja, [
2199
+ B.$slots.before ? (f(), g("div", Xa, [
2200
+ V(B.$slots, "before", K(z(a(de))))
2201
+ ])) : C("", !0),
2202
+ M("div", Qa, [
2203
+ a(se) ? (f(), H(ee, R({
1854
2204
  key: 0,
1855
2205
  class: "vv-select__icon"
1856
- }, t(q)), null, 16)) : w("", !0),
1857
- Se(M("select", G({
1858
- id: t(B),
2206
+ }, a(w)), null, 16)) : C("", !0),
2207
+ Oe(M("select", R({
2208
+ id: a(O),
1859
2209
  ref_key: "select",
1860
- ref: a,
1861
- "onUpdate:modelValue": X[0] || (X[0] = (ae) => Ae(z) ? z.value = ae : null)
1862
- }, t(A)), [
1863
- R.placeholder ? (i(), y("option", {
2210
+ ref: o,
2211
+ "onUpdate:modelValue": Q[0] || (Q[0] = (ae) => Ee(J) ? J.value = ae : null)
2212
+ }, a(ne)), [
2213
+ B.placeholder ? (f(), g("option", {
1864
2214
  key: 0,
1865
2215
  value: void 0,
1866
- disabled: !R.unselectable,
1867
- hidden: !R.unselectable
1868
- }, H(R.placeholder), 9, Fo)) : w("", !0),
1869
- (i(!0), y(ne, null, ke(R.options, (ae, me) => (i(), y("option", {
1870
- key: me,
1871
- disabled: t(be)(ae),
1872
- value: t(se)(ae)
1873
- }, H(t(fe)(ae)), 9, jo))), 128))
1874
- ], 16, Wo), [
1875
- [kt, t(z)]
2216
+ disabled: !B.unselectable,
2217
+ hidden: !B.unselectable
2218
+ }, T(B.placeholder), 9, eo)) : C("", !0),
2219
+ (f(!0), g(ie, null, Ne(B.options, (ae, Se) => (f(), g("option", {
2220
+ key: Se,
2221
+ disabled: a(Ve)(ae),
2222
+ value: a(re)(ae)
2223
+ }, T(a(_e)(ae)), 9, to))), 128))
2224
+ ], 16, Za), [
2225
+ [cl, a(J)]
1876
2226
  ]),
1877
- t(P) ? (i(), W(J, G({
2227
+ a(P) ? (f(), H(ee, R({
1878
2228
  key: 1,
1879
2229
  class: "vv-select__icon vv-select__icon-after"
1880
- }, t(q)), null, 16)) : w("", !0)
2230
+ }, a(w)), null, 16)) : C("", !0)
1881
2231
  ]),
1882
- R.$slots.after ? (i(), y("div", qo, [
1883
- $(R.$slots, "after", F(j(t(oe))))
1884
- ])) : w("", !0)
2232
+ B.$slots.after ? (f(), g("div", lo, [
2233
+ V(B.$slots, "after", K(z(a(de))))
2234
+ ])) : C("", !0)
1885
2235
  ]),
1886
- de(t(c), {
1887
- id: t(E),
2236
+ pe(a(c), {
2237
+ id: a(D),
1888
2238
  class: "vv-select__hint"
1889
2239
  }, null, 8, ["id"])
1890
2240
  ], 2));
1891
2241
  }
1892
- }), Xo = ["id"], Yo = ["id", "for"], Jo = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], Qo = {
2242
+ }), so = ["id"], no = ["id", "for"], ro = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], io = {
1893
2243
  key: 0,
1894
2244
  class: "vv-select__input-before"
1895
- }, Zo = { class: "vv-select__inner" }, ea = ["aria-labelledby", "tabindex"], ta = ["aria-label", "onClick"], oa = {
2245
+ }, uo = { class: "vv-select__inner" }, co = ["aria-labelledby", "tabindex"], vo = ["aria-label", "onClick"], fo = {
1896
2246
  key: 1,
1897
2247
  class: "vv-select__input-after"
1898
- }, aa = { class: "vv-dropdown-action__hint" }, la = {
2248
+ }, po = {
1899
2249
  name: "VvCombobox",
1900
- components: { VvDropdown: St, VvDropdownItem: Vt }
1901
- }, ll = /* @__PURE__ */ K({
1902
- ...la,
1903
- props: Do,
1904
- emits: Oo,
1905
- setup(o, { emit: n }) {
1906
- const e = o, r = useSlots(), { HintSlot: a } = Ve(e, r), c = ref(null), u = ref(null), v = ref(null), { focused: m } = useComponentFocus(c, n), { focused: d } = useFocusWithin(v);
1907
- watch(m, (_) => {
2250
+ components: { VvDropdown: sl, VvDropdownOption: Qe }
2251
+ }, bs = /* @__PURE__ */ j({
2252
+ ...po,
2253
+ props: Na,
2254
+ emits: Ta,
2255
+ setup(t, { emit: l }) {
2256
+ const e = t, s = Ae(), { HintSlot: o } = Be(e, s), c = N(null), u = N(null), v = N(null), { focused: d } = it(c, l), { focused: p } = Vt(v);
2257
+ ve(d, (S) => {
1908
2258
  if (e.autoOpen) {
1909
- if (_ && !p.value) {
2259
+ if (S && !b.value) {
1910
2260
  k();
1911
2261
  return;
1912
2262
  }
1913
- !_ && p.value && !d.value && C();
2263
+ !S && b.value && !p.value && A();
1914
2264
  }
1915
- }), watch(d, (_) => {
1916
- !m.value && !_ && p.value && C();
2265
+ }), ve(p, (S) => {
2266
+ !d.value && !S && b.value && A();
1917
2267
  });
1918
- const l = ref(""), s = refDebounced(
1919
- l,
2268
+ const r = N(""), i = gl(
2269
+ r,
1920
2270
  Number(e.debounceSearch)
1921
2271
  );
1922
- watch(
1923
- s,
1924
- () => n("change:search", s.value)
2272
+ ve(
2273
+ i,
2274
+ () => l("change:search", i.value)
1925
2275
  );
1926
- const p = ref(!1), g = () => {
1927
- e.disabled || e.readonly || (p.value = !p.value);
2276
+ const b = N(!1), _ = () => {
2277
+ e.disabled || e.readonly || (b.value = !b.value);
1928
2278
  }, k = () => {
1929
- e.disabled || e.readonly || p.value || (p.value = !0);
1930
- }, C = () => {
1931
- e.disabled || e.readonly || !p.value || (p.value = !1);
2279
+ e.disabled || e.readonly || b.value || (b.value = !0);
2280
+ }, A = () => {
2281
+ e.disabled || e.readonly || !b.value || (b.value = !1);
1932
2282
  };
1933
- watch(p, (_) => {
1934
- T.value && nextTick(() => {
1935
- if (_) {
2283
+ ve(b, (S) => {
2284
+ W.value && Xe(() => {
2285
+ if (S) {
1936
2286
  u.value && u.value.focus();
1937
2287
  return;
1938
2288
  }
1939
- l.value = "";
2289
+ r.value = "";
1940
2290
  });
1941
2291
  });
1942
2292
  const {
1943
- id: b,
1944
- icon: S,
2293
+ id: y,
2294
+ icon: m,
1945
2295
  iconPosition: I,
1946
- modifiers: B,
1947
- disabled: E,
1948
- readonly: O,
1949
- loading: L,
1950
- valid: q,
1951
- invalid: Q,
2296
+ modifiers: O,
2297
+ disabled: D,
2298
+ readonly: L,
2299
+ loading: x,
2300
+ valid: w,
2301
+ invalid: se,
1952
2302
  floating: P,
1953
- searchable: T
1954
- } = toRefs(e), U = useUniqueId(b), te = computed(() => `${U.value}-hint`), re = computed(() => `${U.value}-dropdown`), ie = computed(() => `${U.value}-search`), A = computed(() => `${U.value}-label`), { hasIcon: oe, hasIconBefore: fe, hasIconAfter: se } = useComponentIcon(
1955
- S,
2303
+ searchable: W
2304
+ } = G(e), F = Le(y), ue = n(() => `${F.value}-hint`), he = n(() => `${F.value}-dropdown`), ye = n(() => `${F.value}-search`), ne = n(() => `${F.value}-label`), { hasIcon: de, hasIconBefore: _e, hasIconAfter: re } = ut(
2305
+ m,
1956
2306
  I
1957
- ), be = computed(() => !isEmpty(e.modelValue)), z = computed(() => E.value || O.value ? -1 : e.tabindex), R = useBemModifiers(
2307
+ ), Ve = n(() => !ge(e.modelValue)), J = n(() => D.value || L.value ? -1 : e.tabindex), B = X(
1958
2308
  "vv-select",
1959
- B,
1960
- computed(() => ({
1961
- disabled: E.value,
1962
- loading: L.value,
1963
- readonly: O.value,
1964
- "icon-before": Boolean(fe.value),
1965
- "icon-after": Boolean(se.value),
1966
- valid: q.value,
1967
- invalid: Q.value,
1968
- dirty: be.value,
1969
- focus: m.value,
2309
+ O,
2310
+ n(() => ({
2311
+ disabled: D.value,
2312
+ loading: x.value,
2313
+ readonly: L.value,
2314
+ "icon-before": Boolean(_e.value),
2315
+ "icon-after": Boolean(re.value),
2316
+ valid: w.value,
2317
+ invalid: se.value,
2318
+ dirty: Ve.value,
2319
+ focus: d.value,
1970
2320
  floating: P.value
1971
2321
  }))
1972
- ), X = computed(
1973
- () => e.searchable ? f.value : e.options
1974
- ), { getOptionLabel: ae, getOptionValue: me, getOptionDisabled: pe } = useOptions(e), f = computed(() => {
1975
- var _;
1976
- return (_ = e.options) == null ? void 0 : _.filter((Y) => ae(Y).toLowerCase().includes(s.value.toLowerCase().trim()));
2322
+ ), Q = n(
2323
+ () => e.searchable ? h.value : e.options
2324
+ ), { getOptionLabel: ae, getOptionValue: Se, getOptionDisabled: we } = rt(e), h = n(() => {
2325
+ var S;
2326
+ return (S = e.options) == null ? void 0 : S.filter((Z) => ae(Z).toLowerCase().includes(i.value.toLowerCase().trim()));
1977
2327
  });
1978
- function x(_) {
1979
- return Array.isArray(e.modelValue) ? contains(_, e.modelValue) || contains(me(_), e.modelValue) : equals(_, e.modelValue) || equals(me(_), e.modelValue);
2328
+ function U(S) {
2329
+ return Array.isArray(e.modelValue) ? Ce(S, e.modelValue) || Ce(Se(S), e.modelValue) : Pe(S, e.modelValue) || Pe(Se(S), e.modelValue);
1980
2330
  }
1981
- const ue = computed(() => {
1982
- let _ = [];
1983
- return Array.isArray(e.modelValue) ? _ = e.modelValue : e.modelValue && (_ = [e.modelValue]), e.options.filter(
1984
- (Y) => _.includes(me(Y))
2331
+ const ce = n(() => {
2332
+ let S = [];
2333
+ return Array.isArray(e.modelValue) ? S = e.modelValue : e.modelValue && (S = [e.modelValue]), e.options.filter(
2334
+ (Z) => S.includes(Se(Z))
1985
2335
  );
1986
- }), he = computed(() => ue.value.map((_) => ae(_)).join(e.separator));
1987
- watch(ue, () => {
1988
- !e.multiple && e.autoClose && C();
2336
+ }), $e = n(() => ce.value.map((S) => ae(S)).join(e.separator));
2337
+ ve(ce, () => {
2338
+ !e.multiple && e.autoClose && A();
1989
2339
  });
1990
- const Ne = () => {
1991
- e.autoOpen ? k() : g();
1992
- }, Ee = (_) => {
1993
- var $e;
2340
+ const dt = () => {
2341
+ e.autoOpen ? k() : _();
2342
+ }, xe = (S) => {
2343
+ var Te;
1994
2344
  if (e.disabled || e.readonly)
1995
2345
  return;
1996
- const Y = me(_);
1997
- let N = Y;
2346
+ const Z = Se(S);
2347
+ let q = Z;
1998
2348
  if (e.multiple)
1999
2349
  if (Array.isArray(e.modelValue)) {
2000
- if (e.maxValues !== void 0 && e.maxValues >= 0 && (($e = e.modelValue) == null ? void 0 : $e.length) >= e.maxValues && !contains(Y, e.modelValue))
2350
+ if (e.maxValues !== void 0 && e.maxValues >= 0 && ((Te = e.modelValue) == null ? void 0 : Te.length) >= e.maxValues && !Ce(Z, e.modelValue))
2001
2351
  return;
2002
- N = contains(Y, e.modelValue) ? removeFromList(Y, e.modelValue) : [...e.modelValue, Y];
2352
+ q = Ce(Z, e.modelValue) ? Il(Z, e.modelValue) : [...e.modelValue, Z];
2003
2353
  } else
2004
- N = [Y];
2354
+ q = [Z];
2005
2355
  else
2006
- e.unselectable && Y === e.modelValue && (N = void 0);
2007
- n("update:modelValue", N);
2008
- }, D = computed(() => ({
2009
- id: U.value,
2356
+ e.unselectable && Z === e.modelValue && (q = void 0);
2357
+ l("update:modelValue", q);
2358
+ }, E = n(() => ({
2359
+ id: F.value,
2010
2360
  name: e.name,
2011
- tabindex: z.value,
2012
- valid: q.value,
2361
+ tabindex: J.value,
2362
+ valid: w.value,
2013
2363
  validLabel: e.validLabel,
2014
- invalid: Q.value,
2364
+ invalid: se.value,
2015
2365
  invalidLabel: e.invalidLabel,
2016
2366
  hintLabel: e.hintLabel,
2017
- loading: L.value,
2367
+ loading: x.value,
2018
2368
  loadingLabel: e.loadingLabel,
2019
- disabled: E.value,
2020
- readonly: O.value,
2369
+ disabled: D.value,
2370
+ readonly: L.value,
2021
2371
  modifiers: e.modifiers,
2022
- options: X.value,
2372
+ options: Q.value,
2023
2373
  labelKey: e.labelKey,
2024
2374
  valueKey: e.valueKey,
2025
2375
  icon: e.icon,
@@ -2030,8 +2380,8 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2030
2380
  label: e.label,
2031
2381
  placeholder: e.placeholder,
2032
2382
  modelValue: e.modelValue
2033
- })), le = computed(() => ({
2034
- id: re.value,
2383
+ })), oe = n(() => ({
2384
+ id: he.value,
2035
2385
  reference: v.value,
2036
2386
  placement: e.placement,
2037
2387
  transitionName: e.transitionName,
@@ -2041,161 +2391,184 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2041
2391
  autoPlacement: e.autoPlacement,
2042
2392
  arrow: e.arrow,
2043
2393
  autoClose: e.autoClose,
2044
- autofocusFirst: T.value ? !1 : e.autofocusFirst,
2394
+ autofocusFirst: W.value ? !1 : e.autofocusFirst,
2045
2395
  triggerWidth: e.triggerWidth,
2046
2396
  modifiers: e.dropdownModifiers
2047
- })), we = computed(() => ({
2397
+ })), Re = n(() => ({
2048
2398
  valid: e.valid,
2049
2399
  invalid: e.invalid,
2050
2400
  modelValue: e.modelValue
2051
2401
  }));
2052
- return onKeyStroke([" ", "Enter"], (_) => {
2053
- e.autoOpen || !p.value && m.value && (_.preventDefault(), _.stopImmediatePropagation(), g());
2054
- }), (_, Y) => _.native ? (i(), W(zo, G({ key: 1 }, t(D), {
2055
- "onUpdate:modelValue": Y[2] || (Y[2] = (N) => n("update:modelValue", N))
2056
- }), null, 16)) : (i(), y("div", {
2402
+ return He([" ", "Enter"], (S) => {
2403
+ e.autoOpen || !b.value && d.value && (S.preventDefault(), S.stopImmediatePropagation(), _());
2404
+ }), (S, Z) => S.native ? (f(), H(oo, R({ key: 1 }, a(E), {
2405
+ "onUpdate:modelValue": Z[2] || (Z[2] = (q) => l("update:modelValue", q))
2406
+ }), null, 16)) : (f(), g("div", {
2057
2407
  key: 0,
2058
- id: t(U),
2059
- class: ee(t(R))
2408
+ id: a(F),
2409
+ class: le(a(B))
2060
2410
  }, [
2061
- _.label ? (i(), y("label", {
2411
+ S.label ? (f(), g("label", {
2062
2412
  key: 0,
2063
- id: t(A),
2064
- for: t(T) ? t(ie) : void 0
2065
- }, H(_.label), 9, Yo)) : w("", !0),
2413
+ id: a(ne),
2414
+ for: a(W) ? a(ye) : void 0
2415
+ }, T(S.label), 9, no)) : C("", !0),
2066
2416
  M("div", {
2067
2417
  ref_key: "wrapperEl",
2068
2418
  ref: v,
2069
2419
  class: "vv-select__wrapper"
2070
2420
  }, [
2071
- de(St, G({
2072
- modelValue: t(p),
2073
- "onUpdate:modelValue": Y[1] || (Y[1] = (N) => Ae(p) ? p.value = N : null)
2074
- }, t(le), { role: "listbox" }), At({
2075
- default: ce(({ aria: N }) => [
2076
- _.$slots.before ? (i(), y("div", Qo, [
2077
- $(_.$slots, "before", F(j(t(we))))
2078
- ])) : w("", !0),
2079
- M("div", Zo, [
2080
- t(fe) ? (i(), W(J, G({
2421
+ pe(sl, R({
2422
+ modelValue: a(b),
2423
+ "onUpdate:modelValue": Z[1] || (Z[1] = (q) => Ee(b) ? b.value = q : null)
2424
+ }, a(oe), {
2425
+ role: a(je).listbox
2426
+ }), vl({
2427
+ default: te(({ aria: q }) => [
2428
+ S.$slots.before ? (f(), g("div", io, [
2429
+ V(S.$slots, "before", K(z(a(Re))))
2430
+ ])) : C("", !0),
2431
+ M("div", uo, [
2432
+ a(_e) ? (f(), H(ee, R({
2081
2433
  key: 0,
2082
2434
  class: "vv-select__icon"
2083
- }, t(oe)), null, 16)) : w("", !0),
2084
- M("div", G({
2435
+ }, a(de)), null, 16)) : C("", !0),
2436
+ M("div", R({
2085
2437
  ref_key: "inputEl",
2086
2438
  ref: c
2087
- }, N, {
2088
- "aria-labelledby": t(A),
2439
+ }, q, {
2440
+ "aria-labelledby": a(ne),
2089
2441
  class: "vv-select__input",
2090
2442
  role: "combobox",
2091
- tabindex: t(z),
2092
- onClickPassive: Ne
2443
+ tabindex: a(J),
2444
+ onClickPassive: dt
2093
2445
  }), [
2094
- $(_.$slots, "value", F(j({ selectedOptions: t(ue), onInput: Ee })), () => [
2095
- t(he) ? (i(), y(ne, { key: 0 }, [
2096
- _.badges ? (i(!0), y(ne, { key: 1 }, ke(t(ue), ($e, Ye) => (i(), W(Yt, {
2097
- key: Ye,
2098
- modifiers: _.badgeModifiers,
2446
+ V(S.$slots, "value", K(z({ selectedOptions: a(ce), onInput: xe })), () => [
2447
+ a($e) ? (f(), g(ie, { key: 0 }, [
2448
+ S.badges ? (f(!0), g(ie, { key: 1 }, Ne(a(ce), (Te, Ct) => (f(), H(Yl, {
2449
+ key: Ct,
2450
+ modifiers: S.badgeModifiers,
2099
2451
  class: "vv-select__badge"
2100
2452
  }, {
2101
- default: ce(() => [
2102
- Z(H(t(ae)($e)) + " ", 1),
2103
- _.unselectable && !t(O) && !t(E) ? (i(), y("button", {
2453
+ default: te(() => [
2454
+ Y(T(a(ae)(Te)) + " ", 1),
2455
+ S.unselectable && !a(L) && !a(D) ? (f(), g("button", {
2104
2456
  key: 0,
2105
- "aria-label": _.deselectLabel,
2106
- onClick: st((Ka) => Ee($e), ["stop"])
2457
+ "aria-label": S.deselectActionLabel,
2458
+ onClick: Tt((as) => xe(Te), ["stop"])
2107
2459
  }, [
2108
- de(J, { name: "close" })
2109
- ], 8, ta)) : w("", !0)
2460
+ pe(ee, { name: "close" })
2461
+ ], 8, vo)) : C("", !0)
2110
2462
  ]),
2111
2463
  _: 2
2112
- }, 1032, ["modifiers"]))), 128)) : (i(), y(ne, { key: 0 }, [
2113
- Z(H(t(he)), 1)
2464
+ }, 1032, ["modifiers"]))), 128)) : (f(), g(ie, { key: 0 }, [
2465
+ Y(T(a($e)), 1)
2114
2466
  ], 64))
2115
- ], 64)) : (i(), y(ne, { key: 1 }, [
2116
- Z(H(_.placeholder), 1)
2467
+ ], 64)) : (f(), g(ie, { key: 1 }, [
2468
+ Y(T(S.placeholder), 1)
2117
2469
  ], 64))
2118
2470
  ])
2119
- ], 16, ea),
2120
- t(se) ? (i(), W(J, G({
2471
+ ], 16, co),
2472
+ a(re) ? (f(), H(ee, R({
2121
2473
  key: 1,
2122
2474
  class: "vv-select__icon vv-select__icon-after"
2123
- }, t(oe)), null, 16)) : w("", !0)
2475
+ }, a(de)), null, 16)) : C("", !0)
2124
2476
  ]),
2125
- _.$slots.after ? (i(), y("div", oa, [
2126
- $(_.$slots, "after", F(j(t(we))))
2127
- ])) : w("", !0)
2477
+ S.$slots.after ? (f(), g("div", fo, [
2478
+ V(S.$slots, "after", K(z(a(Re))))
2479
+ ])) : C("", !0)
2128
2480
  ]),
2129
- items: ce(() => [
2130
- (i(!0), y(ne, null, ke(t(f), (N, $e) => (i(), W(Vt, {
2131
- key: $e,
2132
- class: ee(["vv-dropdown-action", {
2133
- disabled: t(pe)(N),
2134
- selected: x(N),
2135
- "vv-dropdown-action--unselectable": _.unselectable && x(N)
2136
- }]),
2137
- tabindex: t(pe)(N) ? -1 : 0,
2138
- "aria-selected": x(N),
2139
- "aria-disabled": t(pe)(N),
2140
- onClickPassive: (Ye) => Ee(N)
2481
+ items: te(() => [
2482
+ a(h).length ? (f(!0), g(ie, { key: 0 }, Ne(a(h), (q, Te) => (f(), H(Qe, R({
2483
+ disabled: a(we)(q),
2484
+ selected: U(q),
2485
+ unselectable: S.unselectable,
2486
+ deselectHintLabel: S.deselectHintLabel,
2487
+ selectHintLabel: S.selectHintLabel,
2488
+ selectedHintLabel: S.selectedHintLabel
2141
2489
  }, {
2142
- default: ce(() => [
2143
- $(_.$slots, "option", F(j({
2144
- option: N,
2145
- selectedOptions: t(ue),
2146
- selected: x(N),
2147
- disabled: t(pe)(N)
2490
+ key: Te,
2491
+ class: "vv-dropdown-option",
2492
+ onClickPassive: (Ct) => xe(q)
2493
+ }), {
2494
+ default: te(() => [
2495
+ V(S.$slots, "option", K(z({
2496
+ option: q,
2497
+ selectedOptions: a(ce),
2498
+ selected: U(q),
2499
+ disabled: a(we)(q)
2148
2500
  })), () => [
2149
- Z(H(t(ae)(N)) + " ", 1),
2150
- M("span", aa, [
2151
- x(N) ? (i(), y(ne, { key: 0 }, [
2152
- Z(H(_.unselectable ? _.pressToDeselectLabel : _.selectedLabel), 1)
2153
- ], 64)) : t(pe)(N) ? w("", !0) : (i(), y(ne, { key: 1 }, [
2154
- Z(H(_.pressToSelectLabel), 1)
2155
- ], 64))
2156
- ])
2501
+ Y(T(a(ae)(q)), 1)
2157
2502
  ])
2158
2503
  ]),
2159
2504
  _: 2
2160
- }, 1032, ["tabindex", "class", "aria-selected", "aria-disabled", "onClickPassive"]))), 128))
2505
+ }, 1040, ["onClickPassive"]))), 128)) : S.options.length ? (f(), H(Qe, {
2506
+ key: 2,
2507
+ modifiers: "inert"
2508
+ }, {
2509
+ default: te(() => [
2510
+ V(S.$slots, "no-results", {}, () => [
2511
+ Y(T(S.noResultsLabel), 1)
2512
+ ])
2513
+ ]),
2514
+ _: 3
2515
+ })) : (f(), H(Qe, {
2516
+ key: 1,
2517
+ modifiers: "inert"
2518
+ }, {
2519
+ default: te(() => [
2520
+ V(S.$slots, "no-options", {}, () => [
2521
+ Y(T(S.noOptionsLabel), 1)
2522
+ ])
2523
+ ]),
2524
+ _: 3
2525
+ }))
2161
2526
  ]),
2162
2527
  _: 2
2163
2528
  }, [
2164
- t(T) ? {
2529
+ a(W) || S.$slots["dropdown::before"] ? {
2165
2530
  name: "before",
2166
- fn: ce(() => [
2167
- t(T) ? Se((i(), y("input", {
2531
+ fn: te(() => [
2532
+ V(S.$slots, "dropdown::before"),
2533
+ a(W) ? Oe((f(), g("input", {
2168
2534
  key: 0,
2169
- id: t(ie),
2535
+ id: a(ye),
2170
2536
  ref_key: "inputSearchEl",
2171
2537
  ref: u,
2172
- "onUpdate:modelValue": Y[0] || (Y[0] = (N) => Ae(l) ? l.value = N : null),
2538
+ "onUpdate:modelValue": Z[0] || (Z[0] = (q) => Ee(r) ? r.value = q : null),
2173
2539
  "aria-autocomplete": "list",
2174
- "aria-controls": t(re),
2175
- "aria-labelledby": t(A),
2176
- "aria-describedby": t(te),
2540
+ "aria-controls": a(he),
2541
+ "aria-labelledby": a(ne),
2542
+ "aria-describedby": a(ue),
2177
2543
  autocomplete: "off",
2178
2544
  spellcheck: "false",
2179
2545
  type: "search",
2180
2546
  class: "vv-dropdown__search",
2181
- placeholder: _.searchPlaceholder
2182
- }, null, 8, Jo)), [
2183
- [je, t(p)],
2184
- [it, t(l)]
2185
- ]) : w("", !0)
2547
+ placeholder: S.searchPlaceholder
2548
+ }, null, 8, ro)), [
2549
+ [St, a(b)],
2550
+ [Ht, a(r)]
2551
+ ]) : C("", !0)
2186
2552
  ]),
2187
2553
  key: "0"
2554
+ } : void 0,
2555
+ S.$slots["dropdown::after"] ? {
2556
+ name: "after",
2557
+ fn: te(() => [
2558
+ V(S.$slots, "dropdown::after")
2559
+ ]),
2560
+ key: "1"
2188
2561
  } : void 0
2189
- ]), 1040, ["modelValue"])
2562
+ ]), 1040, ["modelValue", "role"])
2190
2563
  ], 512),
2191
- de(t(a), {
2192
- id: t(te),
2564
+ pe(a(o), {
2565
+ id: a(ue),
2193
2566
  class: "vv-select__hint"
2194
2567
  }, null, 8, ["id"])
2195
- ], 10, Xo));
2568
+ ], 10, so));
2196
2569
  }
2197
- }), sa = ["open", "close", "update:modelValue"], na = {
2198
- ...Me,
2570
+ }), mo = ["open", "close", "update:modelValue"], bo = {
2571
+ ...st,
2199
2572
  /**
2200
2573
  * Dialog title
2201
2574
  */
@@ -2216,77 +2589,77 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2216
2589
  * Close dialog on click outside
2217
2590
  */
2218
2591
  autoClose: { type: Boolean, default: !0 }
2219
- }, ra = {
2592
+ }, ho = {
2220
2593
  key: 0,
2221
2594
  class: "vv-dialog__header"
2222
- }, ia = { class: "vv-dialog__content" }, ua = {
2595
+ }, yo = { class: "vv-dialog__content" }, go = {
2223
2596
  key: 1,
2224
2597
  class: "vv-dialog__footer"
2225
- }, da = {
2598
+ }, _o = {
2226
2599
  name: "VvDialog"
2227
- }, sl = /* @__PURE__ */ K({
2228
- ...da,
2229
- props: na,
2230
- emits: sa,
2231
- setup(o, { emit: n }) {
2232
- const e = o, r = useVModel(e, "modelValue", n), a = ref(!0), c = ref(null), u = computed(() => {
2233
- const { id: s } = e;
2600
+ }, hs = /* @__PURE__ */ j({
2601
+ ..._o,
2602
+ props: bo,
2603
+ emits: mo,
2604
+ setup(t, { emit: l }) {
2605
+ const e = t, s = et(e, "modelValue", l), o = N(!0), c = N(null), u = n(() => {
2606
+ const { id: i } = e;
2234
2607
  return {
2235
- id: s,
2236
- open: a.value
2608
+ id: i,
2609
+ open: o.value
2237
2610
  };
2238
- }), v = computed(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), m = computed(() => `vv-dialog--${e.transition}`), d = {
2611
+ }), v = n(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), d = n(() => `vv-dialog--${e.transition}`), p = {
2239
2612
  "before-enter": () => {
2240
- a.value = !0, n("open");
2613
+ o.value = !0, l("open");
2241
2614
  },
2242
2615
  "after-leave": () => {
2243
- a.value = !1, n("close");
2616
+ o.value = !1, l("close");
2244
2617
  }
2245
2618
  };
2246
- onClickOutside(c, () => {
2247
- e.autoClose && (r.value = !1);
2619
+ xt(c, () => {
2620
+ e.autoClose && (s.value = !1);
2248
2621
  });
2249
- function l() {
2250
- r.value = !1;
2622
+ function r() {
2623
+ s.value = !1;
2251
2624
  }
2252
- return onKeyStroke("Escape", (s) => {
2253
- r.value && (s.preventDefault(), l());
2254
- }), (s, p) => (i(), W(rt, G({ name: t(m) }, Ct(d)), {
2255
- default: ce(() => [
2256
- Se(M("dialog", G(t(u), { class: t(v) }), [
2625
+ return He("Escape", (i) => {
2626
+ s.value && (i.preventDefault(), r());
2627
+ }), (i, b) => (f(), H(Rt, R({ name: a(d) }, fl(p)), {
2628
+ default: te(() => [
2629
+ Oe(M("dialog", R(a(u), { class: a(v) }), [
2257
2630
  M("article", {
2258
2631
  ref_key: "modalWrapper",
2259
2632
  ref: c,
2260
2633
  class: "vv-dialog__wrapper"
2261
2634
  }, [
2262
- s.$slots.header || s.title ? (i(), y("header", ra, [
2263
- $(s.$slots, "header", {}, () => [
2264
- Z(H(s.title) + " ", 1),
2635
+ i.$slots.header || i.title ? (f(), g("header", ho, [
2636
+ V(i.$slots, "header", {}, () => [
2637
+ Y(T(i.title) + " ", 1),
2265
2638
  M("button", {
2266
2639
  type: "button",
2267
2640
  "aria-label": "Close",
2268
2641
  class: "vv-dialog__close",
2269
- onClickPassive: l
2642
+ onClickPassive: r
2270
2643
  }, [
2271
- de(J, { name: "close" })
2644
+ pe(ee, { name: "close" })
2272
2645
  ], 32)
2273
2646
  ])
2274
- ])) : w("", !0),
2275
- M("div", ia, [
2276
- $(s.$slots, "default")
2647
+ ])) : C("", !0),
2648
+ M("div", yo, [
2649
+ V(i.$slots, "default")
2277
2650
  ]),
2278
- s.$slots.footer ? (i(), y("footer", ua, [
2279
- $(s.$slots, "footer")
2280
- ])) : w("", !0)
2651
+ i.$slots.footer ? (f(), g("footer", go, [
2652
+ V(i.$slots, "footer")
2653
+ ])) : C("", !0)
2281
2654
  ], 512)
2282
2655
  ], 16), [
2283
- [je, t(r)]
2656
+ [St, a(s)]
2284
2657
  ])
2285
2658
  ]),
2286
2659
  _: 3
2287
2660
  }, 16, ["name"]));
2288
2661
  }
2289
- }), V = {
2662
+ }), $ = {
2290
2663
  TEXT: "text",
2291
2664
  PASSWORD: "password",
2292
2665
  NUMBER: "number",
@@ -2300,15 +2673,15 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2300
2673
  DATETIME_LOCAL: "datetime-local",
2301
2674
  MONTH: "month",
2302
2675
  WEEK: "week"
2303
- }, _e = {
2676
+ }, Ie = {
2304
2677
  PASSWORD_SHOW: "eye-on",
2305
2678
  PASSWORD_HIDE: "eye-off",
2306
2679
  DATE: "calendar",
2307
2680
  TIME: "time",
2308
2681
  COLOR: "color",
2309
2682
  SEARCH: "close"
2310
- }, ca = ["update:modelValue", "focus", "blur", "keyup"], va = {
2311
- ...bt,
2683
+ }, So = ["update:modelValue", "focus", "blur", "keyup"], Vo = {
2684
+ ...el,
2312
2685
  /**
2313
2686
  * Input value
2314
2687
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
@@ -2320,8 +2693,8 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2320
2693
  */
2321
2694
  type: {
2322
2695
  type: String,
2323
- default: V.TEXT,
2324
- validator: (o) => Object.values(V).includes(o)
2696
+ default: $.TEXT,
2697
+ validator: (t) => Object.values($).includes(t)
2325
2698
  },
2326
2699
  /**
2327
2700
  * Minimum value
@@ -2359,7 +2732,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2359
2732
  */
2360
2733
  iconShowPassword: {
2361
2734
  type: String,
2362
- default: _e.PASSWORD_SHOW
2735
+ default: Ie.PASSWORD_SHOW
2363
2736
  },
2364
2737
  /**
2365
2738
  * VvIcon name for hide password button
@@ -2367,7 +2740,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2367
2740
  */
2368
2741
  iconHidePassword: {
2369
2742
  type: String,
2370
- default: _e.PASSWORD_HIDE
2743
+ default: Ie.PASSWORD_HIDE
2371
2744
  },
2372
2745
  /**
2373
2746
  * VvIcon name for clear button
@@ -2375,7 +2748,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2375
2748
  */
2376
2749
  iconClear: {
2377
2750
  type: String,
2378
- default: _e.SEARCH
2751
+ default: Ie.SEARCH
2379
2752
  },
2380
2753
  /**
2381
2754
  * Label for step up button
@@ -2412,9 +2785,9 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2412
2785
  type: String,
2413
2786
  default: "Clear"
2414
2787
  }
2415
- }, at = defineComponent({
2788
+ }, Lt = j({
2416
2789
  components: {
2417
- VvIcon: J
2790
+ VvIcon: ee
2418
2791
  },
2419
2792
  props: {
2420
2793
  disabled: {
@@ -2431,33 +2804,33 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2431
2804
  },
2432
2805
  iconShow: {
2433
2806
  type: String,
2434
- default: _e.PASSWORD_SHOW
2807
+ default: Ie.PASSWORD_SHOW
2435
2808
  },
2436
2809
  iconHide: {
2437
2810
  type: String,
2438
- default: _e.PASSWORD_HIDE
2811
+ default: Ie.PASSWORD_HIDE
2439
2812
  }
2440
2813
  },
2441
2814
  emits: ["toggle-password"],
2442
- setup(o, { emit: n }) {
2443
- const e = ref(!1), r = computed(
2444
- () => e.value ? o.iconHide : o.iconShow
2815
+ setup(t, { emit: l }) {
2816
+ const e = N(!1), s = n(
2817
+ () => e.value ? t.iconHide : t.iconShow
2445
2818
  );
2446
- function a(c) {
2447
- c == null || c.stopPropagation(), o.disabled || (e.value = !e.value, n("toggle-password", e.value));
2819
+ function o(c) {
2820
+ c == null || c.stopPropagation(), t.disabled || (e.value = !e.value, l("toggle-password", e.value));
2448
2821
  }
2449
2822
  return {
2450
2823
  active: e,
2451
- activeIcon: r,
2452
- onClick: a
2824
+ activeIcon: s,
2825
+ onClick: o
2453
2826
  };
2454
2827
  },
2455
2828
  render() {
2456
- const o = h(J, {
2829
+ const t = be(ee, {
2457
2830
  name: this.activeIcon,
2458
2831
  class: "vv-input-text__action-icon"
2459
2832
  });
2460
- return h(
2833
+ return be(
2461
2834
  "button",
2462
2835
  {
2463
2836
  disabled: this.disabled,
@@ -2466,12 +2839,12 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2466
2839
  type: "button",
2467
2840
  onClick: this.onClick
2468
2841
  },
2469
- o
2842
+ t
2470
2843
  );
2471
2844
  }
2472
- }), Ge = defineComponent({
2845
+ }), vt = j({
2473
2846
  components: {
2474
- VvIcon: J
2847
+ VvIcon: ee
2475
2848
  },
2476
2849
  props: {
2477
2850
  disabled: {
@@ -2483,22 +2856,22 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2483
2856
  },
2484
2857
  mode: {
2485
2858
  type: String,
2486
- validator: (o) => ["up", "down"].includes(o),
2859
+ validator: (t) => ["up", "down"].includes(t),
2487
2860
  default: "up"
2488
2861
  }
2489
2862
  },
2490
2863
  emits: ["step-up", "step-down"],
2491
- setup(o, { emit: n }) {
2492
- const e = computed(() => o.mode === "up");
2864
+ setup(t, { emit: l }) {
2865
+ const e = n(() => t.mode === "up");
2493
2866
  return {
2494
2867
  isUp: e,
2495
- onClick: (a) => {
2496
- a == null || a.stopPropagation(), o.disabled || n(e.value ? "step-up" : "step-down");
2868
+ onClick: (o) => {
2869
+ o == null || o.stopPropagation(), t.disabled || l(e.value ? "step-up" : "step-down");
2497
2870
  }
2498
2871
  };
2499
2872
  },
2500
2873
  render() {
2501
- return h("button", {
2874
+ return be("button", {
2502
2875
  class: [
2503
2876
  "vv-input-text__action-chevron",
2504
2877
  this.isUp && "vv-input-text__action-chevron-up"
@@ -2508,9 +2881,9 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2508
2881
  onClick: this.onClick
2509
2882
  });
2510
2883
  }
2511
- }), lt = defineComponent({
2884
+ }), Bt = j({
2512
2885
  components: {
2513
- VvIcon: J
2886
+ VvIcon: ee
2514
2887
  },
2515
2888
  props: {
2516
2889
  disabled: {
@@ -2527,20 +2900,20 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2527
2900
  }
2528
2901
  },
2529
2902
  emits: ["clear"],
2530
- setup(o, { emit: n }) {
2531
- function e(r) {
2532
- r == null || r.stopPropagation(), o.disabled || n("clear");
2903
+ setup(t, { emit: l }) {
2904
+ function e(s) {
2905
+ s == null || s.stopPropagation(), t.disabled || l("clear");
2533
2906
  }
2534
2907
  return {
2535
2908
  onClick: e
2536
2909
  };
2537
2910
  },
2538
2911
  render() {
2539
- const o = h(J, {
2912
+ const t = be(ee, {
2540
2913
  name: this.icon,
2541
2914
  class: "vv-input-text__action-icon"
2542
2915
  });
2543
- return h(
2916
+ return be(
2544
2917
  "button",
2545
2918
  {
2546
2919
  disabled: this.disabled,
@@ -2549,51 +2922,51 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
2549
2922
  type: "button",
2550
2923
  onClick: this.onClick
2551
2924
  },
2552
- o
2925
+ t
2553
2926
  );
2554
2927
  }
2555
2928
  });
2556
- function Ue(o, n) {
2929
+ function ft(t, l) {
2557
2930
  return {
2558
2931
  name: "VvInputTextActions",
2559
2932
  components: {
2560
- VvIcon: J,
2561
- VvInputPasswordAction: at,
2562
- VvInputStepAction: Ge,
2563
- VvInputClearAction: lt
2933
+ VvIcon: ee,
2934
+ VvInputPasswordAction: Lt,
2935
+ VvInputStepAction: vt,
2936
+ VvInputClearAction: Bt
2564
2937
  },
2565
2938
  setup() {
2566
2939
  return {
2567
- isDisabled: computed(() => n.disabled || n.readonly),
2568
- labelStepUp: n.labelStepUp,
2569
- labelStepDown: n.labelStepDown,
2570
- labelShowPassword: n.labelShowPassword,
2571
- labelHidePassword: n.labelHidePassword,
2572
- labelClear: n.labelClear,
2573
- iconShowPassword: n.iconShowPassword,
2574
- iconHidePassword: n.iconHidePassword
2940
+ isDisabled: n(() => l.disabled || l.readonly),
2941
+ labelStepUp: l.labelStepUp,
2942
+ labelStepDown: l.labelStepDown,
2943
+ labelShowPassword: l.labelShowPassword,
2944
+ labelHidePassword: l.labelHidePassword,
2945
+ labelClear: l.labelClear,
2946
+ iconShowPassword: l.iconShowPassword,
2947
+ iconHidePassword: l.iconHidePassword
2575
2948
  };
2576
2949
  },
2577
2950
  render() {
2578
2951
  let e = null;
2579
- switch (o) {
2580
- case V.SEARCH: {
2581
- const { onClear: r } = this.$attrs;
2952
+ switch (t) {
2953
+ case $.SEARCH: {
2954
+ const { onClear: s } = this.$attrs;
2582
2955
  e = [
2583
- h(lt, {
2956
+ be(Bt, {
2584
2957
  disabled: this.isDisabled,
2585
2958
  label: this.labelShowPassword,
2586
- onClear: r
2959
+ onClear: s
2587
2960
  })
2588
2961
  ];
2589
2962
  break;
2590
2963
  }
2591
- case V.PASSWORD: {
2592
- const { onTogglePassword: r } = this.$attrs;
2964
+ case $.PASSWORD: {
2965
+ const { onTogglePassword: s } = this.$attrs;
2593
2966
  e = [
2594
- h(at, {
2967
+ be(Lt, {
2595
2968
  disabled: this.isDisabled,
2596
- onTogglePassword: r,
2969
+ onTogglePassword: s,
2597
2970
  labelShow: this.labelShowPassword,
2598
2971
  labelHide: this.labelHidePassword,
2599
2972
  iconShow: this.iconShowPassword,
@@ -2602,207 +2975,226 @@ function Ue(o, n) {
2602
2975
  ];
2603
2976
  break;
2604
2977
  }
2605
- case V.NUMBER: {
2606
- const { onStepUp: r, onStepDown: a } = this.$attrs;
2978
+ case $.NUMBER: {
2979
+ const { onStepUp: s, onStepDown: o } = this.$attrs;
2607
2980
  e = [
2608
- h(Ge, {
2981
+ be(vt, {
2609
2982
  mode: "up",
2610
- disabled: this.isDisabled || n.max !== void 0 && n.modelValue === n.max,
2983
+ disabled: this.isDisabled || l.max !== void 0 && l.modelValue === l.max,
2611
2984
  label: this.labelStepUp,
2612
- onStepUp: r,
2613
- onStepDown: a
2985
+ onStepUp: s,
2986
+ onStepDown: o
2614
2987
  }),
2615
- h(Ge, {
2988
+ be(vt, {
2616
2989
  mode: "down",
2617
- disabled: this.isDisabled || n.min !== void 0 && n.modelValue === n.min,
2990
+ disabled: this.isDisabled || l.min !== void 0 && l.modelValue === l.min,
2618
2991
  label: this.labelStepDown,
2619
- onStepUp: r,
2620
- onStepDown: a
2992
+ onStepUp: s,
2993
+ onStepDown: o
2621
2994
  })
2622
2995
  ];
2623
2996
  break;
2624
2997
  }
2625
2998
  }
2626
- return Array.isArray(e) ? h("div", { class: "vv-input-text__actions-group" }, e) : e;
2999
+ return Array.isArray(e) ? be("div", { class: "vv-input-text__actions-group" }, e) : e;
3000
+ }
3001
+ };
3002
+ }
3003
+ function nl(t, l, e = 0) {
3004
+ let s;
3005
+ return typeof e == "string" && (e = parseInt(e)), n({
3006
+ get: () => t == null ? void 0 : t.value,
3007
+ set: (o) => {
3008
+ s && clearTimeout(s), s = setTimeout(() => {
3009
+ l("update:modelValue", o);
3010
+ }, e);
2627
3011
  }
3012
+ });
3013
+ }
3014
+ function rl(t, l) {
3015
+ const e = n(() => (a(t) ?? "").length), s = n(() => (l == null ? void 0 : l.lowerLimit) !== void 0 && e.value < (l == null ? void 0 : l.lowerLimit) ? e.value - l.lowerLimit : (l == null ? void 0 : l.upperLimit) !== void 0 && e.value < (l == null ? void 0 : l.upperLimit) ? l.upperLimit - e.value : 0), o = n(() => (l == null ? void 0 : l.mode) === !1 ? "" : (l == null ? void 0 : l.mode) === "limit" && (l != null && l.upperLimit) ? `${e.value} / ${l.lowerLimit ? `${l.lowerLimit}-` : ""}${l.upperLimit}` : (l == null ? void 0 : l.mode) === "countdown" ? s.value === 0 ? void 0 : s : e.value);
3016
+ return {
3017
+ length: e,
3018
+ gap: s,
3019
+ formatted: o
2628
3020
  };
2629
3021
  }
2630
- const pa = ["for"], fa = { class: "vv-input-text__wrapper" }, ma = {
3022
+ const $o = ["for"], ko = { class: "vv-input-text__wrapper" }, Ao = {
2631
3023
  key: 0,
2632
3024
  class: "vv-input-text__input-before"
2633
- }, ba = { class: "vv-input-text__inner" }, ha = ["id"], ya = {
3025
+ }, wo = { class: "vv-input-text__inner" }, Co = ["id"], Io = {
2634
3026
  key: 1,
2635
3027
  class: "vv-input-text__input-after"
2636
- }, ga = {
3028
+ }, Eo = {
2637
3029
  key: 2,
2638
3030
  class: "vv-input-text__limit"
2639
- }, _a = {
3031
+ }, Po = {
2640
3032
  name: "VvInputText"
2641
- }, nl = /* @__PURE__ */ K({
2642
- ..._a,
2643
- props: va,
2644
- emits: ca,
2645
- setup(o, { emit: n }) {
2646
- const e = o, r = useSlots(), a = ref(), {
3033
+ }, ys = /* @__PURE__ */ j({
3034
+ ...Po,
3035
+ props: Vo,
3036
+ emits: So,
3037
+ setup(t, { emit: l }) {
3038
+ const e = t, s = Ae(), o = N(), {
2647
3039
  id: c,
2648
3040
  icon: u,
2649
3041
  iconPosition: v,
2650
- label: m,
2651
- modelValue: d,
2652
- count: l,
2653
- valid: s,
2654
- invalid: p,
2655
- loading: g
2656
- } = toRefs(e), k = useUniqueId(c), C = computed(() => `${k.value}-hint`), b = computed(
2657
- () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
2658
- ), S = useDebouncedInput(d, n, e.debounce), { focused: I } = useComponentFocus(a, n), B = useElementVisibility(a);
2659
- watch(B, (D) => {
2660
- D && e.autofocus && (I.value = !0);
3042
+ label: d,
3043
+ modelValue: p,
3044
+ count: r,
3045
+ valid: i,
3046
+ invalid: b,
3047
+ loading: _
3048
+ } = G(e), k = Le(c), A = n(() => `${k.value}-hint`), y = n(
3049
+ () => e.floating && ge(e.placeholder) ? " " : e.placeholder
3050
+ ), m = nl(p, l, e.debounce), { focused: I } = it(o, l), O = $t(o);
3051
+ ve(O, (E) => {
3052
+ E && e.autofocus && (I.value = !0);
2661
3053
  });
2662
- const E = ref(!1), O = computed(() => e.type === V.PASSWORD), L = () => {
2663
- E.value = !E.value;
2664
- }, q = computed(
2665
- () => e.type === V.TIME || e.type === V.DATETIME_LOCAL || e.type === V.DATE || e.type === V.WEEK || e.type === V.MONTH
2666
- ), Q = computed(() => e.type === V.NUMBER), P = () => {
2667
- se.value && (a.value.stepUp(), S.value = unref(a).value);
2668
- }, T = () => {
2669
- se.value && (a.value.stepDown(), S.value = unref(a).value);
2670
- }, U = computed(() => e.type === V.SEARCH), te = () => {
2671
- S.value = void 0;
2672
- }, { hasIcon: re, hasIconBefore: ie, hasIconAfter: A } = useComponentIcon(
3054
+ const D = N(!1), L = n(() => e.type === $.PASSWORD), x = () => {
3055
+ D.value = !D.value;
3056
+ }, w = n(
3057
+ () => e.type === $.TIME || e.type === $.DATETIME_LOCAL || e.type === $.DATE || e.type === $.WEEK || e.type === $.MONTH
3058
+ ), se = n(() => e.type === $.NUMBER), P = () => {
3059
+ re.value && (o.value.stepUp(), m.value = a(o).value);
3060
+ }, W = () => {
3061
+ re.value && (o.value.stepDown(), m.value = a(o).value);
3062
+ }, F = n(() => e.type === $.SEARCH), ue = () => {
3063
+ m.value = void 0;
3064
+ }, { hasIcon: he, hasIconBefore: ye, hasIconAfter: ne } = ut(
2673
3065
  u,
2674
3066
  v
2675
- ), oe = computed(() => {
3067
+ ), de = n(() => {
2676
3068
  switch (e.type) {
2677
- case V.COLOR:
2678
- return { name: _e.COLOR };
2679
- case V.DATE:
2680
- case V.DATETIME_LOCAL:
2681
- case V.WEEK:
2682
- case V.MONTH:
2683
- return { name: _e.DATE };
2684
- case V.TIME:
2685
- return { name: _e.TIME };
3069
+ case $.COLOR:
3070
+ return { name: Ie.COLOR };
3071
+ case $.DATE:
3072
+ case $.DATETIME_LOCAL:
3073
+ case $.WEEK:
3074
+ case $.MONTH:
3075
+ return { name: Ie.DATE };
3076
+ case $.TIME:
3077
+ return { name: Ie.TIME };
2686
3078
  default:
2687
3079
  return "";
2688
3080
  }
2689
- }), { formatted: fe } = useTextCount(S, {
3081
+ }), { formatted: _e } = rl(m, {
2690
3082
  mode: e.count,
2691
3083
  upperLimit: e.maxlength,
2692
3084
  lowerLimit: e.minlength
2693
- }), se = computed(() => !e.disabled && !e.readonly), be = computed(
2694
- () => se.value ? e.tabindex : -1
2695
- ), z = computed(() => !isEmpty(d)), R = computed(() => {
2696
- if (p.value === !0)
3085
+ }), re = n(() => !e.disabled && !e.readonly), Ve = n(
3086
+ () => re.value ? e.tabindex : -1
3087
+ ), J = n(() => !ge(p)), B = n(() => {
3088
+ if (b.value === !0)
2697
3089
  return !0;
2698
- if (s.value === !0)
3090
+ if (i.value === !0)
2699
3091
  return !1;
2700
- }), { modifiers: X } = toRefs(e), ae = useBemModifiers(
3092
+ }), { modifiers: Q } = G(e), ae = X(
2701
3093
  "vv-input-text",
2702
- X,
2703
- computed(() => ({
2704
- valid: s.value,
2705
- invalid: p.value,
2706
- loading: g.value,
3094
+ Q,
3095
+ n(() => ({
3096
+ valid: i.value,
3097
+ invalid: b.value,
3098
+ loading: _.value,
2707
3099
  disabled: e.disabled,
2708
3100
  readonly: e.readonly,
2709
- "icon-before": ie.value,
2710
- "icon-after": A.value || !isEmpty(oe),
2711
- floating: e.floating && !isEmpty(e.label),
2712
- dirty: z.value,
3101
+ "icon-before": ye.value,
3102
+ "icon-after": ne.value || !ge(de),
3103
+ floating: e.floating && !ge(e.label),
3104
+ dirty: J.value,
2713
3105
  focus: I.value
2714
3106
  }))
2715
- ), me = computed(() => {
2716
- const D = (() => O.value && E.value || q.value && !z.value && !I.value ? V.TEXT : e.type)(), le = {
2717
- type: D,
3107
+ ), Se = n(() => {
3108
+ const E = (() => L.value && D.value || w.value && !J.value && !I.value ? $.TEXT : e.type)(), oe = {
3109
+ type: E,
2718
3110
  name: e.name,
2719
- tabindex: be.value,
3111
+ tabindex: Ve.value,
2720
3112
  disabled: e.disabled,
2721
3113
  readonly: e.readonly,
2722
3114
  required: e.required,
2723
3115
  autocomplete: e.autocomplete,
2724
- "aria-invalid": R.value,
2725
- "aria-describedby": !ue.value && x.value ? C.value : void 0,
2726
- "aria-errormessage": ue.value ? C.value : void 0
3116
+ "aria-invalid": B.value,
3117
+ "aria-describedby": !ce.value && U.value ? A.value : void 0,
3118
+ "aria-errormessage": ce.value ? A.value : void 0
2727
3119
  };
2728
- return (D === V.DATE || D === V.MONTH || D === V.WEEK || D === V.TIME || D === V.DATETIME_LOCAL || D === V.NUMBER) && (le.step = e.step, le.max = String(e.max), le.min = String(e.min)), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD || D === V.NUMBER) && (le.placeholder = b.value), (D === V.TEXT || D === V.SEARCH || D === V.URL || D === V.TEL || D === V.EMAIL || D === V.PASSWORD) && (le.minlength = e.minlength, le.maxlength = e.maxlength, le.pattern = e.pattern), D === V.EMAIL && (le.multiple = e.multiple), le;
2729
- }), pe = computed(() => ({
3120
+ return (E === $.DATE || E === $.MONTH || E === $.WEEK || E === $.TIME || E === $.DATETIME_LOCAL || E === $.NUMBER) && (oe.step = e.step, oe.max = String(e.max), oe.min = String(e.min)), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD || E === $.NUMBER) && (oe.placeholder = y.value), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD) && (oe.minlength = e.minlength, oe.maxlength = e.maxlength, oe.pattern = e.pattern), E === $.EMAIL && (oe.multiple = e.multiple), oe;
3121
+ }), we = n(() => ({
2730
3122
  valid: e.valid,
2731
3123
  invalid: e.invalid,
2732
3124
  modelValue: e.modelValue,
2733
- togglePassword: L,
3125
+ togglePassword: x,
2734
3126
  stepUp: P,
2735
- stepDown: T,
2736
- clear: te
2737
- })), { HintSlot: f, hasHint: x, hasInvalid: ue } = Ve(e, r), he = Ue(
2738
- V.PASSWORD,
3127
+ stepDown: W,
3128
+ clear: ue
3129
+ })), { HintSlot: h, hasHint: U, hasInvalid: ce } = Be(e, s), $e = ft(
3130
+ $.PASSWORD,
2739
3131
  e
2740
- ), Ne = Ue(
2741
- V.NUMBER,
3132
+ ), dt = ft(
3133
+ $.NUMBER,
2742
3134
  e
2743
- ), Ee = Ue(
2744
- V.SEARCH,
3135
+ ), xe = ft(
3136
+ $.SEARCH,
2745
3137
  e
2746
3138
  );
2747
- return (D, le) => (i(), y("div", {
2748
- class: ee(t(ae))
3139
+ return (E, oe) => (f(), g("div", {
3140
+ class: le(a(ae))
2749
3141
  }, [
2750
- t(m) ? (i(), y("label", {
3142
+ a(d) ? (f(), g("label", {
2751
3143
  key: 0,
2752
- for: t(k),
3144
+ for: a(k),
2753
3145
  class: "vv-input-text__label"
2754
- }, H(t(m)), 9, pa)) : w("", !0),
2755
- M("div", fa, [
2756
- D.$slots.before ? (i(), y("div", ma, [
2757
- $(D.$slots, "before", F(j(t(pe))))
2758
- ])) : w("", !0),
2759
- M("div", ba, [
2760
- t(ie) ? (i(), W(J, G({
3146
+ }, T(a(d)), 9, $o)) : C("", !0),
3147
+ M("div", ko, [
3148
+ E.$slots.before ? (f(), g("div", Ao, [
3149
+ V(E.$slots, "before", K(z(a(we))))
3150
+ ])) : C("", !0),
3151
+ M("div", wo, [
3152
+ a(ye) ? (f(), H(ee, R({
2761
3153
  key: 0,
2762
3154
  class: "vv-input-text__icon"
2763
- }, t(re)), null, 16)) : w("", !0),
2764
- Se(M("input", G({
2765
- id: t(k),
3155
+ }, a(he)), null, 16)) : C("", !0),
3156
+ Oe(M("input", R({
3157
+ id: a(k),
2766
3158
  ref_key: "input",
2767
- ref: a,
2768
- "onUpdate:modelValue": le[0] || (le[0] = (we) => Ae(S) ? S.value = we : null)
2769
- }, t(me), {
2770
- onKeyup: le[1] || (le[1] = (we) => n("keyup", we))
2771
- }), null, 16, ha), [
2772
- [wt, t(S)]
3159
+ ref: o,
3160
+ "onUpdate:modelValue": oe[0] || (oe[0] = (Re) => Ee(m) ? m.value = Re : null)
3161
+ }, a(Se), {
3162
+ onKeyup: oe[1] || (oe[1] = (Re) => l("keyup", Re))
3163
+ }), null, 16, Co), [
3164
+ [pl, a(m)]
2773
3165
  ]),
2774
- t(A) || t(oe) ? (i(), W(J, G({
3166
+ a(ne) || a(de) ? (f(), H(ee, R({
2775
3167
  key: 1,
2776
3168
  class: "vv-input-text__icon vv-input-text__icon-after"
2777
- }, t(A) ? t(re) : t(oe)), null, 16)) : t(O) ? (i(), W(t(he), {
3169
+ }, a(ne) ? a(he) : a(de)), null, 16)) : a(L) ? (f(), H(a($e), {
2778
3170
  key: 2,
2779
- onTogglePassword: L
2780
- })) : t(Q) ? (i(), W(t(Ne), {
3171
+ onTogglePassword: x
3172
+ })) : a(se) ? (f(), H(a(dt), {
2781
3173
  key: 3,
2782
3174
  onStepUp: P,
2783
- onStepDown: T
2784
- })) : t(U) ? (i(), W(t(Ee), {
3175
+ onStepDown: W
3176
+ })) : a(F) ? (f(), H(a(xe), {
2785
3177
  key: 4,
2786
- onClear: te
2787
- })) : w("", !0)
3178
+ onClear: ue
3179
+ })) : C("", !0)
2788
3180
  ]),
2789
- D.$slots.after ? (i(), y("div", ya, [
2790
- $(D.$slots, "after", F(j(t(pe))))
2791
- ])) : w("", !0),
2792
- t(l) ? (i(), y("span", ga, [
2793
- $(D.$slots, "count", F(j(t(pe))), () => [
2794
- Z(H(t(fe)), 1)
3181
+ E.$slots.after ? (f(), g("div", Io, [
3182
+ V(E.$slots, "after", K(z(a(we))))
3183
+ ])) : C("", !0),
3184
+ a(r) ? (f(), g("span", Eo, [
3185
+ V(E.$slots, "count", K(z(a(we))), () => [
3186
+ Y(T(a(_e)), 1)
2795
3187
  ])
2796
- ])) : w("", !0)
3188
+ ])) : C("", !0)
2797
3189
  ]),
2798
- de(t(f), {
2799
- id: t(C),
3190
+ pe(a(h), {
3191
+ id: a(A),
2800
3192
  class: "vv-input-text__hint"
2801
3193
  }, null, 8, ["id"])
2802
3194
  ], 2));
2803
3195
  }
2804
- }), Sa = {
2805
- ...ve,
3196
+ }), Oo = {
3197
+ ...me,
2806
3198
  /**
2807
3199
  * Progress value
2808
3200
  * This attribute specifies how much of the task that has been completed.
@@ -2830,155 +3222,155 @@ const pa = ["for"], fa = { class: "vv-input-text__wrapper" }, ma = {
2830
3222
  type: String,
2831
3223
  required: !0
2832
3224
  }
2833
- }, Va = {
3225
+ }, Do = {
2834
3226
  name: "VvProgress"
2835
- }, rl = /* @__PURE__ */ K({
2836
- ...Va,
2837
- props: Sa,
2838
- setup(o) {
2839
- const n = o, { value: e, max: r, label: a } = toRefs(n), c = computed(() => n.value === void 0), { modifiers: u } = toRefs(n), v = useBemModifiers(
3227
+ }, gs = /* @__PURE__ */ j({
3228
+ ...Do,
3229
+ props: Oo,
3230
+ setup(t) {
3231
+ const l = t, { value: e, max: s, label: o } = G(l), c = n(() => l.value === void 0), { modifiers: u } = G(l), v = X(
2840
3232
  "vv-progress",
2841
3233
  u,
2842
- computed(() => ({ indeterminate: c.value }))
3234
+ n(() => ({ indeterminate: c.value }))
2843
3235
  );
2844
- return (m, d) => (i(), y("progress", G({ role: "progressbar" }, {
2845
- class: t(v),
2846
- ariaLabel: t(a),
2847
- max: t(r),
2848
- value: t(e)
3236
+ return (d, p) => (f(), g("progress", R({ role: "progressbar" }, {
3237
+ class: a(v),
3238
+ ariaLabel: a(o),
3239
+ max: a(s),
3240
+ value: a(e)
2849
3241
  }), null, 16));
2850
3242
  }
2851
- }), $a = ht, ka = ["click", "update:modelValue", "change", "blur"];
2852
- function Aa(o, n) {
2853
- const { id: e } = toRefs(o), { group: r, isInGroup: a, getGroupOrLocalRef: c } = useInjectedGroupState(ct), u = c("modelValue", o, n), v = c("readonly", o), m = c("disabled", o), d = c("valid", o), l = c("invalid", o);
3243
+ }), Lo = tl, Bo = ["click", "update:modelValue", "change", "blur"];
3244
+ function To(t, l) {
3245
+ const { id: e } = G(t), { group: s, isInGroup: o, getGroupOrLocalRef: c } = tt(Kt), u = c("modelValue", t, l), v = c("readonly", t), d = c("disabled", t), p = c("valid", t), r = c("invalid", t);
2854
3246
  return {
2855
3247
  // local props
2856
3248
  id: e,
2857
3249
  // global props
2858
- group: r,
2859
- isInGroup: a,
3250
+ group: s,
3251
+ isInGroup: o,
2860
3252
  modelValue: u,
2861
3253
  readonly: v,
2862
- disabled: m,
2863
- valid: d,
2864
- invalid: l
3254
+ disabled: d,
3255
+ valid: p,
3256
+ invalid: r
2865
3257
  };
2866
3258
  }
2867
- const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ea = {
3259
+ const No = ["for"], Ro = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ho = {
2868
3260
  name: "VvRadio"
2869
- }, Ia = /* @__PURE__ */ K({
2870
- ...Ea,
2871
- props: $a,
2872
- emits: ka,
2873
- setup(o, { emit: n }) {
2874
- const e = o, r = useSlots(), { id: a, disabled: c, readonly: u, modelValue: v, valid: m, invalid: d } = Aa(e, n), l = useUniqueId(a), s = computed(() => g.value ? -1 : e.tabindex), p = ref(), g = computed(() => c.value || u.value), k = computed(() => {
2875
- if (d.value === !0)
3261
+ }, Mo = /* @__PURE__ */ j({
3262
+ ...Ho,
3263
+ props: Lo,
3264
+ emits: Bo,
3265
+ setup(t, { emit: l }) {
3266
+ const e = t, s = Ae(), { id: o, disabled: c, readonly: u, modelValue: v, valid: d, invalid: p } = To(e, l), r = Le(o), i = n(() => _.value ? -1 : e.tabindex), b = N(), _ = n(() => c.value || u.value), k = n(() => {
3267
+ if (p.value === !0)
2876
3268
  return !0;
2877
- if (m.value === !0)
3269
+ if (d.value === !0)
2878
3270
  return !1;
2879
- }), C = computed(
2880
- () => Array.isArray(v.value) ? contains(e.value, v.value) : equals(e.value, v.value)
2881
- ), b = computed(
3271
+ }), A = n(
3272
+ () => Array.isArray(v.value) ? Ce(e.value, v.value) : Pe(e.value, v.value)
3273
+ ), y = n(
2882
3274
  () => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
2883
- ), S = computed({
3275
+ ), m = n({
2884
3276
  get() {
2885
- return C.value ? b.value : null;
3277
+ return A.value ? y.value : null;
2886
3278
  },
2887
- set(O) {
2888
- Array.isArray(v.value) ? v.value = [e.value] : v.value = e.value, n("change", O);
3279
+ set(L) {
3280
+ Array.isArray(v.value) ? v.value = [e.value] : v.value = e.value, l("change", L);
2889
3281
  }
2890
- }), { modifiers: I } = toRefs(e), B = useBemModifiers(
3282
+ }), { modifiers: I } = G(e), O = X(
2891
3283
  "vv-radio",
2892
3284
  I,
2893
- computed(() => ({
2894
- valid: m.value,
2895
- invalid: d.value,
3285
+ n(() => ({
3286
+ valid: d.value,
3287
+ invalid: p.value,
2896
3288
  disabled: c.value,
2897
3289
  readonly: u.value
2898
3290
  }))
2899
- ), { HintSlot: E } = Ve(e, r);
2900
- return (O, L) => (i(), y("label", {
2901
- class: ee(t(B)),
2902
- for: t(l)
3291
+ ), { HintSlot: D } = Be(e, s);
3292
+ return (L, x) => (f(), g("label", {
3293
+ class: le(a(O)),
3294
+ for: a(r)
2903
3295
  }, [
2904
- Se(M("input", {
2905
- id: t(l),
3296
+ Oe(M("input", {
3297
+ id: a(r),
2906
3298
  ref_key: "input",
2907
- ref: p,
2908
- "onUpdate:modelValue": L[0] || (L[0] = (q) => Ae(S) ? S.value = q : null),
3299
+ ref: b,
3300
+ "onUpdate:modelValue": x[0] || (x[0] = (w) => Ee(m) ? m.value = w : null),
2909
3301
  type: "radio",
2910
3302
  class: "vv-radio__input",
2911
- name: O.name,
2912
- disabled: t(g),
2913
- value: t(b),
2914
- tabindex: t(s),
2915
- "aria-invalid": t(k)
2916
- }, null, 8, wa), [
2917
- [Et, t(S)]
3303
+ name: L.name,
3304
+ disabled: a(_),
3305
+ value: a(y),
3306
+ tabindex: a(i),
3307
+ "aria-invalid": a(k)
3308
+ }, null, 8, Ro), [
3309
+ [ml, a(m)]
2918
3310
  ]),
2919
- $(O.$slots, "default", { value: t(v) }, () => [
2920
- Z(H(O.label), 1)
3311
+ V(L.$slots, "default", { value: a(v) }, () => [
3312
+ Y(T(L.label), 1)
2921
3313
  ]),
2922
- de(t(E), {
3314
+ pe(a(D), {
2923
3315
  class: "vv-radio__hint",
2924
- params: { value: t(v) }
3316
+ params: { value: a(v) }
2925
3317
  }, null, 8, ["params"])
2926
- ], 10, Ca));
3318
+ ], 10, No));
2927
3319
  }
2928
- }), Pa = yt, Oa = ["update:modelValue", "change"], Da = ["textContent"], Ba = { class: "vv-radio-group__wrapper" }, Ra = {
3320
+ }), xo = ll, Go = ["update:modelValue", "change"], jo = ["textContent"], Wo = { class: "vv-radio-group__wrapper" }, Uo = {
2929
3321
  name: "VvRadioGroup"
2930
- }, il = /* @__PURE__ */ K({
2931
- ...Ra,
2932
- props: Pa,
2933
- emits: Oa,
2934
- setup(o, { emit: n }) {
2935
- const e = o, r = useSlots(), a = useVModel(e, "modelValue", n), { disabled: c, readonly: u, vertical: v, valid: m, invalid: d, modifiers: l } = toRefs(e);
2936
- useProvideGroupState({
2937
- key: ct,
2938
- modelValue: a,
3322
+ }, _s = /* @__PURE__ */ j({
3323
+ ...Uo,
3324
+ props: xo,
3325
+ emits: Go,
3326
+ setup(t, { emit: l }) {
3327
+ const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: c, readonly: u, vertical: v, valid: d, invalid: p, modifiers: r } = G(e);
3328
+ lt({
3329
+ key: Kt,
3330
+ modelValue: o,
2939
3331
  disabled: c,
2940
3332
  readonly: u,
2941
- valid: m,
2942
- invalid: d
3333
+ valid: d,
3334
+ invalid: p
2943
3335
  });
2944
- const { getOptionLabel: s, getOptionValue: p } = useOptions(e), g = useBemModifiers(
3336
+ const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
2945
3337
  "vv-radio-group",
2946
- l,
2947
- computed(() => ({
3338
+ r,
3339
+ n(() => ({
2948
3340
  disabled: c.value,
2949
3341
  readonly: u.value,
2950
3342
  horizontal: !v.value,
2951
- valid: m.value,
2952
- invalid: d.value
3343
+ valid: d.value,
3344
+ invalid: p.value
2953
3345
  }))
2954
- ), k = (b, S) => ({
2955
- id: `${e.name}_opt${S}`,
3346
+ ), k = (y, m) => ({
3347
+ id: `${e.name}_opt${m}`,
2956
3348
  name: e.name,
2957
- label: s(b),
2958
- value: p(b)
2959
- }), { HintSlot: C } = Ve(e, r);
2960
- return (b, S) => (i(), y("fieldset", {
2961
- class: ee(t(g))
3349
+ label: i(y),
3350
+ value: b(y)
3351
+ }), { HintSlot: A } = Be(e, s);
3352
+ return (y, m) => (f(), g("fieldset", {
3353
+ class: le(a(_))
2962
3354
  }, [
2963
- b.label ? (i(), y("legend", {
3355
+ y.label ? (f(), g("legend", {
2964
3356
  key: 0,
2965
- textContent: H(b.label)
2966
- }, null, 8, Da)) : w("", !0),
2967
- M("div", Ba, [
2968
- b.options.length > 0 ? (i(!0), y(ne, { key: 0 }, ke(b.options, (I, B) => (i(), W(Ia, G({ key: B }, k(I, B)), null, 16))), 128)) : $(b.$slots, "default", { key: 1 })
3357
+ textContent: T(y.label)
3358
+ }, null, 8, jo)) : C("", !0),
3359
+ M("div", Wo, [
3360
+ y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Mo, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
2969
3361
  ]),
2970
- de(t(C), { class: "vv-radio-group__hint" })
3362
+ pe(a(A), { class: "vv-radio-group__hint" })
2971
3363
  ], 2));
2972
3364
  }
2973
- }), Ta = {
3365
+ }), Fo = {
2974
3366
  hard: "hard",
2975
3367
  soft: "soft"
2976
- }, xa = {
3368
+ }, Ko = {
2977
3369
  true: !0,
2978
3370
  false: !1,
2979
3371
  default: "default"
2980
- }, Ma = ["update:modelValue", "focus", "blur", "keyup"], La = {
2981
- ...bt,
3372
+ }, zo = ["update:modelValue", "focus", "blur", "keyup"], qo = {
3373
+ ...el,
2982
3374
  /**
2983
3375
  * Textarea value
2984
3376
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
@@ -2998,84 +3390,84 @@ const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-i
2998
3390
  * Indicates how the control should wrap the value for form submission.
2999
3391
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
3000
3392
  */
3001
- wrap: { type: String, default: Ta.soft },
3393
+ wrap: { type: String, default: Fo.soft },
3002
3394
  /**
3003
3395
  * Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
3004
3396
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
3005
3397
  */
3006
- spellcheck: { type: [Boolean, String], default: xa.default },
3398
+ spellcheck: { type: [Boolean, String], default: Ko.default },
3007
3399
  /**
3008
3400
  * If true, the textarea will be resizable
3009
3401
  */
3010
3402
  resizable: Boolean
3011
- }, Na = ["for"], Ha = { class: "vv-textarea__wrapper" }, Ga = {
3403
+ }, Yo = ["for"], Jo = { class: "vv-textarea__wrapper" }, Xo = {
3012
3404
  key: 0,
3013
3405
  class: "vv-textarea__input-before"
3014
- }, Ua = { class: "vv-textarea__inner" }, Wa = ["id"], Fa = {
3406
+ }, Qo = { class: "vv-textarea__inner" }, Zo = ["id"], es = {
3015
3407
  key: 1,
3016
3408
  class: "vv-textarea__input-after"
3017
- }, ja = {
3409
+ }, ts = {
3018
3410
  key: 2,
3019
3411
  class: "vv-textarea__limit"
3020
- }, qa = {
3412
+ }, ls = {
3021
3413
  name: "VvTextarea"
3022
- }, ul = /* @__PURE__ */ K({
3023
- ...qa,
3024
- props: La,
3025
- emits: Ma,
3026
- setup(o, { emit: n }) {
3027
- const e = o, r = useSlots(), a = ref(), {
3414
+ }, Ss = /* @__PURE__ */ j({
3415
+ ...ls,
3416
+ props: qo,
3417
+ emits: zo,
3418
+ setup(t, { emit: l }) {
3419
+ const e = t, s = Ae(), o = N(), {
3028
3420
  id: c,
3029
3421
  icon: u,
3030
3422
  iconPosition: v,
3031
- label: m,
3032
- modelValue: d,
3033
- count: l,
3034
- valid: s,
3035
- invalid: p,
3036
- loading: g,
3423
+ label: d,
3424
+ modelValue: p,
3425
+ count: r,
3426
+ valid: i,
3427
+ invalid: b,
3428
+ loading: _,
3037
3429
  modifiers: k
3038
- } = toRefs(e), C = useUniqueId(c), b = computed(() => `${C.value}-hint`), S = computed(
3039
- () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
3040
- ), I = useDebouncedInput(d, n, e.debounce), { hasIcon: B, hasIconBefore: E, hasIconAfter: O } = useComponentIcon(
3430
+ } = G(e), A = Le(c), y = n(() => `${A.value}-hint`), m = n(
3431
+ () => e.floating && ge(e.placeholder) ? " " : e.placeholder
3432
+ ), I = nl(p, l, e.debounce), { hasIcon: O, hasIconBefore: D, hasIconAfter: L } = ut(
3041
3433
  u,
3042
3434
  v
3043
- ), { focused: L } = useComponentFocus(a, n), q = useElementVisibility(a);
3044
- watch(q, (z) => {
3045
- z && e.autofocus && (L.value = !0);
3435
+ ), { focused: x } = it(o, l), w = $t(o);
3436
+ ve(w, (J) => {
3437
+ J && e.autofocus && (x.value = !0);
3046
3438
  });
3047
- const { formatted: Q } = useTextCount(I, {
3439
+ const { formatted: se } = rl(I, {
3048
3440
  mode: e.count,
3049
3441
  upperLimit: e.maxlength,
3050
3442
  lowerLimit: e.minlength
3051
- }), P = computed(() => !e.disabled && !e.readonly), T = computed(
3443
+ }), P = n(() => !e.disabled && !e.readonly), W = n(
3052
3444
  () => P.value ? e.tabindex : -1
3053
- ), U = computed(() => !isEmpty(d)), te = computed(() => {
3445
+ ), F = n(() => !ge(p)), ue = n(() => {
3054
3446
  if (e.invalid === !0)
3055
3447
  return !0;
3056
3448
  if (e.valid === !0)
3057
3449
  return !1;
3058
- }), { HintSlot: re, hasHint: ie, hasInvalid: A } = Ve(e, r), oe = useBemModifiers(
3450
+ }), { HintSlot: he, hasHint: ye, hasInvalid: ne } = Be(e, s), de = X(
3059
3451
  "vv-textarea",
3060
3452
  k,
3061
- computed(() => ({
3062
- valid: s.value,
3063
- invalid: p.value,
3064
- loading: g.value,
3453
+ n(() => ({
3454
+ valid: i.value,
3455
+ invalid: b.value,
3456
+ loading: _.value,
3065
3457
  disabled: e.disabled,
3066
3458
  readonly: e.readonly,
3067
- "icon-before": E.value,
3068
- "icon-after": O.value,
3069
- floating: e.floating && !isEmpty(e.label),
3070
- dirty: U.value,
3071
- focused: L.value,
3459
+ "icon-before": D.value,
3460
+ "icon-after": L.value,
3461
+ floating: e.floating && !ge(e.label),
3462
+ dirty: F.value,
3463
+ focused: x.value,
3072
3464
  resizable: e.resizable
3073
3465
  }))
3074
- ), fe = computed(
3466
+ ), _e = n(
3075
3467
  () => ({
3076
3468
  name: e.name,
3077
- placeholder: S.value,
3078
- tabindex: T.value,
3469
+ placeholder: m.value,
3470
+ tabindex: W.value,
3079
3471
  disabled: e.disabled,
3080
3472
  readonly: e.readonly,
3081
3473
  required: e.required,
@@ -3086,87 +3478,87 @@ const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-i
3086
3478
  rows: e.rows,
3087
3479
  wrap: e.wrap,
3088
3480
  spellcheck: e.spellcheck,
3089
- "aria-invalid": te.value,
3090
- "aria-describedby": !A.value && ie.value ? b.value : void 0,
3091
- "aria-errormessage": A.value ? b.value : void 0
3481
+ "aria-invalid": ue.value,
3482
+ "aria-describedby": !ne.value && ye.value ? y.value : void 0,
3483
+ "aria-errormessage": ne.value ? y.value : void 0
3092
3484
  })
3093
- ), se = computed(() => ({
3485
+ ), re = n(() => ({
3094
3486
  valid: e.valid,
3095
3487
  invalid: e.invalid,
3096
3488
  modelValue: e.modelValue,
3097
3489
  hintLabel: e.hintLabel,
3098
3490
  maxlength: e.maxlength,
3099
3491
  minlength: e.minlength,
3100
- clear: be
3101
- })), be = () => {
3492
+ clear: Ve
3493
+ })), Ve = () => {
3102
3494
  I.value = void 0;
3103
3495
  };
3104
- return (z, R) => (i(), y("div", {
3105
- class: ee(t(oe))
3496
+ return (J, B) => (f(), g("div", {
3497
+ class: le(a(de))
3106
3498
  }, [
3107
- t(m) ? (i(), y("label", {
3499
+ a(d) ? (f(), g("label", {
3108
3500
  key: 0,
3109
- for: t(C),
3501
+ for: a(A),
3110
3502
  class: "vv-textarea__label"
3111
- }, H(t(m)), 9, Na)) : w("", !0),
3112
- M("div", Ha, [
3113
- z.$slots.before ? (i(), y("div", Ga, [
3114
- $(z.$slots, "before", F(j(t(se))))
3115
- ])) : w("", !0),
3116
- M("div", Ua, [
3117
- t(E) ? (i(), W(J, G({
3503
+ }, T(a(d)), 9, Yo)) : C("", !0),
3504
+ M("div", Jo, [
3505
+ J.$slots.before ? (f(), g("div", Xo, [
3506
+ V(J.$slots, "before", K(z(a(re))))
3507
+ ])) : C("", !0),
3508
+ M("div", Qo, [
3509
+ a(D) ? (f(), H(ee, R({
3118
3510
  key: 0,
3119
3511
  class: "vv-textarea__icon"
3120
- }, t(B)), null, 16)) : w("", !0),
3121
- Se(M("textarea", G({
3122
- id: t(C),
3512
+ }, a(O)), null, 16)) : C("", !0),
3513
+ Oe(M("textarea", R({
3514
+ id: a(A),
3123
3515
  ref_key: "textarea",
3124
- ref: a,
3125
- "onUpdate:modelValue": R[0] || (R[0] = (X) => Ae(I) ? I.value = X : null)
3126
- }, t(fe), {
3127
- onKeyup: R[1] || (R[1] = (X) => n("keyup", X))
3128
- }), null, 16, Wa), [
3129
- [it, t(I)]
3516
+ ref: o,
3517
+ "onUpdate:modelValue": B[0] || (B[0] = (Q) => Ee(I) ? I.value = Q : null)
3518
+ }, a(_e), {
3519
+ onKeyup: B[1] || (B[1] = (Q) => l("keyup", Q))
3520
+ }), null, 16, Zo), [
3521
+ [Ht, a(I)]
3130
3522
  ]),
3131
- t(O) ? (i(), W(J, G({
3523
+ a(L) ? (f(), H(ee, R({
3132
3524
  key: 1,
3133
3525
  class: "vv-textarea__icon vv-textarea__icon-after"
3134
- }, t(B)), null, 16)) : w("", !0)
3526
+ }, a(O)), null, 16)) : C("", !0)
3135
3527
  ]),
3136
- z.$slots.after ? (i(), y("div", Fa, [
3137
- $(z.$slots, "after", F(j(t(se))))
3138
- ])) : w("", !0),
3139
- t(l) ? (i(), y("span", ja, [
3140
- $(z.$slots, "count", F(j(t(se))), () => [
3141
- Z(H(t(Q)), 1)
3528
+ J.$slots.after ? (f(), g("div", es, [
3529
+ V(J.$slots, "after", K(z(a(re))))
3530
+ ])) : C("", !0),
3531
+ a(r) ? (f(), g("span", ts, [
3532
+ V(J.$slots, "count", K(z(a(re))), () => [
3533
+ Y(T(a(se)), 1)
3142
3534
  ])
3143
- ])) : w("", !0)
3535
+ ])) : C("", !0)
3144
3536
  ]),
3145
- de(t(re), {
3146
- id: t(b),
3537
+ pe(a(he), {
3538
+ id: a(y),
3147
3539
  class: "vv-textarea__hint"
3148
3540
  }, null, 8, ["id"])
3149
3541
  ], 2));
3150
3542
  }
3151
3543
  });
3152
3544
  export {
3153
- Ut as VvAccordion,
3154
- Qa as VvAccordionGroup,
3155
- Yt as VvBadge,
3156
- Za as VvBreadcrumb,
3157
- el as VvButton,
3158
- tl as VvButtonGroup,
3159
- ol as VvCard,
3160
- Ao as VvCheckbox,
3161
- al as VvCheckboxGroup,
3162
- ll as VvCombobox,
3163
- sl as VvDialog,
3164
- St as VvDropdown,
3165
- J as VvIcon,
3166
- nl as VvInputText,
3167
- rl as VvProgress,
3168
- Ia as VvRadio,
3169
- il as VvRadioGroup,
3170
- zo as VvSelect,
3171
- ul as VvTextarea
3545
+ Rl as VvAccordion,
3546
+ ds as VvAccordionGroup,
3547
+ Yl as VvBadge,
3548
+ cs as VvBreadcrumb,
3549
+ vs as VvButton,
3550
+ fs as VvButtonGroup,
3551
+ ps as VvCard,
3552
+ Ea as VvCheckbox,
3553
+ ms as VvCheckboxGroup,
3554
+ bs as VvCombobox,
3555
+ hs as VvDialog,
3556
+ sl as VvDropdown,
3557
+ ee as VvIcon,
3558
+ ys as VvInputText,
3559
+ gs as VvProgress,
3560
+ Mo as VvRadio,
3561
+ _s as VvRadioGroup,
3562
+ oo as VvSelect,
3563
+ Ss as VvTextarea
3172
3564
  };