@kernel4632/kima 0.8.5 → 0.8.7
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/components/advanced-input/editable.ce.vue_vue_type_style_index_0_scoped_82c96de0_lang.css +1 -0
- package/dist/components/core/{text-field.ce.vue_vue_type_style_index_0_scoped_7334ab60_lang.css → text-field.ce.vue_vue_type_style_index_0_scoped_f22e5c02_lang.css} +1 -1
- package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_c1ac8a33_lang.css +1 -0
- package/dist/components/display/list.ce.vue_vue_type_style_index_0_scoped_df3ec98f_lang.css +1 -0
- package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_92807af5_lang.css +1 -0
- package/dist/components/display/timeline.ce.vue_vue_type_style_index_0_scoped_72323605_lang.css +1 -0
- package/dist/components/form-completion/dynamic-input.ce.vue_vue_type_style_index_0_scoped_6a5bc26a_lang.css +1 -0
- package/dist/components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_fe810c3a_lang.css +1 -0
- package/dist/components/input/field.ce.vue_vue_type_style_index_0_scoped_a01eded5_lang.css +1 -0
- package/dist/components/input/{file-upload.ce.vue_vue_type_style_index_0_scoped_1568bdab_lang.css → file-upload.ce.vue_vue_type_style_index_0_scoped_8fd77a68_lang.css} +1 -1
- package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_b46618b2_lang.css +1 -0
- package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_60d0751b_lang.css +1 -0
- package/dist/components/interaction/multi-select.ce.vue_vue_type_style_index_0_scoped_cf70a212_lang.css +1 -0
- package/dist/components/navigation/carousel.ce.vue_vue_type_style_index_0_scoped_03e729d7_lang.css +1 -0
- package/dist/components/utility/progress-group.ce.vue_vue_type_style_index_0_scoped_d4453504_lang.css +1 -0
- package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_892954ad_lang.css +1 -0
- package/dist/kima-elements-core.js +9739 -9684
- package/dist/kima-elements.js +11180 -11079
- package/dist/style.css +16 -16
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/core.css +5 -5
- package/dist/styles/dynamic-input.css +1 -1
- package/dist/styles/editable.css +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/file-upload.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/progress-group.css +1 -1
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/tag-group.css +1 -1
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/upload-manager.css +2 -2
- package/dist/vue/components/advanced-input/editable.ce.js +70 -69
- package/dist/vue/components/core/text-field.ce.js +66 -65
- package/dist/vue/components/data/table.ce.js +230 -232
- package/dist/vue/components/display/list.ce.js +28 -22
- package/dist/vue/components/display/skeleton.ce.js +27 -20
- package/dist/vue/components/display/timeline.ce.js +33 -25
- package/dist/vue/components/form-completion/dynamic-input.ce.js +75 -68
- package/dist/vue/components/form-completion/upload-manager.ce.js +91 -82
- package/dist/vue/components/input/field.ce.js +25 -23
- package/dist/vue/components/input/file-upload.ce.js +70 -64
- package/dist/vue/components/input/tags-input.ce.js +62 -56
- package/dist/vue/components/input/textarea.ce.js +36 -35
- package/dist/vue/components/interaction/multi-select.ce.js +95 -90
- package/dist/vue/components/navigation/carousel.ce.js +1 -1
- package/dist/vue/components/utility/progress-group.ce.js +26 -22
- package/dist/vue/components/utility/tag-group.ce.js +51 -45
- package/dist/vue/utils/content-motion.js +63 -28
- package/dist/vue/utils/motion.js +32 -17
- package/package.json +1 -1
- package/dist/components/advanced-input/editable.ce.vue_vue_type_style_index_0_scoped_91cd5b33_lang.css +0 -1
- package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_44836eb1_lang.css +0 -1
- package/dist/components/display/list.ce.vue_vue_type_style_index_0_scoped_1c170b37_lang.css +0 -1
- package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_d9a7d212_lang.css +0 -1
- package/dist/components/display/timeline.ce.vue_vue_type_style_index_0_scoped_ff6a1726_lang.css +0 -1
- package/dist/components/form-completion/dynamic-input.ce.vue_vue_type_style_index_0_scoped_5913d05a_lang.css +0 -1
- package/dist/components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_5d214e0f_lang.css +0 -1
- package/dist/components/input/field.ce.vue_vue_type_style_index_0_scoped_f2ce3fc2_lang.css +0 -1
- package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_7a178bc6_lang.css +0 -1
- package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_c0cc3612_lang.css +0 -1
- package/dist/components/interaction/multi-select.ce.vue_vue_type_style_index_0_scoped_b5be8e98_lang.css +0 -1
- package/dist/components/navigation/carousel.ce.vue_vue_type_style_index_0_scoped_6a7ca57f_lang.css +0 -1
- package/dist/components/utility/progress-group.ce.vue_vue_type_style_index_0_scoped_681cf67d_lang.css +0 -1
- package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_3d44ac1c_lang.css +0 -1
|
@@ -3,20 +3,21 @@ import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
|
3
3
|
import n from "../core/button.ce.js";
|
|
4
4
|
import { presenceTransition as r } from "../../utils/motion.js";
|
|
5
5
|
import { useInputAttrs as i, useInputState as a } from "../../utils/input-state.js";
|
|
6
|
+
import { useContentMotion as o } from "../../utils/content-motion.js";
|
|
6
7
|
/* empty css */
|
|
7
|
-
import { Fragment as
|
|
8
|
+
import { Fragment as s, TransitionGroup as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, isRef as g, mergeProps as _, normalizeClass as v, normalizeStyle as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, vModelText as T, watchEffect as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
|
|
8
9
|
// src/components/input/tags-input.ce.vue
|
|
9
|
-
var
|
|
10
|
+
var A = ["aria-disabled"], j = [
|
|
10
11
|
"name",
|
|
11
12
|
"value",
|
|
12
13
|
"disabled"
|
|
13
|
-
],
|
|
14
|
+
], M = [
|
|
14
15
|
"aria-label",
|
|
15
16
|
"disabled",
|
|
16
17
|
"readonly",
|
|
17
18
|
"required",
|
|
18
19
|
"placeholder"
|
|
19
|
-
],
|
|
20
|
+
], N = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
20
21
|
__name: "tags-input.ce",
|
|
21
22
|
props: {
|
|
22
23
|
modelValue: {
|
|
@@ -46,21 +47,26 @@ var k = ["aria-disabled"], A = [
|
|
|
46
47
|
"change",
|
|
47
48
|
"reject"
|
|
48
49
|
],
|
|
49
|
-
setup(t, { expose:
|
|
50
|
-
let
|
|
51
|
-
|
|
50
|
+
setup(t, { expose: N, emit: P }) {
|
|
51
|
+
let F = t, I = P, L = x(null), R = x(null), z = x(""), B = !1, { attrs: V, controlAttrs: H } = i(), { local: U, update: W } = a(F, I, L, (e) => Array.isArray(e) ? [...new Set(e.map(String))] : [], () => {
|
|
52
|
+
z.value = "", B = !1;
|
|
52
53
|
});
|
|
53
|
-
e(
|
|
54
|
-
let
|
|
54
|
+
e(L), o(L, () => U.value);
|
|
55
|
+
let G = l(() => U.value.length >= F.max), K = {
|
|
55
56
|
...r,
|
|
56
57
|
onBeforeLeave(e) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
let t = e.parentElement;
|
|
59
|
+
r.onBeforeLeave(e);
|
|
60
|
+
let n = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
61
|
+
getComputedStyle(t).position === "static" && (t.style.position = "relative"), Object.assign(e.style, {
|
|
62
|
+
position: "absolute",
|
|
63
|
+
left: `${n.left - i.left + t.scrollLeft}px`,
|
|
64
|
+
top: `${n.top - i.top + t.scrollTop}px`,
|
|
65
|
+
width: `${n.width}px`,
|
|
66
|
+
height: `${n.height}px`,
|
|
67
|
+
margin: "0",
|
|
62
68
|
boxSizing: "border-box"
|
|
63
|
-
});
|
|
69
|
+
}), r.onBeforeLeave(e);
|
|
64
70
|
},
|
|
65
71
|
onBeforeEnter(e) {
|
|
66
72
|
r.onBeforeEnter(e);
|
|
@@ -73,47 +79,47 @@ var k = ["aria-disabled"], A = [
|
|
|
73
79
|
]) e.style.removeProperty(t);
|
|
74
80
|
}
|
|
75
81
|
};
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
E(() => {
|
|
83
|
+
R.value?.setCustomValidity(F.required && !F.disabled && !U.value.length ? "请至少添加一个标签" : "");
|
|
78
84
|
}, { flush: "post" });
|
|
79
|
-
function
|
|
80
|
-
if (
|
|
81
|
-
let t =
|
|
85
|
+
function q(e = z.value) {
|
|
86
|
+
if (F.disabled || F.readonly || B) return;
|
|
87
|
+
let t = F.separator ? e.split(F.separator) : [e], n = [...U.value];
|
|
82
88
|
for (let e of t) {
|
|
83
89
|
let t = e.trim();
|
|
84
|
-
t && (n.includes(t) || n.length >=
|
|
90
|
+
t && (n.includes(t) || n.length >= F.max ? I("reject", t) : n.push(t));
|
|
85
91
|
}
|
|
86
|
-
n.length !==
|
|
87
|
-
}
|
|
88
|
-
function q(e) {
|
|
89
|
-
P.disabled || P.readonly || (U(H.value.filter((t, n) => n !== e)), L.value?.focus());
|
|
92
|
+
n.length !== U.value.length && W(n), z.value = "";
|
|
90
93
|
}
|
|
91
94
|
function J(e) {
|
|
92
|
-
|
|
95
|
+
F.disabled || F.readonly || (W(U.value.filter((t, n) => n !== e)), R.value?.focus());
|
|
93
96
|
}
|
|
94
97
|
function Y(e) {
|
|
98
|
+
F.disabled || F.readonly || (B || e.isComposing ? e.key === "Enter" && e.preventDefault() : ((e.key === "Enter" || F.separator.length === 1 && e.key === F.separator) && (e.preventDefault(), q()), e.key === "Backspace" && !z.value && U.value.length && (e.preventDefault(), J(U.value.length - 1))));
|
|
99
|
+
}
|
|
100
|
+
function X(e) {
|
|
95
101
|
let t = e.clipboardData?.getData("text");
|
|
96
|
-
!
|
|
102
|
+
!F.separator || !t?.includes(F.separator) || B || F.disabled || F.readonly || (e.preventDefault(), q(z.value + t));
|
|
97
103
|
}
|
|
98
|
-
return
|
|
104
|
+
return N({ focus: () => R.value?.focus() }), (e, r) => (b(), f("div", {
|
|
99
105
|
ref_key: "root",
|
|
100
|
-
ref:
|
|
101
|
-
class:
|
|
102
|
-
style:
|
|
106
|
+
ref: L,
|
|
107
|
+
class: v(["kima-tags-input", w(V).class]),
|
|
108
|
+
style: y(w(V).style),
|
|
103
109
|
"aria-disabled": t.disabled || void 0
|
|
104
110
|
}, [
|
|
105
|
-
|
|
106
|
-
default:
|
|
111
|
+
h(c, _({ name: "kima-list" }, K), {
|
|
112
|
+
default: D(() => [(b(!0), f(s, null, S(w(U), (e, i) => (b(), f("span", {
|
|
107
113
|
key: e,
|
|
108
114
|
class: "kima-tags-input__tag"
|
|
109
|
-
}, [
|
|
115
|
+
}, [p("span", null, C(e), 1), t.readonly ? d("", !0) : (b(), u(n, {
|
|
110
116
|
key: 0,
|
|
111
117
|
variant: "text",
|
|
112
118
|
disabled: t.disabled,
|
|
113
119
|
"aria-label": `移除 ${e}`,
|
|
114
|
-
onClick: (e) =>
|
|
120
|
+
onClick: (e) => J(i)
|
|
115
121
|
}, {
|
|
116
|
-
default:
|
|
122
|
+
default: D(() => [...r[5] ||= [m("×", -1)]]),
|
|
117
123
|
_: 1
|
|
118
124
|
}, 8, [
|
|
119
125
|
"disabled",
|
|
@@ -122,32 +128,32 @@ var k = ["aria-disabled"], A = [
|
|
|
122
128
|
]))]))), 128))]),
|
|
123
129
|
_: 1
|
|
124
130
|
}, 16),
|
|
125
|
-
(
|
|
131
|
+
(b(!0), f(s, null, S(w(U), (e) => (b(), f("input", {
|
|
126
132
|
key: e,
|
|
127
133
|
type: "hidden",
|
|
128
134
|
name: t.name,
|
|
129
135
|
value: e,
|
|
130
136
|
disabled: t.disabled
|
|
131
|
-
}, null, 8,
|
|
132
|
-
|
|
137
|
+
}, null, 8, j))), 128)),
|
|
138
|
+
O(p("input", _({
|
|
133
139
|
ref_key: "input",
|
|
134
|
-
ref:
|
|
135
|
-
},
|
|
136
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
140
|
+
ref: R
|
|
141
|
+
}, w(H), {
|
|
142
|
+
"onUpdate:modelValue": r[0] ||= (e) => z.value = e,
|
|
137
143
|
type: "text",
|
|
138
|
-
"aria-label":
|
|
144
|
+
"aria-label": w(H)["aria-label"] || t.label,
|
|
139
145
|
disabled: t.disabled,
|
|
140
|
-
readonly: t.readonly ||
|
|
141
|
-
required: t.required && !
|
|
142
|
-
placeholder:
|
|
143
|
-
onKeydown:
|
|
144
|
-
onPaste:
|
|
145
|
-
onInput: r[1] ||=
|
|
146
|
-
onChange: r[2] ||=
|
|
147
|
-
onCompositionstart: r[3] ||= (e) =>
|
|
148
|
-
onCompositionend: r[4] ||= (e) =>
|
|
149
|
-
}), null, 16,
|
|
150
|
-
], 14,
|
|
146
|
+
readonly: t.readonly || G.value,
|
|
147
|
+
required: t.required && !w(U).length,
|
|
148
|
+
placeholder: G.value ? "" : t.placeholder,
|
|
149
|
+
onKeydown: Y,
|
|
150
|
+
onPaste: X,
|
|
151
|
+
onInput: r[1] ||= k(() => {}, ["stop"]),
|
|
152
|
+
onChange: r[2] ||= k(() => {}, ["stop"]),
|
|
153
|
+
onCompositionstart: r[3] ||= (e) => g(B) ? B.value = !0 : B = !0,
|
|
154
|
+
onCompositionend: r[4] ||= (e) => g(B) ? B.value = !1 : B = !1
|
|
155
|
+
}), null, 16, M), [[T, z.value]])
|
|
156
|
+
], 14, A));
|
|
151
157
|
}
|
|
152
|
-
}), [["__scopeId", "data-v-
|
|
153
|
-
export {
|
|
158
|
+
}), [["__scopeId", "data-v-b46618b2"]]);
|
|
159
|
+
export { N as default };
|
|
@@ -2,12 +2,13 @@ import { useRipple as e } from "../../utils/ripple.js";
|
|
|
2
2
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import n from "../core/icon.ce.js";
|
|
4
4
|
import { collapseTransition as r, presenceTransition as i } from "../../utils/motion.js";
|
|
5
|
-
import { useInputAttrs as a, useInputState as
|
|
5
|
+
import { useInputAttrs as a, useInputState as ee } from "../../utils/input-state.js";
|
|
6
|
+
import { useContentMotion as o } from "../../utils/content-motion.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { Fragment as s, Transition as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, isRef as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, ref as C, toDisplayString as w, unref as T, useId as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withModifiers as j } from "vue";
|
|
8
9
|
import { Cancel01Icon as M } from "@hugeicons/core-free-icons";
|
|
9
10
|
// src/components/input/textarea.ce.vue
|
|
10
|
-
var N = ["aria-disabled"], P = ["aria-disabled"],
|
|
11
|
+
var N = ["aria-disabled"], P = ["aria-disabled"], te = [
|
|
11
12
|
"value",
|
|
12
13
|
"aria-label",
|
|
13
14
|
"aria-invalid",
|
|
@@ -20,7 +21,7 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
20
21
|
"rows",
|
|
21
22
|
"minlength",
|
|
22
23
|
"maxlength"
|
|
23
|
-
],
|
|
24
|
+
], ne = ["disabled"], re = ["inert", "aria-hidden"], F = ["id", "role"], I = {
|
|
24
25
|
key: 0,
|
|
25
26
|
class: "kima-textarea__count"
|
|
26
27
|
}, L = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -60,8 +61,8 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
60
61
|
},
|
|
61
62
|
emits: ["update:modelValue", "change"],
|
|
62
63
|
setup(t, { expose: L, emit: R }) {
|
|
63
|
-
let z = t, B = R, V = C(null), H = C(null), U = `kima-textarea-${E()}`, W = !1, { attrs: G, controlAttrs: K } = a(), { local: q, update: J } =
|
|
64
|
-
W = !1, H.value && (H.value.value = e), _(
|
|
64
|
+
let z = t, B = R, V = C(null), H = C(null), U = `kima-textarea-${E()}`, W = !1, { attrs: G, controlAttrs: K } = a(), { local: q, update: J } = ee(z, B, V, (e) => e ?? "", (e) => {
|
|
65
|
+
W = !1, H.value && (H.value.value = e), _(X);
|
|
65
66
|
});
|
|
66
67
|
e(V);
|
|
67
68
|
let Y = l(() => z.autoResize ? "none" : [
|
|
@@ -69,8 +70,8 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
69
70
|
"vertical",
|
|
70
71
|
"horizontal",
|
|
71
72
|
"both"
|
|
72
|
-
].includes(z.resize) ? z.resize : "vertical"),
|
|
73
|
-
function
|
|
73
|
+
].includes(z.resize) ? z.resize : "vertical"), ie = l(() => z.clearable && !!q.value && !z.readonly), ae = l(() => [z.error ? `${U}-error` : z.hint ? `${U}-hint` : "", K.value["aria-describedby"]].filter(Boolean).join(" ") || void 0);
|
|
74
|
+
function X() {
|
|
74
75
|
let e = H.value;
|
|
75
76
|
if (!e || (e.style.height = "", !z.autoResize)) return;
|
|
76
77
|
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e), r = parseFloat(n.borderTopWidth) + parseFloat(n.borderBottomWidth);
|
|
@@ -80,29 +81,30 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
80
81
|
q,
|
|
81
82
|
() => z.rows,
|
|
82
83
|
() => z.autoResize
|
|
83
|
-
], () => _(
|
|
84
|
+
], () => _(X), {
|
|
84
85
|
immediate: !0,
|
|
85
86
|
flush: "post"
|
|
86
87
|
});
|
|
87
|
-
let
|
|
88
|
+
let Z;
|
|
88
89
|
x(() => {
|
|
89
90
|
let e = H.value.ownerDocument.defaultView.ResizeObserver;
|
|
90
91
|
if (!e) return;
|
|
91
92
|
let t = H.value.getBoundingClientRect().width;
|
|
92
|
-
|
|
93
|
+
Z = new e(() => {
|
|
93
94
|
let e = H.value?.getBoundingClientRect().width;
|
|
94
|
-
e == null || Math.abs(e - t) < .5 || (t = e,
|
|
95
|
-
}),
|
|
96
|
-
}), b(() =>
|
|
97
|
-
function
|
|
98
|
-
!W && !e.isComposing && e.target.value !== q.value && J(e.target.value, !1),
|
|
95
|
+
e == null || Math.abs(e - t) < .5 || (t = e, X());
|
|
96
|
+
}), Z.observe(H.value);
|
|
97
|
+
}), b(() => Z?.disconnect());
|
|
98
|
+
function Q(e) {
|
|
99
|
+
!W && !e.isComposing && e.target.value !== q.value && J(e.target.value, !1), X();
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function oe() {
|
|
101
102
|
z.disabled || z.readonly || !q.value || (J(""), _(() => {
|
|
102
|
-
|
|
103
|
+
X(), H.value?.focus();
|
|
103
104
|
}));
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
let $ = C(null);
|
|
107
|
+
return o($, () => [z.error || z.hint, !!z.error]), L({ focus: () => H.value?.focus() }), (e, a) => (S(), d("div", {
|
|
106
108
|
class: v([
|
|
107
109
|
"kima-textarea",
|
|
108
110
|
{ "kima-textarea--error": !!t.error },
|
|
@@ -123,7 +125,7 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
123
125
|
value: T(q),
|
|
124
126
|
"aria-label": T(K)["aria-label"] || t.label,
|
|
125
127
|
"aria-invalid": !!t.error || T(K)["aria-invalid"],
|
|
126
|
-
"aria-describedby":
|
|
128
|
+
"aria-describedby": ae.value,
|
|
127
129
|
name: t.name,
|
|
128
130
|
disabled: t.disabled,
|
|
129
131
|
readonly: t.readonly,
|
|
@@ -133,25 +135,25 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
133
135
|
minlength: t.minlength,
|
|
134
136
|
maxlength: t.maxlength,
|
|
135
137
|
style: { resize: Y.value },
|
|
136
|
-
onInput: j(
|
|
138
|
+
onInput: j(Q, ["stop"]),
|
|
137
139
|
onChange: a[0] ||= j((e) => B("change", T(q)), ["stop"]),
|
|
138
140
|
onCompositionstart: a[1] ||= (e) => h(W) ? W.value = !0 : W = !0,
|
|
139
141
|
onCompositionend: a[2] ||= (e) => {
|
|
140
|
-
h(W) ? W.value = !1 : W = !1,
|
|
142
|
+
h(W) ? W.value = !1 : W = !1, Q(e);
|
|
141
143
|
}
|
|
142
|
-
}), null, 16,
|
|
143
|
-
default: k(() => [
|
|
144
|
+
}), null, 16, te), m(c, g({ name: "kima-fade" }, T(i)), {
|
|
145
|
+
default: k(() => [ie.value ? (S(), d("button", {
|
|
144
146
|
key: 0,
|
|
145
147
|
class: "kima-textarea__clear",
|
|
146
148
|
type: "button",
|
|
147
149
|
"aria-label": "清除内容",
|
|
148
150
|
disabled: t.disabled,
|
|
149
|
-
onClick:
|
|
151
|
+
onClick: oe
|
|
150
152
|
}, [m(n, {
|
|
151
153
|
icon: T(M),
|
|
152
154
|
size: 18,
|
|
153
155
|
"aria-hidden": "true"
|
|
154
|
-
}, null, 8, ["icon"])], 8,
|
|
156
|
+
}, null, 8, ["icon"])], 8, ne)) : u("", !0)]),
|
|
155
157
|
_: 1
|
|
156
158
|
}, 16)], 8, P),
|
|
157
159
|
m(c, g({ css: !1 }, {
|
|
@@ -159,22 +161,21 @@ var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
|
159
161
|
...T(i)
|
|
160
162
|
}), {
|
|
161
163
|
default: k(() => [A(f("div", {
|
|
164
|
+
ref_key: "messageWrap",
|
|
165
|
+
ref: $,
|
|
162
166
|
class: "kima-textarea__message-wrap",
|
|
163
167
|
inert: !(t.error || t.hint),
|
|
164
168
|
"aria-hidden": !(t.error || t.hint) || void 0
|
|
165
|
-
}, [
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}, w(t.error || t.hint), 11, F)) : u("", !0)]),
|
|
172
|
-
_: 1
|
|
173
|
-
}, 16)], 8, ne), [[D, t.error || t.hint]])]),
|
|
169
|
+
}, [t.error || t.hint ? (S(), d("p", {
|
|
170
|
+
id: `${U}-${t.error ? "error" : "hint"}`,
|
|
171
|
+
key: `${t.error ? "error" : "hint"}:${t.error || t.hint}`,
|
|
172
|
+
class: v(["kima-textarea__message", { "kima-textarea__message--error": !!t.error }]),
|
|
173
|
+
role: t.error ? "alert" : void 0
|
|
174
|
+
}, w(t.error || t.hint), 11, F)) : u("", !0)], 8, re), [[D, t.error || t.hint]])]),
|
|
174
175
|
_: 1
|
|
175
176
|
}, 16),
|
|
176
177
|
t.showCount ? (S(), d("p", I, [p(w(T(q).length), 1), t.maxlength == null ? u("", !0) : (S(), d(s, { key: 0 }, [p(" / " + w(t.maxlength), 1)], 64))])) : u("", !0)
|
|
177
178
|
], 14, N));
|
|
178
179
|
}
|
|
179
|
-
}), [["__scopeId", "data-v-
|
|
180
|
+
}), [["__scopeId", "data-v-60d0751b"]]);
|
|
180
181
|
export { L as default };
|