@volverjs/ui-vue 0.0.2 → 0.0.3-beta.3

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 (171) hide show
  1. package/auto-imports.d.ts +289 -0
  2. package/dist/components/VvAccordion/VvAccordion.es.js +63 -131
  3. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  4. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -2
  5. package/dist/components/VvAccordion/index.d.ts +2 -2
  6. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +97 -176
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +4 -4
  9. package/dist/components/VvAccordionGroup/index.d.ts +2 -2
  10. package/dist/components/VvBadge/VvBadge.es.js +16 -50
  11. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  12. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +38 -45
  13. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  14. package/dist/components/VvButton/VvButton.es.js +170 -306
  15. package/dist/components/VvButton/VvButton.umd.js +1 -1
  16. package/dist/components/VvButton/VvButton.vue.d.ts +4 -4
  17. package/dist/components/VvButton/index.d.ts +3 -3
  18. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +39 -84
  19. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  20. package/dist/components/VvCard/VvCard.es.js +26 -60
  21. package/dist/components/VvCard/VvCard.umd.js +1 -1
  22. package/dist/components/VvCard/VvCard.vue.d.ts +2 -2
  23. package/dist/components/VvCard/index.d.ts +1 -1
  24. package/dist/components/VvCheckbox/VvCheckbox.es.js +144 -282
  25. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  26. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +6 -6
  27. package/dist/components/VvCheckbox/index.d.ts +10 -4
  28. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -346
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  30. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
  31. package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
  32. package/dist/components/VvCombobox/VvCombobox.es.js +330 -487
  33. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  34. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +8 -8
  35. package/dist/components/VvCombobox/index.d.ts +4 -4
  36. package/dist/components/VvDialog/VvDialog.es.js +66 -102
  37. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  38. package/dist/components/VvDropdown/VvDropdown.es.js +61 -185
  39. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  40. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +2 -2
  41. package/dist/components/VvDropdown/index.d.ts +1 -1
  42. package/dist/components/VvIcon/VvIcon.es.js +30 -65
  43. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  44. package/dist/components/VvInputText/VvInputText.es.js +304 -407
  45. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  46. package/dist/components/VvInputText/VvInputText.vue.d.ts +10 -10
  47. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  48. package/dist/components/VvInputText/index.d.ts +5 -5
  49. package/dist/components/VvProgress/VvProgress.es.js +17 -51
  50. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  51. package/dist/components/VvRadio/VvRadio.es.js +110 -249
  52. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  53. package/dist/components/VvRadio/VvRadio.vue.d.ts +6 -6
  54. package/dist/components/VvRadio/index.d.ts +3 -3
  55. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +161 -318
  56. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  57. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
  58. package/dist/components/VvRadioGroup/index.d.ts +3 -3
  59. package/dist/components/VvSelect/VvSelect.es.js +200 -292
  60. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  61. package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
  62. package/dist/components/VvSelect/index.d.ts +4 -4
  63. package/dist/components/VvTextarea/VvTextarea.es.js +196 -299
  64. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  65. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +6 -6
  66. package/dist/components/VvTextarea/index.d.ts +3 -3
  67. package/dist/components/VvTooltip/VvTooltip.es.js +28 -0
  68. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -0
  69. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +23 -0
  70. package/dist/components/VvTooltip/index.d.ts +18 -0
  71. package/dist/components/common/HintSlot.d.ts +1 -1
  72. package/dist/components/index.es.js +1179 -1371
  73. package/dist/components/index.umd.js +1 -1
  74. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  75. package/dist/composables/useComponentFocus.d.ts +1 -1
  76. package/dist/composables/useComponentIcons.d.ts +1 -1
  77. package/dist/composables/useDebouncedInput.d.ts +1 -1
  78. package/dist/composables/useModifiers.d.ts +1 -1
  79. package/dist/composables/useTextCount.d.ts +1 -1
  80. package/dist/icons.es.js +3 -3
  81. package/dist/icons.umd.js +1 -1
  82. package/dist/index.es.js +1211 -1404
  83. package/dist/index.umd.js +1 -1
  84. package/dist/props/index.d.ts +12 -12
  85. package/dist/stories/Tooltip/Tooltip.settings.d.ts +42 -0
  86. package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
  87. package/dist/utils/ObjectUtilities.d.ts +1 -1
  88. package/package.json +27 -20
  89. package/src/assets/icons/detailed.json +1 -1
  90. package/src/assets/icons/normal.json +1 -1
  91. package/src/assets/icons/simple.json +1 -1
  92. package/src/components/VvAccordion/VvAccordion.vue +0 -3
  93. package/src/components/VvAccordion/index.ts +1 -2
  94. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +1 -3
  95. package/src/components/VvBadge/VvBadge.vue +0 -1
  96. package/src/components/VvButton/VvButton.vue +0 -3
  97. package/src/components/VvButton/index.ts +2 -10
  98. package/src/components/VvButtonGroup/VvButtonGroup.vue +0 -3
  99. package/src/components/VvCard/VvCard.vue +0 -1
  100. package/src/components/VvCheckbox/VvCheckbox.vue +0 -3
  101. package/src/components/VvCheckbox/index.ts +1 -2
  102. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +0 -5
  103. package/src/components/VvCombobox/VvCombobox.vue +0 -7
  104. package/src/components/VvDialog/VvDialog.vue +1 -2
  105. package/src/components/VvDropdown/VvDropdown.vue +0 -4
  106. package/src/components/VvIcon/VvIcon.vue +0 -2
  107. package/src/components/VvInputText/VvInputClearAction.ts +0 -1
  108. package/src/components/VvInputText/VvInputPasswordAction.ts +0 -1
  109. package/src/components/VvInputText/VvInputStepAction.ts +0 -1
  110. package/src/components/VvInputText/VvInputText.vue +1 -16
  111. package/src/components/VvInputText/VvInputTextActions.ts +1 -1
  112. package/src/components/VvProgress/VvProgress.vue +0 -2
  113. package/src/components/VvRadio/VvRadio.vue +0 -3
  114. package/src/components/VvRadio/index.ts +0 -1
  115. package/src/components/VvRadioGroup/VvRadioGroup.vue +0 -5
  116. package/src/components/VvSelect/VvSelect.vue +1 -14
  117. package/src/components/VvTextarea/VvTextarea.vue +1 -15
  118. package/src/components/VvTooltip/VvTooltip.vue +17 -0
  119. package/src/components/VvTooltip/index.ts +21 -0
  120. package/src/components/common/HintSlot.ts +1 -11
  121. package/src/composables/group/types/IAccordionGroupState.ts +0 -1
  122. package/src/composables/group/types/IButtonGroupState.ts +0 -1
  123. package/src/composables/group/types/IInputGroup.ts +0 -1
  124. package/src/composables/group/useInjectedGroupState.ts +1 -2
  125. package/src/composables/group/useProvideGroupState.ts +0 -1
  126. package/src/composables/useComponentFocus.ts +1 -2
  127. package/src/composables/useComponentIcons.ts +1 -1
  128. package/src/composables/useDebouncedInput.ts +1 -1
  129. package/src/composables/useModifiers.ts +1 -2
  130. package/src/composables/useOptions.ts +0 -1
  131. package/src/composables/useTextCount.ts +1 -1
  132. package/src/stories/Accordion/Accordion.stories.mdx +1 -1
  133. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +1 -1
  134. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
  135. package/src/stories/Badge/Badge.stories.mdx +1 -1
  136. package/src/stories/Breadcrumb/Breadcrumb.settings.ts +0 -1
  137. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +1 -1
  138. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +1 -1
  139. package/src/stories/Button/Button.stories.mdx +1 -1
  140. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  141. package/src/stories/Button/ButtonSlots.stories.mdx +3 -3
  142. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +0 -1
  143. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +1 -1
  144. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +1 -1
  145. package/src/stories/Card/Card.stories.mdx +1 -1
  146. package/src/stories/Card/CardSlots.stories.mdx +1 -1
  147. package/src/stories/Checkbox/Checkbox.stories.mdx +1 -1
  148. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
  149. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +1 -1
  150. package/src/stories/Combobox/Combobox.settings.ts +0 -1
  151. package/src/stories/Combobox/Combobox.stories.mdx +1 -1
  152. package/src/stories/Dialog/Dialog.stories.mdx +1 -1
  153. package/src/stories/Dropdown/Dropdown.settings.ts +0 -1
  154. package/src/stories/Dropdown/Dropdown.stories.mdx +1 -1
  155. package/src/stories/Icon/Icon.settings.ts +0 -1
  156. package/src/stories/Icon/Icon.stories.mdx +1 -1
  157. package/src/stories/Icon/IconsCollection.stories.mdx +1 -1
  158. package/src/stories/InputText/InputText.settings.ts +0 -1
  159. package/src/stories/InputText/InputText.stories.mdx +1 -1
  160. package/src/stories/Progress/Progress.stories.mdx +1 -1
  161. package/src/stories/Radio/Radio.stories.mdx +1 -1
  162. package/src/stories/RadioGroup/RadioGroup.stories.mdx +1 -1
  163. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +1 -1
  164. package/src/stories/Select/Select.settings.ts +0 -1
  165. package/src/stories/Select/Select.stories.mdx +1 -1
  166. package/src/stories/Textarea/Textarea.settings.ts +0 -1
  167. package/src/stories/Textarea/Textarea.stories.mdx +1 -1
  168. package/src/stories/Tooltip/Tooltip.settings.ts +25 -0
  169. package/src/stories/Tooltip/Tooltip.stories.mdx +98 -0
  170. package/src/stories/Tooltip/Tooltip.test.ts +49 -0
  171. package/src/utils/ObjectUtilities.ts +1 -1
package/dist/index.es.js CHANGED
@@ -1,200 +1,46 @@
1
- var Rt = Object.defineProperty;
2
- var Lt = (l, t, e) => t in l ? Rt(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var ke = (l, t, e) => (Lt(l, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { addCollection as Dt, addIcon as ut, addAPIProvider as Tt, iconExists as De, Icon as Bt } from "@iconify/vue";
5
- import { unref as a, computed as i, inject as Xe, toRef as Nt, toRefs as F, defineComponent as D, useAttrs as dt, ref as G, openBlock as m, createElementBlock as _, normalizeClass as K, withModifiers as Ze, createElementVNode as E, renderSlot as A, normalizeProps as W, guardReactiveProps as te, createTextVNode as X, toDisplayString as L, isRef as $e, provide as xt, watchEffect as Ye, Fragment as ge, renderList as Ce, createBlock as T, mergeProps as R, withCtx as we, resolveDynamicComponent as ct, createCommentVNode as I, useSlots as ce, h as Q, watch as Ae, onMounted as Ht, withDirectives as Se, vModelCheckbox as Mt, createVNode as oe, vModelSelect as Gt, withKeys as ot, vModelText as vt, Transition as Ut, toHandlers as jt, vShow as Kt, vModelDynamic as Ft, vModelRadio as Wt } from "vue";
6
- import { useToggle as zt, toReactive as qt, useVModel as Je, useFocus as Xt, useElementVisibility as Qe, refDebounced as Zt, onClickOutside as pt } from "@vueuse/core";
7
- import { nanoid as ve } from "nanoid";
8
- const Ne = "ds";
9
- class Yt {
1
+ var rt = Object.defineProperty;
2
+ var it = (o, s, e) => s in o ? rt(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
+ var he = (o, s, e) => (it(o, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import { addCollection as ut, addIcon as Ue, addAPIProvider as dt, iconExists as $e, Icon as ct } from "@iconify/vue";
5
+ import { defineComponent as N, openBlock as m, createElementBlock as _, unref as t, normalizeClass as U, withModifiers as Be, createElementVNode as R, renderSlot as k, normalizeProps as F, guardReactiveProps as Y, createTextVNode as q, toDisplayString as B, Fragment as de, renderList as fe, createBlock as D, mergeProps as O, withCtx as ge, resolveDynamicComponent as Fe, createCommentVNode as I, withDirectives as ve, isRef as be, vModelCheckbox as pt, createVNode as Z, vModelSelect as vt, withKeys as Ne, vModelText as Ke, Transition as mt, toHandlers as ft, vShow as bt, vModelDynamic as ht, vModelRadio as gt } from "vue";
6
+ import { nanoid as ne } from "nanoid";
7
+ const Ae = "ds";
8
+ class yt {
10
9
  constructor({
11
- fetchWithCredentials: t = !1,
10
+ fetchWithCredentials: s = !1,
12
11
  fetchOptions: e = {},
13
12
  iconsCollections: n = [],
14
- nuxt: o = !1
13
+ nuxt: l = !1
15
14
  } = {}) {
16
- ke(this, "fetchOptions");
17
- ke(this, "iconsCollections");
18
- ke(this, "provider");
19
- ke(this, "nuxt");
20
- t && (e = { ...e, credentials: "include" }), this.provider = Ne, this.fetchOptions = e, this.iconsCollections = n, this.iconsCollections.forEach((r) => {
21
- this.addCollection(r, this.provider);
22
- }), this.nuxt = o;
15
+ he(this, "fetchOptions");
16
+ he(this, "iconsCollections");
17
+ he(this, "provider");
18
+ he(this, "nuxt");
19
+ s && (e = { ...e, credentials: "include" }), this.provider = Ae, this.fetchOptions = e, this.iconsCollections = n, this.iconsCollections.forEach((i) => {
20
+ this.addCollection(i, this.provider);
21
+ }), this.nuxt = l;
23
22
  }
24
- addCollection(t, e) {
25
- return Dt(t, e);
23
+ addCollection(s, e) {
24
+ return ut(s, e);
26
25
  }
27
- addIcon(t, e) {
28
- return ut(t, e);
26
+ addIcon(s, e) {
27
+ return Ue(s, e);
29
28
  }
30
- addAPIProvider(t, e) {
31
- return Tt(t, e);
29
+ addAPIProvider(s, e) {
30
+ return dt(s, e);
32
31
  }
33
- fetchIcon(t, e = { cache: "force-cache" }) {
34
- return new Promise((n, o) => {
35
- fetch(t, { ...this.fetchOptions, ...e }).catch((r) => o(r)).then((r) => r == null ? void 0 : r.text()).then((r) => n(r));
32
+ fetchIcon(s, e = { cache: "force-cache" }) {
33
+ return new Promise((n, l) => {
34
+ fetch(s, { ...this.fetchOptions, ...e }).catch((i) => l(i)).then((i) => i == null ? void 0 : i.text()).then((i) => n(i));
36
35
  });
37
36
  }
38
37
  }
39
- const so = {
40
- install(l, t) {
41
- const e = new Yt(t);
42
- l.config.globalProperties.$ds = e, l.provide(Ne, e);
38
+ const As = {
39
+ install(o, s) {
40
+ const e = new yt(s);
41
+ o.config.globalProperties.$ds = e, o.provide(Ae, e);
43
42
  }
44
- };
45
- function he(l, t, e) {
46
- return e ? Be(l, e) === Be(t, e) : qe(l, t);
47
- }
48
- function qe(l, t) {
49
- if (l === t)
50
- return !0;
51
- if (l && t && typeof l == "object" && typeof t == "object") {
52
- const e = Array.isArray(l), n = Array.isArray(t);
53
- let o, r, s;
54
- if (e && n) {
55
- if (r = l.length, r != t.length)
56
- return !1;
57
- for (o = r; o-- !== 0; )
58
- if (!qe(l[o], t[o]))
59
- return !1;
60
- return !0;
61
- }
62
- if (e != n)
63
- return !1;
64
- const b = l instanceof Date, c = t instanceof Date;
65
- if (b != c)
66
- return !1;
67
- if (b && c)
68
- return l.getTime() == t.getTime();
69
- const d = l instanceof RegExp, u = t instanceof RegExp;
70
- if (d != u)
71
- return !1;
72
- if (d && u)
73
- return l.toString() == t.toString();
74
- const p = Object.keys(l);
75
- if (r = p.length, r !== Object.keys(t).length)
76
- return !1;
77
- for (o = r; o-- !== 0; )
78
- if (!Object.prototype.hasOwnProperty.call(t, p[o]))
79
- return !1;
80
- for (o = r; o-- !== 0; )
81
- if (s = p[o], !qe(l[s], t[s]))
82
- return !1;
83
- return !0;
84
- }
85
- return l !== l && t !== t;
86
- }
87
- function Be(l, t) {
88
- if (l && Object.keys(l).length && t) {
89
- if (t.indexOf(".") === -1)
90
- return l[t];
91
- {
92
- const e = t.split(".");
93
- let n = l;
94
- for (let o = 0, r = e.length; o < r; ++o) {
95
- if (l == null)
96
- return null;
97
- n = n[e[o]];
98
- }
99
- return n;
100
- }
101
- } else
102
- return null;
103
- }
104
- function Jt(l, t) {
105
- let e = -1;
106
- if (t) {
107
- for (let n = 0; n < t.length; n++)
108
- if (he(t[n], l)) {
109
- e = n;
110
- break;
111
- }
112
- }
113
- return e;
114
- }
115
- function me(l, t) {
116
- if (l != null && t && t.length) {
117
- for (const e of t)
118
- if (he(l, e))
119
- return !0;
120
- }
121
- return !1;
122
- }
123
- function ee(l) {
124
- return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(a(l));
125
- }
126
- function Qt(l, t) {
127
- const e = Jt(l, t);
128
- return e > -1 ? t.filter((n, o) => o !== e) : t;
129
- }
130
- function el(l) {
131
- return typeof l == "string" || l instanceof String;
132
- }
133
- function nt(l) {
134
- var t, e;
135
- if (l)
136
- return (e = (t = l.match(
137
- /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
138
- )) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
139
- }
140
- function H(l, t) {
141
- const e = { [`${l}`]: !0 };
142
- return {
143
- bemCssClasses: i(() => Object.keys(t).reduce((o, r) => {
144
- const s = a(t[r]) || !1;
145
- if (!s)
146
- return o;
147
- if (r === "modifiers") {
148
- const b = Array.isArray(s) ? s : s.split(" ");
149
- return {
150
- ...o,
151
- ...b.reduce(
152
- (c, d) => ({
153
- ...c,
154
- [`${l}--${nt(d)}`]: !0
155
- }),
156
- {}
157
- )
158
- };
159
- } else
160
- return {
161
- ...o,
162
- [`${l}--${nt(r)}`]: s
163
- };
164
- }, e) || {})
165
- };
166
- }
167
- function xe(l) {
168
- const t = Xe(l, void 0), e = i(() => !ee(t));
169
- function n(o, r, s) {
170
- if (t != null && t.value) {
171
- const c = a(t.value)[o];
172
- return i({
173
- get() {
174
- return c == null ? void 0 : c.value;
175
- },
176
- set(d) {
177
- c.value = d;
178
- }
179
- });
180
- }
181
- const b = Nt(r, o);
182
- return i({
183
- get() {
184
- return b.value;
185
- },
186
- set(c) {
187
- s && s(`update:${o}`, c);
188
- }
189
- });
190
- }
191
- return {
192
- group: t,
193
- isInGroup: e,
194
- getGroupOrLocalRef: n
195
- };
196
- }
197
- const ft = "VV_BUTTON_GROUP", mt = "VV_RADIO_GROUP", bt = "VV_CHECK_GROUP", ht = "VV_ACCORDION_GROUP", tl = {
43
+ }, We = "VV_BUTTON_GROUP", qe = "VV_RADIO_GROUP", je = "VV_CHECK_GROUP", ze = "VV_ACCORDION_GROUP", _t = {
198
44
  name: String,
199
45
  title: String,
200
46
  content: String,
@@ -204,99 +50,88 @@ const ft = "VV_BUTTON_GROUP", mt = "VV_RADIO_GROUP", bt = "VV_CHECK_GROUP", ht =
204
50
  },
205
51
  modifiers: [String, Array],
206
52
  disabled: Boolean
207
- }, ll = ["update:modelValue"];
208
- function al(l, t) {
209
- const { group: e, isInGroup: n, getGroupOrLocalRef: o } = xe(ht), { title: r, content: s } = F(l), b = o("modelValue", l, t), c = o("disabled", l), d = o("collapse", l), u = o("modifiers", l);
53
+ }, St = ["update:modelValue"];
54
+ function Vt(o, s) {
55
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(ze), { title: i, content: r } = toRefs(o), f = l("modelValue", o, s), p = l("disabled", o), u = l("collapse", o), a = l("modifiers", o);
210
56
  return {
211
- modelValue: b,
212
- disabled: c,
57
+ modelValue: f,
58
+ disabled: p,
213
59
  isInGroup: n,
214
60
  group: e,
215
- collapse: d,
216
- modifiers: u,
217
- title: r,
218
- content: s
61
+ collapse: u,
62
+ modifiers: a,
63
+ title: i,
64
+ content: r
219
65
  };
220
66
  }
221
- const ol = ["id", "open"], nl = ["aria-controls", "aria-expanded"], sl = ["aria-hidden"], rl = {
67
+ const Ct = ["id", "open"], $t = ["aria-controls", "aria-expanded"], kt = ["aria-hidden"], At = {
222
68
  name: "VvAccordion"
223
- }, il = /* @__PURE__ */ D({
224
- ...rl,
225
- props: tl,
226
- emits: ll,
227
- setup(l, { emit: t }) {
228
- const e = l, n = dt(), o = e.name || (n == null ? void 0 : n.id) || ve(), {
229
- modifiers: r,
230
- title: s,
231
- content: b,
232
- disabled: c,
233
- collapse: d,
234
- modelValue: u,
235
- isInGroup: p
236
- } = al(e, t), v = G(!1), h = i({
237
- get: () => p.value ? d.value && Array.isArray(u.value) ? u.value.includes(o) : u.value === o : u.value === void 0 ? v.value : u.value,
238
- set: (f) => {
239
- if (p.value) {
240
- if (d.value && Array.isArray(u.value)) {
241
- if (f) {
242
- u.value.push(o);
69
+ }, Pt = /* @__PURE__ */ N({
70
+ ...At,
71
+ props: _t,
72
+ emits: St,
73
+ setup(o, { emit: s }) {
74
+ const e = o, n = useAttrs(), l = e.name || (n == null ? void 0 : n.id) || ne(), {
75
+ modifiers: i,
76
+ title: r,
77
+ content: f,
78
+ disabled: p,
79
+ collapse: u,
80
+ modelValue: a,
81
+ isInGroup: c
82
+ } = Vt(e, s), d = ref(!1), b = computed({
83
+ get: () => c.value ? u.value && Array.isArray(a.value) ? a.value.includes(l) : a.value === l : a.value === void 0 ? d.value : a.value,
84
+ set: (v) => {
85
+ if (c.value) {
86
+ if (u.value && Array.isArray(a.value)) {
87
+ if (v) {
88
+ a.value.push(l);
243
89
  return;
244
90
  }
245
- u.value = u.value.filter(
246
- (V) => V !== o
91
+ a.value = a.value.filter(
92
+ (V) => V !== l
247
93
  );
248
94
  return;
249
95
  }
250
- u.value = f ? o : null;
96
+ a.value = v ? l : null;
251
97
  return;
252
98
  }
253
- if (u.value === void 0 && typeof f == "boolean") {
254
- v.value = f;
99
+ if (a.value === void 0 && typeof v == "boolean") {
100
+ d.value = v;
255
101
  return;
256
102
  }
257
- u.value = f;
103
+ a.value = v;
258
104
  }
259
- }), { bemCssClasses: g } = H("vv-accordion", {
260
- modifiers: r,
261
- disabled: c
262
- }), y = zt(h);
263
- return (f, V) => (m(), _("details", {
264
- id: a(o),
265
- class: K(a(g)),
266
- open: a(h),
267
- onClick: V[0] || (V[0] = Ze((P) => a(y)(), ["prevent"]))
105
+ }), { bemCssClasses: g } = useBemModifiers("vv-accordion", {
106
+ modifiers: i,
107
+ disabled: p
108
+ }), y = useToggle(b);
109
+ return (v, V) => (m(), _("details", {
110
+ id: t(l),
111
+ class: U(t(g)),
112
+ open: t(b),
113
+ onClick: V[0] || (V[0] = Be((w) => t(y)(), ["prevent"]))
268
114
  }, [
269
- E("summary", {
270
- "aria-controls": a(o),
271
- "aria-expanded": a(h),
115
+ R("summary", {
116
+ "aria-controls": t(l),
117
+ "aria-expanded": t(b),
272
118
  class: "vv-collapse__summary"
273
119
  }, [
274
- A(f.$slots, "summary", W(te({ open: a(h) })), () => [
275
- X(L(a(s)), 1)
120
+ k(v.$slots, "summary", F(Y({ open: t(b) })), () => [
121
+ q(B(t(r)), 1)
276
122
  ])
277
- ], 8, nl),
278
- E("div", {
279
- "aria-hidden": !a(h),
123
+ ], 8, $t),
124
+ R("div", {
125
+ "aria-hidden": !t(b),
280
126
  class: "vv-collapse__content"
281
127
  }, [
282
- A(f.$slots, "details", W(te({ open: a(h) })), () => [
283
- X(L(a(b)), 1)
128
+ k(v.$slots, "details", F(Y({ open: t(b) })), () => [
129
+ q(B(t(f)), 1)
284
130
  ])
285
- ], 8, sl)
286
- ], 10, ol));
131
+ ], 8, kt)
132
+ ], 10, Ct));
287
133
  }
288
- });
289
- function He(l) {
290
- if (Object.keys(l).some(
291
- (t) => t !== "key" && !$e(l[t])
292
- ))
293
- throw Error("One or more groupState props aren't ref.");
294
- xt(
295
- l.key,
296
- i(() => l)
297
- );
298
- }
299
- const ul = {
134
+ }), wt = {
300
135
  modelValue: [String, Array],
301
136
  items: { type: Array, default: () => [] },
302
137
  collapse: Boolean,
@@ -306,235 +141,263 @@ const ul = {
306
141
  default: ""
307
142
  },
308
143
  disabled: Boolean
309
- }, dl = ["update:modelValue"], cl = {
144
+ }, It = ["update:modelValue"], Et = {
310
145
  name: "VvAccordionGroup"
311
- }, ro = /* @__PURE__ */ D({
312
- ...cl,
313
- props: ul,
314
- emits: dl,
315
- setup(l, { emit: t }) {
316
- const e = l, { disabled: n, collapse: o, modifiers: r, itemModifiers: s, items: b } = F(e);
317
- Ye(() => {
318
- typeof e.modelValue == "string" && o.value && console.warn(
146
+ }, Ps = /* @__PURE__ */ N({
147
+ ...Et,
148
+ props: wt,
149
+ emits: It,
150
+ setup(o, { emit: s }) {
151
+ const e = o, { disabled: n, collapse: l, modifiers: i, itemModifiers: r, items: f } = toRefs(e);
152
+ watchEffect(() => {
153
+ typeof e.modelValue == "string" && l.value && console.warn(
319
154
  "[VvAccordionGroup]: modelValue is a string but collapse is true."
320
155
  );
321
156
  });
322
- const c = G([]), d = i({
157
+ const p = ref([]), u = computed({
323
158
  get: () => {
324
- var v;
325
- return e.modelValue !== void 0 ? o.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : o.value ? c.value : (v = c.value) == null ? void 0 : v[0];
159
+ var d;
160
+ return e.modelValue !== void 0 ? l.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : l.value ? p.value : (d = p.value) == null ? void 0 : d[0];
326
161
  },
327
- set: (v) => {
162
+ set: (d) => {
328
163
  if (e.modelValue !== void 0)
329
- return (Array.isArray(e.modelValue) || o.value) && !Array.isArray(v) && (v = [v]), t("update:modelValue", v);
330
- c.value = Array.isArray(v) ? v : [v];
164
+ return (Array.isArray(e.modelValue) || l.value) && !Array.isArray(d) && (d = [d]), s("update:modelValue", d);
165
+ p.value = Array.isArray(d) ? d : [d];
331
166
  }
332
- });
333
- He({
334
- key: ht,
335
- modelValue: d,
167
+ }), a = {
168
+ key: ze,
169
+ modelValue: u,
336
170
  disabled: n,
337
- collapse: o,
338
- modifiers: s
339
- });
340
- const { bemCssClasses: p } = H("vv-accordion-group", {
341
- modifiers: r,
171
+ collapse: l,
172
+ modifiers: r
173
+ };
174
+ useProvideGroupState(a);
175
+ const { bemCssClasses: c } = useBemModifiers("vv-accordion-group", {
176
+ modifiers: i,
342
177
  disabled: n
343
178
  });
344
- return (v, h) => (m(), _("div", {
345
- class: K(a(p))
179
+ return (d, b) => (m(), _("div", {
180
+ class: U(t(c))
346
181
  }, [
347
- A(v.$slots, "default", {}, () => [
348
- (m(!0), _(ge, null, Ce(a(b), (g) => (m(), T(il, R({
182
+ k(d.$slots, "default", {}, () => [
183
+ (m(!0), _(de, null, fe(t(f), (g) => (m(), D(Pt, O({
349
184
  key: g.title
350
185
  }, {
351
186
  name: g.name,
352
187
  title: g.title,
353
188
  content: g.content
354
189
  }), {
355
- header: we((y) => [
356
- A(v.$slots, `header::${g.name}`, W(te(y)))
190
+ header: ge((y) => [
191
+ k(d.$slots, `header::${g.name}`, F(Y(y)))
357
192
  ]),
358
- details: we((y) => [
359
- A(v.$slots, `details::${g.name}`, W(te(y)))
193
+ details: ge((y) => [
194
+ k(d.$slots, `details::${g.name}`, F(Y(y)))
360
195
  ]),
361
196
  _: 2
362
197
  }, 1040))), 128))
363
198
  ])
364
199
  ], 2));
365
200
  }
366
- }), Pe = {
201
+ }), ye = {
367
202
  valid: Boolean,
368
203
  validLabel: [String, Array]
369
- }, Ie = {
204
+ }, _e = {
370
205
  invalid: Boolean,
371
206
  invalidLabel: [String, Array]
372
- }, et = {
207
+ }, De = {
373
208
  loading: Boolean,
374
209
  loadingLabel: String
375
- }, ye = {
210
+ }, ce = {
376
211
  disabled: Boolean
377
- }, Oe = {
212
+ }, Se = {
378
213
  readonly: Boolean
379
- }, pe = {
214
+ }, re = {
380
215
  modifiers: [String, Array]
381
- }, Ee = {
216
+ }, Ve = {
382
217
  hintLabel: { type: String, default: "" }
383
- }, Me = {
218
+ }, Pe = {
384
219
  options: {
385
220
  type: Array,
386
221
  default: () => []
387
222
  },
388
223
  labelKey: { type: [String, Function], default: "label" },
389
224
  valueKey: { type: [String, Function], default: "value" }
390
- }, vl = {
225
+ }, Rt = {
391
226
  count: {
392
227
  type: [Boolean, String],
393
228
  default: !1,
394
- validator: (l) => [!0, !1, "limit", "countdown"].includes(l)
229
+ validator: (o) => [!0, !1, "limit", "countdown"].includes(o)
395
230
  }
396
- }, pl = {
231
+ }, Ot = {
397
232
  debounce: [Number, String]
398
- }, st = {
233
+ }, He = {
399
234
  LEFT: "left",
400
235
  RIGHT: "right"
401
- }, tt = {
236
+ }, Te = {
402
237
  icon: { type: [String, Object] },
403
238
  iconPosition: {
404
239
  type: String,
405
- validation: (l) => Object.values(st).includes(l),
406
- default: st.RIGHT
240
+ validation: (o) => Object.values(He).includes(o),
241
+ default: He.RIGHT
407
242
  }
408
- }, Ge = {
243
+ }, we = {
409
244
  tabindex: { type: [String, Number], default: 0 }
410
- }, lt = {
245
+ }, Le = {
411
246
  floating: Boolean
412
- }, Ue = {
247
+ }, Ie = {
413
248
  unselectable: { type: Boolean, default: !0 }
414
- }, Re = {
249
+ }, Ce = {
415
250
  id: [String, Number],
416
251
  name: { type: String, required: !0 }
417
- }, gt = {
252
+ }, Xe = {
418
253
  autofocus: Boolean
419
- }, yt = {
254
+ }, Ye = {
420
255
  autocomplete: { type: String, default: "off" }
421
- }, _t = {
422
- ...Re,
423
- ...gt,
424
- ...yt,
425
- ...Ge,
256
+ }, Je = {
257
+ ...Ce,
258
+ ...Xe,
259
+ ...Ye,
260
+ ...we,
261
+ ...ce,
262
+ ...Se,
426
263
  ...ye,
427
- ...Oe,
428
- ...Pe,
429
- ...Ie,
430
- ...Ee,
431
- ...et,
432
- ...pe,
433
- ...vl,
434
- ...pl,
435
- ...tt,
436
- ...lt,
264
+ ..._e,
265
+ ...Ve,
266
+ ...De,
267
+ ...re,
268
+ ...Rt,
269
+ ...Ot,
270
+ ...Te,
271
+ ...Le,
437
272
  minlength: Number,
438
273
  maxlength: Number,
439
274
  placeholder: String,
440
275
  required: Boolean,
441
276
  label: String
442
- }, St = {
443
- ...Re,
444
- ...Ge,
445
- ...Pe,
446
- ...Ie,
447
- ...Ee,
277
+ }, Qe = {
278
+ ...Ce,
279
+ ...we,
448
280
  ...ye,
449
- ...Oe,
281
+ ..._e,
282
+ ...Ve,
283
+ ...ce,
284
+ ...Se,
450
285
  value: [String, Number, Boolean],
451
286
  modelValue: [Object, Number, Boolean, String],
452
287
  label: String
453
- }, Vt = {
454
- ...Pe,
455
- ...Ie,
456
- ...Me,
457
- ...Ee,
288
+ }, Ze = {
458
289
  ...ye,
459
- ...Oe,
290
+ ..._e,
291
+ ...Pe,
292
+ ...Ve,
293
+ ...ce,
294
+ ...Se,
460
295
  modelValue: [String, Array],
461
296
  label: String,
462
297
  name: { type: String, required: !0 },
463
298
  vertical: Boolean
464
- }, fl = {
465
- ...pe,
299
+ }, Bt = {
300
+ ...re,
466
301
  value: [String, Number]
467
- }, ml = {
302
+ }, Dt = {
468
303
  name: "VvBadge"
469
- }, io = /* @__PURE__ */ D({
470
- ...ml,
471
- props: fl,
472
- setup(l) {
473
- const t = l, { bemCssClasses: e } = H("vv-badge", {
474
- modifiers: t.modifiers
304
+ }, ws = /* @__PURE__ */ N({
305
+ ...Dt,
306
+ props: Bt,
307
+ setup(o) {
308
+ const s = o, { bemCssClasses: e } = useBemModifiers("vv-badge", {
309
+ modifiers: s.modifiers
475
310
  });
476
- return (n, o) => (m(), _("span", {
477
- class: K(a(e)),
311
+ return (n, l) => (m(), _("span", {
312
+ class: U(t(e)),
478
313
  role: "status"
479
314
  }, [
480
- A(n.$slots, "default", {}, () => [
481
- X(L(n.value), 1)
315
+ k(n.$slots, "default", {}, () => [
316
+ q(B(n.value), 1)
482
317
  ])
483
318
  ], 2));
484
319
  }
485
- }), bl = {
486
- ...pe,
320
+ });
321
+ function Tt(o, s) {
322
+ const e = { [`${o}`]: !0 };
323
+ return {
324
+ bemCssClasses: computed(() => Object.keys(s).reduce((l, i) => {
325
+ const r = unref(s[i]) || !1;
326
+ if (!r)
327
+ return l;
328
+ if (i === "modifiers") {
329
+ const f = Array.isArray(r) ? r : r.split(" ");
330
+ return {
331
+ ...l,
332
+ ...f.reduce(
333
+ (p, u) => ({
334
+ ...p,
335
+ [`${o}--${kebabCase(u)}`]: !0
336
+ }),
337
+ {}
338
+ )
339
+ };
340
+ } else
341
+ return {
342
+ ...l,
343
+ [`${o}--${kebabCase(i)}`]: r
344
+ };
345
+ }, e) || {})
346
+ };
347
+ }
348
+ const Lt = {
349
+ ...re,
487
350
  routes: Array
488
- }, hl = { class: "vv-breadcrumb__list" }, gl = ["content"], yl = {
351
+ }, Mt = { class: "vv-breadcrumb__list" }, Nt = ["content"], Ht = {
489
352
  name: "VvBreadcrumb"
490
- }, uo = /* @__PURE__ */ D({
491
- ...yl,
492
- props: bl,
493
- setup(l) {
494
- const t = l, { bemCssClasses: e } = H("vv-breadcrumb", {
495
- modifiers: t.modifiers
353
+ }, Is = /* @__PURE__ */ N({
354
+ ...Ht,
355
+ props: Lt,
356
+ setup(o) {
357
+ const s = o, { bemCssClasses: e } = Tt("vv-breadcrumb", {
358
+ modifiers: s.modifiers
496
359
  });
497
- return (n, o) => (m(), _("nav", {
498
- class: K(a(e)),
360
+ return (n, l) => (m(), _("nav", {
361
+ class: U(t(e)),
499
362
  "aria-label": "breadcrumbs"
500
363
  }, [
501
- E("ol", hl, [
502
- (m(!0), _(ge, null, Ce(n.routes, (r, s) => {
503
- var b, c, d, u;
364
+ R("ol", Mt, [
365
+ (m(!0), _(de, null, fe(n.routes, (i, r) => {
366
+ var f, p, u, a;
504
367
  return m(), _("li", {
505
- key: `${r.label}-${s}`,
506
- class: K({
507
- "vv-breadcrumb__item": s < Number((b = n.routes) == null ? void 0 : b.length) - 1,
508
- "vv-breadcrumb__item-active": s === Number((c = n.routes) == null ? void 0 : c.length) - 1
368
+ key: `${i.label}-${r}`,
369
+ class: U({
370
+ "vv-breadcrumb__item": r < Number((f = n.routes) == null ? void 0 : f.length) - 1,
371
+ "vv-breadcrumb__item-active": r === Number((p = n.routes) == null ? void 0 : p.length) - 1
509
372
  }),
510
373
  itemprop: "itemListElement",
511
374
  itemtype: "https://schema.org/ListItem",
512
375
  itemscope: ""
513
376
  }, [
514
- (m(), T(ct(r.to ? "router-link" : r.href ? "a" : "span"), R(r, {
377
+ (m(), D(Fe(i.to ? "router-link" : i.href ? "a" : "span"), O(i, {
515
378
  class: {
516
- "vv-breadcrumb__link": s < Number((d = n.routes) == null ? void 0 : d.length) - 1
379
+ "vv-breadcrumb__link": r < Number((u = n.routes) == null ? void 0 : u.length) - 1
517
380
  },
518
- "aria-current": s === Number((u = n.routes) == null ? void 0 : u.length) - 1 ? "page" : void 0,
381
+ "aria-current": r === Number((a = n.routes) == null ? void 0 : a.length) - 1 ? "page" : void 0,
519
382
  itemprop: "item"
520
383
  }), {
521
- default: we(() => [
522
- A(n.$slots, "label", W(te({ route: r, index: s })), () => [
523
- X(L(r.label), 1)
384
+ default: ge(() => [
385
+ k(n.$slots, "label", F(Y({ route: i, index: r })), () => [
386
+ q(B(i.label), 1)
524
387
  ])
525
388
  ]),
526
389
  _: 2
527
390
  }, 1040, ["class", "aria-current"])),
528
- E("meta", {
391
+ R("meta", {
529
392
  itemprop: "position",
530
- content: `${s + 1}`
531
- }, null, 8, gl)
393
+ content: `${r + 1}`
394
+ }, null, 8, Nt)
532
395
  ], 2);
533
396
  }), 128))
534
397
  ])
535
398
  ], 2));
536
399
  }
537
- }), _l = {
400
+ }), xt = {
538
401
  color: String,
539
402
  width: {
540
403
  type: [String, Number]
@@ -565,64 +428,64 @@ const ul = {
565
428
  modifiers: {
566
429
  type: [String, Array]
567
430
  }
568
- }, Sl = {
431
+ }, Gt = {
569
432
  name: "VvIcon"
570
- }, U = /* @__PURE__ */ D({
571
- ...Sl,
572
- props: _l,
573
- setup(l) {
574
- const t = l, e = G(!0), { modifiers: n } = F(t), o = Xe(Ne), { bemCssClasses: r } = H("vv-icon", {
433
+ }, x = /* @__PURE__ */ N({
434
+ ...Gt,
435
+ props: xt,
436
+ setup(o) {
437
+ const s = o, e = ref(!0), { modifiers: n } = toRefs(s), l = inject(Ae), { bemCssClasses: i } = useBemModifiers("vv-icon", {
575
438
  modifiers: n
576
- }), s = i(() => t.provider || (o == null ? void 0 : o.provider)), b = i(() => {
577
- const u = t.name ?? "", p = `@${s.value}:${t.prefix}:${t.name}`;
578
- return De(u) ? u : De(p) ? p : (o == null ? void 0 : o.iconsCollections.find((v) => {
579
- const h = `@${s.value}:${v.prefix}:${u}`;
580
- if (De(h))
581
- return h;
582
- })) || u;
439
+ }), r = computed(() => s.provider || (l == null ? void 0 : l.provider)), f = computed(() => {
440
+ const a = s.name ?? "", c = `@${r.value}:${s.prefix}:${s.name}`;
441
+ return $e(a) ? a : $e(c) ? c : (l == null ? void 0 : l.iconsCollections.find((d) => {
442
+ const b = `@${r.value}:${d.prefix}:${a}`;
443
+ if ($e(b))
444
+ return b;
445
+ })) || a;
583
446
  });
584
- function c(u) {
585
- let p = null;
447
+ function p(a) {
448
+ let c = null;
586
449
  if (typeof window > "u") {
587
450
  const { JSDOM: y } = require("jsdom");
588
- p = new y().window;
451
+ c = new y().window;
589
452
  }
590
- return (p ? new p.DOMParser() : new window.DOMParser()).parseFromString(u, "text/html").querySelector("svg");
453
+ return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(a, "text/html").querySelector("svg");
591
454
  }
592
- function d(u) {
593
- const p = c(u), v = (p == null ? void 0 : p.innerHTML.trim()) || "";
594
- p && v && ut(`@${s.value}:${t.prefix}:${t.name}`, {
595
- body: v,
596
- height: p.viewBox.baseVal.height,
597
- width: p.viewBox.baseVal.width
455
+ function u(a) {
456
+ const c = p(a), d = (c == null ? void 0 : c.innerHTML.trim()) || "";
457
+ c && d && Ue(`@${r.value}:${s.prefix}:${s.name}`, {
458
+ body: d,
459
+ height: c.viewBox.baseVal.height,
460
+ width: c.viewBox.baseVal.width
598
461
  });
599
462
  }
600
- return o && (t.src && !De(`@${s.value}:${t.prefix}:${t.name}`) ? (e.value = !1, o.fetchIcon(t.src).then((u) => {
601
- u && (d(u), e.value = !0);
602
- }).catch((u) => {
603
- throw new Error(`During fetch icon: ${u == null ? void 0 : u.message}`);
604
- })) : t.svg && d(t.svg)), (u, p) => e.value ? (m(), T(a(Bt), R({
463
+ return l && (s.src && !$e(`@${r.value}:${s.prefix}:${s.name}`) ? (e.value = !1, l.fetchIcon(s.src).then((a) => {
464
+ a && (u(a), e.value = !0);
465
+ }).catch((a) => {
466
+ throw new Error(`During fetch icon: ${a == null ? void 0 : a.message}`);
467
+ })) : s.svg && u(s.svg)), (a, c) => t(e) ? (m(), D(t(ct), O({
605
468
  key: 0,
606
- class: a(r)
469
+ class: t(i)
607
470
  }, {
608
- inline: u.inline,
609
- width: u.width,
610
- height: u.height,
611
- horizontalFlip: u.horizontalFlip,
612
- verticalFlip: u.verticalFlip,
613
- flip: u.flip,
614
- rotate: u.rotate,
615
- color: u.color,
616
- onLoad: u.onLoad,
617
- icon: a(b)
471
+ inline: a.inline,
472
+ width: a.width,
473
+ height: a.height,
474
+ horizontalFlip: a.horizontalFlip,
475
+ verticalFlip: a.verticalFlip,
476
+ flip: a.flip,
477
+ rotate: a.rotate,
478
+ color: a.color,
479
+ onLoad: a.onLoad,
480
+ icon: t(f)
618
481
  }), null, 16, ["class"])) : I("", !0);
619
482
  }
620
483
  });
621
- var Ve = /* @__PURE__ */ ((l) => (l.left = "left", l.right = "right", l.top = "top", l.bottom = "bottom", l))(Ve || {}), $t = /* @__PURE__ */ ((l) => (l.button = "button", l.submit = "submit", l.reset = "reset", l))($t || {}), de = /* @__PURE__ */ ((l) => (l.nuxtLink = "nuxt-link", l.routerLink = "router-link", l.a = "a", l.button = "button", l))(de || {}), Ct = /* @__PURE__ */ ((l) => (l._blank = "_blank", l._self = "_self", l._parent = "_parent", l._top = "_top", l))(Ct || {});
622
- const Vl = ["update:modelValue"], $l = {
623
- ...pe,
624
- ...ye,
625
- ...Ue,
484
+ var me = /* @__PURE__ */ ((o) => (o.left = "left", o.right = "right", o.top = "top", o.bottom = "bottom", o))(me || {}), et = /* @__PURE__ */ ((o) => (o.button = "button", o.submit = "submit", o.reset = "reset", o))(et || {}), ae = /* @__PURE__ */ ((o) => (o.nuxtLink = "nuxt-link", o.routerLink = "router-link", o.a = "a", o.button = "button", o))(ae || {}), tt = /* @__PURE__ */ ((o) => (o._blank = "_blank", o._self = "_self", o._parent = "_parent", o._top = "_top", o))(tt || {});
485
+ const Ut = ["update:modelValue"], Ft = {
486
+ ...re,
487
+ ...ce,
488
+ ...Ie,
626
489
  icon: {
627
490
  type: [String, Object],
628
491
  default: ""
@@ -630,7 +493,7 @@ const Vl = ["update:modelValue"], $l = {
630
493
  iconPosition: {
631
494
  type: String,
632
495
  default: "left",
633
- validator: (l) => l in Ve
496
+ validator: (o) => o in me
634
497
  },
635
498
  label: [String, Number],
636
499
  loading: Boolean,
@@ -645,7 +508,7 @@ const Vl = ["update:modelValue"], $l = {
645
508
  href: String,
646
509
  target: {
647
510
  type: String,
648
- validator: (l) => l in Ct
511
+ validator: (o) => o in tt
649
512
  },
650
513
  active: Boolean,
651
514
  pressed: Boolean,
@@ -656,7 +519,7 @@ const Vl = ["update:modelValue"], $l = {
656
519
  type: {
657
520
  type: String,
658
521
  default: "button",
659
- validator: (l) => l in $t
522
+ validator: (o) => o in et
660
523
  },
661
524
  toggle: {
662
525
  type: Boolean,
@@ -664,306 +527,306 @@ const Vl = ["update:modelValue"], $l = {
664
527
  },
665
528
  modelValue: String
666
529
  };
667
- function Cl(l, t) {
668
- var f;
669
- const { group: e, isInGroup: n, getGroupOrLocalRef: o } = xe(ft), {
670
- iconPosition: r,
671
- icon: s,
672
- label: b,
673
- pressed: c,
674
- modifiers: d
675
- } = F(l), u = o("modelValue", l, t), p = o("disabled", l), v = o("toggle", l), h = o(
530
+ function Kt(o, s) {
531
+ var v;
532
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(We), {
533
+ iconPosition: i,
534
+ icon: r,
535
+ label: f,
536
+ pressed: p,
537
+ modifiers: u
538
+ } = toRefs(o), a = l("modelValue", o, s), c = l("disabled", o), d = l("toggle", o), b = l(
676
539
  "unselectable",
677
- l
678
- ), g = ((f = e == null ? void 0 : e.value) == null ? void 0 : f.multiple) ?? G(!1), y = i(() => {
679
- var $;
680
- const V = d != null && d.value ? Array.isArray(d.value) ? d.value : [d.value] : [], P = ($ = e == null ? void 0 : e.value.itemModifiers) != null && $.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
681
- return [...V, ...P];
540
+ o
541
+ ), g = ((v = e == null ? void 0 : e.value) == null ? void 0 : v.multiple) ?? ref(!1), y = computed(() => {
542
+ var C;
543
+ const V = u != null && u.value ? Array.isArray(u.value) ? u.value : [u.value] : [], w = (C = e == null ? void 0 : e.value.itemModifiers) != null && C.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : [e.value.itemModifiers.value] : [];
544
+ return [...V, ...w];
682
545
  });
683
546
  return {
684
547
  group: e,
685
548
  isInGroup: n,
686
- modelValue: u,
687
- disabled: p,
688
- toggle: v,
689
- unselectable: h,
549
+ modelValue: a,
550
+ disabled: c,
551
+ toggle: d,
552
+ unselectable: b,
690
553
  multiple: g,
691
554
  modifiers: y,
692
- pressed: c,
693
- iconPosition: r,
694
- icon: s,
695
- label: b
555
+ pressed: p,
556
+ iconPosition: i,
557
+ icon: r,
558
+ label: f
696
559
  };
697
560
  }
698
- const Al = {
561
+ const Wt = {
699
562
  key: 1,
700
563
  class: "vv-button__label"
701
- }, kl = {
564
+ }, qt = {
702
565
  key: 1,
703
566
  class: "vv-button__label"
704
- }, wl = {
567
+ }, jt = {
705
568
  name: "VvButton"
706
- }, co = /* @__PURE__ */ D({
707
- ...wl,
708
- props: $l,
709
- emits: Vl,
710
- setup(l, { emit: t }) {
711
- const e = l, n = dt(), o = ce(), r = (n == null ? void 0 : n.name) || ve(), {
712
- modifiers: s,
713
- iconPosition: b,
714
- icon: c,
715
- label: d,
716
- modelValue: u,
717
- disabled: p,
718
- toggle: v,
719
- unselectable: h
720
- } = Cl(e, t), g = Xe(Ne), y = i(() => {
569
+ }, Es = /* @__PURE__ */ N({
570
+ ...jt,
571
+ props: Ft,
572
+ emits: Ut,
573
+ setup(o, { emit: s }) {
574
+ const e = o, n = useAttrs(), l = useSlots(), i = (n == null ? void 0 : n.name) || ne(), {
575
+ modifiers: r,
576
+ iconPosition: f,
577
+ icon: p,
578
+ label: u,
579
+ modelValue: a,
580
+ disabled: c,
581
+ toggle: d,
582
+ unselectable: b
583
+ } = Kt(e, s), g = inject(Ae), y = computed(() => {
721
584
  switch (!0) {
722
- case p.value:
723
- return de.button;
585
+ case c.value:
586
+ return ae.button;
724
587
  case e.to !== void 0:
725
- return g != null && g.nuxt ? de.nuxtLink : de.routerLink;
588
+ return g != null && g.nuxt ? ae.nuxtLink : ae.routerLink;
726
589
  case e.href !== void 0:
727
- return de.a;
590
+ return ae.a;
728
591
  default:
729
- return de.button;
592
+ return ae.button;
730
593
  }
731
- }), f = i(() => v.value ? Array.isArray(u.value) ? me(r, u.value) : he(r, u.value) : e.pressed), { bemCssClasses: V } = H("vv-button", {
732
- modifiers: s,
594
+ }), v = computed(() => d.value ? Array.isArray(a.value) ? contains(i, a.value) : equals(i, a.value) : e.pressed), { bemCssClasses: V } = useBemModifiers("vv-button", {
595
+ modifiers: r,
733
596
  active: e.active,
734
- pressed: f,
735
- disabled: p,
736
- reverse: i(
737
- () => [Ve.right, Ve.bottom].includes(
738
- b.value
597
+ pressed: v,
598
+ disabled: c,
599
+ reverse: computed(
600
+ () => [me.right, me.bottom].includes(
601
+ f.value
739
602
  )
740
603
  ),
741
- column: i(
742
- () => [Ve.top, Ve.bottom].includes(
743
- b.value
604
+ column: computed(
605
+ () => [me.top, me.bottom].includes(
606
+ f.value
744
607
  )
745
608
  ),
746
- iconOnly: i(
747
- () => (c == null ? void 0 : c.value) && !(d != null && d.value) && !o.default
609
+ iconOnly: computed(
610
+ () => (p == null ? void 0 : p.value) && !(u != null && u.value) && !l.default
748
611
  )
749
- }), P = i(
750
- () => typeof (c == null ? void 0 : c.value) == "string" ? { name: c == null ? void 0 : c.value } : c == null ? void 0 : c.value
751
- ), $ = i(() => {
752
- const C = {
612
+ }), w = computed(
613
+ () => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
614
+ ), C = computed(() => {
615
+ const $ = {
753
616
  class: V.value,
754
- "aria-pressed": f.value ? !0 : void 0
617
+ "aria-pressed": v.value ? !0 : void 0
755
618
  };
756
619
  switch (y.value) {
757
- case de.a:
620
+ case ae.a:
758
621
  return {
759
- ...C,
622
+ ...$,
760
623
  role: "button",
761
624
  href: e.href,
762
625
  target: e.target,
763
626
  rel: e.rel
764
627
  };
765
- case de.routerLink:
766
- case de.nuxtLink:
628
+ case ae.routerLink:
629
+ case ae.nuxtLink:
767
630
  return {
768
- ...C,
631
+ ...$,
769
632
  role: "button",
770
633
  to: e.to,
771
634
  target: e.target
772
635
  };
773
636
  default:
774
637
  return {
775
- ...C,
638
+ ...$,
776
639
  type: e.type,
777
- disabled: p.value
640
+ disabled: c.value
778
641
  };
779
642
  }
780
- }), x = () => {
781
- if (v.value) {
782
- if (Array.isArray(u.value)) {
783
- if (me(r, u.value)) {
784
- h.value && (u.value = u.value.filter(
785
- (C) => C !== r
643
+ }), M = () => {
644
+ if (d.value) {
645
+ if (Array.isArray(a.value)) {
646
+ if (contains(i, a.value)) {
647
+ b.value && (a.value = a.value.filter(
648
+ ($) => $ !== i
786
649
  ));
787
650
  return;
788
651
  }
789
- u.value.push(r);
652
+ a.value.push(i);
790
653
  return;
791
654
  }
792
- if (he(r, u.value) && h.value) {
793
- u.value = void 0;
655
+ if (equals(i, a.value) && b.value) {
656
+ a.value = void 0;
794
657
  return;
795
658
  }
796
- u.value = r;
659
+ a.value = i;
797
660
  }
798
661
  };
799
- return (C, M) => (m(), T(ct(a(y)), R(a($), { onClickPassive: x }), {
800
- default: we(() => [
801
- A(C.$slots, "default", {}, () => [
802
- C.loading ? A(C.$slots, "loading", { key: 0 }, () => [
803
- C.loadingIcon ? (m(), T(U, {
662
+ return ($, H) => (m(), D(Fe(t(y)), O(t(C), { onClickPassive: M }), {
663
+ default: ge(() => [
664
+ k($.$slots, "default", {}, () => [
665
+ $.loading ? k($.$slots, "loading", { key: 0 }, () => [
666
+ $.loadingIcon ? (m(), D(x, {
804
667
  key: 0,
805
668
  class: "vv-button__loading-icon",
806
- name: C.loadingIcon
669
+ name: $.loadingIcon
807
670
  }, null, 8, ["name"])) : I("", !0),
808
- C.loadingLabel ? (m(), _("span", Al, L(C.loadingLabel), 1)) : I("", !0)
809
- ]) : (m(), _(ge, { key: 1 }, [
810
- A(C.$slots, "before"),
811
- a(c) ? (m(), T(U, R({
671
+ $.loadingLabel ? (m(), _("span", Wt, B($.loadingLabel), 1)) : I("", !0)
672
+ ]) : (m(), _(de, { key: 1 }, [
673
+ k($.$slots, "before"),
674
+ t(p) ? (m(), D(x, O({
812
675
  key: 0,
813
676
  class: "vv-button__icon"
814
- }, a(P)), null, 16)) : I("", !0),
815
- a(d) ? (m(), _("span", kl, [
816
- A(C.$slots, "label", {}, () => [
817
- X(L(a(d)), 1)
677
+ }, t(w)), null, 16)) : I("", !0),
678
+ t(u) ? (m(), _("span", qt, [
679
+ k($.$slots, "label", {}, () => [
680
+ q(B(t(u)), 1)
818
681
  ])
819
682
  ])) : I("", !0),
820
- A(C.$slots, "after")
683
+ k($.$slots, "after")
821
684
  ], 64))
822
685
  ])
823
686
  ]),
824
687
  _: 3
825
688
  }, 16));
826
689
  }
827
- }), Pl = {
828
- ...pe,
829
- ...ye,
830
- ...Ue,
690
+ }), zt = {
691
+ ...re,
692
+ ...ce,
693
+ ...Ie,
831
694
  itemModifiers: { type: [String, Array], default: void 0 },
832
695
  toggle: { type: Boolean, default: !1 },
833
696
  multiple: { type: Boolean, default: !1 },
834
697
  modelValue: { type: [String, Array], default: void 0 }
835
- }, Il = ["update:modelValue"], Ol = {
698
+ }, Xt = ["update:modelValue"], Yt = {
836
699
  name: "VvButtonGroup"
837
- }, vo = /* @__PURE__ */ D({
838
- ...Ol,
839
- props: Pl,
840
- emits: Il,
841
- setup(l, { emit: t }) {
842
- const e = l, {
700
+ }, Rs = /* @__PURE__ */ N({
701
+ ...Yt,
702
+ props: zt,
703
+ emits: Xt,
704
+ setup(o, { emit: s }) {
705
+ const e = o, {
843
706
  disabled: n,
844
- toggle: o,
845
- modifiers: r,
846
- multiple: s,
847
- unselectable: b,
848
- itemModifiers: c
849
- } = F(e);
850
- Ye(() => {
851
- typeof e.modelValue == "string" && s.value && console.warn(
707
+ toggle: l,
708
+ modifiers: i,
709
+ multiple: r,
710
+ unselectable: f,
711
+ itemModifiers: p
712
+ } = toRefs(e);
713
+ watchEffect(() => {
714
+ typeof e.modelValue == "string" && r.value && console.warn(
852
715
  "[VvButtonGroup]: modelValue is a string but multiple is true."
853
716
  );
854
717
  });
855
- const d = i({
856
- get: () => s.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
857
- set: (v) => (v !== void 0 && (Array.isArray(e.modelValue) || s.value) && !Array.isArray(v) && (v = [v]), t("update:modelValue", v))
858
- });
859
- He({
860
- key: ft,
861
- modelValue: d,
718
+ const u = computed({
719
+ get: () => r.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
720
+ set: (d) => (d !== void 0 && (Array.isArray(e.modelValue) || r.value) && !Array.isArray(d) && (d = [d]), s("update:modelValue", d))
721
+ }), a = {
722
+ key: We,
723
+ modelValue: u,
862
724
  disabled: n,
863
- toggle: o,
864
- multiple: s,
865
- unselectable: b,
866
- itemModifiers: c
867
- });
868
- const { bemCssClasses: p } = H("vv-button-group", {
869
- modifiers: r
725
+ toggle: l,
726
+ multiple: r,
727
+ unselectable: f,
728
+ itemModifiers: p
729
+ };
730
+ useProvideGroupState(a);
731
+ const { bemCssClasses: c } = useBemModifiers("vv-button-group", {
732
+ modifiers: i
870
733
  });
871
- return (v, h) => (m(), _("div", {
872
- class: K(a(p)),
734
+ return (d, b) => (m(), _("div", {
735
+ class: U(t(c)),
873
736
  role: "group"
874
737
  }, [
875
- A(v.$slots, "default")
738
+ k(d.$slots, "default")
876
739
  ], 2));
877
740
  }
878
- }), El = {
741
+ }), Jt = {
879
742
  title: String,
880
743
  modifiers: [String, Array]
881
- }, Rl = {
744
+ }, Qt = {
882
745
  key: 0,
883
746
  class: "vv-card__header"
884
- }, Ll = {
747
+ }, Zt = {
885
748
  key: 1,
886
749
  class: "vv-card__content"
887
- }, Dl = {
750
+ }, eo = {
888
751
  key: 2,
889
752
  class: "vv-card__footer"
890
- }, Tl = {
753
+ }, to = {
891
754
  name: "VvCard"
892
- }, po = /* @__PURE__ */ D({
893
- ...Tl,
894
- props: El,
895
- setup(l) {
896
- const t = l, { bemCssClasses: e } = H("vv-card", {
897
- modifiers: t.modifiers
755
+ }, Os = /* @__PURE__ */ N({
756
+ ...to,
757
+ props: Jt,
758
+ setup(o) {
759
+ const s = o, { bemCssClasses: e } = useBemModifiers("vv-card", {
760
+ modifiers: s.modifiers
898
761
  });
899
- return (n, o) => (m(), _("article", {
900
- class: K(a(e))
762
+ return (n, l) => (m(), _("article", {
763
+ class: U(t(e))
901
764
  }, [
902
- n.$slots.header || n.title ? (m(), _("header", Rl, [
903
- A(n.$slots, "header", {}, () => [
904
- X(L(n.title), 1)
765
+ n.$slots.header || n.title ? (m(), _("header", Qt, [
766
+ k(n.$slots, "header", {}, () => [
767
+ q(B(n.title), 1)
905
768
  ])
906
769
  ])) : I("", !0),
907
- A(n.$slots, "default"),
908
- n.$slots.content ? (m(), _("div", Ll, [
909
- A(n.$slots, "content")
770
+ k(n.$slots, "default"),
771
+ n.$slots.content ? (m(), _("div", Zt, [
772
+ k(n.$slots, "content")
910
773
  ])) : I("", !0),
911
- n.$slots.footer ? (m(), _("footer", Dl, [
912
- A(n.$slots, "footer")
774
+ n.$slots.footer ? (m(), _("footer", eo, [
775
+ k(n.$slots, "footer")
913
776
  ])) : I("", !0)
914
777
  ], 2));
915
778
  }
916
- }), Bl = {
917
- ...St,
779
+ }), oo = {
780
+ ...Qe,
918
781
  indeterminate: Boolean,
919
782
  uncheckedValue: [String, Number, Boolean],
920
783
  switch: Boolean
921
- }, Nl = ["click", "update:modelValue", "change", "blur"];
922
- function xl(l, t) {
923
- const { group: e, isInGroup: n, getGroupOrLocalRef: o } = xe(bt), { switch: r, indeterminate: s } = F(l), b = o("modelValue", l, t), c = o("readonly", l), d = o("disabled", l), u = o("valid", l), p = o("invalid", l);
784
+ }, so = ["click", "update:modelValue", "change", "blur"];
785
+ function lo(o, s) {
786
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(je), { switch: i, indeterminate: r } = toRefs(o), f = l("modelValue", o, s), p = l("readonly", o), u = l("disabled", o), a = l("valid", o), c = l("invalid", o);
924
787
  return {
925
- propsSwitch: r,
926
- indeterminate: s,
788
+ propsSwitch: i,
789
+ indeterminate: r,
927
790
  group: e,
928
791
  isInGroup: n,
929
- modelValue: b,
930
- readonly: c,
931
- disabled: d,
932
- valid: u,
933
- invalid: p
792
+ modelValue: f,
793
+ readonly: p,
794
+ disabled: u,
795
+ valid: a,
796
+ invalid: c
934
797
  };
935
798
  }
936
- function Te(l) {
937
- return Array.isArray(l) ? l.filter((t) => el(t)).join(" ") : l;
799
+ function ke(o) {
800
+ return Array.isArray(o) ? o.filter((s) => isString(s)).join(" ") : o;
938
801
  }
939
- function _e(l, t) {
802
+ function pe(o, s) {
940
803
  const {
941
804
  invalid: e,
942
805
  valid: n,
943
- hint: o,
944
- loading: r
945
- } = t, {
946
- hintLabel: s,
947
- modelValue: b,
948
- valid: c,
949
- validLabel: d,
950
- invalid: u,
951
- invalidLabel: p,
952
- ...v
953
- } = F(l), h = Be(v, "loading"), g = Be(v, "loadingLabel"), y = i(() => u.value ? !!(u.value && e || p != null && p.value && Array.isArray(p.value) && p.value.length > 0 || p != null && p.value && !ee(p)) : !1), f = i(
954
- () => !!(s && s.value || o)
955
- ), V = i(
956
- () => !!(d && d.value || n)
957
- ), P = i(
958
- () => !!(h != null && h.value && r || h != null && h.value && (g != null && g.value))
959
- ), $ = i(
960
- () => f.value || V.value || y.value || P.value
806
+ hint: l,
807
+ loading: i
808
+ } = s, {
809
+ hintLabel: r,
810
+ modelValue: f,
811
+ valid: p,
812
+ validLabel: u,
813
+ invalid: a,
814
+ invalidLabel: c,
815
+ ...d
816
+ } = toRefs(o), b = resolveFieldData(d, "loading"), g = resolveFieldData(d, "loadingLabel"), y = computed(() => a.value ? !!(a.value && e || c != null && c.value && Array.isArray(c.value) && c.value.length > 0 || c != null && c.value && !isEmpty(c)) : !1), v = computed(
817
+ () => !!(r && r.value || l)
818
+ ), V = computed(
819
+ () => !!(u && u.value || n)
820
+ ), w = computed(
821
+ () => !!(b != null && b.value && i || b != null && b.value && (g != null && g.value))
822
+ ), C = computed(
823
+ () => v.value || V.value || y.value || w.value
961
824
  );
962
825
  return {
963
826
  hasInvalid: y,
964
- hasHint: f,
827
+ hasHint: v,
965
828
  hasValid: V,
966
- hasLoading: P,
829
+ hasLoading: w,
967
830
  HintSlot: {
968
831
  name: "HintSlot",
969
832
  props: {
@@ -972,31 +835,31 @@ function _e(l, t) {
972
835
  default: () => ({})
973
836
  }
974
837
  },
975
- setup(x) {
976
- const C = i(() => {
977
- const M = qt({
978
- hintLabel: s,
979
- modelValue: b,
980
- valid: c,
981
- validLabel: d,
982
- invalid: u,
983
- invalidLabel: p,
984
- loading: h,
838
+ setup(M) {
839
+ const $ = computed(() => {
840
+ const H = toReactive({
841
+ hintLabel: r,
842
+ modelValue: f,
843
+ valid: p,
844
+ validLabel: u,
845
+ invalid: a,
846
+ invalidLabel: c,
847
+ loading: b,
985
848
  loadingLabel: g,
986
- ...x.params
849
+ ...M.params
987
850
  });
988
- return u != null && u.value ? (e == null ? void 0 : e(M)) || Te(p == null ? void 0 : p.value) || (s == null ? void 0 : s.value) : c != null && c.value ? (n == null ? void 0 : n(M)) || Te(d == null ? void 0 : d.value) || (s == null ? void 0 : s.value) : h != null && h.value ? (r == null ? void 0 : r(M)) || Te(g == null ? void 0 : g.value) || (s == null ? void 0 : s.value) : (o == null ? void 0 : o(M)) || Te(s == null ? void 0 : s.value) || (s == null ? void 0 : s.value);
851
+ return a != null && a.value ? (e == null ? void 0 : e(H)) || ke(c == null ? void 0 : c.value) || (r == null ? void 0 : r.value) : p != null && p.value ? (n == null ? void 0 : n(H)) || ke(u == null ? void 0 : u.value) || (r == null ? void 0 : r.value) : b != null && b.value ? (i == null ? void 0 : i(H)) || ke(g == null ? void 0 : g.value) || (r == null ? void 0 : r.value) : (l == null ? void 0 : l(H)) || ke(r == null ? void 0 : r.value) || (r == null ? void 0 : r.value);
989
852
  });
990
853
  return {
991
- isVisible: $,
854
+ isVisible: C,
992
855
  hasInvalid: y,
993
856
  hasValid: V,
994
- hintContent: C
857
+ hintContent: $
995
858
  };
996
859
  },
997
860
  render() {
998
861
  if (this.isVisible)
999
- return Q(
862
+ return h(
1000
863
  "small",
1001
864
  {
1002
865
  role: this.hasInvalid || this.hasValid ? "alert" : void 0
@@ -1007,179 +870,143 @@ function _e(l, t) {
1007
870
  }
1008
871
  };
1009
872
  }
1010
- const Hl = ["for"], Ml = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Gl = {
873
+ const ao = ["for"], no = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ro = {
1011
874
  name: "VvCheckbox"
1012
- }, Ul = /* @__PURE__ */ D({
1013
- ...Gl,
1014
- props: Bl,
1015
- emits: Nl,
1016
- setup(l, { emit: t }) {
1017
- const e = l, n = ce(), {
1018
- disabled: o,
1019
- readonly: r,
1020
- valid: s,
1021
- invalid: b,
1022
- propsSwitch: c,
1023
- modelValue: d,
1024
- indeterminate: u,
1025
- isInGroup: p
1026
- } = xl(e, t), v = i(() => String(e.id || ve())), h = i(() => f.value ? -1 : e.tabindex), g = G(), y = i(
1027
- () => e.uncheckedValue !== void 0 && !p.value
1028
- ), f = i(() => o.value || r.value), V = i(() => {
1029
- if (b.value === !0)
875
+ }, io = /* @__PURE__ */ N({
876
+ ...ro,
877
+ props: oo,
878
+ emits: so,
879
+ setup(o, { emit: s }) {
880
+ const e = o, n = useSlots(), {
881
+ disabled: l,
882
+ readonly: i,
883
+ valid: r,
884
+ invalid: f,
885
+ propsSwitch: p,
886
+ modelValue: u,
887
+ indeterminate: a,
888
+ isInGroup: c
889
+ } = lo(e, s), d = computed(() => String(e.id || ne())), b = computed(() => v.value ? -1 : e.tabindex), g = ref(), y = computed(
890
+ () => e.uncheckedValue !== void 0 && !c.value
891
+ ), v = computed(() => l.value || i.value), V = computed(() => {
892
+ if (f.value === !0)
1030
893
  return !0;
1031
- if (s.value === !0)
894
+ if (r.value === !0)
1032
895
  return !1;
1033
- }), P = i(() => y.value ? d.value === e.value : Array.isArray(d.value) ? me(e.value, d.value) : he(e.value, d.value)), $ = i(() => !!(u.value || !P.value && y.value && e.uncheckedValue !== d.value)), x = i(() => {
896
+ }), w = computed(() => y.value ? u.value === e.value : Array.isArray(u.value) ? contains(e.value, u.value) : equals(e.value, u.value)), C = computed(() => !!(a.value || !w.value && y.value && e.uncheckedValue !== u.value)), M = computed(() => {
1034
897
  if (!y.value)
1035
898
  return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
1036
- }), C = i({
899
+ }), $ = computed({
1037
900
  get() {
1038
- return P.value;
901
+ return w.value;
1039
902
  },
1040
- set(B) {
903
+ set(T) {
1041
904
  if (y.value)
1042
- d.value = B ? e.value : e.uncheckedValue;
1043
- else if (Array.isArray(d.value) || p.value) {
1044
- const j = new Set(
1045
- Array.isArray(d.value) ? d.value : d.value !== void 0 ? [d.value] : []
905
+ u.value = T ? e.value : e.uncheckedValue;
906
+ else if (Array.isArray(u.value) || c.value) {
907
+ const G = new Set(
908
+ Array.isArray(u.value) ? u.value : u.value !== void 0 ? [u.value] : []
1046
909
  );
1047
- B ? j.add(e.value) : j.delete(e.value), d.value = [...j];
910
+ T ? G.add(e.value) : G.delete(e.value), u.value = [...G];
1048
911
  } else
1049
- d.value = B ? e.value : void 0;
1050
- t("change", B);
912
+ u.value = T ? e.value : void 0;
913
+ s("change", T);
1051
914
  }
1052
- }), { bemCssClasses: M } = H("vv-checkbox", {
1053
- switch: c,
1054
- valid: s,
1055
- invalid: b,
1056
- disabled: o,
1057
- readonly: r,
1058
- indeterminate: u
915
+ }), { bemCssClasses: H } = useBemModifiers("vv-checkbox", {
916
+ switch: p,
917
+ valid: r,
918
+ invalid: f,
919
+ disabled: l,
920
+ readonly: i,
921
+ indeterminate: a
1059
922
  });
1060
- Ye(() => {
1061
- y.value && Array.isArray(d.value) && console.warn(
923
+ watchEffect(() => {
924
+ y.value && Array.isArray(u.value) && console.warn(
1062
925
  "[VvCheckbox] The model value is an array but the component is in binary mode."
1063
926
  );
1064
- }), Ae(
1065
- () => $.value,
1066
- (B) => {
1067
- B ? g.value.indeterminate = !0 : g.value.indeterminate = !1;
927
+ }), watch(
928
+ () => C.value,
929
+ (T) => {
930
+ T ? g.value.indeterminate = !0 : g.value.indeterminate = !1;
1068
931
  }
1069
- ), Ht(() => {
1070
- $.value && (g.value.indeterminate = !0);
932
+ ), onMounted(() => {
933
+ C.value && (g.value.indeterminate = !0);
1071
934
  });
1072
- const { HintSlot: J } = _e(e, n);
1073
- return (B, j) => (m(), _("label", {
1074
- class: K(a(M)),
1075
- for: a(v)
935
+ const { HintSlot: X } = pe(e, n);
936
+ return (T, G) => (m(), _("label", {
937
+ class: U(t(H)),
938
+ for: t(d)
1076
939
  }, [
1077
- Se(E("input", {
1078
- id: a(v),
940
+ ve(R("input", {
941
+ id: t(d),
1079
942
  ref_key: "input",
1080
943
  ref: g,
1081
- "onUpdate:modelValue": j[0] || (j[0] = (le) => $e(C) ? C.value = le : null),
944
+ "onUpdate:modelValue": G[0] || (G[0] = (J) => be($) ? $.value = J : null),
1082
945
  type: "checkbox",
1083
946
  class: "vv-checkbox__input",
1084
- name: B.name,
1085
- disabled: a(f),
1086
- value: a(x),
1087
- tabindex: a(h),
1088
- "aria-invalid": a(V)
1089
- }, null, 8, Ml), [
1090
- [Mt, a(C)]
947
+ name: T.name,
948
+ disabled: t(v),
949
+ value: t(M),
950
+ tabindex: t(b),
951
+ "aria-invalid": t(V)
952
+ }, null, 8, no), [
953
+ [pt, t($)]
1091
954
  ]),
1092
- A(B.$slots, "default", { value: a(d) }, () => [
1093
- X(L(B.label), 1)
955
+ k(T.$slots, "default", { value: t(u) }, () => [
956
+ q(B(T.label), 1)
1094
957
  ]),
1095
- oe(a(J), {
958
+ Z(t(X), {
1096
959
  class: "vv-checkbox__hint",
1097
- params: { value: a(d) }
960
+ params: { value: t(u) }
1098
961
  }, null, 8, ["params"])
1099
- ], 10, Hl));
962
+ ], 10, ao));
1100
963
  }
1101
- });
1102
- function Le(l) {
1103
- const { options: t, labelKey: e, valueKey: n } = F(l);
1104
- return {
1105
- options: t,
1106
- getOptionLabel: (s) => typeof s != "object" && s !== null ? s : typeof e.value == "function" ? e.value(s) : s[e.value],
1107
- getOptionValue: (s) => typeof s != "object" && s !== null ? s : typeof n.value == "function" ? n.value(s) : s[n.value]
1108
- };
1109
- }
1110
- const jl = Vt, Kl = ["update:modelValue", "change"], Fl = ["textContent"], Wl = { class: "vv-checkbox-group__wrapper" }, zl = {
964
+ }), uo = Ze, co = ["update:modelValue", "change"], po = ["textContent"], vo = { class: "vv-checkbox-group__wrapper" }, mo = {
1111
965
  name: "VvCheckboxGroup"
1112
- }, fo = /* @__PURE__ */ D({
1113
- ...zl,
1114
- props: jl,
1115
- emits: Kl,
1116
- setup(l, { emit: t }) {
1117
- const e = l, n = ce(), o = Je(e, "modelValue", t), { disabled: r, readonly: s, vertical: b, valid: c, invalid: d } = F(e);
1118
- He({
1119
- key: bt,
1120
- modelValue: o,
1121
- disabled: r,
1122
- readonly: s,
1123
- valid: c,
1124
- invalid: d
1125
- });
1126
- const { getOptionLabel: p, getOptionValue: v } = Le(e), { bemCssClasses: h } = H("vv-checkbox-group", {
1127
- disabled: r,
1128
- readonly: s,
1129
- horizontal: i(() => !b.value),
1130
- valid: c,
1131
- invalid: d
1132
- }), g = (f, V) => ({
966
+ }, Bs = /* @__PURE__ */ N({
967
+ ...mo,
968
+ props: uo,
969
+ emits: co,
970
+ setup(o, { emit: s }) {
971
+ const e = o, n = useSlots(), l = useVModel(e, "modelValue", s), { disabled: i, readonly: r, vertical: f, valid: p, invalid: u } = toRefs(e), a = {
972
+ key: je,
973
+ modelValue: l,
974
+ disabled: i,
975
+ readonly: r,
976
+ valid: p,
977
+ invalid: u
978
+ };
979
+ useProvideGroupState(a);
980
+ const { getOptionLabel: c, getOptionValue: d } = useOptions(e), { bemCssClasses: b } = useBemModifiers("vv-checkbox-group", {
981
+ disabled: i,
982
+ readonly: r,
983
+ horizontal: computed(() => !f.value),
984
+ valid: p,
985
+ invalid: u
986
+ }), g = (v, V) => ({
1133
987
  id: `${e.name}_opt${V}`,
1134
988
  name: e.name,
1135
- label: p(f),
1136
- value: v(f)
1137
- }), { HintSlot: y } = _e(e, n);
1138
- return (f, V) => (m(), _("fieldset", {
1139
- class: K(a(h))
989
+ label: c(v),
990
+ value: d(v)
991
+ }), { HintSlot: y } = pe(e, n);
992
+ return (v, V) => (m(), _("fieldset", {
993
+ class: U(t(b))
1140
994
  }, [
1141
- f.label ? (m(), _("legend", {
995
+ v.label ? (m(), _("legend", {
1142
996
  key: 0,
1143
- textContent: L(f.label)
1144
- }, null, 8, Fl)) : I("", !0),
1145
- E("div", Wl, [
1146
- f.options.length > 0 ? (m(!0), _(ge, { key: 0 }, Ce(f.options, (P, $) => (m(), T(Ul, R({ key: $ }, g(P, $)), null, 16))), 128)) : A(f.$slots, "default", { key: 1 })
997
+ textContent: B(v.label)
998
+ }, null, 8, po)) : I("", !0),
999
+ R("div", vo, [
1000
+ v.options.length > 0 ? (m(!0), _(de, { key: 0 }, fe(v.options, (w, C) => (m(), D(io, O({ key: C }, g(w, C)), null, 16))), 128)) : k(v.$slots, "default", { key: 1 })
1147
1001
  ]),
1148
- oe(a(y), { class: "vv-checkbox-group__hint" })
1002
+ Z(t(y), { class: "vv-checkbox-group__hint" })
1149
1003
  ], 2));
1150
1004
  }
1151
- });
1152
- function je(l, t, e) {
1153
- const n = i(
1154
- () => !!(l != null && l.value && t.value === "left" || e != null && e.iconLeft)
1155
- ), o = i(
1156
- () => !!(l != null && l.value && t.value === "right" || e != null && e.iconRight)
1157
- ), r = i(
1158
- () => !!(l != null && l.value && t.value === "top" || e != null && e.iconTop)
1159
- ), s = i(
1160
- () => !!(l != null && l.value && t.value === "bottom" || e != null && e.iconBottom)
1161
- );
1162
- return {
1163
- hasIcon: i(() => typeof (l == null ? void 0 : l.value) == "string" ? { name: l == null ? void 0 : l.value } : l == null ? void 0 : l.value),
1164
- hasIconLeft: n,
1165
- hasIconRight: o,
1166
- hasIconTop: r,
1167
- hasIconBottom: s
1168
- };
1169
- }
1170
- function Ke(l, t) {
1171
- const { focused: e } = Xt(l);
1172
- return Ae(e, (n) => {
1173
- t(n ? "focus" : "blur", a(l));
1174
- }), {
1175
- focused: e
1176
- };
1177
- }
1178
- const ql = {
1179
- ...Re,
1180
- ...Me,
1181
- ...ye,
1182
- ...pe,
1005
+ }), fo = {
1006
+ ...Ce,
1007
+ ...Pe,
1008
+ ...ce,
1009
+ ...re,
1183
1010
  modelValue: {
1184
1011
  type: [String, Number, Boolean, Object, Array]
1185
1012
  },
@@ -1187,93 +1014,93 @@ const ql = {
1187
1014
  multiple: Boolean,
1188
1015
  maxValues: [Number, String],
1189
1016
  unselectable: { type: Boolean, default: !0 }
1190
- }, Xl = ["id"], Zl = {
1017
+ }, bo = ["id"], ho = {
1191
1018
  key: 0,
1192
1019
  role: "option"
1193
- }, Yl = ["aria-selected"], Jl = ["for", "onClick"], Ql = ["id", "type", "value", "checked", "disabled", "name"], ea = {
1020
+ }, go = ["aria-selected"], yo = ["for", "onClick"], _o = ["id", "type", "value", "checked", "disabled", "name"], So = {
1194
1021
  name: "VvDropdown"
1195
- }, ta = /* @__PURE__ */ D({
1196
- ...ea,
1197
- props: ql,
1022
+ }, Vo = /* @__PURE__ */ N({
1023
+ ...So,
1024
+ props: fo,
1198
1025
  emits: ["update:modelValue"],
1199
- setup(l, { emit: t }) {
1200
- const e = l, n = i(() => String(e.id || ve())), { modifiers: o, disabled: r } = F(e), { getOptionLabel: s, getOptionValue: b } = Le(e), { bemCssClasses: c } = H("vv-dropdown", {
1201
- modifiers: o,
1202
- disabled: r
1026
+ setup(o, { emit: s }) {
1027
+ const e = o, n = computed(() => String(e.id || ne())), { modifiers: l, disabled: i } = toRefs(e), { getOptionLabel: r, getOptionValue: f } = useOptions(e), { bemCssClasses: p } = useBemModifiers("vv-dropdown", {
1028
+ modifiers: l,
1029
+ disabled: i
1203
1030
  });
1204
- function d(v) {
1205
- return Array.isArray(e.modelValue) ? me(v, e.modelValue) || me(b(v), e.modelValue) : he(v, e.modelValue) || he(b(v), e.modelValue);
1031
+ function u(d) {
1032
+ return Array.isArray(e.modelValue) ? contains(d, e.modelValue) || contains(f(d), e.modelValue) : equals(d, e.modelValue) || equals(f(d), e.modelValue);
1206
1033
  }
1207
- function u(v) {
1208
- return typeof v == "string" || v.disabled === void 0 ? r.value : v.disabled;
1034
+ function a(d) {
1035
+ return typeof d == "string" || d.disabled === void 0 ? i.value : d.disabled;
1209
1036
  }
1210
- function p(v) {
1037
+ function c(d) {
1211
1038
  var g;
1212
1039
  if (e.disabled)
1213
1040
  return;
1214
- let h = v;
1041
+ let b = d;
1215
1042
  if (e.multiple)
1216
1043
  if (Array.isArray(e.modelValue)) {
1217
- if (e.maxValues !== void 0 && e.maxValues >= 0 && ((g = e.modelValue) == null ? void 0 : g.length) >= e.maxValues && !me(v, e.modelValue))
1044
+ if (e.maxValues !== void 0 && e.maxValues >= 0 && ((g = e.modelValue) == null ? void 0 : g.length) >= e.maxValues && !contains(d, e.modelValue))
1218
1045
  return;
1219
- h = me(v, e.modelValue) ? Qt(v, e.modelValue) : [...e.modelValue, v];
1046
+ b = contains(d, e.modelValue) ? removeFromList(d, e.modelValue) : [...e.modelValue, d];
1220
1047
  } else
1221
- h = [v];
1048
+ b = [d];
1222
1049
  else
1223
- e.unselectable && v === e.modelValue && (h = void 0);
1224
- t("update:modelValue", h);
1050
+ e.unselectable && d === e.modelValue && (b = void 0);
1051
+ s("update:modelValue", b);
1225
1052
  }
1226
- return (v, h) => {
1053
+ return (d, b) => {
1227
1054
  var g;
1228
1055
  return m(), _("ul", {
1229
- id: a(n),
1230
- class: K(a(c)),
1056
+ id: t(n),
1057
+ class: U(t(p)),
1231
1058
  role: "listbox"
1232
1059
  }, [
1233
- (g = v.options) != null && g.length ? I("", !0) : (m(), _("li", Zl, [
1234
- E("label", null, L(v.labelNoResults), 1)
1060
+ (g = d.options) != null && g.length ? I("", !0) : (m(), _("li", ho, [
1061
+ R("label", null, B(d.labelNoResults), 1)
1235
1062
  ])),
1236
- (m(!0), _(ge, null, Ce(v.options, (y, f) => (m(), _("li", {
1237
- key: f,
1063
+ (m(!0), _(de, null, fe(d.options, (y, v) => (m(), _("li", {
1064
+ key: v,
1238
1065
  role: "option",
1239
- "aria-selected": d(y)
1066
+ "aria-selected": u(y)
1240
1067
  }, [
1241
- E("label", {
1242
- for: `dropdown-${f}-${a(n)}`,
1243
- onClick: Ze((V) => p(a(b)(y)), ["prevent"])
1068
+ R("label", {
1069
+ for: `dropdown-${v}-${t(n)}`,
1070
+ onClick: Be((V) => c(t(f)(y)), ["prevent"])
1244
1071
  }, [
1245
- E("input", {
1246
- id: `dropdown-${f}-${a(n)}`,
1247
- type: v.multiple ? "checkbox" : "radio",
1248
- value: a(b)(y),
1249
- checked: d(y),
1250
- disabled: u(y),
1251
- name: v.name,
1072
+ R("input", {
1073
+ id: `dropdown-${v}-${t(n)}`,
1074
+ type: d.multiple ? "checkbox" : "radio",
1075
+ value: t(f)(y),
1076
+ checked: u(y),
1077
+ disabled: a(y),
1078
+ name: d.name,
1252
1079
  tabindex: "-1",
1253
1080
  "aria-hidden": "true"
1254
- }, null, 8, Ql),
1255
- X(" " + L(a(s)(y)), 1)
1256
- ], 8, Jl)
1257
- ], 8, Yl))), 128))
1258
- ], 10, Xl);
1081
+ }, null, 8, _o),
1082
+ q(" " + B(t(r)(y)), 1)
1083
+ ], 8, yo)
1084
+ ], 8, go))), 128))
1085
+ ], 10, bo);
1259
1086
  };
1260
1087
  }
1261
- }), la = {
1262
- ...Re,
1263
- ...gt,
1264
- ...yt,
1265
- ...Ge,
1088
+ }), Co = {
1089
+ ...Ce,
1090
+ ...Xe,
1091
+ ...Ye,
1092
+ ...we,
1093
+ ...ye,
1094
+ ..._e,
1095
+ ...Ve,
1096
+ ...De,
1097
+ ...ce,
1098
+ ...Se,
1099
+ ...re,
1266
1100
  ...Pe,
1101
+ ...Te,
1102
+ ...Le,
1267
1103
  ...Ie,
1268
- ...Ee,
1269
- ...et,
1270
- ...ye,
1271
- ...Oe,
1272
- ...pe,
1273
- ...Me,
1274
- ...tt,
1275
- ...lt,
1276
- ...Ue,
1277
1104
  multiple: Boolean,
1278
1105
  required: Boolean,
1279
1106
  size: [String, Number],
@@ -1283,130 +1110,130 @@ const ql = {
1283
1110
  },
1284
1111
  label: String,
1285
1112
  placeholder: String
1286
- }, aa = ["update:modelValue", "focus", "blur"], oa = ["for"], na = { class: "vv-select__wrapper" }, sa = ["id"], ra = ["disabled", "hidden"], ia = ["disabled", "value"], ua = {
1113
+ }, $o = ["update:modelValue", "focus", "blur"], ko = ["for"], Ao = { class: "vv-select__wrapper" }, Po = ["id"], wo = ["disabled", "hidden"], Io = ["disabled", "value"], Eo = {
1287
1114
  name: "VvSelect"
1288
- }, da = /* @__PURE__ */ D({
1289
- ...ua,
1290
- props: la,
1291
- emits: aa,
1292
- setup(l, { emit: t }) {
1293
- const e = l, n = ce(), o = G(), { HintSlot: r, hasHint: s, hasInvalid: b } = _e(e, n), {
1294
- modifiers: c,
1295
- disabled: d,
1296
- readonly: u,
1297
- loading: p,
1298
- icon: v,
1299
- iconPosition: h,
1115
+ }, Ro = /* @__PURE__ */ N({
1116
+ ...Eo,
1117
+ props: Co,
1118
+ emits: $o,
1119
+ setup(o, { emit: s }) {
1120
+ const e = o, n = useSlots(), l = ref(), { HintSlot: i, hasHint: r, hasInvalid: f } = pe(e, n), {
1121
+ modifiers: p,
1122
+ disabled: u,
1123
+ readonly: a,
1124
+ loading: c,
1125
+ icon: d,
1126
+ iconPosition: b,
1300
1127
  invalid: g,
1301
1128
  valid: y,
1302
- floating: f,
1129
+ floating: v,
1303
1130
  multiple: V
1304
- } = F(e), P = i(() => String(e.id || ve())), $ = i(() => `${P.value}-hint`), { focused: x } = Ke(o, t), C = Qe(o);
1305
- Ae(C, (w) => {
1306
- w && e.autofocus && (x.value = !0);
1131
+ } = toRefs(e), w = computed(() => String(e.id || ne())), C = computed(() => `${w.value}-hint`), { focused: M } = useComponentFocus(l, s), $ = useElementVisibility(l);
1132
+ watch($, (P) => {
1133
+ P && e.autofocus && (M.value = !0);
1307
1134
  });
1308
- const { hasIcon: M, hasIconLeft: J, hasIconRight: B } = je(
1309
- v,
1310
- h
1311
- ), j = i(() => !ee(e.modelValue)), le = i(() => e.disabled || e.readonly), ne = i(() => le.value ? -1 : e.tabindex), se = i(() => {
1135
+ const { hasIcon: H, hasIconLeft: X, hasIconRight: T } = useComponentIcon(
1136
+ d,
1137
+ b
1138
+ ), G = computed(() => !isEmpty(e.modelValue)), J = computed(() => e.disabled || e.readonly), ee = computed(() => J.value ? -1 : e.tabindex), te = computed(() => {
1312
1139
  if (e.invalid === !0)
1313
1140
  return !0;
1314
1141
  if (e.valid === !0)
1315
1142
  return !1;
1316
- }), { bemCssClasses: ae } = H("vv-select", {
1317
- modifiers: c,
1143
+ }), { bemCssClasses: Q } = useBemModifiers("vv-select", {
1144
+ modifiers: p,
1318
1145
  valid: y,
1319
1146
  invalid: g,
1320
- loading: p,
1321
- disabled: d,
1322
- readonly: u,
1323
- iconLeft: J,
1324
- iconRight: B,
1325
- dirty: j,
1326
- focus: x,
1327
- floating: f,
1147
+ loading: c,
1148
+ disabled: u,
1149
+ readonly: a,
1150
+ iconLeft: X,
1151
+ iconRight: T,
1152
+ dirty: G,
1153
+ focus: M,
1154
+ floating: v,
1328
1155
  multiple: V
1329
- }), fe = i(() => ({
1156
+ }), ie = computed(() => ({
1330
1157
  name: e.name,
1331
- tabindex: ne.value,
1332
- disabled: le.value,
1158
+ tabindex: ee.value,
1159
+ disabled: J.value,
1333
1160
  required: e.required,
1334
1161
  size: e.size,
1335
1162
  autocomplete: e.autocomplete,
1336
1163
  multiple: e.multiple,
1337
- "aria-invalid": se.value,
1338
- "aria-describedby": !b.value && s.value ? $.value : void 0,
1339
- "aria-errormessage": b.value ? $.value : void 0
1340
- })), { getOptionLabel: re, getOptionValue: ie } = Le(e);
1341
- function ue(w) {
1342
- return typeof w == "string" || w.disabled === void 0 ? d.value : w.disabled;
1164
+ "aria-invalid": te.value,
1165
+ "aria-describedby": !f.value && r.value ? C.value : void 0,
1166
+ "aria-errormessage": f.value ? C.value : void 0
1167
+ })), { getOptionLabel: oe, getOptionValue: se } = useOptions(e);
1168
+ function le(P) {
1169
+ return typeof P == "string" || P.disabled === void 0 ? u.value : P.disabled;
1343
1170
  }
1344
- const q = i({
1171
+ const W = computed({
1345
1172
  get: () => e.modelValue,
1346
- set: (w) => {
1347
- Array.isArray(w) && (w = w.filter((Z) => Z !== void 0)), t("update:modelValue", w);
1173
+ set: (P) => {
1174
+ Array.isArray(P) && (P = P.filter((j) => j !== void 0)), s("update:modelValue", P);
1348
1175
  }
1349
1176
  });
1350
- return (w, Z) => (m(), _("div", {
1351
- class: K(a(ae))
1177
+ return (P, j) => (m(), _("div", {
1178
+ class: U(t(Q))
1352
1179
  }, [
1353
- w.label ? (m(), _("label", {
1180
+ P.label ? (m(), _("label", {
1354
1181
  key: 0,
1355
- for: a(P)
1356
- }, L(w.label), 9, oa)) : I("", !0),
1357
- E("div", na, [
1358
- A(w.$slots, "before", {}, () => [
1359
- a(J) ? (m(), T(U, W(R({ key: 0 }, a(M))), null, 16)) : I("", !0)
1182
+ for: t(w)
1183
+ }, B(P.label), 9, ko)) : I("", !0),
1184
+ R("div", Ao, [
1185
+ k(P.$slots, "before", {}, () => [
1186
+ t(X) ? (m(), D(x, F(O({ key: 0 }, t(H))), null, 16)) : I("", !0)
1360
1187
  ]),
1361
- Se(E("select", R({
1362
- id: a(P),
1188
+ ve(R("select", O({
1189
+ id: t(w),
1363
1190
  ref_key: "select",
1364
- ref: o,
1365
- "onUpdate:modelValue": Z[0] || (Z[0] = (k) => $e(q) ? q.value = k : null)
1366
- }, a(fe)), [
1367
- w.placeholder ? (m(), _("option", {
1191
+ ref: l,
1192
+ "onUpdate:modelValue": j[0] || (j[0] = (A) => be(W) ? W.value = A : null)
1193
+ }, t(ie)), [
1194
+ P.placeholder ? (m(), _("option", {
1368
1195
  key: 0,
1369
1196
  value: void 0,
1370
- disabled: !w.unselectable,
1371
- hidden: !w.unselectable
1372
- }, L(w.placeholder), 9, ra)) : I("", !0),
1373
- (m(!0), _(ge, null, Ce(w.options, (k, N) => (m(), _("option", {
1374
- key: N,
1375
- disabled: ue(k),
1376
- value: a(ie)(k)
1377
- }, L(a(re)(k)), 9, ia))), 128))
1378
- ], 16, sa), [
1379
- [Gt, a(q)]
1197
+ disabled: !P.unselectable,
1198
+ hidden: !P.unselectable
1199
+ }, B(P.placeholder), 9, wo)) : I("", !0),
1200
+ (m(!0), _(de, null, fe(P.options, (A, L) => (m(), _("option", {
1201
+ key: L,
1202
+ disabled: le(A),
1203
+ value: t(se)(A)
1204
+ }, B(t(oe)(A)), 9, Io))), 128))
1205
+ ], 16, Po), [
1206
+ [vt, t(W)]
1380
1207
  ]),
1381
- A(w.$slots, "after", {}, () => [
1382
- a(B) ? (m(), T(U, W(R({ key: 0 }, a(M))), null, 16)) : I("", !0)
1208
+ k(P.$slots, "after", {}, () => [
1209
+ t(T) ? (m(), D(x, F(O({ key: 0 }, t(H))), null, 16)) : I("", !0)
1383
1210
  ])
1384
1211
  ]),
1385
- oe(a(r), {
1386
- id: a($),
1212
+ Z(t(i), {
1213
+ id: t(C),
1387
1214
  class: "vv-select__hint"
1388
1215
  }, null, 8, ["id"])
1389
1216
  ], 2));
1390
1217
  }
1391
- }), ca = [
1218
+ }), Oo = [
1392
1219
  "update:modelValue",
1393
1220
  "change:search",
1394
1221
  "focus",
1395
1222
  "blur"
1396
- ], va = {
1397
- ...Re,
1398
- ...Ge,
1223
+ ], Bo = {
1224
+ ...Ce,
1225
+ ...we,
1226
+ ...ye,
1227
+ ..._e,
1228
+ ...Ve,
1229
+ ...De,
1230
+ ...ce,
1231
+ ...Se,
1232
+ ...re,
1399
1233
  ...Pe,
1234
+ ...Te,
1235
+ ...Le,
1400
1236
  ...Ie,
1401
- ...Ee,
1402
- ...et,
1403
- ...ye,
1404
- ...Oe,
1405
- ...pe,
1406
- ...Me,
1407
- ...tt,
1408
- ...lt,
1409
- ...Ue,
1410
1237
  modelValue: {
1411
1238
  type: [String, Number, Boolean, Object, Array],
1412
1239
  default: void 0
@@ -1424,70 +1251,70 @@ const ql = {
1424
1251
  maxValues: [Number, String],
1425
1252
  separator: { type: String, default: ", " },
1426
1253
  native: Boolean
1427
- }, pa = ["id"], fa = ["id", "for"], ma = ["tabindex"], ba = ["id", "placeholder"], ha = {
1254
+ }, Do = ["id"], To = ["id", "for"], Lo = ["tabindex"], Mo = ["id", "placeholder"], No = {
1428
1255
  name: "VvCombobox"
1429
- }, mo = /* @__PURE__ */ D({
1430
- ...ha,
1431
- props: va,
1432
- emits: ca,
1433
- setup(l, { emit: t }) {
1434
- const e = l, n = ce(), { HintSlot: o } = _e(e, n), r = G(), s = G(), { focused: b } = Ke(r, t), c = i(() => String(e.id || ve())), d = G(""), u = Zt(
1435
- d,
1256
+ }, Ds = /* @__PURE__ */ N({
1257
+ ...No,
1258
+ props: Bo,
1259
+ emits: Oo,
1260
+ setup(o, { emit: s }) {
1261
+ const e = o, n = useSlots(), { HintSlot: l } = pe(e, n), i = ref(), r = ref(), { focused: f } = useComponentFocus(i, s), p = computed(() => String(e.id || ne())), u = ref(""), a = refDebounced(
1262
+ u,
1436
1263
  Number(e.debounceSearch)
1437
- ), p = G(!1), {
1438
- icon: v,
1439
- iconPosition: h,
1264
+ ), c = ref(!1), {
1265
+ icon: d,
1266
+ iconPosition: b,
1440
1267
  modifiers: g,
1441
1268
  disabled: y,
1442
- readonly: f,
1269
+ readonly: v,
1443
1270
  loading: V,
1444
- valid: P,
1445
- invalid: $,
1446
- floating: x
1447
- } = F(e);
1448
- Ae(
1449
- u,
1450
- () => t("change:search", u.value)
1271
+ valid: w,
1272
+ invalid: C,
1273
+ floating: M
1274
+ } = toRefs(e);
1275
+ watch(
1276
+ a,
1277
+ () => s("change:search", a.value)
1451
1278
  );
1452
- const { hasIcon: C, hasIconLeft: M, hasIconRight: J } = je(
1453
- v,
1454
- h
1455
- ), B = i(() => !ee(e.modelValue)), j = i(() => y.value || f.value ? -1 : e.tabindex), { bemCssClasses: le } = H("vv-select", {
1279
+ const { hasIcon: $, hasIconLeft: H, hasIconRight: X } = useComponentIcon(
1280
+ d,
1281
+ b
1282
+ ), T = computed(() => !isEmpty(e.modelValue)), G = computed(() => y.value || v.value ? -1 : e.tabindex), { bemCssClasses: J } = useBemModifiers("vv-select", {
1456
1283
  modifiers: g,
1457
1284
  disabled: y,
1458
1285
  loading: V,
1459
- readonly: f,
1460
- iconLeft: M,
1461
- iconRight: J,
1462
- valid: P,
1463
- invalid: $,
1464
- dirty: B,
1465
- focus: b,
1466
- floating: x
1467
- }), ne = i(
1468
- () => e.searchable ? fe.value : e.options
1469
- ), { getOptionLabel: se, getOptionValue: ae } = Le(e), fe = i(() => {
1470
- var k;
1471
- return (k = e.options) == null ? void 0 : k.filter((N) => se(N).toLowerCase().includes(u.value.toLowerCase().trim()));
1472
- }), re = i(() => {
1473
- let k = [];
1474
- return Array.isArray(e.modelValue) ? k = e.modelValue : e.modelValue && (k = [e.modelValue]), e.options.filter(
1475
- (N) => k.includes(ae(N))
1286
+ readonly: v,
1287
+ iconLeft: H,
1288
+ iconRight: X,
1289
+ valid: w,
1290
+ invalid: C,
1291
+ dirty: T,
1292
+ focus: f,
1293
+ floating: M
1294
+ }), ee = computed(
1295
+ () => e.searchable ? ie.value : e.options
1296
+ ), { getOptionLabel: te, getOptionValue: Q } = useOptions(e), ie = computed(() => {
1297
+ var A;
1298
+ return (A = e.options) == null ? void 0 : A.filter((L) => te(L).toLowerCase().includes(a.value.toLowerCase().trim()));
1299
+ }), oe = computed(() => {
1300
+ let A = [];
1301
+ return Array.isArray(e.modelValue) ? A = e.modelValue : e.modelValue && (A = [e.modelValue]), e.options.filter(
1302
+ (L) => A.includes(Q(L))
1476
1303
  );
1477
- }), ie = i(() => re.value.map((k) => se(k)).join(e.separator));
1478
- pt(r, () => {
1479
- r.value.open = !1;
1304
+ }), se = computed(() => oe.value.map((A) => te(A)).join(e.separator));
1305
+ onClickOutside(i, () => {
1306
+ i.value.open = !1;
1480
1307
  });
1481
- function ue(k) {
1482
- const N = k.target;
1483
- p.value = N.open;
1308
+ function le(A) {
1309
+ const L = A.target;
1310
+ c.value = L.open;
1484
1311
  }
1485
- function q(k) {
1486
- r.value && !e.multiple && (r.value.open = !1), t("update:modelValue", k);
1312
+ function W(A) {
1313
+ i.value && !e.multiple && (i.value.open = !1), s("update:modelValue", A);
1487
1314
  }
1488
- const w = i(() => ({
1315
+ const P = computed(() => ({
1489
1316
  name: e.name,
1490
- options: ne.value,
1317
+ options: ee.value,
1491
1318
  labelKey: e.labelKey,
1492
1319
  valueKey: e.valueKey,
1493
1320
  disabled: e.disabled,
@@ -1496,21 +1323,21 @@ const ql = {
1496
1323
  maxValues: e.maxValues,
1497
1324
  modelValue: e.modelValue,
1498
1325
  unselectable: e.unselectable
1499
- })), Z = i(() => ({
1500
- id: c.value,
1326
+ })), j = computed(() => ({
1327
+ id: p.value,
1501
1328
  name: e.name,
1502
- tabindex: j.value,
1503
- valid: P.value,
1329
+ tabindex: G.value,
1330
+ valid: w.value,
1504
1331
  validLabel: e.validLabel,
1505
- invalid: $.value,
1332
+ invalid: C.value,
1506
1333
  invalidLabel: e.invalidLabel,
1507
1334
  hintLabel: e.hintLabel,
1508
1335
  loading: V.value,
1509
1336
  loadingLabel: e.loadingLabel,
1510
1337
  disabled: y.value,
1511
- readonly: f.value,
1338
+ readonly: v.value,
1512
1339
  modifiers: e.modifiers,
1513
- options: ne.value,
1340
+ options: ee.value,
1514
1341
  labelKey: e.labelKey,
1515
1342
  valueKey: e.valueKey,
1516
1343
  icon: e.icon,
@@ -1522,161 +1349,141 @@ const ql = {
1522
1349
  placeholder: e.placeholder,
1523
1350
  modelValue: e.modelValue
1524
1351
  }));
1525
- return (k, N) => k.native ? (m(), T(da, R({ key: 1 }, a(Z), {
1526
- "onUpdate:modelValue": N[4] || (N[4] = (Y) => t("update:modelValue", Y))
1352
+ return (A, L) => A.native ? (m(), D(Ro, O({ key: 1 }, t(j), {
1353
+ "onUpdate:modelValue": L[4] || (L[4] = (z) => s("update:modelValue", z))
1527
1354
  }), null, 16)) : (m(), _("div", {
1528
1355
  key: 0,
1529
- id: a(c),
1530
- class: K(a(le))
1356
+ id: t(p),
1357
+ class: U(t(J))
1531
1358
  }, [
1532
- k.label ? (m(), _("label", {
1359
+ A.label ? (m(), _("label", {
1533
1360
  key: 0,
1534
- id: `${a(c)}-label`,
1535
- for: k.searchable && p.value ? `${a(c)}-input` : void 0
1536
- }, L(k.label), 9, fa)) : I("", !0),
1537
- E("details", {
1361
+ id: `${t(p)}-label`,
1362
+ for: A.searchable && t(c) ? `${t(p)}-input` : void 0
1363
+ }, B(A.label), 9, To)) : I("", !0),
1364
+ R("details", {
1538
1365
  ref_key: "dropdown",
1539
- ref: r,
1366
+ ref: i,
1540
1367
  class: "vv-select__wrapper",
1541
- onClick: N[2] || (N[2] = (Y) => a(y) || a(f) ? Y.preventDefault() : null),
1542
- onKeyup: N[3] || (N[3] = ot((Y) => r.value.open = !1, ["esc"])),
1543
- onToggle: ue
1368
+ onClick: L[2] || (L[2] = (z) => t(y) || t(v) ? z.preventDefault() : null),
1369
+ onKeyup: L[3] || (L[3] = Ne((z) => t(i).open = !1, ["esc"])),
1370
+ onToggle: le
1544
1371
  }, [
1545
- E("summary", {
1372
+ R("summary", {
1546
1373
  class: "vv-select__input",
1547
- tabindex: a(j),
1548
- onKeyup: N[1] || (N[1] = ot((Y) => k.searchable ? Y.preventDefault() : null, ["space"]))
1374
+ tabindex: t(G),
1375
+ onKeyup: L[1] || (L[1] = Ne((z) => A.searchable ? z.preventDefault() : null, ["space"]))
1549
1376
  }, [
1550
- A(k.$slots, "before", {}, () => [
1551
- a(M) ? (m(), T(U, R({
1377
+ k(A.$slots, "before", {}, () => [
1378
+ t(H) ? (m(), D(x, O({
1552
1379
  key: 0,
1553
1380
  class: "vv-select__icon-left"
1554
- }, a(C)), null, 16)) : I("", !0)
1381
+ }, t($)), null, 16)) : I("", !0)
1555
1382
  ]),
1556
- k.searchable && p.value ? Se((m(), _("input", {
1383
+ A.searchable && t(c) ? ve((m(), _("input", {
1557
1384
  key: 0,
1558
- id: `${a(c)}-input`,
1385
+ id: `${t(p)}-input`,
1559
1386
  ref_key: "inputSearch",
1560
- ref: s,
1561
- "onUpdate:modelValue": N[0] || (N[0] = (Y) => d.value = Y),
1387
+ ref: r,
1388
+ "onUpdate:modelValue": L[0] || (L[0] = (z) => be(u) ? u.value = z : null),
1562
1389
  role: "combobox",
1563
1390
  type: "search",
1564
- placeholder: k.searchPlaceholder
1565
- }, null, 8, ba)), [
1566
- [vt, d.value]
1567
- ]) : (m(), _(ge, { key: 1 }, [
1568
- X(L(a(ie) || k.placeholder), 1)
1391
+ placeholder: A.searchPlaceholder
1392
+ }, null, 8, Mo)), [
1393
+ [Ke, t(u)]
1394
+ ]) : (m(), _(de, { key: 1 }, [
1395
+ q(B(t(se) || A.placeholder), 1)
1569
1396
  ], 64)),
1570
- A(k.$slots, "after", {}, () => [
1571
- a(J) ? (m(), T(U, R({
1397
+ k(A.$slots, "after", {}, () => [
1398
+ t(X) ? (m(), D(x, O({
1572
1399
  key: 0,
1573
1400
  class: "vv-select__icon-right"
1574
- }, a(C)), null, 16)) : I("", !0)
1401
+ }, t($)), null, 16)) : I("", !0)
1575
1402
  ])
1576
- ], 40, ma),
1577
- oe(ta, R({
1578
- id: `${a(c)}-dropdown`
1579
- }, a(w), { "onUpdate:modelValue": q }), null, 16, ["id"])
1403
+ ], 40, Lo),
1404
+ Z(Vo, O({
1405
+ id: `${t(p)}-dropdown`
1406
+ }, t(P), { "onUpdate:modelValue": W }), null, 16, ["id"])
1580
1407
  ], 544),
1581
- oe(a(o), { class: "vv-select__hint" })
1582
- ], 10, pa));
1408
+ Z(t(l), { class: "vv-select__hint" })
1409
+ ], 10, Do));
1583
1410
  }
1584
- }), ga = ["open", "close", "update:modelValue"], ya = {
1411
+ }), Ho = ["open", "close", "update:modelValue"], xo = {
1585
1412
  id: { type: String, required: !0 },
1586
1413
  title: String,
1587
1414
  modelValue: Boolean,
1588
1415
  transition: { type: String, default: "fade-block" },
1589
1416
  size: String,
1590
1417
  autoClose: { type: Boolean, default: !0 }
1591
- }, _a = {
1418
+ }, Go = {
1592
1419
  key: 0,
1593
1420
  class: "vv-dialog__header"
1594
- }, Sa = ["onClick"], Va = { class: "vv-dialog__content" }, $a = {
1421
+ }, Uo = ["onClick"], Fo = { class: "vv-dialog__content" }, Ko = {
1595
1422
  key: 1,
1596
1423
  class: "vv-dialog__footer"
1597
- }, Ca = {
1424
+ }, Wo = {
1598
1425
  name: "VvDialog"
1599
- }, bo = /* @__PURE__ */ D({
1600
- ...Ca,
1601
- props: ya,
1602
- emits: ga,
1603
- setup(l, { emit: t }) {
1604
- const e = l, n = Je(e, "modelValue", t), o = G(!0), r = G(null), s = i(() => {
1605
- const { id: p } = e;
1426
+ }, Ts = /* @__PURE__ */ N({
1427
+ ...Wo,
1428
+ props: xo,
1429
+ emits: Ho,
1430
+ setup(o, { emit: s }) {
1431
+ const e = o, n = useVModel(e, "modelValue", s), l = ref(!0), i = ref(null), r = computed(() => {
1432
+ const { id: c } = e;
1606
1433
  return {
1607
- id: p,
1608
- open: o.value
1434
+ id: c,
1435
+ open: l.value
1609
1436
  };
1610
- }), b = i(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), c = i(() => `vv-dialog--${e.transition}`), d = {
1437
+ }), f = computed(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), p = computed(() => `vv-dialog--${e.transition}`), u = {
1611
1438
  "before-enter": () => {
1612
- o.value = !0, t("open");
1439
+ l.value = !0, s("open");
1613
1440
  },
1614
1441
  "after-leave": () => {
1615
- o.value = !1, t("close");
1442
+ l.value = !1, s("close");
1616
1443
  }
1617
1444
  };
1618
- pt(r, () => {
1445
+ onClickOutside(i, () => {
1619
1446
  e.autoClose && (n.value = !1);
1620
1447
  });
1621
- function u() {
1448
+ function a() {
1622
1449
  n.value = !1;
1623
1450
  }
1624
- return (p, v) => (m(), T(Ut, R({ name: a(c) }, jt(d)), {
1625
- default: we(() => [
1626
- Se(E("dialog", R(a(s), { class: a(b) }), [
1627
- E("article", {
1451
+ return (c, d) => (m(), D(mt, O({ name: t(p) }, ft(u)), {
1452
+ default: ge(() => [
1453
+ ve(R("dialog", O(t(r), { class: t(f) }), [
1454
+ R("article", {
1628
1455
  ref_key: "modalWrapper",
1629
- ref: r,
1456
+ ref: i,
1630
1457
  class: "vv-dialog__wrapper"
1631
1458
  }, [
1632
- p.$slots.header || p.title ? (m(), _("header", _a, [
1633
- A(p.$slots, "header", {}, () => [
1634
- X(L(p.title) + " ", 1),
1635
- E("button", {
1459
+ c.$slots.header || c.title ? (m(), _("header", Go, [
1460
+ k(c.$slots, "header", {}, () => [
1461
+ q(B(c.title) + " ", 1),
1462
+ R("button", {
1636
1463
  type: "button",
1637
1464
  "aria-label": "Close",
1638
1465
  class: "vv-dialog__close",
1639
- onClick: Ze(u, ["prevent"])
1466
+ onClick: Be(a, ["prevent"])
1640
1467
  }, [
1641
- oe(U, { name: "close" })
1642
- ], 8, Sa)
1468
+ Z(x, { name: "close" })
1469
+ ], 8, Uo)
1643
1470
  ])
1644
1471
  ])) : I("", !0),
1645
- E("div", Va, [
1646
- A(p.$slots, "default")
1472
+ R("div", Fo, [
1473
+ k(c.$slots, "default")
1647
1474
  ]),
1648
- p.$slots.footer ? (m(), _("footer", $a, [
1649
- A(p.$slots, "footer")
1475
+ c.$slots.footer ? (m(), _("footer", Ko, [
1476
+ k(c.$slots, "footer")
1650
1477
  ])) : I("", !0)
1651
1478
  ], 512)
1652
1479
  ], 16), [
1653
- [Kt, a(n)]
1480
+ [bt, t(n)]
1654
1481
  ])
1655
1482
  ]),
1656
1483
  _: 3
1657
1484
  }, 16, ["name"]));
1658
1485
  }
1659
- });
1660
- function At(l, t, e = 0) {
1661
- let n;
1662
- return typeof e == "string" && (e = parseInt(e)), i({
1663
- get: () => l == null ? void 0 : l.value,
1664
- set: (o) => {
1665
- n && clearTimeout(n), n = setTimeout(() => {
1666
- t("update:modelValue", o);
1667
- }, e);
1668
- }
1669
- });
1670
- }
1671
- function kt(l, t) {
1672
- const e = i(() => (a(l) ?? "").length), n = i(() => (t == null ? void 0 : t.lowerLimit) !== void 0 && e.value < (t == null ? void 0 : t.lowerLimit) ? e.value - t.lowerLimit : (t == null ? void 0 : t.upperLimit) !== void 0 && e.value < (t == null ? void 0 : t.upperLimit) ? t.upperLimit - e.value : 0), o = i(() => (t == null ? void 0 : t.mode) === !1 ? "" : (t == null ? void 0 : t.mode) === "limit" && (t != null && t.upperLimit) ? `${e.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : (t == null ? void 0 : t.mode) === "countdown" ? n.value === 0 ? void 0 : n : e.value);
1673
- return {
1674
- length: e,
1675
- gap: n,
1676
- formatted: o
1677
- };
1678
- }
1679
- const S = {
1486
+ }), S = {
1680
1487
  TEXT: "text",
1681
1488
  PASSWORD: "password",
1682
1489
  NUMBER: "number",
@@ -1690,20 +1497,20 @@ const S = {
1690
1497
  DATETIME_LOCAL: "datetime-local",
1691
1498
  MONTH: "month",
1692
1499
  WEEK: "week"
1693
- }, be = {
1500
+ }, ue = {
1694
1501
  PASSWORD_SHOW: "eye-on",
1695
1502
  PASSWORD_HIDE: "eye-off",
1696
1503
  DATE: "calendar",
1697
1504
  TIME: "time",
1698
1505
  COLOR: "color",
1699
1506
  SEARCH: "close"
1700
- }, Aa = ["update:modelValue", "focus", "blur", "keyup"], ka = {
1701
- ..._t,
1507
+ }, qo = ["update:modelValue", "focus", "blur", "keyup"], jo = {
1508
+ ...Je,
1702
1509
  modelValue: [String, Number],
1703
1510
  type: {
1704
1511
  type: String,
1705
1512
  default: S.TEXT,
1706
- validator: (l) => Object.values(S).includes(l)
1513
+ validator: (o) => Object.values(S).includes(o)
1707
1514
  },
1708
1515
  min: [Number, Date, String],
1709
1516
  max: [Number, Date, String],
@@ -1712,15 +1519,15 @@ const S = {
1712
1519
  multiple: Boolean,
1713
1520
  iconShowPassword: {
1714
1521
  type: String,
1715
- default: be.PASSWORD_SHOW
1522
+ default: ue.PASSWORD_SHOW
1716
1523
  },
1717
1524
  iconHidePassword: {
1718
1525
  type: String,
1719
- default: be.PASSWORD_HIDE
1526
+ default: ue.PASSWORD_HIDE
1720
1527
  },
1721
1528
  iconClear: {
1722
1529
  type: String,
1723
- default: be.SEARCH
1530
+ default: ue.SEARCH
1724
1531
  },
1725
1532
  labelStepUp: {
1726
1533
  type: String,
@@ -1742,9 +1549,9 @@ const S = {
1742
1549
  type: String,
1743
1550
  default: "Clear"
1744
1551
  }
1745
- }, rt = D({
1552
+ }, xe = defineComponent({
1746
1553
  components: {
1747
- VvIcon: U
1554
+ VvIcon: x
1748
1555
  },
1749
1556
  props: {
1750
1557
  disabled: {
@@ -1761,33 +1568,33 @@ const S = {
1761
1568
  },
1762
1569
  iconShow: {
1763
1570
  type: String,
1764
- default: be.PASSWORD_SHOW
1571
+ default: ue.PASSWORD_SHOW
1765
1572
  },
1766
1573
  iconHide: {
1767
1574
  type: String,
1768
- default: be.PASSWORD_HIDE
1575
+ default: ue.PASSWORD_HIDE
1769
1576
  }
1770
1577
  },
1771
1578
  emits: ["toggle-password"],
1772
- setup(l, { emit: t }) {
1773
- const e = G(!1), n = i(
1774
- () => e.value ? l.iconHide : l.iconShow
1579
+ setup(o, { emit: s }) {
1580
+ const e = ref(!1), n = computed(
1581
+ () => e.value ? o.iconHide : o.iconShow
1775
1582
  );
1776
- function o(r) {
1777
- r == null || r.stopPropagation(), l.disabled || (e.value = !e.value, t("toggle-password", e.value));
1583
+ function l(i) {
1584
+ i == null || i.stopPropagation(), o.disabled || (e.value = !e.value, s("toggle-password", e.value));
1778
1585
  }
1779
1586
  return {
1780
1587
  active: e,
1781
1588
  activeIcon: n,
1782
- onClick: o
1589
+ onClick: l
1783
1590
  };
1784
1591
  },
1785
1592
  render() {
1786
- const l = Q(U, {
1593
+ const o = h(x, {
1787
1594
  name: this.activeIcon,
1788
1595
  class: "vv-input-text__action-icon"
1789
1596
  });
1790
- return Q(
1597
+ return h(
1791
1598
  "button",
1792
1599
  {
1793
1600
  disabled: this.disabled,
@@ -1796,12 +1603,12 @@ const S = {
1796
1603
  type: "button",
1797
1604
  onClick: this.onClick
1798
1605
  },
1799
- l
1606
+ o
1800
1607
  );
1801
1608
  }
1802
- }), We = D({
1609
+ }), Re = defineComponent({
1803
1610
  components: {
1804
- VvIcon: U
1611
+ VvIcon: x
1805
1612
  },
1806
1613
  props: {
1807
1614
  disabled: {
@@ -1813,22 +1620,22 @@ const S = {
1813
1620
  },
1814
1621
  mode: {
1815
1622
  type: String,
1816
- validator: (l) => ["up", "down"].includes(l),
1623
+ validator: (o) => ["up", "down"].includes(o),
1817
1624
  default: "up"
1818
1625
  }
1819
1626
  },
1820
1627
  emits: ["step-up", "step-down"],
1821
- setup(l, { emit: t }) {
1822
- const e = i(() => l.mode === "up");
1628
+ setup(o, { emit: s }) {
1629
+ const e = computed(() => o.mode === "up");
1823
1630
  return {
1824
1631
  isUp: e,
1825
- onClick: (o) => {
1826
- o == null || o.stopPropagation(), l.disabled || t(e.value ? "step-up" : "step-down");
1632
+ onClick: (l) => {
1633
+ l == null || l.stopPropagation(), o.disabled || s(e.value ? "step-up" : "step-down");
1827
1634
  }
1828
1635
  };
1829
1636
  },
1830
1637
  render() {
1831
- return Q("button", {
1638
+ return h("button", {
1832
1639
  class: [
1833
1640
  "vv-input-text__action-chevron",
1834
1641
  this.isUp && "vv-input-text__action-chevron-up"
@@ -1838,9 +1645,9 @@ const S = {
1838
1645
  onClick: this.onClick
1839
1646
  });
1840
1647
  }
1841
- }), it = D({
1648
+ }), Ge = defineComponent({
1842
1649
  components: {
1843
- VvIcon: U
1650
+ VvIcon: x
1844
1651
  },
1845
1652
  props: {
1846
1653
  disabled: {
@@ -1857,20 +1664,20 @@ const S = {
1857
1664
  }
1858
1665
  },
1859
1666
  emits: ["clear"],
1860
- setup(l, { emit: t }) {
1667
+ setup(o, { emit: s }) {
1861
1668
  function e(n) {
1862
- n == null || n.stopPropagation(), l.disabled || t("clear");
1669
+ n == null || n.stopPropagation(), o.disabled || s("clear");
1863
1670
  }
1864
1671
  return {
1865
1672
  onClick: e
1866
1673
  };
1867
1674
  },
1868
1675
  render() {
1869
- const l = Q(U, {
1676
+ const o = h(x, {
1870
1677
  name: this.icon,
1871
1678
  class: "vv-input-text__action-icon"
1872
1679
  });
1873
- return Q(
1680
+ return h(
1874
1681
  "button",
1875
1682
  {
1876
1683
  disabled: this.disabled,
@@ -1879,38 +1686,38 @@ const S = {
1879
1686
  type: "button",
1880
1687
  onClick: this.onClick
1881
1688
  },
1882
- l
1689
+ o
1883
1690
  );
1884
1691
  }
1885
1692
  });
1886
- function ze(l, t) {
1693
+ function Oe(o, s) {
1887
1694
  return {
1888
1695
  name: "VvInputTextActions",
1889
1696
  components: {
1890
- VvIcon: U,
1891
- VvInputPasswordAction: rt,
1892
- VvInputStepAction: We,
1893
- VvInputClearAction: it
1697
+ VvIcon: x,
1698
+ VvInputPasswordAction: xe,
1699
+ VvInputStepAction: Re,
1700
+ VvInputClearAction: Ge
1894
1701
  },
1895
1702
  setup() {
1896
1703
  return {
1897
- isDisabled: i(() => t.disabled || t.readonly),
1898
- labelStepUp: t.labelStepUp,
1899
- labelStepDown: t.labelStepDown,
1900
- labelShowPassword: t.labelShowPassword,
1901
- labelHidePassword: t.labelHidePassword,
1902
- labelClear: t.labelClear,
1903
- iconShowPassword: t.iconShowPassword,
1904
- iconHidePassword: t.iconHidePassword
1704
+ isDisabled: computed(() => s.disabled || s.readonly),
1705
+ labelStepUp: s.labelStepUp,
1706
+ labelStepDown: s.labelStepDown,
1707
+ labelShowPassword: s.labelShowPassword,
1708
+ labelHidePassword: s.labelHidePassword,
1709
+ labelClear: s.labelClear,
1710
+ iconShowPassword: s.iconShowPassword,
1711
+ iconHidePassword: s.iconHidePassword
1905
1712
  };
1906
1713
  },
1907
1714
  render() {
1908
1715
  let e = null;
1909
- switch (l) {
1716
+ switch (o) {
1910
1717
  case S.SEARCH: {
1911
1718
  const { onClear: n } = this.$attrs;
1912
1719
  e = [
1913
- Q(it, {
1720
+ h(Ge, {
1914
1721
  disabled: this.isDisabled,
1915
1722
  label: this.labelShowPassword,
1916
1723
  onClear: n
@@ -1921,7 +1728,7 @@ function ze(l, t) {
1921
1728
  case S.PASSWORD: {
1922
1729
  const { onTogglePassword: n } = this.$attrs;
1923
1730
  e = [
1924
- Q(rt, {
1731
+ h(xe, {
1925
1732
  disabled: this.isDisabled,
1926
1733
  onTogglePassword: n,
1927
1734
  labelShow: this.labelShowPassword,
@@ -1933,189 +1740,189 @@ function ze(l, t) {
1933
1740
  break;
1934
1741
  }
1935
1742
  case S.NUMBER: {
1936
- const { onStepUp: n, onStepDown: o } = this.$attrs;
1743
+ const { onStepUp: n, onStepDown: l } = this.$attrs;
1937
1744
  e = [
1938
- Q(We, {
1745
+ h(Re, {
1939
1746
  mode: "up",
1940
- disabled: this.isDisabled || t.max !== void 0 && t.modelValue === t.max,
1747
+ disabled: this.isDisabled || s.max !== void 0 && s.modelValue === s.max,
1941
1748
  label: this.labelStepUp,
1942
1749
  onStepUp: n,
1943
- onStepDown: o
1750
+ onStepDown: l
1944
1751
  }),
1945
- Q(We, {
1752
+ h(Re, {
1946
1753
  mode: "down",
1947
- disabled: this.isDisabled || t.min !== void 0 && t.modelValue === t.min,
1754
+ disabled: this.isDisabled || s.min !== void 0 && s.modelValue === s.min,
1948
1755
  label: this.labelStepDown,
1949
1756
  onStepUp: n,
1950
- onStepDown: o
1757
+ onStepDown: l
1951
1758
  })
1952
1759
  ];
1953
1760
  break;
1954
1761
  }
1955
1762
  }
1956
- return Array.isArray(e) ? Q("div", { class: "vv-input-text__actions-group" }, e) : e;
1763
+ return Array.isArray(e) ? h("div", { class: "vv-input-text__actions-group" }, e) : e;
1957
1764
  }
1958
1765
  };
1959
1766
  }
1960
- const wa = ["for"], Pa = { class: "vv-input-text__wrapper" }, Ia = ["id"], Oa = {
1767
+ const zo = ["for"], Xo = { class: "vv-input-text__wrapper" }, Yo = ["id"], Jo = {
1961
1768
  key: 0,
1962
1769
  class: "vv-input-text__limit"
1963
- }, Ea = {
1770
+ }, Qo = {
1964
1771
  name: "VvInputText"
1965
- }, ho = /* @__PURE__ */ D({
1966
- ...Ea,
1967
- props: ka,
1968
- emits: Aa,
1969
- setup(l, { emit: t }) {
1970
- const e = l, n = ce(), o = G(), {
1971
- icon: r,
1972
- iconPosition: s,
1973
- label: b,
1974
- modelValue: c,
1975
- count: d,
1976
- valid: u,
1977
- invalid: p,
1978
- loading: v
1979
- } = F(e), h = i(() => String(e.id || ve())), g = i(() => `${h.value}-hint`), y = i(
1980
- () => e.floating && ee(e.placeholder) ? " " : e.placeholder
1981
- ), f = At(c, t, e.debounce), { focused: V } = Ke(o, t), P = Qe(o);
1982
- Ae(P, (O) => {
1983
- O && e.autofocus && (V.value = !0);
1772
+ }, Ls = /* @__PURE__ */ N({
1773
+ ...Qo,
1774
+ props: jo,
1775
+ emits: qo,
1776
+ setup(o, { emit: s }) {
1777
+ const e = o, n = useSlots(), l = ref(), {
1778
+ icon: i,
1779
+ iconPosition: r,
1780
+ label: f,
1781
+ modelValue: p,
1782
+ count: u,
1783
+ valid: a,
1784
+ invalid: c,
1785
+ loading: d
1786
+ } = toRefs(e), b = computed(() => String(e.id || ne())), g = computed(() => `${b.value}-hint`), y = computed(
1787
+ () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
1788
+ ), v = useDebouncedInput(p, s, e.debounce), { focused: V } = useComponentFocus(l, s), w = useElementVisibility(l);
1789
+ watch(w, (E) => {
1790
+ E && e.autofocus && (V.value = !0);
1984
1791
  });
1985
- const $ = G(!1), x = i(() => e.type === S.PASSWORD), C = () => {
1986
- $.value = !$.value;
1987
- }, M = i(
1792
+ const C = ref(!1), M = computed(() => e.type === S.PASSWORD), $ = () => {
1793
+ C.value = !C.value;
1794
+ }, H = computed(
1988
1795
  () => e.type === S.TIME || e.type === S.DATETIME_LOCAL || e.type === S.DATE || e.type === S.WEEK || e.type === S.MONTH
1989
- ), J = i(() => e.type === S.NUMBER), B = () => {
1990
- ue.value && (o.value.stepUp(), f.value = a(o).value);
1991
- }, j = () => {
1992
- ue.value && (o.value.stepDown(), f.value = a(o).value);
1993
- }, le = i(() => e.type === S.SEARCH), ne = () => {
1994
- f.value = void 0;
1995
- }, { hasIconLeft: se, hasIconRight: ae, hasIcon: fe } = je(
1996
- r,
1997
- s
1998
- ), re = i(() => {
1796
+ ), X = computed(() => e.type === S.NUMBER), T = () => {
1797
+ le.value && (l.value.stepUp(), v.value = unref(l).value);
1798
+ }, G = () => {
1799
+ le.value && (l.value.stepDown(), v.value = unref(l).value);
1800
+ }, J = computed(() => e.type === S.SEARCH), ee = () => {
1801
+ v.value = void 0;
1802
+ }, { hasIconLeft: te, hasIconRight: Q, hasIcon: ie } = useComponentIcon(
1803
+ i,
1804
+ r
1805
+ ), oe = computed(() => {
1999
1806
  switch (e.type) {
2000
1807
  case S.COLOR:
2001
- return { name: be.COLOR };
1808
+ return { name: ue.COLOR };
2002
1809
  case S.DATE:
2003
1810
  case S.DATETIME_LOCAL:
2004
1811
  case S.WEEK:
2005
1812
  case S.MONTH:
2006
- return { name: be.DATE };
1813
+ return { name: ue.DATE };
2007
1814
  case S.TIME:
2008
- return { name: be.TIME };
1815
+ return { name: ue.TIME };
2009
1816
  default:
2010
1817
  return "";
2011
1818
  }
2012
- }), { formatted: ie } = kt(f, {
1819
+ }), { formatted: se } = useTextCount(v, {
2013
1820
  mode: e.count,
2014
1821
  upperLimit: e.maxlength,
2015
1822
  lowerLimit: e.minlength
2016
- }), ue = i(() => !e.disabled && !e.readonly), q = i(
2017
- () => ue.value ? e.tabindex : -1
2018
- ), w = i(() => !ee(c)), Z = i(() => {
2019
- if (p.value === !0)
1823
+ }), le = computed(() => !e.disabled && !e.readonly), W = computed(
1824
+ () => le.value ? e.tabindex : -1
1825
+ ), P = computed(() => !isEmpty(p)), j = computed(() => {
1826
+ if (c.value === !0)
2020
1827
  return !0;
2021
- if (u.value === !0)
1828
+ if (a.value === !0)
2022
1829
  return !1;
2023
- }), { bemCssClasses: k } = H("vv-input-text", {
1830
+ }), { bemCssClasses: A } = useBemModifiers("vv-input-text", {
2024
1831
  modifiers: e.modifiers,
2025
- valid: u,
2026
- invalid: p,
2027
- loading: v,
1832
+ valid: a,
1833
+ invalid: c,
1834
+ loading: d,
2028
1835
  disabled: e.disabled,
2029
1836
  readonly: e.readonly,
2030
- iconLeft: se,
2031
- iconRight: ae.value || !ee(re),
2032
- floating: e.floating && !ee(e.label),
2033
- dirty: w,
1837
+ iconLeft: te,
1838
+ iconRight: Q.value || !isEmpty(oe),
1839
+ floating: e.floating && !isEmpty(e.label),
1840
+ dirty: P,
2034
1841
  focus: V
2035
- }), N = i(() => {
2036
- const O = (() => x.value && $.value || M.value && !w.value && !V.value ? S.TEXT : e.type)(), z = {
2037
- type: O,
1842
+ }), L = computed(() => {
1843
+ const E = (() => M.value && C.value || H.value && !P.value && !V.value ? S.TEXT : e.type)(), K = {
1844
+ type: E,
2038
1845
  name: e.name,
2039
- tabindex: q.value,
1846
+ tabindex: W.value,
2040
1847
  disabled: e.disabled,
2041
1848
  readonly: e.readonly,
2042
1849
  required: e.required,
2043
1850
  autocomplete: e.autocomplete,
2044
- "aria-invalid": Z.value,
2045
- "aria-describedby": !at.value && Pt.value ? g.value : void 0,
2046
- "aria-errormessage": at.value ? g.value : void 0
1851
+ "aria-invalid": j.value,
1852
+ "aria-describedby": !Me.value && st.value ? g.value : void 0,
1853
+ "aria-errormessage": Me.value ? g.value : void 0
2047
1854
  };
2048
- return (O === S.DATE || O === S.MONTH || O === S.WEEK || O === S.TIME || O === S.DATETIME_LOCAL || O === S.NUMBER) && (z.step = e.step, z.max = String(e.max), z.min = String(e.min)), (O === S.TEXT || O === S.SEARCH || O === S.URL || O === S.TEL || O === S.EMAIL || O === S.PASSWORD || O === S.NUMBER) && (z.placeholder = y.value), (O === S.TEXT || O === S.SEARCH || O === S.URL || O === S.TEL || O === S.EMAIL || O === S.PASSWORD) && (z.minlength = e.minlength, z.maxlength = e.maxlength, z.pattern = e.pattern), O === S.EMAIL && (z.multiple = e.multiple), z;
2049
- }), Y = i(() => ({
1855
+ return (E === S.DATE || E === S.MONTH || E === S.WEEK || E === S.TIME || E === S.DATETIME_LOCAL || E === S.NUMBER) && (K.step = e.step, K.max = String(e.max), K.min = String(e.min)), (E === S.TEXT || E === S.SEARCH || E === S.URL || E === S.TEL || E === S.EMAIL || E === S.PASSWORD || E === S.NUMBER) && (K.placeholder = y.value), (E === S.TEXT || E === S.SEARCH || E === S.URL || E === S.TEL || E === S.EMAIL || E === S.PASSWORD) && (K.minlength = e.minlength, K.maxlength = e.maxlength, K.pattern = e.pattern), E === S.EMAIL && (K.multiple = e.multiple), K;
1856
+ }), z = computed(() => ({
2050
1857
  valid: e.valid,
2051
1858
  invalid: e.invalid,
2052
1859
  modelValue: e.modelValue,
2053
- togglePassword: C,
2054
- stepUp: B,
2055
- stepDown: j,
2056
- clear: ne
2057
- })), { HintSlot: wt, hasHint: Pt, hasInvalid: at } = _e(e, n), It = ze(
1860
+ togglePassword: $,
1861
+ stepUp: T,
1862
+ stepDown: G,
1863
+ clear: ee
1864
+ })), { HintSlot: ot, hasHint: st, hasInvalid: Me } = pe(e, n), lt = Oe(
2058
1865
  S.PASSWORD,
2059
1866
  e
2060
- ), Ot = ze(
1867
+ ), at = Oe(
2061
1868
  S.NUMBER,
2062
1869
  e
2063
- ), Et = ze(
1870
+ ), nt = Oe(
2064
1871
  S.SEARCH,
2065
1872
  e
2066
1873
  );
2067
- return (O, z) => (m(), _("div", {
2068
- class: K(a(k))
1874
+ return (E, K) => (m(), _("div", {
1875
+ class: U(t(A))
2069
1876
  }, [
2070
- a(b) ? (m(), _("label", {
1877
+ t(f) ? (m(), _("label", {
2071
1878
  key: 0,
2072
- for: a(h),
1879
+ for: t(b),
2073
1880
  class: "vv-input-text__label"
2074
- }, L(a(b)), 9, wa)) : I("", !0),
2075
- E("div", Pa, [
2076
- A(O.$slots, "before", W(te(a(Y))), () => [
2077
- a(se) ? (m(), T(U, R({
1881
+ }, B(t(f)), 9, zo)) : I("", !0),
1882
+ R("div", Xo, [
1883
+ k(E.$slots, "before", F(Y(t(z))), () => [
1884
+ t(te) ? (m(), D(x, O({
2078
1885
  key: 0,
2079
1886
  class: "vv-input-text__icon-left"
2080
- }, a(fe)), null, 16)) : I("", !0)
1887
+ }, t(ie)), null, 16)) : I("", !0)
2081
1888
  ]),
2082
- Se(E("input", R({
2083
- id: a(h),
1889
+ ve(R("input", O({
1890
+ id: t(b),
2084
1891
  ref_key: "input",
2085
- ref: o,
2086
- "onUpdate:modelValue": z[0] || (z[0] = (Fe) => $e(f) ? f.value = Fe : null)
2087
- }, a(N), {
2088
- onKeyup: z[1] || (z[1] = (Fe) => t("keyup", Fe))
2089
- }), null, 16, Ia), [
2090
- [Ft, a(f)]
1892
+ ref: l,
1893
+ "onUpdate:modelValue": K[0] || (K[0] = (Ee) => be(v) ? v.value = Ee : null)
1894
+ }, t(L), {
1895
+ onKeyup: K[1] || (K[1] = (Ee) => s("keyup", Ee))
1896
+ }), null, 16, Yo), [
1897
+ [ht, t(v)]
2091
1898
  ]),
2092
- A(O.$slots, "after", W(te(a(Y))), () => [
2093
- a(ae) || a(re) ? (m(), T(U, W(R({ key: 0 }, a(ae) ? a(fe) : a(re))), null, 16)) : a(x) ? (m(), T(a(It), {
1899
+ k(E.$slots, "after", F(Y(t(z))), () => [
1900
+ t(Q) || t(oe) ? (m(), D(x, F(O({ key: 0 }, t(Q) ? t(ie) : t(oe))), null, 16)) : t(M) ? (m(), D(t(lt), {
2094
1901
  key: 1,
2095
- onTogglePassword: C
2096
- })) : a(J) ? (m(), T(a(Ot), {
1902
+ onTogglePassword: $
1903
+ })) : t(X) ? (m(), D(t(at), {
2097
1904
  key: 2,
2098
- onStepUp: B,
2099
- onStepDown: j
2100
- })) : a(le) ? (m(), T(a(Et), {
1905
+ onStepUp: T,
1906
+ onStepDown: G
1907
+ })) : t(J) ? (m(), D(t(nt), {
2101
1908
  key: 3,
2102
- onClear: ne
1909
+ onClear: ee
2103
1910
  })) : I("", !0)
2104
1911
  ]),
2105
- a(d) ? (m(), _("span", Oa, [
2106
- A(O.$slots, "count", W(te(a(Y))), () => [
2107
- X(L(a(ie)), 1)
1912
+ t(u) ? (m(), _("span", Jo, [
1913
+ k(E.$slots, "count", F(Y(t(z))), () => [
1914
+ q(B(t(se)), 1)
2108
1915
  ])
2109
1916
  ])) : I("", !0)
2110
1917
  ]),
2111
- oe(a(wt), {
2112
- id: a(g),
1918
+ Z(t(ot), {
1919
+ id: t(g),
2113
1920
  class: "vv-input-text__hint"
2114
1921
  }, null, 8, ["id"])
2115
1922
  ], 2));
2116
1923
  }
2117
- }), Ra = {
2118
- ...pe,
1924
+ }), Zo = {
1925
+ ...re,
2119
1926
  value: {
2120
1927
  type: [Number, String],
2121
1928
  default: void 0
@@ -2127,209 +1934,209 @@ const wa = ["for"], Pa = { class: "vv-input-text__wrapper" }, Ia = ["id"], Oa =
2127
1934
  type: String,
2128
1935
  required: !0
2129
1936
  }
2130
- }, La = {
1937
+ }, es = {
2131
1938
  name: "VvProgress"
2132
- }, go = /* @__PURE__ */ D({
2133
- ...La,
2134
- props: Ra,
2135
- setup(l) {
2136
- const t = l, { value: e, max: n, label: o } = F(t), r = i(() => t.value === void 0), { bemCssClasses: s } = H("vv-progress", {
2137
- modifiers: t.modifiers,
2138
- indeterminate: r
1939
+ }, Ms = /* @__PURE__ */ N({
1940
+ ...es,
1941
+ props: Zo,
1942
+ setup(o) {
1943
+ const s = o, { value: e, max: n, label: l } = toRefs(s), i = computed(() => s.value === void 0), { bemCssClasses: r } = useBemModifiers("vv-progress", {
1944
+ modifiers: s.modifiers,
1945
+ indeterminate: i
2139
1946
  });
2140
- return (b, c) => (m(), _("progress", R({ role: "progressbar" }, {
2141
- class: a(s),
2142
- ariaLabel: a(o),
2143
- max: a(n),
2144
- value: a(e)
1947
+ return (f, p) => (m(), _("progress", O({ role: "progressbar" }, {
1948
+ class: t(r),
1949
+ ariaLabel: t(l),
1950
+ max: t(n),
1951
+ value: t(e)
2145
1952
  }), null, 16));
2146
1953
  }
2147
- }), Da = St, Ta = ["click", "update:modelValue", "change", "blur"];
2148
- function Ba(l, t) {
2149
- const { group: e, isInGroup: n, getGroupOrLocalRef: o } = xe(mt), r = o("modelValue", l, t), s = o("readonly", l), b = o("disabled", l), c = o("valid", l), d = o("invalid", l);
1954
+ }), ts = Qe, os = ["click", "update:modelValue", "change", "blur"];
1955
+ function ss(o, s) {
1956
+ const { group: e, isInGroup: n, getGroupOrLocalRef: l } = useInjectedGroupState(qe), i = l("modelValue", o, s), r = l("readonly", o), f = l("disabled", o), p = l("valid", o), u = l("invalid", o);
2150
1957
  return {
2151
1958
  group: e,
2152
1959
  isInGroup: n,
2153
- modelValue: r,
2154
- readonly: s,
2155
- disabled: b,
2156
- valid: c,
2157
- invalid: d
1960
+ modelValue: i,
1961
+ readonly: r,
1962
+ disabled: f,
1963
+ valid: p,
1964
+ invalid: u
2158
1965
  };
2159
1966
  }
2160
- const Na = ["for"], xa = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ha = {
1967
+ const ls = ["for"], as = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], ns = {
2161
1968
  name: "VvRadio"
2162
- }, Ma = /* @__PURE__ */ D({
2163
- ...Ha,
2164
- props: Da,
2165
- emits: Ta,
2166
- setup(l, { emit: t }) {
2167
- const e = l, n = ce(), { disabled: o, readonly: r, modelValue: s, valid: b, invalid: c } = Ba(
1969
+ }, rs = /* @__PURE__ */ N({
1970
+ ...ns,
1971
+ props: ts,
1972
+ emits: os,
1973
+ setup(o, { emit: s }) {
1974
+ const e = o, n = useSlots(), { disabled: l, readonly: i, modelValue: r, valid: f, invalid: p } = ss(
2168
1975
  e,
2169
- t
2170
- ), d = i(() => String(e.id || ve())), u = i(() => v.value ? -1 : e.tabindex), p = G(), v = i(() => o.value || r.value), h = i(() => {
2171
- if (c.value === !0)
1976
+ s
1977
+ ), u = computed(() => String(e.id || ne())), a = computed(() => d.value ? -1 : e.tabindex), c = ref(), d = computed(() => l.value || i.value), b = computed(() => {
1978
+ if (p.value === !0)
2172
1979
  return !0;
2173
- if (b.value === !0)
1980
+ if (f.value === !0)
2174
1981
  return !1;
2175
- }), g = i(
2176
- () => Array.isArray(s.value) ? me(e.value, s.value) : he(e.value, s.value)
2177
- ), y = i(
1982
+ }), g = computed(
1983
+ () => Array.isArray(r.value) ? contains(e.value, r.value) : equals(e.value, r.value)
1984
+ ), y = computed(
2178
1985
  () => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
2179
- ), f = i({
1986
+ ), v = computed({
2180
1987
  get() {
2181
1988
  return g.value ? y.value : null;
2182
1989
  },
2183
- set($) {
2184
- Array.isArray(s.value) ? s.value = [e.value] : s.value = e.value, t("change", $);
1990
+ set(C) {
1991
+ Array.isArray(r.value) ? r.value = [e.value] : r.value = e.value, s("change", C);
2185
1992
  }
2186
- }), { bemCssClasses: V } = H("vv-radio", {
2187
- valid: b,
2188
- invalid: c,
2189
- disabled: o,
2190
- readonly: r
2191
- }), { HintSlot: P } = _e(e, n);
2192
- return ($, x) => (m(), _("label", {
2193
- class: K(a(V)),
2194
- for: a(d)
1993
+ }), { bemCssClasses: V } = useBemModifiers("vv-radio", {
1994
+ valid: f,
1995
+ invalid: p,
1996
+ disabled: l,
1997
+ readonly: i
1998
+ }), { HintSlot: w } = pe(e, n);
1999
+ return (C, M) => (m(), _("label", {
2000
+ class: U(t(V)),
2001
+ for: t(u)
2195
2002
  }, [
2196
- Se(E("input", {
2197
- id: a(d),
2003
+ ve(R("input", {
2004
+ id: t(u),
2198
2005
  ref_key: "input",
2199
- ref: p,
2200
- "onUpdate:modelValue": x[0] || (x[0] = (C) => $e(f) ? f.value = C : null),
2006
+ ref: c,
2007
+ "onUpdate:modelValue": M[0] || (M[0] = ($) => be(v) ? v.value = $ : null),
2201
2008
  type: "radio",
2202
2009
  class: "vv-radio__input",
2203
- name: $.name,
2204
- disabled: a(v),
2205
- value: a(y),
2206
- tabindex: a(u),
2207
- "aria-invalid": a(h)
2208
- }, null, 8, xa), [
2209
- [Wt, a(f)]
2010
+ name: C.name,
2011
+ disabled: t(d),
2012
+ value: t(y),
2013
+ tabindex: t(a),
2014
+ "aria-invalid": t(b)
2015
+ }, null, 8, as), [
2016
+ [gt, t(v)]
2210
2017
  ]),
2211
- A($.$slots, "default", { value: a(s) }, () => [
2212
- X(L($.label), 1)
2018
+ k(C.$slots, "default", { value: t(r) }, () => [
2019
+ q(B(C.label), 1)
2213
2020
  ]),
2214
- oe(a(P), {
2021
+ Z(t(w), {
2215
2022
  class: "vv-radio__hint",
2216
- params: { value: a(s) }
2023
+ params: { value: t(r) }
2217
2024
  }, null, 8, ["params"])
2218
- ], 10, Na));
2025
+ ], 10, ls));
2219
2026
  }
2220
- }), Ga = Vt, Ua = ["update:modelValue", "change"], ja = ["textContent"], Ka = { class: "vv-radio-group__wrapper" }, Fa = {
2027
+ }), is = Ze, us = ["update:modelValue", "change"], ds = ["textContent"], cs = { class: "vv-radio-group__wrapper" }, ps = {
2221
2028
  name: "VvRadioGroup"
2222
- }, yo = /* @__PURE__ */ D({
2223
- ...Fa,
2224
- props: Ga,
2225
- emits: Ua,
2226
- setup(l, { emit: t }) {
2227
- const e = l, n = ce(), o = Je(e, "modelValue", t), { disabled: r, readonly: s, vertical: b, valid: c, invalid: d } = F(e);
2228
- He({
2229
- key: mt,
2230
- modelValue: o,
2231
- disabled: r,
2232
- readonly: s,
2233
- valid: c,
2234
- invalid: d
2235
- });
2236
- const { getOptionLabel: p, getOptionValue: v } = Le(e), { bemCssClasses: h } = H("vv-radio-group", {
2237
- disabled: r,
2238
- readonly: s,
2239
- horizontal: i(() => !b.value),
2240
- valid: c,
2241
- invalid: d
2242
- }), g = (f, V) => ({
2029
+ }, Ns = /* @__PURE__ */ N({
2030
+ ...ps,
2031
+ props: is,
2032
+ emits: us,
2033
+ setup(o, { emit: s }) {
2034
+ const e = o, n = useSlots(), l = useVModel(e, "modelValue", s), { disabled: i, readonly: r, vertical: f, valid: p, invalid: u } = toRefs(e), a = {
2035
+ key: qe,
2036
+ modelValue: l,
2037
+ disabled: i,
2038
+ readonly: r,
2039
+ valid: p,
2040
+ invalid: u
2041
+ };
2042
+ useProvideGroupState(a);
2043
+ const { getOptionLabel: c, getOptionValue: d } = useOptions(e), { bemCssClasses: b } = useBemModifiers("vv-radio-group", {
2044
+ disabled: i,
2045
+ readonly: r,
2046
+ horizontal: computed(() => !f.value),
2047
+ valid: p,
2048
+ invalid: u
2049
+ }), g = (v, V) => ({
2243
2050
  id: `${e.name}_opt${V}`,
2244
2051
  name: e.name,
2245
- label: p(f),
2246
- value: v(f)
2247
- }), { HintSlot: y } = _e(e, n);
2248
- return (f, V) => (m(), _("fieldset", {
2249
- class: K(a(h))
2052
+ label: c(v),
2053
+ value: d(v)
2054
+ }), { HintSlot: y } = pe(e, n);
2055
+ return (v, V) => (m(), _("fieldset", {
2056
+ class: U(t(b))
2250
2057
  }, [
2251
- f.label ? (m(), _("legend", {
2058
+ v.label ? (m(), _("legend", {
2252
2059
  key: 0,
2253
- textContent: L(f.label)
2254
- }, null, 8, ja)) : I("", !0),
2255
- E("div", Ka, [
2256
- f.options.length > 0 ? (m(!0), _(ge, { key: 0 }, Ce(f.options, (P, $) => (m(), T(Ma, R({ key: $ }, g(P, $)), null, 16))), 128)) : A(f.$slots, "default", { key: 1 })
2060
+ textContent: B(v.label)
2061
+ }, null, 8, ds)) : I("", !0),
2062
+ R("div", cs, [
2063
+ v.options.length > 0 ? (m(!0), _(de, { key: 0 }, fe(v.options, (w, C) => (m(), D(rs, O({ key: C }, g(w, C)), null, 16))), 128)) : k(v.$slots, "default", { key: 1 })
2257
2064
  ]),
2258
- oe(a(y), { class: "vv-radio-group__hint" })
2065
+ Z(t(y), { class: "vv-radio-group__hint" })
2259
2066
  ], 2));
2260
2067
  }
2261
- }), Wa = {
2068
+ }), vs = {
2262
2069
  hard: "hard",
2263
2070
  soft: "soft"
2264
- }, za = {
2071
+ }, ms = {
2265
2072
  true: !0,
2266
2073
  false: !1,
2267
2074
  default: "default"
2268
- }, qa = ["update:modelValue", "focus", "blur", "keyup"], Xa = {
2269
- ..._t,
2075
+ }, fs = ["update:modelValue", "focus", "blur", "keyup"], bs = {
2076
+ ...Je,
2270
2077
  modelValue: String,
2271
2078
  cols: { type: [String, Number], default: 20 },
2272
2079
  rows: { type: [String, Number], default: 2 },
2273
- wrap: { type: String, default: Wa.soft },
2274
- spellcheck: { type: [Boolean, String], default: za.default },
2080
+ wrap: { type: String, default: vs.soft },
2081
+ spellcheck: { type: [Boolean, String], default: ms.default },
2275
2082
  resizable: Boolean
2276
- }, Za = ["for"], Ya = { class: "vv-textarea__wrapper" }, Ja = ["id"], Qa = {
2083
+ }, hs = ["for"], gs = { class: "vv-textarea__wrapper" }, ys = ["id"], _s = {
2277
2084
  key: 0,
2278
2085
  class: "vv-textarea__limit"
2279
- }, eo = {
2086
+ }, Ss = {
2280
2087
  name: "VvTextarea"
2281
- }, _o = /* @__PURE__ */ D({
2282
- ...eo,
2283
- props: Xa,
2284
- emits: qa,
2285
- setup(l, { emit: t }) {
2286
- const e = l, n = ce(), o = G(), {
2287
- icon: r,
2288
- iconPosition: s,
2289
- label: b,
2290
- modelValue: c,
2291
- count: d,
2292
- valid: u,
2293
- invalid: p,
2294
- loading: v
2295
- } = F(e), h = i(() => String(e.id || ve())), g = i(() => `${h.value}-hint`), y = i(
2296
- () => e.floating && ee(e.placeholder) ? " " : e.placeholder
2297
- ), f = At(c, t, e.debounce), { hasIcon: V, hasIconLeft: P, hasIconRight: $ } = je(
2298
- r,
2299
- s
2300
- ), { focused: x } = Ke(o, t), C = Qe(o);
2301
- Ae(C, (q) => {
2302
- q && e.autofocus && (x.value = !0);
2088
+ }, Hs = /* @__PURE__ */ N({
2089
+ ...Ss,
2090
+ props: bs,
2091
+ emits: fs,
2092
+ setup(o, { emit: s }) {
2093
+ const e = o, n = useSlots(), l = ref(), {
2094
+ icon: i,
2095
+ iconPosition: r,
2096
+ label: f,
2097
+ modelValue: p,
2098
+ count: u,
2099
+ valid: a,
2100
+ invalid: c,
2101
+ loading: d
2102
+ } = toRefs(e), b = computed(() => String(e.id || ne())), g = computed(() => `${b.value}-hint`), y = computed(
2103
+ () => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
2104
+ ), v = useDebouncedInput(p, s, e.debounce), { hasIcon: V, hasIconLeft: w, hasIconRight: C } = useComponentIcon(
2105
+ i,
2106
+ r
2107
+ ), { focused: M } = useComponentFocus(l, s), $ = useElementVisibility(l);
2108
+ watch($, (W) => {
2109
+ W && e.autofocus && (M.value = !0);
2303
2110
  });
2304
- const { formatted: M } = kt(f, {
2111
+ const { formatted: H } = useTextCount(v, {
2305
2112
  mode: e.count,
2306
2113
  upperLimit: e.maxlength,
2307
2114
  lowerLimit: e.minlength
2308
- }), J = i(() => !e.disabled && !e.readonly), B = i(
2309
- () => J.value ? e.tabindex : -1
2310
- ), j = i(() => !ee(c)), le = i(() => {
2115
+ }), X = computed(() => !e.disabled && !e.readonly), T = computed(
2116
+ () => X.value ? e.tabindex : -1
2117
+ ), G = computed(() => !isEmpty(p)), J = computed(() => {
2311
2118
  if (e.invalid === !0)
2312
2119
  return !0;
2313
2120
  if (e.valid === !0)
2314
2121
  return !1;
2315
- }), { HintSlot: ne, hasHint: se, hasInvalid: ae } = _e(e, n), { bemCssClasses: fe } = H("vv-textarea", {
2122
+ }), { HintSlot: ee, hasHint: te, hasInvalid: Q } = pe(e, n), { bemCssClasses: ie } = useBemModifiers("vv-textarea", {
2316
2123
  modifiers: e.modifiers,
2317
- valid: u,
2318
- invalid: p,
2319
- loading: v,
2124
+ valid: a,
2125
+ invalid: c,
2126
+ loading: d,
2320
2127
  disabled: e.disabled,
2321
2128
  readonly: e.readonly,
2322
- iconLeft: P,
2323
- iconRight: $,
2324
- floating: e.floating && !ee(e.label),
2325
- dirty: j,
2326
- focused: x,
2129
+ iconLeft: w,
2130
+ iconRight: C,
2131
+ floating: e.floating && !isEmpty(e.label),
2132
+ dirty: G,
2133
+ focused: M,
2327
2134
  resizable: e.resizable
2328
- }), re = i(
2135
+ }), oe = computed(
2329
2136
  () => ({
2330
2137
  name: e.name,
2331
2138
  placeholder: y.value,
2332
- tabindex: B.value,
2139
+ tabindex: T.value,
2333
2140
  disabled: e.disabled,
2334
2141
  readonly: e.readonly,
2335
2142
  required: e.required,
@@ -2340,81 +2147,81 @@ const Na = ["for"], xa = ["id", "name", "disabled", "value", "tabindex", "aria-i
2340
2147
  rows: e.rows,
2341
2148
  wrap: e.wrap,
2342
2149
  spellcheck: e.spellcheck,
2343
- "aria-invalid": le.value,
2344
- "aria-describedby": !ae.value && se.value ? g.value : void 0,
2345
- "aria-errormessage": ae.value ? g.value : void 0
2150
+ "aria-invalid": J.value,
2151
+ "aria-describedby": !Q.value && te.value ? g.value : void 0,
2152
+ "aria-errormessage": Q.value ? g.value : void 0
2346
2153
  })
2347
- ), ie = i(() => ({
2154
+ ), se = computed(() => ({
2348
2155
  valid: e.valid,
2349
2156
  invalid: e.invalid,
2350
2157
  modelValue: e.modelValue,
2351
2158
  hintLabel: e.hintLabel,
2352
2159
  maxlength: e.maxlength,
2353
2160
  minlength: e.minlength,
2354
- clear: ue
2355
- })), ue = () => {
2356
- f.value = void 0;
2161
+ clear: le
2162
+ })), le = () => {
2163
+ v.value = void 0;
2357
2164
  };
2358
- return (q, w) => (m(), _("div", {
2359
- class: K(a(fe))
2165
+ return (W, P) => (m(), _("div", {
2166
+ class: U(t(ie))
2360
2167
  }, [
2361
- a(b) ? (m(), _("label", {
2168
+ t(f) ? (m(), _("label", {
2362
2169
  key: 0,
2363
- for: a(h),
2170
+ for: t(b),
2364
2171
  class: "vv-textarea__label"
2365
- }, L(a(b)), 9, Za)) : I("", !0),
2366
- E("div", Ya, [
2367
- A(q.$slots, "before", W(te(a(ie))), () => [
2368
- a(P) ? (m(), T(U, R({
2172
+ }, B(t(f)), 9, hs)) : I("", !0),
2173
+ R("div", gs, [
2174
+ k(W.$slots, "before", F(Y(t(se))), () => [
2175
+ t(w) ? (m(), D(x, O({
2369
2176
  key: 0,
2370
2177
  class: "vv-textarea__icon-left"
2371
- }, a(V)), null, 16)) : I("", !0)
2178
+ }, t(V)), null, 16)) : I("", !0)
2372
2179
  ]),
2373
- Se(E("textarea", R({
2374
- id: a(h),
2180
+ ve(R("textarea", O({
2181
+ id: t(b),
2375
2182
  ref_key: "textarea",
2376
- ref: o,
2377
- "onUpdate:modelValue": w[0] || (w[0] = (Z) => $e(f) ? f.value = Z : null)
2378
- }, a(re), {
2379
- onKeyup: w[1] || (w[1] = (Z) => t("keyup", Z))
2380
- }), null, 16, Ja), [
2381
- [vt, a(f)]
2183
+ ref: l,
2184
+ "onUpdate:modelValue": P[0] || (P[0] = (j) => be(v) ? v.value = j : null)
2185
+ }, t(oe), {
2186
+ onKeyup: P[1] || (P[1] = (j) => s("keyup", j))
2187
+ }), null, 16, ys), [
2188
+ [Ke, t(v)]
2382
2189
  ]),
2383
- A(q.$slots, "after", W(te(a(ie))), () => [
2384
- a($) ? (m(), T(U, W(R({ key: 0 }, a(V))), null, 16)) : I("", !0)
2190
+ k(W.$slots, "after", F(Y(t(se))), () => [
2191
+ t(C) ? (m(), D(x, F(O({ key: 0 }, t(V))), null, 16)) : I("", !0)
2385
2192
  ]),
2386
- a(d) ? (m(), _("span", Qa, [
2387
- A(q.$slots, "count", W(te(a(ie))), () => [
2388
- X(L(a(M)), 1)
2193
+ t(u) ? (m(), _("span", _s, [
2194
+ k(W.$slots, "count", F(Y(t(se))), () => [
2195
+ q(B(t(H)), 1)
2389
2196
  ])
2390
2197
  ])) : I("", !0)
2391
2198
  ]),
2392
- oe(a(ne), {
2393
- id: a(g),
2199
+ Z(t(ee), {
2200
+ id: t(g),
2394
2201
  class: "vv-textarea__hint"
2395
2202
  }, null, 8, ["id"])
2396
2203
  ], 2));
2397
2204
  }
2398
2205
  });
2399
2206
  export {
2400
- so as VolverPlugin,
2401
- il as VvAccordion,
2402
- ro as VvAccordionGroup,
2403
- io as VvBadge,
2404
- uo as VvBreadcrumb,
2405
- co as VvButton,
2406
- vo as VvButtonGroup,
2407
- po as VvCard,
2408
- Ul as VvCheckbox,
2409
- fo as VvCheckboxGroup,
2410
- mo as VvCombobox,
2411
- bo as VvDialog,
2412
- ta as VvDropdown,
2413
- U as VvIcon,
2414
- ho as VvInputText,
2415
- go as VvProgress,
2416
- Ma as VvRadio,
2417
- yo as VvRadioGroup,
2418
- da as VvSelect,
2419
- _o as VvTextarea
2207
+ As as VolverPlugin,
2208
+ Pt as VvAccordion,
2209
+ Ps as VvAccordionGroup,
2210
+ ws as VvBadge,
2211
+ Is as VvBreadcrumb,
2212
+ Es as VvButton,
2213
+ Rs as VvButtonGroup,
2214
+ Os as VvCard,
2215
+ io as VvCheckbox,
2216
+ Bs as VvCheckboxGroup,
2217
+ Ds as VvCombobox,
2218
+ Ts as VvDialog,
2219
+ Vo as VvDropdown,
2220
+ x as VvIcon,
2221
+ Ls as VvInputText,
2222
+ Ms as VvProgress,
2223
+ rs as VvRadio,
2224
+ Ns as VvRadioGroup,
2225
+ Ro as VvSelect,
2226
+ Hs as VvTextarea
2420
2227
  };