@deepnoid/ui 0.1.29 → 0.1.30
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 +179 -169
- package/dist/chunk-6PN3DGOE.mjs +77 -0
- package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
- package/dist/chunk-CEZQCD6Z.mjs +79 -0
- package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
- package/dist/{chunk-RCJOJPRS.mjs → chunk-GLMM253Q.mjs} +40 -30
- package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
- package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
- package/dist/chunk-MZ76AA76.mjs +1 -0
- package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
- package/dist/{chunk-3KVZDFMV.mjs → chunk-NKH3OF6I.mjs} +3 -3
- package/dist/chunk-P7YYNA6L.mjs +67 -0
- package/dist/{chunk-KXA73VTJ.mjs → chunk-QM4ZSQYX.mjs} +4 -4
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.mjs +2 -2
- 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 +4 -4
- package/dist/components/button/text-button.mjs +2 -2
- package/dist/components/checkbox/checkbox.mjs +2 -2
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/chip/chip.mjs +2 -2
- package/dist/components/chip/index.mjs +2 -2
- package/dist/components/dateTimePicker/calendar.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
- package/dist/components/dateTimePicker/index.mjs +6 -6
- package/dist/components/dateTimePicker/timePicker.mjs +4 -4
- package/dist/components/fileUpload/fileUpload.mjs +6 -6
- package/dist/components/fileUpload/index.mjs +6 -6
- package/dist/components/input/index.mjs +2 -2
- package/dist/components/input/input.mjs +2 -2
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.mjs +2 -2
- package/dist/components/modal/index.mjs +6 -6
- package/dist/components/modal/modal.mjs +6 -6
- package/dist/components/pagination/index.mjs +3 -3
- package/dist/components/pagination/pagination.mjs +3 -3
- package/dist/components/radio/index.mjs +2 -2
- package/dist/components/radio/radio.mjs +2 -2
- package/dist/components/select/index.mjs +2 -2
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/skeleton/index.d.mts +2 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +141 -0
- package/dist/components/skeleton/index.mjs +10 -0
- package/dist/components/skeleton/skeleton.d.mts +14 -0
- package/dist/components/skeleton/skeleton.d.ts +14 -0
- package/dist/components/skeleton/skeleton.js +135 -0
- package/dist/components/skeleton/skeleton.mjs +9 -0
- package/dist/components/table/index.js +692 -614
- package/dist/components/table/index.mjs +11 -9
- package/dist/components/table/table-body.d.mts +6 -4
- package/dist/components/table/table-body.d.ts +6 -4
- package/dist/components/table/table-body.js +115 -64
- package/dist/components/table/table-body.mjs +5 -3
- package/dist/components/table/table-head.d.mts +3 -1
- package/dist/components/table/table-head.d.ts +3 -1
- package/dist/components/table/table-head.js +107 -21
- package/dist/components/table/table-head.mjs +5 -3
- package/dist/components/table/table.d.mts +1 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/table.js +683 -605
- package/dist/components/table/table.mjs +9 -7
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/toast/index.mjs +3 -3
- package/dist/components/toast/toast.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +3 -3
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/components/tree/index.js +33 -11
- package/dist/components/tree/index.mjs +2 -2
- package/dist/components/tree/tree.d.mts +10 -8
- package/dist/components/tree/tree.d.ts +10 -8
- package/dist/components/tree/tree.js +33 -11
- package/dist/components/tree/tree.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +515 -413
- package/dist/index.mjs +52 -47
- package/package.json +1 -1
- package/dist/chunk-26MNALVL.mjs +0 -47
- package/dist/chunk-A5KQHWS3.mjs +0 -94
- package/dist/{chunk-KLUC2BV6.mjs → chunk-272FMLIL.mjs} +3 -3
- package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
- package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
- package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
- package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
- package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
- package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
- package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
- package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
- package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
- package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
- package/dist/{chunk-EHRFXDSN.mjs → chunk-VCVQMPC7.mjs} +3 -3
- package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
- package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
- package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
clsx
|
|
4
|
+
} from "./chunk-27Y6K5NK.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/skeleton/skeleton.tsx
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
|
|
10
|
+
const speedMap = {
|
|
11
|
+
fast: "0.7s",
|
|
12
|
+
normal: "1.2s",
|
|
13
|
+
slow: "2s"
|
|
14
|
+
};
|
|
15
|
+
const slots = skeletonStyle();
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: clsx(slots.base({ color, rounded }), className),
|
|
20
|
+
style: {
|
|
21
|
+
"--shimmer-duration": speedMap[speed]
|
|
22
|
+
},
|
|
23
|
+
children: /* @__PURE__ */ jsx("style", { children: `@keyframes shimmer {
|
|
24
|
+
100% {
|
|
25
|
+
transform: translateX(100%);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.skeleton-shimmer::before {
|
|
29
|
+
animation: shimmer var(--shimmer-duration) infinite linear;
|
|
30
|
+
}
|
|
31
|
+
` })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
Skeleton.displayName = "Skeleton";
|
|
36
|
+
var skeleton_default = Skeleton;
|
|
37
|
+
var skeletonStyle = tv({
|
|
38
|
+
slots: {
|
|
39
|
+
base: [
|
|
40
|
+
"relative",
|
|
41
|
+
"overflow-hidden",
|
|
42
|
+
"w-full",
|
|
43
|
+
"h-[18px]",
|
|
44
|
+
"skeleton-shimmer",
|
|
45
|
+
"before:absolute",
|
|
46
|
+
"before:inset-0",
|
|
47
|
+
"before:-translate-x-full",
|
|
48
|
+
"before:bg-gradient-to-r",
|
|
49
|
+
"before:from-transparent",
|
|
50
|
+
"before:via-white/40",
|
|
51
|
+
"before:to-transparent",
|
|
52
|
+
"before:content-['']"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
variants: {
|
|
56
|
+
color: {
|
|
57
|
+
primary: { base: "bg-primary-soft" },
|
|
58
|
+
secondary: { base: "bg-secondary-soft" },
|
|
59
|
+
neutral: { base: "bg-neutral-soft" }
|
|
60
|
+
},
|
|
61
|
+
rounded: {
|
|
62
|
+
sm: { base: "rounded-sm" },
|
|
63
|
+
md: { base: "rounded-md" },
|
|
64
|
+
lg: { base: "rounded-lg" },
|
|
65
|
+
xl: { base: "rounded-xl" },
|
|
66
|
+
full: { base: "rounded-full" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
color: "primary",
|
|
71
|
+
rounded: "md"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
skeleton_default
|
|
77
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
listItem_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RT3S3VVJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
list_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HIVPDIEP.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/dateTimePicker/timePicker.tsx
|
|
10
10
|
import { useState, useRef, useEffect } from "react";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
skeleton_default
|
|
4
|
+
} from "./chunk-6PN3DGOE.mjs";
|
|
5
|
+
import {
|
|
6
|
+
checkbox_default
|
|
7
|
+
} from "./chunk-D6QI3DJG.mjs";
|
|
8
|
+
import {
|
|
9
|
+
clsx
|
|
10
|
+
} from "./chunk-27Y6K5NK.mjs";
|
|
11
|
+
|
|
12
|
+
// src/components/table/table-body.tsx
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var TableBody = ({
|
|
15
|
+
slots,
|
|
16
|
+
rows,
|
|
17
|
+
columns,
|
|
18
|
+
size,
|
|
19
|
+
color,
|
|
20
|
+
rowCheckbox = false,
|
|
21
|
+
checkedRows,
|
|
22
|
+
onCheckRow,
|
|
23
|
+
onRowClick,
|
|
24
|
+
isLoading = false,
|
|
25
|
+
emptyContent,
|
|
26
|
+
skeletonRow,
|
|
27
|
+
classNames,
|
|
28
|
+
className
|
|
29
|
+
}) => {
|
|
30
|
+
const getCellStyle = (col) => ({
|
|
31
|
+
width: col.width ? `${col.width}px` : void 0,
|
|
32
|
+
minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
|
|
33
|
+
maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
|
|
34
|
+
height: col.height ? `${col.height}px` : void 0
|
|
35
|
+
});
|
|
36
|
+
const renderTdSkeleton = (key) => /* @__PURE__ */ jsx("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ jsx(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
|
|
37
|
+
const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ jsx("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ jsx(
|
|
38
|
+
checkbox_default,
|
|
39
|
+
{
|
|
40
|
+
size,
|
|
41
|
+
checked: checkedRows.has(rowIndex),
|
|
42
|
+
onChange: (e) => onCheckRow(rowIndex, e.target.checked)
|
|
43
|
+
}
|
|
44
|
+
) });
|
|
45
|
+
const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
46
|
+
columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
|
|
47
|
+
rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
|
|
48
|
+
] }, `skeleton-${rowIndex}`);
|
|
49
|
+
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 }) });
|
|
50
|
+
const renderDataRow = (row, rowIndex) => /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
|
|
51
|
+
columns.map((col, colIdx) => {
|
|
52
|
+
var _a;
|
|
53
|
+
const value = row[col.field];
|
|
54
|
+
const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
|
|
55
|
+
const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
"td",
|
|
58
|
+
{
|
|
59
|
+
className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
|
|
60
|
+
style: getCellStyle(col),
|
|
61
|
+
children: content
|
|
62
|
+
},
|
|
63
|
+
`${rowIndex}-${colIdx}`
|
|
64
|
+
);
|
|
65
|
+
}),
|
|
66
|
+
rowCheckbox && renderCheckboxCell(rowIndex)
|
|
67
|
+
] }, rowIndex);
|
|
68
|
+
const renderRows = () => {
|
|
69
|
+
if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ jsx(Fragment, {});
|
|
70
|
+
if (!rows.length && emptyContent) return renderEmptyRow();
|
|
71
|
+
return rows.map((row, index) => renderDataRow(row, index));
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ jsx("tbody", { className: `${slots.tbody({ class: classNames == null ? void 0 : classNames.tbody })} ${className || ""}`, children: renderRows() });
|
|
74
|
+
};
|
|
75
|
+
var table_body_default = TableBody;
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
table_body_default
|
|
79
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
scrollArea_default
|
|
4
|
-
} from "./chunk-M37VBNB3.mjs";
|
|
5
2
|
import {
|
|
6
3
|
table_body_default
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CEZQCD6Z.mjs";
|
|
8
5
|
import {
|
|
9
6
|
table_head_default
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-P7YYNA6L.mjs";
|
|
8
|
+
import {
|
|
9
|
+
scrollArea_default
|
|
10
|
+
} from "./chunk-M37VBNB3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
pagination_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QM4ZSQYX.mjs";
|
|
14
14
|
import {
|
|
15
15
|
clsx
|
|
16
16
|
} from "./chunk-27Y6K5NK.mjs";
|
|
@@ -32,39 +32,45 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
var Table = forwardRef((originalProps, ref) => {
|
|
33
33
|
const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
|
|
34
34
|
const {
|
|
35
|
-
classNames,
|
|
36
35
|
rows,
|
|
37
36
|
columns,
|
|
38
|
-
|
|
39
|
-
rowCheckbox,
|
|
37
|
+
rowCheckbox = false,
|
|
40
38
|
onRowClick,
|
|
41
39
|
totalData,
|
|
42
40
|
pagination,
|
|
43
41
|
onPageChange,
|
|
44
42
|
emptyContent,
|
|
45
|
-
isLoading,
|
|
46
|
-
|
|
47
|
-
color
|
|
43
|
+
isLoading = false,
|
|
44
|
+
classNames,
|
|
45
|
+
color,
|
|
46
|
+
size,
|
|
47
|
+
skeletonRow
|
|
48
48
|
} = { ...props, ...variantProps };
|
|
49
|
+
const { page = 1, perPage = 10 } = pagination || {};
|
|
50
|
+
const showPagination = pagination && typeof totalData === "number" && !isLoading;
|
|
49
51
|
const [checkedRows, setCheckedRows] = useState(/* @__PURE__ */ new Set());
|
|
50
52
|
const divRef = useRef(null);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
useImperativeHandle(
|
|
54
|
+
ref,
|
|
55
|
+
() => ({
|
|
56
|
+
checkedRows,
|
|
57
|
+
setCheckedRows
|
|
58
|
+
}),
|
|
59
|
+
[checkedRows]
|
|
60
|
+
);
|
|
57
61
|
useEffect(() => {
|
|
58
62
|
setCheckedRows(/* @__PURE__ */ new Set());
|
|
59
63
|
}, [rows]);
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
setCheckedRows(
|
|
64
|
+
const handleAllRowCheck = (checked) => {
|
|
65
|
+
const updated = checked ? new Set(rows.map((_, i) => i)) : /* @__PURE__ */ new Set();
|
|
66
|
+
setCheckedRows(updated);
|
|
63
67
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
const handleRowCheck = (index, checked) => {
|
|
69
|
+
setCheckedRows((prev) => {
|
|
70
|
+
const updated = new Set(prev);
|
|
71
|
+
checked ? updated.add(index) : updated.delete(index);
|
|
72
|
+
return updated;
|
|
73
|
+
});
|
|
68
74
|
};
|
|
69
75
|
const slots = useMemo(() => tableStyle(variantProps), [variantProps]);
|
|
70
76
|
return /* @__PURE__ */ jsxs("div", { ref: divRef, "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
@@ -74,9 +80,11 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
74
80
|
{
|
|
75
81
|
columns,
|
|
76
82
|
size,
|
|
83
|
+
color,
|
|
77
84
|
rowCheckbox,
|
|
78
85
|
isCheckedAll: checkedRows.size === rows.length && rows.length > 0,
|
|
79
|
-
onCheckAll:
|
|
86
|
+
onCheckAll: handleAllRowCheck,
|
|
87
|
+
isLoading,
|
|
80
88
|
classNames,
|
|
81
89
|
slots
|
|
82
90
|
}
|
|
@@ -88,16 +96,18 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
88
96
|
rows,
|
|
89
97
|
columns,
|
|
90
98
|
size,
|
|
99
|
+
color,
|
|
91
100
|
rowCheckbox,
|
|
92
101
|
checkedRows,
|
|
93
102
|
onRowClick,
|
|
94
|
-
onCheckRow:
|
|
103
|
+
onCheckRow: handleRowCheck,
|
|
95
104
|
emptyContent,
|
|
96
105
|
isLoading,
|
|
97
|
-
|
|
106
|
+
skeletonRow,
|
|
98
107
|
className: clsx(
|
|
99
108
|
"transition-all duration-150 ease-out",
|
|
100
|
-
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
109
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100",
|
|
110
|
+
classNames
|
|
101
111
|
)
|
|
102
112
|
}
|
|
103
113
|
)
|
|
@@ -109,7 +119,7 @@ var Table = forwardRef((originalProps, ref) => {
|
|
|
109
119
|
currentPage: page,
|
|
110
120
|
totalPage: Math.ceil(totalData / perPage),
|
|
111
121
|
groupSize: 10,
|
|
112
|
-
handleChangePage: (
|
|
122
|
+
handleChangePage: (newPage) => onPageChange == null ? void 0 : onPageChange({ page: newPage, perPage })
|
|
113
123
|
}
|
|
114
124
|
) })
|
|
115
125
|
] });
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZOTHPHXA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toast_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MEY4IL7D.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/toast/use-toast.tsx
|
|
10
10
|
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
backdrop_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LL6F3WDX.mjs";
|
|
5
5
|
import {
|
|
6
6
|
button_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UB4YBFOT.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
10
|
} from "./chunk-2TKEWFGH.mjs";
|
|
11
|
-
import {
|
|
12
|
-
mapPropsVariants
|
|
13
|
-
} from "./chunk-E3G5QXSH.mjs";
|
|
14
11
|
import {
|
|
15
12
|
tv
|
|
16
13
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
14
|
+
import {
|
|
15
|
+
mapPropsVariants
|
|
16
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
17
17
|
|
|
18
18
|
// src/components/modal/modal.tsx
|
|
19
19
|
import { forwardRef, useMemo, useEffect } from "react";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
calendar_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-A7RU3FU5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
timePicker_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BFOK4HVC.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useDatePicker
|
|
10
10
|
} from "./chunk-FWJ2ZKH6.mjs";
|
|
11
11
|
import {
|
|
12
12
|
Icon_default
|
|
13
13
|
} from "./chunk-2TKEWFGH.mjs";
|
|
14
|
-
import {
|
|
15
|
-
mapPropsVariants
|
|
16
|
-
} from "./chunk-E3G5QXSH.mjs";
|
|
17
14
|
import {
|
|
18
15
|
tv
|
|
19
16
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
17
|
+
import {
|
|
18
|
+
mapPropsVariants
|
|
19
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
20
20
|
|
|
21
21
|
// src/components/dateTimePicker/dateTimePicker.tsx
|
|
22
22
|
import React, { forwardRef, useCallback, useMemo } from "react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Icon_default
|
|
4
4
|
} from "./chunk-2TKEWFGH.mjs";
|
|
5
|
-
import {
|
|
6
|
-
clsx
|
|
7
|
-
} from "./chunk-27Y6K5NK.mjs";
|
|
8
5
|
import {
|
|
9
6
|
tv
|
|
10
7
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
8
|
+
import {
|
|
9
|
+
clsx
|
|
10
|
+
} from "./chunk-27Y6K5NK.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/tree/tree.tsx
|
|
13
13
|
import { forwardRef, useMemo, useState, useCallback } from "react";
|
|
@@ -61,7 +61,11 @@ var TreeNodeItem = forwardRef(
|
|
|
61
61
|
/* @__PURE__ */ jsxs(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
className: clsx(
|
|
64
|
+
className: clsx(
|
|
65
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
66
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
67
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
68
|
+
),
|
|
65
69
|
onClick: handleClick,
|
|
66
70
|
onContextMenu: handleRightClick,
|
|
67
71
|
children: [
|
|
@@ -76,7 +80,7 @@ var TreeNodeItem = forwardRef(
|
|
|
76
80
|
}
|
|
77
81
|
),
|
|
78
82
|
fileIcon,
|
|
79
|
-
node.
|
|
83
|
+
node.content
|
|
80
84
|
]
|
|
81
85
|
}
|
|
82
86
|
),
|
|
@@ -112,13 +116,33 @@ var Tree = ({
|
|
|
112
116
|
onExpand
|
|
113
117
|
}) => {
|
|
114
118
|
const slots = useMemo(() => treeStyle(), []);
|
|
119
|
+
const handleClick = (e) => {
|
|
120
|
+
var _a;
|
|
121
|
+
(_a = group.onClick) == null ? void 0 : _a.call(group, e);
|
|
122
|
+
};
|
|
123
|
+
const handleRightClick = (e) => {
|
|
124
|
+
var _a;
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
(_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
|
|
127
|
+
};
|
|
115
128
|
return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
116
129
|
headerContent && /* @__PURE__ */ jsx("div", { children: headerContent }),
|
|
117
130
|
/* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
118
|
-
/* @__PURE__ */ jsxs(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
131
|
+
/* @__PURE__ */ jsxs(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: clsx(
|
|
135
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
136
|
+
group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
|
|
137
|
+
),
|
|
138
|
+
onClick: handleClick,
|
|
139
|
+
onContextMenu: handleRightClick,
|
|
140
|
+
children: [
|
|
141
|
+
groupIcon,
|
|
142
|
+
group.content
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
),
|
|
122
146
|
/* @__PURE__ */ jsx("div", { children: group.data.map((node) => /* @__PURE__ */ jsx(
|
|
123
147
|
TreeNodeItem,
|
|
124
148
|
{
|
|
@@ -141,7 +165,6 @@ var treeStyle = tv({
|
|
|
141
165
|
slots: {
|
|
142
166
|
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
143
167
|
wrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
144
|
-
group: ["flex", "items-center", "gap-[5px]", "text-md", "font-bold", "text-body-foreground", "p-[5px]"],
|
|
145
168
|
node: [
|
|
146
169
|
"flex",
|
|
147
170
|
"items-center",
|
|
@@ -149,11 +172,10 @@ var treeStyle = tv({
|
|
|
149
172
|
"text-md",
|
|
150
173
|
"font-bold",
|
|
151
174
|
"text-body-foreground",
|
|
152
|
-
"hover:bg-neutral-soft",
|
|
153
|
-
"p-[5px]",
|
|
154
175
|
"rounded-[5px]",
|
|
155
|
-
"
|
|
156
|
-
]
|
|
176
|
+
"p-[5px]"
|
|
177
|
+
],
|
|
178
|
+
clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
|
|
157
179
|
}
|
|
158
180
|
});
|
|
159
181
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
input_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VCVQMPC7.mjs";
|
|
5
5
|
import {
|
|
6
6
|
button_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UB4YBFOT.mjs";
|
|
8
8
|
import {
|
|
9
9
|
icon_button_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7TAGGLNY.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/fileUpload/fileUpload.tsx
|
|
13
13
|
import { useRef, useState, useEffect } from "react";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
skeleton_default
|
|
4
|
+
} from "./chunk-6PN3DGOE.mjs";
|
|
5
|
+
import {
|
|
6
|
+
checkbox_default
|
|
7
|
+
} from "./chunk-D6QI3DJG.mjs";
|
|
8
|
+
import {
|
|
9
|
+
clsx
|
|
10
|
+
} from "./chunk-27Y6K5NK.mjs";
|
|
11
|
+
|
|
12
|
+
// src/components/table/table-head.tsx
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var TableHead = ({
|
|
15
|
+
slots,
|
|
16
|
+
columns,
|
|
17
|
+
color,
|
|
18
|
+
size,
|
|
19
|
+
rowCheckbox = false,
|
|
20
|
+
isCheckedAll,
|
|
21
|
+
isLoading = false,
|
|
22
|
+
classNames,
|
|
23
|
+
onCheckAll
|
|
24
|
+
}) => {
|
|
25
|
+
const handleClickCheckAll = (e) => {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
onCheckAll(!isCheckedAll);
|
|
28
|
+
};
|
|
29
|
+
const renderTh = (content, key, column) => /* @__PURE__ */ jsx(
|
|
30
|
+
"th",
|
|
31
|
+
{
|
|
32
|
+
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column),
|
|
33
|
+
style: {
|
|
34
|
+
width: (column == null ? void 0 : column.width) ? `${column.width}px` : void 0,
|
|
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
|
|
38
|
+
},
|
|
39
|
+
children: content
|
|
40
|
+
},
|
|
41
|
+
key
|
|
42
|
+
);
|
|
43
|
+
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((_, idx) => renderTh(/* @__PURE__ */ jsx(skeleton_default, { color, rounded: "lg", speed: "fast" }), `skeleton-${idx}`)),
|
|
45
|
+
rowCheckbox && renderTh(/* @__PURE__ */ jsx(skeleton_default, { color, rounded: "lg", speed: "fast" }), "checkbox-skeleton")
|
|
46
|
+
] }) });
|
|
47
|
+
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
|
+
columns.map((column, idx) => renderTh(column.headerName, `${column.field}-${idx}`, column)),
|
|
49
|
+
rowCheckbox && renderTh(
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", onClick: handleClickCheckAll, children: /* @__PURE__ */ jsx(
|
|
51
|
+
checkbox_default,
|
|
52
|
+
{
|
|
53
|
+
size,
|
|
54
|
+
checked: isCheckedAll,
|
|
55
|
+
onChange: (e) => onCheckAll(e.target.checked)
|
|
56
|
+
}
|
|
57
|
+
) }),
|
|
58
|
+
"checkbox"
|
|
59
|
+
)
|
|
60
|
+
] }) });
|
|
61
|
+
return isLoading ? renderSkeletonRow() : renderContentRow();
|
|
62
|
+
};
|
|
63
|
+
var table_head_default = TableHead;
|
|
64
|
+
|
|
65
|
+
export {
|
|
66
|
+
table_head_default
|
|
67
|
+
};
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-F3HENRVM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
input_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VCVQMPC7.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
10
|
} from "./chunk-2TKEWFGH.mjs";
|
|
11
|
+
import {
|
|
12
|
+
tv
|
|
13
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
11
14
|
import {
|
|
12
15
|
clsx
|
|
13
16
|
} from "./chunk-27Y6K5NK.mjs";
|
|
14
17
|
import {
|
|
15
18
|
mapPropsVariants
|
|
16
19
|
} from "./chunk-E3G5QXSH.mjs";
|
|
17
|
-
import {
|
|
18
|
-
tv
|
|
19
|
-
} from "./chunk-4ZJFD3L3.mjs";
|
|
20
20
|
|
|
21
21
|
// src/components/pagination/pagination.tsx
|
|
22
22
|
import { forwardRef, useMemo, useState } from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
backdrop_default
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-27Y6K5NK.mjs";
|
|
4
|
+
} from "../../chunk-LL6F3WDX.mjs";
|
|
6
5
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
6
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
7
7
|
import "../../chunk-AC6TWLRT.mjs";
|
|
8
8
|
export {
|
|
9
9
|
backdrop_default as default
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import "../../chunk-SE5TU755.mjs";
|
|
3
3
|
import {
|
|
4
4
|
backdrop_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-27Y6K5NK.mjs";
|
|
5
|
+
} from "../../chunk-LL6F3WDX.mjs";
|
|
7
6
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
7
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
8
8
|
import "../../chunk-AC6TWLRT.mjs";
|
|
9
9
|
export {
|
|
10
10
|
backdrop_default as Backdrop
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
breadcrumb_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-G67WUZO3.mjs";
|
|
5
5
|
import "../../chunk-MY5U63QO.mjs";
|
|
6
6
|
import "../../chunk-LPZOH3RP.mjs";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-UB4YBFOT.mjs";
|
|
8
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
9
9
|
import "../../chunk-6WSACUIB.mjs";
|
|
10
10
|
import "../../chunk-LXHUO6VM.mjs";
|
|
11
11
|
import "../../chunk-6PNKRBUT.mjs";
|
|
12
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
13
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
14
|
import "../../chunk-2TKEWFGH.mjs";
|
|
15
15
|
import "../../chunk-2SDYFOZL.mjs";
|
|
16
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
16
17
|
import "../../chunk-27Y6K5NK.mjs";
|
|
17
18
|
import "../../chunk-E3G5QXSH.mjs";
|
|
18
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
19
19
|
import "../../chunk-AC6TWLRT.mjs";
|
|
20
20
|
export {
|
|
21
21
|
breadcrumb_default as default
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import "../../chunk-KYIODWXL.mjs";
|
|
3
3
|
import {
|
|
4
4
|
breadcrumb_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-G67WUZO3.mjs";
|
|
6
6
|
import "../../chunk-MY5U63QO.mjs";
|
|
7
7
|
import "../../chunk-LPZOH3RP.mjs";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-UB4YBFOT.mjs";
|
|
9
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
10
10
|
import "../../chunk-6WSACUIB.mjs";
|
|
11
11
|
import "../../chunk-LXHUO6VM.mjs";
|
|
12
12
|
import "../../chunk-6PNKRBUT.mjs";
|
|
13
|
-
import "../../chunk-
|
|
13
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
14
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
15
|
import "../../chunk-2TKEWFGH.mjs";
|
|
16
16
|
import "../../chunk-2SDYFOZL.mjs";
|
|
17
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
17
18
|
import "../../chunk-27Y6K5NK.mjs";
|
|
18
19
|
import "../../chunk-E3G5QXSH.mjs";
|
|
19
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
20
20
|
import "../../chunk-AC6TWLRT.mjs";
|
|
21
21
|
export {
|
|
22
22
|
breadcrumb_default as Breadcrumb
|