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