@undefine-ui/design-system 2.12.0 → 2.13.0
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/README.md +118 -1
- package/dist/index.cjs +367 -158
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -2
- package/dist/index.d.ts +73 -2
- package/dist/index.js +366 -158
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
Field: () => Field,
|
|
45
45
|
Form: () => Form,
|
|
46
46
|
Icon: () => Icon,
|
|
47
|
+
Image: () => Image,
|
|
47
48
|
InfoCircleFill: () => InfoCircleFill,
|
|
48
49
|
InfoCircleOutline: () => InfoCircleOutline,
|
|
49
50
|
KeyCommand: () => KeyCommand,
|
|
@@ -6217,20 +6218,226 @@ var Table = (props) => {
|
|
|
6217
6218
|
) });
|
|
6218
6219
|
};
|
|
6219
6220
|
|
|
6221
|
+
// src/components/Image/index.tsx
|
|
6222
|
+
var import_react12 = require("react");
|
|
6223
|
+
var import_Box5 = __toESM(require("@mui/material/Box"), 1);
|
|
6224
|
+
var import_Skeleton = __toESM(require("@mui/material/Skeleton"), 1);
|
|
6225
|
+
|
|
6226
|
+
// src/components/Image/classes.ts
|
|
6227
|
+
var imageClasses = {
|
|
6228
|
+
root: "undefine__image__root",
|
|
6229
|
+
wrapper: "undefine__image__wrapper",
|
|
6230
|
+
overlay: "undefine__image__overlay"
|
|
6231
|
+
};
|
|
6232
|
+
|
|
6233
|
+
// src/components/Image/index.tsx
|
|
6234
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6235
|
+
var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
6236
|
+
const {
|
|
6237
|
+
src,
|
|
6238
|
+
alt,
|
|
6239
|
+
lazy = true,
|
|
6240
|
+
fallbackSrc,
|
|
6241
|
+
srcSet,
|
|
6242
|
+
sizes: sizes2,
|
|
6243
|
+
aspectRatio,
|
|
6244
|
+
fit = "cover",
|
|
6245
|
+
position = "center",
|
|
6246
|
+
overlay,
|
|
6247
|
+
withOverlay = !!overlay,
|
|
6248
|
+
loadingIndicator,
|
|
6249
|
+
renderError,
|
|
6250
|
+
observerMargin = "200px",
|
|
6251
|
+
className,
|
|
6252
|
+
sx,
|
|
6253
|
+
onLoad,
|
|
6254
|
+
onError,
|
|
6255
|
+
imgSx,
|
|
6256
|
+
imgProps,
|
|
6257
|
+
...rest
|
|
6258
|
+
} = props;
|
|
6259
|
+
const imageRef = (0, import_react12.useRef)(null);
|
|
6260
|
+
const [status, setStatus] = (0, import_react12.useState)(lazy ? "idle" : "loading");
|
|
6261
|
+
const [currentSrc, setCurrentSrc] = (0, import_react12.useState)(lazy ? void 0 : src);
|
|
6262
|
+
const [currentSrcSet, setCurrentSrcSet] = (0, import_react12.useState)(lazy ? void 0 : srcSet);
|
|
6263
|
+
const [hasTriedFallback, setHasTriedFallback] = (0, import_react12.useState)(false);
|
|
6264
|
+
const setRefs = (node) => {
|
|
6265
|
+
imageRef.current = node;
|
|
6266
|
+
if (typeof ref === "function") {
|
|
6267
|
+
ref(node);
|
|
6268
|
+
} else if (ref) {
|
|
6269
|
+
ref.current = node;
|
|
6270
|
+
}
|
|
6271
|
+
};
|
|
6272
|
+
(0, import_react12.useEffect)(() => {
|
|
6273
|
+
setStatus(lazy ? "idle" : "loading");
|
|
6274
|
+
setCurrentSrc(lazy ? void 0 : src);
|
|
6275
|
+
setCurrentSrcSet(lazy ? void 0 : srcSet);
|
|
6276
|
+
setHasTriedFallback(false);
|
|
6277
|
+
}, [lazy, src, srcSet]);
|
|
6278
|
+
(0, import_react12.useEffect)(() => {
|
|
6279
|
+
if (!lazy) {
|
|
6280
|
+
return;
|
|
6281
|
+
}
|
|
6282
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
6283
|
+
setCurrentSrc(src);
|
|
6284
|
+
setCurrentSrcSet(srcSet);
|
|
6285
|
+
setStatus("loading");
|
|
6286
|
+
return;
|
|
6287
|
+
}
|
|
6288
|
+
const target = imageRef.current;
|
|
6289
|
+
if (!target) {
|
|
6290
|
+
return;
|
|
6291
|
+
}
|
|
6292
|
+
const observer = new IntersectionObserver(
|
|
6293
|
+
(entries) => {
|
|
6294
|
+
entries.forEach((entry) => {
|
|
6295
|
+
if (entry.isIntersecting) {
|
|
6296
|
+
setCurrentSrc(src);
|
|
6297
|
+
setCurrentSrcSet(srcSet);
|
|
6298
|
+
setStatus("loading");
|
|
6299
|
+
observer.disconnect();
|
|
6300
|
+
}
|
|
6301
|
+
});
|
|
6302
|
+
},
|
|
6303
|
+
{ rootMargin: observerMargin, threshold: 0.2 }
|
|
6304
|
+
);
|
|
6305
|
+
observer.observe(target);
|
|
6306
|
+
return () => observer.disconnect();
|
|
6307
|
+
}, [lazy, observerMargin, src, srcSet]);
|
|
6308
|
+
const {
|
|
6309
|
+
onLoad: imgOnLoad,
|
|
6310
|
+
onError: imgOnError,
|
|
6311
|
+
loading: imgLoading,
|
|
6312
|
+
...restImgProps
|
|
6313
|
+
} = imgProps ?? {};
|
|
6314
|
+
const handleLoad = (event) => {
|
|
6315
|
+
setStatus("loaded");
|
|
6316
|
+
imgOnLoad?.(event);
|
|
6317
|
+
onLoad?.(event);
|
|
6318
|
+
};
|
|
6319
|
+
const handleError = (event) => {
|
|
6320
|
+
if (fallbackSrc && !hasTriedFallback) {
|
|
6321
|
+
setHasTriedFallback(true);
|
|
6322
|
+
setCurrentSrc(fallbackSrc);
|
|
6323
|
+
setStatus("loading");
|
|
6324
|
+
return;
|
|
6325
|
+
}
|
|
6326
|
+
setStatus("error");
|
|
6327
|
+
imgOnError?.(event);
|
|
6328
|
+
onError?.(event);
|
|
6329
|
+
};
|
|
6330
|
+
const showLoader = status === "idle" || status === "loading";
|
|
6331
|
+
const showError = status === "error";
|
|
6332
|
+
const loadingAttr = lazy ? "lazy" : imgLoading ?? "eager";
|
|
6333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6334
|
+
import_Box5.default,
|
|
6335
|
+
{
|
|
6336
|
+
className: imageClasses.root.concat(className ? ` ${className}` : ""),
|
|
6337
|
+
sx: {
|
|
6338
|
+
position: "relative",
|
|
6339
|
+
display: "block",
|
|
6340
|
+
width: 1,
|
|
6341
|
+
lineHeight: 0,
|
|
6342
|
+
overflow: aspectRatio ? "hidden" : void 0,
|
|
6343
|
+
...aspectRatio && { aspectRatio },
|
|
6344
|
+
...sx
|
|
6345
|
+
},
|
|
6346
|
+
...rest,
|
|
6347
|
+
children: [
|
|
6348
|
+
showLoader && (loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6349
|
+
import_Skeleton.default,
|
|
6350
|
+
{
|
|
6351
|
+
animation: "wave",
|
|
6352
|
+
variant: "rectangular",
|
|
6353
|
+
className: imageClasses.overlay,
|
|
6354
|
+
sx: {
|
|
6355
|
+
position: "absolute",
|
|
6356
|
+
inset: 0,
|
|
6357
|
+
width: 1,
|
|
6358
|
+
height: 1,
|
|
6359
|
+
borderRadius: 1
|
|
6360
|
+
}
|
|
6361
|
+
}
|
|
6362
|
+
)),
|
|
6363
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6364
|
+
import_Box5.default,
|
|
6365
|
+
{
|
|
6366
|
+
ref: setRefs,
|
|
6367
|
+
component: "img",
|
|
6368
|
+
className: imageClasses.wrapper,
|
|
6369
|
+
src: currentSrc,
|
|
6370
|
+
srcSet: currentSrcSet,
|
|
6371
|
+
sizes: sizes2,
|
|
6372
|
+
alt,
|
|
6373
|
+
loading: loadingAttr,
|
|
6374
|
+
onLoad: handleLoad,
|
|
6375
|
+
onError: handleError,
|
|
6376
|
+
...restImgProps,
|
|
6377
|
+
sx: {
|
|
6378
|
+
width: 1,
|
|
6379
|
+
height: aspectRatio ? "100%" : "auto",
|
|
6380
|
+
display: "block",
|
|
6381
|
+
objectFit: fit,
|
|
6382
|
+
objectPosition: position,
|
|
6383
|
+
opacity: status === "loaded" ? 1 : 0,
|
|
6384
|
+
transition: (theme) => theme.transitions.create("opacity", {
|
|
6385
|
+
duration: theme.transitions.duration.shorter
|
|
6386
|
+
}),
|
|
6387
|
+
...aspectRatio && { position: "absolute", inset: 0 },
|
|
6388
|
+
...imgSx
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
),
|
|
6392
|
+
withOverlay && !showError && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6393
|
+
import_Box5.default,
|
|
6394
|
+
{
|
|
6395
|
+
className: imageClasses.overlay,
|
|
6396
|
+
sx: {
|
|
6397
|
+
position: "absolute",
|
|
6398
|
+
inset: 0,
|
|
6399
|
+
pointerEvents: "none"
|
|
6400
|
+
},
|
|
6401
|
+
children: overlay
|
|
6402
|
+
}
|
|
6403
|
+
),
|
|
6404
|
+
showError && (renderError ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6405
|
+
import_Box5.default,
|
|
6406
|
+
{
|
|
6407
|
+
className: imageClasses.overlay,
|
|
6408
|
+
sx: {
|
|
6409
|
+
position: "absolute",
|
|
6410
|
+
inset: 0,
|
|
6411
|
+
display: "flex",
|
|
6412
|
+
alignItems: "center",
|
|
6413
|
+
justifyContent: "center",
|
|
6414
|
+
bgcolor: (theme) => theme.vars.palette.grey[200],
|
|
6415
|
+
color: (theme) => theme.vars.palette.text.secondary,
|
|
6416
|
+
fontSize: 12,
|
|
6417
|
+
letterSpacing: 0.2
|
|
6418
|
+
},
|
|
6419
|
+
children: "Image unavailable"
|
|
6420
|
+
}
|
|
6421
|
+
))
|
|
6422
|
+
]
|
|
6423
|
+
}
|
|
6424
|
+
);
|
|
6425
|
+
});
|
|
6426
|
+
|
|
6220
6427
|
// src/components/Upload/Upload.tsx
|
|
6221
6428
|
var import_react_dropzone = require("react-dropzone");
|
|
6222
|
-
var
|
|
6429
|
+
var import_Box11 = __toESM(require("@mui/material/Box"), 1);
|
|
6223
6430
|
var import_Stack3 = __toESM(require("@mui/material/Stack"), 1);
|
|
6224
6431
|
var import_Button3 = __toESM(require("@mui/material/Button"), 1);
|
|
6225
6432
|
var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
6226
6433
|
|
|
6227
6434
|
// src/components/Upload/components/Placeholder.tsx
|
|
6228
6435
|
var import_Stack2 = __toESM(require("@mui/material/Stack"), 1);
|
|
6229
|
-
var
|
|
6230
|
-
var
|
|
6436
|
+
var import_Box6 = __toESM(require("@mui/material/Box"), 1);
|
|
6437
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6231
6438
|
var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
6232
|
-
return /* @__PURE__ */ (0,
|
|
6233
|
-
|
|
6439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6440
|
+
import_Box6.default,
|
|
6234
6441
|
{
|
|
6235
6442
|
sx: {
|
|
6236
6443
|
display: "flex",
|
|
@@ -6240,7 +6447,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6240
6447
|
},
|
|
6241
6448
|
...rest,
|
|
6242
6449
|
children: [
|
|
6243
|
-
/* @__PURE__ */ (0,
|
|
6450
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6244
6451
|
Icon,
|
|
6245
6452
|
{
|
|
6246
6453
|
icon: "CloudUpload",
|
|
@@ -6251,11 +6458,11 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6251
6458
|
}
|
|
6252
6459
|
}
|
|
6253
6460
|
),
|
|
6254
|
-
/* @__PURE__ */ (0,
|
|
6255
|
-
/* @__PURE__ */ (0,
|
|
6461
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_Stack2.default, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_Box6.default, { sx: { typography: "h8" }, children: [
|
|
6256
6463
|
"Drag files here or",
|
|
6257
|
-
/* @__PURE__ */ (0,
|
|
6258
|
-
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6465
|
+
import_Box6.default,
|
|
6259
6466
|
{
|
|
6260
6467
|
component: "span",
|
|
6261
6468
|
sx: {
|
|
@@ -6267,8 +6474,8 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6267
6474
|
}
|
|
6268
6475
|
)
|
|
6269
6476
|
] }),
|
|
6270
|
-
/* @__PURE__ */ (0,
|
|
6271
|
-
|
|
6477
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6478
|
+
import_Box6.default,
|
|
6272
6479
|
{
|
|
6273
6480
|
sx: {
|
|
6274
6481
|
typography: "bodyMd",
|
|
@@ -6289,7 +6496,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6289
6496
|
};
|
|
6290
6497
|
|
|
6291
6498
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6292
|
-
var
|
|
6499
|
+
var import_Box7 = __toESM(require("@mui/material/Box"), 1);
|
|
6293
6500
|
var import_Paper2 = __toESM(require("@mui/material/Paper"), 1);
|
|
6294
6501
|
var import_Typography3 = __toESM(require("@mui/material/Typography"), 1);
|
|
6295
6502
|
|
|
@@ -6322,12 +6529,12 @@ var fileData = (file) => {
|
|
|
6322
6529
|
};
|
|
6323
6530
|
|
|
6324
6531
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6325
|
-
var
|
|
6532
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6326
6533
|
var RejectionFiles = ({ files }) => {
|
|
6327
6534
|
if (!files.length) {
|
|
6328
6535
|
return null;
|
|
6329
6536
|
}
|
|
6330
|
-
return /* @__PURE__ */ (0,
|
|
6537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6331
6538
|
import_Paper2.default,
|
|
6332
6539
|
{
|
|
6333
6540
|
variant: "outlined",
|
|
@@ -6342,13 +6549,13 @@ var RejectionFiles = ({ files }) => {
|
|
|
6342
6549
|
},
|
|
6343
6550
|
children: files.map(({ file, errors }) => {
|
|
6344
6551
|
const { path, size } = fileData(file);
|
|
6345
|
-
return /* @__PURE__ */ (0,
|
|
6346
|
-
/* @__PURE__ */ (0,
|
|
6552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_Box7.default, { sx: { my: 1 }, children: [
|
|
6553
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_Typography3.default, { variant: "subtitle2", noWrap: true, children: [
|
|
6347
6554
|
path,
|
|
6348
6555
|
" - ",
|
|
6349
6556
|
size ? fData(size) : ""
|
|
6350
6557
|
] }),
|
|
6351
|
-
errors.map((error2) => /* @__PURE__ */ (0,
|
|
6558
|
+
errors.map((error2) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_Box7.default, { component: "span", sx: { typography: "caption" }, children: [
|
|
6352
6559
|
"- ",
|
|
6353
6560
|
error2.message
|
|
6354
6561
|
] }, error2.code))
|
|
@@ -6359,12 +6566,12 @@ var RejectionFiles = ({ files }) => {
|
|
|
6359
6566
|
};
|
|
6360
6567
|
|
|
6361
6568
|
// src/components/Upload/components/UploadProgress.tsx
|
|
6362
|
-
var
|
|
6569
|
+
var import_Box8 = __toESM(require("@mui/material/Box"), 1);
|
|
6363
6570
|
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"), 1);
|
|
6364
|
-
var
|
|
6571
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6365
6572
|
var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
6366
|
-
return /* @__PURE__ */ (0,
|
|
6367
|
-
|
|
6573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6574
|
+
import_Box8.default,
|
|
6368
6575
|
{
|
|
6369
6576
|
sx: {
|
|
6370
6577
|
display: "flex",
|
|
@@ -6374,8 +6581,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6374
6581
|
height: "100%"
|
|
6375
6582
|
},
|
|
6376
6583
|
children: [
|
|
6377
|
-
/* @__PURE__ */ (0,
|
|
6378
|
-
/* @__PURE__ */ (0,
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_Box8.default, { sx: { position: "relative", display: "inline-flex" }, children: [
|
|
6585
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6379
6586
|
import_CircularProgress2.default,
|
|
6380
6587
|
{
|
|
6381
6588
|
variant: "determinate",
|
|
@@ -6388,7 +6595,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6388
6595
|
}
|
|
6389
6596
|
}
|
|
6390
6597
|
),
|
|
6391
|
-
/* @__PURE__ */ (0,
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6392
6599
|
import_CircularProgress2.default,
|
|
6393
6600
|
{
|
|
6394
6601
|
variant: "determinate",
|
|
@@ -6400,8 +6607,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6400
6607
|
}
|
|
6401
6608
|
}
|
|
6402
6609
|
),
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6404
|
-
|
|
6610
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6611
|
+
import_Box8.default,
|
|
6405
6612
|
{
|
|
6406
6613
|
sx: {
|
|
6407
6614
|
top: 0,
|
|
@@ -6413,30 +6620,30 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6413
6620
|
alignItems: "center",
|
|
6414
6621
|
justifyContent: "center"
|
|
6415
6622
|
},
|
|
6416
|
-
children: /* @__PURE__ */ (0,
|
|
6623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box8.default, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
|
|
6417
6624
|
}
|
|
6418
6625
|
)
|
|
6419
6626
|
] }),
|
|
6420
|
-
/* @__PURE__ */ (0,
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Box8.default, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
|
|
6421
6628
|
]
|
|
6422
6629
|
}
|
|
6423
6630
|
);
|
|
6424
6631
|
};
|
|
6425
6632
|
|
|
6426
6633
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6427
|
-
var
|
|
6428
|
-
var
|
|
6634
|
+
var import_react13 = require("react");
|
|
6635
|
+
var import_Box10 = __toESM(require("@mui/material/Box"), 1);
|
|
6429
6636
|
var import_IconButton3 = __toESM(require("@mui/material/IconButton"), 1);
|
|
6430
6637
|
|
|
6431
6638
|
// src/components/Upload/components/SingleFilePreview.tsx
|
|
6432
|
-
var
|
|
6639
|
+
var import_Box9 = __toESM(require("@mui/material/Box"), 1);
|
|
6433
6640
|
var import_IconButton2 = __toESM(require("@mui/material/IconButton"), 1);
|
|
6434
|
-
var
|
|
6641
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6435
6642
|
var SingleFilePreview = ({ file }) => {
|
|
6436
6643
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6437
6644
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6438
|
-
const renderImg = /* @__PURE__ */ (0,
|
|
6439
|
-
|
|
6645
|
+
const renderImg = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6646
|
+
import_Box9.default,
|
|
6440
6647
|
{
|
|
6441
6648
|
component: "img",
|
|
6442
6649
|
alt: fileName,
|
|
@@ -6449,8 +6656,8 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6449
6656
|
}
|
|
6450
6657
|
}
|
|
6451
6658
|
);
|
|
6452
|
-
return /* @__PURE__ */ (0,
|
|
6453
|
-
|
|
6659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6660
|
+
import_Box9.default,
|
|
6454
6661
|
{
|
|
6455
6662
|
sx: {
|
|
6456
6663
|
p: 1,
|
|
@@ -6465,7 +6672,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6465
6672
|
);
|
|
6466
6673
|
};
|
|
6467
6674
|
var DeleteButton = ({ sx, ...rest }) => {
|
|
6468
|
-
return /* @__PURE__ */ (0,
|
|
6675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6469
6676
|
import_IconButton2.default,
|
|
6470
6677
|
{
|
|
6471
6678
|
size: "small",
|
|
@@ -6484,15 +6691,15 @@ var DeleteButton = ({ sx, ...rest }) => {
|
|
|
6484
6691
|
...sx
|
|
6485
6692
|
},
|
|
6486
6693
|
...rest,
|
|
6487
|
-
children: /* @__PURE__ */ (0,
|
|
6694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
|
|
6488
6695
|
}
|
|
6489
6696
|
);
|
|
6490
6697
|
};
|
|
6491
6698
|
|
|
6492
6699
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6493
|
-
var
|
|
6700
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6494
6701
|
var MultiFilePreview = ({ files, onRemove }) => {
|
|
6495
|
-
const scrollRef = (0,
|
|
6702
|
+
const scrollRef = (0, import_react13.useRef)(null);
|
|
6496
6703
|
const handleScroll = (direction) => {
|
|
6497
6704
|
if (scrollRef.current) {
|
|
6498
6705
|
const scrollAmount = 300;
|
|
@@ -6504,8 +6711,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6504
6711
|
}
|
|
6505
6712
|
};
|
|
6506
6713
|
const showNavigation = files.length > 2;
|
|
6507
|
-
return /* @__PURE__ */ (0,
|
|
6508
|
-
showNavigation && /* @__PURE__ */ (0,
|
|
6714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_Box10.default, { sx: { position: "relative", width: 1 }, children: [
|
|
6715
|
+
showNavigation && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6509
6716
|
import_IconButton3.default,
|
|
6510
6717
|
{
|
|
6511
6718
|
size: "small",
|
|
@@ -6522,11 +6729,11 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6522
6729
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6523
6730
|
}
|
|
6524
6731
|
},
|
|
6525
|
-
children: /* @__PURE__ */ (0,
|
|
6732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: "NavArrowLeft", width: 20 })
|
|
6526
6733
|
}
|
|
6527
6734
|
),
|
|
6528
|
-
/* @__PURE__ */ (0,
|
|
6529
|
-
|
|
6735
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6736
|
+
import_Box10.default,
|
|
6530
6737
|
{
|
|
6531
6738
|
ref: scrollRef,
|
|
6532
6739
|
sx: {
|
|
@@ -6544,8 +6751,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6544
6751
|
children: files.map((file, index) => {
|
|
6545
6752
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6546
6753
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6547
|
-
return /* @__PURE__ */ (0,
|
|
6548
|
-
|
|
6754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6755
|
+
import_Box10.default,
|
|
6549
6756
|
{
|
|
6550
6757
|
sx: {
|
|
6551
6758
|
position: "relative",
|
|
@@ -6556,8 +6763,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6556
6763
|
flexShrink: 0
|
|
6557
6764
|
},
|
|
6558
6765
|
children: [
|
|
6559
|
-
/* @__PURE__ */ (0,
|
|
6560
|
-
|
|
6766
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6767
|
+
import_Box10.default,
|
|
6561
6768
|
{
|
|
6562
6769
|
component: "img",
|
|
6563
6770
|
alt: fileName,
|
|
@@ -6570,7 +6777,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6570
6777
|
}
|
|
6571
6778
|
}
|
|
6572
6779
|
),
|
|
6573
|
-
onRemove && /* @__PURE__ */ (0,
|
|
6780
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6574
6781
|
DeleteButton,
|
|
6575
6782
|
{
|
|
6576
6783
|
onClick: (e) => {
|
|
@@ -6586,7 +6793,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6586
6793
|
})
|
|
6587
6794
|
}
|
|
6588
6795
|
),
|
|
6589
|
-
showNavigation && /* @__PURE__ */ (0,
|
|
6796
|
+
showNavigation && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6590
6797
|
import_IconButton3.default,
|
|
6591
6798
|
{
|
|
6592
6799
|
size: "small",
|
|
@@ -6603,14 +6810,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6603
6810
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6604
6811
|
}
|
|
6605
6812
|
},
|
|
6606
|
-
children: /* @__PURE__ */ (0,
|
|
6813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: "NavArrowRight", width: 20 })
|
|
6607
6814
|
}
|
|
6608
6815
|
)
|
|
6609
6816
|
] });
|
|
6610
6817
|
};
|
|
6611
6818
|
|
|
6612
6819
|
// src/components/Upload/Upload.tsx
|
|
6613
|
-
var
|
|
6820
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6614
6821
|
var Upload = ({
|
|
6615
6822
|
sx,
|
|
6616
6823
|
value,
|
|
@@ -6637,20 +6844,20 @@ var Upload = ({
|
|
|
6637
6844
|
const hasError = isDragReject || !!error2;
|
|
6638
6845
|
const renderContent = () => {
|
|
6639
6846
|
if (isUploading) {
|
|
6640
|
-
return /* @__PURE__ */ (0,
|
|
6847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UploadProgress, { progress: uploadProgress });
|
|
6641
6848
|
}
|
|
6642
6849
|
if (hasFile) {
|
|
6643
|
-
return /* @__PURE__ */ (0,
|
|
6850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SingleFilePreview, { file: value });
|
|
6644
6851
|
}
|
|
6645
6852
|
if (hasFiles) {
|
|
6646
|
-
return /* @__PURE__ */ (0,
|
|
6853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MultiFilePreview, { files: value, onRemove });
|
|
6647
6854
|
}
|
|
6648
|
-
return /* @__PURE__ */ (0,
|
|
6855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UploadPlaceholder, { hasError });
|
|
6649
6856
|
};
|
|
6650
6857
|
const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
|
|
6651
|
-
return /* @__PURE__ */ (0,
|
|
6652
|
-
/* @__PURE__ */ (0,
|
|
6653
|
-
|
|
6858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_Box11.default, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
6859
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6860
|
+
import_Box11.default,
|
|
6654
6861
|
{
|
|
6655
6862
|
...shouldShowDropzone ? getRootProps() : {},
|
|
6656
6863
|
sx: {
|
|
@@ -6688,52 +6895,52 @@ var Upload = ({
|
|
|
6688
6895
|
}
|
|
6689
6896
|
},
|
|
6690
6897
|
children: [
|
|
6691
|
-
shouldShowDropzone && /* @__PURE__ */ (0,
|
|
6898
|
+
shouldShowDropzone && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", { ...getInputProps() }),
|
|
6692
6899
|
renderContent()
|
|
6693
6900
|
]
|
|
6694
6901
|
}
|
|
6695
6902
|
),
|
|
6696
|
-
hasFile && !isUploading && /* @__PURE__ */ (0,
|
|
6697
|
-
hasFiles && /* @__PURE__ */ (0,
|
|
6698
|
-
onRemoveAll && /* @__PURE__ */ (0,
|
|
6903
|
+
hasFile && !isUploading && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DeleteButton, { onClick: onDelete }),
|
|
6904
|
+
hasFiles && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_Stack3.default, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
|
|
6905
|
+
onRemoveAll && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6699
6906
|
import_Button3.default,
|
|
6700
6907
|
{
|
|
6701
6908
|
variant: "outlined",
|
|
6702
6909
|
color: "inherit",
|
|
6703
6910
|
size: "small",
|
|
6704
6911
|
onClick: onRemoveAll,
|
|
6705
|
-
startIcon: /* @__PURE__ */ (0,
|
|
6912
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
|
|
6706
6913
|
children: "Remove all"
|
|
6707
6914
|
}
|
|
6708
6915
|
),
|
|
6709
|
-
onUpload && /* @__PURE__ */ (0,
|
|
6916
|
+
onUpload && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6710
6917
|
import_Button3.default,
|
|
6711
6918
|
{
|
|
6712
6919
|
variant: "contained",
|
|
6713
6920
|
size: "small",
|
|
6714
6921
|
onClick: onUpload,
|
|
6715
|
-
startIcon: /* @__PURE__ */ (0,
|
|
6922
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
|
|
6716
6923
|
children: "Upload files"
|
|
6717
6924
|
}
|
|
6718
6925
|
)
|
|
6719
6926
|
] }),
|
|
6720
|
-
helperText && /* @__PURE__ */ (0,
|
|
6721
|
-
/* @__PURE__ */ (0,
|
|
6927
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_FormHelperText.default, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
|
|
6928
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RejectionFiles, { files: [...fileRejections] })
|
|
6722
6929
|
] });
|
|
6723
6930
|
};
|
|
6724
6931
|
|
|
6725
6932
|
// src/components/HookForm/Form.tsx
|
|
6726
6933
|
var import_react_hook_form = require("react-hook-form");
|
|
6727
|
-
var
|
|
6728
|
-
var
|
|
6934
|
+
var import_Box12 = __toESM(require("@mui/material/Box"), 1);
|
|
6935
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6729
6936
|
var Form = ({
|
|
6730
6937
|
children,
|
|
6731
6938
|
onSubmit,
|
|
6732
6939
|
methods,
|
|
6733
6940
|
...rest
|
|
6734
6941
|
}) => {
|
|
6735
|
-
return /* @__PURE__ */ (0,
|
|
6736
|
-
|
|
6942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_hook_form.FormProvider, { ...methods, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6943
|
+
import_Box12.default,
|
|
6737
6944
|
{
|
|
6738
6945
|
component: "form",
|
|
6739
6946
|
onSubmit: (e) => {
|
|
@@ -6753,7 +6960,7 @@ var Form = ({
|
|
|
6753
6960
|
// src/components/HookForm/RHFSwitch.tsx
|
|
6754
6961
|
var import_react_hook_form2 = require("react-hook-form");
|
|
6755
6962
|
var import_Stack4 = __toESM(require("@mui/material/Stack"), 1);
|
|
6756
|
-
var
|
|
6963
|
+
var import_Box13 = __toESM(require("@mui/material/Box"), 1);
|
|
6757
6964
|
var import_Typography4 = __toESM(require("@mui/material/Typography"), 1);
|
|
6758
6965
|
var import_Switch2 = __toESM(require("@mui/material/Switch"), 1);
|
|
6759
6966
|
var import_FormGroup = __toESM(require("@mui/material/FormGroup"), 1);
|
|
@@ -6761,7 +6968,7 @@ var import_FormLabel = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
6761
6968
|
var import_FormControl = __toESM(require("@mui/material/FormControl"), 1);
|
|
6762
6969
|
var import_FormHelperText2 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
6763
6970
|
var import_FormControlLabel2 = __toESM(require("@mui/material/FormControlLabel"), 1);
|
|
6764
|
-
var
|
|
6971
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6765
6972
|
var RHFSwitch = ({
|
|
6766
6973
|
name,
|
|
6767
6974
|
description,
|
|
@@ -6773,16 +6980,16 @@ var RHFSwitch = ({
|
|
|
6773
6980
|
}) => {
|
|
6774
6981
|
const { control } = (0, import_react_hook_form2.useFormContext)();
|
|
6775
6982
|
const baseAriaLabel = `Switch ${name}`;
|
|
6776
|
-
return /* @__PURE__ */ (0,
|
|
6983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6777
6984
|
import_react_hook_form2.Controller,
|
|
6778
6985
|
{
|
|
6779
6986
|
name,
|
|
6780
6987
|
control,
|
|
6781
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
6782
|
-
/* @__PURE__ */ (0,
|
|
6988
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_Box13.default, { sx: slotProps?.wrap, children: [
|
|
6989
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6783
6990
|
import_FormControlLabel2.default,
|
|
6784
6991
|
{
|
|
6785
|
-
control: /* @__PURE__ */ (0,
|
|
6992
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6786
6993
|
import_Switch2.default,
|
|
6787
6994
|
{
|
|
6788
6995
|
...field,
|
|
@@ -6797,9 +7004,9 @@ var RHFSwitch = ({
|
|
|
6797
7004
|
}
|
|
6798
7005
|
}
|
|
6799
7006
|
),
|
|
6800
|
-
label: /* @__PURE__ */ (0,
|
|
6801
|
-
/* @__PURE__ */ (0,
|
|
6802
|
-
description && /* @__PURE__ */ (0,
|
|
7007
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_Stack4.default, { children: [
|
|
7008
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_Typography4.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7009
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_Typography4.default, { variant: "body2", color: "textBody", children: description })
|
|
6803
7010
|
] }),
|
|
6804
7011
|
sx: {
|
|
6805
7012
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -6808,7 +7015,7 @@ var RHFSwitch = ({
|
|
|
6808
7015
|
...other
|
|
6809
7016
|
}
|
|
6810
7017
|
),
|
|
6811
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7018
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6812
7019
|
import_FormHelperText2.default,
|
|
6813
7020
|
{
|
|
6814
7021
|
error: !!error2,
|
|
@@ -6831,19 +7038,19 @@ var RHFMultiSwitch = ({
|
|
|
6831
7038
|
}) => {
|
|
6832
7039
|
const { control } = (0, import_react_hook_form2.useFormContext)();
|
|
6833
7040
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
6834
|
-
return /* @__PURE__ */ (0,
|
|
7041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6835
7042
|
import_react_hook_form2.Controller,
|
|
6836
7043
|
{
|
|
6837
7044
|
name,
|
|
6838
7045
|
control,
|
|
6839
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7046
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6840
7047
|
import_FormControl.default,
|
|
6841
7048
|
{
|
|
6842
7049
|
component: "fieldset",
|
|
6843
7050
|
sx: slotProps?.formControl?.sx,
|
|
6844
7051
|
...slotProps?.formControl,
|
|
6845
7052
|
children: [
|
|
6846
|
-
label && /* @__PURE__ */ (0,
|
|
7053
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6847
7054
|
import_FormLabel.default,
|
|
6848
7055
|
{
|
|
6849
7056
|
component: "legend",
|
|
@@ -6852,12 +7059,12 @@ var RHFMultiSwitch = ({
|
|
|
6852
7059
|
children: label
|
|
6853
7060
|
}
|
|
6854
7061
|
),
|
|
6855
|
-
/* @__PURE__ */ (0,
|
|
7062
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_FormGroup.default, { ...other, children: options.map((option) => {
|
|
6856
7063
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
6857
|
-
return /* @__PURE__ */ (0,
|
|
7064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6858
7065
|
import_FormControlLabel2.default,
|
|
6859
7066
|
{
|
|
6860
|
-
control: /* @__PURE__ */ (0,
|
|
7067
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6861
7068
|
import_Switch2.default,
|
|
6862
7069
|
{
|
|
6863
7070
|
checked: (field.value || []).includes(option.value),
|
|
@@ -6880,7 +7087,7 @@ var RHFMultiSwitch = ({
|
|
|
6880
7087
|
option.value
|
|
6881
7088
|
);
|
|
6882
7089
|
}) }),
|
|
6883
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7090
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_FormHelperText2.default, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
6884
7091
|
]
|
|
6885
7092
|
}
|
|
6886
7093
|
)
|
|
@@ -6890,10 +7097,10 @@ var RHFMultiSwitch = ({
|
|
|
6890
7097
|
|
|
6891
7098
|
// src/components/HookForm/RHFUpload.tsx
|
|
6892
7099
|
var import_react_hook_form3 = require("react-hook-form");
|
|
6893
|
-
var
|
|
7100
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6894
7101
|
var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
6895
7102
|
const { control, setValue } = (0, import_react_hook_form3.useFormContext)();
|
|
6896
|
-
return /* @__PURE__ */ (0,
|
|
7103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6897
7104
|
import_react_hook_form3.Controller,
|
|
6898
7105
|
{
|
|
6899
7106
|
name,
|
|
@@ -6921,7 +7128,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
6921
7128
|
const onRemoveAll = () => {
|
|
6922
7129
|
setValue(name, [], { shouldValidate: true });
|
|
6923
7130
|
};
|
|
6924
|
-
return /* @__PURE__ */ (0,
|
|
7131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6925
7132
|
Upload,
|
|
6926
7133
|
{
|
|
6927
7134
|
multiple,
|
|
@@ -6945,18 +7152,18 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
6945
7152
|
var import_react_hook_form4 = require("react-hook-form");
|
|
6946
7153
|
|
|
6947
7154
|
// src/components/OTPInput/index.tsx
|
|
6948
|
-
var
|
|
7155
|
+
var import_react14 = require("react");
|
|
6949
7156
|
var import_styles37 = require("@mui/material/styles");
|
|
6950
|
-
var
|
|
7157
|
+
var import_Box14 = __toESM(require("@mui/material/Box"), 1);
|
|
6951
7158
|
var import_FormHelperText3 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
6952
7159
|
var import_InputBase3 = require("@mui/material/InputBase");
|
|
6953
7160
|
var import_TextField2 = __toESM(require("@mui/material/TextField"), 1);
|
|
6954
|
-
var
|
|
7161
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6955
7162
|
var OTPInput = (props) => {
|
|
6956
7163
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
6957
7164
|
const theme = (0, import_styles37.useTheme)();
|
|
6958
|
-
const [otp, setOtp] = (0,
|
|
6959
|
-
const inputsRef = (0,
|
|
7165
|
+
const [otp, setOtp] = (0, import_react14.useState)(Array(length).fill(""));
|
|
7166
|
+
const inputsRef = (0, import_react14.useRef)([]);
|
|
6960
7167
|
const handleChange = (value, index) => {
|
|
6961
7168
|
if (!/^[0-9]$/.test(value) && value !== "") return;
|
|
6962
7169
|
const newOtp = [...otp];
|
|
@@ -7019,18 +7226,19 @@ var OTPInput = (props) => {
|
|
|
7019
7226
|
onComplete?.(newOtp.join(""));
|
|
7020
7227
|
}
|
|
7021
7228
|
};
|
|
7022
|
-
return /* @__PURE__ */ (0,
|
|
7023
|
-
/* @__PURE__ */ (0,
|
|
7024
|
-
|
|
7229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
7230
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_Box14.default, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7231
|
+
import_Box14.default,
|
|
7025
7232
|
{
|
|
7026
7233
|
display: "flex",
|
|
7027
7234
|
alignItems: "center",
|
|
7028
7235
|
sx: {
|
|
7236
|
+
width: "100%",
|
|
7029
7237
|
"&:not(:last-of-type)": {
|
|
7030
7238
|
mr: 1.5
|
|
7031
7239
|
}
|
|
7032
7240
|
},
|
|
7033
|
-
children: /* @__PURE__ */ (0,
|
|
7241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7034
7242
|
import_TextField2.default,
|
|
7035
7243
|
{
|
|
7036
7244
|
size: "medium",
|
|
@@ -7113,21 +7321,21 @@ var OTPInput = (props) => {
|
|
|
7113
7321
|
},
|
|
7114
7322
|
index
|
|
7115
7323
|
)) }),
|
|
7116
|
-
error2 && /* @__PURE__ */ (0,
|
|
7324
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_FormHelperText3.default, { sx: { color: "error.main" }, children: helperText })
|
|
7117
7325
|
] });
|
|
7118
7326
|
};
|
|
7119
7327
|
var OTPInput_default = OTPInput;
|
|
7120
7328
|
|
|
7121
7329
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
7122
|
-
var
|
|
7330
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7123
7331
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
7124
7332
|
const { control, setValue } = (0, import_react_hook_form4.useFormContext)();
|
|
7125
|
-
return /* @__PURE__ */ (0,
|
|
7333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7126
7334
|
import_react_hook_form4.Controller,
|
|
7127
7335
|
{
|
|
7128
7336
|
name,
|
|
7129
7337
|
control,
|
|
7130
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7338
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7131
7339
|
OTPInput_default,
|
|
7132
7340
|
{
|
|
7133
7341
|
length,
|
|
@@ -7147,16 +7355,16 @@ var import_react_hook_form5 = require("react-hook-form");
|
|
|
7147
7355
|
var import_IconButton4 = __toESM(require("@mui/material/IconButton"), 1);
|
|
7148
7356
|
var import_InputAdornment2 = __toESM(require("@mui/material/InputAdornment"), 1);
|
|
7149
7357
|
var import_TextField3 = __toESM(require("@mui/material/TextField"), 1);
|
|
7150
|
-
var
|
|
7358
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7151
7359
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
7152
7360
|
const { control } = (0, import_react_hook_form5.useFormContext)();
|
|
7153
7361
|
const passwordVisibility = useBoolean();
|
|
7154
|
-
return /* @__PURE__ */ (0,
|
|
7362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7155
7363
|
import_react_hook_form5.Controller,
|
|
7156
7364
|
{
|
|
7157
7365
|
name,
|
|
7158
7366
|
control,
|
|
7159
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7367
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7160
7368
|
import_TextField3.default,
|
|
7161
7369
|
{
|
|
7162
7370
|
...field,
|
|
@@ -7177,7 +7385,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7177
7385
|
input: {
|
|
7178
7386
|
...slotProps?.input,
|
|
7179
7387
|
...type === "password" && {
|
|
7180
|
-
endAdornment: /* @__PURE__ */ (0,
|
|
7388
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_InputAdornment2.default, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_IconButton4.default, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7181
7389
|
Icon,
|
|
7182
7390
|
{
|
|
7183
7391
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -7204,7 +7412,7 @@ var import_FormLabel2 = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
7204
7412
|
var import_RadioGroup = __toESM(require("@mui/material/RadioGroup"), 1);
|
|
7205
7413
|
var import_FormControl2 = __toESM(require("@mui/material/FormControl"), 1);
|
|
7206
7414
|
var import_FormHelperText4 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
7207
|
-
var
|
|
7415
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7208
7416
|
var RHFRadioGroup = ({
|
|
7209
7417
|
name,
|
|
7210
7418
|
label,
|
|
@@ -7216,13 +7424,13 @@ var RHFRadioGroup = ({
|
|
|
7216
7424
|
const { control } = (0, import_react_hook_form6.useFormContext)();
|
|
7217
7425
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
7218
7426
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
7219
|
-
return /* @__PURE__ */ (0,
|
|
7427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7220
7428
|
import_react_hook_form6.Controller,
|
|
7221
7429
|
{
|
|
7222
7430
|
name,
|
|
7223
7431
|
control,
|
|
7224
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7225
|
-
label && /* @__PURE__ */ (0,
|
|
7432
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_FormControl2.default, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
7433
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7226
7434
|
import_FormLabel2.default,
|
|
7227
7435
|
{
|
|
7228
7436
|
id: labelledby,
|
|
@@ -7232,11 +7440,11 @@ var RHFRadioGroup = ({
|
|
|
7232
7440
|
children: label
|
|
7233
7441
|
}
|
|
7234
7442
|
),
|
|
7235
|
-
/* @__PURE__ */ (0,
|
|
7443
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_RadioGroup.default, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7236
7444
|
import_FormControlLabel3.default,
|
|
7237
7445
|
{
|
|
7238
7446
|
value: option.value,
|
|
7239
|
-
control: /* @__PURE__ */ (0,
|
|
7447
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7240
7448
|
import_Radio2.default,
|
|
7241
7449
|
{
|
|
7242
7450
|
...slotProps?.radio,
|
|
@@ -7248,9 +7456,9 @@ var RHFRadioGroup = ({
|
|
|
7248
7456
|
}
|
|
7249
7457
|
}
|
|
7250
7458
|
),
|
|
7251
|
-
label: /* @__PURE__ */ (0,
|
|
7252
|
-
/* @__PURE__ */ (0,
|
|
7253
|
-
option?.description && /* @__PURE__ */ (0,
|
|
7459
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_Stack5.default, { children: [
|
|
7460
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_Typography5.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7461
|
+
option?.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_Typography5.default, { variant: "body2", color: "textBody", children: option?.description })
|
|
7254
7462
|
] }),
|
|
7255
7463
|
sx: {
|
|
7256
7464
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7258,7 +7466,7 @@ var RHFRadioGroup = ({
|
|
|
7258
7466
|
},
|
|
7259
7467
|
option.value
|
|
7260
7468
|
)) }),
|
|
7261
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7469
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_FormHelperText4.default, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7262
7470
|
] })
|
|
7263
7471
|
}
|
|
7264
7472
|
);
|
|
@@ -7268,7 +7476,7 @@ var RHFRadioGroup = ({
|
|
|
7268
7476
|
var import_react_hook_form7 = require("react-hook-form");
|
|
7269
7477
|
var import_TextField4 = __toESM(require("@mui/material/TextField"), 1);
|
|
7270
7478
|
var import_Autocomplete4 = __toESM(require("@mui/material/Autocomplete"), 1);
|
|
7271
|
-
var
|
|
7479
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7272
7480
|
var RHFAutocomplete = ({
|
|
7273
7481
|
name,
|
|
7274
7482
|
label,
|
|
@@ -7279,12 +7487,12 @@ var RHFAutocomplete = ({
|
|
|
7279
7487
|
...other
|
|
7280
7488
|
}) => {
|
|
7281
7489
|
const { control, setValue } = (0, import_react_hook_form7.useFormContext)();
|
|
7282
|
-
return /* @__PURE__ */ (0,
|
|
7490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7283
7491
|
import_react_hook_form7.Controller,
|
|
7284
7492
|
{
|
|
7285
7493
|
name,
|
|
7286
7494
|
control,
|
|
7287
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7495
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7288
7496
|
import_Autocomplete4.default,
|
|
7289
7497
|
{
|
|
7290
7498
|
...field,
|
|
@@ -7293,7 +7501,7 @@ var RHFAutocomplete = ({
|
|
|
7293
7501
|
setValue(name, newValue, { shouldValidate: true });
|
|
7294
7502
|
handleChange?.(newValue);
|
|
7295
7503
|
},
|
|
7296
|
-
renderInput: (params) => /* @__PURE__ */ (0,
|
|
7504
|
+
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7297
7505
|
import_TextField4.default,
|
|
7298
7506
|
{
|
|
7299
7507
|
label,
|
|
@@ -7314,7 +7522,7 @@ var RHFAutocomplete = ({
|
|
|
7314
7522
|
// src/components/HookForm/RHFCheckbox.tsx
|
|
7315
7523
|
var import_react_hook_form8 = require("react-hook-form");
|
|
7316
7524
|
var import_Stack6 = __toESM(require("@mui/material/Stack"), 1);
|
|
7317
|
-
var
|
|
7525
|
+
var import_Box15 = __toESM(require("@mui/material/Box"), 1);
|
|
7318
7526
|
var import_Typography6 = __toESM(require("@mui/material/Typography"), 1);
|
|
7319
7527
|
var import_Checkbox3 = __toESM(require("@mui/material/Checkbox"), 1);
|
|
7320
7528
|
var import_FormGroup2 = __toESM(require("@mui/material/FormGroup"), 1);
|
|
@@ -7322,7 +7530,7 @@ var import_FormLabel3 = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
7322
7530
|
var import_FormControl3 = __toESM(require("@mui/material/FormControl"), 1);
|
|
7323
7531
|
var import_FormHelperText5 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
7324
7532
|
var import_FormControlLabel4 = __toESM(require("@mui/material/FormControlLabel"), 1);
|
|
7325
|
-
var
|
|
7533
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7326
7534
|
var RHFCheckbox = ({
|
|
7327
7535
|
name,
|
|
7328
7536
|
description,
|
|
@@ -7334,16 +7542,16 @@ var RHFCheckbox = ({
|
|
|
7334
7542
|
}) => {
|
|
7335
7543
|
const { control } = (0, import_react_hook_form8.useFormContext)();
|
|
7336
7544
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
7337
|
-
return /* @__PURE__ */ (0,
|
|
7545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7338
7546
|
import_react_hook_form8.Controller,
|
|
7339
7547
|
{
|
|
7340
7548
|
name,
|
|
7341
7549
|
control,
|
|
7342
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7343
|
-
/* @__PURE__ */ (0,
|
|
7550
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_Box15.default, { sx: slotProps?.wrap, children: [
|
|
7551
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7344
7552
|
import_FormControlLabel4.default,
|
|
7345
7553
|
{
|
|
7346
|
-
control: /* @__PURE__ */ (0,
|
|
7554
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7347
7555
|
import_Checkbox3.default,
|
|
7348
7556
|
{
|
|
7349
7557
|
...field,
|
|
@@ -7358,9 +7566,9 @@ var RHFCheckbox = ({
|
|
|
7358
7566
|
}
|
|
7359
7567
|
}
|
|
7360
7568
|
),
|
|
7361
|
-
label: /* @__PURE__ */ (0,
|
|
7362
|
-
/* @__PURE__ */ (0,
|
|
7363
|
-
description && /* @__PURE__ */ (0,
|
|
7569
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_Stack6.default, { children: [
|
|
7570
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_Typography6.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7571
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_Typography6.default, { variant: "body2", color: "textBody", children: description })
|
|
7364
7572
|
] }),
|
|
7365
7573
|
sx: {
|
|
7366
7574
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7369,7 +7577,7 @@ var RHFCheckbox = ({
|
|
|
7369
7577
|
...other
|
|
7370
7578
|
}
|
|
7371
7579
|
),
|
|
7372
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7580
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_FormHelperText5.default, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7373
7581
|
] })
|
|
7374
7582
|
}
|
|
7375
7583
|
);
|
|
@@ -7385,13 +7593,13 @@ var RHFMultiCheckbox = ({
|
|
|
7385
7593
|
}) => {
|
|
7386
7594
|
const { control } = (0, import_react_hook_form8.useFormContext)();
|
|
7387
7595
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7388
|
-
return /* @__PURE__ */ (0,
|
|
7596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7389
7597
|
import_react_hook_form8.Controller,
|
|
7390
7598
|
{
|
|
7391
7599
|
name,
|
|
7392
7600
|
control,
|
|
7393
7601
|
defaultValue: [],
|
|
7394
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7602
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7395
7603
|
import_FormControl3.default,
|
|
7396
7604
|
{
|
|
7397
7605
|
component: "fieldset",
|
|
@@ -7399,7 +7607,7 @@ var RHFMultiCheckbox = ({
|
|
|
7399
7607
|
sx: slotProps?.formControl?.sx,
|
|
7400
7608
|
...slotProps?.formControl,
|
|
7401
7609
|
children: [
|
|
7402
|
-
label && /* @__PURE__ */ (0,
|
|
7610
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7403
7611
|
import_FormLabel3.default,
|
|
7404
7612
|
{
|
|
7405
7613
|
component: "legend",
|
|
@@ -7408,12 +7616,12 @@ var RHFMultiCheckbox = ({
|
|
|
7408
7616
|
children: label
|
|
7409
7617
|
}
|
|
7410
7618
|
),
|
|
7411
|
-
/* @__PURE__ */ (0,
|
|
7619
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_FormGroup2.default, { row, ...other, children: options.map((option) => {
|
|
7412
7620
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7413
|
-
return /* @__PURE__ */ (0,
|
|
7621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7414
7622
|
import_FormControlLabel4.default,
|
|
7415
7623
|
{
|
|
7416
|
-
control: /* @__PURE__ */ (0,
|
|
7624
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7417
7625
|
import_Checkbox3.default,
|
|
7418
7626
|
{
|
|
7419
7627
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7431,9 +7639,9 @@ var RHFMultiCheckbox = ({
|
|
|
7431
7639
|
}
|
|
7432
7640
|
}
|
|
7433
7641
|
),
|
|
7434
|
-
label: /* @__PURE__ */ (0,
|
|
7435
|
-
/* @__PURE__ */ (0,
|
|
7436
|
-
option?.description && /* @__PURE__ */ (0,
|
|
7642
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_Stack6.default, { children: [
|
|
7643
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_Typography6.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7644
|
+
option?.description && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_Typography6.default, { variant: "body2", color: "textBody", children: option?.description })
|
|
7437
7645
|
] }),
|
|
7438
7646
|
sx: {
|
|
7439
7647
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7442,7 +7650,7 @@ var RHFMultiCheckbox = ({
|
|
|
7442
7650
|
option.value
|
|
7443
7651
|
);
|
|
7444
7652
|
}) }),
|
|
7445
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7653
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7446
7654
|
import_FormHelperText5.default,
|
|
7447
7655
|
{
|
|
7448
7656
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -7472,29 +7680,29 @@ var Field = {
|
|
|
7472
7680
|
// src/components/CopyButton/index.tsx
|
|
7473
7681
|
var import_Tooltip2 = __toESM(require("@mui/material/Tooltip"), 1);
|
|
7474
7682
|
var import_IconButton5 = __toESM(require("@mui/material/IconButton"), 1);
|
|
7475
|
-
var
|
|
7683
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7476
7684
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
7477
7685
|
const { copy, isCopied } = useCopyToClipboard();
|
|
7478
|
-
return /* @__PURE__ */ (0,
|
|
7686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_Tooltip2.default, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7479
7687
|
import_IconButton5.default,
|
|
7480
7688
|
{
|
|
7481
7689
|
size,
|
|
7482
7690
|
onClick: () => copy(text2),
|
|
7483
7691
|
"aria-label": "copy token",
|
|
7484
7692
|
sx: { color: "icon.black" },
|
|
7485
|
-
children: /* @__PURE__ */ (0,
|
|
7693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
7486
7694
|
}
|
|
7487
7695
|
) });
|
|
7488
7696
|
};
|
|
7489
7697
|
|
|
7490
7698
|
// src/components/LoadingScreen/index.tsx
|
|
7491
7699
|
var import_Portal = __toESM(require("@mui/material/Portal"), 1);
|
|
7492
|
-
var
|
|
7700
|
+
var import_Box16 = __toESM(require("@mui/material/Box"), 1);
|
|
7493
7701
|
var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"), 1);
|
|
7494
|
-
var
|
|
7702
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7495
7703
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
7496
|
-
const content = /* @__PURE__ */ (0,
|
|
7497
|
-
|
|
7704
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7705
|
+
import_Box16.default,
|
|
7498
7706
|
{
|
|
7499
7707
|
sx: {
|
|
7500
7708
|
px: 5,
|
|
@@ -7507,17 +7715,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
7507
7715
|
...sx
|
|
7508
7716
|
},
|
|
7509
7717
|
...rest,
|
|
7510
|
-
children: /* @__PURE__ */ (0,
|
|
7718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_LinearProgress.default, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
7511
7719
|
}
|
|
7512
7720
|
);
|
|
7513
7721
|
if (portal) {
|
|
7514
|
-
return /* @__PURE__ */ (0,
|
|
7722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_Portal.default, { children: content });
|
|
7515
7723
|
}
|
|
7516
7724
|
return content;
|
|
7517
7725
|
};
|
|
7518
7726
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
7519
|
-
const content = /* @__PURE__ */ (0,
|
|
7520
|
-
|
|
7727
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7728
|
+
import_Box16.default,
|
|
7521
7729
|
{
|
|
7522
7730
|
sx: {
|
|
7523
7731
|
right: 0,
|
|
@@ -7533,11 +7741,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7533
7741
|
...sx
|
|
7534
7742
|
},
|
|
7535
7743
|
...rest,
|
|
7536
|
-
children: /* @__PURE__ */ (0,
|
|
7744
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(AnimatedLogo, {})
|
|
7537
7745
|
}
|
|
7538
7746
|
);
|
|
7539
7747
|
if (portal) {
|
|
7540
|
-
return /* @__PURE__ */ (0,
|
|
7748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_Portal.default, { children: content });
|
|
7541
7749
|
}
|
|
7542
7750
|
return content;
|
|
7543
7751
|
};
|
|
@@ -7557,6 +7765,7 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7557
7765
|
Field,
|
|
7558
7766
|
Form,
|
|
7559
7767
|
Icon,
|
|
7768
|
+
Image,
|
|
7560
7769
|
InfoCircleFill,
|
|
7561
7770
|
InfoCircleOutline,
|
|
7562
7771
|
KeyCommand,
|