adverich-kun-ui 0.1.621 → 0.1.623

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,52 +4,59 @@ import n from "../../../KunBtn/src/components/KunBtn.js";
4
4
  import r from "../../../../icons/IconClose.js";
5
5
  import { KunNumberFieldProps as i } from "../composables/KunNumberFieldProps.js";
6
6
  import { useKunNumberField as a } from "../composables/useKunNumberFieldComposable.js";
7
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, getCurrentInstance as ee, mergeProps as te, nextTick as ne, normalizeClass as p, openBlock as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useSlots as y, withCtx as b } from "vue";
7
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, getCurrentInstance as ee, mergeProps as te, nextTick as p, normalizeClass as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as b, withCtx as x } from "vue";
8
8
  //#region src/components/KunNumberField/src/components/KunNumberField.vue
9
- var x = /* @__PURE__ */ e({ default: () => R }), S = {
9
+ var S = /* @__PURE__ */ e({ default: () => z }), ne = ["for"], re = { class: "w-full flex flex-col justify-center relative" }, ie = {
10
10
  key: 0,
11
11
  class: "h-full"
12
- }, re = ["disabled"], ie = {
12
+ }, ae = ["disabled"], oe = {
13
13
  key: 1,
14
14
  class: "mx-2"
15
- }, ae = {
15
+ }, se = {
16
16
  key: 2,
17
17
  class: "flex items-center justify-center h-full pl-2"
18
- }, oe = [
18
+ }, C = [
19
+ "id",
20
+ "name",
19
21
  "value",
20
22
  "placeholder",
21
23
  "readonly",
22
24
  "disabled",
25
+ "required",
23
26
  "maxlength",
27
+ "autocomplete",
28
+ "min",
29
+ "max",
30
+ "step",
24
31
  "aria-invalid"
25
- ], C = {
32
+ ], w = {
26
33
  key: 3,
27
34
  class: "px-2"
28
- }, w = {
35
+ }, T = {
29
36
  key: 0,
30
37
  class: "flex items-center h-full"
31
- }, T = ["disabled"], E = ["disabled"], D = {
38
+ }, E = ["disabled"], D = ["disabled"], O = {
32
39
  key: 1,
33
40
  class: "flex flex-col items-center justify-center border-l border-slate-600"
34
- }, O = ["disabled"], k = ["disabled"], A = {
41
+ }, k = ["disabled"], A = ["disabled"], j = {
35
42
  key: 5,
36
43
  class: "flex items-center justify-center h-full pr-1"
37
- }, j = {
44
+ }, M = {
38
45
  key: 6,
39
46
  class: "h-full"
40
- }, M = ["disabled"], N = {
47
+ }, N = ["disabled"], P = {
41
48
  key: 7,
42
49
  class: "ml-2"
43
- }, P = {
50
+ }, F = {
44
51
  key: 0,
45
52
  class: "h-[1.25rem]"
46
- }, F = {
53
+ }, I = {
47
54
  key: 0,
48
55
  class: "text-red-500 text-sm text-center"
49
- }, I = { key: 0 }, L = { key: 1 }, se = {
56
+ }, L = { key: 0 }, ce = { key: 1 }, R = {
50
57
  key: 1,
51
58
  class: "text-xs text-center"
52
- }, R = {
59
+ }, z = {
53
60
  __name: "KunNumberField",
54
61
  props: i,
55
62
  emits: [
@@ -61,125 +68,130 @@ var x = /* @__PURE__ */ e({ default: () => R }), S = {
61
68
  "keyDown",
62
69
  "keyUp"
63
70
  ],
64
- setup(e, { expose: i, emit: x }) {
65
- let R = e, z = x, B = `number-input-${ee().uid}`, V = y(), H = !!V["prepend-icon"], U = !!V["append-icon"], { inputValue: W, numberInput: G, rootRef: K, onIncrement: q, onDecrement: J, onClear: ce, validateKey: Y, focus: X, handleFocus: Z, handleBlur: Q, handleInput: $ } = a(R, z);
71
+ setup(e, { expose: i, emit: S }) {
72
+ let z = e, B = S, V = z.id || `number-input-${ee().uid}`, H = b(), U = !!H["prepend-icon"], W = !!H["append-icon"], { inputValue: G, numberInput: K, rootRef: q, onIncrement: J, onDecrement: Y, onClear: le, validateKey: ue, focus: X, handleFocus: Z, handleBlur: Q, handleInput: $ } = a(z, B);
66
73
  i({
67
- numberInput: G,
68
- rootRef: K,
74
+ numberInput: K,
75
+ rootRef: q,
69
76
  focus: () => {
70
- G.value && G.value.focus(), ne(() => {
71
- G.value && G.value.focus();
77
+ K.value && K.value.focus(), p(() => {
78
+ K.value && K.value.focus();
72
79
  });
73
80
  }
74
81
  });
75
- let le = s(() => R.density === "compact" ? "p-1" : R.density === "comfortable" ? "p-2" : "p-3");
76
- return (e, i) => (m(), u("div", {
82
+ let de = s(() => z.density === "compact" ? "p-1" : z.density === "comfortable" ? "p-2" : "p-3"), fe = s(() => Number.isFinite(Number(z.min)) ? z.min : null), pe = s(() => Number.isFinite(Number(z.max)) ? z.max : null);
83
+ return (e, i) => (h(), u("div", {
77
84
  class: "w-full flex flex-col relative h-fit",
78
85
  ref_key: "rootRef",
79
- ref: K
80
- }, [e.label ? (m(), u("label", {
86
+ ref: q
87
+ }, [e.label ? (h(), u("label", {
81
88
  key: 0,
82
- for: B,
83
- class: p([
89
+ for: y(V),
90
+ class: m([
84
91
  e.labelColor,
85
92
  "absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10",
86
93
  "-top-2.25 text-xs opacity-80"
87
94
  ])
88
- }, _(e.label), 3)) : l("", !0), d("div", te({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [d("div", { class: p(["flex items-center w-full h-full border", [
95
+ }, v(e.label), 11, ne)) : l("", !0), d("div", re, [d("div", { class: m(["flex items-center w-full h-full border", [
89
96
  e.bgInput,
90
97
  e.rounded,
91
- v(X) ? "border-slate-400 dark:border-slate-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
98
+ y(X) ? "border-slate-400 dark:border-slate-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
92
99
  e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-text",
93
100
  e.error ? "bg-red-200 dark:bg-red-900" : ""
94
101
  ]]) }, [
95
- !e.noArrows && e.controlVariant === "split" ? (m(), u("div", S, [d("button", {
102
+ !e.noArrows && e.controlVariant === "split" ? (h(), u("div", ie, [d("button", {
96
103
  type: "button",
97
104
  class: "p-3 text-lg border-r border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
98
- onClick: i[0] ||= (...e) => v(J) && v(J)(...e),
105
+ onClick: i[0] ||= (...e) => y(Y) && y(Y)(...e),
99
106
  disabled: e.disabled || e.readonly
100
- }, "−", 8, re)])) : l("", !0),
101
- e.prefix ? (m(), u("div", ie, _(e.prefix), 1)) : l("", !0),
102
- e.prependIcon || H ? (m(), u("div", ae, [e.prependIcon ? (m(), c(t, {
107
+ }, "−", 8, ae)])) : l("", !0),
108
+ e.prefix ? (h(), u("div", oe, v(e.prefix), 1)) : l("", !0),
109
+ e.prependIcon || U ? (h(), u("div", se, [e.prependIcon ? (h(), c(t, {
103
110
  key: 0,
104
111
  icon: e.prependIcon
105
- }, null, 8, ["icon"])) : g(e.$slots, "prepend-icon", {}, void 0, void 0, 1)])) : l("", !0),
106
- d("input", {
107
- id: B,
112
+ }, null, 8, ["icon"])) : _(e.$slots, "prepend-icon", {}, void 0, void 0, 1)])) : l("", !0),
113
+ d("input", te(e.$attrs, {
114
+ id: y(V),
115
+ name: e.name,
108
116
  ref_key: "numberInput",
109
- ref: G,
117
+ ref: K,
110
118
  type: "text",
111
- value: v(W),
119
+ value: y(G),
112
120
  placeholder: e.placeholder,
113
121
  readonly: e.readonly,
114
122
  disabled: e.disabled,
123
+ required: e.required,
115
124
  maxlength: e.maxlength,
116
- autocomplete: "off",
117
- class: p(["w-full h-full bg-transparent rounded focus:outline-none", [
118
- le.value,
125
+ autocomplete: e.autocomplete,
126
+ min: fe.value,
127
+ max: pe.value,
128
+ step: e.step,
129
+ class: ["w-full h-full bg-transparent rounded focus:outline-none", [
130
+ de.value,
119
131
  e.textColor,
120
132
  e.placeholderColor,
121
133
  e.textCenter ? "text-center" : ""
122
- ]]),
134
+ ]],
123
135
  "aria-invalid": e.error ? "true" : "false",
124
- onBlur: i[1] ||= (...e) => v(Q) && v(Q)(...e),
125
- onFocus: i[2] ||= (...e) => v(Z) && v(Z)(...e),
126
- onInput: i[3] ||= (...e) => v($) && v($)(...e),
127
- onKeydown: i[4] ||= (e) => (v(Y)(e), z("keyDown", e)),
128
- onKeyup: i[5] ||= (e) => z("keyUp", e),
136
+ onBlur: i[1] ||= (...e) => y(Q) && y(Q)(...e),
137
+ onFocus: i[2] ||= (...e) => y(Z) && y(Z)(...e),
138
+ onInput: i[3] ||= (...e) => y($) && y($)(...e),
139
+ onKeydown: i[4] ||= (e) => (y(ue)(e), B("keyDown", e)),
140
+ onKeyup: i[5] ||= (e) => B("keyUp", e),
129
141
  inputmode: "decimal",
130
142
  pattern: "[0-9]+([\\.,][0-9]+)?"
131
- }, null, 42, oe),
132
- e.clearable && v(W) != null ? (m(), u("div", C, [f(n, {
133
- onClick: v(ce),
143
+ }), null, 16, C),
144
+ e.clearable && y(G) != null ? (h(), u("div", w, [f(n, {
145
+ onClick: y(le),
134
146
  rounded: "rounded-full",
135
147
  bgColor: "bg-red-500/75",
136
148
  disabled: e.disabled || e.readonly,
137
149
  class: "h-6 w-6"
138
150
  }, {
139
- default: b(() => [f(t, {
151
+ default: x(() => [f(t, {
140
152
  icon: r,
141
153
  size: "text-xs"
142
154
  })]),
143
155
  _: 1
144
156
  }, 8, ["onClick", "disabled"])])) : l("", !0),
145
- e.noArrows ? l("", !0) : (m(), u(o, { key: 4 }, [e.controlVariant === "default" ? (m(), u("div", w, [d("button", {
157
+ e.noArrows ? l("", !0) : (h(), u(o, { key: 4 }, [e.controlVariant === "default" ? (h(), u("div", T, [d("button", {
146
158
  type: "button",
147
159
  class: "flex items-center border-l border-slate-600 p-3 justify-center text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer hover:opacity-80",
148
- onClick: i[6] ||= (...e) => v(q) && v(q)(...e),
160
+ onClick: i[6] ||= (...e) => y(J) && y(J)(...e),
149
161
  disabled: e.disabled || e.readonly
150
- }, "▲", 8, T), d("button", {
162
+ }, "▲", 8, E), d("button", {
151
163
  type: "button",
152
164
  class: "flex items-center border-l border-slate-600 p-3 justify-center text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer hover:opacity-80",
153
- onClick: i[7] ||= (...e) => v(J) && v(J)(...e),
165
+ onClick: i[7] ||= (...e) => y(Y) && y(Y)(...e),
154
166
  disabled: e.disabled || e.readonly
155
- }, "▼", 8, E)])) : l("", !0), e.controlVariant === "stacked" ? (m(), u("div", D, [d("div", {
167
+ }, "▼", 8, D)])) : l("", !0), e.controlVariant === "stacked" ? (h(), u("div", O, [d("div", {
156
168
  class: "border-b border-slate-600 pb-1 px-3 flex hover:opacity-80 cursor-pointer",
157
- onClick: i[8] ||= (...e) => v(q) && v(q)(...e)
169
+ onClick: i[8] ||= (...e) => y(J) && y(J)(...e)
158
170
  }, [d("button", {
159
171
  type: "button",
160
172
  class: "text-xs text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer",
161
173
  disabled: e.disabled || e.readonly
162
- }, "▲", 8, O)]), d("div", {
174
+ }, "▲", 8, k)]), d("div", {
163
175
  class: "border-t border-slate-600 pt-1 px-3 flex hover:opacity-80 cursor-pointer",
164
- onClick: i[9] ||= (...e) => v(J) && v(J)(...e)
176
+ onClick: i[9] ||= (...e) => y(Y) && y(Y)(...e)
165
177
  }, [d("button", {
166
178
  type: "button",
167
179
  class: "text-xs text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer",
168
180
  disabled: e.disabled || e.readonly
169
- }, "▼", 8, k)])])) : l("", !0)], 64)),
170
- e.appendIcon || U ? (m(), u("div", A, [e.appendIcon ? (m(), c(t, {
181
+ }, "▼", 8, A)])])) : l("", !0)], 64)),
182
+ e.appendIcon || W ? (h(), u("div", j, [e.appendIcon ? (h(), c(t, {
171
183
  key: 0,
172
184
  icon: e.appendIcon
173
- }, null, 8, ["icon"])) : g(e.$slots, "append-icon", {}, void 0, void 0, 1)])) : l("", !0),
174
- !e.noArrows && e.controlVariant === "split" ? (m(), u("div", j, [d("button", {
185
+ }, null, 8, ["icon"])) : _(e.$slots, "append-icon", {}, void 0, void 0, 1)])) : l("", !0),
186
+ !e.noArrows && e.controlVariant === "split" ? (h(), u("div", M, [d("button", {
175
187
  type: "button",
176
188
  class: "p-3 text-lg border-l border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
177
- onClick: i[10] ||= (...e) => v(q) && v(q)(...e),
189
+ onClick: i[10] ||= (...e) => y(J) && y(J)(...e),
178
190
  disabled: e.disabled || e.readonly
179
- }, "+", 8, M)])) : l("", !0),
180
- e.suffix ? (m(), u("div", N, _(e.suffix), 1)) : l("", !0)
181
- ], 2), e.hideDetails ? l("", !0) : (m(), u("div", P, [e.error || e.errorMessages ? (m(), u("div", F, [Array.isArray(e.errorMessages) ? (m(), u("div", I, [(m(!0), u(o, null, h(e.errorMessages, (e, t) => (m(), u("div", { key: t }, _(e), 1))), 128))])) : typeof e.errorMessages == "string" ? (m(), u("div", L, _(e.errorMessages), 1)) : l("", !0)])) : e.hint && (e.persistentHint || v(X)) ? (m(), u("div", se, _(e.hint), 1)) : l("", !0)]))], 16)], 512));
191
+ }, "+", 8, N)])) : l("", !0),
192
+ e.suffix ? (h(), u("div", P, v(e.suffix), 1)) : l("", !0)
193
+ ], 2), e.hideDetails ? l("", !0) : (h(), u("div", F, [e.error || e.errorMessages ? (h(), u("div", I, [Array.isArray(e.errorMessages) ? (h(), u("div", L, [(h(!0), u(o, null, g(e.errorMessages, (e, t) => (h(), u("div", { key: t }, v(e), 1))), 128))])) : typeof e.errorMessages == "string" ? (h(), u("div", ce, v(e.errorMessages), 1)) : l("", !0)])) : e.hint && (e.persistentHint || y(X)) ? (h(), u("div", R, v(e.hint), 1)) : l("", !0)]))])], 512));
182
194
  }
183
195
  };
184
196
  //#endregion
185
- export { x as KunNumberField_exports, R as default };
197
+ export { S as KunNumberField_exports, z as default };
@@ -79,6 +79,22 @@ var e = {
79
79
  type: Array,
80
80
  default: () => []
81
81
  },
82
+ id: {
83
+ type: String,
84
+ default: null
85
+ },
86
+ name: {
87
+ type: String,
88
+ default: null
89
+ },
90
+ autocomplete: {
91
+ type: String,
92
+ default: "off"
93
+ },
94
+ required: {
95
+ type: Boolean,
96
+ default: !1
97
+ },
82
98
  disabled: {
83
99
  type: Boolean,
84
100
  default: !1
@@ -5,34 +5,42 @@ import r from "../composables/KunTextFieldProps.js";
5
5
  import i from "../composables/useKunTextFieldComposable.js";
6
6
  import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, getCurrentInstance as d, mergeProps as f, nextTick as p, normalizeClass as m, openBlock as h, ref as g, renderSlot as _, toDisplayString as v, unref as y, useSlots as b, withModifiers as x } from "vue";
7
7
  //#region src/components/KunTextField/src/components/KunTextField.vue
8
- var S = /* @__PURE__ */ e({ default: () => j }), C = {
8
+ var S = /* @__PURE__ */ e({ default: () => M }), C = ["for"], w = { class: "w-full flex flex-col justify-center relative" }, T = {
9
9
  key: 0,
10
10
  class: "mr-2"
11
- }, w = [
11
+ }, E = [
12
12
  "type",
13
13
  "value",
14
+ "id",
15
+ "name",
14
16
  "placeholder",
17
+ "autocomplete",
18
+ "required",
15
19
  "disabled",
16
20
  "readonly",
21
+ "inputmode",
22
+ "minlength",
17
23
  "maxlength",
24
+ "pattern",
25
+ "spellcheck",
18
26
  "aria-invalid",
19
27
  "aria-describedby"
20
- ], T = {
28
+ ], D = {
21
29
  key: 3,
22
30
  class: "flex items-center justify-center min-w-[32px] h-full px-1"
23
- }, E = {
31
+ }, ee = {
24
32
  key: 5,
25
33
  class: "ml-2"
26
- }, D = {
34
+ }, O = {
27
35
  key: 0,
28
36
  class: "h-[1.25rem]"
29
- }, O = ["id"], k = {
37
+ }, k = ["id"], A = {
30
38
  key: 1,
31
39
  class: "text-xs text-center"
32
- }, A = {
40
+ }, j = {
33
41
  key: 2,
34
42
  class: "text-xs text-right"
35
- }, j = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
43
+ }, M = /*@__PURE__*/ Object.assign({ inheritAttrs: !1 }, {
36
44
  __name: "KunTextField",
37
45
  props: { ...r },
38
46
  emits: [
@@ -45,82 +53,89 @@ var S = /* @__PURE__ */ e({ default: () => j }), C = {
45
53
  "enter"
46
54
  ],
47
55
  setup(e, { expose: r, emit: S }) {
48
- let j = e, M = S, { inputField: N, inputValue: P, rootRef: F, inputFocused: I, validationError: L, hasError: R, handleInput: z, handleBlur: B, focusInput: V, validate: H, reset: U, resetValidation: W, clearInput: G } = i(j, M), K = (e) => {
49
- M("keyDown", e), e.key === "Enter" && (e.preventDefault(), M("enter", e));
56
+ let M = e, N = S, { inputField: P, inputValue: F, rootRef: I, inputFocused: L, validationError: R, hasError: z, handleInput: B, handleBlur: V, focusInput: H, validate: U, reset: W, resetValidation: G, clearInput: K } = i(M, N), q = (e) => {
57
+ N("keyDown", e), e.key === "Enter" && (e.preventDefault(), N("enter", e));
50
58
  };
51
59
  r({
52
- validate: H,
53
- reset: U,
54
- resetValidation: W,
55
- inputField: N,
56
- rootRef: F,
60
+ validate: U,
61
+ reset: W,
62
+ resetValidation: G,
63
+ inputField: P,
64
+ rootRef: I,
57
65
  focus: () => {
58
- N.value && N.value.focus(), p(() => {
59
- N.value && N.value.focus();
66
+ P.value && P.value.focus(), p(() => {
67
+ P.value && P.value.focus();
60
68
  });
61
69
  }
62
70
  });
63
- let q = `input-${d().uid}`, J = a(() => I.value || P.value !== "" || j.dirty), Y = b(), X = a(() => !!Y["prepend-inner"]), Z = a(() => !!Y["append-inner"]), Q = g(!1), $ = a(() => Q.value ? n.eyeOffOutline : n.eyeOutline);
64
- function ee() {
65
- Q.value = !Q.value;
71
+ let J = M.id || `input-${d().uid}`, Y = a(() => L.value || F.value !== "" || M.dirty), X = b(), Z = a(() => !!X["prepend-inner"]), Q = a(() => !!X["append-inner"]), $ = g(!1), te = a(() => $.value ? n.eyeOffOutline : n.eyeOutline);
72
+ function ne() {
73
+ $.value = !$.value;
66
74
  }
67
- let te = a(() => j.type === "password" ? Q.value ? "text" : "password" : j.type), ne = a(() => j.density === "compact" ? "p-1" : j.density === "comfortable" ? "p-2" : "p-3");
75
+ let re = a(() => M.type === "password" ? $.value ? "text" : "password" : M.type), ie = a(() => M.density === "compact" ? "p-1" : M.density === "comfortable" ? "p-2" : "p-3");
68
76
  return (e, r) => (h(), c("div", {
69
77
  class: "w-full flex flex-col relative",
70
78
  ref_key: "rootRef",
71
- ref: F
79
+ ref: I
72
80
  }, [e.label ? (h(), c("label", {
73
81
  key: 0,
74
- for: q,
82
+ for: y(J),
75
83
  class: m([
76
84
  e.labelColor,
77
85
  "absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10",
78
- J.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
86
+ Y.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
79
87
  ])
80
- }, v(e.label), 3)) : s("", !0), l("div", f({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [l("div", { class: m(["flex flex-row items-center w-full h-full border", [
88
+ }, v(e.label), 11, C)) : s("", !0), l("div", w, [l("div", { class: m(["flex flex-row items-center w-full h-full border", [
81
89
  e.bgInput,
82
90
  e.rounded,
83
- y(I) ? "border-slate-400 dark:border-slate-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
91
+ y(L) ? "border-slate-400 dark:border-slate-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
84
92
  e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-text",
85
- y(R) ? "bg-red-200 dark:bg-red-900" : ""
93
+ y(z) ? "bg-red-200 dark:bg-red-900" : ""
86
94
  ]]) }, [
87
- e.prefix ? (h(), c("div", C, v(e.prefix), 1)) : s("", !0),
88
- X.value ? (h(), c("div", {
95
+ e.prefix ? (h(), c("div", T, v(e.prefix), 1)) : s("", !0),
96
+ Z.value ? (h(), c("div", {
89
97
  key: 1,
90
98
  class: m([e.prependInnerClass, "flex items-center justify-center min-w-[32px] h-full px-1"])
91
99
  }, [_(e.$slots, "prepend-inner")], 2)) : s("", !0),
92
100
  _(e.$slots, "prepend-input-content"),
93
- l("input", {
101
+ l("input", f({
94
102
  ref_key: "inputField",
95
- ref: N,
96
- type: te.value,
97
- value: y(P),
98
- id: q,
103
+ ref: P
104
+ }, e.$attrs, {
105
+ type: re.value,
106
+ value: y(F),
107
+ id: y(J),
108
+ name: e.name,
99
109
  placeholder: e.placeholder,
110
+ autocomplete: e.autocomplete,
111
+ required: e.required,
100
112
  disabled: e.disabled,
101
113
  readonly: e.readonly,
114
+ inputmode: e.inputmode,
115
+ minlength: e.minlength,
102
116
  maxlength: e.maxlength,
103
- autocomplete: "off",
104
- class: m(["w-full h-full bg-transparent focus:outline-none", [
105
- ne.value,
117
+ pattern: e.pattern,
118
+ spellcheck: e.spellcheck,
119
+ class: ["w-full h-full bg-transparent focus:outline-none", [
120
+ ie.value,
106
121
  e.textColor,
107
122
  e.placeholderColor,
108
123
  e.rounded,
109
124
  e.textCenter ? "text-center" : "",
110
125
  e.inputStyle
111
- ]]),
112
- "aria-invalid": y(R) ? "true" : "false",
113
- "aria-describedby": y(R) ? `error-${q}` : null,
114
- onInput: r[0] ||= (...e) => y(z) && y(z)(...e),
115
- onBlur: r[1] ||= (...e) => y(B) && y(B)(...e),
116
- onFocus: r[2] ||= (...e) => y(V) && y(V)(...e),
117
- onClick: r[3] ||= x((e) => M("handleClick"), ["stop"]),
118
- onKeydown: K,
119
- onKeyup: r[4] ||= (e) => M("keyUp", e)
120
- }, null, 42, w),
121
- e.clearable && y(P) ? (h(), o(t, {
126
+ ]],
127
+ "aria-invalid": y(z) ? "true" : "false",
128
+ "aria-describedby": y(z) ? `error-${y(J)}` : null,
129
+ onInput: r[0] ||= (...e) => y(B) && y(B)(...e),
130
+ onBlur: r[1] ||= (...e) => y(V) && y(V)(...e),
131
+ onFocus: r[2] ||= (...e) => y(H) && y(H)(...e),
132
+ onClick: r[3] ||= x((e) => N("handleClick"), ["stop"]),
133
+ onKeydown: q,
134
+ onKeyup: r[4] ||= (e) => N("keyUp", e)
135
+ }), null, 16, E),
136
+ e.clearable && y(F) ? (h(), o(t, {
122
137
  key: 2,
123
- onClick: y(G),
138
+ onClick: y(K),
124
139
  size: "small",
125
140
  color: "error",
126
141
  icon: y(n).close,
@@ -133,21 +148,21 @@ var S = /* @__PURE__ */ e({ default: () => j }), C = {
133
148
  "disabled"
134
149
  ])) : s("", !0),
135
150
  _(e.$slots, "default"),
136
- e.type === "password" && e.showPasswordToggle ? (h(), c("div", T, [u(t, {
137
- icon: $.value,
138
- onClick: ee
151
+ e.type === "password" && e.showPasswordToggle ? (h(), c("div", D, [u(t, {
152
+ icon: te.value,
153
+ onClick: ne
139
154
  }, null, 8, ["icon"])])) : s("", !0),
140
- Z.value ? (h(), c("div", {
155
+ Q.value ? (h(), c("div", {
141
156
  key: 4,
142
157
  class: m([e.appendInnerClass, "flex items-center justify-center min-w-[32px] h-full px-1"])
143
158
  }, [_(e.$slots, "append-inner")], 2)) : s("", !0),
144
- e.suffix ? (h(), c("div", E, v(e.suffix), 1)) : s("", !0)
145
- ], 2), e.hideDetails ? s("", !0) : (h(), c("div", D, [y(R) ? (h(), c("div", {
159
+ e.suffix ? (h(), c("div", ee, v(e.suffix), 1)) : s("", !0)
160
+ ], 2), e.hideDetails ? s("", !0) : (h(), c("div", O, [y(z) ? (h(), c("div", {
146
161
  key: 0,
147
- id: `error-${q}`,
162
+ id: `error-${y(J)}`,
148
163
  class: "text-red-500 text-sm text-center"
149
- }, v(y(L) || e.errorMessage), 9, O)) : e.hint && (e.persistentHint || y(I)) ? (h(), c("div", k, v(e.hint), 1)) : s("", !0), e.counter && e.maxlength ? (h(), c("div", A, v(y(P)?.length || 0) + " / " + v(e.maxlength), 1)) : s("", !0)]))], 16)], 512));
164
+ }, v(y(R) || e.errorMessage), 9, k)) : e.hint && (e.persistentHint || y(L)) ? (h(), c("div", A, v(e.hint), 1)) : s("", !0), e.counter && e.maxlength ? (h(), c("div", j, v(y(F)?.length || 0) + " / " + v(e.maxlength), 1)) : s("", !0)]))])], 512));
150
165
  }
151
166
  });
152
167
  //#endregion
153
- export { S as KunTextField_exports, j as default };
168
+ export { S as KunTextField_exports, M as default };
@@ -80,6 +80,22 @@ var e = {
80
80
  type: Array,
81
81
  default: () => []
82
82
  },
83
+ id: {
84
+ type: String,
85
+ default: null
86
+ },
87
+ name: {
88
+ type: String,
89
+ default: null
90
+ },
91
+ autocomplete: {
92
+ type: String,
93
+ default: "off"
94
+ },
95
+ required: {
96
+ type: Boolean,
97
+ default: !1
98
+ },
83
99
  disabled: {
84
100
  type: Boolean,
85
101
  default: !1
@@ -88,6 +104,14 @@ var e = {
88
104
  type: Boolean,
89
105
  default: !1
90
106
  },
107
+ inputmode: {
108
+ type: String,
109
+ default: null
110
+ },
111
+ minlength: {
112
+ type: [Number, String],
113
+ default: null
114
+ },
91
115
  clearable: {
92
116
  type: Boolean,
93
117
  default: !1
@@ -96,6 +120,14 @@ var e = {
96
120
  type: [Number, String],
97
121
  default: null
98
122
  },
123
+ pattern: {
124
+ type: String,
125
+ default: null
126
+ },
127
+ spellcheck: {
128
+ type: [Boolean, String],
129
+ default: null
130
+ },
99
131
  counter: {
100
132
  type: Boolean,
101
133
  default: !1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.621",
3
+ "version": "0.1.623",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",
@@ -22,7 +22,8 @@
22
22
  "autoprefixer": "^10.5.4",
23
23
  "prettier": "^3.9.6",
24
24
  "vite": "^8.2.2",
25
- "vite-plugin-vue-devtools": "^8.2.1"
25
+ "vite-plugin-vue-devtools": "^8.2.1",
26
+ "vue-router": "^5.2.0"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "tailwindcss": "^4.1.8",
@@ -54,8 +55,5 @@
54
55
  },
55
56
  "sideEffects": [
56
57
  "*.css"
57
- ],
58
- "dependencies": {
59
- "vue-router": "^4.0.0 || ^5.0.0"
60
- }
58
+ ]
61
59
  }