adverich-kun-ui 0.1.265 → 0.1.266

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,11 +1,8 @@
1
- import { getCurrentInstance as z, useSlots as E, computed as P, createElementBlock as l, openBlock as s, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as o, toDisplayString as u, mergeProps as R, createBlock as C, renderSlot as I, Fragment as V, renderList as U } from "vue";
2
- import { KunNumberFieldProps as H } from "../composables/KunNumberFieldProps.js";
3
- import { useKunNumberField as L } from "../composables/useKunNumberFieldComposable.js";
4
- import j from "../../../KunIcon/src/components/KunIcon.vue.js";
5
- const q = {
6
- class: "w-full flex flex-col relative",
7
- ref: "rootRef"
8
- }, G = {
1
+ import { getCurrentInstance as E, useSlots as P, computed as R, createElementBlock as l, openBlock as s, createCommentVNode as n, createElementVNode as i, normalizeClass as p, unref as o, toDisplayString as u, mergeProps as U, createBlock as I, renderSlot as V, Fragment as j, renderList as H } from "vue";
2
+ import { KunNumberFieldProps as L } from "../composables/KunNumberFieldProps.js";
3
+ import { useKunNumberField as q } from "../composables/useKunNumberFieldComposable.js";
4
+ import x from "../../../KunIcon/src/components/KunIcon.vue.js";
5
+ const G = {
9
6
  key: 0,
10
7
  class: "h-full"
11
8
  }, J = ["disabled"], O = {
@@ -38,9 +35,9 @@ const q = {
38
35
  }, de = { key: 0 }, ae = { key: 1 }, ue = {
39
36
  key: 1,
40
37
  class: "text-xs text-center"
41
- }, fe = {
38
+ }, ke = {
42
39
  __name: "KunNumberField",
43
- props: H,
40
+ props: L,
44
41
  emits: [
45
42
  "update:modelValue",
46
43
  "focusInput",
@@ -49,41 +46,46 @@ const q = {
49
46
  "keyDown",
50
47
  "keyUp"
51
48
  ],
52
- setup(x, { expose: A, emit: D }) {
53
- const b = x, y = D, c = `number-input-${z().uid}`, f = E(), F = !!f["prepend-icon"], K = !!f["append-icon"], {
54
- inputValue: k,
49
+ setup(A, { expose: D, emit: F }) {
50
+ const b = A, y = F, f = `number-input-${E().uid}`, k = P(), K = !!k["prepend-icon"], B = !!k["append-icon"], {
51
+ inputValue: c,
55
52
  numberInput: m,
56
- inputKey: B,
57
- updateValue: M,
53
+ rootRef: h,
54
+ inputKey: M,
55
+ updateValue: N,
58
56
  onIncrement: d,
59
57
  onDecrement: a,
60
- onClear: h,
61
- focus: v,
62
- handleFocus: w,
63
- isActive: N,
64
- handleBlur: g
65
- } = L(b, y);
66
- A({
58
+ onClear: v,
59
+ focus: w,
60
+ handleFocus: g,
61
+ isActive: S,
62
+ handleBlur: C
63
+ } = q(b, y);
64
+ D({
67
65
  numberInput: m,
68
- rootRef
66
+ rootRef: h
69
67
  });
70
- const S = P(() => b.density === "compact" ? "p-1" : b.density === "comfortable" ? "p-2" : "p-3");
71
- return (e, r) => (s(), l("div", q, [
68
+ const $ = R(() => b.density === "compact" ? "p-1" : b.density === "comfortable" ? "p-2" : "p-3");
69
+ return (e, r) => (s(), l("div", {
70
+ class: "w-full flex flex-col relative",
71
+ ref_key: "rootRef",
72
+ ref: h
73
+ }, [
72
74
  e.label ? (s(), l("label", {
73
75
  key: 0,
74
- for: c,
76
+ for: f,
75
77
  class: p([
76
78
  e.labelColor,
77
79
  "absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10",
78
- o(N) || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
80
+ o(S) || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"
79
81
  ])
80
82
  }, u(e.label), 3)) : n("", !0),
81
- i("div", R({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
83
+ i("div", U({ class: "w-full flex flex-col justify-center relative" }, e.$attrs), [
82
84
  i("div", {
83
85
  class: p(["flex items-center w-full h-full border", [
84
86
  e.bgInput,
85
87
  e.rounded,
86
- o(v) ? "border-blue-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
88
+ o(w) ? "border-blue-600 shadow-[0_0_0_1px_rgba(59,130,246,0.5)]" : e.borderColor,
87
89
  e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-text",
88
90
  e.error ? "bg-red-200 dark:bg-red-900" : ""
89
91
  ]])
@@ -97,40 +99,40 @@ const q = {
97
99
  }, "−", 8, J)
98
100
  ])) : n("", !0),
99
101
  e.prefix ? (s(), l("div", O, u(e.prefix), 1)) : n("", !0),
100
- e.prependIcon || F ? (s(), l("div", Q, [
101
- e.prependIcon ? (s(), C(j, {
102
+ e.prependIcon || K ? (s(), l("div", Q, [
103
+ e.prependIcon ? (s(), I(x, {
102
104
  key: 0,
103
105
  icon: e.prependIcon
104
- }, null, 8, ["icon"])) : I(e.$slots, "prepend-icon", { key: 1 })
106
+ }, null, 8, ["icon"])) : V(e.$slots, "prepend-icon", { key: 1 })
105
107
  ])) : n("", !0),
106
108
  (s(), l("input", {
107
- id: c,
109
+ id: f,
108
110
  ref_key: "numberInput",
109
111
  ref: m,
110
- key: o(B),
112
+ key: o(M),
111
113
  type: "text",
112
- value: o(k),
114
+ value: o(c),
113
115
  placeholder: e.placeholder,
114
116
  readonly: e.readonly,
115
117
  disabled: e.disabled,
116
118
  maxlength: e.maxlength,
117
119
  autocomplete: "off",
118
- class: p(["w-full h-full bg-transparent rounded focus:outline-none", [S.value, e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
120
+ class: p(["w-full h-full bg-transparent rounded focus:outline-none", [$.value, e.textColor, e.placeholderColor, e.textCenter ? "text-center" : ""]]),
119
121
  "aria-invalid": e.error ? "true" : "false",
120
- onInput: r[1] || (r[1] = (t) => o(M)(t.target.value)),
121
- onBlur: r[2] || (r[2] = (...t) => o(g) && o(g)(...t)),
122
- onFocus: r[3] || (r[3] = (...t) => o(w) && o(w)(...t)),
122
+ onInput: r[1] || (r[1] = (t) => o(N)(t.target.value)),
123
+ onBlur: r[2] || (r[2] = (...t) => o(C) && o(C)(...t)),
124
+ onFocus: r[3] || (r[3] = (...t) => o(g) && o(g)(...t)),
123
125
  onKeydown: r[4] || (r[4] = (t) => y("keyDown", t)),
124
126
  onKeyup: r[5] || (r[5] = (t) => y("keyUp", t))
125
127
  }, null, 42, T)),
126
- e.clearable && o(k) != null ? (s(), l("button", {
128
+ e.clearable && o(c) != null ? (s(), l("button", {
127
129
  key: 3,
128
130
  type: "button",
129
- onClick: r[6] || (r[6] = (...t) => o(h) && o(h)(...t)),
131
+ onClick: r[6] || (r[6] = (...t) => o(v) && o(v)(...t)),
130
132
  class: p(["ml-2", e.textColor]),
131
133
  disabled: e.disabled || e.readonly
132
134
  }, " × ", 10, W)) : n("", !0),
133
- e.noArrows ? n("", !0) : (s(), l(V, { key: 4 }, [
135
+ e.noArrows ? n("", !0) : (s(), l(j, { key: 4 }, [
134
136
  e.controlVariant === "default" ? (s(), l("div", X, [
135
137
  i("button", {
136
138
  type: "button",
@@ -168,11 +170,11 @@ const q = {
168
170
  ])
169
171
  ])) : n("", !0)
170
172
  ], 64)),
171
- e.appendIcon || K ? (s(), l("div", oe, [
172
- e.appendIcon ? (s(), C(j, {
173
+ e.appendIcon || B ? (s(), l("div", oe, [
174
+ e.appendIcon ? (s(), I(x, {
173
175
  key: 0,
174
176
  icon: e.appendIcon
175
- }, null, 8, ["icon"])) : I(e.$slots, "append-icon", { key: 1 })
177
+ }, null, 8, ["icon"])) : V(e.$slots, "append-icon", { key: 1 })
176
178
  ])) : n("", !0),
177
179
  !e.noArrows && e.controlVariant === "split" ? (s(), l("div", re, [
178
180
  i("button", {
@@ -187,14 +189,14 @@ const q = {
187
189
  e.hideDetails ? n("", !0) : (s(), l("div", ne, [
188
190
  e.error || e.errorMessages ? (s(), l("div", ie, [
189
191
  Array.isArray(e.errorMessages) ? (s(), l("div", de, [
190
- (s(!0), l(V, null, U(e.errorMessages, (t, $) => (s(), l("div", { key: $ }, u(t), 1))), 128))
192
+ (s(!0), l(j, null, H(e.errorMessages, (t, z) => (s(), l("div", { key: z }, u(t), 1))), 128))
191
193
  ])) : typeof e.errorMessages == "string" ? (s(), l("div", ae, u(e.errorMessages), 1)) : n("", !0)
192
- ])) : e.hint && (e.persistentHint || o(v)) ? (s(), l("div", ue, u(e.hint), 1)) : n("", !0)
194
+ ])) : e.hint && (e.persistentHint || o(w)) ? (s(), l("div", ue, u(e.hint), 1)) : n("", !0)
193
195
  ]))
194
196
  ], 16)
195
197
  ], 512));
196
198
  }
197
199
  };
198
200
  export {
199
- fe as default
201
+ ke as default
200
202
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.265",
3
+ "version": "0.1.266",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",