@sudobility/documents-components 1.0.8
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/cell-editor.d.ts +33 -0
- package/dist/cell-editor.d.ts.map +1 -0
- package/dist/column-resize.d.ts +33 -0
- package/dist/column-resize.d.ts.map +1 -0
- package/dist/csv-importer.d.ts +33 -0
- package/dist/csv-importer.d.ts.map +1 -0
- package/dist/diff-viewer.d.ts +33 -0
- package/dist/diff-viewer.d.ts.map +1 -0
- package/dist/excel-uploader.d.ts +33 -0
- package/dist/excel-uploader.d.ts.map +1 -0
- package/dist/file-browser.d.ts +33 -0
- package/dist/file-browser.d.ts.map +1 -0
- package/dist/file-icon.d.ts +32 -0
- package/dist/file-icon.d.ts.map +1 -0
- package/dist/file-preview.d.ts +33 -0
- package/dist/file-preview.d.ts.map +1 -0
- package/dist/file-tree.d.ts +33 -0
- package/dist/file-tree.d.ts.map +1 -0
- package/dist/icon-button.d.ts +57 -0
- package/dist/icon-button.d.ts.map +1 -0
- package/dist/import-preview.d.ts +33 -0
- package/dist/import-preview.d.ts.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +1119 -0
- package/dist/index.umd.js +6 -0
- package/dist/json-importer.d.ts +33 -0
- package/dist/json-importer.d.ts.map +1 -0
- package/dist/json-viewer.d.ts +33 -0
- package/dist/json-viewer.d.ts.map +1 -0
- package/dist/key-value-pair.d.ts +56 -0
- package/dist/key-value-pair.d.ts.map +1 -0
- package/dist/markdown-renderer.d.ts +33 -0
- package/dist/markdown-renderer.d.ts.map +1 -0
- package/dist/qr-code-display.d.ts +46 -0
- package/dist/qr-code-display.d.ts.map +1 -0
- package/dist/upload-progress.d.ts +33 -0
- package/dist/upload-progress.d.ts.map +1 -0
- package/dist/wysiwyg-editor.d.ts +8 -0
- package/dist/wysiwyg-editor.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,1119 @@
|
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import oe, { useRef as ae, useEffect as ne } from "react";
|
|
3
|
+
import { cn as g } from "@sudobility/components";
|
|
4
|
+
import { textVariants as U } from "@sudobility/design";
|
|
5
|
+
var A = { exports: {} }, _ = {};
|
|
6
|
+
var D;
|
|
7
|
+
function le() {
|
|
8
|
+
if (D) return _;
|
|
9
|
+
D = 1;
|
|
10
|
+
var o = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
11
|
+
function r(a, d, b) {
|
|
12
|
+
var v = null;
|
|
13
|
+
if (b !== void 0 && (v = "" + b), d.key !== void 0 && (v = "" + d.key), "key" in d) {
|
|
14
|
+
b = {};
|
|
15
|
+
for (var y in d)
|
|
16
|
+
y !== "key" && (b[y] = d[y]);
|
|
17
|
+
} else b = d;
|
|
18
|
+
return d = b.ref, {
|
|
19
|
+
$$typeof: o,
|
|
20
|
+
type: a,
|
|
21
|
+
key: v,
|
|
22
|
+
ref: d !== void 0 ? d : null,
|
|
23
|
+
props: b
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return _.Fragment = t, _.jsx = r, _.jsxs = r, _;
|
|
27
|
+
}
|
|
28
|
+
var T = {};
|
|
29
|
+
var Y;
|
|
30
|
+
function se() {
|
|
31
|
+
return Y || (Y = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
|
+
function o(e) {
|
|
33
|
+
if (e == null) return null;
|
|
34
|
+
if (typeof e == "function")
|
|
35
|
+
return e.$$typeof === ee ? null : e.displayName || e.name || null;
|
|
36
|
+
if (typeof e == "string") return e;
|
|
37
|
+
switch (e) {
|
|
38
|
+
case j:
|
|
39
|
+
return "Fragment";
|
|
40
|
+
case B:
|
|
41
|
+
return "Profiler";
|
|
42
|
+
case C:
|
|
43
|
+
return "StrictMode";
|
|
44
|
+
case G:
|
|
45
|
+
return "Suspense";
|
|
46
|
+
case X:
|
|
47
|
+
return "SuspenseList";
|
|
48
|
+
case K:
|
|
49
|
+
return "Activity";
|
|
50
|
+
}
|
|
51
|
+
if (typeof e == "object")
|
|
52
|
+
switch (typeof e.tag == "number" && console.error(
|
|
53
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
54
|
+
), e.$$typeof) {
|
|
55
|
+
case x:
|
|
56
|
+
return "Portal";
|
|
57
|
+
case q:
|
|
58
|
+
return e.displayName || "Context";
|
|
59
|
+
case Z:
|
|
60
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
61
|
+
case J:
|
|
62
|
+
var n = e.render;
|
|
63
|
+
return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
64
|
+
case Q:
|
|
65
|
+
return n = e.displayName || null, n !== null ? n : o(e.type) || "Memo";
|
|
66
|
+
case O:
|
|
67
|
+
n = e._payload, e = e._init;
|
|
68
|
+
try {
|
|
69
|
+
return o(e(n));
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
function t(e) {
|
|
76
|
+
return "" + e;
|
|
77
|
+
}
|
|
78
|
+
function r(e) {
|
|
79
|
+
try {
|
|
80
|
+
t(e);
|
|
81
|
+
var n = !1;
|
|
82
|
+
} catch {
|
|
83
|
+
n = !0;
|
|
84
|
+
}
|
|
85
|
+
if (n) {
|
|
86
|
+
n = console;
|
|
87
|
+
var u = n.error, m = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
88
|
+
return u.call(
|
|
89
|
+
n,
|
|
90
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
+
m
|
|
92
|
+
), t(e);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function a(e) {
|
|
96
|
+
if (e === j) return "<>";
|
|
97
|
+
if (typeof e == "object" && e !== null && e.$$typeof === O)
|
|
98
|
+
return "<...>";
|
|
99
|
+
try {
|
|
100
|
+
var n = o(e);
|
|
101
|
+
return n ? "<" + n + ">" : "<...>";
|
|
102
|
+
} catch {
|
|
103
|
+
return "<...>";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function d() {
|
|
107
|
+
var e = M.A;
|
|
108
|
+
return e === null ? null : e.getOwner();
|
|
109
|
+
}
|
|
110
|
+
function b() {
|
|
111
|
+
return Error("react-stack-top-frame");
|
|
112
|
+
}
|
|
113
|
+
function v(e) {
|
|
114
|
+
if (W.call(e, "key")) {
|
|
115
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
116
|
+
if (n && n.isReactWarning) return !1;
|
|
117
|
+
}
|
|
118
|
+
return e.key !== void 0;
|
|
119
|
+
}
|
|
120
|
+
function y(e, n) {
|
|
121
|
+
function u() {
|
|
122
|
+
I || (I = !0, console.error(
|
|
123
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
124
|
+
n
|
|
125
|
+
));
|
|
126
|
+
}
|
|
127
|
+
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
128
|
+
get: u,
|
|
129
|
+
configurable: !0
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function k() {
|
|
133
|
+
var e = o(this.type);
|
|
134
|
+
return F[e] || (F[e] = !0, console.error(
|
|
135
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
136
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
137
|
+
}
|
|
138
|
+
function l(e, n, u, m, N, P) {
|
|
139
|
+
var f = u.ref;
|
|
140
|
+
return e = {
|
|
141
|
+
$$typeof: w,
|
|
142
|
+
type: e,
|
|
143
|
+
key: n,
|
|
144
|
+
props: u,
|
|
145
|
+
_owner: m
|
|
146
|
+
}, (f !== void 0 ? f : null) !== null ? Object.defineProperty(e, "ref", {
|
|
147
|
+
enumerable: !1,
|
|
148
|
+
get: k
|
|
149
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
150
|
+
configurable: !1,
|
|
151
|
+
enumerable: !1,
|
|
152
|
+
writable: !0,
|
|
153
|
+
value: 0
|
|
154
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
155
|
+
configurable: !1,
|
|
156
|
+
enumerable: !1,
|
|
157
|
+
writable: !0,
|
|
158
|
+
value: null
|
|
159
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
160
|
+
configurable: !1,
|
|
161
|
+
enumerable: !1,
|
|
162
|
+
writable: !0,
|
|
163
|
+
value: N
|
|
164
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
165
|
+
configurable: !1,
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
writable: !0,
|
|
168
|
+
value: P
|
|
169
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
170
|
+
}
|
|
171
|
+
function c(e, n, u, m, N, P) {
|
|
172
|
+
var f = n.children;
|
|
173
|
+
if (f !== void 0)
|
|
174
|
+
if (m)
|
|
175
|
+
if (re(f)) {
|
|
176
|
+
for (m = 0; m < f.length; m++)
|
|
177
|
+
h(f[m]);
|
|
178
|
+
Object.freeze && Object.freeze(f);
|
|
179
|
+
} else
|
|
180
|
+
console.error(
|
|
181
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
|
+
);
|
|
183
|
+
else h(f);
|
|
184
|
+
if (W.call(n, "key")) {
|
|
185
|
+
f = o(e);
|
|
186
|
+
var R = Object.keys(n).filter(function(te) {
|
|
187
|
+
return te !== "key";
|
|
188
|
+
});
|
|
189
|
+
m = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", V[f + m] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
191
|
+
let props = %s;
|
|
192
|
+
<%s {...props} />
|
|
193
|
+
React keys must be passed directly to JSX without using spread:
|
|
194
|
+
let props = %s;
|
|
195
|
+
<%s key={someKey} {...props} />`,
|
|
196
|
+
m,
|
|
197
|
+
f,
|
|
198
|
+
R,
|
|
199
|
+
f
|
|
200
|
+
), V[f + m] = !0);
|
|
201
|
+
}
|
|
202
|
+
if (f = null, u !== void 0 && (r(u), f = "" + u), v(n) && (r(n.key), f = "" + n.key), "key" in n) {
|
|
203
|
+
u = {};
|
|
204
|
+
for (var L in n)
|
|
205
|
+
L !== "key" && (u[L] = n[L]);
|
|
206
|
+
} else u = n;
|
|
207
|
+
return f && y(
|
|
208
|
+
u,
|
|
209
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
210
|
+
), l(
|
|
211
|
+
e,
|
|
212
|
+
f,
|
|
213
|
+
u,
|
|
214
|
+
d(),
|
|
215
|
+
N,
|
|
216
|
+
P
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function h(e) {
|
|
220
|
+
E(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === O && (e._payload.status === "fulfilled" ? E(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
221
|
+
}
|
|
222
|
+
function E(e) {
|
|
223
|
+
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
224
|
+
}
|
|
225
|
+
var p = oe, w = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), q = Symbol.for("react.context"), J = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), K = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), M = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, re = Array.isArray, S = console.createTask ? console.createTask : function() {
|
|
226
|
+
return null;
|
|
227
|
+
};
|
|
228
|
+
p = {
|
|
229
|
+
react_stack_bottom_frame: function(e) {
|
|
230
|
+
return e();
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
var I, F = {}, $ = p.react_stack_bottom_frame.bind(
|
|
234
|
+
p,
|
|
235
|
+
b
|
|
236
|
+
)(), z = S(a(b)), V = {};
|
|
237
|
+
T.Fragment = j, T.jsx = function(e, n, u) {
|
|
238
|
+
var m = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
239
|
+
return c(
|
|
240
|
+
e,
|
|
241
|
+
n,
|
|
242
|
+
u,
|
|
243
|
+
!1,
|
|
244
|
+
m ? Error("react-stack-top-frame") : $,
|
|
245
|
+
m ? S(a(e)) : z
|
|
246
|
+
);
|
|
247
|
+
}, T.jsxs = function(e, n, u) {
|
|
248
|
+
var m = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
249
|
+
return c(
|
|
250
|
+
e,
|
|
251
|
+
n,
|
|
252
|
+
u,
|
|
253
|
+
!0,
|
|
254
|
+
m ? Error("react-stack-top-frame") : $,
|
|
255
|
+
m ? S(a(e)) : z
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
})()), T;
|
|
259
|
+
}
|
|
260
|
+
var H;
|
|
261
|
+
function ce() {
|
|
262
|
+
return H || (H = 1, process.env.NODE_ENV === "production" ? A.exports = le() : A.exports = se()), A.exports;
|
|
263
|
+
}
|
|
264
|
+
var i = ce();
|
|
265
|
+
const Ne = ({
|
|
266
|
+
className: o,
|
|
267
|
+
children: t,
|
|
268
|
+
disabled: r = !1,
|
|
269
|
+
onClick: a
|
|
270
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
271
|
+
"div",
|
|
272
|
+
{
|
|
273
|
+
className: g(
|
|
274
|
+
"p-4 rounded-lg border transition-colors",
|
|
275
|
+
"bg-white dark:bg-gray-900",
|
|
276
|
+
"border-gray-200 dark:border-gray-700",
|
|
277
|
+
"text-gray-900 dark:text-white",
|
|
278
|
+
r && "opacity-50 cursor-not-allowed",
|
|
279
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
280
|
+
o
|
|
281
|
+
),
|
|
282
|
+
onClick: r ? void 0 : a,
|
|
283
|
+
role: "region",
|
|
284
|
+
"aria-label": "UcellUeditor",
|
|
285
|
+
children: t || "UcellUeditor Component"
|
|
286
|
+
}
|
|
287
|
+
), Ae = ({
|
|
288
|
+
className: o,
|
|
289
|
+
children: t,
|
|
290
|
+
disabled: r = !1,
|
|
291
|
+
onClick: a
|
|
292
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: g(
|
|
296
|
+
"p-4 rounded-lg border transition-colors",
|
|
297
|
+
"bg-white dark:bg-gray-900",
|
|
298
|
+
"border-gray-200 dark:border-gray-700",
|
|
299
|
+
"text-gray-900 dark:text-white",
|
|
300
|
+
r && "opacity-50 cursor-not-allowed",
|
|
301
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
302
|
+
o
|
|
303
|
+
),
|
|
304
|
+
onClick: r ? void 0 : a,
|
|
305
|
+
role: "region",
|
|
306
|
+
"aria-label": "UcolumnUresize",
|
|
307
|
+
children: t || "UcolumnUresize Component"
|
|
308
|
+
}
|
|
309
|
+
), Oe = ({
|
|
310
|
+
className: o,
|
|
311
|
+
children: t,
|
|
312
|
+
disabled: r = !1,
|
|
313
|
+
onClick: a
|
|
314
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
className: g(
|
|
318
|
+
"p-4 rounded-lg border transition-colors",
|
|
319
|
+
"bg-white dark:bg-gray-900",
|
|
320
|
+
"border-gray-200 dark:border-gray-700",
|
|
321
|
+
"text-gray-900 dark:text-white",
|
|
322
|
+
r && "opacity-50 cursor-not-allowed",
|
|
323
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
324
|
+
o
|
|
325
|
+
),
|
|
326
|
+
onClick: r ? void 0 : a,
|
|
327
|
+
role: "region",
|
|
328
|
+
"aria-label": "UcsvUimporter",
|
|
329
|
+
children: t || "UcsvUimporter Component"
|
|
330
|
+
}
|
|
331
|
+
), Me = ({
|
|
332
|
+
className: o,
|
|
333
|
+
children: t,
|
|
334
|
+
disabled: r = !1,
|
|
335
|
+
onClick: a
|
|
336
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
337
|
+
"div",
|
|
338
|
+
{
|
|
339
|
+
className: g(
|
|
340
|
+
"p-4 rounded-lg border transition-colors",
|
|
341
|
+
"bg-white dark:bg-gray-900",
|
|
342
|
+
"border-gray-200 dark:border-gray-700",
|
|
343
|
+
"text-gray-900 dark:text-white",
|
|
344
|
+
r && "opacity-50 cursor-not-allowed",
|
|
345
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
346
|
+
o
|
|
347
|
+
),
|
|
348
|
+
onClick: r ? void 0 : a,
|
|
349
|
+
role: "region",
|
|
350
|
+
"aria-label": "UdiffUviewer",
|
|
351
|
+
children: t || "UdiffUviewer Component"
|
|
352
|
+
}
|
|
353
|
+
), Se = ({
|
|
354
|
+
className: o,
|
|
355
|
+
children: t,
|
|
356
|
+
disabled: r = !1,
|
|
357
|
+
onClick: a
|
|
358
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
className: g(
|
|
362
|
+
"p-4 rounded-lg border transition-colors",
|
|
363
|
+
"bg-white dark:bg-gray-900",
|
|
364
|
+
"border-gray-200 dark:border-gray-700",
|
|
365
|
+
"text-gray-900 dark:text-white",
|
|
366
|
+
r && "opacity-50 cursor-not-allowed",
|
|
367
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
368
|
+
o
|
|
369
|
+
),
|
|
370
|
+
onClick: r ? void 0 : a,
|
|
371
|
+
role: "region",
|
|
372
|
+
"aria-label": "UexcelUuploader",
|
|
373
|
+
children: t || "UexcelUuploader Component"
|
|
374
|
+
}
|
|
375
|
+
), Pe = ({
|
|
376
|
+
className: o,
|
|
377
|
+
children: t,
|
|
378
|
+
disabled: r = !1,
|
|
379
|
+
onClick: a
|
|
380
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
381
|
+
"div",
|
|
382
|
+
{
|
|
383
|
+
className: g(
|
|
384
|
+
"p-4 rounded-lg border transition-colors",
|
|
385
|
+
"bg-white dark:bg-gray-900",
|
|
386
|
+
"border-gray-200 dark:border-gray-700",
|
|
387
|
+
"text-gray-900 dark:text-white",
|
|
388
|
+
r && "opacity-50 cursor-not-allowed",
|
|
389
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
390
|
+
o
|
|
391
|
+
),
|
|
392
|
+
onClick: r ? void 0 : a,
|
|
393
|
+
role: "region",
|
|
394
|
+
"aria-label": "UfileUbrowser",
|
|
395
|
+
children: t || "UfileUbrowser Component"
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
function ie({
|
|
399
|
+
title: o,
|
|
400
|
+
titleId: t,
|
|
401
|
+
...r
|
|
402
|
+
}, a) {
|
|
403
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
404
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
405
|
+
fill: "none",
|
|
406
|
+
viewBox: "0 0 24 24",
|
|
407
|
+
strokeWidth: 1.5,
|
|
408
|
+
stroke: "currentColor",
|
|
409
|
+
"aria-hidden": "true",
|
|
410
|
+
"data-slot": "icon",
|
|
411
|
+
ref: a,
|
|
412
|
+
"aria-labelledby": t
|
|
413
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
414
|
+
id: t
|
|
415
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
416
|
+
strokeLinecap: "round",
|
|
417
|
+
strokeLinejoin: "round",
|
|
418
|
+
d: "m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"
|
|
419
|
+
}));
|
|
420
|
+
}
|
|
421
|
+
const de = /* @__PURE__ */ s.forwardRef(ie);
|
|
422
|
+
function ue({
|
|
423
|
+
title: o,
|
|
424
|
+
titleId: t,
|
|
425
|
+
...r
|
|
426
|
+
}, a) {
|
|
427
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
428
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
429
|
+
fill: "none",
|
|
430
|
+
viewBox: "0 0 24 24",
|
|
431
|
+
strokeWidth: 1.5,
|
|
432
|
+
stroke: "currentColor",
|
|
433
|
+
"aria-hidden": "true",
|
|
434
|
+
"data-slot": "icon",
|
|
435
|
+
ref: a,
|
|
436
|
+
"aria-labelledby": t
|
|
437
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
438
|
+
id: t
|
|
439
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
440
|
+
strokeLinecap: "round",
|
|
441
|
+
strokeLinejoin: "round",
|
|
442
|
+
d: "M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"
|
|
443
|
+
}));
|
|
444
|
+
}
|
|
445
|
+
const ge = /* @__PURE__ */ s.forwardRef(ue);
|
|
446
|
+
function me({
|
|
447
|
+
title: o,
|
|
448
|
+
titleId: t,
|
|
449
|
+
...r
|
|
450
|
+
}, a) {
|
|
451
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
452
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
453
|
+
fill: "none",
|
|
454
|
+
viewBox: "0 0 24 24",
|
|
455
|
+
strokeWidth: 1.5,
|
|
456
|
+
stroke: "currentColor",
|
|
457
|
+
"aria-hidden": "true",
|
|
458
|
+
"data-slot": "icon",
|
|
459
|
+
ref: a,
|
|
460
|
+
"aria-labelledby": t
|
|
461
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
462
|
+
id: t
|
|
463
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
464
|
+
strokeLinecap: "round",
|
|
465
|
+
strokeLinejoin: "round",
|
|
466
|
+
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12 3 3m0 0 3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
467
|
+
}));
|
|
468
|
+
}
|
|
469
|
+
const fe = /* @__PURE__ */ s.forwardRef(me);
|
|
470
|
+
function be({
|
|
471
|
+
title: o,
|
|
472
|
+
titleId: t,
|
|
473
|
+
...r
|
|
474
|
+
}, a) {
|
|
475
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
476
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
477
|
+
fill: "none",
|
|
478
|
+
viewBox: "0 0 24 24",
|
|
479
|
+
strokeWidth: 1.5,
|
|
480
|
+
stroke: "currentColor",
|
|
481
|
+
"aria-hidden": "true",
|
|
482
|
+
"data-slot": "icon",
|
|
483
|
+
ref: a,
|
|
484
|
+
"aria-labelledby": t
|
|
485
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
486
|
+
id: t
|
|
487
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
488
|
+
strokeLinecap: "round",
|
|
489
|
+
strokeLinejoin: "round",
|
|
490
|
+
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
491
|
+
}));
|
|
492
|
+
}
|
|
493
|
+
const he = /* @__PURE__ */ s.forwardRef(be);
|
|
494
|
+
function ve({
|
|
495
|
+
title: o,
|
|
496
|
+
titleId: t,
|
|
497
|
+
...r
|
|
498
|
+
}, a) {
|
|
499
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
500
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
501
|
+
fill: "none",
|
|
502
|
+
viewBox: "0 0 24 24",
|
|
503
|
+
strokeWidth: 1.5,
|
|
504
|
+
stroke: "currentColor",
|
|
505
|
+
"aria-hidden": "true",
|
|
506
|
+
"data-slot": "icon",
|
|
507
|
+
ref: a,
|
|
508
|
+
"aria-labelledby": t
|
|
509
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
510
|
+
id: t
|
|
511
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
512
|
+
strokeLinecap: "round",
|
|
513
|
+
strokeLinejoin: "round",
|
|
514
|
+
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
515
|
+
}));
|
|
516
|
+
}
|
|
517
|
+
const pe = /* @__PURE__ */ s.forwardRef(ve);
|
|
518
|
+
function ye({
|
|
519
|
+
title: o,
|
|
520
|
+
titleId: t,
|
|
521
|
+
...r
|
|
522
|
+
}, a) {
|
|
523
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
525
|
+
fill: "none",
|
|
526
|
+
viewBox: "0 0 24 24",
|
|
527
|
+
strokeWidth: 1.5,
|
|
528
|
+
stroke: "currentColor",
|
|
529
|
+
"aria-hidden": "true",
|
|
530
|
+
"data-slot": "icon",
|
|
531
|
+
ref: a,
|
|
532
|
+
"aria-labelledby": t
|
|
533
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
534
|
+
id: t
|
|
535
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
536
|
+
strokeLinecap: "round",
|
|
537
|
+
strokeLinejoin: "round",
|
|
538
|
+
d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5"
|
|
539
|
+
}));
|
|
540
|
+
}
|
|
541
|
+
const ke = /* @__PURE__ */ s.forwardRef(ye);
|
|
542
|
+
function we({
|
|
543
|
+
title: o,
|
|
544
|
+
titleId: t,
|
|
545
|
+
...r
|
|
546
|
+
}, a) {
|
|
547
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
549
|
+
fill: "none",
|
|
550
|
+
viewBox: "0 0 24 24",
|
|
551
|
+
strokeWidth: 1.5,
|
|
552
|
+
stroke: "currentColor",
|
|
553
|
+
"aria-hidden": "true",
|
|
554
|
+
"data-slot": "icon",
|
|
555
|
+
ref: a,
|
|
556
|
+
"aria-labelledby": t
|
|
557
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
558
|
+
id: t
|
|
559
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
560
|
+
strokeLinecap: "round",
|
|
561
|
+
strokeLinejoin: "round",
|
|
562
|
+
d: "m9 9 10.5-3m0 6.553v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 1 1-.99-3.467l2.31-.66a2.25 2.25 0 0 0 1.632-2.163Zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 0 1-.99-3.467l2.31-.66A2.25 2.25 0 0 0 9 15.553Z"
|
|
563
|
+
}));
|
|
564
|
+
}
|
|
565
|
+
const xe = /* @__PURE__ */ s.forwardRef(we);
|
|
566
|
+
function Ee({
|
|
567
|
+
title: o,
|
|
568
|
+
titleId: t,
|
|
569
|
+
...r
|
|
570
|
+
}, a) {
|
|
571
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
572
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
573
|
+
fill: "none",
|
|
574
|
+
viewBox: "0 0 24 24",
|
|
575
|
+
strokeWidth: 1.5,
|
|
576
|
+
stroke: "currentColor",
|
|
577
|
+
"aria-hidden": "true",
|
|
578
|
+
"data-slot": "icon",
|
|
579
|
+
ref: a,
|
|
580
|
+
"aria-labelledby": t
|
|
581
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
582
|
+
id: t
|
|
583
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
584
|
+
strokeLinecap: "round",
|
|
585
|
+
strokeLinejoin: "round",
|
|
586
|
+
d: "m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
|
|
587
|
+
}));
|
|
588
|
+
}
|
|
589
|
+
const je = /* @__PURE__ */ s.forwardRef(Ee);
|
|
590
|
+
function Re({
|
|
591
|
+
title: o,
|
|
592
|
+
titleId: t,
|
|
593
|
+
...r
|
|
594
|
+
}, a) {
|
|
595
|
+
return /* @__PURE__ */ s.createElement("svg", Object.assign({
|
|
596
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
597
|
+
fill: "none",
|
|
598
|
+
viewBox: "0 0 24 24",
|
|
599
|
+
strokeWidth: 1.5,
|
|
600
|
+
stroke: "currentColor",
|
|
601
|
+
"aria-hidden": "true",
|
|
602
|
+
"data-slot": "icon",
|
|
603
|
+
ref: a,
|
|
604
|
+
"aria-labelledby": t
|
|
605
|
+
}, r), o ? /* @__PURE__ */ s.createElement("title", {
|
|
606
|
+
id: t
|
|
607
|
+
}, o) : null, /* @__PURE__ */ s.createElement("path", {
|
|
608
|
+
strokeLinecap: "round",
|
|
609
|
+
strokeLinejoin: "round",
|
|
610
|
+
d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"
|
|
611
|
+
}));
|
|
612
|
+
}
|
|
613
|
+
const Ue = /* @__PURE__ */ s.forwardRef(Re), Le = ({
|
|
614
|
+
type: o,
|
|
615
|
+
size: t = "md",
|
|
616
|
+
colored: r = !0,
|
|
617
|
+
className: a
|
|
618
|
+
}) => {
|
|
619
|
+
const d = {
|
|
620
|
+
xs: "h-3 w-3",
|
|
621
|
+
sm: "h-4 w-4",
|
|
622
|
+
md: "h-5 w-5",
|
|
623
|
+
lg: "h-6 w-6",
|
|
624
|
+
xl: "h-8 w-8"
|
|
625
|
+
}, b = (k) => {
|
|
626
|
+
const l = k.toLowerCase();
|
|
627
|
+
return l.startsWith("image/") || [".jpg", ".jpeg", ".png", ".gif", ".svg", ".webp", ".ico"].some(
|
|
628
|
+
(c) => l.endsWith(c)
|
|
629
|
+
) ? {
|
|
630
|
+
Icon: je,
|
|
631
|
+
color: "text-blue-600 dark:text-blue-400"
|
|
632
|
+
} : l.startsWith("video/") || [".mp4", ".avi", ".mov", ".wmv", ".flv", ".webm"].some(
|
|
633
|
+
(c) => l.endsWith(c)
|
|
634
|
+
) ? {
|
|
635
|
+
Icon: ke,
|
|
636
|
+
color: "text-purple-600 dark:text-purple-400"
|
|
637
|
+
} : l.startsWith("audio/") || [".mp3", ".wav", ".ogg", ".m4a", ".flac"].some(
|
|
638
|
+
(c) => l.endsWith(c)
|
|
639
|
+
) ? {
|
|
640
|
+
Icon: xe,
|
|
641
|
+
color: "text-pink-600 dark:text-pink-400"
|
|
642
|
+
} : l.includes("pdf") || l.endsWith(".pdf") ? {
|
|
643
|
+
Icon: fe,
|
|
644
|
+
color: "text-red-600 dark:text-red-400"
|
|
645
|
+
} : l.includes("word") || l.includes("document") || [".doc", ".docx", ".odt"].some((c) => l.endsWith(c)) ? {
|
|
646
|
+
Icon: he,
|
|
647
|
+
color: "text-blue-700 dark:text-blue-300"
|
|
648
|
+
} : l.includes("excel") || l.includes("spreadsheet") || [".xls", ".xlsx", ".ods", ".csv"].some((c) => l.endsWith(c)) ? {
|
|
649
|
+
Icon: Ue,
|
|
650
|
+
color: "text-green-600 dark:text-green-400"
|
|
651
|
+
} : [
|
|
652
|
+
".js",
|
|
653
|
+
".ts",
|
|
654
|
+
".jsx",
|
|
655
|
+
".tsx",
|
|
656
|
+
".py",
|
|
657
|
+
".java",
|
|
658
|
+
".cpp",
|
|
659
|
+
".c",
|
|
660
|
+
".h",
|
|
661
|
+
".css",
|
|
662
|
+
".scss",
|
|
663
|
+
".html",
|
|
664
|
+
".json",
|
|
665
|
+
".xml",
|
|
666
|
+
".yaml",
|
|
667
|
+
".yml",
|
|
668
|
+
".sh",
|
|
669
|
+
".sql"
|
|
670
|
+
].some((c) => l.endsWith(c)) ? {
|
|
671
|
+
Icon: ge,
|
|
672
|
+
color: "text-gray-700 dark:text-gray-300"
|
|
673
|
+
} : l.includes("zip") || l.includes("compressed") || l.includes("archive") || [".zip", ".rar", ".7z", ".tar", ".gz", ".bz2"].some(
|
|
674
|
+
(c) => l.endsWith(c)
|
|
675
|
+
) ? {
|
|
676
|
+
Icon: de,
|
|
677
|
+
color: "text-yellow-600 dark:text-yellow-400"
|
|
678
|
+
} : {
|
|
679
|
+
Icon: pe,
|
|
680
|
+
color: "text-gray-600 dark:text-gray-400"
|
|
681
|
+
};
|
|
682
|
+
}, { Icon: v, color: y } = b(o);
|
|
683
|
+
return /* @__PURE__ */ i.jsx(
|
|
684
|
+
v,
|
|
685
|
+
{
|
|
686
|
+
className: g(
|
|
687
|
+
d[t],
|
|
688
|
+
r ? y : "text-gray-600 dark:text-gray-400",
|
|
689
|
+
a
|
|
690
|
+
)
|
|
691
|
+
}
|
|
692
|
+
);
|
|
693
|
+
}, We = ({
|
|
694
|
+
className: o,
|
|
695
|
+
children: t,
|
|
696
|
+
disabled: r = !1,
|
|
697
|
+
onClick: a
|
|
698
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
699
|
+
"div",
|
|
700
|
+
{
|
|
701
|
+
className: g(
|
|
702
|
+
"p-4 rounded-lg border transition-colors",
|
|
703
|
+
"bg-white dark:bg-gray-900",
|
|
704
|
+
"border-gray-200 dark:border-gray-700",
|
|
705
|
+
"text-gray-900 dark:text-white",
|
|
706
|
+
r && "opacity-50 cursor-not-allowed",
|
|
707
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
708
|
+
o
|
|
709
|
+
),
|
|
710
|
+
onClick: r ? void 0 : a,
|
|
711
|
+
role: "region",
|
|
712
|
+
"aria-label": "UfileUpreview",
|
|
713
|
+
children: t || "UfileUpreview Component"
|
|
714
|
+
}
|
|
715
|
+
), Ie = ({
|
|
716
|
+
className: o,
|
|
717
|
+
children: t,
|
|
718
|
+
disabled: r = !1,
|
|
719
|
+
onClick: a
|
|
720
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
721
|
+
"div",
|
|
722
|
+
{
|
|
723
|
+
className: g(
|
|
724
|
+
"p-4 rounded-lg border transition-colors",
|
|
725
|
+
"bg-white dark:bg-gray-900",
|
|
726
|
+
"border-gray-200 dark:border-gray-700",
|
|
727
|
+
"text-gray-900 dark:text-white",
|
|
728
|
+
r && "opacity-50 cursor-not-allowed",
|
|
729
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
730
|
+
o
|
|
731
|
+
),
|
|
732
|
+
onClick: r ? void 0 : a,
|
|
733
|
+
role: "region",
|
|
734
|
+
"aria-label": "UfileUtree",
|
|
735
|
+
children: t || "UfileUtree Component"
|
|
736
|
+
}
|
|
737
|
+
), Fe = ({
|
|
738
|
+
icon: o,
|
|
739
|
+
"aria-label": t,
|
|
740
|
+
onClick: r,
|
|
741
|
+
size: a = "md",
|
|
742
|
+
shape: d = "rounded",
|
|
743
|
+
variant: b = "default",
|
|
744
|
+
disabled: v = !1,
|
|
745
|
+
type: y = "button",
|
|
746
|
+
className: k,
|
|
747
|
+
title: l
|
|
748
|
+
}) => {
|
|
749
|
+
const c = {
|
|
750
|
+
xs: {
|
|
751
|
+
button: "p-1",
|
|
752
|
+
icon: "h-3 w-3"
|
|
753
|
+
},
|
|
754
|
+
sm: {
|
|
755
|
+
button: "p-1.5",
|
|
756
|
+
icon: "h-4 w-4"
|
|
757
|
+
},
|
|
758
|
+
md: {
|
|
759
|
+
button: "p-2",
|
|
760
|
+
icon: "h-5 w-5"
|
|
761
|
+
},
|
|
762
|
+
lg: {
|
|
763
|
+
button: "p-3",
|
|
764
|
+
icon: "h-6 w-6"
|
|
765
|
+
},
|
|
766
|
+
xl: {
|
|
767
|
+
button: "p-4",
|
|
768
|
+
icon: "h-8 w-8"
|
|
769
|
+
}
|
|
770
|
+
}, h = {
|
|
771
|
+
circle: "rounded-full",
|
|
772
|
+
square: "rounded-none",
|
|
773
|
+
rounded: "rounded-lg"
|
|
774
|
+
}, E = {
|
|
775
|
+
default: "bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
776
|
+
primary: "bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",
|
|
777
|
+
secondary: "bg-purple-600 text-white hover:bg-purple-700 dark:bg-purple-500 dark:hover:bg-purple-600",
|
|
778
|
+
danger: "bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",
|
|
779
|
+
ghost: "bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800",
|
|
780
|
+
outline: "bg-transparent border-2 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
781
|
+
}, p = c[a];
|
|
782
|
+
return /* @__PURE__ */ i.jsx(
|
|
783
|
+
"button",
|
|
784
|
+
{
|
|
785
|
+
type: y,
|
|
786
|
+
onClick: r,
|
|
787
|
+
disabled: v,
|
|
788
|
+
"aria-label": t,
|
|
789
|
+
title: l || t,
|
|
790
|
+
className: g(
|
|
791
|
+
"inline-flex items-center justify-center",
|
|
792
|
+
"transition-all duration-200",
|
|
793
|
+
"focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
794
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-current",
|
|
795
|
+
p.button,
|
|
796
|
+
h[d],
|
|
797
|
+
E[b],
|
|
798
|
+
k
|
|
799
|
+
),
|
|
800
|
+
children: /* @__PURE__ */ i.jsx(o, { className: p.icon })
|
|
801
|
+
}
|
|
802
|
+
);
|
|
803
|
+
}, $e = ({
|
|
804
|
+
className: o,
|
|
805
|
+
children: t,
|
|
806
|
+
disabled: r = !1,
|
|
807
|
+
onClick: a
|
|
808
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
className: g(
|
|
812
|
+
"p-4 rounded-lg border transition-colors",
|
|
813
|
+
"bg-white dark:bg-gray-900",
|
|
814
|
+
"border-gray-200 dark:border-gray-700",
|
|
815
|
+
"text-gray-900 dark:text-white",
|
|
816
|
+
r && "opacity-50 cursor-not-allowed",
|
|
817
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
818
|
+
o
|
|
819
|
+
),
|
|
820
|
+
onClick: r ? void 0 : a,
|
|
821
|
+
role: "region",
|
|
822
|
+
"aria-label": "UimportUpreview",
|
|
823
|
+
children: t || "UimportUpreview Component"
|
|
824
|
+
}
|
|
825
|
+
), ze = ({
|
|
826
|
+
className: o,
|
|
827
|
+
children: t,
|
|
828
|
+
disabled: r = !1,
|
|
829
|
+
onClick: a
|
|
830
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
831
|
+
"div",
|
|
832
|
+
{
|
|
833
|
+
className: g(
|
|
834
|
+
"p-4 rounded-lg border transition-colors",
|
|
835
|
+
"bg-white dark:bg-gray-900",
|
|
836
|
+
"border-gray-200 dark:border-gray-700",
|
|
837
|
+
"text-gray-900 dark:text-white",
|
|
838
|
+
r && "opacity-50 cursor-not-allowed",
|
|
839
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
840
|
+
o
|
|
841
|
+
),
|
|
842
|
+
onClick: r ? void 0 : a,
|
|
843
|
+
role: "region",
|
|
844
|
+
"aria-label": "UjsonUimporter",
|
|
845
|
+
children: t || "UjsonUimporter Component"
|
|
846
|
+
}
|
|
847
|
+
), Ve = ({
|
|
848
|
+
className: o,
|
|
849
|
+
children: t,
|
|
850
|
+
disabled: r = !1,
|
|
851
|
+
onClick: a
|
|
852
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
853
|
+
"div",
|
|
854
|
+
{
|
|
855
|
+
className: g(
|
|
856
|
+
"p-4 rounded-lg border transition-colors",
|
|
857
|
+
"bg-white dark:bg-gray-900",
|
|
858
|
+
"border-gray-200 dark:border-gray-700",
|
|
859
|
+
"text-gray-900 dark:text-white",
|
|
860
|
+
r && "opacity-50 cursor-not-allowed",
|
|
861
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
862
|
+
o
|
|
863
|
+
),
|
|
864
|
+
onClick: r ? void 0 : a,
|
|
865
|
+
role: "region",
|
|
866
|
+
"aria-label": "UjsonUviewer",
|
|
867
|
+
children: t || "UjsonUviewer Component"
|
|
868
|
+
}
|
|
869
|
+
), De = ({
|
|
870
|
+
label: o,
|
|
871
|
+
value: t,
|
|
872
|
+
orientation: r = "vertical",
|
|
873
|
+
align: a = "start",
|
|
874
|
+
labelWidth: d = "auto",
|
|
875
|
+
size: b = "md",
|
|
876
|
+
separator: v = !1,
|
|
877
|
+
labelVariant: y = "muted",
|
|
878
|
+
valueVariant: k = "default",
|
|
879
|
+
className: l,
|
|
880
|
+
labelClassName: c,
|
|
881
|
+
valueClassName: h
|
|
882
|
+
}) => {
|
|
883
|
+
const E = {
|
|
884
|
+
sm: {
|
|
885
|
+
label: U.body.sm(),
|
|
886
|
+
value: U.body.sm(),
|
|
887
|
+
gap: "gap-1"
|
|
888
|
+
},
|
|
889
|
+
md: {
|
|
890
|
+
label: U.body.md(),
|
|
891
|
+
value: U.body.md(),
|
|
892
|
+
gap: "gap-2"
|
|
893
|
+
},
|
|
894
|
+
lg: {
|
|
895
|
+
label: U.body.lg(),
|
|
896
|
+
value: U.body.lg(),
|
|
897
|
+
gap: "gap-3"
|
|
898
|
+
}
|
|
899
|
+
}, p = {
|
|
900
|
+
auto: "",
|
|
901
|
+
sm: "w-24",
|
|
902
|
+
md: "w-32",
|
|
903
|
+
lg: "w-40"
|
|
904
|
+
}, w = {
|
|
905
|
+
start: "justify-start",
|
|
906
|
+
center: "justify-center",
|
|
907
|
+
between: "justify-between"
|
|
908
|
+
}, x = {
|
|
909
|
+
default: "text-gray-700 dark:text-gray-300",
|
|
910
|
+
muted: "text-gray-600 dark:text-gray-400",
|
|
911
|
+
strong: "text-gray-900 dark:text-gray-100 font-semibold"
|
|
912
|
+
}, j = {
|
|
913
|
+
default: "text-gray-900 dark:text-gray-100",
|
|
914
|
+
muted: "text-gray-600 dark:text-gray-400",
|
|
915
|
+
strong: "text-gray-900 dark:text-gray-100 font-semibold",
|
|
916
|
+
primary: "text-blue-600 dark:text-blue-400"
|
|
917
|
+
}, C = E[b];
|
|
918
|
+
return /* @__PURE__ */ i.jsxs(
|
|
919
|
+
"div",
|
|
920
|
+
{
|
|
921
|
+
className: g(
|
|
922
|
+
r === "horizontal" ? "flex items-center" : "flex flex-col",
|
|
923
|
+
r === "horizontal" && w[a],
|
|
924
|
+
C.gap,
|
|
925
|
+
v && "pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",
|
|
926
|
+
l
|
|
927
|
+
),
|
|
928
|
+
children: [
|
|
929
|
+
/* @__PURE__ */ i.jsx(
|
|
930
|
+
"dt",
|
|
931
|
+
{
|
|
932
|
+
className: g(
|
|
933
|
+
C.label,
|
|
934
|
+
x[y],
|
|
935
|
+
r === "horizontal" && p[d],
|
|
936
|
+
r === "horizontal" && "flex-shrink-0",
|
|
937
|
+
c
|
|
938
|
+
),
|
|
939
|
+
children: o
|
|
940
|
+
}
|
|
941
|
+
),
|
|
942
|
+
/* @__PURE__ */ i.jsx(
|
|
943
|
+
"dd",
|
|
944
|
+
{
|
|
945
|
+
className: g(
|
|
946
|
+
C.value,
|
|
947
|
+
j[k],
|
|
948
|
+
r === "horizontal" && "flex-1",
|
|
949
|
+
h
|
|
950
|
+
),
|
|
951
|
+
children: t
|
|
952
|
+
}
|
|
953
|
+
)
|
|
954
|
+
]
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
}, Ye = ({
|
|
958
|
+
className: o,
|
|
959
|
+
children: t,
|
|
960
|
+
disabled: r = !1,
|
|
961
|
+
onClick: a
|
|
962
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
963
|
+
"div",
|
|
964
|
+
{
|
|
965
|
+
className: g(
|
|
966
|
+
"p-4 rounded-lg border transition-colors",
|
|
967
|
+
"bg-white dark:bg-gray-900",
|
|
968
|
+
"border-gray-200 dark:border-gray-700",
|
|
969
|
+
"text-gray-900 dark:text-white",
|
|
970
|
+
r && "opacity-50 cursor-not-allowed",
|
|
971
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
972
|
+
o
|
|
973
|
+
),
|
|
974
|
+
onClick: r ? void 0 : a,
|
|
975
|
+
role: "region",
|
|
976
|
+
"aria-label": "UmarkdownUrenderer",
|
|
977
|
+
children: t || "UmarkdownUrenderer Component"
|
|
978
|
+
}
|
|
979
|
+
), He = ({
|
|
980
|
+
value: o,
|
|
981
|
+
size: t = 200,
|
|
982
|
+
fgColor: r = "#000000",
|
|
983
|
+
bgColor: a = "#ffffff",
|
|
984
|
+
showDownload: d = !1,
|
|
985
|
+
className: b
|
|
986
|
+
}) => {
|
|
987
|
+
const v = ae(null);
|
|
988
|
+
ne(() => {
|
|
989
|
+
const k = v.current;
|
|
990
|
+
if (!k) return;
|
|
991
|
+
const l = k.getContext("2d");
|
|
992
|
+
if (!l) return;
|
|
993
|
+
l.fillStyle = a, l.fillRect(0, 0, t, t), l.fillStyle = r;
|
|
994
|
+
const c = 8, h = t / c, E = o.split("").reduce((w, x) => w + x.charCodeAt(0), 0);
|
|
995
|
+
for (let w = 0; w < c; w++)
|
|
996
|
+
for (let x = 0; x < c; x++)
|
|
997
|
+
(E + w * c + x) % 3 !== 0 && l.fillRect(x * h, w * h, h, h);
|
|
998
|
+
const p = h * 3;
|
|
999
|
+
[
|
|
1000
|
+
[0, 0],
|
|
1001
|
+
[t - p, 0],
|
|
1002
|
+
[0, t - p]
|
|
1003
|
+
].forEach(([w, x]) => {
|
|
1004
|
+
l.strokeStyle = r, l.lineWidth = h, l.strokeRect(
|
|
1005
|
+
w + h / 2,
|
|
1006
|
+
x + h / 2,
|
|
1007
|
+
p - h,
|
|
1008
|
+
p - h
|
|
1009
|
+
);
|
|
1010
|
+
});
|
|
1011
|
+
}, [o, t, r, a]);
|
|
1012
|
+
const y = () => {
|
|
1013
|
+
const k = v.current;
|
|
1014
|
+
if (!k) return;
|
|
1015
|
+
const l = k.toDataURL("image/png"), c = document.createElement("a");
|
|
1016
|
+
c.download = "qrcode.png", c.href = l, c.click();
|
|
1017
|
+
};
|
|
1018
|
+
return /* @__PURE__ */ i.jsxs("div", { className: g("inline-flex flex-col items-center gap-3", b), children: [
|
|
1019
|
+
/* @__PURE__ */ i.jsx(
|
|
1020
|
+
"canvas",
|
|
1021
|
+
{
|
|
1022
|
+
ref: v,
|
|
1023
|
+
width: t,
|
|
1024
|
+
height: t,
|
|
1025
|
+
className: "border-2 border-gray-200 dark:border-gray-700 rounded-lg"
|
|
1026
|
+
}
|
|
1027
|
+
),
|
|
1028
|
+
d && /* @__PURE__ */ i.jsx(
|
|
1029
|
+
"button",
|
|
1030
|
+
{
|
|
1031
|
+
onClick: y,
|
|
1032
|
+
className: g(
|
|
1033
|
+
"px-4 py-2 text-sm font-medium",
|
|
1034
|
+
"bg-blue-600 dark:bg-blue-500 text-white",
|
|
1035
|
+
"rounded-md",
|
|
1036
|
+
"hover:bg-blue-700 dark:hover:bg-blue-600",
|
|
1037
|
+
"transition-colors"
|
|
1038
|
+
),
|
|
1039
|
+
children: "Download QR Code"
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
/* @__PURE__ */ i.jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all", children: o })
|
|
1043
|
+
] });
|
|
1044
|
+
}, Be = ({
|
|
1045
|
+
className: o,
|
|
1046
|
+
children: t,
|
|
1047
|
+
disabled: r = !1,
|
|
1048
|
+
onClick: a
|
|
1049
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
1050
|
+
"div",
|
|
1051
|
+
{
|
|
1052
|
+
className: g(
|
|
1053
|
+
"p-4 rounded-lg border transition-colors",
|
|
1054
|
+
"bg-white dark:bg-gray-900",
|
|
1055
|
+
"border-gray-200 dark:border-gray-700",
|
|
1056
|
+
"text-gray-900 dark:text-white",
|
|
1057
|
+
r && "opacity-50 cursor-not-allowed",
|
|
1058
|
+
"hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
1059
|
+
o
|
|
1060
|
+
),
|
|
1061
|
+
onClick: r ? void 0 : a,
|
|
1062
|
+
role: "region",
|
|
1063
|
+
"aria-label": "UuploadUprogress",
|
|
1064
|
+
children: t || "UuploadUprogress Component"
|
|
1065
|
+
}
|
|
1066
|
+
), Ze = ({
|
|
1067
|
+
value: o,
|
|
1068
|
+
onChange: t,
|
|
1069
|
+
placeholder: r,
|
|
1070
|
+
className: a
|
|
1071
|
+
}) => /* @__PURE__ */ i.jsxs(
|
|
1072
|
+
"div",
|
|
1073
|
+
{
|
|
1074
|
+
className: g(
|
|
1075
|
+
"border border-gray-300 dark:border-gray-700 rounded-lg",
|
|
1076
|
+
a
|
|
1077
|
+
),
|
|
1078
|
+
children: [
|
|
1079
|
+
/* @__PURE__ */ i.jsx("div", { className: "flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700", children: ["B", "I", "U", "H1", "H2", "List", "Link"].map((d) => /* @__PURE__ */ i.jsx(
|
|
1080
|
+
"button",
|
|
1081
|
+
{
|
|
1082
|
+
className: "px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",
|
|
1083
|
+
children: d
|
|
1084
|
+
},
|
|
1085
|
+
d
|
|
1086
|
+
)) }),
|
|
1087
|
+
/* @__PURE__ */ i.jsx(
|
|
1088
|
+
"textarea",
|
|
1089
|
+
{
|
|
1090
|
+
value: o,
|
|
1091
|
+
onChange: (d) => t(d.target.value),
|
|
1092
|
+
placeholder: r,
|
|
1093
|
+
className: "w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",
|
|
1094
|
+
rows: 10
|
|
1095
|
+
}
|
|
1096
|
+
)
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
export {
|
|
1101
|
+
Le as FileIcon,
|
|
1102
|
+
Fe as IconButton,
|
|
1103
|
+
De as KeyValuePair,
|
|
1104
|
+
He as QRCodeDisplay,
|
|
1105
|
+
Ne as UcellUeditor,
|
|
1106
|
+
Ae as UcolumnUresize,
|
|
1107
|
+
Oe as UcsvUimporter,
|
|
1108
|
+
Me as UdiffUviewer,
|
|
1109
|
+
Se as UexcelUuploader,
|
|
1110
|
+
Pe as UfileUbrowser,
|
|
1111
|
+
We as UfileUpreview,
|
|
1112
|
+
Ie as UfileUtree,
|
|
1113
|
+
$e as UimportUpreview,
|
|
1114
|
+
ze as UjsonUimporter,
|
|
1115
|
+
Ve as UjsonUviewer,
|
|
1116
|
+
Ye as UmarkdownUrenderer,
|
|
1117
|
+
Be as UuploadUprogress,
|
|
1118
|
+
Ze as WysiwygEditor
|
|
1119
|
+
};
|