@kernel4632/kima 0.8.4 → 0.8.6

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.
Files changed (69) hide show
  1. package/dist/components/advanced-input/editable.ce.vue_vue_type_style_index_0_scoped_82c96de0_lang.css +1 -0
  2. 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
  3. package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_c1ac8a33_lang.css +1 -0
  4. package/dist/components/display/list.ce.vue_vue_type_style_index_0_scoped_df3ec98f_lang.css +1 -0
  5. package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_92807af5_lang.css +1 -0
  6. package/dist/components/display/timeline.ce.vue_vue_type_style_index_0_scoped_72323605_lang.css +1 -0
  7. package/dist/components/form-completion/dynamic-input.ce.vue_vue_type_style_index_0_scoped_6a5bc26a_lang.css +1 -0
  8. package/dist/components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_fe810c3a_lang.css +1 -0
  9. package/dist/components/input/field.ce.vue_vue_type_style_index_0_scoped_a01eded5_lang.css +1 -0
  10. 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
  11. package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_b46618b2_lang.css +1 -0
  12. package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_60d0751b_lang.css +1 -0
  13. package/dist/components/interaction/multi-select.ce.vue_vue_type_style_index_0_scoped_cf70a212_lang.css +1 -0
  14. package/dist/components/navigation/carousel.ce.vue_vue_type_style_index_0_scoped_03e729d7_lang.css +1 -0
  15. package/dist/components/utility/progress-group.ce.vue_vue_type_style_index_0_scoped_d4453504_lang.css +1 -0
  16. package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_892954ad_lang.css +1 -0
  17. package/dist/kima-elements-core.js +9739 -9684
  18. package/dist/kima-elements.js +11180 -11079
  19. package/dist/style.css +16 -16
  20. package/dist/styles/carousel.css +1 -1
  21. package/dist/styles/core.css +5 -5
  22. package/dist/styles/dynamic-input.css +1 -1
  23. package/dist/styles/editable.css +1 -1
  24. package/dist/styles/field.css +1 -1
  25. package/dist/styles/file-upload.css +1 -1
  26. package/dist/styles/list.css +1 -1
  27. package/dist/styles/multi-select.css +1 -1
  28. package/dist/styles/progress-group.css +1 -1
  29. package/dist/styles/skeleton.css +1 -1
  30. package/dist/styles/table.css +1 -1
  31. package/dist/styles/tag-group.css +1 -1
  32. package/dist/styles/tags-input.css +1 -1
  33. package/dist/styles/text-field.css +1 -1
  34. package/dist/styles/textarea.css +1 -1
  35. package/dist/styles/timeline.css +1 -1
  36. package/dist/styles/upload-manager.css +2 -2
  37. package/dist/vue/components/advanced-input/editable.ce.js +70 -69
  38. package/dist/vue/components/core/text-field.ce.js +66 -65
  39. package/dist/vue/components/data/table.ce.js +230 -232
  40. package/dist/vue/components/display/list.ce.js +28 -22
  41. package/dist/vue/components/display/skeleton.ce.js +27 -20
  42. package/dist/vue/components/display/timeline.ce.js +33 -25
  43. package/dist/vue/components/form-completion/dynamic-input.ce.js +75 -68
  44. package/dist/vue/components/form-completion/upload-manager.ce.js +91 -82
  45. package/dist/vue/components/input/field.ce.js +25 -23
  46. package/dist/vue/components/input/file-upload.ce.js +70 -64
  47. package/dist/vue/components/input/tags-input.ce.js +62 -56
  48. package/dist/vue/components/input/textarea.ce.js +36 -35
  49. package/dist/vue/components/interaction/multi-select.ce.js +95 -90
  50. package/dist/vue/components/navigation/carousel.ce.js +1 -1
  51. package/dist/vue/components/utility/progress-group.ce.js +26 -22
  52. package/dist/vue/components/utility/tag-group.ce.js +51 -45
  53. package/dist/vue/utils/content-motion.js +63 -28
  54. package/dist/vue/utils/motion.js +32 -17
  55. package/package.json +1 -1
  56. package/dist/components/advanced-input/editable.ce.vue_vue_type_style_index_0_scoped_91cd5b33_lang.css +0 -1
  57. package/dist/components/data/table.ce.vue_vue_type_style_index_0_scoped_44836eb1_lang.css +0 -1
  58. package/dist/components/display/list.ce.vue_vue_type_style_index_0_scoped_1c170b37_lang.css +0 -1
  59. package/dist/components/display/skeleton.ce.vue_vue_type_style_index_0_scoped_d9a7d212_lang.css +0 -1
  60. package/dist/components/display/timeline.ce.vue_vue_type_style_index_0_scoped_ff6a1726_lang.css +0 -1
  61. package/dist/components/form-completion/dynamic-input.ce.vue_vue_type_style_index_0_scoped_5913d05a_lang.css +0 -1
  62. package/dist/components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_5d214e0f_lang.css +0 -1
  63. package/dist/components/input/field.ce.vue_vue_type_style_index_0_scoped_f2ce3fc2_lang.css +0 -1
  64. package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_7a178bc6_lang.css +0 -1
  65. package/dist/components/input/textarea.ce.vue_vue_type_style_index_0_scoped_c0cc3612_lang.css +0 -1
  66. package/dist/components/interaction/multi-select.ce.vue_vue_type_style_index_0_scoped_b5be8e98_lang.css +0 -1
  67. package/dist/components/navigation/carousel.ce.vue_vue_type_style_index_0_scoped_6a7ca57f_lang.css +0 -1
  68. package/dist/components/utility/progress-group.ce.vue_vue_type_style_index_0_scoped_681cf67d_lang.css +0 -1
  69. package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_3d44ac1c_lang.css +0 -1
@@ -1,3 +1,3 @@
1
1
  @import "_tokens.css";
2
2
  @import "../components/core/icon.ce.vue_vue_type_style_index_0_scoped_5c94f2ca_lang.css";
3
- @import "../components/display/timeline.ce.vue_vue_type_style_index_0_scoped_ff6a1726_lang.css";
3
+ @import "../components/display/timeline.ce.vue_vue_type_style_index_0_scoped_72323605_lang.css";
@@ -3,5 +3,5 @@
3
3
  @import "../components/core/icon.ce.vue_vue_type_style_index_0_scoped_5c94f2ca_lang.css";
4
4
  @import "../components/core/icon-button.ce.vue_vue_type_style_index_0_scoped_a18b4478_lang.css";
5
5
  @import "../components/core/tooltip.ce.vue_vue_type_style_index_0_scoped_2c931a6a_lang.css";
6
- @import "../components/input/file-upload.ce.vue_vue_type_style_index_0_scoped_1568bdab_lang.css";
7
- @import "../components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_5d214e0f_lang.css";
6
+ @import "../components/input/file-upload.ce.vue_vue_type_style_index_0_scoped_8fd77a68_lang.css";
7
+ @import "../components/form-completion/upload-manager.ce.vue_vue_type_style_index_0_scoped_fe810c3a_lang.css";
@@ -3,22 +3,23 @@ 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 { useInputState as i } from "../../utils/input-state.js";
6
+ import { useContentMotion as a } from "../../utils/content-motion.js";
6
7
  /* empty css */
7
- import { Transition as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, mergeProps as f, nextTick as p, onBeforeUnmount as m, openBlock as h, ref as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, vShow as b, watch as x, withCtx as S, withDirectives as C } from "vue";
8
+ import { Transition as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, mergeProps as p, nextTick as m, onBeforeUnmount as h, openBlock as g, ref as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, vShow as x, watch as S, withCtx as C, withDirectives as w } from "vue";
8
9
  // src/components/advanced-input/editable.ce.vue
9
- var w = ["aria-busy"], T = [
10
+ var T = ["aria-busy"], E = [
10
11
  "disabled",
11
12
  "aria-readonly",
12
13
  "aria-label",
13
14
  "inert"
14
- ], E = ["inert", "aria-hidden"], D = { class: "kima-editable__actions" }, O = {
15
+ ], D = ["inert", "aria-hidden"], O = { class: "kima-editable__actions" }, k = {
15
16
  key: 0,
16
17
  role: "alert"
17
- }, k = [
18
+ }, A = [
18
19
  "name",
19
20
  "value",
20
21
  "disabled"
21
- ], A = /*#__PURE__*/ t({
22
+ ], j = /*#__PURE__*/ t({
22
23
  __name: "editable.ce",
23
24
  props: {
24
25
  modelValue: {
@@ -45,83 +46,83 @@ var w = ["aria-busy"], T = [
45
46
  "error",
46
47
  "update:editing"
47
48
  ],
48
- setup(t, { expose: A, emit: j }) {
49
- let M = t, N = j, P = g(null), F = g(null), I = g(null), L = g(!1), R = g(M.modelValue), z = g(!1), B = g(""), V = 0, { local: H, update: U } = i(M, N, P, (e) => String(e || ""), (e) => {
50
- V += 1, z.value = !1, L.value = !1, R.value = e, B.value = "";
49
+ setup(t, { expose: j, emit: M }) {
50
+ let N = t, P = M, F = _(null), I = _(null), L = _(null), R = _(!1), z = _(N.modelValue), B = _(!1), V = _(""), H = 0, { local: U, update: W } = i(N, P, F, (e) => String(e || ""), (e) => {
51
+ H += 1, B.value = !1, R.value = !1, z.value = e, V.value = "";
51
52
  });
52
- e(P), x(() => M.modelValue, (e) => {
53
- L.value || (R.value = e || "");
53
+ e(F), a(F, () => R.value), S(() => N.modelValue, (e) => {
54
+ R.value || (z.value = e || "");
54
55
  });
55
- async function W() {
56
- M.disabled || M.readonly || z.value || (R.value = H.value, B.value = "", L.value = !0, N("update:editing", !0), await p(), L.value && (I.value?.focus(), I.value?.select?.()));
57
- }
58
56
  async function G() {
59
- await p(), L.value || F.value?.focus();
57
+ N.disabled || N.readonly || B.value || (z.value = U.value, V.value = "", R.value = !0, P("update:editing", !0), await m(), R.value && (L.value?.focus(), L.value?.select?.()));
60
58
  }
61
59
  async function K() {
62
- if (z.value || M.disabled || M.readonly || !I.value?.reportValidity()) return;
63
- let e = ++V, t = R.value;
64
- z.value = !0, B.value = "";
60
+ await m(), R.value || I.value?.focus();
61
+ }
62
+ async function q() {
63
+ if (B.value || N.disabled || N.readonly || !L.value?.reportValidity()) return;
64
+ let e = ++H, t = z.value;
65
+ B.value = !0, V.value = "";
65
66
  try {
66
- if (M.saveHandler && await M.saveHandler(t), e !== V) return;
67
- U(t), N("save", t), L.value = !1, N("update:editing", !1), G();
67
+ if (N.saveHandler && await N.saveHandler(t), e !== H) return;
68
+ W(t), P("save", t), R.value = !1, P("update:editing", !1), K();
68
69
  } catch (t) {
69
- if (e !== V) return;
70
- B.value = t?.message || String(t), N("error", t), await p(), I.value?.focus();
70
+ if (e !== H) return;
71
+ V.value = t?.message || String(t), P("error", t), await m(), L.value?.focus();
71
72
  } finally {
72
- e === V && (z.value = !1);
73
+ e === H && (B.value = !1);
73
74
  }
74
75
  }
75
- function q() {
76
- z.value || (V += 1, R.value = H.value, B.value = "", L.value = !1, N("cancel"), N("update:editing", !1), G());
76
+ function J() {
77
+ B.value || (H += 1, z.value = U.value, V.value = "", R.value = !1, P("cancel"), P("update:editing", !1), K());
77
78
  }
78
- function J(e) {
79
- e.isComposing || e.keyCode === 229 || (e.key === "Escape" ? (e.preventDefault(), q()) : e.key === "Enter" && (!M.multiline || e.ctrlKey || e.metaKey) && (e.preventDefault(), K()));
79
+ function Y(e) {
80
+ e.isComposing || e.keyCode === 229 || (e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Enter" && (!N.multiline || e.ctrlKey || e.metaKey) && (e.preventDefault(), q()));
80
81
  }
81
- return m(() => {
82
- V += 1;
83
- }), A({
84
- edit: W,
85
- save: K,
86
- cancel: q,
87
- focus: () => F.value?.focus()
88
- }), (e, i) => (h(), c("div", {
82
+ return h(() => {
83
+ H += 1;
84
+ }), j({
85
+ edit: G,
86
+ save: q,
87
+ cancel: J,
88
+ focus: () => I.value?.focus()
89
+ }), (e, i) => (g(), l("div", {
89
90
  ref_key: "root",
90
- ref: P,
91
+ ref: F,
91
92
  class: "kima-editable",
92
- "aria-busy": z.value || void 0
93
+ "aria-busy": B.value || void 0
93
94
  }, [
94
- d(a, f({ name: "kima-fade" }, y(r)), {
95
- default: S(() => [C(l("button", {
95
+ f(o, p({ name: "kima-fade" }, b(r)), {
96
+ default: C(() => [w(u("button", {
96
97
  ref_key: "display",
97
- ref: F,
98
+ ref: I,
98
99
  class: "kima-editable__display",
99
100
  type: "button",
100
101
  disabled: t.disabled,
101
102
  "aria-readonly": t.readonly || void 0,
102
- "aria-label": `${t.label}: ${y(H) || t.placeholder || ""}`,
103
- inert: L.value,
104
- onClick: W
105
- }, v(y(H) || t.placeholder || "编辑"), 9, T), [[b, !L.value]])]),
103
+ "aria-label": `${t.label}: ${b(U) || t.placeholder || ""}`,
104
+ inert: R.value,
105
+ onClick: G
106
+ }, y(b(U) || t.placeholder || "编辑"), 9, E), [[x, !R.value]])]),
106
107
  _: 1
107
108
  }, 16),
108
- d(a, f({ name: "kima-content" }, y(r)), {
109
- default: S(() => [C(l("div", {
109
+ f(o, p({ name: "kima-content" }, b(r)), {
110
+ default: C(() => [w(u("div", {
110
111
  class: "kima-editable__editor",
111
- inert: !L.value,
112
- "aria-hidden": !L.value || void 0
112
+ inert: !R.value,
113
+ "aria-hidden": !R.value || void 0
113
114
  }, [
114
- (h(), o(_(t.multiline ? "textarea" : "input"), {
115
+ (g(), s(v(t.multiline ? "textarea" : "input"), {
115
116
  ref_key: "editor",
116
- ref: I,
117
- value: R.value,
117
+ ref: L,
118
+ value: z.value,
118
119
  class: "kima-editable__input",
119
120
  "aria-label": t.label,
120
121
  required: t.required,
121
- readonly: z.value,
122
+ readonly: B.value,
122
123
  disabled: t.disabled,
123
- onInput: i[0] ||= (e) => R.value = e.target.value,
124
- onKeydown: J
124
+ onInput: i[0] ||= (e) => z.value = e.target.value,
125
+ onKeydown: Y
125
126
  }, null, 40, [
126
127
  "value",
127
128
  "aria-label",
@@ -129,32 +130,32 @@ var w = ["aria-busy"], T = [
129
130
  "readonly",
130
131
  "disabled"
131
132
  ])),
132
- l("div", D, [d(n, {
133
- loading: z.value,
133
+ u("div", O, [f(n, {
134
+ loading: B.value,
134
135
  disabled: t.disabled,
135
- onClick: K
136
+ onClick: q
136
137
  }, {
137
- default: S(() => [...i[1] ||= [u("保存", -1)]]),
138
+ default: C(() => [...i[1] ||= [d("保存", -1)]]),
138
139
  _: 1
139
- }, 8, ["loading", "disabled"]), d(n, {
140
+ }, 8, ["loading", "disabled"]), f(n, {
140
141
  variant: "text",
141
- disabled: z.value || t.disabled,
142
- onClick: q
142
+ disabled: B.value || t.disabled,
143
+ onClick: J
143
144
  }, {
144
- default: S(() => [...i[2] ||= [u("取消", -1)]]),
145
+ default: C(() => [...i[2] ||= [d("取消", -1)]]),
145
146
  _: 1
146
147
  }, 8, ["disabled"])]),
147
- B.value ? (h(), c("p", O, v(B.value), 1)) : s("", !0)
148
- ], 8, E), [[b, L.value]])]),
148
+ V.value ? (g(), l("p", k, y(V.value), 1)) : c("", !0)
149
+ ], 8, D), [[x, R.value]])]),
149
150
  _: 1
150
151
  }, 16),
151
- l("input", {
152
+ u("input", {
152
153
  type: "hidden",
153
154
  name: t.name,
154
- value: y(H),
155
+ value: b(U),
155
156
  disabled: t.disabled
156
- }, null, 8, k)
157
- ], 8, w));
157
+ }, null, 8, A)
158
+ ], 8, T));
158
159
  }
159
- }, [["__scopeId", "data-v-91cd5b33"]]);
160
- export { A as default };
160
+ }, [["__scopeId", "data-v-82c96de0"]]);
161
+ export { j as default };
@@ -2,11 +2,12 @@ import { useRipple as e } from "../../utils/ripple.js";
2
2
  import t from "../../_virtual/_plugin-vue_export-helper.js";
3
3
  import n from "./icon.ce.js";
4
4
  import { collapseTransition as r, presenceTransition as i } from "../../utils/motion.js";
5
+ import { useContentMotion as a } from "../../utils/content-motion.js";
5
6
  /* empty css */
6
- import { Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, isRef as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, openBlock as y, ref as b, toDisplayString as x, unref as S, useAttrs as C, useId as w, vShow as T, watch as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
7
- import { Cancel01Icon as A, ViewIcon as ee, ViewOffIcon as te } from "@hugeicons/core-free-icons";
7
+ import { Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, isRef as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, toDisplayString as S, unref as C, useAttrs as ee, useId as te, vShow as w, watch as T, withCtx as E, withDirectives as D, withModifiers as O } from "vue";
8
+ import { Cancel01Icon as k, ViewIcon as A, ViewOffIcon as j } from "@hugeicons/core-free-icons";
8
9
  // src/components/core/text-field.ce.vue
9
- var ne = ["aria-disabled"], re = [
10
+ var M = ["aria-disabled"], ne = [
10
11
  "name",
11
12
  "type",
12
13
  "value",
@@ -18,10 +19,10 @@ var ne = ["aria-disabled"], re = [
18
19
  "aria-describedby",
19
20
  "aria-invalid",
20
21
  "aria-required"
21
- ], ie = {
22
+ ], re = {
22
23
  key: 0,
23
24
  class: "kima-text-field__actions"
24
- }, ae = ["aria-label", "disabled"], oe = ["disabled"], se = ["disabled"], j = ["inert", "aria-hidden"], M = ["id", "role"], N = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
25
+ }, ie = ["aria-label", "disabled"], ae = ["disabled"], oe = ["disabled"], se = ["inert", "aria-hidden"], ce = ["id", "role"], N = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
25
26
  __name: "text-field.ce",
26
27
  props: {
27
28
  label: {
@@ -56,37 +57,37 @@ var ne = ["aria-disabled"], re = [
56
57
  },
57
58
  emits: ["update:modelValue", "change"],
58
59
  setup(t, { expose: N, emit: P }) {
59
- let F = t, I = P, L = C(), R = w(), z = b(null), B = b(null);
60
+ let F = t, I = P, L = ee(), R = te(), z = x(null), B = x(null);
60
61
  e(B);
61
- let V = b(!1), H = b(F.modelValue), U = !1, W, G, K = `kima-text-field-${R}-hint`, q = `kima-text-field-${R}-error`, J = o(() => F.error.length > 0), Y = o(() => F.clearable && H.value.length > 0 && !F.readonly), ce = o(() => F.type === "password" && V.value ? "text" : F.type);
62
- function le() {
62
+ let V = x(!1), H = x(F.modelValue), U = !1, W, G, K = `kima-text-field-${R}-hint`, q = `kima-text-field-${R}-error`, J = s(() => F.error.length > 0), Y = s(() => F.clearable && H.value.length > 0 && !F.readonly), le = s(() => F.type === "password" && V.value ? "text" : F.type);
63
+ function ue() {
63
64
  let e = [];
64
65
  return F.error ? e.push(q) : F.hint && e.push(K), L["aria-describedby"] && e.push(L["aria-describedby"]), e.length > 0 ? e.join(" ") : void 0;
65
66
  }
66
- function ue() {
67
+ function de() {
67
68
  return L["aria-label"] || L.ariaLabel || F.label || F.placeholder || void 0;
68
69
  }
69
- function de() {
70
+ function fe() {
70
71
  let e = { ...L };
71
72
  return delete e.id, delete e.class, delete e.style, delete e["aria-describedby"], delete e["aria-label"], delete e.ariaLabel, e;
72
73
  }
73
- E(() => F.modelValue, (e) => {
74
+ T(() => F.modelValue, (e) => {
74
75
  e !== H.value && (H.value = e);
75
76
  });
76
77
  function X(e) {
77
78
  U || e.isComposing || e.target.value === H.value || (H.value = e.target.value, I("update:modelValue", H.value));
78
79
  }
79
- function Z() {
80
+ function pe() {
80
81
  I("change", H.value);
81
82
  }
82
- function Q() {
83
- F.disabled || F.readonly || !H.value || (H.value = "", I("update:modelValue", H.value), I("change", H.value), m(() => z.value?.focus()));
83
+ function Z() {
84
+ F.disabled || F.readonly || !H.value || (H.value = "", I("update:modelValue", H.value), I("change", H.value), h(() => z.value?.focus()));
84
85
  }
85
- function fe() {
86
+ function me() {
86
87
  z.value?.focus();
87
88
  }
88
- N({ focus: fe });
89
- function $(e) {
89
+ N({ focus: me });
90
+ function Q(e) {
90
91
  e.target === z.value.form && queueMicrotask(() => {
91
92
  if (e.defaultPrevented || !z.value) return;
92
93
  U = !1;
@@ -94,101 +95,101 @@ var ne = ["aria-disabled"], re = [
94
95
  H.value = W, z.value.value = W, t && I("update:modelValue", W);
95
96
  });
96
97
  }
97
- return v(() => {
98
- W = H.value, z.value.defaultValue = W, G = z.value.ownerDocument, G.addEventListener("reset", $, !0);
99
- }), _(() => G.removeEventListener("reset", $, !0)), (e, o) => (y(), l("div", {
100
- class: h(["kima-text-field", [{
98
+ let $ = x(null);
99
+ return a($, () => [F.error || F.hint, !!F.error]), y(() => {
100
+ W = H.value, z.value.defaultValue = W, G = z.value.ownerDocument, G.addEventListener("reset", Q, !0);
101
+ }), v(() => G.removeEventListener("reset", Q, !0)), (e, a) => (b(), u("div", {
102
+ class: g(["kima-text-field", [{
101
103
  "kima-text-field--error": J.value,
102
104
  "kima-text-field--disabled": t.disabled,
103
105
  "kima-text-field--readonly": t.readonly
104
- }, S(L).class]]),
105
- style: g(S(L).style)
106
- }, [u("div", {
106
+ }, C(L).class]]),
107
+ style: _(C(L).style)
108
+ }, [d("div", {
107
109
  ref_key: "control",
108
110
  ref: B,
109
111
  class: "kima-text-field__control",
110
112
  "aria-disabled": t.disabled || void 0
111
- }, [u("input", p({
113
+ }, [d("input", m({
112
114
  ref_key: "input",
113
115
  ref: z
114
- }, de(), {
116
+ }, fe(), {
115
117
  name: t.name,
116
- type: ce.value,
118
+ type: le.value,
117
119
  value: H.value,
118
120
  required: t.required,
119
121
  disabled: t.disabled,
120
122
  readonly: t.readonly,
121
123
  placeholder: t.placeholder,
122
- "aria-label": ue(),
123
- "aria-describedby": le(),
124
+ "aria-label": de(),
125
+ "aria-describedby": ue(),
124
126
  "aria-invalid": J.value || void 0,
125
127
  "aria-required": t.required || void 0,
126
- onInput: k(X, ["stop"]),
127
- onCompositionstart: o[0] ||= (e) => f(U) ? U.value = !0 : U = !0,
128
- onCompositionend: o[1] ||= (e) => {
129
- f(U) ? U.value = !1 : U = !1, X(e);
128
+ onInput: O(X, ["stop"]),
129
+ onCompositionstart: a[0] ||= (e) => p(U) ? U.value = !0 : U = !0,
130
+ onCompositionend: a[1] ||= (e) => {
131
+ p(U) ? U.value = !1 : U = !1, X(e);
130
132
  },
131
- onChange: k(Z, ["stop"])
132
- }), null, 16, re), t.type === "password" ? (y(), l("div", ie, [u("button", {
133
+ onChange: O(pe, ["stop"])
134
+ }), null, 16, ne), t.type === "password" ? (b(), u("div", re, [d("button", {
133
135
  class: "kima-text-field__action",
134
136
  type: "button",
135
137
  "aria-label": V.value ? "隐藏密码" : "显示密码",
136
138
  disabled: t.disabled,
137
- onClick: o[2] ||= (e) => V.value = !V.value
138
- }, [d(n, {
139
- icon: V.value ? S(te) : S(ee),
139
+ onClick: a[2] ||= (e) => V.value = !V.value
140
+ }, [f(n, {
141
+ icon: V.value ? C(j) : C(A),
140
142
  size: 18,
141
143
  color: "currentColor"
142
- }, null, 8, ["icon"])], 8, ae), d(a, p({ name: "kima-fade" }, S(i)), {
143
- default: D(() => [Y.value ? (y(), l("button", {
144
+ }, null, 8, ["icon"])], 8, ie), f(o, m({ name: "kima-fade" }, C(i)), {
145
+ default: E(() => [Y.value ? (b(), u("button", {
144
146
  key: 0,
145
147
  class: "kima-text-field__action",
146
148
  type: "button",
147
149
  "aria-label": "清除内容",
148
150
  disabled: t.disabled,
149
- onClick: Q
150
- }, [d(n, {
151
- icon: S(A),
151
+ onClick: Z
152
+ }, [f(n, {
153
+ icon: C(k),
152
154
  size: 18,
153
155
  color: "currentColor"
154
- }, null, 8, ["icon"])], 8, oe)) : c("", !0)]),
156
+ }, null, 8, ["icon"])], 8, ae)) : l("", !0)]),
155
157
  _: 1
156
- }, 16)])) : (y(), s(a, p({
158
+ }, 16)])) : (b(), c(o, m({
157
159
  key: 1,
158
160
  name: "kima-fade"
159
- }, S(i)), {
160
- default: D(() => [Y.value ? (y(), l("button", {
161
+ }, C(i)), {
162
+ default: E(() => [Y.value ? (b(), u("button", {
161
163
  key: 0,
162
164
  class: "kima-text-field__action kima-text-field__action--clear",
163
165
  type: "button",
164
166
  "aria-label": "清除内容",
165
167
  disabled: t.disabled,
166
- onClick: Q
167
- }, [d(n, {
168
- icon: S(A),
168
+ onClick: Z
169
+ }, [f(n, {
170
+ icon: C(k),
169
171
  size: 18,
170
172
  color: "currentColor"
171
- }, null, 8, ["icon"])], 8, se)) : c("", !0)]),
173
+ }, null, 8, ["icon"])], 8, oe)) : l("", !0)]),
172
174
  _: 1
173
- }, 16))], 8, ne), d(a, p({ css: !1 }, {
174
- ...S(r),
175
- ...S(i)
175
+ }, 16))], 8, M), f(o, m({ css: !1 }, {
176
+ ...C(r),
177
+ ...C(i)
176
178
  }), {
177
- default: D(() => [O(u("div", {
179
+ default: E(() => [D(d("div", {
180
+ ref_key: "messageWrap",
181
+ ref: $,
178
182
  class: "kima-text-field__message-wrap",
179
183
  inert: !(t.error || t.hint),
180
184
  "aria-hidden": !(t.error || t.hint) || void 0
181
- }, [d(a, p({ name: "kima-fade" }, S(i)), {
182
- default: D(() => [t.error || t.hint ? (y(), l("p", {
183
- key: `${t.error ? "error" : "hint"}:${t.error || t.hint}`,
184
- class: h(["kima-text-field__message", { "kima-text-field__message--error": !!t.error }]),
185
- id: t.error ? q : K,
186
- role: t.error ? "alert" : void 0
187
- }, x(t.error || t.hint), 11, M)) : c("", !0)]),
188
- _: 1
189
- }, 16)], 8, j), [[T, t.error || t.hint]])]),
185
+ }, [t.error || t.hint ? (b(), u("p", {
186
+ key: `${t.error ? "error" : "hint"}:${t.error || t.hint}`,
187
+ class: g(["kima-text-field__message", { "kima-text-field__message--error": !!t.error }]),
188
+ id: t.error ? q : K,
189
+ role: t.error ? "alert" : void 0
190
+ }, S(t.error || t.hint), 11, ce)) : l("", !0)], 8, se), [[w, t.error || t.hint]])]),
190
191
  _: 1
191
192
  }, 16)], 6));
192
193
  }
193
- }), [["__scopeId", "data-v-7334ab60"]]);
194
+ }), [["__scopeId", "data-v-f22e5c02"]]);
194
195
  export { N as default };