@deepnoid/ui 0.1.25 → 0.1.27

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 (62) hide show
  1. package/.turbo/turbo-build.log +149 -145
  2. package/dist/chunk-6TIIBU7J.mjs +35 -0
  3. package/dist/{chunk-IVK24VIL.mjs → chunk-C7OF5HJF.mjs} +1 -1
  4. package/dist/{chunk-MSAULFDB.mjs → chunk-E4UUZOR4.mjs} +16 -16
  5. package/dist/{chunk-P5PJTJLY.mjs → chunk-GRA2LU42.mjs} +18 -18
  6. package/dist/{chunk-Y27H2AMV.mjs → chunk-IRAHS4WS.mjs} +2 -2
  7. package/dist/chunk-PX4PFLJ3.mjs +178 -0
  8. package/dist/{chunk-EAK5DVWA.mjs → chunk-UNH3BCGN.mjs} +8 -1
  9. package/dist/{chunk-6EU5GUL5.mjs → chunk-XA6PVFTW.mjs} +5 -5
  10. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  11. package/dist/components/breadcrumb/breadcrumb.mjs +1 -1
  12. package/dist/components/breadcrumb/index.js +2 -2
  13. package/dist/components/breadcrumb/index.mjs +1 -1
  14. package/dist/components/input/index.js +18 -18
  15. package/dist/components/input/index.mjs +1 -1
  16. package/dist/components/input/input.d.mts +44 -44
  17. package/dist/components/input/input.d.ts +44 -44
  18. package/dist/components/input/input.js +18 -18
  19. package/dist/components/input/input.mjs +1 -1
  20. package/dist/components/pagination/index.js +18 -18
  21. package/dist/components/pagination/index.mjs +2 -2
  22. package/dist/components/pagination/pagination.js +18 -18
  23. package/dist/components/pagination/pagination.mjs +2 -2
  24. package/dist/components/select/index.js +16 -16
  25. package/dist/components/select/index.mjs +1 -1
  26. package/dist/components/select/select.d.mts +38 -38
  27. package/dist/components/select/select.d.ts +38 -38
  28. package/dist/components/select/select.js +16 -16
  29. package/dist/components/select/select.mjs +1 -1
  30. package/dist/components/table/definition-table.d.mts +51 -0
  31. package/dist/components/table/definition-table.d.ts +51 -0
  32. package/dist/components/table/definition-table.js +351 -0
  33. package/dist/components/table/definition-table.mjs +9 -0
  34. package/dist/components/table/form-table.d.mts +1 -1
  35. package/dist/components/table/form-table.d.ts +1 -1
  36. package/dist/components/table/form-table.mjs +43 -3
  37. package/dist/components/table/index.d.mts +1 -1
  38. package/dist/components/table/index.d.ts +1 -1
  39. package/dist/components/table/index.js +40 -47
  40. package/dist/components/table/index.mjs +9 -9
  41. package/dist/components/table/table-head.js +8 -1
  42. package/dist/components/table/table-head.mjs +1 -1
  43. package/dist/components/table/table.js +26 -19
  44. package/dist/components/table/table.mjs +5 -5
  45. package/dist/components/toast/index.mjs +2 -2
  46. package/dist/components/toast/use-toast.mjs +2 -2
  47. package/dist/components/tree/index.d.mts +1 -0
  48. package/dist/components/tree/index.d.ts +1 -0
  49. package/dist/components/tree/index.js +138 -60
  50. package/dist/components/tree/index.mjs +1 -1
  51. package/dist/components/tree/tree.d.mts +17 -10
  52. package/dist/components/tree/tree.d.ts +17 -10
  53. package/dist/components/tree/tree.js +143 -60
  54. package/dist/components/tree/tree.mjs +3 -1
  55. package/dist/index.d.mts +1 -1
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +196 -125
  58. package/dist/index.mjs +31 -31
  59. package/package.json +1 -1
  60. package/dist/chunk-ICZTNO4V.mjs +0 -49
  61. package/dist/chunk-K4QY2F5J.mjs +0 -99
  62. package/dist/{chunk-UAHTRCKG.mjs → chunk-YBDA3WQP.mjs} +3 -3
@@ -1,49 +0,0 @@
1
- "use client";
2
- import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
5
-
6
- // src/components/table/form-table.tsx
7
- import { forwardRef, useMemo } from "react";
8
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- var DEFAULT_COLUMN_CLASSES = [
10
- "w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
11
- "px-[10px] py-[9.5px]"
12
- ];
13
- var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ jsx("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
14
- var _a;
15
- return /* @__PURE__ */ jsx("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
16
- }) });
17
- var FormTable = forwardRef(
18
- ({ rows, onSubmit, footer, classNames }, ref) => {
19
- const slots = useMemo(() => formTableStyle(), []);
20
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
21
- /* @__PURE__ */ jsx("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx(FormTableRow, { ...row }, i)) }) }),
22
- footer && /* @__PURE__ */ jsx("div", { children: footer })
23
- ] });
24
- if (onSubmit) {
25
- return /* @__PURE__ */ jsx(
26
- "form",
27
- {
28
- ref,
29
- onSubmit,
30
- className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
31
- children: content
32
- }
33
- );
34
- }
35
- return /* @__PURE__ */ jsx("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
36
- }
37
- );
38
- FormTable.displayName = "FormTable";
39
- var form_table_default = FormTable;
40
- var formTableStyle = tv({
41
- slots: {
42
- base: ["flex", "flex-col", "gap-[30px]"],
43
- table: ["w-full", "table-fixed", "border", "border-neutral-light"]
44
- }
45
- });
46
-
47
- export {
48
- form_table_default
49
- };
@@ -1,99 +0,0 @@
1
- "use client";
2
- import {
3
- Icon_default
4
- } from "./chunk-HWL7TPUN.mjs";
5
- import {
6
- tv
7
- } from "./chunk-4ZJFD3L3.mjs";
8
- import {
9
- clsx
10
- } from "./chunk-27Y6K5NK.mjs";
11
-
12
- // src/components/tree/tree.tsx
13
- import { forwardRef, useMemo, useState, useCallback } from "react";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- var TreeNodeItem = forwardRef(({ node, depth, fileIcon, isLoading, classNames }) => {
16
- var _a;
17
- const [isOpen, setIsOpen] = useState(false);
18
- const slots = useMemo(() => treeStyle(), []);
19
- const toggleOpen = useCallback(() => {
20
- setIsOpen((prev) => !prev);
21
- }, []);
22
- return /* @__PURE__ */ jsxs(
23
- "div",
24
- {
25
- className: clsx(
26
- depth > 1 ? "ml-[30px]" : "",
27
- "transition-all duration-150 ease-out",
28
- isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
29
- ),
30
- children: [
31
- /* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
32
- node.children && /* @__PURE__ */ jsx(
33
- Icon_default,
34
- {
35
- name: "right-chevron",
36
- className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
37
- }
38
- ),
39
- fileIcon,
40
- /* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
41
- var _a2;
42
- return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
43
- }, children: node.label })
44
- ] }),
45
- isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsx(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
46
- ]
47
- }
48
- );
49
- });
50
- var Tree = forwardRef(
51
- ({ headerContent, group, groupIcon, fileIcon, isLoading, classNames }) => {
52
- const { label, data, onClick } = group;
53
- const slots = useMemo(() => treeStyle(), []);
54
- return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
55
- headerContent && /* @__PURE__ */ jsx("div", { children: headerContent }),
56
- /* @__PURE__ */ jsxs("div", { children: [
57
- /* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
58
- groupIcon,
59
- /* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
60
- ] }),
61
- data.map((node) => /* @__PURE__ */ jsx(
62
- TreeNodeItem,
63
- {
64
- node,
65
- depth: 1,
66
- classNames,
67
- fileIcon,
68
- isLoading
69
- },
70
- node.id
71
- ))
72
- ] })
73
- ] });
74
- }
75
- );
76
- TreeNodeItem.displayName = "TreeNodeItem";
77
- Tree.displayName = "Tree";
78
- var tree_default = Tree;
79
- var treeStyle = tv({
80
- slots: {
81
- base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
82
- wrapper: [
83
- "flex",
84
- "items-center",
85
- "gap-[5px]",
86
- "text-md",
87
- "font-bold",
88
- "text-body-foreground",
89
- "hover:bg-neutral-soft",
90
- "p-[5px]",
91
- "rounded-[5px]"
92
- ],
93
- label: ["cursor-pointer"]
94
- }
95
- });
96
-
97
- export {
98
- tree_default
99
- };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- toast_default
4
- } from "./chunk-OUAKGMDW.mjs";
5
2
  import {
6
3
  getToastPosition
7
4
  } from "./chunk-ZOTHPHXA.mjs";
5
+ import {
6
+ toast_default
7
+ } from "./chunk-OUAKGMDW.mjs";
8
8
 
9
9
  // src/components/toast/use-toast.tsx
10
10
  import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";