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