@soft-stech/bootsman-ui-shadcn 2.0.15 → 2.0.16

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,31 +1,29 @@
1
- import { defineComponent as d, ref as o, createElementBlock as a, openBlock as i, normalizeClass as c, unref as n, createElementVNode as h, renderSlot as p } from "vue";
2
- import { g as _ } from "./utils-DhVytAXN.js";
3
- const f = { class: "h-10" }, b = /* @__PURE__ */ d({
1
+ import { defineComponent as s, ref as a, createElementBlock as i, openBlock as o, normalizeClass as c, unref as n, renderSlot as h } from "vue";
2
+ import { g as p } from "./utils-DhVytAXN.js";
3
+ const v = /* @__PURE__ */ s({
4
4
  __name: "BuiTableHeader",
5
5
  props: {
6
6
  class: {},
7
7
  freezeHeader: { type: Boolean }
8
8
  },
9
- setup(t, { expose: s }) {
10
- const e = o(null);
11
- s({ headRef: e });
9
+ setup(t, { expose: l }) {
10
+ const e = a(null);
11
+ l({ headRef: e });
12
12
  const r = t;
13
- return (l, m) => (i(), a("thead", {
13
+ return (d, f) => (o(), i("thead", {
14
14
  ref_key: "headRef",
15
15
  ref: e,
16
16
  class: c(
17
- n(_)(
17
+ n(p)(
18
18
  r.class,
19
19
  r.freezeHeader ? "sticky top-0 z-1 [&_th:first-child>div>div]:pl-3 [&_th:last-child>div>div]:border-r-0 [&_th:last-child>div>div]:pr-14 [&_tr:last-child]:border-b-0" : "[&_th:first-child>div]:pl-3 [&_th:last-child>div]:border-0 [&_th:last-child>div]:pr-14"
20
20
  )
21
21
  )
22
22
  }, [
23
- h("tr", f, [
24
- p(l.$slots, "default")
25
- ])
23
+ h(d.$slots, "default")
26
24
  ], 2));
27
25
  }
28
26
  });
29
27
  export {
30
- b as _
28
+ v as _
31
29
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../BuiTableHeader.vue_vue_type_script_setup_true_lang-B6wyr0bg.js";
1
+ import { _ as f } from "../../BuiTableHeader.vue_vue_type_script_setup_true_lang-Di2FKUwD.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,10 +1,10 @@
1
1
  import { _ as Rt } from "../../BuiTable.vue_vue_type_script_setup_true_lang-Dd_dkcy4.js";
2
2
  import { _ as It } from "../../BuiTableBody.vue_vue_type_script_setup_true_lang-CZvFJVkb.js";
3
- import { _ as Se } from "../../BuiTableCell.vue_vue_type_script_setup_true_lang-BzFROkZg.js";
3
+ import { _ as $e } from "../../BuiTableCell.vue_vue_type_script_setup_true_lang-BzFROkZg.js";
4
4
  import { _ as Mt } from "../../BuiTableHead.vue_vue_type_script_setup_true_lang-DA2KX8Pg.js";
5
- import { _ as zt } from "../../BuiTableHeader.vue_vue_type_script_setup_true_lang-B6wyr0bg.js";
6
- import { _ as $e } from "../../BuiTableRow.vue_vue_type_script_setup_true_lang-BJk8Yk1B.js";
7
- import { defineComponent as rt, computed as F, ref as Y, createElementBlock as S, openBlock as c, Fragment as z, createBlock as O, createCommentVNode as I, unref as s, normalizeClass as fe, withCtx as f, renderList as J, normalizeStyle as Ce, createVNode as y, renderSlot as x, resolveDynamicComponent as xt, mergeModels as Et, useModel as q, nextTick as Bt, watchEffect as ye, watch as xe, onBeforeMount as Dt, onMounted as Lt, createSlots as Ht, withModifiers as Ee, createTextVNode as W, toDisplayString as X, createElementVNode as P } from "vue";
5
+ import { _ as zt } from "../../BuiTableHeader.vue_vue_type_script_setup_true_lang-Di2FKUwD.js";
6
+ import { _ as fe } from "../../BuiTableRow.vue_vue_type_script_setup_true_lang-BJk8Yk1B.js";
7
+ import { defineComponent as rt, computed as F, ref as Y, createElementBlock as S, openBlock as c, Fragment as z, createBlock as O, createCommentVNode as I, unref as s, normalizeClass as ce, withCtx as f, renderList as J, normalizeStyle as Ce, createVNode as v, renderSlot as x, resolveDynamicComponent as xt, mergeModels as Et, useModel as q, nextTick as Bt, watchEffect as _e, watch as xe, onBeforeMount as Dt, onMounted as Lt, createSlots as Ht, withModifiers as Ee, createTextVNode as W, toDisplayString as X, createElementVNode as P } from "vue";
8
8
  import { _ as Ja } from "../../BuiTableCaption.vue_vue_type_script_setup_true_lang-Bgo7ZNsM.js";
9
9
  import { _ as Ft } from "../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-Da4qHIWo.js";
10
10
  import { _ as Qa } from "../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRD-qr8I.js";
@@ -51,10 +51,10 @@ const bn = kt("settings-2", [
51
51
  setup(e) {
52
52
  const t = e, n = F(() => t.row.original.name?.includes(vn)), o = Y(!1);
53
53
  return (l, i) => (c(), S(z, null, [
54
- n.value ? I("", !0) : (c(), O(s($e), {
54
+ n.value ? I("", !0) : (c(), O(s(fe), {
55
55
  key: 0,
56
56
  "data-row-state": l.row.getIsSelected() ? "selected" : void 0,
57
- class: fe(
57
+ class: ce(
58
58
  s(Te)(t.renderSubComponent?.(l.row) ? "border-b-0" : "", o.value ? "bg-accent/4!" : "")
59
59
  ),
60
60
  onMouseenter: i[0] || (i[0] = (u) => o.value = !0),
@@ -64,12 +64,12 @@ const bn = kt("settings-2", [
64
64
  x(l.$slots, "actions")
65
65
  ]),
66
66
  default: f(() => [
67
- (c(!0), S(z, null, J(l.row.getVisibleCells(), (u) => (c(), O(s(Se), {
67
+ (c(!0), S(z, null, J(l.row.getVisibleCells(), (u) => (c(), O(s($e), {
68
68
  key: u.id,
69
69
  style: Ce({ ...s(vt)(u.column) })
70
70
  }, {
71
71
  default: f(() => [
72
- y(s(ot), {
72
+ v(s(ot), {
73
73
  render: u.column.columnDef.cell,
74
74
  props: u.getContext()
75
75
  }, null, 8, ["render", "props"])
@@ -79,10 +79,10 @@ const bn = kt("settings-2", [
79
79
  ]),
80
80
  _: 3
81
81
  }, 8, ["data-row-state", "class"])),
82
- t.renderSubComponent?.(l.row) ? (c(), O(s($e), {
82
+ t.renderSubComponent?.(l.row) ? (c(), O(s(fe), {
83
83
  key: 1,
84
84
  "data-row-state": l.row.getIsSelected() ? "selected" : void 0,
85
- class: fe(s(Te)(o.value ? "bg-accent/4!" : "")),
85
+ class: ce(s(Te)(o.value ? "bg-accent/4!" : "")),
86
86
  onMouseenter: i[2] || (i[2] = (u) => o.value = !0),
87
87
  onMouseleave: i[3] || (i[3] = (u) => o.value = !1)
88
88
  }, {
@@ -90,7 +90,7 @@ const bn = kt("settings-2", [
90
90
  x(l.$slots, "actions")
91
91
  ]),
92
92
  default: f(() => [
93
- y(s(Se), {
93
+ v(s($e), {
94
94
  colspan: l.columns.length,
95
95
  class: "pt-0"
96
96
  }, {
@@ -127,7 +127,7 @@ function se(e) {
127
127
  function oe(e) {
128
128
  return e != null && typeof e == "object";
129
129
  }
130
- var ce = Array.isArray;
130
+ var pe = Array.isArray;
131
131
  function st(e) {
132
132
  var t = typeof e;
133
133
  return e != null && (t == "object" || t == "function");
@@ -139,8 +139,8 @@ function lt(e) {
139
139
  var t = se(e);
140
140
  return t == Pn || t == jn || t == An || t == Rn;
141
141
  }
142
- var _e = B["__core-js_shared__"], Le = (function() {
143
- var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || "");
142
+ var he = B["__core-js_shared__"], Le = (function() {
143
+ var e = /[^.]+$/.exec(he && he.keys && he.keys.IE_PROTO || "");
144
144
  return e ? "Symbol(src)_1." + e : "";
145
145
  })();
146
146
  function In(e) {
@@ -224,21 +224,21 @@ function jr(e) {
224
224
  return e(t);
225
225
  };
226
226
  }
227
- var pt = typeof exports == "object" && exports && !exports.nodeType && exports, re = pt && typeof module == "object" && module && !module.nodeType && module, Rr = re && re.exports === pt, he = Rr && at.process, Ne = (function() {
227
+ var pt = typeof exports == "object" && exports && !exports.nodeType && exports, re = pt && typeof module == "object" && module && !module.nodeType && module, Rr = re && re.exports === pt, we = Rr && at.process, Ne = (function() {
228
228
  try {
229
229
  var e = re && re.require && re.require("util").types;
230
- return e || he && he.binding && he.binding("util");
230
+ return e || we && we.binding && we.binding("util");
231
231
  } catch {
232
232
  }
233
233
  })(), Ue = Ne && Ne.isTypedArray, gt = Ue ? jr(Ue) : Pr, Ir = Object.prototype, Mr = Ir.hasOwnProperty;
234
234
  function zr(e, t) {
235
- var n = ce(e), o = !n && er(e), l = !n && !o && Ae(e), i = !n && !o && !l && gt(e), u = n || o || l || i, p = u ? Yn(e.length, String) : [], v = p.length;
235
+ var n = pe(e), o = !n && er(e), l = !n && !o && Ae(e), i = !n && !o && !l && gt(e), u = n || o || l || i, p = u ? Yn(e.length, String) : [], y = p.length;
236
236
  for (var m in e)
237
237
  Mr.call(e, m) && !(u && // Safari 9 has enumerable `arguments.length` in strict mode.
238
238
  (m == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
239
239
  l && (m == "offset" || m == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
240
240
  i && (m == "buffer" || m == "byteLength" || m == "byteOffset") || // Skip index properties.
241
- kn(m, v))) && p.push(m);
241
+ kn(m, y))) && p.push(m);
242
242
  return p;
243
243
  }
244
244
  function xr(e, t) {
@@ -300,7 +300,7 @@ U.prototype.set = Yr;
300
300
  function Jr() {
301
301
  this.__data__ = [], this.size = 0;
302
302
  }
303
- function ge(e, t) {
303
+ function me(e, t) {
304
304
  for (var n = e.length; n--; )
305
305
  if (ut(e[n][0], t))
306
306
  return n;
@@ -308,21 +308,21 @@ function ge(e, t) {
308
308
  }
309
309
  var Zr = Array.prototype, Qr = Zr.splice;
310
310
  function eo(e) {
311
- var t = this.__data__, n = ge(t, e);
311
+ var t = this.__data__, n = me(t, e);
312
312
  if (n < 0)
313
313
  return !1;
314
314
  var o = t.length - 1;
315
315
  return n == o ? t.pop() : Qr.call(t, n, 1), --this.size, !0;
316
316
  }
317
317
  function to(e) {
318
- var t = this.__data__, n = ge(t, e);
318
+ var t = this.__data__, n = me(t, e);
319
319
  return n < 0 ? void 0 : t[n][1];
320
320
  }
321
321
  function no(e) {
322
- return ge(this.__data__, e) > -1;
322
+ return me(this.__data__, e) > -1;
323
323
  }
324
324
  function ro(e, t) {
325
- var n = this.__data__, o = ge(n, e);
325
+ var n = this.__data__, o = me(n, e);
326
326
  return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
327
327
  }
328
328
  function D(e) {
@@ -349,22 +349,22 @@ function ao(e) {
349
349
  var t = typeof e;
350
350
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
351
351
  }
352
- function me(e, t) {
352
+ function be(e, t) {
353
353
  var n = e.__data__;
354
354
  return ao(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
355
355
  }
356
356
  function io(e) {
357
- var t = me(this, e).delete(e);
357
+ var t = be(this, e).delete(e);
358
358
  return this.size -= t ? 1 : 0, t;
359
359
  }
360
360
  function so(e) {
361
- return me(this, e).get(e);
361
+ return be(this, e).get(e);
362
362
  }
363
363
  function lo(e) {
364
- return me(this, e).has(e);
364
+ return be(this, e).has(e);
365
365
  }
366
366
  function uo(e, t) {
367
- var n = me(this, e), o = n.size;
367
+ var n = be(this, e), o = n.size;
368
368
  return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
369
369
  }
370
370
  function k(e) {
@@ -434,7 +434,7 @@ var ho = Object.prototype, wo = ho.propertyIsEnumerable, Ve = Object.getOwnPrope
434
434
  } : _o;
435
435
  function $o(e, t, n) {
436
436
  var o = t(e);
437
- return ce(e) ? o : fo(o, n(e));
437
+ return pe(e) ? o : fo(o, n(e));
438
438
  }
439
439
  function ke(e) {
440
440
  return $o(e, Hr, So);
@@ -464,13 +464,13 @@ function Io(e) {
464
464
  function Mo(e) {
465
465
  return this.__data__.has(e);
466
466
  }
467
- function pe(e) {
467
+ function ge(e) {
468
468
  var t = -1, n = e == null ? 0 : e.length;
469
469
  for (this.__data__ = new k(); ++t < n; )
470
470
  this.add(e[t]);
471
471
  }
472
- pe.prototype.add = pe.prototype.push = Io;
473
- pe.prototype.has = Mo;
472
+ ge.prototype.add = ge.prototype.push = Io;
473
+ ge.prototype.has = Mo;
474
474
  function zo(e, t) {
475
475
  for (var n = -1, o = e == null ? 0 : e.length; ++n < o; )
476
476
  if (t(e[n], n, e))
@@ -482,13 +482,13 @@ function xo(e, t) {
482
482
  }
483
483
  var Eo = 1, Bo = 2;
484
484
  function mt(e, t, n, o, l, i) {
485
- var u = n & Eo, p = e.length, v = t.length;
486
- if (p != v && !(u && v > p))
485
+ var u = n & Eo, p = e.length, y = t.length;
486
+ if (p != y && !(u && y > p))
487
487
  return !1;
488
488
  var m = i.get(e), j = i.get(t);
489
489
  if (m && j)
490
490
  return m == t && j == e;
491
- var g = -1, _ = !0, C = n & Bo ? new pe() : void 0;
491
+ var g = -1, _ = !0, C = n & Bo ? new ge() : void 0;
492
492
  for (i.set(e, t), i.set(t, e); ++g < p; ) {
493
493
  var h = e[g], T = t[g];
494
494
  if (o)
@@ -526,7 +526,7 @@ function Lo(e) {
526
526
  n[++t] = o;
527
527
  }), n;
528
528
  }
529
- var Ho = 1, Fo = 2, Go = "[object Boolean]", No = "[object Date]", Uo = "[object Error]", Vo = "[object Map]", ko = "[object Number]", Ko = "[object RegExp]", qo = "[object Set]", Wo = "[object String]", Xo = "[object Symbol]", Yo = "[object ArrayBuffer]", Jo = "[object DataView]", Ze = Z ? Z.prototype : void 0, we = Ze ? Ze.valueOf : void 0;
529
+ var Ho = 1, Fo = 2, Go = "[object Boolean]", No = "[object Date]", Uo = "[object Error]", Vo = "[object Map]", ko = "[object Number]", Ko = "[object RegExp]", qo = "[object Set]", Wo = "[object String]", Xo = "[object Symbol]", Yo = "[object ArrayBuffer]", Jo = "[object DataView]", Ze = Z ? Z.prototype : void 0, Se = Ze ? Ze.valueOf : void 0;
530
530
  function Zo(e, t, n, o, l, i, u) {
531
531
  switch (n) {
532
532
  case Jo:
@@ -547,8 +547,8 @@ function Zo(e, t, n, o, l, i, u) {
547
547
  case Vo:
548
548
  var p = Do;
549
549
  case qo:
550
- var v = o & Ho;
551
- if (p || (p = Lo), e.size != t.size && !v)
550
+ var y = o & Ho;
551
+ if (p || (p = Lo), e.size != t.size && !y)
552
552
  return !1;
553
553
  var m = u.get(e);
554
554
  if (m)
@@ -557,17 +557,17 @@ function Zo(e, t, n, o, l, i, u) {
557
557
  var j = mt(p(e), p(t), o, l, i, u);
558
558
  return u.delete(e), j;
559
559
  case Xo:
560
- if (we)
561
- return we.call(e) == we.call(t);
560
+ if (Se)
561
+ return Se.call(e) == Se.call(t);
562
562
  }
563
563
  return !1;
564
564
  }
565
565
  var Qo = 1, ea = Object.prototype, ta = ea.hasOwnProperty;
566
566
  function na(e, t, n, o, l, i) {
567
- var u = n & Qo, p = ke(e), v = p.length, m = ke(t), j = m.length;
568
- if (v != j && !u)
567
+ var u = n & Qo, p = ke(e), y = p.length, m = ke(t), j = m.length;
568
+ if (y != j && !u)
569
569
  return !1;
570
- for (var g = v; g--; ) {
570
+ for (var g = y; g--; ) {
571
571
  var _ = p[g];
572
572
  if (!(u ? _ in t : ta.call(t, _)))
573
573
  return !1;
@@ -577,7 +577,7 @@ function na(e, t, n, o, l, i) {
577
577
  return C == t && h == e;
578
578
  var T = !0;
579
579
  i.set(e, t), i.set(t, e);
580
- for (var R = u; ++g < v; ) {
580
+ for (var R = u; ++g < y; ) {
581
581
  _ = p[g];
582
582
  var M = e[_], E = t[_];
583
583
  if (o)
@@ -596,16 +596,16 @@ function na(e, t, n, o, l, i) {
596
596
  }
597
597
  var ra = 1, Qe = "[object Arguments]", et = "[object Array]", de = "[object Object]", oa = Object.prototype, tt = oa.hasOwnProperty;
598
598
  function aa(e, t, n, o, l, i) {
599
- var u = ce(e), p = ce(t), v = u ? et : G(e), m = p ? et : G(t);
600
- v = v == Qe ? de : v, m = m == Qe ? de : m;
601
- var j = v == de, g = m == de, _ = v == m;
599
+ var u = pe(e), p = pe(t), y = u ? et : G(e), m = p ? et : G(t);
600
+ y = y == Qe ? de : y, m = m == Qe ? de : m;
601
+ var j = y == de, g = m == de, _ = y == m;
602
602
  if (_ && Ae(e)) {
603
603
  if (!Ae(t))
604
604
  return !1;
605
605
  u = !0, j = !1;
606
606
  }
607
607
  if (_ && !j)
608
- return i || (i = new N()), u || gt(e) ? mt(e, t, n, o, l, i) : Zo(e, t, v, n, o, l, i);
608
+ return i || (i = new N()), u || gt(e) ? mt(e, t, n, o, l, i) : Zo(e, t, y, n, o, l, i);
609
609
  if (!(n & ra)) {
610
610
  var C = j && tt.call(e, "__wrapped__"), h = g && tt.call(t, "__wrapped__");
611
611
  if (C || h) {
@@ -674,7 +674,7 @@ const sa = {
674
674
  resetSize: "Reset size",
675
675
  sortAsc: "Sort ascending",
676
676
  sortDesc: "Sort descending"
677
- }, n = e, o = q(e, "sorting"), l = q(e, "pagination"), i = q(e, "selection"), u = q(e, "columnVisibility"), p = q(e, "columnOrder"), v = q(e, "columnSizing"), m = F(
677
+ }, n = e, o = q(e, "sorting"), l = q(e, "pagination"), i = q(e, "selection"), u = q(e, "columnVisibility"), p = q(e, "columnOrder"), y = q(e, "columnSizing"), m = F(
678
678
  () => n.manualPagination ? n.totalItems : n.data.length
679
679
  ), j = n.columns.map((r) => r.meta?.pinLeft && r.id ? r.id : "").filter(Boolean), g = qt({
680
680
  initialState: {
@@ -743,7 +743,7 @@ const sa = {
743
743
  l.value && (l.value.pageIndex = r - 1, g.setPageIndex(r - 1));
744
744
  }
745
745
  });
746
- ye(() => {
746
+ _e(() => {
747
747
  const r = g.getPageCount();
748
748
  r && r < C.value && (C.value = r);
749
749
  });
@@ -766,7 +766,7 @@ const sa = {
766
766
  });
767
767
  const le = Y(null), { height: yt } = dn(le), {
768
768
  tableHeaderElement: Ie,
769
- calculatedColumnSizing: be,
769
+ calculatedColumnSizing: ve,
770
770
  isResizing: _t,
771
771
  resizingCellId: ht,
772
772
  resetCells: ue,
@@ -778,17 +778,17 @@ const sa = {
778
778
  isMouseUpOnHandler: Tt
779
779
  } = pn();
780
780
  Dt(() => {
781
- be.value = v.value;
781
+ ve.value = y.value;
782
782
  }), Lt(() => {
783
- le.value && (Ie.value = le.value, $t(v.value), Me()), K.value = {};
784
- }), ye(() => {
785
- ia(be.value, v.value) || (v.value = be.value);
783
+ le.value && (Ie.value = le.value, $t(y.value), Me()), K.value = {};
784
+ }), _e(() => {
785
+ ia(ve.value, y.value) || (y.value = ve.value);
786
786
  }), cn(document, "mouseup", St);
787
- const ve = (r) => Ie.value?.headRef?.querySelector(
787
+ const ye = (r) => Ie.value?.headRef?.querySelector(
788
788
  `th[id="${r.id}_cell"]`
789
789
  )?.querySelector("button[sorting-enabled]"), ze = (r) => {
790
790
  const a = [];
791
- return n.manualSorting && ve(r) && a.push("sortAsc", "sortDesc"), n.enableColumnListControl && r.column.getCanHide() && a.push("hideColumn"), n.enableColumnResizing && a.push("resetSize"), a;
791
+ return n.manualSorting && ye(r) && a.push("sortAsc", "sortDesc"), n.enableColumnListControl && r.column.getCanHide() && a.push("hideColumn"), n.enableColumnResizing && a.push("resetSize"), a;
792
792
  }, Ot = (r, a) => {
793
793
  switch (a) {
794
794
  case "hideColumn":
@@ -809,7 +809,7 @@ const sa = {
809
809
  ), At = (r, a) => {
810
810
  K.value = { ...A.value, [a]: r };
811
811
  };
812
- ye(() => {
812
+ _e(() => {
813
813
  n.groupBy && h.value ? (A.value = Object.keys(h.value).reduce((r, a) => (r[a] = !0, r), /* @__PURE__ */ Object.create(null)), n.enableGroupFolding && K.value && (A.value = { ...A.value, ...K.value })) : A.value = /* @__PURE__ */ Object.create(null);
814
814
  }), xe(
815
815
  () => n.enableGroupFolding,
@@ -822,13 +822,13 @@ const sa = {
822
822
  const Pt = (r) => {
823
823
  if (Ct.value && !Tt.value)
824
824
  return !1;
825
- ve(r) && r.column.toggleSorting(r.column.getIsSorted() === "asc");
825
+ ye(r) && r.column.toggleSorting(r.column.getIsSorted() === "asc");
826
826
  };
827
827
  return (r, a) => (c(), S(z, null, [
828
828
  r.$slots.caption ? (c(), S("div", sa, [
829
829
  x(r.$slots, "caption", { table: s(g) })
830
830
  ])) : I("", !0),
831
- y(s(Rt), null, Ht({
831
+ v(s(Rt), null, Ht({
832
832
  default: f(() => [
833
833
  H.value ? (c(), O(s(zt), {
834
834
  key: 0,
@@ -837,61 +837,66 @@ const sa = {
837
837
  ref: le
838
838
  }, {
839
839
  default: f(() => [
840
- (c(!0), S(z, null, J(H.value, (d, $) => (c(), O(s(Mt), {
841
- key: d.id,
842
- id: `${d.id}_cell`,
843
- style: Ce({
844
- ...s(vt)(d.column),
845
- cursor: ve(d) ? "pointer" : "auto"
846
- }),
847
- "freeze-header": n.freezeHeader,
848
- "can-resize": d.column.getCanResize() ? !0 : void 0,
849
- onClick: (w) => Pt(d)
850
- }, {
851
- actions: f(() => [
852
- ze(d).length > 0 ? (c(), O(s(rn), { key: 0 }, {
853
- default: f(() => [
854
- (c(!0), S(z, null, J(ze(d), (w, jt) => (c(), O(s(on), {
855
- onClick: (va) => Ot(d, w),
856
- key: jt
857
- }, {
840
+ v(s(fe), { class: "h-10" }, {
841
+ default: f(() => [
842
+ (c(!0), S(z, null, J(H.value, (d, $) => (c(), O(s(Mt), {
843
+ key: d.id,
844
+ id: `${d.id}_cell`,
845
+ style: Ce({
846
+ ...s(vt)(d.column),
847
+ cursor: ye(d) ? "pointer" : "auto"
848
+ }),
849
+ "freeze-header": n.freezeHeader,
850
+ "can-resize": d.column.getCanResize() ? !0 : void 0,
851
+ onClick: (w) => Pt(d)
852
+ }, {
853
+ actions: f(() => [
854
+ ze(d).length > 0 ? (c(), O(s(rn), { key: 0 }, {
858
855
  default: f(() => [
859
- W(X(r.headerContextMenuTranslations && r.headerContextMenuTranslations[w] ? r.headerContextMenuTranslations[w] : t[w]), 1)
856
+ (c(!0), S(z, null, J(ze(d), (w, jt) => (c(), O(s(on), {
857
+ onClick: (va) => Ot(d, w),
858
+ key: jt
859
+ }, {
860
+ default: f(() => [
861
+ W(X(r.headerContextMenuTranslations && r.headerContextMenuTranslations[w] ? r.headerContextMenuTranslations[w] : t[w]), 1)
862
+ ]),
863
+ _: 2
864
+ }, 1032, ["onClick"]))), 128))
860
865
  ]),
861
866
  _: 2
862
- }, 1032, ["onClick"]))), 128))
867
+ }, 1024)) : I("", !0)
868
+ ]),
869
+ default: f(() => [
870
+ d.isPlaceholder ? I("", !0) : (c(), O(s(ot), {
871
+ key: 0,
872
+ render: d.column.columnDef.header,
873
+ props: d.getContext()
874
+ }, null, 8, ["render", "props"])),
875
+ r.enableColumnResizing && $ < H.value.length - 1 && d.column.getCanResize() ? (c(), S("div", {
876
+ key: 1,
877
+ onDblclick: a[5] || (a[5] = //@ts-ignore
878
+ (...w) => s(ue) && s(ue)(...w)),
879
+ onMousedown: Ee(
880
+ (w) => s(wt)(w, d.id, n.enableColumnResizing),
881
+ ["self"]
882
+ ),
883
+ onClick: a[6] || (a[6] = Ee(() => {
884
+ }, ["stop"])),
885
+ className: s(Te)(
886
+ "resize-handler absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50",
887
+ s(_t) && s(ht) === d.id ? "bg-primary opacity-50" : ""
888
+ )
889
+ }, null, 40, ua)) : I("", !0)
863
890
  ]),
864
891
  _: 2
865
- }, 1024)) : I("", !0)
866
- ]),
867
- default: f(() => [
868
- d.isPlaceholder ? I("", !0) : (c(), O(s(ot), {
869
- key: 0,
870
- render: d.column.columnDef.header,
871
- props: d.getContext()
872
- }, null, 8, ["render", "props"])),
873
- r.enableColumnResizing && $ < H.value.length - 1 && d.column.getCanResize() ? (c(), S("div", {
874
- key: 1,
875
- onDblclick: a[5] || (a[5] = //@ts-ignore
876
- (...w) => s(ue) && s(ue)(...w)),
877
- onMousedown: Ee(
878
- (w) => s(wt)(w, d.id, n.enableColumnResizing),
879
- ["self"]
880
- ),
881
- onClick: a[6] || (a[6] = Ee(() => {
882
- }, ["stop"])),
883
- className: s(Te)(
884
- "resize-handler absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50",
885
- s(_t) && s(ht) === d.id ? "bg-primary opacity-50" : ""
886
- )
887
- }, null, 40, ua)) : I("", !0)
892
+ }, 1032, ["id", "style", "freeze-header", "can-resize", "onClick"]))), 128))
888
893
  ]),
889
- _: 2
890
- }, 1032, ["id", "style", "freeze-header", "can-resize", "onClick"]))), 128))
894
+ _: 1
895
+ })
891
896
  ]),
892
897
  _: 1
893
898
  }, 8, ["freeze-header"])) : I("", !0),
894
- y(s(It), null, {
899
+ v(s(It), null, {
895
900
  default: f(() => [
896
901
  s(g).getRowModel().rows?.length ? (c(), S(z, { key: 0 }, [
897
902
  n.groupBy && h.value && A.value ? (c(!0), S(z, { key: 0 }, J(h.value, (d, $) => (c(), O(s(Gt), {
@@ -902,22 +907,22 @@ const sa = {
902
907
  "onUpdate:open": [(w) => A.value[$] = w, (w) => At(w, $)]
903
908
  }, {
904
909
  default: f(() => [
905
- y(s($e), { class: "bg-foreground/4 border-b-0" }, {
910
+ v(s(fe), { class: "bg-foreground/4 border-b-0" }, {
906
911
  actions: f(() => [
907
912
  x(r.$slots, "groupActions", { group: $ })
908
913
  ]),
909
914
  default: f(() => [
910
- y(s(Se), {
915
+ v(s($e), {
911
916
  colspan: r.columns.length,
912
917
  class: "pb-0!"
913
918
  }, {
914
919
  default: f(() => [
915
- y(s(Nt), { class: "group w-full" }, {
920
+ v(s(Nt), { class: "group w-full" }, {
916
921
  default: f(() => [
917
922
  P("div", da, [
918
923
  P("div", fa, [
919
924
  P("div", {
920
- class: fe(["bg-background shadow-top relative inline-block rounded-t-lg px-6 py-2 text-sm font-medium", r.enableGroupFolding ? "-mb-[1px]" : "-mb-[6px]"])
925
+ class: ce(["bg-background shadow-top relative inline-block rounded-t-lg px-6 py-2 text-sm font-medium", r.enableGroupFolding ? "-mb-[1px]" : "-mb-[6px]"])
921
926
  }, [
922
927
  a[9] || (a[9] = P("div", { class: "bg-background absolute bottom-0 -left-2 h-2 w-2" }, null, -1)),
923
928
  a[10] || (a[10] = P("div", { class: "bg-background absolute bottom-0 -left-4 h-4 w-4 rounded-lg" }, null, -1)),
@@ -937,7 +942,7 @@ const sa = {
937
942
  ], 64))
938
943
  ])),
939
944
  r.enableGroupFolding ? (c(), S("div", ma, [
940
- y(s(gn), {
945
+ v(s(gn), {
941
946
  "stroke-width": 3,
942
947
  class: "text-primary h-4 w-4 shrink-0"
943
948
  })
@@ -959,7 +964,7 @@ const sa = {
959
964
  ]),
960
965
  _: 2
961
966
  }, 1024),
962
- y(s(Ut), { "as-child": "" }, {
967
+ v(s(Ut), { "as-child": "" }, {
963
968
  default: f(() => [
964
969
  (c(!0), S(z, null, J(d, (w) => (c(), O(Be, {
965
970
  key: w.id,
@@ -1012,24 +1017,24 @@ const sa = {
1012
1017
  r.enableColumnListControl ? {
1013
1018
  name: "columnVisibility",
1014
1019
  fn: f(() => [
1015
- y(s(an), {
1020
+ v(s(an), {
1016
1021
  open: ee.value,
1017
1022
  "onUpdate:open": a[4] || (a[4] = (d) => ee.value = d)
1018
1023
  }, {
1019
1024
  default: f(() => [
1020
- y(s(sn), { "as-child": "" }, {
1025
+ v(s(sn), { "as-child": "" }, {
1021
1026
  default: f(() => [
1022
1027
  P("div", {
1023
1028
  class: "bg-background absolute top-0 right-0 z-10",
1024
1029
  style: Ce({ height: `${s(yt).toFixed(1)}px` })
1025
1030
  }, [
1026
1031
  P("div", la, [
1027
- y(s(Kt), {
1032
+ v(s(Kt), {
1028
1033
  variant: "ghost",
1029
1034
  class: "text-foreground/50 hover:text-primary flex h-8 w-8 items-center justify-center hover:bg-transparent"
1030
1035
  }, {
1031
1036
  default: f(() => [
1032
- y(s(bn), { class: "h-4 w-4 shrink-0" })
1037
+ v(s(bn), { class: "h-4 w-4 shrink-0" })
1033
1038
  ]),
1034
1039
  _: 1
1035
1040
  })
@@ -1038,35 +1043,35 @@ const sa = {
1038
1043
  ]),
1039
1044
  _: 1
1040
1045
  }),
1041
- y(s(ln), {
1046
+ v(s(ln), {
1042
1047
  class: "w-[250px] p-0",
1043
1048
  align: "start"
1044
1049
  }, {
1045
1050
  default: f(() => [
1046
- y(s(Jt), null, {
1051
+ v(s(Jt), null, {
1047
1052
  default: f(() => [
1048
- y(s(Qt), {
1053
+ v(s(Qt), {
1049
1054
  placeholder: r.columnSearchPlaceholder,
1050
1055
  modelValue: L.value,
1051
1056
  "onUpdate:modelValue": a[0] || (a[0] = (d) => L.value = d),
1052
1057
  onInput: a[1] || (a[1] = (d) => L.value = d.target?.value)
1053
1058
  }, null, 8, ["placeholder", "modelValue"]),
1054
- y(s(tn), null, {
1059
+ v(s(tn), null, {
1055
1060
  default: f(() => [
1056
- y(s(un), { class: "h-[300px]" }, {
1061
+ v(s(un), { class: "h-[300px]" }, {
1057
1062
  default: f(() => [
1058
- y(s(Zt), null, {
1063
+ v(s(Zt), null, {
1059
1064
  default: f(() => [
1060
1065
  W(X(r.columnSearchNotFound), 1)
1061
1066
  ]),
1062
1067
  _: 1
1063
1068
  }),
1064
- y(s(mn), {
1069
+ v(s(mn), {
1065
1070
  "columns-list": R.value,
1066
1071
  "onUpdate:columnsList": a[2] || (a[2] = (d) => R.value = d)
1067
1072
  }, null, 8, ["columns-list"]),
1068
- y(s(nn), { class: "my-1" }),
1069
- y(s(en), {
1073
+ v(s(nn), { class: "my-1" }),
1074
+ v(s(en), {
1070
1075
  value: "reset_columns_visibility",
1071
1076
  key: "reset_columns_visibility",
1072
1077
  class: "text-muted-foreground px-2 py-1.5 font-medium",
@@ -1098,7 +1103,7 @@ const sa = {
1098
1103
  ]), 1024),
1099
1104
  (r.showPagination || r.$slots.numberOfItems) && m.value > 0 ? (c(), S("div", {
1100
1105
  key: 1,
1101
- class: fe(["border-border/16 bg-primary/4 text-muted-foreground flex w-full border-x border-b px-2.5 py-1 text-sm", {
1106
+ class: ce(["border-border/16 bg-primary/4 text-muted-foreground flex w-full border-x border-b px-2.5 py-1 text-sm", {
1102
1107
  "justify-between": r.showPagination && r.$slots.numberOfItems,
1103
1108
  "justify-start": r.$slots.numberOfItems && !r.showPagination,
1104
1109
  "justify-end": r.showPagination && !r.$slots.numberOfItems
@@ -1129,12 +1134,12 @@ export {
1129
1134
  Rt as BuiTable,
1130
1135
  It as BuiTableBody,
1131
1136
  Ja as BuiTableCaption,
1132
- Se as BuiTableCell,
1137
+ $e as BuiTableCell,
1133
1138
  Ft as BuiTableEmpty,
1134
1139
  Qa as BuiTableFooter,
1135
1140
  Mt as BuiTableHead,
1136
1141
  zt as BuiTableHeader,
1137
- $e as BuiTableRow,
1142
+ fe as BuiTableRow,
1138
1143
  Be as BuiTableRowSubrow,
1139
1144
  vt as getPinningStyle
1140
1145
  };
package/dist/index.js CHANGED
@@ -133,7 +133,7 @@ import { _ as Va } from "./BuiTable.vue_vue_type_script_setup_true_lang-Dd_dkcy4
133
133
  import { _ as La } from "./BuiTableBody.vue_vue_type_script_setup_true_lang-CZvFJVkb.js";
134
134
  import { _ as Ra } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-BzFROkZg.js";
135
135
  import { _ as ka } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-DA2KX8Pg.js";
136
- import { _ as Ea } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-B6wyr0bg.js";
136
+ import { _ as Ea } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-Di2FKUwD.js";
137
137
  import { _ as Oa } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-BJk8Yk1B.js";
138
138
  import { _ as Ja } from "./BuiTableCaption.vue_vue_type_script_setup_true_lang-Bgo7ZNsM.js";
139
139
  import { _ as Ua } from "./BuiTableEmpty.vue_vue_type_script_setup_true_lang-Da4qHIWo.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soft-stech/bootsman-ui-shadcn",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -450,55 +450,59 @@ const handleHeaderCellSorting = (header: Header<TData, unknown>) => {
450
450
  </BuiPopover>
451
451
  </template>
452
452
  <BuiTableHeader v-if="tableHeaders" :freeze-header="props.freezeHeader" ref="tableHeaderRef">
453
- <BuiTableHead
454
- v-for="(header, index) in tableHeaders"
455
- :key="header.id"
456
- :id="`${header.id}_cell`"
457
- :style="{
458
- ...getPinningStyle(header.column),
459
- cursor: getHeaderCellSortingButton(header) ? 'pointer' : 'auto'
460
- }"
461
- :freeze-header="props.freezeHeader"
462
- :can-resize="header.column.getCanResize() ? true : undefined"
463
- @click="handleHeaderCellSorting(header)"
464
- >
465
- <FlexRender
466
- v-if="!header.isPlaceholder"
467
- :render="header.column.columnDef.header"
468
- :props="header.getContext()"
469
- />
470
- <div
471
- v-if="
472
- enableColumnResizing && index < tableHeaders.length - 1 && header.column.getCanResize()
473
- "
474
- @dblclick="resetCells"
475
- @mousedown.self="
476
- (e: Event) => handleResizeControlMouseDown(e, header.id, props.enableColumnResizing)
477
- "
478
- @click.stop
479
- :className="
480
- cn(
481
- 'resize-handler absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50',
482
- isResizing && resizingCellId === header.id ? 'bg-primary opacity-50' : ''
483
- )
484
- "
485
- />
486
- <template #actions>
487
- <BuiContextMenuContent v-if="availableHeaderCellActions(header).length > 0">
488
- <BuiContextMenuItem
489
- v-for="(action, idx) in availableHeaderCellActions(header)"
490
- @click="onHeaderCellAction(header, action)"
491
- :key="idx"
492
- >
493
- {{
494
- headerContextMenuTranslations && headerContextMenuTranslations[action]
495
- ? headerContextMenuTranslations[action]
496
- : defaultColumnContextMenuTranslations[action]
497
- }}
498
- </BuiContextMenuItem>
499
- </BuiContextMenuContent>
500
- </template>
501
- </BuiTableHead>
453
+ <BuiTableRow class="h-10">
454
+ <BuiTableHead
455
+ v-for="(header, index) in tableHeaders"
456
+ :key="header.id"
457
+ :id="`${header.id}_cell`"
458
+ :style="{
459
+ ...getPinningStyle(header.column),
460
+ cursor: getHeaderCellSortingButton(header) ? 'pointer' : 'auto'
461
+ }"
462
+ :freeze-header="props.freezeHeader"
463
+ :can-resize="header.column.getCanResize() ? true : undefined"
464
+ @click="handleHeaderCellSorting(header)"
465
+ >
466
+ <FlexRender
467
+ v-if="!header.isPlaceholder"
468
+ :render="header.column.columnDef.header"
469
+ :props="header.getContext()"
470
+ />
471
+ <div
472
+ v-if="
473
+ enableColumnResizing &&
474
+ index < tableHeaders.length - 1 &&
475
+ header.column.getCanResize()
476
+ "
477
+ @dblclick="resetCells"
478
+ @mousedown.self="
479
+ (e: Event) => handleResizeControlMouseDown(e, header.id, props.enableColumnResizing)
480
+ "
481
+ @click.stop
482
+ :className="
483
+ cn(
484
+ 'resize-handler absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50',
485
+ isResizing && resizingCellId === header.id ? 'bg-primary opacity-50' : ''
486
+ )
487
+ "
488
+ />
489
+ <template #actions>
490
+ <BuiContextMenuContent v-if="availableHeaderCellActions(header).length > 0">
491
+ <BuiContextMenuItem
492
+ v-for="(action, idx) in availableHeaderCellActions(header)"
493
+ @click="onHeaderCellAction(header, action)"
494
+ :key="idx"
495
+ >
496
+ {{
497
+ headerContextMenuTranslations && headerContextMenuTranslations[action]
498
+ ? headerContextMenuTranslations[action]
499
+ : defaultColumnContextMenuTranslations[action]
500
+ }}
501
+ </BuiContextMenuItem>
502
+ </BuiContextMenuContent>
503
+ </template>
504
+ </BuiTableHead>
505
+ </BuiTableRow>
502
506
  </BuiTableHeader>
503
507
  <BuiTableBody>
504
508
  <template v-if="table.getRowModel().rows?.length">
@@ -24,8 +24,6 @@ const props = defineProps<{
24
24
  )
25
25
  "
26
26
  >
27
- <tr class="h-10">
28
- <slot />
29
- </tr>
27
+ <slot />
30
28
  </thead>
31
29
  </template>