@deepnoid/ui 0.1.24 → 0.1.25
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 +129 -129
- package/dist/chunk-K4QY2F5J.mjs +99 -0
- package/dist/components/table/index.mjs +6 -6
- package/dist/components/table/table.mjs +3 -3
- package/dist/components/toast/index.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +2 -2
- package/dist/components/tree/index.js +93 -31
- package/dist/components/tree/index.mjs +2 -1
- package/dist/components/tree/tree.d.mts +1 -0
- package/dist/components/tree/tree.d.ts +1 -0
- package/dist/components/tree/tree.js +93 -31
- package/dist/components/tree/tree.mjs +2 -1
- package/dist/index.js +53 -31
- package/dist/index.mjs +25 -25
- package/package.json +1 -1
- package/dist/chunk-OS26K37M.mjs +0 -74
- package/dist/{chunk-6OMHIMIA.mjs → chunk-6EU5GUL5.mjs} +3 -3
- package/dist/{chunk-YBDA3WQP.mjs → chunk-UAHTRCKG.mjs} +3 -3
|
@@ -4296,47 +4296,109 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
|
|
|
4296
4296
|
};
|
|
4297
4297
|
var Icon_default = Icon;
|
|
4298
4298
|
|
|
4299
|
+
// src/utils/clsx.ts
|
|
4300
|
+
function clsx(...args) {
|
|
4301
|
+
var i = 0, tmp, x, str = "";
|
|
4302
|
+
while (i < args.length) {
|
|
4303
|
+
if (tmp = args[i++]) {
|
|
4304
|
+
if (x = toVal(tmp)) {
|
|
4305
|
+
str && (str += " ");
|
|
4306
|
+
str += x;
|
|
4307
|
+
}
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
return str;
|
|
4311
|
+
}
|
|
4312
|
+
function toVal(mix) {
|
|
4313
|
+
var k, y, str = "";
|
|
4314
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
4315
|
+
str += mix;
|
|
4316
|
+
} else if (typeof mix === "object") {
|
|
4317
|
+
if (Array.isArray(mix)) {
|
|
4318
|
+
var len = mix.length;
|
|
4319
|
+
for (k = 0; k < len; k++) {
|
|
4320
|
+
if (mix[k]) {
|
|
4321
|
+
if (y = toVal(mix[k])) {
|
|
4322
|
+
str && (str += " ");
|
|
4323
|
+
str += y;
|
|
4324
|
+
}
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4327
|
+
} else {
|
|
4328
|
+
for (y in mix) {
|
|
4329
|
+
if (mix[y]) {
|
|
4330
|
+
str && (str += " ");
|
|
4331
|
+
str += y;
|
|
4332
|
+
}
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
return str;
|
|
4337
|
+
}
|
|
4338
|
+
|
|
4299
4339
|
// src/components/tree/tree.tsx
|
|
4300
4340
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4301
|
-
var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth, fileIcon, classNames }) => {
|
|
4341
|
+
var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth, fileIcon, isLoading, classNames }) => {
|
|
4302
4342
|
var _a;
|
|
4303
4343
|
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
|
4304
4344
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4305
4345
|
const toggleOpen = (0, import_react.useCallback)(() => {
|
|
4306
4346
|
setIsOpen((prev) => !prev);
|
|
4307
4347
|
}, []);
|
|
4308
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
}
|
|
4348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4349
|
+
"div",
|
|
4350
|
+
{
|
|
4351
|
+
className: clsx(
|
|
4352
|
+
depth > 1 ? "ml-[30px]" : "",
|
|
4353
|
+
"transition-all duration-150 ease-out",
|
|
4354
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
4316
4355
|
),
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
|
|
4337
|
-
] })
|
|
4338
|
-
] });
|
|
4356
|
+
children: [
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
|
|
4358
|
+
node.children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4359
|
+
Icon_default,
|
|
4360
|
+
{
|
|
4361
|
+
name: "right-chevron",
|
|
4362
|
+
className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
|
|
4363
|
+
}
|
|
4364
|
+
),
|
|
4365
|
+
fileIcon,
|
|
4366
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
|
|
4367
|
+
var _a2;
|
|
4368
|
+
return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
|
|
4369
|
+
}, children: node.label })
|
|
4370
|
+
] }),
|
|
4371
|
+
isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
|
|
4372
|
+
]
|
|
4373
|
+
}
|
|
4374
|
+
);
|
|
4339
4375
|
});
|
|
4376
|
+
var Tree = (0, import_react.forwardRef)(
|
|
4377
|
+
({ headerContent, group, groupIcon, fileIcon, isLoading, classNames }) => {
|
|
4378
|
+
const { label, data, onClick } = group;
|
|
4379
|
+
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
4381
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
4384
|
+
groupIcon,
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
|
|
4386
|
+
] }),
|
|
4387
|
+
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4388
|
+
TreeNodeItem,
|
|
4389
|
+
{
|
|
4390
|
+
node,
|
|
4391
|
+
depth: 1,
|
|
4392
|
+
classNames,
|
|
4393
|
+
fileIcon,
|
|
4394
|
+
isLoading
|
|
4395
|
+
},
|
|
4396
|
+
node.id
|
|
4397
|
+
))
|
|
4398
|
+
] })
|
|
4399
|
+
] });
|
|
4400
|
+
}
|
|
4401
|
+
);
|
|
4340
4402
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
4341
4403
|
Tree.displayName = "Tree";
|
|
4342
4404
|
var tree_default = Tree;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import "../../chunk-MBLZYQCN.mjs";
|
|
3
3
|
import {
|
|
4
4
|
tree_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-K4QY2F5J.mjs";
|
|
6
6
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
7
7
|
import "../../chunk-HWL7TPUN.mjs";
|
|
8
8
|
import "../../chunk-3IU2RPSM.mjs";
|
|
9
9
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
10
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
10
11
|
import "../../chunk-AC6TWLRT.mjs";
|
|
11
12
|
export {
|
|
12
13
|
tree_default as Tree
|
|
@@ -4294,47 +4294,109 @@ var Icon = ({ name, size = "md", fill = false, className, onClick, ...props }) =
|
|
|
4294
4294
|
};
|
|
4295
4295
|
var Icon_default = Icon;
|
|
4296
4296
|
|
|
4297
|
+
// src/utils/clsx.ts
|
|
4298
|
+
function clsx(...args) {
|
|
4299
|
+
var i = 0, tmp, x, str = "";
|
|
4300
|
+
while (i < args.length) {
|
|
4301
|
+
if (tmp = args[i++]) {
|
|
4302
|
+
if (x = toVal(tmp)) {
|
|
4303
|
+
str && (str += " ");
|
|
4304
|
+
str += x;
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4308
|
+
return str;
|
|
4309
|
+
}
|
|
4310
|
+
function toVal(mix) {
|
|
4311
|
+
var k, y, str = "";
|
|
4312
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
4313
|
+
str += mix;
|
|
4314
|
+
} else if (typeof mix === "object") {
|
|
4315
|
+
if (Array.isArray(mix)) {
|
|
4316
|
+
var len = mix.length;
|
|
4317
|
+
for (k = 0; k < len; k++) {
|
|
4318
|
+
if (mix[k]) {
|
|
4319
|
+
if (y = toVal(mix[k])) {
|
|
4320
|
+
str && (str += " ");
|
|
4321
|
+
str += y;
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
} else {
|
|
4326
|
+
for (y in mix) {
|
|
4327
|
+
if (mix[y]) {
|
|
4328
|
+
str && (str += " ");
|
|
4329
|
+
str += y;
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
}
|
|
4333
|
+
}
|
|
4334
|
+
return str;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4297
4337
|
// src/components/tree/tree.tsx
|
|
4298
4338
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4299
|
-
var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth, fileIcon, classNames }) => {
|
|
4339
|
+
var TreeNodeItem = (0, import_react.forwardRef)(({ node, depth, fileIcon, isLoading, classNames }) => {
|
|
4300
4340
|
var _a;
|
|
4301
4341
|
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
|
4302
4342
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4303
4343
|
const toggleOpen = (0, import_react.useCallback)(() => {
|
|
4304
4344
|
setIsOpen((prev) => !prev);
|
|
4305
4345
|
}, []);
|
|
4306
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
}
|
|
4346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4347
|
+
"div",
|
|
4348
|
+
{
|
|
4349
|
+
className: clsx(
|
|
4350
|
+
depth > 1 ? "ml-[30px]" : "",
|
|
4351
|
+
"transition-all duration-150 ease-out",
|
|
4352
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
4314
4353
|
),
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
|
|
4335
|
-
] })
|
|
4336
|
-
] });
|
|
4354
|
+
children: [
|
|
4355
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
|
|
4356
|
+
node.children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4357
|
+
Icon_default,
|
|
4358
|
+
{
|
|
4359
|
+
name: "right-chevron",
|
|
4360
|
+
className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
|
|
4361
|
+
}
|
|
4362
|
+
),
|
|
4363
|
+
fileIcon,
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
|
|
4365
|
+
var _a2;
|
|
4366
|
+
return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
|
|
4367
|
+
}, children: node.label })
|
|
4368
|
+
] }),
|
|
4369
|
+
isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
|
|
4370
|
+
]
|
|
4371
|
+
}
|
|
4372
|
+
);
|
|
4337
4373
|
});
|
|
4374
|
+
var Tree = (0, import_react.forwardRef)(
|
|
4375
|
+
({ headerContent, group, groupIcon, fileIcon, isLoading, classNames }) => {
|
|
4376
|
+
const { label, data, onClick } = group;
|
|
4377
|
+
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
4379
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: headerContent }),
|
|
4380
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
4381
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
4382
|
+
groupIcon,
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
|
|
4384
|
+
] }),
|
|
4385
|
+
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4386
|
+
TreeNodeItem,
|
|
4387
|
+
{
|
|
4388
|
+
node,
|
|
4389
|
+
depth: 1,
|
|
4390
|
+
classNames,
|
|
4391
|
+
fileIcon,
|
|
4392
|
+
isLoading
|
|
4393
|
+
},
|
|
4394
|
+
node.id
|
|
4395
|
+
))
|
|
4396
|
+
] })
|
|
4397
|
+
] });
|
|
4398
|
+
}
|
|
4399
|
+
);
|
|
4338
4400
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
4339
4401
|
Tree.displayName = "Tree";
|
|
4340
4402
|
var tree_default = Tree;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
tree_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-K4QY2F5J.mjs";
|
|
5
5
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
6
6
|
import "../../chunk-HWL7TPUN.mjs";
|
|
7
7
|
import "../../chunk-3IU2RPSM.mjs";
|
|
8
8
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
9
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
9
10
|
import "../../chunk-AC6TWLRT.mjs";
|
|
10
11
|
export {
|
|
11
12
|
tree_default as default
|
package/dist/index.js
CHANGED
|
@@ -10001,45 +10001,67 @@ var dateTimePickerStyle = tv({
|
|
|
10001
10001
|
// src/components/tree/tree.tsx
|
|
10002
10002
|
var import_react34 = require("react");
|
|
10003
10003
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
10004
|
-
var TreeNodeItem = (0, import_react34.forwardRef)(({ node, depth, fileIcon, classNames }) => {
|
|
10004
|
+
var TreeNodeItem = (0, import_react34.forwardRef)(({ node, depth, fileIcon, isLoading, classNames }) => {
|
|
10005
10005
|
var _a;
|
|
10006
10006
|
const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
|
|
10007
10007
|
const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
|
|
10008
10008
|
const toggleOpen = (0, import_react34.useCallback)(() => {
|
|
10009
10009
|
setIsOpen((prev) => !prev);
|
|
10010
10010
|
}, []);
|
|
10011
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
}
|
|
10011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
10012
|
+
"div",
|
|
10013
|
+
{
|
|
10014
|
+
className: clsx(
|
|
10015
|
+
depth > 1 ? "ml-[30px]" : "",
|
|
10016
|
+
"transition-all duration-150 ease-out",
|
|
10017
|
+
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
10019
10018
|
),
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
|
|
10040
|
-
] })
|
|
10041
|
-
] });
|
|
10019
|
+
children: [
|
|
10020
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
|
|
10021
|
+
node.children && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
10022
|
+
Icon_default,
|
|
10023
|
+
{
|
|
10024
|
+
name: "right-chevron",
|
|
10025
|
+
className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
|
|
10026
|
+
}
|
|
10027
|
+
),
|
|
10028
|
+
fileIcon,
|
|
10029
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
|
|
10030
|
+
var _a2;
|
|
10031
|
+
return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
|
|
10032
|
+
}, children: node.label })
|
|
10033
|
+
] }),
|
|
10034
|
+
isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
|
|
10035
|
+
]
|
|
10036
|
+
}
|
|
10037
|
+
);
|
|
10042
10038
|
});
|
|
10039
|
+
var Tree = (0, import_react34.forwardRef)(
|
|
10040
|
+
({ headerContent, group, groupIcon, fileIcon, isLoading, classNames }) => {
|
|
10041
|
+
const { label, data, onClick } = group;
|
|
10042
|
+
const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
|
|
10043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
10044
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: headerContent }),
|
|
10045
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
10046
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
10047
|
+
groupIcon,
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
|
|
10049
|
+
] }),
|
|
10050
|
+
data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
10051
|
+
TreeNodeItem,
|
|
10052
|
+
{
|
|
10053
|
+
node,
|
|
10054
|
+
depth: 1,
|
|
10055
|
+
classNames,
|
|
10056
|
+
fileIcon,
|
|
10057
|
+
isLoading
|
|
10058
|
+
},
|
|
10059
|
+
node.id
|
|
10060
|
+
))
|
|
10061
|
+
] })
|
|
10062
|
+
] });
|
|
10063
|
+
}
|
|
10064
|
+
);
|
|
10043
10065
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
10044
10066
|
Tree.displayName = "Tree";
|
|
10045
10067
|
var tree_default = Tree;
|
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import {
|
|
4
|
-
tree_default
|
|
5
|
-
} from "./chunk-OS26K37M.mjs";
|
|
6
|
-
import "./chunk-LUWGOKLG.mjs";
|
|
7
|
-
import {
|
|
8
|
-
ToastProvider,
|
|
9
|
-
useToast
|
|
10
|
-
} from "./chunk-YBDA3WQP.mjs";
|
|
11
|
-
import "./chunk-ZOTHPHXA.mjs";
|
|
2
|
+
import "./chunk-QCEKPS7U.mjs";
|
|
12
3
|
import {
|
|
13
|
-
|
|
14
|
-
} from "./chunk-
|
|
4
|
+
select_default
|
|
5
|
+
} from "./chunk-MSAULFDB.mjs";
|
|
15
6
|
import "./chunk-HIE2YRGA.mjs";
|
|
16
7
|
import {
|
|
17
8
|
tooltip_default
|
|
18
9
|
} from "./chunk-Z2537DF6.mjs";
|
|
19
10
|
import "./chunk-ZMOAFSYE.mjs";
|
|
20
11
|
import "./chunk-WSIADHVC.mjs";
|
|
21
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-MBLZYQCN.mjs";
|
|
22
13
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-XRC5OUYQ.mjs";
|
|
26
|
-
import "./chunk-EAK5DVWA.mjs";
|
|
14
|
+
tree_default
|
|
15
|
+
} from "./chunk-K4QY2F5J.mjs";
|
|
27
16
|
import "./chunk-3MY6LO7N.mjs";
|
|
28
17
|
import {
|
|
29
18
|
tabs_default
|
|
@@ -32,21 +21,32 @@ import "./chunk-RRAZM5D3.mjs";
|
|
|
32
21
|
import {
|
|
33
22
|
textarea_default
|
|
34
23
|
} from "./chunk-BKE6QF6W.mjs";
|
|
35
|
-
import "./chunk-DQRAFUDA.mjs";
|
|
36
|
-
import {
|
|
37
|
-
scrollArea_default
|
|
38
|
-
} from "./chunk-M37VBNB3.mjs";
|
|
39
|
-
import "./chunk-QCEKPS7U.mjs";
|
|
40
|
-
import {
|
|
41
|
-
select_default
|
|
42
|
-
} from "./chunk-MSAULFDB.mjs";
|
|
43
24
|
import "./chunk-LVFI2NOH.mjs";
|
|
44
25
|
import {
|
|
45
26
|
switch_default
|
|
46
27
|
} from "./chunk-Z74QNVPG.mjs";
|
|
28
|
+
import "./chunk-LUWGOKLG.mjs";
|
|
29
|
+
import {
|
|
30
|
+
ToastProvider,
|
|
31
|
+
useToast
|
|
32
|
+
} from "./chunk-UAHTRCKG.mjs";
|
|
33
|
+
import {
|
|
34
|
+
toast_default
|
|
35
|
+
} from "./chunk-OUAKGMDW.mjs";
|
|
36
|
+
import "./chunk-ZOTHPHXA.mjs";
|
|
37
|
+
import "./chunk-DX3KXNP6.mjs";
|
|
47
38
|
import {
|
|
48
39
|
form_table_default
|
|
49
40
|
} from "./chunk-ICZTNO4V.mjs";
|
|
41
|
+
import {
|
|
42
|
+
table_default
|
|
43
|
+
} from "./chunk-6EU5GUL5.mjs";
|
|
44
|
+
import "./chunk-DQRAFUDA.mjs";
|
|
45
|
+
import {
|
|
46
|
+
scrollArea_default
|
|
47
|
+
} from "./chunk-M37VBNB3.mjs";
|
|
48
|
+
import "./chunk-XRC5OUYQ.mjs";
|
|
49
|
+
import "./chunk-EAK5DVWA.mjs";
|
|
50
50
|
import "./chunk-7B7LRG5J.mjs";
|
|
51
51
|
import {
|
|
52
52
|
pagination_default
|
package/package.json
CHANGED
package/dist/chunk-OS26K37M.mjs
DELETED
|
@@ -1,74 +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
|
-
|
|
9
|
-
// src/components/tree/tree.tsx
|
|
10
|
-
import { forwardRef, useMemo, useState, useCallback } from "react";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var TreeNodeItem = forwardRef(({ node, depth, fileIcon, classNames }) => {
|
|
13
|
-
var _a;
|
|
14
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
15
|
-
const slots = useMemo(() => treeStyle(), []);
|
|
16
|
-
const toggleOpen = useCallback(() => {
|
|
17
|
-
setIsOpen((prev) => !prev);
|
|
18
|
-
}, []);
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), onClick: toggleOpen, children: [
|
|
21
|
-
node.children && /* @__PURE__ */ jsx(
|
|
22
|
-
Icon_default,
|
|
23
|
-
{
|
|
24
|
-
name: "right-chevron",
|
|
25
|
-
className: `text-neutral-main cursor-pointer transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
fileIcon,
|
|
29
|
-
/* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick: () => {
|
|
30
|
-
var _a2;
|
|
31
|
-
return (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
|
|
32
|
-
}, children: node.label })
|
|
33
|
-
] }),
|
|
34
|
-
isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsx(TreeNodeItem, { node: child, depth: depth + 1, classNames, fileIcon }, child.id)))
|
|
35
|
-
] });
|
|
36
|
-
});
|
|
37
|
-
var Tree = forwardRef(({ headerContent, group, groupIcon, fileIcon, classNames }) => {
|
|
38
|
-
const { label, data, onClick } = group;
|
|
39
|
-
const slots = useMemo(() => treeStyle(), []);
|
|
40
|
-
return /* @__PURE__ */ jsxs("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
41
|
-
headerContent && /* @__PURE__ */ jsx("div", { children: headerContent }),
|
|
42
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
43
|
-
/* @__PURE__ */ jsxs("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
44
|
-
groupIcon,
|
|
45
|
-
/* @__PURE__ */ jsx("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), onClick, children: label })
|
|
46
|
-
] }),
|
|
47
|
-
data.map((node) => /* @__PURE__ */ jsx(TreeNodeItem, { node, depth: 1, classNames, fileIcon }, node.id))
|
|
48
|
-
] })
|
|
49
|
-
] });
|
|
50
|
-
});
|
|
51
|
-
TreeNodeItem.displayName = "TreeNodeItem";
|
|
52
|
-
Tree.displayName = "Tree";
|
|
53
|
-
var tree_default = Tree;
|
|
54
|
-
var treeStyle = tv({
|
|
55
|
-
slots: {
|
|
56
|
-
base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]", "select-none"],
|
|
57
|
-
wrapper: [
|
|
58
|
-
"flex",
|
|
59
|
-
"items-center",
|
|
60
|
-
"gap-[5px]",
|
|
61
|
-
"text-md",
|
|
62
|
-
"font-bold",
|
|
63
|
-
"text-body-foreground",
|
|
64
|
-
"hover:bg-neutral-soft",
|
|
65
|
-
"p-[5px]",
|
|
66
|
-
"rounded-[5px]"
|
|
67
|
-
],
|
|
68
|
-
label: ["cursor-pointer"]
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
tree_default
|
|
74
|
-
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
scrollArea_default
|
|
4
|
+
} from "./chunk-M37VBNB3.mjs";
|
|
2
5
|
import {
|
|
3
6
|
table_body_default
|
|
4
7
|
} from "./chunk-XRC5OUYQ.mjs";
|
|
5
8
|
import {
|
|
6
9
|
table_head_default
|
|
7
10
|
} from "./chunk-EAK5DVWA.mjs";
|
|
8
|
-
import {
|
|
9
|
-
scrollArea_default
|
|
10
|
-
} from "./chunk-M37VBNB3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
pagination_default
|
|
13
13
|
} from "./chunk-IVK24VIL.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
getToastPosition
|
|
4
|
-
} from "./chunk-ZOTHPHXA.mjs";
|
|
5
2
|
import {
|
|
6
3
|
toast_default
|
|
7
4
|
} from "./chunk-OUAKGMDW.mjs";
|
|
5
|
+
import {
|
|
6
|
+
getToastPosition
|
|
7
|
+
} from "./chunk-ZOTHPHXA.mjs";
|
|
8
8
|
|
|
9
9
|
// src/components/toast/use-toast.tsx
|
|
10
10
|
import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
|