adverich-kun-ui 0.1.420 → 0.1.422

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 { mergeModels as z, useModel as R, onMounted as oe, ref as S, watch as ie, createElementBlock as v, openBlock as n, createVNode as a, unref as l, isRef as _, createSlots as ae, withCtx as i, createCommentVNode as k, Fragment as ne, renderList as re, createBlock as m, createElementVNode as se, createTextVNode as y, toDisplayString as I, normalizeClass as ue, withModifiers as de } from "vue";
1
+ import { mergeModels as z, useModel as R, onMounted as oe, ref as S, watch as ie, createElementBlock as v, openBlock as a, createVNode as n, unref as l, isRef as _, createSlots as ne, withCtx as i, createCommentVNode as k, Fragment as ae, renderList as re, createBlock as m, createElementVNode as se, createTextVNode as y, toDisplayString as I, normalizeClass as ue, withModifiers as de } from "vue";
2
2
  import { icons as f } from "../../../../icons/index.js";
3
3
  import { isNotEmpty as ce, isArray as A } from "../../../../utils/utils.js";
4
4
  import me from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
@@ -88,12 +88,12 @@ const Ce = {
88
88
  }
89
89
  function le() {
90
90
  }
91
- return (e, o) => (n(), v("div", {
91
+ return (e, o) => (a(), v("div", {
92
92
  class: "w-full h-fit",
93
93
  ref_key: "parentRef",
94
94
  ref: M
95
95
  }, [
96
- a(ye, {
96
+ n(ye, {
97
97
  modelValue: l(c),
98
98
  "onUpdate:modelValue": [
99
99
  o[1] || (o[1] = (t) => _(c) ? c.value = t : null),
@@ -114,17 +114,17 @@ const Ce = {
114
114
  placeholder: u.multiple && l(A)(r.value) && r.value.length ? "" : l(J),
115
115
  error: !!h.value,
116
116
  "error-messages": h.value
117
- }, ae({
117
+ }, ne({
118
118
  default: i(() => [
119
- l(A)(r.value) ? (n(), v("div", Ce, [
120
- (n(!0), v(ne, null, re(r.value, (t) => (n(), m(ge, {
119
+ l(A)(r.value) ? (a(), v("div", Ce, [
120
+ (a(!0), v(ae, null, re(r.value, (t) => (a(), m(ge, {
121
121
  key: t.id ?? t.name,
122
122
  size: "small"
123
123
  }, {
124
124
  default: i(() => [
125
125
  se("div", we, [
126
126
  y(I(l(P)(t, e.itemTitle)) + " ", 1),
127
- a(b, {
127
+ n(b, {
128
128
  color: "error",
129
129
  icon: l(f).close,
130
130
  size: "small",
@@ -136,7 +136,7 @@ const Ce = {
136
136
  _: 2
137
137
  }, 1024))), 128))
138
138
  ])) : k("", !0),
139
- a(he, {
139
+ n(he, {
140
140
  transition: "fade",
141
141
  "onClick:outside": l(x),
142
142
  modelValue: l(s),
@@ -152,8 +152,8 @@ const Ce = {
152
152
  "hide-details": e.hideDetails
153
153
  }, {
154
154
  default: i(() => [
155
- e.hasCreateItem ? (n(), v("div", Ve, [
156
- a(be, {
155
+ e.hasCreateItem ? (a(), v("div", Ve, [
156
+ n(be, {
157
157
  onClick: l(j),
158
158
  bgColor: e.btnCreateBg,
159
159
  class: ue(e.btnCreateClass)
@@ -164,7 +164,7 @@ const Ce = {
164
164
  _: 1
165
165
  }, 8, ["onClick", "bgColor", "class"])
166
166
  ])) : k("", !0),
167
- a(fe, {
167
+ n(fe, {
168
168
  "onClick:select": l(H),
169
169
  ref_key: "listRef",
170
170
  ref: w,
@@ -172,7 +172,7 @@ const Ce = {
172
172
  selectable: !0
173
173
  }, {
174
174
  default: i(() => [
175
- a(me, {
175
+ n(me, {
176
176
  items: D.value,
177
177
  search: l(c),
178
178
  "searchable-keys": u.searchableKeys,
@@ -182,7 +182,7 @@ const Ce = {
182
182
  "item-height": 48
183
183
  }, {
184
184
  default: i(({ item: t, index: d, empty: te }) => [
185
- !te && t ? (n(), m(B, {
185
+ !te && t != null ? (a(), m(B, {
186
186
  value: t,
187
187
  key: `kun-list-${d + 1}`,
188
188
  id: `kun-item-${d + 1}`,
@@ -194,23 +194,23 @@ const Ce = {
194
194
  selectable: !0
195
195
  }, {
196
196
  default: i(() => [
197
- a(F, { class: "text-wrap" }, {
197
+ n(F, { class: "text-wrap" }, {
198
198
  default: i(() => [
199
199
  y(I(l(K)(t, e.itemTitle ?? l(q), "hasDefault")), 1)
200
200
  ]),
201
201
  _: 2
202
202
  }, 1024),
203
- a(pe, {
203
+ n(pe, {
204
204
  text: e.itemSubtitle ? l(K)(t, e.itemSubtitle) : ""
205
205
  }, null, 8, ["text"])
206
206
  ]),
207
207
  _: 2
208
- }, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (n(), m(B, {
208
+ }, 1032, ["value", "id", "disabled", "bg-items", "hover-bg", "activeClass", "density"])) : (a(), m(B, {
209
209
  key: 1,
210
210
  disabled: ""
211
211
  }, {
212
212
  default: i(() => [
213
- a(F, { class: "text-center w-full text-gray-500" }, {
213
+ n(F, { class: "text-center w-full text-gray-500" }, {
214
214
  default: i(() => o[2] || (o[2] = [
215
215
  y(" No hay elementos disponibles ")
216
216
  ])),
@@ -235,7 +235,7 @@ const Ce = {
235
235
  e.hasIcons ? {
236
236
  name: "append-inner",
237
237
  fn: i(() => [
238
- e.clearable && r.value ? (n(), m(b, {
238
+ e.clearable && r.value ? (a(), m(b, {
239
239
  key: 0,
240
240
  onClick: l(N),
241
241
  size: "small",
@@ -243,14 +243,14 @@ const Ce = {
243
243
  icon: l(f).close,
244
244
  class: "mr-1 mt-1"
245
245
  }, null, 8, ["onClick", "icon"])) : k("", !0),
246
- a(b, {
246
+ n(b, {
247
247
  color: "teal-darken-1",
248
248
  size: "large",
249
249
  class: "cursor-pointer",
250
250
  icon: l(s) ? l(f).menuUpOutline : l(f).menuDownOutline,
251
251
  onClick: de(l(V), ["stop"])
252
252
  }, null, 8, ["icon", "onClick"]),
253
- e.required ? (n(), m(b, {
253
+ e.required ? (a(), m(b, {
254
254
  key: 1,
255
255
  color: "teal-darken-1",
256
256
  size: "x-small",
@@ -1,7 +1,7 @@
1
1
  import { ref as o, computed as M, watch as H, nextTick as F } from "vue";
2
2
  import { isArray as x, isObject as O, fullCopy as L } from "../../../../utils/utils.js";
3
3
  function U(n, h, i, s) {
4
- const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
4
+ const l = o(null), d = o(null), y = o(null), f = o(!1), v = o(""), N = (e, t) => t.split(".").reduce((u, r) => u && u[r] !== void 0 ? u[r] : null, e), B = M(() => l.value !== null && l.value !== void 0 ? x(l.value) ? l.value.length ? j(l.value, n.itemTitle, "hasDefault") : n.placeholderText : O(l.value) ? j(l.value, n.itemTitle, "hasDefault") : l.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), R = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
5
5
  function j(e, t, u) {
6
6
  var r;
7
7
  if (O(e)) {
@@ -59,7 +59,7 @@ const Y = {
59
59
  return (e = c.value) == null ? void 0 : e.focus();
60
60
  }
61
61
  });
62
- const m = `input-${U().uid}`, T = d(() => b.value || !!f.value || a.dirty), x = H(), N = d(() => !!x["prepend-inner"]), O = d(() => !!x["append-inner"]), v = q(!1), z = d(() => v.value ? P.eyeOffOutline : P.eyeOutline);
62
+ const m = `input-${U().uid}`, T = d(() => b.value || f.value !== "" || a.dirty), x = H(), N = d(() => !!x["prepend-inner"]), O = d(() => !!x["append-inner"]), v = q(!1), z = d(() => v.value ? P.eyeOffOutline : P.eyeOutline);
63
63
  function A() {
64
64
  v.value = !v.value;
65
65
  }
@@ -1,7 +1,7 @@
1
1
  import { ref as a, inject as V, computed as E, watch as F, onUnmounted as T } from "vue";
2
2
  import { debounce as j } from "../../../../utils/utils.js";
3
3
  function R(u, r) {
4
- const l = a(u.modelValue), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
4
+ const l = a(u.modelValue ?? ""), o = a(!1), t = a(""), n = a(!1), g = a(null), h = a(null), s = a(!1), d = V("registerField", null), v = V("unregisterField", null), y = E(() => u.error || !!t.value && n.value), c = async () => {
5
5
  for (const e of u.rules) {
6
6
  const m = await Promise.resolve(e(l.value));
7
7
  if (m !== !0) return m;
@@ -12,7 +12,7 @@ function R(u, r) {
12
12
  t.value = e === !0 ? "" : e;
13
13
  }, u.debounce ?? 300);
14
14
  F(() => u.modelValue, (e) => {
15
- e !== l.value && (s.value = !0, l.value = e);
15
+ e !== l.value && (s.value = !0, l.value = e ?? "");
16
16
  }), F(l, () => {
17
17
  if (s.value) {
18
18
  s.value = !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.420",
3
+ "version": "0.1.422",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",