@deepnoid/ui 0.1.22 → 0.1.24

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 (49) hide show
  1. package/.turbo/turbo-build.log +137 -151
  2. package/dist/{chunk-ZUSUVPYV.mjs → chunk-B3DFSXGC.mjs} +4 -4
  3. package/dist/{chunk-OWG4RL2T.mjs → chunk-DLQFMOBN.mjs} +3 -3
  4. package/dist/{chunk-BPVRXFIC.mjs → chunk-OS26K37M.mjs} +20 -28
  5. package/dist/{chunk-EYVRTVRM.mjs → chunk-SCFTSNCK.mjs} +1 -1
  6. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  7. package/dist/components/breadcrumb/index.mjs +5 -5
  8. package/dist/components/button/button.mjs +2 -2
  9. package/dist/components/button/icon-button.mjs +2 -2
  10. package/dist/components/button/index.mjs +5 -5
  11. package/dist/components/dateTimePicker/dateTimePicker.mjs +4 -4
  12. package/dist/components/dateTimePicker/index.mjs +4 -4
  13. package/dist/components/dateTimePicker/timePicker.mjs +3 -3
  14. package/dist/components/list/index.mjs +4 -4
  15. package/dist/components/list/listItem.mjs +2 -2
  16. package/dist/components/modal/index.mjs +7 -7
  17. package/dist/components/modal/modal.mjs +7 -7
  18. package/dist/components/ripple/index.mjs +3 -3
  19. package/dist/components/table/index.mjs +4 -4
  20. package/dist/components/table/table.mjs +1 -1
  21. package/dist/components/tree/index.d.mts +4 -1
  22. package/dist/components/tree/index.d.ts +4 -1
  23. package/dist/components/tree/index.js +20 -28
  24. package/dist/components/tree/index.mjs +1 -3
  25. package/dist/components/tree/tree.d.mts +46 -1
  26. package/dist/components/tree/tree.d.ts +46 -1
  27. package/dist/components/tree/tree.js +20 -28
  28. package/dist/components/tree/tree.mjs +1 -3
  29. package/dist/index.d.mts +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +20 -30
  32. package/dist/index.mjs +39 -41
  33. package/package.json +1 -1
  34. package/dist/assets/images/cogwheel.d.mts +0 -2
  35. package/dist/assets/images/cogwheel.d.ts +0 -2
  36. package/dist/assets/images/cogwheel.js +0 -4
  37. package/dist/assets/images/cogwheel.mjs +0 -8
  38. package/dist/assets/images/folder.d.mts +0 -2
  39. package/dist/assets/images/folder.d.ts +0 -2
  40. package/dist/assets/images/folder.js +0 -4
  41. package/dist/assets/images/folder.mjs +0 -8
  42. package/dist/chunk-7USF56CT.mjs +0 -8
  43. package/dist/chunk-IZM66FHP.mjs +0 -8
  44. package/dist/cogwheel-U2B3CWEL.png +0 -0
  45. package/dist/folder-RO3QTLGS.svg +0 -9
  46. package/dist/{chunk-PNRS23HE.mjs → chunk-BQUZRVYW.mjs} +3 -3
  47. package/dist/{chunk-VQROXH43.mjs → chunk-PMMTMYRI.mjs} +3 -3
  48. package/dist/{chunk-PZIVMTKX.mjs → chunk-QY7LYAXT.mjs} +3 -3
  49. package/dist/{chunk-6KXBXGYR.mjs → chunk-Y27H2AMV.mjs} +3 -3
@@ -2,12 +2,6 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-HWL7TPUN.mjs";
5
- import {
6
- cogwheel_default
7
- } from "./chunk-7USF56CT.mjs";
8
- import {
9
- folder_default
10
- } from "./chunk-IZM66FHP.mjs";
11
5
  import {
12
6
  tv
13
7
  } from "./chunk-4ZJFD3L3.mjs";
@@ -15,44 +9,42 @@ import {
15
9
  // src/components/tree/tree.tsx
16
10
  import { forwardRef, useMemo, useState, useCallback } from "react";
17
11
  import { jsx, jsxs } from "react/jsx-runtime";
18
- var TreeNodeItem = forwardRef(({ node, depth }, _ref) => {
12
+ var TreeNodeItem = forwardRef(({ node, depth, fileIcon, classNames }) => {
19
13
  var _a;
20
14
  const [isOpen, setIsOpen] = useState(false);
21
15
  const slots = useMemo(() => treeStyle(), []);
22
16
  const toggleOpen = useCallback(() => {
23
17
  setIsOpen((prev) => !prev);
24
18
  }, []);
25
- const handleClick = () => {
26
- var _a2;
27
- toggleOpen();
28
- (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
29
- };
30
19
  return /* @__PURE__ */ jsxs("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
31
- /* @__PURE__ */ jsxs("div", { className: slots.label(), onClick: handleClick, children: [
20
+ /* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
32
21
  node.children && /* @__PURE__ */ jsx(
33
22
  Icon_default,
34
23
  {
35
24
  name: "right-chevron",
36
- className: `text-neutral-main transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
25
+ className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
37
26
  }
38
27
  ),
39
- /* @__PURE__ */ jsx("img", { src: folder_default, alt: "folder", width: 25, height: 25 }),
40
- node.label
28
+ fileIcon,
29
+ /* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
30
+ var _a2;
31
+ return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
32
+ }, children: node.label })
41
33
  ] }),
42
- isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsx(TreeNodeItem, { node: child, depth: depth + 1 }, child.id)))
34
+ isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsx(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
43
35
  ] });
44
36
  });
45
- var Tree = forwardRef(({ headerContent, group }, ref) => {
37
+ var Tree = forwardRef(({ headerContent, group, groupIcon, fileIcon, classNames }) => {
46
38
  const { label, data, onClick } = group;
47
39
  const slots = useMemo(() => treeStyle(), []);
48
- return /* @__PURE__ */ jsxs("div", { className: slots.base(), ref, children: [
40
+ return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
49
41
  headerContent && /* @__PURE__ */ jsx("div", { children: headerContent }),
50
42
  /* @__PURE__ */ jsxs("div", { children: [
51
- /* @__PURE__ */ jsxs("div", { className: slots.label(), onClick, children: [
52
- /* @__PURE__ */ jsx("img", { src: cogwheel_default, alt: "cogwheel", width: 25, height: 25 }),
53
- label
43
+ /* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
44
+ groupIcon,
45
+ /* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
54
46
  ] }),
55
- data.map((node) => /* @__PURE__ */ jsx(TreeNodeItem, { node, depth: 1 }, node.id))
47
+ data.map((node) => /* @__PURE__ */ jsx(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
56
48
  ] })
57
49
  ] });
58
50
  });
@@ -61,8 +53,8 @@ Tree.displayName = "Tree";
61
53
  var tree_default = Tree;
62
54
  var treeStyle = tv({
63
55
  slots: {
64
- base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]"],
65
- label: [
56
+ base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
57
+ wrapper: [
66
58
  "flex",
67
59
  "items-center",
68
60
  "gap-[5px]",
@@ -71,9 +63,9 @@ var treeStyle = tv({
71
63
  "text-body-foreground",
72
64
  "hover:bg-neutral-soft",
73
65
  "p-[5px]",
74
- "rounded-[5px]",
75
- "cursor-pointer"
76
- ]
66
+ "rounded-[5px]"
67
+ ],
68
+ label: ["cursor-pointer"]
77
69
  }
78
70
  });
79
71
 
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-Q72LZAPG.mjs";
5
5
  import {
6
6
  timePicker_default
7
- } from "./chunk-OWG4RL2T.mjs";
7
+ } from "./chunk-DLQFMOBN.mjs";
8
8
  import {
9
9
  useDatePicker
10
10
  } from "./chunk-FWJ2ZKH6.mjs";
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  breadcrumb_default
4
- } from "../../chunk-6KXBXGYR.mjs";
4
+ } from "../../chunk-Y27H2AMV.mjs";
5
5
  import "../../chunk-MY5U63QO.mjs";
6
6
  import "../../chunk-LPZOH3RP.mjs";
7
- import "../../chunk-PNRS23HE.mjs";
8
- import "../../chunk-VQROXH43.mjs";
7
+ import "../../chunk-BQUZRVYW.mjs";
8
+ import "../../chunk-PMMTMYRI.mjs";
9
9
  import "../../chunk-6WSACUIB.mjs";
10
- import "../../chunk-LXHUO6VM.mjs";
11
10
  import "../../chunk-6PNKRBUT.mjs";
11
+ import "../../chunk-LXHUO6VM.mjs";
12
+ import "../../chunk-WFMFC7R6.mjs";
12
13
  import "../../chunk-ZYIIXWVY.mjs";
13
14
  import "../../chunk-HWL7TPUN.mjs";
14
- import "../../chunk-WFMFC7R6.mjs";
15
15
  import "../../chunk-3IU2RPSM.mjs";
16
16
  import "../../chunk-4ZJFD3L3.mjs";
17
17
  import "../../chunk-27Y6K5NK.mjs";
@@ -2,17 +2,17 @@
2
2
  import "../../chunk-KYIODWXL.mjs";
3
3
  import {
4
4
  breadcrumb_default
5
- } from "../../chunk-6KXBXGYR.mjs";
5
+ } from "../../chunk-Y27H2AMV.mjs";
6
6
  import "../../chunk-MY5U63QO.mjs";
7
7
  import "../../chunk-LPZOH3RP.mjs";
8
- import "../../chunk-PNRS23HE.mjs";
9
- import "../../chunk-VQROXH43.mjs";
8
+ import "../../chunk-BQUZRVYW.mjs";
9
+ import "../../chunk-PMMTMYRI.mjs";
10
10
  import "../../chunk-6WSACUIB.mjs";
11
- import "../../chunk-LXHUO6VM.mjs";
12
11
  import "../../chunk-6PNKRBUT.mjs";
12
+ import "../../chunk-LXHUO6VM.mjs";
13
+ import "../../chunk-WFMFC7R6.mjs";
13
14
  import "../../chunk-ZYIIXWVY.mjs";
14
15
  import "../../chunk-HWL7TPUN.mjs";
15
- import "../../chunk-WFMFC7R6.mjs";
16
16
  import "../../chunk-3IU2RPSM.mjs";
17
17
  import "../../chunk-4ZJFD3L3.mjs";
18
18
  import "../../chunk-27Y6K5NK.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  button_default
4
- } from "../../chunk-PNRS23HE.mjs";
4
+ } from "../../chunk-BQUZRVYW.mjs";
5
5
  import "../../chunk-6WSACUIB.mjs";
6
- import "../../chunk-LXHUO6VM.mjs";
7
6
  import "../../chunk-6PNKRBUT.mjs";
7
+ import "../../chunk-LXHUO6VM.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
9
  import "../../chunk-HWL7TPUN.mjs";
10
10
  import "../../chunk-3IU2RPSM.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  icon_button_default
4
- } from "../../chunk-VQROXH43.mjs";
4
+ } from "../../chunk-PMMTMYRI.mjs";
5
5
  import "../../chunk-6WSACUIB.mjs";
6
- import "../../chunk-LXHUO6VM.mjs";
7
6
  import "../../chunk-6PNKRBUT.mjs";
7
+ import "../../chunk-LXHUO6VM.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
9
  import "../../chunk-HWL7TPUN.mjs";
10
10
  import "../../chunk-3IU2RPSM.mjs";
@@ -5,18 +5,18 @@ import {
5
5
  } from "../../chunk-LPZOH3RP.mjs";
6
6
  import {
7
7
  button_default
8
- } from "../../chunk-PNRS23HE.mjs";
8
+ } from "../../chunk-BQUZRVYW.mjs";
9
9
  import {
10
10
  icon_button_default
11
- } from "../../chunk-VQROXH43.mjs";
11
+ } from "../../chunk-PMMTMYRI.mjs";
12
12
  import "../../chunk-6WSACUIB.mjs";
13
- import "../../chunk-LXHUO6VM.mjs";
14
13
  import "../../chunk-6PNKRBUT.mjs";
15
- import "../../chunk-ZYIIXWVY.mjs";
16
- import "../../chunk-HWL7TPUN.mjs";
14
+ import "../../chunk-LXHUO6VM.mjs";
17
15
  import {
18
16
  text_button_default
19
17
  } from "../../chunk-WFMFC7R6.mjs";
18
+ import "../../chunk-ZYIIXWVY.mjs";
19
+ import "../../chunk-HWL7TPUN.mjs";
20
20
  import "../../chunk-3IU2RPSM.mjs";
21
21
  import "../../chunk-4ZJFD3L3.mjs";
22
22
  import "../../chunk-27Y6K5NK.mjs";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  dateTimePickerStyle,
4
4
  dateTimePicker_default
5
- } from "../../chunk-EYVRTVRM.mjs";
5
+ } from "../../chunk-SCFTSNCK.mjs";
6
6
  import "../../chunk-Q72LZAPG.mjs";
7
- import "../../chunk-OWG4RL2T.mjs";
7
+ import "../../chunk-DLQFMOBN.mjs";
8
8
  import "../../chunk-7MVEAQ7Z.mjs";
9
- import "../../chunk-PZIVMTKX.mjs";
10
9
  import "../../chunk-HIVPDIEP.mjs";
10
+ import "../../chunk-QY7LYAXT.mjs";
11
11
  import "../../chunk-FWJ2ZKH6.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
13
+ import "../../chunk-XQGD4ZIX.mjs";
13
14
  import "../../chunk-ZYIIXWVY.mjs";
14
15
  import "../../chunk-HWL7TPUN.mjs";
15
- import "../../chunk-XQGD4ZIX.mjs";
16
16
  import "../../chunk-3IU2RPSM.mjs";
17
17
  import "../../chunk-4ZJFD3L3.mjs";
18
18
  import "../../chunk-E3G5QXSH.mjs";
@@ -2,17 +2,17 @@
2
2
  import "../../chunk-75HLCORR.mjs";
3
3
  import {
4
4
  dateTimePicker_default
5
- } from "../../chunk-EYVRTVRM.mjs";
5
+ } from "../../chunk-SCFTSNCK.mjs";
6
6
  import "../../chunk-Q72LZAPG.mjs";
7
- import "../../chunk-OWG4RL2T.mjs";
7
+ import "../../chunk-DLQFMOBN.mjs";
8
8
  import "../../chunk-7MVEAQ7Z.mjs";
9
- import "../../chunk-PZIVMTKX.mjs";
10
9
  import "../../chunk-HIVPDIEP.mjs";
10
+ import "../../chunk-QY7LYAXT.mjs";
11
11
  import "../../chunk-FWJ2ZKH6.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
13
+ import "../../chunk-XQGD4ZIX.mjs";
13
14
  import "../../chunk-ZYIIXWVY.mjs";
14
15
  import "../../chunk-HWL7TPUN.mjs";
15
- import "../../chunk-XQGD4ZIX.mjs";
16
16
  import "../../chunk-3IU2RPSM.mjs";
17
17
  import "../../chunk-4ZJFD3L3.mjs";
18
18
  import "../../chunk-E3G5QXSH.mjs";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  timePicker_default
4
- } from "../../chunk-OWG4RL2T.mjs";
4
+ } from "../../chunk-DLQFMOBN.mjs";
5
5
  import "../../chunk-7MVEAQ7Z.mjs";
6
- import "../../chunk-PZIVMTKX.mjs";
7
6
  import "../../chunk-HIVPDIEP.mjs";
7
+ import "../../chunk-QY7LYAXT.mjs";
8
+ import "../../chunk-XQGD4ZIX.mjs";
8
9
  import "../../chunk-ZYIIXWVY.mjs";
9
10
  import "../../chunk-HWL7TPUN.mjs";
10
- import "../../chunk-XQGD4ZIX.mjs";
11
11
  import "../../chunk-3IU2RPSM.mjs";
12
12
  import "../../chunk-4ZJFD3L3.mjs";
13
13
  import "../../chunk-E3G5QXSH.mjs";
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import "../../chunk-7MVEAQ7Z.mjs";
3
- import {
4
- listItem_default
5
- } from "../../chunk-PZIVMTKX.mjs";
6
3
  import {
7
4
  list_default
8
5
  } from "../../chunk-HIVPDIEP.mjs";
6
+ import {
7
+ listItem_default
8
+ } from "../../chunk-QY7LYAXT.mjs";
9
+ import "../../chunk-XQGD4ZIX.mjs";
9
10
  import "../../chunk-ZYIIXWVY.mjs";
10
11
  import "../../chunk-HWL7TPUN.mjs";
11
- import "../../chunk-XQGD4ZIX.mjs";
12
12
  import "../../chunk-3IU2RPSM.mjs";
13
13
  import "../../chunk-4ZJFD3L3.mjs";
14
14
  import "../../chunk-E3G5QXSH.mjs";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  listItem_default
4
- } from "../../chunk-PZIVMTKX.mjs";
4
+ } from "../../chunk-QY7LYAXT.mjs";
5
+ import "../../chunk-XQGD4ZIX.mjs";
5
6
  import "../../chunk-ZYIIXWVY.mjs";
6
7
  import "../../chunk-HWL7TPUN.mjs";
7
- import "../../chunk-XQGD4ZIX.mjs";
8
8
  import "../../chunk-3IU2RPSM.mjs";
9
9
  import "../../chunk-4ZJFD3L3.mjs";
10
10
  import "../../chunk-E3G5QXSH.mjs";
@@ -2,20 +2,20 @@
2
2
  import "../../chunk-DJOG6Z35.mjs";
3
3
  import {
4
4
  modal_default
5
- } from "../../chunk-ZUSUVPYV.mjs";
5
+ } from "../../chunk-B3DFSXGC.mjs";
6
+ import "../../chunk-SE5TU755.mjs";
7
+ import "../../chunk-LL6F3WDX.mjs";
6
8
  import "../../chunk-MY5U63QO.mjs";
7
9
  import "../../chunk-LPZOH3RP.mjs";
8
- import "../../chunk-PNRS23HE.mjs";
9
- import "../../chunk-VQROXH43.mjs";
10
+ import "../../chunk-BQUZRVYW.mjs";
11
+ import "../../chunk-PMMTMYRI.mjs";
10
12
  import "../../chunk-6WSACUIB.mjs";
11
- import "../../chunk-LXHUO6VM.mjs";
12
13
  import "../../chunk-6PNKRBUT.mjs";
14
+ import "../../chunk-LXHUO6VM.mjs";
15
+ import "../../chunk-WFMFC7R6.mjs";
13
16
  import "../../chunk-ZYIIXWVY.mjs";
14
17
  import "../../chunk-HWL7TPUN.mjs";
15
- import "../../chunk-WFMFC7R6.mjs";
16
18
  import "../../chunk-3IU2RPSM.mjs";
17
- import "../../chunk-SE5TU755.mjs";
18
- import "../../chunk-LL6F3WDX.mjs";
19
19
  import "../../chunk-4ZJFD3L3.mjs";
20
20
  import "../../chunk-27Y6K5NK.mjs";
21
21
  import "../../chunk-E3G5QXSH.mjs";
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import {
3
3
  modal_default
4
- } from "../../chunk-ZUSUVPYV.mjs";
4
+ } from "../../chunk-B3DFSXGC.mjs";
5
+ import "../../chunk-SE5TU755.mjs";
6
+ import "../../chunk-LL6F3WDX.mjs";
5
7
  import "../../chunk-MY5U63QO.mjs";
6
8
  import "../../chunk-LPZOH3RP.mjs";
7
- import "../../chunk-PNRS23HE.mjs";
8
- import "../../chunk-VQROXH43.mjs";
9
+ import "../../chunk-BQUZRVYW.mjs";
10
+ import "../../chunk-PMMTMYRI.mjs";
9
11
  import "../../chunk-6WSACUIB.mjs";
10
- import "../../chunk-LXHUO6VM.mjs";
11
12
  import "../../chunk-6PNKRBUT.mjs";
13
+ import "../../chunk-LXHUO6VM.mjs";
14
+ import "../../chunk-WFMFC7R6.mjs";
12
15
  import "../../chunk-ZYIIXWVY.mjs";
13
16
  import "../../chunk-HWL7TPUN.mjs";
14
- import "../../chunk-WFMFC7R6.mjs";
15
17
  import "../../chunk-3IU2RPSM.mjs";
16
- import "../../chunk-SE5TU755.mjs";
17
- import "../../chunk-LL6F3WDX.mjs";
18
18
  import "../../chunk-4ZJFD3L3.mjs";
19
19
  import "../../chunk-27Y6K5NK.mjs";
20
20
  import "../../chunk-E3G5QXSH.mjs";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "../../chunk-6WSACUIB.mjs";
3
- import {
4
- ripple_default
5
- } from "../../chunk-LXHUO6VM.mjs";
6
3
  import {
7
4
  useRipple
8
5
  } from "../../chunk-6PNKRBUT.mjs";
6
+ import {
7
+ ripple_default
8
+ } from "../../chunk-LXHUO6VM.mjs";
9
9
  import "../../chunk-AC6TWLRT.mjs";
10
10
  export {
11
11
  ripple_default as Ripple,
@@ -1,8 +1,5 @@
1
1
  "use client";
2
2
  import "../../chunk-DX3KXNP6.mjs";
3
- import {
4
- form_table_default
5
- } from "../../chunk-ICZTNO4V.mjs";
6
3
  import {
7
4
  table_default
8
5
  } from "../../chunk-6OMHIMIA.mjs";
@@ -10,15 +7,18 @@ import "../../chunk-XRC5OUYQ.mjs";
10
7
  import "../../chunk-EAK5DVWA.mjs";
11
8
  import "../../chunk-DQRAFUDA.mjs";
12
9
  import "../../chunk-M37VBNB3.mjs";
10
+ import {
11
+ form_table_default
12
+ } from "../../chunk-ICZTNO4V.mjs";
13
13
  import "../../chunk-7B7LRG5J.mjs";
14
14
  import "../../chunk-IVK24VIL.mjs";
15
15
  import "../../chunk-F3HENRVM.mjs";
16
16
  import "../../chunk-2GCSFWHD.mjs";
17
17
  import "../../chunk-P5PJTJLY.mjs";
18
18
  import "../../chunk-QZ3LVYJW.mjs";
19
+ import "../../chunk-D6QI3DJG.mjs";
19
20
  import "../../chunk-ZYIIXWVY.mjs";
20
21
  import "../../chunk-HWL7TPUN.mjs";
21
- import "../../chunk-D6QI3DJG.mjs";
22
22
  import "../../chunk-3IU2RPSM.mjs";
23
23
  import "../../chunk-4ZJFD3L3.mjs";
24
24
  import "../../chunk-27Y6K5NK.mjs";
@@ -12,9 +12,9 @@ import "../../chunk-F3HENRVM.mjs";
12
12
  import "../../chunk-2GCSFWHD.mjs";
13
13
  import "../../chunk-P5PJTJLY.mjs";
14
14
  import "../../chunk-QZ3LVYJW.mjs";
15
+ import "../../chunk-D6QI3DJG.mjs";
15
16
  import "../../chunk-ZYIIXWVY.mjs";
16
17
  import "../../chunk-HWL7TPUN.mjs";
17
- import "../../chunk-D6QI3DJG.mjs";
18
18
  import "../../chunk-3IU2RPSM.mjs";
19
19
  import "../../chunk-4ZJFD3L3.mjs";
20
20
  import "../../chunk-27Y6K5NK.mjs";
@@ -1,2 +1,5 @@
1
- export { default as Tree } from './tree.mjs';
1
+ export { default as Tree, TreeNode } from './tree.mjs';
2
+ import 'tailwind-variants';
3
+ import 'tailwind-merge';
2
4
  import 'react';
5
+ import '../../utils/types.mjs';
@@ -1,2 +1,5 @@
1
- export { default as Tree } from './tree.js';
1
+ export { default as Tree, TreeNode } from './tree.js';
2
+ import 'tailwind-variants';
3
+ import 'tailwind-merge';
2
4
  import 'react';
5
+ import '../../utils/types.js';
@@ -4296,52 +4296,44 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
4296
4296
  };
4297
4297
  var Icon_default = Icon;
4298
4298
 
4299
- // src/assets/images/cogwheel.png
4300
- var cogwheel_default = "../../cogwheel-U2B3CWEL.png";
4301
-
4302
- // src/assets/images/folder.svg
4303
- var folder_default = "../../folder-RO3QTLGS.svg";
4304
-
4305
4299
  // src/components/tree/tree.tsx
4306
4300
  var import_jsx_runtime3 = require("react/jsx-runtime");
4307
- var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth }, _ref) => {
4301
+ var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth, fileIcon, classNames }) => {
4308
4302
  var _a;
4309
4303
  const [isOpen, setIsOpen] = (0, import_react.useState)(false);
4310
4304
  const slots = (0, import_react.useMemo)(() => treeStyle(), []);
4311
4305
  const toggleOpen = (0, import_react.useCallback)(() => {
4312
4306
  setIsOpen((prev) => !prev);
4313
4307
  }, []);
4314
- const handleClick = () => {
4315
- var _a2;
4316
- toggleOpen();
4317
- (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
4318
- };
4319
4308
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
4320
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.label(), onClick: handleClick, children: [
4309
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
4321
4310
  node.children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4322
4311
  Icon_default,
4323
4312
  {
4324
4313
  name: "right-chevron",
4325
- className: `text-neutral-main transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
4314
+ className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
4326
4315
  }
4327
4316
  ),
4328
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: folder_default, alt: "folder", width: 25, height: 25 }),
4329
- node.label
4317
+ fileIcon,
4318
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
4319
+ var _a2;
4320
+ return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
4321
+ }, children: node.label })
4330
4322
  ] }),
4331
- isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node: child, depth: depth + 1 }, child.id)))
4323
+ isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
4332
4324
  ] });
4333
4325
  });
4334
- var Tree = (0, import_react.forwardRef)(({ headerContent, group }, ref) => {
4326
+ var Tree = (0, import_react.forwardRef)(({ headerContent, group, groupIcon, fileIcon, classNames }) => {
4335
4327
  const { label, data, onClick } = group;
4336
4328
  const slots = (0, import_react.useMemo)(() => treeStyle(), []);
4337
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base(), ref, children: [
4329
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
4338
4330
  headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
4339
4331
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
4340
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.label(), onClick, children: [
4341
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src: cogwheel_default, alt: "cogwheel", width: 25, height: 25 }),
4342
- label
4332
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
4333
+ groupIcon,
4334
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
4343
4335
  ] }),
4344
- data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node, depth: 1 }, node.id))
4336
+ data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
4345
4337
  ] })
4346
4338
  ] });
4347
4339
  });
@@ -4350,8 +4342,8 @@ Tree.displayName = "Tree";
4350
4342
  var tree_default = Tree;
4351
4343
  var treeStyle = tv({
4352
4344
  slots: {
4353
- base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]"],
4354
- label: [
4345
+ base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
4346
+ wrapper: [
4355
4347
  "flex",
4356
4348
  "items-center",
4357
4349
  "gap-[5px]",
@@ -4360,9 +4352,9 @@ var treeStyle = tv({
4360
4352
  "text-body-foreground",
4361
4353
  "hover:bg-neutral-soft",
4362
4354
  "p-[5px]",
4363
- "rounded-[5px]",
4364
- "cursor-pointer"
4365
- ]
4355
+ "rounded-[5px]"
4356
+ ],
4357
+ label: ["cursor-pointer"]
4366
4358
  }
4367
4359
  });
4368
4360
  // Annotate the CommonJS export names for ESM import in node:
@@ -2,11 +2,9 @@
2
2
  import "../../chunk-MBLZYQCN.mjs";
3
3
  import {
4
4
  tree_default
5
- } from "../../chunk-BPVRXFIC.mjs";
5
+ } from "../../chunk-OS26K37M.mjs";
6
6
  import "../../chunk-ZYIIXWVY.mjs";
7
7
  import "../../chunk-HWL7TPUN.mjs";
8
- import "../../chunk-7USF56CT.mjs";
9
- import "../../chunk-IZM66FHP.mjs";
10
8
  import "../../chunk-3IU2RPSM.mjs";
11
9
  import "../../chunk-4ZJFD3L3.mjs";
12
10
  import "../../chunk-AC6TWLRT.mjs";
@@ -1,5 +1,8 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as tailwind_merge from 'tailwind-merge';
1
3
  import * as react from 'react';
2
4
  import { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.mjs';
3
6
 
4
7
  type TreeNode = {
5
8
  id: number;
@@ -14,7 +17,49 @@ interface TreeProps {
14
17
  data: TreeNode[];
15
18
  onClick?: () => void;
16
19
  };
20
+ groupIcon?: ReactNode;
21
+ fileIcon?: ReactNode;
22
+ classNames?: SlotsToClasses<TreeSlots>;
17
23
  }
18
24
  declare const Tree: react.ForwardRefExoticComponent<TreeProps & react.RefAttributes<HTMLDivElement>>;
19
25
 
20
- export { Tree as default };
26
+ declare const treeStyle: tailwind_variants.TVReturnType<{
27
+ [key: string]: {
28
+ [key: string]: tailwind_merge.ClassNameValue | {
29
+ base?: tailwind_merge.ClassNameValue;
30
+ label?: tailwind_merge.ClassNameValue;
31
+ wrapper?: tailwind_merge.ClassNameValue;
32
+ };
33
+ };
34
+ } | {
35
+ [x: string]: {
36
+ [x: string]: tailwind_merge.ClassNameValue | {
37
+ base?: tailwind_merge.ClassNameValue;
38
+ label?: tailwind_merge.ClassNameValue;
39
+ wrapper?: tailwind_merge.ClassNameValue;
40
+ };
41
+ };
42
+ } | {}, {
43
+ base: string[];
44
+ wrapper: string[];
45
+ label: string[];
46
+ }, undefined, {
47
+ [key: string]: {
48
+ [key: string]: tailwind_merge.ClassNameValue | {
49
+ base?: tailwind_merge.ClassNameValue;
50
+ label?: tailwind_merge.ClassNameValue;
51
+ wrapper?: tailwind_merge.ClassNameValue;
52
+ };
53
+ };
54
+ } | {}, {
55
+ base: string[];
56
+ wrapper: string[];
57
+ label: string[];
58
+ }, tailwind_variants.TVReturnType<unknown, {
59
+ base: string[];
60
+ wrapper: string[];
61
+ label: string[];
62
+ }, undefined, unknown, unknown, undefined>>;
63
+ type TreeSlots = keyof ReturnType<typeof treeStyle>;
64
+
65
+ export { type TreeNode, Tree as default };