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