@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.
Files changed (102) hide show
  1. package/.turbo/turbo-build.log +179 -169
  2. package/dist/chunk-6PN3DGOE.mjs +77 -0
  3. package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
  4. package/dist/chunk-CEZQCD6Z.mjs +79 -0
  5. package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
  6. package/dist/{chunk-RCJOJPRS.mjs → chunk-GLMM253Q.mjs} +40 -30
  7. package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
  8. package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
  9. package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
  10. package/dist/chunk-MZ76AA76.mjs +1 -0
  11. package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
  12. package/dist/{chunk-3KVZDFMV.mjs → chunk-NKH3OF6I.mjs} +3 -3
  13. package/dist/chunk-P7YYNA6L.mjs +67 -0
  14. package/dist/{chunk-KXA73VTJ.mjs → chunk-QM4ZSQYX.mjs} +4 -4
  15. package/dist/components/backdrop/backdrop.mjs +2 -2
  16. package/dist/components/backdrop/index.mjs +2 -2
  17. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  18. package/dist/components/breadcrumb/index.mjs +5 -5
  19. package/dist/components/button/button.mjs +2 -2
  20. package/dist/components/button/icon-button.mjs +2 -2
  21. package/dist/components/button/index.mjs +4 -4
  22. package/dist/components/button/text-button.mjs +2 -2
  23. package/dist/components/checkbox/checkbox.mjs +2 -2
  24. package/dist/components/checkbox/index.mjs +2 -2
  25. package/dist/components/chip/chip.mjs +2 -2
  26. package/dist/components/chip/index.mjs +2 -2
  27. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  28. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  29. package/dist/components/dateTimePicker/index.mjs +6 -6
  30. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  31. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  32. package/dist/components/fileUpload/index.mjs +6 -6
  33. package/dist/components/input/index.mjs +2 -2
  34. package/dist/components/input/input.mjs +2 -2
  35. package/dist/components/list/index.mjs +3 -3
  36. package/dist/components/list/list.mjs +2 -2
  37. package/dist/components/list/listItem.mjs +2 -2
  38. package/dist/components/modal/index.mjs +6 -6
  39. package/dist/components/modal/modal.mjs +6 -6
  40. package/dist/components/pagination/index.mjs +3 -3
  41. package/dist/components/pagination/pagination.mjs +3 -3
  42. package/dist/components/radio/index.mjs +2 -2
  43. package/dist/components/radio/radio.mjs +2 -2
  44. package/dist/components/select/index.mjs +2 -2
  45. package/dist/components/select/select.mjs +2 -2
  46. package/dist/components/skeleton/index.d.mts +2 -0
  47. package/dist/components/skeleton/index.d.ts +2 -0
  48. package/dist/components/skeleton/index.js +141 -0
  49. package/dist/components/skeleton/index.mjs +10 -0
  50. package/dist/components/skeleton/skeleton.d.mts +14 -0
  51. package/dist/components/skeleton/skeleton.d.ts +14 -0
  52. package/dist/components/skeleton/skeleton.js +135 -0
  53. package/dist/components/skeleton/skeleton.mjs +9 -0
  54. package/dist/components/table/index.js +692 -614
  55. package/dist/components/table/index.mjs +11 -9
  56. package/dist/components/table/table-body.d.mts +6 -4
  57. package/dist/components/table/table-body.d.ts +6 -4
  58. package/dist/components/table/table-body.js +115 -64
  59. package/dist/components/table/table-body.mjs +5 -3
  60. package/dist/components/table/table-head.d.mts +3 -1
  61. package/dist/components/table/table-head.d.ts +3 -1
  62. package/dist/components/table/table-head.js +107 -21
  63. package/dist/components/table/table-head.mjs +5 -3
  64. package/dist/components/table/table.d.mts +1 -0
  65. package/dist/components/table/table.d.ts +1 -0
  66. package/dist/components/table/table.js +683 -605
  67. package/dist/components/table/table.mjs +9 -7
  68. package/dist/components/tabs/index.mjs +2 -2
  69. package/dist/components/tabs/tabs.mjs +2 -2
  70. package/dist/components/toast/index.mjs +3 -3
  71. package/dist/components/toast/toast.mjs +2 -2
  72. package/dist/components/toast/use-toast.mjs +3 -3
  73. package/dist/components/tooltip/index.mjs +2 -2
  74. package/dist/components/tooltip/tooltip.mjs +2 -2
  75. package/dist/components/tree/index.js +33 -11
  76. package/dist/components/tree/index.mjs +2 -2
  77. package/dist/components/tree/tree.d.mts +10 -8
  78. package/dist/components/tree/tree.d.ts +10 -8
  79. package/dist/components/tree/tree.js +33 -11
  80. package/dist/components/tree/tree.mjs +2 -2
  81. package/dist/index.d.mts +1 -0
  82. package/dist/index.d.ts +1 -0
  83. package/dist/index.js +515 -413
  84. package/dist/index.mjs +52 -47
  85. package/package.json +1 -1
  86. package/dist/chunk-26MNALVL.mjs +0 -47
  87. package/dist/chunk-A5KQHWS3.mjs +0 -94
  88. package/dist/{chunk-KLUC2BV6.mjs → chunk-272FMLIL.mjs} +3 -3
  89. package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
  90. package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
  91. package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
  92. package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
  93. package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
  94. package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
  95. package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
  96. package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
  97. package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
  98. package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
  99. package/dist/{chunk-EHRFXDSN.mjs → chunk-VCVQMPC7.mjs} +3 -3
  100. package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
  101. package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
  102. package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
@@ -1,24 +1,26 @@
1
1
  "use client";
2
2
  import {
3
3
  table_default
4
- } from "../../chunk-RCJOJPRS.mjs";
4
+ } from "../../chunk-GLMM253Q.mjs";
5
+ import "../../chunk-CEZQCD6Z.mjs";
6
+ import "../../chunk-P7YYNA6L.mjs";
5
7
  import "../../chunk-DQRAFUDA.mjs";
6
8
  import "../../chunk-M37VBNB3.mjs";
7
- import "../../chunk-A5KQHWS3.mjs";
8
- import "../../chunk-26MNALVL.mjs";
9
+ import "../../chunk-MZ76AA76.mjs";
10
+ import "../../chunk-6PN3DGOE.mjs";
9
11
  import "../../chunk-7B7LRG5J.mjs";
10
- import "../../chunk-KXA73VTJ.mjs";
12
+ import "../../chunk-QM4ZSQYX.mjs";
11
13
  import "../../chunk-F3HENRVM.mjs";
12
14
  import "../../chunk-2GCSFWHD.mjs";
13
- import "../../chunk-EHRFXDSN.mjs";
15
+ import "../../chunk-VCVQMPC7.mjs";
14
16
  import "../../chunk-QZ3LVYJW.mjs";
15
- import "../../chunk-YLRYHUTW.mjs";
17
+ import "../../chunk-D6QI3DJG.mjs";
16
18
  import "../../chunk-ZYIIXWVY.mjs";
17
19
  import "../../chunk-2TKEWFGH.mjs";
18
20
  import "../../chunk-2SDYFOZL.mjs";
21
+ import "../../chunk-4ZJFD3L3.mjs";
19
22
  import "../../chunk-27Y6K5NK.mjs";
20
23
  import "../../chunk-E3G5QXSH.mjs";
21
- import "../../chunk-4ZJFD3L3.mjs";
22
24
  import "../../chunk-AC6TWLRT.mjs";
23
25
  export {
24
26
  table_default as default
@@ -2,9 +2,9 @@
2
2
  import "../../chunk-3MY6LO7N.mjs";
3
3
  import {
4
4
  tabs_default
5
- } from "../../chunk-SSMMWMQC.mjs";
6
- import "../../chunk-E3G5QXSH.mjs";
5
+ } from "../../chunk-2YMAKIZ6.mjs";
7
6
  import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-E3G5QXSH.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
9
9
  export {
10
10
  tabs_default as Tabs
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  tabs,
4
4
  tabs_default
5
- } from "../../chunk-SSMMWMQC.mjs";
6
- import "../../chunk-E3G5QXSH.mjs";
5
+ } from "../../chunk-2YMAKIZ6.mjs";
7
6
  import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-E3G5QXSH.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
9
9
  export {
10
10
  tabs_default as default,
@@ -3,17 +3,17 @@ import "../../chunk-LUWGOKLG.mjs";
3
3
  import {
4
4
  ToastProvider,
5
5
  useToast
6
- } from "../../chunk-BB7MFKNQ.mjs";
6
+ } from "../../chunk-IBI3OVQI.mjs";
7
7
  import "../../chunk-ZOTHPHXA.mjs";
8
8
  import {
9
9
  toast_default
10
- } from "../../chunk-7W2ZI2DD.mjs";
10
+ } from "../../chunk-MEY4IL7D.mjs";
11
11
  import "../../chunk-ZYIIXWVY.mjs";
12
12
  import "../../chunk-2TKEWFGH.mjs";
13
13
  import "../../chunk-2SDYFOZL.mjs";
14
+ import "../../chunk-4ZJFD3L3.mjs";
14
15
  import "../../chunk-27Y6K5NK.mjs";
15
16
  import "../../chunk-E3G5QXSH.mjs";
16
- import "../../chunk-4ZJFD3L3.mjs";
17
17
  import "../../chunk-AC6TWLRT.mjs";
18
18
  export {
19
19
  toast_default as Toast,
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  toast_default
4
- } from "../../chunk-7W2ZI2DD.mjs";
4
+ } from "../../chunk-MEY4IL7D.mjs";
5
5
  import "../../chunk-ZYIIXWVY.mjs";
6
6
  import "../../chunk-2TKEWFGH.mjs";
7
7
  import "../../chunk-2SDYFOZL.mjs";
8
+ import "../../chunk-4ZJFD3L3.mjs";
8
9
  import "../../chunk-27Y6K5NK.mjs";
9
10
  import "../../chunk-E3G5QXSH.mjs";
10
- import "../../chunk-4ZJFD3L3.mjs";
11
11
  import "../../chunk-AC6TWLRT.mjs";
12
12
  export {
13
13
  toast_default as default
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  ToastProvider,
4
4
  useToast
5
- } from "../../chunk-BB7MFKNQ.mjs";
5
+ } from "../../chunk-IBI3OVQI.mjs";
6
6
  import "../../chunk-ZOTHPHXA.mjs";
7
- import "../../chunk-7W2ZI2DD.mjs";
7
+ import "../../chunk-MEY4IL7D.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
9
  import "../../chunk-2TKEWFGH.mjs";
10
10
  import "../../chunk-2SDYFOZL.mjs";
11
+ import "../../chunk-4ZJFD3L3.mjs";
11
12
  import "../../chunk-27Y6K5NK.mjs";
12
13
  import "../../chunk-E3G5QXSH.mjs";
13
- import "../../chunk-4ZJFD3L3.mjs";
14
14
  import "../../chunk-AC6TWLRT.mjs";
15
15
  export {
16
16
  ToastProvider,
@@ -2,11 +2,11 @@
2
2
  import "../../chunk-HIE2YRGA.mjs";
3
3
  import {
4
4
  tooltip_default
5
- } from "../../chunk-IL5ENWCR.mjs";
5
+ } from "../../chunk-Z2537DF6.mjs";
6
6
  import "../../chunk-ZMOAFSYE.mjs";
7
7
  import "../../chunk-WSIADHVC.mjs";
8
- import "../../chunk-E3G5QXSH.mjs";
9
8
  import "../../chunk-4ZJFD3L3.mjs";
9
+ import "../../chunk-E3G5QXSH.mjs";
10
10
  import "../../chunk-AC6TWLRT.mjs";
11
11
  export {
12
12
  tooltip_default as Tooltip
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  tooltip_default
4
- } from "../../chunk-IL5ENWCR.mjs";
4
+ } from "../../chunk-Z2537DF6.mjs";
5
5
  import "../../chunk-ZMOAFSYE.mjs";
6
6
  import "../../chunk-WSIADHVC.mjs";
7
- import "../../chunk-E3G5QXSH.mjs";
8
7
  import "../../chunk-4ZJFD3L3.mjs";
8
+ import "../../chunk-E3G5QXSH.mjs";
9
9
  import "../../chunk-AC6TWLRT.mjs";
10
10
  export {
11
11
  tooltip_default as default
@@ -4398,7 +4398,11 @@ var TreeNodeItem = (0, import_react.forwardRef)(
4398
4398
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4399
4399
  "div",
4400
4400
  {
4401
- className: clsx(slots.node({ class: classNames == null ? void 0 : classNames.node }), selectedId == node.id ? "bg-neutral-soft" : ""),
4401
+ className: clsx(
4402
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
4403
+ slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
4404
+ selectedId == node.id ? "bg-neutral-soft" : ""
4405
+ ),
4402
4406
  onClick: handleClick,
4403
4407
  onContextMenu: handleRightClick,
4404
4408
  children: [
@@ -4413,7 +4417,7 @@ var TreeNodeItem = (0, import_react.forwardRef)(
4413
4417
  }
4414
4418
  ),
4415
4419
  fileIcon,
4416
- node.label
4420
+ node.content
4417
4421
  ]
4418
4422
  }
4419
4423
  ),
@@ -4449,13 +4453,33 @@ var Tree = ({
4449
4453
  onExpand
4450
4454
  }) => {
4451
4455
  const slots = (0, import_react.useMemo)(() => treeStyle(), []);
4456
+ const handleClick = (e) => {
4457
+ var _a;
4458
+ (_a = group.onClick) == null ? void 0 : _a.call(group, e);
4459
+ };
4460
+ const handleRightClick = (e) => {
4461
+ var _a;
4462
+ e.preventDefault();
4463
+ (_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
4464
+ };
4452
4465
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
4453
4466
  headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
4454
4467
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
4455
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.group({ class: classNames == null ? void 0 : classNames.group }), children: [
4456
- groupIcon,
4457
- group.label
4458
- ] }),
4468
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4469
+ "div",
4470
+ {
4471
+ className: clsx(
4472
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
4473
+ group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
4474
+ ),
4475
+ onClick: handleClick,
4476
+ onContextMenu: handleRightClick,
4477
+ children: [
4478
+ groupIcon,
4479
+ group.content
4480
+ ]
4481
+ }
4482
+ ),
4459
4483
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4460
4484
  TreeNodeItem,
4461
4485
  {
@@ -4478,7 +4502,6 @@ var treeStyle = tv({
4478
4502
  slots: {
4479
4503
  base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
4480
4504
  wrapper: ["flex", "flex-col", "gap-[5px]"],
4481
- group: ["flex", "items-center", "gap-[5px]", "text-md", "font-bold", "text-body-foreground", "p-[5px]"],
4482
4505
  node: [
4483
4506
  "flex",
4484
4507
  "items-center",
@@ -4486,11 +4509,10 @@ var treeStyle = tv({
4486
4509
  "text-md",
4487
4510
  "font-bold",
4488
4511
  "text-body-foreground",
4489
- "hover:bg-neutral-soft",
4490
- "p-[5px]",
4491
4512
  "rounded-[5px]",
4492
- "cursor-pointer"
4493
- ]
4513
+ "p-[5px]"
4514
+ ],
4515
+ clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
4494
4516
  }
4495
4517
  });
4496
4518
  // Annotate the CommonJS export names for ESM import in node:
@@ -2,12 +2,12 @@
2
2
  import "../../chunk-MBLZYQCN.mjs";
3
3
  import {
4
4
  tree_default
5
- } from "../../chunk-X4F7JYBA.mjs";
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_default as Tree
@@ -6,7 +6,7 @@ import { SlotsToClasses } from '../../utils/types.mjs';
6
6
 
7
7
  type TreeNode = {
8
8
  id: number;
9
- label: string;
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
- label: string;
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
- label: string;
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
- label: string;
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(slots.node({ class: classNames == null ? void 0 : classNames.node }), selectedId == node.id ? "bg-neutral-soft" : ""),
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.label
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)("div", { className: slots.group({ class: classNames == null ? void 0 : classNames.group }), children: [
4455
- groupIcon,
4456
- group.label
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
- "cursor-pointer"
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-X4F7JYBA.mjs";
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';