@volverjs/ui-vue 0.0.3 → 0.0.4
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/LICENSE +1 -1
- package/README.md +52 -13
- package/dist/Volver.d.ts +5 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +113 -66
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +159 -101
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +170 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +86 -16
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +97 -41
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +434 -251
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +50 -50
- package/dist/components/VvButton/index.d.ts +22 -67
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +118 -43
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +38 -25
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +334 -154
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
- package/dist/components/VvCheckbox/index.d.ts +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +401 -204
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCheckboxGroup/index.d.ts +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +950 -594
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +54 -30
- package/dist/components/VvCombobox/index.d.ts +18 -13
- package/dist/components/VvDialog/VvDialog.es.js +139 -64
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +276 -158
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +9 -9
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +6 -9
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +251 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +30 -15
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +176 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +48 -32
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +508 -344
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +11 -4
- package/dist/components/VvInputText/index.d.ts +13 -2
- package/dist/components/VvProgress/VvProgress.es.js +90 -20
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +305 -125
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadio/index.d.ts +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +372 -175
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/index.d.ts +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +371 -216
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +11 -4
- package/dist/components/VvSelect/index.d.ts +5 -5
- package/dist/components/VvTextarea/VvTextarea.es.js +408 -244
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -4
- package/dist/components/VvTextarea/index.d.ts +5 -5
- package/dist/components/VvTooltip/VvTooltip.es.js +88 -18
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +1913 -1521
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +2 -2
- package/dist/constants.d.ts +30 -0
- package/dist/directives/index.es.js +128 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +126 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2102 -1761
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +179 -11
- package/dist/resolvers/unplugin.d.ts +8 -8
- package/dist/resolvers/unplugin.es.js +51 -30
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/package.json +60 -34
- package/src/Volver.ts +12 -5
- 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/VvAction/VvAction.vue +144 -0
- package/src/components/VvAction/index.ts +5 -0
- package/src/components/VvButton/VvButton.vue +31 -114
- package/src/components/VvButton/index.ts +6 -79
- package/src/components/VvCombobox/VvCombobox.vue +54 -42
- package/src/components/VvCombobox/index.ts +11 -9
- package/src/components/VvDropdown/VvDropdownAction.vue +44 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +65 -0
- package/src/components/VvDropdown/index.ts +4 -9
- package/src/components/VvSelect/index.ts +2 -4
- package/src/composables/dropdown/useInjectDropdown.ts +1 -1
- package/src/composables/dropdown/useProvideDropdown.ts +7 -9
- package/src/composables/useModifiers.ts +4 -7
- package/src/constants.ts +36 -0
- package/src/props/index.ts +106 -14
- package/src/resolvers/unplugin.ts +81 -48
- package/src/stories/Accordion/AccordionSlots.stories.mdx +2 -2
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.stories.mdx +2 -1
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
|
@@ -1,9 +1,130 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { nanoid as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { unref as a, inject as We, computed as n, toRef as il, toRefs as G, defineComponent as j, useAttrs as yt, ref as N, openBlock as f, createElementBlock as g, normalizeClass as le, withModifiers as Tt, createElementVNode as M, renderSlot as V, normalizeProps as K, guardReactiveProps as z, createTextVNode as Y, toDisplayString as T, isRef as Ee, provide as gt, watchEffect as _t, Fragment as ie, renderList as Ne, createBlock as H, mergeProps as R, withCtx as te, resolveDynamicComponent as Nt, createCommentVNode as C, watch as ve, useSlots as Ae, h as be, onMounted as ul, withDirectives as Oe, vModelCheckbox as dl, createVNode as pe, nextTick as Xe, Transition as Rt, normalizeStyle as It, vShow as St, vModelSelect as cl, createSlots as vl, vModelText as Ht, toHandlers as fl, vModelDynamic as pl, vModelRadio as ml } from "vue";
|
|
2
|
+
import { nanoid as Mt } from "nanoid";
|
|
3
|
+
import { useToggle as bl, toReactive as hl, useVModel as et, onClickOutside as xt, useFocusWithin as Vt, onKeyStroke as He, useElementHover as yl, useFocus as Gt, useElementVisibility as $t, refDebounced as gl } from "@vueuse/core";
|
|
4
|
+
import { iconExists as Ye, Icon as _l, addIcon as Sl } from "@iconify/vue";
|
|
5
|
+
import { autoPlacement as Et, flip as Pt, shift as Ot, size as Dt, offset as ct, arrow as Vl, useFloating as $l, autoUpdate as kl } from "@floating-ui/vue";
|
|
6
|
+
import Al from "mitt";
|
|
7
|
+
var fe = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(fe || {}), jt = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(jt || {}), Ge = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(Ge || {}), pt = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(pt || {}), ke = /* @__PURE__ */ ((t) => (t.nuxtLink = "nuxt-link", t.routerLink = "router-link", t.a = "a", t.button = "button", t))(ke || {}), Wt = /* @__PURE__ */ ((t) => (t.button = "button", t.link = "link", t.menuitem = "menuitem", t))(Wt || {}), je = /* @__PURE__ */ ((t) => (t.listbox = "listbox", t.menu = "menu", t))(je || {}), mt = /* @__PURE__ */ ((t) => (t.option = "option", t.presentation = "presentation", t))(mt || {}), Ut = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(Ut || {});
|
|
8
|
+
const wl = Symbol.for("volver"), Ft = Symbol.for("buttonGroup"), Kt = Symbol.for("radioGroup"), zt = Symbol.for("checkGroup"), qt = Symbol.for("accordionGroup"), Yt = Symbol.for("dropdownTrigger"), Jt = Symbol.for("dropdownItem"), Xt = Symbol.for("dropdownAction");
|
|
9
|
+
function Pe(t, l, e) {
|
|
10
|
+
return e ? Ze(t, e) === Ze(l, e) : bt(t, l);
|
|
11
|
+
}
|
|
12
|
+
function bt(t, l) {
|
|
13
|
+
if (t === l)
|
|
14
|
+
return !0;
|
|
15
|
+
if (t && l && typeof t == "object" && typeof l == "object") {
|
|
16
|
+
const e = Array.isArray(t), s = Array.isArray(l);
|
|
17
|
+
let o, c, u;
|
|
18
|
+
if (e && s) {
|
|
19
|
+
if (c = t.length, c != l.length)
|
|
20
|
+
return !1;
|
|
21
|
+
for (o = c; o-- !== 0; )
|
|
22
|
+
if (!bt(t[o], l[o]))
|
|
23
|
+
return !1;
|
|
24
|
+
return !0;
|
|
25
|
+
}
|
|
26
|
+
if (e != s)
|
|
27
|
+
return !1;
|
|
28
|
+
const v = t instanceof Date, d = l instanceof Date;
|
|
29
|
+
if (v != d)
|
|
30
|
+
return !1;
|
|
31
|
+
if (v && d)
|
|
32
|
+
return t.getTime() == l.getTime();
|
|
33
|
+
const p = t instanceof RegExp, r = l instanceof RegExp;
|
|
34
|
+
if (p != r)
|
|
35
|
+
return !1;
|
|
36
|
+
if (p && r)
|
|
37
|
+
return t.toString() == l.toString();
|
|
38
|
+
const i = Object.keys(t);
|
|
39
|
+
if (c = i.length, c !== Object.keys(l).length)
|
|
40
|
+
return !1;
|
|
41
|
+
for (o = c; o-- !== 0; )
|
|
42
|
+
if (!Object.prototype.hasOwnProperty.call(l, i[o]))
|
|
43
|
+
return !1;
|
|
44
|
+
for (o = c; o-- !== 0; )
|
|
45
|
+
if (u = i[o], !bt(t[u], l[u]))
|
|
46
|
+
return !1;
|
|
47
|
+
return !0;
|
|
48
|
+
}
|
|
49
|
+
return t !== t && l !== l;
|
|
50
|
+
}
|
|
51
|
+
function Ze(t, l) {
|
|
52
|
+
if (t && Object.keys(t).length && l) {
|
|
53
|
+
if (l.indexOf(".") === -1)
|
|
54
|
+
return t[l];
|
|
55
|
+
{
|
|
56
|
+
const e = l.split(".");
|
|
57
|
+
let s = t;
|
|
58
|
+
for (let o = 0, c = e.length; o < c; ++o) {
|
|
59
|
+
if (t == null)
|
|
60
|
+
return null;
|
|
61
|
+
s = s[e[o]];
|
|
62
|
+
}
|
|
63
|
+
return s;
|
|
64
|
+
}
|
|
65
|
+
} else
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function Cl(t, l) {
|
|
69
|
+
let e = -1;
|
|
70
|
+
if (l) {
|
|
71
|
+
for (let s = 0; s < l.length; s++)
|
|
72
|
+
if (Pe(l[s], t)) {
|
|
73
|
+
e = s;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return e;
|
|
78
|
+
}
|
|
79
|
+
function Ce(t, l) {
|
|
80
|
+
if (t != null && l && l.length) {
|
|
81
|
+
for (const e of l)
|
|
82
|
+
if (Pe(t, e))
|
|
83
|
+
return !0;
|
|
84
|
+
}
|
|
85
|
+
return !1;
|
|
86
|
+
}
|
|
87
|
+
function ge(t) {
|
|
88
|
+
return ((l) => l == null || l === "" || Array.isArray(l) && l.length === 0 || !(l instanceof Date) && typeof l == "object" && Object.keys(l).length === 0)(a(t));
|
|
89
|
+
}
|
|
90
|
+
function Il(t, l) {
|
|
91
|
+
const e = Cl(t, l);
|
|
92
|
+
return e > -1 ? l.filter((s, o) => o !== e) : l;
|
|
93
|
+
}
|
|
94
|
+
function El(t) {
|
|
95
|
+
return typeof t == "string" || t instanceof String;
|
|
96
|
+
}
|
|
97
|
+
function tt(t) {
|
|
98
|
+
const l = We(t, void 0), e = n(() => !ge(l));
|
|
99
|
+
function s(o, c, u) {
|
|
100
|
+
if (l != null && l.value) {
|
|
101
|
+
const d = a(l.value)[o];
|
|
102
|
+
return n({
|
|
103
|
+
get() {
|
|
104
|
+
return d == null ? void 0 : d.value;
|
|
105
|
+
},
|
|
106
|
+
set(p) {
|
|
107
|
+
d.value = p;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
const v = il(c, o);
|
|
112
|
+
return n({
|
|
113
|
+
get() {
|
|
114
|
+
return v.value;
|
|
115
|
+
},
|
|
116
|
+
set(d) {
|
|
117
|
+
u && u(`update:${o}`, d);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
group: l,
|
|
123
|
+
isInGroup: e,
|
|
124
|
+
getGroupOrLocalRef: s
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const Pl = {
|
|
7
128
|
/**
|
|
8
129
|
* Accordion name
|
|
9
130
|
*/
|
|
@@ -31,97 +152,109 @@ const dt = Symbol.for("buttonGroup"), ct = Symbol.for("radioGroup"), vt = Symbol
|
|
|
31
152
|
* If true, the accordion will be disabled
|
|
32
153
|
*/
|
|
33
154
|
disabled: Boolean
|
|
34
|
-
},
|
|
35
|
-
function
|
|
36
|
-
const { group: e, isInGroup:
|
|
37
|
-
|
|
38
|
-
), { title: c, content: u } =
|
|
155
|
+
}, Ol = ["update:modelValue"];
|
|
156
|
+
function Dl(t, l) {
|
|
157
|
+
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(
|
|
158
|
+
qt
|
|
159
|
+
), { title: c, content: u } = G(t), v = o("modelValue", t, l), d = o("disabled", t), p = o("collapse", t), r = o("modifiers", t);
|
|
39
160
|
return {
|
|
40
161
|
// group props
|
|
41
162
|
modelValue: v,
|
|
42
|
-
disabled:
|
|
43
|
-
isInGroup:
|
|
163
|
+
disabled: d,
|
|
164
|
+
isInGroup: s,
|
|
44
165
|
group: e,
|
|
45
|
-
collapse:
|
|
46
|
-
modifiers:
|
|
166
|
+
collapse: p,
|
|
167
|
+
modifiers: r,
|
|
47
168
|
// local props
|
|
48
169
|
title: c,
|
|
49
170
|
content: u
|
|
50
171
|
};
|
|
51
172
|
}
|
|
52
|
-
|
|
173
|
+
function X(t, l, e) {
|
|
174
|
+
return n(() => {
|
|
175
|
+
const s = {
|
|
176
|
+
[t]: !0
|
|
177
|
+
}, o = typeof (l == null ? void 0 : l.value) == "string" ? l.value.split(" ") : l == null ? void 0 : l.value;
|
|
178
|
+
return o && Array.isArray(o) && o.forEach((c) => {
|
|
179
|
+
s[`${t}--${c}`] = !0;
|
|
180
|
+
}), e && Object.keys(e.value).forEach((c) => {
|
|
181
|
+
s[`${t}--${c}`] = a(e.value[c]);
|
|
182
|
+
}), s;
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
const Ll = ["id", "open"], Bl = ["aria-controls", "aria-expanded"], Tl = ["aria-hidden"], Nl = {
|
|
53
186
|
name: "VvAccordion"
|
|
54
|
-
},
|
|
55
|
-
...
|
|
56
|
-
props:
|
|
57
|
-
emits:
|
|
58
|
-
setup(
|
|
59
|
-
const e =
|
|
60
|
-
() => e.name || (
|
|
187
|
+
}, Rl = /* @__PURE__ */ j({
|
|
188
|
+
...Nl,
|
|
189
|
+
props: Pl,
|
|
190
|
+
emits: Ol,
|
|
191
|
+
setup(t, { emit: l }) {
|
|
192
|
+
const e = t, s = yt(), o = n(
|
|
193
|
+
() => e.name || (s == null ? void 0 : s.id) || Mt()
|
|
61
194
|
), {
|
|
62
195
|
modifiers: c,
|
|
63
196
|
title: u,
|
|
64
197
|
content: v,
|
|
65
|
-
disabled:
|
|
66
|
-
collapse:
|
|
67
|
-
modelValue:
|
|
68
|
-
isInGroup:
|
|
69
|
-
} =
|
|
70
|
-
get: () =>
|
|
71
|
-
set: (
|
|
72
|
-
if (
|
|
73
|
-
if (
|
|
74
|
-
if (
|
|
75
|
-
|
|
198
|
+
disabled: d,
|
|
199
|
+
collapse: p,
|
|
200
|
+
modelValue: r,
|
|
201
|
+
isInGroup: i
|
|
202
|
+
} = Dl(e, l), b = N(!1), _ = n({
|
|
203
|
+
get: () => i.value ? p.value && Array.isArray(r.value) ? r.value.includes(o.value) : r.value === o.value : r.value === void 0 ? b.value : r.value,
|
|
204
|
+
set: (y) => {
|
|
205
|
+
if (i.value) {
|
|
206
|
+
if (p.value && Array.isArray(r.value)) {
|
|
207
|
+
if (y) {
|
|
208
|
+
r.value.push(o.value);
|
|
76
209
|
return;
|
|
77
210
|
}
|
|
78
|
-
|
|
79
|
-
(
|
|
211
|
+
r.value = r.value.filter(
|
|
212
|
+
(m) => m !== o.value
|
|
80
213
|
);
|
|
81
214
|
return;
|
|
82
215
|
}
|
|
83
|
-
|
|
216
|
+
r.value = y ? o.value : null;
|
|
84
217
|
return;
|
|
85
218
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
219
|
+
if (r.value === void 0 && typeof y == "boolean") {
|
|
220
|
+
b.value = y;
|
|
88
221
|
return;
|
|
89
222
|
}
|
|
90
|
-
|
|
223
|
+
r.value = y;
|
|
91
224
|
}
|
|
92
|
-
}), k =
|
|
225
|
+
}), k = X(
|
|
93
226
|
"vv-accordion",
|
|
94
227
|
c,
|
|
95
|
-
|
|
96
|
-
disabled:
|
|
228
|
+
n(() => ({
|
|
229
|
+
disabled: d.value
|
|
97
230
|
}))
|
|
98
|
-
),
|
|
99
|
-
return (
|
|
100
|
-
id:
|
|
101
|
-
class:
|
|
102
|
-
open:
|
|
103
|
-
onClick:
|
|
231
|
+
), A = bl(_);
|
|
232
|
+
return (y, m) => (f(), g("details", {
|
|
233
|
+
id: a(o),
|
|
234
|
+
class: le(a(k)),
|
|
235
|
+
open: a(_),
|
|
236
|
+
onClick: m[0] || (m[0] = Tt((I) => a(A)(), ["prevent"]))
|
|
104
237
|
}, [
|
|
105
238
|
M("summary", {
|
|
106
|
-
"aria-controls":
|
|
107
|
-
"aria-expanded":
|
|
239
|
+
"aria-controls": a(o),
|
|
240
|
+
"aria-expanded": a(_),
|
|
108
241
|
class: "vv-collapse__summary"
|
|
109
242
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
243
|
+
V(y.$slots, "summary", K(z({ open: a(_) })), () => [
|
|
244
|
+
Y(T(a(u)), 1)
|
|
112
245
|
])
|
|
113
|
-
], 8,
|
|
246
|
+
], 8, Bl),
|
|
114
247
|
M("div", {
|
|
115
|
-
"aria-hidden": !
|
|
248
|
+
"aria-hidden": !a(_),
|
|
116
249
|
class: "vv-collapse__content"
|
|
117
250
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
251
|
+
V(y.$slots, "details", K(z({ open: a(_) })), () => [
|
|
252
|
+
Y(T(a(v)), 1)
|
|
120
253
|
])
|
|
121
|
-
], 8,
|
|
122
|
-
], 10,
|
|
254
|
+
], 8, Tl)
|
|
255
|
+
], 10, Ll));
|
|
123
256
|
}
|
|
124
|
-
}),
|
|
257
|
+
}), Hl = {
|
|
125
258
|
/**
|
|
126
259
|
* VModel
|
|
127
260
|
*/
|
|
@@ -150,93 +283,171 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
150
283
|
* If true, the accordion items will be disabled
|
|
151
284
|
*/
|
|
152
285
|
disabled: Boolean
|
|
153
|
-
},
|
|
286
|
+
}, Ml = ["update:modelValue"];
|
|
287
|
+
function lt(t) {
|
|
288
|
+
if (Object.keys(t).some(
|
|
289
|
+
(l) => l !== "key" && !Ee(t[l])
|
|
290
|
+
))
|
|
291
|
+
throw Error("One or more groupState props aren't ref.");
|
|
292
|
+
gt(
|
|
293
|
+
t.key,
|
|
294
|
+
n(() => t)
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
const xl = {
|
|
154
298
|
name: "VvAccordionGroup"
|
|
155
|
-
},
|
|
156
|
-
...
|
|
157
|
-
props:
|
|
158
|
-
emits:
|
|
159
|
-
setup(
|
|
160
|
-
const e =
|
|
161
|
-
|
|
162
|
-
typeof e.modelValue == "string" &&
|
|
299
|
+
}, ds = /* @__PURE__ */ j({
|
|
300
|
+
...xl,
|
|
301
|
+
props: Hl,
|
|
302
|
+
emits: Ml,
|
|
303
|
+
setup(t, { emit: l }) {
|
|
304
|
+
const e = t, { disabled: s, collapse: o, modifiers: c, itemModifiers: u, items: v } = G(e);
|
|
305
|
+
_t(() => {
|
|
306
|
+
typeof e.modelValue == "string" && o.value && console.warn(
|
|
163
307
|
"[VvAccordionGroup]: modelValue is a string but collapse is true."
|
|
164
308
|
);
|
|
165
309
|
});
|
|
166
|
-
const
|
|
310
|
+
const d = N([]), p = n({
|
|
167
311
|
get: () => {
|
|
168
|
-
var
|
|
169
|
-
return e.modelValue !== void 0 ?
|
|
312
|
+
var i;
|
|
313
|
+
return e.modelValue !== void 0 ? o.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue : o.value ? d.value : (i = d.value) == null ? void 0 : i[0];
|
|
170
314
|
},
|
|
171
|
-
set: (
|
|
315
|
+
set: (i) => {
|
|
172
316
|
if (e.modelValue !== void 0)
|
|
173
|
-
return (Array.isArray(e.modelValue) ||
|
|
174
|
-
|
|
317
|
+
return (Array.isArray(e.modelValue) || o.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i);
|
|
318
|
+
d.value = Array.isArray(i) ? i : [i];
|
|
175
319
|
}
|
|
176
320
|
});
|
|
177
|
-
|
|
178
|
-
key:
|
|
179
|
-
modelValue:
|
|
180
|
-
disabled:
|
|
181
|
-
collapse:
|
|
321
|
+
lt({
|
|
322
|
+
key: qt,
|
|
323
|
+
modelValue: p,
|
|
324
|
+
disabled: s,
|
|
325
|
+
collapse: o,
|
|
182
326
|
modifiers: u
|
|
183
327
|
});
|
|
184
|
-
const
|
|
328
|
+
const r = X(
|
|
185
329
|
"vv-accordion-group",
|
|
186
330
|
c,
|
|
187
|
-
|
|
188
|
-
disabled:
|
|
331
|
+
n(() => ({
|
|
332
|
+
disabled: s.value
|
|
189
333
|
}))
|
|
190
334
|
);
|
|
191
|
-
return (
|
|
192
|
-
class:
|
|
335
|
+
return (i, b) => (f(), g("div", {
|
|
336
|
+
class: le(a(r))
|
|
193
337
|
}, [
|
|
194
|
-
|
|
195
|
-
(
|
|
196
|
-
key:
|
|
338
|
+
V(i.$slots, "default", {}, () => [
|
|
339
|
+
(f(!0), g(ie, null, Ne(a(v), (_) => (f(), H(Rl, R({
|
|
340
|
+
key: _.title
|
|
197
341
|
}, {
|
|
198
|
-
name:
|
|
199
|
-
title:
|
|
200
|
-
content:
|
|
342
|
+
name: _.name,
|
|
343
|
+
title: _.title,
|
|
344
|
+
content: _.content
|
|
201
345
|
}), {
|
|
202
|
-
header:
|
|
203
|
-
|
|
346
|
+
header: te((k) => [
|
|
347
|
+
V(i.$slots, `header::${_.name}`, K(z(k)))
|
|
204
348
|
]),
|
|
205
|
-
details:
|
|
206
|
-
|
|
349
|
+
details: te((k) => [
|
|
350
|
+
V(i.$slots, `details::${_.name}`, K(z(k)))
|
|
207
351
|
]),
|
|
208
352
|
_: 2
|
|
209
353
|
}, 1040))), 128))
|
|
210
354
|
])
|
|
211
355
|
], 2));
|
|
212
356
|
}
|
|
213
|
-
}),
|
|
357
|
+
}), Gl = {
|
|
358
|
+
/**
|
|
359
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
360
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
361
|
+
*/
|
|
362
|
+
to: {
|
|
363
|
+
type: [String, Object]
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* Anchor href
|
|
367
|
+
*/
|
|
368
|
+
href: String,
|
|
369
|
+
/**
|
|
370
|
+
* Anchor target
|
|
371
|
+
*/
|
|
372
|
+
target: {
|
|
373
|
+
type: String,
|
|
374
|
+
validator: (t) => Object.values(Ut).includes(t)
|
|
375
|
+
},
|
|
376
|
+
/**
|
|
377
|
+
* Anchor rel
|
|
378
|
+
*/
|
|
379
|
+
rel: {
|
|
380
|
+
type: String,
|
|
381
|
+
default: "noopener noreferrer"
|
|
382
|
+
}
|
|
383
|
+
}, Ue = {
|
|
384
|
+
/**
|
|
385
|
+
* Valid status
|
|
386
|
+
*/
|
|
214
387
|
valid: Boolean,
|
|
388
|
+
/**
|
|
389
|
+
* Valid label
|
|
390
|
+
*/
|
|
215
391
|
validLabel: [String, Array]
|
|
216
|
-
},
|
|
392
|
+
}, Fe = {
|
|
393
|
+
/**
|
|
394
|
+
* Invalid status
|
|
395
|
+
*/
|
|
217
396
|
invalid: Boolean,
|
|
397
|
+
/**
|
|
398
|
+
* Invalid label
|
|
399
|
+
*/
|
|
218
400
|
invalidLabel: [String, Array]
|
|
219
|
-
},
|
|
401
|
+
}, at = {
|
|
402
|
+
/**
|
|
403
|
+
* Loading status
|
|
404
|
+
*/
|
|
220
405
|
loading: Boolean,
|
|
221
|
-
|
|
222
|
-
|
|
406
|
+
/**
|
|
407
|
+
* Loading label
|
|
408
|
+
*/
|
|
409
|
+
loadingLabel: {
|
|
410
|
+
type: String,
|
|
411
|
+
default: "Loading..."
|
|
412
|
+
}
|
|
413
|
+
}, De = {
|
|
223
414
|
/**
|
|
224
415
|
* Whether the form control is disabled
|
|
225
416
|
*/
|
|
226
417
|
disabled: Boolean
|
|
227
|
-
},
|
|
418
|
+
}, jl = {
|
|
419
|
+
/**
|
|
420
|
+
* Whether the item is selected
|
|
421
|
+
*/
|
|
422
|
+
selected: Boolean
|
|
423
|
+
}, Wl = {
|
|
424
|
+
/**
|
|
425
|
+
* Whether the item is active
|
|
426
|
+
*/
|
|
427
|
+
active: Boolean
|
|
428
|
+
}, Ul = {
|
|
429
|
+
/**
|
|
430
|
+
* Whether the item is pressed
|
|
431
|
+
*/
|
|
432
|
+
pressed: Boolean
|
|
433
|
+
}, Me = {
|
|
434
|
+
/**
|
|
435
|
+
* The item label
|
|
436
|
+
*/
|
|
437
|
+
label: [String, Number]
|
|
438
|
+
}, Ke = {
|
|
228
439
|
/**
|
|
229
440
|
* The value is not editable
|
|
230
441
|
*/
|
|
231
442
|
readonly: Boolean
|
|
232
|
-
},
|
|
443
|
+
}, me = {
|
|
233
444
|
/**
|
|
234
445
|
* Component BEM modifiers
|
|
235
446
|
*/
|
|
236
447
|
modifiers: [String, Array]
|
|
237
|
-
},
|
|
448
|
+
}, ze = {
|
|
238
449
|
hintLabel: { type: String, default: "" }
|
|
239
|
-
},
|
|
450
|
+
}, kt = {
|
|
240
451
|
/**
|
|
241
452
|
* List of options, can be string[] or object[]
|
|
242
453
|
*/
|
|
@@ -256,21 +467,21 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
256
467
|
* Used when options are objects: key to use for option disabled
|
|
257
468
|
*/
|
|
258
469
|
disabledKey: { type: [String, Function], default: "disabled" }
|
|
259
|
-
},
|
|
470
|
+
}, Fl = {
|
|
260
471
|
/**
|
|
261
472
|
* Show character limit
|
|
262
473
|
*/
|
|
263
474
|
count: {
|
|
264
475
|
type: [Boolean, String],
|
|
265
476
|
default: !1,
|
|
266
|
-
validator: (
|
|
477
|
+
validator: (t) => [!0, !1, "limit", "countdown"].includes(t)
|
|
267
478
|
}
|
|
268
|
-
},
|
|
479
|
+
}, Kl = {
|
|
269
480
|
/**
|
|
270
481
|
* Milliseconds to wait before emitting the input event
|
|
271
482
|
*/
|
|
272
483
|
debounce: [Number, String]
|
|
273
|
-
},
|
|
484
|
+
}, At = {
|
|
274
485
|
/**
|
|
275
486
|
* VvIcon name or props
|
|
276
487
|
* @see VVIcon
|
|
@@ -281,39 +492,39 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
281
492
|
*/
|
|
282
493
|
iconPosition: {
|
|
283
494
|
type: String,
|
|
284
|
-
default:
|
|
285
|
-
validation: (
|
|
495
|
+
default: Ge.before,
|
|
496
|
+
validation: (t) => Object.values(Ge).includes(t)
|
|
286
497
|
}
|
|
287
|
-
},
|
|
498
|
+
}, ot = {
|
|
288
499
|
/**
|
|
289
500
|
* Global attribute tabindex
|
|
290
501
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
291
502
|
*/
|
|
292
503
|
tabindex: { type: [String, Number], default: 0 }
|
|
293
|
-
},
|
|
504
|
+
}, wt = {
|
|
294
505
|
/**
|
|
295
506
|
* If true the label will be floating
|
|
296
507
|
*/
|
|
297
508
|
floating: Boolean
|
|
298
|
-
},
|
|
509
|
+
}, qe = {
|
|
299
510
|
/**
|
|
300
511
|
* If true the input will be unselectable
|
|
301
512
|
*/
|
|
302
513
|
unselectable: { type: Boolean, default: !0 }
|
|
303
|
-
},
|
|
514
|
+
}, st = {
|
|
304
515
|
/**
|
|
305
516
|
* Global attribute id
|
|
306
517
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
307
518
|
*/
|
|
308
519
|
id: [String, Number]
|
|
309
|
-
},
|
|
520
|
+
}, ht = {
|
|
310
521
|
/**
|
|
311
522
|
* Dropdown placement
|
|
312
523
|
*/
|
|
313
524
|
placement: {
|
|
314
525
|
type: String,
|
|
315
|
-
default:
|
|
316
|
-
validator: (
|
|
526
|
+
default: fe.bottom,
|
|
527
|
+
validator: (t) => Object.values(fe).includes(t) || Object.values(jt).includes(t)
|
|
317
528
|
},
|
|
318
529
|
/**
|
|
319
530
|
* Dropdown show / hide transition name
|
|
@@ -389,42 +600,43 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
389
600
|
triggerWidth: {
|
|
390
601
|
type: Boolean
|
|
391
602
|
}
|
|
392
|
-
},
|
|
393
|
-
...
|
|
603
|
+
}, nt = {
|
|
604
|
+
...st,
|
|
394
605
|
/**
|
|
395
606
|
* Input / Textarea name
|
|
396
607
|
* Name of the form control. Submitted with the form as part of a name/value pair
|
|
397
608
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
398
609
|
*/
|
|
399
610
|
name: { type: String, required: !0 }
|
|
400
|
-
},
|
|
611
|
+
}, Qt = {
|
|
401
612
|
/**
|
|
402
613
|
* Global attribute autofocus
|
|
403
614
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
404
615
|
*/
|
|
405
616
|
autofocus: Boolean
|
|
406
|
-
},
|
|
617
|
+
}, Zt = {
|
|
407
618
|
/**
|
|
408
619
|
* Global attribute autocomplete
|
|
409
620
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
410
621
|
*/
|
|
411
622
|
autocomplete: { type: String, default: "off" }
|
|
412
|
-
},
|
|
413
|
-
...
|
|
414
|
-
...
|
|
415
|
-
...
|
|
416
|
-
...
|
|
417
|
-
...Ce,
|
|
418
|
-
...Oe,
|
|
419
|
-
...Ie,
|
|
420
|
-
...Pe,
|
|
623
|
+
}, el = {
|
|
624
|
+
...nt,
|
|
625
|
+
...Qt,
|
|
626
|
+
...Zt,
|
|
627
|
+
...ot,
|
|
421
628
|
...De,
|
|
422
|
-
...
|
|
423
|
-
...
|
|
424
|
-
...
|
|
425
|
-
...Kt,
|
|
629
|
+
...Ke,
|
|
630
|
+
...Ue,
|
|
631
|
+
...Fe,
|
|
426
632
|
...ze,
|
|
427
|
-
...
|
|
633
|
+
...at,
|
|
634
|
+
...me,
|
|
635
|
+
...Fl,
|
|
636
|
+
...Kl,
|
|
637
|
+
...At,
|
|
638
|
+
...wt,
|
|
639
|
+
...Me,
|
|
428
640
|
/**
|
|
429
641
|
* Input / Textarea minlength
|
|
430
642
|
* Minimum length (number of characters) of value
|
|
@@ -452,20 +664,17 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
452
664
|
* Available for all input types except color
|
|
453
665
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
454
666
|
*/
|
|
455
|
-
required: Boolean
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
...
|
|
462
|
-
...Te,
|
|
463
|
-
...Ie,
|
|
464
|
-
...Pe,
|
|
667
|
+
required: Boolean
|
|
668
|
+
}, tl = {
|
|
669
|
+
...nt,
|
|
670
|
+
...ot,
|
|
671
|
+
...Ue,
|
|
672
|
+
...Fe,
|
|
673
|
+
...ze,
|
|
465
674
|
...De,
|
|
466
|
-
...
|
|
467
|
-
...
|
|
468
|
-
...
|
|
675
|
+
...Ke,
|
|
676
|
+
...me,
|
|
677
|
+
...Me,
|
|
469
678
|
/**
|
|
470
679
|
* Input value
|
|
471
680
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
@@ -474,27 +683,20 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
474
683
|
/**
|
|
475
684
|
* Input value
|
|
476
685
|
*/
|
|
477
|
-
modelValue: [Object, Number, Boolean, String]
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
...Ie,
|
|
484
|
-
...Pe,
|
|
485
|
-
...Ke,
|
|
686
|
+
modelValue: [Object, Number, Boolean, String]
|
|
687
|
+
}, ll = {
|
|
688
|
+
...Ue,
|
|
689
|
+
...Fe,
|
|
690
|
+
...kt,
|
|
691
|
+
...ze,
|
|
486
692
|
...De,
|
|
487
|
-
...
|
|
488
|
-
...
|
|
489
|
-
...
|
|
693
|
+
...Ke,
|
|
694
|
+
...me,
|
|
695
|
+
...Me,
|
|
490
696
|
/**
|
|
491
697
|
* Input value
|
|
492
698
|
*/
|
|
493
699
|
modelValue: [String, Array],
|
|
494
|
-
/**
|
|
495
|
-
* Input label
|
|
496
|
-
*/
|
|
497
|
-
label: String,
|
|
498
700
|
/**
|
|
499
701
|
* Input name
|
|
500
702
|
*/
|
|
@@ -503,76 +705,76 @@ const Lt = ["id", "open"], Nt = ["aria-controls", "aria-expanded"], Ht = ["aria-
|
|
|
503
705
|
* If true, the group will be displayed in a vertical column
|
|
504
706
|
*/
|
|
505
707
|
vertical: Boolean
|
|
506
|
-
},
|
|
507
|
-
...
|
|
708
|
+
}, al = {
|
|
709
|
+
...De,
|
|
710
|
+
...Me,
|
|
711
|
+
...Ul,
|
|
712
|
+
...Wl,
|
|
713
|
+
...Gl,
|
|
714
|
+
/**
|
|
715
|
+
* Button type
|
|
716
|
+
*/
|
|
717
|
+
type: {
|
|
718
|
+
type: String,
|
|
719
|
+
default: pt.button,
|
|
720
|
+
validator: (t) => Object.values(pt).includes(t)
|
|
721
|
+
}
|
|
722
|
+
}, zl = {
|
|
723
|
+
...me,
|
|
508
724
|
value: [String, Number]
|
|
509
|
-
},
|
|
725
|
+
}, ql = {
|
|
510
726
|
name: "VvBadge"
|
|
511
|
-
},
|
|
512
|
-
...
|
|
513
|
-
props:
|
|
514
|
-
setup(
|
|
515
|
-
const
|
|
516
|
-
return (
|
|
517
|
-
class:
|
|
727
|
+
}, Yl = /* @__PURE__ */ j({
|
|
728
|
+
...ql,
|
|
729
|
+
props: zl,
|
|
730
|
+
setup(t) {
|
|
731
|
+
const l = t, { modifiers: e } = G(l), s = X("vv-badge", e);
|
|
732
|
+
return (o, c) => (f(), g("span", {
|
|
733
|
+
class: le(a(s)),
|
|
518
734
|
role: "status"
|
|
519
735
|
}, [
|
|
520
|
-
|
|
521
|
-
|
|
736
|
+
V(o.$slots, "default", {}, () => [
|
|
737
|
+
Y(T(o.value), 1)
|
|
522
738
|
])
|
|
523
739
|
], 2));
|
|
524
740
|
}
|
|
525
|
-
})
|
|
526
|
-
|
|
527
|
-
return computed(() => {
|
|
528
|
-
const r = {
|
|
529
|
-
[o]: !0
|
|
530
|
-
};
|
|
531
|
-
let a = unref(n);
|
|
532
|
-
return a && (!Array.isArray(a) && typeof a == "string" && (a = a.split(" ")), Array.isArray(a) && a.forEach((c) => {
|
|
533
|
-
r[`${o}--${c}`] = !0;
|
|
534
|
-
})), e && Object.keys(e.value).forEach((c) => {
|
|
535
|
-
r[`${o}--${c}`] = unref(e.value[c]);
|
|
536
|
-
}), r;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
const Qt = {
|
|
540
|
-
...ve,
|
|
741
|
+
}), Jl = {
|
|
742
|
+
...me,
|
|
541
743
|
routes: Array
|
|
542
|
-
},
|
|
744
|
+
}, Xl = { class: "vv-breadcrumb__list" }, Ql = ["content"], Zl = {
|
|
543
745
|
name: "VvBreadcrumb"
|
|
544
|
-
},
|
|
545
|
-
...
|
|
546
|
-
props:
|
|
547
|
-
setup(
|
|
548
|
-
const
|
|
549
|
-
return (
|
|
550
|
-
class:
|
|
746
|
+
}, cs = /* @__PURE__ */ j({
|
|
747
|
+
...Zl,
|
|
748
|
+
props: Jl,
|
|
749
|
+
setup(t) {
|
|
750
|
+
const l = t, { modifiers: e } = G(l), s = X("vv-breadcrumb", e);
|
|
751
|
+
return (o, c) => (f(), g("nav", {
|
|
752
|
+
class: le(a(s)),
|
|
551
753
|
"aria-label": "breadcrumbs"
|
|
552
754
|
}, [
|
|
553
|
-
M("ol",
|
|
554
|
-
(
|
|
555
|
-
var
|
|
556
|
-
return
|
|
755
|
+
M("ol", Xl, [
|
|
756
|
+
(f(!0), g(ie, null, Ne(o.routes, (u, v) => {
|
|
757
|
+
var d, p, r, i;
|
|
758
|
+
return f(), g("li", {
|
|
557
759
|
key: `${u.label}-${v}`,
|
|
558
|
-
class:
|
|
559
|
-
"vv-breadcrumb__item": v < Number((
|
|
560
|
-
"vv-breadcrumb__item-active": v === Number((
|
|
760
|
+
class: le({
|
|
761
|
+
"vv-breadcrumb__item": v < Number((d = o.routes) == null ? void 0 : d.length) - 1,
|
|
762
|
+
"vv-breadcrumb__item-active": v === Number((p = o.routes) == null ? void 0 : p.length) - 1
|
|
561
763
|
}),
|
|
562
764
|
itemprop: "itemListElement",
|
|
563
765
|
itemtype: "https://schema.org/ListItem",
|
|
564
766
|
itemscope: ""
|
|
565
767
|
}, [
|
|
566
|
-
(
|
|
768
|
+
(f(), H(Nt(u.to ? "router-link" : u.href ? "a" : "span"), R(u, {
|
|
567
769
|
class: {
|
|
568
|
-
"vv-breadcrumb__link": v < Number((
|
|
770
|
+
"vv-breadcrumb__link": v < Number((r = o.routes) == null ? void 0 : r.length) - 1
|
|
569
771
|
},
|
|
570
|
-
"aria-current": v === Number((
|
|
772
|
+
"aria-current": v === Number((i = o.routes) == null ? void 0 : i.length) - 1 ? "page" : void 0,
|
|
571
773
|
itemprop: "item"
|
|
572
774
|
}), {
|
|
573
|
-
default:
|
|
574
|
-
|
|
575
|
-
|
|
775
|
+
default: te(() => [
|
|
776
|
+
V(o.$slots, "label", K(z({ route: u, index: v })), () => [
|
|
777
|
+
Y(T(u.label), 1)
|
|
576
778
|
])
|
|
577
779
|
]),
|
|
578
780
|
_: 2
|
|
@@ -580,13 +782,13 @@ const Qt = {
|
|
|
580
782
|
M("meta", {
|
|
581
783
|
itemprop: "position",
|
|
582
784
|
content: `${v + 1}`
|
|
583
|
-
}, null, 8,
|
|
785
|
+
}, null, 8, Ql)
|
|
584
786
|
], 2);
|
|
585
787
|
}), 128))
|
|
586
788
|
])
|
|
587
789
|
], 2));
|
|
588
790
|
}
|
|
589
|
-
}),
|
|
791
|
+
}), ea = {
|
|
590
792
|
/**
|
|
591
793
|
* Color
|
|
592
794
|
*/
|
|
@@ -679,66 +881,170 @@ const Qt = {
|
|
|
679
881
|
modifiers: {
|
|
680
882
|
type: [String, Array]
|
|
681
883
|
}
|
|
682
|
-
}
|
|
884
|
+
};
|
|
885
|
+
function ol() {
|
|
886
|
+
return We(wl);
|
|
887
|
+
}
|
|
888
|
+
const ta = {
|
|
683
889
|
name: "VvIcon"
|
|
684
|
-
},
|
|
685
|
-
...
|
|
686
|
-
props:
|
|
687
|
-
setup(
|
|
688
|
-
const
|
|
689
|
-
const
|
|
690
|
-
return
|
|
691
|
-
(
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
694
|
-
return
|
|
890
|
+
}, ee = /* @__PURE__ */ j({
|
|
891
|
+
...ta,
|
|
892
|
+
props: ea,
|
|
893
|
+
setup(t) {
|
|
894
|
+
const l = t, e = N(!0), s = ol(), { modifiers: o } = G(l), c = X("vv-icon", o), u = n(() => l.provider || (s == null ? void 0 : s.provider)), v = n(() => {
|
|
895
|
+
const r = l.name ?? "", i = `@${u.value}:${l.prefix}:${l.name}`;
|
|
896
|
+
return Ye(r) ? r : Ye(i) ? i : (s == null ? void 0 : s.iconsCollections.find(
|
|
897
|
+
(b) => {
|
|
898
|
+
const _ = `@${u.value}:${b.prefix}:${r}`;
|
|
899
|
+
if (Ye(_))
|
|
900
|
+
return _;
|
|
695
901
|
}
|
|
696
|
-
)) ||
|
|
902
|
+
)) || r;
|
|
697
903
|
});
|
|
698
|
-
function
|
|
699
|
-
let
|
|
904
|
+
function d(r) {
|
|
905
|
+
let i = null;
|
|
700
906
|
if (typeof window > "u") {
|
|
701
|
-
const { JSDOM:
|
|
702
|
-
|
|
907
|
+
const { JSDOM: A } = require("jsdom");
|
|
908
|
+
i = new A().window;
|
|
703
909
|
}
|
|
704
|
-
return (
|
|
910
|
+
return (i ? new i.DOMParser() : new window.DOMParser()).parseFromString(r, "text/html").querySelector("svg");
|
|
705
911
|
}
|
|
706
|
-
function
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
body:
|
|
912
|
+
function p(r) {
|
|
913
|
+
const i = d(r), b = (i == null ? void 0 : i.innerHTML.trim()) || "";
|
|
914
|
+
i && b && Sl(`@${u.value}:${l.prefix}:${l.name}`, {
|
|
915
|
+
body: b,
|
|
710
916
|
// Set height and width from svg content
|
|
711
|
-
height:
|
|
712
|
-
width:
|
|
917
|
+
height: i.viewBox.baseVal.height,
|
|
918
|
+
width: i.viewBox.baseVal.width
|
|
713
919
|
});
|
|
714
920
|
}
|
|
715
|
-
return
|
|
716
|
-
|
|
717
|
-
}).catch((
|
|
718
|
-
throw new Error(`During fetch icon: ${
|
|
719
|
-
})) :
|
|
921
|
+
return s && (l.src && !Ye(`@${u.value}:${l.prefix}:${l.name}`) ? (e.value = !1, s.fetchIcon(l.src).then((r) => {
|
|
922
|
+
r && (p(r), e.value = !0);
|
|
923
|
+
}).catch((r) => {
|
|
924
|
+
throw new Error(`During fetch icon: ${r == null ? void 0 : r.message}`);
|
|
925
|
+
})) : l.svg && p(l.svg)), (r, i) => a(e) ? (f(), H(a(_l), R({
|
|
720
926
|
key: 0,
|
|
721
|
-
class:
|
|
927
|
+
class: a(c)
|
|
722
928
|
}, {
|
|
723
|
-
inline:
|
|
724
|
-
width:
|
|
725
|
-
height:
|
|
726
|
-
horizontalFlip:
|
|
727
|
-
verticalFlip:
|
|
728
|
-
flip:
|
|
729
|
-
rotate:
|
|
730
|
-
color:
|
|
731
|
-
onLoad:
|
|
732
|
-
icon:
|
|
733
|
-
}), null, 16, ["class"])) :
|
|
929
|
+
inline: r.inline,
|
|
930
|
+
width: r.width,
|
|
931
|
+
height: r.height,
|
|
932
|
+
horizontalFlip: r.horizontalFlip,
|
|
933
|
+
verticalFlip: r.verticalFlip,
|
|
934
|
+
flip: r.flip,
|
|
935
|
+
rotate: r.rotate,
|
|
936
|
+
color: r.color,
|
|
937
|
+
onLoad: r.onLoad,
|
|
938
|
+
icon: a(v)
|
|
939
|
+
}), null, 16, ["class"])) : C("", !0);
|
|
734
940
|
}
|
|
735
|
-
});
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
941
|
+
}), la = ["click", "mouseover", "mouseleave"], aa = al;
|
|
942
|
+
function oa() {
|
|
943
|
+
return We(Yt, {});
|
|
944
|
+
}
|
|
945
|
+
function sa() {
|
|
946
|
+
return We(Jt, {});
|
|
947
|
+
}
|
|
948
|
+
function na() {
|
|
949
|
+
return We(Xt, {});
|
|
950
|
+
}
|
|
951
|
+
const ra = {
|
|
952
|
+
name: "VvAction"
|
|
953
|
+
}, ia = /* @__PURE__ */ j({
|
|
954
|
+
...ra,
|
|
955
|
+
props: aa,
|
|
956
|
+
emits: la,
|
|
957
|
+
setup(t, { expose: l, emit: e }) {
|
|
958
|
+
const s = t, o = ol(), c = N(null);
|
|
959
|
+
l({ $el: c });
|
|
960
|
+
const {
|
|
961
|
+
reference: u,
|
|
962
|
+
bus: v,
|
|
963
|
+
aria: d,
|
|
964
|
+
expanded: p
|
|
965
|
+
} = oa();
|
|
966
|
+
ve(
|
|
967
|
+
() => c.value,
|
|
968
|
+
(m) => {
|
|
969
|
+
u && (u.value = m);
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
const r = n(() => s.pressed || (p == null ? void 0 : p.value)), { role: i } = na(), b = n(() => {
|
|
973
|
+
switch (!0) {
|
|
974
|
+
case s.disabled:
|
|
975
|
+
return ke.button;
|
|
976
|
+
case s.to !== void 0:
|
|
977
|
+
return o != null && o.nuxt ? ke.nuxtLink : ke.routerLink;
|
|
978
|
+
case s.href !== void 0:
|
|
979
|
+
return ke.a;
|
|
980
|
+
default:
|
|
981
|
+
return ke.button;
|
|
982
|
+
}
|
|
983
|
+
}), _ = n(() => {
|
|
984
|
+
const m = {
|
|
985
|
+
...d == null ? void 0 : d.value,
|
|
986
|
+
"aria-pressed": r.value ? !0 : void 0,
|
|
987
|
+
role: i
|
|
988
|
+
};
|
|
989
|
+
switch (b.value) {
|
|
990
|
+
case ke.a:
|
|
991
|
+
return {
|
|
992
|
+
...m,
|
|
993
|
+
href: s.href,
|
|
994
|
+
target: s.target,
|
|
995
|
+
rel: s.rel
|
|
996
|
+
};
|
|
997
|
+
case ke.routerLink:
|
|
998
|
+
case ke.nuxtLink:
|
|
999
|
+
return {
|
|
1000
|
+
...m,
|
|
1001
|
+
to: s.to,
|
|
1002
|
+
target: s.target
|
|
1003
|
+
};
|
|
1004
|
+
default:
|
|
1005
|
+
return {
|
|
1006
|
+
...m,
|
|
1007
|
+
type: s.type,
|
|
1008
|
+
disabled: s.disabled
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
}), k = (m) => {
|
|
1012
|
+
if (s.disabled) {
|
|
1013
|
+
m.preventDefault();
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
v == null || v.emit("click", m), e("click", m);
|
|
1017
|
+
}, A = (m) => {
|
|
1018
|
+
v == null || v.emit("mouseover", m), e("mouseover", m);
|
|
1019
|
+
}, y = (m) => {
|
|
1020
|
+
v == null || v.emit("mouseleave", m), e("mouseleave", m);
|
|
1021
|
+
};
|
|
1022
|
+
return (m, I) => (f(), H(Nt(a(b)), R(a(_), {
|
|
1023
|
+
ref_key: "element",
|
|
1024
|
+
ref: c,
|
|
1025
|
+
class: {
|
|
1026
|
+
active: m.active,
|
|
1027
|
+
pressed: a(r),
|
|
1028
|
+
disabled: m.disabled
|
|
1029
|
+
},
|
|
1030
|
+
onClickPassive: k,
|
|
1031
|
+
onMouseoverPassive: A,
|
|
1032
|
+
onMouseleavePassive: y
|
|
1033
|
+
}), {
|
|
1034
|
+
default: te(() => [
|
|
1035
|
+
V(m.$slots, "default", {}, () => [
|
|
1036
|
+
Y(T(m.label), 1)
|
|
1037
|
+
])
|
|
1038
|
+
]),
|
|
1039
|
+
_: 3
|
|
1040
|
+
}, 16, ["class"]));
|
|
1041
|
+
}
|
|
1042
|
+
}), ua = ["update:modelValue"], da = {
|
|
1043
|
+
...al,
|
|
1044
|
+
...st,
|
|
1045
|
+
...me,
|
|
1046
|
+
...qe,
|
|
1047
|
+
...at,
|
|
742
1048
|
/**
|
|
743
1049
|
* Button icon
|
|
744
1050
|
*/
|
|
@@ -748,260 +1054,160 @@ const lo = ["update:modelValue"], so = {
|
|
|
748
1054
|
*/
|
|
749
1055
|
iconPosition: {
|
|
750
1056
|
type: String,
|
|
751
|
-
default:
|
|
752
|
-
validator: (
|
|
1057
|
+
default: fe.left,
|
|
1058
|
+
validator: (t) => Object.values(fe).includes(t)
|
|
753
1059
|
},
|
|
754
|
-
/**
|
|
755
|
-
* Button label
|
|
756
|
-
*/
|
|
757
|
-
label: [String, Number],
|
|
758
|
-
/**
|
|
759
|
-
* Loading status
|
|
760
|
-
*/
|
|
761
|
-
loading: Boolean,
|
|
762
1060
|
/**
|
|
763
1061
|
* Loading icon
|
|
764
1062
|
*/
|
|
765
1063
|
loadingIcon: { type: String, default: "eos-icons:bubble-loading" },
|
|
766
|
-
/**
|
|
767
|
-
* Loading label
|
|
768
|
-
*/
|
|
769
|
-
loadingLabel: {
|
|
770
|
-
type: String,
|
|
771
|
-
default: "Loading..."
|
|
772
|
-
},
|
|
773
|
-
/**
|
|
774
|
-
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
775
|
-
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
776
|
-
*/
|
|
777
|
-
to: {
|
|
778
|
-
type: [String, Object]
|
|
779
|
-
},
|
|
780
|
-
/**
|
|
781
|
-
* Link href
|
|
782
|
-
*/
|
|
783
|
-
href: String,
|
|
784
|
-
/**
|
|
785
|
-
* Link target
|
|
786
|
-
*/
|
|
787
|
-
target: {
|
|
788
|
-
type: String,
|
|
789
|
-
validator: (o) => Object.values(_t).includes(o)
|
|
790
|
-
},
|
|
791
|
-
active: Boolean,
|
|
792
|
-
/**
|
|
793
|
-
* Button pressed mode
|
|
794
|
-
*/
|
|
795
|
-
pressed: Boolean,
|
|
796
|
-
/**
|
|
797
|
-
* Link rel
|
|
798
|
-
*/
|
|
799
|
-
rel: {
|
|
800
|
-
type: String,
|
|
801
|
-
default: "noopener noreferrer"
|
|
802
|
-
},
|
|
803
|
-
/**
|
|
804
|
-
* Button type
|
|
805
|
-
*/
|
|
806
|
-
type: {
|
|
807
|
-
type: String,
|
|
808
|
-
default: "button",
|
|
809
|
-
validator: (o) => Object.values(gt).includes(o)
|
|
810
|
-
},
|
|
811
1064
|
toggle: {
|
|
812
1065
|
type: Boolean,
|
|
813
1066
|
default: !1
|
|
814
1067
|
},
|
|
815
1068
|
modelValue: String
|
|
816
1069
|
};
|
|
817
|
-
function
|
|
818
|
-
var
|
|
819
|
-
const { group: e, isInGroup:
|
|
1070
|
+
function ca(t, l) {
|
|
1071
|
+
var m;
|
|
1072
|
+
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(Ft), {
|
|
820
1073
|
id: c,
|
|
821
1074
|
iconPosition: u,
|
|
822
1075
|
icon: v,
|
|
823
|
-
label:
|
|
824
|
-
pressed:
|
|
825
|
-
modifiers:
|
|
826
|
-
} =
|
|
1076
|
+
label: d,
|
|
1077
|
+
pressed: p,
|
|
1078
|
+
modifiers: r
|
|
1079
|
+
} = G(t), i = o("modelValue", t, l), b = o("disabled", t), _ = o("toggle", t), k = o(
|
|
827
1080
|
"unselectable",
|
|
828
|
-
|
|
829
|
-
),
|
|
830
|
-
var
|
|
831
|
-
const I =
|
|
832
|
-
return [...I, ...
|
|
1081
|
+
t
|
|
1082
|
+
), A = ((m = e == null ? void 0 : e.value) == null ? void 0 : m.multiple) ?? N(!1), y = n(() => {
|
|
1083
|
+
var D;
|
|
1084
|
+
const I = r != null && r.value ? Array.isArray(r.value) ? r.value : r.value.split(" ") : [], O = (D = e == null ? void 0 : e.value.itemModifiers) != null && D.value ? Array.isArray(e.value.itemModifiers.value) ? e.value.itemModifiers.value : e.value.itemModifiers.value.split(" ") : [];
|
|
1085
|
+
return [...I, ...O];
|
|
833
1086
|
});
|
|
834
1087
|
return {
|
|
835
1088
|
// group props
|
|
836
1089
|
group: e,
|
|
837
|
-
isInGroup:
|
|
838
|
-
modelValue:
|
|
839
|
-
disabled:
|
|
840
|
-
toggle:
|
|
1090
|
+
isInGroup: s,
|
|
1091
|
+
modelValue: i,
|
|
1092
|
+
disabled: b,
|
|
1093
|
+
toggle: _,
|
|
841
1094
|
unselectable: k,
|
|
842
|
-
multiple:
|
|
1095
|
+
multiple: A,
|
|
843
1096
|
// local props
|
|
844
1097
|
id: c,
|
|
845
|
-
modifiers:
|
|
846
|
-
pressed:
|
|
1098
|
+
modifiers: y,
|
|
1099
|
+
pressed: p,
|
|
847
1100
|
iconPosition: u,
|
|
848
1101
|
icon: v,
|
|
849
|
-
label:
|
|
1102
|
+
label: d
|
|
850
1103
|
};
|
|
851
1104
|
}
|
|
852
|
-
const
|
|
1105
|
+
const Le = (t) => n(() => String((t == null ? void 0 : t.value) || Mt())), va = {
|
|
853
1106
|
key: 1,
|
|
854
1107
|
class: "vv-button__label"
|
|
855
|
-
},
|
|
1108
|
+
}, fa = {
|
|
856
1109
|
key: 1,
|
|
857
1110
|
class: "vv-button__label"
|
|
858
|
-
},
|
|
1111
|
+
}, pa = {
|
|
859
1112
|
name: "VvButton"
|
|
860
|
-
},
|
|
861
|
-
...
|
|
862
|
-
props:
|
|
863
|
-
emits:
|
|
864
|
-
setup(
|
|
865
|
-
const
|
|
1113
|
+
}, vs = /* @__PURE__ */ j({
|
|
1114
|
+
...pa,
|
|
1115
|
+
props: da,
|
|
1116
|
+
emits: ua,
|
|
1117
|
+
setup(t, { expose: l, emit: e }) {
|
|
1118
|
+
const s = t, o = yt(), c = Ae(), {
|
|
866
1119
|
id: u,
|
|
867
1120
|
modifiers: v,
|
|
868
|
-
iconPosition:
|
|
869
|
-
icon:
|
|
870
|
-
label:
|
|
871
|
-
modelValue:
|
|
872
|
-
disabled:
|
|
873
|
-
toggle:
|
|
1121
|
+
iconPosition: d,
|
|
1122
|
+
icon: p,
|
|
1123
|
+
label: r,
|
|
1124
|
+
modelValue: i,
|
|
1125
|
+
disabled: b,
|
|
1126
|
+
toggle: _,
|
|
874
1127
|
unselectable: k
|
|
875
|
-
} =
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
} = useInjectedDropdownTrigger();
|
|
882
|
-
watch(
|
|
883
|
-
() => I.value,
|
|
884
|
-
(A) => {
|
|
885
|
-
B && (B.value = A);
|
|
886
|
-
}
|
|
887
|
-
);
|
|
888
|
-
const { role: L } = useInjectedDropdownAction(), q = computed(() => {
|
|
889
|
-
switch (!0) {
|
|
890
|
-
case p.value:
|
|
891
|
-
return ye.button;
|
|
892
|
-
case r.to !== void 0:
|
|
893
|
-
return S != null && S.nuxt ? ye.nuxtLink : ye.routerLink;
|
|
894
|
-
case r.href !== void 0:
|
|
895
|
-
return ye.a;
|
|
896
|
-
default:
|
|
897
|
-
return ye.button;
|
|
898
|
-
}
|
|
899
|
-
}), Q = computed(() => g.value ? Array.isArray(s.value) ? contains(b.value, s.value) : equals(b.value, s.value) : r.pressed), P = useBemModifiers(
|
|
1128
|
+
} = ca(s, e), A = Le(u), y = n(() => (o == null ? void 0 : o.name) || A.value), m = N(null), I = n(() => {
|
|
1129
|
+
var w;
|
|
1130
|
+
return (w = m.value) == null ? void 0 : w.$el;
|
|
1131
|
+
});
|
|
1132
|
+
l({ $el: I });
|
|
1133
|
+
const O = n(() => _.value ? Array.isArray(i.value) ? Ce(y.value, i.value) : Pe(y.value, i.value) : s.pressed), D = X(
|
|
900
1134
|
"vv-button",
|
|
901
1135
|
v,
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
iconOnly: Boolean((d == null ? void 0 : d.value) && !(l != null && l.value) && !c.default)
|
|
1136
|
+
n(() => ({
|
|
1137
|
+
reverse: [fe.right, fe.bottom].includes(d.value),
|
|
1138
|
+
column: [fe.top, fe.bottom].includes(d.value),
|
|
1139
|
+
"icon-only": Boolean(
|
|
1140
|
+
(p == null ? void 0 : p.value) && !(r != null && r.value) && !c.default
|
|
1141
|
+
)
|
|
909
1142
|
}))
|
|
910
|
-
),
|
|
911
|
-
() => typeof (
|
|
912
|
-
),
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
};
|
|
919
|
-
switch (q.value) {
|
|
920
|
-
case ye.a:
|
|
921
|
-
return {
|
|
922
|
-
...A,
|
|
923
|
-
role: A.role ?? "button",
|
|
924
|
-
href: r.href,
|
|
925
|
-
target: r.target,
|
|
926
|
-
rel: r.rel
|
|
927
|
-
};
|
|
928
|
-
case ye.routerLink:
|
|
929
|
-
case ye.nuxtLink:
|
|
930
|
-
return {
|
|
931
|
-
...A,
|
|
932
|
-
role: A.role ?? "button",
|
|
933
|
-
to: r.to,
|
|
934
|
-
target: r.target
|
|
935
|
-
};
|
|
936
|
-
default:
|
|
937
|
-
return {
|
|
938
|
-
...A,
|
|
939
|
-
type: r.type,
|
|
940
|
-
disabled: p.value
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
}), te = (A) => {
|
|
944
|
-
if (E == null || E.emit("click", A), g.value) {
|
|
945
|
-
if (Array.isArray(s.value)) {
|
|
946
|
-
if (contains(b.value, s.value)) {
|
|
947
|
-
k.value && (s.value = s.value.filter(
|
|
948
|
-
(oe) => oe !== b.value
|
|
1143
|
+
), L = n(
|
|
1144
|
+
() => typeof (p == null ? void 0 : p.value) == "string" ? { name: p == null ? void 0 : p.value } : p == null ? void 0 : p.value
|
|
1145
|
+
), x = () => {
|
|
1146
|
+
if (_.value) {
|
|
1147
|
+
if (Array.isArray(i.value)) {
|
|
1148
|
+
if (Ce(y.value, i.value)) {
|
|
1149
|
+
k.value && (i.value = i.value.filter(
|
|
1150
|
+
(w) => w !== y.value
|
|
949
1151
|
));
|
|
950
1152
|
return;
|
|
951
1153
|
}
|
|
952
|
-
|
|
1154
|
+
i.value.push(y.value);
|
|
953
1155
|
return;
|
|
954
1156
|
}
|
|
955
|
-
if (
|
|
956
|
-
|
|
1157
|
+
if (Pe(y.value, i.value) && k.value) {
|
|
1158
|
+
i.value = void 0;
|
|
957
1159
|
return;
|
|
958
1160
|
}
|
|
959
|
-
|
|
1161
|
+
i.value = y.value;
|
|
960
1162
|
}
|
|
961
|
-
}, re = (A) => {
|
|
962
|
-
E == null || E.emit("mouseover", A);
|
|
963
|
-
}, ie = (A) => {
|
|
964
|
-
E == null || E.emit("mouseleave", A);
|
|
965
1163
|
};
|
|
966
|
-
return (
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1164
|
+
return (w, se) => (f(), H(ia, R({
|
|
1165
|
+
disabled: a(b),
|
|
1166
|
+
pressed: a(O),
|
|
1167
|
+
active: w.active,
|
|
1168
|
+
type: w.type,
|
|
1169
|
+
to: w.to,
|
|
1170
|
+
href: w.href,
|
|
1171
|
+
target: w.target,
|
|
1172
|
+
rel: w.rel
|
|
1173
|
+
}, {
|
|
1174
|
+
id: a(A),
|
|
1175
|
+
ref_key: "element",
|
|
1176
|
+
ref: m,
|
|
1177
|
+
class: a(D),
|
|
1178
|
+
onClick: x
|
|
973
1179
|
}), {
|
|
974
|
-
default:
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1180
|
+
default: te(() => [
|
|
1181
|
+
V(w.$slots, "default", {}, () => [
|
|
1182
|
+
w.loading ? V(w.$slots, "loading", { key: 0 }, () => [
|
|
1183
|
+
w.loadingIcon ? (f(), H(ee, {
|
|
978
1184
|
key: 0,
|
|
979
1185
|
class: "vv-button__loading-icon",
|
|
980
|
-
name:
|
|
981
|
-
}, null, 8, ["name"])) :
|
|
982
|
-
|
|
983
|
-
]) : (
|
|
984
|
-
|
|
985
|
-
|
|
1186
|
+
name: w.loadingIcon
|
|
1187
|
+
}, null, 8, ["name"])) : C("", !0),
|
|
1188
|
+
w.loadingLabel ? (f(), g("span", va, T(w.loadingLabel), 1)) : C("", !0)
|
|
1189
|
+
]) : (f(), g(ie, { key: 1 }, [
|
|
1190
|
+
V(w.$slots, "before"),
|
|
1191
|
+
a(p) ? (f(), H(ee, R({
|
|
986
1192
|
key: 0,
|
|
987
1193
|
class: "vv-button__icon"
|
|
988
|
-
},
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1194
|
+
}, a(L)), null, 16)) : C("", !0),
|
|
1195
|
+
a(r) ? (f(), g("span", fa, [
|
|
1196
|
+
V(w.$slots, "label", {}, () => [
|
|
1197
|
+
Y(T(a(r)), 1)
|
|
992
1198
|
])
|
|
993
|
-
])) :
|
|
994
|
-
|
|
1199
|
+
])) : C("", !0),
|
|
1200
|
+
V(w.$slots, "after")
|
|
995
1201
|
], 64))
|
|
996
1202
|
])
|
|
997
1203
|
]),
|
|
998
1204
|
_: 3
|
|
999
|
-
}, 16, ["id"]));
|
|
1205
|
+
}, 16, ["id", "class"]));
|
|
1000
1206
|
}
|
|
1001
|
-
}),
|
|
1002
|
-
...
|
|
1003
|
-
...
|
|
1004
|
-
...
|
|
1207
|
+
}), ma = {
|
|
1208
|
+
...me,
|
|
1209
|
+
...De,
|
|
1210
|
+
...qe,
|
|
1005
1211
|
/**
|
|
1006
1212
|
* String or String[] of css classes (modifiers) that will be provided to each button'
|
|
1007
1213
|
*/
|
|
@@ -1009,86 +1215,86 @@ const ro = {
|
|
|
1009
1215
|
toggle: { type: Boolean, default: !1 },
|
|
1010
1216
|
multiple: { type: Boolean, default: !1 },
|
|
1011
1217
|
modelValue: { type: [String, Array], default: void 0 }
|
|
1012
|
-
},
|
|
1218
|
+
}, ba = ["update:modelValue"], ha = {
|
|
1013
1219
|
name: "VvButtonGroup"
|
|
1014
|
-
},
|
|
1015
|
-
...
|
|
1016
|
-
props:
|
|
1017
|
-
emits:
|
|
1018
|
-
setup(
|
|
1019
|
-
const e =
|
|
1020
|
-
disabled:
|
|
1021
|
-
toggle:
|
|
1220
|
+
}, fs = /* @__PURE__ */ j({
|
|
1221
|
+
...ha,
|
|
1222
|
+
props: ma,
|
|
1223
|
+
emits: ba,
|
|
1224
|
+
setup(t, { emit: l }) {
|
|
1225
|
+
const e = t, {
|
|
1226
|
+
disabled: s,
|
|
1227
|
+
toggle: o,
|
|
1022
1228
|
modifiers: c,
|
|
1023
1229
|
multiple: u,
|
|
1024
1230
|
unselectable: v,
|
|
1025
|
-
itemModifiers:
|
|
1026
|
-
} =
|
|
1027
|
-
|
|
1231
|
+
itemModifiers: d
|
|
1232
|
+
} = G(e);
|
|
1233
|
+
_t(() => {
|
|
1028
1234
|
typeof e.modelValue == "string" && u.value && console.warn(
|
|
1029
1235
|
"[VvButtonGroup]: modelValue is a string but multiple is true."
|
|
1030
1236
|
);
|
|
1031
1237
|
});
|
|
1032
|
-
const
|
|
1238
|
+
const p = n({
|
|
1033
1239
|
get: () => u.value ? e.modelValue : Array.isArray(e.modelValue) ? e.modelValue[0] : e.modelValue,
|
|
1034
|
-
set: (
|
|
1240
|
+
set: (i) => (i !== void 0 && (Array.isArray(e.modelValue) || u.value) && !Array.isArray(i) && (i = [i]), l("update:modelValue", i))
|
|
1035
1241
|
});
|
|
1036
|
-
|
|
1037
|
-
key:
|
|
1038
|
-
modelValue:
|
|
1039
|
-
disabled:
|
|
1040
|
-
toggle:
|
|
1242
|
+
lt({
|
|
1243
|
+
key: Ft,
|
|
1244
|
+
modelValue: p,
|
|
1245
|
+
disabled: s,
|
|
1246
|
+
toggle: o,
|
|
1041
1247
|
multiple: u,
|
|
1042
1248
|
unselectable: v,
|
|
1043
|
-
itemModifiers:
|
|
1249
|
+
itemModifiers: d
|
|
1044
1250
|
});
|
|
1045
|
-
const
|
|
1046
|
-
return (
|
|
1047
|
-
class:
|
|
1251
|
+
const r = X("vv-button-group", c);
|
|
1252
|
+
return (i, b) => (f(), g("div", {
|
|
1253
|
+
class: le(a(r)),
|
|
1048
1254
|
role: "group"
|
|
1049
1255
|
}, [
|
|
1050
|
-
|
|
1256
|
+
V(i.$slots, "default")
|
|
1051
1257
|
], 2));
|
|
1052
1258
|
}
|
|
1053
|
-
}),
|
|
1259
|
+
}), ya = {
|
|
1054
1260
|
title: String,
|
|
1055
1261
|
modifiers: [String, Array]
|
|
1056
|
-
},
|
|
1262
|
+
}, ga = {
|
|
1057
1263
|
key: 0,
|
|
1058
1264
|
class: "vv-card__header"
|
|
1059
|
-
},
|
|
1265
|
+
}, _a = {
|
|
1060
1266
|
key: 1,
|
|
1061
1267
|
class: "vv-card__content"
|
|
1062
|
-
},
|
|
1268
|
+
}, Sa = {
|
|
1063
1269
|
key: 2,
|
|
1064
1270
|
class: "vv-card__footer"
|
|
1065
|
-
},
|
|
1271
|
+
}, Va = {
|
|
1066
1272
|
name: "VvCard"
|
|
1067
|
-
},
|
|
1068
|
-
...
|
|
1069
|
-
props:
|
|
1070
|
-
setup(
|
|
1071
|
-
const
|
|
1072
|
-
return (
|
|
1073
|
-
class:
|
|
1273
|
+
}, ps = /* @__PURE__ */ j({
|
|
1274
|
+
...Va,
|
|
1275
|
+
props: ya,
|
|
1276
|
+
setup(t) {
|
|
1277
|
+
const l = t, { modifiers: e } = G(l), s = X("vv-card", e);
|
|
1278
|
+
return (o, c) => (f(), g("article", {
|
|
1279
|
+
class: le(a(s))
|
|
1074
1280
|
}, [
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1281
|
+
o.$slots.header || o.title ? (f(), g("header", ga, [
|
|
1282
|
+
V(o.$slots, "header", {}, () => [
|
|
1283
|
+
Y(T(o.title), 1)
|
|
1078
1284
|
])
|
|
1079
|
-
])) :
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
])) :
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
])) :
|
|
1285
|
+
])) : C("", !0),
|
|
1286
|
+
V(o.$slots, "default"),
|
|
1287
|
+
o.$slots.content ? (f(), g("div", _a, [
|
|
1288
|
+
V(o.$slots, "content")
|
|
1289
|
+
])) : C("", !0),
|
|
1290
|
+
o.$slots.footer ? (f(), g("footer", Sa, [
|
|
1291
|
+
V(o.$slots, "footer")
|
|
1292
|
+
])) : C("", !0)
|
|
1087
1293
|
], 2));
|
|
1088
1294
|
}
|
|
1089
|
-
}),
|
|
1090
|
-
...
|
|
1091
|
-
...
|
|
1295
|
+
}), $a = {
|
|
1296
|
+
...tl,
|
|
1297
|
+
...me,
|
|
1092
1298
|
/**
|
|
1093
1299
|
* If true, the input will be indeterminated
|
|
1094
1300
|
*/
|
|
@@ -1101,9 +1307,9 @@ const ro = {
|
|
|
1101
1307
|
* If true, the input will be displayed as a switch
|
|
1102
1308
|
*/
|
|
1103
1309
|
switch: Boolean
|
|
1104
|
-
},
|
|
1105
|
-
function
|
|
1106
|
-
const { group: e, isInGroup:
|
|
1310
|
+
}, ka = ["click", "update:modelValue", "change", "blur"];
|
|
1311
|
+
function Aa(t, l) {
|
|
1312
|
+
const { group: e, isInGroup: s, getGroupOrLocalRef: o } = tt(zt), { id: c, switch: u, indeterminate: v } = G(t), d = o("modelValue", t, l), p = o("readonly", t), r = o("disabled", t), i = o("valid", t), b = o("invalid", t);
|
|
1107
1313
|
return {
|
|
1108
1314
|
// local props
|
|
1109
1315
|
id: c,
|
|
@@ -1111,44 +1317,44 @@ function So(o, n) {
|
|
|
1111
1317
|
indeterminate: v,
|
|
1112
1318
|
// global props
|
|
1113
1319
|
group: e,
|
|
1114
|
-
isInGroup:
|
|
1115
|
-
modelValue:
|
|
1116
|
-
readonly:
|
|
1117
|
-
disabled:
|
|
1118
|
-
valid:
|
|
1119
|
-
invalid:
|
|
1320
|
+
isInGroup: s,
|
|
1321
|
+
modelValue: d,
|
|
1322
|
+
readonly: p,
|
|
1323
|
+
disabled: r,
|
|
1324
|
+
valid: i,
|
|
1325
|
+
invalid: b
|
|
1120
1326
|
};
|
|
1121
1327
|
}
|
|
1122
|
-
function
|
|
1123
|
-
return Array.isArray(
|
|
1328
|
+
function Je(t) {
|
|
1329
|
+
return Array.isArray(t) ? t.filter((l) => El(l)).join(" ") : t;
|
|
1124
1330
|
}
|
|
1125
|
-
function
|
|
1331
|
+
function Be(t, l) {
|
|
1126
1332
|
const {
|
|
1127
1333
|
invalid: e,
|
|
1128
|
-
valid:
|
|
1129
|
-
hint:
|
|
1334
|
+
valid: s,
|
|
1335
|
+
hint: o,
|
|
1130
1336
|
loading: c
|
|
1131
|
-
} =
|
|
1337
|
+
} = l, {
|
|
1132
1338
|
hintLabel: u,
|
|
1133
1339
|
modelValue: v,
|
|
1134
|
-
valid:
|
|
1135
|
-
validLabel:
|
|
1136
|
-
invalid:
|
|
1137
|
-
invalidLabel:
|
|
1138
|
-
...
|
|
1139
|
-
} =
|
|
1140
|
-
() => !!(u && u.value ||
|
|
1141
|
-
),
|
|
1142
|
-
() => !!(
|
|
1143
|
-
), I =
|
|
1144
|
-
() => !!(
|
|
1145
|
-
),
|
|
1146
|
-
() =>
|
|
1340
|
+
valid: d,
|
|
1341
|
+
validLabel: p,
|
|
1342
|
+
invalid: r,
|
|
1343
|
+
invalidLabel: i,
|
|
1344
|
+
...b
|
|
1345
|
+
} = G(t), _ = Ze(b, "loading"), k = Ze(b, "loadingLabel"), A = n(() => r.value ? !!(r.value && e || i != null && i.value && Array.isArray(i.value) && i.value.length > 0 || i != null && i.value && !ge(i)) : !1), y = n(
|
|
1346
|
+
() => !!(u && u.value || o)
|
|
1347
|
+
), m = n(
|
|
1348
|
+
() => !!(p && p.value || s)
|
|
1349
|
+
), I = n(
|
|
1350
|
+
() => !!(_ != null && _.value && c || _ != null && _.value && (k != null && k.value))
|
|
1351
|
+
), O = n(
|
|
1352
|
+
() => y.value || m.value || A.value || I.value
|
|
1147
1353
|
);
|
|
1148
1354
|
return {
|
|
1149
|
-
hasInvalid:
|
|
1150
|
-
hasHint:
|
|
1151
|
-
hasValid:
|
|
1355
|
+
hasInvalid: A,
|
|
1356
|
+
hasHint: y,
|
|
1357
|
+
hasValid: m,
|
|
1152
1358
|
hasLoading: I,
|
|
1153
1359
|
HintSlot: {
|
|
1154
1360
|
name: "HintSlot",
|
|
@@ -1158,31 +1364,31 @@ function Ve(o, n) {
|
|
|
1158
1364
|
default: () => ({})
|
|
1159
1365
|
}
|
|
1160
1366
|
},
|
|
1161
|
-
setup(
|
|
1162
|
-
const
|
|
1163
|
-
const
|
|
1367
|
+
setup(D) {
|
|
1368
|
+
const L = n(() => {
|
|
1369
|
+
const x = hl({
|
|
1164
1370
|
hintLabel: u,
|
|
1165
1371
|
modelValue: v,
|
|
1166
|
-
valid:
|
|
1167
|
-
validLabel:
|
|
1168
|
-
invalid:
|
|
1169
|
-
invalidLabel:
|
|
1170
|
-
loading:
|
|
1372
|
+
valid: d,
|
|
1373
|
+
validLabel: p,
|
|
1374
|
+
invalid: r,
|
|
1375
|
+
invalidLabel: i,
|
|
1376
|
+
loading: _,
|
|
1171
1377
|
loadingLabel: k,
|
|
1172
|
-
...
|
|
1378
|
+
...D.params
|
|
1173
1379
|
});
|
|
1174
|
-
return
|
|
1380
|
+
return r != null && r.value ? (e == null ? void 0 : e(x)) || Je(i == null ? void 0 : i.value) || (u == null ? void 0 : u.value) : d != null && d.value ? (s == null ? void 0 : s(x)) || Je(p == null ? void 0 : p.value) || (u == null ? void 0 : u.value) : _ != null && _.value ? (c == null ? void 0 : c(x)) || Je(k == null ? void 0 : k.value) || (u == null ? void 0 : u.value) : (o == null ? void 0 : o(x)) || Je(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
1175
1381
|
});
|
|
1176
1382
|
return {
|
|
1177
|
-
isVisible:
|
|
1178
|
-
hasInvalid:
|
|
1179
|
-
hasValid:
|
|
1180
|
-
hintContent:
|
|
1383
|
+
isVisible: O,
|
|
1384
|
+
hasInvalid: A,
|
|
1385
|
+
hasValid: m,
|
|
1386
|
+
hintContent: L
|
|
1181
1387
|
};
|
|
1182
1388
|
},
|
|
1183
1389
|
render() {
|
|
1184
1390
|
if (this.isVisible)
|
|
1185
|
-
return
|
|
1391
|
+
return be(
|
|
1186
1392
|
"small",
|
|
1187
1393
|
{
|
|
1188
1394
|
role: this.hasInvalid ? "alert" : this.hasValid ? "status" : void 0
|
|
@@ -1193,167 +1399,178 @@ function Ve(o, n) {
|
|
|
1193
1399
|
}
|
|
1194
1400
|
};
|
|
1195
1401
|
}
|
|
1196
|
-
const
|
|
1402
|
+
const wa = ["for"], Ca = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ia = {
|
|
1197
1403
|
name: "VvCheckbox"
|
|
1198
|
-
},
|
|
1199
|
-
...
|
|
1200
|
-
props:
|
|
1201
|
-
emits:
|
|
1202
|
-
setup(
|
|
1203
|
-
const e =
|
|
1204
|
-
id:
|
|
1404
|
+
}, Ea = /* @__PURE__ */ j({
|
|
1405
|
+
...Ia,
|
|
1406
|
+
props: $a,
|
|
1407
|
+
emits: ka,
|
|
1408
|
+
setup(t, { emit: l }) {
|
|
1409
|
+
const e = t, s = Ae(), {
|
|
1410
|
+
id: o,
|
|
1205
1411
|
disabled: c,
|
|
1206
1412
|
readonly: u,
|
|
1207
1413
|
valid: v,
|
|
1208
|
-
invalid:
|
|
1209
|
-
propsSwitch:
|
|
1210
|
-
modelValue:
|
|
1211
|
-
indeterminate:
|
|
1212
|
-
isInGroup:
|
|
1213
|
-
} =
|
|
1214
|
-
() => e.uncheckedValue !== void 0 && !
|
|
1215
|
-
),
|
|
1216
|
-
if (
|
|
1414
|
+
invalid: d,
|
|
1415
|
+
propsSwitch: p,
|
|
1416
|
+
modelValue: r,
|
|
1417
|
+
indeterminate: i,
|
|
1418
|
+
isInGroup: b
|
|
1419
|
+
} = Aa(e, l), _ = Le(o), k = n(() => m.value ? -1 : e.tabindex), A = N(), y = n(
|
|
1420
|
+
() => e.uncheckedValue !== void 0 && !b.value
|
|
1421
|
+
), m = n(() => c.value || u.value), I = n(() => {
|
|
1422
|
+
if (d.value === !0)
|
|
1217
1423
|
return !0;
|
|
1218
1424
|
if (v.value === !0)
|
|
1219
1425
|
return !1;
|
|
1220
|
-
}),
|
|
1221
|
-
if (!
|
|
1426
|
+
}), O = n(() => y.value ? r.value === e.value : Array.isArray(r.value) ? Ce(e.value, r.value) : Pe(e.value, r.value)), D = n(() => !!(i.value || !O.value && y.value && e.uncheckedValue !== r.value)), L = n(() => {
|
|
1427
|
+
if (!y.value)
|
|
1222
1428
|
return ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0;
|
|
1223
|
-
}),
|
|
1429
|
+
}), x = n({
|
|
1224
1430
|
get() {
|
|
1225
|
-
return
|
|
1431
|
+
return O.value;
|
|
1226
1432
|
},
|
|
1227
|
-
set(
|
|
1228
|
-
if (
|
|
1229
|
-
|
|
1230
|
-
else if (Array.isArray(
|
|
1231
|
-
const
|
|
1232
|
-
Array.isArray(
|
|
1433
|
+
set(W) {
|
|
1434
|
+
if (y.value)
|
|
1435
|
+
r.value = W ? e.value : e.uncheckedValue;
|
|
1436
|
+
else if (Array.isArray(r.value) || b.value) {
|
|
1437
|
+
const F = new Set(
|
|
1438
|
+
Array.isArray(r.value) ? r.value : r.value !== void 0 ? [r.value] : []
|
|
1233
1439
|
);
|
|
1234
|
-
|
|
1440
|
+
W ? F.add(e.value) : F.delete(e.value), r.value = [...F];
|
|
1235
1441
|
} else
|
|
1236
|
-
|
|
1237
|
-
|
|
1442
|
+
r.value = W ? e.value : void 0;
|
|
1443
|
+
l("change", W);
|
|
1238
1444
|
}
|
|
1239
|
-
}), { modifiers:
|
|
1445
|
+
}), { modifiers: w } = G(e), se = X(
|
|
1240
1446
|
"vv-checkbox",
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
switch:
|
|
1447
|
+
w,
|
|
1448
|
+
n(() => ({
|
|
1449
|
+
switch: p.value,
|
|
1244
1450
|
valid: v.value,
|
|
1245
|
-
invalid:
|
|
1451
|
+
invalid: d.value,
|
|
1246
1452
|
disabled: c.value,
|
|
1247
1453
|
readonly: u.value,
|
|
1248
|
-
indeterminate:
|
|
1454
|
+
indeterminate: i.value
|
|
1249
1455
|
}))
|
|
1250
1456
|
);
|
|
1251
|
-
|
|
1252
|
-
|
|
1457
|
+
_t(() => {
|
|
1458
|
+
y.value && Array.isArray(r.value) && console.warn(
|
|
1253
1459
|
"[VvCheckbox] The model value is an array but the component is in binary mode."
|
|
1254
1460
|
);
|
|
1255
|
-
}),
|
|
1256
|
-
() =>
|
|
1257
|
-
(
|
|
1258
|
-
|
|
1461
|
+
}), ve(
|
|
1462
|
+
() => D.value,
|
|
1463
|
+
(W) => {
|
|
1464
|
+
W ? A.value.indeterminate = !0 : A.value.indeterminate = !1;
|
|
1259
1465
|
}
|
|
1260
|
-
),
|
|
1261
|
-
|
|
1466
|
+
), ul(() => {
|
|
1467
|
+
D.value && (A.value.indeterminate = !0);
|
|
1262
1468
|
});
|
|
1263
|
-
const { HintSlot: P } =
|
|
1264
|
-
return (
|
|
1265
|
-
class:
|
|
1266
|
-
for:
|
|
1469
|
+
const { HintSlot: P } = Be(e, s);
|
|
1470
|
+
return (W, F) => (f(), g("label", {
|
|
1471
|
+
class: le(a(se)),
|
|
1472
|
+
for: a(_)
|
|
1267
1473
|
}, [
|
|
1268
|
-
|
|
1269
|
-
id:
|
|
1474
|
+
Oe(M("input", {
|
|
1475
|
+
id: a(_),
|
|
1270
1476
|
ref_key: "input",
|
|
1271
|
-
ref:
|
|
1272
|
-
"onUpdate:modelValue":
|
|
1477
|
+
ref: A,
|
|
1478
|
+
"onUpdate:modelValue": F[0] || (F[0] = (ue) => Ee(x) ? x.value = ue : null),
|
|
1273
1479
|
type: "checkbox",
|
|
1274
1480
|
class: "vv-checkbox__input",
|
|
1275
|
-
name:
|
|
1276
|
-
disabled:
|
|
1277
|
-
value:
|
|
1278
|
-
tabindex:
|
|
1279
|
-
"aria-invalid":
|
|
1280
|
-
}, null, 8,
|
|
1281
|
-
[
|
|
1481
|
+
name: W.name,
|
|
1482
|
+
disabled: a(m),
|
|
1483
|
+
value: a(L),
|
|
1484
|
+
tabindex: a(k),
|
|
1485
|
+
"aria-invalid": a(I)
|
|
1486
|
+
}, null, 8, Ca), [
|
|
1487
|
+
[dl, a(x)]
|
|
1282
1488
|
]),
|
|
1283
|
-
|
|
1284
|
-
|
|
1489
|
+
V(W.$slots, "default", { value: a(r) }, () => [
|
|
1490
|
+
Y(T(W.label), 1)
|
|
1285
1491
|
]),
|
|
1286
|
-
|
|
1492
|
+
pe(a(P), {
|
|
1287
1493
|
class: "vv-checkbox__hint",
|
|
1288
|
-
params: { value:
|
|
1494
|
+
params: { value: a(r) }
|
|
1289
1495
|
}, null, 8, ["params"])
|
|
1290
|
-
], 10,
|
|
1496
|
+
], 10, wa));
|
|
1291
1497
|
}
|
|
1292
|
-
}),
|
|
1498
|
+
}), Pa = ll, Oa = ["update:modelValue", "change"];
|
|
1499
|
+
function rt(t) {
|
|
1500
|
+
const { options: l, labelKey: e, valueKey: s, disabledKey: o } = G(t);
|
|
1501
|
+
return {
|
|
1502
|
+
options: l,
|
|
1503
|
+
getOptionLabel: (d) => typeof d != "object" && d !== null ? d : typeof e.value == "function" ? e.value(d) : d[e.value],
|
|
1504
|
+
getOptionValue: (d) => typeof d != "object" && d !== null ? d : typeof s.value == "function" ? s.value(d) : d[s.value],
|
|
1505
|
+
getOptionDisabled: (d) => typeof d != "object" && d !== null ? !1 : typeof o.value == "function" ? o.value(d) : d[o.value]
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1508
|
+
const Da = ["textContent"], La = { class: "vv-checkbox-group__wrapper" }, Ba = {
|
|
1293
1509
|
name: "VvCheckboxGroup"
|
|
1294
|
-
},
|
|
1295
|
-
...
|
|
1296
|
-
props:
|
|
1297
|
-
emits:
|
|
1298
|
-
setup(
|
|
1299
|
-
const e =
|
|
1300
|
-
|
|
1301
|
-
key:
|
|
1302
|
-
modelValue:
|
|
1510
|
+
}, ms = /* @__PURE__ */ j({
|
|
1511
|
+
...Ba,
|
|
1512
|
+
props: Pa,
|
|
1513
|
+
emits: Oa,
|
|
1514
|
+
setup(t, { emit: l }) {
|
|
1515
|
+
const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: c, readonly: u, vertical: v, valid: d, invalid: p, modifiers: r } = G(e);
|
|
1516
|
+
lt({
|
|
1517
|
+
key: zt,
|
|
1518
|
+
modelValue: o,
|
|
1303
1519
|
disabled: c,
|
|
1304
1520
|
readonly: u,
|
|
1305
|
-
valid:
|
|
1306
|
-
invalid:
|
|
1521
|
+
valid: d,
|
|
1522
|
+
invalid: p
|
|
1307
1523
|
});
|
|
1308
|
-
const { getOptionLabel:
|
|
1524
|
+
const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
|
|
1309
1525
|
"vv-checkbox-group",
|
|
1310
|
-
|
|
1311
|
-
|
|
1526
|
+
r,
|
|
1527
|
+
n(() => ({
|
|
1312
1528
|
disabled: c.value,
|
|
1313
1529
|
readonly: u.value,
|
|
1314
1530
|
horizontal: !v.value,
|
|
1315
|
-
valid:
|
|
1316
|
-
invalid:
|
|
1531
|
+
valid: d.value,
|
|
1532
|
+
invalid: p.value
|
|
1317
1533
|
}))
|
|
1318
|
-
), k = (
|
|
1319
|
-
id: `${e.name}_opt${
|
|
1534
|
+
), k = (y, m) => ({
|
|
1535
|
+
id: `${e.name}_opt${m}`,
|
|
1320
1536
|
name: e.name,
|
|
1321
|
-
label:
|
|
1322
|
-
value:
|
|
1323
|
-
}), { HintSlot:
|
|
1324
|
-
return (
|
|
1325
|
-
class:
|
|
1537
|
+
label: i(y),
|
|
1538
|
+
value: b(y)
|
|
1539
|
+
}), { HintSlot: A } = Be(e, s);
|
|
1540
|
+
return (y, m) => (f(), g("fieldset", {
|
|
1541
|
+
class: le(a(_))
|
|
1326
1542
|
}, [
|
|
1327
|
-
|
|
1543
|
+
y.label ? (f(), g("legend", {
|
|
1328
1544
|
key: 0,
|
|
1329
|
-
textContent:
|
|
1330
|
-
}, null, 8,
|
|
1331
|
-
M("div",
|
|
1332
|
-
|
|
1545
|
+
textContent: T(y.label)
|
|
1546
|
+
}, null, 8, Da)) : C("", !0),
|
|
1547
|
+
M("div", La, [
|
|
1548
|
+
y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Ea, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
|
|
1333
1549
|
]),
|
|
1334
|
-
|
|
1550
|
+
pe(a(A), { class: "vv-checkbox-group__hint" })
|
|
1335
1551
|
], 2));
|
|
1336
1552
|
}
|
|
1337
|
-
}),
|
|
1553
|
+
}), Ta = [
|
|
1338
1554
|
"update:modelValue",
|
|
1339
1555
|
"change:search",
|
|
1340
1556
|
"focus",
|
|
1341
1557
|
"blur"
|
|
1342
|
-
],
|
|
1343
|
-
...
|
|
1344
|
-
...
|
|
1345
|
-
...
|
|
1346
|
-
...
|
|
1558
|
+
], Na = {
|
|
1559
|
+
...nt,
|
|
1560
|
+
...ot,
|
|
1561
|
+
...Ue,
|
|
1562
|
+
...Fe,
|
|
1563
|
+
...ze,
|
|
1564
|
+
...at,
|
|
1347
1565
|
...De,
|
|
1348
|
-
...qe,
|
|
1349
|
-
...Ce,
|
|
1350
|
-
...Oe,
|
|
1351
|
-
...ve,
|
|
1352
1566
|
...Ke,
|
|
1353
|
-
...
|
|
1354
|
-
...
|
|
1355
|
-
...
|
|
1356
|
-
...
|
|
1567
|
+
...me,
|
|
1568
|
+
...kt,
|
|
1569
|
+
...At,
|
|
1570
|
+
...wt,
|
|
1571
|
+
...qe,
|
|
1572
|
+
...ht,
|
|
1573
|
+
...Me,
|
|
1357
1574
|
/**
|
|
1358
1575
|
* modelValue can be a string, number, boolean, object or array of string, number, boolean, object
|
|
1359
1576
|
*/
|
|
@@ -1361,30 +1578,30 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1361
1578
|
type: [String, Number, Boolean, Object, Array],
|
|
1362
1579
|
default: void 0
|
|
1363
1580
|
},
|
|
1364
|
-
/**
|
|
1365
|
-
* Select input label
|
|
1366
|
-
*/
|
|
1367
|
-
label: String,
|
|
1368
1581
|
/**
|
|
1369
1582
|
* Label for no search results
|
|
1370
1583
|
*/
|
|
1371
1584
|
noResultsLabel: { type: String, default: "No results" },
|
|
1585
|
+
/**
|
|
1586
|
+
* Label for no options available
|
|
1587
|
+
*/
|
|
1588
|
+
noOptionsLabel: { type: String, default: "No options available" },
|
|
1372
1589
|
/**
|
|
1373
1590
|
* Label for selected option hint
|
|
1374
1591
|
*/
|
|
1375
|
-
|
|
1592
|
+
selectedHintLabel: { type: String, default: "Selected" },
|
|
1376
1593
|
/**
|
|
1377
|
-
* Label for deselect button
|
|
1594
|
+
* Label for deselect action button
|
|
1378
1595
|
*/
|
|
1379
|
-
|
|
1596
|
+
deselectActionLabel: { type: String, default: "Deselect" },
|
|
1380
1597
|
/**
|
|
1381
1598
|
* Label for select option hint
|
|
1382
1599
|
*/
|
|
1383
|
-
|
|
1600
|
+
selectHintLabel: { type: String, default: "Press enter to select" },
|
|
1384
1601
|
/**
|
|
1385
1602
|
* Label for deselected option hint
|
|
1386
1603
|
*/
|
|
1387
|
-
|
|
1604
|
+
deselectHintLabel: { type: String, default: "Press enter to remove" },
|
|
1388
1605
|
/**
|
|
1389
1606
|
* Select input placeholder
|
|
1390
1607
|
*/
|
|
@@ -1438,7 +1655,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1438
1655
|
* Set dropdown width to the same as the trigger
|
|
1439
1656
|
*/
|
|
1440
1657
|
triggerWidth: {
|
|
1441
|
-
...
|
|
1658
|
+
...ht.triggerWidth,
|
|
1442
1659
|
default: !0
|
|
1443
1660
|
},
|
|
1444
1661
|
/**
|
|
@@ -1455,10 +1672,10 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1455
1672
|
* Close dropdown on select (not multiple)
|
|
1456
1673
|
*/
|
|
1457
1674
|
autoClose: Boolean
|
|
1458
|
-
},
|
|
1459
|
-
...
|
|
1460
|
-
...
|
|
1461
|
-
...
|
|
1675
|
+
}, Ra = {
|
|
1676
|
+
...st,
|
|
1677
|
+
...me,
|
|
1678
|
+
...ht,
|
|
1462
1679
|
/**
|
|
1463
1680
|
* Show / hide dropdown programmatically
|
|
1464
1681
|
*/
|
|
@@ -1478,258 +1695,362 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1478
1695
|
*/
|
|
1479
1696
|
role: {
|
|
1480
1697
|
type: String,
|
|
1481
|
-
default:
|
|
1482
|
-
validator: (
|
|
1698
|
+
default: je.menu,
|
|
1699
|
+
validator: (t) => Object.values(je).includes(t)
|
|
1483
1700
|
}
|
|
1484
|
-
}
|
|
1701
|
+
};
|
|
1702
|
+
function Ha({
|
|
1703
|
+
reference: t,
|
|
1704
|
+
id: l,
|
|
1705
|
+
expanded: e,
|
|
1706
|
+
aria: s
|
|
1707
|
+
}) {
|
|
1708
|
+
const o = Al(), c = j({
|
|
1709
|
+
name: "VvDropdownTriggerProvider",
|
|
1710
|
+
provide() {
|
|
1711
|
+
return {
|
|
1712
|
+
[Yt]: {
|
|
1713
|
+
reference: t,
|
|
1714
|
+
id: l,
|
|
1715
|
+
expanded: e,
|
|
1716
|
+
aria: s,
|
|
1717
|
+
bus: o
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
},
|
|
1721
|
+
setup() {
|
|
1722
|
+
return {};
|
|
1723
|
+
},
|
|
1724
|
+
render() {
|
|
1725
|
+
var u, v;
|
|
1726
|
+
return be(ie, {}, (v = (u = this.$slots).default) == null ? void 0 : v.call(u));
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
return {
|
|
1730
|
+
bus: o,
|
|
1731
|
+
component: c
|
|
1732
|
+
};
|
|
1733
|
+
}
|
|
1734
|
+
function Ma({
|
|
1735
|
+
role: t,
|
|
1736
|
+
expanded: l
|
|
1737
|
+
}) {
|
|
1738
|
+
const e = n(
|
|
1739
|
+
() => t.value === je.listbox ? mt.option : mt.presentation
|
|
1740
|
+
);
|
|
1741
|
+
return gt(Jt, {
|
|
1742
|
+
role: e,
|
|
1743
|
+
expanded: l
|
|
1744
|
+
}), { itemRole: e };
|
|
1745
|
+
}
|
|
1746
|
+
function xa({
|
|
1747
|
+
expanded: t
|
|
1748
|
+
}) {
|
|
1749
|
+
gt(Xt, {
|
|
1750
|
+
role: Wt.menuitem,
|
|
1751
|
+
expanded: t
|
|
1752
|
+
});
|
|
1753
|
+
}
|
|
1754
|
+
const Ga = ["id", "tabindex", "role", "aria-labelledby"], ja = {
|
|
1485
1755
|
name: "VvDropdown",
|
|
1486
1756
|
inheritAttrs: !1
|
|
1487
|
-
},
|
|
1488
|
-
...
|
|
1489
|
-
props:
|
|
1757
|
+
}, sl = /* @__PURE__ */ j({
|
|
1758
|
+
...ja,
|
|
1759
|
+
props: Ra,
|
|
1490
1760
|
emits: ["update:modelValue"],
|
|
1491
|
-
setup(
|
|
1492
|
-
const e =
|
|
1493
|
-
get: () => e.reference ??
|
|
1494
|
-
set: (
|
|
1495
|
-
|
|
1761
|
+
setup(t, { emit: l }) {
|
|
1762
|
+
const e = t, { id: s } = G(e), o = Le(s), c = yt(), u = N("auto"), v = N("auto"), d = N(null), p = N(null), r = N(null), i = N(null), b = n({
|
|
1763
|
+
get: () => e.reference ?? d.value,
|
|
1764
|
+
set: (h) => {
|
|
1765
|
+
d.value = h;
|
|
1496
1766
|
}
|
|
1497
|
-
}),
|
|
1498
|
-
const
|
|
1499
|
-
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ?
|
|
1500
|
-
|
|
1501
|
-
) : e.flip && (typeof e.flip == "boolean" ?
|
|
1502
|
-
const
|
|
1503
|
-
availableWidth:
|
|
1504
|
-
availableHeight:
|
|
1767
|
+
}), _ = n(() => {
|
|
1768
|
+
const h = [];
|
|
1769
|
+
if (e.autoPlacement ? typeof e.autoPlacement == "boolean" ? h.push(Et()) : h.push(
|
|
1770
|
+
Et(e.autoPlacement)
|
|
1771
|
+
) : e.flip && (typeof e.flip == "boolean" ? h.push(Pt()) : h.push(Pt(e.flip))), e.shift && (typeof e.shift == "boolean" ? h.push(Ot()) : h.push(Ot(e.shift))), e.size) {
|
|
1772
|
+
const U = ({
|
|
1773
|
+
availableWidth: ce,
|
|
1774
|
+
availableHeight: $e
|
|
1505
1775
|
}) => {
|
|
1506
|
-
u.value = `${
|
|
1776
|
+
u.value = `${ce}px`, v.value = `${$e}px`;
|
|
1507
1777
|
};
|
|
1508
|
-
typeof e.size == "boolean" ?
|
|
1509
|
-
|
|
1510
|
-
apply:
|
|
1778
|
+
typeof e.size == "boolean" ? h.push(
|
|
1779
|
+
Dt({
|
|
1780
|
+
apply: U
|
|
1511
1781
|
})
|
|
1512
|
-
) :
|
|
1513
|
-
|
|
1782
|
+
) : h.push(
|
|
1783
|
+
Dt({
|
|
1514
1784
|
...e.size,
|
|
1515
|
-
apply:
|
|
1785
|
+
apply: U
|
|
1516
1786
|
})
|
|
1517
1787
|
);
|
|
1518
1788
|
}
|
|
1519
|
-
return e.offset && (
|
|
1520
|
-
|
|
1521
|
-
element:
|
|
1789
|
+
return e.offset && (h.push(ct(Number(e.offset))), ["string", "number"].includes(typeof e.offset) ? h.push(ct(Number(e.offset))) : h.push(ct(e.offset))), e.arrow && h.push(
|
|
1790
|
+
Vl({
|
|
1791
|
+
element: r
|
|
1522
1792
|
})
|
|
1523
|
-
),
|
|
1524
|
-
}), { x: k, y:
|
|
1793
|
+
), h;
|
|
1794
|
+
}), { x: k, y: A, strategy: y, middlewareData: m, placement: I } = $l(
|
|
1795
|
+
b,
|
|
1525
1796
|
p,
|
|
1526
|
-
d,
|
|
1527
1797
|
{
|
|
1528
|
-
whileElementsMounted:
|
|
1798
|
+
whileElementsMounted: kl,
|
|
1529
1799
|
placement: e.placement,
|
|
1530
|
-
middleware:
|
|
1800
|
+
middleware: _
|
|
1531
1801
|
}
|
|
1532
|
-
),
|
|
1533
|
-
position:
|
|
1534
|
-
top: `${
|
|
1802
|
+
), O = n(() => ({
|
|
1803
|
+
position: y.value,
|
|
1804
|
+
top: `${A.value ?? 0}px`,
|
|
1535
1805
|
left: `${k.value ?? 0}px`,
|
|
1536
1806
|
maxWidth: u.value,
|
|
1537
1807
|
maxHeight: v.value,
|
|
1538
|
-
width: e.triggerWidth &&
|
|
1539
|
-
})),
|
|
1808
|
+
width: e.triggerWidth && b.value ? `${b.value.offsetWidth}px` : void 0
|
|
1809
|
+
})), D = n(() => I.value.split("-")[0]), L = n(
|
|
1540
1810
|
() => ({
|
|
1541
1811
|
top: "bottom",
|
|
1542
1812
|
right: "left",
|
|
1543
1813
|
bottom: "top",
|
|
1544
1814
|
left: "right"
|
|
1545
|
-
})[
|
|
1546
|
-
),
|
|
1547
|
-
var
|
|
1548
|
-
return ["bottom", "top"].includes(
|
|
1549
|
-
right: `${((
|
|
1550
|
-
[
|
|
1815
|
+
})[D.value] ?? "bottom"
|
|
1816
|
+
), x = n(() => {
|
|
1817
|
+
var h, U, ce, $e;
|
|
1818
|
+
return ["bottom", "top"].includes(L.value) ? {
|
|
1819
|
+
right: `${((h = m.value.arrow) == null ? void 0 : h.x) ?? 0}px`,
|
|
1820
|
+
[L.value]: `${-(((U = r.value) == null ? void 0 : U.offsetWidth) ?? 0) / 2}px`
|
|
1551
1821
|
} : {
|
|
1552
|
-
top: `${((
|
|
1553
|
-
[
|
|
1822
|
+
top: `${((ce = m.value.arrow) == null ? void 0 : ce.y) ?? 0}px`,
|
|
1823
|
+
[L.value]: `${-((($e = r.value) == null ? void 0 : $e.offsetWidth) ?? 0) / 2}px`
|
|
1554
1824
|
};
|
|
1555
|
-
}),
|
|
1556
|
-
get: () =>
|
|
1557
|
-
set: (
|
|
1558
|
-
if (
|
|
1559
|
-
|
|
1825
|
+
}), w = et(e, "modelValue", l), se = N(!1), P = n({
|
|
1826
|
+
get: () => w.value ?? se.value,
|
|
1827
|
+
set: (h) => {
|
|
1828
|
+
if (w.value === void 0) {
|
|
1829
|
+
se.value = h;
|
|
1560
1830
|
return;
|
|
1561
1831
|
}
|
|
1562
|
-
|
|
1832
|
+
w.value = h;
|
|
1563
1833
|
}
|
|
1564
|
-
}),
|
|
1834
|
+
}), W = () => {
|
|
1565
1835
|
P.value = !0;
|
|
1566
|
-
},
|
|
1836
|
+
}, F = () => {
|
|
1567
1837
|
P.value = !1;
|
|
1568
|
-
},
|
|
1838
|
+
}, ue = () => {
|
|
1569
1839
|
P.value = !P.value;
|
|
1570
|
-
},
|
|
1571
|
-
|
|
1840
|
+
}, he = (h) => {
|
|
1841
|
+
b.value = h;
|
|
1572
1842
|
};
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1843
|
+
ve(P, (h) => {
|
|
1844
|
+
h && e.autofocusFirst && Xe(() => {
|
|
1845
|
+
const U = ae(
|
|
1846
|
+
p.value
|
|
1577
1847
|
);
|
|
1578
|
-
|
|
1848
|
+
U.length > 0 && U[0].focus();
|
|
1579
1849
|
});
|
|
1580
|
-
}),
|
|
1581
|
-
|
|
1850
|
+
}), xt(
|
|
1851
|
+
p,
|
|
1582
1852
|
() => {
|
|
1583
1853
|
e.autoClose && (P.value = !1);
|
|
1584
1854
|
},
|
|
1585
|
-
{ ignore: [
|
|
1855
|
+
{ ignore: [b] }
|
|
1586
1856
|
);
|
|
1587
|
-
const
|
|
1588
|
-
var
|
|
1589
|
-
return ((
|
|
1590
|
-
}),
|
|
1591
|
-
"aria-controls":
|
|
1857
|
+
const ye = n(() => {
|
|
1858
|
+
var h;
|
|
1859
|
+
return ((h = b.value) == null ? void 0 : h.getAttribute("id")) ?? void 0;
|
|
1860
|
+
}), ne = n(() => ({
|
|
1861
|
+
"aria-controls": o.value,
|
|
1592
1862
|
"aria-haspopup": !0,
|
|
1593
1863
|
"aria-expanded": P.value
|
|
1594
|
-
})), { component:
|
|
1595
|
-
reference:
|
|
1596
|
-
id:
|
|
1864
|
+
})), { component: de, bus: _e } = Ha({
|
|
1865
|
+
reference: b,
|
|
1866
|
+
id: o,
|
|
1597
1867
|
expanded: P,
|
|
1598
|
-
aria:
|
|
1868
|
+
aria: ne
|
|
1599
1869
|
});
|
|
1600
|
-
|
|
1601
|
-
const { role:
|
|
1870
|
+
_e.on("click", ue);
|
|
1871
|
+
const { role: re, modifiers: Ve } = G(e), { itemRole: J } = Ma({ role: re, expanded: P }), B = X(
|
|
1602
1872
|
"vv-dropdown",
|
|
1603
|
-
|
|
1604
|
-
|
|
1873
|
+
Ve,
|
|
1874
|
+
n(() => ({
|
|
1605
1875
|
arrow: e.arrow
|
|
1606
1876
|
}))
|
|
1607
|
-
), { focused:
|
|
1608
|
-
function ae(
|
|
1609
|
-
return
|
|
1610
|
-
...
|
|
1877
|
+
), { focused: Q } = Vt(p);
|
|
1878
|
+
function ae(h) {
|
|
1879
|
+
return h ? [
|
|
1880
|
+
...h.querySelectorAll(
|
|
1611
1881
|
'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'
|
|
1612
1882
|
)
|
|
1613
1883
|
].filter(
|
|
1614
|
-
(
|
|
1884
|
+
(U) => !U.hasAttribute("disabled") && !U.getAttribute("aria-hidden")
|
|
1615
1885
|
) : [];
|
|
1616
1886
|
}
|
|
1617
|
-
const
|
|
1618
|
-
|
|
1619
|
-
if (
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1887
|
+
const Se = () => {
|
|
1888
|
+
Xe(() => {
|
|
1889
|
+
if (Q.value) {
|
|
1890
|
+
const h = ae(
|
|
1891
|
+
p.value
|
|
1622
1892
|
);
|
|
1623
|
-
if (
|
|
1893
|
+
if (h.length === 0 || !document.activeElement)
|
|
1624
1894
|
return;
|
|
1625
|
-
const
|
|
1895
|
+
const U = h.indexOf(
|
|
1626
1896
|
document.activeElement
|
|
1627
1897
|
);
|
|
1628
|
-
|
|
1898
|
+
U < h.length - 1 ? h[U + 1].focus() : h[0].focus();
|
|
1629
1899
|
}
|
|
1630
1900
|
});
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1633
|
-
if (
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1901
|
+
}, we = () => {
|
|
1902
|
+
Xe(() => {
|
|
1903
|
+
if (Q.value) {
|
|
1904
|
+
const h = ae(
|
|
1905
|
+
p.value
|
|
1636
1906
|
);
|
|
1637
|
-
if (
|
|
1907
|
+
if (h.length === 0 || !document.activeElement)
|
|
1638
1908
|
return;
|
|
1639
|
-
const
|
|
1909
|
+
const U = h.indexOf(
|
|
1640
1910
|
document.activeElement
|
|
1641
1911
|
);
|
|
1642
|
-
|
|
1912
|
+
U > 0 ? h[U - 1].focus() : h[h.length - 1].focus();
|
|
1643
1913
|
}
|
|
1644
1914
|
});
|
|
1645
1915
|
};
|
|
1646
|
-
return
|
|
1647
|
-
P.value && (
|
|
1648
|
-
}),
|
|
1649
|
-
P.value &&
|
|
1650
|
-
}),
|
|
1651
|
-
P.value &&
|
|
1652
|
-
}),
|
|
1653
|
-
P.value &&
|
|
1654
|
-
}), (
|
|
1655
|
-
|
|
1656
|
-
default:
|
|
1657
|
-
|
|
1916
|
+
return He("Escape", (h) => {
|
|
1917
|
+
P.value && (h.preventDefault(), F());
|
|
1918
|
+
}), He("ArrowDown", (h) => {
|
|
1919
|
+
P.value && Q.value && (h.preventDefault(), Se());
|
|
1920
|
+
}), He("ArrowUp", (h) => {
|
|
1921
|
+
P.value && Q.value && (h.preventDefault(), we());
|
|
1922
|
+
}), He([" ", "Enter"], (h) => {
|
|
1923
|
+
P.value && Q.value && (h.preventDefault(), document.activeElement.click());
|
|
1924
|
+
}), (h, U) => (f(), g(ie, null, [
|
|
1925
|
+
pe(a(de), null, {
|
|
1926
|
+
default: te(() => [
|
|
1927
|
+
V(h.$slots, "default", K(z({ init: he, show: W, hide: F, toggle: ue, expanded: a(P), aria: a(ne) })))
|
|
1658
1928
|
]),
|
|
1659
1929
|
_: 3
|
|
1660
1930
|
}),
|
|
1661
|
-
|
|
1662
|
-
default:
|
|
1663
|
-
|
|
1931
|
+
pe(Rt, { name: h.transitionName }, {
|
|
1932
|
+
default: te(() => [
|
|
1933
|
+
Oe(M("div", {
|
|
1664
1934
|
ref_key: "floatingEl",
|
|
1665
|
-
ref:
|
|
1666
|
-
style:
|
|
1667
|
-
class:
|
|
1935
|
+
ref: p,
|
|
1936
|
+
style: It(a(O)),
|
|
1937
|
+
class: le(a(B))
|
|
1668
1938
|
}, [
|
|
1669
|
-
e.arrow ? (
|
|
1939
|
+
e.arrow ? (f(), g("div", {
|
|
1670
1940
|
key: 0,
|
|
1671
1941
|
ref_key: "arrowEl",
|
|
1672
|
-
ref:
|
|
1673
|
-
style:
|
|
1942
|
+
ref: r,
|
|
1943
|
+
style: It(a(x)),
|
|
1674
1944
|
class: "vv-dropdown__arrow"
|
|
1675
|
-
}, null, 4)) :
|
|
1676
|
-
|
|
1677
|
-
M("ul",
|
|
1678
|
-
id:
|
|
1945
|
+
}, null, 4)) : C("", !0),
|
|
1946
|
+
V(h.$slots, "before", K(z({ expanded: a(P) }))),
|
|
1947
|
+
M("ul", R(a(c), {
|
|
1948
|
+
id: a(o),
|
|
1679
1949
|
ref_key: "listEl",
|
|
1680
|
-
ref:
|
|
1681
|
-
tabindex:
|
|
1682
|
-
role:
|
|
1683
|
-
"aria-labelledby":
|
|
1950
|
+
ref: i,
|
|
1951
|
+
tabindex: a(P) ? void 0 : -1,
|
|
1952
|
+
role: a(re),
|
|
1953
|
+
"aria-labelledby": a(ye),
|
|
1684
1954
|
class: "vv-dropdown__list"
|
|
1685
1955
|
}), [
|
|
1686
|
-
|
|
1687
|
-
role:
|
|
1956
|
+
V(h.$slots, "items", K(z({
|
|
1957
|
+
role: a(J)
|
|
1688
1958
|
})))
|
|
1689
|
-
], 16,
|
|
1690
|
-
|
|
1959
|
+
], 16, Ga),
|
|
1960
|
+
V(h.$slots, "after", K(z({ expanded: a(P) })))
|
|
1691
1961
|
], 6), [
|
|
1692
|
-
[
|
|
1962
|
+
[St, a(P)]
|
|
1693
1963
|
])
|
|
1694
1964
|
]),
|
|
1695
1965
|
_: 3
|
|
1696
1966
|
}, 8, ["name"])
|
|
1697
1967
|
], 64));
|
|
1698
1968
|
}
|
|
1699
|
-
}),
|
|
1969
|
+
}), Wa = {
|
|
1700
1970
|
name: "VvDropdownItem"
|
|
1701
|
-
},
|
|
1702
|
-
...
|
|
1703
|
-
setup(
|
|
1704
|
-
const { role:
|
|
1705
|
-
|
|
1706
|
-
const
|
|
1707
|
-
return
|
|
1971
|
+
}, Ua = /* @__PURE__ */ j({
|
|
1972
|
+
...Wa,
|
|
1973
|
+
setup(t) {
|
|
1974
|
+
const { role: l, expanded: e } = sa(), s = N(null);
|
|
1975
|
+
xa({ expanded: e });
|
|
1976
|
+
const o = yl(s), { focused: c } = Gt(s), { focused: u } = Vt(s);
|
|
1977
|
+
return ve(o, (v) => {
|
|
1708
1978
|
v && (c.value = !0);
|
|
1709
|
-
}), (v,
|
|
1979
|
+
}), (v, d) => (f(), g("li", R({ role: a(l) }, {
|
|
1710
1980
|
ref_key: "element",
|
|
1711
|
-
ref:
|
|
1712
|
-
class: ["vv-dropdown__item", { "focus-visible":
|
|
1981
|
+
ref: s,
|
|
1982
|
+
class: ["vv-dropdown__item", { "focus-visible": a(c) || a(u) }]
|
|
1713
1983
|
}), [
|
|
1714
|
-
|
|
1984
|
+
V(v.$slots, "default")
|
|
1715
1985
|
], 16));
|
|
1716
1986
|
}
|
|
1717
|
-
}),
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
...
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1987
|
+
}), Fa = { class: "vv-dropdown-option__hint" }, Ka = {
|
|
1988
|
+
name: "VvDropdownOption"
|
|
1989
|
+
}, Qe = /* @__PURE__ */ j({
|
|
1990
|
+
...Ka,
|
|
1991
|
+
props: {
|
|
1992
|
+
...De,
|
|
1993
|
+
...jl,
|
|
1994
|
+
...qe,
|
|
1995
|
+
...me,
|
|
1996
|
+
deselectHintLabel: {
|
|
1997
|
+
type: String
|
|
1998
|
+
},
|
|
1999
|
+
selectHintLabel: {
|
|
2000
|
+
type: String
|
|
2001
|
+
},
|
|
2002
|
+
selectedHintLabel: {
|
|
2003
|
+
type: String
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
2006
|
+
setup(t) {
|
|
2007
|
+
const l = t, { modifiers: e } = G(l), s = X(
|
|
2008
|
+
"vv-dropdown-option",
|
|
2009
|
+
e,
|
|
2010
|
+
n(() => ({
|
|
2011
|
+
disabled: l.disabled,
|
|
2012
|
+
selected: l.selected,
|
|
2013
|
+
unselectable: l.unselectable && l.selected
|
|
2014
|
+
}))
|
|
2015
|
+
);
|
|
2016
|
+
return (o, c) => (f(), H(Ua, {
|
|
2017
|
+
class: le(a(s)),
|
|
2018
|
+
tabindex: o.disabled ? -1 : 0,
|
|
2019
|
+
"aria-selected": o.selected,
|
|
2020
|
+
"aria-disabled": o.disabled
|
|
2021
|
+
}, {
|
|
2022
|
+
default: te(() => [
|
|
2023
|
+
V(o.$slots, "default"),
|
|
2024
|
+
M("span", Fa, [
|
|
2025
|
+
V(o.$slots, "hint", K(z({ disabled: o.disabled, selected: o.selected, unselectable: o.unselectable })), () => [
|
|
2026
|
+
o.selected ? (f(), g(ie, { key: 0 }, [
|
|
2027
|
+
Y(T(o.unselectable ? t.deselectHintLabel : t.selectedHintLabel), 1)
|
|
2028
|
+
], 64)) : o.disabled ? C("", !0) : (f(), g(ie, { key: 1 }, [
|
|
2029
|
+
Y(T(t.selectHintLabel), 1)
|
|
2030
|
+
], 64))
|
|
2031
|
+
])
|
|
2032
|
+
])
|
|
2033
|
+
]),
|
|
2034
|
+
_: 3
|
|
2035
|
+
}, 8, ["class", "tabindex", "aria-selected", "aria-disabled"]));
|
|
2036
|
+
}
|
|
2037
|
+
}), za = {
|
|
2038
|
+
...nt,
|
|
2039
|
+
...Qt,
|
|
2040
|
+
...Zt,
|
|
2041
|
+
...ot,
|
|
2042
|
+
...Ue,
|
|
2043
|
+
...Fe,
|
|
2044
|
+
...ze,
|
|
2045
|
+
...at,
|
|
1724
2046
|
...De,
|
|
1725
|
-
...qe,
|
|
1726
|
-
...Ce,
|
|
1727
|
-
...Oe,
|
|
1728
|
-
...ve,
|
|
1729
2047
|
...Ke,
|
|
1730
|
-
...
|
|
1731
|
-
...
|
|
1732
|
-
...
|
|
2048
|
+
...me,
|
|
2049
|
+
...kt,
|
|
2050
|
+
...At,
|
|
2051
|
+
...wt,
|
|
2052
|
+
...qe,
|
|
2053
|
+
...Me,
|
|
1733
2054
|
/**
|
|
1734
2055
|
* This Boolean attribute indicates that multiple options can be selected in the list.
|
|
1735
2056
|
* If it is not specified, then only one option can be selected at a time.
|
|
@@ -1756,270 +2077,299 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
1756
2077
|
type: [String, Number, Boolean, Object, Array],
|
|
1757
2078
|
default: void 0
|
|
1758
2079
|
},
|
|
1759
|
-
/**
|
|
1760
|
-
* <label> value for the select
|
|
1761
|
-
*/
|
|
1762
|
-
label: String,
|
|
1763
2080
|
/**
|
|
1764
2081
|
* Select placeholder
|
|
1765
2082
|
*/
|
|
1766
2083
|
placeholder: String
|
|
1767
|
-
},
|
|
2084
|
+
}, qa = ["update:modelValue", "focus", "blur"];
|
|
2085
|
+
function it(t, l) {
|
|
2086
|
+
const { focused: e } = Gt(t);
|
|
2087
|
+
return ve(e, (s) => {
|
|
2088
|
+
l(s ? "focus" : "blur", a(t));
|
|
2089
|
+
}), {
|
|
2090
|
+
focused: e
|
|
2091
|
+
};
|
|
2092
|
+
}
|
|
2093
|
+
function ut(t, l) {
|
|
2094
|
+
const e = n(
|
|
2095
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === Ge.before)
|
|
2096
|
+
), s = n(
|
|
2097
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === Ge.after)
|
|
2098
|
+
), o = n(
|
|
2099
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.left)
|
|
2100
|
+
), c = n(
|
|
2101
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.right)
|
|
2102
|
+
), u = n(
|
|
2103
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.top)
|
|
2104
|
+
), v = n(
|
|
2105
|
+
() => Boolean((t == null ? void 0 : t.value) && l.value === fe.bottom)
|
|
2106
|
+
);
|
|
2107
|
+
return {
|
|
2108
|
+
hasIcon: n(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
|
|
2109
|
+
hasIconLeft: o,
|
|
2110
|
+
hasIconRight: c,
|
|
2111
|
+
hasIconTop: u,
|
|
2112
|
+
hasIconBottom: v,
|
|
2113
|
+
hasIconBefore: e,
|
|
2114
|
+
hasIconAfter: s
|
|
2115
|
+
};
|
|
2116
|
+
}
|
|
2117
|
+
const Ya = ["for"], Ja = { class: "vv-select__wrapper" }, Xa = {
|
|
1768
2118
|
key: 0,
|
|
1769
2119
|
class: "vv-select__input-before"
|
|
1770
|
-
},
|
|
2120
|
+
}, Qa = { class: "vv-select__inner" }, Za = ["id"], eo = ["disabled", "hidden"], to = ["disabled", "value"], lo = {
|
|
1771
2121
|
key: 1,
|
|
1772
2122
|
class: "vv-select__input-after"
|
|
1773
|
-
},
|
|
2123
|
+
}, ao = {
|
|
1774
2124
|
name: "VvSelect"
|
|
1775
|
-
},
|
|
1776
|
-
...
|
|
1777
|
-
props:
|
|
1778
|
-
emits:
|
|
1779
|
-
setup(
|
|
1780
|
-
const e =
|
|
1781
|
-
id:
|
|
1782
|
-
modifiers:
|
|
1783
|
-
disabled:
|
|
1784
|
-
readonly:
|
|
1785
|
-
loading:
|
|
1786
|
-
icon:
|
|
2125
|
+
}, oo = /* @__PURE__ */ j({
|
|
2126
|
+
...ao,
|
|
2127
|
+
props: za,
|
|
2128
|
+
emits: qa,
|
|
2129
|
+
setup(t, { emit: l }) {
|
|
2130
|
+
const e = t, s = Ae(), o = N(), { HintSlot: c, hasHint: u, hasInvalid: v } = Be(e, s), {
|
|
2131
|
+
id: d,
|
|
2132
|
+
modifiers: p,
|
|
2133
|
+
disabled: r,
|
|
2134
|
+
readonly: i,
|
|
2135
|
+
loading: b,
|
|
2136
|
+
icon: _,
|
|
1787
2137
|
iconPosition: k,
|
|
1788
|
-
invalid:
|
|
1789
|
-
valid:
|
|
1790
|
-
floating:
|
|
2138
|
+
invalid: A,
|
|
2139
|
+
valid: y,
|
|
2140
|
+
floating: m,
|
|
1791
2141
|
multiple: I
|
|
1792
|
-
} =
|
|
1793
|
-
|
|
1794
|
-
|
|
2142
|
+
} = G(e), O = Le(d), D = n(() => `${O.value}-hint`), { focused: L } = it(o, l), x = $t(o);
|
|
2143
|
+
ve(x, (B) => {
|
|
2144
|
+
B && e.autofocus && (L.value = !0);
|
|
1795
2145
|
});
|
|
1796
|
-
const { hasIcon:
|
|
1797
|
-
|
|
2146
|
+
const { hasIcon: w, hasIconBefore: se, hasIconAfter: P } = ut(
|
|
2147
|
+
_,
|
|
1798
2148
|
k
|
|
1799
|
-
),
|
|
2149
|
+
), W = n(() => !ge(e.modelValue)), F = n(() => e.disabled || e.readonly), ue = n(() => F.value ? -1 : e.tabindex), he = n(() => {
|
|
1800
2150
|
if (e.invalid === !0)
|
|
1801
2151
|
return !0;
|
|
1802
2152
|
if (e.valid === !0)
|
|
1803
2153
|
return !1;
|
|
1804
|
-
}),
|
|
2154
|
+
}), ye = X(
|
|
1805
2155
|
"vv-select",
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
valid:
|
|
1809
|
-
invalid:
|
|
1810
|
-
loading:
|
|
1811
|
-
disabled:
|
|
1812
|
-
readonly:
|
|
1813
|
-
"icon-before":
|
|
2156
|
+
p,
|
|
2157
|
+
n(() => ({
|
|
2158
|
+
valid: y.value,
|
|
2159
|
+
invalid: A.value,
|
|
2160
|
+
loading: b.value,
|
|
2161
|
+
disabled: r.value,
|
|
2162
|
+
readonly: i.value,
|
|
2163
|
+
"icon-before": se.value,
|
|
1814
2164
|
"icon-after": P.value,
|
|
1815
|
-
dirty:
|
|
1816
|
-
focus:
|
|
1817
|
-
floating:
|
|
2165
|
+
dirty: W.value,
|
|
2166
|
+
focus: L.value,
|
|
2167
|
+
floating: m.value,
|
|
1818
2168
|
multiple: I.value
|
|
1819
2169
|
}))
|
|
1820
|
-
),
|
|
2170
|
+
), ne = n(() => ({
|
|
1821
2171
|
name: e.name,
|
|
1822
|
-
tabindex:
|
|
1823
|
-
disabled:
|
|
2172
|
+
tabindex: ue.value,
|
|
2173
|
+
disabled: F.value,
|
|
1824
2174
|
required: e.required,
|
|
1825
2175
|
size: e.size,
|
|
1826
2176
|
autocomplete: e.autocomplete,
|
|
1827
2177
|
multiple: e.multiple,
|
|
1828
|
-
"aria-invalid":
|
|
1829
|
-
"aria-describedby": !v.value && u.value ?
|
|
1830
|
-
"aria-errormessage": v.value ?
|
|
1831
|
-
})),
|
|
2178
|
+
"aria-invalid": he.value,
|
|
2179
|
+
"aria-describedby": !v.value && u.value ? D.value : void 0,
|
|
2180
|
+
"aria-errormessage": v.value ? D.value : void 0
|
|
2181
|
+
})), de = n(() => ({
|
|
1832
2182
|
valid: e.valid,
|
|
1833
2183
|
invalid: e.invalid,
|
|
1834
2184
|
modelValue: e.modelValue
|
|
1835
|
-
})), { getOptionLabel:
|
|
2185
|
+
})), { getOptionLabel: _e, getOptionValue: re, getOptionDisabled: Ve } = rt(e), J = n({
|
|
1836
2186
|
get: () => e.modelValue,
|
|
1837
|
-
set: (
|
|
1838
|
-
Array.isArray(
|
|
2187
|
+
set: (B) => {
|
|
2188
|
+
Array.isArray(B) && (B = B.filter((Q) => Q !== void 0)), l("update:modelValue", B);
|
|
1839
2189
|
}
|
|
1840
2190
|
});
|
|
1841
|
-
return (
|
|
1842
|
-
class:
|
|
2191
|
+
return (B, Q) => (f(), g("div", {
|
|
2192
|
+
class: le(a(ye))
|
|
1843
2193
|
}, [
|
|
1844
|
-
|
|
2194
|
+
B.label ? (f(), g("label", {
|
|
1845
2195
|
key: 0,
|
|
1846
|
-
for:
|
|
1847
|
-
},
|
|
1848
|
-
M("div",
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
])) :
|
|
1852
|
-
M("div",
|
|
1853
|
-
|
|
2196
|
+
for: a(O)
|
|
2197
|
+
}, T(B.label), 9, Ya)) : C("", !0),
|
|
2198
|
+
M("div", Ja, [
|
|
2199
|
+
B.$slots.before ? (f(), g("div", Xa, [
|
|
2200
|
+
V(B.$slots, "before", K(z(a(de))))
|
|
2201
|
+
])) : C("", !0),
|
|
2202
|
+
M("div", Qa, [
|
|
2203
|
+
a(se) ? (f(), H(ee, R({
|
|
1854
2204
|
key: 0,
|
|
1855
2205
|
class: "vv-select__icon"
|
|
1856
|
-
},
|
|
1857
|
-
|
|
1858
|
-
id:
|
|
2206
|
+
}, a(w)), null, 16)) : C("", !0),
|
|
2207
|
+
Oe(M("select", R({
|
|
2208
|
+
id: a(O),
|
|
1859
2209
|
ref_key: "select",
|
|
1860
|
-
ref:
|
|
1861
|
-
"onUpdate:modelValue":
|
|
1862
|
-
},
|
|
1863
|
-
|
|
2210
|
+
ref: o,
|
|
2211
|
+
"onUpdate:modelValue": Q[0] || (Q[0] = (ae) => Ee(J) ? J.value = ae : null)
|
|
2212
|
+
}, a(ne)), [
|
|
2213
|
+
B.placeholder ? (f(), g("option", {
|
|
1864
2214
|
key: 0,
|
|
1865
2215
|
value: void 0,
|
|
1866
|
-
disabled: !
|
|
1867
|
-
hidden: !
|
|
1868
|
-
},
|
|
1869
|
-
(
|
|
1870
|
-
key:
|
|
1871
|
-
disabled:
|
|
1872
|
-
value:
|
|
1873
|
-
},
|
|
1874
|
-
], 16,
|
|
1875
|
-
[
|
|
2216
|
+
disabled: !B.unselectable,
|
|
2217
|
+
hidden: !B.unselectable
|
|
2218
|
+
}, T(B.placeholder), 9, eo)) : C("", !0),
|
|
2219
|
+
(f(!0), g(ie, null, Ne(B.options, (ae, Se) => (f(), g("option", {
|
|
2220
|
+
key: Se,
|
|
2221
|
+
disabled: a(Ve)(ae),
|
|
2222
|
+
value: a(re)(ae)
|
|
2223
|
+
}, T(a(_e)(ae)), 9, to))), 128))
|
|
2224
|
+
], 16, Za), [
|
|
2225
|
+
[cl, a(J)]
|
|
1876
2226
|
]),
|
|
1877
|
-
|
|
2227
|
+
a(P) ? (f(), H(ee, R({
|
|
1878
2228
|
key: 1,
|
|
1879
2229
|
class: "vv-select__icon vv-select__icon-after"
|
|
1880
|
-
},
|
|
2230
|
+
}, a(w)), null, 16)) : C("", !0)
|
|
1881
2231
|
]),
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
])) :
|
|
2232
|
+
B.$slots.after ? (f(), g("div", lo, [
|
|
2233
|
+
V(B.$slots, "after", K(z(a(de))))
|
|
2234
|
+
])) : C("", !0)
|
|
1885
2235
|
]),
|
|
1886
|
-
|
|
1887
|
-
id:
|
|
2236
|
+
pe(a(c), {
|
|
2237
|
+
id: a(D),
|
|
1888
2238
|
class: "vv-select__hint"
|
|
1889
2239
|
}, null, 8, ["id"])
|
|
1890
2240
|
], 2));
|
|
1891
2241
|
}
|
|
1892
|
-
}),
|
|
2242
|
+
}), so = ["id"], no = ["id", "for"], ro = ["id", "aria-controls", "aria-labelledby", "aria-describedby", "placeholder"], io = {
|
|
1893
2243
|
key: 0,
|
|
1894
2244
|
class: "vv-select__input-before"
|
|
1895
|
-
},
|
|
2245
|
+
}, uo = { class: "vv-select__inner" }, co = ["aria-labelledby", "tabindex"], vo = ["aria-label", "onClick"], fo = {
|
|
1896
2246
|
key: 1,
|
|
1897
2247
|
class: "vv-select__input-after"
|
|
1898
|
-
},
|
|
2248
|
+
}, po = {
|
|
1899
2249
|
name: "VvCombobox",
|
|
1900
|
-
components: { VvDropdown:
|
|
1901
|
-
},
|
|
1902
|
-
...
|
|
1903
|
-
props:
|
|
1904
|
-
emits:
|
|
1905
|
-
setup(
|
|
1906
|
-
const e =
|
|
1907
|
-
|
|
2250
|
+
components: { VvDropdown: sl, VvDropdownOption: Qe }
|
|
2251
|
+
}, bs = /* @__PURE__ */ j({
|
|
2252
|
+
...po,
|
|
2253
|
+
props: Na,
|
|
2254
|
+
emits: Ta,
|
|
2255
|
+
setup(t, { emit: l }) {
|
|
2256
|
+
const e = t, s = Ae(), { HintSlot: o } = Be(e, s), c = N(null), u = N(null), v = N(null), { focused: d } = it(c, l), { focused: p } = Vt(v);
|
|
2257
|
+
ve(d, (S) => {
|
|
1908
2258
|
if (e.autoOpen) {
|
|
1909
|
-
if (
|
|
2259
|
+
if (S && !b.value) {
|
|
1910
2260
|
k();
|
|
1911
2261
|
return;
|
|
1912
2262
|
}
|
|
1913
|
-
!
|
|
2263
|
+
!S && b.value && !p.value && A();
|
|
1914
2264
|
}
|
|
1915
|
-
}),
|
|
1916
|
-
!
|
|
2265
|
+
}), ve(p, (S) => {
|
|
2266
|
+
!d.value && !S && b.value && A();
|
|
1917
2267
|
});
|
|
1918
|
-
const
|
|
1919
|
-
|
|
2268
|
+
const r = N(""), i = gl(
|
|
2269
|
+
r,
|
|
1920
2270
|
Number(e.debounceSearch)
|
|
1921
2271
|
);
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
() =>
|
|
2272
|
+
ve(
|
|
2273
|
+
i,
|
|
2274
|
+
() => l("change:search", i.value)
|
|
1925
2275
|
);
|
|
1926
|
-
const
|
|
1927
|
-
e.disabled || e.readonly || (
|
|
2276
|
+
const b = N(!1), _ = () => {
|
|
2277
|
+
e.disabled || e.readonly || (b.value = !b.value);
|
|
1928
2278
|
}, k = () => {
|
|
1929
|
-
e.disabled || e.readonly ||
|
|
1930
|
-
},
|
|
1931
|
-
e.disabled || e.readonly || !
|
|
2279
|
+
e.disabled || e.readonly || b.value || (b.value = !0);
|
|
2280
|
+
}, A = () => {
|
|
2281
|
+
e.disabled || e.readonly || !b.value || (b.value = !1);
|
|
1932
2282
|
};
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
if (
|
|
2283
|
+
ve(b, (S) => {
|
|
2284
|
+
W.value && Xe(() => {
|
|
2285
|
+
if (S) {
|
|
1936
2286
|
u.value && u.value.focus();
|
|
1937
2287
|
return;
|
|
1938
2288
|
}
|
|
1939
|
-
|
|
2289
|
+
r.value = "";
|
|
1940
2290
|
});
|
|
1941
2291
|
});
|
|
1942
2292
|
const {
|
|
1943
|
-
id:
|
|
1944
|
-
icon:
|
|
2293
|
+
id: y,
|
|
2294
|
+
icon: m,
|
|
1945
2295
|
iconPosition: I,
|
|
1946
|
-
modifiers:
|
|
1947
|
-
disabled:
|
|
1948
|
-
readonly:
|
|
1949
|
-
loading:
|
|
1950
|
-
valid:
|
|
1951
|
-
invalid:
|
|
2296
|
+
modifiers: O,
|
|
2297
|
+
disabled: D,
|
|
2298
|
+
readonly: L,
|
|
2299
|
+
loading: x,
|
|
2300
|
+
valid: w,
|
|
2301
|
+
invalid: se,
|
|
1952
2302
|
floating: P,
|
|
1953
|
-
searchable:
|
|
1954
|
-
} =
|
|
1955
|
-
|
|
2303
|
+
searchable: W
|
|
2304
|
+
} = G(e), F = Le(y), ue = n(() => `${F.value}-hint`), he = n(() => `${F.value}-dropdown`), ye = n(() => `${F.value}-search`), ne = n(() => `${F.value}-label`), { hasIcon: de, hasIconBefore: _e, hasIconAfter: re } = ut(
|
|
2305
|
+
m,
|
|
1956
2306
|
I
|
|
1957
|
-
),
|
|
2307
|
+
), Ve = n(() => !ge(e.modelValue)), J = n(() => D.value || L.value ? -1 : e.tabindex), B = X(
|
|
1958
2308
|
"vv-select",
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
disabled:
|
|
1962
|
-
loading:
|
|
1963
|
-
readonly:
|
|
1964
|
-
"icon-before": Boolean(
|
|
1965
|
-
"icon-after": Boolean(
|
|
1966
|
-
valid:
|
|
1967
|
-
invalid:
|
|
1968
|
-
dirty:
|
|
1969
|
-
focus:
|
|
2309
|
+
O,
|
|
2310
|
+
n(() => ({
|
|
2311
|
+
disabled: D.value,
|
|
2312
|
+
loading: x.value,
|
|
2313
|
+
readonly: L.value,
|
|
2314
|
+
"icon-before": Boolean(_e.value),
|
|
2315
|
+
"icon-after": Boolean(re.value),
|
|
2316
|
+
valid: w.value,
|
|
2317
|
+
invalid: se.value,
|
|
2318
|
+
dirty: Ve.value,
|
|
2319
|
+
focus: d.value,
|
|
1970
2320
|
floating: P.value
|
|
1971
2321
|
}))
|
|
1972
|
-
),
|
|
1973
|
-
() => e.searchable ?
|
|
1974
|
-
), { getOptionLabel: ae, getOptionValue:
|
|
1975
|
-
var
|
|
1976
|
-
return (
|
|
2322
|
+
), Q = n(
|
|
2323
|
+
() => e.searchable ? h.value : e.options
|
|
2324
|
+
), { getOptionLabel: ae, getOptionValue: Se, getOptionDisabled: we } = rt(e), h = n(() => {
|
|
2325
|
+
var S;
|
|
2326
|
+
return (S = e.options) == null ? void 0 : S.filter((Z) => ae(Z).toLowerCase().includes(i.value.toLowerCase().trim()));
|
|
1977
2327
|
});
|
|
1978
|
-
function
|
|
1979
|
-
return Array.isArray(e.modelValue) ?
|
|
2328
|
+
function U(S) {
|
|
2329
|
+
return Array.isArray(e.modelValue) ? Ce(S, e.modelValue) || Ce(Se(S), e.modelValue) : Pe(S, e.modelValue) || Pe(Se(S), e.modelValue);
|
|
1980
2330
|
}
|
|
1981
|
-
const
|
|
1982
|
-
let
|
|
1983
|
-
return Array.isArray(e.modelValue) ?
|
|
1984
|
-
(
|
|
2331
|
+
const ce = n(() => {
|
|
2332
|
+
let S = [];
|
|
2333
|
+
return Array.isArray(e.modelValue) ? S = e.modelValue : e.modelValue && (S = [e.modelValue]), e.options.filter(
|
|
2334
|
+
(Z) => S.includes(Se(Z))
|
|
1985
2335
|
);
|
|
1986
|
-
}),
|
|
1987
|
-
|
|
1988
|
-
!e.multiple && e.autoClose &&
|
|
2336
|
+
}), $e = n(() => ce.value.map((S) => ae(S)).join(e.separator));
|
|
2337
|
+
ve(ce, () => {
|
|
2338
|
+
!e.multiple && e.autoClose && A();
|
|
1989
2339
|
});
|
|
1990
|
-
const
|
|
1991
|
-
e.autoOpen ? k() :
|
|
1992
|
-
},
|
|
1993
|
-
var
|
|
2340
|
+
const dt = () => {
|
|
2341
|
+
e.autoOpen ? k() : _();
|
|
2342
|
+
}, xe = (S) => {
|
|
2343
|
+
var Te;
|
|
1994
2344
|
if (e.disabled || e.readonly)
|
|
1995
2345
|
return;
|
|
1996
|
-
const
|
|
1997
|
-
let
|
|
2346
|
+
const Z = Se(S);
|
|
2347
|
+
let q = Z;
|
|
1998
2348
|
if (e.multiple)
|
|
1999
2349
|
if (Array.isArray(e.modelValue)) {
|
|
2000
|
-
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((
|
|
2350
|
+
if (e.maxValues !== void 0 && e.maxValues >= 0 && ((Te = e.modelValue) == null ? void 0 : Te.length) >= e.maxValues && !Ce(Z, e.modelValue))
|
|
2001
2351
|
return;
|
|
2002
|
-
|
|
2352
|
+
q = Ce(Z, e.modelValue) ? Il(Z, e.modelValue) : [...e.modelValue, Z];
|
|
2003
2353
|
} else
|
|
2004
|
-
|
|
2354
|
+
q = [Z];
|
|
2005
2355
|
else
|
|
2006
|
-
e.unselectable &&
|
|
2007
|
-
|
|
2008
|
-
},
|
|
2009
|
-
id:
|
|
2356
|
+
e.unselectable && Z === e.modelValue && (q = void 0);
|
|
2357
|
+
l("update:modelValue", q);
|
|
2358
|
+
}, E = n(() => ({
|
|
2359
|
+
id: F.value,
|
|
2010
2360
|
name: e.name,
|
|
2011
|
-
tabindex:
|
|
2012
|
-
valid:
|
|
2361
|
+
tabindex: J.value,
|
|
2362
|
+
valid: w.value,
|
|
2013
2363
|
validLabel: e.validLabel,
|
|
2014
|
-
invalid:
|
|
2364
|
+
invalid: se.value,
|
|
2015
2365
|
invalidLabel: e.invalidLabel,
|
|
2016
2366
|
hintLabel: e.hintLabel,
|
|
2017
|
-
loading:
|
|
2367
|
+
loading: x.value,
|
|
2018
2368
|
loadingLabel: e.loadingLabel,
|
|
2019
|
-
disabled:
|
|
2020
|
-
readonly:
|
|
2369
|
+
disabled: D.value,
|
|
2370
|
+
readonly: L.value,
|
|
2021
2371
|
modifiers: e.modifiers,
|
|
2022
|
-
options:
|
|
2372
|
+
options: Q.value,
|
|
2023
2373
|
labelKey: e.labelKey,
|
|
2024
2374
|
valueKey: e.valueKey,
|
|
2025
2375
|
icon: e.icon,
|
|
@@ -2030,8 +2380,8 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2030
2380
|
label: e.label,
|
|
2031
2381
|
placeholder: e.placeholder,
|
|
2032
2382
|
modelValue: e.modelValue
|
|
2033
|
-
})),
|
|
2034
|
-
id:
|
|
2383
|
+
})), oe = n(() => ({
|
|
2384
|
+
id: he.value,
|
|
2035
2385
|
reference: v.value,
|
|
2036
2386
|
placement: e.placement,
|
|
2037
2387
|
transitionName: e.transitionName,
|
|
@@ -2041,161 +2391,184 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2041
2391
|
autoPlacement: e.autoPlacement,
|
|
2042
2392
|
arrow: e.arrow,
|
|
2043
2393
|
autoClose: e.autoClose,
|
|
2044
|
-
autofocusFirst:
|
|
2394
|
+
autofocusFirst: W.value ? !1 : e.autofocusFirst,
|
|
2045
2395
|
triggerWidth: e.triggerWidth,
|
|
2046
2396
|
modifiers: e.dropdownModifiers
|
|
2047
|
-
})),
|
|
2397
|
+
})), Re = n(() => ({
|
|
2048
2398
|
valid: e.valid,
|
|
2049
2399
|
invalid: e.invalid,
|
|
2050
2400
|
modelValue: e.modelValue
|
|
2051
2401
|
}));
|
|
2052
|
-
return
|
|
2053
|
-
e.autoOpen || !
|
|
2054
|
-
}), (
|
|
2055
|
-
"onUpdate:modelValue":
|
|
2056
|
-
}), null, 16)) : (
|
|
2402
|
+
return He([" ", "Enter"], (S) => {
|
|
2403
|
+
e.autoOpen || !b.value && d.value && (S.preventDefault(), S.stopImmediatePropagation(), _());
|
|
2404
|
+
}), (S, Z) => S.native ? (f(), H(oo, R({ key: 1 }, a(E), {
|
|
2405
|
+
"onUpdate:modelValue": Z[2] || (Z[2] = (q) => l("update:modelValue", q))
|
|
2406
|
+
}), null, 16)) : (f(), g("div", {
|
|
2057
2407
|
key: 0,
|
|
2058
|
-
id:
|
|
2059
|
-
class:
|
|
2408
|
+
id: a(F),
|
|
2409
|
+
class: le(a(B))
|
|
2060
2410
|
}, [
|
|
2061
|
-
|
|
2411
|
+
S.label ? (f(), g("label", {
|
|
2062
2412
|
key: 0,
|
|
2063
|
-
id:
|
|
2064
|
-
for:
|
|
2065
|
-
},
|
|
2413
|
+
id: a(ne),
|
|
2414
|
+
for: a(W) ? a(ye) : void 0
|
|
2415
|
+
}, T(S.label), 9, no)) : C("", !0),
|
|
2066
2416
|
M("div", {
|
|
2067
2417
|
ref_key: "wrapperEl",
|
|
2068
2418
|
ref: v,
|
|
2069
2419
|
class: "vv-select__wrapper"
|
|
2070
2420
|
}, [
|
|
2071
|
-
|
|
2072
|
-
modelValue:
|
|
2073
|
-
"onUpdate:modelValue":
|
|
2074
|
-
},
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2421
|
+
pe(sl, R({
|
|
2422
|
+
modelValue: a(b),
|
|
2423
|
+
"onUpdate:modelValue": Z[1] || (Z[1] = (q) => Ee(b) ? b.value = q : null)
|
|
2424
|
+
}, a(oe), {
|
|
2425
|
+
role: a(je).listbox
|
|
2426
|
+
}), vl({
|
|
2427
|
+
default: te(({ aria: q }) => [
|
|
2428
|
+
S.$slots.before ? (f(), g("div", io, [
|
|
2429
|
+
V(S.$slots, "before", K(z(a(Re))))
|
|
2430
|
+
])) : C("", !0),
|
|
2431
|
+
M("div", uo, [
|
|
2432
|
+
a(_e) ? (f(), H(ee, R({
|
|
2081
2433
|
key: 0,
|
|
2082
2434
|
class: "vv-select__icon"
|
|
2083
|
-
},
|
|
2084
|
-
M("div",
|
|
2435
|
+
}, a(de)), null, 16)) : C("", !0),
|
|
2436
|
+
M("div", R({
|
|
2085
2437
|
ref_key: "inputEl",
|
|
2086
2438
|
ref: c
|
|
2087
|
-
},
|
|
2088
|
-
"aria-labelledby":
|
|
2439
|
+
}, q, {
|
|
2440
|
+
"aria-labelledby": a(ne),
|
|
2089
2441
|
class: "vv-select__input",
|
|
2090
2442
|
role: "combobox",
|
|
2091
|
-
tabindex:
|
|
2092
|
-
onClickPassive:
|
|
2443
|
+
tabindex: a(J),
|
|
2444
|
+
onClickPassive: dt
|
|
2093
2445
|
}), [
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
key:
|
|
2098
|
-
modifiers:
|
|
2446
|
+
V(S.$slots, "value", K(z({ selectedOptions: a(ce), onInput: xe })), () => [
|
|
2447
|
+
a($e) ? (f(), g(ie, { key: 0 }, [
|
|
2448
|
+
S.badges ? (f(!0), g(ie, { key: 1 }, Ne(a(ce), (Te, Ct) => (f(), H(Yl, {
|
|
2449
|
+
key: Ct,
|
|
2450
|
+
modifiers: S.badgeModifiers,
|
|
2099
2451
|
class: "vv-select__badge"
|
|
2100
2452
|
}, {
|
|
2101
|
-
default:
|
|
2102
|
-
|
|
2103
|
-
|
|
2453
|
+
default: te(() => [
|
|
2454
|
+
Y(T(a(ae)(Te)) + " ", 1),
|
|
2455
|
+
S.unselectable && !a(L) && !a(D) ? (f(), g("button", {
|
|
2104
2456
|
key: 0,
|
|
2105
|
-
"aria-label":
|
|
2106
|
-
onClick:
|
|
2457
|
+
"aria-label": S.deselectActionLabel,
|
|
2458
|
+
onClick: Tt((as) => xe(Te), ["stop"])
|
|
2107
2459
|
}, [
|
|
2108
|
-
|
|
2109
|
-
], 8,
|
|
2460
|
+
pe(ee, { name: "close" })
|
|
2461
|
+
], 8, vo)) : C("", !0)
|
|
2110
2462
|
]),
|
|
2111
2463
|
_: 2
|
|
2112
|
-
}, 1032, ["modifiers"]))), 128)) : (
|
|
2113
|
-
|
|
2464
|
+
}, 1032, ["modifiers"]))), 128)) : (f(), g(ie, { key: 0 }, [
|
|
2465
|
+
Y(T(a($e)), 1)
|
|
2114
2466
|
], 64))
|
|
2115
|
-
], 64)) : (
|
|
2116
|
-
|
|
2467
|
+
], 64)) : (f(), g(ie, { key: 1 }, [
|
|
2468
|
+
Y(T(S.placeholder), 1)
|
|
2117
2469
|
], 64))
|
|
2118
2470
|
])
|
|
2119
|
-
], 16,
|
|
2120
|
-
|
|
2471
|
+
], 16, co),
|
|
2472
|
+
a(re) ? (f(), H(ee, R({
|
|
2121
2473
|
key: 1,
|
|
2122
2474
|
class: "vv-select__icon vv-select__icon-after"
|
|
2123
|
-
},
|
|
2475
|
+
}, a(de)), null, 16)) : C("", !0)
|
|
2124
2476
|
]),
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
])) :
|
|
2477
|
+
S.$slots.after ? (f(), g("div", fo, [
|
|
2478
|
+
V(S.$slots, "after", K(z(a(Re))))
|
|
2479
|
+
])) : C("", !0)
|
|
2128
2480
|
]),
|
|
2129
|
-
items:
|
|
2130
|
-
(
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
tabindex: t(pe)(N) ? -1 : 0,
|
|
2138
|
-
"aria-selected": x(N),
|
|
2139
|
-
"aria-disabled": t(pe)(N),
|
|
2140
|
-
onClickPassive: (Ye) => Ee(N)
|
|
2481
|
+
items: te(() => [
|
|
2482
|
+
a(h).length ? (f(!0), g(ie, { key: 0 }, Ne(a(h), (q, Te) => (f(), H(Qe, R({
|
|
2483
|
+
disabled: a(we)(q),
|
|
2484
|
+
selected: U(q),
|
|
2485
|
+
unselectable: S.unselectable,
|
|
2486
|
+
deselectHintLabel: S.deselectHintLabel,
|
|
2487
|
+
selectHintLabel: S.selectHintLabel,
|
|
2488
|
+
selectedHintLabel: S.selectedHintLabel
|
|
2141
2489
|
}, {
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2490
|
+
key: Te,
|
|
2491
|
+
class: "vv-dropdown-option",
|
|
2492
|
+
onClickPassive: (Ct) => xe(q)
|
|
2493
|
+
}), {
|
|
2494
|
+
default: te(() => [
|
|
2495
|
+
V(S.$slots, "option", K(z({
|
|
2496
|
+
option: q,
|
|
2497
|
+
selectedOptions: a(ce),
|
|
2498
|
+
selected: U(q),
|
|
2499
|
+
disabled: a(we)(q)
|
|
2148
2500
|
})), () => [
|
|
2149
|
-
|
|
2150
|
-
M("span", aa, [
|
|
2151
|
-
x(N) ? (i(), y(ne, { key: 0 }, [
|
|
2152
|
-
Z(H(_.unselectable ? _.pressToDeselectLabel : _.selectedLabel), 1)
|
|
2153
|
-
], 64)) : t(pe)(N) ? w("", !0) : (i(), y(ne, { key: 1 }, [
|
|
2154
|
-
Z(H(_.pressToSelectLabel), 1)
|
|
2155
|
-
], 64))
|
|
2156
|
-
])
|
|
2501
|
+
Y(T(a(ae)(q)), 1)
|
|
2157
2502
|
])
|
|
2158
2503
|
]),
|
|
2159
2504
|
_: 2
|
|
2160
|
-
},
|
|
2505
|
+
}, 1040, ["onClickPassive"]))), 128)) : S.options.length ? (f(), H(Qe, {
|
|
2506
|
+
key: 2,
|
|
2507
|
+
modifiers: "inert"
|
|
2508
|
+
}, {
|
|
2509
|
+
default: te(() => [
|
|
2510
|
+
V(S.$slots, "no-results", {}, () => [
|
|
2511
|
+
Y(T(S.noResultsLabel), 1)
|
|
2512
|
+
])
|
|
2513
|
+
]),
|
|
2514
|
+
_: 3
|
|
2515
|
+
})) : (f(), H(Qe, {
|
|
2516
|
+
key: 1,
|
|
2517
|
+
modifiers: "inert"
|
|
2518
|
+
}, {
|
|
2519
|
+
default: te(() => [
|
|
2520
|
+
V(S.$slots, "no-options", {}, () => [
|
|
2521
|
+
Y(T(S.noOptionsLabel), 1)
|
|
2522
|
+
])
|
|
2523
|
+
]),
|
|
2524
|
+
_: 3
|
|
2525
|
+
}))
|
|
2161
2526
|
]),
|
|
2162
2527
|
_: 2
|
|
2163
2528
|
}, [
|
|
2164
|
-
|
|
2529
|
+
a(W) || S.$slots["dropdown::before"] ? {
|
|
2165
2530
|
name: "before",
|
|
2166
|
-
fn:
|
|
2167
|
-
|
|
2531
|
+
fn: te(() => [
|
|
2532
|
+
V(S.$slots, "dropdown::before"),
|
|
2533
|
+
a(W) ? Oe((f(), g("input", {
|
|
2168
2534
|
key: 0,
|
|
2169
|
-
id:
|
|
2535
|
+
id: a(ye),
|
|
2170
2536
|
ref_key: "inputSearchEl",
|
|
2171
2537
|
ref: u,
|
|
2172
|
-
"onUpdate:modelValue":
|
|
2538
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = (q) => Ee(r) ? r.value = q : null),
|
|
2173
2539
|
"aria-autocomplete": "list",
|
|
2174
|
-
"aria-controls":
|
|
2175
|
-
"aria-labelledby":
|
|
2176
|
-
"aria-describedby":
|
|
2540
|
+
"aria-controls": a(he),
|
|
2541
|
+
"aria-labelledby": a(ne),
|
|
2542
|
+
"aria-describedby": a(ue),
|
|
2177
2543
|
autocomplete: "off",
|
|
2178
2544
|
spellcheck: "false",
|
|
2179
2545
|
type: "search",
|
|
2180
2546
|
class: "vv-dropdown__search",
|
|
2181
|
-
placeholder:
|
|
2182
|
-
}, null, 8,
|
|
2183
|
-
[
|
|
2184
|
-
[
|
|
2185
|
-
]) :
|
|
2547
|
+
placeholder: S.searchPlaceholder
|
|
2548
|
+
}, null, 8, ro)), [
|
|
2549
|
+
[St, a(b)],
|
|
2550
|
+
[Ht, a(r)]
|
|
2551
|
+
]) : C("", !0)
|
|
2186
2552
|
]),
|
|
2187
2553
|
key: "0"
|
|
2554
|
+
} : void 0,
|
|
2555
|
+
S.$slots["dropdown::after"] ? {
|
|
2556
|
+
name: "after",
|
|
2557
|
+
fn: te(() => [
|
|
2558
|
+
V(S.$slots, "dropdown::after")
|
|
2559
|
+
]),
|
|
2560
|
+
key: "1"
|
|
2188
2561
|
} : void 0
|
|
2189
|
-
]), 1040, ["modelValue"])
|
|
2562
|
+
]), 1040, ["modelValue", "role"])
|
|
2190
2563
|
], 512),
|
|
2191
|
-
|
|
2192
|
-
id:
|
|
2564
|
+
pe(a(o), {
|
|
2565
|
+
id: a(ue),
|
|
2193
2566
|
class: "vv-select__hint"
|
|
2194
2567
|
}, null, 8, ["id"])
|
|
2195
|
-
], 10,
|
|
2568
|
+
], 10, so));
|
|
2196
2569
|
}
|
|
2197
|
-
}),
|
|
2198
|
-
...
|
|
2570
|
+
}), mo = ["open", "close", "update:modelValue"], bo = {
|
|
2571
|
+
...st,
|
|
2199
2572
|
/**
|
|
2200
2573
|
* Dialog title
|
|
2201
2574
|
*/
|
|
@@ -2216,77 +2589,77 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2216
2589
|
* Close dialog on click outside
|
|
2217
2590
|
*/
|
|
2218
2591
|
autoClose: { type: Boolean, default: !0 }
|
|
2219
|
-
},
|
|
2592
|
+
}, ho = {
|
|
2220
2593
|
key: 0,
|
|
2221
2594
|
class: "vv-dialog__header"
|
|
2222
|
-
},
|
|
2595
|
+
}, yo = { class: "vv-dialog__content" }, go = {
|
|
2223
2596
|
key: 1,
|
|
2224
2597
|
class: "vv-dialog__footer"
|
|
2225
|
-
},
|
|
2598
|
+
}, _o = {
|
|
2226
2599
|
name: "VvDialog"
|
|
2227
|
-
},
|
|
2228
|
-
...
|
|
2229
|
-
props:
|
|
2230
|
-
emits:
|
|
2231
|
-
setup(
|
|
2232
|
-
const e =
|
|
2233
|
-
const { id:
|
|
2600
|
+
}, hs = /* @__PURE__ */ j({
|
|
2601
|
+
..._o,
|
|
2602
|
+
props: bo,
|
|
2603
|
+
emits: mo,
|
|
2604
|
+
setup(t, { emit: l }) {
|
|
2605
|
+
const e = t, s = et(e, "modelValue", l), o = N(!0), c = N(null), u = n(() => {
|
|
2606
|
+
const { id: i } = e;
|
|
2234
2607
|
return {
|
|
2235
|
-
id:
|
|
2236
|
-
open:
|
|
2608
|
+
id: i,
|
|
2609
|
+
open: o.value
|
|
2237
2610
|
};
|
|
2238
|
-
}), v =
|
|
2611
|
+
}), v = n(() => e.size ? ["vv-dialog", `vv-dialog--${e.size}`] : "vv-dialog"), d = n(() => `vv-dialog--${e.transition}`), p = {
|
|
2239
2612
|
"before-enter": () => {
|
|
2240
|
-
|
|
2613
|
+
o.value = !0, l("open");
|
|
2241
2614
|
},
|
|
2242
2615
|
"after-leave": () => {
|
|
2243
|
-
|
|
2616
|
+
o.value = !1, l("close");
|
|
2244
2617
|
}
|
|
2245
2618
|
};
|
|
2246
|
-
|
|
2247
|
-
e.autoClose && (
|
|
2619
|
+
xt(c, () => {
|
|
2620
|
+
e.autoClose && (s.value = !1);
|
|
2248
2621
|
});
|
|
2249
|
-
function
|
|
2250
|
-
|
|
2622
|
+
function r() {
|
|
2623
|
+
s.value = !1;
|
|
2251
2624
|
}
|
|
2252
|
-
return
|
|
2253
|
-
|
|
2254
|
-
}), (
|
|
2255
|
-
default:
|
|
2256
|
-
|
|
2625
|
+
return He("Escape", (i) => {
|
|
2626
|
+
s.value && (i.preventDefault(), r());
|
|
2627
|
+
}), (i, b) => (f(), H(Rt, R({ name: a(d) }, fl(p)), {
|
|
2628
|
+
default: te(() => [
|
|
2629
|
+
Oe(M("dialog", R(a(u), { class: a(v) }), [
|
|
2257
2630
|
M("article", {
|
|
2258
2631
|
ref_key: "modalWrapper",
|
|
2259
2632
|
ref: c,
|
|
2260
2633
|
class: "vv-dialog__wrapper"
|
|
2261
2634
|
}, [
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2635
|
+
i.$slots.header || i.title ? (f(), g("header", ho, [
|
|
2636
|
+
V(i.$slots, "header", {}, () => [
|
|
2637
|
+
Y(T(i.title) + " ", 1),
|
|
2265
2638
|
M("button", {
|
|
2266
2639
|
type: "button",
|
|
2267
2640
|
"aria-label": "Close",
|
|
2268
2641
|
class: "vv-dialog__close",
|
|
2269
|
-
onClickPassive:
|
|
2642
|
+
onClickPassive: r
|
|
2270
2643
|
}, [
|
|
2271
|
-
|
|
2644
|
+
pe(ee, { name: "close" })
|
|
2272
2645
|
], 32)
|
|
2273
2646
|
])
|
|
2274
|
-
])) :
|
|
2275
|
-
M("div",
|
|
2276
|
-
|
|
2647
|
+
])) : C("", !0),
|
|
2648
|
+
M("div", yo, [
|
|
2649
|
+
V(i.$slots, "default")
|
|
2277
2650
|
]),
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
])) :
|
|
2651
|
+
i.$slots.footer ? (f(), g("footer", go, [
|
|
2652
|
+
V(i.$slots, "footer")
|
|
2653
|
+
])) : C("", !0)
|
|
2281
2654
|
], 512)
|
|
2282
2655
|
], 16), [
|
|
2283
|
-
[
|
|
2656
|
+
[St, a(s)]
|
|
2284
2657
|
])
|
|
2285
2658
|
]),
|
|
2286
2659
|
_: 3
|
|
2287
2660
|
}, 16, ["name"]));
|
|
2288
2661
|
}
|
|
2289
|
-
}),
|
|
2662
|
+
}), $ = {
|
|
2290
2663
|
TEXT: "text",
|
|
2291
2664
|
PASSWORD: "password",
|
|
2292
2665
|
NUMBER: "number",
|
|
@@ -2300,15 +2673,15 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2300
2673
|
DATETIME_LOCAL: "datetime-local",
|
|
2301
2674
|
MONTH: "month",
|
|
2302
2675
|
WEEK: "week"
|
|
2303
|
-
},
|
|
2676
|
+
}, Ie = {
|
|
2304
2677
|
PASSWORD_SHOW: "eye-on",
|
|
2305
2678
|
PASSWORD_HIDE: "eye-off",
|
|
2306
2679
|
DATE: "calendar",
|
|
2307
2680
|
TIME: "time",
|
|
2308
2681
|
COLOR: "color",
|
|
2309
2682
|
SEARCH: "close"
|
|
2310
|
-
},
|
|
2311
|
-
...
|
|
2683
|
+
}, So = ["update:modelValue", "focus", "blur", "keyup"], Vo = {
|
|
2684
|
+
...el,
|
|
2312
2685
|
/**
|
|
2313
2686
|
* Input value
|
|
2314
2687
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
@@ -2320,8 +2693,8 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2320
2693
|
*/
|
|
2321
2694
|
type: {
|
|
2322
2695
|
type: String,
|
|
2323
|
-
default:
|
|
2324
|
-
validator: (
|
|
2696
|
+
default: $.TEXT,
|
|
2697
|
+
validator: (t) => Object.values($).includes(t)
|
|
2325
2698
|
},
|
|
2326
2699
|
/**
|
|
2327
2700
|
* Minimum value
|
|
@@ -2359,7 +2732,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2359
2732
|
*/
|
|
2360
2733
|
iconShowPassword: {
|
|
2361
2734
|
type: String,
|
|
2362
|
-
default:
|
|
2735
|
+
default: Ie.PASSWORD_SHOW
|
|
2363
2736
|
},
|
|
2364
2737
|
/**
|
|
2365
2738
|
* VvIcon name for hide password button
|
|
@@ -2367,7 +2740,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2367
2740
|
*/
|
|
2368
2741
|
iconHidePassword: {
|
|
2369
2742
|
type: String,
|
|
2370
|
-
default:
|
|
2743
|
+
default: Ie.PASSWORD_HIDE
|
|
2371
2744
|
},
|
|
2372
2745
|
/**
|
|
2373
2746
|
* VvIcon name for clear button
|
|
@@ -2375,7 +2748,7 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2375
2748
|
*/
|
|
2376
2749
|
iconClear: {
|
|
2377
2750
|
type: String,
|
|
2378
|
-
default:
|
|
2751
|
+
default: Ie.SEARCH
|
|
2379
2752
|
},
|
|
2380
2753
|
/**
|
|
2381
2754
|
* Label for step up button
|
|
@@ -2412,9 +2785,9 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2412
2785
|
type: String,
|
|
2413
2786
|
default: "Clear"
|
|
2414
2787
|
}
|
|
2415
|
-
},
|
|
2788
|
+
}, Lt = j({
|
|
2416
2789
|
components: {
|
|
2417
|
-
VvIcon:
|
|
2790
|
+
VvIcon: ee
|
|
2418
2791
|
},
|
|
2419
2792
|
props: {
|
|
2420
2793
|
disabled: {
|
|
@@ -2431,33 +2804,33 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2431
2804
|
},
|
|
2432
2805
|
iconShow: {
|
|
2433
2806
|
type: String,
|
|
2434
|
-
default:
|
|
2807
|
+
default: Ie.PASSWORD_SHOW
|
|
2435
2808
|
},
|
|
2436
2809
|
iconHide: {
|
|
2437
2810
|
type: String,
|
|
2438
|
-
default:
|
|
2811
|
+
default: Ie.PASSWORD_HIDE
|
|
2439
2812
|
}
|
|
2440
2813
|
},
|
|
2441
2814
|
emits: ["toggle-password"],
|
|
2442
|
-
setup(
|
|
2443
|
-
const e =
|
|
2444
|
-
() => e.value ?
|
|
2815
|
+
setup(t, { emit: l }) {
|
|
2816
|
+
const e = N(!1), s = n(
|
|
2817
|
+
() => e.value ? t.iconHide : t.iconShow
|
|
2445
2818
|
);
|
|
2446
|
-
function
|
|
2447
|
-
c == null || c.stopPropagation(),
|
|
2819
|
+
function o(c) {
|
|
2820
|
+
c == null || c.stopPropagation(), t.disabled || (e.value = !e.value, l("toggle-password", e.value));
|
|
2448
2821
|
}
|
|
2449
2822
|
return {
|
|
2450
2823
|
active: e,
|
|
2451
|
-
activeIcon:
|
|
2452
|
-
onClick:
|
|
2824
|
+
activeIcon: s,
|
|
2825
|
+
onClick: o
|
|
2453
2826
|
};
|
|
2454
2827
|
},
|
|
2455
2828
|
render() {
|
|
2456
|
-
const
|
|
2829
|
+
const t = be(ee, {
|
|
2457
2830
|
name: this.activeIcon,
|
|
2458
2831
|
class: "vv-input-text__action-icon"
|
|
2459
2832
|
});
|
|
2460
|
-
return
|
|
2833
|
+
return be(
|
|
2461
2834
|
"button",
|
|
2462
2835
|
{
|
|
2463
2836
|
disabled: this.disabled,
|
|
@@ -2466,12 +2839,12 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2466
2839
|
type: "button",
|
|
2467
2840
|
onClick: this.onClick
|
|
2468
2841
|
},
|
|
2469
|
-
|
|
2842
|
+
t
|
|
2470
2843
|
);
|
|
2471
2844
|
}
|
|
2472
|
-
}),
|
|
2845
|
+
}), vt = j({
|
|
2473
2846
|
components: {
|
|
2474
|
-
VvIcon:
|
|
2847
|
+
VvIcon: ee
|
|
2475
2848
|
},
|
|
2476
2849
|
props: {
|
|
2477
2850
|
disabled: {
|
|
@@ -2483,22 +2856,22 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2483
2856
|
},
|
|
2484
2857
|
mode: {
|
|
2485
2858
|
type: String,
|
|
2486
|
-
validator: (
|
|
2859
|
+
validator: (t) => ["up", "down"].includes(t),
|
|
2487
2860
|
default: "up"
|
|
2488
2861
|
}
|
|
2489
2862
|
},
|
|
2490
2863
|
emits: ["step-up", "step-down"],
|
|
2491
|
-
setup(
|
|
2492
|
-
const e =
|
|
2864
|
+
setup(t, { emit: l }) {
|
|
2865
|
+
const e = n(() => t.mode === "up");
|
|
2493
2866
|
return {
|
|
2494
2867
|
isUp: e,
|
|
2495
|
-
onClick: (
|
|
2496
|
-
|
|
2868
|
+
onClick: (o) => {
|
|
2869
|
+
o == null || o.stopPropagation(), t.disabled || l(e.value ? "step-up" : "step-down");
|
|
2497
2870
|
}
|
|
2498
2871
|
};
|
|
2499
2872
|
},
|
|
2500
2873
|
render() {
|
|
2501
|
-
return
|
|
2874
|
+
return be("button", {
|
|
2502
2875
|
class: [
|
|
2503
2876
|
"vv-input-text__action-chevron",
|
|
2504
2877
|
this.isUp && "vv-input-text__action-chevron-up"
|
|
@@ -2508,9 +2881,9 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2508
2881
|
onClick: this.onClick
|
|
2509
2882
|
});
|
|
2510
2883
|
}
|
|
2511
|
-
}),
|
|
2884
|
+
}), Bt = j({
|
|
2512
2885
|
components: {
|
|
2513
|
-
VvIcon:
|
|
2886
|
+
VvIcon: ee
|
|
2514
2887
|
},
|
|
2515
2888
|
props: {
|
|
2516
2889
|
disabled: {
|
|
@@ -2527,20 +2900,20 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2527
2900
|
}
|
|
2528
2901
|
},
|
|
2529
2902
|
emits: ["clear"],
|
|
2530
|
-
setup(
|
|
2531
|
-
function e(
|
|
2532
|
-
|
|
2903
|
+
setup(t, { emit: l }) {
|
|
2904
|
+
function e(s) {
|
|
2905
|
+
s == null || s.stopPropagation(), t.disabled || l("clear");
|
|
2533
2906
|
}
|
|
2534
2907
|
return {
|
|
2535
2908
|
onClick: e
|
|
2536
2909
|
};
|
|
2537
2910
|
},
|
|
2538
2911
|
render() {
|
|
2539
|
-
const
|
|
2912
|
+
const t = be(ee, {
|
|
2540
2913
|
name: this.icon,
|
|
2541
2914
|
class: "vv-input-text__action-icon"
|
|
2542
2915
|
});
|
|
2543
|
-
return
|
|
2916
|
+
return be(
|
|
2544
2917
|
"button",
|
|
2545
2918
|
{
|
|
2546
2919
|
disabled: this.disabled,
|
|
@@ -2549,51 +2922,51 @@ const Vo = ["for"], $o = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2549
2922
|
type: "button",
|
|
2550
2923
|
onClick: this.onClick
|
|
2551
2924
|
},
|
|
2552
|
-
|
|
2925
|
+
t
|
|
2553
2926
|
);
|
|
2554
2927
|
}
|
|
2555
2928
|
});
|
|
2556
|
-
function
|
|
2929
|
+
function ft(t, l) {
|
|
2557
2930
|
return {
|
|
2558
2931
|
name: "VvInputTextActions",
|
|
2559
2932
|
components: {
|
|
2560
|
-
VvIcon:
|
|
2561
|
-
VvInputPasswordAction:
|
|
2562
|
-
VvInputStepAction:
|
|
2563
|
-
VvInputClearAction:
|
|
2933
|
+
VvIcon: ee,
|
|
2934
|
+
VvInputPasswordAction: Lt,
|
|
2935
|
+
VvInputStepAction: vt,
|
|
2936
|
+
VvInputClearAction: Bt
|
|
2564
2937
|
},
|
|
2565
2938
|
setup() {
|
|
2566
2939
|
return {
|
|
2567
|
-
isDisabled:
|
|
2568
|
-
labelStepUp:
|
|
2569
|
-
labelStepDown:
|
|
2570
|
-
labelShowPassword:
|
|
2571
|
-
labelHidePassword:
|
|
2572
|
-
labelClear:
|
|
2573
|
-
iconShowPassword:
|
|
2574
|
-
iconHidePassword:
|
|
2940
|
+
isDisabled: n(() => l.disabled || l.readonly),
|
|
2941
|
+
labelStepUp: l.labelStepUp,
|
|
2942
|
+
labelStepDown: l.labelStepDown,
|
|
2943
|
+
labelShowPassword: l.labelShowPassword,
|
|
2944
|
+
labelHidePassword: l.labelHidePassword,
|
|
2945
|
+
labelClear: l.labelClear,
|
|
2946
|
+
iconShowPassword: l.iconShowPassword,
|
|
2947
|
+
iconHidePassword: l.iconHidePassword
|
|
2575
2948
|
};
|
|
2576
2949
|
},
|
|
2577
2950
|
render() {
|
|
2578
2951
|
let e = null;
|
|
2579
|
-
switch (
|
|
2580
|
-
case
|
|
2581
|
-
const { onClear:
|
|
2952
|
+
switch (t) {
|
|
2953
|
+
case $.SEARCH: {
|
|
2954
|
+
const { onClear: s } = this.$attrs;
|
|
2582
2955
|
e = [
|
|
2583
|
-
|
|
2956
|
+
be(Bt, {
|
|
2584
2957
|
disabled: this.isDisabled,
|
|
2585
2958
|
label: this.labelShowPassword,
|
|
2586
|
-
onClear:
|
|
2959
|
+
onClear: s
|
|
2587
2960
|
})
|
|
2588
2961
|
];
|
|
2589
2962
|
break;
|
|
2590
2963
|
}
|
|
2591
|
-
case
|
|
2592
|
-
const { onTogglePassword:
|
|
2964
|
+
case $.PASSWORD: {
|
|
2965
|
+
const { onTogglePassword: s } = this.$attrs;
|
|
2593
2966
|
e = [
|
|
2594
|
-
|
|
2967
|
+
be(Lt, {
|
|
2595
2968
|
disabled: this.isDisabled,
|
|
2596
|
-
onTogglePassword:
|
|
2969
|
+
onTogglePassword: s,
|
|
2597
2970
|
labelShow: this.labelShowPassword,
|
|
2598
2971
|
labelHide: this.labelHidePassword,
|
|
2599
2972
|
iconShow: this.iconShowPassword,
|
|
@@ -2602,207 +2975,226 @@ function Ue(o, n) {
|
|
|
2602
2975
|
];
|
|
2603
2976
|
break;
|
|
2604
2977
|
}
|
|
2605
|
-
case
|
|
2606
|
-
const { onStepUp:
|
|
2978
|
+
case $.NUMBER: {
|
|
2979
|
+
const { onStepUp: s, onStepDown: o } = this.$attrs;
|
|
2607
2980
|
e = [
|
|
2608
|
-
|
|
2981
|
+
be(vt, {
|
|
2609
2982
|
mode: "up",
|
|
2610
|
-
disabled: this.isDisabled ||
|
|
2983
|
+
disabled: this.isDisabled || l.max !== void 0 && l.modelValue === l.max,
|
|
2611
2984
|
label: this.labelStepUp,
|
|
2612
|
-
onStepUp:
|
|
2613
|
-
onStepDown:
|
|
2985
|
+
onStepUp: s,
|
|
2986
|
+
onStepDown: o
|
|
2614
2987
|
}),
|
|
2615
|
-
|
|
2988
|
+
be(vt, {
|
|
2616
2989
|
mode: "down",
|
|
2617
|
-
disabled: this.isDisabled ||
|
|
2990
|
+
disabled: this.isDisabled || l.min !== void 0 && l.modelValue === l.min,
|
|
2618
2991
|
label: this.labelStepDown,
|
|
2619
|
-
onStepUp:
|
|
2620
|
-
onStepDown:
|
|
2992
|
+
onStepUp: s,
|
|
2993
|
+
onStepDown: o
|
|
2621
2994
|
})
|
|
2622
2995
|
];
|
|
2623
2996
|
break;
|
|
2624
2997
|
}
|
|
2625
2998
|
}
|
|
2626
|
-
return Array.isArray(e) ?
|
|
2999
|
+
return Array.isArray(e) ? be("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
3000
|
+
}
|
|
3001
|
+
};
|
|
3002
|
+
}
|
|
3003
|
+
function nl(t, l, e = 0) {
|
|
3004
|
+
let s;
|
|
3005
|
+
return typeof e == "string" && (e = parseInt(e)), n({
|
|
3006
|
+
get: () => t == null ? void 0 : t.value,
|
|
3007
|
+
set: (o) => {
|
|
3008
|
+
s && clearTimeout(s), s = setTimeout(() => {
|
|
3009
|
+
l("update:modelValue", o);
|
|
3010
|
+
}, e);
|
|
2627
3011
|
}
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
function rl(t, l) {
|
|
3015
|
+
const e = n(() => (a(t) ?? "").length), s = n(() => (l == null ? void 0 : l.lowerLimit) !== void 0 && e.value < (l == null ? void 0 : l.lowerLimit) ? e.value - l.lowerLimit : (l == null ? void 0 : l.upperLimit) !== void 0 && e.value < (l == null ? void 0 : l.upperLimit) ? l.upperLimit - e.value : 0), o = n(() => (l == null ? void 0 : l.mode) === !1 ? "" : (l == null ? void 0 : l.mode) === "limit" && (l != null && l.upperLimit) ? `${e.value} / ${l.lowerLimit ? `${l.lowerLimit}-` : ""}${l.upperLimit}` : (l == null ? void 0 : l.mode) === "countdown" ? s.value === 0 ? void 0 : s : e.value);
|
|
3016
|
+
return {
|
|
3017
|
+
length: e,
|
|
3018
|
+
gap: s,
|
|
3019
|
+
formatted: o
|
|
2628
3020
|
};
|
|
2629
3021
|
}
|
|
2630
|
-
const
|
|
3022
|
+
const $o = ["for"], ko = { class: "vv-input-text__wrapper" }, Ao = {
|
|
2631
3023
|
key: 0,
|
|
2632
3024
|
class: "vv-input-text__input-before"
|
|
2633
|
-
},
|
|
3025
|
+
}, wo = { class: "vv-input-text__inner" }, Co = ["id"], Io = {
|
|
2634
3026
|
key: 1,
|
|
2635
3027
|
class: "vv-input-text__input-after"
|
|
2636
|
-
},
|
|
3028
|
+
}, Eo = {
|
|
2637
3029
|
key: 2,
|
|
2638
3030
|
class: "vv-input-text__limit"
|
|
2639
|
-
},
|
|
3031
|
+
}, Po = {
|
|
2640
3032
|
name: "VvInputText"
|
|
2641
|
-
},
|
|
2642
|
-
...
|
|
2643
|
-
props:
|
|
2644
|
-
emits:
|
|
2645
|
-
setup(
|
|
2646
|
-
const e =
|
|
3033
|
+
}, ys = /* @__PURE__ */ j({
|
|
3034
|
+
...Po,
|
|
3035
|
+
props: Vo,
|
|
3036
|
+
emits: So,
|
|
3037
|
+
setup(t, { emit: l }) {
|
|
3038
|
+
const e = t, s = Ae(), o = N(), {
|
|
2647
3039
|
id: c,
|
|
2648
3040
|
icon: u,
|
|
2649
3041
|
iconPosition: v,
|
|
2650
|
-
label:
|
|
2651
|
-
modelValue:
|
|
2652
|
-
count:
|
|
2653
|
-
valid:
|
|
2654
|
-
invalid:
|
|
2655
|
-
loading:
|
|
2656
|
-
} =
|
|
2657
|
-
() => e.floating &&
|
|
2658
|
-
),
|
|
2659
|
-
|
|
2660
|
-
|
|
3042
|
+
label: d,
|
|
3043
|
+
modelValue: p,
|
|
3044
|
+
count: r,
|
|
3045
|
+
valid: i,
|
|
3046
|
+
invalid: b,
|
|
3047
|
+
loading: _
|
|
3048
|
+
} = G(e), k = Le(c), A = n(() => `${k.value}-hint`), y = n(
|
|
3049
|
+
() => e.floating && ge(e.placeholder) ? " " : e.placeholder
|
|
3050
|
+
), m = nl(p, l, e.debounce), { focused: I } = it(o, l), O = $t(o);
|
|
3051
|
+
ve(O, (E) => {
|
|
3052
|
+
E && e.autofocus && (I.value = !0);
|
|
2661
3053
|
});
|
|
2662
|
-
const
|
|
2663
|
-
|
|
2664
|
-
},
|
|
2665
|
-
() => e.type ===
|
|
2666
|
-
),
|
|
2667
|
-
|
|
2668
|
-
},
|
|
2669
|
-
|
|
2670
|
-
},
|
|
2671
|
-
|
|
2672
|
-
}, { hasIcon:
|
|
3054
|
+
const D = N(!1), L = n(() => e.type === $.PASSWORD), x = () => {
|
|
3055
|
+
D.value = !D.value;
|
|
3056
|
+
}, w = n(
|
|
3057
|
+
() => e.type === $.TIME || e.type === $.DATETIME_LOCAL || e.type === $.DATE || e.type === $.WEEK || e.type === $.MONTH
|
|
3058
|
+
), se = n(() => e.type === $.NUMBER), P = () => {
|
|
3059
|
+
re.value && (o.value.stepUp(), m.value = a(o).value);
|
|
3060
|
+
}, W = () => {
|
|
3061
|
+
re.value && (o.value.stepDown(), m.value = a(o).value);
|
|
3062
|
+
}, F = n(() => e.type === $.SEARCH), ue = () => {
|
|
3063
|
+
m.value = void 0;
|
|
3064
|
+
}, { hasIcon: he, hasIconBefore: ye, hasIconAfter: ne } = ut(
|
|
2673
3065
|
u,
|
|
2674
3066
|
v
|
|
2675
|
-
),
|
|
3067
|
+
), de = n(() => {
|
|
2676
3068
|
switch (e.type) {
|
|
2677
|
-
case
|
|
2678
|
-
return { name:
|
|
2679
|
-
case
|
|
2680
|
-
case
|
|
2681
|
-
case
|
|
2682
|
-
case
|
|
2683
|
-
return { name:
|
|
2684
|
-
case
|
|
2685
|
-
return { name:
|
|
3069
|
+
case $.COLOR:
|
|
3070
|
+
return { name: Ie.COLOR };
|
|
3071
|
+
case $.DATE:
|
|
3072
|
+
case $.DATETIME_LOCAL:
|
|
3073
|
+
case $.WEEK:
|
|
3074
|
+
case $.MONTH:
|
|
3075
|
+
return { name: Ie.DATE };
|
|
3076
|
+
case $.TIME:
|
|
3077
|
+
return { name: Ie.TIME };
|
|
2686
3078
|
default:
|
|
2687
3079
|
return "";
|
|
2688
3080
|
}
|
|
2689
|
-
}), { formatted:
|
|
3081
|
+
}), { formatted: _e } = rl(m, {
|
|
2690
3082
|
mode: e.count,
|
|
2691
3083
|
upperLimit: e.maxlength,
|
|
2692
3084
|
lowerLimit: e.minlength
|
|
2693
|
-
}),
|
|
2694
|
-
() =>
|
|
2695
|
-
),
|
|
2696
|
-
if (
|
|
3085
|
+
}), re = n(() => !e.disabled && !e.readonly), Ve = n(
|
|
3086
|
+
() => re.value ? e.tabindex : -1
|
|
3087
|
+
), J = n(() => !ge(p)), B = n(() => {
|
|
3088
|
+
if (b.value === !0)
|
|
2697
3089
|
return !0;
|
|
2698
|
-
if (
|
|
3090
|
+
if (i.value === !0)
|
|
2699
3091
|
return !1;
|
|
2700
|
-
}), { modifiers:
|
|
3092
|
+
}), { modifiers: Q } = G(e), ae = X(
|
|
2701
3093
|
"vv-input-text",
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
valid:
|
|
2705
|
-
invalid:
|
|
2706
|
-
loading:
|
|
3094
|
+
Q,
|
|
3095
|
+
n(() => ({
|
|
3096
|
+
valid: i.value,
|
|
3097
|
+
invalid: b.value,
|
|
3098
|
+
loading: _.value,
|
|
2707
3099
|
disabled: e.disabled,
|
|
2708
3100
|
readonly: e.readonly,
|
|
2709
|
-
"icon-before":
|
|
2710
|
-
"icon-after":
|
|
2711
|
-
floating: e.floating && !
|
|
2712
|
-
dirty:
|
|
3101
|
+
"icon-before": ye.value,
|
|
3102
|
+
"icon-after": ne.value || !ge(de),
|
|
3103
|
+
floating: e.floating && !ge(e.label),
|
|
3104
|
+
dirty: J.value,
|
|
2713
3105
|
focus: I.value
|
|
2714
3106
|
}))
|
|
2715
|
-
),
|
|
2716
|
-
const
|
|
2717
|
-
type:
|
|
3107
|
+
), Se = n(() => {
|
|
3108
|
+
const E = (() => L.value && D.value || w.value && !J.value && !I.value ? $.TEXT : e.type)(), oe = {
|
|
3109
|
+
type: E,
|
|
2718
3110
|
name: e.name,
|
|
2719
|
-
tabindex:
|
|
3111
|
+
tabindex: Ve.value,
|
|
2720
3112
|
disabled: e.disabled,
|
|
2721
3113
|
readonly: e.readonly,
|
|
2722
3114
|
required: e.required,
|
|
2723
3115
|
autocomplete: e.autocomplete,
|
|
2724
|
-
"aria-invalid":
|
|
2725
|
-
"aria-describedby": !
|
|
2726
|
-
"aria-errormessage":
|
|
3116
|
+
"aria-invalid": B.value,
|
|
3117
|
+
"aria-describedby": !ce.value && U.value ? A.value : void 0,
|
|
3118
|
+
"aria-errormessage": ce.value ? A.value : void 0
|
|
2727
3119
|
};
|
|
2728
|
-
return (
|
|
2729
|
-
}),
|
|
3120
|
+
return (E === $.DATE || E === $.MONTH || E === $.WEEK || E === $.TIME || E === $.DATETIME_LOCAL || E === $.NUMBER) && (oe.step = e.step, oe.max = String(e.max), oe.min = String(e.min)), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD || E === $.NUMBER) && (oe.placeholder = y.value), (E === $.TEXT || E === $.SEARCH || E === $.URL || E === $.TEL || E === $.EMAIL || E === $.PASSWORD) && (oe.minlength = e.minlength, oe.maxlength = e.maxlength, oe.pattern = e.pattern), E === $.EMAIL && (oe.multiple = e.multiple), oe;
|
|
3121
|
+
}), we = n(() => ({
|
|
2730
3122
|
valid: e.valid,
|
|
2731
3123
|
invalid: e.invalid,
|
|
2732
3124
|
modelValue: e.modelValue,
|
|
2733
|
-
togglePassword:
|
|
3125
|
+
togglePassword: x,
|
|
2734
3126
|
stepUp: P,
|
|
2735
|
-
stepDown:
|
|
2736
|
-
clear:
|
|
2737
|
-
})), { HintSlot:
|
|
2738
|
-
|
|
3127
|
+
stepDown: W,
|
|
3128
|
+
clear: ue
|
|
3129
|
+
})), { HintSlot: h, hasHint: U, hasInvalid: ce } = Be(e, s), $e = ft(
|
|
3130
|
+
$.PASSWORD,
|
|
2739
3131
|
e
|
|
2740
|
-
),
|
|
2741
|
-
|
|
3132
|
+
), dt = ft(
|
|
3133
|
+
$.NUMBER,
|
|
2742
3134
|
e
|
|
2743
|
-
),
|
|
2744
|
-
|
|
3135
|
+
), xe = ft(
|
|
3136
|
+
$.SEARCH,
|
|
2745
3137
|
e
|
|
2746
3138
|
);
|
|
2747
|
-
return (
|
|
2748
|
-
class:
|
|
3139
|
+
return (E, oe) => (f(), g("div", {
|
|
3140
|
+
class: le(a(ae))
|
|
2749
3141
|
}, [
|
|
2750
|
-
|
|
3142
|
+
a(d) ? (f(), g("label", {
|
|
2751
3143
|
key: 0,
|
|
2752
|
-
for:
|
|
3144
|
+
for: a(k),
|
|
2753
3145
|
class: "vv-input-text__label"
|
|
2754
|
-
},
|
|
2755
|
-
M("div",
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
])) :
|
|
2759
|
-
M("div",
|
|
2760
|
-
|
|
3146
|
+
}, T(a(d)), 9, $o)) : C("", !0),
|
|
3147
|
+
M("div", ko, [
|
|
3148
|
+
E.$slots.before ? (f(), g("div", Ao, [
|
|
3149
|
+
V(E.$slots, "before", K(z(a(we))))
|
|
3150
|
+
])) : C("", !0),
|
|
3151
|
+
M("div", wo, [
|
|
3152
|
+
a(ye) ? (f(), H(ee, R({
|
|
2761
3153
|
key: 0,
|
|
2762
3154
|
class: "vv-input-text__icon"
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
id:
|
|
3155
|
+
}, a(he)), null, 16)) : C("", !0),
|
|
3156
|
+
Oe(M("input", R({
|
|
3157
|
+
id: a(k),
|
|
2766
3158
|
ref_key: "input",
|
|
2767
|
-
ref:
|
|
2768
|
-
"onUpdate:modelValue":
|
|
2769
|
-
},
|
|
2770
|
-
onKeyup:
|
|
2771
|
-
}), null, 16,
|
|
2772
|
-
[
|
|
3159
|
+
ref: o,
|
|
3160
|
+
"onUpdate:modelValue": oe[0] || (oe[0] = (Re) => Ee(m) ? m.value = Re : null)
|
|
3161
|
+
}, a(Se), {
|
|
3162
|
+
onKeyup: oe[1] || (oe[1] = (Re) => l("keyup", Re))
|
|
3163
|
+
}), null, 16, Co), [
|
|
3164
|
+
[pl, a(m)]
|
|
2773
3165
|
]),
|
|
2774
|
-
|
|
3166
|
+
a(ne) || a(de) ? (f(), H(ee, R({
|
|
2775
3167
|
key: 1,
|
|
2776
3168
|
class: "vv-input-text__icon vv-input-text__icon-after"
|
|
2777
|
-
},
|
|
3169
|
+
}, a(ne) ? a(he) : a(de)), null, 16)) : a(L) ? (f(), H(a($e), {
|
|
2778
3170
|
key: 2,
|
|
2779
|
-
onTogglePassword:
|
|
2780
|
-
})) :
|
|
3171
|
+
onTogglePassword: x
|
|
3172
|
+
})) : a(se) ? (f(), H(a(dt), {
|
|
2781
3173
|
key: 3,
|
|
2782
3174
|
onStepUp: P,
|
|
2783
|
-
onStepDown:
|
|
2784
|
-
})) :
|
|
3175
|
+
onStepDown: W
|
|
3176
|
+
})) : a(F) ? (f(), H(a(xe), {
|
|
2785
3177
|
key: 4,
|
|
2786
|
-
onClear:
|
|
2787
|
-
})) :
|
|
3178
|
+
onClear: ue
|
|
3179
|
+
})) : C("", !0)
|
|
2788
3180
|
]),
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
])) :
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
3181
|
+
E.$slots.after ? (f(), g("div", Io, [
|
|
3182
|
+
V(E.$slots, "after", K(z(a(we))))
|
|
3183
|
+
])) : C("", !0),
|
|
3184
|
+
a(r) ? (f(), g("span", Eo, [
|
|
3185
|
+
V(E.$slots, "count", K(z(a(we))), () => [
|
|
3186
|
+
Y(T(a(_e)), 1)
|
|
2795
3187
|
])
|
|
2796
|
-
])) :
|
|
3188
|
+
])) : C("", !0)
|
|
2797
3189
|
]),
|
|
2798
|
-
|
|
2799
|
-
id:
|
|
3190
|
+
pe(a(h), {
|
|
3191
|
+
id: a(A),
|
|
2800
3192
|
class: "vv-input-text__hint"
|
|
2801
3193
|
}, null, 8, ["id"])
|
|
2802
3194
|
], 2));
|
|
2803
3195
|
}
|
|
2804
|
-
}),
|
|
2805
|
-
...
|
|
3196
|
+
}), Oo = {
|
|
3197
|
+
...me,
|
|
2806
3198
|
/**
|
|
2807
3199
|
* Progress value
|
|
2808
3200
|
* This attribute specifies how much of the task that has been completed.
|
|
@@ -2830,155 +3222,155 @@ const pa = ["for"], fa = { class: "vv-input-text__wrapper" }, ma = {
|
|
|
2830
3222
|
type: String,
|
|
2831
3223
|
required: !0
|
|
2832
3224
|
}
|
|
2833
|
-
},
|
|
3225
|
+
}, Do = {
|
|
2834
3226
|
name: "VvProgress"
|
|
2835
|
-
},
|
|
2836
|
-
...
|
|
2837
|
-
props:
|
|
2838
|
-
setup(
|
|
2839
|
-
const
|
|
3227
|
+
}, gs = /* @__PURE__ */ j({
|
|
3228
|
+
...Do,
|
|
3229
|
+
props: Oo,
|
|
3230
|
+
setup(t) {
|
|
3231
|
+
const l = t, { value: e, max: s, label: o } = G(l), c = n(() => l.value === void 0), { modifiers: u } = G(l), v = X(
|
|
2840
3232
|
"vv-progress",
|
|
2841
3233
|
u,
|
|
2842
|
-
|
|
3234
|
+
n(() => ({ indeterminate: c.value }))
|
|
2843
3235
|
);
|
|
2844
|
-
return (
|
|
2845
|
-
class:
|
|
2846
|
-
ariaLabel:
|
|
2847
|
-
max:
|
|
2848
|
-
value:
|
|
3236
|
+
return (d, p) => (f(), g("progress", R({ role: "progressbar" }, {
|
|
3237
|
+
class: a(v),
|
|
3238
|
+
ariaLabel: a(o),
|
|
3239
|
+
max: a(s),
|
|
3240
|
+
value: a(e)
|
|
2849
3241
|
}), null, 16));
|
|
2850
3242
|
}
|
|
2851
|
-
}),
|
|
2852
|
-
function
|
|
2853
|
-
const { id: e } =
|
|
3243
|
+
}), Lo = tl, Bo = ["click", "update:modelValue", "change", "blur"];
|
|
3244
|
+
function To(t, l) {
|
|
3245
|
+
const { id: e } = G(t), { group: s, isInGroup: o, getGroupOrLocalRef: c } = tt(Kt), u = c("modelValue", t, l), v = c("readonly", t), d = c("disabled", t), p = c("valid", t), r = c("invalid", t);
|
|
2854
3246
|
return {
|
|
2855
3247
|
// local props
|
|
2856
3248
|
id: e,
|
|
2857
3249
|
// global props
|
|
2858
|
-
group:
|
|
2859
|
-
isInGroup:
|
|
3250
|
+
group: s,
|
|
3251
|
+
isInGroup: o,
|
|
2860
3252
|
modelValue: u,
|
|
2861
3253
|
readonly: v,
|
|
2862
|
-
disabled:
|
|
2863
|
-
valid:
|
|
2864
|
-
invalid:
|
|
3254
|
+
disabled: d,
|
|
3255
|
+
valid: p,
|
|
3256
|
+
invalid: r
|
|
2865
3257
|
};
|
|
2866
3258
|
}
|
|
2867
|
-
const
|
|
3259
|
+
const No = ["for"], Ro = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], Ho = {
|
|
2868
3260
|
name: "VvRadio"
|
|
2869
|
-
},
|
|
2870
|
-
...
|
|
2871
|
-
props:
|
|
2872
|
-
emits:
|
|
2873
|
-
setup(
|
|
2874
|
-
const e =
|
|
2875
|
-
if (
|
|
3261
|
+
}, Mo = /* @__PURE__ */ j({
|
|
3262
|
+
...Ho,
|
|
3263
|
+
props: Lo,
|
|
3264
|
+
emits: Bo,
|
|
3265
|
+
setup(t, { emit: l }) {
|
|
3266
|
+
const e = t, s = Ae(), { id: o, disabled: c, readonly: u, modelValue: v, valid: d, invalid: p } = To(e, l), r = Le(o), i = n(() => _.value ? -1 : e.tabindex), b = N(), _ = n(() => c.value || u.value), k = n(() => {
|
|
3267
|
+
if (p.value === !0)
|
|
2876
3268
|
return !0;
|
|
2877
|
-
if (
|
|
3269
|
+
if (d.value === !0)
|
|
2878
3270
|
return !1;
|
|
2879
|
-
}),
|
|
2880
|
-
() => Array.isArray(v.value) ?
|
|
2881
|
-
),
|
|
3271
|
+
}), A = n(
|
|
3272
|
+
() => Array.isArray(v.value) ? Ce(e.value, v.value) : Pe(e.value, v.value)
|
|
3273
|
+
), y = n(
|
|
2882
3274
|
() => ["string", "number", "boolean"].includes(typeof e.value) ? e.value : !0
|
|
2883
|
-
),
|
|
3275
|
+
), m = n({
|
|
2884
3276
|
get() {
|
|
2885
|
-
return
|
|
3277
|
+
return A.value ? y.value : null;
|
|
2886
3278
|
},
|
|
2887
|
-
set(
|
|
2888
|
-
Array.isArray(v.value) ? v.value = [e.value] : v.value = e.value,
|
|
3279
|
+
set(L) {
|
|
3280
|
+
Array.isArray(v.value) ? v.value = [e.value] : v.value = e.value, l("change", L);
|
|
2889
3281
|
}
|
|
2890
|
-
}), { modifiers: I } =
|
|
3282
|
+
}), { modifiers: I } = G(e), O = X(
|
|
2891
3283
|
"vv-radio",
|
|
2892
3284
|
I,
|
|
2893
|
-
|
|
2894
|
-
valid:
|
|
2895
|
-
invalid:
|
|
3285
|
+
n(() => ({
|
|
3286
|
+
valid: d.value,
|
|
3287
|
+
invalid: p.value,
|
|
2896
3288
|
disabled: c.value,
|
|
2897
3289
|
readonly: u.value
|
|
2898
3290
|
}))
|
|
2899
|
-
), { HintSlot:
|
|
2900
|
-
return (
|
|
2901
|
-
class:
|
|
2902
|
-
for:
|
|
3291
|
+
), { HintSlot: D } = Be(e, s);
|
|
3292
|
+
return (L, x) => (f(), g("label", {
|
|
3293
|
+
class: le(a(O)),
|
|
3294
|
+
for: a(r)
|
|
2903
3295
|
}, [
|
|
2904
|
-
|
|
2905
|
-
id:
|
|
3296
|
+
Oe(M("input", {
|
|
3297
|
+
id: a(r),
|
|
2906
3298
|
ref_key: "input",
|
|
2907
|
-
ref:
|
|
2908
|
-
"onUpdate:modelValue":
|
|
3299
|
+
ref: b,
|
|
3300
|
+
"onUpdate:modelValue": x[0] || (x[0] = (w) => Ee(m) ? m.value = w : null),
|
|
2909
3301
|
type: "radio",
|
|
2910
3302
|
class: "vv-radio__input",
|
|
2911
|
-
name:
|
|
2912
|
-
disabled:
|
|
2913
|
-
value:
|
|
2914
|
-
tabindex:
|
|
2915
|
-
"aria-invalid":
|
|
2916
|
-
}, null, 8,
|
|
2917
|
-
[
|
|
3303
|
+
name: L.name,
|
|
3304
|
+
disabled: a(_),
|
|
3305
|
+
value: a(y),
|
|
3306
|
+
tabindex: a(i),
|
|
3307
|
+
"aria-invalid": a(k)
|
|
3308
|
+
}, null, 8, Ro), [
|
|
3309
|
+
[ml, a(m)]
|
|
2918
3310
|
]),
|
|
2919
|
-
|
|
2920
|
-
|
|
3311
|
+
V(L.$slots, "default", { value: a(v) }, () => [
|
|
3312
|
+
Y(T(L.label), 1)
|
|
2921
3313
|
]),
|
|
2922
|
-
|
|
3314
|
+
pe(a(D), {
|
|
2923
3315
|
class: "vv-radio__hint",
|
|
2924
|
-
params: { value:
|
|
3316
|
+
params: { value: a(v) }
|
|
2925
3317
|
}, null, 8, ["params"])
|
|
2926
|
-
], 10,
|
|
3318
|
+
], 10, No));
|
|
2927
3319
|
}
|
|
2928
|
-
}),
|
|
3320
|
+
}), xo = ll, Go = ["update:modelValue", "change"], jo = ["textContent"], Wo = { class: "vv-radio-group__wrapper" }, Uo = {
|
|
2929
3321
|
name: "VvRadioGroup"
|
|
2930
|
-
},
|
|
2931
|
-
...
|
|
2932
|
-
props:
|
|
2933
|
-
emits:
|
|
2934
|
-
setup(
|
|
2935
|
-
const e =
|
|
2936
|
-
|
|
2937
|
-
key:
|
|
2938
|
-
modelValue:
|
|
3322
|
+
}, _s = /* @__PURE__ */ j({
|
|
3323
|
+
...Uo,
|
|
3324
|
+
props: xo,
|
|
3325
|
+
emits: Go,
|
|
3326
|
+
setup(t, { emit: l }) {
|
|
3327
|
+
const e = t, s = Ae(), o = et(e, "modelValue", l), { disabled: c, readonly: u, vertical: v, valid: d, invalid: p, modifiers: r } = G(e);
|
|
3328
|
+
lt({
|
|
3329
|
+
key: Kt,
|
|
3330
|
+
modelValue: o,
|
|
2939
3331
|
disabled: c,
|
|
2940
3332
|
readonly: u,
|
|
2941
|
-
valid:
|
|
2942
|
-
invalid:
|
|
3333
|
+
valid: d,
|
|
3334
|
+
invalid: p
|
|
2943
3335
|
});
|
|
2944
|
-
const { getOptionLabel:
|
|
3336
|
+
const { getOptionLabel: i, getOptionValue: b } = rt(e), _ = X(
|
|
2945
3337
|
"vv-radio-group",
|
|
2946
|
-
|
|
2947
|
-
|
|
3338
|
+
r,
|
|
3339
|
+
n(() => ({
|
|
2948
3340
|
disabled: c.value,
|
|
2949
3341
|
readonly: u.value,
|
|
2950
3342
|
horizontal: !v.value,
|
|
2951
|
-
valid:
|
|
2952
|
-
invalid:
|
|
3343
|
+
valid: d.value,
|
|
3344
|
+
invalid: p.value
|
|
2953
3345
|
}))
|
|
2954
|
-
), k = (
|
|
2955
|
-
id: `${e.name}_opt${
|
|
3346
|
+
), k = (y, m) => ({
|
|
3347
|
+
id: `${e.name}_opt${m}`,
|
|
2956
3348
|
name: e.name,
|
|
2957
|
-
label:
|
|
2958
|
-
value:
|
|
2959
|
-
}), { HintSlot:
|
|
2960
|
-
return (
|
|
2961
|
-
class:
|
|
3349
|
+
label: i(y),
|
|
3350
|
+
value: b(y)
|
|
3351
|
+
}), { HintSlot: A } = Be(e, s);
|
|
3352
|
+
return (y, m) => (f(), g("fieldset", {
|
|
3353
|
+
class: le(a(_))
|
|
2962
3354
|
}, [
|
|
2963
|
-
|
|
3355
|
+
y.label ? (f(), g("legend", {
|
|
2964
3356
|
key: 0,
|
|
2965
|
-
textContent:
|
|
2966
|
-
}, null, 8,
|
|
2967
|
-
M("div",
|
|
2968
|
-
|
|
3357
|
+
textContent: T(y.label)
|
|
3358
|
+
}, null, 8, jo)) : C("", !0),
|
|
3359
|
+
M("div", Wo, [
|
|
3360
|
+
y.options.length > 0 ? (f(!0), g(ie, { key: 0 }, Ne(y.options, (I, O) => (f(), H(Mo, R({ key: O }, k(I, O)), null, 16))), 128)) : V(y.$slots, "default", { key: 1 })
|
|
2969
3361
|
]),
|
|
2970
|
-
|
|
3362
|
+
pe(a(A), { class: "vv-radio-group__hint" })
|
|
2971
3363
|
], 2));
|
|
2972
3364
|
}
|
|
2973
|
-
}),
|
|
3365
|
+
}), Fo = {
|
|
2974
3366
|
hard: "hard",
|
|
2975
3367
|
soft: "soft"
|
|
2976
|
-
},
|
|
3368
|
+
}, Ko = {
|
|
2977
3369
|
true: !0,
|
|
2978
3370
|
false: !1,
|
|
2979
3371
|
default: "default"
|
|
2980
|
-
},
|
|
2981
|
-
...
|
|
3372
|
+
}, zo = ["update:modelValue", "focus", "blur", "keyup"], qo = {
|
|
3373
|
+
...el,
|
|
2982
3374
|
/**
|
|
2983
3375
|
* Textarea value
|
|
2984
3376
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
|
|
@@ -2998,84 +3390,84 @@ const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
2998
3390
|
* Indicates how the control should wrap the value for form submission.
|
|
2999
3391
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3000
3392
|
*/
|
|
3001
|
-
wrap: { type: String, default:
|
|
3393
|
+
wrap: { type: String, default: Fo.soft },
|
|
3002
3394
|
/**
|
|
3003
3395
|
* Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
|
|
3004
3396
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
3005
3397
|
*/
|
|
3006
|
-
spellcheck: { type: [Boolean, String], default:
|
|
3398
|
+
spellcheck: { type: [Boolean, String], default: Ko.default },
|
|
3007
3399
|
/**
|
|
3008
3400
|
* If true, the textarea will be resizable
|
|
3009
3401
|
*/
|
|
3010
3402
|
resizable: Boolean
|
|
3011
|
-
},
|
|
3403
|
+
}, Yo = ["for"], Jo = { class: "vv-textarea__wrapper" }, Xo = {
|
|
3012
3404
|
key: 0,
|
|
3013
3405
|
class: "vv-textarea__input-before"
|
|
3014
|
-
},
|
|
3406
|
+
}, Qo = { class: "vv-textarea__inner" }, Zo = ["id"], es = {
|
|
3015
3407
|
key: 1,
|
|
3016
3408
|
class: "vv-textarea__input-after"
|
|
3017
|
-
},
|
|
3409
|
+
}, ts = {
|
|
3018
3410
|
key: 2,
|
|
3019
3411
|
class: "vv-textarea__limit"
|
|
3020
|
-
},
|
|
3412
|
+
}, ls = {
|
|
3021
3413
|
name: "VvTextarea"
|
|
3022
|
-
},
|
|
3023
|
-
...
|
|
3024
|
-
props:
|
|
3025
|
-
emits:
|
|
3026
|
-
setup(
|
|
3027
|
-
const e =
|
|
3414
|
+
}, Ss = /* @__PURE__ */ j({
|
|
3415
|
+
...ls,
|
|
3416
|
+
props: qo,
|
|
3417
|
+
emits: zo,
|
|
3418
|
+
setup(t, { emit: l }) {
|
|
3419
|
+
const e = t, s = Ae(), o = N(), {
|
|
3028
3420
|
id: c,
|
|
3029
3421
|
icon: u,
|
|
3030
3422
|
iconPosition: v,
|
|
3031
|
-
label:
|
|
3032
|
-
modelValue:
|
|
3033
|
-
count:
|
|
3034
|
-
valid:
|
|
3035
|
-
invalid:
|
|
3036
|
-
loading:
|
|
3423
|
+
label: d,
|
|
3424
|
+
modelValue: p,
|
|
3425
|
+
count: r,
|
|
3426
|
+
valid: i,
|
|
3427
|
+
invalid: b,
|
|
3428
|
+
loading: _,
|
|
3037
3429
|
modifiers: k
|
|
3038
|
-
} =
|
|
3039
|
-
() => e.floating &&
|
|
3040
|
-
), I =
|
|
3430
|
+
} = G(e), A = Le(c), y = n(() => `${A.value}-hint`), m = n(
|
|
3431
|
+
() => e.floating && ge(e.placeholder) ? " " : e.placeholder
|
|
3432
|
+
), I = nl(p, l, e.debounce), { hasIcon: O, hasIconBefore: D, hasIconAfter: L } = ut(
|
|
3041
3433
|
u,
|
|
3042
3434
|
v
|
|
3043
|
-
), { focused:
|
|
3044
|
-
|
|
3045
|
-
|
|
3435
|
+
), { focused: x } = it(o, l), w = $t(o);
|
|
3436
|
+
ve(w, (J) => {
|
|
3437
|
+
J && e.autofocus && (x.value = !0);
|
|
3046
3438
|
});
|
|
3047
|
-
const { formatted:
|
|
3439
|
+
const { formatted: se } = rl(I, {
|
|
3048
3440
|
mode: e.count,
|
|
3049
3441
|
upperLimit: e.maxlength,
|
|
3050
3442
|
lowerLimit: e.minlength
|
|
3051
|
-
}), P =
|
|
3443
|
+
}), P = n(() => !e.disabled && !e.readonly), W = n(
|
|
3052
3444
|
() => P.value ? e.tabindex : -1
|
|
3053
|
-
),
|
|
3445
|
+
), F = n(() => !ge(p)), ue = n(() => {
|
|
3054
3446
|
if (e.invalid === !0)
|
|
3055
3447
|
return !0;
|
|
3056
3448
|
if (e.valid === !0)
|
|
3057
3449
|
return !1;
|
|
3058
|
-
}), { HintSlot:
|
|
3450
|
+
}), { HintSlot: he, hasHint: ye, hasInvalid: ne } = Be(e, s), de = X(
|
|
3059
3451
|
"vv-textarea",
|
|
3060
3452
|
k,
|
|
3061
|
-
|
|
3062
|
-
valid:
|
|
3063
|
-
invalid:
|
|
3064
|
-
loading:
|
|
3453
|
+
n(() => ({
|
|
3454
|
+
valid: i.value,
|
|
3455
|
+
invalid: b.value,
|
|
3456
|
+
loading: _.value,
|
|
3065
3457
|
disabled: e.disabled,
|
|
3066
3458
|
readonly: e.readonly,
|
|
3067
|
-
"icon-before":
|
|
3068
|
-
"icon-after":
|
|
3069
|
-
floating: e.floating && !
|
|
3070
|
-
dirty:
|
|
3071
|
-
focused:
|
|
3459
|
+
"icon-before": D.value,
|
|
3460
|
+
"icon-after": L.value,
|
|
3461
|
+
floating: e.floating && !ge(e.label),
|
|
3462
|
+
dirty: F.value,
|
|
3463
|
+
focused: x.value,
|
|
3072
3464
|
resizable: e.resizable
|
|
3073
3465
|
}))
|
|
3074
|
-
),
|
|
3466
|
+
), _e = n(
|
|
3075
3467
|
() => ({
|
|
3076
3468
|
name: e.name,
|
|
3077
|
-
placeholder:
|
|
3078
|
-
tabindex:
|
|
3469
|
+
placeholder: m.value,
|
|
3470
|
+
tabindex: W.value,
|
|
3079
3471
|
disabled: e.disabled,
|
|
3080
3472
|
readonly: e.readonly,
|
|
3081
3473
|
required: e.required,
|
|
@@ -3086,87 +3478,87 @@ const Ca = ["for"], wa = ["id", "name", "disabled", "value", "tabindex", "aria-i
|
|
|
3086
3478
|
rows: e.rows,
|
|
3087
3479
|
wrap: e.wrap,
|
|
3088
3480
|
spellcheck: e.spellcheck,
|
|
3089
|
-
"aria-invalid":
|
|
3090
|
-
"aria-describedby": !
|
|
3091
|
-
"aria-errormessage":
|
|
3481
|
+
"aria-invalid": ue.value,
|
|
3482
|
+
"aria-describedby": !ne.value && ye.value ? y.value : void 0,
|
|
3483
|
+
"aria-errormessage": ne.value ? y.value : void 0
|
|
3092
3484
|
})
|
|
3093
|
-
),
|
|
3485
|
+
), re = n(() => ({
|
|
3094
3486
|
valid: e.valid,
|
|
3095
3487
|
invalid: e.invalid,
|
|
3096
3488
|
modelValue: e.modelValue,
|
|
3097
3489
|
hintLabel: e.hintLabel,
|
|
3098
3490
|
maxlength: e.maxlength,
|
|
3099
3491
|
minlength: e.minlength,
|
|
3100
|
-
clear:
|
|
3101
|
-
})),
|
|
3492
|
+
clear: Ve
|
|
3493
|
+
})), Ve = () => {
|
|
3102
3494
|
I.value = void 0;
|
|
3103
3495
|
};
|
|
3104
|
-
return (
|
|
3105
|
-
class:
|
|
3496
|
+
return (J, B) => (f(), g("div", {
|
|
3497
|
+
class: le(a(de))
|
|
3106
3498
|
}, [
|
|
3107
|
-
|
|
3499
|
+
a(d) ? (f(), g("label", {
|
|
3108
3500
|
key: 0,
|
|
3109
|
-
for:
|
|
3501
|
+
for: a(A),
|
|
3110
3502
|
class: "vv-textarea__label"
|
|
3111
|
-
},
|
|
3112
|
-
M("div",
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
])) :
|
|
3116
|
-
M("div",
|
|
3117
|
-
|
|
3503
|
+
}, T(a(d)), 9, Yo)) : C("", !0),
|
|
3504
|
+
M("div", Jo, [
|
|
3505
|
+
J.$slots.before ? (f(), g("div", Xo, [
|
|
3506
|
+
V(J.$slots, "before", K(z(a(re))))
|
|
3507
|
+
])) : C("", !0),
|
|
3508
|
+
M("div", Qo, [
|
|
3509
|
+
a(D) ? (f(), H(ee, R({
|
|
3118
3510
|
key: 0,
|
|
3119
3511
|
class: "vv-textarea__icon"
|
|
3120
|
-
},
|
|
3121
|
-
|
|
3122
|
-
id:
|
|
3512
|
+
}, a(O)), null, 16)) : C("", !0),
|
|
3513
|
+
Oe(M("textarea", R({
|
|
3514
|
+
id: a(A),
|
|
3123
3515
|
ref_key: "textarea",
|
|
3124
|
-
ref:
|
|
3125
|
-
"onUpdate:modelValue":
|
|
3126
|
-
},
|
|
3127
|
-
onKeyup:
|
|
3128
|
-
}), null, 16,
|
|
3129
|
-
[
|
|
3516
|
+
ref: o,
|
|
3517
|
+
"onUpdate:modelValue": B[0] || (B[0] = (Q) => Ee(I) ? I.value = Q : null)
|
|
3518
|
+
}, a(_e), {
|
|
3519
|
+
onKeyup: B[1] || (B[1] = (Q) => l("keyup", Q))
|
|
3520
|
+
}), null, 16, Zo), [
|
|
3521
|
+
[Ht, a(I)]
|
|
3130
3522
|
]),
|
|
3131
|
-
|
|
3523
|
+
a(L) ? (f(), H(ee, R({
|
|
3132
3524
|
key: 1,
|
|
3133
3525
|
class: "vv-textarea__icon vv-textarea__icon-after"
|
|
3134
|
-
},
|
|
3526
|
+
}, a(O)), null, 16)) : C("", !0)
|
|
3135
3527
|
]),
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
])) :
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3528
|
+
J.$slots.after ? (f(), g("div", es, [
|
|
3529
|
+
V(J.$slots, "after", K(z(a(re))))
|
|
3530
|
+
])) : C("", !0),
|
|
3531
|
+
a(r) ? (f(), g("span", ts, [
|
|
3532
|
+
V(J.$slots, "count", K(z(a(re))), () => [
|
|
3533
|
+
Y(T(a(se)), 1)
|
|
3142
3534
|
])
|
|
3143
|
-
])) :
|
|
3535
|
+
])) : C("", !0)
|
|
3144
3536
|
]),
|
|
3145
|
-
|
|
3146
|
-
id:
|
|
3537
|
+
pe(a(he), {
|
|
3538
|
+
id: a(y),
|
|
3147
3539
|
class: "vv-textarea__hint"
|
|
3148
3540
|
}, null, 8, ["id"])
|
|
3149
3541
|
], 2));
|
|
3150
3542
|
}
|
|
3151
3543
|
});
|
|
3152
3544
|
export {
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3545
|
+
Rl as VvAccordion,
|
|
3546
|
+
ds as VvAccordionGroup,
|
|
3547
|
+
Yl as VvBadge,
|
|
3548
|
+
cs as VvBreadcrumb,
|
|
3549
|
+
vs as VvButton,
|
|
3550
|
+
fs as VvButtonGroup,
|
|
3551
|
+
ps as VvCard,
|
|
3552
|
+
Ea as VvCheckbox,
|
|
3553
|
+
ms as VvCheckboxGroup,
|
|
3554
|
+
bs as VvCombobox,
|
|
3555
|
+
hs as VvDialog,
|
|
3556
|
+
sl as VvDropdown,
|
|
3557
|
+
ee as VvIcon,
|
|
3558
|
+
ys as VvInputText,
|
|
3559
|
+
gs as VvProgress,
|
|
3560
|
+
Mo as VvRadio,
|
|
3561
|
+
_s as VvRadioGroup,
|
|
3562
|
+
oo as VvSelect,
|
|
3563
|
+
Ss as VvTextarea
|
|
3172
3564
|
};
|