@bbki.ng/components 2.6.0 → 2.6.2
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/dist/index.cjs +290 -281
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +9 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +224 -215
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,74 @@
|
|
|
1
1
|
// lib/article/Article.tsx
|
|
2
|
+
import classNames2 from "classnames";
|
|
3
|
+
import React3 from "react";
|
|
4
|
+
|
|
5
|
+
// lib/blink-dot/BlinkDot.tsx
|
|
2
6
|
import classNames from "classnames";
|
|
3
7
|
import React from "react";
|
|
8
|
+
var BlinkDot = (props) => {
|
|
9
|
+
const { className } = props;
|
|
10
|
+
const status = props.status || "hidden";
|
|
11
|
+
const statusCls = classNames({
|
|
12
|
+
"animate-ping-fast": status === "blink",
|
|
13
|
+
hidden: status === "hidden"
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ React.createElement("span", {
|
|
16
|
+
className: classNames("inline-flex justify-center items-center relative")
|
|
17
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
18
|
+
className: `absolute inline-flex h-full w-full rounded-full text-red-600 -top-[28px] -left-[3px] ${statusCls} ${className}`
|
|
19
|
+
}, "."));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// lib/blur-cover/BlurCover.tsx
|
|
23
|
+
import React2 from "react";
|
|
24
|
+
import cls from "classnames";
|
|
25
|
+
var BlurCover = (props) => {
|
|
26
|
+
const { status } = props;
|
|
27
|
+
const coverCls = cls(
|
|
28
|
+
"absolute",
|
|
29
|
+
"block",
|
|
30
|
+
"text-blur",
|
|
31
|
+
"transition-all",
|
|
32
|
+
"top-0",
|
|
33
|
+
"left-0",
|
|
34
|
+
"h-full",
|
|
35
|
+
"w-full",
|
|
36
|
+
{
|
|
37
|
+
"z-[999]": status === "show",
|
|
38
|
+
"opacity-0": status === "silent",
|
|
39
|
+
"opacity-100": status === "show",
|
|
40
|
+
"pointer-events-none": status === "silent"
|
|
41
|
+
},
|
|
42
|
+
props.className
|
|
43
|
+
);
|
|
44
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
45
|
+
className: coverCls
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// lib/article/Article.tsx
|
|
4
50
|
var Article = (props) => {
|
|
5
51
|
const { title, content, children, className, description } = props;
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
className:
|
|
8
|
-
}, /* @__PURE__ */
|
|
9
|
-
className: "
|
|
10
|
-
},
|
|
52
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
53
|
+
className: classNames2("article", className)
|
|
54
|
+
}, /* @__PURE__ */ React3.createElement("div", {
|
|
55
|
+
className: "mb-128 leading-none"
|
|
56
|
+
}, /* @__PURE__ */ React3.createElement("span", {
|
|
57
|
+
className: "text-[2.25rem] p-16"
|
|
58
|
+
}, title), props.loading && /* @__PURE__ */ React3.createElement(BlinkDot, {
|
|
59
|
+
status: "blink",
|
|
60
|
+
className: "-top-[42px] -left-16"
|
|
61
|
+
})), description && /* @__PURE__ */ React3.createElement("div", {
|
|
11
62
|
className: "mb-128"
|
|
12
|
-
}, description), /* @__PURE__ */
|
|
13
|
-
className: "text-black"
|
|
14
|
-
}, children || content
|
|
63
|
+
}, description), /* @__PURE__ */ React3.createElement("div", {
|
|
64
|
+
className: "text-black relative p-16"
|
|
65
|
+
}, children || content, /* @__PURE__ */ React3.createElement(BlurCover, {
|
|
66
|
+
status: props.loading ? "show" : "silent"
|
|
67
|
+
})));
|
|
15
68
|
};
|
|
16
69
|
|
|
17
70
|
// lib/button/Button.tsx
|
|
18
|
-
import
|
|
71
|
+
import React4 from "react";
|
|
19
72
|
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
20
73
|
ButtonType2["DANGER"] = "danger";
|
|
21
74
|
ButtonType2["PRIMARY"] = "primary";
|
|
@@ -32,7 +85,7 @@ function Button(props) {
|
|
|
32
85
|
};
|
|
33
86
|
const { type = "normal" /* NORMAL */, className = "", onClick, btnType } = props;
|
|
34
87
|
const shadowTransCls = type === "disabled" /* DISABLED */ ? "" : "transition-all duration-200 ease-in-out shadow-button hover:shadow-button-hover active:shadow-empty";
|
|
35
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ React4.createElement("button", {
|
|
36
89
|
className: `${typeClsMap[type]} ${className} ${shadowTransCls} py-8 px-16 transition-all duration-200 ease-in-out`,
|
|
37
90
|
onClick,
|
|
38
91
|
type: btnType
|
|
@@ -41,9 +94,9 @@ function Button(props) {
|
|
|
41
94
|
Button.displayName = "Button";
|
|
42
95
|
|
|
43
96
|
// lib/logo/Logo.tsx
|
|
44
|
-
import * as
|
|
45
|
-
var Logo =
|
|
46
|
-
(props) => /* @__PURE__ */
|
|
97
|
+
import * as React5 from "react";
|
|
98
|
+
var Logo = React5.memo(
|
|
99
|
+
(props) => /* @__PURE__ */ React5.createElement("svg", {
|
|
47
100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48
101
|
width: "48",
|
|
49
102
|
height: "48",
|
|
@@ -51,25 +104,25 @@ var Logo = React3.memo(
|
|
|
51
104
|
fill: "none",
|
|
52
105
|
onClick: props.onClick,
|
|
53
106
|
className: props.className
|
|
54
|
-
}, /* @__PURE__ */
|
|
107
|
+
}, /* @__PURE__ */ React5.createElement("path", {
|
|
55
108
|
d: "M29.1152 21.3106C32.0605 21.3106 34.4481 18.9101 34.4481 15.9489V24.6457C34.4481 25.7585 33.5508 26.6607 32.444 26.6607H15.1207C14.0138 26.6607 13.1166 25.7585 13.1166 24.6457V15.9489C13.1166 18.9101 15.5042 21.3106 18.4494 21.3106C21.3947 21.3106 23.7823 18.9101 23.7823 15.9489C23.7823 18.9101 26.17 21.3106 29.1152 21.3106Z",
|
|
56
109
|
fill: "#9CA3AF"
|
|
57
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
58
111
|
d: "M23.7823 15.9373L23.7823 15.9489C23.7823 15.9451 23.7823 15.9412 23.7823 15.9373Z",
|
|
59
112
|
fill: "#9CA3AF"
|
|
60
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
61
114
|
d: "M23.1143 28.004C23.1205 30.9598 25.5057 33.3541 28.4472 33.3541C31.3886 33.3541 33.7738 30.9598 33.7801 28.004H23.1143Z",
|
|
62
115
|
fill: "#9CA3AF"
|
|
63
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
64
117
|
d: "M13.7846 28.004C13.7846 28.0079 13.7846 28.0117 13.7846 28.0156C13.7908 30.9714 16.1761 33.3657 19.1175 33.3657C22.0589 33.3657 24.4442 30.9714 24.4504 28.0156H13.7846V28.004Z",
|
|
65
118
|
fill: "#9CA3AF"
|
|
66
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
67
120
|
d: "M14.4527 15.9373C14.4527 16.6792 13.8545 17.2806 13.1166 17.2806C12.3786 17.2806 11.7805 16.6792 11.7805 15.9373C11.7805 15.1954 12.3786 14.594 13.1166 14.594C13.8545 14.594 14.4527 15.1954 14.4527 15.9373Z",
|
|
68
121
|
fill: "#9CA3AF"
|
|
69
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
70
123
|
d: "M25.1184 15.2657C25.1184 16.0076 24.5202 16.609 23.7823 16.609C23.0444 16.609 22.4462 16.0076 22.4462 15.2657C22.4462 14.5238 23.0444 13.9224 23.7823 13.9224C24.5202 13.9224 25.1184 14.5238 25.1184 15.2657Z",
|
|
71
124
|
fill: "#9CA3AF"
|
|
72
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ React5.createElement("path", {
|
|
73
126
|
d: "M35.7842 15.9373C35.7842 16.6792 35.186 17.2806 34.4481 17.2806C33.7102 17.2806 33.112 16.6792 33.112 15.9373C33.112 15.1954 33.7102 14.594 34.4481 14.594C35.186 14.594 35.7842 15.1954 35.7842 15.9373Z",
|
|
74
127
|
fill: "#9CA3AF"
|
|
75
128
|
})),
|
|
@@ -79,35 +132,16 @@ var Logo = React3.memo(
|
|
|
79
132
|
);
|
|
80
133
|
|
|
81
134
|
// lib/nav/Nav.tsx
|
|
82
|
-
import
|
|
135
|
+
import React8 from "react";
|
|
83
136
|
|
|
84
137
|
// lib/breadcrumb/Breadcrumb.tsx
|
|
85
|
-
import
|
|
138
|
+
import React7 from "react";
|
|
86
139
|
import classNames4 from "classnames";
|
|
87
140
|
|
|
88
141
|
// lib/link/Link.tsx
|
|
89
142
|
import classNames3 from "classnames";
|
|
90
143
|
import { Link as BaseLink } from "react-router-dom";
|
|
91
|
-
import
|
|
92
|
-
|
|
93
|
-
// lib/blink-dot/BlinkDot.tsx
|
|
94
|
-
import classNames2 from "classnames";
|
|
95
|
-
import React4 from "react";
|
|
96
|
-
var BlinkDot = (props) => {
|
|
97
|
-
const { className } = props;
|
|
98
|
-
const status = props.status || "hidden";
|
|
99
|
-
const statusCls = classNames2({
|
|
100
|
-
"animate-ping-fast": status === "blink",
|
|
101
|
-
hidden: status === "hidden"
|
|
102
|
-
});
|
|
103
|
-
return /* @__PURE__ */ React4.createElement("span", {
|
|
104
|
-
className: classNames2("inline-flex justify-center items-center relative")
|
|
105
|
-
}, /* @__PURE__ */ React4.createElement("span", {
|
|
106
|
-
className: `absolute inline-flex h-full w-full rounded-full text-red-600 -top-[28px] -left-[3px] ${statusCls}`
|
|
107
|
-
}, "."));
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// lib/link/Link.tsx
|
|
144
|
+
import React6 from "react";
|
|
111
145
|
var LinkColor = /* @__PURE__ */ ((LinkColor2) => {
|
|
112
146
|
LinkColor2["BLUE"] = "blue";
|
|
113
147
|
LinkColor2["RED"] = "red";
|
|
@@ -150,7 +184,7 @@ var Link = (props) => {
|
|
|
150
184
|
FOCUS_BG_COLOR_MAPPING[color]
|
|
151
185
|
);
|
|
152
186
|
if (external) {
|
|
153
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ React6.createElement("a", {
|
|
154
188
|
href: props.to,
|
|
155
189
|
className: linkCls,
|
|
156
190
|
target: "_blank",
|
|
@@ -161,18 +195,18 @@ var Link = (props) => {
|
|
|
161
195
|
if (readonly) {
|
|
162
196
|
const isNonEnName = !/^[a-zA-Z~]+$/.test(children);
|
|
163
197
|
const offsetCls = classNames3({ "relative top-[2px]": isNonEnName });
|
|
164
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("span", {
|
|
165
199
|
className: classNames3("text-gray-400", offsetCls),
|
|
166
200
|
style: { padding: 4 }
|
|
167
|
-
}, children), /* @__PURE__ */
|
|
201
|
+
}, children), /* @__PURE__ */ React6.createElement(BlinkDot, {
|
|
168
202
|
status
|
|
169
203
|
}));
|
|
170
204
|
}
|
|
171
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(BaseLink, {
|
|
172
206
|
...rest,
|
|
173
207
|
className: linkCls,
|
|
174
208
|
style: { padding: 4 }
|
|
175
|
-
}, children), /* @__PURE__ */
|
|
209
|
+
}, children), /* @__PURE__ */ React6.createElement(BlinkDot, {
|
|
176
210
|
className: "-top-3 left-1",
|
|
177
211
|
status
|
|
178
212
|
}));
|
|
@@ -182,23 +216,23 @@ var Link = (props) => {
|
|
|
182
216
|
var Breadcrumb = (props) => {
|
|
183
217
|
const { paths, loading } = props;
|
|
184
218
|
const PathElements = paths.map(({ path, name }, index) => {
|
|
185
|
-
const slash = index === 0 ? null : /* @__PURE__ */
|
|
219
|
+
const slash = index === 0 ? null : /* @__PURE__ */ React7.createElement("span", {
|
|
186
220
|
className: "text-gray-400"
|
|
187
221
|
}, "/");
|
|
188
222
|
const isNonEnName = !/^[a-zA-Z~]+$/.test(name);
|
|
189
223
|
const offsetCls = classNames4({ "relative top-[2px]": isNonEnName });
|
|
190
224
|
const isLast = index === paths.length - 1;
|
|
191
225
|
const status = loading && isLast ? "blink" : "hidden";
|
|
192
|
-
return /* @__PURE__ */
|
|
226
|
+
return /* @__PURE__ */ React7.createElement("span", {
|
|
193
227
|
key: path || name
|
|
194
|
-
}, slash, /* @__PURE__ */
|
|
228
|
+
}, slash, /* @__PURE__ */ React7.createElement(Link, {
|
|
195
229
|
to: path ?? "",
|
|
196
230
|
className: offsetCls,
|
|
197
231
|
readonly: !path,
|
|
198
232
|
status
|
|
199
233
|
}, name));
|
|
200
234
|
});
|
|
201
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ React7.createElement("div", {
|
|
202
236
|
className: "breadcrumb"
|
|
203
237
|
}, PathElements);
|
|
204
238
|
};
|
|
@@ -207,21 +241,21 @@ var Breadcrumb = (props) => {
|
|
|
207
241
|
import { useNavigate } from "react-router-dom";
|
|
208
242
|
var Nav = (props) => {
|
|
209
243
|
if (props.mini) {
|
|
210
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
|
211
245
|
className: `p-8 w-full flex items-center ${props.className}`
|
|
212
|
-
}, /* @__PURE__ */
|
|
246
|
+
}, /* @__PURE__ */ React8.createElement(Breadcrumb, {
|
|
213
247
|
paths: props.paths
|
|
214
248
|
}));
|
|
215
249
|
}
|
|
216
250
|
const nav = useNavigate();
|
|
217
|
-
return /* @__PURE__ */
|
|
251
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
|
218
252
|
className: `p-8 w-full flex items-center ${props.className}`
|
|
219
|
-
}, props.customLogo || /* @__PURE__ */
|
|
253
|
+
}, props.customLogo || /* @__PURE__ */ React8.createElement(Logo, {
|
|
220
254
|
className: "mr-8",
|
|
221
255
|
onClick: () => {
|
|
222
256
|
nav("/");
|
|
223
257
|
}
|
|
224
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ React8.createElement(Breadcrumb, {
|
|
225
259
|
paths: props.paths,
|
|
226
260
|
loading: props.loading
|
|
227
261
|
}));
|
|
@@ -229,20 +263,20 @@ var Nav = (props) => {
|
|
|
229
263
|
|
|
230
264
|
// lib/tag/Tag.tsx
|
|
231
265
|
import classNames5 from "classnames";
|
|
232
|
-
import
|
|
266
|
+
import React9 from "react";
|
|
233
267
|
var Tag = (props) => {
|
|
234
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ React9.createElement(Link, {
|
|
235
269
|
...props,
|
|
236
270
|
color: "gray" /* GRAY */
|
|
237
|
-
}, /* @__PURE__ */
|
|
271
|
+
}, /* @__PURE__ */ React9.createElement("small", null, props.prefix || "#", props.children));
|
|
238
272
|
};
|
|
239
273
|
var Tags = (props) => {
|
|
240
274
|
const { tags, className } = props;
|
|
241
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
242
276
|
className: classNames5(className, "inline-block")
|
|
243
277
|
}, tags.map((tag, index) => {
|
|
244
278
|
const isLast = index === tags.length - 1;
|
|
245
|
-
return /* @__PURE__ */
|
|
279
|
+
return /* @__PURE__ */ React9.createElement(Tag, {
|
|
246
280
|
...tag,
|
|
247
281
|
key: tag.to,
|
|
248
282
|
className: classNames5({ "mr-8": !isLast })
|
|
@@ -251,44 +285,44 @@ var Tags = (props) => {
|
|
|
251
285
|
};
|
|
252
286
|
|
|
253
287
|
// lib/panel/Panel.tsx
|
|
254
|
-
import
|
|
288
|
+
import React10, { useEffect, useState } from "react";
|
|
255
289
|
var Panel = (props) => {
|
|
256
290
|
const { className = "", children } = props;
|
|
257
291
|
const [show, setShow] = useState(false);
|
|
258
292
|
useEffect(() => {
|
|
259
293
|
setShow(true);
|
|
260
294
|
}, []);
|
|
261
|
-
return /* @__PURE__ */
|
|
295
|
+
return /* @__PURE__ */ React10.createElement("div", {
|
|
262
296
|
className: `transition-all ease-in-out duration-900 ${className} ${show ? "shadow-panel" : "shadow-empty"} p-32`
|
|
263
297
|
}, children);
|
|
264
298
|
};
|
|
265
299
|
|
|
266
300
|
// lib/page/Page.tsx
|
|
267
|
-
import
|
|
301
|
+
import React11 from "react";
|
|
268
302
|
var Page = (props) => {
|
|
269
303
|
const { nav, main } = props;
|
|
270
|
-
return /* @__PURE__ */
|
|
304
|
+
return /* @__PURE__ */ React11.createElement("main", {
|
|
271
305
|
className: "flex flex-col h-full"
|
|
272
|
-
}, /* @__PURE__ */
|
|
306
|
+
}, /* @__PURE__ */ React11.createElement("div", {
|
|
273
307
|
className: `flx-grow-0 w-full fixed top-0 z-50`
|
|
274
|
-
}, nav), /* @__PURE__ */
|
|
308
|
+
}, nav), /* @__PURE__ */ React11.createElement("section", {
|
|
275
309
|
className: "flex-grow flex-shrink-0 px-6"
|
|
276
310
|
}, main));
|
|
277
311
|
};
|
|
278
312
|
var NotFound = (props) => {
|
|
279
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ React11.createElement(Error2, {
|
|
280
314
|
error: { name: "404", message: "Not Found" }
|
|
281
315
|
});
|
|
282
316
|
};
|
|
283
317
|
var Error2 = (props) => {
|
|
284
318
|
const { error } = props;
|
|
285
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
286
320
|
className: "prose"
|
|
287
|
-
}, /* @__PURE__ */
|
|
321
|
+
}, /* @__PURE__ */ React11.createElement("pre", null, /* @__PURE__ */ React11.createElement("code", {
|
|
288
322
|
className: "javascript language-javascript"
|
|
289
323
|
}, error.name, ":", error.message)));
|
|
290
324
|
};
|
|
291
|
-
var ErrorBoundary = class extends
|
|
325
|
+
var ErrorBoundary = class extends React11.Component {
|
|
292
326
|
constructor(props) {
|
|
293
327
|
super(props);
|
|
294
328
|
this.state = { hasError: false };
|
|
@@ -298,11 +332,11 @@ var ErrorBoundary = class extends React10.Component {
|
|
|
298
332
|
}
|
|
299
333
|
render() {
|
|
300
334
|
if (this.state.error && this.state.hasError) {
|
|
301
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ React11.createElement(Article, {
|
|
302
336
|
title: "\u51FA\u9519"
|
|
303
|
-
}, /* @__PURE__ */
|
|
337
|
+
}, /* @__PURE__ */ React11.createElement("div", {
|
|
304
338
|
className: "relative h-256"
|
|
305
|
-
}, /* @__PURE__ */
|
|
339
|
+
}, /* @__PURE__ */ React11.createElement(Error2, {
|
|
306
340
|
error: this.state.error
|
|
307
341
|
})));
|
|
308
342
|
}
|
|
@@ -311,20 +345,20 @@ var ErrorBoundary = class extends React10.Component {
|
|
|
311
345
|
};
|
|
312
346
|
|
|
313
347
|
// lib/pop-confirm/PopConfirm.tsx
|
|
314
|
-
import
|
|
348
|
+
import React12, { useState as useState2 } from "react";
|
|
315
349
|
var PopConfirm = (props) => {
|
|
316
350
|
const [loading, setLoading] = useState2(false);
|
|
317
351
|
const { onOk, onCancel, children, content, className } = props;
|
|
318
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ React12.createElement(Panel, {
|
|
319
353
|
className
|
|
320
|
-
}, /* @__PURE__ */
|
|
354
|
+
}, /* @__PURE__ */ React12.createElement("div", {
|
|
321
355
|
className: "mb-32"
|
|
322
|
-
}, children || content), /* @__PURE__ */
|
|
356
|
+
}, children || content), /* @__PURE__ */ React12.createElement("div", {
|
|
323
357
|
className: "flex justify-end"
|
|
324
|
-
}, onCancel && /* @__PURE__ */
|
|
358
|
+
}, onCancel && /* @__PURE__ */ React12.createElement(Button, {
|
|
325
359
|
onClick: onCancel,
|
|
326
360
|
type: "normal" /* NORMAL */
|
|
327
|
-
}, "Cancel"), onOk && /* @__PURE__ */
|
|
361
|
+
}, "Cancel"), onOk && /* @__PURE__ */ React12.createElement(Button, {
|
|
328
362
|
onClick: async (e) => {
|
|
329
363
|
setLoading(true);
|
|
330
364
|
await onOk(e);
|
|
@@ -332,80 +366,80 @@ var PopConfirm = (props) => {
|
|
|
332
366
|
},
|
|
333
367
|
className: "ml-16 relative",
|
|
334
368
|
type: loading ? "disabled" /* DISABLED */ : "primary" /* PRIMARY */
|
|
335
|
-
}, "OK", loading && /* @__PURE__ */
|
|
369
|
+
}, "OK", loading && /* @__PURE__ */ React12.createElement(BlinkDot, {
|
|
336
370
|
className: "!absolute top-2 right-2"
|
|
337
371
|
}))));
|
|
338
372
|
};
|
|
339
373
|
|
|
340
374
|
// lib/table/Table.tsx
|
|
341
|
-
import
|
|
375
|
+
import React13 from "react";
|
|
342
376
|
var Table = (props) => {
|
|
343
377
|
const { rowCount, rowRenderer, headerRenderer, className } = props;
|
|
344
378
|
const rows = [];
|
|
345
379
|
for (let i = 0; i < rowCount; i++) {
|
|
346
|
-
rows.push(/* @__PURE__ */
|
|
380
|
+
rows.push(/* @__PURE__ */ React13.createElement("tr", {
|
|
347
381
|
key: i
|
|
348
382
|
}, rowRenderer(i)));
|
|
349
383
|
}
|
|
350
|
-
return /* @__PURE__ */
|
|
384
|
+
return /* @__PURE__ */ React13.createElement("table", {
|
|
351
385
|
className
|
|
352
|
-
}, headerRenderer && /* @__PURE__ */
|
|
386
|
+
}, headerRenderer && /* @__PURE__ */ React13.createElement("thead", null, /* @__PURE__ */ React13.createElement("tr", null, headerRenderer())), /* @__PURE__ */ React13.createElement("tbody", null, rows));
|
|
353
387
|
};
|
|
354
|
-
Table.HCell = (props) => /* @__PURE__ */
|
|
388
|
+
Table.HCell = (props) => /* @__PURE__ */ React13.createElement("th", {
|
|
355
389
|
...props
|
|
356
390
|
}, props.children);
|
|
357
|
-
Table.Cell = (props) => /* @__PURE__ */
|
|
391
|
+
Table.Cell = (props) => /* @__PURE__ */ React13.createElement("td", {
|
|
358
392
|
...props
|
|
359
393
|
}, props.children);
|
|
360
394
|
|
|
361
395
|
// lib/skeleton/Seleton.tsx
|
|
362
396
|
import classNames6 from "classnames";
|
|
363
|
-
import
|
|
397
|
+
import React15 from "react";
|
|
364
398
|
|
|
365
399
|
// lib/list/list.tsx
|
|
366
|
-
import
|
|
367
|
-
import
|
|
400
|
+
import cls2 from "classnames";
|
|
401
|
+
import React14 from "react";
|
|
368
402
|
var List = (props) => {
|
|
369
403
|
const { items, itemRenderer, className, horizontal, compact } = props;
|
|
370
404
|
const spaceCls = compact ? "" : horizontal ? "mr-3" : "mb-16";
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
className:
|
|
405
|
+
return /* @__PURE__ */ React14.createElement("ul", {
|
|
406
|
+
className: cls2(className, "list-style-none", {
|
|
373
407
|
flex: horizontal,
|
|
374
408
|
"items-center": horizontal
|
|
375
409
|
})
|
|
376
410
|
}, items.map((item, index) => {
|
|
377
|
-
return /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ React14.createElement("li", {
|
|
378
412
|
key: item.id || index,
|
|
379
|
-
className:
|
|
413
|
+
className: cls2(spaceCls, "flex-shrink-0", { "!my-0": horizontal })
|
|
380
414
|
}, itemRenderer(item, index));
|
|
381
415
|
}));
|
|
382
416
|
};
|
|
383
417
|
var TitledList = (props) => {
|
|
384
418
|
const { title, description, ...rest } = props;
|
|
385
419
|
if (!title) {
|
|
386
|
-
return /* @__PURE__ */
|
|
420
|
+
return /* @__PURE__ */ React14.createElement(List, {
|
|
387
421
|
...rest
|
|
388
422
|
});
|
|
389
423
|
}
|
|
390
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ React14.createElement(Article, {
|
|
391
425
|
title,
|
|
392
426
|
description,
|
|
393
427
|
className: "w-fit"
|
|
394
|
-
}, /* @__PURE__ */
|
|
428
|
+
}, /* @__PURE__ */ React14.createElement(List, {
|
|
395
429
|
...rest
|
|
396
430
|
}));
|
|
397
431
|
};
|
|
398
432
|
var LinkList = (props) => {
|
|
399
433
|
const { title, description, links, ...rest } = props;
|
|
400
434
|
const renderLink = ({ name, to, external, ...rest2 }) => {
|
|
401
|
-
return /* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ React14.createElement(Link, {
|
|
402
436
|
to,
|
|
403
437
|
key: name,
|
|
404
438
|
external,
|
|
405
439
|
...rest2
|
|
406
440
|
}, name);
|
|
407
441
|
};
|
|
408
|
-
return /* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ React14.createElement(TitledList, {
|
|
409
443
|
title,
|
|
410
444
|
description,
|
|
411
445
|
items: links,
|
|
@@ -435,7 +469,7 @@ var Skeleton = (props) => {
|
|
|
435
469
|
height = 24,
|
|
436
470
|
className
|
|
437
471
|
} = props;
|
|
438
|
-
return /* @__PURE__ */
|
|
472
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
439
473
|
className: classNames6(
|
|
440
474
|
COLOR_MAPPING2[bgColor],
|
|
441
475
|
"animate-pulse",
|
|
@@ -447,13 +481,13 @@ var Skeleton = (props) => {
|
|
|
447
481
|
};
|
|
448
482
|
var ArticleSkeleton = (props) => {
|
|
449
483
|
const { children, titleLength = 0, descriptionLength } = props;
|
|
450
|
-
return /* @__PURE__ */
|
|
451
|
-
title: /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ React15.createElement(Article, {
|
|
485
|
+
title: /* @__PURE__ */ React15.createElement(Skeleton, {
|
|
452
486
|
width: 36 * titleLength,
|
|
453
487
|
height: 36,
|
|
454
488
|
bgColor: "black" /* BLACK */
|
|
455
489
|
}),
|
|
456
|
-
description: descriptionLength && /* @__PURE__ */
|
|
490
|
+
description: descriptionLength && /* @__PURE__ */ React15.createElement(Skeleton, {
|
|
457
491
|
width: 16 * descriptionLength
|
|
458
492
|
})
|
|
459
493
|
}, children);
|
|
@@ -461,29 +495,29 @@ var ArticleSkeleton = (props) => {
|
|
|
461
495
|
var LinkListSkeleton = (props) => {
|
|
462
496
|
const { linksLength, ...rest } = props;
|
|
463
497
|
const renderSkeleton = (length) => {
|
|
464
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ React15.createElement(Skeleton, {
|
|
465
499
|
className: "inline-block align-middle",
|
|
466
500
|
width: length * 16,
|
|
467
501
|
bgColor: "blue" /* BLUE */
|
|
468
502
|
});
|
|
469
503
|
};
|
|
470
504
|
if (!rest.titleLength) {
|
|
471
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ React15.createElement(List, {
|
|
472
506
|
items: linksLength,
|
|
473
507
|
itemRenderer: renderSkeleton
|
|
474
508
|
});
|
|
475
509
|
}
|
|
476
|
-
return /* @__PURE__ */
|
|
510
|
+
return /* @__PURE__ */ React15.createElement(ArticleSkeleton, {
|
|
477
511
|
...rest
|
|
478
|
-
}, /* @__PURE__ */
|
|
512
|
+
}, /* @__PURE__ */ React15.createElement(List, {
|
|
479
513
|
items: linksLength,
|
|
480
514
|
itemRenderer: renderSkeleton
|
|
481
515
|
}));
|
|
482
516
|
};
|
|
483
517
|
|
|
484
518
|
// lib/drop-image/DropImage.tsx
|
|
485
|
-
import
|
|
486
|
-
import
|
|
519
|
+
import cls3 from "classnames";
|
|
520
|
+
import React16, {
|
|
487
521
|
useEffect as useEffect2,
|
|
488
522
|
useCallback as useCallback2
|
|
489
523
|
} from "react";
|
|
@@ -607,8 +641,8 @@ var ImagePreviewer = (props) => {
|
|
|
607
641
|
imageSrc,
|
|
608
642
|
className
|
|
609
643
|
} = props;
|
|
610
|
-
return /* @__PURE__ */
|
|
611
|
-
className:
|
|
644
|
+
return /* @__PURE__ */ React16.createElement("img", {
|
|
645
|
+
className: cls3(
|
|
612
646
|
className,
|
|
613
647
|
"max-w-[100%]",
|
|
614
648
|
"h-[auto]",
|
|
@@ -672,13 +706,13 @@ var GhostDropImage = (props) => {
|
|
|
672
706
|
document.removeEventListener("dragenter", handleDocDragEnter);
|
|
673
707
|
};
|
|
674
708
|
}, []);
|
|
675
|
-
const coverCls =
|
|
709
|
+
const coverCls = cls3("fixed", "top-0", "left-0", "h-full", "w-full", {
|
|
676
710
|
"lqip-blur": coverVisible,
|
|
677
711
|
"z-[999]": coverVisible,
|
|
678
712
|
block: coverVisible,
|
|
679
713
|
hidden: !coverVisible
|
|
680
714
|
});
|
|
681
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", {
|
|
682
716
|
className: coverCls,
|
|
683
717
|
onDragLeave: () => {
|
|
684
718
|
handleDragLeave();
|
|
@@ -691,7 +725,7 @@ var GhostDropImage = (props) => {
|
|
|
691
725
|
imageRef,
|
|
692
726
|
imageSize,
|
|
693
727
|
imageSrc
|
|
694
|
-
}) : /* @__PURE__ */
|
|
728
|
+
}) : /* @__PURE__ */ React16.createElement(ImagePreviewer, {
|
|
695
729
|
className,
|
|
696
730
|
visible: imageVisible,
|
|
697
731
|
imageRef,
|
|
@@ -718,7 +752,7 @@ var DropImage = (props) => {
|
|
|
718
752
|
}
|
|
719
753
|
} = props;
|
|
720
754
|
if (ghost) {
|
|
721
|
-
return /* @__PURE__ */
|
|
755
|
+
return /* @__PURE__ */ React16.createElement(GhostDropImage, {
|
|
722
756
|
...props
|
|
723
757
|
});
|
|
724
758
|
}
|
|
@@ -751,8 +785,8 @@ var DropImage = (props) => {
|
|
|
751
785
|
height: imageSize.height || dropAreaStyle.height
|
|
752
786
|
});
|
|
753
787
|
};
|
|
754
|
-
return /* @__PURE__ */
|
|
755
|
-
className:
|
|
788
|
+
return /* @__PURE__ */ React16.createElement("div", {
|
|
789
|
+
className: cls3(
|
|
756
790
|
className,
|
|
757
791
|
"transition-all items-center justify-center flex duration-200 ease-in-out",
|
|
758
792
|
{
|
|
@@ -769,7 +803,7 @@ var DropImage = (props) => {
|
|
|
769
803
|
imageRef,
|
|
770
804
|
imageSize,
|
|
771
805
|
imageSrc
|
|
772
|
-
}) : /* @__PURE__ */
|
|
806
|
+
}) : /* @__PURE__ */ React16.createElement(ImagePreviewer, {
|
|
773
807
|
visible: showImagePreviewer,
|
|
774
808
|
imageRef,
|
|
775
809
|
imageSrc,
|
|
@@ -778,27 +812,27 @@ var DropImage = (props) => {
|
|
|
778
812
|
};
|
|
779
813
|
|
|
780
814
|
// lib/layout/layout.tsx
|
|
781
|
-
import
|
|
782
|
-
import
|
|
815
|
+
import cls4 from "classnames";
|
|
816
|
+
import React17 from "react";
|
|
783
817
|
var ThreeColLayout = (props) => {
|
|
784
818
|
const { leftRenderer, middleRenderer, rightRenderer } = props;
|
|
785
|
-
const colCls =
|
|
786
|
-
return /* @__PURE__ */
|
|
819
|
+
const colCls = cls4("max-h-full overflow-auto xl:!block py-128");
|
|
820
|
+
return /* @__PURE__ */ React17.createElement("div", {
|
|
787
821
|
className: "grid grid-cols-1 xl:grid-cols-3 gap-4 h-full w-full"
|
|
788
|
-
}, /* @__PURE__ */
|
|
789
|
-
className:
|
|
790
|
-
}, leftRenderer && leftRenderer()), /* @__PURE__ */
|
|
791
|
-
className:
|
|
822
|
+
}, /* @__PURE__ */ React17.createElement("div", {
|
|
823
|
+
className: cls4("hidden", colCls)
|
|
824
|
+
}, leftRenderer && leftRenderer()), /* @__PURE__ */ React17.createElement("div", {
|
|
825
|
+
className: cls4(colCls, "sm:px-128 xl:px-0 no-scrollbar", "relative", {
|
|
792
826
|
hidden: !middleRenderer
|
|
793
827
|
})
|
|
794
|
-
}, middleRenderer && middleRenderer()), /* @__PURE__ */
|
|
795
|
-
className:
|
|
828
|
+
}, middleRenderer && middleRenderer()), /* @__PURE__ */ React17.createElement("div", {
|
|
829
|
+
className: cls4("hidden", colCls)
|
|
796
830
|
}, rightRenderer && rightRenderer()));
|
|
797
831
|
};
|
|
798
832
|
|
|
799
833
|
// lib/img/Img.tsx
|
|
800
834
|
import classnames from "classnames";
|
|
801
|
-
import
|
|
835
|
+
import React18, { useState as useState5 } from "react";
|
|
802
836
|
|
|
803
837
|
// lib/img/types.ts
|
|
804
838
|
var ossProcessType = /* @__PURE__ */ ((ossProcessType2) => {
|
|
@@ -877,7 +911,7 @@ var Img = (props) => {
|
|
|
877
911
|
}
|
|
878
912
|
img.onload = updateFunc;
|
|
879
913
|
};
|
|
880
|
-
return /* @__PURE__ */
|
|
914
|
+
return /* @__PURE__ */ React18.createElement("span", {
|
|
881
915
|
className: classnames(
|
|
882
916
|
className,
|
|
883
917
|
"inline-block",
|
|
@@ -890,7 +924,7 @@ var Img = (props) => {
|
|
|
890
924
|
),
|
|
891
925
|
draggable: false,
|
|
892
926
|
style: Object.assign({}, baseWrapperStyle, dynamicWrapperStyle)
|
|
893
|
-
}, /* @__PURE__ */
|
|
927
|
+
}, /* @__PURE__ */ React18.createElement("img", {
|
|
894
928
|
ref: (input) => {
|
|
895
929
|
if (!input) {
|
|
896
930
|
return;
|
|
@@ -902,6 +936,7 @@ var Img = (props) => {
|
|
|
902
936
|
src: addOssWebpProcessStyle(src, processType || "webp" /* WEBP */),
|
|
903
937
|
decoding: "async",
|
|
904
938
|
loading: "lazy",
|
|
939
|
+
crossOrigin: "anonymous",
|
|
905
940
|
style: {
|
|
906
941
|
contentVisibility: "auto"
|
|
907
942
|
},
|
|
@@ -913,7 +948,7 @@ var Img = (props) => {
|
|
|
913
948
|
"opacity-0": !decoded
|
|
914
949
|
}
|
|
915
950
|
)
|
|
916
|
-
}), /* @__PURE__ */
|
|
951
|
+
}), /* @__PURE__ */ React18.createElement("img", {
|
|
917
952
|
src: emptyDataURL,
|
|
918
953
|
className: classnames(
|
|
919
954
|
"lqip-blur",
|
|
@@ -927,17 +962,18 @@ var Img = (props) => {
|
|
|
927
962
|
"opacity-0": decoded
|
|
928
963
|
}
|
|
929
964
|
),
|
|
965
|
+
crossOrigin: "anonymous",
|
|
930
966
|
style: { top: 0, left: 0 }
|
|
931
967
|
}));
|
|
932
968
|
};
|
|
933
969
|
|
|
934
970
|
// lib/img/Gallery.tsx
|
|
935
971
|
import classnames3 from "classnames";
|
|
936
|
-
import
|
|
972
|
+
import React20 from "react";
|
|
937
973
|
|
|
938
974
|
// lib/img/RandomRowsLayout.tsx
|
|
939
975
|
import classnames2 from "classnames";
|
|
940
|
-
import
|
|
976
|
+
import React19 from "react";
|
|
941
977
|
var last = (arr) => {
|
|
942
978
|
if (arr.length < 2) {
|
|
943
979
|
return arr[0];
|
|
@@ -972,7 +1008,7 @@ var sumColNumByIdx = (colNums, idx) => {
|
|
|
972
1008
|
}
|
|
973
1009
|
return sum;
|
|
974
1010
|
};
|
|
975
|
-
var RandomRowsLayout =
|
|
1011
|
+
var RandomRowsLayout = React19.memo(
|
|
976
1012
|
(props) => {
|
|
977
1013
|
const {
|
|
978
1014
|
cellsCount,
|
|
@@ -981,14 +1017,14 @@ var RandomRowsLayout = React18.memo(
|
|
|
981
1017
|
cellWrapperClsGenerator = defaultCellClsGenerator
|
|
982
1018
|
} = props;
|
|
983
1019
|
const colNums = generateRandomColNum(cellsCount);
|
|
984
|
-
return /* @__PURE__ */
|
|
1020
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
985
1021
|
className: classNames8
|
|
986
1022
|
}, colNums.map((colNum, row) => {
|
|
987
1023
|
const randBool = generateRandomBoolean(
|
|
988
1024
|
colNum < 2 ? 0.6 : 0.5
|
|
989
1025
|
);
|
|
990
1026
|
const randBoolArr = [randBool, !randBool];
|
|
991
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
992
1028
|
className: "flex items-center flex-wrap",
|
|
993
1029
|
key: row
|
|
994
1030
|
}, new Array(colNum).fill(null).map((_, col) => {
|
|
@@ -1002,7 +1038,7 @@ var RandomRowsLayout = React18.memo(
|
|
|
1002
1038
|
"basis-full",
|
|
1003
1039
|
generatedCls
|
|
1004
1040
|
);
|
|
1005
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1006
1042
|
className: cls6,
|
|
1007
1043
|
key: col
|
|
1008
1044
|
}, cellRenderer(currentIdx, randBoolArr[col], col));
|
|
@@ -1016,7 +1052,7 @@ var RandomRowsLayout = React18.memo(
|
|
|
1016
1052
|
|
|
1017
1053
|
// lib/img/Gallery.tsx
|
|
1018
1054
|
var defaultImageRenderer = (img, index, col) => {
|
|
1019
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
1020
1056
|
className: classnames3("mb-128", {
|
|
1021
1057
|
"md:mr-64": col === 0,
|
|
1022
1058
|
"md:ml-64": col !== 0
|
|
@@ -1037,7 +1073,7 @@ var Gallery = (props) => {
|
|
|
1037
1073
|
return null;
|
|
1038
1074
|
}
|
|
1039
1075
|
return imageRenderer(
|
|
1040
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ React20.createElement(Img, {
|
|
1041
1077
|
...image,
|
|
1042
1078
|
size: isLargeImage ? "large" : "normal"
|
|
1043
1079
|
}),
|
|
@@ -1046,9 +1082,9 @@ var Gallery = (props) => {
|
|
|
1046
1082
|
isLargeImage
|
|
1047
1083
|
);
|
|
1048
1084
|
};
|
|
1049
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ React20.createElement("div", {
|
|
1050
1086
|
className: classnames3("w-full flex justify-center", className)
|
|
1051
|
-
}, /* @__PURE__ */
|
|
1087
|
+
}, /* @__PURE__ */ React20.createElement(RandomRowsLayout, {
|
|
1052
1088
|
classNames: "mx-32 mt-128 max-w-screen-xl",
|
|
1053
1089
|
cellsCount: images.length,
|
|
1054
1090
|
cellRenderer: renderImage,
|
|
@@ -1059,7 +1095,7 @@ var Gallery = (props) => {
|
|
|
1059
1095
|
// lib/loading-spiral/LoadingSpiral.tsx
|
|
1060
1096
|
import Phenomenon from "phenomenon";
|
|
1061
1097
|
import classNames7 from "classnames";
|
|
1062
|
-
import
|
|
1098
|
+
import React21, { useEffect as useEffect3, useRef as useRef2 } from "react";
|
|
1063
1099
|
|
|
1064
1100
|
// lib/loading-spiral/createSettings.ts
|
|
1065
1101
|
var createSettings = (settings) => {
|
|
@@ -1189,7 +1225,7 @@ var LoadingSpiral = (props) => {
|
|
|
1189
1225
|
createOptions()
|
|
1190
1226
|
);
|
|
1191
1227
|
}, []);
|
|
1192
|
-
return /* @__PURE__ */
|
|
1228
|
+
return /* @__PURE__ */ React21.createElement("canvas", {
|
|
1193
1229
|
style: {
|
|
1194
1230
|
maxWidth: 500,
|
|
1195
1231
|
maxHeight: 500,
|
|
@@ -1204,8 +1240,8 @@ var LoadingSpiral = (props) => {
|
|
|
1204
1240
|
};
|
|
1205
1241
|
|
|
1206
1242
|
// lib/drop-zone/DropZone.tsx
|
|
1207
|
-
import
|
|
1208
|
-
import
|
|
1243
|
+
import React22, { useCallback as useCallback3, useEffect as useEffect4, useState as useState6 } from "react";
|
|
1244
|
+
import cls5 from "classnames";
|
|
1209
1245
|
var DropZone = (props) => {
|
|
1210
1246
|
const { onDrop, children, className, style } = props;
|
|
1211
1247
|
const [coverVisible, setCoverVisible] = useState6(false);
|
|
@@ -1226,19 +1262,19 @@ var DropZone = (props) => {
|
|
|
1226
1262
|
};
|
|
1227
1263
|
}, []);
|
|
1228
1264
|
if (props.disabled) {
|
|
1229
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, children);
|
|
1230
1266
|
}
|
|
1231
1267
|
const handleDragOver = (e) => {
|
|
1232
1268
|
e.preventDefault();
|
|
1233
1269
|
setCoverVisible(true);
|
|
1234
1270
|
};
|
|
1235
|
-
const coverCls =
|
|
1271
|
+
const coverCls = cls5("fixed", "top-0", "left-0", "h-full", "w-full", {
|
|
1236
1272
|
"text-blur": coverVisible,
|
|
1237
1273
|
"z-[999]": coverVisible,
|
|
1238
1274
|
block: coverVisible,
|
|
1239
1275
|
hidden: !coverVisible
|
|
1240
1276
|
});
|
|
1241
|
-
return /* @__PURE__ */
|
|
1277
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement("div", {
|
|
1242
1278
|
className: coverCls,
|
|
1243
1279
|
onDragLeave: () => {
|
|
1244
1280
|
setCoverVisible(false);
|
|
@@ -1249,7 +1285,7 @@ var DropZone = (props) => {
|
|
|
1249
1285
|
};
|
|
1250
1286
|
|
|
1251
1287
|
// lib/context-menu/index.tsx
|
|
1252
|
-
import * as
|
|
1288
|
+
import * as React23 from "react";
|
|
1253
1289
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
1254
1290
|
import {
|
|
1255
1291
|
CheckIcon,
|
|
@@ -1264,7 +1300,7 @@ var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
|
1264
1300
|
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1265
1301
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1266
1302
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1267
|
-
var ContextMenuSubTrigger =
|
|
1303
|
+
var ContextMenuSubTrigger = React23.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.SubTrigger, {
|
|
1268
1304
|
ref,
|
|
1269
1305
|
className: cn(
|
|
1270
1306
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
@@ -1272,11 +1308,11 @@ var ContextMenuSubTrigger = React22.forwardRef(({ className, inset, children, ..
|
|
|
1272
1308
|
className
|
|
1273
1309
|
),
|
|
1274
1310
|
...props
|
|
1275
|
-
}, children, /* @__PURE__ */
|
|
1311
|
+
}, children, /* @__PURE__ */ React23.createElement(ChevronRightIcon, {
|
|
1276
1312
|
className: "ml-auto"
|
|
1277
1313
|
})));
|
|
1278
1314
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1279
|
-
var ContextMenuSubContent =
|
|
1315
|
+
var ContextMenuSubContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.SubContent, {
|
|
1280
1316
|
ref,
|
|
1281
1317
|
className: cn(
|
|
1282
1318
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
@@ -1285,7 +1321,7 @@ var ContextMenuSubContent = React22.forwardRef(({ className, ...props }, ref) =>
|
|
|
1285
1321
|
...props
|
|
1286
1322
|
}));
|
|
1287
1323
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1288
|
-
var ContextMenuContent =
|
|
1324
|
+
var ContextMenuContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.Portal, null, /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.Content, {
|
|
1289
1325
|
ref,
|
|
1290
1326
|
className: cn(
|
|
1291
1327
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
@@ -1294,7 +1330,7 @@ var ContextMenuContent = React22.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1294
1330
|
...props
|
|
1295
1331
|
})));
|
|
1296
1332
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1297
|
-
var ContextMenuItem =
|
|
1333
|
+
var ContextMenuItem = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.Item, {
|
|
1298
1334
|
ref,
|
|
1299
1335
|
className: cn(
|
|
1300
1336
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -1304,7 +1340,7 @@ var ContextMenuItem = React22.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1304
1340
|
...props
|
|
1305
1341
|
}));
|
|
1306
1342
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1307
|
-
var ContextMenuCheckboxItem =
|
|
1343
|
+
var ContextMenuCheckboxItem = React23.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.CheckboxItem, {
|
|
1308
1344
|
ref,
|
|
1309
1345
|
className: cn(
|
|
1310
1346
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-32 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -1312,26 +1348,26 @@ var ContextMenuCheckboxItem = React22.forwardRef(({ className, children, checked
|
|
|
1312
1348
|
),
|
|
1313
1349
|
checked,
|
|
1314
1350
|
...props
|
|
1315
|
-
}, /* @__PURE__ */
|
|
1351
|
+
}, /* @__PURE__ */ React23.createElement("span", {
|
|
1316
1352
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1317
|
-
}, /* @__PURE__ */
|
|
1353
|
+
}, /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React23.createElement(CheckIcon, {
|
|
1318
1354
|
className: "h-4 w-4"
|
|
1319
1355
|
}))), children));
|
|
1320
1356
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1321
|
-
var ContextMenuRadioItem =
|
|
1357
|
+
var ContextMenuRadioItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.RadioItem, {
|
|
1322
1358
|
ref,
|
|
1323
1359
|
className: cn(
|
|
1324
1360
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-32 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1325
1361
|
className
|
|
1326
1362
|
),
|
|
1327
1363
|
...props
|
|
1328
|
-
}, /* @__PURE__ */
|
|
1364
|
+
}, /* @__PURE__ */ React23.createElement("span", {
|
|
1329
1365
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
1330
|
-
}, /* @__PURE__ */
|
|
1366
|
+
}, /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React23.createElement(DotFilledIcon, {
|
|
1331
1367
|
className: "h-4 w-4 fill-current"
|
|
1332
1368
|
}))), children));
|
|
1333
1369
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1334
|
-
var ContextMenuLabel =
|
|
1370
|
+
var ContextMenuLabel = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.Label, {
|
|
1335
1371
|
ref,
|
|
1336
1372
|
className: cn(
|
|
1337
1373
|
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
@@ -1341,7 +1377,7 @@ var ContextMenuLabel = React22.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1341
1377
|
...props
|
|
1342
1378
|
}));
|
|
1343
1379
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1344
|
-
var ContextMenuSeparator =
|
|
1380
|
+
var ContextMenuSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(ContextMenuPrimitive.Separator, {
|
|
1345
1381
|
ref,
|
|
1346
1382
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1347
1383
|
...props
|
|
@@ -1351,7 +1387,7 @@ var ContextMenuShortcut = ({
|
|
|
1351
1387
|
className,
|
|
1352
1388
|
...props
|
|
1353
1389
|
}) => {
|
|
1354
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ React23.createElement("span", {
|
|
1355
1391
|
className: cn(
|
|
1356
1392
|
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1357
1393
|
className
|
|
@@ -1362,7 +1398,7 @@ var ContextMenuShortcut = ({
|
|
|
1362
1398
|
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
1363
1399
|
|
|
1364
1400
|
// lib/form/index.tsx
|
|
1365
|
-
import * as
|
|
1401
|
+
import * as React25 from "react";
|
|
1366
1402
|
import { z } from "zod";
|
|
1367
1403
|
import { Slot } from "@radix-ui/react-slot";
|
|
1368
1404
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -1375,7 +1411,7 @@ import {
|
|
|
1375
1411
|
import cn3 from "classnames";
|
|
1376
1412
|
|
|
1377
1413
|
// lib/label/index.tsx
|
|
1378
|
-
import * as
|
|
1414
|
+
import * as React24 from "react";
|
|
1379
1415
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1380
1416
|
import { cva } from "class-variance-authority";
|
|
1381
1417
|
import cn2 from "classnames";
|
|
@@ -1383,7 +1419,7 @@ import cn2 from "classnames";
|
|
|
1383
1419
|
var labelVariants = cva(
|
|
1384
1420
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1385
1421
|
);
|
|
1386
|
-
var Label2 =
|
|
1422
|
+
var Label2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(LabelPrimitive.Root, {
|
|
1387
1423
|
ref,
|
|
1388
1424
|
className: cn2(labelVariants(), className),
|
|
1389
1425
|
...props
|
|
@@ -1393,21 +1429,21 @@ Label2.displayName = LabelPrimitive.Root.displayName;
|
|
|
1393
1429
|
// lib/form/index.tsx
|
|
1394
1430
|
"use client";
|
|
1395
1431
|
var Form = FormProvider;
|
|
1396
|
-
var FormFieldContext =
|
|
1432
|
+
var FormFieldContext = React25.createContext(
|
|
1397
1433
|
{}
|
|
1398
1434
|
);
|
|
1399
1435
|
var FormField = ({
|
|
1400
1436
|
...props
|
|
1401
1437
|
}) => {
|
|
1402
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ React25.createElement(FormFieldContext.Provider, {
|
|
1403
1439
|
value: { name: props.name }
|
|
1404
|
-
}, /* @__PURE__ */
|
|
1440
|
+
}, /* @__PURE__ */ React25.createElement(Controller, {
|
|
1405
1441
|
...props
|
|
1406
1442
|
}));
|
|
1407
1443
|
};
|
|
1408
1444
|
var useFormField = () => {
|
|
1409
|
-
const fieldContext =
|
|
1410
|
-
const itemContext =
|
|
1445
|
+
const fieldContext = React25.useContext(FormFieldContext);
|
|
1446
|
+
const itemContext = React25.useContext(FormItemContext);
|
|
1411
1447
|
const { getFieldState, formState } = useFormContext();
|
|
1412
1448
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1413
1449
|
if (!fieldContext) {
|
|
@@ -1423,23 +1459,23 @@ var useFormField = () => {
|
|
|
1423
1459
|
...fieldState
|
|
1424
1460
|
};
|
|
1425
1461
|
};
|
|
1426
|
-
var FormItemContext =
|
|
1462
|
+
var FormItemContext = React25.createContext(
|
|
1427
1463
|
{}
|
|
1428
1464
|
);
|
|
1429
|
-
var FormItem =
|
|
1430
|
-
const id =
|
|
1431
|
-
return /* @__PURE__ */
|
|
1465
|
+
var FormItem = React25.forwardRef(({ className, ...props }, ref) => {
|
|
1466
|
+
const id = React25.useId();
|
|
1467
|
+
return /* @__PURE__ */ React25.createElement(FormItemContext.Provider, {
|
|
1432
1468
|
value: { id }
|
|
1433
|
-
}, /* @__PURE__ */
|
|
1469
|
+
}, /* @__PURE__ */ React25.createElement("div", {
|
|
1434
1470
|
ref,
|
|
1435
1471
|
className: cn3("space-y-2", className),
|
|
1436
1472
|
...props
|
|
1437
1473
|
}));
|
|
1438
1474
|
});
|
|
1439
1475
|
FormItem.displayName = "FormItem";
|
|
1440
|
-
var FormLabel =
|
|
1476
|
+
var FormLabel = React25.forwardRef(({ className, ...props }, ref) => {
|
|
1441
1477
|
const { error, formItemId } = useFormField();
|
|
1442
|
-
return /* @__PURE__ */
|
|
1478
|
+
return /* @__PURE__ */ React25.createElement(Label2, {
|
|
1443
1479
|
ref,
|
|
1444
1480
|
className: cn3(error && "text-destructive", className),
|
|
1445
1481
|
htmlFor: formItemId,
|
|
@@ -1447,9 +1483,9 @@ var FormLabel = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
1447
1483
|
});
|
|
1448
1484
|
});
|
|
1449
1485
|
FormLabel.displayName = "FormLabel";
|
|
1450
|
-
var FormControl =
|
|
1486
|
+
var FormControl = React25.forwardRef(({ ...props }, ref) => {
|
|
1451
1487
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
1452
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ React25.createElement(Slot, {
|
|
1453
1489
|
ref,
|
|
1454
1490
|
id: formItemId,
|
|
1455
1491
|
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
@@ -1458,9 +1494,9 @@ var FormControl = React24.forwardRef(({ ...props }, ref) => {
|
|
|
1458
1494
|
});
|
|
1459
1495
|
});
|
|
1460
1496
|
FormControl.displayName = "FormControl";
|
|
1461
|
-
var FormDescription =
|
|
1497
|
+
var FormDescription = React25.forwardRef(({ className, ...props }, ref) => {
|
|
1462
1498
|
const { formDescriptionId } = useFormField();
|
|
1463
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ React25.createElement("p", {
|
|
1464
1500
|
ref,
|
|
1465
1501
|
id: formDescriptionId,
|
|
1466
1502
|
className: cn3("text-sm text-muted-foreground", className),
|
|
@@ -1468,13 +1504,13 @@ var FormDescription = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
1468
1504
|
});
|
|
1469
1505
|
});
|
|
1470
1506
|
FormDescription.displayName = "FormDescription";
|
|
1471
|
-
var FormMessage =
|
|
1507
|
+
var FormMessage = React25.forwardRef(({ className, children, ...props }, ref) => {
|
|
1472
1508
|
const { error, formMessageId } = useFormField();
|
|
1473
1509
|
const body = error ? String(error == null ? void 0 : error.message) : children;
|
|
1474
1510
|
if (!body) {
|
|
1475
1511
|
return null;
|
|
1476
1512
|
}
|
|
1477
|
-
return /* @__PURE__ */
|
|
1513
|
+
return /* @__PURE__ */ React25.createElement("p", {
|
|
1478
1514
|
ref,
|
|
1479
1515
|
id: formMessageId,
|
|
1480
1516
|
className: cn3("text-sm font-medium text-destructive", className),
|
|
@@ -1484,11 +1520,11 @@ var FormMessage = React24.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1484
1520
|
FormMessage.displayName = "FormMessage";
|
|
1485
1521
|
|
|
1486
1522
|
// lib/input/index.tsx
|
|
1487
|
-
import * as
|
|
1523
|
+
import * as React26 from "react";
|
|
1488
1524
|
import cn4 from "classnames";
|
|
1489
|
-
var Input =
|
|
1525
|
+
var Input = React26.forwardRef(
|
|
1490
1526
|
({ className, type, ...props }, ref) => {
|
|
1491
|
-
return /* @__PURE__ */
|
|
1527
|
+
return /* @__PURE__ */ React26.createElement("input", {
|
|
1492
1528
|
type,
|
|
1493
1529
|
className: cn4(
|
|
1494
1530
|
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
@@ -1501,33 +1537,6 @@ var Input = React25.forwardRef(
|
|
|
1501
1537
|
);
|
|
1502
1538
|
Input.displayName = "Input";
|
|
1503
1539
|
|
|
1504
|
-
// lib/blur-cover/BlurCover.tsx
|
|
1505
|
-
import React26 from "react";
|
|
1506
|
-
import cls5 from "classnames";
|
|
1507
|
-
var BlurCover = (props) => {
|
|
1508
|
-
const { status } = props;
|
|
1509
|
-
const coverCls = cls5(
|
|
1510
|
-
"fixed",
|
|
1511
|
-
"block",
|
|
1512
|
-
"text-blur",
|
|
1513
|
-
"transition-all",
|
|
1514
|
-
"top-0",
|
|
1515
|
-
"left-0",
|
|
1516
|
-
"h-full",
|
|
1517
|
-
"w-full",
|
|
1518
|
-
{
|
|
1519
|
-
"z-[999]": status === "show",
|
|
1520
|
-
"opacity-0": status === "silent",
|
|
1521
|
-
"opacity-100": status === "show",
|
|
1522
|
-
"pointer-events-none": status === "silent"
|
|
1523
|
-
},
|
|
1524
|
-
props.className
|
|
1525
|
-
);
|
|
1526
|
-
return /* @__PURE__ */ React26.createElement("div", {
|
|
1527
|
-
className: coverCls
|
|
1528
|
-
});
|
|
1529
|
-
};
|
|
1530
|
-
|
|
1531
1540
|
// lib/canvas/Canvas.tsx
|
|
1532
1541
|
import React27, { useEffect as useEffect6 } from "react";
|
|
1533
1542
|
|