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