@deepnoid/ui 0.1.29 → 0.1.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.
- package/.turbo/turbo-build.log +183 -173
- package/dist/chunk-62X5AX5B.mjs +297 -0
- package/dist/chunk-6PN3DGOE.mjs +77 -0
- package/dist/{chunk-EHRFXDSN.mjs → chunk-AIIMJZ7L.mjs} +72 -42
- package/dist/{chunk-3KVZDFMV.mjs → chunk-BCMVEGJG.mjs} +3 -3
- package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
- package/dist/{chunk-KXA73VTJ.mjs → chunk-CVQM3T2X.mjs} +4 -4
- package/dist/{chunk-RCJOJPRS.mjs → chunk-EBRCE7XY.mjs} +40 -30
- package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
- package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
- package/dist/{chunk-KLUC2BV6.mjs → chunk-IEJRE6LT.mjs} +10 -7
- package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
- package/dist/chunk-LWRK5TPZ.mjs +80 -0
- package/dist/chunk-MZ76AA76.mjs +1 -0
- package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
- package/dist/chunk-P7YYNA6L.mjs +67 -0
- 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.js +62 -39
- package/dist/components/fileUpload/fileUpload.mjs +6 -6
- package/dist/components/fileUpload/index.js +62 -39
- package/dist/components/fileUpload/index.mjs +6 -6
- package/dist/components/input/index.js +62 -39
- package/dist/components/input/index.mjs +2 -2
- package/dist/components/input/input.d.mts +21 -14
- package/dist/components/input/input.d.ts +21 -14
- package/dist/components/input/input.js +62 -39
- 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.js +62 -39
- package/dist/components/pagination/index.mjs +3 -3
- package/dist/components/pagination/pagination.js +62 -39
- 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.js +7 -4
- package/dist/components/select/index.mjs +2 -2
- package/dist/components/select/select.d.mts +9 -0
- package/dist/components/select/select.d.ts +9 -0
- package/dist/components/select/select.js +7 -4
- 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 +748 -646
- 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 -63
- 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 +3 -1
- package/dist/components/table/table.d.ts +3 -1
- package/dist/components/table/table.js +739 -637
- 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/textarea/index.js +255 -138
- package/dist/components/textarea/index.mjs +2 -1
- package/dist/components/textarea/textarea.d.mts +157 -150
- package/dist/components/textarea/textarea.d.ts +157 -150
- package/dist/components/textarea/textarea.js +255 -138
- package/dist/components/textarea/textarea.mjs +2 -1
- 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 +799 -593
- 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-BKE6QF6W.mjs +0 -209
- 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-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
|
@@ -6,7 +6,7 @@ import { SlotsToClasses } from '../../utils/types.mjs';
|
|
|
6
6
|
|
|
7
7
|
type TreeNode = {
|
|
8
8
|
id: number;
|
|
9
|
-
|
|
9
|
+
content: ReactNode | string;
|
|
10
10
|
isLeaf?: boolean;
|
|
11
11
|
children?: TreeNode[];
|
|
12
12
|
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
@@ -15,8 +15,10 @@ type TreeNode = {
|
|
|
15
15
|
interface TreeProps {
|
|
16
16
|
headerContent?: ReactNode;
|
|
17
17
|
group: {
|
|
18
|
-
|
|
18
|
+
content: ReactNode | string;
|
|
19
19
|
data: TreeNode[];
|
|
20
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
21
|
+
onRightClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
20
22
|
};
|
|
21
23
|
groupIcon?: ReactNode;
|
|
22
24
|
fileIcon?: ReactNode;
|
|
@@ -34,44 +36,44 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
|
|
|
34
36
|
[key: string]: {
|
|
35
37
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
36
38
|
base?: tailwind_merge.ClassNameValue;
|
|
37
|
-
group?: tailwind_merge.ClassNameValue;
|
|
38
39
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
39
40
|
node?: tailwind_merge.ClassNameValue;
|
|
41
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
40
42
|
};
|
|
41
43
|
};
|
|
42
44
|
} | {
|
|
43
45
|
[x: string]: {
|
|
44
46
|
[x: string]: tailwind_merge.ClassNameValue | {
|
|
45
47
|
base?: tailwind_merge.ClassNameValue;
|
|
46
|
-
group?: tailwind_merge.ClassNameValue;
|
|
47
48
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
48
49
|
node?: tailwind_merge.ClassNameValue;
|
|
50
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
} | {}, {
|
|
52
54
|
base: string[];
|
|
53
55
|
wrapper: string[];
|
|
54
|
-
group: string[];
|
|
55
56
|
node: string[];
|
|
57
|
+
clickable: string[];
|
|
56
58
|
}, undefined, {
|
|
57
59
|
[key: string]: {
|
|
58
60
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
59
61
|
base?: tailwind_merge.ClassNameValue;
|
|
60
|
-
group?: tailwind_merge.ClassNameValue;
|
|
61
62
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
62
63
|
node?: tailwind_merge.ClassNameValue;
|
|
64
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
63
65
|
};
|
|
64
66
|
};
|
|
65
67
|
} | {}, {
|
|
66
68
|
base: string[];
|
|
67
69
|
wrapper: string[];
|
|
68
|
-
group: string[];
|
|
69
70
|
node: string[];
|
|
71
|
+
clickable: string[];
|
|
70
72
|
}, tailwind_variants.TVReturnType<unknown, {
|
|
71
73
|
base: string[];
|
|
72
74
|
wrapper: string[];
|
|
73
|
-
group: string[];
|
|
74
75
|
node: string[];
|
|
76
|
+
clickable: string[];
|
|
75
77
|
}, undefined, unknown, unknown, undefined>>;
|
|
76
78
|
type TreeSlots = keyof ReturnType<typeof treeStyle>;
|
|
77
79
|
|
|
@@ -6,7 +6,7 @@ import { SlotsToClasses } from '../../utils/types.js';
|
|
|
6
6
|
|
|
7
7
|
type TreeNode = {
|
|
8
8
|
id: number;
|
|
9
|
-
|
|
9
|
+
content: ReactNode | string;
|
|
10
10
|
isLeaf?: boolean;
|
|
11
11
|
children?: TreeNode[];
|
|
12
12
|
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
@@ -15,8 +15,10 @@ type TreeNode = {
|
|
|
15
15
|
interface TreeProps {
|
|
16
16
|
headerContent?: ReactNode;
|
|
17
17
|
group: {
|
|
18
|
-
|
|
18
|
+
content: ReactNode | string;
|
|
19
19
|
data: TreeNode[];
|
|
20
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
21
|
+
onRightClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
20
22
|
};
|
|
21
23
|
groupIcon?: ReactNode;
|
|
22
24
|
fileIcon?: ReactNode;
|
|
@@ -34,44 +36,44 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
|
|
|
34
36
|
[key: string]: {
|
|
35
37
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
36
38
|
base?: tailwind_merge.ClassNameValue;
|
|
37
|
-
group?: tailwind_merge.ClassNameValue;
|
|
38
39
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
39
40
|
node?: tailwind_merge.ClassNameValue;
|
|
41
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
40
42
|
};
|
|
41
43
|
};
|
|
42
44
|
} | {
|
|
43
45
|
[x: string]: {
|
|
44
46
|
[x: string]: tailwind_merge.ClassNameValue | {
|
|
45
47
|
base?: tailwind_merge.ClassNameValue;
|
|
46
|
-
group?: tailwind_merge.ClassNameValue;
|
|
47
48
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
48
49
|
node?: tailwind_merge.ClassNameValue;
|
|
50
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
} | {}, {
|
|
52
54
|
base: string[];
|
|
53
55
|
wrapper: string[];
|
|
54
|
-
group: string[];
|
|
55
56
|
node: string[];
|
|
57
|
+
clickable: string[];
|
|
56
58
|
}, undefined, {
|
|
57
59
|
[key: string]: {
|
|
58
60
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
59
61
|
base?: tailwind_merge.ClassNameValue;
|
|
60
|
-
group?: tailwind_merge.ClassNameValue;
|
|
61
62
|
wrapper?: tailwind_merge.ClassNameValue;
|
|
62
63
|
node?: tailwind_merge.ClassNameValue;
|
|
64
|
+
clickable?: tailwind_merge.ClassNameValue;
|
|
63
65
|
};
|
|
64
66
|
};
|
|
65
67
|
} | {}, {
|
|
66
68
|
base: string[];
|
|
67
69
|
wrapper: string[];
|
|
68
|
-
group: string[];
|
|
69
70
|
node: string[];
|
|
71
|
+
clickable: string[];
|
|
70
72
|
}, tailwind_variants.TVReturnType<unknown, {
|
|
71
73
|
base: string[];
|
|
72
74
|
wrapper: string[];
|
|
73
|
-
group: string[];
|
|
74
75
|
node: string[];
|
|
76
|
+
clickable: string[];
|
|
75
77
|
}, undefined, unknown, unknown, undefined>>;
|
|
76
78
|
type TreeSlots = keyof ReturnType<typeof treeStyle>;
|
|
77
79
|
|
|
@@ -4397,7 +4397,11 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4397
4397
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4398
4398
|
"div",
|
|
4399
4399
|
{
|
|
4400
|
-
className: clsx(
|
|
4400
|
+
className: clsx(
|
|
4401
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4402
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4403
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4404
|
+
),
|
|
4401
4405
|
onClick: handleClick,
|
|
4402
4406
|
onContextMenu: handleRightClick,
|
|
4403
4407
|
children: [
|
|
@@ -4412,7 +4416,7 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4412
4416
|
}
|
|
4413
4417
|
),
|
|
4414
4418
|
fileIcon,
|
|
4415
|
-
node.
|
|
4419
|
+
node.content
|
|
4416
4420
|
]
|
|
4417
4421
|
}
|
|
4418
4422
|
),
|
|
@@ -4448,13 +4452,33 @@ var Tree = ({
|
|
|
4448
4452
|
onExpand
|
|
4449
4453
|
}) => {
|
|
4450
4454
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4455
|
+
const handleClick = (e) => {
|
|
4456
|
+
var _a;
|
|
4457
|
+
(_a = group.onClick) == null ? void 0 : _a.call(group, e);
|
|
4458
|
+
};
|
|
4459
|
+
const handleRightClick = (e) => {
|
|
4460
|
+
var _a;
|
|
4461
|
+
e.preventDefault();
|
|
4462
|
+
(_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
|
|
4463
|
+
};
|
|
4451
4464
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
4452
4465
|
headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
|
|
4453
4466
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
4454
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4468
|
+
"div",
|
|
4469
|
+
{
|
|
4470
|
+
className: clsx(
|
|
4471
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4472
|
+
group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
|
|
4473
|
+
),
|
|
4474
|
+
onClick: handleClick,
|
|
4475
|
+
onContextMenu: handleRightClick,
|
|
4476
|
+
children: [
|
|
4477
|
+
groupIcon,
|
|
4478
|
+
group.content
|
|
4479
|
+
]
|
|
4480
|
+
}
|
|
4481
|
+
),
|
|
4458
4482
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4459
4483
|
TreeNodeItem,
|
|
4460
4484
|
{
|
|
@@ -4477,7 +4501,6 @@ var treeStyle = tv({
|
|
|
4477
4501
|
slots: {
|
|
4478
4502
|
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
4479
4503
|
wrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
4480
|
-
group: ["flex", "items-center", "gap-[5px]", "text-md", "font-bold", "text-body-foreground", "p-[5px]"],
|
|
4481
4504
|
node: [
|
|
4482
4505
|
"flex",
|
|
4483
4506
|
"items-center",
|
|
@@ -4485,11 +4508,10 @@ var treeStyle = tv({
|
|
|
4485
4508
|
"text-md",
|
|
4486
4509
|
"font-bold",
|
|
4487
4510
|
"text-body-foreground",
|
|
4488
|
-
"hover:bg-neutral-soft",
|
|
4489
|
-
"p-[5px]",
|
|
4490
4511
|
"rounded-[5px]",
|
|
4491
|
-
"
|
|
4492
|
-
]
|
|
4512
|
+
"p-[5px]"
|
|
4513
|
+
],
|
|
4514
|
+
clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
|
|
4493
4515
|
}
|
|
4494
4516
|
});
|
|
4495
4517
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Tree,
|
|
4
4
|
tree_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-NFQMXW4Z.mjs";
|
|
6
6
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
7
7
|
import "../../chunk-2TKEWFGH.mjs";
|
|
8
8
|
import "../../chunk-2SDYFOZL.mjs";
|
|
9
|
-
import "../../chunk-27Y6K5NK.mjs";
|
|
10
9
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
10
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
11
11
|
import "../../chunk-AC6TWLRT.mjs";
|
|
12
12
|
export {
|
|
13
13
|
Tree,
|
package/dist/index.d.mts
CHANGED
|
@@ -27,6 +27,7 @@ export { default as DateTimePicker } from './components/dateTimePicker/dateTimeP
|
|
|
27
27
|
export { default as ScrollArea } from './components/scroll/scrollArea.mjs';
|
|
28
28
|
export { default as Tree, TreeNode } from './components/tree/tree.mjs';
|
|
29
29
|
export { default as FileUpload } from './components/fileUpload/fileUpload.mjs';
|
|
30
|
+
export { default as Skeleton } from './components/skeleton/skeleton.mjs';
|
|
30
31
|
export { tv } from './utils/tailwind-variants.mjs';
|
|
31
32
|
export { deepnoidUi } from '@deepnoid/tailwind-config';
|
|
32
33
|
export { VariantProps } from 'tailwind-variants';
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { default as DateTimePicker } from './components/dateTimePicker/dateTimeP
|
|
|
27
27
|
export { default as ScrollArea } from './components/scroll/scrollArea.js';
|
|
28
28
|
export { default as Tree, TreeNode } from './components/tree/tree.js';
|
|
29
29
|
export { default as FileUpload } from './components/fileUpload/fileUpload.js';
|
|
30
|
+
export { default as Skeleton } from './components/skeleton/skeleton.js';
|
|
30
31
|
export { tv } from './utils/tailwind-variants.js';
|
|
31
32
|
export { deepnoidUi } from '@deepnoid/tailwind-config';
|
|
32
33
|
export { VariantProps } from 'tailwind-variants';
|