@deepnoid/ui 0.1.52 → 0.1.54

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 (85) hide show
  1. package/.turbo/turbo-build.log +157 -157
  2. package/dist/{chunk-WKJSGBXL.mjs → chunk-7XFHA2U5.mjs} +3 -3
  3. package/dist/{chunk-KJMJIFPS.mjs → chunk-BPEMHZH3.mjs} +1 -1
  4. package/dist/{chunk-O4IL6C6D.mjs → chunk-EFCGMDDE.mjs} +49 -70
  5. package/dist/{chunk-GHZUVGYG.mjs → chunk-LF4SL2LJ.mjs} +2 -2
  6. package/dist/{chunk-PW4A5MUX.mjs → chunk-NWV5ELFP.mjs} +5 -5
  7. package/dist/{chunk-DPCEHGJC.mjs → chunk-OTEWHVER.mjs} +4 -4
  8. package/dist/{chunk-SBL6IHEW.mjs → chunk-P7YYNA6L.mjs} +1 -1
  9. package/dist/{chunk-DCIZU2DY.mjs → chunk-RBQEUS4K.mjs} +3 -3
  10. package/dist/{chunk-QCDUDDK4.mjs → chunk-T43IV3GD.mjs} +5 -5
  11. package/dist/{chunk-3EROF2VZ.mjs → chunk-X3A2QD6L.mjs} +1 -1
  12. package/dist/{chunk-GTXDVT7F.mjs → chunk-YUMQWCQ3.mjs} +1 -1
  13. package/dist/components/backdrop/backdrop.mjs +2 -2
  14. package/dist/components/backdrop/index.mjs +2 -2
  15. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  16. package/dist/components/breadcrumb/index.mjs +5 -5
  17. package/dist/components/button/button.mjs +2 -2
  18. package/dist/components/button/icon-button.mjs +2 -2
  19. package/dist/components/button/index.mjs +4 -4
  20. package/dist/components/button/text-button.mjs +2 -2
  21. package/dist/components/charts/areaChart.mjs +2 -2
  22. package/dist/components/charts/barChart.mjs +2 -2
  23. package/dist/components/charts/circularProgress.mjs +2 -2
  24. package/dist/components/charts/index.mjs +4 -4
  25. package/dist/components/checkbox/checkbox.mjs +2 -2
  26. package/dist/components/checkbox/index.mjs +2 -2
  27. package/dist/components/chip/chip.mjs +2 -2
  28. package/dist/components/chip/index.mjs +2 -2
  29. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  30. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  31. package/dist/components/dateTimePicker/index.mjs +6 -6
  32. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  33. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  34. package/dist/components/fileUpload/index.mjs +6 -6
  35. package/dist/components/input/index.mjs +2 -2
  36. package/dist/components/input/input.mjs +2 -2
  37. package/dist/components/list/index.mjs +3 -3
  38. package/dist/components/list/list.mjs +2 -2
  39. package/dist/components/list/listItem.mjs +2 -2
  40. package/dist/components/modal/index.mjs +6 -6
  41. package/dist/components/modal/modal.mjs +6 -6
  42. package/dist/components/pagination/index.mjs +3 -3
  43. package/dist/components/pagination/pagination.mjs +3 -3
  44. package/dist/components/radio/index.mjs +2 -2
  45. package/dist/components/radio/radio.mjs +2 -2
  46. package/dist/components/select/index.mjs +2 -2
  47. package/dist/components/select/select.mjs +2 -2
  48. package/dist/components/table/index.mjs +7 -7
  49. package/dist/components/table/table-body.mjs +3 -3
  50. package/dist/components/table/table-head.mjs +3 -3
  51. package/dist/components/table/table.mjs +7 -7
  52. package/dist/components/tabs/index.mjs +2 -2
  53. package/dist/components/tabs/tabs.mjs +2 -2
  54. package/dist/components/toast/index.mjs +3 -3
  55. package/dist/components/toast/toast.mjs +2 -2
  56. package/dist/components/toast/use-toast.mjs +3 -3
  57. package/dist/components/tooltip/index.mjs +2 -2
  58. package/dist/components/tooltip/tooltip.mjs +2 -2
  59. package/dist/components/tree/index.js +46 -67
  60. package/dist/components/tree/index.mjs +2 -2
  61. package/dist/components/tree/tree.d.mts +7 -2
  62. package/dist/components/tree/tree.d.ts +7 -2
  63. package/dist/components/tree/tree.js +46 -67
  64. package/dist/components/tree/tree.mjs +2 -2
  65. package/dist/index.js +46 -67
  66. package/dist/index.mjs +37 -37
  67. package/package.json +1 -1
  68. package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
  69. package/dist/{chunk-HDIEELUV.mjs → chunk-5SNPCI6I.mjs} +3 -3
  70. package/dist/{chunk-QEPJICMO.mjs → chunk-76B5LZBM.mjs} +3 -3
  71. package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
  72. package/dist/{chunk-IMVNZ5OM.mjs → chunk-FDBWNO2X.mjs} +3 -3
  73. package/dist/{chunk-LCJSQR42.mjs → chunk-FKKDEWW3.mjs} +3 -3
  74. package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
  75. package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
  76. package/dist/{chunk-XOB33IZY.mjs → chunk-MXLJ3B4K.mjs} +3 -3
  77. package/dist/{chunk-RV2E2SQ4.mjs → chunk-PVFDO2WN.mjs} +3 -3
  78. package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
  79. package/dist/{chunk-5UFV47RQ.mjs → chunk-RQ6ADHCR.mjs} +3 -3
  80. package/dist/{chunk-4SDLHEKS.mjs → chunk-U2NPH2O3.mjs} +3 -3
  81. package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
  82. package/dist/{chunk-FSGVH7KY.mjs → chunk-Y3FMWQ7R.mjs} +3 -3
  83. package/dist/{chunk-BW4QUMCG.mjs → chunk-YQ2ULGET.mjs} +3 -3
  84. package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
  85. package/dist/{chunk-VGFGIXS6.mjs → chunk-ZOENHWSZ.mjs} +3 -3
@@ -4373,7 +4373,7 @@ function toVal(mix) {
4373
4373
  // src/components/tree/tree.tsx
4374
4374
  var import_jsx_runtime3 = require("react/jsx-runtime");
4375
4375
  var TreeNodeItem = (0, import_react.forwardRef)(
4376
- ({ node, depth, fileIcon, selectedId, isLoading, classNames, onExpand }, ref) => {
4376
+ ({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
4377
4377
  const [isOpen, setIsOpen] = (0, import_react.useState)(false);
4378
4378
  const [children, setChildren] = (0, import_react.useState)(node.children);
4379
4379
  const [isLoadingChildren, setIsLoadingChildren] = (0, import_react.useState)(false);
@@ -4407,74 +4407,53 @@ var TreeNodeItem = (0, import_react.forwardRef)(
4407
4407
  e.preventDefault();
4408
4408
  (_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
4409
4409
  };
4410
- const marginClass = depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]";
4411
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4412
- "div",
4413
- {
4414
- ref,
4415
- className: clsx(
4416
- marginClass,
4417
- "transition-all duration-150 ease-out",
4418
- isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
4419
- ),
4420
- children: [
4421
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4422
- "div",
4423
- {
4424
- className: clsx(
4425
- slots.node({ class: classNames == null ? void 0 : classNames.node }),
4426
- slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
4427
- selectedId == node.id ? "bg-neutral-soft" : ""
4428
- ),
4429
- onClick: handleClick,
4430
- onContextMenu: handleRightClick,
4431
- children: [
4432
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4433
- Icon_default,
4434
- {
4435
- name: "right-chevron",
4436
- className: clsx(
4437
- "text-neutral-main cursor-pointer transition-transform duration-150",
4438
- isOpen ? "rotate-90" : "rotate-0"
4439
- )
4440
- }
4441
- ),
4442
- fileIcon,
4443
- node.content
4444
- ]
4445
- }
4410
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
4411
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4412
+ "div",
4413
+ {
4414
+ className: clsx(
4415
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
4416
+ slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
4417
+ selectedId == node.id ? "bg-neutral-soft" : ""
4446
4418
  ),
4447
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
4448
- isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
4449
- children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4450
- TreeNodeItem,
4419
+ onClick: handleClick,
4420
+ onContextMenu: handleRightClick,
4421
+ children: [
4422
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4423
+ Icon_default,
4451
4424
  {
4452
- node: child,
4453
- depth: depth + 1,
4454
- selectedId,
4455
- classNames,
4456
- fileIcon,
4457
- onExpand
4458
- },
4459
- child.id
4460
- ))
4461
- ] })
4462
- ]
4463
- }
4464
- );
4425
+ name: "right-chevron",
4426
+ className: clsx(
4427
+ "text-neutral-main cursor-pointer transition-transform duration-150",
4428
+ isOpen ? "rotate-90" : "rotate-0"
4429
+ )
4430
+ }
4431
+ ),
4432
+ fileIcon,
4433
+ node.content
4434
+ ]
4435
+ }
4436
+ ),
4437
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: [
4438
+ isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
4439
+ children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4440
+ TreeNodeItem,
4441
+ {
4442
+ node: child,
4443
+ depth: depth + 1,
4444
+ selectedId,
4445
+ classNames,
4446
+ fileIcon,
4447
+ onExpand
4448
+ },
4449
+ child.id
4450
+ ))
4451
+ ] })
4452
+ ] });
4465
4453
  }
4466
4454
  );
4467
4455
  TreeNodeItem.displayName = "TreeNodeItem";
4468
- var Tree = ({
4469
- headerContent,
4470
- group,
4471
- groupIcon,
4472
- fileIcon,
4473
- selectedId,
4474
- isLoading = false,
4475
- classNames,
4476
- onExpand
4477
- }) => {
4456
+ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
4478
4457
  const slots = (0, import_react.useMemo)(() => treeStyle(), []);
4479
4458
  const handleClick = (e) => {
4480
4459
  var _a;
@@ -4503,7 +4482,7 @@ var Tree = ({
4503
4482
  ]
4504
4483
  }
4505
4484
  ),
4506
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4485
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4507
4486
  TreeNodeItem,
4508
4487
  {
4509
4488
  node,
@@ -4511,7 +4490,6 @@ var Tree = ({
4511
4490
  classNames,
4512
4491
  fileIcon,
4513
4492
  selectedId,
4514
- isLoading,
4515
4493
  onExpand
4516
4494
  },
4517
4495
  node.id
@@ -4535,7 +4513,8 @@ var treeStyle = tv({
4535
4513
  "rounded-[5px]",
4536
4514
  "p-[5px]"
4537
4515
  ],
4538
- clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
4516
+ clickable: ["hover:bg-neutral-soft", "cursor-pointer"],
4517
+ gap: ["flex", "flex-col", "gap-[5px]"]
4539
4518
  }
4540
4519
  });
4541
4520
  // 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-O4IL6C6D.mjs";
5
+ } from "../../chunk-EFCGMDDE.mjs";
6
6
  import "../../chunk-ZYIIXWVY.mjs";
7
7
  import "../../chunk-LTNDSCRA.mjs";
8
8
  import "../../chunk-ZVGVLD3T.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
@@ -23,18 +23,18 @@ interface TreeProps {
23
23
  groupIcon?: ReactNode;
24
24
  fileIcon?: ReactNode;
25
25
  selectedId?: number | string;
26
- isLoading?: boolean;
27
26
  classNames?: SlotsToClasses<TreeSlots>;
28
27
  onExpand?: (node: TreeNode) => Promise<TreeNode[]>;
29
28
  }
30
29
  declare const Tree: {
31
- ({ headerContent, group, groupIcon, fileIcon, selectedId, isLoading, classNames, onExpand, }: TreeProps): react_jsx_runtime.JSX.Element;
30
+ ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }: TreeProps): react_jsx_runtime.JSX.Element;
32
31
  displayName: string;
33
32
  };
34
33
 
35
34
  declare const treeStyle: tailwind_variants.TVReturnType<{
36
35
  [key: string]: {
37
36
  [key: string]: tailwind_merge.ClassNameValue | {
37
+ gap?: tailwind_merge.ClassNameValue;
38
38
  base?: tailwind_merge.ClassNameValue;
39
39
  wrapper?: tailwind_merge.ClassNameValue;
40
40
  node?: tailwind_merge.ClassNameValue;
@@ -44,6 +44,7 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
44
44
  } | {
45
45
  [x: string]: {
46
46
  [x: string]: tailwind_merge.ClassNameValue | {
47
+ gap?: tailwind_merge.ClassNameValue;
47
48
  base?: tailwind_merge.ClassNameValue;
48
49
  wrapper?: tailwind_merge.ClassNameValue;
49
50
  node?: tailwind_merge.ClassNameValue;
@@ -55,9 +56,11 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
55
56
  wrapper: string[];
56
57
  node: string[];
57
58
  clickable: string[];
59
+ gap: string[];
58
60
  }, undefined, {
59
61
  [key: string]: {
60
62
  [key: string]: tailwind_merge.ClassNameValue | {
63
+ gap?: tailwind_merge.ClassNameValue;
61
64
  base?: tailwind_merge.ClassNameValue;
62
65
  wrapper?: tailwind_merge.ClassNameValue;
63
66
  node?: tailwind_merge.ClassNameValue;
@@ -69,11 +72,13 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
69
72
  wrapper: string[];
70
73
  node: string[];
71
74
  clickable: string[];
75
+ gap: string[];
72
76
  }, tailwind_variants.TVReturnType<unknown, {
73
77
  base: string[];
74
78
  wrapper: string[];
75
79
  node: string[];
76
80
  clickable: string[];
81
+ gap: string[];
77
82
  }, undefined, unknown, unknown, undefined>>;
78
83
  type TreeSlots = keyof ReturnType<typeof treeStyle>;
79
84
 
@@ -23,18 +23,18 @@ interface TreeProps {
23
23
  groupIcon?: ReactNode;
24
24
  fileIcon?: ReactNode;
25
25
  selectedId?: number | string;
26
- isLoading?: boolean;
27
26
  classNames?: SlotsToClasses<TreeSlots>;
28
27
  onExpand?: (node: TreeNode) => Promise<TreeNode[]>;
29
28
  }
30
29
  declare const Tree: {
31
- ({ headerContent, group, groupIcon, fileIcon, selectedId, isLoading, classNames, onExpand, }: TreeProps): react_jsx_runtime.JSX.Element;
30
+ ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }: TreeProps): react_jsx_runtime.JSX.Element;
32
31
  displayName: string;
33
32
  };
34
33
 
35
34
  declare const treeStyle: tailwind_variants.TVReturnType<{
36
35
  [key: string]: {
37
36
  [key: string]: tailwind_merge.ClassNameValue | {
37
+ gap?: tailwind_merge.ClassNameValue;
38
38
  base?: tailwind_merge.ClassNameValue;
39
39
  wrapper?: tailwind_merge.ClassNameValue;
40
40
  node?: tailwind_merge.ClassNameValue;
@@ -44,6 +44,7 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
44
44
  } | {
45
45
  [x: string]: {
46
46
  [x: string]: tailwind_merge.ClassNameValue | {
47
+ gap?: tailwind_merge.ClassNameValue;
47
48
  base?: tailwind_merge.ClassNameValue;
48
49
  wrapper?: tailwind_merge.ClassNameValue;
49
50
  node?: tailwind_merge.ClassNameValue;
@@ -55,9 +56,11 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
55
56
  wrapper: string[];
56
57
  node: string[];
57
58
  clickable: string[];
59
+ gap: string[];
58
60
  }, undefined, {
59
61
  [key: string]: {
60
62
  [key: string]: tailwind_merge.ClassNameValue | {
63
+ gap?: tailwind_merge.ClassNameValue;
61
64
  base?: tailwind_merge.ClassNameValue;
62
65
  wrapper?: tailwind_merge.ClassNameValue;
63
66
  node?: tailwind_merge.ClassNameValue;
@@ -69,11 +72,13 @@ declare const treeStyle: tailwind_variants.TVReturnType<{
69
72
  wrapper: string[];
70
73
  node: string[];
71
74
  clickable: string[];
75
+ gap: string[];
72
76
  }, tailwind_variants.TVReturnType<unknown, {
73
77
  base: string[];
74
78
  wrapper: string[];
75
79
  node: string[];
76
80
  clickable: string[];
81
+ gap: string[];
77
82
  }, undefined, unknown, unknown, undefined>>;
78
83
  type TreeSlots = keyof ReturnType<typeof treeStyle>;
79
84
 
@@ -4372,7 +4372,7 @@ function toVal(mix) {
4372
4372
  // src/components/tree/tree.tsx
4373
4373
  var import_jsx_runtime3 = require("react/jsx-runtime");
4374
4374
  var TreeNodeItem = (0, import_react.forwardRef)(
4375
- ({ node, depth, fileIcon, selectedId, isLoading, classNames, onExpand }, ref) => {
4375
+ ({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
4376
4376
  const [isOpen, setIsOpen] = (0, import_react.useState)(false);
4377
4377
  const [children, setChildren] = (0, import_react.useState)(node.children);
4378
4378
  const [isLoadingChildren, setIsLoadingChildren] = (0, import_react.useState)(false);
@@ -4406,74 +4406,53 @@ var TreeNodeItem = (0, import_react.forwardRef)(
4406
4406
  e.preventDefault();
4407
4407
  (_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
4408
4408
  };
4409
- const marginClass = depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]";
4410
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4411
- "div",
4412
- {
4413
- ref,
4414
- className: clsx(
4415
- marginClass,
4416
- "transition-all duration-150 ease-out",
4417
- isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
4418
- ),
4419
- children: [
4420
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4421
- "div",
4422
- {
4423
- className: clsx(
4424
- slots.node({ class: classNames == null ? void 0 : classNames.node }),
4425
- slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
4426
- selectedId == node.id ? "bg-neutral-soft" : ""
4427
- ),
4428
- onClick: handleClick,
4429
- onContextMenu: handleRightClick,
4430
- children: [
4431
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4432
- Icon_default,
4433
- {
4434
- name: "right-chevron",
4435
- className: clsx(
4436
- "text-neutral-main cursor-pointer transition-transform duration-150",
4437
- isOpen ? "rotate-90" : "rotate-0"
4438
- )
4439
- }
4440
- ),
4441
- fileIcon,
4442
- node.content
4443
- ]
4444
- }
4409
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
4410
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4411
+ "div",
4412
+ {
4413
+ className: clsx(
4414
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
4415
+ slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
4416
+ selectedId == node.id ? "bg-neutral-soft" : ""
4445
4417
  ),
4446
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
4447
- isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
4448
- children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4449
- TreeNodeItem,
4418
+ onClick: handleClick,
4419
+ onContextMenu: handleRightClick,
4420
+ children: [
4421
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4422
+ Icon_default,
4450
4423
  {
4451
- node: child,
4452
- depth: depth + 1,
4453
- selectedId,
4454
- classNames,
4455
- fileIcon,
4456
- onExpand
4457
- },
4458
- child.id
4459
- ))
4460
- ] })
4461
- ]
4462
- }
4463
- );
4424
+ name: "right-chevron",
4425
+ className: clsx(
4426
+ "text-neutral-main cursor-pointer transition-transform duration-150",
4427
+ isOpen ? "rotate-90" : "rotate-0"
4428
+ )
4429
+ }
4430
+ ),
4431
+ fileIcon,
4432
+ node.content
4433
+ ]
4434
+ }
4435
+ ),
4436
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: [
4437
+ isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
4438
+ children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4439
+ TreeNodeItem,
4440
+ {
4441
+ node: child,
4442
+ depth: depth + 1,
4443
+ selectedId,
4444
+ classNames,
4445
+ fileIcon,
4446
+ onExpand
4447
+ },
4448
+ child.id
4449
+ ))
4450
+ ] })
4451
+ ] });
4464
4452
  }
4465
4453
  );
4466
4454
  TreeNodeItem.displayName = "TreeNodeItem";
4467
- var Tree = ({
4468
- headerContent,
4469
- group,
4470
- groupIcon,
4471
- fileIcon,
4472
- selectedId,
4473
- isLoading = false,
4474
- classNames,
4475
- onExpand
4476
- }) => {
4455
+ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
4477
4456
  const slots = (0, import_react.useMemo)(() => treeStyle(), []);
4478
4457
  const handleClick = (e) => {
4479
4458
  var _a;
@@ -4502,7 +4481,7 @@ var Tree = ({
4502
4481
  ]
4503
4482
  }
4504
4483
  ),
4505
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4484
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4506
4485
  TreeNodeItem,
4507
4486
  {
4508
4487
  node,
@@ -4510,7 +4489,6 @@ var Tree = ({
4510
4489
  classNames,
4511
4490
  fileIcon,
4512
4491
  selectedId,
4513
- isLoading,
4514
4492
  onExpand
4515
4493
  },
4516
4494
  node.id
@@ -4534,7 +4512,8 @@ var treeStyle = tv({
4534
4512
  "rounded-[5px]",
4535
4513
  "p-[5px]"
4536
4514
  ],
4537
- clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
4515
+ clickable: ["hover:bg-neutral-soft", "cursor-pointer"],
4516
+ gap: ["flex", "flex-col", "gap-[5px]"]
4538
4517
  }
4539
4518
  });
4540
4519
  // 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-O4IL6C6D.mjs";
5
+ } from "../../chunk-EFCGMDDE.mjs";
6
6
  import "../../chunk-ZYIIXWVY.mjs";
7
7
  import "../../chunk-LTNDSCRA.mjs";
8
8
  import "../../chunk-ZVGVLD3T.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.js CHANGED
@@ -10259,7 +10259,7 @@ var dateTimePickerStyle = tv({
10259
10259
  var import_react32 = require("react");
10260
10260
  var import_jsx_runtime35 = require("react/jsx-runtime");
10261
10261
  var TreeNodeItem = (0, import_react32.forwardRef)(
10262
- ({ node, depth, fileIcon, selectedId, isLoading, classNames, onExpand }, ref) => {
10262
+ ({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
10263
10263
  const [isOpen, setIsOpen] = (0, import_react32.useState)(false);
10264
10264
  const [children, setChildren] = (0, import_react32.useState)(node.children);
10265
10265
  const [isLoadingChildren, setIsLoadingChildren] = (0, import_react32.useState)(false);
@@ -10293,74 +10293,53 @@ var TreeNodeItem = (0, import_react32.forwardRef)(
10293
10293
  e.preventDefault();
10294
10294
  (_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
10295
10295
  };
10296
- const marginClass = depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]";
10297
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10298
- "div",
10299
- {
10300
- ref,
10301
- className: clsx(
10302
- marginClass,
10303
- "transition-all duration-150 ease-out",
10304
- isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
10305
- ),
10306
- children: [
10307
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10308
- "div",
10309
- {
10310
- className: clsx(
10311
- slots.node({ class: classNames == null ? void 0 : classNames.node }),
10312
- slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
10313
- selectedId == node.id ? "bg-neutral-soft" : ""
10314
- ),
10315
- onClick: handleClick,
10316
- onContextMenu: handleRightClick,
10317
- children: [
10318
- hasMore && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10319
- Icon_default,
10320
- {
10321
- name: "right-chevron",
10322
- className: clsx(
10323
- "text-neutral-main cursor-pointer transition-transform duration-150",
10324
- isOpen ? "rotate-90" : "rotate-0"
10325
- )
10326
- }
10327
- ),
10328
- fileIcon,
10329
- node.content
10330
- ]
10331
- }
10296
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
10297
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10298
+ "div",
10299
+ {
10300
+ className: clsx(
10301
+ slots.node({ class: classNames == null ? void 0 : classNames.node }),
10302
+ slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
10303
+ selectedId == node.id ? "bg-neutral-soft" : ""
10332
10304
  ),
10333
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
10334
- isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
10335
- children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10336
- TreeNodeItem,
10305
+ onClick: handleClick,
10306
+ onContextMenu: handleRightClick,
10307
+ children: [
10308
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10309
+ Icon_default,
10337
10310
  {
10338
- node: child,
10339
- depth: depth + 1,
10340
- selectedId,
10341
- classNames,
10342
- fileIcon,
10343
- onExpand
10344
- },
10345
- child.id
10346
- ))
10347
- ] })
10348
- ]
10349
- }
10350
- );
10311
+ name: "right-chevron",
10312
+ className: clsx(
10313
+ "text-neutral-main cursor-pointer transition-transform duration-150",
10314
+ isOpen ? "rotate-90" : "rotate-0"
10315
+ )
10316
+ }
10317
+ ),
10318
+ fileIcon,
10319
+ node.content
10320
+ ]
10321
+ }
10322
+ ),
10323
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: [
10324
+ isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
10325
+ children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10326
+ TreeNodeItem,
10327
+ {
10328
+ node: child,
10329
+ depth: depth + 1,
10330
+ selectedId,
10331
+ classNames,
10332
+ fileIcon,
10333
+ onExpand
10334
+ },
10335
+ child.id
10336
+ ))
10337
+ ] })
10338
+ ] });
10351
10339
  }
10352
10340
  );
10353
10341
  TreeNodeItem.displayName = "TreeNodeItem";
10354
- var Tree = ({
10355
- headerContent,
10356
- group,
10357
- groupIcon,
10358
- fileIcon,
10359
- selectedId,
10360
- isLoading = false,
10361
- classNames,
10362
- onExpand
10363
- }) => {
10342
+ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
10364
10343
  const slots = (0, import_react32.useMemo)(() => treeStyle(), []);
10365
10344
  const handleClick = (e) => {
10366
10345
  var _a;
@@ -10389,7 +10368,7 @@ var Tree = ({
10389
10368
  ]
10390
10369
  }
10391
10370
  ),
10392
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10371
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
10393
10372
  TreeNodeItem,
10394
10373
  {
10395
10374
  node,
@@ -10397,7 +10376,6 @@ var Tree = ({
10397
10376
  classNames,
10398
10377
  fileIcon,
10399
10378
  selectedId,
10400
- isLoading,
10401
10379
  onExpand
10402
10380
  },
10403
10381
  node.id
@@ -10421,7 +10399,8 @@ var treeStyle = tv({
10421
10399
  "rounded-[5px]",
10422
10400
  "p-[5px]"
10423
10401
  ],
10424
- clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
10402
+ clickable: ["hover:bg-neutral-soft", "cursor-pointer"],
10403
+ gap: ["flex", "flex-col", "gap-[5px]"]
10425
10404
  }
10426
10405
  });
10427
10406