@undefine-ui/design-system 2.11.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
@@ -622,6 +622,82 @@ var useSetState = (initialState) => {
622
622
  return memoizedValue;
623
623
  };
624
624
 
625
+ // src/hooks/useCountdown.tsx
626
+ import { useRef, useState as useState6, useEffect as useEffect2, useCallback as useCallback6 } from "react";
627
+ var useCountdownDate = (date) => {
628
+ const targetTime = typeof date === "number" ? date : typeof date === "string" ? new Date(date).valueOf() : date.valueOf();
629
+ const [countdown, setCountdown] = useState6({
630
+ days: "00",
631
+ hours: "00",
632
+ minutes: "00",
633
+ seconds: "00"
634
+ });
635
+ const setNewTime = useCallback6(() => {
636
+ const now = Date.now();
637
+ const distanceToNow = targetTime - now;
638
+ if (distanceToNow <= 0) {
639
+ setCountdown({
640
+ days: "00",
641
+ hours: "00",
642
+ minutes: "00",
643
+ seconds: "00"
644
+ });
645
+ return;
646
+ }
647
+ const getDays = Math.floor(distanceToNow / (1e3 * 60 * 60 * 24));
648
+ const getHours = `0${Math.floor(distanceToNow % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60))}`.slice(-2);
649
+ const getMinutes = `0${Math.floor(distanceToNow % (1e3 * 60 * 60) / (1e3 * 60))}`.slice(-2);
650
+ const getSeconds = `0${Math.floor(distanceToNow % (1e3 * 60) / 1e3)}`.slice(-2);
651
+ setCountdown({
652
+ days: getDays < 10 ? `0${getDays}` : `${getDays}`,
653
+ hours: getHours,
654
+ minutes: getMinutes,
655
+ seconds: getSeconds
656
+ });
657
+ }, [targetTime]);
658
+ useEffect2(() => {
659
+ setNewTime();
660
+ const interval = setInterval(setNewTime, 1e3);
661
+ return () => clearInterval(interval);
662
+ }, [setNewTime]);
663
+ return countdown;
664
+ };
665
+ var useCountdownSeconds = (initCountdown) => {
666
+ const [countdown, setCountdown] = useState6(initCountdown);
667
+ const intervalIdRef = useRef(null);
668
+ const remainingSecondsRef = useRef(initCountdown);
669
+ const startCountdown = useCallback6(() => {
670
+ if (intervalIdRef.current) {
671
+ clearInterval(intervalIdRef.current);
672
+ }
673
+ remainingSecondsRef.current = initCountdown;
674
+ setCountdown(initCountdown);
675
+ intervalIdRef.current = setInterval(() => {
676
+ remainingSecondsRef.current -= 1;
677
+ if (remainingSecondsRef.current <= 0) {
678
+ if (intervalIdRef.current) clearInterval(intervalIdRef.current);
679
+ setCountdown(0);
680
+ } else {
681
+ setCountdown(remainingSecondsRef.current);
682
+ }
683
+ }, 1e3);
684
+ }, [initCountdown]);
685
+ useEffect2(() => {
686
+ return () => {
687
+ if (intervalIdRef.current) {
688
+ clearInterval(intervalIdRef.current);
689
+ }
690
+ };
691
+ }, []);
692
+ const counting = countdown > 0 && countdown < initCountdown;
693
+ return {
694
+ counting,
695
+ countdown,
696
+ startCountdown,
697
+ setCountdown
698
+ };
699
+ };
700
+
625
701
  // src/hooks/useResponsive.ts
626
702
  import { useMemo as useMemo5 } from "react";
627
703
  import useMediaQuery from "@mui/material/useMediaQuery";
@@ -656,19 +732,19 @@ var useWidth = () => {
656
732
  };
657
733
 
658
734
  // src/hooks/useEventListener.ts
659
- import { useRef, useEffect as useEffect2, useLayoutEffect } from "react";
660
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect2;
735
+ import { useRef as useRef2, useEffect as useEffect3, useLayoutEffect } from "react";
736
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect3;
661
737
  var useEventListener = ({
662
738
  eventName,
663
739
  handler,
664
740
  element,
665
741
  options
666
742
  }) => {
667
- const savedHandler = useRef(handler);
743
+ const savedHandler = useRef2(handler);
668
744
  useIsomorphicLayoutEffect(() => {
669
745
  savedHandler.current = handler;
670
746
  }, [handler]);
671
- useEffect2(() => {
747
+ useEffect3(() => {
672
748
  const targetElement = element?.current || window;
673
749
  if (!(targetElement && targetElement.addEventListener)) {
674
750
  return;
@@ -682,11 +758,11 @@ var useEventListener = ({
682
758
  };
683
759
 
684
760
  // src/hooks/useCopyToClipboard.ts
685
- import { useMemo as useMemo6, useState as useState6, useCallback as useCallback6 } from "react";
761
+ import { useMemo as useMemo6, useState as useState7, useCallback as useCallback7 } from "react";
686
762
  var useCopyToClipboard = () => {
687
- const [copiedText, setCopiedText] = useState6("");
688
- const [isCopied, setIsCopied] = useState6(false);
689
- const copy = useCallback6(
763
+ const [copiedText, setCopiedText] = useState7("");
764
+ const [isCopied, setIsCopied] = useState7(false);
765
+ const copy = useCallback7(
690
766
  async (text2) => {
691
767
  if (!navigator?.clipboard) {
692
768
  console.warn("Clipboard not supported");
@@ -714,11 +790,11 @@ var useCopyToClipboard = () => {
714
790
  };
715
791
 
716
792
  // src/hooks/useScrollOffsetTop.ts
717
- import { useRef as useRef2, useMemo as useMemo7, useState as useState7, useEffect as useEffect3, useCallback as useCallback7 } from "react";
793
+ import { useRef as useRef3, useMemo as useMemo7, useState as useState8, useEffect as useEffect4, useCallback as useCallback8 } from "react";
718
794
  var useScrollOffSetTop = (top = 0) => {
719
- const elementRef = useRef2(null);
720
- const [offsetTop, setOffsetTop] = useState7(false);
721
- const handleScrollChange = useCallback7(() => {
795
+ const elementRef = useRef3(null);
796
+ const [offsetTop, setOffsetTop] = useState8(false);
797
+ const handleScrollChange = useCallback8(() => {
722
798
  const scrollHeight = Math.round(window.scrollY);
723
799
  if (elementRef?.current) {
724
800
  const rect = elementRef.current.getBoundingClientRect();
@@ -728,7 +804,7 @@ var useScrollOffSetTop = (top = 0) => {
728
804
  setOffsetTop(scrollHeight > top);
729
805
  }
730
806
  }, [top]);
731
- useEffect3(() => {
807
+ useEffect4(() => {
732
808
  handleScrollChange();
733
809
  window.addEventListener("scroll", handleScrollChange, { passive: true });
734
810
  return () => {
@@ -5980,20 +6056,226 @@ var Table = (props) => {
5980
6056
  ) });
5981
6057
  };
5982
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
+
5983
6265
  // src/components/Upload/Upload.tsx
5984
6266
  import { useDropzone } from "react-dropzone";
5985
- import Box10 from "@mui/material/Box";
6267
+ import Box11 from "@mui/material/Box";
5986
6268
  import Stack3 from "@mui/material/Stack";
5987
6269
  import Button from "@mui/material/Button";
5988
6270
  import FormHelperText from "@mui/material/FormHelperText";
5989
6271
 
5990
6272
  // src/components/Upload/components/Placeholder.tsx
5991
6273
  import Stack2 from "@mui/material/Stack";
5992
- import Box5 from "@mui/material/Box";
5993
- 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";
5994
6276
  var UploadPlaceholder = ({ hasError, ...rest }) => {
5995
- return /* @__PURE__ */ jsxs24(
5996
- Box5,
6277
+ return /* @__PURE__ */ jsxs25(
6278
+ Box6,
5997
6279
  {
5998
6280
  sx: {
5999
6281
  display: "flex",
@@ -6003,7 +6285,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6003
6285
  },
6004
6286
  ...rest,
6005
6287
  children: [
6006
- /* @__PURE__ */ jsx44(
6288
+ /* @__PURE__ */ jsx45(
6007
6289
  Icon,
6008
6290
  {
6009
6291
  icon: "CloudUpload",
@@ -6014,11 +6296,11 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6014
6296
  }
6015
6297
  }
6016
6298
  ),
6017
- /* @__PURE__ */ jsxs24(Stack2, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
6018
- /* @__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: [
6019
6301
  "Drag files here or",
6020
- /* @__PURE__ */ jsx44(
6021
- Box5,
6302
+ /* @__PURE__ */ jsx45(
6303
+ Box6,
6022
6304
  {
6023
6305
  component: "span",
6024
6306
  sx: {
@@ -6030,8 +6312,8 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6030
6312
  }
6031
6313
  )
6032
6314
  ] }),
6033
- /* @__PURE__ */ jsxs24(
6034
- Box5,
6315
+ /* @__PURE__ */ jsxs25(
6316
+ Box6,
6035
6317
  {
6036
6318
  sx: {
6037
6319
  typography: "bodyMd",
@@ -6052,7 +6334,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
6052
6334
  };
6053
6335
 
6054
6336
  // src/components/Upload/components/RejectionFiles.tsx
6055
- import Box6 from "@mui/material/Box";
6337
+ import Box7 from "@mui/material/Box";
6056
6338
  import Paper from "@mui/material/Paper";
6057
6339
  import Typography2 from "@mui/material/Typography";
6058
6340
 
@@ -6085,12 +6367,12 @@ var fileData = (file) => {
6085
6367
  };
6086
6368
 
6087
6369
  // src/components/Upload/components/RejectionFiles.tsx
6088
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
6370
+ import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
6089
6371
  var RejectionFiles = ({ files }) => {
6090
6372
  if (!files.length) {
6091
6373
  return null;
6092
6374
  }
6093
- return /* @__PURE__ */ jsx45(
6375
+ return /* @__PURE__ */ jsx46(
6094
6376
  Paper,
6095
6377
  {
6096
6378
  variant: "outlined",
@@ -6105,13 +6387,13 @@ var RejectionFiles = ({ files }) => {
6105
6387
  },
6106
6388
  children: files.map(({ file, errors }) => {
6107
6389
  const { path, size } = fileData(file);
6108
- return /* @__PURE__ */ jsxs25(Box6, { sx: { my: 1 }, children: [
6109
- /* @__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: [
6110
6392
  path,
6111
6393
  " - ",
6112
6394
  size ? fData(size) : ""
6113
6395
  ] }),
6114
- 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: [
6115
6397
  "- ",
6116
6398
  error2.message
6117
6399
  ] }, error2.code))
@@ -6122,12 +6404,12 @@ var RejectionFiles = ({ files }) => {
6122
6404
  };
6123
6405
 
6124
6406
  // src/components/Upload/components/UploadProgress.tsx
6125
- import Box7 from "@mui/material/Box";
6407
+ import Box8 from "@mui/material/Box";
6126
6408
  import CircularProgress from "@mui/material/CircularProgress";
6127
- import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
6409
+ import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
6128
6410
  var UploadProgress = ({ progress: progress2 = 20 }) => {
6129
- return /* @__PURE__ */ jsxs26(
6130
- Box7,
6411
+ return /* @__PURE__ */ jsxs27(
6412
+ Box8,
6131
6413
  {
6132
6414
  sx: {
6133
6415
  display: "flex",
@@ -6137,8 +6419,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6137
6419
  height: "100%"
6138
6420
  },
6139
6421
  children: [
6140
- /* @__PURE__ */ jsxs26(Box7, { sx: { position: "relative", display: "inline-flex" }, children: [
6141
- /* @__PURE__ */ jsx46(
6422
+ /* @__PURE__ */ jsxs27(Box8, { sx: { position: "relative", display: "inline-flex" }, children: [
6423
+ /* @__PURE__ */ jsx47(
6142
6424
  CircularProgress,
6143
6425
  {
6144
6426
  variant: "determinate",
@@ -6151,7 +6433,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6151
6433
  }
6152
6434
  }
6153
6435
  ),
6154
- /* @__PURE__ */ jsx46(
6436
+ /* @__PURE__ */ jsx47(
6155
6437
  CircularProgress,
6156
6438
  {
6157
6439
  variant: "determinate",
@@ -6163,8 +6445,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6163
6445
  }
6164
6446
  }
6165
6447
  ),
6166
- /* @__PURE__ */ jsx46(
6167
- Box7,
6448
+ /* @__PURE__ */ jsx47(
6449
+ Box8,
6168
6450
  {
6169
6451
  sx: {
6170
6452
  top: 0,
@@ -6176,30 +6458,30 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
6176
6458
  alignItems: "center",
6177
6459
  justifyContent: "center"
6178
6460
  },
6179
- 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)}` })
6180
6462
  }
6181
6463
  )
6182
6464
  ] }),
6183
- /* @__PURE__ */ jsx46(Box7, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
6465
+ /* @__PURE__ */ jsx47(Box8, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
6184
6466
  ]
6185
6467
  }
6186
6468
  );
6187
6469
  };
6188
6470
 
6189
6471
  // src/components/Upload/components/MultiFilePreview.tsx
6190
- import { useRef as useRef3 } from "react";
6191
- import Box9 from "@mui/material/Box";
6472
+ import { useRef as useRef5 } from "react";
6473
+ import Box10 from "@mui/material/Box";
6192
6474
  import IconButton2 from "@mui/material/IconButton";
6193
6475
 
6194
6476
  // src/components/Upload/components/SingleFilePreview.tsx
6195
- import Box8 from "@mui/material/Box";
6477
+ import Box9 from "@mui/material/Box";
6196
6478
  import IconButton from "@mui/material/IconButton";
6197
- import { jsx as jsx47 } from "react/jsx-runtime";
6479
+ import { jsx as jsx48 } from "react/jsx-runtime";
6198
6480
  var SingleFilePreview = ({ file }) => {
6199
6481
  const fileName = typeof file === "string" ? file : file.name;
6200
6482
  const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
6201
- const renderImg = /* @__PURE__ */ jsx47(
6202
- Box8,
6483
+ const renderImg = /* @__PURE__ */ jsx48(
6484
+ Box9,
6203
6485
  {
6204
6486
  component: "img",
6205
6487
  alt: fileName,
@@ -6212,8 +6494,8 @@ var SingleFilePreview = ({ file }) => {
6212
6494
  }
6213
6495
  }
6214
6496
  );
6215
- return /* @__PURE__ */ jsx47(
6216
- Box8,
6497
+ return /* @__PURE__ */ jsx48(
6498
+ Box9,
6217
6499
  {
6218
6500
  sx: {
6219
6501
  p: 1,
@@ -6228,7 +6510,7 @@ var SingleFilePreview = ({ file }) => {
6228
6510
  );
6229
6511
  };
6230
6512
  var DeleteButton = ({ sx, ...rest }) => {
6231
- return /* @__PURE__ */ jsx47(
6513
+ return /* @__PURE__ */ jsx48(
6232
6514
  IconButton,
6233
6515
  {
6234
6516
  size: "small",
@@ -6247,15 +6529,15 @@ var DeleteButton = ({ sx, ...rest }) => {
6247
6529
  ...sx
6248
6530
  },
6249
6531
  ...rest,
6250
- children: /* @__PURE__ */ jsx47(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
6532
+ children: /* @__PURE__ */ jsx48(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
6251
6533
  }
6252
6534
  );
6253
6535
  };
6254
6536
 
6255
6537
  // src/components/Upload/components/MultiFilePreview.tsx
6256
- import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
6538
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
6257
6539
  var MultiFilePreview = ({ files, onRemove }) => {
6258
- const scrollRef = useRef3(null);
6540
+ const scrollRef = useRef5(null);
6259
6541
  const handleScroll = (direction) => {
6260
6542
  if (scrollRef.current) {
6261
6543
  const scrollAmount = 300;
@@ -6267,8 +6549,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6267
6549
  }
6268
6550
  };
6269
6551
  const showNavigation = files.length > 2;
6270
- return /* @__PURE__ */ jsxs27(Box9, { sx: { position: "relative", width: 1 }, children: [
6271
- showNavigation && /* @__PURE__ */ jsx48(
6552
+ return /* @__PURE__ */ jsxs28(Box10, { sx: { position: "relative", width: 1 }, children: [
6553
+ showNavigation && /* @__PURE__ */ jsx49(
6272
6554
  IconButton2,
6273
6555
  {
6274
6556
  size: "small",
@@ -6285,11 +6567,11 @@ var MultiFilePreview = ({ files, onRemove }) => {
6285
6567
  bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
6286
6568
  }
6287
6569
  },
6288
- children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowLeft", width: 20 })
6570
+ children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowLeft", width: 20 })
6289
6571
  }
6290
6572
  ),
6291
- /* @__PURE__ */ jsx48(
6292
- Box9,
6573
+ /* @__PURE__ */ jsx49(
6574
+ Box10,
6293
6575
  {
6294
6576
  ref: scrollRef,
6295
6577
  sx: {
@@ -6307,8 +6589,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6307
6589
  children: files.map((file, index) => {
6308
6590
  const fileName = typeof file === "string" ? file : file.name;
6309
6591
  const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
6310
- return /* @__PURE__ */ jsxs27(
6311
- Box9,
6592
+ return /* @__PURE__ */ jsxs28(
6593
+ Box10,
6312
6594
  {
6313
6595
  sx: {
6314
6596
  position: "relative",
@@ -6319,8 +6601,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
6319
6601
  flexShrink: 0
6320
6602
  },
6321
6603
  children: [
6322
- /* @__PURE__ */ jsx48(
6323
- Box9,
6604
+ /* @__PURE__ */ jsx49(
6605
+ Box10,
6324
6606
  {
6325
6607
  component: "img",
6326
6608
  alt: fileName,
@@ -6333,7 +6615,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
6333
6615
  }
6334
6616
  }
6335
6617
  ),
6336
- onRemove && /* @__PURE__ */ jsx48(
6618
+ onRemove && /* @__PURE__ */ jsx49(
6337
6619
  DeleteButton,
6338
6620
  {
6339
6621
  onClick: (e) => {
@@ -6349,7 +6631,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
6349
6631
  })
6350
6632
  }
6351
6633
  ),
6352
- showNavigation && /* @__PURE__ */ jsx48(
6634
+ showNavigation && /* @__PURE__ */ jsx49(
6353
6635
  IconButton2,
6354
6636
  {
6355
6637
  size: "small",
@@ -6366,14 +6648,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
6366
6648
  bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
6367
6649
  }
6368
6650
  },
6369
- children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowRight", width: 20 })
6651
+ children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowRight", width: 20 })
6370
6652
  }
6371
6653
  )
6372
6654
  ] });
6373
6655
  };
6374
6656
 
6375
6657
  // src/components/Upload/Upload.tsx
6376
- import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
6658
+ import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
6377
6659
  var Upload = ({
6378
6660
  sx,
6379
6661
  value,
@@ -6400,20 +6682,20 @@ var Upload = ({
6400
6682
  const hasError = isDragReject || !!error2;
6401
6683
  const renderContent = () => {
6402
6684
  if (isUploading) {
6403
- return /* @__PURE__ */ jsx49(UploadProgress, { progress: uploadProgress });
6685
+ return /* @__PURE__ */ jsx50(UploadProgress, { progress: uploadProgress });
6404
6686
  }
6405
6687
  if (hasFile) {
6406
- return /* @__PURE__ */ jsx49(SingleFilePreview, { file: value });
6688
+ return /* @__PURE__ */ jsx50(SingleFilePreview, { file: value });
6407
6689
  }
6408
6690
  if (hasFiles) {
6409
- return /* @__PURE__ */ jsx49(MultiFilePreview, { files: value, onRemove });
6691
+ return /* @__PURE__ */ jsx50(MultiFilePreview, { files: value, onRemove });
6410
6692
  }
6411
- return /* @__PURE__ */ jsx49(UploadPlaceholder, { hasError });
6693
+ return /* @__PURE__ */ jsx50(UploadPlaceholder, { hasError });
6412
6694
  };
6413
6695
  const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
6414
- return /* @__PURE__ */ jsxs28(Box10, { sx: { width: 1, position: "relative", ...sx }, children: [
6415
- /* @__PURE__ */ jsxs28(
6416
- Box10,
6696
+ return /* @__PURE__ */ jsxs29(Box11, { sx: { width: 1, position: "relative", ...sx }, children: [
6697
+ /* @__PURE__ */ jsxs29(
6698
+ Box11,
6417
6699
  {
6418
6700
  ...shouldShowDropzone ? getRootProps() : {},
6419
6701
  sx: {
@@ -6451,37 +6733,37 @@ var Upload = ({
6451
6733
  }
6452
6734
  },
6453
6735
  children: [
6454
- shouldShowDropzone && /* @__PURE__ */ jsx49("input", { ...getInputProps() }),
6736
+ shouldShowDropzone && /* @__PURE__ */ jsx50("input", { ...getInputProps() }),
6455
6737
  renderContent()
6456
6738
  ]
6457
6739
  }
6458
6740
  ),
6459
- hasFile && !isUploading && /* @__PURE__ */ jsx49(DeleteButton, { onClick: onDelete }),
6460
- hasFiles && /* @__PURE__ */ jsxs28(Stack3, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
6461
- 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(
6462
6744
  Button,
6463
6745
  {
6464
6746
  variant: "outlined",
6465
6747
  color: "inherit",
6466
6748
  size: "small",
6467
6749
  onClick: onRemoveAll,
6468
- startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
6750
+ startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
6469
6751
  children: "Remove all"
6470
6752
  }
6471
6753
  ),
6472
- onUpload && /* @__PURE__ */ jsx49(
6754
+ onUpload && /* @__PURE__ */ jsx50(
6473
6755
  Button,
6474
6756
  {
6475
6757
  variant: "contained",
6476
6758
  size: "small",
6477
6759
  onClick: onUpload,
6478
- startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
6760
+ startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
6479
6761
  children: "Upload files"
6480
6762
  }
6481
6763
  )
6482
6764
  ] }),
6483
- helperText && /* @__PURE__ */ jsx49(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
6484
- /* @__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] })
6485
6767
  ] });
6486
6768
  };
6487
6769
 
@@ -6489,16 +6771,16 @@ var Upload = ({
6489
6771
  import {
6490
6772
  FormProvider as RHFForm
6491
6773
  } from "react-hook-form";
6492
- import Box11 from "@mui/material/Box";
6493
- import { jsx as jsx50 } from "react/jsx-runtime";
6774
+ import Box12 from "@mui/material/Box";
6775
+ import { jsx as jsx51 } from "react/jsx-runtime";
6494
6776
  var Form = ({
6495
6777
  children,
6496
6778
  onSubmit,
6497
6779
  methods,
6498
6780
  ...rest
6499
6781
  }) => {
6500
- return /* @__PURE__ */ jsx50(RHFForm, { ...methods, children: /* @__PURE__ */ jsx50(
6501
- Box11,
6782
+ return /* @__PURE__ */ jsx51(RHFForm, { ...methods, children: /* @__PURE__ */ jsx51(
6783
+ Box12,
6502
6784
  {
6503
6785
  component: "form",
6504
6786
  onSubmit: (e) => {
@@ -6518,7 +6800,7 @@ var Form = ({
6518
6800
  // src/components/HookForm/RHFSwitch.tsx
6519
6801
  import { Controller, useFormContext } from "react-hook-form";
6520
6802
  import Stack4 from "@mui/material/Stack";
6521
- import Box12 from "@mui/material/Box";
6803
+ import Box13 from "@mui/material/Box";
6522
6804
  import Typography3 from "@mui/material/Typography";
6523
6805
  import Switch from "@mui/material/Switch";
6524
6806
  import FormGroup from "@mui/material/FormGroup";
@@ -6526,7 +6808,7 @@ import FormLabel from "@mui/material/FormLabel";
6526
6808
  import FormControl from "@mui/material/FormControl";
6527
6809
  import FormHelperText2 from "@mui/material/FormHelperText";
6528
6810
  import FormControlLabel from "@mui/material/FormControlLabel";
6529
- import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
6811
+ import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
6530
6812
  var RHFSwitch = ({
6531
6813
  name,
6532
6814
  description,
@@ -6538,16 +6820,16 @@ var RHFSwitch = ({
6538
6820
  }) => {
6539
6821
  const { control } = useFormContext();
6540
6822
  const baseAriaLabel = `Switch ${name}`;
6541
- return /* @__PURE__ */ jsx51(
6823
+ return /* @__PURE__ */ jsx52(
6542
6824
  Controller,
6543
6825
  {
6544
6826
  name,
6545
6827
  control,
6546
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs29(Box12, { sx: slotProps?.wrap, children: [
6547
- /* @__PURE__ */ jsx51(
6828
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs30(Box13, { sx: slotProps?.wrap, children: [
6829
+ /* @__PURE__ */ jsx52(
6548
6830
  FormControlLabel,
6549
6831
  {
6550
- control: /* @__PURE__ */ jsx51(
6832
+ control: /* @__PURE__ */ jsx52(
6551
6833
  Switch,
6552
6834
  {
6553
6835
  ...field,
@@ -6562,9 +6844,9 @@ var RHFSwitch = ({
6562
6844
  }
6563
6845
  }
6564
6846
  ),
6565
- label: /* @__PURE__ */ jsxs29(Stack4, { children: [
6566
- /* @__PURE__ */ jsx51(Typography3, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
6567
- 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 })
6568
6850
  ] }),
6569
6851
  sx: {
6570
6852
  alignItems: description ? "flex-start" : "center",
@@ -6573,7 +6855,7 @@ var RHFSwitch = ({
6573
6855
  ...other
6574
6856
  }
6575
6857
  ),
6576
- (!!error2 || helperText) && /* @__PURE__ */ jsx51(
6858
+ (!!error2 || helperText) && /* @__PURE__ */ jsx52(
6577
6859
  FormHelperText2,
6578
6860
  {
6579
6861
  error: !!error2,
@@ -6596,19 +6878,19 @@ var RHFMultiSwitch = ({
6596
6878
  }) => {
6597
6879
  const { control } = useFormContext();
6598
6880
  const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
6599
- return /* @__PURE__ */ jsx51(
6881
+ return /* @__PURE__ */ jsx52(
6600
6882
  Controller,
6601
6883
  {
6602
6884
  name,
6603
6885
  control,
6604
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs29(
6886
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs30(
6605
6887
  FormControl,
6606
6888
  {
6607
6889
  component: "fieldset",
6608
6890
  sx: slotProps?.formControl?.sx,
6609
6891
  ...slotProps?.formControl,
6610
6892
  children: [
6611
- label && /* @__PURE__ */ jsx51(
6893
+ label && /* @__PURE__ */ jsx52(
6612
6894
  FormLabel,
6613
6895
  {
6614
6896
  component: "legend",
@@ -6617,12 +6899,12 @@ var RHFMultiSwitch = ({
6617
6899
  children: label
6618
6900
  }
6619
6901
  ),
6620
- /* @__PURE__ */ jsx51(FormGroup, { ...other, children: options.map((option) => {
6902
+ /* @__PURE__ */ jsx52(FormGroup, { ...other, children: options.map((option) => {
6621
6903
  const itemAriaLabel = option.label || `Option ${option.value}`;
6622
- return /* @__PURE__ */ jsx51(
6904
+ return /* @__PURE__ */ jsx52(
6623
6905
  FormControlLabel,
6624
6906
  {
6625
- control: /* @__PURE__ */ jsx51(
6907
+ control: /* @__PURE__ */ jsx52(
6626
6908
  Switch,
6627
6909
  {
6628
6910
  checked: (field.value || []).includes(option.value),
@@ -6645,7 +6927,7 @@ var RHFMultiSwitch = ({
6645
6927
  option.value
6646
6928
  );
6647
6929
  }) }),
6648
- (!!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 })
6649
6931
  ]
6650
6932
  }
6651
6933
  )
@@ -6655,10 +6937,10 @@ var RHFMultiSwitch = ({
6655
6937
 
6656
6938
  // src/components/HookForm/RHFUpload.tsx
6657
6939
  import { Controller as Controller2, useFormContext as useFormContext2 } from "react-hook-form";
6658
- import { jsx as jsx52 } from "react/jsx-runtime";
6940
+ import { jsx as jsx53 } from "react/jsx-runtime";
6659
6941
  var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6660
6942
  const { control, setValue } = useFormContext2();
6661
- return /* @__PURE__ */ jsx52(
6943
+ return /* @__PURE__ */ jsx53(
6662
6944
  Controller2,
6663
6945
  {
6664
6946
  name,
@@ -6686,7 +6968,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6686
6968
  const onRemoveAll = () => {
6687
6969
  setValue(name, [], { shouldValidate: true });
6688
6970
  };
6689
- return /* @__PURE__ */ jsx52(
6971
+ return /* @__PURE__ */ jsx53(
6690
6972
  Upload,
6691
6973
  {
6692
6974
  multiple,
@@ -6710,18 +6992,18 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
6710
6992
  import { Controller as Controller3, useFormContext as useFormContext3 } from "react-hook-form";
6711
6993
 
6712
6994
  // src/components/OTPInput/index.tsx
6713
- import { useRef as useRef4, useState as useState8 } from "react";
6995
+ import { useRef as useRef6, useState as useState10 } from "react";
6714
6996
  import { useTheme as useTheme2 } from "@mui/material/styles";
6715
- import Box13 from "@mui/material/Box";
6997
+ import Box14 from "@mui/material/Box";
6716
6998
  import FormHelperText3 from "@mui/material/FormHelperText";
6717
6999
  import { inputBaseClasses as inputBaseClasses3 } from "@mui/material/InputBase";
6718
7000
  import TextField from "@mui/material/TextField";
6719
- 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";
6720
7002
  var OTPInput = (props) => {
6721
7003
  const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
6722
7004
  const theme = useTheme2();
6723
- const [otp, setOtp] = useState8(Array(length).fill(""));
6724
- const inputsRef = useRef4([]);
7005
+ const [otp, setOtp] = useState10(Array(length).fill(""));
7006
+ const inputsRef = useRef6([]);
6725
7007
  const handleChange = (value, index) => {
6726
7008
  if (!/^[0-9]$/.test(value) && value !== "") return;
6727
7009
  const newOtp = [...otp];
@@ -6784,18 +7066,19 @@ var OTPInput = (props) => {
6784
7066
  onComplete?.(newOtp.join(""));
6785
7067
  }
6786
7068
  };
6787
- return /* @__PURE__ */ jsxs30(Fragment, { children: [
6788
- /* @__PURE__ */ jsx53(Box13, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx53(
6789
- Box13,
7069
+ return /* @__PURE__ */ jsxs31(Fragment, { children: [
7070
+ /* @__PURE__ */ jsx54(Box14, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx54(
7071
+ Box14,
6790
7072
  {
6791
7073
  display: "flex",
6792
7074
  alignItems: "center",
6793
7075
  sx: {
7076
+ width: "100%",
6794
7077
  "&:not(:last-of-type)": {
6795
7078
  mr: 1.5
6796
7079
  }
6797
7080
  },
6798
- children: /* @__PURE__ */ jsx53(
7081
+ children: /* @__PURE__ */ jsx54(
6799
7082
  TextField,
6800
7083
  {
6801
7084
  size: "medium",
@@ -6878,21 +7161,21 @@ var OTPInput = (props) => {
6878
7161
  },
6879
7162
  index
6880
7163
  )) }),
6881
- error2 && /* @__PURE__ */ jsx53(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
7164
+ error2 && /* @__PURE__ */ jsx54(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
6882
7165
  ] });
6883
7166
  };
6884
7167
  var OTPInput_default = OTPInput;
6885
7168
 
6886
7169
  // src/components/HookForm/RHFOTPInput.tsx
6887
- import { jsx as jsx54 } from "react/jsx-runtime";
7170
+ import { jsx as jsx55 } from "react/jsx-runtime";
6888
7171
  var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
6889
7172
  const { control, setValue } = useFormContext3();
6890
- return /* @__PURE__ */ jsx54(
7173
+ return /* @__PURE__ */ jsx55(
6891
7174
  Controller3,
6892
7175
  {
6893
7176
  name,
6894
7177
  control,
6895
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx54(
7178
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
6896
7179
  OTPInput_default,
6897
7180
  {
6898
7181
  length,
@@ -6912,16 +7195,16 @@ import { Controller as Controller4, useFormContext as useFormContext4 } from "re
6912
7195
  import IconButton3 from "@mui/material/IconButton";
6913
7196
  import InputAdornment from "@mui/material/InputAdornment";
6914
7197
  import TextField2 from "@mui/material/TextField";
6915
- import { jsx as jsx55 } from "react/jsx-runtime";
7198
+ import { jsx as jsx56 } from "react/jsx-runtime";
6916
7199
  var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
6917
7200
  const { control } = useFormContext4();
6918
7201
  const passwordVisibility = useBoolean();
6919
- return /* @__PURE__ */ jsx55(
7202
+ return /* @__PURE__ */ jsx56(
6920
7203
  Controller4,
6921
7204
  {
6922
7205
  name,
6923
7206
  control,
6924
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
7207
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx56(
6925
7208
  TextField2,
6926
7209
  {
6927
7210
  ...field,
@@ -6942,7 +7225,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
6942
7225
  input: {
6943
7226
  ...slotProps?.input,
6944
7227
  ...type === "password" && {
6945
- 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(
6946
7229
  Icon,
6947
7230
  {
6948
7231
  icon: passwordVisibility.value ? "EyeClosed" : "Eye",
@@ -6969,7 +7252,7 @@ import FormLabel2 from "@mui/material/FormLabel";
6969
7252
  import RadioGroup from "@mui/material/RadioGroup";
6970
7253
  import FormControl2 from "@mui/material/FormControl";
6971
7254
  import FormHelperText4 from "@mui/material/FormHelperText";
6972
- import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
7255
+ import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
6973
7256
  var RHFRadioGroup = ({
6974
7257
  name,
6975
7258
  label,
@@ -6981,13 +7264,13 @@ var RHFRadioGroup = ({
6981
7264
  const { control } = useFormContext5();
6982
7265
  const labelledby = `${name}-radio-buttons-group-label`;
6983
7266
  const ariaLabel = (val) => `Radio ${val}`;
6984
- return /* @__PURE__ */ jsx56(
7267
+ return /* @__PURE__ */ jsx57(
6985
7268
  Controller5,
6986
7269
  {
6987
7270
  name,
6988
7271
  control,
6989
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
6990
- label && /* @__PURE__ */ jsx56(
7272
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
7273
+ label && /* @__PURE__ */ jsx57(
6991
7274
  FormLabel2,
6992
7275
  {
6993
7276
  id: labelledby,
@@ -6997,11 +7280,11 @@ var RHFRadioGroup = ({
6997
7280
  children: label
6998
7281
  }
6999
7282
  ),
7000
- /* @__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(
7001
7284
  FormControlLabel2,
7002
7285
  {
7003
7286
  value: option.value,
7004
- control: /* @__PURE__ */ jsx56(
7287
+ control: /* @__PURE__ */ jsx57(
7005
7288
  Radio,
7006
7289
  {
7007
7290
  ...slotProps?.radio,
@@ -7013,9 +7296,9 @@ var RHFRadioGroup = ({
7013
7296
  }
7014
7297
  }
7015
7298
  ),
7016
- label: /* @__PURE__ */ jsxs31(Stack5, { children: [
7017
- /* @__PURE__ */ jsx56(Typography4, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7018
- 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 })
7019
7302
  ] }),
7020
7303
  sx: {
7021
7304
  alignItems: option?.description ? "flex-start" : "center"
@@ -7023,7 +7306,7 @@ var RHFRadioGroup = ({
7023
7306
  },
7024
7307
  option.value
7025
7308
  )) }),
7026
- (!!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 })
7027
7310
  ] })
7028
7311
  }
7029
7312
  );
@@ -7033,7 +7316,7 @@ var RHFRadioGroup = ({
7033
7316
  import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
7034
7317
  import TextField3 from "@mui/material/TextField";
7035
7318
  import Autocomplete from "@mui/material/Autocomplete";
7036
- import { jsx as jsx57 } from "react/jsx-runtime";
7319
+ import { jsx as jsx58 } from "react/jsx-runtime";
7037
7320
  var RHFAutocomplete = ({
7038
7321
  name,
7039
7322
  label,
@@ -7044,12 +7327,12 @@ var RHFAutocomplete = ({
7044
7327
  ...other
7045
7328
  }) => {
7046
7329
  const { control, setValue } = useFormContext6();
7047
- return /* @__PURE__ */ jsx57(
7330
+ return /* @__PURE__ */ jsx58(
7048
7331
  Controller6,
7049
7332
  {
7050
7333
  name,
7051
7334
  control,
7052
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx57(
7335
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx58(
7053
7336
  Autocomplete,
7054
7337
  {
7055
7338
  ...field,
@@ -7058,7 +7341,7 @@ var RHFAutocomplete = ({
7058
7341
  setValue(name, newValue, { shouldValidate: true });
7059
7342
  handleChange?.(newValue);
7060
7343
  },
7061
- renderInput: (params) => /* @__PURE__ */ jsx57(
7344
+ renderInput: (params) => /* @__PURE__ */ jsx58(
7062
7345
  TextField3,
7063
7346
  {
7064
7347
  label,
@@ -7079,7 +7362,7 @@ var RHFAutocomplete = ({
7079
7362
  // src/components/HookForm/RHFCheckbox.tsx
7080
7363
  import { Controller as Controller7, useFormContext as useFormContext7 } from "react-hook-form";
7081
7364
  import Stack6 from "@mui/material/Stack";
7082
- import Box14 from "@mui/material/Box";
7365
+ import Box15 from "@mui/material/Box";
7083
7366
  import Typography5 from "@mui/material/Typography";
7084
7367
  import Checkbox from "@mui/material/Checkbox";
7085
7368
  import FormGroup2 from "@mui/material/FormGroup";
@@ -7087,7 +7370,7 @@ import FormLabel3 from "@mui/material/FormLabel";
7087
7370
  import FormControl3 from "@mui/material/FormControl";
7088
7371
  import FormHelperText5 from "@mui/material/FormHelperText";
7089
7372
  import FormControlLabel3 from "@mui/material/FormControlLabel";
7090
- import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
7373
+ import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
7091
7374
  var RHFCheckbox = ({
7092
7375
  name,
7093
7376
  description,
@@ -7099,16 +7382,16 @@ var RHFCheckbox = ({
7099
7382
  }) => {
7100
7383
  const { control } = useFormContext7();
7101
7384
  const baseAriaLabel = `Checkbox for ${name}`;
7102
- return /* @__PURE__ */ jsx58(
7385
+ return /* @__PURE__ */ jsx59(
7103
7386
  Controller7,
7104
7387
  {
7105
7388
  name,
7106
7389
  control,
7107
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(Box14, { sx: slotProps?.wrap, children: [
7108
- /* @__PURE__ */ jsx58(
7390
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(Box15, { sx: slotProps?.wrap, children: [
7391
+ /* @__PURE__ */ jsx59(
7109
7392
  FormControlLabel3,
7110
7393
  {
7111
- control: /* @__PURE__ */ jsx58(
7394
+ control: /* @__PURE__ */ jsx59(
7112
7395
  Checkbox,
7113
7396
  {
7114
7397
  ...field,
@@ -7123,9 +7406,9 @@ var RHFCheckbox = ({
7123
7406
  }
7124
7407
  }
7125
7408
  ),
7126
- label: /* @__PURE__ */ jsxs32(Stack6, { children: [
7127
- /* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
7128
- 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 })
7129
7412
  ] }),
7130
7413
  sx: {
7131
7414
  alignItems: description ? "flex-start" : "center",
@@ -7134,7 +7417,7 @@ var RHFCheckbox = ({
7134
7417
  ...other
7135
7418
  }
7136
7419
  ),
7137
- (!!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 })
7138
7421
  ] })
7139
7422
  }
7140
7423
  );
@@ -7150,13 +7433,13 @@ var RHFMultiCheckbox = ({
7150
7433
  }) => {
7151
7434
  const { control } = useFormContext7();
7152
7435
  const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
7153
- return /* @__PURE__ */ jsx58(
7436
+ return /* @__PURE__ */ jsx59(
7154
7437
  Controller7,
7155
7438
  {
7156
7439
  name,
7157
7440
  control,
7158
7441
  defaultValue: [],
7159
- render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(
7442
+ render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(
7160
7443
  FormControl3,
7161
7444
  {
7162
7445
  component: "fieldset",
@@ -7164,7 +7447,7 @@ var RHFMultiCheckbox = ({
7164
7447
  sx: slotProps?.formControl?.sx,
7165
7448
  ...slotProps?.formControl,
7166
7449
  children: [
7167
- label && /* @__PURE__ */ jsx58(
7450
+ label && /* @__PURE__ */ jsx59(
7168
7451
  FormLabel3,
7169
7452
  {
7170
7453
  component: "legend",
@@ -7173,12 +7456,12 @@ var RHFMultiCheckbox = ({
7173
7456
  children: label
7174
7457
  }
7175
7458
  ),
7176
- /* @__PURE__ */ jsx58(FormGroup2, { row, ...other, children: options.map((option) => {
7459
+ /* @__PURE__ */ jsx59(FormGroup2, { row, ...other, children: options.map((option) => {
7177
7460
  const itemAriaLabel = option.label || `Option ${option.value}`;
7178
- return /* @__PURE__ */ jsx58(
7461
+ return /* @__PURE__ */ jsx59(
7179
7462
  FormControlLabel3,
7180
7463
  {
7181
- control: /* @__PURE__ */ jsx58(
7464
+ control: /* @__PURE__ */ jsx59(
7182
7465
  Checkbox,
7183
7466
  {
7184
7467
  checked: (field.value || []).includes(option.value),
@@ -7196,9 +7479,9 @@ var RHFMultiCheckbox = ({
7196
7479
  }
7197
7480
  }
7198
7481
  ),
7199
- label: /* @__PURE__ */ jsxs32(Stack6, { children: [
7200
- /* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
7201
- 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 })
7202
7485
  ] }),
7203
7486
  sx: {
7204
7487
  alignItems: option?.description ? "flex-start" : "center"
@@ -7207,7 +7490,7 @@ var RHFMultiCheckbox = ({
7207
7490
  option.value
7208
7491
  );
7209
7492
  }) }),
7210
- (!!error2 || helperText) && /* @__PURE__ */ jsx58(
7493
+ (!!error2 || helperText) && /* @__PURE__ */ jsx59(
7211
7494
  FormHelperText5,
7212
7495
  {
7213
7496
  sx: { mx: 0, ...slotProps?.formHelperText?.sx },
@@ -7237,29 +7520,29 @@ var Field = {
7237
7520
  // src/components/CopyButton/index.tsx
7238
7521
  import Tooltip from "@mui/material/Tooltip";
7239
7522
  import IconButton4 from "@mui/material/IconButton";
7240
- import { jsx as jsx59 } from "react/jsx-runtime";
7523
+ import { jsx as jsx60 } from "react/jsx-runtime";
7241
7524
  var CopyButton = ({ text: text2, size = "small" }) => {
7242
7525
  const { copy, isCopied } = useCopyToClipboard();
7243
- return /* @__PURE__ */ jsx59(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx59(
7526
+ return /* @__PURE__ */ jsx60(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx60(
7244
7527
  IconButton4,
7245
7528
  {
7246
7529
  size,
7247
7530
  onClick: () => copy(text2),
7248
7531
  "aria-label": "copy token",
7249
7532
  sx: { color: "icon.black" },
7250
- 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 } })
7251
7534
  }
7252
7535
  ) });
7253
7536
  };
7254
7537
 
7255
7538
  // src/components/LoadingScreen/index.tsx
7256
7539
  import Portal from "@mui/material/Portal";
7257
- import Box15 from "@mui/material/Box";
7540
+ import Box16 from "@mui/material/Box";
7258
7541
  import LinearProgress from "@mui/material/LinearProgress";
7259
- import { jsx as jsx60 } from "react/jsx-runtime";
7542
+ import { jsx as jsx61 } from "react/jsx-runtime";
7260
7543
  var LoadingScreen = ({ portal, sx, ...rest }) => {
7261
- const content = /* @__PURE__ */ jsx60(
7262
- Box15,
7544
+ const content = /* @__PURE__ */ jsx61(
7545
+ Box16,
7263
7546
  {
7264
7547
  sx: {
7265
7548
  px: 5,
@@ -7272,17 +7555,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
7272
7555
  ...sx
7273
7556
  },
7274
7557
  ...rest,
7275
- children: /* @__PURE__ */ jsx60(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
7558
+ children: /* @__PURE__ */ jsx61(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
7276
7559
  }
7277
7560
  );
7278
7561
  if (portal) {
7279
- return /* @__PURE__ */ jsx60(Portal, { children: content });
7562
+ return /* @__PURE__ */ jsx61(Portal, { children: content });
7280
7563
  }
7281
7564
  return content;
7282
7565
  };
7283
7566
  var SplashScreen = ({ portal, sx, ...rest }) => {
7284
- const content = /* @__PURE__ */ jsx60(
7285
- Box15,
7567
+ const content = /* @__PURE__ */ jsx61(
7568
+ Box16,
7286
7569
  {
7287
7570
  sx: {
7288
7571
  right: 0,
@@ -7298,11 +7581,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
7298
7581
  ...sx
7299
7582
  },
7300
7583
  ...rest,
7301
- children: /* @__PURE__ */ jsx60(AnimatedLogo, {})
7584
+ children: /* @__PURE__ */ jsx61(AnimatedLogo, {})
7302
7585
  }
7303
7586
  );
7304
7587
  if (portal) {
7305
- return /* @__PURE__ */ jsx60(Portal, { children: content });
7588
+ return /* @__PURE__ */ jsx61(Portal, { children: content });
7306
7589
  }
7307
7590
  return content;
7308
7591
  };
@@ -7321,6 +7604,7 @@ export {
7321
7604
  Field,
7322
7605
  Form,
7323
7606
  Icon,
7607
+ Image,
7324
7608
  InfoCircleFill,
7325
7609
  InfoCircleOutline,
7326
7610
  KeyCommand,
@@ -7434,6 +7718,8 @@ export {
7434
7718
  updateCoreWithSettings,
7435
7719
  useBoolean,
7436
7720
  useCopyToClipboard,
7721
+ useCountdownDate,
7722
+ useCountdownSeconds,
7437
7723
  useEventListener,
7438
7724
  useLocalStorage,
7439
7725
  usePopover,