@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.
Files changed (122) hide show
  1. package/.turbo/turbo-build.log +183 -173
  2. package/dist/chunk-62X5AX5B.mjs +297 -0
  3. package/dist/chunk-6PN3DGOE.mjs +77 -0
  4. package/dist/{chunk-EHRFXDSN.mjs → chunk-AIIMJZ7L.mjs} +72 -42
  5. package/dist/{chunk-3KVZDFMV.mjs → chunk-BCMVEGJG.mjs} +3 -3
  6. package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
  7. package/dist/{chunk-KXA73VTJ.mjs → chunk-CVQM3T2X.mjs} +4 -4
  8. package/dist/{chunk-RCJOJPRS.mjs → chunk-EBRCE7XY.mjs} +40 -30
  9. package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
  10. package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
  11. package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
  12. package/dist/{chunk-KLUC2BV6.mjs → chunk-IEJRE6LT.mjs} +10 -7
  13. package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
  14. package/dist/chunk-LWRK5TPZ.mjs +80 -0
  15. package/dist/chunk-MZ76AA76.mjs +1 -0
  16. package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
  17. package/dist/chunk-P7YYNA6L.mjs +67 -0
  18. package/dist/components/backdrop/backdrop.mjs +2 -2
  19. package/dist/components/backdrop/index.mjs +2 -2
  20. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  21. package/dist/components/breadcrumb/index.mjs +5 -5
  22. package/dist/components/button/button.mjs +2 -2
  23. package/dist/components/button/icon-button.mjs +2 -2
  24. package/dist/components/button/index.mjs +4 -4
  25. package/dist/components/button/text-button.mjs +2 -2
  26. package/dist/components/checkbox/checkbox.mjs +2 -2
  27. package/dist/components/checkbox/index.mjs +2 -2
  28. package/dist/components/chip/chip.mjs +2 -2
  29. package/dist/components/chip/index.mjs +2 -2
  30. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  31. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  32. package/dist/components/dateTimePicker/index.mjs +6 -6
  33. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  34. package/dist/components/fileUpload/fileUpload.js +62 -39
  35. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  36. package/dist/components/fileUpload/index.js +62 -39
  37. package/dist/components/fileUpload/index.mjs +6 -6
  38. package/dist/components/input/index.js +62 -39
  39. package/dist/components/input/index.mjs +2 -2
  40. package/dist/components/input/input.d.mts +21 -14
  41. package/dist/components/input/input.d.ts +21 -14
  42. package/dist/components/input/input.js +62 -39
  43. package/dist/components/input/input.mjs +2 -2
  44. package/dist/components/list/index.mjs +3 -3
  45. package/dist/components/list/list.mjs +2 -2
  46. package/dist/components/list/listItem.mjs +2 -2
  47. package/dist/components/modal/index.mjs +6 -6
  48. package/dist/components/modal/modal.mjs +6 -6
  49. package/dist/components/pagination/index.js +62 -39
  50. package/dist/components/pagination/index.mjs +3 -3
  51. package/dist/components/pagination/pagination.js +62 -39
  52. package/dist/components/pagination/pagination.mjs +3 -3
  53. package/dist/components/radio/index.mjs +2 -2
  54. package/dist/components/radio/radio.mjs +2 -2
  55. package/dist/components/select/index.js +7 -4
  56. package/dist/components/select/index.mjs +2 -2
  57. package/dist/components/select/select.d.mts +9 -0
  58. package/dist/components/select/select.d.ts +9 -0
  59. package/dist/components/select/select.js +7 -4
  60. package/dist/components/select/select.mjs +2 -2
  61. package/dist/components/skeleton/index.d.mts +2 -0
  62. package/dist/components/skeleton/index.d.ts +2 -0
  63. package/dist/components/skeleton/index.js +141 -0
  64. package/dist/components/skeleton/index.mjs +10 -0
  65. package/dist/components/skeleton/skeleton.d.mts +14 -0
  66. package/dist/components/skeleton/skeleton.d.ts +14 -0
  67. package/dist/components/skeleton/skeleton.js +135 -0
  68. package/dist/components/skeleton/skeleton.mjs +9 -0
  69. package/dist/components/table/index.js +748 -646
  70. package/dist/components/table/index.mjs +11 -9
  71. package/dist/components/table/table-body.d.mts +6 -4
  72. package/dist/components/table/table-body.d.ts +6 -4
  73. package/dist/components/table/table-body.js +115 -63
  74. package/dist/components/table/table-body.mjs +5 -3
  75. package/dist/components/table/table-head.d.mts +3 -1
  76. package/dist/components/table/table-head.d.ts +3 -1
  77. package/dist/components/table/table-head.js +107 -21
  78. package/dist/components/table/table-head.mjs +5 -3
  79. package/dist/components/table/table.d.mts +3 -1
  80. package/dist/components/table/table.d.ts +3 -1
  81. package/dist/components/table/table.js +739 -637
  82. package/dist/components/table/table.mjs +9 -7
  83. package/dist/components/tabs/index.mjs +2 -2
  84. package/dist/components/tabs/tabs.mjs +2 -2
  85. package/dist/components/textarea/index.js +255 -138
  86. package/dist/components/textarea/index.mjs +2 -1
  87. package/dist/components/textarea/textarea.d.mts +157 -150
  88. package/dist/components/textarea/textarea.d.ts +157 -150
  89. package/dist/components/textarea/textarea.js +255 -138
  90. package/dist/components/textarea/textarea.mjs +2 -1
  91. package/dist/components/toast/index.mjs +3 -3
  92. package/dist/components/toast/toast.mjs +2 -2
  93. package/dist/components/toast/use-toast.mjs +3 -3
  94. package/dist/components/tooltip/index.mjs +2 -2
  95. package/dist/components/tooltip/tooltip.mjs +2 -2
  96. package/dist/components/tree/index.js +33 -11
  97. package/dist/components/tree/index.mjs +2 -2
  98. package/dist/components/tree/tree.d.mts +10 -8
  99. package/dist/components/tree/tree.d.ts +10 -8
  100. package/dist/components/tree/tree.js +33 -11
  101. package/dist/components/tree/tree.mjs +2 -2
  102. package/dist/index.d.mts +1 -0
  103. package/dist/index.d.ts +1 -0
  104. package/dist/index.js +799 -593
  105. package/dist/index.mjs +52 -47
  106. package/package.json +1 -1
  107. package/dist/chunk-26MNALVL.mjs +0 -47
  108. package/dist/chunk-A5KQHWS3.mjs +0 -94
  109. package/dist/chunk-BKE6QF6W.mjs +0 -209
  110. package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
  111. package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
  112. package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
  113. package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
  114. package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
  115. package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
  116. package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
  117. package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
  118. package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
  119. package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
  120. package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
  121. package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
  122. 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
- 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';