@deepnoid/ui 0.1.77 → 0.1.79
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/.turbo/turbo-build.log +127 -127
- package/dist/{chunk-C5BUKC7Z.mjs → chunk-AX3D6VFT.mjs} +51 -41
- package/dist/{chunk-TKB2JL2E.mjs → chunk-D5N7OBSO.mjs} +18 -9
- package/dist/{chunk-T76NFNWV.mjs → chunk-R7VCFJGU.mjs} +2 -0
- package/dist/{chunk-V7YWEFVD.mjs → chunk-RSGTFDZ5.mjs} +4 -4
- package/dist/{chunk-5GBAUDP4.mjs → chunk-SIVCIIB6.mjs} +45 -5
- package/dist/{chunk-OKO3XRJS.mjs → chunk-SPIJ6ECD.mjs} +1 -1
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.mjs +8 -8
- package/dist/components/fileUpload/fileUpload.mjs +5 -5
- package/dist/components/fileUpload/index.mjs +5 -5
- package/dist/components/modal/index.mjs +6 -6
- package/dist/components/modal/modal.mjs +6 -6
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/table/index.js +109 -50
- package/dist/components/table/index.mjs +5 -5
- package/dist/components/table/table-body.js +45 -5
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table-head.js +18 -9
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.js +109 -50
- package/dist/components/table/table.mjs +5 -5
- package/dist/components/tree/index.js +2 -0
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.d.mts +6 -0
- package/dist/components/tree/tree.d.ts +6 -0
- package/dist/components/tree/tree.js +2 -0
- package/dist/components/tree/tree.mjs +1 -1
- package/dist/index.js +111 -50
- package/dist/index.mjs +25 -25
- package/package.json +1 -1
- package/dist/{chunk-6VL4OVGM.mjs → chunk-7JVTWM4U.mjs} +3 -3
- package/dist/{chunk-PDY7UYKZ.mjs → chunk-PQRAYOTJ.mjs} +3 -3
- package/dist/{chunk-RN76ARTS.mjs → chunk-Q7J5FAMH.mjs} +3 -3
|
@@ -26,23 +26,30 @@ var TableHead = ({
|
|
|
26
26
|
e.preventDefault();
|
|
27
27
|
onCheckAll(!isCheckedAll);
|
|
28
28
|
};
|
|
29
|
-
const renderTh = (content, key, column) => /* @__PURE__ */ jsx(
|
|
29
|
+
const renderTh = (content, key, column, isCheckbox) => /* @__PURE__ */ jsx(
|
|
30
30
|
"th",
|
|
31
31
|
{
|
|
32
|
-
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column),
|
|
32
|
+
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column == null ? void 0 : column.className),
|
|
33
33
|
style: {
|
|
34
|
-
width: (column == null ? void 0 : column.width) ? `${column.width}px` :
|
|
35
|
-
minWidth: (column == null ? void 0 : column.minWidth) ? `${column.minWidth}px` : void 0,
|
|
36
|
-
maxWidth: (column == null ? void 0 : column.maxWidth) ? `${column.maxWidth}px` : void 0,
|
|
37
|
-
height: (column == null ? void 0 : column.height) ? `${column.height}px` : void 0
|
|
34
|
+
width: isCheckbox ? "40px" : (column == null ? void 0 : column.width) ? `${column.width}px` : "auto",
|
|
35
|
+
minWidth: isCheckbox ? "40px" : (column == null ? void 0 : column.minWidth) ? `${column.minWidth}px` : void 0,
|
|
36
|
+
maxWidth: isCheckbox ? "40px" : (column == null ? void 0 : column.maxWidth) ? `${column.maxWidth}px` : void 0,
|
|
37
|
+
height: (column == null ? void 0 : column.height) ? `${column.height}px` : void 0,
|
|
38
|
+
...isCheckbox || (column == null ? void 0 : column.width) ? {
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
flexGrow: 0,
|
|
41
|
+
boxSizing: "border-box"
|
|
42
|
+
} : {}
|
|
38
43
|
},
|
|
39
44
|
children: content
|
|
40
45
|
},
|
|
41
46
|
key
|
|
42
47
|
);
|
|
43
48
|
const renderSkeletonRow = () => /* @__PURE__ */ jsx("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ jsxs("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "[&>th]:border-0"), children: [
|
|
44
|
-
columns.map(
|
|
45
|
-
|
|
49
|
+
columns.map(
|
|
50
|
+
(column, idx) => renderTh(/* @__PURE__ */ jsx(skeleton_default, { color, rounded: "lg", speed: "fast" }), `skeleton-${idx}`, column)
|
|
51
|
+
),
|
|
52
|
+
rowCheckbox && renderTh(/* @__PURE__ */ jsx(skeleton_default, { color, rounded: "lg", speed: "fast" }), "checkbox-skeleton", void 0, true)
|
|
46
53
|
] }) });
|
|
47
54
|
const renderContentRow = () => /* @__PURE__ */ jsx("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
48
55
|
columns.map((column, idx) => renderTh(column.headerName, `${column.field}-${idx}`, column)),
|
|
@@ -55,7 +62,9 @@ var TableHead = ({
|
|
|
55
62
|
onChange: (e) => onCheckAll(e.target.checked)
|
|
56
63
|
}
|
|
57
64
|
) }),
|
|
58
|
-
"checkbox"
|
|
65
|
+
"checkbox",
|
|
66
|
+
void 0,
|
|
67
|
+
true
|
|
59
68
|
)
|
|
60
69
|
] }) });
|
|
61
70
|
return isLoading ? renderSkeletonRow() : renderContentRow();
|
|
@@ -115,6 +115,7 @@ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames,
|
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: clsx(
|
|
118
|
+
slots.groupNode({ class: classNames == null ? void 0 : classNames.groupNode }),
|
|
118
119
|
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
119
120
|
group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
|
|
120
121
|
),
|
|
@@ -148,6 +149,7 @@ var treeStyle = tv({
|
|
|
148
149
|
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
149
150
|
wrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
150
151
|
itemWrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
152
|
+
groupNode: [],
|
|
151
153
|
node: [
|
|
152
154
|
"flex",
|
|
153
155
|
"items-center",
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
input_default
|
|
4
4
|
} from "./chunk-5M7UDEMG.mjs";
|
|
5
|
-
import {
|
|
6
|
-
icon_button_default
|
|
7
|
-
} from "./chunk-PDY7UYKZ.mjs";
|
|
8
5
|
import {
|
|
9
6
|
button_default
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q7J5FAMH.mjs";
|
|
8
|
+
import {
|
|
9
|
+
icon_button_default
|
|
10
|
+
} from "./chunk-PQRAYOTJ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/fileUpload/fileUpload.tsx
|
|
13
13
|
import { useRef, useState, useEffect } from "react";
|
|
@@ -27,16 +27,56 @@ var TableBody = ({
|
|
|
27
27
|
className
|
|
28
28
|
}) => {
|
|
29
29
|
const getCellStyle = (column) => ({
|
|
30
|
-
width: column.width ? `${column.width}px` :
|
|
30
|
+
width: column.width ? `${column.width}px` : "auto",
|
|
31
31
|
minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
|
|
32
32
|
maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
|
|
33
33
|
height: column.height ? `${column.height}px` : void 0,
|
|
34
|
-
textAlign: column.align || "center"
|
|
34
|
+
textAlign: column.align || "center",
|
|
35
|
+
...column.width && {
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
flexGrow: 0,
|
|
38
|
+
boxSizing: "border-box",
|
|
39
|
+
overflow: "hidden",
|
|
40
|
+
textOverflow: "ellipsis",
|
|
41
|
+
whiteSpace: "nowrap"
|
|
42
|
+
}
|
|
35
43
|
});
|
|
36
|
-
const renderTdSkeleton = (key
|
|
37
|
-
|
|
44
|
+
const renderTdSkeleton = (key, column) => {
|
|
45
|
+
const isCheckbox = key.includes("checkbox");
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
"td",
|
|
48
|
+
{
|
|
49
|
+
className: slots.td({ class: classNames == null ? void 0 : classNames.td }),
|
|
50
|
+
style: isCheckbox ? {
|
|
51
|
+
width: "40px",
|
|
52
|
+
minWidth: "40px",
|
|
53
|
+
maxWidth: "40px",
|
|
54
|
+
flexShrink: 0,
|
|
55
|
+
flexGrow: 0,
|
|
56
|
+
boxSizing: "border-box"
|
|
57
|
+
} : column ? getCellStyle(column) : void 0,
|
|
58
|
+
children: /* @__PURE__ */ jsx(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" })
|
|
59
|
+
},
|
|
60
|
+
key
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
const renderCheckboxCell = (rowId) => /* @__PURE__ */ jsx(
|
|
64
|
+
"td",
|
|
65
|
+
{
|
|
66
|
+
className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"),
|
|
67
|
+
style: {
|
|
68
|
+
width: "40px",
|
|
69
|
+
minWidth: "40px",
|
|
70
|
+
maxWidth: "40px",
|
|
71
|
+
flexShrink: 0,
|
|
72
|
+
flexGrow: 0,
|
|
73
|
+
boxSizing: "border-box"
|
|
74
|
+
},
|
|
75
|
+
children: /* @__PURE__ */ jsx(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) })
|
|
76
|
+
}
|
|
77
|
+
);
|
|
38
78
|
const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
39
|
-
columns.map((
|
|
79
|
+
columns.map((column, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`, column)),
|
|
40
80
|
rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
|
|
41
81
|
] }, `skeleton-${rowIndex}`);
|
|
42
82
|
const renderEmptyRow = () => /* @__PURE__ */ jsx("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ jsx("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
breadcrumb_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-7JVTWM4U.mjs";
|
|
5
5
|
import "../../chunk-MY5U63QO.mjs";
|
|
6
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
7
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
8
6
|
import "../../chunk-EKWUOA5B.mjs";
|
|
9
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
8
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
10
9
|
import "../../chunk-6WSACUIB.mjs";
|
|
11
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
12
10
|
import "../../chunk-6PNKRBUT.mjs";
|
|
11
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
13
12
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
13
|
import "../../chunk-JP4TEWP7.mjs";
|
|
14
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
15
15
|
import "../../chunk-RRONV7YA.mjs";
|
|
16
16
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
17
17
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import "../../chunk-KYIODWXL.mjs";
|
|
3
3
|
import {
|
|
4
4
|
breadcrumb_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-7JVTWM4U.mjs";
|
|
6
6
|
import "../../chunk-MY5U63QO.mjs";
|
|
7
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
8
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
9
7
|
import "../../chunk-EKWUOA5B.mjs";
|
|
10
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
9
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
11
10
|
import "../../chunk-6WSACUIB.mjs";
|
|
12
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
13
11
|
import "../../chunk-6PNKRBUT.mjs";
|
|
12
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
14
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
14
|
import "../../chunk-JP4TEWP7.mjs";
|
|
15
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
16
16
|
import "../../chunk-RRONV7YA.mjs";
|
|
17
17
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
18
18
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
button_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-Q7J5FAMH.mjs";
|
|
5
5
|
import "../../chunk-6WSACUIB.mjs";
|
|
6
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
7
6
|
import "../../chunk-6PNKRBUT.mjs";
|
|
7
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-JP4TEWP7.mjs";
|
|
10
10
|
import "../../chunk-RRONV7YA.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
icon_button_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-PQRAYOTJ.mjs";
|
|
5
5
|
import "../../chunk-6WSACUIB.mjs";
|
|
6
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
7
6
|
import "../../chunk-6PNKRBUT.mjs";
|
|
7
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-JP4TEWP7.mjs";
|
|
10
10
|
import "../../chunk-RRONV7YA.mjs";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-MY5U63QO.mjs";
|
|
3
|
-
import {
|
|
4
|
-
icon_button_default
|
|
5
|
-
} from "../../chunk-PDY7UYKZ.mjs";
|
|
6
|
-
import {
|
|
7
|
-
text_button_default
|
|
8
|
-
} from "../../chunk-TVTIX7MO.mjs";
|
|
9
3
|
import {
|
|
10
4
|
button_group_default
|
|
11
5
|
} from "../../chunk-EKWUOA5B.mjs";
|
|
12
6
|
import {
|
|
13
7
|
button_default
|
|
14
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-Q7J5FAMH.mjs";
|
|
9
|
+
import {
|
|
10
|
+
icon_button_default
|
|
11
|
+
} from "../../chunk-PQRAYOTJ.mjs";
|
|
15
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
16
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
17
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
18
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
19
16
|
import "../../chunk-JP4TEWP7.mjs";
|
|
17
|
+
import {
|
|
18
|
+
text_button_default
|
|
19
|
+
} from "../../chunk-TVTIX7MO.mjs";
|
|
20
20
|
import "../../chunk-RRONV7YA.mjs";
|
|
21
21
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
22
22
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
FileUpload,
|
|
4
4
|
fileUploadStyle,
|
|
5
5
|
fileUpload_default
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-RSGTFDZ5.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
8
|
import "../../chunk-5M7UDEMG.mjs";
|
|
9
9
|
import "../../chunk-MY5U63QO.mjs";
|
|
10
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
11
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
12
10
|
import "../../chunk-EKWUOA5B.mjs";
|
|
13
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
12
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
14
13
|
import "../../chunk-6WSACUIB.mjs";
|
|
15
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
16
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
15
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
17
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
18
17
|
import "../../chunk-JP4TEWP7.mjs";
|
|
18
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
19
19
|
import "../../chunk-RRONV7YA.mjs";
|
|
20
20
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
21
21
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import "../../chunk-RLXOHILK.mjs";
|
|
3
3
|
import {
|
|
4
4
|
fileUpload_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-RSGTFDZ5.mjs";
|
|
6
6
|
import "../../chunk-2GCSFWHD.mjs";
|
|
7
7
|
import "../../chunk-5M7UDEMG.mjs";
|
|
8
8
|
import "../../chunk-MY5U63QO.mjs";
|
|
9
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
10
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
11
9
|
import "../../chunk-EKWUOA5B.mjs";
|
|
12
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
11
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
13
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
15
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
16
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
16
|
import "../../chunk-JP4TEWP7.mjs";
|
|
17
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
18
18
|
import "../../chunk-RRONV7YA.mjs";
|
|
19
19
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
20
20
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import "../../chunk-DJOG6Z35.mjs";
|
|
3
3
|
import {
|
|
4
4
|
modal_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-MY5U63QO.mjs";
|
|
7
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
8
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
5
|
+
} from "../../chunk-SPIJ6ECD.mjs";
|
|
9
6
|
import "../../chunk-SE5TU755.mjs";
|
|
10
7
|
import "../../chunk-FZJ5PLRU.mjs";
|
|
8
|
+
import "../../chunk-MY5U63QO.mjs";
|
|
11
9
|
import "../../chunk-EKWUOA5B.mjs";
|
|
12
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
11
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
13
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
15
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
16
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
16
|
import "../../chunk-JP4TEWP7.mjs";
|
|
17
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
18
18
|
import "../../chunk-RRONV7YA.mjs";
|
|
19
19
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
20
20
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
modal_default
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-MY5U63QO.mjs";
|
|
6
|
-
import "../../chunk-PDY7UYKZ.mjs";
|
|
7
|
-
import "../../chunk-TVTIX7MO.mjs";
|
|
4
|
+
} from "../../chunk-SPIJ6ECD.mjs";
|
|
8
5
|
import "../../chunk-SE5TU755.mjs";
|
|
9
6
|
import "../../chunk-FZJ5PLRU.mjs";
|
|
7
|
+
import "../../chunk-MY5U63QO.mjs";
|
|
10
8
|
import "../../chunk-EKWUOA5B.mjs";
|
|
11
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-Q7J5FAMH.mjs";
|
|
10
|
+
import "../../chunk-PQRAYOTJ.mjs";
|
|
12
11
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
14
12
|
import "../../chunk-6PNKRBUT.mjs";
|
|
13
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
15
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
16
15
|
import "../../chunk-JP4TEWP7.mjs";
|
|
16
|
+
import "../../chunk-TVTIX7MO.mjs";
|
|
17
17
|
import "../../chunk-RRONV7YA.mjs";
|
|
18
18
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
19
19
|
import "../../chunk-27Y6K5NK.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-6WSACUIB.mjs";
|
|
3
|
-
import {
|
|
4
|
-
ripple_default
|
|
5
|
-
} from "../../chunk-LXHUO6VM.mjs";
|
|
6
3
|
import {
|
|
7
4
|
useRipple
|
|
8
5
|
} from "../../chunk-6PNKRBUT.mjs";
|
|
6
|
+
import {
|
|
7
|
+
ripple_default
|
|
8
|
+
} from "../../chunk-LXHUO6VM.mjs";
|
|
9
9
|
import "../../chunk-AC6TWLRT.mjs";
|
|
10
10
|
export {
|
|
11
11
|
ripple_default as Ripple,
|
|
@@ -691,23 +691,30 @@ var TableHead = ({
|
|
|
691
691
|
e.preventDefault();
|
|
692
692
|
onCheckAll(!isCheckedAll);
|
|
693
693
|
};
|
|
694
|
-
const renderTh = (content, key, column) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
694
|
+
const renderTh = (content, key, column, isCheckbox) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
695
695
|
"th",
|
|
696
696
|
{
|
|
697
|
-
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column),
|
|
697
|
+
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column == null ? void 0 : column.className),
|
|
698
698
|
style: {
|
|
699
|
-
width: (column == null ? void 0 : column.width) ? `${column.width}px` :
|
|
700
|
-
minWidth: (column == null ? void 0 : column.minWidth) ? `${column.minWidth}px` : void 0,
|
|
701
|
-
maxWidth: (column == null ? void 0 : column.maxWidth) ? `${column.maxWidth}px` : void 0,
|
|
702
|
-
height: (column == null ? void 0 : column.height) ? `${column.height}px` : void 0
|
|
699
|
+
width: isCheckbox ? "40px" : (column == null ? void 0 : column.width) ? `${column.width}px` : "auto",
|
|
700
|
+
minWidth: isCheckbox ? "40px" : (column == null ? void 0 : column.minWidth) ? `${column.minWidth}px` : void 0,
|
|
701
|
+
maxWidth: isCheckbox ? "40px" : (column == null ? void 0 : column.maxWidth) ? `${column.maxWidth}px` : void 0,
|
|
702
|
+
height: (column == null ? void 0 : column.height) ? `${column.height}px` : void 0,
|
|
703
|
+
...isCheckbox || (column == null ? void 0 : column.width) ? {
|
|
704
|
+
flexShrink: 0,
|
|
705
|
+
flexGrow: 0,
|
|
706
|
+
boxSizing: "border-box"
|
|
707
|
+
} : {}
|
|
703
708
|
},
|
|
704
709
|
children: content
|
|
705
710
|
},
|
|
706
711
|
key
|
|
707
712
|
);
|
|
708
713
|
const renderSkeletonRow = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "[&>th]:border-0"), children: [
|
|
709
|
-
columns.map(
|
|
710
|
-
|
|
714
|
+
columns.map(
|
|
715
|
+
(column, idx) => renderTh(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), `skeleton-${idx}`, column)
|
|
716
|
+
),
|
|
717
|
+
rowCheckbox && renderTh(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), "checkbox-skeleton", void 0, true)
|
|
711
718
|
] }) });
|
|
712
719
|
const renderContentRow = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
713
720
|
columns.map((column, idx) => renderTh(column.headerName, `${column.field}-${idx}`, column)),
|
|
@@ -720,7 +727,9 @@ var TableHead = ({
|
|
|
720
727
|
onChange: (e) => onCheckAll(e.target.checked)
|
|
721
728
|
}
|
|
722
729
|
) }),
|
|
723
|
-
"checkbox"
|
|
730
|
+
"checkbox",
|
|
731
|
+
void 0,
|
|
732
|
+
true
|
|
724
733
|
)
|
|
725
734
|
] }) });
|
|
726
735
|
return isLoading ? renderSkeletonRow() : renderContentRow();
|
|
@@ -745,16 +754,56 @@ var TableBody = ({
|
|
|
745
754
|
className
|
|
746
755
|
}) => {
|
|
747
756
|
const getCellStyle = (column) => ({
|
|
748
|
-
width: column.width ? `${column.width}px` :
|
|
757
|
+
width: column.width ? `${column.width}px` : "auto",
|
|
749
758
|
minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
|
|
750
759
|
maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
|
|
751
760
|
height: column.height ? `${column.height}px` : void 0,
|
|
752
|
-
textAlign: column.align || "center"
|
|
761
|
+
textAlign: column.align || "center",
|
|
762
|
+
...column.width && {
|
|
763
|
+
flexShrink: 0,
|
|
764
|
+
flexGrow: 0,
|
|
765
|
+
boxSizing: "border-box",
|
|
766
|
+
overflow: "hidden",
|
|
767
|
+
textOverflow: "ellipsis",
|
|
768
|
+
whiteSpace: "nowrap"
|
|
769
|
+
}
|
|
753
770
|
});
|
|
754
|
-
const renderTdSkeleton = (key
|
|
755
|
-
|
|
771
|
+
const renderTdSkeleton = (key, column) => {
|
|
772
|
+
const isCheckbox = key.includes("checkbox");
|
|
773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
774
|
+
"td",
|
|
775
|
+
{
|
|
776
|
+
className: slots.td({ class: classNames == null ? void 0 : classNames.td }),
|
|
777
|
+
style: isCheckbox ? {
|
|
778
|
+
width: "40px",
|
|
779
|
+
minWidth: "40px",
|
|
780
|
+
maxWidth: "40px",
|
|
781
|
+
flexShrink: 0,
|
|
782
|
+
flexGrow: 0,
|
|
783
|
+
boxSizing: "border-box"
|
|
784
|
+
} : column ? getCellStyle(column) : void 0,
|
|
785
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" })
|
|
786
|
+
},
|
|
787
|
+
key
|
|
788
|
+
);
|
|
789
|
+
};
|
|
790
|
+
const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
791
|
+
"td",
|
|
792
|
+
{
|
|
793
|
+
className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"),
|
|
794
|
+
style: {
|
|
795
|
+
width: "40px",
|
|
796
|
+
minWidth: "40px",
|
|
797
|
+
maxWidth: "40px",
|
|
798
|
+
flexShrink: 0,
|
|
799
|
+
flexGrow: 0,
|
|
800
|
+
boxSizing: "border-box"
|
|
801
|
+
},
|
|
802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) })
|
|
803
|
+
}
|
|
804
|
+
);
|
|
756
805
|
const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
757
|
-
columns.map((
|
|
806
|
+
columns.map((column, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`, column)),
|
|
758
807
|
rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
|
|
759
808
|
] }, `skeleton-${rowIndex}`);
|
|
760
809
|
const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
|
|
@@ -6165,43 +6214,53 @@ var Table = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
6165
6214
|
const getCheckedRowData = (checked) => rows.filter((row) => checked.has(row.id));
|
|
6166
6215
|
const slots = (0, import_react5.useMemo)(() => tableStyle(variantProps), [variantProps]);
|
|
6167
6216
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
6168
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
{
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6217
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
6218
|
+
"table",
|
|
6219
|
+
{
|
|
6220
|
+
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
6221
|
+
style: {
|
|
6222
|
+
tableLayout: "fixed",
|
|
6223
|
+
width: "100%"
|
|
6224
|
+
},
|
|
6225
|
+
children: [
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6227
|
+
table_head_default,
|
|
6228
|
+
{
|
|
6229
|
+
columns,
|
|
6230
|
+
size,
|
|
6231
|
+
color,
|
|
6232
|
+
rowCheckbox,
|
|
6233
|
+
isCheckedAll: checkedRows.size === rows.length && rows.length > 0,
|
|
6234
|
+
onCheckAll: handleAllRowCheck,
|
|
6235
|
+
isLoading,
|
|
6236
|
+
classNames,
|
|
6237
|
+
slots
|
|
6238
|
+
}
|
|
6239
|
+
),
|
|
6240
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6241
|
+
table_body_default,
|
|
6242
|
+
{
|
|
6243
|
+
slots,
|
|
6244
|
+
rows,
|
|
6245
|
+
columns,
|
|
6246
|
+
size,
|
|
6247
|
+
color,
|
|
6248
|
+
rowCheckbox,
|
|
6249
|
+
checkedRows,
|
|
6250
|
+
onCheckRow: handleRowCheck,
|
|
6251
|
+
emptyContent,
|
|
6252
|
+
isLoading,
|
|
6253
|
+
skeletonRow,
|
|
6254
|
+
className: clsx(
|
|
6255
|
+
"transition-all duration-150 ease-out",
|
|
6256
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100",
|
|
6257
|
+
classNames
|
|
6258
|
+
)
|
|
6259
|
+
}
|
|
6201
6260
|
)
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6261
|
+
]
|
|
6262
|
+
}
|
|
6263
|
+
) }),
|
|
6205
6264
|
showPagination && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
6206
6265
|
pagination_default,
|
|
6207
6266
|
{
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
} from "../../chunk-KCAGZUYM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
table_default
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
8
|
+
} from "../../chunk-AX3D6VFT.mjs";
|
|
9
|
+
import "../../chunk-SIVCIIB6.mjs";
|
|
10
|
+
import "../../chunk-D5N7OBSO.mjs";
|
|
11
|
+
import "../../chunk-DQRAFUDA.mjs";
|
|
12
|
+
import "../../chunk-M37VBNB3.mjs";
|
|
11
13
|
import "../../chunk-MZ76AA76.mjs";
|
|
12
14
|
import "../../chunk-6PN3DGOE.mjs";
|
|
13
15
|
import "../../chunk-7B7LRG5J.mjs";
|
|
14
16
|
import "../../chunk-CC2F5HQX.mjs";
|
|
15
17
|
import "../../chunk-F3HENRVM.mjs";
|
|
16
|
-
import "../../chunk-DQRAFUDA.mjs";
|
|
17
|
-
import "../../chunk-M37VBNB3.mjs";
|
|
18
18
|
import "../../chunk-2GCSFWHD.mjs";
|
|
19
19
|
import "../../chunk-5M7UDEMG.mjs";
|
|
20
20
|
import "../../chunk-QZ3LVYJW.mjs";
|