@soft-stech/bootsman-ui-shadcn 1.4.19 → 1.4.21

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.
Files changed (33) hide show
  1. package/dist/BuiAdvancedAccordionTrigger.vue_vue_type_script_setup_true_lang-CGtIg8gS.js +73 -0
  2. package/dist/{BuiScrollArea.vue_vue_type_script_setup_true_lang-DWubHfUF.js → BuiScrollArea.vue_vue_type_script_setup_true_lang-D-nqw_Ka.js} +1 -1
  3. package/dist/{BuiScrollBar.vue_vue_type_script_setup_true_lang-DjO8ARLW.js → BuiScrollBar.vue_vue_type_script_setup_true_lang-DNZ_v7U0.js} +1 -1
  4. package/dist/{BuiTable.vue_vue_type_script_setup_true_lang-CKRiQHpD.js → BuiTable.vue_vue_type_script_setup_true_lang-D8Tseif4.js} +3 -3
  5. package/dist/BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js +38 -0
  6. package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-B2getNR7.js +26 -0
  7. package/dist/assets/main.css +1 -1
  8. package/dist/components/ui/accordion/BuiAdvancedAccordionTrigger.js +4 -0
  9. package/dist/components/ui/accordion/BuiAdvancedAccordionTrigger.vue.d.ts +35 -0
  10. package/dist/components/ui/accordion/index.d.ts +1 -0
  11. package/dist/components/ui/accordion/index.js +5 -3
  12. package/dist/components/ui/scroll-area/BuiScrollArea.js +1 -1
  13. package/dist/components/ui/scroll-area/BuiScrollBar.js +1 -1
  14. package/dist/components/ui/scroll-area/index.js +2 -2
  15. package/dist/components/ui/table/BuiDataTable.vue.d.ts +1 -0
  16. package/dist/components/ui/table/BuiTable.js +1 -1
  17. package/dist/components/ui/table/BuiTableHead.js +1 -1
  18. package/dist/components/ui/table/BuiTableHead.vue.d.ts +3 -0
  19. package/dist/components/ui/table/BuiTableHeader.js +1 -1
  20. package/dist/components/ui/table/BuiTableHeader.vue.d.ts +2 -0
  21. package/dist/components/ui/table/index.js +81 -77
  22. package/dist/index.js +379 -377
  23. package/package.json +1 -1
  24. package/src/components/stories/BuiAccordion.story.vue +54 -0
  25. package/src/components/ui/accordion/BuiAdvancedAccordionTrigger.vue +71 -0
  26. package/src/components/ui/accordion/index.ts +1 -0
  27. package/src/components/ui/scroll-area/BuiScrollBar.vue +13 -9
  28. package/src/components/ui/table/BuiDataTable.vue +3 -1
  29. package/src/components/ui/table/BuiTable.vue +1 -1
  30. package/src/components/ui/table/BuiTableHead.vue +18 -3
  31. package/src/components/ui/table/BuiTableHeader.vue +9 -3
  32. package/dist/BuiTableHead.vue_vue_type_script_setup_true_lang-uE4Py8ky.js +0 -26
  33. package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-BcnB4-3x.js +0 -24
@@ -1,20 +1,20 @@
1
- import { _ as A } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-CKRiQHpD.js";
2
- import { _ as O } 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 j } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-uE4Py8ky.js";
5
- import { _ as H } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-BcnB4-3x.js";
1
+ import { _ as U } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-D8Tseif4.js";
2
+ import { _ as A } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-DblqmDim.js";
3
+ import { _ as h } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-CYBx0oJL.js";
4
+ import { _ as O } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js";
5
+ import { _ as j } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-B2getNR7.js";
6
6
  import { _ as R } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-Bl4nF6yV.js";
7
- import { defineComponent as x, computed as v, openBlock as o, createElementBlock as u, Fragment as d, createBlock as m, unref as a, normalizeClass as G, withCtx as l, renderSlot as c, renderList as y, normalizeStyle as F, createVNode as p, createCommentVNode as S, resolveDynamicComponent as K, mergeModels as W, useModel as k, watchEffect as Y, createElementVNode as b, createTextVNode as _, toDisplayString as I } from "vue";
7
+ import { defineComponent as x, computed as v, openBlock as t, createElementBlock as u, Fragment as d, createBlock as m, unref as a, normalizeClass as G, withCtx as l, renderSlot as c, renderList as y, normalizeStyle as F, createVNode as p, createCommentVNode as S, resolveDynamicComponent as K, mergeModels as W, useModel as k, watchEffect as Y, createElementVNode as b, createTextVNode as _, toDisplayString as I } from "vue";
8
8
  import { _ as Pe } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-CTEP1Sde.js";
9
9
  import { _ as q } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BTyX0sT5.js";
10
- import { _ as Me } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
10
+ import { _ as ze } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-CRyh8XF5.js";
11
11
  import { _ as J } from "../../../BuiCollapsible.vue_vue_type_script_setup_true_lang-DjuQBjGZ.js";
12
12
  import { _ as Q } from "../../../BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-l-nmwAwq.js";
13
13
  import { _ as X } from "../../../BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-BiD89zzH.js";
14
14
  import { _ as Z } from "../../../variables-Dw5mPbg_.js";
15
15
  import "vee-validate";
16
- import { v as M } from "../../../utils-CwP7Up6y.js";
17
- import { FlexRender as L, useVueTable as ee, getCoreRowModel as te, getPaginationRowModel as oe, getSortedRowModel as ne } from "@tanstack/vue-table";
16
+ import { v as z } from "../../../utils-CwP7Up6y.js";
17
+ import { FlexRender as H, useVueTable as ee, getCoreRowModel as oe, getPaginationRowModel as te, getSortedRowModel as ne } from "@tanstack/vue-table";
18
18
  const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
19
19
  __name: "BuiTableRowSubrow",
20
20
  props: {
@@ -23,23 +23,23 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
23
23
  columns: {}
24
24
  },
25
25
  setup(f) {
26
- const t = f, C = v(() => t.row.original.name?.includes(ae));
27
- return (r, $) => (o(), u(d, null, [
28
- C.value ? S("", !0) : (o(), m(a(R), {
26
+ const o = f, C = v(() => o.row.original.name?.includes(ae));
27
+ return (r, $) => (t(), u(d, null, [
28
+ C.value ? S("", !0) : (t(), m(a(R), {
29
29
  key: 0,
30
30
  "data-row-state": r.row.getIsSelected() ? "selected" : void 0,
31
- class: G(t.renderSubComponent?.(r.row) ? "border-b-0" : "")
31
+ class: G(o.renderSubComponent?.(r.row) ? "border-b-0" : "")
32
32
  }, {
33
33
  actions: l(() => [
34
34
  c(r.$slots, "actions")
35
35
  ]),
36
36
  default: l(() => [
37
- (o(!0), u(d, null, y(r.row.getVisibleCells(), (w) => (o(), m(a(T), {
37
+ (t(!0), u(d, null, y(r.row.getVisibleCells(), (w) => (t(), m(a(h), {
38
38
  key: w.id,
39
- style: F({ ...a(U)(w.column) })
39
+ style: F({ ...a(L)(w.column) })
40
40
  }, {
41
41
  default: l(() => [
42
- p(a(L), {
42
+ p(a(H), {
43
43
  render: w.column.columnDef.cell,
44
44
  props: w.getContext()
45
45
  }, null, 8, ["render", "props"])
@@ -49,7 +49,7 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
49
49
  ]),
50
50
  _: 3
51
51
  }, 8, ["data-row-state", "class"])),
52
- t.renderSubComponent?.(r.row) ? (o(), m(a(R), {
52
+ o.renderSubComponent?.(r.row) ? (t(), m(a(R), {
53
53
  key: 1,
54
54
  "data-row-state": r.row.getIsSelected() ? "selected" : void 0
55
55
  }, {
@@ -57,12 +57,12 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
57
57
  c(r.$slots, "actions")
58
58
  ]),
59
59
  default: l(() => [
60
- p(a(T), {
60
+ p(a(h), {
61
61
  colspan: r.columns.length,
62
62
  class: "pt-0"
63
63
  }, {
64
64
  default: l(() => [
65
- (o(), m(K(t.renderSubComponent?.(r.row)?.())))
65
+ (t(), m(K(o.renderSubComponent?.(r.row)?.())))
66
66
  ]),
67
67
  _: 1
68
68
  }, 8, ["colspan"])
@@ -90,7 +90,8 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
90
90
  groupBy: {},
91
91
  groupLabels: {},
92
92
  getRowId: {},
93
- renderSubComponent: {}
93
+ renderSubComponent: {},
94
+ freezeHeader: { type: Boolean }
94
95
  }, {
95
96
  sorting: {},
96
97
  sortingModifiers: {},
@@ -103,36 +104,36 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
103
104
  }),
104
105
  emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility"],
105
106
  setup(f) {
106
- const t = f, C = k(f, "sorting"), r = k(f, "pagination"), $ = k(f, "selection"), w = k(f, "columnVisibility"), V = v(
107
- () => t.manualPagination ? t.totalItems : t.data.length
107
+ const o = f, C = k(f, "sorting"), r = k(f, "pagination"), $ = k(f, "selection"), w = k(f, "columnVisibility"), M = v(
108
+ () => o.manualPagination ? o.totalItems : o.data.length
108
109
  ), g = ee({
109
110
  initialState: {
110
111
  // TODO: column freeze
111
112
  //columnPinning: { left: ['id'] },
112
- pagination: { pageSize: t.pageSize }
113
+ pagination: { pageSize: o.pageSize }
113
114
  },
114
115
  get data() {
115
- return t.data;
116
+ return o.data;
116
117
  },
117
118
  get columns() {
118
- return t.columns;
119
+ return o.columns;
119
120
  },
120
- getCoreRowModel: te(),
121
- getPaginationRowModel: oe(),
121
+ getCoreRowModel: oe(),
122
+ getPaginationRowModel: te(),
122
123
  getSortedRowModel: ne(),
123
124
  onSortingChange: (e) => {
124
- M(e, C);
125
+ z(e, C);
125
126
  },
126
127
  onPaginationChange: (e) => {
127
- M(e, r);
128
+ z(e, r);
128
129
  },
129
130
  onRowSelectionChange: (e) => {
130
- M(e, $);
131
+ z(e, $);
131
132
  },
132
133
  autoResetPageIndex: !1,
133
- manualPagination: t.manualPagination,
134
+ manualPagination: o.manualPagination,
134
135
  // set to false to enable client-side pagination
135
- manualSorting: t.manualSorting,
136
+ manualSorting: o.manualSorting,
136
137
  state: {
137
138
  get sorting() {
138
139
  return C.value;
@@ -147,8 +148,8 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
147
148
  return w.value;
148
149
  }
149
150
  },
150
- getRowId: t.getRowId
151
- }), z = v({
151
+ getRowId: o.getRowId
152
+ }), T = v({
152
153
  get() {
153
154
  return g.getState().pagination.pageSize;
154
155
  },
@@ -167,48 +168,51 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
167
168
  const e = g.getPageCount();
168
169
  e && e < B.value && (B.value = e);
169
170
  });
170
- const h = v(() => t.groupBy ? g.getRowModel().rows.reduce((e, n) => {
171
- const s = n.getValue(t.groupBy) ?? D;
171
+ const V = v(() => o.groupBy ? g.getRowModel().rows.reduce((e, n) => {
172
+ const s = n.getValue(o.groupBy) ?? D;
172
173
  return e[s] = e[s] || [], e[s].push(n), e;
173
174
  }, /* @__PURE__ */ Object.create(null)) : null);
174
175
  function N(e) {
175
- return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[e];
176
+ return (o.groupBy && o.groupLabels ? o.groupLabels[o.groupBy] || [] : [])[e];
176
177
  }
177
- return (e, n) => (o(), u(d, null, [
178
- e.$slots.caption ? (o(), u("div", le, [
178
+ return (e, n) => (t(), u(d, null, [
179
+ e.$slots.caption ? (t(), u("div", le, [
179
180
  c(e.$slots, "caption", { table: a(g) })
180
181
  ])) : S("", !0),
181
- p(a(A), null, {
182
+ p(a(U), null, {
182
183
  default: l(() => [
183
- p(a(H), null, {
184
+ p(a(j), {
185
+ "freeze-header": o.freezeHeader
186
+ }, {
184
187
  default: l(() => [
185
- (o(!0), u(d, null, y(a(g).getHeaderGroups(), (i) => (o(), m(a(R), {
188
+ (t(!0), u(d, null, y(a(g).getHeaderGroups(), (i) => (t(), m(a(R), {
186
189
  key: i.id
187
190
  }, {
188
191
  default: l(() => [
189
- (o(!0), u(d, null, y(i.headers, (s) => (o(), m(a(j), {
192
+ (t(!0), u(d, null, y(i.headers, (s) => (t(), m(a(O), {
190
193
  key: s.id,
191
- style: F({ ...a(U)(s.column) })
194
+ style: F({ ...a(L)(s.column) }),
195
+ "freeze-header": o.freezeHeader
192
196
  }, {
193
197
  default: l(() => [
194
- s.isPlaceholder ? S("", !0) : (o(), m(a(L), {
198
+ s.isPlaceholder ? S("", !0) : (t(), m(a(H), {
195
199
  key: 0,
196
200
  render: s.column.columnDef.header,
197
201
  props: s.getContext()
198
202
  }, null, 8, ["render", "props"]))
199
203
  ]),
200
204
  _: 2
201
- }, 1032, ["style"]))), 128))
205
+ }, 1032, ["style", "freeze-header"]))), 128))
202
206
  ]),
203
207
  _: 2
204
208
  }, 1024))), 128))
205
209
  ]),
206
210
  _: 1
207
- }),
208
- p(a(O), null, {
211
+ }, 8, ["freeze-header"]),
212
+ p(a(A), null, {
209
213
  default: l(() => [
210
- a(g).getRowModel().rows?.length ? (o(), u(d, { key: 0 }, [
211
- t.groupBy && h.value ? (o(!0), u(d, { key: 0 }, y(h.value, (i, s) => (o(), m(a(J), {
214
+ a(g).getRowModel().rows?.length ? (t(), u(d, { key: 0 }, [
215
+ o.groupBy && V.value ? (t(!0), u(d, { key: 0 }, y(V.value, (i, s) => (t(), m(a(J), {
212
216
  asChild: "",
213
217
  key: s,
214
218
  open: !0
@@ -221,7 +225,7 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
221
225
  c(e.$slots, "groupActions", { group: s })
222
226
  ]),
223
227
  default: l(() => [
224
- p(a(T), {
228
+ p(a(h), {
225
229
  colspan: e.columns.length,
226
230
  class: "!pb-0"
227
231
  }, {
@@ -235,14 +239,14 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
235
239
  n[6] || (n[6] = b("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
236
240
  n[7] || (n[7] = b("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
237
241
  n[8] || (n[8] = b("div", null, null, -1)),
238
- s === D ? (o(), u(d, { key: 0 }, [
242
+ s === D ? (t(), u(d, { key: 0 }, [
239
243
  _(I(N(1)), 1)
240
- ], 64)) : (o(), u(d, { key: 1 }, [
244
+ ], 64)) : (t(), u(d, { key: 1 }, [
241
245
  _(I(N(0)) + ": ", 1),
242
246
  e.$slots.groupName ? c(e.$slots, "groupName", {
243
247
  key: 0,
244
248
  group: s
245
- }) : (o(), u(d, { key: 1 }, [
249
+ }) : (t(), u(d, { key: 1 }, [
246
250
  _(I(s), 1)
247
251
  ], 64))
248
252
  ], 64))
@@ -263,11 +267,11 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
263
267
  }, 1024),
264
268
  p(a(X), { asChild: "" }, {
265
269
  default: l(() => [
266
- (o(!0), u(d, null, y(i, (P) => (o(), m(E, {
270
+ (t(!0), u(d, null, y(i, (P) => (t(), m(E, {
267
271
  key: P.id,
268
- columns: t.columns,
272
+ columns: o.columns,
269
273
  row: P,
270
- renderSubComponent: t.renderSubComponent
274
+ renderSubComponent: o.renderSubComponent
271
275
  }, {
272
276
  actions: l(() => [
273
277
  c(e.$slots, "rowActions", {
@@ -281,11 +285,11 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
281
285
  }, 1024)
282
286
  ]),
283
287
  _: 2
284
- }, 1024))), 128)) : (o(!0), u(d, { key: 1 }, y(a(g).getRowModel().rows, (i) => (o(), m(E, {
288
+ }, 1024))), 128)) : (t(!0), u(d, { key: 1 }, y(a(g).getRowModel().rows, (i) => (t(), m(E, {
285
289
  key: i.id,
286
- columns: t.columns,
290
+ columns: o.columns,
287
291
  row: i,
288
- renderSubComponent: t.renderSubComponent
292
+ renderSubComponent: o.renderSubComponent
289
293
  }, {
290
294
  actions: l(() => [
291
295
  c(e.$slots, "rowActions", {
@@ -294,7 +298,7 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
294
298
  ]),
295
299
  _: 2
296
300
  }, 1032, ["columns", "row", "renderSubComponent"]))), 128))
297
- ], 64)) : (o(), m(a(q), {
301
+ ], 64)) : (t(), m(a(q), {
298
302
  key: 1,
299
303
  colspan: e.columns.length
300
304
  }, {
@@ -311,37 +315,37 @@ const ae = "[!fake-empty!]", E = /* @__PURE__ */ x({
311
315
  ]),
312
316
  _: 3
313
317
  }),
314
- e.showPagination && V.value > 0 ? (o(), u("div", ue, [
318
+ e.showPagination && M.value > 0 ? (t(), u("div", ue, [
315
319
  p(a(Z), {
316
- total: V.value,
320
+ total: M.value,
317
321
  pageIndex: B.value,
318
322
  "onUpdate:pageIndex": n[0] || (n[0] = (i) => B.value = i),
319
- pageSize: z.value,
320
- "onUpdate:pageSize": n[1] || (n[1] = (i) => z.value = i)
323
+ pageSize: T.value,
324
+ "onUpdate:pageSize": n[1] || (n[1] = (i) => T.value = i)
321
325
  }, null, 8, ["total", "pageIndex", "pageSize"])
322
326
  ])) : S("", !0)
323
327
  ], 64));
324
328
  }
325
329
  });
326
- function U(f) {
327
- const t = f.getIsPinned();
330
+ function L(f) {
331
+ const o = f.getIsPinned();
328
332
  return {
329
- left: t === "left" ? "0" : void 0,
330
- position: t ? "sticky" : "relative",
331
- zIndex: t ? "1" : "0"
333
+ left: o === "left" ? "0" : void 0,
334
+ position: o ? "sticky" : "relative",
335
+ zIndex: o ? "1" : "0"
332
336
  };
333
337
  }
334
338
  export {
335
339
  _e as BuiDataTable,
336
- A as BuiTable,
337
- O as BuiTableBody,
340
+ U as BuiTable,
341
+ A as BuiTableBody,
338
342
  Pe as BuiTableCaption,
339
- T as BuiTableCell,
343
+ h as BuiTableCell,
340
344
  q as BuiTableEmpty,
341
- Me as BuiTableFooter,
342
- j as BuiTableHead,
343
- H as BuiTableHeader,
345
+ ze as BuiTableFooter,
346
+ O as BuiTableHead,
347
+ j as BuiTableHeader,
344
348
  R as BuiTableRow,
345
349
  E as BuiTableRowSubrow,
346
- U as getPinningStyle
350
+ L as getPinningStyle
347
351
  };