adverich-kun-ui 0.1.317 → 0.1.319

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,163 +1,163 @@
1
- import { mergeModels as W, toRefs as be, useModel as Se, ref as y, watch as Q, computed as q, onMounted as Ce, createElementBlock as c, openBlock as l, mergeProps as B, createCommentVNode as u, createElementVNode as V, renderSlot as a, createBlock as S, unref as s, normalizeClass as C, withCtx as x, createVNode as b, withDirectives as G, vModelText as Te, vShow as J, normalizeProps as d, guardReactiveProps as g, Fragment as $e, createSlots as X, renderList as Y, isRef as Fe, nextTick as ke } from "vue";
2
- import { isMobile as p } from "../../../../utils/_platform.js";
1
+ import { mergeModels as W, toRefs as be, useModel as Se, ref as v, watch as Q, computed as q, onMounted as Ce, createElementBlock as r, openBlock as l, mergeProps as B, createCommentVNode as u, createElementVNode as V, renderSlot as a, createBlock as b, unref as s, normalizeClass as S, withCtx as j, createVNode as C, withDirectives as G, vModelText as Te, vShow as J, normalizeProps as d, guardReactiveProps as g, Fragment as ke, createSlots as X, renderList as Y, toDisplayString as Fe, isRef as $e, nextTick as Pe } from "vue";
2
+ import { isMobile as m } from "../../../../utils/_platform.js";
3
3
  import Z from "../../../KunIcon/src/components/KunIcon.vue.js";
4
- import Pe from "../../../../icons/IconFilter.vue.js";
5
- import Me from "../../../../icons/IconSearch.vue.js";
6
- import Ae from "./KunTableHeaders.vue.js";
7
- import Ie from "./KunTableFooter.vue.js";
8
- import Re from "./KunTableRows.vue.js";
9
- import Ee from "./KunTableIterators.vue.js";
10
- import Be from "../../../KunBtn/src/components/KunBtn.vue.js";
11
- import Ve from "./KunTableFilter.vue.js";
12
- import xe from "../../../KunCard/src/components/KunCard.vue.js";
13
- import ze from "../composables/useExpand.js";
14
- import je from "../composables/useOptions.js";
15
- import Ne from "../composables/useSelect.js";
16
- import De from "../composables/useFilter.js";
17
- import Ke from "../composables/KunTableProps.js";
18
- const Le = ["placeholder"], Ue = { class: "flex-1 overflow-auto" }, He = { key: 0 }, Oe = { key: 5 }, We = {
19
- key: 0,
20
- class: "h-full"
21
- }, Qe = {
4
+ import Me from "../../../../icons/IconFilter.vue.js";
5
+ import Ae from "../../../../icons/IconSearch.vue.js";
6
+ import Ie from "./KunTableHeaders.vue.js";
7
+ import Re from "./KunTableFooter.vue.js";
8
+ import Ee from "./KunTableRows.vue.js";
9
+ import Be from "./KunTableIterators.vue.js";
10
+ import Ve from "../../../KunBtn/src/components/KunBtn.vue.js";
11
+ import je from "./KunTableFilter.vue.js";
12
+ import xe from "../composables/useExpand.js";
13
+ import ze from "../composables/useOptions.js";
14
+ import De from "../composables/useSelect.js";
15
+ import He from "../composables/useFilter.js";
16
+ import Ne from "../composables/KunTableProps.js";
17
+ const Ke = ["placeholder"], Le = { class: "flex-1 overflow-auto" }, Ue = { key: 0 }, Oe = { key: 5 }, We = {
18
+ key: 1,
19
+ class: "h-full flex justify-center items-center"
20
+ }, Qe = { class: "text-center text-4xl" }, qe = {
22
21
  key: 1,
23
22
  class: "sticky bottom-0 z-10 print:hidden"
24
- }, qe = "overflow-hidden h-full w-full flex flex-col border border-slate-200 dark:border-slate-800 rounded", Ge = "table-auto w-full h-fit text-sm text-left", ps = {
23
+ }, Ge = "overflow-hidden h-full w-full flex flex-col border border-slate-200 dark:border-slate-800 rounded", Je = "table-auto w-full h-fit text-sm text-left", ps = {
25
24
  __name: "KunTable",
26
- props: /* @__PURE__ */ W(Ke(), {
25
+ props: /* @__PURE__ */ W(Ne(), {
27
26
  selectedItems: { type: Array, default: () => [] },
28
27
  selectedItemsModifiers: {}
29
28
  }),
30
29
  emits: /* @__PURE__ */ W(["update:page", "update:itemsPerPage", "update:sortBy", "update:search"], ["update:selectedItems"]),
31
- setup(z, { emit: _ }) {
32
- const j = _, m = z, T = be(m), ee = Se(z, "selectedItems"), {
33
- headers: N,
34
- showExpand: $,
30
+ setup(x, { emit: _ }) {
31
+ const z = _, p = x, T = be(p), ee = Se(x, "selectedItems"), {
32
+ headers: D,
33
+ showExpand: k,
35
34
  showSelect: F,
36
- rowClass: D,
35
+ rowClass: H,
37
36
  hideDefaultFooter: se,
38
37
  hideDefaultHeader: oe,
39
38
  tableClass: te,
40
39
  wrapperClass: le,
41
40
  pageOptions: ae,
42
41
  items: ne,
43
- searchable: K,
42
+ searchable: N,
44
43
  debounceTime: re
45
- } = T, w = y(m.search);
46
- Q(() => m.search, (e) => {
44
+ } = T, w = v(p.search);
45
+ Q(() => p.search, (e) => {
47
46
  e !== w.value && (w.value = e);
48
47
  });
49
- const { filteredItems: ie, setSearch: ce, modalFilter: v, applyColumnFilters: ue, clearFilters: de, appliedFilters: pe } = De(T, re);
48
+ const { filteredItems: ie, setSearch: ce, modalFilter: y, applyColumnFilters: ue, clearFilters: de, appliedFilters: pe } = He(T, re);
50
49
  Q(w, (e) => {
51
- j("update:search", e), ce(e);
50
+ z("update:search", e), ce(e);
52
51
  });
53
- const { options: r, paginatedItems: f, updateSort: me } = je(T, j, ie), { isSelected: k, toggleSelect: P, toggleSelectAll: fe, allSelected: he, someSelected: ge } = Ne(f, ee), { isExpanded: M, toggleExpand: A } = ze(), h = q(() => ({
52
+ const { options: i, paginatedItems: f, updateSort: me } = ze(T, z, ie), { isSelected: $, toggleSelect: P, toggleSelectAll: fe, allSelected: he, someSelected: ge } = De(f, ee), { isExpanded: M, toggleExpand: A } = xe(), h = q(() => ({
54
53
  items: f.value,
55
- headers: N.value,
56
- page: r.page,
57
- itemsPerPage: r.itemsPerPage,
54
+ headers: D.value,
55
+ page: i.page,
56
+ itemsPerPage: i.itemsPerPage,
58
57
  toggleSelect: P,
59
- isSelected: k,
58
+ isSelected: $,
60
59
  toggleExpand: A,
61
60
  isExpanded: M,
62
- sortBy: r.sortBy,
63
- hasActions: m.hasActions
64
- })), we = [qe, le.value], ve = [Ge, te.value], L = q(() => m.headers.map((e) => {
65
- var t, i;
61
+ sortBy: i.sortBy,
62
+ hasActions: p.hasActions
63
+ })), we = [Ge, le.value], ye = [Je, te.value], K = q(() => p.headers.map((e) => {
64
+ var t, c;
66
65
  const o = { ...e };
67
66
  if ((e.columnType === "function" || e.columnType == "objectFunction" || e.columnType == "simpleFunction") && typeof e.columnFunction == "string") {
68
- const n = (t = m.functionMap) == null ? void 0 : t[e.columnFunction];
67
+ const n = (t = p.functionMap) == null ? void 0 : t[e.columnFunction];
69
68
  typeof n == "function" ? o.columnFunction = n : (console.warn(
70
69
  `[KunTable] No se encontró la función "${e.columnFunction}" en functionMap`
71
70
  ), o.columnFunction = () => "");
72
71
  }
73
72
  if (e.columnFormat === "function" && typeof e.columnRowText == "string") {
74
- const n = (i = m.functionMap) == null ? void 0 : i[e.columnRowText];
73
+ const n = (c = p.functionMap) == null ? void 0 : c[e.columnRowText];
75
74
  typeof n == "function" ? o.columnRowText = n : (console.warn(
76
75
  `[KunTable] No se encontró la función "${e.columnRowText}" en functionMap`
77
76
  ), o.columnRowText = () => "");
78
77
  }
79
78
  return o;
80
79
  }));
81
- Ce(() => H());
82
- const U = y(null), I = y(!0), R = y(!1);
83
- function ye() {
84
- p.value && (O(), ke(() => {
85
- U.value.focus();
80
+ Ce(() => U());
81
+ const L = v(null), I = v(!0), R = v(!1);
82
+ function ve() {
83
+ m.value && (O(), Pe(() => {
84
+ L.value.focus();
86
85
  }));
87
86
  }
88
- function H() {
89
- p.value && (E.value = "w-fit", I.value = !1, R.value = !0);
87
+ function U() {
88
+ m.value && (E.value = "w-fit", I.value = !1, R.value = !0);
90
89
  }
91
90
  function O() {
92
- p.value && (E.value = "w-full border", R.value = !1, I.value = !0);
91
+ m.value && (E.value = "w-full border", R.value = !1, I.value = !0);
93
92
  }
94
- const E = y("w-full border max-w-sm");
95
- return (e, o) => (l(), c("div", B({ class: we }, e.$attrs, { style: { "user-select": "text" } }), [
96
- s(K) || e.filterable || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), c("div", {
93
+ const E = v("w-full border max-w-sm");
94
+ return (e, o) => (l(), r("div", B({ class: we }, e.$attrs, { style: { "user-select": "text" } }), [
95
+ s(N) || e.filterable || e.$slots.prependSearch || e.$slots.appendSearch ? (l(), r("div", {
97
96
  key: 0,
98
- class: C(["p-2 bg-slate-200 dark:bg-slate-800 print:hidden", {
97
+ class: S(["p-2 bg-slate-200 dark:bg-slate-800 print:hidden", {
99
98
  "justify-start flex": e.searchPosition === "start",
100
99
  "justify-center flex": e.searchPosition === "center",
101
100
  "justify-end flex": e.searchPosition === "end"
102
101
  }])
103
102
  }, [
104
103
  a(e.$slots, "prependSearch"),
105
- e.filterable && e.filters.length ? (l(), S(Be, {
104
+ e.filterable && e.filters.length ? (l(), b(Ve, {
106
105
  key: 0,
107
106
  class: "h-fit",
108
- onClick: o[0] || (o[0] = (t) => v.value = !0),
107
+ onClick: o[0] || (o[0] = (t) => y.value = !0),
109
108
  rounded: "rounded-full",
110
109
  size: "xs",
111
110
  bgColor: "bg-green-200 dark:bg-green-800"
112
111
  }, {
113
- default: x(() => [
114
- b(Z, {
112
+ default: j(() => [
113
+ C(Z, {
115
114
  class: "h-fit",
116
- icon: Pe,
115
+ icon: Me,
117
116
  size: "text-lg"
118
117
  })
119
118
  ]),
120
119
  _: 1
121
120
  })) : u("", !0),
122
- s(K) ? (l(), c("div", {
121
+ s(N) ? (l(), r("div", {
123
122
  key: 1,
124
- class: C(["rounded flex mx-2", [E.value]])
123
+ class: S(["rounded flex mx-2", [E.value]])
125
124
  }, [
126
125
  G(V("input", {
127
126
  "onUpdate:modelValue": o[1] || (o[1] = (t) => w.value = t),
128
127
  type: "text",
129
128
  placeholder: e.searchPlaceholder,
130
- class: C(["w-full text-sm", s(p) ? "px-1" : "px-2 py-1"]),
129
+ class: S(["w-full text-sm", s(m) ? "px-1" : "px-2 py-1"]),
131
130
  ref_key: "searchRef",
132
- ref: U,
131
+ ref: L,
133
132
  onFocus: O,
134
- onBlur: H
135
- }, null, 42, Le), [
133
+ onBlur: U
134
+ }, null, 42, Ke), [
136
135
  [Te, w.value],
137
136
  [J, I.value]
138
137
  ]),
139
- G(b(Z, {
140
- icon: Me,
141
- onClick: ye
138
+ G(C(Z, {
139
+ icon: Ae,
140
+ onClick: ve
142
141
  }, null, 512), [
143
142
  [J, R.value]
144
143
  ])
145
144
  ], 2)) : u("", !0),
146
145
  a(e.$slots, "appendSearch")
147
146
  ], 2)) : u("", !0),
148
- V("div", Ue, [
149
- V("table", {
150
- class: C(ve)
147
+ V("div", Le, [
148
+ s(f).length ? (l(), r("table", {
149
+ key: 0,
150
+ class: S(ye)
151
151
  }, [
152
- e.$slots.colgroup && !s(p) ? (l(), c("colgroup", He, [
152
+ e.$slots.colgroup && !s(m) ? (l(), r("colgroup", Ue, [
153
153
  a(e.$slots, "colgroup", d(g(h.value)))
154
154
  ])) : u("", !0),
155
- !s(oe) && !s(p) ? (l(), S(Ae, {
155
+ !s(oe) && !s(m) ? (l(), b(Ie, {
156
156
  key: 1,
157
- headers: s(N),
158
- "sort-by": s(r).sortBy,
157
+ headers: s(D),
158
+ "sort-by": s(i).sortBy,
159
159
  "show-select": s(F),
160
- "show-expand": s($),
160
+ "show-expand": s(k),
161
161
  "all-selected": s(he),
162
162
  "some-selected": s(ge),
163
163
  "thead-class": e.theadClass,
@@ -166,88 +166,85 @@ const Le = ["placeholder"], Ue = { class: "flex-1 overflow-auto" }, He = { key:
166
166
  "has-actions": e.hasActions,
167
167
  "action-label": e.actionLabel,
168
168
  onSort: s(me),
169
- onToggleSelectAll: s(fe)
170
- }, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "onSort", "onToggleSelectAll"])) : a(e.$slots, "thead", d(B({ key: 2 }, h.value))),
171
- s(f).length && !s(p) ? (l(), c($e, { key: 3 }, [
169
+ onToggleSelectAll: s(fe),
170
+ customHeaders: e.customSlots
171
+ }, null, 8, ["headers", "sort-by", "show-select", "show-expand", "all-selected", "some-selected", "thead-class", "tr-class", "th-class", "has-actions", "action-label", "onSort", "onToggleSelectAll", "customHeaders"])) : a(e.$slots, "thead", d(B({ key: 2 }, h.value))),
172
+ s(m) ? (l(), b(Be, {
173
+ key: 4,
174
+ items: s(f),
175
+ headers: K.value,
176
+ "row-class": s(H),
177
+ "row-class-condition": e.rowClassCondition,
178
+ "is-selected": s($),
179
+ "is-expanded": s(M),
180
+ "show-select": s(F),
181
+ "show-expand": s(k),
182
+ "has-actions": e.hasActions,
183
+ "action-loading-map": e.actionLoadingMap,
184
+ onToggleExpand: s(A),
185
+ onToggleSelect: s(P),
186
+ customSlots: e.customSlots
187
+ }, X({ _: 2 }, [
188
+ Y(e.$slots, (t, c) => ({
189
+ name: c,
190
+ fn: j((n) => [
191
+ a(e.$slots, c, d(g(n)))
192
+ ])
193
+ }))
194
+ ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : (l(), r(ke, { key: 3 }, [
172
195
  a(e.$slots, "body.prepend", d(g(h.value))),
173
- b(Re, {
196
+ C(Ee, {
174
197
  items: s(f),
175
- headers: L.value,
198
+ headers: K.value,
176
199
  "tbody-class": e.tbodyClass,
177
- "row-class": s(D),
200
+ "row-class": s(H),
178
201
  "row-class-condition": e.rowClassCondition,
179
202
  "tr-class": e.trClass,
180
203
  "td-class": e.tdClass,
181
204
  "selected-class": e.selectedClass,
182
205
  "striped-class": e.stripedClass,
183
- "is-selected": s(k),
206
+ "is-selected": s($),
184
207
  "is-expanded": s(M),
185
208
  "show-select": s(F),
186
- "show-expand": s($),
209
+ "show-expand": s(k),
187
210
  "has-actions": e.hasActions,
188
211
  "action-loading-map": e.actionLoadingMap,
189
212
  onToggleExpand: s(A),
190
213
  onToggleSelect: s(P),
191
214
  customSlots: e.customSlots
192
215
  }, X({ _: 2 }, [
193
- Y(e.$slots, (t, i) => ({
194
- name: i,
195
- fn: x((n) => [
196
- a(e.$slots, i, d(g(n)))
216
+ Y(e.$slots, (t, c) => ({
217
+ name: c,
218
+ fn: j((n) => [
219
+ a(e.$slots, c, d(g(n)))
197
220
  ])
198
221
  }))
199
222
  ]), 1032, ["items", "headers", "tbody-class", "row-class", "row-class-condition", "tr-class", "td-class", "selected-class", "striped-class", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"]),
200
223
  a(e.$slots, "body.append", d(g(h.value)))
201
- ], 64)) : s(f).length && s(p) ? (l(), S(Ee, {
202
- key: 4,
203
- items: s(f),
204
- headers: L.value,
205
- "row-class": s(D),
206
- "row-class-condition": e.rowClassCondition,
207
- "is-selected": s(k),
208
- "is-expanded": s(M),
209
- "show-select": s(F),
210
- "show-expand": s($),
211
- "has-actions": e.hasActions,
212
- "action-loading-map": e.actionLoadingMap,
213
- onToggleExpand: s(A),
214
- onToggleSelect: s(P),
215
- customSlots: e.customSlots
216
- }, X({ _: 2 }, [
217
- Y(e.$slots, (t, i) => ({
218
- name: i,
219
- fn: x((n) => [
220
- a(e.$slots, i, d(g(n)))
221
- ])
222
- }))
223
- ]), 1032, ["items", "headers", "row-class", "row-class-condition", "is-selected", "is-expanded", "show-select", "show-expand", "has-actions", "action-loading-map", "onToggleExpand", "onToggleSelect", "customSlots"])) : u("", !0),
224
- e.$slots.tfoot ? (l(), c("tfoot", Oe, [
224
+ ], 64)),
225
+ e.$slots.tfoot ? (l(), r("tfoot", Oe, [
225
226
  a(e.$slots, "tfoot", d(g(h.value)))
226
227
  ])) : u("", !0)
227
- ]),
228
- s(f).length ? u("", !0) : (l(), c("div", We, [
229
- b(xe, {
230
- class: "h-full flex justify-center items-center text-center",
231
- title: e.noDataText,
232
- titleSize: "text-4xl"
233
- }, null, 8, ["title"])
228
+ ])) : u("", !0),
229
+ s(f).length ? u("", !0) : (l(), r("div", We, [
230
+ V("div", Qe, Fe(e.noDataText), 1)
234
231
  ]))
235
232
  ]),
236
- s(se) ? a(e.$slots, "footer", d(B({ key: 2 }, h.value))) : (l(), c("div", Qe, [
237
- b(Ie, {
233
+ s(se) ? a(e.$slots, "footer", d(B({ key: 2 }, h.value))) : (l(), r("div", qe, [
234
+ C(Re, {
238
235
  "items-length": s(ne).length,
239
- "items-per-page": s(r).itemsPerPage,
240
- "current-page": s(r).page,
236
+ "items-per-page": s(i).itemsPerPage,
237
+ "current-page": s(i).page,
241
238
  "page-options": s(ae),
242
- "onUpdate:itemsPerPage": o[2] || (o[2] = (t) => s(r).itemsPerPage = t),
243
- "onUpdate:page": o[3] || (o[3] = (t) => s(r).page = t)
239
+ "onUpdate:itemsPerPage": o[2] || (o[2] = (t) => s(i).itemsPerPage = t),
240
+ "onUpdate:page": o[3] || (o[3] = (t) => s(i).page = t)
244
241
  }, null, 8, ["items-length", "items-per-page", "current-page", "page-options"])
245
242
  ])),
246
- e.filterable && s(v) ? (l(), S(Ve, {
243
+ e.filterable && s(y) ? (l(), b(je, {
247
244
  key: 3,
248
245
  filters: e.filters,
249
- modelValue: s(v),
250
- "onUpdate:modelValue": o[4] || (o[4] = (t) => Fe(v) ? v.value = t : null),
246
+ modelValue: s(y),
247
+ "onUpdate:modelValue": o[4] || (o[4] = (t) => $e(y) ? y.value = t : null),
251
248
  onApplyFilters: s(ue),
252
249
  onClearFilters: s(de),
253
250
  activeFilters: s(pe).byColumn
@@ -1,11 +1,11 @@
1
- import { ref as $, onMounted as E, watch as f, createElementBlock as a, openBlock as o, normalizeClass as r, createElementVNode as k, createCommentVNode as u, renderSlot as g, Fragment as T, renderList as D, normalizeStyle as O, createBlock as h, resolveDynamicComponent as b, toDisplayString as x } from "vue";
2
- import j from "../../../../icons/IconArrowUp.vue.js";
3
- import z from "../../../../icons/IconArrowDown.vue.js";
4
- import I from "../../../../icons/IconArrowDownUp.vue.js";
5
- const L = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onClick"], V = {
1
+ import { ref as $, onMounted as E, watch as f, createElementBlock as r, openBlock as a, normalizeClass as o, createElementVNode as k, createCommentVNode as u, renderSlot as g, Fragment as T, renderList as D, normalizeStyle as H, createBlock as h, resolveDynamicComponent as b, toDisplayString as x } from "vue";
2
+ import O from "../../../../icons/IconArrowUp.vue.js";
3
+ import j from "../../../../icons/IconArrowDown.vue.js";
4
+ import z from "../../../../icons/IconArrowDownUp.vue.js";
5
+ const I = { key: 0 }, L = { key: 1 }, N = ["checked", "aria-checked"], R = ["onClick"], U = {
6
6
  key: 0,
7
7
  class: "inline-flex items-center gap-1 ml-1 print:hidden"
8
- }, F = "bg-slate-200 dark:bg-slate-800 sticky top-0 z-5", H = "", K = "px-3 py-2 text-xs font-medium text-slate-700 dark:text-slate-300 uppercase tracking-wider", Q = {
8
+ }, V = "bg-slate-200 dark:bg-slate-800 sticky top-0 z-5", F = "", K = "px-3 py-2 text-xs font-medium text-slate-700 dark:text-slate-300 uppercase tracking-wider", Q = {
9
9
  __name: "KunTableHeaders",
10
10
  props: {
11
11
  headers: Array,
@@ -20,7 +20,7 @@ const L = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
20
20
  thClass: String,
21
21
  hasActions: Boolean,
22
22
  actionLabel: String,
23
- customSlots: Object
23
+ customHeaders: Object
24
24
  },
25
25
  emits: ["toggle-select-all", "sort", "expandAll", "collapseAll"],
26
26
  setup(l, { emit: S }) {
@@ -44,30 +44,30 @@ const L = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
44
44
  }
45
45
  const w = (s) => {
46
46
  const n = B(s);
47
- return n ? n === "asc" ? j : z : I;
48
- }, A = [F, t.theadClass], v = [H, t.trClass], i = [K, t.thClass], y = $(null), m = () => {
47
+ return n ? n === "asc" ? O : j : z;
48
+ }, A = [V, t.theadClass], v = [F, t.trClass], i = [K, t.thClass], y = $(null), m = () => {
49
49
  y.value && (y.value.indeterminate = t.someSelected && !t.allSelected);
50
50
  };
51
- return E(m), f(() => t.someSelected, m), f(() => t.allSelected, m), (s, n) => (o(), a("thead", {
52
- class: r(A)
51
+ return E(m), f(() => t.someSelected, m), f(() => t.allSelected, m), (s, n) => (a(), r("thead", {
52
+ class: o(A)
53
53
  }, [
54
54
  k("tr", {
55
- class: r(v)
55
+ class: o(v)
56
56
  }, [
57
- l.showExpand ? (o(), a("th", {
57
+ l.showExpand ? (a(), r("th", {
58
58
  key: 0,
59
- class: r([i])
59
+ class: o([i])
60
60
  }, [
61
- s.$slots.expandIcon ? g(s.$slots, "expand-icon", { key: 0 }) : (o(), a("button", {
61
+ s.$slots.expandIcon ? g(s.$slots, "expand-icon", { key: 0 }) : (a(), r("button", {
62
62
  key: 1,
63
63
  onClick: n[0] || (n[0] = (e) => l.isExpanded ? c("expandAll") : c("collapseAll"))
64
64
  }, [
65
- l.isExpanded ? (o(), a("span", L, "−")) : (o(), a("span", N, "+"))
65
+ l.isExpanded ? (a(), r("span", I, "−")) : (a(), r("span", L, "+"))
66
66
  ]))
67
67
  ], 2)) : u("", !0),
68
- l.showSelect ? (o(), a("th", {
68
+ l.showSelect ? (a(), r("th", {
69
69
  key: 1,
70
- class: r([i, "h-full w-10 flex flex-col items-center justify-center"])
70
+ class: o([i, "h-full w-10 flex flex-col items-center justify-center"])
71
71
  }, [
72
72
  k("input", {
73
73
  ref_key: "checkboxRef",
@@ -77,17 +77,17 @@ const L = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
77
77
  "aria-checked": l.someSelected && !l.allSelected ? "mixed" : l.allSelected ? "true" : "false",
78
78
  onChange: p,
79
79
  class: "h-6 w-6 text-blue-600 transition-all duration-200 ease-in-out rounded print:hidden border-gray-300 dark:border-slate-600 checked:bg-blue-600 checked:border-blue-600 indeterminate:bg-blue-400 indeterminate:border-blue-400"
80
- }, null, 40, R)
80
+ }, null, 40, N)
81
81
  ])) : u("", !0),
82
- (o(!0), a(T, null, D(l.headers, (e) => {
82
+ (a(!0), r(T, null, D(l.headers, (e) => {
83
83
  var d;
84
- return o(), a("th", {
84
+ return a(), r("th", {
85
85
  key: e.key,
86
- class: r([i, e.headerAlign === "right" ? "text-right" : e.headerAlign === "left" ? "text-left" : "text-center"]),
86
+ class: o([i, e.headerAlign === "right" ? "text-right" : e.headerAlign === "left" ? "text-left" : "text-center"]),
87
87
  onClick: (M) => C(e),
88
- style: O({ cursor: e.sortable ? "pointer" : "default" })
88
+ style: H({ cursor: e.sortable ? "pointer" : "default" })
89
89
  }, [
90
- (d = l.customSlots) != null && d[`header.${e.value}`] ? (o(), h(b(l.customSlots[`header.${e.value}`]), {
90
+ (d = l.customHeaders) != null && d[`header.${e.value}`] ? (a(), h(b(l.customHeaders[`header.${e.value}`]), {
91
91
  key: 0,
92
92
  header: e
93
93
  }, null, 8, ["header"])) : g(s.$slots, `header.${e.key}`, {
@@ -95,15 +95,15 @@ const L = { key: 0 }, N = { key: 1 }, R = ["checked", "aria-checked"], U = ["onC
95
95
  header: e
96
96
  }, () => [
97
97
  k("span", null, x(e.label ?? e.text), 1),
98
- e.sortable ? (o(), a("span", V, [
99
- (o(), h(b(w(e)), { class: "w-4 h-4 text-gray-500" }))
98
+ e.sortable ? (a(), r("span", U, [
99
+ (a(), h(b(w(e)), { class: "w-4 h-4 text-gray-500" }))
100
100
  ])) : u("", !0)
101
101
  ])
102
- ], 14, U);
102
+ ], 14, R);
103
103
  }), 128)),
104
- l.hasActions ? (o(), a("th", {
104
+ l.hasActions ? (a(), r("th", {
105
105
  key: 2,
106
- class: r([[i], "text-center print:hidden"])
106
+ class: o([[i], "text-center print:hidden"])
107
107
  }, x(l.actionLabel), 3)) : u("", !0)
108
108
  ])
109
109
  ]));
@@ -56,6 +56,7 @@ const t = () => ({
56
56
  loadingText: { type: String, default: "Cargando..." },
57
57
  // Slots control
58
58
  customSlots: { type: Object, default: () => ({}) },
59
+ customHeaders: { type: Object, default: () => ({}) },
59
60
  showTopSlot: { type: Boolean, default: !1 },
60
61
  showBottomSlot: { type: Boolean, default: !1 },
61
62
  functionMap: { type: Object, default: () => ({}) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adverich-kun-ui",
3
- "version": "0.1.317",
3
+ "version": "0.1.319",
4
4
  "type": "module",
5
5
  "description": "Una librería de componentes Vue.js con Tailwind CSS",
6
6
  "main": "dist/index.js",