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