@volverjs/ui-vue 0.0.1-beta.11 → 0.0.1-beta.12
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/dist/components/VvBadge/VvBadge.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +165 -12
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +4 -4
- package/dist/components/VvBreadcrumb/VvBreadcrumb.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +4 -4
- package/dist/components/VvButton/VvButton.d.ts +2 -33
- package/dist/components/VvButton/VvButton.es.js +183 -198
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +9 -44
- package/dist/components/VvButton/useButtonGroupProps.d.ts +1 -6
- package/dist/components/VvButtonGroup/VvButtonGroup.d.ts +2 -26
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +68 -78
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +9 -69
- package/dist/components/VvDropdown/VvDropdown.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +4 -4
- package/dist/components/VvInputText/VvInputText.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +4 -4
- package/dist/components/VvProgress/VvProgress.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.d.ts +5 -1
- package/dist/components/VvSelect/VvSelect.es.js +395 -207
- package/dist/components/VvSelect/VvSelect.umd.js +2 -2
- package/dist/components/VvSelect/VvSelect.vue.d.ts +12 -5
- package/dist/components/VvTextarea/VvTextarea.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +4 -4
- package/dist/components/index.es.js +579 -610
- package/dist/components/index.umd.js +2 -2
- package/dist/composables/group/types/IButtonGroupState.d.ts +4 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +553 -585
- package/dist/index.umd.js +2 -2
- package/dist/props/index.d.ts +2 -1
- package/dist/stories/RadioGroup/RadioOption.test.d.ts +4 -0
- package/dist/stories/RadioGroup/RadioProperty.test.d.ts +1 -1
- package/dist/stories/RadioGroup/RadioSlots.test.d.ts +6 -0
- package/package.json +2 -2
- 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/VvBadge/VvBadge.ts +4 -2
- package/src/components/VvBadge/VvBadge.vue +8 -3
- package/src/components/VvButton/VvButton.ts +4 -34
- package/src/components/VvButton/VvButton.vue +3 -12
- package/src/components/VvButton/useButtonGroupProps.ts +3 -11
- package/src/components/VvButtonGroup/VvButtonGroup.ts +4 -17
- package/src/components/VvButtonGroup/VvButtonGroup.vue +5 -16
- package/src/components/VvSelect/VvSelect.ts +5 -1
- package/src/components/VvSelect/VvSelect.vue +7 -1
- package/src/composables/group/types/IButtonGroupState.ts +4 -0
- package/src/props/index.ts +3 -1
- package/src/stories/Badge/BadgeColor.stories.mdx +4 -4
- package/src/stories/Badge/BadgeModifiers.stories.mdx +65 -0
- package/src/stories/Button/ButtonActive.stories.mdx +27 -0
- package/src/stories/Button/ButtonDisabled.stories.mdx +28 -0
- package/src/stories/Button/ButtonIconPosition.stories.mdx +0 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +103 -46
- package/src/stories/Button/ButtonSelected.stories.mdx +30 -0
- package/src/stories/ButtonGroup/ButtonGroupAction.stories.mdx +2 -2
- package/src/stories/ButtonGroup/ButtonGroupActionQuiet.stories.mdx +2 -2
- package/src/stories/ButtonGroup/ButtonGroupBlock.stories.mdx +1 -1
- package/src/stories/ButtonGroup/ButtonGroupRounded.stories.mdx +1 -1
- package/src/stories/RadioGroup/RadioGroupHintLabel.stories.mdx +6 -6
- package/src/stories/RadioGroup/RadioGroupLabel.stories.mdx +7 -2
- package/src/stories/RadioGroup/RadioGroupOptionLabel.stories.mdx +7 -19
- package/src/stories/RadioGroup/RadioGroupOptionValue.stories.mdx +7 -19
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +3 -17
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +10 -9
- package/src/stories/RadioGroup/RadioOption.test.ts +45 -0
- package/src/stories/RadioGroup/RadioProperty.test.ts +4 -4
- package/src/stories/RadioGroup/RadioSlots.test.ts +29 -0
- package/src/stories/Select/SelectNative.stories.mdx +45 -0
- package/src/stories/stories.scss +5 -27
- package/src/stories/Button/ButtonVariant.stories.mdx +0 -205
- package/src/stories/Button/test.js +0 -41
- package/src/stories/Radio/RadioTest.js +0 -90
- package/src/stories/RadioGroup/RadioOptionsTest.js +0 -78
- package/src/stories/RadioGroup/RadioPropertyTest.js +0 -131
- package/src/stories/RadioGroup/RadioSlotsTest.js +0 -20
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as y, unref as p, defineComponent as P, ref as H, toRefs as S, inject as oe, openBlock as g, createBlock as I, mergeProps as E, createCommentVNode as O, toRef as ge, useAttrs as Z, useSlots as se, resolveDynamicComponent as ae, withCtx as x, renderSlot as C, createElementBlock as _, toDisplayString as B, Fragment as U, createTextVNode as j, normalizeClass as N, isRef as ye, provide as he, createElementVNode as $, renderList as W, watch as be, h as _e, createVNode as le, Transition as Ve, toHandlers as Ce, withDirectives as ke, withModifiers as $e, vShow as Se } from "vue";
|
|
2
2
|
import { v4 as ee } from "uuid";
|
|
3
|
-
import { iconExists as
|
|
4
|
-
import { useVModel as
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { iconExists as Q, Icon as Ae, addIcon as Oe } from "@iconify/vue";
|
|
4
|
+
import { useVModel as J, useFocus as Be, toReactive as we, onClickOutside as Pe } from "@vueuse/core";
|
|
5
|
+
const ie = {
|
|
6
|
+
valid: Boolean,
|
|
7
|
+
validLabel: [String, Array]
|
|
8
|
+
}, ue = {
|
|
9
|
+
error: Boolean,
|
|
10
|
+
errorLabel: [String, Array]
|
|
11
|
+
}, te = {
|
|
12
|
+
disabled: Boolean
|
|
13
|
+
}, z = {
|
|
14
|
+
modifiers: [String, Array]
|
|
15
|
+
}, Ge = {
|
|
16
|
+
hintLabel: { type: String, default: "" }
|
|
17
|
+
}, Ee = {
|
|
18
|
+
options: { type: Array, default: () => [] },
|
|
19
|
+
optionLabel: { type: [String, Function], default: () => "label" },
|
|
20
|
+
optionValue: { type: [String, Function], default: () => "value" }
|
|
21
|
+
};
|
|
22
|
+
var L = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(L || {}), q = /* @__PURE__ */ ((e) => (e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e))(q || {}), ce = /* @__PURE__ */ ((e) => (e._blank = "_blank", e._self = "_self", e._parent = "_parent", e._top = "_top", e))(ce || {});
|
|
23
|
+
const Re = {
|
|
24
|
+
...z,
|
|
25
|
+
...te,
|
|
7
26
|
icon: String,
|
|
8
27
|
iconPosition: {
|
|
9
28
|
type: String,
|
|
@@ -23,73 +42,66 @@ const Pe = {
|
|
|
23
42
|
href: String,
|
|
24
43
|
target: {
|
|
25
44
|
type: String,
|
|
26
|
-
validator: (e) => e in
|
|
45
|
+
validator: (e) => e in ce
|
|
27
46
|
},
|
|
28
|
-
block: Boolean,
|
|
29
47
|
active: Boolean,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
actionQuiet: Boolean,
|
|
35
|
-
selected: Boolean,
|
|
36
|
-
modifiers: [Array, String]
|
|
37
|
-
}, h = {
|
|
38
|
-
equals(e, o, t) {
|
|
39
|
-
return t ? this.resolveFieldData(e, t) === this.resolveFieldData(o, t) : this.deepEquals(e, o);
|
|
48
|
+
selected: Boolean
|
|
49
|
+
}, b = {
|
|
50
|
+
equals(e, n, t) {
|
|
51
|
+
return t ? this.resolveFieldData(e, t) === this.resolveFieldData(n, t) : this.deepEquals(e, n);
|
|
40
52
|
},
|
|
41
|
-
deepEquals(e,
|
|
42
|
-
if (e ===
|
|
53
|
+
deepEquals(e, n) {
|
|
54
|
+
if (e === n)
|
|
43
55
|
return !0;
|
|
44
|
-
if (e &&
|
|
45
|
-
const t = Array.isArray(e),
|
|
46
|
-
let
|
|
47
|
-
if (t &&
|
|
48
|
-
if (
|
|
56
|
+
if (e && n && typeof e == "object" && typeof n == "object") {
|
|
57
|
+
const t = Array.isArray(e), s = Array.isArray(n);
|
|
58
|
+
let r, i, a;
|
|
59
|
+
if (t && s) {
|
|
60
|
+
if (i = e.length, i != n.length)
|
|
49
61
|
return !1;
|
|
50
|
-
for (
|
|
51
|
-
if (!this.deepEquals(e[
|
|
62
|
+
for (r = i; r-- !== 0; )
|
|
63
|
+
if (!this.deepEquals(e[r], n[r]))
|
|
52
64
|
return !1;
|
|
53
65
|
return !0;
|
|
54
66
|
}
|
|
55
|
-
if (t !=
|
|
67
|
+
if (t != s)
|
|
56
68
|
return !1;
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
69
|
+
const u = e instanceof Date, l = n instanceof Date;
|
|
70
|
+
if (u != l)
|
|
59
71
|
return !1;
|
|
60
|
-
if (
|
|
61
|
-
return e.getTime() ==
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
72
|
+
if (u && l)
|
|
73
|
+
return e.getTime() == n.getTime();
|
|
74
|
+
const d = e instanceof RegExp, c = n instanceof RegExp;
|
|
75
|
+
if (d != c)
|
|
64
76
|
return !1;
|
|
65
|
-
if (
|
|
66
|
-
return e.toString() ==
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
77
|
+
if (d && c)
|
|
78
|
+
return e.toString() == n.toString();
|
|
79
|
+
const o = Object.keys(e);
|
|
80
|
+
if (i = o.length, i !== Object.keys(n).length)
|
|
69
81
|
return !1;
|
|
70
|
-
for (
|
|
71
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
82
|
+
for (r = i; r-- !== 0; )
|
|
83
|
+
if (!Object.prototype.hasOwnProperty.call(n, o[r]))
|
|
72
84
|
return !1;
|
|
73
|
-
for (
|
|
74
|
-
if (a =
|
|
85
|
+
for (r = i; r-- !== 0; )
|
|
86
|
+
if (a = o[r], !this.deepEquals(e[a], n[a]))
|
|
75
87
|
return !1;
|
|
76
88
|
return !0;
|
|
77
89
|
}
|
|
78
|
-
return e !== e &&
|
|
90
|
+
return e !== e && n !== n;
|
|
79
91
|
},
|
|
80
|
-
resolveFieldData(e,
|
|
81
|
-
if (e && Object.keys(e).length &&
|
|
82
|
-
if (
|
|
83
|
-
return e[
|
|
92
|
+
resolveFieldData(e, n) {
|
|
93
|
+
if (e && Object.keys(e).length && n) {
|
|
94
|
+
if (n.indexOf(".") === -1)
|
|
95
|
+
return e[n];
|
|
84
96
|
{
|
|
85
|
-
const t =
|
|
86
|
-
let
|
|
87
|
-
for (let
|
|
97
|
+
const t = n.split(".");
|
|
98
|
+
let s = e;
|
|
99
|
+
for (let r = 0, i = t.length; r < i; ++r) {
|
|
88
100
|
if (e == null)
|
|
89
101
|
return null;
|
|
90
|
-
|
|
102
|
+
s = s[t[r]];
|
|
91
103
|
}
|
|
92
|
-
return
|
|
104
|
+
return s;
|
|
93
105
|
}
|
|
94
106
|
} else
|
|
95
107
|
return null;
|
|
@@ -97,20 +109,20 @@ const Pe = {
|
|
|
97
109
|
isFunction(e) {
|
|
98
110
|
return !!(e && e.constructor && e.call && e.apply);
|
|
99
111
|
},
|
|
100
|
-
findIndexInList(e,
|
|
112
|
+
findIndexInList(e, n) {
|
|
101
113
|
let t = -1;
|
|
102
|
-
if (
|
|
103
|
-
for (let
|
|
104
|
-
if (this.equals(
|
|
105
|
-
t =
|
|
114
|
+
if (n) {
|
|
115
|
+
for (let s = 0; s < n.length; s++)
|
|
116
|
+
if (this.equals(n[s], e)) {
|
|
117
|
+
t = s;
|
|
106
118
|
break;
|
|
107
119
|
}
|
|
108
120
|
}
|
|
109
121
|
return t;
|
|
110
122
|
},
|
|
111
|
-
contains(e,
|
|
112
|
-
if (e != null &&
|
|
113
|
-
for (const t of
|
|
123
|
+
contains(e, n) {
|
|
124
|
+
if (e != null && n && n.length) {
|
|
125
|
+
for (const t of n)
|
|
114
126
|
if (this.equals(e, t))
|
|
115
127
|
return !0;
|
|
116
128
|
}
|
|
@@ -122,38 +134,38 @@ const Pe = {
|
|
|
122
134
|
isNotEmpty(e) {
|
|
123
135
|
return !this.isEmpty(e);
|
|
124
136
|
},
|
|
125
|
-
pickBy(e,
|
|
137
|
+
pickBy(e, n) {
|
|
126
138
|
return Object.fromEntries(
|
|
127
|
-
Object.entries(e).filter(([t]) =>
|
|
139
|
+
Object.entries(e).filter(([t]) => n(t))
|
|
128
140
|
);
|
|
129
141
|
},
|
|
130
|
-
removeFromList(e,
|
|
131
|
-
const t = this.findIndexInList(e,
|
|
132
|
-
return t > -1 ?
|
|
142
|
+
removeFromList(e, n) {
|
|
143
|
+
const t = this.findIndexInList(e, n);
|
|
144
|
+
return t > -1 ? n.filter((s, r) => r !== t) : n;
|
|
133
145
|
},
|
|
134
146
|
isString(e) {
|
|
135
147
|
return typeof e == "string" || e instanceof String;
|
|
136
148
|
},
|
|
137
149
|
propsToObject(e) {
|
|
138
|
-
return Object.keys(e).reduce((
|
|
139
|
-
var
|
|
140
|
-
return this.isFunction(e[t]) ?
|
|
150
|
+
return Object.keys(e).reduce((n, t) => {
|
|
151
|
+
var s, r, i, a, u;
|
|
152
|
+
return this.isFunction(e[t]) ? n[t] = e[t]() : Array.isArray(e[t]) ? n[t] = e[t][0]() : (s = e[t]) != null && s.type && (Array.isArray(e[t].type) ? n[t] = ((r = e[t]) == null ? void 0 : r.default) || ((i = e[t]) == null ? void 0 : i.type[0]()) : n[t] = ((a = e[t]) == null ? void 0 : a.default) || ((u = e[t]) == null ? void 0 : u.type())), n;
|
|
141
153
|
}, {});
|
|
142
154
|
},
|
|
143
|
-
filterArray(e,
|
|
144
|
-
return e.filter((
|
|
145
|
-
|
|
146
|
-
|
|
155
|
+
filterArray(e, n, t) {
|
|
156
|
+
return e.filter((s) => n.some((r) => typeof r == "string" ? s[t] == r : this.equals(
|
|
157
|
+
s[t],
|
|
158
|
+
r[t]
|
|
147
159
|
)));
|
|
148
160
|
},
|
|
149
161
|
kebabCase(e) {
|
|
150
|
-
var
|
|
162
|
+
var n, t;
|
|
151
163
|
if (e)
|
|
152
|
-
return (t = (
|
|
164
|
+
return (t = (n = e.match(
|
|
153
165
|
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
154
|
-
)) == null ? void 0 :
|
|
166
|
+
)) == null ? void 0 : n.join("-")) == null ? void 0 : t.toLowerCase();
|
|
155
167
|
}
|
|
156
|
-
},
|
|
168
|
+
}, De = "ds", Ie = {
|
|
157
169
|
color: String,
|
|
158
170
|
width: {
|
|
159
171
|
type: [String, Number]
|
|
@@ -185,22 +197,22 @@ const Pe = {
|
|
|
185
197
|
type: [String, Array]
|
|
186
198
|
}
|
|
187
199
|
};
|
|
188
|
-
function
|
|
200
|
+
function w(e, n) {
|
|
189
201
|
const t = { [`${e}`]: !0 };
|
|
190
202
|
return {
|
|
191
|
-
bemCssClasses:
|
|
192
|
-
const a =
|
|
203
|
+
bemCssClasses: y(() => Object.keys(n).reduce((r, i) => {
|
|
204
|
+
const a = p(n[i]) || !1;
|
|
193
205
|
if (!a)
|
|
194
|
-
return
|
|
195
|
-
if (
|
|
196
|
-
const
|
|
206
|
+
return r;
|
|
207
|
+
if (i === "modifiers") {
|
|
208
|
+
const u = Array.isArray(a) ? a : [a];
|
|
197
209
|
return {
|
|
198
|
-
...
|
|
199
|
-
...
|
|
200
|
-
(
|
|
201
|
-
...
|
|
202
|
-
[`${e}--${
|
|
203
|
-
|
|
210
|
+
...r,
|
|
211
|
+
...u.reduce(
|
|
212
|
+
(l, d) => ({
|
|
213
|
+
...l,
|
|
214
|
+
[`${e}--${b.kebabCase(
|
|
215
|
+
d
|
|
204
216
|
)}`]: !0
|
|
205
217
|
}),
|
|
206
218
|
{}
|
|
@@ -208,282 +220,255 @@ function G(e, o) {
|
|
|
208
220
|
};
|
|
209
221
|
} else
|
|
210
222
|
return {
|
|
211
|
-
...
|
|
212
|
-
[`${e}--${
|
|
223
|
+
...r,
|
|
224
|
+
[`${e}--${b.kebabCase(i)}`]: a
|
|
213
225
|
};
|
|
214
226
|
}, t) || {})
|
|
215
227
|
};
|
|
216
228
|
}
|
|
217
|
-
const Y = /* @__PURE__ */
|
|
229
|
+
const Y = /* @__PURE__ */ P({
|
|
218
230
|
__name: "VvIcon",
|
|
219
|
-
props:
|
|
231
|
+
props: Ie,
|
|
220
232
|
setup(e) {
|
|
221
|
-
const
|
|
222
|
-
modifiers:
|
|
223
|
-
}), a =
|
|
224
|
-
const
|
|
225
|
-
return
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
return
|
|
229
|
-
})) ||
|
|
233
|
+
const n = e, t = H(!0), { modifiers: s } = S(n), r = oe(De), { bemCssClasses: i } = w("vv-icon", {
|
|
234
|
+
modifiers: s
|
|
235
|
+
}), a = y(() => n.provider || (r == null ? void 0 : r.provider)), u = y(() => {
|
|
236
|
+
const c = n.name || "", o = `@${a.value}:${n.prefix}:${n.name}`;
|
|
237
|
+
return Q(c) ? c : Q(o) ? o : (r == null ? void 0 : r.iconsCollections.find((f) => {
|
|
238
|
+
const v = `@${a.value}:${f.prefix}:${c}`;
|
|
239
|
+
if (Q(v))
|
|
240
|
+
return v;
|
|
241
|
+
})) || c;
|
|
230
242
|
});
|
|
231
|
-
function
|
|
232
|
-
let
|
|
243
|
+
function l(c) {
|
|
244
|
+
let o = null;
|
|
233
245
|
if (typeof window > "u") {
|
|
234
|
-
const { JSDOM:
|
|
235
|
-
|
|
246
|
+
const { JSDOM: m } = require("jsdom");
|
|
247
|
+
o = new m().window;
|
|
236
248
|
}
|
|
237
|
-
return (
|
|
249
|
+
return (o ? new o.DOMParser() : new window.DOMParser()).parseFromString(c, "text/html").querySelector("svg");
|
|
238
250
|
}
|
|
239
|
-
function
|
|
240
|
-
const
|
|
241
|
-
|
|
251
|
+
function d(c) {
|
|
252
|
+
const o = l(c), f = (o == null ? void 0 : o.innerHTML.trim()) || "";
|
|
253
|
+
o && f && Oe(`@${a.value}:${n.prefix}:${n.name}`, {
|
|
242
254
|
body: f,
|
|
243
|
-
height:
|
|
244
|
-
width:
|
|
255
|
+
height: o.viewBox.baseVal.height,
|
|
256
|
+
width: o.viewBox.baseVal.width
|
|
245
257
|
});
|
|
246
258
|
}
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
}).catch((
|
|
250
|
-
throw new Error(`During fetch icon: ${
|
|
251
|
-
})) :
|
|
259
|
+
return r && (n.src ? (t.value = !1, r.fetchIcon(n.src).then((c) => {
|
|
260
|
+
c && (d(c), t.value = !0);
|
|
261
|
+
}).catch((c) => {
|
|
262
|
+
throw new Error(`During fetch icon: ${c == null ? void 0 : c.message}`);
|
|
263
|
+
})) : n.svg && d(n.svg)), (c, o) => t.value ? (g(), I(p(Ae), E({
|
|
252
264
|
key: 0,
|
|
253
|
-
class:
|
|
265
|
+
class: p(i)
|
|
254
266
|
}, {
|
|
255
|
-
...
|
|
256
|
-
provider:
|
|
257
|
-
icon:
|
|
258
|
-
}), null, 16, ["class"])) :
|
|
267
|
+
...c.$props,
|
|
268
|
+
provider: p(a),
|
|
269
|
+
icon: p(u)
|
|
270
|
+
}), null, 16, ["class"])) : O("", !0);
|
|
259
271
|
}
|
|
260
272
|
});
|
|
261
|
-
function
|
|
262
|
-
const
|
|
263
|
-
function r
|
|
264
|
-
if (
|
|
265
|
-
const
|
|
266
|
-
return
|
|
273
|
+
function ne(e) {
|
|
274
|
+
const n = oe(e, void 0), t = y(() => b.isNotEmpty(n));
|
|
275
|
+
function s(r, i, a) {
|
|
276
|
+
if (n != null && n.value) {
|
|
277
|
+
const u = p(n.value)[r];
|
|
278
|
+
return y({
|
|
267
279
|
get() {
|
|
268
|
-
return
|
|
280
|
+
return u == null ? void 0 : u.value;
|
|
269
281
|
},
|
|
270
|
-
set(
|
|
271
|
-
|
|
282
|
+
set(l) {
|
|
283
|
+
u.value = l;
|
|
272
284
|
}
|
|
273
285
|
});
|
|
274
286
|
} else {
|
|
275
|
-
const
|
|
276
|
-
return
|
|
287
|
+
const u = ge(i, r);
|
|
288
|
+
return y({
|
|
277
289
|
get() {
|
|
278
|
-
return
|
|
290
|
+
return u.value;
|
|
279
291
|
},
|
|
280
|
-
set(
|
|
281
|
-
a && a(`update:${
|
|
292
|
+
set(l) {
|
|
293
|
+
a && a(`update:${r}`, l);
|
|
282
294
|
}
|
|
283
295
|
});
|
|
284
296
|
}
|
|
285
297
|
}
|
|
286
298
|
return {
|
|
287
|
-
group:
|
|
299
|
+
group: n,
|
|
288
300
|
isInGroup: t,
|
|
289
|
-
getGroupOrLocalRef:
|
|
301
|
+
getGroupOrLocalRef: s
|
|
290
302
|
};
|
|
291
303
|
}
|
|
292
|
-
const
|
|
293
|
-
function
|
|
294
|
-
const { group:
|
|
304
|
+
const de = Symbol("VV_BUTTON_GROUP"), ve = Symbol("VV_CHECK_GROUP"), fe = Symbol("VV_ACCORDION_GROUP");
|
|
305
|
+
function je(e) {
|
|
306
|
+
const { group: n, isInGroup: t, getGroupOrLocalRef: s } = ne(de), { iconPosition: r, icon: i, label: a, selected: u } = S(e), l = s("modelValue", e), d = s("disabled", e), c = s("toggle", e), o = s("modifiers", e);
|
|
295
307
|
return {
|
|
296
|
-
modelValue:
|
|
297
|
-
disabled:
|
|
298
|
-
toggle:
|
|
308
|
+
modelValue: l,
|
|
309
|
+
disabled: d,
|
|
310
|
+
toggle: c,
|
|
299
311
|
isInGroup: t,
|
|
300
|
-
group:
|
|
301
|
-
modifiers:
|
|
302
|
-
action: p,
|
|
303
|
-
actionQuiet: _,
|
|
312
|
+
group: n,
|
|
313
|
+
modifiers: o,
|
|
304
314
|
selected: u,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
iconPosition: a,
|
|
309
|
-
icon: c,
|
|
310
|
-
label: i
|
|
315
|
+
iconPosition: r,
|
|
316
|
+
icon: i,
|
|
317
|
+
label: a
|
|
311
318
|
};
|
|
312
319
|
}
|
|
313
|
-
const
|
|
320
|
+
const Ne = {
|
|
314
321
|
key: 1,
|
|
315
322
|
class: "vv-button__label"
|
|
316
|
-
},
|
|
323
|
+
}, Fe = {
|
|
317
324
|
key: 1,
|
|
318
325
|
class: "vv-button__label"
|
|
319
|
-
}, Pt = /* @__PURE__ */
|
|
326
|
+
}, Pt = /* @__PURE__ */ P({
|
|
320
327
|
__name: "VvButton",
|
|
321
|
-
props:
|
|
328
|
+
props: Re,
|
|
322
329
|
setup(e) {
|
|
323
|
-
const
|
|
324
|
-
modifiers:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
rounded: i,
|
|
329
|
-
fullBleed: v,
|
|
330
|
-
iconPosition: u,
|
|
331
|
-
icon: s,
|
|
332
|
-
label: f,
|
|
330
|
+
const n = e, t = Z(), s = se(), r = (t == null ? void 0 : t.name) || ee(), {
|
|
331
|
+
modifiers: i,
|
|
332
|
+
iconPosition: a,
|
|
333
|
+
icon: u,
|
|
334
|
+
label: l,
|
|
333
335
|
modelValue: d,
|
|
334
|
-
disabled:
|
|
335
|
-
toggle:
|
|
336
|
-
isInGroup:
|
|
337
|
-
} =
|
|
336
|
+
disabled: c,
|
|
337
|
+
toggle: o,
|
|
338
|
+
isInGroup: f
|
|
339
|
+
} = je(n), v = y(() => {
|
|
338
340
|
switch (!0) {
|
|
339
|
-
case
|
|
341
|
+
case c.value:
|
|
340
342
|
return q.button;
|
|
341
|
-
case
|
|
343
|
+
case n.to !== void 0:
|
|
342
344
|
return q.routerLink;
|
|
343
|
-
case
|
|
345
|
+
case n.href !== void 0:
|
|
344
346
|
return q.a;
|
|
345
347
|
default:
|
|
346
348
|
return q.button;
|
|
347
349
|
}
|
|
348
|
-
}),
|
|
349
|
-
modifiers:
|
|
350
|
-
active:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
block: c,
|
|
355
|
-
rounded: i,
|
|
356
|
-
fullBleed: v,
|
|
357
|
-
disabled: g,
|
|
358
|
-
reverse: b(
|
|
350
|
+
}), h = y(() => o.value ? Array.isArray(d.value) ? b.contains(r, d.value) : b.equals(r, d.value) : n.active), m = y(() => o.value ? Array.isArray(d.value) ? b.contains(r, d.value) : b.equals(r, d.value) : n.selected), { bemCssClasses: V } = w("vv-button", {
|
|
351
|
+
modifiers: i,
|
|
352
|
+
active: h,
|
|
353
|
+
selected: m,
|
|
354
|
+
disabled: c,
|
|
355
|
+
reverse: y(
|
|
359
356
|
() => [L.right, L.bottom].includes(
|
|
360
|
-
|
|
357
|
+
a.value
|
|
361
358
|
)
|
|
362
359
|
),
|
|
363
|
-
column:
|
|
360
|
+
column: y(
|
|
364
361
|
() => [L.top, L.bottom].includes(
|
|
365
|
-
|
|
362
|
+
a.value
|
|
366
363
|
)
|
|
367
364
|
),
|
|
368
|
-
iconOnly:
|
|
369
|
-
}),
|
|
370
|
-
|
|
371
|
-
"aria-label":
|
|
372
|
-
"aria-disabled":
|
|
365
|
+
iconOnly: y(() => (u == null ? void 0 : u.value) && !(l != null && l.value) && !s.default)
|
|
366
|
+
}), A = y(() => ({
|
|
367
|
+
...R.value,
|
|
368
|
+
"aria-label": n.label || t["aria-label"],
|
|
369
|
+
"aria-disabled": c.value,
|
|
373
370
|
role: "button",
|
|
374
|
-
class:
|
|
375
|
-
to:
|
|
376
|
-
})),
|
|
377
|
-
const
|
|
378
|
-
let
|
|
379
|
-
return
|
|
371
|
+
class: V.value,
|
|
372
|
+
to: n.to
|
|
373
|
+
})), R = y(() => {
|
|
374
|
+
const k = v.value === q.a;
|
|
375
|
+
let M = {};
|
|
376
|
+
return k && (M = c.value ? {
|
|
380
377
|
href: "javascript:;"
|
|
381
378
|
} : {
|
|
382
|
-
target:
|
|
383
|
-
href:
|
|
384
|
-
}),
|
|
379
|
+
target: n.target,
|
|
380
|
+
href: n.href
|
|
381
|
+
}), M;
|
|
385
382
|
});
|
|
386
|
-
function
|
|
387
|
-
|
|
383
|
+
function D() {
|
|
384
|
+
f.value && (d.value = r);
|
|
388
385
|
}
|
|
389
|
-
return (
|
|
386
|
+
return (k, M) => (g(), I(ae(p(v)), E(p(A), { onClickPassive: D }), {
|
|
390
387
|
default: x(() => [
|
|
391
|
-
k
|
|
392
|
-
|
|
393
|
-
|
|
388
|
+
C(k.$slots, "default", {}, () => [
|
|
389
|
+
k.loading ? C(k.$slots, "loading", { key: 0 }, () => [
|
|
390
|
+
k.loadingIcon ? (g(), I(Y, {
|
|
394
391
|
key: 0,
|
|
395
392
|
class: "vv-button__loading-icon",
|
|
396
|
-
name:
|
|
397
|
-
}, null, 8, ["name"])) :
|
|
398
|
-
|
|
399
|
-
]) : (
|
|
400
|
-
k
|
|
401
|
-
|
|
393
|
+
name: k.loadingIcon
|
|
394
|
+
}, null, 8, ["name"])) : O("", !0),
|
|
395
|
+
k.loadingLabel ? (g(), _("span", Ne, B(k.loadingLabel), 1)) : O("", !0)
|
|
396
|
+
]) : (g(), _(U, { key: 1 }, [
|
|
397
|
+
C(k.$slots, "before"),
|
|
398
|
+
p(u) ? (g(), I(Y, {
|
|
402
399
|
key: 0,
|
|
403
400
|
class: "vv-button__icon",
|
|
404
|
-
name:
|
|
405
|
-
}, null, 8, ["name"])) :
|
|
406
|
-
|
|
407
|
-
k
|
|
408
|
-
|
|
401
|
+
name: p(u)
|
|
402
|
+
}, null, 8, ["name"])) : O("", !0),
|
|
403
|
+
p(l) ? (g(), _("span", Fe, [
|
|
404
|
+
C(k.$slots, "label", {}, () => [
|
|
405
|
+
j(B(p(l)), 1)
|
|
409
406
|
])
|
|
410
|
-
])) :
|
|
411
|
-
k
|
|
407
|
+
])) : O("", !0),
|
|
408
|
+
C(k.$slots, "after")
|
|
412
409
|
], 64))
|
|
413
410
|
])
|
|
414
411
|
]),
|
|
415
412
|
_: 3
|
|
416
413
|
}, 16));
|
|
417
414
|
}
|
|
418
|
-
}),
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}, Gt = /* @__PURE__ */
|
|
415
|
+
}), qe = {
|
|
416
|
+
...z,
|
|
417
|
+
value: [String, Number]
|
|
418
|
+
}, Gt = /* @__PURE__ */ P({
|
|
422
419
|
__name: "VvBadge",
|
|
423
|
-
props:
|
|
420
|
+
props: qe,
|
|
424
421
|
setup(e) {
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
422
|
+
const n = e, { modifiers: t } = S(n), { bemCssClasses: s } = w("vv-badge", {
|
|
423
|
+
modifiers: t
|
|
424
|
+
});
|
|
425
|
+
return (r, i) => (g(), _("span", {
|
|
426
|
+
class: N(p(s)),
|
|
428
427
|
role: "status"
|
|
429
|
-
},
|
|
428
|
+
}, B(r.value), 3));
|
|
430
429
|
}
|
|
431
|
-
}),
|
|
432
|
-
|
|
430
|
+
}), Le = {
|
|
431
|
+
...z,
|
|
432
|
+
...te,
|
|
433
433
|
vertical: { type: Boolean, default: !1 },
|
|
434
434
|
compact: { type: Boolean, default: !1 },
|
|
435
435
|
toggle: { type: Boolean, default: !1 },
|
|
436
|
-
block: { type: Boolean, default: !1 },
|
|
437
|
-
rounded: { type: Boolean, default: !1 },
|
|
438
|
-
action: Boolean,
|
|
439
|
-
actionQuiet: Boolean,
|
|
440
436
|
modelValue: { type: String, default: void 0 }
|
|
441
|
-
},
|
|
442
|
-
function
|
|
437
|
+
}, He = ["update:modelValue"];
|
|
438
|
+
function re(e) {
|
|
443
439
|
if (Object.keys(e).some(
|
|
444
|
-
(
|
|
440
|
+
(n) => n !== "key" && !ye(e[n])
|
|
445
441
|
))
|
|
446
442
|
throw Error("One or more groupState props aren't ref.");
|
|
447
|
-
|
|
443
|
+
he(
|
|
448
444
|
e.key,
|
|
449
|
-
|
|
445
|
+
y(() => e)
|
|
450
446
|
);
|
|
451
447
|
}
|
|
452
|
-
const Et = /* @__PURE__ */
|
|
448
|
+
const Et = /* @__PURE__ */ P({
|
|
453
449
|
__name: "VvButtonGroup",
|
|
454
|
-
props:
|
|
455
|
-
emits:
|
|
456
|
-
setup(e, { emit:
|
|
457
|
-
const t = e,
|
|
458
|
-
|
|
459
|
-
vertical:
|
|
460
|
-
compact: a
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
});
|
|
471
|
-
return oe({
|
|
472
|
-
key: le,
|
|
473
|
-
modelValue: r,
|
|
474
|
-
disabled: n,
|
|
475
|
-
toggle: v,
|
|
476
|
-
rounded: i,
|
|
477
|
-
action: u,
|
|
478
|
-
actionQuiet: s
|
|
479
|
-
}), (g, p) => (y(), V("div", {
|
|
480
|
-
class: F(m(f)),
|
|
450
|
+
props: Le,
|
|
451
|
+
emits: He,
|
|
452
|
+
setup(e, { emit: n }) {
|
|
453
|
+
const t = e, s = J(t, "modelValue", n), { disabled: r, vertical: i, compact: a, toggle: u, modifiers: l } = S(t), { bemCssClasses: d } = w("vv-button-group", {
|
|
454
|
+
modifiers: l,
|
|
455
|
+
vertical: i,
|
|
456
|
+
compact: a
|
|
457
|
+
}), c = {
|
|
458
|
+
key: de,
|
|
459
|
+
modelValue: s,
|
|
460
|
+
disabled: r,
|
|
461
|
+
toggle: u,
|
|
462
|
+
modifiers: l != null && l.value ? l : H([])
|
|
463
|
+
};
|
|
464
|
+
return re(c), (o, f) => (g(), _("div", {
|
|
465
|
+
class: N(p(d)),
|
|
481
466
|
role: "group"
|
|
482
467
|
}, [
|
|
483
|
-
|
|
468
|
+
C(o.$slots, "default")
|
|
484
469
|
], 2));
|
|
485
470
|
}
|
|
486
|
-
}),
|
|
471
|
+
}), Me = {
|
|
487
472
|
title: String,
|
|
488
473
|
content: String,
|
|
489
474
|
open: Boolean,
|
|
@@ -491,73 +476,73 @@ const Et = /* @__PURE__ */ w({
|
|
|
491
476
|
bordered: Boolean,
|
|
492
477
|
modifiers: [String, Array],
|
|
493
478
|
disabled: Boolean
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
const { group: t, isInGroup:
|
|
479
|
+
}, Ue = ["update:open"];
|
|
480
|
+
function ze(e, n) {
|
|
481
|
+
const { group: t, isInGroup: s, getGroupOrLocalRef: r } = ne(fe), { modifiers: i } = S(e), a = r("modelValue", e, n), u = r("bordered", e), l = r("disabled", e), d = r("iconRight", e), c = r("accordion", e);
|
|
497
482
|
return {
|
|
498
483
|
modelValue: a,
|
|
499
|
-
disabled:
|
|
500
|
-
bordered:
|
|
501
|
-
iconRight:
|
|
502
|
-
isInGroup:
|
|
484
|
+
disabled: l,
|
|
485
|
+
bordered: u,
|
|
486
|
+
iconRight: d,
|
|
487
|
+
isInGroup: s,
|
|
503
488
|
group: t,
|
|
504
|
-
accordion:
|
|
505
|
-
modifiers:
|
|
489
|
+
accordion: c,
|
|
490
|
+
modifiers: i
|
|
506
491
|
};
|
|
507
492
|
}
|
|
508
|
-
const
|
|
493
|
+
const Ke = ["open"], Te = ["aria-controls", "aria-expanded"], Ze = ["aria-hidden"], We = /* @__PURE__ */ P({
|
|
509
494
|
__name: "VvAccordion",
|
|
510
|
-
props:
|
|
511
|
-
emits:
|
|
512
|
-
setup(e, { emit:
|
|
513
|
-
const t = e,
|
|
514
|
-
modelValue:
|
|
495
|
+
props: Me,
|
|
496
|
+
emits: Ue,
|
|
497
|
+
setup(e, { emit: n }) {
|
|
498
|
+
const t = e, s = Z(), r = (s == null ? void 0 : s.name) || ee(), {
|
|
499
|
+
modelValue: i,
|
|
515
500
|
modifiers: a,
|
|
516
|
-
bordered:
|
|
517
|
-
disabled:
|
|
518
|
-
iconRight:
|
|
519
|
-
isInGroup:
|
|
520
|
-
accordion:
|
|
521
|
-
} =
|
|
501
|
+
bordered: u,
|
|
502
|
+
disabled: l = H(!1),
|
|
503
|
+
iconRight: d,
|
|
504
|
+
isInGroup: c,
|
|
505
|
+
accordion: o
|
|
506
|
+
} = ze(t, n), f = y(() => c.value ? o.value ? b.equals(r, i.value) : b.contains(r, i.value) : t.open), { bemCssClasses: v } = w("vv-accordion", {
|
|
522
507
|
modifiers: a,
|
|
523
|
-
disabled:
|
|
524
|
-
markerRight:
|
|
525
|
-
bordered:
|
|
526
|
-
}),
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
) : [...
|
|
508
|
+
disabled: l,
|
|
509
|
+
markerRight: y(() => d.value),
|
|
510
|
+
bordered: u
|
|
511
|
+
}), h = (V) => {
|
|
512
|
+
const A = V.target;
|
|
513
|
+
n("update:open", A.open);
|
|
514
|
+
}, m = (V) => {
|
|
515
|
+
c.value && (o.value ? i.value = f.value ? null : r : i.value = f.value ? b.removeFromList(
|
|
516
|
+
r,
|
|
517
|
+
i.value
|
|
518
|
+
) : [...i.value, r], V.preventDefault());
|
|
534
519
|
};
|
|
535
|
-
return (
|
|
536
|
-
class:
|
|
537
|
-
open:
|
|
538
|
-
onToggle:
|
|
539
|
-
onClick:
|
|
520
|
+
return (V, A) => (g(), _("details", {
|
|
521
|
+
class: N(p(v)),
|
|
522
|
+
open: p(f),
|
|
523
|
+
onToggle: h,
|
|
524
|
+
onClick: m
|
|
540
525
|
}, [
|
|
541
|
-
|
|
542
|
-
"aria-controls": `#${
|
|
543
|
-
"aria-expanded":
|
|
526
|
+
$("summary", {
|
|
527
|
+
"aria-controls": `#${p(r)}`,
|
|
528
|
+
"aria-expanded": p(f),
|
|
544
529
|
class: "vv-collapse__summary"
|
|
545
530
|
}, [
|
|
546
|
-
|
|
547
|
-
|
|
531
|
+
C(V.$slots, "header", {}, () => [
|
|
532
|
+
j(B(V.title), 1)
|
|
548
533
|
])
|
|
549
|
-
], 8,
|
|
550
|
-
|
|
551
|
-
"aria-hidden": !
|
|
534
|
+
], 8, Te),
|
|
535
|
+
$("div", {
|
|
536
|
+
"aria-hidden": !p(f),
|
|
552
537
|
class: "vv-collapse__content"
|
|
553
538
|
}, [
|
|
554
|
-
|
|
555
|
-
|
|
539
|
+
C(V.$slots, "details", {}, () => [
|
|
540
|
+
j(B(V.content), 1)
|
|
556
541
|
])
|
|
557
|
-
], 8,
|
|
558
|
-
], 42,
|
|
542
|
+
], 8, Ze)
|
|
543
|
+
], 42, Ke));
|
|
559
544
|
}
|
|
560
|
-
}),
|
|
545
|
+
}), Je = {
|
|
561
546
|
modelValue: [String, Array],
|
|
562
547
|
iconRight: Boolean,
|
|
563
548
|
bordered: Boolean,
|
|
@@ -565,100 +550,84 @@ const Me = ["open"], Ue = ["aria-controls", "aria-expanded"], ze = ["aria-hidden
|
|
|
565
550
|
accordion: Boolean,
|
|
566
551
|
modifiers: [String, Array],
|
|
567
552
|
disabled: Boolean
|
|
568
|
-
},
|
|
553
|
+
}, Xe = ["update:open"], Rt = /* @__PURE__ */ P({
|
|
569
554
|
__name: "VvAccordionGroup",
|
|
570
|
-
props:
|
|
571
|
-
emits:
|
|
572
|
-
setup(e, { emit:
|
|
573
|
-
const t = e,
|
|
574
|
-
|
|
575
|
-
key:
|
|
576
|
-
modelValue:
|
|
577
|
-
disabled:
|
|
578
|
-
bordered:
|
|
555
|
+
props: Je,
|
|
556
|
+
emits: Xe,
|
|
557
|
+
setup(e, { emit: n }) {
|
|
558
|
+
const t = e, s = J(t, "modelValue", n), { disabled: r, bordered: i, iconRight: a, accordion: u, modifiers: l, items: d } = S(t);
|
|
559
|
+
re({
|
|
560
|
+
key: fe,
|
|
561
|
+
modelValue: s,
|
|
562
|
+
disabled: r,
|
|
563
|
+
bordered: i,
|
|
579
564
|
iconRight: a,
|
|
580
|
-
accordion:
|
|
565
|
+
accordion: u
|
|
581
566
|
});
|
|
582
|
-
const { bemCssClasses:
|
|
583
|
-
modifiers:
|
|
584
|
-
disabled:
|
|
567
|
+
const { bemCssClasses: o } = w("vv-accordion-group", {
|
|
568
|
+
modifiers: l,
|
|
569
|
+
disabled: r
|
|
585
570
|
});
|
|
586
|
-
return (f,
|
|
587
|
-
var
|
|
588
|
-
return
|
|
589
|
-
class:
|
|
571
|
+
return (f, v) => {
|
|
572
|
+
var h;
|
|
573
|
+
return g(), _("div", {
|
|
574
|
+
class: N(p(o))
|
|
590
575
|
}, [
|
|
591
|
-
((
|
|
592
|
-
key:
|
|
576
|
+
((h = t.items) == null ? void 0 : h.length) > 0 ? (g(!0), _(U, { key: 0 }, W(p(d), (m) => (g(), I(We, E({
|
|
577
|
+
key: m.title
|
|
593
578
|
}, {
|
|
594
|
-
name:
|
|
595
|
-
title:
|
|
596
|
-
content:
|
|
579
|
+
name: m.name,
|
|
580
|
+
title: m.title,
|
|
581
|
+
content: m.content,
|
|
597
582
|
...t
|
|
598
|
-
}), null, 16))), 128)) :
|
|
583
|
+
}), null, 16))), 128)) : C(f.$slots, "default", { key: 1 })
|
|
599
584
|
], 2);
|
|
600
585
|
};
|
|
601
586
|
}
|
|
602
|
-
}),
|
|
603
|
-
|
|
604
|
-
validLabel: [String, Array]
|
|
605
|
-
}, de = {
|
|
606
|
-
error: Boolean,
|
|
607
|
-
errorLabel: [String, Array]
|
|
608
|
-
}, Ze = {
|
|
609
|
-
disabled: Boolean
|
|
610
|
-
}, fe = {
|
|
611
|
-
modifiers: [String, Array]
|
|
612
|
-
}, We = {
|
|
613
|
-
hintLabel: { type: String, default: "" }
|
|
614
|
-
}, Je = {
|
|
615
|
-
options: { type: Array, default: () => [] },
|
|
616
|
-
optionLabel: { type: [String, Function], default: () => "label" },
|
|
617
|
-
optionValue: { type: [String, Function], default: () => "value" }
|
|
618
|
-
}, Xe = {
|
|
619
|
-
...fe,
|
|
587
|
+
}), Qe = {
|
|
588
|
+
...z,
|
|
620
589
|
routes: Array,
|
|
621
590
|
multiline: Boolean
|
|
622
|
-
}, Ye = { class: "vv-breadcrumb__list" }, xe = ["content"], Dt = /* @__PURE__ */
|
|
591
|
+
}, Ye = { class: "vv-breadcrumb__list" }, xe = ["content"], Dt = /* @__PURE__ */ P({
|
|
623
592
|
__name: "VvBreadcrumb",
|
|
624
|
-
props:
|
|
593
|
+
props: Qe,
|
|
625
594
|
setup(e) {
|
|
626
|
-
const
|
|
595
|
+
const n = e, { modifiers: t, multiline: s } = S(n), { bemCssClasses: r } = w("vv-breadcrumb", {
|
|
627
596
|
modifiers: t,
|
|
628
|
-
multiline:
|
|
597
|
+
multiline: s
|
|
629
598
|
});
|
|
630
|
-
return (
|
|
631
|
-
class:
|
|
599
|
+
return (i, a) => (g(), _("nav", {
|
|
600
|
+
class: N(p(r)),
|
|
632
601
|
"aria-label": "breadcrumbs"
|
|
633
602
|
}, [
|
|
634
|
-
|
|
635
|
-
(
|
|
636
|
-
var
|
|
637
|
-
return
|
|
638
|
-
key: `${
|
|
639
|
-
class:
|
|
640
|
-
"vv-breadcrumb__item":
|
|
641
|
-
"vv-breadcrumb__item-active":
|
|
603
|
+
$("ol", Ye, [
|
|
604
|
+
(g(!0), _(U, null, W(i.routes, (u, l) => {
|
|
605
|
+
var d, c, o, f;
|
|
606
|
+
return g(), _("li", {
|
|
607
|
+
key: `${u.label}-${l}`,
|
|
608
|
+
class: N({
|
|
609
|
+
"vv-breadcrumb__item": l < Number((d = i.routes) == null ? void 0 : d.length) - 1,
|
|
610
|
+
"vv-breadcrumb__item-active": l === Number((c = i.routes) == null ? void 0 : c.length) - 1
|
|
642
611
|
}),
|
|
643
612
|
itemprop: "itemListElement",
|
|
644
613
|
itemtype: "https://schema.org/ListItem",
|
|
645
614
|
itemscope: ""
|
|
646
615
|
}, [
|
|
647
|
-
(
|
|
616
|
+
(g(), I(ae(u.to ? "router-link" : u.href ? "a" : "span"), E(u, {
|
|
648
617
|
class: {
|
|
649
|
-
"vv-breadcrumb__link":
|
|
618
|
+
"vv-breadcrumb__link": l < Number((o = i.routes) == null ? void 0 : o.length) - 1
|
|
650
619
|
},
|
|
651
|
-
"aria-current":
|
|
620
|
+
"aria-current": l === Number((f = i.routes) == null ? void 0 : f.length) - 1 ? "page" : void 0,
|
|
652
621
|
itemprop: "item"
|
|
653
622
|
}), {
|
|
654
623
|
default: x(() => [
|
|
655
|
-
|
|
624
|
+
j(B(u.label) + " ", 1)
|
|
656
625
|
]),
|
|
657
626
|
_: 2
|
|
658
627
|
}, 1040, ["class", "aria-current"])),
|
|
659
|
-
|
|
628
|
+
$("meta", {
|
|
660
629
|
itemprop: "position",
|
|
661
|
-
content: `${
|
|
630
|
+
content: `${l + 1}`
|
|
662
631
|
}, null, 8, xe)
|
|
663
632
|
], 2);
|
|
664
633
|
}), 128))
|
|
@@ -671,37 +640,37 @@ const Me = ["open"], Ue = ["aria-controls", "aria-expanded"], ze = ["aria-hidden
|
|
|
671
640
|
}, tt = {
|
|
672
641
|
key: 0,
|
|
673
642
|
class: "vv-card__header"
|
|
674
|
-
},
|
|
643
|
+
}, nt = {
|
|
675
644
|
key: 1,
|
|
676
645
|
class: "vv-card__content"
|
|
677
|
-
},
|
|
646
|
+
}, rt = {
|
|
678
647
|
key: 2,
|
|
679
648
|
class: "vv-card__footer"
|
|
680
|
-
}, It = /* @__PURE__ */
|
|
649
|
+
}, It = /* @__PURE__ */ P({
|
|
681
650
|
__name: "VvCard",
|
|
682
651
|
props: et,
|
|
683
652
|
setup(e) {
|
|
684
|
-
const
|
|
685
|
-
modifiers:
|
|
686
|
-
}),
|
|
687
|
-
return (a,
|
|
688
|
-
a.$slots.header || a.title ? (
|
|
689
|
-
|
|
690
|
-
|
|
653
|
+
const n = e, t = Z(), { modifiers: s } = S(n), { bemCssClasses: r } = w("vv-card", {
|
|
654
|
+
modifiers: s
|
|
655
|
+
}), i = y(() => t);
|
|
656
|
+
return (a, u) => (g(), _("article", E({ class: p(r) }, p(i)), [
|
|
657
|
+
a.$slots.header || a.title ? (g(), _("header", tt, [
|
|
658
|
+
C(a.$slots, "header", {}, () => [
|
|
659
|
+
j(B(a.title), 1)
|
|
691
660
|
])
|
|
692
|
-
])) :
|
|
693
|
-
|
|
694
|
-
a.$slots.content ? (
|
|
695
|
-
|
|
696
|
-
])) :
|
|
697
|
-
a.$slots.footer ? (
|
|
698
|
-
|
|
699
|
-
])) :
|
|
661
|
+
])) : O("", !0),
|
|
662
|
+
C(a.$slots, "default"),
|
|
663
|
+
a.$slots.content ? (g(), _("div", nt, [
|
|
664
|
+
C(a.$slots, "content")
|
|
665
|
+
])) : O("", !0),
|
|
666
|
+
a.$slots.footer ? (g(), _("footer", rt, [
|
|
667
|
+
C(a.$slots, "footer")
|
|
668
|
+
])) : O("", !0)
|
|
700
669
|
], 16));
|
|
701
670
|
}
|
|
702
|
-
}),
|
|
703
|
-
...
|
|
704
|
-
...
|
|
671
|
+
}), ot = {
|
|
672
|
+
...ie,
|
|
673
|
+
...ue,
|
|
705
674
|
value: null,
|
|
706
675
|
modelValue: null,
|
|
707
676
|
binary: Boolean,
|
|
@@ -718,118 +687,118 @@ const Me = ["open"], Ue = ["aria-controls", "aria-expanded"], ze = ["aria-hidden
|
|
|
718
687
|
"focus",
|
|
719
688
|
"blur"
|
|
720
689
|
];
|
|
721
|
-
function at(e,
|
|
722
|
-
const { group: t, isInGroup:
|
|
690
|
+
function at(e, n) {
|
|
691
|
+
const { group: t, isInGroup: s, getGroupOrLocalRef: r } = ne(ve), { valid: i, error: a, switch: u } = S(e), l = r("modelValue", e, n), d = r("readonly", e), c = r("disabled", e);
|
|
723
692
|
return {
|
|
724
693
|
group: t,
|
|
725
|
-
isInGroup:
|
|
726
|
-
valid:
|
|
694
|
+
isInGroup: s,
|
|
695
|
+
valid: i,
|
|
727
696
|
error: a,
|
|
728
|
-
propsSwitch:
|
|
729
|
-
modelValue:
|
|
730
|
-
readonly:
|
|
731
|
-
disabled:
|
|
697
|
+
propsSwitch: u,
|
|
698
|
+
modelValue: l,
|
|
699
|
+
readonly: d,
|
|
700
|
+
disabled: c
|
|
732
701
|
};
|
|
733
702
|
}
|
|
734
|
-
function lt(e,
|
|
703
|
+
function lt(e, n) {
|
|
735
704
|
const { focused: t } = Be(e);
|
|
736
|
-
return
|
|
737
|
-
|
|
705
|
+
return be(t, (s) => {
|
|
706
|
+
n(s ? "focus" : "blur", e.value);
|
|
738
707
|
}), {
|
|
739
708
|
focused: t
|
|
740
709
|
};
|
|
741
710
|
}
|
|
742
711
|
const it = {
|
|
743
712
|
inheritAttrs: !1
|
|
744
|
-
}, ut = /* @__PURE__ */
|
|
713
|
+
}, ut = /* @__PURE__ */ P({
|
|
745
714
|
...it,
|
|
746
715
|
__name: "VvCheck",
|
|
747
|
-
props:
|
|
716
|
+
props: ot,
|
|
748
717
|
emits: st,
|
|
749
|
-
setup(e, { emit:
|
|
750
|
-
const t = e,
|
|
751
|
-
switch:
|
|
718
|
+
setup(e, { emit: n }) {
|
|
719
|
+
const t = e, s = Z(), { disabled: r, readonly: i, valid: a, error: u, propsSwitch: l, modelValue: d } = at(t, n), c = H(), { focused: o } = lt(c, n), f = y(() => t.binary ? b.equals(d.value, t.trueValue) : Array.isArray(d.value) ? b.contains(t.value, d.value) : b.equals(t.value, d.value)), { bemCssClasses: v } = w("vv-input-checkbox", {
|
|
720
|
+
switch: l,
|
|
752
721
|
valid: a,
|
|
753
|
-
invalid:
|
|
754
|
-
}), { bemCssClasses:
|
|
722
|
+
invalid: u
|
|
723
|
+
}), { bemCssClasses: h } = w(
|
|
755
724
|
"vv-input-check__input",
|
|
756
725
|
{
|
|
757
726
|
checked: f,
|
|
758
|
-
disabled:
|
|
759
|
-
readonly:
|
|
727
|
+
disabled: r,
|
|
728
|
+
readonly: i
|
|
760
729
|
}
|
|
761
|
-
),
|
|
762
|
-
[
|
|
763
|
-
...
|
|
764
|
-
})),
|
|
765
|
-
...
|
|
766
|
-
"focus-visible":
|
|
767
|
-
})),
|
|
768
|
-
const { id:
|
|
769
|
-
|
|
770
|
-
(
|
|
730
|
+
), m = y(() => ({
|
|
731
|
+
[s.class]: !0,
|
|
732
|
+
...v.value
|
|
733
|
+
})), V = y(() => ({
|
|
734
|
+
...h.value,
|
|
735
|
+
"focus-visible": o.value
|
|
736
|
+
})), A = y(() => {
|
|
737
|
+
const { id: G, name: F, style: X } = s, pe = b.pickBy(
|
|
738
|
+
s,
|
|
739
|
+
(me) => me.startsWith("data-")
|
|
771
740
|
);
|
|
772
741
|
return {
|
|
773
|
-
for:
|
|
774
|
-
style:
|
|
775
|
-
...
|
|
742
|
+
for: G || F,
|
|
743
|
+
style: X,
|
|
744
|
+
...pe
|
|
776
745
|
};
|
|
777
|
-
}),
|
|
778
|
-
const { id:
|
|
746
|
+
}), R = y(() => {
|
|
747
|
+
const { id: G = "", name: F = "" } = s;
|
|
779
748
|
return {
|
|
780
749
|
type: "checkbox",
|
|
781
|
-
id:
|
|
782
|
-
name:
|
|
750
|
+
id: G || F,
|
|
751
|
+
name: F,
|
|
783
752
|
value: t.value,
|
|
784
|
-
disabled:
|
|
785
|
-
readonly:
|
|
753
|
+
disabled: r.value,
|
|
754
|
+
readonly: i.value,
|
|
786
755
|
checked: f.value,
|
|
787
|
-
...
|
|
756
|
+
...D.value
|
|
788
757
|
};
|
|
789
|
-
}),
|
|
790
|
-
const { name:
|
|
791
|
-
|
|
792
|
-
(
|
|
758
|
+
}), D = y(() => {
|
|
759
|
+
const { name: G } = s, F = b.pickBy(
|
|
760
|
+
s,
|
|
761
|
+
(X) => X.startsWith("aria-")
|
|
793
762
|
);
|
|
794
763
|
return {
|
|
795
|
-
"aria-label":
|
|
764
|
+
"aria-label": G,
|
|
796
765
|
"aria-checked": f.value,
|
|
797
|
-
...
|
|
766
|
+
...F
|
|
798
767
|
};
|
|
799
768
|
});
|
|
800
|
-
function
|
|
769
|
+
function k() {
|
|
801
770
|
if (t.binary) {
|
|
802
|
-
|
|
771
|
+
d.value = f.value ? t.falseValue : t.trueValue;
|
|
803
772
|
return;
|
|
804
773
|
}
|
|
805
|
-
if (
|
|
806
|
-
|
|
774
|
+
if (d.value === null) {
|
|
775
|
+
d.value = [t.value];
|
|
807
776
|
return;
|
|
808
777
|
}
|
|
809
|
-
if (Array.isArray(
|
|
810
|
-
|
|
778
|
+
if (Array.isArray(d.value)) {
|
|
779
|
+
d.value = f.value ? b.removeFromList(t.value, d.value) : [...d.value, t.value];
|
|
811
780
|
return;
|
|
812
781
|
}
|
|
813
782
|
}
|
|
814
|
-
function
|
|
815
|
-
|
|
783
|
+
function M(G) {
|
|
784
|
+
r.value || (n("click", G), n("change", f.value ? t.value : null), o.value = !0);
|
|
816
785
|
}
|
|
817
|
-
return (
|
|
818
|
-
|
|
786
|
+
return (G, F) => (g(), _("label", E({ class: p(m) }, p(A), { onClick: M }), [
|
|
787
|
+
$("input", E({
|
|
819
788
|
ref_key: "input",
|
|
820
|
-
ref:
|
|
821
|
-
class:
|
|
822
|
-
},
|
|
823
|
-
|
|
824
|
-
|
|
789
|
+
ref: c,
|
|
790
|
+
class: p(V)
|
|
791
|
+
}, p(R), { onInput: k }), null, 16),
|
|
792
|
+
C(G.$slots, "default", { value: p(d) }, () => [
|
|
793
|
+
j(B(G.label), 1)
|
|
825
794
|
])
|
|
826
795
|
], 16));
|
|
827
796
|
}
|
|
828
797
|
}), ct = {
|
|
829
|
-
...
|
|
830
|
-
...
|
|
831
|
-
...
|
|
832
|
-
...
|
|
798
|
+
...ie,
|
|
799
|
+
...ue,
|
|
800
|
+
...Ge,
|
|
801
|
+
...Ee,
|
|
833
802
|
modelValue: { type: Array },
|
|
834
803
|
label: { type: String, default: "" },
|
|
835
804
|
name: { type: String, default: "", required: !0 },
|
|
@@ -837,19 +806,19 @@ const it = {
|
|
|
837
806
|
readonly: { type: Boolean, default: !1 },
|
|
838
807
|
vertical: { type: Boolean, default: !1 }
|
|
839
808
|
}, dt = ["update:modelValue", "change"];
|
|
840
|
-
function
|
|
841
|
-
const { options:
|
|
809
|
+
function vt(e) {
|
|
810
|
+
const { options: n, optionLabel: t, optionValue: s } = S(e);
|
|
842
811
|
return {
|
|
843
|
-
options:
|
|
812
|
+
options: n,
|
|
844
813
|
getOptionLabel: (a) => typeof a != "object" && a !== null ? a : typeof t.value == "function" ? t.value(a) : a[t.value],
|
|
845
|
-
getOptionValue: (a) => typeof a != "object" && a !== null ? a : typeof
|
|
814
|
+
getOptionValue: (a) => typeof a != "object" && a !== null ? a : typeof s.value == "function" ? s.value(a) : a[s.value]
|
|
846
815
|
};
|
|
847
816
|
}
|
|
848
|
-
function
|
|
849
|
-
return Array.isArray(e) ? e.filter((
|
|
817
|
+
function K(e) {
|
|
818
|
+
return Array.isArray(e) ? e.filter((n) => b.isString(n)).reduce((n, t) => n.length > 0 ? n + `
|
|
850
819
|
` + t : t, "") : e;
|
|
851
820
|
}
|
|
852
|
-
function
|
|
821
|
+
function ft(e, n) {
|
|
853
822
|
return {
|
|
854
823
|
name: "HintSlot",
|
|
855
824
|
props: {
|
|
@@ -859,43 +828,43 @@ function vt(e, o) {
|
|
|
859
828
|
}
|
|
860
829
|
},
|
|
861
830
|
setup(t) {
|
|
862
|
-
const
|
|
863
|
-
error:
|
|
864
|
-
valid:
|
|
831
|
+
const s = S(e), {
|
|
832
|
+
error: r,
|
|
833
|
+
valid: i,
|
|
865
834
|
hint: a,
|
|
866
|
-
loading:
|
|
867
|
-
} =
|
|
868
|
-
hintLabel:
|
|
869
|
-
modelValue:
|
|
870
|
-
valid:
|
|
871
|
-
validLabel:
|
|
835
|
+
loading: u
|
|
836
|
+
} = n, {
|
|
837
|
+
hintLabel: l,
|
|
838
|
+
modelValue: d,
|
|
839
|
+
valid: c,
|
|
840
|
+
validLabel: o,
|
|
872
841
|
error: f,
|
|
873
|
-
errorLabel:
|
|
874
|
-
} =
|
|
875
|
-
|
|
842
|
+
errorLabel: v
|
|
843
|
+
} = s, h = b.resolveFieldData(s, "loading"), m = b.resolveFieldData(
|
|
844
|
+
s,
|
|
876
845
|
"loadingLabel"
|
|
877
|
-
),
|
|
878
|
-
const
|
|
879
|
-
hintLabel:
|
|
880
|
-
modelValue:
|
|
881
|
-
valid:
|
|
882
|
-
validLabel:
|
|
846
|
+
), V = y(() => f.value ? !!(f.value && r || (v == null ? void 0 : v.value) && Array.isArray(v.value) && v.value.length > 0 || (v == null ? void 0 : v.value) && b.isNotEmpty(v.value)) : !1), A = y(() => !!(l && l.value || a || i || o && o.value || V.value || (h == null ? void 0 : h.value) && u || (h == null ? void 0 : h.value) && (m == null ? void 0 : m.value))), R = y(() => {
|
|
847
|
+
const D = we({
|
|
848
|
+
hintLabel: l,
|
|
849
|
+
modelValue: d,
|
|
850
|
+
valid: c,
|
|
851
|
+
validLabel: o,
|
|
883
852
|
error: f,
|
|
884
|
-
errorLabel:
|
|
885
|
-
loading:
|
|
886
|
-
loadingLabel:
|
|
853
|
+
errorLabel: v,
|
|
854
|
+
loading: h,
|
|
855
|
+
loadingLabel: m,
|
|
887
856
|
...t.params
|
|
888
857
|
});
|
|
889
|
-
return f != null && f.value ? (
|
|
858
|
+
return f != null && f.value ? (r == null ? void 0 : r(D)) || K(v == null ? void 0 : v.value) || (l == null ? void 0 : l.value) : c != null && c.value ? (i == null ? void 0 : i(D)) || K(o == null ? void 0 : o.value) || (l == null ? void 0 : l.value) : h != null && h.value ? (u == null ? void 0 : u(D)) || K(m == null ? void 0 : m.value) || (l == null ? void 0 : l.value) : (a == null ? void 0 : a(D)) || K(l == null ? void 0 : l.value) || (l == null ? void 0 : l.value);
|
|
890
859
|
});
|
|
891
860
|
return {
|
|
892
|
-
hasHint:
|
|
893
|
-
hintContent:
|
|
861
|
+
hasHint: A,
|
|
862
|
+
hintContent: R
|
|
894
863
|
};
|
|
895
864
|
},
|
|
896
865
|
render() {
|
|
897
866
|
if (this.hasHint)
|
|
898
|
-
return
|
|
867
|
+
return _e(
|
|
899
868
|
"pre",
|
|
900
869
|
{ style: { "white-space": "pre" } },
|
|
901
870
|
this.hintContent
|
|
@@ -903,45 +872,45 @@ function vt(e, o) {
|
|
|
903
872
|
}
|
|
904
873
|
};
|
|
905
874
|
}
|
|
906
|
-
const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" }, jt = /* @__PURE__ */
|
|
875
|
+
const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" }, jt = /* @__PURE__ */ P({
|
|
907
876
|
__name: "VvCheckGroup",
|
|
908
877
|
props: ct,
|
|
909
878
|
emits: dt,
|
|
910
|
-
setup(e, { emit:
|
|
911
|
-
const t = e,
|
|
912
|
-
|
|
913
|
-
key:
|
|
914
|
-
modelValue:
|
|
915
|
-
disabled:
|
|
879
|
+
setup(e, { emit: n }) {
|
|
880
|
+
const t = e, s = se(), r = J(t, "modelValue", n), { disabled: i, readonly: a, error: u, valid: l } = S(t);
|
|
881
|
+
re({
|
|
882
|
+
key: ve,
|
|
883
|
+
modelValue: r,
|
|
884
|
+
disabled: i,
|
|
916
885
|
readonly: a
|
|
917
886
|
});
|
|
918
|
-
const { getOptionLabel:
|
|
887
|
+
const { getOptionLabel: c, getOptionValue: o } = vt(t), { bemCssClasses: f } = w(
|
|
919
888
|
"vv-input-checkbox-group",
|
|
920
889
|
{
|
|
921
|
-
horizontal:
|
|
922
|
-
valid:
|
|
923
|
-
invalid:
|
|
890
|
+
horizontal: y(() => !t.vertical),
|
|
891
|
+
valid: l,
|
|
892
|
+
invalid: u
|
|
924
893
|
}
|
|
925
|
-
),
|
|
926
|
-
id: `${t.name}_opt${
|
|
894
|
+
), v = (m, V) => ({
|
|
895
|
+
id: `${t.name}_opt${V}`,
|
|
927
896
|
name: t.name,
|
|
928
|
-
label:
|
|
929
|
-
value:
|
|
930
|
-
}),
|
|
931
|
-
return (
|
|
932
|
-
class:
|
|
897
|
+
label: c(m),
|
|
898
|
+
value: o(m)
|
|
899
|
+
}), h = ft(t, s);
|
|
900
|
+
return (m, V) => (g(), _("fieldset", {
|
|
901
|
+
class: N(p(f))
|
|
933
902
|
}, [
|
|
934
|
-
|
|
903
|
+
m.label ? (g(), _("legend", {
|
|
935
904
|
key: 0,
|
|
936
|
-
textContent:
|
|
937
|
-
}, null, 8, pt)) :
|
|
938
|
-
|
|
939
|
-
|
|
905
|
+
textContent: B(m.label)
|
|
906
|
+
}, null, 8, pt)) : O("", !0),
|
|
907
|
+
$("div", mt, [
|
|
908
|
+
m.options.length > 0 ? (g(!0), _(U, { key: 0 }, W(m.options, (A, R) => (g(), I(ut, E({ key: R }, v(A, R)), null, 16))), 128)) : C(m.$slots, "default", { key: 1 })
|
|
940
909
|
]),
|
|
941
|
-
|
|
910
|
+
le(p(h), { class: "vv-input-checkbox-group__hint" })
|
|
942
911
|
], 2));
|
|
943
912
|
}
|
|
944
|
-
}),
|
|
913
|
+
}), T = {
|
|
945
914
|
normal: "",
|
|
946
915
|
small: "small",
|
|
947
916
|
fullscreen: "fullscreen"
|
|
@@ -952,83 +921,83 @@ const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" },
|
|
|
952
921
|
transition: { type: String, default: "fade-block" },
|
|
953
922
|
size: {
|
|
954
923
|
type: String,
|
|
955
|
-
default:
|
|
956
|
-
validator: (e) => Object.values(
|
|
924
|
+
default: T.normal,
|
|
925
|
+
validator: (e) => Object.values(T).includes(e)
|
|
957
926
|
},
|
|
958
927
|
autoClose: { type: Boolean, default: !0 }
|
|
959
|
-
},
|
|
928
|
+
}, ht = {
|
|
960
929
|
key: 0,
|
|
961
930
|
class: "vv-dialog__header"
|
|
962
|
-
},
|
|
931
|
+
}, bt = ["onClick"], _t = { class: "vv-dialog__content" }, Vt = {
|
|
963
932
|
key: 1,
|
|
964
933
|
class: "vv-dialog__footer"
|
|
965
|
-
}, Nt = /* @__PURE__ */
|
|
934
|
+
}, Nt = /* @__PURE__ */ P({
|
|
966
935
|
__name: "VvDialog",
|
|
967
936
|
props: yt,
|
|
968
937
|
emits: gt,
|
|
969
|
-
setup(e, { emit:
|
|
970
|
-
const t = e,
|
|
971
|
-
const { id:
|
|
938
|
+
setup(e, { emit: n }) {
|
|
939
|
+
const t = e, s = J(t, "open", n), r = H(!0), i = H(null), a = y(() => {
|
|
940
|
+
const { id: o } = t;
|
|
972
941
|
return {
|
|
973
|
-
id:
|
|
974
|
-
open:
|
|
942
|
+
id: o,
|
|
943
|
+
open: r.value
|
|
975
944
|
};
|
|
976
|
-
}),
|
|
945
|
+
}), u = y(() => ({
|
|
977
946
|
"vv-dialog": !0,
|
|
978
|
-
"vv-dialog--small": t.size ===
|
|
979
|
-
"vv-dialog--fullscreen": t.size ===
|
|
980
|
-
})),
|
|
947
|
+
"vv-dialog--small": t.size === T.small,
|
|
948
|
+
"vv-dialog--fullscreen": t.size === T.fullscreen
|
|
949
|
+
})), l = y(() => `vv-dialog--${t.transition}`), d = {
|
|
981
950
|
"after-enter": () => {
|
|
982
|
-
|
|
951
|
+
r.value = !0, n("open");
|
|
983
952
|
},
|
|
984
953
|
"after-leave": () => {
|
|
985
|
-
|
|
954
|
+
r.value = !1, n("close");
|
|
986
955
|
}
|
|
987
956
|
};
|
|
988
|
-
|
|
989
|
-
t.autoClose && (
|
|
957
|
+
Pe(i, () => {
|
|
958
|
+
t.autoClose && (s.value = !1);
|
|
990
959
|
});
|
|
991
|
-
function
|
|
992
|
-
|
|
960
|
+
function c() {
|
|
961
|
+
s.value = !1;
|
|
993
962
|
}
|
|
994
|
-
return (
|
|
963
|
+
return (o, f) => (g(), I(Ve, E({ name: p(l) }, Ce(d)), {
|
|
995
964
|
default: x(() => [
|
|
996
|
-
ke(
|
|
997
|
-
|
|
965
|
+
ke($("dialog", E(p(a), { class: p(u) }), [
|
|
966
|
+
$("article", {
|
|
998
967
|
ref_key: "modalWrapper",
|
|
999
|
-
ref:
|
|
968
|
+
ref: i,
|
|
1000
969
|
class: "vv-dialog__wrapper"
|
|
1001
970
|
}, [
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
971
|
+
o.$slots.header || o.title ? (g(), _("header", ht, [
|
|
972
|
+
C(o.$slots, "header", {}, () => [
|
|
973
|
+
j(B(o.title) + " ", 1),
|
|
974
|
+
$("button", {
|
|
1006
975
|
type: "button",
|
|
1007
976
|
"aria-label": "Close",
|
|
1008
977
|
class: "vv-dialog__close",
|
|
1009
|
-
onClick:
|
|
978
|
+
onClick: $e(c, ["prevent"])
|
|
1010
979
|
}, [
|
|
1011
|
-
|
|
1012
|
-
], 8,
|
|
980
|
+
le(Y, { name: "close" })
|
|
981
|
+
], 8, bt)
|
|
1013
982
|
])
|
|
1014
|
-
])) :
|
|
1015
|
-
|
|
1016
|
-
|
|
983
|
+
])) : O("", !0),
|
|
984
|
+
$("div", _t, [
|
|
985
|
+
C(o.$slots, "default")
|
|
1017
986
|
]),
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
])) :
|
|
987
|
+
o.$slots.footer ? (g(), _("footer", Vt, [
|
|
988
|
+
C(o.$slots, "footer")
|
|
989
|
+
])) : O("", !0)
|
|
1021
990
|
], 512)
|
|
1022
991
|
], 16), [
|
|
1023
|
-
[Se,
|
|
992
|
+
[Se, p(s)]
|
|
1024
993
|
])
|
|
1025
994
|
]),
|
|
1026
995
|
_: 3
|
|
1027
996
|
}, 16, ["name"]));
|
|
1028
997
|
}
|
|
1029
|
-
}),
|
|
1030
|
-
...
|
|
1031
|
-
...
|
|
998
|
+
}), Ct = {
|
|
999
|
+
...te,
|
|
1000
|
+
...z,
|
|
1032
1001
|
modelValue: [String, Array, Object],
|
|
1033
1002
|
labelNoResult: { type: String, default: "No results" },
|
|
1034
1003
|
options: {
|
|
@@ -1040,64 +1009,64 @@ const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" },
|
|
|
1040
1009
|
maxValues: [Number, String],
|
|
1041
1010
|
labelKey: { type: String, default: "label" },
|
|
1042
1011
|
valueKey: { type: String, default: "value" }
|
|
1043
|
-
},
|
|
1012
|
+
}, kt = { key: 0 }, $t = ["for"], St = ["id", "type", "value", "checked", "disabled"], Ft = /* @__PURE__ */ P({
|
|
1044
1013
|
__name: "VvDropdown",
|
|
1045
|
-
props:
|
|
1014
|
+
props: Ct,
|
|
1046
1015
|
emits: ["update:modelValue"],
|
|
1047
|
-
setup(e, { emit:
|
|
1048
|
-
const t = e,
|
|
1049
|
-
modifiers:
|
|
1050
|
-
disabled:
|
|
1016
|
+
setup(e, { emit: n }) {
|
|
1017
|
+
const t = e, s = ee(), { modifiers: r, disabled: i } = S(t), { bemCssClasses: a } = w("vv-dropdown", {
|
|
1018
|
+
modifiers: r,
|
|
1019
|
+
disabled: i
|
|
1051
1020
|
});
|
|
1052
|
-
function
|
|
1053
|
-
return Array.isArray(t.modelValue) ?
|
|
1021
|
+
function u(o) {
|
|
1022
|
+
return Array.isArray(t.modelValue) ? b.contains(o, t.modelValue) || b.contains(l(o), t.modelValue) : b.equals(o, t.modelValue) || b.equals(l(o), t.modelValue);
|
|
1054
1023
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return typeof
|
|
1024
|
+
function l(o) {
|
|
1025
|
+
return typeof o == "string" ? o : String(o[t.valueKey]);
|
|
1057
1026
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return typeof
|
|
1027
|
+
function d(o) {
|
|
1028
|
+
return typeof o == "string" ? o : o[t.labelKey];
|
|
1060
1029
|
}
|
|
1061
|
-
function
|
|
1062
|
-
var
|
|
1063
|
-
const f =
|
|
1064
|
-
let
|
|
1065
|
-
if (
|
|
1066
|
-
(
|
|
1067
|
-
) : null) ||
|
|
1068
|
-
if (typeof t.maxValues < "u" && t.maxValues >= 0 && ((
|
|
1030
|
+
function c(o) {
|
|
1031
|
+
var m, V;
|
|
1032
|
+
const f = o.target;
|
|
1033
|
+
let v = f.value;
|
|
1034
|
+
if (v = (t.useObject ? (m = t.options) == null ? void 0 : m.find(
|
|
1035
|
+
(A) => A[t.valueKey] == v
|
|
1036
|
+
) : null) || v, t.multiple) {
|
|
1037
|
+
if (typeof t.maxValues < "u" && t.maxValues >= 0 && ((V = t.modelValue) == null ? void 0 : V.length) >= t.maxValues && (Array.isArray(t.modelValue) && !b.contains(v, t.modelValue) || t.maxValues == 0)) {
|
|
1069
1038
|
f.checked = !1;
|
|
1070
1039
|
return;
|
|
1071
1040
|
}
|
|
1072
|
-
Array.isArray(t.modelValue) ?
|
|
1041
|
+
Array.isArray(t.modelValue) ? v = b.contains(v, t.modelValue) ? b.removeFromList(v, t.modelValue) : [...t.modelValue, v] : v = [v];
|
|
1073
1042
|
}
|
|
1074
|
-
|
|
1043
|
+
n("update:modelValue", v);
|
|
1075
1044
|
}
|
|
1076
|
-
return (
|
|
1077
|
-
var
|
|
1078
|
-
return
|
|
1079
|
-
class:
|
|
1045
|
+
return (o, f) => {
|
|
1046
|
+
var v;
|
|
1047
|
+
return g(), _("ul", {
|
|
1048
|
+
class: N(p(a)),
|
|
1080
1049
|
role: "listbox"
|
|
1081
1050
|
}, [
|
|
1082
|
-
(
|
|
1083
|
-
|
|
1051
|
+
(v = o.options) != null && v.length ? O("", !0) : (g(), _("li", kt, [
|
|
1052
|
+
$("label", null, B(o.labelNoResult), 1)
|
|
1084
1053
|
])),
|
|
1085
|
-
(
|
|
1086
|
-
var
|
|
1087
|
-
return
|
|
1088
|
-
|
|
1089
|
-
for: `dropdown-${
|
|
1054
|
+
(g(!0), _(U, null, W(o.options, (h, m) => {
|
|
1055
|
+
var V;
|
|
1056
|
+
return g(), _("li", { key: m }, [
|
|
1057
|
+
$("label", {
|
|
1058
|
+
for: `dropdown-${m}-${p(s)}`
|
|
1090
1059
|
}, [
|
|
1091
|
-
|
|
1092
|
-
id: `dropdown-${
|
|
1093
|
-
type:
|
|
1094
|
-
value:
|
|
1095
|
-
checked:
|
|
1096
|
-
disabled: typeof
|
|
1097
|
-
onInput:
|
|
1098
|
-
}, null, 40,
|
|
1099
|
-
|
|
1100
|
-
], 8,
|
|
1060
|
+
$("input", {
|
|
1061
|
+
id: `dropdown-${m}-${p(s)}`,
|
|
1062
|
+
type: o.multiple ? "checkbox" : "radio",
|
|
1063
|
+
value: l(h),
|
|
1064
|
+
checked: u(h),
|
|
1065
|
+
disabled: typeof h == "object" ? (V = h.disabled) != null ? V : p(i) : p(i),
|
|
1066
|
+
onInput: c
|
|
1067
|
+
}, null, 40, St),
|
|
1068
|
+
j(" " + B(d(h)), 1)
|
|
1069
|
+
], 8, $t)
|
|
1101
1070
|
]);
|
|
1102
1071
|
}), 128))
|
|
1103
1072
|
], 2);
|
|
@@ -1105,7 +1074,7 @@ const pt = ["textContent"], mt = { class: "vv-input-checkbox-group__wrapper" },
|
|
|
1105
1074
|
}
|
|
1106
1075
|
});
|
|
1107
1076
|
export {
|
|
1108
|
-
|
|
1077
|
+
We as VvAccordion,
|
|
1109
1078
|
Rt as VvAccordionGroup,
|
|
1110
1079
|
Gt as VvBadge,
|
|
1111
1080
|
Dt as VvBreadcrumb,
|