@deepnoid/ui 0.1.26 → 0.1.28
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.
- package/.turbo/turbo-build.log +170 -166
- package/dist/{chunk-MSAULFDB.mjs → chunk-272FMLIL.mjs} +17 -17
- package/dist/{chunk-3IU2RPSM.mjs → chunk-2SDYFOZL.mjs} +46 -35
- package/dist/{chunk-HWL7TPUN.mjs → chunk-2TKEWFGH.mjs} +1 -1
- package/dist/chunk-4OSN2OE2.mjs +178 -0
- package/dist/chunk-6TIIBU7J.mjs +35 -0
- package/dist/{chunk-Q72LZAPG.mjs → chunk-A7RU3FU5.mjs} +1 -1
- package/dist/{chunk-P5PJTJLY.mjs → chunk-BEQ3KZGS.mjs} +19 -19
- package/dist/{chunk-IRAHS4WS.mjs → chunk-G67WUZO3.mjs} +1 -1
- package/dist/{chunk-YBDA3WQP.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-BQUZRVYW.mjs → chunk-JTZUXVOU.mjs} +1 -1
- package/dist/{chunk-6OMHIMIA.mjs → chunk-JV7VLO2L.mjs} +2 -2
- package/dist/{chunk-B3DFSXGC.mjs → chunk-K7VUN5BS.mjs} +2 -2
- package/dist/{chunk-DLQFMOBN.mjs → chunk-KYJTZPXY.mjs} +1 -1
- package/dist/{chunk-OUAKGMDW.mjs → chunk-MEY4IL7D.mjs} +1 -1
- package/dist/{chunk-SCFTSNCK.mjs → chunk-NHVIKP4H.mjs} +6 -6
- package/dist/{chunk-PMMTMYRI.mjs → chunk-QIEKOGY7.mjs} +1 -1
- package/dist/{chunk-QY7LYAXT.mjs → chunk-RT3S3VVJ.mjs} +2 -2
- package/dist/{chunk-IVK24VIL.mjs → chunk-SO7BGWM7.mjs} +2 -2
- package/dist/{chunk-XQGD4ZIX.mjs → chunk-SP3JVQY3.mjs} +1 -1
- package/dist/{chunk-EAK5DVWA.mjs → chunk-UNH3BCGN.mjs} +8 -1
- package/dist/{chunk-6HX3PPL6.mjs → chunk-WLNLVX7Q.mjs} +1 -1
- package/dist/components/avatar/avatar.js +46 -35
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +46 -35
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +46 -35
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
- package/dist/components/breadcrumb/index.js +46 -35
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/button.js +46 -35
- package/dist/components/button/button.mjs +3 -3
- package/dist/components/button/icon-button.js +46 -35
- package/dist/components/button/icon-button.mjs +3 -3
- package/dist/components/button/index.js +46 -35
- package/dist/components/button/index.mjs +4 -4
- package/dist/components/chip/chip.js +46 -35
- package/dist/components/chip/chip.mjs +3 -3
- package/dist/components/chip/index.js +46 -35
- package/dist/components/chip/index.mjs +3 -3
- package/dist/components/dateTimePicker/calendar.js +46 -35
- package/dist/components/dateTimePicker/calendar.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.js +46 -35
- package/dist/components/dateTimePicker/dateTimePicker.mjs +9 -9
- package/dist/components/dateTimePicker/index.js +46 -35
- package/dist/components/dateTimePicker/index.mjs +9 -9
- package/dist/components/dateTimePicker/timePicker.js +46 -35
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/icon/Icon.d.mts +9 -5
- package/dist/components/icon/Icon.d.ts +9 -5
- package/dist/components/icon/Icon.js +46 -35
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +46 -35
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +3 -2
- package/dist/components/icon/template.d.ts +3 -2
- package/dist/components/icon/template.js +46 -35
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +64 -53
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.d.mts +44 -44
- package/dist/components/input/input.d.ts +44 -44
- package/dist/components/input/input.js +64 -53
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.js +46 -35
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/listItem.js +46 -35
- package/dist/components/list/listItem.mjs +4 -4
- package/dist/components/modal/index.js +46 -35
- package/dist/components/modal/index.mjs +5 -5
- package/dist/components/modal/modal.js +46 -35
- package/dist/components/modal/modal.mjs +5 -5
- package/dist/components/pagination/index.js +64 -53
- package/dist/components/pagination/index.mjs +4 -4
- package/dist/components/pagination/pagination.js +64 -53
- package/dist/components/pagination/pagination.mjs +4 -4
- package/dist/components/select/index.js +62 -51
- package/dist/components/select/index.mjs +3 -3
- package/dist/components/select/select.d.mts +38 -38
- package/dist/components/select/select.d.ts +38 -38
- package/dist/components/select/select.js +62 -51
- package/dist/components/select/select.mjs +3 -3
- package/dist/components/table/definition-table.d.mts +51 -0
- package/dist/components/table/definition-table.d.ts +51 -0
- package/dist/components/table/definition-table.js +351 -0
- package/dist/components/table/definition-table.mjs +9 -0
- package/dist/components/table/form-table.d.mts +1 -1
- package/dist/components/table/form-table.d.ts +1 -1
- package/dist/components/table/form-table.mjs +43 -3
- package/dist/components/table/index.d.mts +1 -1
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +86 -82
- package/dist/components/table/index.mjs +9 -9
- package/dist/components/table/table-head.js +8 -1
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.js +72 -54
- package/dist/components/table/table.mjs +6 -6
- package/dist/components/toast/index.js +46 -35
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +46 -35
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.js +46 -35
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tree/index.d.mts +1 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/tree/index.js +170 -84
- package/dist/components/tree/index.mjs +3 -3
- package/dist/components/tree/tree.d.mts +17 -10
- package/dist/components/tree/tree.d.ts +17 -10
- package/dist/components/tree/tree.js +175 -84
- package/dist/components/tree/tree.mjs +5 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +226 -147
- package/dist/index.mjs +31 -31
- package/package.json +1 -1
- package/dist/chunk-ICZTNO4V.mjs +0 -49
- package/dist/chunk-TEQ723QO.mjs +0 -102
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Icon_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2TKEWFGH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
tv
|
|
7
7
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
@@ -22,8 +22,8 @@ var Select = forwardRef((originalProps, ref) => {
|
|
|
22
22
|
const {
|
|
23
23
|
label,
|
|
24
24
|
options,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
helperMessage,
|
|
26
|
+
errorMessage,
|
|
27
27
|
classNames,
|
|
28
28
|
defaultSelectedOptions = [],
|
|
29
29
|
onChange,
|
|
@@ -151,8 +151,8 @@ var Select = forwardRef((originalProps, ref) => {
|
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
helperMessage && !errorMessage && /* @__PURE__ */ jsx("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
155
|
+
errorMessage && /* @__PURE__ */ jsx("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
156
156
|
] })
|
|
157
157
|
]
|
|
158
158
|
}
|
|
@@ -224,8 +224,8 @@ var select = tv({
|
|
|
224
224
|
],
|
|
225
225
|
optionsWrapper: ["border", "rounded", "bg-white", "shadow", "overflow-auto"],
|
|
226
226
|
option: ["flex", "justify-between", "items-center", "cursor-pointer"],
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
helperMessage: ["text-neutral-main"],
|
|
228
|
+
errorMessage: ["text-danger-main"],
|
|
229
229
|
readonly: ["pointer-events-none", "!bg-trans-soft"]
|
|
230
230
|
},
|
|
231
231
|
variants: {
|
|
@@ -248,8 +248,8 @@ var select = tv({
|
|
|
248
248
|
selectWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]"],
|
|
249
249
|
select: ["text-sm"],
|
|
250
250
|
option: ["px-[4px]", "py-[3px]", "text-sm"],
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
helperMessage: ["text-sm"],
|
|
252
|
+
errorMessage: ["text-sm"]
|
|
253
253
|
},
|
|
254
254
|
md: {
|
|
255
255
|
base: ["text-md", "gap-[6px]", "rounded-md"],
|
|
@@ -258,8 +258,8 @@ var select = tv({
|
|
|
258
258
|
selectWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]"],
|
|
259
259
|
select: ["text-md"],
|
|
260
260
|
option: ["px-[6px]", "py-[5.5px]", "text-md"],
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
helperMessage: ["text-sm"],
|
|
262
|
+
errorMessage: ["text-sm"]
|
|
263
263
|
},
|
|
264
264
|
lg: {
|
|
265
265
|
base: ["text-lg", "gap-[8px]"],
|
|
@@ -268,8 +268,8 @@ var select = tv({
|
|
|
268
268
|
selectWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]"],
|
|
269
269
|
select: ["text-lg"],
|
|
270
270
|
option: ["px-[8px]", "py-[8px]", "text-lg"],
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
helperMessage: ["text-md"],
|
|
272
|
+
errorMessage: ["text-md"]
|
|
273
273
|
},
|
|
274
274
|
xl: {
|
|
275
275
|
base: ["text-xl", "gap-[10px]"],
|
|
@@ -278,8 +278,8 @@ var select = tv({
|
|
|
278
278
|
selectWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]"],
|
|
279
279
|
select: ["text-xl"],
|
|
280
280
|
option: ["px-[10px]", "py-[11.5px]"],
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
helperMessage: ["text-md"],
|
|
282
|
+
errorMessage: ["text-md"]
|
|
283
283
|
}
|
|
284
284
|
},
|
|
285
285
|
direction: {
|
|
@@ -309,8 +309,8 @@ var select = tv({
|
|
|
309
309
|
"group-has-[p.error]/select:text-danger-light",
|
|
310
310
|
"group-has-[p.error]/select:placeholder:text-danger-light"
|
|
311
311
|
],
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
helperMessage: ["!text-neutral-light"],
|
|
313
|
+
errorMessage: ["!text-danger-light"]
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
316
|
isSelected: {
|
|
@@ -518,22 +518,61 @@ var template = {
|
|
|
518
518
|
}
|
|
519
519
|
);
|
|
520
520
|
},
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
521
|
+
plus: ({ className }) => {
|
|
522
|
+
return /* @__PURE__ */ jsxs(
|
|
523
|
+
"svg",
|
|
524
|
+
{
|
|
525
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
526
|
+
width: "18",
|
|
527
|
+
height: "18",
|
|
528
|
+
viewBox: "0 0 18 18",
|
|
529
|
+
fill: "none",
|
|
530
|
+
className,
|
|
531
|
+
children: [
|
|
532
|
+
/* @__PURE__ */ jsx("path", { d: "M4.5 9H13.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
533
|
+
/* @__PURE__ */ jsx("path", { d: "M9 13.5V4.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
},
|
|
538
|
+
minus: ({ className }) => {
|
|
524
539
|
return /* @__PURE__ */ jsx(
|
|
525
540
|
"svg",
|
|
526
541
|
{
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
542
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
543
|
+
width: "18",
|
|
544
|
+
height: "18",
|
|
545
|
+
viewBox: "0 0 18 18",
|
|
530
546
|
fill: "none",
|
|
547
|
+
className,
|
|
548
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4.5 9H13.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
549
|
+
}
|
|
550
|
+
);
|
|
551
|
+
},
|
|
552
|
+
pencil: ({ className }) => {
|
|
553
|
+
return /* @__PURE__ */ jsx(
|
|
554
|
+
"svg",
|
|
555
|
+
{
|
|
531
556
|
xmlns: "http://www.w3.org/2000/svg",
|
|
557
|
+
width: "18",
|
|
558
|
+
height: "18",
|
|
559
|
+
viewBox: "0 0 18 18",
|
|
560
|
+
fill: "none",
|
|
532
561
|
className,
|
|
533
|
-
children: /* @__PURE__ */ jsx(
|
|
562
|
+
children: /* @__PURE__ */ jsx(
|
|
563
|
+
"path",
|
|
564
|
+
{
|
|
565
|
+
d: "M12.6465 3.36525L13.9117 2.09925C14.1755 1.83549 14.5332 1.68732 14.9062 1.68732C15.2793 1.68732 15.637 1.83549 15.9008 2.09925C16.1645 2.36301 16.3127 2.72074 16.3127 3.09375C16.3127 3.46676 16.1645 3.82449 15.9008 4.08825L7.9365 12.0525C7.53999 12.4488 7.05102 12.74 6.51375 12.9L4.5 13.5L5.1 11.4863C5.25996 10.949 5.55123 10.46 5.9475 10.0635L12.6465 3.36525ZM12.6465 3.36525L14.625 5.34375M13.5 10.5V14.0625C13.5 14.5101 13.3222 14.9393 13.0057 15.2557C12.6893 15.5722 12.2601 15.75 11.8125 15.75H3.9375C3.48995 15.75 3.06072 15.5722 2.74426 15.2557C2.42779 14.9393 2.25 14.5101 2.25 14.0625V6.1875C2.25 5.73995 2.42779 5.31073 2.74426 4.99426C3.06072 4.67779 3.48995 4.5 3.9375 4.5H7.5",
|
|
566
|
+
stroke: "currentColor",
|
|
567
|
+
strokeLinecap: "round",
|
|
568
|
+
strokeLinejoin: "round"
|
|
569
|
+
}
|
|
570
|
+
)
|
|
534
571
|
}
|
|
535
572
|
);
|
|
536
573
|
},
|
|
574
|
+
// ----------------------------------- old ---------------------------------
|
|
575
|
+
// ** Status **
|
|
537
576
|
check: ({ className, fill }) => {
|
|
538
577
|
return /* @__PURE__ */ jsx(
|
|
539
578
|
"svg",
|
|
@@ -2180,34 +2219,6 @@ var template = {
|
|
|
2180
2219
|
}
|
|
2181
2220
|
);
|
|
2182
2221
|
},
|
|
2183
|
-
pencil: ({ className, fill }) => {
|
|
2184
|
-
return /* @__PURE__ */ jsx(
|
|
2185
|
-
"svg",
|
|
2186
|
-
{
|
|
2187
|
-
width: "24",
|
|
2188
|
-
height: "24",
|
|
2189
|
-
viewBox: "0 0 24 24",
|
|
2190
|
-
fill: "none",
|
|
2191
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2192
|
-
className,
|
|
2193
|
-
children: fill ? /* @__PURE__ */ jsx(
|
|
2194
|
-
"path",
|
|
2195
|
-
{
|
|
2196
|
-
d: "M21.7313 2.26918C21.239 1.77699 20.5714 1.50049 19.8753 1.50049C19.1791 1.50049 18.5115 1.77699 18.0193 2.26918L16.8623 3.42618L20.5743 7.13818L21.7313 5.98118C22.2234 5.48891 22.4999 4.8213 22.4999 4.12518C22.4999 3.42906 22.2234 2.76145 21.7313 2.26918ZM19.5133 8.19918L15.8013 4.48718L3.65125 16.6372C3.03411 17.254 2.58043 18.015 2.33125 18.8512L1.53125 21.5362C1.49263 21.6657 1.48975 21.8033 1.52292 21.9344C1.55608 22.0655 1.62407 22.1852 1.71967 22.2808C1.81527 22.3764 1.93494 22.4443 2.06601 22.4775C2.19709 22.5107 2.33469 22.5078 2.46425 22.4692L5.14925 21.6692C5.98548 21.42 6.74642 20.9663 7.36325 20.3492L19.5133 8.19918Z",
|
|
2197
|
-
fill: "currentColor"
|
|
2198
|
-
}
|
|
2199
|
-
) : /* @__PURE__ */ jsx(
|
|
2200
|
-
"path",
|
|
2201
|
-
{
|
|
2202
|
-
d: "M16.862 4.487L18.549 2.799C18.9007 2.44733 19.3777 2.24976 19.875 2.24976C20.3723 2.24976 20.8493 2.44733 21.201 2.799C21.5527 3.15068 21.7502 3.62766 21.7502 4.125C21.7502 4.62235 21.5527 5.09933 21.201 5.451L6.832 19.82C6.30332 20.3484 5.65137 20.7367 4.935 20.95L2.25 21.75L3.05 19.065C3.26328 18.3486 3.65163 17.6967 4.18 17.168L16.863 4.487H16.862ZM16.862 4.487L19.5 7.125",
|
|
2203
|
-
stroke: "currentColor",
|
|
2204
|
-
strokeLinecap: "round",
|
|
2205
|
-
strokeLinejoin: "round"
|
|
2206
|
-
}
|
|
2207
|
-
)
|
|
2208
|
-
}
|
|
2209
|
-
);
|
|
2210
|
-
},
|
|
2211
2222
|
"pencil-square": ({ className, fill }) => {
|
|
2212
2223
|
return /* @__PURE__ */ jsx(
|
|
2213
2224
|
"svg",
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Icon_default
|
|
4
|
+
} from "./chunk-2TKEWFGH.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(
|
|
16
|
+
({ node, depth, fileIcon, isLoading, classNames, onExpand }, ref) => {
|
|
17
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
18
|
+
const [children, setChildren] = useState(node.children);
|
|
19
|
+
const [isLoadingChildren, setIsLoadingChildren] = useState(false);
|
|
20
|
+
const slots = useMemo(() => treeStyle(), []);
|
|
21
|
+
const hasMore = useMemo(() => {
|
|
22
|
+
if (node.isLeaf) return false;
|
|
23
|
+
if (Array.isArray(children)) return children.length > 0;
|
|
24
|
+
return typeof onExpand === "function";
|
|
25
|
+
}, [node.isLeaf, children, onExpand]);
|
|
26
|
+
const toggleOpen = useCallback(async () => {
|
|
27
|
+
if (!isOpen && !children && onExpand && !node.isLeaf) {
|
|
28
|
+
setIsLoadingChildren(true);
|
|
29
|
+
try {
|
|
30
|
+
const result = await onExpand(node);
|
|
31
|
+
setChildren(result);
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error("Failed to load child nodes ", e);
|
|
34
|
+
} finally {
|
|
35
|
+
setIsLoadingChildren(false);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
setIsOpen((prev) => !prev);
|
|
39
|
+
}, [isOpen, children, onExpand, node]);
|
|
40
|
+
const handleClick = () => {
|
|
41
|
+
var _a;
|
|
42
|
+
toggleOpen();
|
|
43
|
+
(_a = node.onClick) == null ? void 0 : _a.call(node);
|
|
44
|
+
};
|
|
45
|
+
const handleRightClick = (e) => {
|
|
46
|
+
var _a;
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
49
|
+
};
|
|
50
|
+
const marginClass = depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]";
|
|
51
|
+
return /* @__PURE__ */ jsxs(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
className: clsx(
|
|
56
|
+
marginClass,
|
|
57
|
+
"transition-all duration-150 ease-out",
|
|
58
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
59
|
+
),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxs(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
className: slots.group({ class: classNames == null ? void 0 : classNames.group }),
|
|
65
|
+
onClick: handleClick,
|
|
66
|
+
onContextMenu: handleRightClick,
|
|
67
|
+
children: [
|
|
68
|
+
hasMore && /* @__PURE__ */ jsx(
|
|
69
|
+
Icon_default,
|
|
70
|
+
{
|
|
71
|
+
name: "right-chevron",
|
|
72
|
+
className: clsx(
|
|
73
|
+
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
74
|
+
isOpen ? "rotate-90" : "rotate-0"
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
fileIcon,
|
|
79
|
+
node.label
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
isOpen && /* @__PURE__ */ jsxs("div", { children: [
|
|
84
|
+
isLoadingChildren && /* @__PURE__ */ jsx("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
|
|
85
|
+
children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsx(
|
|
86
|
+
TreeNodeItem,
|
|
87
|
+
{
|
|
88
|
+
node: child,
|
|
89
|
+
depth: depth + 1,
|
|
90
|
+
classNames,
|
|
91
|
+
fileIcon,
|
|
92
|
+
onExpand
|
|
93
|
+
},
|
|
94
|
+
child.id
|
|
95
|
+
))
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
TreeNodeItem.displayName = "TreeNodeItem";
|
|
103
|
+
var Tree = ({
|
|
104
|
+
headerContent,
|
|
105
|
+
group,
|
|
106
|
+
groupIcon,
|
|
107
|
+
fileIcon,
|
|
108
|
+
isLoading = false,
|
|
109
|
+
classNames,
|
|
110
|
+
onExpand
|
|
111
|
+
}) => {
|
|
112
|
+
const slots = useMemo(() => treeStyle(), []);
|
|
113
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
114
|
+
const handleToggle = () => {
|
|
115
|
+
var _a;
|
|
116
|
+
setIsOpen((prev) => !prev);
|
|
117
|
+
(_a = group.onClick) == null ? void 0 : _a.call(group);
|
|
118
|
+
};
|
|
119
|
+
const handleRightClick = (e) => {
|
|
120
|
+
var _a;
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
(_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
125
|
+
headerContent && /* @__PURE__ */ jsx("div", { children: headerContent }),
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
127
|
+
/* @__PURE__ */ jsxs(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: slots.group({ class: classNames == null ? void 0 : classNames.group }),
|
|
131
|
+
onClick: handleToggle,
|
|
132
|
+
onContextMenu: handleRightClick,
|
|
133
|
+
children: [
|
|
134
|
+
groupIcon,
|
|
135
|
+
group.label
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
isOpen && /* @__PURE__ */ jsx("div", { children: group.data.map((node) => /* @__PURE__ */ jsx(
|
|
140
|
+
TreeNodeItem,
|
|
141
|
+
{
|
|
142
|
+
node,
|
|
143
|
+
depth: 1,
|
|
144
|
+
classNames,
|
|
145
|
+
fileIcon,
|
|
146
|
+
isLoading,
|
|
147
|
+
onExpand
|
|
148
|
+
},
|
|
149
|
+
node.id
|
|
150
|
+
)) })
|
|
151
|
+
] })
|
|
152
|
+
] });
|
|
153
|
+
};
|
|
154
|
+
Tree.displayName = "Tree";
|
|
155
|
+
var tree_default = Tree;
|
|
156
|
+
var treeStyle = tv({
|
|
157
|
+
slots: {
|
|
158
|
+
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
159
|
+
wrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
160
|
+
group: [
|
|
161
|
+
"flex",
|
|
162
|
+
"items-center",
|
|
163
|
+
"gap-[5px]",
|
|
164
|
+
"text-md",
|
|
165
|
+
"font-bold",
|
|
166
|
+
"text-body-foreground",
|
|
167
|
+
"hover:bg-neutral-soft",
|
|
168
|
+
"p-[5px]",
|
|
169
|
+
"rounded-[5px]",
|
|
170
|
+
"cursor-pointer"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export {
|
|
176
|
+
Tree,
|
|
177
|
+
tree_default
|
|
178
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
tv
|
|
4
|
+
} from "./chunk-4ZJFD3L3.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/table/definition-table.tsx
|
|
7
|
+
import { forwardRef, useMemo } from "react";
|
|
8
|
+
import { 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 DefinitionTableRow = ({ 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 DefinitionTable = forwardRef(({ rows, footer, classNames }, ref) => {
|
|
18
|
+
const slots = useMemo(() => DefinitionTableStyle(), []);
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
20
|
+
/* @__PURE__ */ jsx("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx(DefinitionTableRow, { ...row }, i)) }) }),
|
|
21
|
+
footer && /* @__PURE__ */ jsx("div", { children: footer })
|
|
22
|
+
] });
|
|
23
|
+
});
|
|
24
|
+
DefinitionTable.displayName = "DefinitionTable";
|
|
25
|
+
var definition_table_default = DefinitionTable;
|
|
26
|
+
var DefinitionTableStyle = tv({
|
|
27
|
+
slots: {
|
|
28
|
+
base: ["flex", "flex-col", "gap-[30px]"],
|
|
29
|
+
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
definition_table_default
|
|
35
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Icon_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2TKEWFGH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
tv
|
|
7
7
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
@@ -17,7 +17,7 @@ import React, { forwardRef, useRef, useCallback, useMemo } from "react";
|
|
|
17
17
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
var Input = forwardRef((originalProps, ref) => {
|
|
19
19
|
const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
|
|
20
|
-
const { classNames, label,
|
|
20
|
+
const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
|
|
21
21
|
const inputRef = useRef(null);
|
|
22
22
|
const slots = useMemo(() => inputStyle({ ...variantProps }), [variantProps]);
|
|
23
23
|
const getContentProps = useCallback(
|
|
@@ -60,7 +60,7 @@ var Input = forwardRef((originalProps, ref) => {
|
|
|
60
60
|
className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
|
|
61
61
|
};
|
|
62
62
|
return React.cloneElement(endContent, mergedProps);
|
|
63
|
-
} else if (
|
|
63
|
+
} else if (errorMessage) {
|
|
64
64
|
const iconProps = { ...getContentProps(), className: getContentProps().className };
|
|
65
65
|
return /* @__PURE__ */ jsx("div", { ...iconProps, children: /* @__PURE__ */ jsx(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
|
|
66
66
|
} else {
|
|
@@ -114,8 +114,8 @@ var Input = forwardRef((originalProps, ref) => {
|
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
helperMessage && !errorMessage && /* @__PURE__ */ jsx("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
118
|
+
errorMessage && /* @__PURE__ */ jsx("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
119
119
|
] })
|
|
120
120
|
]
|
|
121
121
|
}
|
|
@@ -155,8 +155,8 @@ var inputStyle = tv(
|
|
|
155
155
|
"group-has-[:hover]/input:text-neutral-dark",
|
|
156
156
|
"group-has-[p.error]/input:text-danger-main"
|
|
157
157
|
],
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
|
|
159
|
+
errorMessage: ["text-danger-main"],
|
|
160
160
|
readonly: ["pointer-events-none", "!text-body-foreground"]
|
|
161
161
|
},
|
|
162
162
|
variants: {
|
|
@@ -191,7 +191,7 @@ var inputStyle = tv(
|
|
|
191
191
|
"group-has-[:focus]/input:text-primary-main",
|
|
192
192
|
"!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
|
|
193
193
|
],
|
|
194
|
-
|
|
194
|
+
helperMessage: [
|
|
195
195
|
"group-has-[:focus]/input:text-primary-main",
|
|
196
196
|
"group-has-[:focus:hover]/input:text-primary-main",
|
|
197
197
|
"group-has-[:focus]/input:hover:text-primary-main"
|
|
@@ -202,7 +202,7 @@ var inputStyle = tv(
|
|
|
202
202
|
"group-has-[:focus]/input:text-secondary-main",
|
|
203
203
|
"!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
|
|
204
204
|
],
|
|
205
|
-
|
|
205
|
+
helperMessage: [
|
|
206
206
|
"group-has-[:focus]/input:text-secondary-main",
|
|
207
207
|
"group-has-[:focus:hover]/input:text-secondary-main",
|
|
208
208
|
"group-has-[:focus]/input:hover:text-secondary-main"
|
|
@@ -215,32 +215,32 @@ var inputStyle = tv(
|
|
|
215
215
|
label: ["text-sm"],
|
|
216
216
|
innerWrapper: ["gap-[4px]"],
|
|
217
217
|
inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]", "gap-[4px]"],
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
helperMessage: ["text-sm"],
|
|
219
|
+
errorMessage: ["text-sm"]
|
|
220
220
|
},
|
|
221
221
|
md: {
|
|
222
222
|
base: ["text-md", "gap-[6px]"],
|
|
223
223
|
label: ["text-md"],
|
|
224
224
|
innerWrapper: ["gap-[6px]"],
|
|
225
225
|
inputWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]", "gap-[6px]"],
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
helperMessage: ["text-sm"],
|
|
227
|
+
errorMessage: ["text-sm"]
|
|
228
228
|
},
|
|
229
229
|
lg: {
|
|
230
230
|
base: ["text-lg", "gap-[8px]"],
|
|
231
231
|
label: ["text-lg"],
|
|
232
232
|
innerWrapper: ["gap-[8px]"],
|
|
233
233
|
inputWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]", "gap-[8px]"],
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
helperMessage: ["text-md"],
|
|
235
|
+
errorMessage: ["text-md"]
|
|
236
236
|
},
|
|
237
237
|
xl: {
|
|
238
238
|
base: ["text-xl", "gap-[10px]"],
|
|
239
239
|
label: ["text-xl"],
|
|
240
240
|
innerWrapper: ["gap-[10px]"],
|
|
241
241
|
inputWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]", "gap-[10px]"],
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
helperMessage: ["text-md"],
|
|
243
|
+
errorMessage: ["text-md"]
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
246
|
direction: {
|
|
@@ -264,8 +264,8 @@ var inputStyle = tv(
|
|
|
264
264
|
"group-has-[p.error]/input:placeholder:text-danger-light"
|
|
265
265
|
],
|
|
266
266
|
content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
helperMessage: ["!text-neutral-light"],
|
|
268
|
+
errorMessage: ["!text-danger-light"]
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
},
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZOTHPHXA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toast_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MEY4IL7D.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/toast/use-toast.tsx
|
|
10
10
|
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-XRC5OUYQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
table_head_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UNH3BCGN.mjs";
|
|
8
8
|
import {
|
|
9
9
|
scrollArea_default
|
|
10
10
|
} from "./chunk-M37VBNB3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
pagination_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SO7BGWM7.mjs";
|
|
14
14
|
import {
|
|
15
15
|
clsx
|
|
16
16
|
} from "./chunk-27Y6K5NK.mjs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-LL6F3WDX.mjs";
|
|
5
5
|
import {
|
|
6
6
|
button_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JTZUXVOU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Icon_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2TKEWFGH.mjs";
|
|
11
11
|
import {
|
|
12
12
|
tv
|
|
13
13
|
} from "./chunk-4ZJFD3L3.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
useDatePicker
|
|
4
|
+
} from "./chunk-FWJ2ZKH6.mjs";
|
|
2
5
|
import {
|
|
3
6
|
calendar_default
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A7RU3FU5.mjs";
|
|
5
8
|
import {
|
|
6
9
|
timePicker_default
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
useDatePicker
|
|
10
|
-
} from "./chunk-FWJ2ZKH6.mjs";
|
|
10
|
+
} from "./chunk-KYJTZPXY.mjs";
|
|
11
11
|
import {
|
|
12
12
|
Icon_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2TKEWFGH.mjs";
|
|
14
14
|
import {
|
|
15
15
|
tv
|
|
16
16
|
} from "./chunk-4ZJFD3L3.mjs";
|