adverich-kun-ui 0.1.221 → 0.1.223

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.
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as K, useSlots as D, createElementBlock as l, openBlock as r, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as t, toDisplayString as u, mergeProps as z, createBlock as v, renderSlot as g, Fragment as w, renderList as E } from "vue";
1
+ import { getCurrentInstance as K, useSlots as D, createElementBlock as l, openBlock as o, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as t, toDisplayString as u, mergeProps as z, createBlock as v, renderSlot as g, Fragment as w, renderList as E } from "vue";
2
2
  import { KunNumberFieldProps as P } from "../composables/KunNumberFieldProps.js";
3
3
  import { useKunNumberField as H } from "../composables/useKunNumberFieldComposable.js";
4
4
  import C from "../../../KunIcon/src/components/KunIcon.vue.js";
@@ -10,7 +10,7 @@ const L = { class: "w-full flex flex-col relative" }, q = {
10
10
  class: "mr-2"
11
11
  }, O = {
12
12
  key: 2,
13
- class: "flex items-center justify-center min-w-[32px] h-full px-1"
13
+ class: "flex items-center justify-center h-full px-1"
14
14
  }, Q = ["value", "placeholder", "readonly", "disabled", "maxlength", "aria-invalid"], R = ["disabled"], T = {
15
15
  key: 0,
16
16
  class: "flex items-center h-full"
@@ -19,14 +19,14 @@ const L = { class: "w-full flex flex-col relative" }, q = {
19
19
  class: "flex flex-col items-center justify-center border-l border-slate-600"
20
20
  }, Y = ["disabled"], Z = ["disabled"], _ = {
21
21
  key: 5,
22
- class: "flex items-center justify-center min-w-[32px] h-full px-1"
22
+ class: "flex items-center justify-center h-full px-1"
23
23
  }, ee = {
24
24
  key: 6,
25
25
  class: "h-full"
26
- }, te = ["disabled"], re = {
26
+ }, te = ["disabled"], oe = {
27
27
  key: 7,
28
28
  class: "ml-2"
29
- }, oe = {
29
+ }, re = {
30
30
  key: 0,
31
31
  class: "h-[1.25rem]"
32
32
  }, se = {
@@ -39,8 +39,8 @@ const L = { class: "w-full flex flex-col relative" }, q = {
39
39
  __name: "KunNumberField",
40
40
  props: P,
41
41
  emits: ["update:modelValue"],
42
- setup(I, { emit: x }) {
43
- const V = I, j = x, b = `number-input-${K().uid}`, y = D(), A = !!y["prepend-icon"], F = !!y["append-icon"], {
42
+ setup(I, { emit: V }) {
43
+ const j = I, A = V, b = `number-input-${K().uid}`, y = D(), F = !!y["prepend-icon"], x = !!y["append-icon"], {
44
44
  inputValue: c,
45
45
  numberInput: B,
46
46
  inputKey: M,
@@ -52,9 +52,9 @@ const L = { class: "w-full flex flex-col relative" }, q = {
52
52
  handleFocus: h,
53
53
  isActive: S,
54
54
  handleBlur: m
55
- } = H(V, j);
56
- return (e, s) => (r(), l("div", L, [
57
- e.label ? (r(), l("label", {
55
+ } = H(j, A);
56
+ return (e, s) => (o(), l("div", L, [
57
+ e.label ? (o(), l("label", {
58
58
  key: 0,
59
59
  for: b,
60
60
  class: p([
@@ -73,19 +73,22 @@ const L = { class: "w-full flex flex-col relative" }, q = {
73
73
  e.error ? "bg-red-200 dark:bg-red-900" : ""
74
74
  ]])
75
75
  }, [
76
- !e.noArrows && e.controlVariant === "split" ? (r(), l("div", q, [
76
+ !e.noArrows && e.controlVariant === "split" ? (o(), l("div", q, [
77
77
  i("button", {
78
78
  type: "button",
79
79
  class: "p-3 text-lg border-r border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
80
- onClick: s[0] || (s[0] = (...o) => t(a) && t(a)(...o)),
80
+ onClick: s[0] || (s[0] = (...r) => t(a) && t(a)(...r)),
81
81
  disabled: e.disabled || e.readonly
82
82
  }, "−", 8, G)
83
83
  ])) : n("", !0),
84
- e.prefix ? (r(), l("div", J, u(e.prefix), 1)) : n("", !0),
85
- e.prependIcon || A ? (r(), l("div", O, [
86
- e.prependIcon ? (r(), v(C, { key: 0 })) : g(e.$slots, "prepend-icon", { key: 1 })
84
+ e.prefix ? (o(), l("div", J, u(e.prefix), 1)) : n("", !0),
85
+ e.prependIcon || F ? (o(), l("div", O, [
86
+ e.prependIcon ? (o(), v(C, {
87
+ key: 0,
88
+ icon: e.prependIcon
89
+ }, null, 8, ["icon"])) : g(e.$slots, "prepend-icon", { key: 1 })
87
90
  ])) : n("", !0),
88
- (r(), l("input", {
91
+ (o(), l("input", {
89
92
  id: b,
90
93
  ref_key: "numberInput",
91
94
  ref: B,
@@ -97,38 +100,38 @@ const L = { class: "w-full flex flex-col relative" }, q = {
97
100
  disabled: e.disabled,
98
101
  maxlength: e.maxlength,
99
102
  autocomplete: "off",
100
- class: p(["w-full h-full bg-transparent rounded focus:outline-none p-3", [e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
103
+ class: p(["w-full h-full bg-transparent rounded focus:outline-none p-3", [e.inputClass, e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
101
104
  "aria-invalid": e.error ? "true" : "false",
102
- onInput: s[1] || (s[1] = (o) => t(N)(o.target.value)),
103
- onFocus: s[2] || (s[2] = (...o) => t(h) && t(h)(...o)),
104
- onBlur: s[3] || (s[3] = (...o) => t(m) && t(m)(...o))
105
+ onInput: s[1] || (s[1] = (r) => t(N)(r.target.value)),
106
+ onFocus: s[2] || (s[2] = (...r) => t(h) && t(h)(...r)),
107
+ onBlur: s[3] || (s[3] = (...r) => t(m) && t(m)(...r))
105
108
  }, null, 42, Q)),
106
- e.clearable && t(c) != null ? (r(), l("button", {
109
+ e.clearable && t(c) != null ? (o(), l("button", {
107
110
  key: 3,
108
111
  type: "button",
109
- onClick: s[4] || (s[4] = (...o) => t(f) && t(f)(...o)),
112
+ onClick: s[4] || (s[4] = (...r) => t(f) && t(f)(...r)),
110
113
  class: p(["ml-2", e.textColor]),
111
114
  disabled: e.disabled || e.readonly
112
115
  }, " × ", 10, R)) : n("", !0),
113
- e.noArrows ? n("", !0) : (r(), l(w, { key: 4 }, [
114
- e.controlVariant === "default" ? (r(), l("div", T, [
116
+ e.noArrows ? n("", !0) : (o(), l(w, { key: 4 }, [
117
+ e.controlVariant === "default" ? (o(), l("div", T, [
115
118
  i("button", {
116
119
  type: "button",
117
120
  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",
118
- onClick: s[5] || (s[5] = (...o) => t(d) && t(d)(...o)),
121
+ onClick: s[5] || (s[5] = (...r) => t(d) && t(d)(...r)),
119
122
  disabled: e.disabled || e.readonly
120
123
  }, " ▲ ", 8, U),
121
124
  i("button", {
122
125
  type: "button",
123
126
  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",
124
- onClick: s[6] || (s[6] = (...o) => t(a) && t(a)(...o)),
127
+ onClick: s[6] || (s[6] = (...r) => t(a) && t(a)(...r)),
125
128
  disabled: e.disabled || e.readonly
126
129
  }, " ▼ ", 8, W)
127
130
  ])) : n("", !0),
128
- e.controlVariant === "stacked" ? (r(), l("div", X, [
131
+ e.controlVariant === "stacked" ? (o(), l("div", X, [
129
132
  i("div", {
130
133
  class: "border-b border-slate-600 pb-1 px-3 flex hover:opacity-80 cursor-pointer",
131
- onClick: s[7] || (s[7] = (...o) => t(d) && t(d)(...o))
134
+ onClick: s[7] || (s[7] = (...r) => t(d) && t(d)(...r))
132
135
  }, [
133
136
  i("button", {
134
137
  type: "button",
@@ -138,7 +141,7 @@ const L = { class: "w-full flex flex-col relative" }, q = {
138
141
  ]),
139
142
  i("div", {
140
143
  class: "border-t border-slate-600 pt-1 px-3 flex hover:opacity-80 cursor-pointer",
141
- onClick: s[8] || (s[8] = (...o) => t(a) && t(a)(...o))
144
+ onClick: s[8] || (s[8] = (...r) => t(a) && t(a)(...r))
142
145
  }, [
143
146
  i("button", {
144
147
  type: "button",
@@ -148,25 +151,28 @@ const L = { class: "w-full flex flex-col relative" }, q = {
148
151
  ])
149
152
  ])) : n("", !0)
150
153
  ], 64)),
151
- e.appendIcon || F ? (r(), l("div", _, [
152
- e.appendIcon ? (r(), v(C, { key: 0 })) : g(e.$slots, "append-icon", { key: 1 })
154
+ e.appendIcon || x ? (o(), l("div", _, [
155
+ e.appendIcon ? (o(), v(C, {
156
+ key: 0,
157
+ icon: e.appendIcon
158
+ }, null, 8, ["icon"])) : g(e.$slots, "append-icon", { key: 1 })
153
159
  ])) : n("", !0),
154
- !e.noArrows && e.controlVariant === "split" ? (r(), l("div", ee, [
160
+ !e.noArrows && e.controlVariant === "split" ? (o(), l("div", ee, [
155
161
  i("button", {
156
162
  type: "button",
157
163
  class: "p-3 text-lg border-l border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
158
- onClick: s[9] || (s[9] = (...o) => t(d) && t(d)(...o)),
164
+ onClick: s[9] || (s[9] = (...r) => t(d) && t(d)(...r)),
159
165
  disabled: e.disabled || e.readonly
160
166
  }, "+", 8, te)
161
167
  ])) : n("", !0),
162
- e.suffix ? (r(), l("div", re, u(e.suffix), 1)) : n("", !0)
168
+ e.suffix ? (o(), l("div", oe, u(e.suffix), 1)) : n("", !0)
163
169
  ], 2),
164
- e.hideDetails ? n("", !0) : (r(), l("div", oe, [
165
- e.error || e.errorMessages ? (r(), l("div", se, [
166
- Array.isArray(e.errorMessages) ? (r(), l("div", le, [
167
- (r(!0), l(w, null, E(e.errorMessages, (o, $) => (r(), l("div", { key: $ }, u(o), 1))), 128))
168
- ])) : typeof e.errorMessages == "string" ? (r(), l("div", ne, u(e.errorMessages), 1)) : n("", !0)
169
- ])) : e.hint && (e.persistentHint || t(k)) ? (r(), l("div", ie, u(e.hint), 1)) : n("", !0)
170
+ e.hideDetails ? n("", !0) : (o(), l("div", re, [
171
+ e.error || e.errorMessages ? (o(), l("div", se, [
172
+ Array.isArray(e.errorMessages) ? (o(), l("div", le, [
173
+ (o(!0), l(w, null, E(e.errorMessages, (r, $) => (o(), l("div", { key: $ }, u(r), 1))), 128))
174
+ ])) : typeof e.errorMessages == "string" ? (o(), l("div", ne, u(e.errorMessages), 1)) : n("", !0)
175
+ ])) : e.hint && (e.persistentHint || t(k)) ? (o(), l("div", ie, u(e.hint), 1)) : n("", !0)
170
176
  ]))
171
177
  ], 16)
172
178
  ]));
@@ -11,6 +11,7 @@ const e = {
11
11
  prependIcon: String,
12
12
  appendIcon: String,
13
13
  // Estilo y diseño
14
+ inputClass: { type: String, default: "" },
14
15
  rounded: { type: String, default: "rounded" },
15
16
  borderColor: { type: String, default: "border-gray-300 dark:border-gray-700" },
16
17
  textColor: { type: String, default: "text-black dark:text-white" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.221",
3
+ "version": "0.1.223",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",