adverich-kun-ui 0.1.510 → 0.1.511

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,5 +1,5 @@
1
1
  import { mergeModels as X, toRefs as $e, useModel as Fe, ref as S, watch as Y, computed as Z, onMounted as Pe, createElementBlock as n, openBlock as t, mergeProps as O, createCommentVNode as a, createElementVNode as C, renderSlot as r, createBlock as $, unref as s, toDisplayString as j, Fragment as _, withCtx as z, createVNode as F, normalizeClass as D, withDirectives as ee, vModelText as Ae, vShow as se, normalizeProps as p, guardReactiveProps as v, createSlots as oe, renderList as te, isRef as Me, nextTick as Ie } from "vue";
2
- import { isMobile as f } from "../../../../utils/_platform.js";
2
+ import { isMobile as m } from "../../../../utils/_platform.js";
3
3
  import le from "../../../KunIcon/src/components/KunIcon.vue.js";
4
4
  import Re from "../../../../icons/IconFilter.vue.js";
5
5
  import Ee from "../../../../icons/IconSearch.vue.js";
@@ -37,7 +37,7 @@ const Ue = {
37
37
  }),
38
38
  emits: /* @__PURE__ */ X(["update:page", "update:itemsPerPage", "update:sortBy", "update:search", "focusOnSearch"], ["update:selectedItems"]),
39
39
  setup(N, { emit: ne }) {
40
- const k = ne, m = N, P = $e(m), w = Fe(N, "selectedItems"), {
40
+ const k = ne, f = N, P = $e(f), w = Fe(N, "selectedItems"), {
41
41
  headers: K,
42
42
  showExpand: A,
43
43
  showSelect: M,
@@ -50,21 +50,21 @@ const Ue = {
50
50
  items: ls,
51
51
  searchable: U,
52
52
  debounceTime: de
53
- } = P, y = S(m.search);
54
- Y(() => m.search, (e) => {
53
+ } = P, y = S(f.search);
54
+ Y(() => f.search, (e) => {
55
55
  e !== y.value && (y.value = e);
56
56
  });
57
- const I = Z(() => m.headers.map((e) => {
57
+ const I = Z(() => f.headers.map((e) => {
58
58
  var l, d;
59
59
  const o = { ...e };
60
60
  if ((e.columnType === "function" || e.columnType == "objectFunction" || e.columnType == "simpleFunction") && typeof e.columnFunction == "string") {
61
- const i = (l = m.functionMap) == null ? void 0 : l[e.columnFunction];
61
+ const i = (l = f.functionMap) == null ? void 0 : l[e.columnFunction];
62
62
  typeof i == "function" ? o.columnFunction = i : (console.warn(
63
63
  `[KunTable] No se encontró la función "${e.columnFunction}" en functionMap`
64
64
  ), o.columnFunction = () => "");
65
65
  }
66
66
  if (e.columnFormat === "function" && typeof e.columnRowText == "string") {
67
- const i = (d = m.functionMap) == null ? void 0 : d[e.columnRowText];
67
+ const i = (d = f.functionMap) == null ? void 0 : d[e.columnRowText];
68
68
  typeof i == "function" ? o.columnRowText = i : (console.warn(
69
69
  `[KunTable] No se encontró la función "${e.columnRowText}" en functionMap`
70
70
  ), o.columnRowText = () => "");
@@ -84,7 +84,7 @@ const Ue = {
84
84
  toggleExpand: B,
85
85
  isExpanded: x,
86
86
  sortBy: c.sortBy,
87
- hasActions: m.hasActions
87
+ hasActions: f.hasActions
88
88
  })), Se = [os, ce.value], Ce = [ts, ie.value];
89
89
  Pe(() => G());
90
90
  const q = S(null), H = S(!0), T = S(!1);
@@ -92,20 +92,20 @@ const Ue = {
92
92
  Te();
93
93
  }
94
94
  function Te() {
95
- f.value && (J(), Ie(() => {
95
+ m.value && (J(), Ie(() => {
96
96
  q.value.focus();
97
97
  }));
98
98
  }
99
99
  function G() {
100
- f.value && (V.value = "w-fit", H.value = !1, T.value = !0, k("focusOnSearch", !1));
100
+ m.value && (V.value = "w-fit", H.value = !1, T.value = !0, k("focusOnSearch", !1));
101
101
  }
102
102
  function J() {
103
- f.value && (V.value = "w-full border", T.value = !1, H.value = !0, k("focusOnSearch", !0));
103
+ m.value && (V.value = "w-full border", T.value = !1, H.value = !0, k("focusOnSearch", !0));
104
104
  }
105
105
  const V = S("w-full border max-w-sm");
106
106
  return (e, o) => (t(), n("div", O({ class: Se }, e.$attrs, { style: { "user-select": "text" } }), [
107
107
  s(U) || e.filterable || e.$slots.prependHeader || e.$slots.prependSearch || e.$slots.appendSearch ? (t(), n("div", Ue, [
108
- T.value ? (t(), n("div", We, [
108
+ T.value || !s(m) ? (t(), n("div", We, [
109
109
  r(e.$slots, "prependHeader")
110
110
  ])) : a("", !0),
111
111
  w.value.length ? (t(), n("div", Qe, [
@@ -150,7 +150,7 @@ const Ue = {
150
150
  "onUpdate:modelValue": o[3] || (o[3] = (l) => y.value = l),
151
151
  type: "text",
152
152
  placeholder: e.searchPlaceholder,
153
- class: D(["w-full text-sm", s(f) ? "px-1" : "px-2 py-1"]),
153
+ class: D(["w-full text-sm", s(m) ? "px-1" : "px-2 py-1"]),
154
154
  ref_key: "searchRef",
155
155
  ref: q,
156
156
  onFocus: J,
@@ -174,10 +174,10 @@ const Ue = {
174
174
  key: 0,
175
175
  class: D(Ce)
176
176
  }, [
177
- e.$slots.colgroup && !s(f) ? (t(), n("colgroup", Ye, [
177
+ e.$slots.colgroup && !s(m) ? (t(), n("colgroup", Ye, [
178
178
  r(e.$slots, "colgroup", p(v(g.value)))
179
179
  ])) : a("", !0),
180
- !s(re) && !s(f) ? (t(), $(xe, {
180
+ !s(re) && !s(m) ? (t(), $(xe, {
181
181
  key: 1,
182
182
  headers: s(K),
183
183
  "sort-by": s(c).sortBy,
@@ -195,7 +195,7 @@ const Ue = {
195
195
  onToggleSelectAll: s(ve),
196
196
  customHeaders: e.customSlots
197
197
  }, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "more-than-paginated", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "onSort", "onToggleSelectAll", "customHeaders"])) : r(e.$slots, "thead", p(O({ key: 2 }, g.value))),
198
- s(f) ? (t(), $(Ve, {
198
+ s(m) ? (t(), $(Ve, {
199
199
  key: 4,
200
200
  items: s(u),
201
201
  headers: I.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.510",
3
+ "version": "0.1.511",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",