@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.
- package/dist/BuiAdvancedAccordionTrigger.vue_vue_type_script_setup_true_lang-CGtIg8gS.js +73 -0
- 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
- 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
- package/dist/{BuiTable.vue_vue_type_script_setup_true_lang-CKRiQHpD.js → BuiTable.vue_vue_type_script_setup_true_lang-D8Tseif4.js} +3 -3
- package/dist/BuiTableHead.vue_vue_type_script_setup_true_lang-BDSRArVd.js +38 -0
- package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-B2getNR7.js +26 -0
- package/dist/assets/main.css +1 -1
- package/dist/components/ui/accordion/BuiAdvancedAccordionTrigger.js +4 -0
- package/dist/components/ui/accordion/BuiAdvancedAccordionTrigger.vue.d.ts +35 -0
- package/dist/components/ui/accordion/index.d.ts +1 -0
- package/dist/components/ui/accordion/index.js +5 -3
- package/dist/components/ui/scroll-area/BuiScrollArea.js +1 -1
- package/dist/components/ui/scroll-area/BuiScrollBar.js +1 -1
- package/dist/components/ui/scroll-area/index.js +2 -2
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +1 -0
- package/dist/components/ui/table/BuiTable.js +1 -1
- package/dist/components/ui/table/BuiTableHead.js +1 -1
- package/dist/components/ui/table/BuiTableHead.vue.d.ts +3 -0
- package/dist/components/ui/table/BuiTableHeader.js +1 -1
- package/dist/components/ui/table/BuiTableHeader.vue.d.ts +2 -0
- package/dist/components/ui/table/index.js +81 -77
- package/dist/index.js +379 -377
- package/package.json +1 -1
- package/src/components/stories/BuiAccordion.story.vue +54 -0
- package/src/components/ui/accordion/BuiAdvancedAccordionTrigger.vue +71 -0
- package/src/components/ui/accordion/index.ts +1 -0
- package/src/components/ui/scroll-area/BuiScrollBar.vue +13 -9
- package/src/components/ui/table/BuiDataTable.vue +3 -1
- package/src/components/ui/table/BuiTable.vue +1 -1
- package/src/components/ui/table/BuiTableHead.vue +18 -3
- package/src/components/ui/table/BuiTableHeader.vue +9 -3
- package/dist/BuiTableHead.vue_vue_type_script_setup_true_lang-uE4Py8ky.js +0 -26
- package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-BcnB4-3x.js +0 -24
@@ -1,20 +1,20 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
import { _ as
|
5
|
-
import { _ as
|
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
|
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
|
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
|
17
|
-
import { FlexRender as
|
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
|
27
|
-
return (r, $) => (
|
28
|
-
C.value ? S("", !0) : (
|
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(
|
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
|
-
(
|
37
|
+
(t(!0), u(d, null, y(r.row.getVisibleCells(), (w) => (t(), m(a(h), {
|
38
38
|
key: w.id,
|
39
|
-
style: F({ ...a(
|
39
|
+
style: F({ ...a(L)(w.column) })
|
40
40
|
}, {
|
41
41
|
default: l(() => [
|
42
|
-
p(a(
|
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
|
-
|
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(
|
60
|
+
p(a(h), {
|
61
61
|
colspan: r.columns.length,
|
62
62
|
class: "pt-0"
|
63
63
|
}, {
|
64
64
|
default: l(() => [
|
65
|
-
(
|
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
|
107
|
-
() =>
|
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:
|
113
|
+
pagination: { pageSize: o.pageSize }
|
113
114
|
},
|
114
115
|
get data() {
|
115
|
-
return
|
116
|
+
return o.data;
|
116
117
|
},
|
117
118
|
get columns() {
|
118
|
-
return
|
119
|
+
return o.columns;
|
119
120
|
},
|
120
|
-
getCoreRowModel:
|
121
|
-
getPaginationRowModel:
|
121
|
+
getCoreRowModel: oe(),
|
122
|
+
getPaginationRowModel: te(),
|
122
123
|
getSortedRowModel: ne(),
|
123
124
|
onSortingChange: (e) => {
|
124
|
-
|
125
|
+
z(e, C);
|
125
126
|
},
|
126
127
|
onPaginationChange: (e) => {
|
127
|
-
|
128
|
+
z(e, r);
|
128
129
|
},
|
129
130
|
onRowSelectionChange: (e) => {
|
130
|
-
|
131
|
+
z(e, $);
|
131
132
|
},
|
132
133
|
autoResetPageIndex: !1,
|
133
|
-
manualPagination:
|
134
|
+
manualPagination: o.manualPagination,
|
134
135
|
// set to false to enable client-side pagination
|
135
|
-
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:
|
151
|
-
}),
|
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
|
171
|
-
const s = n.getValue(
|
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 (
|
176
|
+
return (o.groupBy && o.groupLabels ? o.groupLabels[o.groupBy] || [] : [])[e];
|
176
177
|
}
|
177
|
-
return (e, n) => (
|
178
|
-
e.$slots.caption ? (
|
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(
|
182
|
+
p(a(U), null, {
|
182
183
|
default: l(() => [
|
183
|
-
p(a(
|
184
|
+
p(a(j), {
|
185
|
+
"freeze-header": o.freezeHeader
|
186
|
+
}, {
|
184
187
|
default: l(() => [
|
185
|
-
(
|
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
|
-
(
|
192
|
+
(t(!0), u(d, null, y(i.headers, (s) => (t(), m(a(O), {
|
190
193
|
key: s.id,
|
191
|
-
style: F({ ...a(
|
194
|
+
style: F({ ...a(L)(s.column) }),
|
195
|
+
"freeze-header": o.freezeHeader
|
192
196
|
}, {
|
193
197
|
default: l(() => [
|
194
|
-
s.isPlaceholder ? S("", !0) : (
|
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(
|
211
|
+
}, 8, ["freeze-header"]),
|
212
|
+
p(a(A), null, {
|
209
213
|
default: l(() => [
|
210
|
-
a(g).getRowModel().rows?.length ? (
|
211
|
-
|
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(
|
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 ? (
|
242
|
+
s === D ? (t(), u(d, { key: 0 }, [
|
239
243
|
_(I(N(1)), 1)
|
240
|
-
], 64)) : (
|
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
|
-
}) : (
|
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
|
-
(
|
270
|
+
(t(!0), u(d, null, y(i, (P) => (t(), m(E, {
|
267
271
|
key: P.id,
|
268
|
-
columns:
|
272
|
+
columns: o.columns,
|
269
273
|
row: P,
|
270
|
-
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)) : (
|
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:
|
290
|
+
columns: o.columns,
|
287
291
|
row: i,
|
288
|
-
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)) : (
|
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 &&
|
318
|
+
e.showPagination && M.value > 0 ? (t(), u("div", ue, [
|
315
319
|
p(a(Z), {
|
316
|
-
total:
|
320
|
+
total: M.value,
|
317
321
|
pageIndex: B.value,
|
318
322
|
"onUpdate:pageIndex": n[0] || (n[0] = (i) => B.value = i),
|
319
|
-
pageSize:
|
320
|
-
"onUpdate:pageSize": n[1] || (n[1] = (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
|
327
|
-
const
|
330
|
+
function L(f) {
|
331
|
+
const o = f.getIsPinned();
|
328
332
|
return {
|
329
|
-
left:
|
330
|
-
position:
|
331
|
-
zIndex:
|
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
|
-
|
337
|
-
|
340
|
+
U as BuiTable,
|
341
|
+
A as BuiTableBody,
|
338
342
|
Pe as BuiTableCaption,
|
339
|
-
|
343
|
+
h as BuiTableCell,
|
340
344
|
q as BuiTableEmpty,
|
341
|
-
|
342
|
-
|
343
|
-
|
345
|
+
ze as BuiTableFooter,
|
346
|
+
O as BuiTableHead,
|
347
|
+
j as BuiTableHeader,
|
344
348
|
R as BuiTableRow,
|
345
349
|
E as BuiTableRowSubrow,
|
346
|
-
|
350
|
+
L as getPinningStyle
|
347
351
|
};
|