@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/dist/index.js CHANGED
@@ -6056,20 +6056,226 @@ var Table = (props) => {
6056
6056
  ) });
6057
6057
  };
6058
6058
 
6059
+ // src/components/Image/index.tsx
6060
+ import { useRef as useRef4, useState as useState9, useEffect as useEffect5, forwardRef } from "react";
6061
+ import Box5 from "@mui/material/Box";
6062
+ import Skeleton from "@mui/material/Skeleton";
6063
+
6064
+ // src/components/Image/classes.ts
6065
+ var imageClasses = {
6066
+ root: "undefine__image__root",
6067
+ wrapper: "undefine__image__wrapper",
6068
+ overlay: "undefine__image__overlay"
6069
+ };
6070
+
6071
+ // src/components/Image/index.tsx
6072
+ import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
6073
+ var Image = forwardRef(function Image2(props, ref) {
6074
+ const {
6075
+ src,
6076
+ alt,
6077
+ lazy = true,
6078
+ fallbackSrc,
6079
+ srcSet,
6080
+ sizes: sizes2,
6081
+ aspectRatio,
6082
+ fit = "cover",
6083
+ position = "center",
6084
+ overlay,
6085
+ withOverlay = !!overlay,
6086
+ loadingIndicator,
6087
+ renderError,
6088
+ observerMargin = "200px",
6089
+ className,
6090
+ sx,
6091
+ onLoad,
6092
+ onError,
6093
+ imgSx,
6094
+ imgProps,
6095
+ ...rest
6096
+ } = props;
6097
+ const imageRef = useRef4(null);
6098
+ const [status, setStatus] = useState9(lazy ? "idle" : "loading");
6099
+ const [currentSrc, setCurrentSrc] = useState9(lazy ? void 0 : src);
6100
+ const [currentSrcSet, setCurrentSrcSet] = useState9(lazy ? void 0 : srcSet);
6101
+ const [hasTriedFallback, setHasTriedFallback] = useState9(false);
6102
+ const setRefs = (node) => {
6103
+ imageRef.current = node;
6104
+ if (typeof ref === "function") {
6105
+ ref(node);
6106
+ } else if (ref) {
6107
+ ref.current = node;
6108
+ }
6109
+ };
6110
+ useEffect5(() => {
6111
+ setStatus(lazy ? "idle" : "loading");
6112
+ setCurrentSrc(lazy ? void 0 : src);
6113
+ setCurrentSrcSet(lazy ? void 0 : srcSet);
6114
+ setHasTriedFallback(false);
6115
+ }, [lazy, src, srcSet]);
6116
+ useEffect5(() => {
6117
+ if (!lazy) {
6118
+ return;
6119
+ }
6120
+ if (typeof IntersectionObserver === "undefined") {
6121
+ setCurrentSrc(src);
6122
+ setCurrentSrcSet(srcSet);
6123
+ setStatus("loading");
6124
+ return;
6125
+ }
6126
+ const target = imageRef.current;
6127
+ if (!target) {
6128
+ return;
6129
+ }
6130
+ const observer = new IntersectionObserver(
6131
+ (entries) => {
6132
+ entries.forEach((entry) => {
6133
+ if (entry.isIntersecting) {
6134
+ setCurrentSrc(src);
6135
+ setCurrentSrcSet(srcSet);
6136
+ setStatus("loading");
6137
+ observer.disconnect();
6138
+ }
6139
+ });
6140
+ },
6141
+ { rootMargin: observerMargin, threshold: 0.2 }
6142
+ );
6143
+ observer.observe(target);
6144
+ return () => observer.disconnect();
6145
+ }, [lazy, observerMargin, src, srcSet]);
6146
+ const {
6147
+ onLoad: imgOnLoad,
6148
+ onError: imgOnError,
6149
+ loading: imgLoading,
6150
+ ...restImgProps
6151
+ } = imgProps ?? {};
6152
+ const handleLoad = (event) => {
6153
+ setStatus("loaded");
6154
+ imgOnLoad?.(event);
6155
+ onLoad?.(event);
6156
+ };
6157
+ const handleError = (event) => {
6158
+ if (fallbackSrc && !hasTriedFallback) {
6159
+ setHasTriedFallback(true);
6160
+ setCurrentSrc(fallbackSrc);
6161
+ setStatus("loading");
6162
+ return;
6163
+ }
6164
+ setStatus("error");
6165
+ imgOnError?.(event);
6166
+ onError?.(event);
6167
+ };
6168
+ const showLoader = status === "idle" || status === "loading";
6169
+ const showError = status === "error";
6170
+ const loadingAttr = lazy ? "lazy" : imgLoading ?? "eager";
6171
+ return /* @__PURE__ */ jsxs24(
6172
+ Box5,
6173
+ {
6174
+ className: imageClasses.root.concat(className ? ` ${className}` : ""),
6175
+ sx: {
6176
+ position: "relative",
6177
+ display: "block",
6178
+ width: 1,
6179
+ lineHeight: 0,
6180
+ overflow: aspectRatio ? "hidden" : void 0,
6181
+ ...aspectRatio && { aspectRatio },
6182
+ ...sx
6183
+ },
6184
+ ...rest,
6185
+ children: [
6186
+ showLoader && (loadingIndicator ?? /* @__PURE__ */ jsx44(
6187
+ Skeleton,
6188
+ {
6189
+ animation: "wave",
6190
+ variant: "rectangular",
6191
+ className: imageClasses.overlay,
6192
+ sx: {
6193
+ position: "absolute",
6194
+ inset: 0,
6195
+ width: 1,
6196
+ height: 1,
6197
+ borderRadius: 1
6198
+ }
6199
+ }
6200
+ )),
6201
+ /* @__PURE__ */ jsx44(
6202
+ Box5,
6203
+ {
6204
+ ref: setRefs,
6205
+ component: "img",
6206
+ className: imageClasses.wrapper,
6207
+ src: currentSrc,
6208
+ srcSet: currentSrcSet,
6209
+ sizes: sizes2,
6210
+ alt,
6211
+ loading: loadingAttr,
6212
+ onLoad: handleLoad,
6213
+ onError: handleError,
6214
+ ...restImgProps,
6215
+ sx: {
6216
+ width: 1,
6217
+ height: aspectRatio ? "100%" : "auto",
6218
+ display: "block",
6219
+ objectFit: fit,
6220
+ objectPosition: position,
6221
+ opacity: status === "loaded" ? 1 : 0,
6222
+ transition: (theme) => theme.transitions.create("opacity", {
6223
+ duration: theme.transitions.duration.shorter
6224
+ }),
6225
+ ...aspectRatio && { position: "absolute", inset: 0 },
6226
+ ...imgSx
6227
+ }
6228
+ }
6229
+ ),
6230
+ withOverlay && !showError && /* @__PURE__ */ jsx44(
6231
+ Box5,
6232
+ {
6233
+ className: imageClasses.overlay,
6234
+ sx: {
6235
+ position: "absolute",
6236
+ inset: 0,
6237
+ pointerEvents: "none"
6238
+ },
6239
+ children: overlay
6240
+ }
6241
+ ),
6242
+ showError && (renderError ?? /* @__PURE__ */ jsx44(
6243
+ Box5,
6244
+ {
6245
+ className: imageClasses.overlay,
6246
+ sx: {
6247
+ position: "absolute",
6248
+ inset: 0,
6249
+ display: "flex",
6250
+ alignItems: "center",
6251
+ justifyContent: "center",
6252
+ bgcolor: (theme) => theme.vars.palette.grey[200],
6253
+ color: (theme) => theme.vars.palette.text.secondary,
6254
+ fontSize: 12,
6255
+ letterSpacing: 0.2
6256
+ },
6257
+ children: "Image unavailable"
6258
+ }
6259
+ ))
6260
+ ]
6261
+ }
6262
+ );
6263
+ });
6264
+
6059
6265
  // src/components/Upload/Upload.tsx
6060
6266
  import { useDropzone } from "react-dropzone";
6061
- import Box10 from "@mui/material/Box";
6267
+ import Box11 from "@mui/material/Box";
6062
6268
  import Stack3 from "@mui/material/Stack";
6063
6269
  import Button from "@mui/material/Button";
6064
6270
  import FormHelperText from "@mui/material/FormHelperText";
6065
6271
 
6066
6272
  // src/components/Upload/components/Placeholder.tsx
6067
6273
  import Stack2 from "@mui/material/Stack";
6068
- import Box5 from "@mui/material/Box";
6069
- import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
6274
+ import Box6 from "@mui/material/Box";
6275
+ import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
6070
6276
  var UploadPlaceholder = ({ hasError, ...rest }) => {
6071
- return /* @__PURE__ */ jsxs24(
6072
- Box5,
6277
+ return /* @__PURE__ */ jsxs25(
6278
+ Box6,
6073
6279
  {
6074
6280
  sx: {
6075
6281
  display: "flex",
@@ -6079,7 +6285,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6079
6285
  },
6080
6286
  ...rest,
6081
6287
  children: [
6082
- /* @__PURE__ */ jsx44(
6288
+ /* @__PURE__ */ jsx45(
6083
6289
  Icon,
6084
6290
  {
6085
6291
  icon: "CloudUpload",
@@ -6090,11 +6296,11 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6090
6296
  }
6091
6297
  }
6092
6298
  ),
6093
- /* @__PURE__ */ jsxs24(Stack2, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
6094
- /* @__PURE__ */ jsxs24(Box5, { sx: { typography: "h8" }, children: [
6299
+ /* @__PURE__ */ jsxs25(Stack2, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
6300
+ /* @__PURE__ */ jsxs25(Box6, { sx: { typography: "h8" }, children: [
6095
6301
  "Drag files here or",
6096
- /* @__PURE__ */ jsx44(
6097
- Box5,
6302
+ /* @__PURE__ */ jsx45(
6303
+ Box6,
6098
6304
  {
6099
6305
  component: "span",
6100
6306
  sx: {
@@ -6106,8 +6312,8 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6106
6312
  }
6107
6313
  )
6108
6314
  ] }),
6109
- /* @__PURE__ */ jsxs24(
6110
- Box5,
6315
+ /* @__PURE__ */ jsxs25(
6316
+ Box6,
6111
6317
  {
6112
6318
  sx: {
6113
6319
  typography: "bodyMd",
@@ -6128,7 +6334,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6128
6334
  };
6129
6335
 
6130
6336
  // src/components/Upload/components/RejectionFiles.tsx
6131
- import Box6 from "@mui/material/Box";
6337
+ import Box7 from "@mui/material/Box";
6132
6338
  import Paper from "@mui/material/Paper";
6133
6339
  import Typography2 from "@mui/material/Typography";
6134
6340
 
@@ -6161,12 +6367,12 @@ var fileData = (file) => {
6161
6367
  };
6162
6368
 
6163
6369
  // src/components/Upload/components/RejectionFiles.tsx
6164
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
6370
+ import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
6165
6371
  var RejectionFiles = ({ files }) => {
6166
6372
  if (!files.length) {
6167
6373
  return null;
6168
6374
  }
6169
- return /* @__PURE__ */ jsx45(
6375
+ return /* @__PURE__ */ jsx46(
6170
6376
  Paper,
6171
6377
  {
6172
6378
  variant: "outlined",
@@ -6181,13 +6387,13 @@ var RejectionFiles = ({ files }) => {
6181
6387
  },
6182
6388
  children: files.map(({ file, errors }) => {
6183
6389
  const { path, size } = fileData(file);
6184
- return /* @__PURE__ */ jsxs25(Box6, { sx: { my: 1 }, children: [
6185
- /* @__PURE__ */ jsxs25(Typography2, { variant: "subtitle2", noWrap: true, children: [
6390
+ return /* @__PURE__ */ jsxs26(Box7, { sx: { my: 1 }, children: [
6391
+ /* @__PURE__ */ jsxs26(Typography2, { variant: "subtitle2", noWrap: true, children: [
6186
6392
  path,
6187
6393
  " - ",
6188
6394
  size ? fData(size) : ""
6189
6395
  ] }),
6190
- errors.map((error2) => /* @__PURE__ */ jsxs25(Box6, { component: "span", sx: { typography: "caption" }, children: [
6396
+ errors.map((error2) => /* @__PURE__ */ jsxs26(Box7, { component: "span", sx: { typography: "caption" }, children: [
6191
6397
  "- ",
6192
6398
  error2.message
6193
6399
  ] }, error2.code))
@@ -6198,12 +6404,12 @@ var RejectionFiles = ({ files }) => {
6198
6404
  };
6199
6405
 
6200
6406
  // src/components/Upload/components/UploadProgress.tsx
6201
- import Box7 from "@mui/material/Box";
6407
+ import Box8 from "@mui/material/Box";
6202
6408
  import CircularProgress from "@mui/material/CircularProgress";
6203
- import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
6409
+ import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
6204
6410
  var UploadProgress = ({ progress: progress2 = 20 }) => {
6205
- return /* @__PURE__ */ jsxs26(
6206
- Box7,
6411
+ return /* @__PURE__ */ jsxs27(
6412
+ Box8,
6207
6413
  {
6208
6414
  sx: {
6209
6415
  display: "flex",
@@ -6213,8 +6419,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6213
6419
  height: "100%"
6214
6420
  },
6215
6421
  children: [
6216
- /* @__PURE__ */ jsxs26(Box7, { sx: { position: "relative", display: "inline-flex" }, children: [
6217
- /* @__PURE__ */ jsx46(
6422
+ /* @__PURE__ */ jsxs27(Box8, { sx: { position: "relative", display: "inline-flex" }, children: [
6423
+ /* @__PURE__ */ jsx47(
6218
6424
  CircularProgress,
6219
6425
  {
6220
6426
  variant: "determinate",
@@ -6227,7 +6433,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6227
6433
  }
6228
6434
  }
6229
6435
  ),
6230
- /* @__PURE__ */ jsx46(
6436
+ /* @__PURE__ */ jsx47(
6231
6437
  CircularProgress,
6232
6438
  {
6233
6439
  variant: "determinate",
@@ -6239,8 +6445,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6239
6445
  }
6240
6446
  }
6241
6447
  ),
6242
- /* @__PURE__ */ jsx46(
6243
- Box7,
6448
+ /* @__PURE__ */ jsx47(
6449
+ Box8,
6244
6450
  {
6245
6451
  sx: {
6246
6452
  top: 0,
@@ -6252,30 +6458,30 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6252
6458
  alignItems: "center",
6253
6459
  justifyContent: "center"
6254
6460
  },
6255
- children: /* @__PURE__ */ jsx46(Box7, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
6461
+ children: /* @__PURE__ */ jsx47(Box8, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
6256
6462
  }
6257
6463
  )
6258
6464
  ] }),
6259
- /* @__PURE__ */ jsx46(Box7, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
6465
+ /* @__PURE__ */ jsx47(Box8, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
6260
6466
  ]
6261
6467
  }
6262
6468
  );
6263
6469
  };
6264
6470
 
6265
6471
  // src/components/Upload/components/MultiFilePreview.tsx
6266
- import { useRef as useRef4 } from "react";
6267
- import Box9 from "@mui/material/Box";
6472
+ import { useRef as useRef5 } from "react";
6473
+ import Box10 from "@mui/material/Box";
6268
6474
  import IconButton2 from "@mui/material/IconButton";
6269
6475
 
6270
6476
  // src/components/Upload/components/SingleFilePreview.tsx
6271
- import Box8 from "@mui/material/Box";
6477
+ import Box9 from "@mui/material/Box";
6272
6478
  import IconButton from "@mui/material/IconButton";
6273
- import { jsx as jsx47 } from "react/jsx-runtime";
6479
+ import { jsx as jsx48 } from "react/jsx-runtime";
6274
6480
  var SingleFilePreview = ({ file }) => {
6275
6481
  const fileName = typeof file === "string" ? file : file.name;
6276
6482
  const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
6277
- const renderImg = /* @__PURE__ */ jsx47(
6278
- Box8,
6483
+ const renderImg = /* @__PURE__ */ jsx48(
6484
+ Box9,
6279
6485
  {
6280
6486
  component: "img",
6281
6487
  alt: fileName,
@@ -6288,8 +6494,8 @@ var SingleFilePreview = ({ file }) => {
6288
6494
  }
6289
6495
  }
6290
6496
  );
6291
- return /* @__PURE__ */ jsx47(
6292
- Box8,
6497
+ return /* @__PURE__ */ jsx48(
6498
+ Box9,
6293
6499
  {
6294
6500
  sx: {
6295
6501
  p: 1,
@@ -6304,7 +6510,7 @@ var SingleFilePreview = ({ file }) => {
6304
6510
  );
6305
6511
  };
6306
6512
  var DeleteButton = ({ sx, ...rest }) => {
6307
- return /* @__PURE__ */ jsx47(
6513
+ return /* @__PURE__ */ jsx48(
6308
6514
  IconButton,
6309
6515
  {
6310
6516
  size: "small",
@@ -6323,15 +6529,15 @@ var DeleteButton = ({ sx, ...rest }) => {
6323
6529
  ...sx
6324
6530
  },
6325
6531
  ...rest,
6326
- children: /* @__PURE__ */ jsx47(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
6532
+ children: /* @__PURE__ */ jsx48(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
6327
6533
  }
6328
6534
  );
6329
6535
  };
6330
6536
 
6331
6537
  // src/components/Upload/components/MultiFilePreview.tsx
6332
- import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
6538
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
6333
6539
  var MultiFilePreview = ({ files, onRemove }) => {
6334
- const scrollRef = useRef4(null);
6540
+ const scrollRef = useRef5(null);
6335
6541
  const handleScroll = (direction) => {
6336
6542
  if (scrollRef.current) {
6337
6543
  const scrollAmount = 300;
@@ -6343,8 +6549,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6343
6549
  }
6344
6550
  };
6345
6551
  const showNavigation = files.length > 2;
6346
- return /* @__PURE__ */ jsxs27(Box9, { sx: { position: "relative", width: 1 }, children: [
6347
- showNavigation && /* @__PURE__ */ jsx48(
6552
+ return /* @__PURE__ */ jsxs28(Box10, { sx: { position: "relative", width: 1 }, children: [
6553
+ showNavigation && /* @__PURE__ */ jsx49(
6348
6554
  IconButton2,
6349
6555
  {
6350
6556
  size: "small",
@@ -6361,11 +6567,11 @@ var MultiFilePreview = ({ files, onRemove }) => {
6361
6567
  bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
6362
6568
  }
6363
6569
  },
6364
- children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowLeft", width: 20 })
6570
+ children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowLeft", width: 20 })
6365
6571
  }
6366
6572
  ),
6367
- /* @__PURE__ */ jsx48(
6368
- Box9,
6573
+ /* @__PURE__ */ jsx49(
6574
+ Box10,
6369
6575
  {
6370
6576
  ref: scrollRef,
6371
6577
  sx: {
@@ -6383,8 +6589,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6383
6589
  children: files.map((file, index) => {
6384
6590
  const fileName = typeof file === "string" ? file : file.name;
6385
6591
  const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
6386
- return /* @__PURE__ */ jsxs27(
6387
- Box9,
6592
+ return /* @__PURE__ */ jsxs28(
6593
+ Box10,
6388
6594
  {
6389
6595
  sx: {
6390
6596
  position: "relative",
@@ -6395,8 +6601,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6395
6601
  flexShrink: 0
6396
6602
  },
6397
6603
  children: [
6398
- /* @__PURE__ */ jsx48(
6399
- Box9,
6604
+ /* @__PURE__ */ jsx49(
6605
+ Box10,
6400
6606
  {
6401
6607
  component: "img",
6402
6608
  alt: fileName,
@@ -6409,7 +6615,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
6409
6615
  }
6410
6616
  }
6411
6617
  ),
6412
- onRemove && /* @__PURE__ */ jsx48(
6618
+ onRemove && /* @__PURE__ */ jsx49(
6413
6619
  DeleteButton,
6414
6620
  {
6415
6621
  onClick: (e) => {
@@ -6425,7 +6631,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
6425
6631
  })
6426
6632
  }
6427
6633
  ),
6428
- showNavigation && /* @__PURE__ */ jsx48(
6634
+ showNavigation && /* @__PURE__ */ jsx49(
6429
6635
  IconButton2,
6430
6636
  {
6431
6637
  size: "small",
@@ -6442,14 +6648,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
6442
6648
  bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
6443
6649
  }
6444
6650
  },
6445
- children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowRight", width: 20 })
6651
+ children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowRight", width: 20 })
6446
6652
  }
6447
6653
  )
6448
6654
  ] });
6449
6655
  };
6450
6656
 
6451
6657
  // src/components/Upload/Upload.tsx
6452
- import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
6658
+ import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
6453
6659
  var Upload = ({
6454
6660
  sx,
6455
6661
  value,
@@ -6476,20 +6682,20 @@ var Upload = ({
6476
6682
  const hasError = isDragReject || !!error2;
6477
6683
  const renderContent = () => {
6478
6684
  if (isUploading) {
6479
- return /* @__PURE__ */ jsx49(UploadProgress, { progress: uploadProgress });
6685
+ return /* @__PURE__ */ jsx50(UploadProgress, { progress: uploadProgress });
6480
6686
  }
6481
6687
  if (hasFile) {
6482
- return /* @__PURE__ */ jsx49(SingleFilePreview, { file: value });
6688
+ return /* @__PURE__ */ jsx50(SingleFilePreview, { file: value });
6483
6689
  }
6484
6690
  if (hasFiles) {
6485
- return /* @__PURE__ */ jsx49(MultiFilePreview, { files: value, onRemove });
6691
+ return /* @__PURE__ */ jsx50(MultiFilePreview, { files: value, onRemove });
6486
6692
  }
6487
- return /* @__PURE__ */ jsx49(UploadPlaceholder, { hasError });
6693
+ return /* @__PURE__ */ jsx50(UploadPlaceholder, { hasError });
6488
6694
  };
6489
6695
  const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
6490
- return /* @__PURE__ */ jsxs28(Box10, { sx: { width: 1, position: "relative", ...sx }, children: [
6491
- /* @__PURE__ */ jsxs28(
6492
- Box10,
6696
+ return /* @__PURE__ */ jsxs29(Box11, { sx: { width: 1, position: "relative", ...sx }, children: [
6697
+ /* @__PURE__ */ jsxs29(
6698
+ Box11,
6493
6699
  {
6494
6700
  ...shouldShowDropzone ? getRootProps() : {},
6495
6701
  sx: {
@@ -6527,37 +6733,37 @@ var Upload = ({
6527
6733
  }
6528
6734
  },
6529
6735
  children: [
6530
- shouldShowDropzone && /* @__PURE__ */ jsx49("input", { ...getInputProps() }),
6736
+ shouldShowDropzone && /* @__PURE__ */ jsx50("input", { ...getInputProps() }),
6531
6737
  renderContent()
6532
6738
  ]
6533
6739
  }
6534
6740
  ),
6535
- hasFile && !isUploading && /* @__PURE__ */ jsx49(DeleteButton, { onClick: onDelete }),
6536
- hasFiles && /* @__PURE__ */ jsxs28(Stack3, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
6537
- onRemoveAll && /* @__PURE__ */ jsx49(
6741
+ hasFile && !isUploading && /* @__PURE__ */ jsx50(DeleteButton, { onClick: onDelete }),
6742
+ hasFiles && /* @__PURE__ */ jsxs29(Stack3, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
6743
+ onRemoveAll && /* @__PURE__ */ jsx50(
6538
6744
  Button,
6539
6745
  {
6540
6746
  variant: "outlined",
6541
6747
  color: "inherit",
6542
6748
  size: "small",
6543
6749
  onClick: onRemoveAll,
6544
- startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
6750
+ startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
6545
6751
  children: "Remove all"
6546
6752
  }
6547
6753
  ),
6548
- onUpload && /* @__PURE__ */ jsx49(
6754
+ onUpload && /* @__PURE__ */ jsx50(
6549
6755
  Button,
6550
6756
  {
6551
6757
  variant: "contained",
6552
6758
  size: "small",
6553
6759
  onClick: onUpload,
6554
- startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
6760
+ startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
6555
6761
  children: "Upload files"
6556
6762
  }
6557
6763
  )
6558
6764
  ] }),
6559
- helperText && /* @__PURE__ */ jsx49(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
6560
- /* @__PURE__ */ jsx49(RejectionFiles, { files: [...fileRejections] })
6765
+ helperText && /* @__PURE__ */ jsx50(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
6766
+ /* @__PURE__ */ jsx50(RejectionFiles, { files: [...fileRejections] })
6561
6767
  ] });
6562
6768
  };
6563
6769
 
@@ -6565,16 +6771,16 @@ var Upload = ({
6565
6771
  import {
6566
6772
  FormProvider as RHFForm
6567
6773
  } from "react-hook-form";
6568
- import Box11 from "@mui/material/Box";
6569
- import { jsx as jsx50 } from "react/jsx-runtime";
6774
+ import Box12 from "@mui/material/Box";
6775
+ import { jsx as jsx51 } from "react/jsx-runtime";
6570
6776
  var Form = ({
6571
6777
  children,
6572
6778
  onSubmit,
6573
6779
  methods,
6574
6780
  ...rest
6575
6781
  }) => {
6576
- return /* @__PURE__ */ jsx50(RHFForm, { ...methods, children: /* @__PURE__ */ jsx50(
6577
- Box11,
6782
+ return /* @__PURE__ */ jsx51(RHFForm, { ...methods, children: /* @__PURE__ */ jsx51(
6783
+ Box12,
6578
6784
  {
6579
6785
  component: "form",
6580
6786
  onSubmit: (e) => {
@@ -6594,7 +6800,7 @@ var Form = ({
6594
6800
  // src/components/HookForm/RHFSwitch.tsx
6595
6801
  import { Controller, useFormContext } from "react-hook-form";
6596
6802
  import Stack4 from "@mui/material/Stack";
6597
- import Box12 from "@mui/material/Box";
6803
+ import Box13 from "@mui/material/Box";
6598
6804
  import Typography3 from "@mui/material/Typography";
6599
6805
  import Switch from "@mui/material/Switch";
6600
6806
  import FormGroup from "@mui/material/FormGroup";
@@ -6602,7 +6808,7 @@ import FormLabel from "@mui/material/FormLabel";
6602
6808
  import FormControl from "@mui/material/FormControl";
6603
6809
  import FormHelperText2 from "@mui/material/FormHelperText";
6604
6810
  import FormControlLabel from "@mui/material/FormControlLabel";
6605
- import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
6811
+ import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
6606
6812
  var RHFSwitch = ({
6607
6813
  name,
6608
6814
  description,
@@ -6614,16 +6820,16 @@ var RHFSwitch = ({
6614
6820
  }) => {
6615
6821
  const { control } = useFormContext();
6616
6822
  const baseAriaLabel = `Switch ${name}`;
6617
- return /* @__PURE__ */ jsx51(
6823
+ return /* @__PURE__ */ jsx52(
6618
6824
  Controller,
6619
6825
  {
6620
6826
  name,
6621
6827
  control,
6622
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs29(Box12, { sx: slotProps?.wrap, children: [
6623
- /* @__PURE__ */ jsx51(
6828
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs30(Box13, { sx: slotProps?.wrap, children: [
6829
+ /* @__PURE__ */ jsx52(
6624
6830
  FormControlLabel,
6625
6831
  {
6626
- control: /* @__PURE__ */ jsx51(
6832
+ control: /* @__PURE__ */ jsx52(
6627
6833
  Switch,
6628
6834
  {
6629
6835
  ...field,
@@ -6638,9 +6844,9 @@ var RHFSwitch = ({
6638
6844
  }
6639
6845
  }
6640
6846
  ),
6641
- label: /* @__PURE__ */ jsxs29(Stack4, { children: [
6642
- /* @__PURE__ */ jsx51(Typography3, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
6643
- description && /* @__PURE__ */ jsx51(Typography3, { variant: "body2", color: "textBody", children: description })
6847
+ label: /* @__PURE__ */ jsxs30(Stack4, { children: [
6848
+ /* @__PURE__ */ jsx52(Typography3, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
6849
+ description && /* @__PURE__ */ jsx52(Typography3, { variant: "body2", color: "textBody", children: description })
6644
6850
  ] }),
6645
6851
  sx: {
6646
6852
  alignItems: description ? "flex-start" : "center",
@@ -6649,7 +6855,7 @@ var RHFSwitch = ({
6649
6855
  ...other
6650
6856
  }
6651
6857
  ),
6652
- (!!error2 || helperText) && /* @__PURE__ */ jsx51(
6858
+ (!!error2 || helperText) && /* @__PURE__ */ jsx52(
6653
6859
  FormHelperText2,
6654
6860
  {
6655
6861
  error: !!error2,
@@ -6672,19 +6878,19 @@ var RHFMultiSwitch = ({
6672
6878
  }) => {
6673
6879
  const { control } = useFormContext();
6674
6880
  const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
6675
- return /* @__PURE__ */ jsx51(
6881
+ return /* @__PURE__ */ jsx52(
6676
6882
  Controller,
6677
6883
  {
6678
6884
  name,
6679
6885
  control,
6680
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs29(
6886
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs30(
6681
6887
  FormControl,
6682
6888
  {
6683
6889
  component: "fieldset",
6684
6890
  sx: slotProps?.formControl?.sx,
6685
6891
  ...slotProps?.formControl,
6686
6892
  children: [
6687
- label && /* @__PURE__ */ jsx51(
6893
+ label && /* @__PURE__ */ jsx52(
6688
6894
  FormLabel,
6689
6895
  {
6690
6896
  component: "legend",
@@ -6693,12 +6899,12 @@ var RHFMultiSwitch = ({
6693
6899
  children: label
6694
6900
  }
6695
6901
  ),
6696
- /* @__PURE__ */ jsx51(FormGroup, { ...other, children: options.map((option) => {
6902
+ /* @__PURE__ */ jsx52(FormGroup, { ...other, children: options.map((option) => {
6697
6903
  const itemAriaLabel = option.label || `Option ${option.value}`;
6698
- return /* @__PURE__ */ jsx51(
6904
+ return /* @__PURE__ */ jsx52(
6699
6905
  FormControlLabel,
6700
6906
  {
6701
- control: /* @__PURE__ */ jsx51(
6907
+ control: /* @__PURE__ */ jsx52(
6702
6908
  Switch,
6703
6909
  {
6704
6910
  checked: (field.value || []).includes(option.value),
@@ -6721,7 +6927,7 @@ var RHFMultiSwitch = ({
6721
6927
  option.value
6722
6928
  );
6723
6929
  }) }),
6724
- (!!error2 || helperText) && /* @__PURE__ */ jsx51(FormHelperText2, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
6930
+ (!!error2 || helperText) && /* @__PURE__ */ jsx52(FormHelperText2, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
6725
6931
  ]
6726
6932
  }
6727
6933
  )
@@ -6731,10 +6937,10 @@ var RHFMultiSwitch = ({
6731
6937
 
6732
6938
  // src/components/HookForm/RHFUpload.tsx
6733
6939
  import { Controller as Controller2, useFormContext as useFormContext2 } from "react-hook-form";
6734
- import { jsx as jsx52 } from "react/jsx-runtime";
6940
+ import { jsx as jsx53 } from "react/jsx-runtime";
6735
6941
  var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6736
6942
  const { control, setValue } = useFormContext2();
6737
- return /* @__PURE__ */ jsx52(
6943
+ return /* @__PURE__ */ jsx53(
6738
6944
  Controller2,
6739
6945
  {
6740
6946
  name,
@@ -6762,7 +6968,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6762
6968
  const onRemoveAll = () => {
6763
6969
  setValue(name, [], { shouldValidate: true });
6764
6970
  };
6765
- return /* @__PURE__ */ jsx52(
6971
+ return /* @__PURE__ */ jsx53(
6766
6972
  Upload,
6767
6973
  {
6768
6974
  multiple,
@@ -6786,18 +6992,18 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6786
6992
  import { Controller as Controller3, useFormContext as useFormContext3 } from "react-hook-form";
6787
6993
 
6788
6994
  // src/components/OTPInput/index.tsx
6789
- import { useRef as useRef5, useState as useState9 } from "react";
6995
+ import { useRef as useRef6, useState as useState10 } from "react";
6790
6996
  import { useTheme as useTheme2 } from "@mui/material/styles";
6791
- import Box13 from "@mui/material/Box";
6997
+ import Box14 from "@mui/material/Box";
6792
6998
  import FormHelperText3 from "@mui/material/FormHelperText";
6793
6999
  import { inputBaseClasses as inputBaseClasses3 } from "@mui/material/InputBase";
6794
7000
  import TextField from "@mui/material/TextField";
6795
- import { Fragment, jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
7001
+ import { Fragment, jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
6796
7002
  var OTPInput = (props) => {
6797
7003
  const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
6798
7004
  const theme = useTheme2();
6799
- const [otp, setOtp] = useState9(Array(length).fill(""));
6800
- const inputsRef = useRef5([]);
7005
+ const [otp, setOtp] = useState10(Array(length).fill(""));
7006
+ const inputsRef = useRef6([]);
6801
7007
  const handleChange = (value, index) => {
6802
7008
  if (!/^[0-9]$/.test(value) && value !== "") return;
6803
7009
  const newOtp = [...otp];
@@ -6860,18 +7066,19 @@ var OTPInput = (props) => {
6860
7066
  onComplete?.(newOtp.join(""));
6861
7067
  }
6862
7068
  };
6863
- return /* @__PURE__ */ jsxs30(Fragment, { children: [
6864
- /* @__PURE__ */ jsx53(Box13, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx53(
6865
- Box13,
7069
+ return /* @__PURE__ */ jsxs31(Fragment, { children: [
7070
+ /* @__PURE__ */ jsx54(Box14, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx54(
7071
+ Box14,
6866
7072
  {
6867
7073
  display: "flex",
6868
7074
  alignItems: "center",
6869
7075
  sx: {
7076
+ width: "100%",
6870
7077
  "&:not(:last-of-type)": {
6871
7078
  mr: 1.5
6872
7079
  }
6873
7080
  },
6874
- children: /* @__PURE__ */ jsx53(
7081
+ children: /* @__PURE__ */ jsx54(
6875
7082
  TextField,
6876
7083
  {
6877
7084
  size: "medium",
@@ -6954,21 +7161,21 @@ var OTPInput = (props) => {
6954
7161
  },
6955
7162
  index
6956
7163
  )) }),
6957
- error2 && /* @__PURE__ */ jsx53(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
7164
+ error2 && /* @__PURE__ */ jsx54(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
6958
7165
  ] });
6959
7166
  };
6960
7167
  var OTPInput_default = OTPInput;
6961
7168
 
6962
7169
  // src/components/HookForm/RHFOTPInput.tsx
6963
- import { jsx as jsx54 } from "react/jsx-runtime";
7170
+ import { jsx as jsx55 } from "react/jsx-runtime";
6964
7171
  var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
6965
7172
  const { control, setValue } = useFormContext3();
6966
- return /* @__PURE__ */ jsx54(
7173
+ return /* @__PURE__ */ jsx55(
6967
7174
  Controller3,
6968
7175
  {
6969
7176
  name,
6970
7177
  control,
6971
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx54(
7178
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
6972
7179
  OTPInput_default,
6973
7180
  {
6974
7181
  length,
@@ -6988,16 +7195,16 @@ import { Controller as Controller4, useFormContext as useFormContext4 } from "re
6988
7195
  import IconButton3 from "@mui/material/IconButton";
6989
7196
  import InputAdornment from "@mui/material/InputAdornment";
6990
7197
  import TextField2 from "@mui/material/TextField";
6991
- import { jsx as jsx55 } from "react/jsx-runtime";
7198
+ import { jsx as jsx56 } from "react/jsx-runtime";
6992
7199
  var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
6993
7200
  const { control } = useFormContext4();
6994
7201
  const passwordVisibility = useBoolean();
6995
- return /* @__PURE__ */ jsx55(
7202
+ return /* @__PURE__ */ jsx56(
6996
7203
  Controller4,
6997
7204
  {
6998
7205
  name,
6999
7206
  control,
7000
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
7207
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx56(
7001
7208
  TextField2,
7002
7209
  {
7003
7210
  ...field,
@@ -7018,7 +7225,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
7018
7225
  input: {
7019
7226
  ...slotProps?.input,
7020
7227
  ...type === "password" && {
7021
- endAdornment: /* @__PURE__ */ jsx55(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx55(IconButton3, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx55(
7228
+ endAdornment: /* @__PURE__ */ jsx56(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx56(IconButton3, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx56(
7022
7229
  Icon,
7023
7230
  {
7024
7231
  icon: passwordVisibility.value ? "EyeClosed" : "Eye",
@@ -7045,7 +7252,7 @@ import FormLabel2 from "@mui/material/FormLabel";
7045
7252
  import RadioGroup from "@mui/material/RadioGroup";
7046
7253
  import FormControl2 from "@mui/material/FormControl";
7047
7254
  import FormHelperText4 from "@mui/material/FormHelperText";
7048
- import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
7255
+ import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
7049
7256
  var RHFRadioGroup = ({
7050
7257
  name,
7051
7258
  label,
@@ -7057,13 +7264,13 @@ var RHFRadioGroup = ({
7057
7264
  const { control } = useFormContext5();
7058
7265
  const labelledby = `${name}-radio-buttons-group-label`;
7059
7266
  const ariaLabel = (val) => `Radio ${val}`;
7060
- return /* @__PURE__ */ jsx56(
7267
+ return /* @__PURE__ */ jsx57(
7061
7268
  Controller5,
7062
7269
  {
7063
7270
  name,
7064
7271
  control,
7065
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
7066
- label && /* @__PURE__ */ jsx56(
7272
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
7273
+ label && /* @__PURE__ */ jsx57(
7067
7274
  FormLabel2,
7068
7275
  {
7069
7276
  id: labelledby,
@@ -7073,11 +7280,11 @@ var RHFRadioGroup = ({
7073
7280
  children: label
7074
7281
  }
7075
7282
  ),
7076
- /* @__PURE__ */ jsx56(RadioGroup, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx56(
7283
+ /* @__PURE__ */ jsx57(RadioGroup, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx57(
7077
7284
  FormControlLabel2,
7078
7285
  {
7079
7286
  value: option.value,
7080
- control: /* @__PURE__ */ jsx56(
7287
+ control: /* @__PURE__ */ jsx57(
7081
7288
  Radio,
7082
7289
  {
7083
7290
  ...slotProps?.radio,
@@ -7089,9 +7296,9 @@ var RHFRadioGroup = ({
7089
7296
  }
7090
7297
  }
7091
7298
  ),
7092
- label: /* @__PURE__ */ jsxs31(Stack5, { children: [
7093
- /* @__PURE__ */ jsx56(Typography4, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7094
- option?.description && /* @__PURE__ */ jsx56(Typography4, { variant: "body2", color: "textBody", children: option?.description })
7299
+ label: /* @__PURE__ */ jsxs32(Stack5, { children: [
7300
+ /* @__PURE__ */ jsx57(Typography4, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7301
+ option?.description && /* @__PURE__ */ jsx57(Typography4, { variant: "body2", color: "textBody", children: option?.description })
7095
7302
  ] }),
7096
7303
  sx: {
7097
7304
  alignItems: option?.description ? "flex-start" : "center"
@@ -7099,7 +7306,7 @@ var RHFRadioGroup = ({
7099
7306
  },
7100
7307
  option.value
7101
7308
  )) }),
7102
- (!!error2 || helperText) && /* @__PURE__ */ jsx56(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
7309
+ (!!error2 || helperText) && /* @__PURE__ */ jsx57(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
7103
7310
  ] })
7104
7311
  }
7105
7312
  );
@@ -7109,7 +7316,7 @@ var RHFRadioGroup = ({
7109
7316
  import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
7110
7317
  import TextField3 from "@mui/material/TextField";
7111
7318
  import Autocomplete from "@mui/material/Autocomplete";
7112
- import { jsx as jsx57 } from "react/jsx-runtime";
7319
+ import { jsx as jsx58 } from "react/jsx-runtime";
7113
7320
  var RHFAutocomplete = ({
7114
7321
  name,
7115
7322
  label,
@@ -7120,12 +7327,12 @@ var RHFAutocomplete = ({
7120
7327
  ...other
7121
7328
  }) => {
7122
7329
  const { control, setValue } = useFormContext6();
7123
- return /* @__PURE__ */ jsx57(
7330
+ return /* @__PURE__ */ jsx58(
7124
7331
  Controller6,
7125
7332
  {
7126
7333
  name,
7127
7334
  control,
7128
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx57(
7335
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx58(
7129
7336
  Autocomplete,
7130
7337
  {
7131
7338
  ...field,
@@ -7134,7 +7341,7 @@ var RHFAutocomplete = ({
7134
7341
  setValue(name, newValue, { shouldValidate: true });
7135
7342
  handleChange?.(newValue);
7136
7343
  },
7137
- renderInput: (params) => /* @__PURE__ */ jsx57(
7344
+ renderInput: (params) => /* @__PURE__ */ jsx58(
7138
7345
  TextField3,
7139
7346
  {
7140
7347
  label,
@@ -7155,7 +7362,7 @@ var RHFAutocomplete = ({
7155
7362
  // src/components/HookForm/RHFCheckbox.tsx
7156
7363
  import { Controller as Controller7, useFormContext as useFormContext7 } from "react-hook-form";
7157
7364
  import Stack6 from "@mui/material/Stack";
7158
- import Box14 from "@mui/material/Box";
7365
+ import Box15 from "@mui/material/Box";
7159
7366
  import Typography5 from "@mui/material/Typography";
7160
7367
  import Checkbox from "@mui/material/Checkbox";
7161
7368
  import FormGroup2 from "@mui/material/FormGroup";
@@ -7163,7 +7370,7 @@ import FormLabel3 from "@mui/material/FormLabel";
7163
7370
  import FormControl3 from "@mui/material/FormControl";
7164
7371
  import FormHelperText5 from "@mui/material/FormHelperText";
7165
7372
  import FormControlLabel3 from "@mui/material/FormControlLabel";
7166
- import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
7373
+ import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
7167
7374
  var RHFCheckbox = ({
7168
7375
  name,
7169
7376
  description,
@@ -7175,16 +7382,16 @@ var RHFCheckbox = ({
7175
7382
  }) => {
7176
7383
  const { control } = useFormContext7();
7177
7384
  const baseAriaLabel = `Checkbox for ${name}`;
7178
- return /* @__PURE__ */ jsx58(
7385
+ return /* @__PURE__ */ jsx59(
7179
7386
  Controller7,
7180
7387
  {
7181
7388
  name,
7182
7389
  control,
7183
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(Box14, { sx: slotProps?.wrap, children: [
7184
- /* @__PURE__ */ jsx58(
7390
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(Box15, { sx: slotProps?.wrap, children: [
7391
+ /* @__PURE__ */ jsx59(
7185
7392
  FormControlLabel3,
7186
7393
  {
7187
- control: /* @__PURE__ */ jsx58(
7394
+ control: /* @__PURE__ */ jsx59(
7188
7395
  Checkbox,
7189
7396
  {
7190
7397
  ...field,
@@ -7199,9 +7406,9 @@ var RHFCheckbox = ({
7199
7406
  }
7200
7407
  }
7201
7408
  ),
7202
- label: /* @__PURE__ */ jsxs32(Stack6, { children: [
7203
- /* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
7204
- description && /* @__PURE__ */ jsx58(Typography5, { variant: "body2", color: "textBody", children: description })
7409
+ label: /* @__PURE__ */ jsxs33(Stack6, { children: [
7410
+ /* @__PURE__ */ jsx59(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
7411
+ description && /* @__PURE__ */ jsx59(Typography5, { variant: "body2", color: "textBody", children: description })
7205
7412
  ] }),
7206
7413
  sx: {
7207
7414
  alignItems: description ? "flex-start" : "center",
@@ -7210,7 +7417,7 @@ var RHFCheckbox = ({
7210
7417
  ...other
7211
7418
  }
7212
7419
  ),
7213
- (!!error2 || helperText) && /* @__PURE__ */ jsx58(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
7420
+ (!!error2 || helperText) && /* @__PURE__ */ jsx59(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
7214
7421
  ] })
7215
7422
  }
7216
7423
  );
@@ -7226,13 +7433,13 @@ var RHFMultiCheckbox = ({
7226
7433
  }) => {
7227
7434
  const { control } = useFormContext7();
7228
7435
  const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
7229
- return /* @__PURE__ */ jsx58(
7436
+ return /* @__PURE__ */ jsx59(
7230
7437
  Controller7,
7231
7438
  {
7232
7439
  name,
7233
7440
  control,
7234
7441
  defaultValue: [],
7235
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(
7442
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(
7236
7443
  FormControl3,
7237
7444
  {
7238
7445
  component: "fieldset",
@@ -7240,7 +7447,7 @@ var RHFMultiCheckbox = ({
7240
7447
  sx: slotProps?.formControl?.sx,
7241
7448
  ...slotProps?.formControl,
7242
7449
  children: [
7243
- label && /* @__PURE__ */ jsx58(
7450
+ label && /* @__PURE__ */ jsx59(
7244
7451
  FormLabel3,
7245
7452
  {
7246
7453
  component: "legend",
@@ -7249,12 +7456,12 @@ var RHFMultiCheckbox = ({
7249
7456
  children: label
7250
7457
  }
7251
7458
  ),
7252
- /* @__PURE__ */ jsx58(FormGroup2, { row, ...other, children: options.map((option) => {
7459
+ /* @__PURE__ */ jsx59(FormGroup2, { row, ...other, children: options.map((option) => {
7253
7460
  const itemAriaLabel = option.label || `Option ${option.value}`;
7254
- return /* @__PURE__ */ jsx58(
7461
+ return /* @__PURE__ */ jsx59(
7255
7462
  FormControlLabel3,
7256
7463
  {
7257
- control: /* @__PURE__ */ jsx58(
7464
+ control: /* @__PURE__ */ jsx59(
7258
7465
  Checkbox,
7259
7466
  {
7260
7467
  checked: (field.value || []).includes(option.value),
@@ -7272,9 +7479,9 @@ var RHFMultiCheckbox = ({
7272
7479
  }
7273
7480
  }
7274
7481
  ),
7275
- label: /* @__PURE__ */ jsxs32(Stack6, { children: [
7276
- /* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7277
- option?.description && /* @__PURE__ */ jsx58(Typography5, { variant: "body2", color: "textBody", children: option?.description })
7482
+ label: /* @__PURE__ */ jsxs33(Stack6, { children: [
7483
+ /* @__PURE__ */ jsx59(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7484
+ option?.description && /* @__PURE__ */ jsx59(Typography5, { variant: "body2", color: "textBody", children: option?.description })
7278
7485
  ] }),
7279
7486
  sx: {
7280
7487
  alignItems: option?.description ? "flex-start" : "center"
@@ -7283,7 +7490,7 @@ var RHFMultiCheckbox = ({
7283
7490
  option.value
7284
7491
  );
7285
7492
  }) }),
7286
- (!!error2 || helperText) && /* @__PURE__ */ jsx58(
7493
+ (!!error2 || helperText) && /* @__PURE__ */ jsx59(
7287
7494
  FormHelperText5,
7288
7495
  {
7289
7496
  sx: { mx: 0, ...slotProps?.formHelperText?.sx },
@@ -7313,29 +7520,29 @@ var Field = {
7313
7520
  // src/components/CopyButton/index.tsx
7314
7521
  import Tooltip from "@mui/material/Tooltip";
7315
7522
  import IconButton4 from "@mui/material/IconButton";
7316
- import { jsx as jsx59 } from "react/jsx-runtime";
7523
+ import { jsx as jsx60 } from "react/jsx-runtime";
7317
7524
  var CopyButton = ({ text: text2, size = "small" }) => {
7318
7525
  const { copy, isCopied } = useCopyToClipboard();
7319
- return /* @__PURE__ */ jsx59(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx59(
7526
+ return /* @__PURE__ */ jsx60(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx60(
7320
7527
  IconButton4,
7321
7528
  {
7322
7529
  size,
7323
7530
  onClick: () => copy(text2),
7324
7531
  "aria-label": "copy token",
7325
7532
  sx: { color: "icon.black" },
7326
- children: /* @__PURE__ */ jsx59(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
7533
+ children: /* @__PURE__ */ jsx60(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
7327
7534
  }
7328
7535
  ) });
7329
7536
  };
7330
7537
 
7331
7538
  // src/components/LoadingScreen/index.tsx
7332
7539
  import Portal from "@mui/material/Portal";
7333
- import Box15 from "@mui/material/Box";
7540
+ import Box16 from "@mui/material/Box";
7334
7541
  import LinearProgress from "@mui/material/LinearProgress";
7335
- import { jsx as jsx60 } from "react/jsx-runtime";
7542
+ import { jsx as jsx61 } from "react/jsx-runtime";
7336
7543
  var LoadingScreen = ({ portal, sx, ...rest }) => {
7337
- const content = /* @__PURE__ */ jsx60(
7338
- Box15,
7544
+ const content = /* @__PURE__ */ jsx61(
7545
+ Box16,
7339
7546
  {
7340
7547
  sx: {
7341
7548
  px: 5,
@@ -7348,17 +7555,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
7348
7555
  ...sx
7349
7556
  },
7350
7557
  ...rest,
7351
- children: /* @__PURE__ */ jsx60(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
7558
+ children: /* @__PURE__ */ jsx61(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
7352
7559
  }
7353
7560
  );
7354
7561
  if (portal) {
7355
- return /* @__PURE__ */ jsx60(Portal, { children: content });
7562
+ return /* @__PURE__ */ jsx61(Portal, { children: content });
7356
7563
  }
7357
7564
  return content;
7358
7565
  };
7359
7566
  var SplashScreen = ({ portal, sx, ...rest }) => {
7360
- const content = /* @__PURE__ */ jsx60(
7361
- Box15,
7567
+ const content = /* @__PURE__ */ jsx61(
7568
+ Box16,
7362
7569
  {
7363
7570
  sx: {
7364
7571
  right: 0,
@@ -7374,11 +7581,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
7374
7581
  ...sx
7375
7582
  },
7376
7583
  ...rest,
7377
- children: /* @__PURE__ */ jsx60(AnimatedLogo, {})
7584
+ children: /* @__PURE__ */ jsx61(AnimatedLogo, {})
7378
7585
  }
7379
7586
  );
7380
7587
  if (portal) {
7381
- return /* @__PURE__ */ jsx60(Portal, { children: content });
7588
+ return /* @__PURE__ */ jsx61(Portal, { children: content });
7382
7589
  }
7383
7590
  return content;
7384
7591
  };
@@ -7397,6 +7604,7 @@ export {
7397
7604
  Field,
7398
7605
  Form,
7399
7606
  Icon,
7607
+ Image,
7400
7608
  InfoCircleFill,
7401
7609
  InfoCircleOutline,
7402
7610
  KeyCommand,