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