adverich-kun-ui 0.1.374 → 0.1.375

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,43 +1,43 @@
1
- import { getCurrentInstance as P, useSlots as R, computed as U, createElementBlock as s, openBlock as l, createCommentVNode as n, createElementVNode as d, normalizeClass as b, unref as r, toDisplayString as u, mergeProps as H, createBlock as I, renderSlot as V, Fragment as K, renderList as L } from "vue";
2
- import { KunNumberFieldProps as q } from "../composables/KunNumberFieldProps.js";
3
- import { useKunNumberField as G } from "../composables/useKunNumberFieldComposable.js";
1
+ import { getCurrentInstance as P, useSlots as R, watch as U, computed as H, createElementBlock as s, openBlock as l, createCommentVNode as n, createElementVNode as d, normalizeClass as b, unref as r, toDisplayString as u, mergeProps as L, createBlock as I, renderSlot as V, Fragment as K, renderList as q } from "vue";
2
+ import { KunNumberFieldProps as G } from "../composables/KunNumberFieldProps.js";
3
+ import { useKunNumberField as J } from "../composables/useKunNumberFieldComposable.js";
4
4
  import j from "../../../KunIcon/src/components/KunIcon.vue.js";
5
- const J = {
5
+ const O = {
6
6
  key: 0,
7
7
  class: "h-full"
8
- }, O = ["disabled"], Q = {
8
+ }, Q = ["disabled"], T = {
9
9
  key: 1,
10
10
  class: "mx-2"
11
- }, T = {
11
+ }, W = {
12
12
  key: 2,
13
13
  class: "flex items-center justify-center h-full pl-1"
14
- }, W = ["value", "placeholder", "readonly", "disabled", "maxlength", "aria-invalid"], X = ["disabled"], Y = {
14
+ }, X = ["value", "placeholder", "readonly", "disabled", "maxlength", "aria-invalid"], Y = ["disabled"], Z = {
15
15
  key: 0,
16
16
  class: "flex items-center h-full"
17
- }, Z = ["disabled"], _ = ["disabled"], ee = {
17
+ }, _ = ["disabled"], ee = ["disabled"], te = {
18
18
  key: 1,
19
19
  class: "flex flex-col items-center justify-center border-l border-slate-600"
20
- }, te = ["disabled"], oe = ["disabled"], re = {
20
+ }, oe = ["disabled"], re = ["disabled"], le = {
21
21
  key: 5,
22
22
  class: "flex items-center justify-center h-full pr-1"
23
- }, le = {
23
+ }, se = {
24
24
  key: 6,
25
25
  class: "h-full"
26
- }, se = ["disabled"], ne = {
26
+ }, ne = ["disabled"], de = {
27
27
  key: 7,
28
28
  class: "ml-2"
29
- }, de = {
29
+ }, ie = {
30
30
  key: 0,
31
31
  class: "h-[1.25rem]"
32
- }, ie = {
32
+ }, ae = {
33
33
  key: 0,
34
34
  class: "text-red-500 text-sm text-center"
35
- }, ae = { key: 0 }, ue = { key: 1 }, pe = {
35
+ }, ue = { key: 0 }, pe = { key: 1 }, be = {
36
36
  key: 1,
37
37
  class: "text-xs text-center"
38
- }, ce = {
38
+ }, me = {
39
39
  __name: "KunNumberField",
40
- props: q,
40
+ props: G,
41
41
  emits: [
42
42
  "update:modelValue",
43
43
  "focus",
@@ -61,7 +61,7 @@ const J = {
61
61
  handleFocus: g,
62
62
  isActive: $,
63
63
  handleBlur: C
64
- } = G(p, y);
64
+ } = J(p, y);
65
65
  D({
66
66
  numberInput: k,
67
67
  rootRef: v,
@@ -69,10 +69,10 @@ const J = {
69
69
  var e;
70
70
  return (e = k.value) == null ? void 0 : e.focus();
71
71
  }
72
- }), watch(() => p.modelValue, (e) => {
72
+ }), U(() => p.modelValue, (e) => {
73
73
  f.value = e;
74
74
  });
75
- const z = U(() => p.density === "compact" ? "p-1" : p.density === "comfortable" ? "p-2" : "p-3");
75
+ const z = H(() => p.density === "compact" ? "p-1" : p.density === "comfortable" ? "p-2" : "p-3");
76
76
  return (e, o) => (l(), s("div", {
77
77
  class: "w-full flex flex-col relative",
78
78
  ref_key: "rootRef",
@@ -87,7 +87,7 @@ const J = {
87
87
  r($) || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
88
88
  ])
89
89
  }, u(e.label), 3)) : n("", !0),
90
- d("div", H({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
90
+ d("div", L({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
91
91
  d("div", {
92
92
  class: b(["flex items-center w-full h-full border", [
93
93
  e.bgInput,
@@ -97,16 +97,16 @@ const J = {
97
97
  e.error ? "bg-red-200 dark:bg-red-900" : ""
98
98
  ]])
99
99
  }, [
100
- !e.noArrows && e.controlVariant === "split" ? (l(), s("div", J, [
100
+ !e.noArrows && e.controlVariant === "split" ? (l(), s("div", O, [
101
101
  d("button", {
102
102
  type: "button",
103
103
  class: "p-3 text-lg border-r border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
104
104
  onClick: o[0] || (o[0] = (...t) => r(a) && r(a)(...t)),
105
105
  disabled: e.disabled || e.readonly
106
- }, "−", 8, O)
106
+ }, "−", 8, Q)
107
107
  ])) : n("", !0),
108
- e.prefix ? (l(), s("div", Q, u(e.prefix), 1)) : n("", !0),
109
- e.prependIcon || x ? (l(), s("div", T, [
108
+ e.prefix ? (l(), s("div", T, u(e.prefix), 1)) : n("", !0),
109
+ e.prependIcon || x ? (l(), s("div", W, [
110
110
  e.prependIcon ? (l(), I(j, {
111
111
  key: 0,
112
112
  icon: e.prependIcon
@@ -134,30 +134,30 @@ const J = {
134
134
  onKeyup: o[6] || (o[6] = (t) => y("keyUp", t)),
135
135
  inputmode: "decimal",
136
136
  pattern: "[0-9]+([\\.,][0-9]+)?"
137
- }, null, 42, W)),
137
+ }, null, 42, X)),
138
138
  e.clearable && r(f) != null ? (l(), s("button", {
139
139
  key: 3,
140
140
  type: "button",
141
141
  onClick: o[7] || (o[7] = (...t) => r(h) && r(h)(...t)),
142
142
  class: b(["ml-2", e.textColor]),
143
143
  disabled: e.disabled || e.readonly
144
- }, " × ", 10, X)) : n("", !0),
144
+ }, " × ", 10, Y)) : n("", !0),
145
145
  e.noArrows ? n("", !0) : (l(), s(K, { key: 4 }, [
146
- e.controlVariant === "default" ? (l(), s("div", Y, [
146
+ e.controlVariant === "default" ? (l(), s("div", Z, [
147
147
  d("button", {
148
148
  type: "button",
149
149
  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",
150
150
  onClick: o[8] || (o[8] = (...t) => r(i) && r(i)(...t)),
151
151
  disabled: e.disabled || e.readonly
152
- }, " ▲ ", 8, Z),
152
+ }, " ▲ ", 8, _),
153
153
  d("button", {
154
154
  type: "button",
155
155
  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",
156
156
  onClick: o[9] || (o[9] = (...t) => r(a) && r(a)(...t)),
157
157
  disabled: e.disabled || e.readonly
158
- }, " ▼ ", 8, _)
158
+ }, " ▼ ", 8, ee)
159
159
  ])) : n("", !0),
160
- e.controlVariant === "stacked" ? (l(), s("div", ee, [
160
+ e.controlVariant === "stacked" ? (l(), s("div", te, [
161
161
  d("div", {
162
162
  class: "border-b border-slate-600 pb-1 px-3 flex hover:opacity-80 cursor-pointer",
163
163
  onClick: o[10] || (o[10] = (...t) => r(i) && r(i)(...t))
@@ -166,7 +166,7 @@ const J = {
166
166
  type: "button",
167
167
  class: "text-xs text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer",
168
168
  disabled: e.disabled || e.readonly
169
- }, "▲", 8, te)
169
+ }, "▲", 8, oe)
170
170
  ]),
171
171
  d("div", {
172
172
  class: "border-t border-slate-600 pt-1 px-3 flex hover:opacity-80 cursor-pointer",
@@ -176,37 +176,37 @@ const J = {
176
176
  type: "button",
177
177
  class: "text-xs text-black dark:text-white hover:text-black/80 dark:hover:text-white/80 disabled:opacity-50 cursor-pointer",
178
178
  disabled: e.disabled || e.readonly
179
- }, "▼", 8, oe)
179
+ }, "▼", 8, re)
180
180
  ])
181
181
  ])) : n("", !0)
182
182
  ], 64)),
183
- e.appendIcon || B ? (l(), s("div", re, [
183
+ e.appendIcon || B ? (l(), s("div", le, [
184
184
  e.appendIcon ? (l(), I(j, {
185
185
  key: 0,
186
186
  icon: e.appendIcon
187
187
  }, null, 8, ["icon"])) : V(e.$slots, "append-icon", { key: 1 })
188
188
  ])) : n("", !0),
189
- !e.noArrows && e.controlVariant === "split" ? (l(), s("div", le, [
189
+ !e.noArrows && e.controlVariant === "split" ? (l(), s("div", se, [
190
190
  d("button", {
191
191
  type: "button",
192
192
  class: "p-3 text-lg border-l border-slate-600 text-black dark:text-white disabled:opacity-50 cursor-pointer hover:opacity-80",
193
193
  onClick: o[12] || (o[12] = (...t) => r(i) && r(i)(...t)),
194
194
  disabled: e.disabled || e.readonly
195
- }, "+", 8, se)
195
+ }, "+", 8, ne)
196
196
  ])) : n("", !0),
197
- e.suffix ? (l(), s("div", ne, u(e.suffix), 1)) : n("", !0)
197
+ e.suffix ? (l(), s("div", de, u(e.suffix), 1)) : n("", !0)
198
198
  ], 2),
199
- e.hideDetails ? n("", !0) : (l(), s("div", de, [
200
- e.error || e.errorMessages ? (l(), s("div", ie, [
201
- Array.isArray(e.errorMessages) ? (l(), s("div", ae, [
202
- (l(!0), s(K, null, L(e.errorMessages, (t, E) => (l(), s("div", { key: E }, u(t), 1))), 128))
203
- ])) : typeof e.errorMessages == "string" ? (l(), s("div", ue, u(e.errorMessages), 1)) : n("", !0)
204
- ])) : e.hint && (e.persistentHint || r(w)) ? (l(), s("div", pe, u(e.hint), 1)) : n("", !0)
199
+ e.hideDetails ? n("", !0) : (l(), s("div", ie, [
200
+ e.error || e.errorMessages ? (l(), s("div", ae, [
201
+ Array.isArray(e.errorMessages) ? (l(), s("div", ue, [
202
+ (l(!0), s(K, null, q(e.errorMessages, (t, E) => (l(), s("div", { key: E }, u(t), 1))), 128))
203
+ ])) : typeof e.errorMessages == "string" ? (l(), s("div", pe, u(e.errorMessages), 1)) : n("", !0)
204
+ ])) : e.hint && (e.persistentHint || r(w)) ? (l(), s("div", be, u(e.hint), 1)) : n("", !0)
205
205
  ]))
206
206
  ], 16)
207
207
  ], 512));
208
208
  }
209
209
  };
210
210
  export {
211
- ce as default
211
+ me as default
212
212
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.374",
3
+ "version": "0.1.375",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",