@wikicasa-dev/components 1.9.18 → 1.9.19
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/dist/BaseInput.js +20 -21
- package/dist/assets/BaseInput.css +1 -1
- package/package.json +1 -1
package/dist/BaseInput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, mergeModels as M, useModel as O, ref as b, watch as
|
|
1
|
+
import { defineComponent as N, mergeModels as M, useModel as O, ref as b, watch as h, useAttrs as j, openBlock as s, createElementBlock as d, normalizeClass as m, unref as o, renderSlot as v, createElementVNode as $, withModifiers as g, withKeys as D, createBlock as G, createCommentVNode as w, Fragment as C, renderList as B } from "vue";
|
|
2
2
|
import J from "./BaseFloatingLabel.js";
|
|
3
3
|
import { useFloatingLabel as Q } from "./useFloatingLabel.js";
|
|
4
4
|
import { _ as R } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
@@ -29,12 +29,12 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
29
29
|
setFloatingLabel: L
|
|
30
30
|
} = Q(k), n = b("text"), f = b({}), p = b(null), q = () => {
|
|
31
31
|
a.feedback && (f.value = a.feedback, a.feedback.valid && typeof a.feedback.valid == "string" && (f.value.valid = [a.feedback.valid]), a.feedback.invalid && typeof a.feedback.invalid == "string" && (f.value.invalid = [a.feedback.invalid]));
|
|
32
|
-
},
|
|
32
|
+
}, I = (e, i) => {
|
|
33
33
|
if (!a.formatter || !a.formatter.formatFn)
|
|
34
34
|
return l.value = e, "";
|
|
35
35
|
const t = e.length ? a.formatter.formatFn(e) : e;
|
|
36
36
|
return i && (i.value = t), l.value = t, t;
|
|
37
|
-
},
|
|
37
|
+
}, T = (e, i = !0) => {
|
|
38
38
|
if (i && (!a.formatter || !a.formatter.unFormatFn))
|
|
39
39
|
return u.value = e, "";
|
|
40
40
|
if (!i || !a.formatter || !a.formatter.unFormatFn)
|
|
@@ -42,8 +42,8 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
42
42
|
const t = a.formatter.unFormatFn(e);
|
|
43
43
|
return u.value = t ?? "", t;
|
|
44
44
|
}, K = ({ target: e }) => {
|
|
45
|
-
const i = e, t =
|
|
46
|
-
|
|
45
|
+
const i = e, t = T(i.value);
|
|
46
|
+
I(
|
|
47
47
|
`${t}`,
|
|
48
48
|
t === u.value ? i : void 0
|
|
49
49
|
);
|
|
@@ -52,7 +52,7 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
52
52
|
}, z = () => {
|
|
53
53
|
n.value === "password" ? n.value = "text" : n.value === "text" && (n.value = "password");
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
h(
|
|
56
56
|
() => a.feedback,
|
|
57
57
|
() => {
|
|
58
58
|
q();
|
|
@@ -60,18 +60,18 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
60
60
|
{
|
|
61
61
|
immediate: !0
|
|
62
62
|
}
|
|
63
|
-
),
|
|
63
|
+
), h(
|
|
64
64
|
u,
|
|
65
65
|
(e) => {
|
|
66
|
-
|
|
66
|
+
I(
|
|
67
67
|
`${e}`,
|
|
68
|
-
|
|
68
|
+
T(`${e}`, !1) === e ? p.value : void 0
|
|
69
69
|
), l.value != null && l.value.length > 0 && r.value !== "floating-label" ? L() : !l.value && document && document.activeElement !== p.value && F();
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
immediate: !0
|
|
73
73
|
}
|
|
74
|
-
),
|
|
74
|
+
), h(
|
|
75
75
|
() => a.keepFloatingLabel,
|
|
76
76
|
(e) => {
|
|
77
77
|
e ? L() : V(u.value);
|
|
@@ -85,7 +85,6 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
85
85
|
}), (e, i) => (s(), d("div", {
|
|
86
86
|
class: m(["input-wrapper uikit-relative uikit-inline-block uikit-w-full [&.has-right-icon.is-invalid_.text-input-icon]:uikit-mr-25px [&.has-right-icon.is-valid_.text-input-icon]:uikit-mr-25px", [
|
|
87
87
|
e.$attrs.class,
|
|
88
|
-
{ "uikit-h-12": e.labelText },
|
|
89
88
|
{ "floating-label": e.labelText },
|
|
90
89
|
o(r) === "floating-label" ? "floating-state" : "inline-state",
|
|
91
90
|
{
|
|
@@ -103,7 +102,7 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
103
102
|
handleShowPasswd: z,
|
|
104
103
|
curType: n.value
|
|
105
104
|
}, void 0, !0),
|
|
106
|
-
|
|
105
|
+
$("input", {
|
|
107
106
|
id: e.$attrs.id,
|
|
108
107
|
ref_key: "baseInputEl",
|
|
109
108
|
ref: p,
|
|
@@ -146,8 +145,8 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
146
145
|
],
|
|
147
146
|
onKeyup: i[5] || (i[5] = (t) => k("keyup", t))
|
|
148
147
|
}, null, 42, W),
|
|
149
|
-
|
|
150
|
-
class: m(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-solid uikit-px-2 uikit-py-0 uikit-text-left uikit-transition-[border] uikit-duration-100 uikit-ease-out peer-focus:uikit-border-2 peer-focus:uikit-border-w-primary peer-focus:[&.is-invalid]:uikit-border-w-danger", [
|
|
148
|
+
$("fieldset", {
|
|
149
|
+
class: m(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-top-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-solid uikit-px-2 uikit-py-0 uikit-text-left uikit-transition-[border] uikit-duration-100 uikit-ease-out peer-focus:uikit-border-2 peer-focus:uikit-border-w-primary peer-focus:[&.is-invalid]:uikit-border-w-danger", [
|
|
151
150
|
{
|
|
152
151
|
"is-invalid uikit-border-w-danger": e.isValid === !1,
|
|
153
152
|
"is-valid uikit-border-w-primary": e.isValid,
|
|
@@ -157,8 +156,8 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
157
156
|
e.$attrs["fieldset-classes"]
|
|
158
157
|
]])
|
|
159
158
|
}, [
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
$("legend", X, [
|
|
160
|
+
$("span", {
|
|
162
161
|
class: m(["visible-label uikit-opacity-0", [
|
|
163
162
|
{ "uikit-mx-5px": e.labelText },
|
|
164
163
|
{
|
|
@@ -186,12 +185,12 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
186
185
|
]
|
|
187
186
|
}, null, 8, ["for", "label-text", "label-state", "is-valid", "required", "disabled", "label-classes"])) : w("", !0),
|
|
188
187
|
v(e.$slots, "feedback", {}, () => [
|
|
189
|
-
e.isValid === !1 ? (s(!0), d(C, { key: 0 }, B(f.value.invalid, (t,
|
|
190
|
-
key: `${e.$attrs.id}_invalid_${
|
|
188
|
+
e.isValid === !1 ? (s(!0), d(C, { key: 0 }, B(f.value.invalid, (t, c) => (s(), d("div", {
|
|
189
|
+
key: `${e.$attrs.id}_invalid_${c}`,
|
|
191
190
|
class: "uikit-mt-1 uikit-text-12 uikit-text-w-danger",
|
|
192
191
|
innerHTML: t
|
|
193
|
-
}, null, 8, Z))), 128)) : e.isValid === !0 ? (s(!0), d(C, { key: 1 }, B(f.value.valid, (t,
|
|
194
|
-
key: `${e.$attrs.id}_valid_${
|
|
192
|
+
}, null, 8, Z))), 128)) : e.isValid === !0 ? (s(!0), d(C, { key: 1 }, B(f.value.valid, (t, c) => (s(), d("div", {
|
|
193
|
+
key: `${e.$attrs.id}_valid_${c}`,
|
|
195
194
|
class: "uikit-mt-1 uikit-text-12 uikit-text-w-primary",
|
|
196
195
|
innerHTML: t
|
|
197
196
|
}, null, 8, U))), 128)) : w("", !0)
|
|
@@ -201,7 +200,7 @@ import './assets/BaseInput.css';const W = ["id", "data-cy", "name", "autocomplet
|
|
|
201
200
|
])) : w("", !0)
|
|
202
201
|
], 2));
|
|
203
202
|
}
|
|
204
|
-
}), ne = /* @__PURE__ */ R(_, [["__scopeId", "data-v-
|
|
203
|
+
}), ne = /* @__PURE__ */ R(_, [["__scopeId", "data-v-7848a5b8"]]);
|
|
205
204
|
export {
|
|
206
205
|
ne as default
|
|
207
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.input-wrapper[data-v-
|
|
1
|
+
.input-wrapper[data-v-7848a5b8]{--icon-default-size: 44px}.invalid-bg[data-v-7848a5b8]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-7848a5b8]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-7848a5b8],.valid-bg[data-v-7848a5b8]{background-position:top 10px right 12px;background-size:20px}.has-right-icon[data-v-7848a5b8]>label.inline-label{right:var(--icon-default-size)}.has-left-icon[data-v-7848a5b8]>label.inline-label{left:var(--icon-default-size)}[data-v-7848a5b8] .text-input-icon{position:absolute;z-index:20;box-sizing:border-box;--icon-size-sm: 16px;--icon-size-md: 20px;--icon-size-lg: 25px}[data-v-7848a5b8] .text-input-icon.left{left:5px}[data-v-7848a5b8] .text-input-icon.right{right:5px}[data-v-7848a5b8] .text-input-icon{--icon-top: 5px;--icon-size: var(--icon-size-sm);width:var(--icon-default-size);height:var(--icon-default-size);padding:calc((var(--icon-default-size) - var(--icon-size)) / 2);top:var(--icon-top)}[data-v-7848a5b8] .text-input-icon.md{--icon-size: var(--icon-size-md)}[data-v-7848a5b8] .text-input-icon.lg{--icon-top: 0;--icon-size: var(--icon-size-lg)}.under-label[data-v-7848a5b8]{left:4px;font-style:italic}
|