adverich-kun-ui 0.1.185 → 0.1.186

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 { ref as L, computed as p, createElementBlock as l, openBlock as s, normalizeClass as f, renderSlot as i, createElementVNode as a, normalizeProps as y, guardReactiveProps as k, unref as n, createCommentVNode as d, toDisplayString as g, createBlock as h, resolveDynamicComponent as C, Fragment as q, renderList as J, withDirectives as O, vShow as Q, createTextVNode as U } from "vue";
1
+ import { ref as L, computed as p, createElementBlock as l, openBlock as s, normalizeClass as m, renderSlot as i, createElementVNode as a, normalizeProps as y, guardReactiveProps as k, unref as n, createCommentVNode as d, toDisplayString as b, createBlock as h, resolveDynamicComponent as C, Fragment as q, renderList as J, withDirectives as O, vShow as Q, createTextVNode as U } from "vue";
2
2
  import { kunTextareaProps as W } from "../composables/KunTextareaProps.js";
3
3
  import { useKunTextarea as X } from "../composables/useKunTextareaComposable.js";
4
4
  import { renderIconSlot as $ } from "../../../../utils/renderIcon.js";
@@ -37,7 +37,7 @@ const Y = {
37
37
  validate: M,
38
38
  reset: T,
39
39
  resetValidation: A,
40
- hasError: b,
40
+ hasError: f,
41
41
  displayedMessages: w
42
42
  } = X(r, V, u), E = p(() => {
43
43
  const e = !!r.bgColor;
@@ -77,12 +77,12 @@ const Y = {
77
77
  [`rounded-${r.rounded}`]: typeof r.rounded == "string" || typeof r.rounded == "number",
78
78
  "shadow-md": r.variant === "solo" && !r.flat,
79
79
  "shadow-none": r.flat,
80
- [`text-${r.baseColor}`]: r.baseColor,
81
- [`bg-${r.bgColor}`]: r.bgColor,
80
+ [`text-${r.textColor}`]: r.textColor,
81
+ [`${r.bgColor}`]: r.bgColor,
82
82
  "text-gray-500 bg-gray-200": r.disabled,
83
83
  "focus:outline-none focus:ring-2": !r.disabled,
84
- [`focus:ring-${r.color}`]: r.color && !r.disabled && !b.value,
85
- "border-red-500 ring-red-500 focus:ring-red-500": b.value,
84
+ [`focus:ring-${r.color}`]: r.color && !r.disabled && !f.value,
85
+ "border-red-500 ring-red-500 focus:ring-red-500": f.value,
86
86
  "resize-none": r.noResize || r.autoGrow,
87
87
  resize: !r.noResize && !r.autoGrow
88
88
  }
@@ -91,7 +91,7 @@ const Y = {
91
91
  r.class,
92
92
  r.wrapperClass
93
93
  ]), I = p(() => r.counter === !0 ? 25 : typeof r.counter == "number" || typeof r.counter == "string" ? r.counter : null), H = p(() => r.persistentCounter ? !0 : !!r.counter && v.value), K = p(() => typeof r.clearIcon == "string" ? r.clearIcon : "i-heroicons-x-mark-20-solid");
94
- function m(e, t) {
94
+ function g(e, t) {
95
95
  V(`click:${t}`, e);
96
96
  }
97
97
  return R({
@@ -99,9 +99,9 @@ const Y = {
99
99
  reset: T,
100
100
  resetValidation: A,
101
101
  errorMessages: w,
102
- isValid: p(() => !b.value)
102
+ isValid: p(() => !f.value)
103
103
  }), (e, t) => (s(), l("div", {
104
- class: f(P.value)
104
+ class: m(P.value)
105
105
  }, [
106
106
  i(e.$slots, "label", y(k({ label: e.label, isFocused: n(v), isActive: !!n(c), controlRef: u.value, focus: () => {
107
107
  var o;
@@ -110,13 +110,13 @@ const Y = {
110
110
  var o;
111
111
  return (o = u.value) == null ? void 0 : o.blur();
112
112
  }, props: r })), () => [
113
- e.label ? (s(), l("label", Y, g(e.label), 1)) : d("", !0)
113
+ e.label ? (s(), l("label", Y, b(e.label), 1)) : d("", !0)
114
114
  ]),
115
115
  a("div", Z, [
116
116
  e.prependIcon || e.$slots.prepend ? (s(), l("div", x, [
117
117
  i(e.$slots, "prepend", y(k(e.prependSlotBindings)), () => [
118
118
  a("div", {
119
- onClick: t[0] || (t[0] = (o) => m(o, "prepend"))
119
+ onClick: t[0] || (t[0] = (o) => g(o, "prepend"))
120
120
  }, [
121
121
  (s(), h(C(n($)(e.prependIcon))))
122
122
  ])
@@ -125,7 +125,7 @@ const Y = {
125
125
  e.prependInnerIcon || e.$slots["prepend-inner"] ? (s(), l("div", _, [
126
126
  i(e.$slots, "prepend-inner", {}, () => [
127
127
  a("div", {
128
- onClick: t[1] || (t[1] = (o) => m(o, "prependInner"))
128
+ onClick: t[1] || (t[1] = (o) => g(o, "prependInner"))
129
129
  }, [
130
130
  (s(), h(C(n($)(e.prependInnerIcon))))
131
131
  ])
@@ -150,11 +150,11 @@ const Y = {
150
150
  }),
151
151
  onClick: t[5] || (t[5] = (o) => e.$emit("click:control", o)),
152
152
  onMousedown: t[6] || (t[6] = (o) => e.$emit("mousedown:control", o)),
153
- class: f([E.value, G.value, N.value])
153
+ class: m([E.value, G.value, N.value])
154
154
  }, null, 42, ee),
155
155
  e.clearable && n(c) ? (s(), l("div", {
156
156
  key: 2,
157
- class: f(["absolute right-2 top-2", { "opacity-100": e.persistentClear, "hover:opacity-100 opacity-0 transition-opacity duration-200": !e.persistentClear }])
157
+ class: m(["absolute right-2 top-2", { "opacity-100": e.persistentClear, "hover:opacity-100 opacity-0 transition-opacity duration-200": !e.persistentClear }])
158
158
  }, [
159
159
  i(e.$slots, "clear", y(k({ isActive: !!n(c), isFocused: n(v), controlRef: u.value, focus: () => {
160
160
  var o;
@@ -169,7 +169,7 @@ const Y = {
169
169
  class: "text-gray-500 hover:text-gray-700"
170
170
  }, [
171
171
  a("span", {
172
- class: f(K.value)
172
+ class: m(K.value)
173
173
  }, null, 2)
174
174
  ])
175
175
  ])
@@ -177,7 +177,7 @@ const Y = {
177
177
  e.appendInnerIcon || e.$slots["append-inner"] ? (s(), l("div", re, [
178
178
  i(e.$slots, "append-inner", {}, () => [
179
179
  a("div", {
180
- onClick: t[8] || (t[8] = (o) => m(o, "appendInner"))
180
+ onClick: t[8] || (t[8] = (o) => g(o, "appendInner"))
181
181
  }, [
182
182
  (s(), h(C(n($)(e.appendInnerIcon))))
183
183
  ])
@@ -186,7 +186,7 @@ const Y = {
186
186
  e.appendIcon || e.$slots.append ? (s(), l("div", oe, [
187
187
  i(e.$slots, "append", y(k(e.appendSlotBindings)), () => [
188
188
  a("div", {
189
- onClick: t[9] || (t[9] = (o) => m(o, "append"))
189
+ onClick: t[9] || (t[9] = (o) => g(o, "append"))
190
190
  }, [
191
191
  (s(), h(C(n($)(e.appendIcon))))
192
192
  ])
@@ -199,7 +199,7 @@ const Y = {
199
199
  }, () => [
200
200
  a("div", te, [
201
201
  a("div", {
202
- class: f(["h-full transition-all duration-300", [`bg-${e.loadingColor}`]]),
202
+ class: m(["h-full transition-all duration-300", [`${e.loadingColor}`]]),
203
203
  style: { width: "100%" }
204
204
  }, null, 2)
205
205
  ])
@@ -207,19 +207,19 @@ const Y = {
207
207
  ])) : d("", !0),
208
208
  !e.hideDetails || e.hideDetails === "auto" && (n(w).length || e.hint) ? (s(), l("div", {
209
209
  key: 6,
210
- class: f(["text-xs mt-1 space-y-1", { "text-red-500": n(b), "text-gray-500": !n(b) }])
210
+ class: m(["text-xs mt-1 space-y-1", { "text-red-500": n(f), "text-gray-500": !n(f) }])
211
211
  }, [
212
212
  i(e.$slots, "details", {}, () => [
213
- n(b) ? (s(!0), l(q, { key: 0 }, J(n(w), (o, j) => i(e.$slots, "message", {
213
+ n(f) ? (s(!0), l(q, { key: 0 }, J(n(w), (o, j) => i(e.$slots, "message", {
214
214
  key: j,
215
215
  message: o
216
216
  }, () => [
217
- a("div", null, g(o), 1)
217
+ a("div", null, b(o), 1)
218
218
  ])), 128)) : e.hint ? i(e.$slots, "hint", {
219
219
  key: 1,
220
220
  hint: e.hint
221
221
  }, () => [
222
- O(a("div", null, g(e.hint), 513), [
222
+ O(a("div", null, b(e.hint), 513), [
223
223
  [Q, e.persistentHint || n(v)]
224
224
  ])
225
225
  ]) : d("", !0)
@@ -231,8 +231,8 @@ const Y = {
231
231
  max: I.value,
232
232
  value: n(c).length
233
233
  }, () => [
234
- U(g(n(c).length), 1),
235
- I.value ? (s(), l("span", le, " / " + g(I.value), 1)) : d("", !0)
234
+ U(b(n(c).length), 1),
235
+ I.value ? (s(), l("span", le, " / " + b(I.value), 1)) : d("", !0)
236
236
  ])
237
237
  ])) : d("", !0)
238
238
  ])
@@ -16,6 +16,7 @@ const e = {
16
16
  type: [String, Function, Object],
17
17
  default: "i-mdi-close"
18
18
  },
19
+ persistentClear: Boolean,
19
20
  disabled: Boolean,
20
21
  readonly: Boolean,
21
22
  variant: { type: String, default: "filled" },
@@ -26,7 +27,7 @@ const e = {
26
27
  flat: Boolean,
27
28
  color: String,
28
29
  bgColor: String,
29
- baseColor: String,
30
+ textColor: String,
30
31
  iconColor: [String, Boolean],
31
32
  glow: Boolean,
32
33
  class: [String, Array, Object],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.185",
3
+ "version": "0.1.186",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",