@volverjs/ui-vue 0.0.1-beta.5 → 0.0.1-beta.8
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/README.md +61 -2
- package/dist/components/VvButton/vv-button.es.js +56 -58
- package/dist/components/VvButton/vv-button.umd.js +1 -1
- package/dist/components/VvCheckGroup/vv-check-group.es.js +221 -203
- package/dist/components/VvCheckGroup/vv-check-group.umd.js +2 -2
- package/dist/components/VvInputText/VvInputText.d.ts +14 -0
- package/dist/components/VvInputText/VvInputText.vue.d.ts +36 -1
- package/dist/components/VvInputText/VvInputTextActions.d.ts +3 -0
- package/dist/components/VvInputText/vv-input-text.es.js +509 -380
- package/dist/components/VvInputText/vv-input-text.umd.js +2 -2
- package/dist/components/VvNativeSelect/vv-native-select.es.js +180 -161
- package/dist/components/VvNativeSelect/vv-native-select.umd.js +2 -2
- package/dist/components/VvRadioGroup/vv-radio-group.es.js +211 -193
- package/dist/components/VvRadioGroup/vv-radio-group.umd.js +2 -2
- package/dist/components/VvSelect/vv-select.es.js +189 -171
- package/dist/components/VvSelect/vv-select.umd.js +2 -2
- package/dist/components/VvTextarea/VvTextarea.d.ts +43 -22
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +140 -85
- package/dist/components/VvTextarea/vv-textarea.es.js +364 -288
- package/dist/components/VvTextarea/vv-textarea.umd.js +2 -2
- package/dist/composables/debouncedInput/useDebouncedInput.d.ts +2 -0
- package/dist/composables/icons/useComponentIcons.d.ts +6 -0
- package/dist/composables/textLimit/useTextLimit.d.ts +14 -0
- package/dist/composables/useModifiers.d.ts +3 -2
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +42 -0
- package/dist/stories/utils.d.ts +5 -0
- package/dist/ui-vue.es.js +417 -401
- package/dist/ui-vue.umd.js +2 -2
- package/package.json +3 -1
- 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/VvButton/VvButton.vue +1 -2
- package/src/components/VvInputText/VvInputText.ts +19 -2
- package/src/components/VvInputText/VvInputText.vue +123 -149
- package/src/components/VvInputText/VvInputTextActions.ts +151 -0
- package/src/components/VvTextarea/VvTextarea.ts +25 -16
- package/src/components/VvTextarea/VvTextarea.vue +89 -93
- package/src/components/common/HintSlot.ts +31 -13
- package/src/composables/debouncedInput/useDebouncedInput.ts +19 -0
- package/src/composables/icons/useComponentIcons.ts +35 -0
- package/src/composables/textLimit/useTextLimit.ts +44 -0
- package/src/composables/useModifiers.ts +47 -1
- package/src/props/index.ts +39 -0
- package/src/stories/InputText/InputTextMaxLength.stories.mdx +21 -0
- package/src/stories/Textarea/Textarea.stories.mdx +33 -51
- package/src/stories/Textarea/TextareaAutoclear.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaAutocomplete.stories.mdx +10 -2
- package/src/stories/Textarea/TextareaAutofocus.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaDebounce.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaDisabled.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaError.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaErrorLabel.stories.mdx +37 -0
- package/src/stories/Textarea/TextareaFloating.stories.mdx +7 -2
- package/src/stories/Textarea/TextareaHintLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIcon.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaIconPosition.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaId.stories.mdx +19 -0
- package/src/stories/Textarea/TextareaLabel.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaLimit.stories.mdx +50 -0
- package/src/stories/Textarea/TextareaLoading.stories.mdx +6 -3
- package/src/stories/Textarea/TextareaLoadingLabel.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaMaxLength.stories.mdx +6 -2
- package/src/stories/Textarea/TextareaMinLength.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaModifiers.stories.mdx +24 -0
- package/src/stories/Textarea/TextareaName.stories.mdx +23 -0
- package/src/stories/Textarea/TextareaPlaceholder.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaReadonly.stories.mdx +5 -1
- package/src/stories/Textarea/TextareaRequired.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaResizable.stories.mdx +22 -0
- package/src/stories/Textarea/TextareaRowsCols.stories.mdx +9 -1
- package/src/stories/Textarea/TextareaValid.stories.mdx +7 -4
- package/src/stories/Textarea/TextareaValidLabel.stories.mdx +35 -0
- package/src/stories/stories.scss +11 -0
- package/src/stories/utils.ts +12 -0
- package/src/stories/volver-ui-vue.stories.mdx +7 -1
- package/dist/components/VvInputText/useInputNumber.d.ts +0 -16
- package/dist/components/VvInputText/useInputPassword.d.ts +0 -16
- package/src/components/VvInputText/useInputNumber.ts +0 -40
- package/src/components/VvInputText/useInputPassword.ts +0 -38
|
@@ -1,137 +1,145 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { iconExists as
|
|
3
|
-
import { useFocus as
|
|
4
|
-
const
|
|
5
|
-
equals(
|
|
6
|
-
return
|
|
1
|
+
import { computed as d, unref as i, defineComponent as L, ref as C, toRefs as U, inject as ve, openBlock as O, createBlock as k, mergeProps as $, createCommentVNode as x, h as P, watch as re, useSlots as ge, useAttrs as ye, onMounted as he, createElementBlock as N, toDisplayString as J, createElementVNode as K, renderSlot as M, normalizeProps as Q, createVNode as V, withDirectives as Se, isRef as Ae, vModelDynamic as be, guardReactiveProps as Ee, createTextVNode as Ie } from "vue";
|
|
2
|
+
import { iconExists as j, Icon as Oe, addIcon as Pe } from "@iconify/vue";
|
|
3
|
+
import { toReactive as Te, useFocus as _e, refDebounced as xe, isString as ee } from "@vueuse/core";
|
|
4
|
+
const A = {
|
|
5
|
+
equals(t, n, e) {
|
|
6
|
+
return e ? this.resolveFieldData(t, e) === this.resolveFieldData(n, e) : this.deepEquals(t, n);
|
|
7
7
|
},
|
|
8
|
-
deepEquals(
|
|
9
|
-
if (
|
|
8
|
+
deepEquals(t, n) {
|
|
9
|
+
if (t === n)
|
|
10
10
|
return !0;
|
|
11
|
-
if (
|
|
12
|
-
const
|
|
13
|
-
let r,
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
11
|
+
if (t && n && typeof t == "object" && typeof n == "object") {
|
|
12
|
+
const e = Array.isArray(t), o = Array.isArray(n);
|
|
13
|
+
let r, s, a;
|
|
14
|
+
if (e && o) {
|
|
15
|
+
if (s = t.length, s != n.length)
|
|
16
16
|
return !1;
|
|
17
|
-
for (r =
|
|
18
|
-
if (!this.deepEquals(
|
|
17
|
+
for (r = s; r-- !== 0; )
|
|
18
|
+
if (!this.deepEquals(t[r], n[r]))
|
|
19
19
|
return !1;
|
|
20
20
|
return !0;
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (e != o)
|
|
23
23
|
return !1;
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
24
|
+
const p = t instanceof Date, u = n instanceof Date;
|
|
25
|
+
if (p != u)
|
|
26
26
|
return !1;
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
27
|
+
if (p && u)
|
|
28
|
+
return t.getTime() == n.getTime();
|
|
29
|
+
const S = t instanceof RegExp, l = n instanceof RegExp;
|
|
30
|
+
if (S != l)
|
|
31
31
|
return !1;
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
const c = Object.keys(
|
|
35
|
-
if (
|
|
32
|
+
if (S && l)
|
|
33
|
+
return t.toString() == n.toString();
|
|
34
|
+
const c = Object.keys(t);
|
|
35
|
+
if (s = c.length, s !== Object.keys(n).length)
|
|
36
36
|
return !1;
|
|
37
|
-
for (r =
|
|
38
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
37
|
+
for (r = s; r-- !== 0; )
|
|
38
|
+
if (!Object.prototype.hasOwnProperty.call(n, c[r]))
|
|
39
39
|
return !1;
|
|
40
|
-
for (r =
|
|
41
|
-
if (
|
|
40
|
+
for (r = s; r-- !== 0; )
|
|
41
|
+
if (a = c[r], !this.deepEquals(t[a], n[a]))
|
|
42
42
|
return !1;
|
|
43
43
|
return !0;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return t !== t && n !== n;
|
|
46
46
|
},
|
|
47
|
-
resolveFieldData(
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
47
|
+
resolveFieldData(t, n) {
|
|
48
|
+
if (t && Object.keys(t).length && n) {
|
|
49
|
+
if (n.indexOf(".") === -1)
|
|
50
|
+
return t[n];
|
|
51
51
|
{
|
|
52
|
-
const
|
|
53
|
-
let o =
|
|
54
|
-
for (let r = 0,
|
|
55
|
-
if (
|
|
52
|
+
const e = n.split(".");
|
|
53
|
+
let o = t;
|
|
54
|
+
for (let r = 0, s = e.length; r < s; ++r) {
|
|
55
|
+
if (t == null)
|
|
56
56
|
return null;
|
|
57
|
-
o = o[
|
|
57
|
+
o = o[e[r]];
|
|
58
58
|
}
|
|
59
59
|
return o;
|
|
60
60
|
}
|
|
61
61
|
} else
|
|
62
62
|
return null;
|
|
63
63
|
},
|
|
64
|
-
isFunction(
|
|
65
|
-
return !!(
|
|
64
|
+
isFunction(t) {
|
|
65
|
+
return !!(t && t.constructor && t.call && t.apply);
|
|
66
66
|
},
|
|
67
|
-
findIndexInList(
|
|
68
|
-
let
|
|
69
|
-
if (
|
|
70
|
-
for (let o = 0; o <
|
|
71
|
-
if (this.equals(
|
|
72
|
-
|
|
67
|
+
findIndexInList(t, n) {
|
|
68
|
+
let e = -1;
|
|
69
|
+
if (n) {
|
|
70
|
+
for (let o = 0; o < n.length; o++)
|
|
71
|
+
if (this.equals(n[o], t)) {
|
|
72
|
+
e = o;
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return e;
|
|
77
77
|
},
|
|
78
|
-
contains(
|
|
79
|
-
if (
|
|
80
|
-
for (const
|
|
81
|
-
if (this.equals(
|
|
78
|
+
contains(t, n) {
|
|
79
|
+
if (t != null && n && n.length) {
|
|
80
|
+
for (const e of n)
|
|
81
|
+
if (this.equals(t, e))
|
|
82
82
|
return !0;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
},
|
|
86
|
-
isEmpty(
|
|
87
|
-
return
|
|
86
|
+
isEmpty(t) {
|
|
87
|
+
return t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0;
|
|
88
88
|
},
|
|
89
|
-
isNotEmpty(
|
|
90
|
-
return !this.isEmpty(
|
|
89
|
+
isNotEmpty(t) {
|
|
90
|
+
return !this.isEmpty(t);
|
|
91
91
|
},
|
|
92
|
-
pickBy(
|
|
92
|
+
pickBy(t, n) {
|
|
93
93
|
return Object.fromEntries(
|
|
94
|
-
Object.entries(
|
|
94
|
+
Object.entries(t).filter(([e]) => n(e))
|
|
95
95
|
);
|
|
96
96
|
},
|
|
97
|
-
removeFromList(
|
|
98
|
-
const
|
|
99
|
-
return
|
|
97
|
+
removeFromList(t, n) {
|
|
98
|
+
const e = this.findIndexInList(t, n);
|
|
99
|
+
return e > -1 ? n.filter((o, r) => r !== e) : n;
|
|
100
100
|
},
|
|
101
|
-
isString(
|
|
102
|
-
return typeof
|
|
101
|
+
isString(t) {
|
|
102
|
+
return typeof t == "string" || t instanceof String;
|
|
103
103
|
},
|
|
104
|
-
propsToObject(
|
|
105
|
-
return Object.keys(
|
|
106
|
-
var o, r,
|
|
107
|
-
return this.isFunction(e
|
|
104
|
+
propsToObject(t) {
|
|
105
|
+
return Object.keys(t).reduce((n, e) => {
|
|
106
|
+
var o, r, s, a, p;
|
|
107
|
+
return this.isFunction(t[e]) ? n[e] = t[e]() : Array.isArray(t[e]) ? n[e] = t[e][0]() : (o = t[e]) != null && o.type && (Array.isArray(t[e].type) ? n[e] = ((r = t[e]) == null ? void 0 : r.default) || ((s = t[e]) == null ? void 0 : s.type[0]()) : n[e] = ((a = t[e]) == null ? void 0 : a.default) || ((p = t[e]) == null ? void 0 : p.type())), n;
|
|
108
108
|
}, {});
|
|
109
109
|
},
|
|
110
|
-
filterArray(
|
|
111
|
-
return
|
|
112
|
-
o[
|
|
113
|
-
r[
|
|
110
|
+
filterArray(t, n, e) {
|
|
111
|
+
return t.filter((o) => n.some((r) => typeof r == "string" ? o[e] == r : this.equals(
|
|
112
|
+
o[e],
|
|
113
|
+
r[e]
|
|
114
114
|
)));
|
|
115
115
|
},
|
|
116
|
-
kebabCase(
|
|
117
|
-
var
|
|
118
|
-
if (
|
|
119
|
-
return (
|
|
116
|
+
kebabCase(t) {
|
|
117
|
+
var n, e;
|
|
118
|
+
if (t)
|
|
119
|
+
return (e = (n = t.match(
|
|
120
120
|
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
121
|
-
)) == null ? void 0 :
|
|
121
|
+
)) == null ? void 0 : n.join("-")) == null ? void 0 : e.toLowerCase();
|
|
122
122
|
}
|
|
123
|
-
},
|
|
123
|
+
}, De = {
|
|
124
124
|
valid: Boolean,
|
|
125
125
|
validLabel: [String, Array]
|
|
126
|
-
},
|
|
126
|
+
}, Ce = {
|
|
127
127
|
error: Boolean,
|
|
128
128
|
errorLabel: [String, Array]
|
|
129
|
-
},
|
|
129
|
+
}, we = {
|
|
130
130
|
loading: Boolean,
|
|
131
131
|
loadingLabel: String
|
|
132
|
-
},
|
|
132
|
+
}, Re = {
|
|
133
|
+
modifiers: [String, Array]
|
|
134
|
+
}, Ne = {
|
|
133
135
|
hintLabel: { type: String, default: "" }
|
|
134
|
-
},
|
|
136
|
+
}, Be = {
|
|
137
|
+
limit: {
|
|
138
|
+
type: [Boolean, String],
|
|
139
|
+
default: !1,
|
|
140
|
+
validator: (t) => [!0, !1, "countdown"].includes(t)
|
|
141
|
+
}
|
|
142
|
+
}, w = {
|
|
135
143
|
TEXT: "text",
|
|
136
144
|
PASSWORD: "password",
|
|
137
145
|
DATE: "date",
|
|
@@ -144,30 +152,32 @@ const E = {
|
|
|
144
152
|
COLOR: "color",
|
|
145
153
|
SEARCH: "search",
|
|
146
154
|
FILE: "file"
|
|
147
|
-
},
|
|
155
|
+
}, H = {
|
|
148
156
|
LEFT: "left",
|
|
149
157
|
RIGHT: "right"
|
|
150
|
-
},
|
|
158
|
+
}, q = {
|
|
151
159
|
PASSWORD_ON: "eye-on",
|
|
152
160
|
PASSWORD_OFF: "eye-off",
|
|
153
161
|
DATE: "calendar",
|
|
154
162
|
TIME: "time",
|
|
155
163
|
COLOR: "color",
|
|
156
164
|
SEARCH: "search"
|
|
157
|
-
},
|
|
158
|
-
TYPES:
|
|
159
|
-
ICON_POSITIONS:
|
|
160
|
-
TYPES_ICON:
|
|
161
|
-
},
|
|
162
|
-
...
|
|
163
|
-
...
|
|
164
|
-
...
|
|
165
|
-
...
|
|
165
|
+
}, h = {
|
|
166
|
+
TYPES: w,
|
|
167
|
+
ICON_POSITIONS: H,
|
|
168
|
+
TYPES_ICON: q
|
|
169
|
+
}, ke = ["update:modelValue", "focus", "blur"], $e = {
|
|
170
|
+
...De,
|
|
171
|
+
...Ce,
|
|
172
|
+
...Ne,
|
|
173
|
+
...we,
|
|
174
|
+
...Re,
|
|
175
|
+
...Be,
|
|
166
176
|
modelValue: null,
|
|
167
177
|
type: {
|
|
168
178
|
type: String,
|
|
169
|
-
default:
|
|
170
|
-
validator: (
|
|
179
|
+
default: w.TEXT,
|
|
180
|
+
validator: (t) => Object.values(w).includes(t)
|
|
171
181
|
},
|
|
172
182
|
id: String,
|
|
173
183
|
name: { type: String, required: !0 },
|
|
@@ -185,12 +195,13 @@ const E = {
|
|
|
185
195
|
icon: { type: String, default: "" },
|
|
186
196
|
iconPosition: {
|
|
187
197
|
type: String,
|
|
188
|
-
validation: (
|
|
189
|
-
default:
|
|
198
|
+
validation: (t) => Object.values(H).includes(t),
|
|
199
|
+
default: H.RIGHT
|
|
190
200
|
},
|
|
191
201
|
floating: Boolean,
|
|
192
|
-
debounce: Number
|
|
193
|
-
|
|
202
|
+
debounce: Number,
|
|
203
|
+
autoclear: Boolean
|
|
204
|
+
}, Le = {
|
|
194
205
|
color: String,
|
|
195
206
|
width: {
|
|
196
207
|
type: [String, Number]
|
|
@@ -222,22 +233,22 @@ const E = {
|
|
|
222
233
|
type: [String, Array]
|
|
223
234
|
}
|
|
224
235
|
};
|
|
225
|
-
function
|
|
226
|
-
const
|
|
236
|
+
function Fe(t, n) {
|
|
237
|
+
const e = { [`${t}`]: !0 };
|
|
227
238
|
return {
|
|
228
|
-
bemCssClasses:
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
239
|
+
bemCssClasses: d(() => Object.keys(n).reduce((r, s) => {
|
|
240
|
+
const a = i(n[s]) || !1;
|
|
241
|
+
if (!a)
|
|
231
242
|
return r;
|
|
232
|
-
if (
|
|
233
|
-
const
|
|
243
|
+
if (s === "modifiers") {
|
|
244
|
+
const p = Array.isArray(a) ? a : [a];
|
|
234
245
|
return {
|
|
235
246
|
...r,
|
|
236
|
-
...
|
|
237
|
-
(
|
|
238
|
-
...
|
|
239
|
-
[`${
|
|
240
|
-
|
|
247
|
+
...p.reduce(
|
|
248
|
+
(u, S) => ({
|
|
249
|
+
...u,
|
|
250
|
+
[`${t}--${A.kebabCase(
|
|
251
|
+
S
|
|
241
252
|
)}`]: !0
|
|
242
253
|
}),
|
|
243
254
|
{}
|
|
@@ -246,351 +257,469 @@ function ee(e, t) {
|
|
|
246
257
|
} else
|
|
247
258
|
return {
|
|
248
259
|
...r,
|
|
249
|
-
[`${
|
|
260
|
+
[`${t}--${A.kebabCase(s)}`]: a
|
|
250
261
|
};
|
|
251
|
-
},
|
|
262
|
+
}, e) || {})
|
|
252
263
|
};
|
|
253
264
|
}
|
|
254
|
-
|
|
265
|
+
function Me(t, n) {
|
|
266
|
+
const e = { [`${t}`]: !0 };
|
|
267
|
+
return Object.keys(n).reduce((o, r) => {
|
|
268
|
+
const s = i(n[r]) || !1;
|
|
269
|
+
if (!s)
|
|
270
|
+
return o;
|
|
271
|
+
if (r === "modifiers") {
|
|
272
|
+
const a = Array.isArray(s) ? s : [s];
|
|
273
|
+
return {
|
|
274
|
+
...o,
|
|
275
|
+
...a.reduce(
|
|
276
|
+
(p, u) => ({
|
|
277
|
+
...p,
|
|
278
|
+
[`${t}--${A.kebabCase(
|
|
279
|
+
u
|
|
280
|
+
)}`]: !0
|
|
281
|
+
}),
|
|
282
|
+
{}
|
|
283
|
+
)
|
|
284
|
+
};
|
|
285
|
+
} else
|
|
286
|
+
return {
|
|
287
|
+
...o,
|
|
288
|
+
[`${t}--${A.kebabCase(r)}`]: s
|
|
289
|
+
};
|
|
290
|
+
}, e) || {};
|
|
291
|
+
}
|
|
292
|
+
const T = /* @__PURE__ */ L({
|
|
255
293
|
__name: "VvIcon",
|
|
256
|
-
props:
|
|
257
|
-
setup(
|
|
258
|
-
const
|
|
294
|
+
props: Le,
|
|
295
|
+
setup(t) {
|
|
296
|
+
const n = t, e = C(!0), { modifiers: o } = U(n), r = ve("ds"), { bemCssClasses: s } = Fe("vv-icon", {
|
|
259
297
|
modifiers: o
|
|
260
|
-
}),
|
|
261
|
-
const l =
|
|
262
|
-
return
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
298
|
+
}), a = d(() => n.provider || (r == null ? void 0 : r.provider)), p = d(() => {
|
|
299
|
+
const l = n.name || "", c = `@${a.value}:${n.prefix}:${n.name}`;
|
|
300
|
+
return j(l) ? l : j(c) ? c : (r == null ? void 0 : r.iconsCollections.find((v) => {
|
|
301
|
+
const f = `@${a.value}:${v.prefix}:${l}`;
|
|
302
|
+
if (j(f))
|
|
303
|
+
return f;
|
|
266
304
|
})) || l;
|
|
267
305
|
});
|
|
268
|
-
function
|
|
306
|
+
function u(l) {
|
|
269
307
|
let c = null;
|
|
270
308
|
if (typeof window > "u") {
|
|
271
|
-
const { JSDOM:
|
|
272
|
-
c = new
|
|
309
|
+
const { JSDOM: E } = require("jsdom");
|
|
310
|
+
c = new E().window;
|
|
273
311
|
}
|
|
274
312
|
return (c ? new c.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
|
|
275
313
|
}
|
|
276
|
-
function
|
|
277
|
-
const c =
|
|
278
|
-
c &&
|
|
279
|
-
body:
|
|
314
|
+
function S(l) {
|
|
315
|
+
const c = u(l), v = (c == null ? void 0 : c.innerHTML.trim()) || "";
|
|
316
|
+
c && v && Pe(`@${a.value}:${n.prefix}:${n.name}`, {
|
|
317
|
+
body: v,
|
|
280
318
|
height: c.viewBox.baseVal.height,
|
|
281
319
|
width: c.viewBox.baseVal.width
|
|
282
320
|
});
|
|
283
321
|
}
|
|
284
|
-
return r && (
|
|
285
|
-
l && (
|
|
322
|
+
return r && (n.src ? (e.value = !1, r.fetchIcon(n.src).then((l) => {
|
|
323
|
+
l && (S(l), e.value = !0);
|
|
286
324
|
}).catch((l) => {
|
|
287
325
|
throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
|
|
288
|
-
})) :
|
|
326
|
+
})) : n.svg && S(n.svg)), (l, c) => e.value ? (O(), k(i(Oe), $({
|
|
289
327
|
key: 0,
|
|
290
|
-
class:
|
|
328
|
+
class: i(s)
|
|
291
329
|
}, {
|
|
292
330
|
...l.$props,
|
|
293
|
-
provider: a
|
|
294
|
-
icon:
|
|
295
|
-
}), null, 16, ["class"])) :
|
|
331
|
+
provider: i(a),
|
|
332
|
+
icon: i(p)
|
|
333
|
+
}), null, 16, ["class"])) : x("", !0);
|
|
296
334
|
}
|
|
297
335
|
});
|
|
298
|
-
function
|
|
299
|
-
return Array.isArray(
|
|
300
|
-
` +
|
|
336
|
+
function B(t) {
|
|
337
|
+
return Array.isArray(t) ? t.filter((n) => A.isString(n)).reduce((n, e) => n.length > 0 ? n + `
|
|
338
|
+
` + e : e, "") : t;
|
|
301
339
|
}
|
|
302
|
-
function
|
|
340
|
+
function Ve(t, n) {
|
|
303
341
|
return {
|
|
304
342
|
name: "HintSlot",
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
343
|
+
props: {
|
|
344
|
+
params: { type: Object, default: () => {
|
|
345
|
+
} }
|
|
346
|
+
},
|
|
347
|
+
setup(e) {
|
|
348
|
+
const o = U(t), {
|
|
349
|
+
error: r,
|
|
350
|
+
valid: s,
|
|
351
|
+
hint: a,
|
|
352
|
+
loading: p
|
|
353
|
+
} = n, {
|
|
354
|
+
hintLabel: u,
|
|
355
|
+
modelValue: S,
|
|
356
|
+
valid: l,
|
|
357
|
+
validLabel: c,
|
|
358
|
+
error: v,
|
|
359
|
+
errorLabel: f
|
|
360
|
+
} = o, g = A.resolveFieldData(o, "loading"), E = A.resolveFieldData(
|
|
361
|
+
o,
|
|
320
362
|
"loadingLabel"
|
|
321
|
-
),
|
|
322
|
-
const _ = {
|
|
323
|
-
|
|
363
|
+
), I = d(() => v.value ? !!(v.value && r || (f == null ? void 0 : f.value) && Array.isArray(f.value) && f.value.length > 0 || (f == null ? void 0 : f.value) && A.isNotEmpty(f.value)) : !1), D = d(() => !!(u && u.value || a || s || c && c.value || I.value || (g == null ? void 0 : g.value) && p || (g == null ? void 0 : g.value) && (E == null ? void 0 : E.value))), R = d(() => {
|
|
364
|
+
const _ = Te({
|
|
365
|
+
hintLabel: u,
|
|
366
|
+
modelValue: S,
|
|
367
|
+
valid: l,
|
|
368
|
+
validLabel: c,
|
|
369
|
+
error: v,
|
|
370
|
+
errorLabel: f,
|
|
371
|
+
loading: g,
|
|
372
|
+
loadingLabel: E,
|
|
373
|
+
...e.params
|
|
374
|
+
});
|
|
375
|
+
return v != null && v.value ? (r == null ? void 0 : r(_)) || B(f == null ? void 0 : f.value) || (u == null ? void 0 : u.value) : l != null && l.value ? (s == null ? void 0 : s(_)) || B(c == null ? void 0 : c.value) || (u == null ? void 0 : u.value) : g != null && g.value ? (p == null ? void 0 : p(_)) || B(E == null ? void 0 : E.value) || (u == null ? void 0 : u.value) : (a == null ? void 0 : a(_)) || B(u == null ? void 0 : u.value) || (u == null ? void 0 : u.value);
|
|
324
376
|
});
|
|
325
377
|
return {
|
|
326
|
-
hasHint:
|
|
327
|
-
hintContent:
|
|
378
|
+
hasHint: D,
|
|
379
|
+
hintContent: R
|
|
328
380
|
};
|
|
329
381
|
},
|
|
330
382
|
render() {
|
|
331
383
|
if (this.hasHint)
|
|
332
|
-
return
|
|
384
|
+
return P(
|
|
385
|
+
"pre",
|
|
386
|
+
{ style: { "white-space": "pre" } },
|
|
387
|
+
this.hintContent
|
|
388
|
+
);
|
|
333
389
|
}
|
|
334
390
|
};
|
|
335
391
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
392
|
+
const te = L({
|
|
393
|
+
components: {
|
|
394
|
+
VvIcon: T
|
|
395
|
+
},
|
|
396
|
+
props: {
|
|
397
|
+
disabled: Boolean
|
|
398
|
+
},
|
|
399
|
+
setup(t, { emit: n }) {
|
|
400
|
+
const e = C(!1), o = d(
|
|
401
|
+
() => e.value ? q.PASSWORD_OFF : q.PASSWORD_ON
|
|
402
|
+
);
|
|
403
|
+
function r() {
|
|
404
|
+
t.disabled || (e.value = !e.value, n(
|
|
405
|
+
e.value ? "action-password-on" : "action-password-off"
|
|
406
|
+
));
|
|
407
|
+
}
|
|
408
|
+
return {
|
|
409
|
+
activeIcon: o,
|
|
410
|
+
onClick: r
|
|
411
|
+
};
|
|
412
|
+
},
|
|
413
|
+
render() {
|
|
414
|
+
const t = P(T, { name: this.activeIcon });
|
|
415
|
+
return P(
|
|
416
|
+
"button",
|
|
417
|
+
{
|
|
418
|
+
disabled: this.disabled,
|
|
419
|
+
class: ["vv-input-text__action"],
|
|
420
|
+
onClick: this.onClick
|
|
421
|
+
},
|
|
422
|
+
t
|
|
423
|
+
);
|
|
354
424
|
}
|
|
355
|
-
|
|
356
|
-
|
|
425
|
+
}), Y = L({
|
|
426
|
+
components: {
|
|
427
|
+
VvIcon: T
|
|
428
|
+
},
|
|
429
|
+
props: {
|
|
430
|
+
disabled: Boolean,
|
|
431
|
+
mode: {
|
|
432
|
+
type: String,
|
|
433
|
+
validator: (t) => ["up", "down"].includes(t),
|
|
434
|
+
default: "up"
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
setup(t, { emit: n }) {
|
|
438
|
+
function e() {
|
|
439
|
+
t.disabled || n(
|
|
440
|
+
t.mode === "up" ? "action-step-up" : "action-step-down"
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
onClick: e
|
|
445
|
+
};
|
|
446
|
+
},
|
|
447
|
+
render() {
|
|
448
|
+
return P("button", {
|
|
449
|
+
class: [
|
|
450
|
+
"vv-input-text__action-chevron",
|
|
451
|
+
this.mode === "up" && "vv-input-text__action-chevron-up"
|
|
452
|
+
],
|
|
453
|
+
disabled: this.disabled,
|
|
454
|
+
onClick: this.onClick
|
|
455
|
+
});
|
|
357
456
|
}
|
|
457
|
+
});
|
|
458
|
+
function ne(t, n) {
|
|
358
459
|
return {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
460
|
+
name: "VvInputTextActions",
|
|
461
|
+
components: {
|
|
462
|
+
VvIcon: T,
|
|
463
|
+
VvInputPasswordAction: te,
|
|
464
|
+
VvInputStepAction: Y
|
|
465
|
+
},
|
|
466
|
+
setup() {
|
|
467
|
+
return {
|
|
468
|
+
isDisabled: d(() => n.disabled || n.readonly)
|
|
469
|
+
};
|
|
470
|
+
},
|
|
471
|
+
render() {
|
|
472
|
+
let e = null;
|
|
473
|
+
switch (t) {
|
|
474
|
+
case w.PASSWORD: {
|
|
475
|
+
const { onActionPasswordOn: o, onActionPasswordOff: r } = this.$attrs;
|
|
476
|
+
e = [
|
|
477
|
+
P(te, {
|
|
478
|
+
disabled: this.isDisabled,
|
|
479
|
+
onActionPasswordOn: o,
|
|
480
|
+
onActionPasswordOff: r
|
|
481
|
+
})
|
|
482
|
+
];
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
case w.NUMBER: {
|
|
486
|
+
const { onActionStepUp: o, onActionStepDown: r } = this.$attrs;
|
|
487
|
+
e = [
|
|
488
|
+
P(Y, {
|
|
489
|
+
mode: "up",
|
|
490
|
+
disabled: this.isDisabled,
|
|
491
|
+
onActionStepUp: o,
|
|
492
|
+
onActionStepDown: r
|
|
493
|
+
}),
|
|
494
|
+
P(Y, {
|
|
495
|
+
mode: "down",
|
|
496
|
+
disabled: this.isDisabled,
|
|
497
|
+
onActionStepUp: o,
|
|
498
|
+
onActionStepDown: r
|
|
499
|
+
})
|
|
500
|
+
];
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
default: {
|
|
504
|
+
e = null;
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return Array.isArray(e) ? P("div", { class: "vv-input-text__actions-group" }, e) : e;
|
|
509
|
+
}
|
|
362
510
|
};
|
|
363
511
|
}
|
|
364
|
-
function
|
|
365
|
-
const
|
|
366
|
-
() => !!(
|
|
367
|
-
),
|
|
368
|
-
() => !!(
|
|
369
|
-
),
|
|
370
|
-
() => !!(
|
|
371
|
-
),
|
|
372
|
-
() => !!(
|
|
512
|
+
function je(t, n, e) {
|
|
513
|
+
const o = d(
|
|
514
|
+
() => !!(t.value && n.value === "left" || e.iconLeft)
|
|
515
|
+
), r = d(
|
|
516
|
+
() => !!(t.value && n.value === "right" || e.iconRight)
|
|
517
|
+
), s = d(
|
|
518
|
+
() => !!(t.value && n.value === "top" || e.iconTop)
|
|
519
|
+
), a = d(
|
|
520
|
+
() => !!(t.value && n.value === "bottom" || e.iconBottom)
|
|
373
521
|
);
|
|
374
522
|
return {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
hasIconTop: u,
|
|
380
|
-
hasIconBottom: s
|
|
523
|
+
hasIconLeft: o,
|
|
524
|
+
hasIconRight: r,
|
|
525
|
+
hasIconTop: s,
|
|
526
|
+
hasIconBottom: a
|
|
381
527
|
};
|
|
382
528
|
}
|
|
383
|
-
function
|
|
384
|
-
const { focused:
|
|
385
|
-
return
|
|
386
|
-
|
|
529
|
+
function Ye(t, n) {
|
|
530
|
+
const { focused: e } = _e(t);
|
|
531
|
+
return re(e, (o) => {
|
|
532
|
+
n(o ? "focus" : "blur", t.value);
|
|
387
533
|
}), {
|
|
388
|
-
focused:
|
|
534
|
+
focused: e
|
|
389
535
|
};
|
|
390
536
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
537
|
+
function He(t, n, e) {
|
|
538
|
+
const o = C(t == null ? void 0 : t.value), r = xe(
|
|
539
|
+
o,
|
|
540
|
+
n || 0
|
|
541
|
+
);
|
|
542
|
+
return re(r, (s) => e("update:modelValue", s)), o;
|
|
543
|
+
}
|
|
544
|
+
function qe(t, n) {
|
|
545
|
+
const e = d(() => {
|
|
546
|
+
const s = i(t);
|
|
547
|
+
return ee(s) ? s.length : 0;
|
|
548
|
+
}), o = d(() => {
|
|
549
|
+
const s = i(t) || "";
|
|
550
|
+
return !ee(s) || n.mode === !1 ? 0 : n.mode === !0 ? s.length : i(n.upperLimit) - s.length;
|
|
551
|
+
}), r = d(() => n.mode === !1 ? "" : n.mode === !0 && n.upperLimit && n.upperLimit > 0 ? `${o.value}/${i(n.upperLimit)}` : o.value);
|
|
552
|
+
return {
|
|
553
|
+
textLength: e,
|
|
554
|
+
textLimitLength: o,
|
|
555
|
+
formattedTextLimitLength: r
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
const Ue = ["for"], We = { class: "vv-input-text__wrapper" }, ze = {
|
|
559
|
+
key: 2,
|
|
560
|
+
class: "vv-input-text__limit"
|
|
561
|
+
}, Ze = {
|
|
398
562
|
inheritAttrs: !1
|
|
399
|
-
},
|
|
400
|
-
...
|
|
563
|
+
}, Ke = /* @__PURE__ */ L({
|
|
564
|
+
...Ze,
|
|
401
565
|
__name: "VvInputText",
|
|
402
|
-
props:
|
|
403
|
-
emits:
|
|
404
|
-
setup(
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
} = V(n), C = f(() => s.value || v.value), _ = Me(u, n.debounce || 0);
|
|
418
|
-
Q(_, (g) => t("update:modelValue", g));
|
|
419
|
-
const te = { icon: l, iconPosition: c }, ne = {
|
|
566
|
+
props: $e,
|
|
567
|
+
emits: ke,
|
|
568
|
+
setup(t, { emit: n }) {
|
|
569
|
+
const e = t, o = ge(), r = ye(), s = C(), { icon: a, iconPosition: p, label: u, modelValue: S, autoclear: l, limit: c } = U(e), v = e.id || e.name, f = `${e.name}-label`, g = `${e.name}-hint`, E = d(
|
|
570
|
+
() => e.floating && A.isEmpty(e.placeholder) ? " " : e.placeholder
|
|
571
|
+
), I = He(S, e.debounce, n), D = C(!1), R = d(() => e.type === h.TYPES.PASSWORD), _ = d(() => e.type === h.TYPES.NUMBER);
|
|
572
|
+
function oe() {
|
|
573
|
+
const y = e.max;
|
|
574
|
+
!G.value && I.value + 1 <= y && (s.value.stepUp(), I.value = i(s.value).value);
|
|
575
|
+
}
|
|
576
|
+
function se() {
|
|
577
|
+
const y = e.min;
|
|
578
|
+
!G.value && I.value - 1 <= y && (s.value.stepDown(), I.value = i(s.value).value);
|
|
579
|
+
}
|
|
580
|
+
const { hasIconLeft: W, hasIconRight: z } = je(a, p, {
|
|
420
581
|
iconLeft: o["icon-left"],
|
|
421
582
|
iconRight: o["icon-right"]
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
case
|
|
427
|
-
return
|
|
428
|
-
case
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
case
|
|
432
|
-
return
|
|
433
|
-
case
|
|
434
|
-
return
|
|
435
|
-
case S.TYPES.SEARCH:
|
|
436
|
-
return S.TYPES_ICON.SEARCH;
|
|
583
|
+
}), F = d(() => {
|
|
584
|
+
switch (e.type) {
|
|
585
|
+
case h.TYPES.PASSWORD:
|
|
586
|
+
return h.TYPES_ICON.PASSWORD_OFF;
|
|
587
|
+
case h.TYPES.COLOR:
|
|
588
|
+
return h.TYPES_ICON.COLOR;
|
|
589
|
+
case h.TYPES.DATE:
|
|
590
|
+
case h.TYPES.DATETIME_LOCAL:
|
|
591
|
+
return h.TYPES_ICON.DATE;
|
|
592
|
+
case h.TYPES.TIME:
|
|
593
|
+
return h.TYPES_ICON.TIME;
|
|
594
|
+
case h.TYPES.SEARCH:
|
|
595
|
+
return h.TYPES_ICON.SEARCH;
|
|
437
596
|
default:
|
|
438
597
|
return "";
|
|
439
598
|
}
|
|
440
|
-
}),
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
loading: P,
|
|
462
|
-
iconLeft: Y,
|
|
463
|
-
iconRight: f(() => E.isNotEmpty(N.value)),
|
|
464
|
-
floating: f(
|
|
465
|
-
() => T.value && E.isNotEmpty(A == null ? void 0 : A.value)
|
|
466
|
-
),
|
|
467
|
-
dirty: f(() => E.isNotEmpty(O))
|
|
468
|
-
}), fe = f(() => {
|
|
469
|
-
const { class: g } = r;
|
|
470
|
-
return {
|
|
471
|
-
class: g,
|
|
472
|
-
...de.value
|
|
473
|
-
};
|
|
474
|
-
}), pe = f(() => {
|
|
475
|
-
const { style: g } = r, p = E.pickBy(
|
|
599
|
+
}), { textLength: ie, formattedTextLimitLength: ae } = qe(I, {
|
|
600
|
+
mode: e.limit,
|
|
601
|
+
upperLimit: e.maxlength || 0
|
|
602
|
+
}), { focused: Z } = Ye(s, n), G = d(() => e.disabled || e.readonly), ue = d(() => {
|
|
603
|
+
const y = z.value || A.isNotEmpty(F.value), m = e.floating && A.isNotEmpty(e.label), b = A.isNotEmpty(S == null ? void 0 : S.value);
|
|
604
|
+
return [
|
|
605
|
+
Me("vv-input-text", {
|
|
606
|
+
modifiers: e.modifiers,
|
|
607
|
+
readonly: e.readonly,
|
|
608
|
+
valid: e.valid,
|
|
609
|
+
invalid: e.error,
|
|
610
|
+
loading: e.loading,
|
|
611
|
+
iconLeft: W,
|
|
612
|
+
iconRight: y,
|
|
613
|
+
floating: m,
|
|
614
|
+
dirty: b
|
|
615
|
+
}),
|
|
616
|
+
r.class
|
|
617
|
+
];
|
|
618
|
+
}), le = d(() => {
|
|
619
|
+
const { style: y } = r, m = A.pickBy(
|
|
476
620
|
r,
|
|
477
|
-
(
|
|
621
|
+
(b) => b.startsWith("data-")
|
|
478
622
|
);
|
|
479
623
|
return {
|
|
480
|
-
style:
|
|
481
|
-
...
|
|
482
|
-
};
|
|
483
|
-
}), W = f(() => {
|
|
484
|
-
const {
|
|
485
|
-
id: g,
|
|
486
|
-
name: p,
|
|
487
|
-
type: h,
|
|
488
|
-
autocomplete: me,
|
|
489
|
-
minlength: ye,
|
|
490
|
-
maxlength: ge,
|
|
491
|
-
min: he,
|
|
492
|
-
max: Se,
|
|
493
|
-
step: Ee,
|
|
494
|
-
disabled: Pe,
|
|
495
|
-
readonly: Ae,
|
|
496
|
-
floating: _e,
|
|
497
|
-
placeholder: Z
|
|
498
|
-
} = n, Ie = g || p, Te = j.value && se.value ? "text" : h, Oe = _e && E.isEmpty(Z) ? " " : Z;
|
|
499
|
-
return {
|
|
500
|
-
id: Ie,
|
|
501
|
-
type: Te,
|
|
502
|
-
placeholder: Oe,
|
|
503
|
-
name: p,
|
|
504
|
-
autocomplete: me,
|
|
505
|
-
disabled: Pe,
|
|
506
|
-
readonly: Ae,
|
|
507
|
-
minlength: ye,
|
|
508
|
-
maxlength: ge,
|
|
509
|
-
min: he,
|
|
510
|
-
max: Se,
|
|
511
|
-
step: Ee,
|
|
512
|
-
...L.value
|
|
624
|
+
style: y,
|
|
625
|
+
...m
|
|
513
626
|
};
|
|
514
|
-
}),
|
|
515
|
-
const
|
|
627
|
+
}), ce = d(() => {
|
|
628
|
+
const y = R.value && D.value ? "text" : e.type, m = A.pickBy(
|
|
516
629
|
r,
|
|
517
|
-
(
|
|
630
|
+
(b) => b.startsWith("aria-")
|
|
518
631
|
);
|
|
519
632
|
return {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
633
|
+
id: v,
|
|
634
|
+
type: y,
|
|
635
|
+
placeholder: E.value,
|
|
636
|
+
name: e.name,
|
|
637
|
+
autocomplete: e.autocomplete,
|
|
638
|
+
disabled: e.disabled,
|
|
639
|
+
readonly: e.readonly,
|
|
640
|
+
minlength: e.minlength,
|
|
641
|
+
maxlength: e.maxlength,
|
|
642
|
+
min: e.min,
|
|
643
|
+
max: e.max,
|
|
644
|
+
step: e.step,
|
|
645
|
+
"aria-invalid": e.error,
|
|
646
|
+
"aria-valid": !e.valid,
|
|
647
|
+
"aria-labeledby": f,
|
|
648
|
+
"aria-describedby": g,
|
|
649
|
+
"aria-errormessage": g,
|
|
650
|
+
...m
|
|
524
651
|
};
|
|
525
|
-
}),
|
|
526
|
-
const { modelValue:
|
|
652
|
+
}), X = d(() => {
|
|
653
|
+
const { modelValue: y, valid: m, error: b } = e;
|
|
527
654
|
return {
|
|
528
|
-
valid:
|
|
529
|
-
error:
|
|
530
|
-
modelValue:
|
|
655
|
+
valid: m,
|
|
656
|
+
error: b,
|
|
657
|
+
modelValue: y
|
|
531
658
|
};
|
|
532
|
-
}),
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
659
|
+
}), de = Ve(e, o), fe = ne(
|
|
660
|
+
h.TYPES.PASSWORD,
|
|
661
|
+
e
|
|
662
|
+
), pe = ne(h.TYPES.NUMBER, e);
|
|
663
|
+
function me() {
|
|
664
|
+
I.value = null;
|
|
665
|
+
}
|
|
666
|
+
return he(() => {
|
|
667
|
+
e.autofocus && (Z.value = !0), console.log("Focused", Z.value);
|
|
668
|
+
}), (y, m) => (O(), N("div", $(i(le), { class: i(ue) }), [
|
|
669
|
+
i(u) ? (O(), N("label", {
|
|
537
670
|
key: 0,
|
|
538
|
-
for:
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
671
|
+
for: i(v)
|
|
672
|
+
}, J(i(u)), 9, Ue)) : x("", !0),
|
|
673
|
+
K("div", We, [
|
|
674
|
+
i(W) ? M(y.$slots, "icon-left", Q($({ key: 0 }, i(X))), () => [
|
|
675
|
+
V(T, {
|
|
543
676
|
class: "vv-input-text__icon-left",
|
|
544
|
-
name: a
|
|
677
|
+
name: i(a)
|
|
545
678
|
}, null, 8, ["name"])
|
|
546
|
-
]) :
|
|
547
|
-
|
|
679
|
+
]) : x("", !0),
|
|
680
|
+
Se(K("input", $({
|
|
548
681
|
ref_key: "input",
|
|
549
|
-
ref:
|
|
550
|
-
},
|
|
551
|
-
"onUpdate:modelValue":
|
|
552
|
-
onInput:
|
|
682
|
+
ref: s
|
|
683
|
+
}, i(ce), {
|
|
684
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => Ae(I) ? I.value = b : null),
|
|
685
|
+
onInput: m[1] || (m[1] = (b) => n("input", b))
|
|
553
686
|
}), null, 16), [
|
|
554
|
-
[
|
|
687
|
+
[be, i(I)]
|
|
555
688
|
]),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
]
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
onClick: p[3] || (p[3] = B((h) => a(le)(), ["prevent"]))
|
|
574
|
-
}, null, 8, st),
|
|
575
|
-
b("button", {
|
|
576
|
-
type: "button",
|
|
577
|
-
class: "vv-input-text__action-chevron",
|
|
578
|
-
disabled: a(C),
|
|
579
|
-
onClick: p[4] || (p[4] = B((h) => a(ce)(), ["prevent"]))
|
|
580
|
-
}, null, 8, it)
|
|
581
|
-
])) : (I(), K(F, {
|
|
689
|
+
i(l) && i(ie) > 0 ? (O(), N("button", {
|
|
690
|
+
key: 1,
|
|
691
|
+
class: "vv-button vv-button--ghost",
|
|
692
|
+
onClick: me
|
|
693
|
+
}, [
|
|
694
|
+
V(T, { name: "clear-field" })
|
|
695
|
+
])) : x("", !0),
|
|
696
|
+
M(y.$slots, "icon-right", Q(Ee(i(X))), () => [
|
|
697
|
+
i(R) ? (O(), k(i(fe), {
|
|
698
|
+
key: 0,
|
|
699
|
+
onActionPasswordOn: m[2] || (m[2] = (b) => D.value = !0),
|
|
700
|
+
onActionPasswordOff: m[3] || (m[3] = (b) => D.value = !1)
|
|
701
|
+
})) : i(_) ? (O(), k(i(pe), {
|
|
702
|
+
key: 1,
|
|
703
|
+
onActionStepUp: oe,
|
|
704
|
+
onActionStepDown: se
|
|
705
|
+
})) : i(z) || i(F) ? (O(), k(T, {
|
|
582
706
|
key: 2,
|
|
583
|
-
name: a(
|
|
584
|
-
}, null, 8, ["name"]))
|
|
585
|
-
])
|
|
707
|
+
name: i(a) || i(F)
|
|
708
|
+
}, null, 8, ["name"])) : x("", !0)
|
|
709
|
+
]),
|
|
710
|
+
i(c) ? (O(), N("span", ze, [
|
|
711
|
+
M(y.$slots, "limit", {}, () => [
|
|
712
|
+
Ie(J(i(ae)), 1)
|
|
713
|
+
])
|
|
714
|
+
])) : x("", !0)
|
|
586
715
|
]),
|
|
587
|
-
|
|
588
|
-
id:
|
|
716
|
+
V(i(de), {
|
|
717
|
+
id: g,
|
|
589
718
|
class: "vv-input-text__hint"
|
|
590
|
-
}
|
|
719
|
+
})
|
|
591
720
|
], 16));
|
|
592
721
|
}
|
|
593
722
|
});
|
|
594
723
|
export {
|
|
595
|
-
|
|
724
|
+
Ke as default
|
|
596
725
|
};
|