adverich-kun-ui 0.1.208 → 0.1.210

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,39 +1,39 @@
1
- import { mergeModels as $, useModel as B, onMounted as ae, ref as F, watch as se, createElementBlock as V, openBlock as s, createVNode as a, unref as l, isRef as T, createSlots as ue, withCtx as i, createCommentVNode as k, Fragment as de, renderList as ce, createBlock as d, createElementVNode as me, createTextVNode as y, toDisplayString as w, normalizeClass as fe, withModifiers as pe } from "vue";
1
+ import { mergeModels as R, useModel as $, onMounted as ae, ref as B, watch as se, createElementBlock as V, openBlock as s, createVNode as a, unref as l, isRef as F, createSlots as ue, withCtx as i, createCommentVNode as y, Fragment as de, renderList as ce, createBlock as d, createElementVNode as me, createTextVNode as k, toDisplayString as w, normalizeClass as fe, withModifiers as pe } from "vue";
2
2
  import { icons as m } from "../../../../icons/index.js";
3
- import { isNotEmpty as ve, isArray as U } from "../../../../utils/utils.js";
4
- import ke from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
5
- import ye from "../../../KunList/src/components/KunList.vue.js";
6
- import I from "../../../KunListItem/src/components/KunListItem.vue.js";
7
- import E from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
3
+ import { isNotEmpty as ve, isArray as T } from "../../../../utils/utils.js";
4
+ import ye from "../../../KunInfiniteScroll/src/components/KunInfiniteScroll.vue.js";
5
+ import ke from "../../../KunList/src/components/KunList.vue.js";
6
+ import _ from "../../../KunListItem/src/components/KunListItem.vue.js";
7
+ import U from "../../../KunListItemTitle/src/components/KunListItemTitle.vue.js";
8
8
  import he from "../../../KunListItemSubtitle/src/components/KunListItemSubtitle.vue.js";
9
9
  import ge from "../../../kunMenu/src/components/kunMenu.vue.js";
10
10
  import { useAutocomplete as Ce } from "../composables/useAutocomplete.js";
11
11
  import { KunAutocompleteProps as be } from "../composables/KunAutocompleteProps.js";
12
12
  import Ve from "../../../KunTextField/src/components/KunTextField.vue.js";
13
13
  import we from "../../../KunBtn/src/components/KunBtn.vue.js";
14
- import Ie from "../../../KunChip/src/components/KunChip.vue.js";
14
+ import _e from "../../../KunChip/src/components/KunChip.vue.js";
15
15
  import h from "../../../KunIcon/src/components/KunIcon.vue.js";
16
- const _e = {
16
+ const Ie = {
17
17
  key: 0,
18
18
  class: "flex justify-center align-center"
19
19
  }, xe = { class: "flex justify-center align-center" }, He = {
20
20
  __name: "KunAutocomplete",
21
- props: /* @__PURE__ */ $(be, {
21
+ props: /* @__PURE__ */ R(be, {
22
22
  modelValue: { default: null },
23
23
  modelModifiers: {},
24
24
  items: { default: [], type: Array, required: !0 },
25
25
  itemsModifiers: {}
26
26
  }),
27
- emits: /* @__PURE__ */ $(["selectedItem", "createItem", "validation", "search"], ["update:modelValue", "update:items"]),
28
- setup(g, { emit: L }) {
29
- const r = B(g, "modelValue"), _ = B(g, "items"), n = g, f = L, {
27
+ emits: /* @__PURE__ */ R(["selectedItem", "createItem", "validation", "search"], ["update:modelValue", "update:items"]),
28
+ setup(g, { emit: E }) {
29
+ const r = $(g, "modelValue"), I = $(g, "items"), n = g, f = E, {
30
30
  textFieldRef: C,
31
31
  listRef: x,
32
32
  menuModel: u,
33
33
  search: c,
34
- removeItem: N,
35
- clearSelection: H,
36
- lightReset: K,
34
+ removeItem: L,
35
+ clearSelection: N,
36
+ lightReset: H,
37
37
  openMenu: b,
38
38
  closeMenu: O,
39
39
  toggleMenu: j,
@@ -44,18 +44,18 @@ const _e = {
44
44
  isAlphanumeric: J,
45
45
  createItem: Q,
46
46
  checkDisabled: X,
47
- itemToString: M,
48
- placeholder: S,
47
+ itemToString: K,
48
+ placeholder: M,
49
49
  hasCreateItem: Y
50
- } = Ce(n, f, r, _);
50
+ } = Ce(n, f, r, I);
51
51
  ae(() => {
52
52
  n.focusOnRender && C.value.focus();
53
53
  });
54
- const D = F(null);
54
+ const S = B(null);
55
55
  function Z(e) {
56
- return r.value === null || r.value === void 0 ? n.bgItemListColor : n.multiple ? r.value.find((o) => o[n.itemValue] === e[n.itemValue]) ? n.selectedColor : n.bgItemListColor : S.value === e[n.itemTitle] ? n.selectedColor : n.bgItemListColor;
56
+ return r.value === null || r.value === void 0 ? n.bgItemListColor : n.multiple ? r.value.find((o) => o[n.itemValue] === e[n.itemValue]) ? n.selectedColor : n.bgItemListColor : M.value === e[n.itemTitle] ? n.selectedColor : n.bgItemListColor;
57
57
  }
58
- const p = F(""), z = (e) => {
58
+ const p = B(""), D = (e) => {
59
59
  for (const o of n.rules) {
60
60
  const t = o(e);
61
61
  if (t !== !0)
@@ -64,7 +64,7 @@ const _e = {
64
64
  return p.value = "", f("validation", !0), !0;
65
65
  };
66
66
  se(() => r.value, (e, o) => {
67
- ve(n.rules) && z(e);
67
+ ve(n.rules) && D(e);
68
68
  });
69
69
  function ee() {
70
70
  var e;
@@ -83,7 +83,7 @@ const _e = {
83
83
  f("search", c);
84
84
  }
85
85
  function oe() {
86
- z(r);
86
+ D(r);
87
87
  }
88
88
  function ne(e) {
89
89
  q(e);
@@ -93,12 +93,12 @@ const _e = {
93
93
  return (e, o) => (s(), V("div", {
94
94
  class: "w-full h-fit",
95
95
  ref_key: "parentRef",
96
- ref: D
96
+ ref: S
97
97
  }, [
98
98
  a(Ve, {
99
99
  modelValue: l(c),
100
100
  "onUpdate:modelValue": [
101
- o[2] || (o[2] = (t) => T(c) ? c.value = t : null),
101
+ o[1] || (o[1] = (t) => F(c) ? c.value = t : null),
102
102
  le
103
103
  ],
104
104
  label: e.label,
@@ -113,40 +113,40 @@ const _e = {
113
113
  rounded: l(u) ? "rounded-t" : "rounded",
114
114
  onBlur: ie,
115
115
  onKeyDown: te,
116
- placeholder: n.multiple && l(U)(r.value) && r.value.length ? "" : l(S),
116
+ placeholder: n.multiple && l(T)(r.value) && r.value.length ? "" : l(M),
117
117
  error: !!p.value,
118
118
  "error-messages": p.value
119
119
  }, ue({
120
120
  default: i(() => [
121
- l(U)(r.value) ? (s(), V("div", _e, [
122
- (s(!0), V(de, null, ce(r.value, (t) => (s(), d(Ie, {
121
+ l(T)(r.value) ? (s(), V("div", Ie, [
122
+ (s(!0), V(de, null, ce(r.value, (t) => (s(), d(_e, {
123
123
  key: t.id ?? t.name,
124
124
  size: "small",
125
125
  class: "ml-1"
126
126
  }, {
127
127
  default: i(() => [
128
128
  me("div", xe, [
129
- y(w(l(G)(t, e.itemTitle)) + " ", 1),
129
+ k(w(l(G)(t, e.itemTitle)) + " ", 1),
130
130
  a(h, {
131
131
  color: "error",
132
132
  icon: l(m).close,
133
133
  size: "small",
134
134
  class: "ml-1",
135
- onClick: (v) => l(N)(t)
135
+ onClick: (v) => l(L)(t)
136
136
  }, null, 8, ["icon", "onClick"])
137
137
  ])
138
138
  ]),
139
139
  _: 2
140
140
  }, 1024))), 128))
141
- ])) : k("", !0),
141
+ ])) : y("", !0),
142
142
  a(ge, {
143
143
  transition: "fade",
144
- "onClick:outside": l(K),
144
+ "onClick:outside": l(H),
145
145
  modelValue: l(u),
146
- "onUpdate:modelValue": o[1] || (o[1] = (t) => T(u) ? u.value = t : null),
146
+ "onUpdate:modelValue": o[0] || (o[0] = (t) => F(u) ? u.value = t : null),
147
147
  activator: "parent",
148
148
  "z-index": e.zIndex,
149
- "parent-ref": D.value,
149
+ "parent-ref": S.value,
150
150
  location: "bottom",
151
151
  origin: "bottom left",
152
152
  onHandleEscape: ee,
@@ -155,32 +155,31 @@ const _e = {
155
155
  "hide-details": e.hideDetails
156
156
  }, {
157
157
  default: i(() => [
158
- a(ye, {
158
+ a(ke, {
159
159
  "onUpdate:selected": l(P),
160
- "onClick:select": o[0] || (o[0] = (t) => l(K)()),
161
160
  ref_key: "listRef",
162
161
  ref: x,
163
162
  onKeyDown: ne
164
163
  }, {
165
164
  default: i(() => [
166
- l(Y) ? (s(), d(I, { key: 0 }, {
165
+ l(Y) ? (s(), d(_, { key: 0 }, {
167
166
  default: i(() => [
168
167
  a(we, {
169
168
  onClick: l(Q),
170
169
  class: "w-full",
171
170
  color: "bg-green-400"
172
171
  }, {
173
- default: i(() => o[3] || (o[3] = [
174
- y(" Crear item ")
172
+ default: i(() => o[2] || (o[2] = [
173
+ k(" Crear item ")
175
174
  ])),
176
175
  _: 1,
177
- __: [3]
176
+ __: [2]
178
177
  }, 8, ["onClick"])
179
178
  ]),
180
179
  _: 1
181
- })) : k("", !0),
182
- a(ke, {
183
- items: _.value,
180
+ })) : y("", !0),
181
+ a(ye, {
182
+ items: I.value,
184
183
  search: l(c),
185
184
  "searchable-keys": n.searchableKeys,
186
185
  virtual: !1,
@@ -189,39 +188,39 @@ const _e = {
189
188
  "item-height": 48
190
189
  }, {
191
190
  default: i(({ item: t, index: v, empty: re }) => {
192
- var A, R;
191
+ var z, A;
193
192
  return [
194
- !re && t ? (s(), d(I, {
193
+ !re && t ? (s(), d(_, {
195
194
  value: t,
196
- key: ((A = t.id) == null ? void 0 : A.toString()) ?? t.name,
195
+ key: ((z = t.id) == null ? void 0 : z.toString()) ?? t.name,
197
196
  disabled: l(X)(t),
198
197
  class: fe(Z(t)),
199
198
  density: e.density,
200
- id: ((R = t.id) == null ? void 0 : R.toString()) ?? t.name
199
+ id: ((A = t.id) == null ? void 0 : A.toString()) ?? t.name
201
200
  }, {
202
201
  default: i(() => [
203
- a(E, { class: "text-wrap" }, {
202
+ a(U, { class: "text-wrap" }, {
204
203
  default: i(() => [
205
- y(w(l(M)(t, e.itemTitle ?? l(W), "hasDefault")), 1)
204
+ k(w(l(K)(t, e.itemTitle ?? l(W), "hasDefault")), 1)
206
205
  ]),
207
206
  _: 2
208
207
  }, 1024),
209
208
  a(he, {
210
- textContent: w(e.itemSubtitle ? l(M)(t, e.itemSubtitle) : "")
209
+ textContent: w(e.itemSubtitle ? l(K)(t, e.itemSubtitle) : "")
211
210
  }, null, 8, ["textContent"])
212
211
  ]),
213
212
  _: 2
214
- }, 1032, ["value", "disabled", "class", "density", "id"])) : (s(), d(I, {
213
+ }, 1032, ["value", "disabled", "class", "density", "id"])) : (s(), d(_, {
215
214
  key: 1,
216
215
  disabled: ""
217
216
  }, {
218
217
  default: i(() => [
219
- a(E, { class: "text-center w-full text-gray-500" }, {
220
- default: i(() => o[4] || (o[4] = [
221
- y(" No hay elementos disponibles ")
218
+ a(U, { class: "text-center w-full text-gray-500" }, {
219
+ default: i(() => o[3] || (o[3] = [
220
+ k(" No hay elementos disponibles ")
222
221
  ])),
223
222
  _: 1,
224
- __: [4]
223
+ __: [3]
225
224
  })
226
225
  ]),
227
226
  _: 1
@@ -244,12 +243,12 @@ const _e = {
244
243
  fn: i(() => [
245
244
  e.clearable && r.value ? (s(), d(h, {
246
245
  key: 0,
247
- onClick: l(H),
246
+ onClick: l(N),
248
247
  size: "small",
249
248
  color: "error",
250
249
  icon: l(m).close,
251
250
  class: "mr-1 mt-1"
252
- }, null, 8, ["onClick", "icon"])) : k("", !0),
251
+ }, null, 8, ["onClick", "icon"])) : y("", !0),
253
252
  a(h, {
254
253
  color: "teal-darken-1",
255
254
  size: "large",
@@ -263,7 +262,7 @@ const _e = {
263
262
  size: "x-small",
264
263
  class: "mb-4",
265
264
  icon: l(m).asterisk
266
- }, null, 8, ["icon"])) : k("", !0)
265
+ }, null, 8, ["icon"])) : y("", !0)
267
266
  ]),
268
267
  key: "0"
269
268
  } : void 0
@@ -1,19 +1,19 @@
1
- import { ref as a, computed as k, watch as G, nextTick as H } from "vue";
2
- import { isArray as g, isObject as v } from "../../../../utils/utils.js";
3
- function P(n, o, c, s) {
4
- const i = a(null), d = a(null), j = a(null), r = a(!1), h = a(""), E = (e, t) => t.split(".").reduce((u, l) => u && u[l] !== void 0 ? u[l] : null, e), M = k(() => i.value ? g(i.value) ? i.value.length ? x(i.value, n.itemTitle, "hasDefault") : n.placeholderText : v(i.value) ? x(i.value, n.itemTitle, "hasDefault") : i.value.toString() : s.value.length ? n.placeholderText : n.textNoItems), w = k(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
5
- function x(e, t, u) {
1
+ import { ref as a, computed as M, watch as G, nextTick as H } from "vue";
2
+ import { isArray as O, isObject as v, fullCopy as J } from "../../../../utils/utils.js";
3
+ function Q(n, g, c, o) {
4
+ const i = a(null), s = a(null), j = a(null), r = a(!1), d = a(""), w = (e, t) => t.split(".").reduce((u, l) => u && u[l] !== void 0 ? u[l] : null, e), F = M(() => i.value ? O(i.value) ? i.value.length ? h(i.value, n.itemTitle, "hasDefault") : n.placeholderText : v(i.value) ? h(i.value, n.itemTitle, "hasDefault") : i.value.toString() : o.value.length ? n.placeholderText : n.textNoItems), V = M(() => n.itemText.includes(",") ? n.itemText.split(",") : n.itemText);
5
+ function h(e, t, u) {
6
6
  if (v(e)) {
7
7
  if (t) {
8
- if (g(t))
8
+ if (O(t))
9
9
  return t.map((l) => e[l] ?? "No definido").join(" - ");
10
10
  if (t.includes(","))
11
11
  return t.split(",").map((l) => e[l]).join(" - ");
12
12
  if (t.includes(".")) {
13
13
  const l = t.split(".");
14
14
  let f = e;
15
- for (const O of l)
16
- f = f[O];
15
+ for (const b of l)
16
+ f = f[b];
17
17
  return f;
18
18
  }
19
19
  return !n.returnObject && typeof e[t] == "number" || e[t] !== void 0 && e[t] !== null ? e[t].toString() : "";
@@ -21,38 +21,38 @@ function P(n, o, c, s) {
21
21
  if (u)
22
22
  return Object.values(e)[0];
23
23
  }
24
- return g(e) ? n.returnObject ? e.map((l) => l[t]).join(" - ") : e.map((l) => l).join(" - ") : u && typeof e != "number" && e.includes(",") ? e.split(",") : e;
24
+ return O(e) ? n.returnObject ? e.map((l) => l[t]).join(" - ") : e.map((l) => l).join(" - ") : u && typeof e != "number" && e.includes(",") ? e.split(",") : e;
25
25
  }
26
- function F(e) {
26
+ function B(e) {
27
27
  try {
28
28
  let t = null;
29
- if (i.value = e, !n.multiple)
29
+ if (i.value = J(e), !n.multiple)
30
30
  n.returnObject ? t = e : v(e) ? n.itemValue ? t = e[n.itemValue] : t = Object.values(e)[0] : t = e, r.value = !1;
31
- else if (m(e))
32
- e && y(e);
31
+ else if (y(e))
32
+ e && S(e);
33
33
  else {
34
34
  const u = n.returnObject ? e : v(e) ? n.itemValue ? e[n.itemValue] : Object.values(e)[0] : e;
35
35
  t = [...c.value || [], u];
36
36
  }
37
- c.value = t, o("update:modelValue", t), o("selectedItem", i.value), n.clearOnSelect && I();
37
+ c.value !== t && (console.log("a"), c.value = t), g("selectedItem", i.value);
38
38
  } catch (t) {
39
39
  console.log(t);
40
40
  } finally {
41
- b();
41
+ T(), x();
42
42
  }
43
43
  }
44
- G(() => s.value, () => {
45
- i.value = B(c.value);
44
+ G(() => o.value, () => {
45
+ i.value = R(c.value);
46
46
  }, { immediate: !0 });
47
- function B(e) {
48
- return e == null ? null : n.returnObject ? e : n.multiple && Array.isArray(e) ? e.map((u) => s.value.find((l) => l[n.itemValue] === u)).filter(Boolean) : s.value.find((u) => u[n.itemValue] === e) || null;
47
+ function R(e) {
48
+ return e == null ? null : n.returnObject ? e : n.multiple && Array.isArray(e) ? e.map((u) => o.value.find((l) => l[n.itemValue] === u)).filter(Boolean) : o.value.find((u) => u[n.itemValue] === e) || null;
49
49
  }
50
- function m(e) {
50
+ function y(e) {
51
51
  return c.value === null ? !1 : e ? c.value.some(
52
52
  (t) => n.returnObject ? t[n.itemValue] === e[n.itemValue] : t === e[n.itemValue]
53
53
  ) : !0;
54
54
  }
55
- function y(e) {
55
+ function S(e) {
56
56
  let t = c.value;
57
57
  if (n.returnObject) {
58
58
  const u = t.find(
@@ -63,79 +63,78 @@ function P(n, o, c, s) {
63
63
  const u = t.indexOf(e[n.itemValue]);
64
64
  t.splice(u, 1);
65
65
  }
66
- o("update:modelValue", t);
67
66
  }
68
- function R(e) {
69
- n.clearSearchOnSelect && (h.value = ""), n.focusOnSelect && b();
67
+ function T(e) {
68
+ n.clearSearchOnSelect && (d.value = ""), n.clearOnSelect && A(), n.focusOnSelect && x();
70
69
  }
71
- function S() {
70
+ function m() {
72
71
  r.value || (r.value = !0);
73
72
  }
74
- function D() {
73
+ function C() {
75
74
  r.value && (r.value = !1);
76
75
  }
77
- function N() {
76
+ function D() {
78
77
  r.value = !r.value;
79
78
  }
80
- function T(e) {
79
+ function I(e) {
81
80
  return e.length === 1 && e.match(/\w/);
82
81
  }
83
- function b() {
84
- d.value.inputField.focus();
82
+ function x() {
83
+ s.value.inputField.focus();
85
84
  }
86
- function C() {
87
- r.value = !0, j.value && d.value.$el.focus();
85
+ function N() {
86
+ r.value = !0, j.value && s.value.$el.focus();
88
87
  }
89
88
  function K(e) {
90
89
  const t = e.key;
91
- (T(t) || t === "Backspace") && (S(), b(), H(() => {
90
+ (I(t) || t === "Backspace") && (m(), x(), H(() => {
92
91
  var l;
93
- const u = (l = d.value) == null ? void 0 : l.inputField;
92
+ const u = (l = s.value) == null ? void 0 : l.inputField;
94
93
  if (u) {
95
- const f = u.selectionStart, O = u.selectionEnd, V = u.value, A = e.key.length === 1 ? e.key : "";
96
- u.value = V.slice(0, f) + A + V.slice(O), u.selectionStart = u.selectionEnd = f + A.length, u.dispatchEvent(new Event("input", { bubbles: !0 }));
94
+ const f = u.selectionStart, b = u.selectionEnd, k = u.value, E = e.key.length === 1 ? e.key : "";
95
+ u.value = k.slice(0, f) + E + k.slice(b), u.selectionStart = u.selectionEnd = f + E.length, u.dispatchEvent(new Event("input", { bubbles: !0 }));
97
96
  }
98
97
  }));
99
98
  }
100
99
  function $() {
101
- r.value = !1, o("createItem");
100
+ r.value = !1, g("createItem");
102
101
  }
103
102
  function q(e) {
104
103
  let t = c.value.indexOf(e);
105
104
  c.value.splice(t, 1);
106
105
  }
107
- function I() {
108
- h.value = "", c.value = null, i.value = null;
106
+ function A() {
107
+ d.value !== "" && (d.value = ""), c.value !== null && (c.value = null), i.value !== null && (i.value = null);
109
108
  }
110
109
  function z(e) {
111
110
  return !!e.disabled;
112
111
  }
113
112
  return {
114
113
  selectedItem: i,
115
- textFieldRef: d,
114
+ textFieldRef: s,
116
115
  listRef: j,
117
116
  menuModel: r,
118
- search: h,
119
- getItemText: E,
120
- placeholder: M,
121
- textArr: w,
122
- itemToString: x,
123
- getSelectedItem: F,
124
- checkIfValueExist: m,
125
- removeFromArray: y,
126
- lightReset: R,
127
- openMenu: S,
128
- closeMenu: D,
129
- toggleMenu: N,
130
- focusOnMenu: C,
117
+ search: d,
118
+ getItemText: w,
119
+ placeholder: F,
120
+ textArr: V,
121
+ itemToString: h,
122
+ getSelectedItem: B,
123
+ checkIfValueExist: y,
124
+ removeFromArray: S,
125
+ lightReset: T,
126
+ openMenu: m,
127
+ closeMenu: C,
128
+ toggleMenu: D,
129
+ focusOnMenu: N,
131
130
  onMenuKeydown: K,
132
131
  createItem: $,
133
132
  removeItem: q,
134
- clearSelection: I,
133
+ clearSelection: A,
135
134
  checkDisabled: z,
136
- isAlphanumeric: T
135
+ isAlphanumeric: I
137
136
  };
138
137
  }
139
138
  export {
140
- P as useAutocomplete
139
+ Q as useAutocomplete
141
140
  };
@@ -1,4 +1,4 @@
1
- import { mergeModels as g, ref as w, useModel as B, provide as p, computed as S, createElementBlock as h, openBlock as M, mergeProps as I, withModifiers as E, renderSlot as L } from "vue";
1
+ import { mergeModels as g, ref as w, useModel as D, provide as p, computed as B, createElementBlock as M, openBlock as S, mergeProps as I, withModifiers as E, renderSlot as L } from "vue";
2
2
  const R = {
3
3
  __name: "KunList",
4
4
  props: /* @__PURE__ */ g({
@@ -28,11 +28,11 @@ const R = {
28
28
  }),
29
29
  emits: /* @__PURE__ */ g(["keyDown", "click:select", "update:selected"], ["update:selected"]),
30
30
  setup(o, { expose: b, emit: y }) {
31
- const u = o, a = y, f = w(null), c = w([]), s = B(o, "selected");
31
+ const u = o, a = y, f = w(null), c = w([]), s = D(o, "selected");
32
32
  p("registerListItemRef", (e) => {
33
33
  e && !c.value.includes(e) && c.value.push(e);
34
34
  });
35
- const m = S(() => u.selectable && u.selectionMode === "multiple");
35
+ const m = B(() => u.selectable && u.selectionMode === "multiple");
36
36
  function v(e) {
37
37
  if (!(!u.selectable || e == null))
38
38
  if (m.value) {
@@ -61,7 +61,7 @@ const R = {
61
61
  }
62
62
  if (t === "ArrowUp" || t === "ArrowDown") {
63
63
  e.preventDefault();
64
- const l = n.findIndex((D) => D === document.activeElement);
64
+ const l = n.findIndex((x) => x === document.activeElement);
65
65
  let d = -1;
66
66
  l === -1 ? d = t === "ArrowDown" ? 0 : n.length - 1 : t === "ArrowDown" ? d = (l + 1) % n.length : t === "ArrowUp" && (d = (l - 1 + n.length) % n.length);
67
67
  const i = n[d];
@@ -70,17 +70,17 @@ const R = {
70
70
  }
71
71
  }
72
72
  }
73
- function x(e = "ArrowDown") {
73
+ function h(e = "ArrowDown") {
74
74
  var l;
75
75
  const t = c.value.filter(Boolean);
76
76
  if (!t.length) return;
77
77
  const n = e === "ArrowDown" ? 0 : t.length - 1, r = t[n];
78
78
  (l = r == null ? void 0 : r.focus) == null || l.call(r);
79
79
  }
80
- return b({ focusWithKey: x, focus: () => {
80
+ return b({ focusWithKey: h, focus: () => {
81
81
  var e, t;
82
82
  return (t = (e = f.value) == null ? void 0 : e.focus) == null ? void 0 : t.call(e);
83
- } }), (e, t) => (M(), h("ul", I({
83
+ } }), (e, t) => (S(), M("ul", I({
84
84
  ref_key: "ulRef",
85
85
  ref: f,
86
86
  role: "list",
@@ -96,8 +96,7 @@ const R = {
96
96
  ]],
97
97
  tabindex: "-1",
98
98
  onKeydown: E(A, ["prevent"]),
99
- onSelect: t[0] || (t[0] = (n) => a("click:select", n.detail)),
100
- onSelected: t[1] || (t[1] = (n) => a("update:selected", n.detail))
99
+ onSelect: t[0] || (t[0] = (n) => a("click:select", n.detail))
101
100
  }, e.$attrs), [
102
101
  L(e.$slots, "default")
103
102
  ], 16));
@@ -7,19 +7,23 @@ function o(t) {
7
7
  function u(t) {
8
8
  return typeof t == "string";
9
9
  }
10
- function c(t) {
10
+ function f(t) {
11
11
  return i(t) ? Object.keys(t).length > 0 : o(t) || u(t) ? t.length > 0 : !1;
12
12
  }
13
- function f(t, n = 100) {
13
+ function s(t, n = 100) {
14
14
  let r;
15
15
  return (...e) => {
16
16
  clearTimeout(r), r = setTimeout(() => t(...e), n);
17
17
  };
18
18
  }
19
+ function c(t) {
20
+ return JSON.parse(JSON.stringify(t));
21
+ }
19
22
  export {
20
- f as debounce,
23
+ s as debounce,
24
+ c as fullCopy,
21
25
  o as isArray,
22
- c as isNotEmpty,
26
+ f as isNotEmpty,
23
27
  i as isObject,
24
28
  u as isString
25
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.208",
3
+ "version": "0.1.210",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",