adverich-kun-ui 0.1.121 → 0.1.122

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