@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.
- package/.turbo/turbo-build.log +149 -145
- package/dist/chunk-6TIIBU7J.mjs +35 -0
- package/dist/{chunk-IVK24VIL.mjs → chunk-C7OF5HJF.mjs} +1 -1
- package/dist/{chunk-MSAULFDB.mjs → chunk-E4UUZOR4.mjs} +16 -16
- package/dist/{chunk-P5PJTJLY.mjs → chunk-GRA2LU42.mjs} +18 -18
- package/dist/{chunk-Y27H2AMV.mjs → chunk-IRAHS4WS.mjs} +2 -2
- package/dist/chunk-PX4PFLJ3.mjs +178 -0
- package/dist/{chunk-EAK5DVWA.mjs → chunk-UNH3BCGN.mjs} +8 -1
- package/dist/{chunk-6EU5GUL5.mjs → chunk-XA6PVFTW.mjs} +5 -5
- package/dist/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.mjs +1 -1
- package/dist/components/breadcrumb/index.js +2 -2
- package/dist/components/breadcrumb/index.mjs +1 -1
- package/dist/components/input/index.js +18 -18
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input/input.d.mts +44 -44
- package/dist/components/input/input.d.ts +44 -44
- package/dist/components/input/input.js +18 -18
- package/dist/components/input/input.mjs +1 -1
- package/dist/components/pagination/index.js +18 -18
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/pagination/pagination.js +18 -18
- package/dist/components/pagination/pagination.mjs +2 -2
- package/dist/components/select/index.js +16 -16
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/select/select.d.mts +38 -38
- package/dist/components/select/select.d.ts +38 -38
- package/dist/components/select/select.js +16 -16
- package/dist/components/select/select.mjs +1 -1
- 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 +40 -47
- 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 +26 -19
- package/dist/components/table/table.mjs +5 -5
- package/dist/components/toast/index.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +2 -2
- package/dist/components/tree/index.d.mts +1 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/tree/index.js +138 -60
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.d.mts +17 -10
- package/dist/components/tree/tree.d.ts +17 -10
- package/dist/components/tree/tree.js +143 -60
- package/dist/components/tree/tree.mjs +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +196 -125
- package/dist/index.mjs +31 -31
- package/package.json +1 -1
- package/dist/chunk-ICZTNO4V.mjs +0 -49
- package/dist/chunk-K4QY2F5J.mjs +0 -99
- package/dist/{chunk-UAHTRCKG.mjs → chunk-YBDA3WQP.mjs} +3 -3
|
@@ -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: {
|
|
@@ -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
|
},
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
// src/components/breadcrumb/breadcrumb.tsx
|
|
13
13
|
import { forwardRef, useMemo } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
var BreadcrumbMenu =
|
|
15
|
+
var BreadcrumbMenu = ({ label, onClick, isCurrent, size }) => {
|
|
16
16
|
return /* @__PURE__ */ jsx(
|
|
17
17
|
text_button_default,
|
|
18
18
|
{
|
|
@@ -25,7 +25,7 @@ var BreadcrumbMenu = forwardRef(({ label, onClick, isCurrent, size }) => {
|
|
|
25
25
|
children: label
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
var Breadcrumb = forwardRef(({ startIconName, size, menus, classNames }, ref) => {
|
|
30
30
|
const slots = useMemo(() => breadcrumbStyle({ size }), [size]);
|
|
31
31
|
const renderMenus = (menus2) => {
|
|
@@ -0,0 +1,178 @@
|
|
|
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(
|
|
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
|
+
};
|
|
@@ -27,7 +27,14 @@ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames,
|
|
|
27
27
|
},
|
|
28
28
|
`${column.field}${index}thead`
|
|
29
29
|
));
|
|
30
|
-
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ jsx("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
30
|
+
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ jsx("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
31
|
+
checkbox_default,
|
|
32
|
+
{
|
|
33
|
+
size,
|
|
34
|
+
checked: isCheckedAll,
|
|
35
|
+
onChange: (e) => onCheckAll(e.target.checked)
|
|
36
|
+
}
|
|
37
|
+
) }) });
|
|
31
38
|
return /* @__PURE__ */ jsx("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
32
39
|
renderColumnHeaders(),
|
|
33
40
|
renderSelectAllCheckbox()
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
scrollArea_default
|
|
4
|
-
} from "./chunk-M37VBNB3.mjs";
|
|
5
2
|
import {
|
|
6
3
|
table_body_default
|
|
7
4
|
} from "./chunk-XRC5OUYQ.mjs";
|
|
8
5
|
import {
|
|
9
6
|
table_head_default
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UNH3BCGN.mjs";
|
|
8
|
+
import {
|
|
9
|
+
scrollArea_default
|
|
10
|
+
} from "./chunk-M37VBNB3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
pagination_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-C7OF5HJF.mjs";
|
|
14
14
|
import {
|
|
15
15
|
clsx
|
|
16
16
|
} from "./chunk-27Y6K5NK.mjs";
|
|
@@ -4481,7 +4481,7 @@ var textButtonStyle = tv({
|
|
|
4481
4481
|
|
|
4482
4482
|
// src/components/breadcrumb/breadcrumb.tsx
|
|
4483
4483
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
4484
|
-
var BreadcrumbMenu = (
|
|
4484
|
+
var BreadcrumbMenu = ({ label, onClick, isCurrent, size }) => {
|
|
4485
4485
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
4486
4486
|
text_button_default,
|
|
4487
4487
|
{
|
|
@@ -4494,7 +4494,7 @@ var BreadcrumbMenu = (0, import_react2.forwardRef)(({ label, onClick, isCurrent,
|
|
|
4494
4494
|
children: label
|
|
4495
4495
|
}
|
|
4496
4496
|
);
|
|
4497
|
-
}
|
|
4497
|
+
};
|
|
4498
4498
|
var Breadcrumb = (0, import_react2.forwardRef)(({ startIconName, size, menus, classNames }, ref) => {
|
|
4499
4499
|
const slots = (0, import_react2.useMemo)(() => breadcrumbStyle({ size }), [size]);
|
|
4500
4500
|
const renderMenus = (menus2) => {
|
|
@@ -4483,7 +4483,7 @@ var textButtonStyle = tv({
|
|
|
4483
4483
|
|
|
4484
4484
|
// src/components/breadcrumb/breadcrumb.tsx
|
|
4485
4485
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
4486
|
-
var BreadcrumbMenu = (
|
|
4486
|
+
var BreadcrumbMenu = ({ label, onClick, isCurrent, size }) => {
|
|
4487
4487
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
4488
4488
|
text_button_default,
|
|
4489
4489
|
{
|
|
@@ -4496,7 +4496,7 @@ var BreadcrumbMenu = (0, import_react2.forwardRef)(({ label, onClick, isCurrent,
|
|
|
4496
4496
|
children: label
|
|
4497
4497
|
}
|
|
4498
4498
|
);
|
|
4499
|
-
}
|
|
4499
|
+
};
|
|
4500
4500
|
var Breadcrumb = (0, import_react2.forwardRef)(({ startIconName, size, menus, classNames }, ref) => {
|
|
4501
4501
|
const slots = (0, import_react2.useMemo)(() => breadcrumbStyle({ size }), [size]);
|
|
4502
4502
|
const renderMenus = (menus2) => {
|
|
@@ -4360,7 +4360,7 @@ function toVal(mix) {
|
|
|
4360
4360
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4361
4361
|
var Input = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
4362
4362
|
const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
|
|
4363
|
-
const { classNames, label,
|
|
4363
|
+
const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
|
|
4364
4364
|
const inputRef = (0, import_react.useRef)(null);
|
|
4365
4365
|
const slots = (0, import_react.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
|
|
4366
4366
|
const getContentProps = (0, import_react.useCallback)(
|
|
@@ -4403,7 +4403,7 @@ var Input = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4403
4403
|
className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
|
|
4404
4404
|
};
|
|
4405
4405
|
return import_react.default.cloneElement(endContent, mergedProps);
|
|
4406
|
-
} else if (
|
|
4406
|
+
} else if (errorMessage) {
|
|
4407
4407
|
const iconProps = { ...getContentProps(), className: getContentProps().className };
|
|
4408
4408
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
|
|
4409
4409
|
} else {
|
|
@@ -4457,8 +4457,8 @@ var Input = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4457
4457
|
]
|
|
4458
4458
|
}
|
|
4459
4459
|
),
|
|
4460
|
-
|
|
4461
|
-
|
|
4460
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
4461
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
4462
4462
|
] })
|
|
4463
4463
|
]
|
|
4464
4464
|
}
|
|
@@ -4498,8 +4498,8 @@ var inputStyle = tv(
|
|
|
4498
4498
|
"group-has-[:hover]/input:text-neutral-dark",
|
|
4499
4499
|
"group-has-[p.error]/input:text-danger-main"
|
|
4500
4500
|
],
|
|
4501
|
-
|
|
4502
|
-
|
|
4501
|
+
helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
|
|
4502
|
+
errorMessage: ["text-danger-main"],
|
|
4503
4503
|
readonly: ["pointer-events-none", "!text-body-foreground"]
|
|
4504
4504
|
},
|
|
4505
4505
|
variants: {
|
|
@@ -4534,7 +4534,7 @@ var inputStyle = tv(
|
|
|
4534
4534
|
"group-has-[:focus]/input:text-primary-main",
|
|
4535
4535
|
"!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
|
|
4536
4536
|
],
|
|
4537
|
-
|
|
4537
|
+
helperMessage: [
|
|
4538
4538
|
"group-has-[:focus]/input:text-primary-main",
|
|
4539
4539
|
"group-has-[:focus:hover]/input:text-primary-main",
|
|
4540
4540
|
"group-has-[:focus]/input:hover:text-primary-main"
|
|
@@ -4545,7 +4545,7 @@ var inputStyle = tv(
|
|
|
4545
4545
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4546
4546
|
"!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
|
|
4547
4547
|
],
|
|
4548
|
-
|
|
4548
|
+
helperMessage: [
|
|
4549
4549
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4550
4550
|
"group-has-[:focus:hover]/input:text-secondary-main",
|
|
4551
4551
|
"group-has-[:focus]/input:hover:text-secondary-main"
|
|
@@ -4558,32 +4558,32 @@ var inputStyle = tv(
|
|
|
4558
4558
|
label: ["text-sm"],
|
|
4559
4559
|
innerWrapper: ["gap-[4px]"],
|
|
4560
4560
|
inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]", "gap-[4px]"],
|
|
4561
|
-
|
|
4562
|
-
|
|
4561
|
+
helperMessage: ["text-sm"],
|
|
4562
|
+
errorMessage: ["text-sm"]
|
|
4563
4563
|
},
|
|
4564
4564
|
md: {
|
|
4565
4565
|
base: ["text-md", "gap-[6px]"],
|
|
4566
4566
|
label: ["text-md"],
|
|
4567
4567
|
innerWrapper: ["gap-[6px]"],
|
|
4568
4568
|
inputWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]", "gap-[6px]"],
|
|
4569
|
-
|
|
4570
|
-
|
|
4569
|
+
helperMessage: ["text-sm"],
|
|
4570
|
+
errorMessage: ["text-sm"]
|
|
4571
4571
|
},
|
|
4572
4572
|
lg: {
|
|
4573
4573
|
base: ["text-lg", "gap-[8px]"],
|
|
4574
4574
|
label: ["text-lg"],
|
|
4575
4575
|
innerWrapper: ["gap-[8px]"],
|
|
4576
4576
|
inputWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]", "gap-[8px]"],
|
|
4577
|
-
|
|
4578
|
-
|
|
4577
|
+
helperMessage: ["text-md"],
|
|
4578
|
+
errorMessage: ["text-md"]
|
|
4579
4579
|
},
|
|
4580
4580
|
xl: {
|
|
4581
4581
|
base: ["text-xl", "gap-[10px]"],
|
|
4582
4582
|
label: ["text-xl"],
|
|
4583
4583
|
innerWrapper: ["gap-[10px]"],
|
|
4584
4584
|
inputWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]", "gap-[10px]"],
|
|
4585
|
-
|
|
4586
|
-
|
|
4585
|
+
helperMessage: ["text-md"],
|
|
4586
|
+
errorMessage: ["text-md"]
|
|
4587
4587
|
}
|
|
4588
4588
|
},
|
|
4589
4589
|
direction: {
|
|
@@ -4607,8 +4607,8 @@ var inputStyle = tv(
|
|
|
4607
4607
|
"group-has-[p.error]/input:placeholder:text-danger-light"
|
|
4608
4608
|
],
|
|
4609
4609
|
content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
|
|
4610
|
-
|
|
4611
|
-
|
|
4610
|
+
helperMessage: ["!text-neutral-light"],
|
|
4611
|
+
errorMessage: ["!text-danger-light"]
|
|
4612
4612
|
}
|
|
4613
4613
|
}
|
|
4614
4614
|
},
|