@indielayer/ui 1.15.2 → 1.16.0

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.
@@ -78,9 +78,22 @@ const itemsSorted = computed<Book[]>(() => {
78
78
  <template #item-published="{ item }">
79
79
  {{ formatDate(item.published) }}
80
80
  </template>
81
+
81
82
  <template #item-status="{ item }">
82
83
  <x-tag size="xs" color="primary" rounded>{{ item.status }}</x-tag>
83
84
  </template>
85
+
86
+ <template #footer>
87
+ <tfoot>
88
+ <tr>
89
+ <td colspan="6" class="text-center py-2">
90
+ <p class="text-sm text-gray-500 font-medium">
91
+ Footer content
92
+ </p>
93
+ </td>
94
+ </tr>
95
+ </tfoot>
96
+ </template>
84
97
  </x-table>
85
98
  </x-card>
86
99
 
@@ -300,6 +300,8 @@ declare const _default: <T>(__VLS_props: Partial<{
300
300
  item: number;
301
301
  }) => any>> & Partial<Record<string, (_: {
302
302
  item: T;
303
+ }) => any>> & Partial<Record<string, (_: {
304
+ header: TableHeader;
303
305
  }) => any>> & {
304
306
  title?(_: {}): any;
305
307
  actions?(_: {}): any;
@@ -308,6 +310,7 @@ declare const _default: <T>(__VLS_props: Partial<{
308
310
  "expanded-row"?(_: {
309
311
  item: T;
310
312
  }): any;
313
+ footer?(_: {}): any;
311
314
  };
312
315
  emit: {
313
316
  (e: 'update:sort', sortValues: string[]): void;
@@ -432,6 +435,8 @@ declare const _default: <T>(__VLS_props: Partial<{
432
435
  item: number;
433
436
  }) => any>> & Partial<Record<string, (_: {
434
437
  item: T;
438
+ }) => any>> & Partial<Record<string, (_: {
439
+ header: TableHeader;
435
440
  }) => any>> & {
436
441
  title?(_: {}): any;
437
442
  actions?(_: {}): any;
@@ -440,6 +445,7 @@ declare const _default: <T>(__VLS_props: Partial<{
440
445
  "expanded-row"?(_: {
441
446
  item: T;
442
447
  }): any;
448
+ footer?(_: {}): any;
443
449
  };
444
450
  emit: {
445
451
  (e: 'update:sort', sortValues: string[]): void;
@@ -567,6 +573,8 @@ declare const _default: <T>(__VLS_props: Partial<{
567
573
  item: number;
568
574
  }) => any>> & Partial<Record<string, (_: {
569
575
  item: T;
576
+ }) => any>> & Partial<Record<string, (_: {
577
+ header: TableHeader;
570
578
  }) => any>> & {
571
579
  title?(_: {}): any;
572
580
  actions?(_: {}): any;
@@ -575,6 +583,7 @@ declare const _default: <T>(__VLS_props: Partial<{
575
583
  "expanded-row"?(_: {
576
584
  item: T;
577
585
  }): any;
586
+ footer?(_: {}): any;
578
587
  };
579
588
  emit: {
580
589
  (e: 'update:sort', sortValues: string[]): void;
@@ -1,17 +1,17 @@
1
- import { defineComponent as re, mergeModels as X, useModel as se, ref as oe, computed as b, watch as ie, openBlock as s, createElementBlock as i, mergeProps as D, unref as c, renderSlot as p, createElementVNode as y, normalizeStyle as K, normalizeClass as m, createVNode as v, withCtx as f, createBlock as g, withModifiers as L, createCommentVNode as k, Fragment as S, renderList as C, createTextVNode as W, toDisplayString as q } from "vue";
2
- import { useTheme as ue } from "../../composables/useTheme.js";
3
- import { useVirtualList as de } from "../../composables/useVirtualList.js";
4
- import ce from "./TableHead.vue.js";
5
- import E from "./TableHeader.vue.js";
6
- import fe from "./TableBody.js";
7
- import G from "./TableRow.vue.js";
8
- import A from "./TableCell.vue.js";
9
- import pe from "../spinner/Spinner.vue.js";
10
- import ve from "../skeleton/Skeleton.vue.js";
11
- import ge from "../icon/Icon.vue.js";
12
- import J from "../checkbox/Checkbox.vue.js";
13
- import { chevronDownIcon as ye } from "../../common/icons.js";
14
- const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se = ["onClick"], we = ["colspan"], $e = {
1
+ import { defineComponent as oe, mergeModels as D, useModel as ie, ref as ue, computed as m, watch as de, useSlots as ce, openBlock as s, createElementBlock as i, mergeProps as W, unref as p, renderSlot as g, createElementVNode as h, normalizeStyle as K, normalizeClass as k, createVNode as v, withCtx as u, createBlock as d, withModifiers as L, createCommentVNode as y, Fragment as b, renderList as $, createTextVNode as j, toDisplayString as q } from "vue";
2
+ import { useTheme as fe } from "../../composables/useTheme.js";
3
+ import { useVirtualList as pe } from "../../composables/useVirtualList.js";
4
+ import ge from "./TableHead.vue.js";
5
+ import O from "./TableHeader.vue.js";
6
+ import ve from "./TableBody.js";
7
+ import E from "./TableRow.vue.js";
8
+ import w from "./TableCell.vue.js";
9
+ import ye from "../spinner/Spinner.vue.js";
10
+ import me from "../skeleton/Skeleton.vue.js";
11
+ import he from "../icon/Icon.vue.js";
12
+ import G from "../checkbox/Checkbox.vue.js";
13
+ import { chevronDownIcon as ke } from "../../common/icons.js";
14
+ const be = { key: 1 }, we = ["colspan"], Se = { key: 2 }, $e = ["colspan"], Ce = ["onClick"], Be = ["colspan"], Fe = { key: 0 }, Le = {
15
15
  headers: {
16
16
  type: Array,
17
17
  default: () => []
@@ -65,10 +65,10 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
65
65
  toFn: Function,
66
66
  hrefFn: Function,
67
67
  hrefTarget: String
68
- }, Ce = { name: "XTable" }, Ve = /* @__PURE__ */ re({
69
- ...Ce,
70
- props: /* @__PURE__ */ X({
71
- ...$e,
68
+ }, Ae = { name: "XTable" }, De = /* @__PURE__ */ oe({
69
+ ...Ae,
70
+ props: /* @__PURE__ */ D({
71
+ ...Le,
72
72
  items: {
73
73
  type: Array,
74
74
  default: () => []
@@ -80,10 +80,10 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
80
80
  selected: {},
81
81
  selectedModifiers: {}
82
82
  }),
83
- emits: /* @__PURE__ */ X(["update:sort", "click-row"], ["update:selected"]),
84
- setup(u, { emit: Q }) {
85
- const l = u, r = se(u, "selected"), w = oe(/* @__PURE__ */ new Map()), $ = b(() => l.items), { list: U, containerProps: Y, wrapperProps: Z } = de(
86
- $,
83
+ emits: /* @__PURE__ */ D(["update:sort", "click-row"], ["update:selected"]),
84
+ setup(c, { emit: J }) {
85
+ const l = c, r = ie(c, "selected"), C = ue(/* @__PURE__ */ new Map()), B = m(() => l.items), { list: Q, containerProps: U, wrapperProps: Y } = pe(
86
+ B,
87
87
  {
88
88
  disabled: !l.virtualList,
89
89
  itemHeight: l.virtualListItemHeight || 54,
@@ -92,152 +92,152 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
92
92
  overscan: l.virtualListOverscan
93
93
  }
94
94
  );
95
- function d(e, a) {
95
+ function f(e, n) {
96
96
  if (!l.keyProp || !e || typeof e != "object" || e === null)
97
- return a;
97
+ return n;
98
98
  const t = e[l.keyProp];
99
- return t == null ? (console.warn(`[XTable] keyProp "${l.keyProp}" is undefined/null for item at index ${a}. Falling back to index.`), a) : typeof t != "string" && typeof t != "number" ? (console.warn(`[XTable] keyProp "${l.keyProp}" must be a string or number, got ${typeof t}. Falling back to index.`), a) : t;
99
+ return t == null ? (console.warn(`[XTable] keyProp "${l.keyProp}" is undefined/null for item at index ${n}. Falling back to index.`), n) : typeof t != "string" && typeof t != "number" ? (console.warn(`[XTable] keyProp "${l.keyProp}" must be a string or number, got ${typeof t}. Falling back to index.`), n) : t;
100
100
  }
101
- function B(e) {
101
+ function F(e) {
102
102
  return e.index;
103
103
  }
104
- const M = Q;
105
- function j(e, a) {
104
+ const M = J;
105
+ function Z(e, n) {
106
106
  if (e)
107
- for (let t = 0; t < a.length; t++) {
108
- const { 0: n, 1: o } = a[t].split(",");
109
- if (e === n)
107
+ for (let t = 0; t < n.length; t++) {
108
+ const { 0: a, 1: o } = n[t].split(",");
109
+ if (e === a)
110
110
  return parseInt(o) > 0 ? 1 : -1;
111
111
  }
112
112
  }
113
113
  function _(e) {
114
- const a = l.sort.slice(0);
114
+ const n = l.sort.slice(0);
115
115
  let t = !1;
116
- for (let n = 0; n < a.length; n++) {
117
- const { 0: o, 1: h } = a[n].split(",");
116
+ for (let a = 0; a < n.length; a++) {
117
+ const { 0: o, 1: S } = n[a].split(",");
118
118
  if (o === e.value) {
119
- if (t = !0, h === "-1") {
120
- a.splice(n, 1, `${e.value},1`);
119
+ if (t = !0, S === "-1") {
120
+ n.splice(a, 1, `${e.value},1`);
121
121
  break;
122
- } else if (h === "1") {
123
- a.splice(n, 1);
122
+ } else if (S === "1") {
123
+ n.splice(a, 1);
124
124
  break;
125
125
  }
126
126
  }
127
127
  }
128
- t || a.push(`${e.value},-1`), M("update:sort", a);
128
+ t || n.push(`${e.value},-1`), M("update:sort", n);
129
129
  }
130
- const F = /* @__PURE__ */ new Map();
131
- function ee(e, a) {
132
- if (!a || !e)
130
+ const A = /* @__PURE__ */ new Map();
131
+ function ee(e, n) {
132
+ if (!n || !e)
133
133
  return "";
134
134
  let t;
135
- return Array.isArray(a) ? t = a : F.has(a) ? t = F.get(a) : (t = a.match(/([^[.\]])+/g), t && F.set(a, t)), !t || t.length === 0 ? "" : t.reduce((o, h) => o == null || typeof o != "object" ? null : o[h], e) ?? "";
135
+ return Array.isArray(n) ? t = n : A.has(n) ? t = A.get(n) : (t = n.match(/([^[.\]])+/g), t && A.set(n, t)), !t || t.length === 0 ? "" : t.reduce((o, S) => o == null || typeof o != "object" ? null : o[S], e) ?? "";
136
136
  }
137
- const x = b(() => l.selectable ? $.value.map((e, a) => d(e, a)) : []), O = b(() => !l.selectable || l.singleSelect ? /* @__PURE__ */ new Set() : Array.isArray(r.value) ? new Set(r.value) : /* @__PURE__ */ new Set()), V = b(() => {
137
+ const x = m(() => l.selectable ? B.value.map((e, n) => f(e, n)) : []), V = m(() => !l.selectable || l.singleSelect ? /* @__PURE__ */ new Set() : Array.isArray(r.value) ? new Set(r.value) : /* @__PURE__ */ new Set()), z = m(() => {
138
138
  if (!l.selectable || l.singleSelect || !Array.isArray(r.value) || r.value.length === 0)
139
139
  return !1;
140
140
  const e = x.value.length;
141
141
  return e === 0 ? !1 : r.value.length === e;
142
- }), T = b(() => {
142
+ }), T = m(() => {
143
143
  if (!l.selectable || l.singleSelect || !Array.isArray(r.value) || r.value.length === 0)
144
144
  return !1;
145
145
  const e = x.value.length;
146
146
  return e === 0 ? !1 : r.value.length > 0 && r.value.length !== e;
147
147
  });
148
- function z(e) {
149
- return l.selectable ? l.singleSelect ? r.value === e : O.value.has(e) : !1;
148
+ function R(e) {
149
+ return l.selectable ? l.singleSelect ? r.value === e : V.value.has(e) : !1;
150
150
  }
151
151
  function N(e) {
152
- l.selectable && (l.singleSelect ? r.value = r.value === e ? void 0 : e : (Array.isArray(r.value) || (r.value = []), O.value.has(e) ? r.value = r.value.filter((a) => a !== e) : r.value = [...r.value, e]));
152
+ l.selectable && (l.singleSelect ? r.value = r.value === e ? void 0 : e : (Array.isArray(r.value) || (r.value = []), V.value.has(e) ? r.value = r.value.filter((n) => n !== e) : r.value = [...r.value, e]));
153
153
  }
154
- function R() {
155
- !l.selectable || l.singleSelect || (V.value || T.value ? r.value = [] : r.value = x.value);
154
+ function X() {
155
+ !l.selectable || l.singleSelect || (z.value || T.value ? r.value = [] : r.value = x.value);
156
156
  }
157
157
  function te(e) {
158
158
  if (!l.expandable)
159
159
  return;
160
- const a = d(e.data, B(e));
161
- w.value.set(a, !w.value.get(a));
160
+ const n = f(e.data, F(e));
161
+ C.value.set(n, !C.value.get(n));
162
162
  }
163
163
  function P(e) {
164
164
  if (!l.expandable)
165
165
  return !1;
166
- const a = d(e.data, B(e));
167
- return w.value.get(a) ?? !1;
166
+ const n = f(e.data, F(e));
167
+ return C.value.get(n) ?? !1;
168
168
  }
169
- function le(e, a) {
170
- const t = B(a);
169
+ function le(e, n) {
170
+ const t = F(n);
171
171
  if (l.selectable && l.singleSelect) {
172
- const n = d(e, t);
173
- N(n);
172
+ const a = f(e, t);
173
+ N(a);
174
174
  }
175
175
  M("click-row", e, t);
176
176
  }
177
- const H = b(() => {
177
+ const H = m(() => {
178
178
  let e = l.headers.length;
179
179
  return l.selectable && !l.singleSelect && e++, l.expandable && e++, e;
180
180
  });
181
- ie($, (e) => {
182
- const a = /* @__PURE__ */ new Set();
183
- e.forEach((t, n) => {
184
- a.add(d(t, n));
185
- }), l.expandable && w.value.forEach((t, n) => {
186
- a.has(n) || w.value.delete(n);
187
- }), l.selectable && l.autoClearSelected && (l.singleSelect ? a.has(r.value) || (r.value = void 0) : Array.isArray(r.value) && r.value.length > 0 && (r.value = r.value.filter((t) => a.has(t))));
181
+ de(B, (e) => {
182
+ const n = /* @__PURE__ */ new Set();
183
+ e.forEach((t, a) => {
184
+ n.add(f(t, a));
185
+ }), l.expandable && C.value.forEach((t, a) => {
186
+ n.has(a) || C.value.delete(a);
187
+ }), l.selectable && l.autoClearSelected && (l.singleSelect ? n.has(r.value) || (r.value = void 0) : Array.isArray(r.value) && r.value.length > 0 && (r.value = r.value.filter((t) => n.has(t))));
188
188
  }, { immediate: !0 });
189
- const { styles: ae, classes: I, className: ne } = ue("Table", {}, l);
190
- return (e, a) => (s(), i("div", D({
191
- class: [c(ne), c(I).wrapper]
192
- }, c(Y)), [
193
- p(e.$slots, "title"),
194
- p(e.$slots, "actions"),
195
- y("div", D(c(Z), {
189
+ const ne = ce(), ae = m(() => Object.keys(ne).some((e) => e.startsWith("footer-"))), { styles: re, classes: I, className: se } = fe("Table", {}, l);
190
+ return (e, n) => (s(), i("div", W({
191
+ class: [p(se), p(I).wrapper]
192
+ }, p(U)), [
193
+ g(e.$slots, "title"),
194
+ g(e.$slots, "actions"),
195
+ h("div", W(p(Y), {
196
196
  class: ["relative", {
197
197
  "!h-auto": l.loading
198
198
  }]
199
199
  }), [
200
- y("table", {
201
- style: K(c(ae)),
202
- class: m(c(I).table)
200
+ h("table", {
201
+ style: K(p(re)),
202
+ class: k(p(I).table)
203
203
  }, [
204
- v(ce, { "sticky-header": e.stickyHeader }, {
205
- default: f(() => [
206
- l.selectable && !l.singleSelect ? (s(), g(E, {
204
+ v(ge, { "sticky-header": e.stickyHeader }, {
205
+ default: u(() => [
206
+ l.selectable && !l.singleSelect ? (s(), d(O, {
207
207
  key: 0,
208
208
  width: "40",
209
209
  class: "!pl-3.5 !pr-0.5 !py-2.5 cursor-pointer",
210
- onClick: R
210
+ onClick: X
211
211
  }, {
212
- default: f(() => [
213
- v(J, {
214
- "model-value": V.value || T.value,
212
+ default: u(() => [
213
+ v(G, {
214
+ "model-value": z.value || T.value,
215
215
  indeterminate: T.value,
216
216
  "hide-footer": "",
217
217
  "aria-label": "Select all rows",
218
218
  "skip-form-registry": "",
219
- onClick: L(R, ["prevent", "stop"])
219
+ onClick: L(X, ["prevent", "stop"])
220
220
  }, null, 8, ["model-value", "indeterminate"])
221
221
  ]),
222
222
  _: 1
223
- })) : k("", !0),
224
- e.expandable ? (s(), g(E, {
223
+ })) : y("", !0),
224
+ e.expandable ? (s(), d(O, {
225
225
  key: 1,
226
226
  width: "48",
227
227
  class: "!p-0"
228
- })) : k("", !0),
229
- (s(!0), i(S, null, C(e.headers, (t, n) => (s(), g(E, {
230
- key: n,
228
+ })) : y("", !0),
229
+ (s(!0), i(b, null, $(e.headers, (t, a) => (s(), d(O, {
230
+ key: a,
231
231
  "text-align": t.align,
232
- sort: j(t.value, e.sort),
232
+ sort: Z(t.value, e.sort),
233
233
  sortable: t.sortable,
234
234
  width: t.width,
235
235
  tooltip: t.tooltip,
236
236
  onClick: (o) => t.sortable ? _(t) : null
237
237
  }, {
238
- default: f(() => [
239
- p(e.$slots, `header-${t.value}`, { header: t }, () => [
240
- W(q(t.text), 1)
238
+ default: u(() => [
239
+ g(e.$slots, `header-${t.value}`, { header: t }, () => [
240
+ j(q(t.text), 1)
241
241
  ])
242
242
  ]),
243
243
  _: 2
@@ -245,24 +245,24 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
245
245
  ]),
246
246
  _: 3
247
247
  }, 8, ["sticky-header"]),
248
- v(c(fe), null, {
249
- default: f(() => [
250
- e.loading ? (s(!0), i(S, { key: 0 }, C(Number(e.loadingLines), (t, n) => (s(), g(G, {
251
- key: n,
248
+ v(p(ve), null, {
249
+ default: u(() => [
250
+ e.loading ? (s(!0), i(b, { key: 0 }, $(Number(e.loadingLines), (t, a) => (s(), d(E, {
251
+ key: a,
252
252
  striped: e.striped
253
253
  }, {
254
- default: f(() => [
255
- (s(!0), i(S, null, C(e.headers, (o, h) => (s(), g(A, {
256
- key: h,
254
+ default: u(() => [
255
+ (s(!0), i(b, null, $(e.headers, (o, S) => (s(), d(w, {
256
+ key: S,
257
257
  "text-align": o.align,
258
258
  width: o.width,
259
259
  dense: e.dense,
260
260
  fixed: e.fixed
261
261
  }, {
262
- default: f(() => [
263
- p(e.$slots, `loading-${o.value}`, { item: t }, () => [
264
- v(ve, {
265
- class: m(["max-w-[60%]", {
262
+ default: u(() => [
263
+ g(e.$slots, `loading-${o.value}`, { item: t }, () => [
264
+ v(me, {
265
+ class: k(["max-w-[60%]", {
266
266
  "mx-auto": o.align === "center",
267
267
  "ml-auto": o.align === "right"
268
268
  }]),
@@ -274,69 +274,69 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
274
274
  }, 1032, ["text-align", "width", "dense", "fixed"]))), 128))
275
275
  ]),
276
276
  _: 2
277
- }, 1032, ["striped"]))), 128)) : e.error ? (s(), i("tr", me, [
278
- y("td", { colspan: H.value }, [
279
- p(e.$slots, "error")
280
- ], 8, he)
281
- ])) : !$.value || $.value.length === 0 ? (s(), i("tr", be, [
282
- y("td", { colspan: H.value }, [
283
- p(e.$slots, "empty")
284
- ], 8, ke)
285
- ])) : (s(!0), i(S, { key: 3 }, C(c(U), (t) => (s(), i(S, {
286
- key: d(t.data, t.index)
277
+ }, 1032, ["striped"]))), 128)) : e.error ? (s(), i("tr", be, [
278
+ h("td", { colspan: H.value }, [
279
+ g(e.$slots, "error")
280
+ ], 8, we)
281
+ ])) : !B.value || B.value.length === 0 ? (s(), i("tr", Se, [
282
+ h("td", { colspan: H.value }, [
283
+ g(e.$slots, "empty")
284
+ ], 8, $e)
285
+ ])) : (s(!0), i(b, { key: 3 }, $(p(Q), (t) => (s(), i(b, {
286
+ key: f(t.data, t.index)
287
287
  }, [
288
- v(G, {
289
- pointer: e.pointer || !!u.toFn || !!u.hrefFn,
288
+ v(E, {
289
+ pointer: e.pointer || !!c.toFn || !!c.hrefFn,
290
290
  striped: e.striped,
291
- selected: z(d(t.data, t.index)),
291
+ selected: R(f(t.data, t.index)),
292
292
  "single-select": e.singleSelect,
293
- onClick: (n) => le(t.data, t)
293
+ onClick: (a) => le(t.data, t)
294
294
  }, {
295
- default: f(() => [
296
- l.selectable && !e.singleSelect ? (s(), g(A, {
295
+ default: u(() => [
296
+ l.selectable && !e.singleSelect ? (s(), d(w, {
297
297
  key: 0,
298
298
  width: "40",
299
299
  class: "!pl-3.5 !pr-0.5 cursor-pointer",
300
- onClick: L((n) => N(d(t.data, t.index)), ["stop"])
300
+ onClick: L((a) => N(f(t.data, t.index)), ["stop"])
301
301
  }, {
302
- default: f(() => [
303
- v(J, {
304
- "model-value": z(d(t.data, t.index)),
302
+ default: u(() => [
303
+ v(G, {
304
+ "model-value": R(f(t.data, t.index)),
305
305
  "hide-footer": "",
306
- "aria-label": `Select row ${B(t) + 1}`,
306
+ "aria-label": `Select row ${F(t) + 1}`,
307
307
  "skip-form-registry": "",
308
- onClick: L((n) => N(d(t.data, t.index)), ["prevent", "stop"])
308
+ onClick: L((a) => N(f(t.data, t.index)), ["prevent", "stop"])
309
309
  }, null, 8, ["model-value", "aria-label", "onClick"])
310
310
  ]),
311
311
  _: 2
312
- }, 1032, ["onClick"])) : k("", !0),
313
- e.expandable ? (s(), g(A, {
312
+ }, 1032, ["onClick"])) : y("", !0),
313
+ e.expandable ? (s(), d(w, {
314
314
  key: 1,
315
315
  width: "48",
316
316
  class: "!p-1"
317
317
  }, {
318
- default: f(() => [
319
- y("button", {
318
+ default: u(() => [
319
+ h("button", {
320
320
  type: "button",
321
- class: m(["px-3 p-2", [e.dense ? "p-0.5" : "px-3 py-2"]]),
322
- onClick: L((n) => te(t), ["stop"])
321
+ class: k(["px-3 p-2", [e.dense ? "p-0.5" : "px-3 py-2"]]),
322
+ onClick: L((a) => te(t), ["stop"])
323
323
  }, [
324
- v(ge, {
325
- icon: c(ye),
324
+ v(he, {
325
+ icon: p(ke),
326
326
  size: e.dense ? "xs" : "md",
327
- class: m(["transition-transform", {
327
+ class: k(["transition-transform", {
328
328
  "rotate-180": P(t)
329
329
  }])
330
330
  }, null, 8, ["icon", "size", "class"])
331
- ], 10, Se)
331
+ ], 10, Ce)
332
332
  ]),
333
333
  _: 2
334
- }, 1024)) : k("", !0),
335
- (s(!0), i(S, null, C(e.headers, (n, o) => (s(), g(A, {
334
+ }, 1024)) : y("", !0),
335
+ (s(!0), i(b, null, $(e.headers, (a, o) => (s(), d(w, {
336
336
  key: o,
337
- "text-align": n.align,
338
- truncate: n.truncate,
339
- width: n.width,
337
+ "text-align": a.align,
338
+ truncate: a.truncate,
339
+ width: a.width,
340
340
  dense: e.dense,
341
341
  style: K([l.virtualList ? {
342
342
  height: `${l.virtualListItemHeight}px`,
@@ -344,15 +344,15 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
344
344
  overflow: "hidden",
345
345
  whiteSpace: "nowrap"
346
346
  } : {}]),
347
- href: u.hrefFn ? u.hrefFn(t.data) : void 0,
348
- to: u.toFn ? u.toFn(t.data) : void 0,
349
- target: u.hrefFn ? u.hrefTarget : void 0
347
+ href: c.hrefFn ? c.hrefFn(t.data) : void 0,
348
+ to: c.toFn ? c.toFn(t.data) : void 0,
349
+ target: c.hrefFn ? c.hrefTarget : void 0
350
350
  }, {
351
- default: f(() => [
352
- p(e.$slots, `item-${n.value}`, {
351
+ default: u(() => [
352
+ g(e.$slots, `item-${a.value}`, {
353
353
  item: t.data
354
354
  }, () => [
355
- W(q(ee(t.data, n.value)), 1)
355
+ j(q(ee(t.data, a.value)), 1)
356
356
  ])
357
357
  ]),
358
358
  _: 2
@@ -362,33 +362,63 @@ const me = { key: 1 }, he = ["colspan"], be = { key: 2 }, ke = ["colspan"], Se =
362
362
  }, 1032, ["pointer", "striped", "selected", "single-select", "onClick"]),
363
363
  e.expandable ? (s(), i("tr", {
364
364
  key: 0,
365
- class: m({ hidden: !P(t) })
365
+ class: k({ hidden: !P(t) })
366
366
  }, [
367
- y("td", { colspan: H.value }, [
368
- y("div", {
369
- class: m(["overflow-hidden transition-opacity", [P(t) ? "" : "opacity-0 max-h-0"]])
367
+ h("td", { colspan: H.value }, [
368
+ h("div", {
369
+ class: k(["overflow-hidden transition-opacity", [P(t) ? "" : "opacity-0 max-h-0"]])
370
370
  }, [
371
- p(e.$slots, "expanded-row", {
371
+ g(e.$slots, "expanded-row", {
372
372
  item: t.data
373
373
  })
374
374
  ], 2)
375
- ], 8, we)
376
- ], 2)) : k("", !0)
375
+ ], 8, Be)
376
+ ], 2)) : y("", !0)
377
377
  ], 64))), 128))
378
378
  ]),
379
379
  _: 3
380
- })
380
+ }),
381
+ g(e.$slots, "footer", {}, () => [
382
+ ae.value && !e.loading ? (s(), i("tfoot", Fe, [
383
+ v(E, null, {
384
+ default: u(() => [
385
+ l.selectable && !l.singleSelect ? (s(), d(w, {
386
+ key: 0,
387
+ width: "40",
388
+ class: "!pl-3.5 !pr-0.5"
389
+ })) : y("", !0),
390
+ e.expandable ? (s(), d(w, {
391
+ key: 1,
392
+ width: "48",
393
+ class: "!p-0"
394
+ })) : y("", !0),
395
+ (s(!0), i(b, null, $(e.headers, (t, a) => (s(), d(w, {
396
+ key: a,
397
+ "text-align": t.align,
398
+ width: t.width,
399
+ dense: e.dense
400
+ }, {
401
+ default: u(() => [
402
+ g(e.$slots, `footer-${t.value}`, { header: t })
403
+ ]),
404
+ _: 2
405
+ }, 1032, ["text-align", "width", "dense"]))), 128))
406
+ ]),
407
+ _: 3
408
+ })
409
+ ])) : y("", !0)
410
+ ])
381
411
  ], 6),
382
412
  e.loading ? (s(), i("div", {
383
413
  key: 0,
384
- class: m(c(I).loadingWrapper)
414
+ class: k(p(I).loadingWrapper)
385
415
  }, [
386
- v(pe, { size: "lg" })
387
- ], 2)) : k("", !0)
416
+ v(ye, { size: "lg" })
417
+ ], 2)) : y("", !0)
388
418
  ], 16)
389
419
  ], 16));
390
420
  }
391
421
  });
392
422
  export {
393
- Ve as default
423
+ De as default
394
424
  };