@soft-stech/bootsman-ui-shadcn 1.4.29 → 1.4.31

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,23 +1,23 @@
1
- import { _ as Q } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-QoPGiEYZ.js";
2
- import { _ as X } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
3
- import { _ as O } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
4
- import { _ as Z } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js";
5
- import { _ as ee } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BXgL487_.js";
6
- import { _ as T } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
7
- import { defineComponent as G, computed as w, openBlock as r, createElementBlock as d, Fragment as p, createBlock as c, unref as t, normalizeClass as oe, withCtx as l, renderSlot as y, renderList as k, normalizeStyle as K, createVNode as s, createCommentVNode as S, resolveDynamicComponent as te, mergeModels as ne, useModel as _, watchEffect as le, ref as x, watch as ae, createSlots as re, createElementVNode as g, createTextVNode as C, toDisplayString as $ } from "vue";
1
+ import { _ as X } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-QoPGiEYZ.js";
2
+ import { _ as Z } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
3
+ import { _ as T } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
4
+ import { _ as ee } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-Dyf8tkSZ.js";
5
+ import { _ as oe } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BXgL487_.js";
6
+ import { _ as N } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
7
+ import { defineComponent as G, computed as S, openBlock as s, createElementBlock as d, Fragment as p, createBlock as f, unref as t, normalizeClass as K, withCtx as l, renderSlot as b, renderList as k, normalizeStyle as W, createVNode as r, createCommentVNode as v, resolveDynamicComponent as te, mergeModels as ne, useModel as C, watchEffect as le, ref as V, watch as ae, createSlots as se, createElementVNode as g, createTextVNode as _, toDisplayString as $ } from "vue";
8
8
  import { _ as go } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-CTEP1Sde.js";
9
- import { _ as se } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BTyX0sT5.js";
10
- import { _ as co } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
9
+ import { _ as re } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BTyX0sT5.js";
10
+ import { _ as po } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
11
11
  import { _ as ie } from "../../../BuiCollapsible.vue_vue_type_script_setup_true_lang-DjuQBjGZ.js";
12
12
  import { _ as ue } from "../../../BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-l-nmwAwq.js";
13
13
  import { _ as de } from "../../../BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-BiD89zzH.js";
14
14
  import { _ as me } from "../../../variables-Ct6TXY_l.js";
15
- import { h as ge, v as h, g as pe, _ as ce } from "../../../utils-CwP7Up6y.js";
16
- import { FlexRender as W, useVueTable as fe, getCoreRowModel as be, getPaginationRowModel as ye, getSortedRowModel as ve } from "@tanstack/vue-table";
15
+ import { h as ge, v as h, g as fe, _ as pe } from "../../../utils-CwP7Up6y.js";
16
+ import { FlexRender as Y, useVueTable as ce, getCoreRowModel as be, getPaginationRowModel as ye, getSortedRowModel as ve } from "@tanstack/vue-table";
17
17
  import { _ as we } from "../../../BuiCommand.vue_vue_type_script_setup_true_lang-BiBVfuW-.js";
18
18
  import { _ as Se } from "../../../BuiCommandEmpty.vue_vue_type_script_setup_true_lang-BkPg_0iY.js";
19
- import { _ as _e } from "../../../BuiCommandInput.vue_vue_type_script_setup_true_lang-Dxua89Ba.js";
20
- import { _ as Ce } from "../../../BuiCommandItem.vue_vue_type_script_setup_true_lang--K56eLIm.js";
19
+ import { _ as Ce } from "../../../BuiCommandInput.vue_vue_type_script_setup_true_lang-Dxua89Ba.js";
20
+ import { _ as _e } from "../../../BuiCommandItem.vue_vue_type_script_setup_true_lang--K56eLIm.js";
21
21
  import { _ as he } from "../../../BuiCommandList.vue_vue_type_script_setup_true_lang-CczssFsO.js";
22
22
  import { _ as $e } from "../../../BuiPopover.vue_vue_type_script_setup_true_lang-CGkz30K2.js";
23
23
  import { _ as ke } from "../../../BuiPopoverTrigger.vue_vue_type_script_setup_true_lang-Du2ZN56l.js";
@@ -35,33 +35,33 @@ const Ie = ge("Settings2Icon", [
35
35
  ["path", { d: "M14 17H5", key: "gfn3mx" }],
36
36
  ["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
37
37
  ["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
38
- ]), Me = "[!fake-empty!]", j = /* @__PURE__ */ G({
38
+ ]), Pe = "[!fake-empty!]", j = /* @__PURE__ */ G({
39
39
  __name: "BuiTableRowSubrow",
40
40
  props: {
41
41
  row: {},
42
42
  renderSubComponent: { type: Function },
43
43
  columns: {}
44
44
  },
45
- setup(f) {
46
- const a = f, z = w(() => a.row.original.name?.includes(Me));
47
- return (i, R) => (r(), d(p, null, [
48
- z.value ? S("", !0) : (r(), c(t(T), {
45
+ setup(c) {
46
+ const a = c, z = S(() => a.row.original.name?.includes(Pe));
47
+ return (i, R) => (s(), d(p, null, [
48
+ z.value ? v("", !0) : (s(), f(t(N), {
49
49
  key: 0,
50
50
  "data-row-state": i.row.getIsSelected() ? "selected" : void 0,
51
- class: oe(a.renderSubComponent?.(i.row) ? "border-b-0" : "")
51
+ class: K(a.renderSubComponent?.(i.row) ? "border-b-0" : "")
52
52
  }, {
53
53
  actions: l(() => [
54
- y(i.$slots, "actions")
54
+ b(i.$slots, "actions")
55
55
  ]),
56
56
  default: l(() => [
57
- (r(!0), d(p, null, k(i.row.getVisibleCells(), (v) => (r(), c(t(O), {
58
- key: v.id,
59
- style: K({ ...t(Y)(v.column) })
57
+ (s(!0), d(p, null, k(i.row.getVisibleCells(), (w) => (s(), f(t(T), {
58
+ key: w.id,
59
+ style: W({ ...t(q)(w.column) })
60
60
  }, {
61
61
  default: l(() => [
62
- s(t(W), {
63
- render: v.column.columnDef.cell,
64
- props: v.getContext()
62
+ r(t(Y), {
63
+ render: w.column.columnDef.cell,
64
+ props: w.getContext()
65
65
  }, null, 8, ["render", "props"])
66
66
  ]),
67
67
  _: 2
@@ -69,34 +69,34 @@ const Ie = ge("Settings2Icon", [
69
69
  ]),
70
70
  _: 3
71
71
  }, 8, ["data-row-state", "class"])),
72
- a.renderSubComponent?.(i.row) ? (r(), c(t(T), {
72
+ a.renderSubComponent?.(i.row) ? (s(), f(t(N), {
73
73
  key: 1,
74
74
  "data-row-state": i.row.getIsSelected() ? "selected" : void 0
75
75
  }, {
76
76
  actions: l(() => [
77
- y(i.$slots, "actions")
77
+ b(i.$slots, "actions")
78
78
  ]),
79
79
  default: l(() => [
80
- s(t(O), {
80
+ r(t(T), {
81
81
  colspan: i.columns.length,
82
82
  class: "pt-0"
83
83
  }, {
84
84
  default: l(() => [
85
- (r(), c(te(a.renderSubComponent?.(i.row)?.())))
85
+ (s(), f(te(a.renderSubComponent?.(i.row)?.())))
86
86
  ]),
87
87
  _: 1
88
88
  }, 8, ["colspan"])
89
89
  ]),
90
90
  _: 3
91
- }, 8, ["data-row-state"])) : S("", !0)
91
+ }, 8, ["data-row-state"])) : v("", !0)
92
92
  ], 64));
93
93
  }
94
- }), Pe = {
94
+ }), Oe = {
95
95
  key: 0,
96
96
  class: "w-full py-3"
97
- }, Ve = { class: "absolute right-0 top-0 z-10 h-10 bg-background" }, xe = { class: "flex h-full items-center border-l border-border/[0.16] bg-foreground/[0.04] px-1" }, Oe = ["onDblclick", "onMousedown", "className"], Te = { class: "mt-1 flex w-full items-center justify-between" }, Ne = { class: "relative -mb-[6px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, Le = {
98
- key: 1,
99
- class: "flex w-full justify-end border-x border-b border-border/[0.16] bg-primary/[0.04] px-4 py-1 text-base text-muted-foreground"
97
+ }, Me = { class: "absolute right-0 top-0 z-10 h-10 bg-background" }, Ve = { class: "flex h-full items-center border-b border-l border-border/[0.16] bg-foreground/[0.04] px-1" }, Te = ["onDblclick", "onMousedown", "className"], Ne = { class: "mt-1 flex w-full items-center justify-between" }, Le = { class: "relative -mb-[6px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, xe = {
98
+ key: 0,
99
+ class: "flex min-h-8 items-center"
100
100
  }, A = "#UNDEFINED#", io = /* @__PURE__ */ G({
101
101
  __name: "BuiDataTable",
102
102
  props: /* @__PURE__ */ ne({
@@ -131,13 +131,13 @@ const Ie = ge("Settings2Icon", [
131
131
  columnOrderModifiers: {}
132
132
  }),
133
133
  emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility", "update:columnSizing", "update:columnOrder"],
134
- setup(f) {
135
- const a = f, z = _(f, "sorting"), i = _(f, "pagination"), R = _(f, "selection"), v = _(f, "columnVisibility"), N = _(f, "columnSizing"), b = _(f, "columnOrder"), L = w(
134
+ setup(c) {
135
+ const a = c, z = C(c, "sorting"), i = C(c, "pagination"), R = C(c, "selection"), w = C(c, "columnVisibility"), L = C(c, "columnSizing"), y = C(c, "columnOrder"), x = S(
136
136
  () => a.manualPagination ? a.totalItems : a.data.length
137
- ), q = a.columns.map((e) => e.meta?.pinLeft && e.id ? e.id : "").filter(Boolean), u = fe({
137
+ ), J = a.columns.map((e) => e.meta?.pinLeft && e.id ? e.id : "").filter(Boolean), u = ce({
138
138
  initialState: {
139
139
  // TODO: column freeze
140
- columnPinning: { left: q },
140
+ columnPinning: { left: J },
141
141
  pagination: { pageSize: a.pageSize }
142
142
  },
143
143
  get data() {
@@ -159,13 +159,13 @@ const Ie = ge("Settings2Icon", [
159
159
  h(e, R);
160
160
  },
161
161
  onColumnVisibilityChange: (e) => {
162
- h(e, v);
162
+ h(e, w);
163
163
  },
164
164
  onColumnSizingChange: (e) => {
165
- h(e, N);
165
+ h(e, L);
166
166
  },
167
167
  onColumnOrderChange: (e) => {
168
- h(e, b);
168
+ h(e, y);
169
169
  },
170
170
  autoResetPageIndex: !1,
171
171
  manualPagination: a.manualPagination,
@@ -185,24 +185,24 @@ const Ie = ge("Settings2Icon", [
185
185
  return R.value;
186
186
  },
187
187
  get columnVisibility() {
188
- return v.value;
188
+ return w.value;
189
189
  },
190
190
  get columnSizing() {
191
- return N.value;
191
+ return L.value;
192
192
  },
193
193
  get columnOrder() {
194
- return b.value;
194
+ return y.value;
195
195
  }
196
196
  },
197
197
  getRowId: a.getRowId
198
- }), D = w({
198
+ }), D = S({
199
199
  get() {
200
200
  return u.getState().pagination.pageSize;
201
201
  },
202
202
  set(e) {
203
203
  i.value && (i.value.pageSize = e, u.setPageSize(e), u.setPageIndex(0));
204
204
  }
205
- }), B = w({
205
+ }), B = S({
206
206
  get() {
207
207
  return u.getState().pagination.pageIndex + 1;
208
208
  },
@@ -214,40 +214,40 @@ const Ie = ge("Settings2Icon", [
214
214
  const e = u.getPageCount();
215
215
  e && e < B.value && (B.value = e);
216
216
  });
217
- const H = w(() => a.groupBy ? u.getRowModel().rows.reduce((e, o) => {
217
+ const H = S(() => a.groupBy ? u.getRowModel().rows.reduce((e, o) => {
218
218
  const m = o.getValue(a.groupBy) ?? A;
219
219
  return e[m] = e[m] || [], e[m].push(o), e;
220
220
  }, /* @__PURE__ */ Object.create(null)) : null);
221
221
  function E(e) {
222
222
  return (a.groupBy && a.groupLabels ? a.groupLabels[a.groupBy] || [] : [])[e];
223
223
  }
224
- const I = x(
225
- u.getAllColumns().filter((e) => typeof e.accessorFn < "u" && e.getCanHide()).sort((e, o) => b.value ? b.value?.indexOf(e.id) < 0 && b.value?.indexOf(o.id) >= 0 ? 1 : b.value?.indexOf(e.id) >= 0 && b.value?.indexOf(o.id) < 0 ? -1 : b.value?.indexOf(e.id) - b.value?.indexOf(o.id) : 0)
226
- ), M = w(() => I.value.map((e) => e.id)), J = w(
227
- () => M.value.reduce((e, o) => ({ ...e, [o]: !0 }), {})
228
- ), F = x(!1), P = x(""), U = w(
224
+ const I = V(
225
+ u.getAllColumns().filter((e) => typeof e.accessorFn < "u" && e.getCanHide()).sort((e, o) => y.value ? y.value?.indexOf(e.id) < 0 && y.value?.indexOf(o.id) >= 0 ? 1 : y.value?.indexOf(e.id) >= 0 && y.value?.indexOf(o.id) < 0 ? -1 : y.value?.indexOf(e.id) - y.value?.indexOf(o.id) : 0)
226
+ ), P = S(() => I.value.map((e) => e.id)), Q = S(
227
+ () => P.value.reduce((e, o) => ({ ...e, [o]: !0 }), {})
228
+ ), F = V(!1), O = V(""), U = S(
229
229
  () => u.getHeaderGroups().length > 0 ? u.getHeaderGroups()[0].headers : void 0
230
230
  );
231
- return ae(M, () => {
232
- u.setColumnOrder(M.value);
233
- }), (e, o) => (r(), d(p, null, [
234
- e.$slots.caption ? (r(), d("div", Pe, [
235
- y(e.$slots, "caption", { table: t(u) })
236
- ])) : S("", !0),
237
- s(t(Q), null, re({
231
+ return ae(P, () => {
232
+ u.setColumnOrder(P.value);
233
+ }), (e, o) => (s(), d(p, null, [
234
+ e.$slots.caption ? (s(), d("div", Oe, [
235
+ b(e.$slots, "caption", { table: t(u) })
236
+ ])) : v("", !0),
237
+ r(t(X), null, se({
238
238
  default: l(() => [
239
- U.value ? (r(), c(t(ee), {
239
+ U.value ? (s(), f(t(oe), {
240
240
  key: 0,
241
241
  "freeze-header": a.freezeHeader
242
242
  }, {
243
243
  default: l(() => [
244
- (r(!0), d(p, null, k(U.value, (n) => (r(), c(t(Z), {
244
+ (s(!0), d(p, null, k(U.value, (n) => (s(), f(t(ee), {
245
245
  key: n.id,
246
- style: K({ ...t(Y)(n.column), width: n.getSize() + "px" }),
246
+ style: W({ ...t(q)(n.column), width: n.getSize() + "px" }),
247
247
  "freeze-header": a.freezeHeader
248
248
  }, {
249
249
  default: l(() => [
250
- n.isPlaceholder ? S("", !0) : (r(), c(t(W), {
250
+ n.isPlaceholder ? v("", !0) : (s(), f(t(Y), {
251
251
  key: 0,
252
252
  render: n.column.columnDef.header,
253
253
  props: n.getContext()
@@ -255,40 +255,40 @@ const Ie = ge("Settings2Icon", [
255
255
  g("div", {
256
256
  onDblclick: () => n.column.resetSize(),
257
257
  onMousedown: (m) => n.getResizeHandler()?.(m),
258
- className: t(pe)(
258
+ className: t(fe)(
259
259
  "absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50",
260
260
  n.column.getIsResizing() ? "bg-primary opacity-50" : ""
261
261
  )
262
- }, null, 40, Oe)
262
+ }, null, 40, Te)
263
263
  ]),
264
264
  _: 2
265
265
  }, 1032, ["style", "freeze-header"]))), 128))
266
266
  ]),
267
267
  _: 1
268
- }, 8, ["freeze-header"])) : S("", !0),
269
- s(t(X), null, {
268
+ }, 8, ["freeze-header"])) : v("", !0),
269
+ r(t(Z), null, {
270
270
  default: l(() => [
271
- t(u).getRowModel().rows?.length ? (r(), d(p, { key: 0 }, [
272
- a.groupBy && H.value ? (r(!0), d(p, { key: 0 }, k(H.value, (n, m) => (r(), c(t(ie), {
271
+ t(u).getRowModel().rows?.length ? (s(), d(p, { key: 0 }, [
272
+ a.groupBy && H.value ? (s(!0), d(p, { key: 0 }, k(H.value, (n, m) => (s(), f(t(ie), {
273
273
  asChild: "",
274
274
  key: m,
275
275
  open: !0
276
276
  }, {
277
277
  default: l(() => [
278
- s(t(ue), { asChild: "" }, {
278
+ r(t(ue), { asChild: "" }, {
279
279
  default: l(() => [
280
- s(t(T), { class: "bg-foreground/[0.04]" }, {
280
+ r(t(N), { class: "bg-foreground/[0.04]" }, {
281
281
  actions: l(() => [
282
- y(e.$slots, "groupActions", { group: m })
282
+ b(e.$slots, "groupActions", { group: m })
283
283
  ]),
284
284
  default: l(() => [
285
- s(t(O), {
285
+ r(t(T), {
286
286
  colspan: e.columns.length,
287
287
  class: "!pb-0"
288
288
  }, {
289
289
  default: l(() => [
290
- g("div", Te, [
291
- g("div", Ne, [
290
+ g("div", Ne, [
291
+ g("div", Le, [
292
292
  o[7] || (o[7] = g("div", { class: "absolute -left-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
293
293
  o[8] || (o[8] = g("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
294
294
  o[9] || (o[9] = g("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
@@ -296,22 +296,22 @@ const Ie = ge("Settings2Icon", [
296
296
  o[11] || (o[11] = g("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
297
297
  o[12] || (o[12] = g("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
298
298
  o[13] || (o[13] = g("div", null, null, -1)),
299
- m === A ? (r(), d(p, { key: 0 }, [
300
- C($(E(1)), 1)
301
- ], 64)) : (r(), d(p, { key: 1 }, [
302
- C($(E(0)) + ": ", 1),
303
- e.$slots.groupName ? y(e.$slots, "groupName", {
299
+ m === A ? (s(), d(p, { key: 0 }, [
300
+ _($(E(1)), 1)
301
+ ], 64)) : (s(), d(p, { key: 1 }, [
302
+ _($(E(0)) + ": ", 1),
303
+ e.$slots.groupName ? b(e.$slots, "groupName", {
304
304
  key: 0,
305
305
  group: m
306
- }) : (r(), d(p, { key: 1 }, [
307
- C($(m), 1)
306
+ }) : (s(), d(p, { key: 1 }, [
307
+ _($(m), 1)
308
308
  ], 64))
309
309
  ], 64))
310
310
  ]),
311
- e.$slots.groupByRow ? y(e.$slots, "groupByRow", {
311
+ e.$slots.groupByRow ? b(e.$slots, "groupByRow", {
312
312
  key: 0,
313
313
  group: m
314
- }) : S("", !0)
314
+ }) : v("", !0)
315
315
  ])
316
316
  ]),
317
317
  _: 2
@@ -322,17 +322,17 @@ const Ie = ge("Settings2Icon", [
322
322
  ]),
323
323
  _: 2
324
324
  }, 1024),
325
- s(t(de), { asChild: "" }, {
325
+ r(t(de), { asChild: "" }, {
326
326
  default: l(() => [
327
- (r(!0), d(p, null, k(n, (V) => (r(), c(j, {
328
- key: V.id,
327
+ (s(!0), d(p, null, k(n, (M) => (s(), f(j, {
328
+ key: M.id,
329
329
  columns: a.columns,
330
- row: V,
330
+ row: M,
331
331
  renderSubComponent: a.renderSubComponent
332
332
  }, {
333
333
  actions: l(() => [
334
- y(e.$slots, "rowActions", {
335
- row: V.original
334
+ b(e.$slots, "rowActions", {
335
+ row: M.original
336
336
  })
337
337
  ]),
338
338
  _: 2
@@ -342,26 +342,26 @@ const Ie = ge("Settings2Icon", [
342
342
  }, 1024)
343
343
  ]),
344
344
  _: 2
345
- }, 1024))), 128)) : (r(!0), d(p, { key: 1 }, k(t(u).getRowModel().rows, (n) => (r(), c(j, {
345
+ }, 1024))), 128)) : (s(!0), d(p, { key: 1 }, k(t(u).getRowModel().rows, (n) => (s(), f(j, {
346
346
  key: n.id,
347
347
  columns: a.columns,
348
348
  row: n,
349
349
  renderSubComponent: a.renderSubComponent
350
350
  }, {
351
351
  actions: l(() => [
352
- y(e.$slots, "rowActions", {
352
+ b(e.$slots, "rowActions", {
353
353
  row: n.original
354
354
  })
355
355
  ]),
356
356
  _: 2
357
357
  }, 1032, ["columns", "row", "renderSubComponent"]))), 128))
358
- ], 64)) : (r(), c(t(se), {
358
+ ], 64)) : (s(), f(t(re), {
359
359
  key: 1,
360
360
  colspan: e.columns.length
361
361
  }, {
362
362
  default: l(() => [
363
- y(e.$slots, "nodata", {}, () => [
364
- o[14] || (o[14] = C("No data"))
363
+ b(e.$slots, "nodata", {}, () => [
364
+ o[14] || (o[14] = _("No data"))
365
365
  ])
366
366
  ]),
367
367
  _: 3
@@ -375,21 +375,21 @@ const Ie = ge("Settings2Icon", [
375
375
  e.enableColumnListControl ? {
376
376
  name: "columnVisibility",
377
377
  fn: l(() => [
378
- s(t($e), {
378
+ r(t($e), {
379
379
  open: F.value,
380
380
  "onUpdate:open": o[4] || (o[4] = (n) => F.value = n)
381
381
  }, {
382
382
  default: l(() => [
383
- s(t(ke), { "as-child": "" }, {
383
+ r(t(ke), { "as-child": "" }, {
384
384
  default: l(() => [
385
- g("div", Ve, [
386
- g("div", xe, [
387
- s(t(ce), {
385
+ g("div", Me, [
386
+ g("div", Ve, [
387
+ r(t(pe), {
388
388
  variant: "ghost",
389
389
  class: "flex h-8 w-8 items-center justify-center text-foreground"
390
390
  }, {
391
391
  default: l(() => [
392
- s(t(Ie), { class: "h-4 w-4 flex-shrink-0 opacity-50" })
392
+ r(t(Ie), { class: "h-4 w-4 flex-shrink-0 opacity-50" })
393
393
  ]),
394
394
  _: 1
395
395
  })
@@ -398,40 +398,40 @@ const Ie = ge("Settings2Icon", [
398
398
  ]),
399
399
  _: 1
400
400
  }),
401
- s(t(ze), {
401
+ r(t(ze), {
402
402
  class: "w-[250px] p-0",
403
403
  align: "start"
404
404
  }, {
405
405
  default: l(() => [
406
- s(t(we), null, {
406
+ r(t(we), null, {
407
407
  default: l(() => [
408
- s(t(_e), {
408
+ r(t(Ce), {
409
409
  placeholder: e.columnSearchPlaceholder,
410
- modelValue: P.value,
411
- "onUpdate:modelValue": o[0] || (o[0] = (n) => P.value = n),
412
- onInput: o[1] || (o[1] = (n) => P.value = n.target.value)
410
+ modelValue: O.value,
411
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => O.value = n),
412
+ onInput: o[1] || (o[1] = (n) => O.value = n.target.value)
413
413
  }, null, 8, ["placeholder", "modelValue"]),
414
- s(t(he), null, {
414
+ r(t(he), null, {
415
415
  default: l(() => [
416
- s(t(Be), { class: "h-[300px]" }, {
416
+ r(t(Be), { class: "h-[300px]" }, {
417
417
  default: l(() => [
418
- s(t(Se), null, {
418
+ r(t(Se), null, {
419
419
  default: l(() => [
420
- C($(e.columnSearchNotFound), 1)
420
+ _($(e.columnSearchNotFound), 1)
421
421
  ]),
422
422
  _: 1
423
423
  }),
424
- s(t(Re), {
424
+ r(t(Re), {
425
425
  "columns-list": I.value,
426
426
  "onUpdate:columnsList": o[2] || (o[2] = (n) => I.value = n)
427
427
  }, null, 8, ["columns-list"]),
428
- s(t(Ce), {
428
+ r(t(_e), {
429
429
  value: "reset_columns_visibility",
430
430
  class: "px-2 py-1.5 font-medium text-muted-foreground",
431
- onSelect: o[3] || (o[3] = (n) => t(u).setColumnVisibility({ ...v.value, ...J.value }))
431
+ onSelect: o[3] || (o[3] = (n) => t(u).setColumnVisibility({ ...w.value, ...Q.value }))
432
432
  }, {
433
433
  default: l(() => [
434
- C($(e.columnResetVisibility), 1)
434
+ _($(e.columnResetVisibility), 1)
435
435
  ]),
436
436
  _: 1
437
437
  })
@@ -454,33 +454,44 @@ const Ie = ge("Settings2Icon", [
454
454
  key: "0"
455
455
  } : void 0
456
456
  ]), 1024),
457
- e.showPagination && L.value > 0 ? (r(), d("div", Le, [
458
- s(t(me), {
459
- total: L.value,
457
+ (e.showPagination || e.$slots.numberOfItems) && x.value > 0 ? (s(), d("div", {
458
+ key: 1,
459
+ class: K(["flex w-full border-x border-b border-border/[0.16] bg-primary/[0.04] px-4 py-1 text-sm text-muted-foreground", {
460
+ "justify-between": e.showPagination && e.$slots.numberOfItems,
461
+ "justify-start": e.$slots.numberOfItems && !e.showPagination,
462
+ "justify-end": e.showPagination && !e.$slots.numberOfItems
463
+ }])
464
+ }, [
465
+ e.$slots.numberOfItems ? (s(), d("div", xe, [
466
+ b(e.$slots, "numberOfItems")
467
+ ])) : v("", !0),
468
+ e.showPagination ? (s(), f(t(me), {
469
+ key: 1,
470
+ total: x.value,
460
471
  pageIndex: B.value,
461
472
  "onUpdate:pageIndex": o[5] || (o[5] = (n) => B.value = n),
462
473
  pageSize: D.value,
463
474
  "onUpdate:pageSize": o[6] || (o[6] = (n) => D.value = n)
464
- }, null, 8, ["total", "pageIndex", "pageSize"])
465
- ])) : S("", !0)
475
+ }, null, 8, ["total", "pageIndex", "pageSize"])) : v("", !0)
476
+ ], 2)) : v("", !0)
466
477
  ], 64));
467
478
  }
468
479
  });
469
- function Y(f) {
480
+ function q(c) {
470
481
  return { position: "relative" };
471
482
  }
472
483
  export {
473
484
  io as BuiDataTable,
474
485
  Re as BuiDataTableColumnList,
475
- Q as BuiTable,
476
- X as BuiTableBody,
486
+ X as BuiTable,
487
+ Z as BuiTableBody,
477
488
  go as BuiTableCaption,
478
- O as BuiTableCell,
479
- se as BuiTableEmpty,
480
- co as BuiTableFooter,
481
- Z as BuiTableHead,
482
- ee as BuiTableHeader,
483
- T as BuiTableRow,
489
+ T as BuiTableCell,
490
+ re as BuiTableEmpty,
491
+ po as BuiTableFooter,
492
+ ee as BuiTableHead,
493
+ oe as BuiTableHeader,
494
+ N as BuiTableRow,
484
495
  j as BuiTableRowSubrow,
485
- Y as getPinningStyle
496
+ q as getPinningStyle
486
497
  };
package/dist/index.js CHANGED
@@ -148,7 +148,7 @@ import "./BuiCalendar.vue_vue_type_style_index_0_lang-DK4yUiXC.js";
148
148
  import { _ as Bi } from "./BuiTable.vue_vue_type_script_setup_true_lang-QoPGiEYZ.js";
149
149
  import { _ as fi } from "./BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
150
150
  import { _ as _i } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
151
- import { _ as di } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js";
151
+ import { _ as di } from "./BuiTableHead.vue_vue_type_script_setup_true_lang-Dyf8tkSZ.js";
152
152
  import { _ as Ci } from "./BuiTableHeader.vue_vue_type_script_setup_true_lang-BXgL487_.js";
153
153
  import { _ as Fi } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
154
154
  import { _ as Si } from "./BuiTableCaption.vue_vue_type_script_setup_true_lang-CTEP1Sde.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soft-stech/bootsman-ui-shadcn",
3
- "version": "1.4.29",
3
+ "version": "1.4.31",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -246,6 +246,7 @@ function groupName(group: string | number) {
246
246
  @select="(action) => onRowAction(row, action)"
247
247
  />
248
248
  </template>
249
+ <template #numberOfItems>{{ data.length }} tasks</template>
249
250
  </BuiDataTable>
250
251
  </Variant>
251
252
  </Story>
@@ -30,8 +30,8 @@ import { ref } from 'vue'
30
30
 
31
31
  <div class="m-4 flex flex-col gap-2">
32
32
  <BuiProgress :model-value="0" />
33
- <BuiProgress :model-value="1" />
34
- <BuiProgress :model-value="50" />
33
+ <BuiProgress :model-value="1" :separators="[10, 35]" />
34
+ <BuiProgress :model-value="50" :separators="[10, 35]" />
35
35
  <BuiProgress :model-value="99" />
36
36
  <BuiProgress :model-value="100" />
37
37
  </div>
@@ -48,7 +48,7 @@ import { ref } from 'vue'
48
48
 
49
49
  <Variant title="Colors">
50
50
  <div class="m-4 flex flex-col gap-2">
51
- <BuiProgress :model-value="50" class="max-w-[300px]" color="primary" />
51
+ <BuiProgress :model-value="50" class="max-w-[300px]" color="green" />
52
52
  <BuiProgress :model-value="50" class="max-w-[300px]" color="red" />
53
53
  <BuiProgress :model-value="50" class="max-w-[300px]" color="orange" />
54
54
  </div>
@@ -3,7 +3,7 @@ import { ProgressIndicator, ProgressRoot, type ProgressRootProps } from 'radix-v
3
3
  import { cn } from '@/lib/utils'
4
4
  import { type HTMLAttributes, computed } from 'vue'
5
5
 
6
- import { progressVariants, capVariants, indicatorVariants } from '.'
6
+ import { progressVariants, indicatorVariants } from '.'
7
7
 
8
8
  const props = withDefaults(
9
9
  defineProps<
@@ -11,6 +11,7 @@ const props = withDefaults(
11
11
  class?: HTMLAttributes['class']
12
12
  variant?: NonNullable<Parameters<typeof progressVariants>[0]>['variant']
13
13
  color?: NonNullable<Parameters<typeof indicatorVariants>[0]>['color']
14
+ separators?: NonNullable<Array<number>>
14
15
  }
15
16
  >(),
16
17
  {
@@ -20,9 +21,13 @@ const props = withDefaults(
20
21
  variant: 'default'
21
22
  }
22
23
  )
23
- const indicatorClass = computed(() =>
24
- !props.modelValue || props.modelValue < 100 ? 'rounded-r-none border-r-2' : ''
25
- )
24
+ const indicatorClass = computed(() => {
25
+ if (!props.modelValue || props.modelValue >= 100) {
26
+ return ''
27
+ }
28
+
29
+ return 'rounded-r-none border-r-2'
30
+ })
26
31
  </script>
27
32
 
28
33
  <template>
@@ -38,9 +43,16 @@ const indicatorClass = computed(() =>
38
43
  >
39
44
  <ProgressIndicator
40
45
  :class="cn(indicatorVariants({ color, variant }), indicatorClass, props.class)"
41
- :style="`width: calc(calc(100% - ${capVariants[variant ?? 'default']}) * ${
42
- (props.modelValue ?? 0) * 0.01
43
- })`"
46
+ :style="`width: ${props.modelValue ?? 0}%;`"
44
47
  />
48
+ <template v-if="props.modelValue && props.separators && props.separators.length > 0">
49
+ <template v-for="separator in props.separators">
50
+ <div
51
+ v-if="separator > 0 && separator < 100 && separator < props.modelValue"
52
+ class="absolute bottom-0 top-0 w-px bg-background !p-0"
53
+ :style="`left:${separator}%`"
54
+ ></div>
55
+ </template>
56
+ </template>
45
57
  </ProgressRoot>
46
58
  </template>