@deepnoid/ui 0.1.28 → 0.1.30
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 +181 -161
- package/dist/chunk-6PN3DGOE.mjs +77 -0
- package/dist/chunk-CEZQCD6Z.mjs +79 -0
- package/dist/{chunk-JV7VLO2L.mjs → chunk-GLMM253Q.mjs} +37 -27
- package/dist/{chunk-K7VUN5BS.mjs → chunk-IC25OKBJ.mjs} +1 -1
- package/dist/{chunk-NHVIKP4H.mjs → chunk-K7V4VE7R.mjs} +4 -4
- package/dist/chunk-MZ76AA76.mjs +1 -0
- package/dist/{chunk-4OSN2OE2.mjs → chunk-NFQMXW4Z.mjs} +25 -18
- package/dist/chunk-NKH3OF6I.mjs +132 -0
- package/dist/chunk-P7YYNA6L.mjs +67 -0
- package/dist/{chunk-SO7BGWM7.mjs → chunk-QM4ZSQYX.mjs} +1 -1
- package/dist/chunk-RLXOHILK.mjs +1 -0
- package/dist/{chunk-BEQ3KZGS.mjs → chunk-VCVQMPC7.mjs} +2 -1
- package/dist/components/breadcrumb/breadcrumb.mjs +3 -3
- package/dist/components/breadcrumb/index.mjs +3 -3
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.mjs +5 -5
- package/dist/components/dateTimePicker/index.mjs +5 -5
- package/dist/components/dateTimePicker/timePicker.mjs +2 -2
- package/dist/components/fileUpload/fileUpload.d.mts +92 -0
- package/dist/components/fileUpload/fileUpload.d.ts +92 -0
- package/dist/components/fileUpload/fileUpload.js +5648 -0
- package/dist/components/fileUpload/fileUpload.mjs +28 -0
- package/dist/components/fileUpload/index.d.mts +5 -0
- package/dist/components/fileUpload/index.d.ts +5 -0
- package/dist/components/fileUpload/index.js +5647 -0
- package/dist/components/fileUpload/index.mjs +25 -0
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/index.mjs +1 -1
- package/dist/components/input/input.js +2 -1
- package/dist/components/input/input.mjs +1 -1
- package/dist/components/list/index.mjs +3 -3
- package/dist/components/modal/index.mjs +4 -4
- package/dist/components/modal/modal.mjs +4 -4
- package/dist/components/pagination/index.js +2 -1
- package/dist/components/pagination/index.mjs +2 -2
- package/dist/components/pagination/pagination.js +2 -1
- package/dist/components/pagination/pagination.mjs +2 -2
- package/dist/components/ripple/index.mjs +3 -3
- 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 +694 -615
- package/dist/components/table/index.mjs +9 -7
- 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 -64
- package/dist/components/table/table-body.mjs +3 -1
- 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 +3 -1
- package/dist/components/table/table.d.mts +1 -0
- package/dist/components/table/table.d.ts +1 -0
- package/dist/components/table/table.js +685 -606
- package/dist/components/table/table.mjs +7 -5
- package/dist/components/tree/index.js +25 -18
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.d.mts +20 -13
- package/dist/components/tree/tree.d.ts +20 -13
- package/dist/components/tree/tree.js +25 -18
- package/dist/components/tree/tree.mjs +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +607 -401
- package/dist/index.mjs +50 -40
- package/package.json +1 -1
- package/dist/chunk-UNH3BCGN.mjs +0 -47
- package/dist/chunk-XRC5OUYQ.mjs +0 -94
- package/dist/{chunk-QIEKOGY7.mjs → chunk-7TAGGLNY.mjs} +3 -3
- package/dist/{chunk-KYJTZPXY.mjs → chunk-BFOK4HVC.mjs} +3 -3
- package/dist/{chunk-JTZUXVOU.mjs → chunk-UB4YBFOT.mjs} +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-RLXOHILK.mjs";
|
|
3
|
+
import {
|
|
4
|
+
fileUpload_default
|
|
5
|
+
} from "../../chunk-NKH3OF6I.mjs";
|
|
6
|
+
import "../../chunk-2GCSFWHD.mjs";
|
|
7
|
+
import "../../chunk-VCVQMPC7.mjs";
|
|
8
|
+
import "../../chunk-MY5U63QO.mjs";
|
|
9
|
+
import "../../chunk-LPZOH3RP.mjs";
|
|
10
|
+
import "../../chunk-UB4YBFOT.mjs";
|
|
11
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
12
|
+
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
14
|
+
import "../../chunk-6PNKRBUT.mjs";
|
|
15
|
+
import "../../chunk-WFMFC7R6.mjs";
|
|
16
|
+
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
|
+
import "../../chunk-2TKEWFGH.mjs";
|
|
18
|
+
import "../../chunk-2SDYFOZL.mjs";
|
|
19
|
+
import "../../chunk-4ZJFD3L3.mjs";
|
|
20
|
+
import "../../chunk-27Y6K5NK.mjs";
|
|
21
|
+
import "../../chunk-E3G5QXSH.mjs";
|
|
22
|
+
import "../../chunk-AC6TWLRT.mjs";
|
|
23
|
+
export {
|
|
24
|
+
fileUpload_default as FileUpload
|
|
25
|
+
};
|
|
@@ -4457,9 +4457,10 @@ var Input = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4457
4457
|
{
|
|
4458
4458
|
...inputProps,
|
|
4459
4459
|
ref: ref || inputRef,
|
|
4460
|
+
readOnly: props.readOnly,
|
|
4460
4461
|
className: clsx(
|
|
4461
4462
|
slots.input({ class: classNames == null ? void 0 : classNames.input }),
|
|
4462
|
-
inputProps.readOnly ? "!text-body-foreground placeholder
|
|
4463
|
+
inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
|
|
4463
4464
|
),
|
|
4464
4465
|
size: 0
|
|
4465
4466
|
}
|
|
@@ -4456,9 +4456,10 @@ var Input = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4456
4456
|
{
|
|
4457
4457
|
...inputProps,
|
|
4458
4458
|
ref: ref || inputRef,
|
|
4459
|
+
readOnly: props.readOnly,
|
|
4459
4460
|
className: clsx(
|
|
4460
4461
|
slots.input({ class: classNames == null ? void 0 : classNames.input }),
|
|
4461
|
-
inputProps.readOnly ? "!text-body-foreground placeholder
|
|
4462
|
+
inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
|
|
4462
4463
|
),
|
|
4463
4464
|
size: 0
|
|
4464
4465
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-7MVEAQ7Z.mjs";
|
|
3
|
-
import {
|
|
4
|
-
list_default
|
|
5
|
-
} from "../../chunk-HIVPDIEP.mjs";
|
|
6
3
|
import {
|
|
7
4
|
listItem_default
|
|
8
5
|
} from "../../chunk-RT3S3VVJ.mjs";
|
|
6
|
+
import {
|
|
7
|
+
list_default
|
|
8
|
+
} from "../../chunk-HIVPDIEP.mjs";
|
|
9
9
|
import "../../chunk-SP3JVQY3.mjs";
|
|
10
10
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
11
11
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import "../../chunk-DJOG6Z35.mjs";
|
|
3
3
|
import {
|
|
4
4
|
modal_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-IC25OKBJ.mjs";
|
|
6
6
|
import "../../chunk-SE5TU755.mjs";
|
|
7
7
|
import "../../chunk-LL6F3WDX.mjs";
|
|
8
8
|
import "../../chunk-MY5U63QO.mjs";
|
|
9
9
|
import "../../chunk-LPZOH3RP.mjs";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-UB4YBFOT.mjs";
|
|
11
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
12
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
-
import "../../chunk-6PNKRBUT.mjs";
|
|
14
13
|
import "../../chunk-LXHUO6VM.mjs";
|
|
14
|
+
import "../../chunk-6PNKRBUT.mjs";
|
|
15
15
|
import "../../chunk-WFMFC7R6.mjs";
|
|
16
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
17
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
modal_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-IC25OKBJ.mjs";
|
|
5
5
|
import "../../chunk-SE5TU755.mjs";
|
|
6
6
|
import "../../chunk-LL6F3WDX.mjs";
|
|
7
7
|
import "../../chunk-MY5U63QO.mjs";
|
|
8
8
|
import "../../chunk-LPZOH3RP.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-UB4YBFOT.mjs";
|
|
10
|
+
import "../../chunk-7TAGGLNY.mjs";
|
|
11
11
|
import "../../chunk-6WSACUIB.mjs";
|
|
12
|
-
import "../../chunk-6PNKRBUT.mjs";
|
|
13
12
|
import "../../chunk-LXHUO6VM.mjs";
|
|
13
|
+
import "../../chunk-6PNKRBUT.mjs";
|
|
14
14
|
import "../../chunk-WFMFC7R6.mjs";
|
|
15
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
16
16
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -4485,9 +4485,10 @@ var Input = (0, import_react2.forwardRef)((originalProps, ref) => {
|
|
|
4485
4485
|
{
|
|
4486
4486
|
...inputProps,
|
|
4487
4487
|
ref: ref || inputRef,
|
|
4488
|
+
readOnly: props.readOnly,
|
|
4488
4489
|
className: clsx(
|
|
4489
4490
|
slots.input({ class: classNames == null ? void 0 : classNames.input }),
|
|
4490
|
-
inputProps.readOnly ? "!text-body-foreground placeholder
|
|
4491
|
+
inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
|
|
4491
4492
|
),
|
|
4492
4493
|
size: 0
|
|
4493
4494
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "../../chunk-7B7LRG5J.mjs";
|
|
3
3
|
import {
|
|
4
4
|
pagination_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-QM4ZSQYX.mjs";
|
|
6
6
|
import "../../chunk-F3HENRVM.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-VCVQMPC7.mjs";
|
|
9
9
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
10
10
|
import "../../chunk-2TKEWFGH.mjs";
|
|
11
11
|
import "../../chunk-2SDYFOZL.mjs";
|
|
@@ -4484,9 +4484,10 @@ var Input = (0, import_react2.forwardRef)((originalProps, ref) => {
|
|
|
4484
4484
|
{
|
|
4485
4485
|
...inputProps,
|
|
4486
4486
|
ref: ref || inputRef,
|
|
4487
|
+
readOnly: props.readOnly,
|
|
4487
4488
|
className: clsx(
|
|
4488
4489
|
slots.input({ class: classNames == null ? void 0 : classNames.input }),
|
|
4489
|
-
inputProps.readOnly ? "!text-body-foreground placeholder
|
|
4490
|
+
inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
|
|
4490
4491
|
),
|
|
4491
4492
|
size: 0
|
|
4492
4493
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
paginationStyle,
|
|
4
4
|
pagination_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-QM4ZSQYX.mjs";
|
|
6
6
|
import "../../chunk-F3HENRVM.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-VCVQMPC7.mjs";
|
|
9
9
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
10
10
|
import "../../chunk-2TKEWFGH.mjs";
|
|
11
11
|
import "../../chunk-2SDYFOZL.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-6WSACUIB.mjs";
|
|
3
|
-
import {
|
|
4
|
-
useRipple
|
|
5
|
-
} from "../../chunk-6PNKRBUT.mjs";
|
|
6
3
|
import {
|
|
7
4
|
ripple_default
|
|
8
5
|
} from "../../chunk-LXHUO6VM.mjs";
|
|
6
|
+
import {
|
|
7
|
+
useRipple
|
|
8
|
+
} from "../../chunk-6PNKRBUT.mjs";
|
|
9
9
|
import "../../chunk-AC6TWLRT.mjs";
|
|
10
10
|
export {
|
|
11
11
|
ripple_default as Ripple,
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/skeleton/index.ts
|
|
22
|
+
var skeleton_exports = {};
|
|
23
|
+
__export(skeleton_exports, {
|
|
24
|
+
Skeleton: () => skeleton_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(skeleton_exports);
|
|
27
|
+
|
|
28
|
+
// src/components/skeleton/skeleton.tsx
|
|
29
|
+
var import_tailwind_variants = require("tailwind-variants");
|
|
30
|
+
|
|
31
|
+
// src/utils/clsx.ts
|
|
32
|
+
function clsx(...args) {
|
|
33
|
+
var i = 0, tmp, x, str = "";
|
|
34
|
+
while (i < args.length) {
|
|
35
|
+
if (tmp = args[i++]) {
|
|
36
|
+
if (x = toVal(tmp)) {
|
|
37
|
+
str && (str += " ");
|
|
38
|
+
str += x;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return str;
|
|
43
|
+
}
|
|
44
|
+
function toVal(mix) {
|
|
45
|
+
var k, y, str = "";
|
|
46
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
47
|
+
str += mix;
|
|
48
|
+
} else if (typeof mix === "object") {
|
|
49
|
+
if (Array.isArray(mix)) {
|
|
50
|
+
var len = mix.length;
|
|
51
|
+
for (k = 0; k < len; k++) {
|
|
52
|
+
if (mix[k]) {
|
|
53
|
+
if (y = toVal(mix[k])) {
|
|
54
|
+
str && (str += " ");
|
|
55
|
+
str += y;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
for (y in mix) {
|
|
61
|
+
if (mix[y]) {
|
|
62
|
+
str && (str += " ");
|
|
63
|
+
str += y;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return str;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// src/components/skeleton/skeleton.tsx
|
|
72
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
73
|
+
var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
|
|
74
|
+
const speedMap = {
|
|
75
|
+
fast: "0.7s",
|
|
76
|
+
normal: "1.2s",
|
|
77
|
+
slow: "2s"
|
|
78
|
+
};
|
|
79
|
+
const slots = skeletonStyle();
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: clsx(slots.base({ color, rounded }), className),
|
|
84
|
+
style: {
|
|
85
|
+
"--shimmer-duration": speedMap[speed]
|
|
86
|
+
},
|
|
87
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `@keyframes shimmer {
|
|
88
|
+
100% {
|
|
89
|
+
transform: translateX(100%);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.skeleton-shimmer::before {
|
|
93
|
+
animation: shimmer var(--shimmer-duration) infinite linear;
|
|
94
|
+
}
|
|
95
|
+
` })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
Skeleton.displayName = "Skeleton";
|
|
100
|
+
var skeleton_default = Skeleton;
|
|
101
|
+
var skeletonStyle = (0, import_tailwind_variants.tv)({
|
|
102
|
+
slots: {
|
|
103
|
+
base: [
|
|
104
|
+
"relative",
|
|
105
|
+
"overflow-hidden",
|
|
106
|
+
"w-full",
|
|
107
|
+
"h-[18px]",
|
|
108
|
+
"skeleton-shimmer",
|
|
109
|
+
"before:absolute",
|
|
110
|
+
"before:inset-0",
|
|
111
|
+
"before:-translate-x-full",
|
|
112
|
+
"before:bg-gradient-to-r",
|
|
113
|
+
"before:from-transparent",
|
|
114
|
+
"before:via-white/40",
|
|
115
|
+
"before:to-transparent",
|
|
116
|
+
"before:content-['']"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
variants: {
|
|
120
|
+
color: {
|
|
121
|
+
primary: { base: "bg-primary-soft" },
|
|
122
|
+
secondary: { base: "bg-secondary-soft" },
|
|
123
|
+
neutral: { base: "bg-neutral-soft" }
|
|
124
|
+
},
|
|
125
|
+
rounded: {
|
|
126
|
+
sm: { base: "rounded-sm" },
|
|
127
|
+
md: { base: "rounded-md" },
|
|
128
|
+
lg: { base: "rounded-lg" },
|
|
129
|
+
xl: { base: "rounded-xl" },
|
|
130
|
+
full: { base: "rounded-full" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
defaultVariants: {
|
|
134
|
+
color: "primary",
|
|
135
|
+
rounded: "md"
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
139
|
+
0 && (module.exports = {
|
|
140
|
+
Skeleton
|
|
141
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface SkeletonProps {
|
|
4
|
+
color?: "primary" | "secondary" | "neutral";
|
|
5
|
+
speed?: "fast" | "normal" | "slow";
|
|
6
|
+
rounded?: "sm" | "md" | "lg" | "xl" | "full";
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Skeleton: {
|
|
10
|
+
({ color, className, speed, rounded }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Skeleton as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface SkeletonProps {
|
|
4
|
+
color?: "primary" | "secondary" | "neutral";
|
|
5
|
+
speed?: "fast" | "normal" | "slow";
|
|
6
|
+
rounded?: "sm" | "md" | "lg" | "xl" | "full";
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Skeleton: {
|
|
10
|
+
({ color, className, speed, rounded }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Skeleton as default };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/skeleton/skeleton.tsx
|
|
22
|
+
var skeleton_exports = {};
|
|
23
|
+
__export(skeleton_exports, {
|
|
24
|
+
default: () => skeleton_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(skeleton_exports);
|
|
27
|
+
var import_tailwind_variants = require("tailwind-variants");
|
|
28
|
+
|
|
29
|
+
// src/utils/clsx.ts
|
|
30
|
+
function clsx(...args) {
|
|
31
|
+
var i = 0, tmp, x, str = "";
|
|
32
|
+
while (i < args.length) {
|
|
33
|
+
if (tmp = args[i++]) {
|
|
34
|
+
if (x = toVal(tmp)) {
|
|
35
|
+
str && (str += " ");
|
|
36
|
+
str += x;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return str;
|
|
41
|
+
}
|
|
42
|
+
function toVal(mix) {
|
|
43
|
+
var k, y, str = "";
|
|
44
|
+
if (typeof mix === "string" || typeof mix === "number") {
|
|
45
|
+
str += mix;
|
|
46
|
+
} else if (typeof mix === "object") {
|
|
47
|
+
if (Array.isArray(mix)) {
|
|
48
|
+
var len = mix.length;
|
|
49
|
+
for (k = 0; k < len; k++) {
|
|
50
|
+
if (mix[k]) {
|
|
51
|
+
if (y = toVal(mix[k])) {
|
|
52
|
+
str && (str += " ");
|
|
53
|
+
str += y;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
for (y in mix) {
|
|
59
|
+
if (mix[y]) {
|
|
60
|
+
str && (str += " ");
|
|
61
|
+
str += y;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return str;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// src/components/skeleton/skeleton.tsx
|
|
70
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
71
|
+
var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
|
|
72
|
+
const speedMap = {
|
|
73
|
+
fast: "0.7s",
|
|
74
|
+
normal: "1.2s",
|
|
75
|
+
slow: "2s"
|
|
76
|
+
};
|
|
77
|
+
const slots = skeletonStyle();
|
|
78
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
className: clsx(slots.base({ color, rounded }), className),
|
|
82
|
+
style: {
|
|
83
|
+
"--shimmer-duration": speedMap[speed]
|
|
84
|
+
},
|
|
85
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `@keyframes shimmer {
|
|
86
|
+
100% {
|
|
87
|
+
transform: translateX(100%);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.skeleton-shimmer::before {
|
|
91
|
+
animation: shimmer var(--shimmer-duration) infinite linear;
|
|
92
|
+
}
|
|
93
|
+
` })
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
Skeleton.displayName = "Skeleton";
|
|
98
|
+
var skeleton_default = Skeleton;
|
|
99
|
+
var skeletonStyle = (0, import_tailwind_variants.tv)({
|
|
100
|
+
slots: {
|
|
101
|
+
base: [
|
|
102
|
+
"relative",
|
|
103
|
+
"overflow-hidden",
|
|
104
|
+
"w-full",
|
|
105
|
+
"h-[18px]",
|
|
106
|
+
"skeleton-shimmer",
|
|
107
|
+
"before:absolute",
|
|
108
|
+
"before:inset-0",
|
|
109
|
+
"before:-translate-x-full",
|
|
110
|
+
"before:bg-gradient-to-r",
|
|
111
|
+
"before:from-transparent",
|
|
112
|
+
"before:via-white/40",
|
|
113
|
+
"before:to-transparent",
|
|
114
|
+
"before:content-['']"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
variants: {
|
|
118
|
+
color: {
|
|
119
|
+
primary: { base: "bg-primary-soft" },
|
|
120
|
+
secondary: { base: "bg-secondary-soft" },
|
|
121
|
+
neutral: { base: "bg-neutral-soft" }
|
|
122
|
+
},
|
|
123
|
+
rounded: {
|
|
124
|
+
sm: { base: "rounded-sm" },
|
|
125
|
+
md: { base: "rounded-md" },
|
|
126
|
+
lg: { base: "rounded-lg" },
|
|
127
|
+
xl: { base: "rounded-xl" },
|
|
128
|
+
full: { base: "rounded-full" }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
defaultVariants: {
|
|
132
|
+
color: "primary",
|
|
133
|
+
rounded: "md"
|
|
134
|
+
}
|
|
135
|
+
});
|