@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,68 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (n && Object.keys(n).length && t) {
|
|
7
|
-
if (t.indexOf(".") === -1)
|
|
8
|
-
return n[t];
|
|
9
|
-
{
|
|
10
|
-
const e = t.split(".");
|
|
11
|
-
let i = n;
|
|
12
|
-
for (let r = 0, p = e.length; r < p; ++r) {
|
|
13
|
-
if (n == null)
|
|
14
|
-
return null;
|
|
15
|
-
i = i[e[r]];
|
|
16
|
-
}
|
|
17
|
-
return i;
|
|
18
|
-
}
|
|
19
|
-
} else
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
function R(n) {
|
|
23
|
-
return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(l(n));
|
|
24
|
-
}
|
|
25
|
-
function $e(n) {
|
|
26
|
-
return typeof n == "string" || n instanceof String;
|
|
1
|
+
import { defineComponent as se, unref as a, openBlock as y, createBlock as D, mergeProps as M, createCommentVNode as R, createElementBlock as W, normalizeClass as be, toDisplayString as ee, createElementVNode as te, renderSlot as F, normalizeProps as V, guardReactiveProps as j, withDirectives as ge, isRef as ye, vModelDynamic as we, createTextVNode as Ee, createVNode as Ie } from "vue";
|
|
2
|
+
import { nanoid as Pe } from "nanoid";
|
|
3
|
+
import { iconExists as x, Icon as Te, addIcon as Ae } from "@iconify/vue";
|
|
4
|
+
function N(i) {
|
|
5
|
+
return Array.isArray(i) ? i.filter((o) => isString(o)).join(" ") : i;
|
|
27
6
|
}
|
|
28
|
-
function
|
|
29
|
-
var t, e;
|
|
30
|
-
if (n)
|
|
31
|
-
return (e = (t = n.match(
|
|
32
|
-
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
33
|
-
)) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
|
|
34
|
-
}
|
|
35
|
-
function M(n) {
|
|
36
|
-
return Array.isArray(n) ? n.filter((t) => $e(t)).join(" ") : n;
|
|
37
|
-
}
|
|
38
|
-
function Ue(n, t) {
|
|
7
|
+
function De(i, o) {
|
|
39
8
|
const {
|
|
40
9
|
invalid: e,
|
|
41
|
-
valid:
|
|
42
|
-
hint:
|
|
43
|
-
loading:
|
|
44
|
-
} =
|
|
10
|
+
valid: c,
|
|
11
|
+
hint: l,
|
|
12
|
+
loading: m
|
|
13
|
+
} = o, {
|
|
45
14
|
hintLabel: u,
|
|
46
|
-
modelValue:
|
|
47
|
-
valid:
|
|
48
|
-
validLabel:
|
|
49
|
-
invalid:
|
|
50
|
-
invalidLabel:
|
|
51
|
-
...
|
|
52
|
-
} =
|
|
53
|
-
() => !!(u && u.value ||
|
|
54
|
-
),
|
|
55
|
-
() => !!(
|
|
56
|
-
),
|
|
57
|
-
() => !!(
|
|
58
|
-
),
|
|
59
|
-
() =>
|
|
15
|
+
modelValue: T,
|
|
16
|
+
valid: g,
|
|
17
|
+
validLabel: f,
|
|
18
|
+
invalid: n,
|
|
19
|
+
invalidLabel: s,
|
|
20
|
+
...S
|
|
21
|
+
} = toRefs(i), d = resolveFieldData(S, "loading"), v = resolveFieldData(S, "loadingLabel"), I = computed(() => n.value ? !!(n.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !isEmpty(s)) : !1), b = computed(
|
|
22
|
+
() => !!(u && u.value || l)
|
|
23
|
+
), P = computed(
|
|
24
|
+
() => !!(f && f.value || c)
|
|
25
|
+
), _ = computed(
|
|
26
|
+
() => !!(d != null && d.value && m || d != null && d.value && (v != null && v.value))
|
|
27
|
+
), C = computed(
|
|
28
|
+
() => b.value || P.value || I.value || _.value
|
|
60
29
|
);
|
|
61
30
|
return {
|
|
62
|
-
hasInvalid:
|
|
63
|
-
hasHint:
|
|
64
|
-
hasValid:
|
|
65
|
-
hasLoading:
|
|
31
|
+
hasInvalid: I,
|
|
32
|
+
hasHint: b,
|
|
33
|
+
hasValid: P,
|
|
34
|
+
hasLoading: _,
|
|
66
35
|
HintSlot: {
|
|
67
36
|
name: "HintSlot",
|
|
68
37
|
props: {
|
|
@@ -71,31 +40,31 @@ function Ue(n, t) {
|
|
|
71
40
|
default: () => ({})
|
|
72
41
|
}
|
|
73
42
|
},
|
|
74
|
-
setup(
|
|
75
|
-
const
|
|
76
|
-
const
|
|
43
|
+
setup(H) {
|
|
44
|
+
const O = computed(() => {
|
|
45
|
+
const A = toReactive({
|
|
77
46
|
hintLabel: u,
|
|
78
|
-
modelValue:
|
|
79
|
-
valid:
|
|
80
|
-
validLabel:
|
|
81
|
-
invalid:
|
|
82
|
-
invalidLabel:
|
|
83
|
-
loading:
|
|
84
|
-
loadingLabel:
|
|
85
|
-
...
|
|
47
|
+
modelValue: T,
|
|
48
|
+
valid: g,
|
|
49
|
+
validLabel: f,
|
|
50
|
+
invalid: n,
|
|
51
|
+
invalidLabel: s,
|
|
52
|
+
loading: d,
|
|
53
|
+
loadingLabel: v,
|
|
54
|
+
...H.params
|
|
86
55
|
});
|
|
87
|
-
return
|
|
56
|
+
return n != null && n.value ? (e == null ? void 0 : e(A)) || N(s == null ? void 0 : s.value) || (u == null ? void 0 : u.value) : g != null && g.value ? (c == null ? void 0 : c(A)) || N(f == null ? void 0 : f.value) || (u == null ? void 0 : u.value) : d != null && d.value ? (m == null ? void 0 : m(A)) || N(v == null ? void 0 : v.value) || (u == null ? void 0 : u.value) : (l == null ? void 0 : l(A)) || N(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
88
57
|
});
|
|
89
58
|
return {
|
|
90
|
-
isVisible:
|
|
91
|
-
hasInvalid:
|
|
92
|
-
hasValid:
|
|
93
|
-
hintContent:
|
|
59
|
+
isVisible: C,
|
|
60
|
+
hasInvalid: I,
|
|
61
|
+
hasValid: P,
|
|
62
|
+
hintContent: O
|
|
94
63
|
};
|
|
95
64
|
},
|
|
96
65
|
render() {
|
|
97
66
|
if (this.isVisible)
|
|
98
|
-
return
|
|
67
|
+
return h(
|
|
99
68
|
"small",
|
|
100
69
|
{
|
|
101
70
|
role: this.hasInvalid || this.hasValid ? "alert" : void 0
|
|
@@ -106,79 +75,7 @@ function Ue(n, t) {
|
|
|
106
75
|
}
|
|
107
76
|
};
|
|
108
77
|
}
|
|
109
|
-
|
|
110
|
-
const i = s(
|
|
111
|
-
() => !!(n != null && n.value && t.value === "left" || e != null && e.iconLeft)
|
|
112
|
-
), r = s(
|
|
113
|
-
() => !!(n != null && n.value && t.value === "right" || e != null && e.iconRight)
|
|
114
|
-
), p = s(
|
|
115
|
-
() => !!(n != null && n.value && t.value === "top" || e != null && e.iconTop)
|
|
116
|
-
), u = s(
|
|
117
|
-
() => !!(n != null && n.value && t.value === "bottom" || e != null && e.iconBottom)
|
|
118
|
-
);
|
|
119
|
-
return {
|
|
120
|
-
hasIcon: s(() => typeof (n == null ? void 0 : n.value) == "string" ? { name: n == null ? void 0 : n.value } : n == null ? void 0 : n.value),
|
|
121
|
-
hasIconLeft: i,
|
|
122
|
-
hasIconRight: r,
|
|
123
|
-
hasIconTop: p,
|
|
124
|
-
hasIconBottom: u
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function Fe(n, t) {
|
|
128
|
-
const { focused: e } = Ve(n);
|
|
129
|
-
return pe(e, (i) => {
|
|
130
|
-
t(i ? "focus" : "blur", l(n));
|
|
131
|
-
}), {
|
|
132
|
-
focused: e
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function je(n, t, e = 0) {
|
|
136
|
-
let i;
|
|
137
|
-
return typeof e == "string" && (e = parseInt(e)), s({
|
|
138
|
-
get: () => n == null ? void 0 : n.value,
|
|
139
|
-
set: (r) => {
|
|
140
|
-
i && clearTimeout(i), i = setTimeout(() => {
|
|
141
|
-
t("update:modelValue", r);
|
|
142
|
-
}, e);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
function qe(n, t) {
|
|
147
|
-
const e = s(() => (l(n) ?? "").length), i = s(() => (t == null ? void 0 : t.lowerLimit) !== void 0 && e.value < (t == null ? void 0 : t.lowerLimit) ? e.value - t.lowerLimit : (t == null ? void 0 : t.upperLimit) !== void 0 && e.value < (t == null ? void 0 : t.upperLimit) ? t.upperLimit - e.value : 0), r = s(() => (t == null ? void 0 : t.mode) === !1 ? "" : (t == null ? void 0 : t.mode) === "limit" && (t != null && t.upperLimit) ? `${e.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : (t == null ? void 0 : t.mode) === "countdown" ? i.value === 0 ? void 0 : i : e.value);
|
|
148
|
-
return {
|
|
149
|
-
length: e,
|
|
150
|
-
gap: i,
|
|
151
|
-
formatted: r
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function ve(n, t) {
|
|
155
|
-
const e = { [`${n}`]: !0 };
|
|
156
|
-
return {
|
|
157
|
-
bemCssClasses: s(() => Object.keys(t).reduce((r, p) => {
|
|
158
|
-
const u = l(t[p]) || !1;
|
|
159
|
-
if (!u)
|
|
160
|
-
return r;
|
|
161
|
-
if (p === "modifiers") {
|
|
162
|
-
const w = Array.isArray(u) ? u : u.split(" ");
|
|
163
|
-
return {
|
|
164
|
-
...r,
|
|
165
|
-
...w.reduce(
|
|
166
|
-
(h, m) => ({
|
|
167
|
-
...h,
|
|
168
|
-
[`${n}--${se(m)}`]: !0
|
|
169
|
-
}),
|
|
170
|
-
{}
|
|
171
|
-
)
|
|
172
|
-
};
|
|
173
|
-
} else
|
|
174
|
-
return {
|
|
175
|
-
...r,
|
|
176
|
-
[`${n}--${se(p)}`]: u
|
|
177
|
-
};
|
|
178
|
-
}, e) || {})
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
const ze = "ds", Xe = {
|
|
78
|
+
const Ce = "ds", Re = {
|
|
182
79
|
color: String,
|
|
183
80
|
width: {
|
|
184
81
|
type: [String, Number]
|
|
@@ -209,126 +106,126 @@ const ze = "ds", Xe = {
|
|
|
209
106
|
modifiers: {
|
|
210
107
|
type: [String, Array]
|
|
211
108
|
}
|
|
212
|
-
},
|
|
109
|
+
}, _e = {
|
|
213
110
|
name: "VvIcon"
|
|
214
|
-
},
|
|
215
|
-
...
|
|
216
|
-
props:
|
|
217
|
-
setup(
|
|
218
|
-
const
|
|
219
|
-
modifiers:
|
|
220
|
-
}), u =
|
|
221
|
-
const
|
|
222
|
-
return
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
return
|
|
226
|
-
})) ||
|
|
111
|
+
}, E = /* @__PURE__ */ se({
|
|
112
|
+
..._e,
|
|
113
|
+
props: Re,
|
|
114
|
+
setup(i) {
|
|
115
|
+
const o = i, e = ref(!0), { modifiers: c } = toRefs(o), l = inject(Ce), { bemCssClasses: m } = useBemModifiers("vv-icon", {
|
|
116
|
+
modifiers: c
|
|
117
|
+
}), u = computed(() => o.provider || (l == null ? void 0 : l.provider)), T = computed(() => {
|
|
118
|
+
const n = o.name ?? "", s = `@${u.value}:${o.prefix}:${o.name}`;
|
|
119
|
+
return x(n) ? n : x(s) ? s : (l == null ? void 0 : l.iconsCollections.find((S) => {
|
|
120
|
+
const d = `@${u.value}:${S.prefix}:${n}`;
|
|
121
|
+
if (x(d))
|
|
122
|
+
return d;
|
|
123
|
+
})) || n;
|
|
227
124
|
});
|
|
228
|
-
function
|
|
229
|
-
let
|
|
125
|
+
function g(n) {
|
|
126
|
+
let s = null;
|
|
230
127
|
if (typeof window > "u") {
|
|
231
|
-
const { JSDOM:
|
|
232
|
-
|
|
128
|
+
const { JSDOM: I } = require("jsdom");
|
|
129
|
+
s = new I().window;
|
|
233
130
|
}
|
|
234
|
-
return (
|
|
131
|
+
return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(n, "text/html").querySelector("svg");
|
|
235
132
|
}
|
|
236
|
-
function
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
body:
|
|
240
|
-
height:
|
|
241
|
-
width:
|
|
133
|
+
function f(n) {
|
|
134
|
+
const s = g(n), S = (s == null ? void 0 : s.innerHTML.trim()) || "";
|
|
135
|
+
s && S && Ae(`@${u.value}:${o.prefix}:${o.name}`, {
|
|
136
|
+
body: S,
|
|
137
|
+
height: s.viewBox.baseVal.height,
|
|
138
|
+
width: s.viewBox.baseVal.width
|
|
242
139
|
});
|
|
243
140
|
}
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
}).catch((
|
|
247
|
-
throw new Error(`During fetch icon: ${
|
|
248
|
-
})) :
|
|
141
|
+
return l && (o.src && !x(`@${u.value}:${o.prefix}:${o.name}`) ? (e.value = !1, l.fetchIcon(o.src).then((n) => {
|
|
142
|
+
n && (f(n), e.value = !0);
|
|
143
|
+
}).catch((n) => {
|
|
144
|
+
throw new Error(`During fetch icon: ${n == null ? void 0 : n.message}`);
|
|
145
|
+
})) : o.svg && f(o.svg)), (n, s) => a(e) ? (y(), D(a(Te), M({
|
|
249
146
|
key: 0,
|
|
250
|
-
class:
|
|
147
|
+
class: a(m)
|
|
251
148
|
}, {
|
|
252
|
-
inline:
|
|
253
|
-
width:
|
|
254
|
-
height:
|
|
255
|
-
horizontalFlip:
|
|
256
|
-
verticalFlip:
|
|
257
|
-
flip:
|
|
258
|
-
rotate:
|
|
259
|
-
color:
|
|
260
|
-
onLoad:
|
|
261
|
-
icon:
|
|
262
|
-
}), null, 16, ["class"])) :
|
|
149
|
+
inline: n.inline,
|
|
150
|
+
width: n.width,
|
|
151
|
+
height: n.height,
|
|
152
|
+
horizontalFlip: n.horizontalFlip,
|
|
153
|
+
verticalFlip: n.verticalFlip,
|
|
154
|
+
flip: n.flip,
|
|
155
|
+
rotate: n.rotate,
|
|
156
|
+
color: n.color,
|
|
157
|
+
onLoad: n.onLoad,
|
|
158
|
+
icon: a(T)
|
|
159
|
+
}), null, 16, ["class"])) : R("", !0);
|
|
263
160
|
}
|
|
264
|
-
}),
|
|
161
|
+
}), He = {
|
|
265
162
|
valid: Boolean,
|
|
266
163
|
validLabel: [String, Array]
|
|
267
|
-
},
|
|
164
|
+
}, Oe = {
|
|
268
165
|
invalid: Boolean,
|
|
269
166
|
invalidLabel: [String, Array]
|
|
270
|
-
},
|
|
167
|
+
}, Ve = {
|
|
271
168
|
loading: Boolean,
|
|
272
169
|
loadingLabel: String
|
|
273
|
-
},
|
|
170
|
+
}, xe = {
|
|
274
171
|
disabled: Boolean
|
|
275
|
-
},
|
|
172
|
+
}, Ne = {
|
|
276
173
|
readonly: Boolean
|
|
277
|
-
},
|
|
174
|
+
}, Me = {
|
|
278
175
|
modifiers: [String, Array]
|
|
279
|
-
},
|
|
176
|
+
}, Be = {
|
|
280
177
|
hintLabel: { type: String, default: "" }
|
|
281
|
-
},
|
|
178
|
+
}, ke = {
|
|
282
179
|
count: {
|
|
283
180
|
type: [Boolean, String],
|
|
284
181
|
default: !1,
|
|
285
|
-
validator: (
|
|
182
|
+
validator: (i) => [!0, !1, "limit", "countdown"].includes(i)
|
|
286
183
|
}
|
|
287
|
-
},
|
|
184
|
+
}, Le = {
|
|
288
185
|
debounce: [Number, String]
|
|
289
|
-
},
|
|
186
|
+
}, oe = {
|
|
290
187
|
LEFT: "left",
|
|
291
188
|
RIGHT: "right"
|
|
292
|
-
},
|
|
189
|
+
}, $e = {
|
|
293
190
|
icon: { type: [String, Object] },
|
|
294
191
|
iconPosition: {
|
|
295
192
|
type: String,
|
|
296
|
-
validation: (
|
|
297
|
-
default:
|
|
193
|
+
validation: (i) => Object.values(oe).includes(i),
|
|
194
|
+
default: oe.RIGHT
|
|
298
195
|
}
|
|
299
|
-
},
|
|
196
|
+
}, Ue = {
|
|
300
197
|
tabindex: { type: [String, Number], default: 0 }
|
|
301
|
-
},
|
|
198
|
+
}, We = {
|
|
302
199
|
floating: Boolean
|
|
303
|
-
},
|
|
200
|
+
}, Fe = {
|
|
304
201
|
id: [String, Number],
|
|
305
202
|
name: { type: String, required: !0 }
|
|
306
|
-
},
|
|
203
|
+
}, je = {
|
|
307
204
|
autofocus: Boolean
|
|
308
|
-
},
|
|
205
|
+
}, qe = {
|
|
309
206
|
autocomplete: { type: String, default: "off" }
|
|
310
|
-
},
|
|
311
|
-
...
|
|
312
|
-
...
|
|
313
|
-
...
|
|
314
|
-
...
|
|
315
|
-
...
|
|
316
|
-
...
|
|
317
|
-
...
|
|
318
|
-
...
|
|
319
|
-
...
|
|
320
|
-
...
|
|
321
|
-
...
|
|
322
|
-
...
|
|
323
|
-
...
|
|
324
|
-
|
|
325
|
-
...
|
|
207
|
+
}, Xe = {
|
|
208
|
+
...Fe,
|
|
209
|
+
...je,
|
|
210
|
+
...qe,
|
|
211
|
+
...Ue,
|
|
212
|
+
...xe,
|
|
213
|
+
...Ne,
|
|
214
|
+
...He,
|
|
215
|
+
...Oe,
|
|
216
|
+
...Be,
|
|
217
|
+
...Ve,
|
|
218
|
+
...Me,
|
|
219
|
+
...ke,
|
|
220
|
+
...Le,
|
|
221
|
+
...$e,
|
|
222
|
+
...We,
|
|
326
223
|
minlength: Number,
|
|
327
224
|
maxlength: Number,
|
|
328
225
|
placeholder: String,
|
|
329
226
|
required: Boolean,
|
|
330
227
|
label: String
|
|
331
|
-
},
|
|
228
|
+
}, t = {
|
|
332
229
|
TEXT: "text",
|
|
333
230
|
PASSWORD: "password",
|
|
334
231
|
NUMBER: "number",
|
|
@@ -342,20 +239,20 @@ const ze = "ds", Xe = {
|
|
|
342
239
|
DATETIME_LOCAL: "datetime-local",
|
|
343
240
|
MONTH: "month",
|
|
344
241
|
WEEK: "week"
|
|
345
|
-
},
|
|
242
|
+
}, w = {
|
|
346
243
|
PASSWORD_SHOW: "eye-on",
|
|
347
244
|
PASSWORD_HIDE: "eye-off",
|
|
348
245
|
DATE: "calendar",
|
|
349
246
|
TIME: "time",
|
|
350
247
|
COLOR: "color",
|
|
351
248
|
SEARCH: "close"
|
|
352
|
-
},
|
|
353
|
-
...
|
|
249
|
+
}, ze = ["update:modelValue", "focus", "blur", "keyup"], Ke = {
|
|
250
|
+
...Xe,
|
|
354
251
|
modelValue: [String, Number],
|
|
355
252
|
type: {
|
|
356
253
|
type: String,
|
|
357
|
-
default:
|
|
358
|
-
validator: (
|
|
254
|
+
default: t.TEXT,
|
|
255
|
+
validator: (i) => Object.values(t).includes(i)
|
|
359
256
|
},
|
|
360
257
|
min: [Number, Date, String],
|
|
361
258
|
max: [Number, Date, String],
|
|
@@ -364,15 +261,15 @@ const ze = "ds", Xe = {
|
|
|
364
261
|
multiple: Boolean,
|
|
365
262
|
iconShowPassword: {
|
|
366
263
|
type: String,
|
|
367
|
-
default:
|
|
264
|
+
default: w.PASSWORD_SHOW
|
|
368
265
|
},
|
|
369
266
|
iconHidePassword: {
|
|
370
267
|
type: String,
|
|
371
|
-
default:
|
|
268
|
+
default: w.PASSWORD_HIDE
|
|
372
269
|
},
|
|
373
270
|
iconClear: {
|
|
374
271
|
type: String,
|
|
375
|
-
default:
|
|
272
|
+
default: w.SEARCH
|
|
376
273
|
},
|
|
377
274
|
labelStepUp: {
|
|
378
275
|
type: String,
|
|
@@ -394,9 +291,9 @@ const ze = "ds", Xe = {
|
|
|
394
291
|
type: String,
|
|
395
292
|
default: "Clear"
|
|
396
293
|
}
|
|
397
|
-
},
|
|
294
|
+
}, ne = defineComponent({
|
|
398
295
|
components: {
|
|
399
|
-
VvIcon:
|
|
296
|
+
VvIcon: E
|
|
400
297
|
},
|
|
401
298
|
props: {
|
|
402
299
|
disabled: {
|
|
@@ -413,33 +310,33 @@ const ze = "ds", Xe = {
|
|
|
413
310
|
},
|
|
414
311
|
iconShow: {
|
|
415
312
|
type: String,
|
|
416
|
-
default:
|
|
313
|
+
default: w.PASSWORD_SHOW
|
|
417
314
|
},
|
|
418
315
|
iconHide: {
|
|
419
316
|
type: String,
|
|
420
|
-
default:
|
|
317
|
+
default: w.PASSWORD_HIDE
|
|
421
318
|
}
|
|
422
319
|
},
|
|
423
320
|
emits: ["toggle-password"],
|
|
424
|
-
setup(
|
|
425
|
-
const e =
|
|
426
|
-
() => e.value ?
|
|
321
|
+
setup(i, { emit: o }) {
|
|
322
|
+
const e = ref(!1), c = computed(
|
|
323
|
+
() => e.value ? i.iconHide : i.iconShow
|
|
427
324
|
);
|
|
428
|
-
function
|
|
429
|
-
|
|
325
|
+
function l(m) {
|
|
326
|
+
m == null || m.stopPropagation(), i.disabled || (e.value = !e.value, o("toggle-password", e.value));
|
|
430
327
|
}
|
|
431
328
|
return {
|
|
432
329
|
active: e,
|
|
433
|
-
activeIcon:
|
|
434
|
-
onClick:
|
|
330
|
+
activeIcon: c,
|
|
331
|
+
onClick: l
|
|
435
332
|
};
|
|
436
333
|
},
|
|
437
334
|
render() {
|
|
438
|
-
const
|
|
335
|
+
const i = h(E, {
|
|
439
336
|
name: this.activeIcon,
|
|
440
337
|
class: "vv-input-text__action-icon"
|
|
441
338
|
});
|
|
442
|
-
return
|
|
339
|
+
return h(
|
|
443
340
|
"button",
|
|
444
341
|
{
|
|
445
342
|
disabled: this.disabled,
|
|
@@ -448,12 +345,12 @@ const ze = "ds", Xe = {
|
|
|
448
345
|
type: "button",
|
|
449
346
|
onClick: this.onClick
|
|
450
347
|
},
|
|
451
|
-
|
|
348
|
+
i
|
|
452
349
|
);
|
|
453
350
|
}
|
|
454
|
-
}),
|
|
351
|
+
}), q = defineComponent({
|
|
455
352
|
components: {
|
|
456
|
-
VvIcon:
|
|
353
|
+
VvIcon: E
|
|
457
354
|
},
|
|
458
355
|
props: {
|
|
459
356
|
disabled: {
|
|
@@ -465,22 +362,22 @@ const ze = "ds", Xe = {
|
|
|
465
362
|
},
|
|
466
363
|
mode: {
|
|
467
364
|
type: String,
|
|
468
|
-
validator: (
|
|
365
|
+
validator: (i) => ["up", "down"].includes(i),
|
|
469
366
|
default: "up"
|
|
470
367
|
}
|
|
471
368
|
},
|
|
472
369
|
emits: ["step-up", "step-down"],
|
|
473
|
-
setup(
|
|
474
|
-
const e =
|
|
370
|
+
setup(i, { emit: o }) {
|
|
371
|
+
const e = computed(() => i.mode === "up");
|
|
475
372
|
return {
|
|
476
373
|
isUp: e,
|
|
477
|
-
onClick: (
|
|
478
|
-
|
|
374
|
+
onClick: (l) => {
|
|
375
|
+
l == null || l.stopPropagation(), i.disabled || o(e.value ? "step-up" : "step-down");
|
|
479
376
|
}
|
|
480
377
|
};
|
|
481
378
|
},
|
|
482
379
|
render() {
|
|
483
|
-
return
|
|
380
|
+
return h("button", {
|
|
484
381
|
class: [
|
|
485
382
|
"vv-input-text__action-chevron",
|
|
486
383
|
this.isUp && "vv-input-text__action-chevron-up"
|
|
@@ -490,9 +387,9 @@ const ze = "ds", Xe = {
|
|
|
490
387
|
onClick: this.onClick
|
|
491
388
|
});
|
|
492
389
|
}
|
|
493
|
-
}),
|
|
390
|
+
}), ie = defineComponent({
|
|
494
391
|
components: {
|
|
495
|
-
VvIcon:
|
|
392
|
+
VvIcon: E
|
|
496
393
|
},
|
|
497
394
|
props: {
|
|
498
395
|
disabled: {
|
|
@@ -509,20 +406,20 @@ const ze = "ds", Xe = {
|
|
|
509
406
|
}
|
|
510
407
|
},
|
|
511
408
|
emits: ["clear"],
|
|
512
|
-
setup(
|
|
513
|
-
function e(
|
|
514
|
-
|
|
409
|
+
setup(i, { emit: o }) {
|
|
410
|
+
function e(c) {
|
|
411
|
+
c == null || c.stopPropagation(), i.disabled || o("clear");
|
|
515
412
|
}
|
|
516
413
|
return {
|
|
517
414
|
onClick: e
|
|
518
415
|
};
|
|
519
416
|
},
|
|
520
417
|
render() {
|
|
521
|
-
const
|
|
418
|
+
const i = h(E, {
|
|
522
419
|
name: this.icon,
|
|
523
420
|
class: "vv-input-text__action-icon"
|
|
524
421
|
});
|
|
525
|
-
return
|
|
422
|
+
return h(
|
|
526
423
|
"button",
|
|
527
424
|
{
|
|
528
425
|
disabled: this.disabled,
|
|
@@ -531,51 +428,51 @@ const ze = "ds", Xe = {
|
|
|
531
428
|
type: "button",
|
|
532
429
|
onClick: this.onClick
|
|
533
430
|
},
|
|
534
|
-
|
|
431
|
+
i
|
|
535
432
|
);
|
|
536
433
|
}
|
|
537
434
|
});
|
|
538
|
-
function
|
|
435
|
+
function X(i, o) {
|
|
539
436
|
return {
|
|
540
437
|
name: "VvInputTextActions",
|
|
541
438
|
components: {
|
|
542
|
-
VvIcon:
|
|
543
|
-
VvInputPasswordAction:
|
|
544
|
-
VvInputStepAction:
|
|
545
|
-
VvInputClearAction:
|
|
439
|
+
VvIcon: E,
|
|
440
|
+
VvInputPasswordAction: ne,
|
|
441
|
+
VvInputStepAction: q,
|
|
442
|
+
VvInputClearAction: ie
|
|
546
443
|
},
|
|
547
444
|
setup() {
|
|
548
445
|
return {
|
|
549
|
-
isDisabled:
|
|
550
|
-
labelStepUp:
|
|
551
|
-
labelStepDown:
|
|
552
|
-
labelShowPassword:
|
|
553
|
-
labelHidePassword:
|
|
554
|
-
labelClear:
|
|
555
|
-
iconShowPassword:
|
|
556
|
-
iconHidePassword:
|
|
446
|
+
isDisabled: computed(() => o.disabled || o.readonly),
|
|
447
|
+
labelStepUp: o.labelStepUp,
|
|
448
|
+
labelStepDown: o.labelStepDown,
|
|
449
|
+
labelShowPassword: o.labelShowPassword,
|
|
450
|
+
labelHidePassword: o.labelHidePassword,
|
|
451
|
+
labelClear: o.labelClear,
|
|
452
|
+
iconShowPassword: o.iconShowPassword,
|
|
453
|
+
iconHidePassword: o.iconHidePassword
|
|
557
454
|
};
|
|
558
455
|
},
|
|
559
456
|
render() {
|
|
560
457
|
let e = null;
|
|
561
|
-
switch (
|
|
562
|
-
case
|
|
563
|
-
const { onClear:
|
|
458
|
+
switch (i) {
|
|
459
|
+
case t.SEARCH: {
|
|
460
|
+
const { onClear: c } = this.$attrs;
|
|
564
461
|
e = [
|
|
565
|
-
|
|
462
|
+
h(ie, {
|
|
566
463
|
disabled: this.isDisabled,
|
|
567
464
|
label: this.labelShowPassword,
|
|
568
|
-
onClear:
|
|
465
|
+
onClear: c
|
|
569
466
|
})
|
|
570
467
|
];
|
|
571
468
|
break;
|
|
572
469
|
}
|
|
573
|
-
case
|
|
574
|
-
const { onTogglePassword:
|
|
470
|
+
case t.PASSWORD: {
|
|
471
|
+
const { onTogglePassword: c } = this.$attrs;
|
|
575
472
|
e = [
|
|
576
|
-
|
|
473
|
+
h(ne, {
|
|
577
474
|
disabled: this.isDisabled,
|
|
578
|
-
onTogglePassword:
|
|
475
|
+
onTogglePassword: c,
|
|
579
476
|
labelShow: this.labelShowPassword,
|
|
580
477
|
labelHide: this.labelHidePassword,
|
|
581
478
|
iconShow: this.iconShowPassword,
|
|
@@ -584,189 +481,189 @@ function G(n, t) {
|
|
|
584
481
|
];
|
|
585
482
|
break;
|
|
586
483
|
}
|
|
587
|
-
case
|
|
588
|
-
const { onStepUp:
|
|
484
|
+
case t.NUMBER: {
|
|
485
|
+
const { onStepUp: c, onStepDown: l } = this.$attrs;
|
|
589
486
|
e = [
|
|
590
|
-
|
|
487
|
+
h(q, {
|
|
591
488
|
mode: "up",
|
|
592
|
-
disabled: this.isDisabled ||
|
|
489
|
+
disabled: this.isDisabled || o.max !== void 0 && o.modelValue === o.max,
|
|
593
490
|
label: this.labelStepUp,
|
|
594
|
-
onStepUp:
|
|
595
|
-
onStepDown:
|
|
491
|
+
onStepUp: c,
|
|
492
|
+
onStepDown: l
|
|
596
493
|
}),
|
|
597
|
-
|
|
494
|
+
h(q, {
|
|
598
495
|
mode: "down",
|
|
599
|
-
disabled: this.isDisabled ||
|
|
496
|
+
disabled: this.isDisabled || o.min !== void 0 && o.modelValue === o.min,
|
|
600
497
|
label: this.labelStepDown,
|
|
601
|
-
onStepUp:
|
|
602
|
-
onStepDown:
|
|
498
|
+
onStepUp: c,
|
|
499
|
+
onStepDown: l
|
|
603
500
|
})
|
|
604
501
|
];
|
|
605
502
|
break;
|
|
606
503
|
}
|
|
607
504
|
}
|
|
608
|
-
return Array.isArray(e) ?
|
|
505
|
+
return Array.isArray(e) ? h("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
609
506
|
}
|
|
610
507
|
};
|
|
611
508
|
}
|
|
612
|
-
const
|
|
509
|
+
const Ge = ["for"], Ye = { class: "vv-input-text__wrapper" }, Je = ["id"], Qe = {
|
|
613
510
|
key: 0,
|
|
614
511
|
class: "vv-input-text__limit"
|
|
615
|
-
},
|
|
512
|
+
}, Ze = {
|
|
616
513
|
name: "VvInputText"
|
|
617
|
-
},
|
|
618
|
-
...
|
|
619
|
-
props:
|
|
620
|
-
emits:
|
|
621
|
-
setup(
|
|
622
|
-
const e =
|
|
623
|
-
icon:
|
|
514
|
+
}, nt = /* @__PURE__ */ se({
|
|
515
|
+
...Ze,
|
|
516
|
+
props: Ke,
|
|
517
|
+
emits: ze,
|
|
518
|
+
setup(i, { emit: o }) {
|
|
519
|
+
const e = i, c = useSlots(), l = ref(), {
|
|
520
|
+
icon: m,
|
|
624
521
|
iconPosition: u,
|
|
625
|
-
label:
|
|
626
|
-
modelValue:
|
|
627
|
-
count:
|
|
628
|
-
valid:
|
|
629
|
-
invalid:
|
|
630
|
-
loading:
|
|
631
|
-
} =
|
|
632
|
-
() => e.floating &&
|
|
633
|
-
),
|
|
634
|
-
|
|
635
|
-
|
|
522
|
+
label: T,
|
|
523
|
+
modelValue: g,
|
|
524
|
+
count: f,
|
|
525
|
+
valid: n,
|
|
526
|
+
invalid: s,
|
|
527
|
+
loading: S
|
|
528
|
+
} = toRefs(e), d = computed(() => String(e.id || Pe())), v = computed(() => `${d.value}-hint`), I = computed(
|
|
529
|
+
() => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
|
|
530
|
+
), b = useDebouncedInput(g, o, e.debounce), { focused: P } = useComponentFocus(l, o), _ = useElementVisibility(l);
|
|
531
|
+
watch(_, (r) => {
|
|
532
|
+
r && e.autofocus && (P.value = !0);
|
|
636
533
|
});
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
},
|
|
640
|
-
() => e.type ===
|
|
641
|
-
),
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
|
|
645
|
-
},
|
|
646
|
-
|
|
647
|
-
}, { hasIconLeft:
|
|
648
|
-
|
|
534
|
+
const C = ref(!1), H = computed(() => e.type === t.PASSWORD), O = () => {
|
|
535
|
+
C.value = !C.value;
|
|
536
|
+
}, A = computed(
|
|
537
|
+
() => e.type === t.TIME || e.type === t.DATETIME_LOCAL || e.type === t.DATE || e.type === t.WEEK || e.type === t.MONTH
|
|
538
|
+
), ae = computed(() => e.type === t.NUMBER), z = () => {
|
|
539
|
+
L.value && (l.value.stepUp(), b.value = unref(l).value);
|
|
540
|
+
}, K = () => {
|
|
541
|
+
L.value && (l.value.stepDown(), b.value = unref(l).value);
|
|
542
|
+
}, le = computed(() => e.type === t.SEARCH), G = () => {
|
|
543
|
+
b.value = void 0;
|
|
544
|
+
}, { hasIconLeft: Y, hasIconRight: B, hasIcon: J } = useComponentIcon(
|
|
545
|
+
m,
|
|
649
546
|
u
|
|
650
|
-
),
|
|
547
|
+
), k = computed(() => {
|
|
651
548
|
switch (e.type) {
|
|
652
|
-
case
|
|
653
|
-
return { name:
|
|
654
|
-
case
|
|
655
|
-
case
|
|
656
|
-
case
|
|
657
|
-
case
|
|
658
|
-
return { name:
|
|
659
|
-
case
|
|
660
|
-
return { name:
|
|
549
|
+
case t.COLOR:
|
|
550
|
+
return { name: w.COLOR };
|
|
551
|
+
case t.DATE:
|
|
552
|
+
case t.DATETIME_LOCAL:
|
|
553
|
+
case t.WEEK:
|
|
554
|
+
case t.MONTH:
|
|
555
|
+
return { name: w.DATE };
|
|
556
|
+
case t.TIME:
|
|
557
|
+
return { name: w.TIME };
|
|
661
558
|
default:
|
|
662
559
|
return "";
|
|
663
560
|
}
|
|
664
|
-
}), { formatted:
|
|
561
|
+
}), { formatted: re } = useTextCount(b, {
|
|
665
562
|
mode: e.count,
|
|
666
563
|
upperLimit: e.maxlength,
|
|
667
564
|
lowerLimit: e.minlength
|
|
668
|
-
}),
|
|
669
|
-
() =>
|
|
670
|
-
),
|
|
671
|
-
if (
|
|
565
|
+
}), L = computed(() => !e.disabled && !e.readonly), ue = computed(
|
|
566
|
+
() => L.value ? e.tabindex : -1
|
|
567
|
+
), Q = computed(() => !isEmpty(g)), ce = computed(() => {
|
|
568
|
+
if (s.value === !0)
|
|
672
569
|
return !0;
|
|
673
|
-
if (
|
|
570
|
+
if (n.value === !0)
|
|
674
571
|
return !1;
|
|
675
|
-
}), { bemCssClasses:
|
|
572
|
+
}), { bemCssClasses: de } = useBemModifiers("vv-input-text", {
|
|
676
573
|
modifiers: e.modifiers,
|
|
677
|
-
valid:
|
|
678
|
-
invalid:
|
|
679
|
-
loading:
|
|
574
|
+
valid: n,
|
|
575
|
+
invalid: s,
|
|
576
|
+
loading: S,
|
|
680
577
|
disabled: e.disabled,
|
|
681
578
|
readonly: e.readonly,
|
|
682
|
-
iconLeft:
|
|
683
|
-
iconRight:
|
|
684
|
-
floating: e.floating && !
|
|
685
|
-
dirty:
|
|
686
|
-
focus:
|
|
687
|
-
}),
|
|
688
|
-
const
|
|
689
|
-
type:
|
|
579
|
+
iconLeft: Y,
|
|
580
|
+
iconRight: B.value || !isEmpty(k),
|
|
581
|
+
floating: e.floating && !isEmpty(e.label),
|
|
582
|
+
dirty: Q,
|
|
583
|
+
focus: P
|
|
584
|
+
}), pe = computed(() => {
|
|
585
|
+
const r = (() => H.value && C.value || A.value && !Q.value && !P.value ? t.TEXT : e.type)(), p = {
|
|
586
|
+
type: r,
|
|
690
587
|
name: e.name,
|
|
691
|
-
tabindex:
|
|
588
|
+
tabindex: ue.value,
|
|
692
589
|
disabled: e.disabled,
|
|
693
590
|
readonly: e.readonly,
|
|
694
591
|
required: e.required,
|
|
695
592
|
autocomplete: e.autocomplete,
|
|
696
|
-
"aria-invalid":
|
|
697
|
-
"aria-describedby": !
|
|
698
|
-
"aria-errormessage":
|
|
593
|
+
"aria-invalid": ce.value,
|
|
594
|
+
"aria-describedby": !Z.value && ve.value ? v.value : void 0,
|
|
595
|
+
"aria-errormessage": Z.value ? v.value : void 0
|
|
699
596
|
};
|
|
700
|
-
return (
|
|
701
|
-
}),
|
|
597
|
+
return (r === t.DATE || r === t.MONTH || r === t.WEEK || r === t.TIME || r === t.DATETIME_LOCAL || r === t.NUMBER) && (p.step = e.step, p.max = String(e.max), p.min = String(e.min)), (r === t.TEXT || r === t.SEARCH || r === t.URL || r === t.TEL || r === t.EMAIL || r === t.PASSWORD || r === t.NUMBER) && (p.placeholder = I.value), (r === t.TEXT || r === t.SEARCH || r === t.URL || r === t.TEL || r === t.EMAIL || r === t.PASSWORD) && (p.minlength = e.minlength, p.maxlength = e.maxlength, p.pattern = e.pattern), r === t.EMAIL && (p.multiple = e.multiple), p;
|
|
598
|
+
}), $ = computed(() => ({
|
|
702
599
|
valid: e.valid,
|
|
703
600
|
invalid: e.invalid,
|
|
704
601
|
modelValue: e.modelValue,
|
|
705
|
-
togglePassword:
|
|
706
|
-
stepUp:
|
|
707
|
-
stepDown:
|
|
708
|
-
clear:
|
|
709
|
-
})), { HintSlot:
|
|
710
|
-
|
|
602
|
+
togglePassword: O,
|
|
603
|
+
stepUp: z,
|
|
604
|
+
stepDown: K,
|
|
605
|
+
clear: G
|
|
606
|
+
})), { HintSlot: me, hasHint: ve, hasInvalid: Z } = De(e, c), fe = X(
|
|
607
|
+
t.PASSWORD,
|
|
711
608
|
e
|
|
712
|
-
),
|
|
713
|
-
|
|
609
|
+
), Se = X(
|
|
610
|
+
t.NUMBER,
|
|
714
611
|
e
|
|
715
|
-
),
|
|
716
|
-
|
|
612
|
+
), he = X(
|
|
613
|
+
t.SEARCH,
|
|
717
614
|
e
|
|
718
615
|
);
|
|
719
|
-
return (
|
|
720
|
-
class:
|
|
616
|
+
return (r, p) => (y(), W("div", {
|
|
617
|
+
class: be(a(de))
|
|
721
618
|
}, [
|
|
722
|
-
|
|
619
|
+
a(T) ? (y(), W("label", {
|
|
723
620
|
key: 0,
|
|
724
|
-
for:
|
|
621
|
+
for: a(d),
|
|
725
622
|
class: "vv-input-text__label"
|
|
726
|
-
},
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
623
|
+
}, ee(a(T)), 9, Ge)) : R("", !0),
|
|
624
|
+
te("div", Ye, [
|
|
625
|
+
F(r.$slots, "before", V(j(a($))), () => [
|
|
626
|
+
a(Y) ? (y(), D(E, M({
|
|
730
627
|
key: 0,
|
|
731
628
|
class: "vv-input-text__icon-left"
|
|
732
|
-
},
|
|
629
|
+
}, a(J)), null, 16)) : R("", !0)
|
|
733
630
|
]),
|
|
734
|
-
|
|
735
|
-
id:
|
|
631
|
+
ge(te("input", M({
|
|
632
|
+
id: a(d),
|
|
736
633
|
ref_key: "input",
|
|
737
|
-
ref:
|
|
738
|
-
"onUpdate:modelValue":
|
|
739
|
-
},
|
|
740
|
-
onKeyup:
|
|
741
|
-
}), null, 16,
|
|
742
|
-
[
|
|
634
|
+
ref: l,
|
|
635
|
+
"onUpdate:modelValue": p[0] || (p[0] = (U) => ye(b) ? b.value = U : null)
|
|
636
|
+
}, a(pe), {
|
|
637
|
+
onKeyup: p[1] || (p[1] = (U) => o("keyup", U))
|
|
638
|
+
}), null, 16, Je), [
|
|
639
|
+
[we, a(b)]
|
|
743
640
|
]),
|
|
744
|
-
|
|
745
|
-
|
|
641
|
+
F(r.$slots, "after", V(j(a($))), () => [
|
|
642
|
+
a(B) || a(k) ? (y(), D(E, V(M({ key: 0 }, a(B) ? a(J) : a(k))), null, 16)) : a(H) ? (y(), D(a(fe), {
|
|
746
643
|
key: 1,
|
|
747
|
-
onTogglePassword:
|
|
748
|
-
})) :
|
|
644
|
+
onTogglePassword: O
|
|
645
|
+
})) : a(ae) ? (y(), D(a(Se), {
|
|
749
646
|
key: 2,
|
|
750
|
-
onStepUp:
|
|
751
|
-
onStepDown:
|
|
752
|
-
})) :
|
|
647
|
+
onStepUp: z,
|
|
648
|
+
onStepDown: K
|
|
649
|
+
})) : a(le) ? (y(), D(a(he), {
|
|
753
650
|
key: 3,
|
|
754
|
-
onClear:
|
|
755
|
-
})) :
|
|
651
|
+
onClear: G
|
|
652
|
+
})) : R("", !0)
|
|
756
653
|
]),
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
654
|
+
a(f) ? (y(), W("span", Qe, [
|
|
655
|
+
F(r.$slots, "count", V(j(a($))), () => [
|
|
656
|
+
Ee(ee(a(re)), 1)
|
|
760
657
|
])
|
|
761
|
-
])) :
|
|
658
|
+
])) : R("", !0)
|
|
762
659
|
]),
|
|
763
|
-
|
|
764
|
-
id:
|
|
660
|
+
Ie(a(me), {
|
|
661
|
+
id: a(v),
|
|
765
662
|
class: "vv-input-text__hint"
|
|
766
663
|
}, null, 8, ["id"])
|
|
767
664
|
], 2));
|
|
768
665
|
}
|
|
769
666
|
});
|
|
770
667
|
export {
|
|
771
|
-
|
|
668
|
+
nt as default
|
|
772
669
|
};
|