@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.
- package/.turbo/turbo-build.log +183 -173
- package/dist/chunk-62X5AX5B.mjs +297 -0
- package/dist/chunk-6PN3DGOE.mjs +77 -0
- package/dist/{chunk-EHRFXDSN.mjs → chunk-AIIMJZ7L.mjs} +72 -42
- package/dist/{chunk-3KVZDFMV.mjs → chunk-BCMVEGJG.mjs} +3 -3
- package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
- package/dist/{chunk-KXA73VTJ.mjs → chunk-CVQM3T2X.mjs} +4 -4
- package/dist/{chunk-RCJOJPRS.mjs → chunk-EBRCE7XY.mjs} +40 -30
- package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
- package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
- package/dist/{chunk-KLUC2BV6.mjs → chunk-IEJRE6LT.mjs} +10 -7
- package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
- package/dist/chunk-LWRK5TPZ.mjs +80 -0
- package/dist/chunk-MZ76AA76.mjs +1 -0
- package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
- package/dist/chunk-P7YYNA6L.mjs +67 -0
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.mjs +4 -4
- package/dist/components/button/text-button.mjs +2 -2
- package/dist/components/checkbox/checkbox.mjs +2 -2
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/chip/chip.mjs +2 -2
- package/dist/components/chip/index.mjs +2 -2
- package/dist/components/dateTimePicker/calendar.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
- package/dist/components/dateTimePicker/index.mjs +6 -6
- package/dist/components/dateTimePicker/timePicker.mjs +4 -4
- package/dist/components/fileUpload/fileUpload.js +62 -39
- package/dist/components/fileUpload/fileUpload.mjs +6 -6
- package/dist/components/fileUpload/index.js +62 -39
- package/dist/components/fileUpload/index.mjs +6 -6
- package/dist/components/input/index.js +62 -39
- package/dist/components/input/index.mjs +2 -2
- package/dist/components/input/input.d.mts +21 -14
- package/dist/components/input/input.d.ts +21 -14
- package/dist/components/input/input.js +62 -39
- package/dist/components/input/input.mjs +2 -2
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.mjs +2 -2
- package/dist/components/modal/index.mjs +6 -6
- package/dist/components/modal/modal.mjs +6 -6
- package/dist/components/pagination/index.js +62 -39
- package/dist/components/pagination/index.mjs +3 -3
- package/dist/components/pagination/pagination.js +62 -39
- package/dist/components/pagination/pagination.mjs +3 -3
- package/dist/components/radio/index.mjs +2 -2
- package/dist/components/radio/radio.mjs +2 -2
- package/dist/components/select/index.js +7 -4
- package/dist/components/select/index.mjs +2 -2
- package/dist/components/select/select.d.mts +9 -0
- package/dist/components/select/select.d.ts +9 -0
- package/dist/components/select/select.js +7 -4
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/skeleton/index.d.mts +2 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/index.js +141 -0
- package/dist/components/skeleton/index.mjs +10 -0
- package/dist/components/skeleton/skeleton.d.mts +14 -0
- package/dist/components/skeleton/skeleton.d.ts +14 -0
- package/dist/components/skeleton/skeleton.js +135 -0
- package/dist/components/skeleton/skeleton.mjs +9 -0
- package/dist/components/table/index.js +748 -646
- package/dist/components/table/index.mjs +11 -9
- package/dist/components/table/table-body.d.mts +6 -4
- package/dist/components/table/table-body.d.ts +6 -4
- package/dist/components/table/table-body.js +115 -63
- package/dist/components/table/table-body.mjs +5 -3
- package/dist/components/table/table-head.d.mts +3 -1
- package/dist/components/table/table-head.d.ts +3 -1
- package/dist/components/table/table-head.js +107 -21
- package/dist/components/table/table-head.mjs +5 -3
- package/dist/components/table/table.d.mts +3 -1
- package/dist/components/table/table.d.ts +3 -1
- package/dist/components/table/table.js +739 -637
- package/dist/components/table/table.mjs +9 -7
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/textarea/index.js +255 -138
- package/dist/components/textarea/index.mjs +2 -1
- package/dist/components/textarea/textarea.d.mts +157 -150
- package/dist/components/textarea/textarea.d.ts +157 -150
- package/dist/components/textarea/textarea.js +255 -138
- package/dist/components/textarea/textarea.mjs +2 -1
- package/dist/components/toast/index.mjs +3 -3
- package/dist/components/toast/toast.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +3 -3
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/components/tree/index.js +33 -11
- package/dist/components/tree/index.mjs +2 -2
- package/dist/components/tree/tree.d.mts +10 -8
- package/dist/components/tree/tree.d.ts +10 -8
- package/dist/components/tree/tree.js +33 -11
- package/dist/components/tree/tree.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +799 -593
- package/dist/index.mjs +52 -47
- package/package.json +1 -1
- package/dist/chunk-26MNALVL.mjs +0 -47
- package/dist/chunk-A5KQHWS3.mjs +0 -94
- package/dist/chunk-BKE6QF6W.mjs +0 -209
- package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
- package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
- package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
- package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
- package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
- package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
- package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
- package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
- package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
- package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
- package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
- package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
- package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
|
@@ -47,201 +47,318 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
// src/utils/clsx.ts
|
|
51
|
+
function clsx(...args) {
|
|
52
|
+
var i = 0, tmp, x, str = "";
|
|
53
|
+
while (i < args.length) {
|
|
54
|
+
if (tmp = args[i++]) {
|
|
55
|
+
if (x = toVal(tmp)) {
|
|
56
|
+
str && (str += " ");
|
|
57
|
+
str += x;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return str;
|
|
62
|
+
}
|
|
63
|
+
function toVal(mix) {
|
|
64
|
+
var k, y, str = "";
|
|
65
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
66
|
+
str += mix;
|
|
67
|
+
} else if (typeof mix === "object") {
|
|
68
|
+
if (Array.isArray(mix)) {
|
|
69
|
+
var len = mix.length;
|
|
70
|
+
for (k = 0; k < len; k++) {
|
|
71
|
+
if (mix[k]) {
|
|
72
|
+
if (y = toVal(mix[k])) {
|
|
73
|
+
str && (str += " ");
|
|
74
|
+
str += y;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
for (y in mix) {
|
|
80
|
+
if (mix[y]) {
|
|
81
|
+
str && (str += " ");
|
|
82
|
+
str += y;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return str;
|
|
88
|
+
}
|
|
89
|
+
|
|
50
90
|
// src/components/textarea/textarea.tsx
|
|
51
91
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
92
|
var Textarea = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
93
|
+
var _a, _b;
|
|
53
94
|
const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
|
|
54
|
-
const { classNames, label, errorMessage, ...textareaProps } = props;
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
[
|
|
73
|
-
);
|
|
74
|
-
const getTextareaWrapperProps = (0, import_react.useCallback)(
|
|
75
|
-
() => ({
|
|
76
|
-
className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
|
|
77
|
-
}),
|
|
78
|
-
[slots, classNames]
|
|
79
|
-
);
|
|
80
|
-
const getTextareaProps = (0, import_react.useCallback)(
|
|
81
|
-
() => ({
|
|
82
|
-
...textareaProps,
|
|
83
|
-
ref,
|
|
84
|
-
className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
|
|
85
|
-
disabled: originalProps.isDisabled,
|
|
86
|
-
required: originalProps.isRequired,
|
|
87
|
-
size: 0
|
|
88
|
-
}),
|
|
89
|
-
[textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
|
|
95
|
+
const { classNames, label, helperMessage, errorMessage, ...textareaProps } = props;
|
|
96
|
+
const [length, setLength] = (0, import_react.useState)(((_b = (_a = originalProps.value) == null ? void 0 : _a.toString()) != null ? _b : "").length);
|
|
97
|
+
const innerRef = (0, import_react.useRef)(null);
|
|
98
|
+
(0, import_react.useImperativeHandle)(ref, () => innerRef.current);
|
|
99
|
+
const autoResize = (0, import_react.useCallback)(() => {
|
|
100
|
+
const el = innerRef.current;
|
|
101
|
+
if (el) {
|
|
102
|
+
el.style.height = "auto";
|
|
103
|
+
el.style.height = el.scrollHeight + "px";
|
|
104
|
+
}
|
|
105
|
+
}, []);
|
|
106
|
+
const handleChange = (0, import_react.useCallback)(
|
|
107
|
+
(e) => {
|
|
108
|
+
var _a2;
|
|
109
|
+
setLength(e.target.value.length);
|
|
110
|
+
(_a2 = originalProps.onChange) == null ? void 0 : _a2.call(originalProps, e);
|
|
111
|
+
autoResize();
|
|
112
|
+
},
|
|
113
|
+
[originalProps, autoResize]
|
|
90
114
|
);
|
|
91
|
-
|
|
92
|
-
()
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
115
|
+
(0, import_react.useEffect)(() => {
|
|
116
|
+
autoResize();
|
|
117
|
+
}, [originalProps.value, autoResize]);
|
|
118
|
+
const slots = (0, import_react.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: clsx(
|
|
123
|
+
slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
124
|
+
variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
|
|
125
|
+
),
|
|
126
|
+
children: [
|
|
127
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: clsx(
|
|
132
|
+
slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
|
|
133
|
+
textareaProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
|
|
134
|
+
),
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
+
"textarea",
|
|
138
|
+
{
|
|
139
|
+
ref: innerRef,
|
|
140
|
+
...textareaProps,
|
|
141
|
+
readOnly: props.readOnly,
|
|
142
|
+
onChange: handleChange,
|
|
143
|
+
className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea })
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between", children: [
|
|
147
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
148
|
+
"p",
|
|
149
|
+
{
|
|
150
|
+
className: clsx(
|
|
151
|
+
slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
|
|
152
|
+
textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
|
|
153
|
+
),
|
|
154
|
+
children: helperMessage
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage }),
|
|
158
|
+
textareaProps.maxLength !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
159
|
+
"p",
|
|
160
|
+
{
|
|
161
|
+
className: clsx(
|
|
162
|
+
slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
|
|
163
|
+
textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
|
|
164
|
+
),
|
|
165
|
+
children: [
|
|
166
|
+
length,
|
|
167
|
+
" / ",
|
|
168
|
+
textareaProps.maxLength
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
] })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
]
|
|
177
|
+
}
|
|
96
178
|
);
|
|
97
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getBaseProps(), children: [
|
|
98
|
-
props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...getLabelProps(), children: props.label }),
|
|
99
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInnerWrapperProps(), children: [
|
|
100
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ...getTextareaProps() }) }),
|
|
101
|
-
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
|
|
102
|
-
] })
|
|
103
|
-
] });
|
|
104
179
|
});
|
|
105
180
|
Textarea.displayName = "Textarea";
|
|
106
181
|
var textarea_default = Textarea;
|
|
107
182
|
var textareaStyle = (0, import_tailwind_variants.tv)({
|
|
108
183
|
slots: {
|
|
109
|
-
base: ["group/textarea", "flex", "
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"bg-transparent",
|
|
115
|
-
"border-neutral-main",
|
|
116
|
-
"group-has-[p]/textarea:border-danger-main",
|
|
117
|
-
"group-has-[p]/textarea:bg-danger-soft",
|
|
118
|
-
"transition duration-200"
|
|
119
|
-
],
|
|
184
|
+
base: ["group/textarea", "flex", "select-none"],
|
|
185
|
+
vertical: ["flex-col"],
|
|
186
|
+
horizon: ["flex-row", "gap-0"],
|
|
187
|
+
label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
|
|
188
|
+
wrapper: ["flex", "flex-col"],
|
|
120
189
|
textarea: [
|
|
121
190
|
"w-full",
|
|
191
|
+
"h-full",
|
|
122
192
|
"bg-transparent",
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
193
|
+
"text-neutral-main",
|
|
194
|
+
"placeholder:!text-neutral-main",
|
|
195
|
+
"outline-none",
|
|
196
|
+
"resize-none",
|
|
197
|
+
"focus:ring-0",
|
|
198
|
+
"group-has-[:hover]/textarea:!text-neutral-dark",
|
|
199
|
+
"group-has-[:hover]/textarea:placeholder:!text-neutral-dark",
|
|
200
|
+
"group-has-[:focus]/textarea:!text-neutral-dark",
|
|
201
|
+
"group-has-[:focus]/textarea:placeholder:!text-neutral-dark",
|
|
202
|
+
"group-has-[p.error]/textarea:bg-danger-soft",
|
|
203
|
+
"group-has-[p.error]/textarea:text-danger-main",
|
|
204
|
+
"group-has-[p.error]/textarea:placeholder:!text-danger-main"
|
|
205
|
+
],
|
|
206
|
+
helperMessage: [
|
|
207
|
+
"text-neutral-main",
|
|
208
|
+
"group-has-[:hover]/textarea:text-neutral-dark",
|
|
209
|
+
"group-has-[p.error]/textarea:text-danger-main"
|
|
210
|
+
],
|
|
211
|
+
errorMessage: ["text-danger-main"],
|
|
212
|
+
readonlyWrapper: [
|
|
213
|
+
"pointer-events-none",
|
|
214
|
+
"[&>textarea]:!text-body-foreground",
|
|
215
|
+
"[&>textarea]:placeholder:!text-body-foreground"
|
|
126
216
|
],
|
|
127
|
-
|
|
217
|
+
readonly: []
|
|
128
218
|
},
|
|
129
219
|
variants: {
|
|
130
220
|
variant: {
|
|
131
221
|
solid: {
|
|
132
|
-
|
|
222
|
+
textarea: ["border-transparent", "bg-trans-soft"],
|
|
223
|
+
readonlyWrapper: ["[&>textarea]:!bg-trans-light"]
|
|
133
224
|
},
|
|
134
|
-
|
|
135
|
-
|
|
225
|
+
outline: {
|
|
226
|
+
textarea: [
|
|
227
|
+
"border-neutral-light",
|
|
228
|
+
"group-has-[:hover]/textarea:bg-trans-soft",
|
|
229
|
+
"group-has-[:focus]/textarea:bg-body-background",
|
|
230
|
+
"group-has-[p.error]/textarea:border-danger-main"
|
|
231
|
+
],
|
|
232
|
+
readonlyWrapper: ["[&>textarea]:!bg-trans-soft"]
|
|
136
233
|
}
|
|
137
234
|
},
|
|
138
235
|
color: {
|
|
139
|
-
primary: {
|
|
140
|
-
|
|
236
|
+
primary: {
|
|
237
|
+
helperMessage: [
|
|
238
|
+
"group-has-[:focus]/textarea:!text-primary-main",
|
|
239
|
+
"group-has-[:focus]/textarea:!text-primary-main",
|
|
240
|
+
"group-has-[:focus]/textarea:hover:!text-primary-main",
|
|
241
|
+
"group-has-[:focus:hover]/textarea:!text-primary-main",
|
|
242
|
+
"group-has-[p.error]:not(textarea:focus):hover/textarea:!text-primary-main"
|
|
243
|
+
],
|
|
244
|
+
readonly: ["!text-primary-main"]
|
|
245
|
+
},
|
|
246
|
+
secondary: {
|
|
247
|
+
helperMessage: [
|
|
248
|
+
"group-has-[:focus]/textarea:text-secondary-main",
|
|
249
|
+
"group-has-[:focus]/textarea:text-secondary-main",
|
|
250
|
+
"group-has-[:focus]/textarea:hover:text-secondary-main",
|
|
251
|
+
"group-has-[:focus:hover]/textarea:text-secondary-main",
|
|
252
|
+
"group-has-[p.error]:not(textarea:focus):hover/textarea:!text-secondary-main"
|
|
253
|
+
],
|
|
254
|
+
readonly: ["!text-secondary-main"]
|
|
255
|
+
}
|
|
141
256
|
},
|
|
142
257
|
size: {
|
|
143
258
|
sm: {
|
|
144
|
-
base: "gap-[
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
259
|
+
base: ["text-sm", "gap-[4px]"],
|
|
260
|
+
label: ["text-sm"],
|
|
261
|
+
wrapper: ["gap-[4px]"],
|
|
262
|
+
textarea: ["w-[240px]", "h-[24px]", "rounded-sm", "p-[8px]", "gap-[4px]"],
|
|
263
|
+
helperMessage: ["text-sm"],
|
|
264
|
+
errorMessage: ["text-sm"]
|
|
149
265
|
},
|
|
150
266
|
md: {
|
|
151
|
-
base: "gap-[
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
267
|
+
base: ["text-md", "gap-[6px]"],
|
|
268
|
+
label: ["text-md"],
|
|
269
|
+
wrapper: ["gap-[6px]"],
|
|
270
|
+
textarea: ["w-[240px]", "h-[32px]", "rounded-md", "p-[8px]", "gap-[6px]"],
|
|
271
|
+
helperMessage: ["text-sm"],
|
|
272
|
+
errorMessage: ["text-sm"]
|
|
156
273
|
},
|
|
157
274
|
lg: {
|
|
158
|
-
base: "gap-[
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
275
|
+
base: ["text-lg", "gap-[8px]"],
|
|
276
|
+
label: ["text-lg"],
|
|
277
|
+
wrapper: ["gap-[8px]"],
|
|
278
|
+
textarea: ["w-[240px]", "h-[40px]", "rounded-lg", "p-[10px]", "gap-[8px]"],
|
|
279
|
+
helperMessage: ["text-md"],
|
|
280
|
+
errorMessage: ["text-md"]
|
|
163
281
|
},
|
|
164
282
|
xl: {
|
|
165
|
-
base: "gap-[10px]",
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
},
|
|
172
|
-
radius: {
|
|
173
|
-
default: {},
|
|
174
|
-
none: {
|
|
175
|
-
textareaWrapper: "rounded-none",
|
|
176
|
-
textarea: "rounded-none"
|
|
177
|
-
},
|
|
178
|
-
full: {
|
|
179
|
-
textareaWrapper: "rounded-full",
|
|
180
|
-
textarea: "rounded-full"
|
|
283
|
+
base: ["text-xl", "gap-[10px]"],
|
|
284
|
+
label: ["text-xl"],
|
|
285
|
+
wrapper: ["gap-[10px]"],
|
|
286
|
+
textarea: ["w-[240px]", "h-[50px]", "rounded-lg", "p-[10px]", "gap-[10px]"],
|
|
287
|
+
helperMessage: ["text-md"],
|
|
288
|
+
errorMessage: ["text-md"]
|
|
181
289
|
}
|
|
182
290
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
textareaWrapper: "w-full",
|
|
187
|
-
textarea: "w-full"
|
|
188
|
-
}
|
|
291
|
+
direction: {
|
|
292
|
+
vertical: "",
|
|
293
|
+
horizon: ""
|
|
189
294
|
},
|
|
190
|
-
|
|
295
|
+
full: {
|
|
191
296
|
true: {
|
|
192
|
-
base: ["
|
|
193
|
-
|
|
194
|
-
textarea: ["
|
|
195
|
-
label: ["text-neutral-light", "pointer-events-none"],
|
|
196
|
-
errorMessage: "text-danger-light"
|
|
297
|
+
base: ["w-full"],
|
|
298
|
+
wrapper: ["flex-1"],
|
|
299
|
+
textarea: ["w-full"]
|
|
197
300
|
}
|
|
198
301
|
},
|
|
199
|
-
|
|
302
|
+
disabled: {
|
|
200
303
|
true: {
|
|
201
|
-
|
|
304
|
+
textarea: [
|
|
305
|
+
"bg-neutral-soft",
|
|
306
|
+
"pointer-events-none",
|
|
307
|
+
"text-neutral-light",
|
|
308
|
+
"placeholder:!text-neutral-light",
|
|
309
|
+
"group-has-[p.error]/textarea:text-danger-light",
|
|
310
|
+
"group-has-[p.error]/textarea:border-danger-light",
|
|
311
|
+
"group-has-[p.error]/textarea:placeholder:!text-danger-light"
|
|
312
|
+
],
|
|
313
|
+
helperMessage: ["!text-neutral-light", "group-has-[p.error]/textarea:!text-danger-light"],
|
|
314
|
+
errorMessage: ["!text-danger-light"]
|
|
202
315
|
}
|
|
203
316
|
}
|
|
204
317
|
},
|
|
205
|
-
defaultVariants: {
|
|
206
|
-
variant: "solid",
|
|
207
|
-
color: "primary",
|
|
208
|
-
size: "md",
|
|
209
|
-
fullWidth: false,
|
|
210
|
-
isDisabled: false,
|
|
211
|
-
isRequired: false
|
|
212
|
-
},
|
|
213
318
|
compoundVariants: [
|
|
214
|
-
// variants & color
|
|
215
319
|
{
|
|
216
|
-
variant: "
|
|
217
|
-
|
|
320
|
+
variant: "outline",
|
|
321
|
+
size: "sm",
|
|
322
|
+
class: {
|
|
323
|
+
textarea: ["border-sm"]
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
variant: "outline",
|
|
328
|
+
size: "md",
|
|
218
329
|
class: {
|
|
219
|
-
|
|
330
|
+
textarea: ["border-md"]
|
|
220
331
|
}
|
|
221
332
|
},
|
|
222
333
|
{
|
|
223
|
-
variant: "
|
|
224
|
-
|
|
334
|
+
variant: "outline",
|
|
335
|
+
size: "lg",
|
|
225
336
|
class: {
|
|
226
|
-
|
|
227
|
-
textarea: "focus:bg-secondary-main"
|
|
337
|
+
textarea: ["border-lg"]
|
|
228
338
|
}
|
|
229
339
|
},
|
|
230
|
-
// Variants & isDisabled
|
|
231
340
|
{
|
|
232
|
-
variant: "
|
|
233
|
-
|
|
341
|
+
variant: "outline",
|
|
342
|
+
size: "xl",
|
|
234
343
|
class: {
|
|
235
|
-
|
|
344
|
+
textarea: ["border-xl"]
|
|
236
345
|
}
|
|
237
346
|
},
|
|
238
|
-
// isRequired & isDisabled
|
|
239
347
|
{
|
|
240
|
-
|
|
241
|
-
|
|
348
|
+
disabled: true,
|
|
349
|
+
variant: ["outline"],
|
|
242
350
|
class: {
|
|
243
|
-
|
|
351
|
+
textarea: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
|
|
244
352
|
}
|
|
245
353
|
}
|
|
246
|
-
]
|
|
354
|
+
],
|
|
355
|
+
defaultVariants: {
|
|
356
|
+
variant: "solid",
|
|
357
|
+
color: "primary",
|
|
358
|
+
size: "md",
|
|
359
|
+
direction: "vertical",
|
|
360
|
+
fullWidth: false,
|
|
361
|
+
disabled: false,
|
|
362
|
+
readonly: false
|
|
363
|
+
}
|
|
247
364
|
});
|
|
@@ -3,17 +3,17 @@ import "../../chunk-LUWGOKLG.mjs";
|
|
|
3
3
|
import {
|
|
4
4
|
ToastProvider,
|
|
5
5
|
useToast
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-IBI3OVQI.mjs";
|
|
7
7
|
import "../../chunk-ZOTHPHXA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
toast_default
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-MEY4IL7D.mjs";
|
|
11
11
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
12
12
|
import "../../chunk-2TKEWFGH.mjs";
|
|
13
13
|
import "../../chunk-2SDYFOZL.mjs";
|
|
14
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
14
15
|
import "../../chunk-27Y6K5NK.mjs";
|
|
15
16
|
import "../../chunk-E3G5QXSH.mjs";
|
|
16
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
17
17
|
import "../../chunk-AC6TWLRT.mjs";
|
|
18
18
|
export {
|
|
19
19
|
toast_default as Toast,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
toast_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-MEY4IL7D.mjs";
|
|
5
5
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
6
6
|
import "../../chunk-2TKEWFGH.mjs";
|
|
7
7
|
import "../../chunk-2SDYFOZL.mjs";
|
|
8
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
8
9
|
import "../../chunk-27Y6K5NK.mjs";
|
|
9
10
|
import "../../chunk-E3G5QXSH.mjs";
|
|
10
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
11
11
|
import "../../chunk-AC6TWLRT.mjs";
|
|
12
12
|
export {
|
|
13
13
|
toast_default as default
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ToastProvider,
|
|
4
4
|
useToast
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-IBI3OVQI.mjs";
|
|
6
6
|
import "../../chunk-ZOTHPHXA.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-MEY4IL7D.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-2TKEWFGH.mjs";
|
|
10
10
|
import "../../chunk-2SDYFOZL.mjs";
|
|
11
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
11
12
|
import "../../chunk-27Y6K5NK.mjs";
|
|
12
13
|
import "../../chunk-E3G5QXSH.mjs";
|
|
13
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
14
14
|
import "../../chunk-AC6TWLRT.mjs";
|
|
15
15
|
export {
|
|
16
16
|
ToastProvider,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import "../../chunk-HIE2YRGA.mjs";
|
|
3
3
|
import {
|
|
4
4
|
tooltip_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-Z2537DF6.mjs";
|
|
6
6
|
import "../../chunk-ZMOAFSYE.mjs";
|
|
7
7
|
import "../../chunk-WSIADHVC.mjs";
|
|
8
|
-
import "../../chunk-E3G5QXSH.mjs";
|
|
9
8
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
9
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
10
10
|
import "../../chunk-AC6TWLRT.mjs";
|
|
11
11
|
export {
|
|
12
12
|
tooltip_default as Tooltip
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
tooltip_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-Z2537DF6.mjs";
|
|
5
5
|
import "../../chunk-ZMOAFSYE.mjs";
|
|
6
6
|
import "../../chunk-WSIADHVC.mjs";
|
|
7
|
-
import "../../chunk-E3G5QXSH.mjs";
|
|
8
7
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
8
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
9
9
|
import "../../chunk-AC6TWLRT.mjs";
|
|
10
10
|
export {
|
|
11
11
|
tooltip_default as default
|
|
@@ -4398,7 +4398,11 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4398
4398
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4399
4399
|
"div",
|
|
4400
4400
|
{
|
|
4401
|
-
className: clsx(
|
|
4401
|
+
className: clsx(
|
|
4402
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4403
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4404
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4405
|
+
),
|
|
4402
4406
|
onClick: handleClick,
|
|
4403
4407
|
onContextMenu: handleRightClick,
|
|
4404
4408
|
children: [
|
|
@@ -4413,7 +4417,7 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4413
4417
|
}
|
|
4414
4418
|
),
|
|
4415
4419
|
fileIcon,
|
|
4416
|
-
node.
|
|
4420
|
+
node.content
|
|
4417
4421
|
]
|
|
4418
4422
|
}
|
|
4419
4423
|
),
|
|
@@ -4449,13 +4453,33 @@ var Tree = ({
|
|
|
4449
4453
|
onExpand
|
|
4450
4454
|
}) => {
|
|
4451
4455
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4456
|
+
const handleClick = (e) => {
|
|
4457
|
+
var _a;
|
|
4458
|
+
(_a = group.onClick) == null ? void 0 : _a.call(group, e);
|
|
4459
|
+
};
|
|
4460
|
+
const handleRightClick = (e) => {
|
|
4461
|
+
var _a;
|
|
4462
|
+
e.preventDefault();
|
|
4463
|
+
(_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
|
|
4464
|
+
};
|
|
4452
4465
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
4453
4466
|
headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
|
|
4454
4467
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
4455
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4468
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4469
|
+
"div",
|
|
4470
|
+
{
|
|
4471
|
+
className: clsx(
|
|
4472
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4473
|
+
group.onClick || group.onRightClick ? slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }) : ""
|
|
4474
|
+
),
|
|
4475
|
+
onClick: handleClick,
|
|
4476
|
+
onContextMenu: handleRightClick,
|
|
4477
|
+
children: [
|
|
4478
|
+
groupIcon,
|
|
4479
|
+
group.content
|
|
4480
|
+
]
|
|
4481
|
+
}
|
|
4482
|
+
),
|
|
4459
4483
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4460
4484
|
TreeNodeItem,
|
|
4461
4485
|
{
|
|
@@ -4478,7 +4502,6 @@ var treeStyle = tv({
|
|
|
4478
4502
|
slots: {
|
|
4479
4503
|
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
4480
4504
|
wrapper: ["flex", "flex-col", "gap-[5px]"],
|
|
4481
|
-
group: ["flex", "items-center", "gap-[5px]", "text-md", "font-bold", "text-body-foreground", "p-[5px]"],
|
|
4482
4505
|
node: [
|
|
4483
4506
|
"flex",
|
|
4484
4507
|
"items-center",
|
|
@@ -4486,11 +4509,10 @@ var treeStyle = tv({
|
|
|
4486
4509
|
"text-md",
|
|
4487
4510
|
"font-bold",
|
|
4488
4511
|
"text-body-foreground",
|
|
4489
|
-
"hover:bg-neutral-soft",
|
|
4490
|
-
"p-[5px]",
|
|
4491
4512
|
"rounded-[5px]",
|
|
4492
|
-
"
|
|
4493
|
-
]
|
|
4513
|
+
"p-[5px]"
|
|
4514
|
+
],
|
|
4515
|
+
clickable: ["hover:bg-neutral-soft", "cursor-pointer"]
|
|
4494
4516
|
}
|
|
4495
4517
|
});
|
|
4496
4518
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "../../chunk-MBLZYQCN.mjs";
|
|
3
3
|
import {
|
|
4
4
|
tree_default
|
|
5
|
-
} from "../../chunk-
|
|
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_default as Tree
|