@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 { nanoid as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (r && Object.keys(r).length && t) {
|
|
7
|
-
if (t.indexOf(".") === -1)
|
|
8
|
-
return r[t];
|
|
9
|
-
{
|
|
10
|
-
const e = t.split(".");
|
|
11
|
-
let u = r;
|
|
12
|
-
for (let l = 0, d = e.length; l < d; ++l) {
|
|
13
|
-
if (r == null)
|
|
14
|
-
return null;
|
|
15
|
-
u = u[e[l]];
|
|
16
|
-
}
|
|
17
|
-
return u;
|
|
18
|
-
}
|
|
19
|
-
} else
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
function N(r) {
|
|
23
|
-
return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(s(r));
|
|
24
|
-
}
|
|
25
|
-
function Ie(r) {
|
|
26
|
-
return typeof r == "string" || r instanceof String;
|
|
1
|
+
import { defineComponent as L, unref as r, openBlock as P, createBlock as H, mergeProps as F, createCommentVNode as x, createElementBlock as R, normalizeClass as ee, toDisplayString as M, createElementVNode as z, renderSlot as T, normalizeProps as C, guardReactiveProps as A, withDirectives as te, isRef as oe, vModelText as ne, createTextVNode as re, createVNode as ae } from "vue";
|
|
2
|
+
import { nanoid as se } from "nanoid";
|
|
3
|
+
import { iconExists as $, Icon as ie, addIcon as le } from "@iconify/vue";
|
|
4
|
+
function N(l) {
|
|
5
|
+
return Array.isArray(l) ? l.filter((a) => isString(a)).join(" ") : l;
|
|
27
6
|
}
|
|
28
|
-
function
|
|
29
|
-
var t, e;
|
|
30
|
-
if (r)
|
|
31
|
-
return (e = (t = r.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 A(r) {
|
|
36
|
-
return Array.isArray(r) ? r.filter((t) => Ie(t)).join(" ") : r;
|
|
37
|
-
}
|
|
38
|
-
function Pe(r, t) {
|
|
7
|
+
function ue(l, a) {
|
|
39
8
|
const {
|
|
40
9
|
invalid: e,
|
|
41
|
-
valid: u,
|
|
42
|
-
hint: l,
|
|
43
|
-
loading: d
|
|
44
|
-
} = t, {
|
|
45
|
-
hintLabel: a,
|
|
46
|
-
modelValue: h,
|
|
47
10
|
valid: m,
|
|
48
|
-
|
|
49
|
-
|
|
11
|
+
hint: i,
|
|
12
|
+
loading: f
|
|
13
|
+
} = a, {
|
|
14
|
+
hintLabel: n,
|
|
15
|
+
modelValue: y,
|
|
16
|
+
valid: p,
|
|
17
|
+
validLabel: c,
|
|
18
|
+
invalid: t,
|
|
50
19
|
invalidLabel: o,
|
|
51
|
-
...
|
|
52
|
-
} =
|
|
53
|
-
() => !!(
|
|
54
|
-
),
|
|
55
|
-
() => !!(
|
|
56
|
-
),
|
|
57
|
-
() => !!(
|
|
58
|
-
),
|
|
59
|
-
() =>
|
|
20
|
+
...d
|
|
21
|
+
} = toRefs(l), s = resolveFieldData(d, "loading"), u = resolveFieldData(d, "loadingLabel"), g = computed(() => t.value ? !!(t.value && e || o != null && o.value && Array.isArray(o.value) && o.value.length > 0 || o != null && o.value && !isEmpty(o)) : !1), v = computed(
|
|
22
|
+
() => !!(n && n.value || i)
|
|
23
|
+
), S = computed(
|
|
24
|
+
() => !!(c && c.value || m)
|
|
25
|
+
), w = computed(
|
|
26
|
+
() => !!(s != null && s.value && f || s != null && s.value && (u != null && u.value))
|
|
27
|
+
), I = computed(
|
|
28
|
+
() => v.value || S.value || g.value || w.value
|
|
60
29
|
);
|
|
61
30
|
return {
|
|
62
|
-
hasInvalid:
|
|
63
|
-
hasHint:
|
|
64
|
-
hasValid:
|
|
65
|
-
hasLoading:
|
|
31
|
+
hasInvalid: g,
|
|
32
|
+
hasHint: v,
|
|
33
|
+
hasValid: S,
|
|
34
|
+
hasLoading: w,
|
|
66
35
|
HintSlot: {
|
|
67
36
|
name: "HintSlot",
|
|
68
37
|
props: {
|
|
@@ -71,31 +40,31 @@ function Pe(r, t) {
|
|
|
71
40
|
default: () => ({})
|
|
72
41
|
}
|
|
73
42
|
},
|
|
74
|
-
setup(
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
hintLabel:
|
|
78
|
-
modelValue:
|
|
79
|
-
valid:
|
|
80
|
-
validLabel:
|
|
81
|
-
invalid:
|
|
43
|
+
setup(B) {
|
|
44
|
+
const E = computed(() => {
|
|
45
|
+
const b = toReactive({
|
|
46
|
+
hintLabel: n,
|
|
47
|
+
modelValue: y,
|
|
48
|
+
valid: p,
|
|
49
|
+
validLabel: c,
|
|
50
|
+
invalid: t,
|
|
82
51
|
invalidLabel: o,
|
|
83
|
-
loading:
|
|
84
|
-
loadingLabel:
|
|
85
|
-
...
|
|
52
|
+
loading: s,
|
|
53
|
+
loadingLabel: u,
|
|
54
|
+
...B.params
|
|
86
55
|
});
|
|
87
|
-
return
|
|
56
|
+
return t != null && t.value ? (e == null ? void 0 : e(b)) || N(o == null ? void 0 : o.value) || (n == null ? void 0 : n.value) : p != null && p.value ? (m == null ? void 0 : m(b)) || N(c == null ? void 0 : c.value) || (n == null ? void 0 : n.value) : s != null && s.value ? (f == null ? void 0 : f(b)) || N(u == null ? void 0 : u.value) || (n == null ? void 0 : n.value) : (i == null ? void 0 : i(b)) || N(n == null ? void 0 : n.value) || (n == null ? void 0 : n.value);
|
|
88
57
|
});
|
|
89
58
|
return {
|
|
90
|
-
isVisible:
|
|
91
|
-
hasInvalid:
|
|
92
|
-
hasValid:
|
|
93
|
-
hintContent:
|
|
59
|
+
isVisible: I,
|
|
60
|
+
hasInvalid: g,
|
|
61
|
+
hasValid: S,
|
|
62
|
+
hintContent: E
|
|
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 Pe(r, t) {
|
|
|
106
75
|
}
|
|
107
76
|
};
|
|
108
77
|
}
|
|
109
|
-
|
|
110
|
-
const u = i(
|
|
111
|
-
() => !!(r != null && r.value && t.value === "left" || e != null && e.iconLeft)
|
|
112
|
-
), l = i(
|
|
113
|
-
() => !!(r != null && r.value && t.value === "right" || e != null && e.iconRight)
|
|
114
|
-
), d = i(
|
|
115
|
-
() => !!(r != null && r.value && t.value === "top" || e != null && e.iconTop)
|
|
116
|
-
), a = i(
|
|
117
|
-
() => !!(r != null && r.value && t.value === "bottom" || e != null && e.iconBottom)
|
|
118
|
-
);
|
|
119
|
-
return {
|
|
120
|
-
hasIcon: i(() => typeof (r == null ? void 0 : r.value) == "string" ? { name: r == null ? void 0 : r.value } : r == null ? void 0 : r.value),
|
|
121
|
-
hasIconLeft: u,
|
|
122
|
-
hasIconRight: l,
|
|
123
|
-
hasIconTop: d,
|
|
124
|
-
hasIconBottom: a
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function $e(r, t) {
|
|
128
|
-
const { focused: e } = ye(r);
|
|
129
|
-
return J(e, (u) => {
|
|
130
|
-
t(u ? "focus" : "blur", s(r));
|
|
131
|
-
}), {
|
|
132
|
-
focused: e
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function xe(r, t, e = 0) {
|
|
136
|
-
let u;
|
|
137
|
-
return typeof e == "string" && (e = parseInt(e)), i({
|
|
138
|
-
get: () => r == null ? void 0 : r.value,
|
|
139
|
-
set: (l) => {
|
|
140
|
-
u && clearTimeout(u), u = setTimeout(() => {
|
|
141
|
-
t("update:modelValue", l);
|
|
142
|
-
}, e);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
function Ve(r, t) {
|
|
147
|
-
const e = i(() => (s(r) ?? "").length), u = i(() => (t == null ? void 0 : t.lowerLimit) !== void 0 && e.value < (t == null ? void 0 : t.lowerLimit) ? e.value - t.lowerLimit : (t == null ? void 0 : t.upperLimit) !== void 0 && e.value < (t == null ? void 0 : t.upperLimit) ? t.upperLimit - e.value : 0), l = i(() => (t == null ? void 0 : t.mode) === !1 ? "" : (t == null ? void 0 : t.mode) === "limit" && (t != null && t.upperLimit) ? `${e.value} / ${t.lowerLimit ? `${t.lowerLimit}-` : ""}${t.upperLimit}` : (t == null ? void 0 : t.mode) === "countdown" ? u.value === 0 ? void 0 : u : e.value);
|
|
148
|
-
return {
|
|
149
|
-
length: e,
|
|
150
|
-
gap: u,
|
|
151
|
-
formatted: l
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
function X(r, t) {
|
|
155
|
-
const e = { [`${r}`]: !0 };
|
|
156
|
-
return {
|
|
157
|
-
bemCssClasses: i(() => Object.keys(t).reduce((l, d) => {
|
|
158
|
-
const a = s(t[d]) || !1;
|
|
159
|
-
if (!a)
|
|
160
|
-
return l;
|
|
161
|
-
if (d === "modifiers") {
|
|
162
|
-
const h = Array.isArray(a) ? a : a.split(" ");
|
|
163
|
-
return {
|
|
164
|
-
...l,
|
|
165
|
-
...h.reduce(
|
|
166
|
-
(m, f) => ({
|
|
167
|
-
...m,
|
|
168
|
-
[`${r}--${Z(f)}`]: !0
|
|
169
|
-
}),
|
|
170
|
-
{}
|
|
171
|
-
)
|
|
172
|
-
};
|
|
173
|
-
} else
|
|
174
|
-
return {
|
|
175
|
-
...l,
|
|
176
|
-
[`${r}--${Z(d)}`]: a
|
|
177
|
-
};
|
|
178
|
-
}, e) || {})
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
const _e = "ds", Be = {
|
|
78
|
+
const ce = "ds", de = {
|
|
182
79
|
color: String,
|
|
183
80
|
width: {
|
|
184
81
|
type: [String, Number]
|
|
@@ -209,197 +106,197 @@ const _e = "ds", Be = {
|
|
|
209
106
|
modifiers: {
|
|
210
107
|
type: [String, Array]
|
|
211
108
|
}
|
|
212
|
-
},
|
|
109
|
+
}, pe = {
|
|
213
110
|
name: "VvIcon"
|
|
214
|
-
},
|
|
215
|
-
...
|
|
216
|
-
props:
|
|
217
|
-
setup(
|
|
218
|
-
const
|
|
219
|
-
modifiers:
|
|
220
|
-
}),
|
|
221
|
-
const
|
|
222
|
-
return
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
return
|
|
226
|
-
})) ||
|
|
111
|
+
}, q = /* @__PURE__ */ L({
|
|
112
|
+
...pe,
|
|
113
|
+
props: de,
|
|
114
|
+
setup(l) {
|
|
115
|
+
const a = l, e = ref(!0), { modifiers: m } = toRefs(a), i = inject(ce), { bemCssClasses: f } = useBemModifiers("vv-icon", {
|
|
116
|
+
modifiers: m
|
|
117
|
+
}), n = computed(() => a.provider || (i == null ? void 0 : i.provider)), y = computed(() => {
|
|
118
|
+
const t = a.name ?? "", o = `@${n.value}:${a.prefix}:${a.name}`;
|
|
119
|
+
return $(t) ? t : $(o) ? o : (i == null ? void 0 : i.iconsCollections.find((d) => {
|
|
120
|
+
const s = `@${n.value}:${d.prefix}:${t}`;
|
|
121
|
+
if ($(s))
|
|
122
|
+
return s;
|
|
123
|
+
})) || t;
|
|
227
124
|
});
|
|
228
|
-
function
|
|
125
|
+
function p(t) {
|
|
229
126
|
let o = null;
|
|
230
127
|
if (typeof window > "u") {
|
|
231
|
-
const { JSDOM:
|
|
232
|
-
o = new
|
|
128
|
+
const { JSDOM: g } = require("jsdom");
|
|
129
|
+
o = new g().window;
|
|
233
130
|
}
|
|
234
|
-
return (o ? new o.DOMParser() : new window.DOMParser()).parseFromString(
|
|
131
|
+
return (o ? new o.DOMParser() : new window.DOMParser()).parseFromString(t, "text/html").querySelector("svg");
|
|
235
132
|
}
|
|
236
|
-
function
|
|
237
|
-
const o =
|
|
238
|
-
o &&
|
|
239
|
-
body:
|
|
133
|
+
function c(t) {
|
|
134
|
+
const o = p(t), d = (o == null ? void 0 : o.innerHTML.trim()) || "";
|
|
135
|
+
o && d && le(`@${n.value}:${a.prefix}:${a.name}`, {
|
|
136
|
+
body: d,
|
|
240
137
|
height: o.viewBox.baseVal.height,
|
|
241
138
|
width: o.viewBox.baseVal.width
|
|
242
139
|
});
|
|
243
140
|
}
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
}).catch((
|
|
247
|
-
throw new Error(`During fetch icon: ${
|
|
248
|
-
})) :
|
|
141
|
+
return i && (a.src && !$(`@${n.value}:${a.prefix}:${a.name}`) ? (e.value = !1, i.fetchIcon(a.src).then((t) => {
|
|
142
|
+
t && (c(t), e.value = !0);
|
|
143
|
+
}).catch((t) => {
|
|
144
|
+
throw new Error(`During fetch icon: ${t == null ? void 0 : t.message}`);
|
|
145
|
+
})) : a.svg && c(a.svg)), (t, o) => r(e) ? (P(), H(r(ie), F({
|
|
249
146
|
key: 0,
|
|
250
|
-
class:
|
|
147
|
+
class: r(f)
|
|
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: t.inline,
|
|
150
|
+
width: t.width,
|
|
151
|
+
height: t.height,
|
|
152
|
+
horizontalFlip: t.horizontalFlip,
|
|
153
|
+
verticalFlip: t.verticalFlip,
|
|
154
|
+
flip: t.flip,
|
|
155
|
+
rotate: t.rotate,
|
|
156
|
+
color: t.color,
|
|
157
|
+
onLoad: t.onLoad,
|
|
158
|
+
icon: r(y)
|
|
159
|
+
}), null, 16, ["class"])) : x("", !0);
|
|
263
160
|
}
|
|
264
|
-
}),
|
|
161
|
+
}), me = {
|
|
265
162
|
valid: Boolean,
|
|
266
163
|
validLabel: [String, Array]
|
|
267
|
-
},
|
|
164
|
+
}, fe = {
|
|
268
165
|
invalid: Boolean,
|
|
269
166
|
invalidLabel: [String, Array]
|
|
270
|
-
},
|
|
167
|
+
}, ve = {
|
|
271
168
|
loading: Boolean,
|
|
272
169
|
loadingLabel: String
|
|
273
|
-
},
|
|
170
|
+
}, ge = {
|
|
274
171
|
disabled: Boolean
|
|
275
|
-
},
|
|
172
|
+
}, he = {
|
|
276
173
|
readonly: Boolean
|
|
277
|
-
},
|
|
174
|
+
}, ye = {
|
|
278
175
|
modifiers: [String, Array]
|
|
279
|
-
},
|
|
176
|
+
}, Se = {
|
|
280
177
|
hintLabel: { type: String, default: "" }
|
|
281
|
-
},
|
|
178
|
+
}, be = {
|
|
282
179
|
count: {
|
|
283
180
|
type: [Boolean, String],
|
|
284
181
|
default: !1,
|
|
285
|
-
validator: (
|
|
182
|
+
validator: (l) => [!0, !1, "limit", "countdown"].includes(l)
|
|
286
183
|
}
|
|
287
|
-
},
|
|
184
|
+
}, Pe = {
|
|
288
185
|
debounce: [Number, String]
|
|
289
|
-
},
|
|
186
|
+
}, j = {
|
|
290
187
|
LEFT: "left",
|
|
291
188
|
RIGHT: "right"
|
|
292
|
-
},
|
|
189
|
+
}, we = {
|
|
293
190
|
icon: { type: [String, Object] },
|
|
294
191
|
iconPosition: {
|
|
295
192
|
type: String,
|
|
296
|
-
validation: (
|
|
297
|
-
default:
|
|
193
|
+
validation: (l) => Object.values(j).includes(l),
|
|
194
|
+
default: j.RIGHT
|
|
298
195
|
}
|
|
299
|
-
},
|
|
196
|
+
}, Ve = {
|
|
300
197
|
tabindex: { type: [String, Number], default: 0 }
|
|
301
|
-
},
|
|
198
|
+
}, xe = {
|
|
302
199
|
floating: Boolean
|
|
303
|
-
},
|
|
200
|
+
}, Ie = {
|
|
304
201
|
id: [String, Number],
|
|
305
202
|
name: { type: String, required: !0 }
|
|
306
|
-
},
|
|
203
|
+
}, Be = {
|
|
307
204
|
autofocus: Boolean
|
|
308
|
-
},
|
|
205
|
+
}, _e = {
|
|
309
206
|
autocomplete: { type: String, default: "off" }
|
|
310
|
-
},
|
|
311
|
-
...
|
|
312
|
-
...
|
|
313
|
-
...
|
|
314
|
-
...
|
|
315
|
-
...
|
|
316
|
-
...
|
|
317
|
-
...
|
|
318
|
-
...
|
|
319
|
-
...
|
|
320
|
-
...
|
|
321
|
-
...
|
|
322
|
-
...
|
|
323
|
-
...
|
|
324
|
-
...
|
|
325
|
-
...
|
|
207
|
+
}, Ce = {
|
|
208
|
+
...Ie,
|
|
209
|
+
...Be,
|
|
210
|
+
..._e,
|
|
211
|
+
...Ve,
|
|
212
|
+
...ge,
|
|
213
|
+
...he,
|
|
214
|
+
...me,
|
|
215
|
+
...fe,
|
|
216
|
+
...Se,
|
|
217
|
+
...ve,
|
|
218
|
+
...ye,
|
|
219
|
+
...be,
|
|
220
|
+
...Pe,
|
|
221
|
+
...we,
|
|
222
|
+
...xe,
|
|
326
223
|
minlength: Number,
|
|
327
224
|
maxlength: Number,
|
|
328
225
|
placeholder: String,
|
|
329
226
|
required: Boolean,
|
|
330
227
|
label: String
|
|
331
|
-
},
|
|
228
|
+
}, $e = {
|
|
332
229
|
hard: "hard",
|
|
333
230
|
soft: "soft"
|
|
334
|
-
},
|
|
231
|
+
}, Ne = {
|
|
335
232
|
true: !0,
|
|
336
233
|
false: !1,
|
|
337
234
|
default: "default"
|
|
338
|
-
},
|
|
339
|
-
...
|
|
235
|
+
}, Fe = ["update:modelValue", "focus", "blur", "keyup"], Ee = {
|
|
236
|
+
...Ce,
|
|
340
237
|
modelValue: String,
|
|
341
238
|
cols: { type: [String, Number], default: 20 },
|
|
342
239
|
rows: { type: [String, Number], default: 2 },
|
|
343
|
-
wrap: { type: String, default:
|
|
344
|
-
spellcheck: { type: [Boolean, String], default:
|
|
240
|
+
wrap: { type: String, default: $e.soft },
|
|
241
|
+
spellcheck: { type: [Boolean, String], default: Ne.default },
|
|
345
242
|
resizable: Boolean
|
|
346
|
-
},
|
|
243
|
+
}, ke = ["for"], De = { class: "vv-textarea__wrapper" }, Re = ["id"], Te = {
|
|
347
244
|
key: 0,
|
|
348
245
|
class: "vv-textarea__limit"
|
|
349
|
-
},
|
|
246
|
+
}, Ae = {
|
|
350
247
|
name: "VvTextarea"
|
|
351
|
-
},
|
|
352
|
-
...
|
|
353
|
-
props:
|
|
354
|
-
emits:
|
|
355
|
-
setup(
|
|
356
|
-
const e =
|
|
357
|
-
icon:
|
|
358
|
-
iconPosition:
|
|
359
|
-
label:
|
|
360
|
-
modelValue:
|
|
361
|
-
count:
|
|
362
|
-
valid:
|
|
248
|
+
}, ze = /* @__PURE__ */ L({
|
|
249
|
+
...Ae,
|
|
250
|
+
props: Ee,
|
|
251
|
+
emits: Fe,
|
|
252
|
+
setup(l, { emit: a }) {
|
|
253
|
+
const e = l, m = useSlots(), i = ref(), {
|
|
254
|
+
icon: f,
|
|
255
|
+
iconPosition: n,
|
|
256
|
+
label: y,
|
|
257
|
+
modelValue: p,
|
|
258
|
+
count: c,
|
|
259
|
+
valid: t,
|
|
363
260
|
invalid: o,
|
|
364
|
-
loading:
|
|
365
|
-
} =
|
|
366
|
-
() => e.floating &&
|
|
367
|
-
),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
), { focused:
|
|
371
|
-
|
|
372
|
-
|
|
261
|
+
loading: d
|
|
262
|
+
} = toRefs(e), s = computed(() => String(e.id || se())), u = computed(() => `${s.value}-hint`), g = computed(
|
|
263
|
+
() => e.floating && isEmpty(e.placeholder) ? " " : e.placeholder
|
|
264
|
+
), v = useDebouncedInput(p, a, e.debounce), { hasIcon: S, hasIconLeft: w, hasIconRight: I } = useComponentIcon(
|
|
265
|
+
f,
|
|
266
|
+
n
|
|
267
|
+
), { focused: B } = useComponentFocus(i, a), E = useElementVisibility(i);
|
|
268
|
+
watch(E, (V) => {
|
|
269
|
+
V && e.autofocus && (B.value = !0);
|
|
373
270
|
});
|
|
374
|
-
const { formatted:
|
|
271
|
+
const { formatted: b } = useTextCount(v, {
|
|
375
272
|
mode: e.count,
|
|
376
273
|
upperLimit: e.maxlength,
|
|
377
274
|
lowerLimit: e.minlength
|
|
378
|
-
}),
|
|
379
|
-
() =>
|
|
380
|
-
),
|
|
275
|
+
}), G = computed(() => !e.disabled && !e.readonly), K = computed(
|
|
276
|
+
() => G.value ? e.tabindex : -1
|
|
277
|
+
), J = computed(() => !isEmpty(p)), U = computed(() => {
|
|
381
278
|
if (e.invalid === !0)
|
|
382
279
|
return !0;
|
|
383
280
|
if (e.valid === !0)
|
|
384
281
|
return !1;
|
|
385
|
-
}), { HintSlot:
|
|
282
|
+
}), { HintSlot: W, hasHint: X, hasInvalid: O } = ue(e, m), { bemCssClasses: Q } = useBemModifiers("vv-textarea", {
|
|
386
283
|
modifiers: e.modifiers,
|
|
387
|
-
valid:
|
|
284
|
+
valid: t,
|
|
388
285
|
invalid: o,
|
|
389
|
-
loading:
|
|
286
|
+
loading: d,
|
|
390
287
|
disabled: e.disabled,
|
|
391
288
|
readonly: e.readonly,
|
|
392
|
-
iconLeft:
|
|
393
|
-
iconRight:
|
|
394
|
-
floating: e.floating && !
|
|
395
|
-
dirty:
|
|
396
|
-
focused:
|
|
289
|
+
iconLeft: w,
|
|
290
|
+
iconRight: I,
|
|
291
|
+
floating: e.floating && !isEmpty(e.label),
|
|
292
|
+
dirty: J,
|
|
293
|
+
focused: B,
|
|
397
294
|
resizable: e.resizable
|
|
398
|
-
}),
|
|
295
|
+
}), Y = computed(
|
|
399
296
|
() => ({
|
|
400
297
|
name: e.name,
|
|
401
|
-
placeholder:
|
|
402
|
-
tabindex:
|
|
298
|
+
placeholder: g.value,
|
|
299
|
+
tabindex: K.value,
|
|
403
300
|
disabled: e.disabled,
|
|
404
301
|
readonly: e.readonly,
|
|
405
302
|
required: e.required,
|
|
@@ -410,62 +307,62 @@ const _e = "ds", Be = {
|
|
|
410
307
|
rows: e.rows,
|
|
411
308
|
wrap: e.wrap,
|
|
412
309
|
spellcheck: e.spellcheck,
|
|
413
|
-
"aria-invalid":
|
|
414
|
-
"aria-describedby": !
|
|
415
|
-
"aria-errormessage":
|
|
310
|
+
"aria-invalid": U.value,
|
|
311
|
+
"aria-describedby": !O.value && X.value ? u.value : void 0,
|
|
312
|
+
"aria-errormessage": O.value ? u.value : void 0
|
|
416
313
|
})
|
|
417
|
-
),
|
|
314
|
+
), k = computed(() => ({
|
|
418
315
|
valid: e.valid,
|
|
419
316
|
invalid: e.invalid,
|
|
420
317
|
modelValue: e.modelValue,
|
|
421
318
|
hintLabel: e.hintLabel,
|
|
422
319
|
maxlength: e.maxlength,
|
|
423
320
|
minlength: e.minlength,
|
|
424
|
-
clear:
|
|
425
|
-
})),
|
|
426
|
-
|
|
321
|
+
clear: Z
|
|
322
|
+
})), Z = () => {
|
|
323
|
+
v.value = void 0;
|
|
427
324
|
};
|
|
428
|
-
return (
|
|
429
|
-
class:
|
|
325
|
+
return (V, _) => (P(), R("div", {
|
|
326
|
+
class: ee(r(Q))
|
|
430
327
|
}, [
|
|
431
|
-
|
|
328
|
+
r(y) ? (P(), R("label", {
|
|
432
329
|
key: 0,
|
|
433
|
-
for: s
|
|
330
|
+
for: r(s),
|
|
434
331
|
class: "vv-textarea__label"
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
332
|
+
}, M(r(y)), 9, ke)) : x("", !0),
|
|
333
|
+
z("div", De, [
|
|
334
|
+
T(V.$slots, "before", C(A(r(k))), () => [
|
|
335
|
+
r(w) ? (P(), H(q, F({
|
|
439
336
|
key: 0,
|
|
440
337
|
class: "vv-textarea__icon-left"
|
|
441
|
-
},
|
|
338
|
+
}, r(S)), null, 16)) : x("", !0)
|
|
442
339
|
]),
|
|
443
|
-
|
|
444
|
-
id: s
|
|
340
|
+
te(z("textarea", F({
|
|
341
|
+
id: r(s),
|
|
445
342
|
ref_key: "textarea",
|
|
446
|
-
ref:
|
|
447
|
-
"onUpdate:modelValue":
|
|
448
|
-
},
|
|
449
|
-
onKeyup:
|
|
450
|
-
}), null, 16,
|
|
451
|
-
[
|
|
343
|
+
ref: i,
|
|
344
|
+
"onUpdate:modelValue": _[0] || (_[0] = (D) => oe(v) ? v.value = D : null)
|
|
345
|
+
}, r(Y), {
|
|
346
|
+
onKeyup: _[1] || (_[1] = (D) => a("keyup", D))
|
|
347
|
+
}), null, 16, Re), [
|
|
348
|
+
[ne, r(v)]
|
|
452
349
|
]),
|
|
453
|
-
|
|
454
|
-
|
|
350
|
+
T(V.$slots, "after", C(A(r(k))), () => [
|
|
351
|
+
r(I) ? (P(), H(q, C(F({ key: 0 }, r(S))), null, 16)) : x("", !0)
|
|
455
352
|
]),
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
353
|
+
r(c) ? (P(), R("span", Te, [
|
|
354
|
+
T(V.$slots, "count", C(A(r(k))), () => [
|
|
355
|
+
re(M(r(b)), 1)
|
|
459
356
|
])
|
|
460
|
-
])) :
|
|
357
|
+
])) : x("", !0)
|
|
461
358
|
]),
|
|
462
|
-
|
|
463
|
-
id:
|
|
359
|
+
ae(r(W), {
|
|
360
|
+
id: r(u),
|
|
464
361
|
class: "vv-textarea__hint"
|
|
465
362
|
}, null, 8, ["id"])
|
|
466
363
|
], 2));
|
|
467
364
|
}
|
|
468
365
|
});
|
|
469
366
|
export {
|
|
470
|
-
|
|
367
|
+
ze as default
|
|
471
368
|
};
|