adverich-kun-ui 0.1.113 → 0.1.114
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.
|
@@ -4,7 +4,7 @@ import U from "../composables/useKunTextFieldComposable.js";
|
|
|
4
4
|
const H = { class: "w-full flex flex-col relative" }, q = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mr-2"
|
|
7
|
-
}, G = ["value", "placeholder", "disabled", "readonly", "maxlength", "aria-invalid", "aria-describedby"], J = ["disabled"], L = {
|
|
7
|
+
}, G = ["type", "value", "placeholder", "disabled", "readonly", "maxlength", "aria-invalid", "aria-describedby"], J = ["disabled"], L = {
|
|
8
8
|
key: 4,
|
|
9
9
|
class: "ml-2"
|
|
10
10
|
}, O = {
|
|
@@ -27,15 +27,15 @@ const H = { class: "w-full flex flex-col relative" }, q = {
|
|
|
27
27
|
"keyDown",
|
|
28
28
|
"keyUp"
|
|
29
29
|
],
|
|
30
|
-
setup(
|
|
31
|
-
const h =
|
|
30
|
+
setup(x, { expose: F, emit: V }) {
|
|
31
|
+
const h = x, d = V, {
|
|
32
32
|
inputField: k,
|
|
33
33
|
inputValue: u,
|
|
34
34
|
inputFocused: m,
|
|
35
35
|
validationError: B,
|
|
36
36
|
hasError: p,
|
|
37
|
-
handleInput:
|
|
38
|
-
handleBlur:
|
|
37
|
+
handleInput: g,
|
|
38
|
+
handleBlur: c,
|
|
39
39
|
focusInput: C,
|
|
40
40
|
validate: D,
|
|
41
41
|
reset: E,
|
|
@@ -50,7 +50,7 @@ const H = { class: "w-full flex flex-col relative" }, q = {
|
|
|
50
50
|
});
|
|
51
51
|
const f = `input-${z().uid}`, j = y(() => m.value || !!u.value || h.dirty), I = A(), P = y(() => !!I["prepend-inner"]), S = y(() => !!I["append-inner"]);
|
|
52
52
|
return (e, t) => {
|
|
53
|
-
var
|
|
53
|
+
var $;
|
|
54
54
|
return s(), r("div", H, [
|
|
55
55
|
e.label ? (s(), r("label", {
|
|
56
56
|
key: 0,
|
|
@@ -81,7 +81,7 @@ const H = { class: "w-full flex flex-col relative" }, q = {
|
|
|
81
81
|
b("input", {
|
|
82
82
|
ref_key: "inputField",
|
|
83
83
|
ref: k,
|
|
84
|
-
type:
|
|
84
|
+
type: e.type,
|
|
85
85
|
value: l(u),
|
|
86
86
|
id: f,
|
|
87
87
|
placeholder: e.placeholder,
|
|
@@ -92,8 +92,8 @@ const H = { class: "w-full flex flex-col relative" }, q = {
|
|
|
92
92
|
class: a(["w-full h-full bg-transparent rounded focus:outline-none p-3", [e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
|
|
93
93
|
"aria-invalid": l(p) ? "true" : "false",
|
|
94
94
|
"aria-describedby": l(p) ? `error-${f}` : null,
|
|
95
|
-
onInput: t[0] || (t[0] = (...n) => l(
|
|
96
|
-
onBlur: t[1] || (t[1] = (...n) => l(
|
|
95
|
+
onInput: t[0] || (t[0] = (...n) => l(g) && l(g)(...n)),
|
|
96
|
+
onBlur: t[1] || (t[1] = (...n) => l(c) && l(c)(...n)),
|
|
97
97
|
onFocus: t[2] || (t[2] = (...n) => l(C) && l(C)(...n)),
|
|
98
98
|
onClick: t[3] || (t[3] = N((n) => d("handleClick"), ["stop"])),
|
|
99
99
|
onKeydown: t[4] || (t[4] = (n) => d("keyDown", n)),
|
|
@@ -121,7 +121,7 @@ const H = { class: "w-full flex flex-col relative" }, q = {
|
|
|
121
121
|
id: `error-${f}`,
|
|
122
122
|
class: "text-red-500 text-sm text-center"
|
|
123
123
|
}, i(l(B) || e.errorMessage), 9, Q)) : e.hint && (e.persistentHint || l(m)) ? (s(), r("div", R, i(e.hint), 1)) : o("", !0),
|
|
124
|
-
e.counter && e.maxlength ? (s(), r("div", W, i(((
|
|
124
|
+
e.counter && e.maxlength ? (s(), r("div", W, i((($ = l(u)) == null ? void 0 : $.length) || 0) + " / " + i(e.maxlength), 1)) : o("", !0)
|
|
125
125
|
]))
|
|
126
126
|
], 16)
|
|
127
127
|
]);
|