@undefine-ui/design-system 2.13.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +157 -168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +127 -137
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5682,8 +5682,10 @@ var getBackgroundDefault = (contrast) => {
|
|
|
5682
5682
|
// src/theme/create-theme.ts
|
|
5683
5683
|
var createTheme = (settings) => {
|
|
5684
5684
|
const initialTheme = {
|
|
5685
|
+
cssVariables: true,
|
|
5685
5686
|
colorSchemes,
|
|
5686
5687
|
breakpoints,
|
|
5688
|
+
defaultColorScheme: settings.colorScheme,
|
|
5687
5689
|
colorSchemeSelector: "data-mui-color-scheme",
|
|
5688
5690
|
shadows: shadows(settings.colorScheme),
|
|
5689
5691
|
customShadows: customShadows(settings.colorScheme),
|
|
@@ -5727,20 +5729,10 @@ var shouldSkipGeneratingVar = (keys) => {
|
|
|
5727
5729
|
};
|
|
5728
5730
|
|
|
5729
5731
|
// src/theme/color-scheme-script.tsx
|
|
5730
|
-
import InitColorSchemeScript from "@mui/material/InitColorSchemeScript";
|
|
5731
|
-
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
5732
5732
|
var schemeConfig = {
|
|
5733
5733
|
modeStorageKey: "theme-mode",
|
|
5734
5734
|
defaultMode: defaultSettings.colorScheme
|
|
5735
5735
|
};
|
|
5736
|
-
var getInitColorSchemeScript = /* @__PURE__ */ jsx38(
|
|
5737
|
-
InitColorSchemeScript,
|
|
5738
|
-
{
|
|
5739
|
-
modeStorageKey: schemeConfig.modeStorageKey,
|
|
5740
|
-
colorSchemeNode: schemeConfig.defaultMode
|
|
5741
|
-
},
|
|
5742
|
-
schemeConfig.modeStorageKey
|
|
5743
|
-
);
|
|
5744
5736
|
|
|
5745
5737
|
// src/theme/ThemeProvider.tsx
|
|
5746
5738
|
import CssBaseline from "@mui/material/CssBaseline";
|
|
@@ -5756,7 +5748,7 @@ import "@fontsource/geist/500.css";
|
|
|
5756
5748
|
import "@fontsource/geist/600.css";
|
|
5757
5749
|
import "@fontsource/geist/700.css";
|
|
5758
5750
|
import "./satoshi-4X3TX4PE.css";
|
|
5759
|
-
import { jsx as
|
|
5751
|
+
import { jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5760
5752
|
var ThemeProvider = ({ children }) => {
|
|
5761
5753
|
const settings = useSettings();
|
|
5762
5754
|
const theme = createTheme(settings);
|
|
@@ -5767,7 +5759,7 @@ var ThemeProvider = ({ children }) => {
|
|
|
5767
5759
|
defaultMode: schemeConfig.defaultMode,
|
|
5768
5760
|
modeStorageKey: schemeConfig.modeStorageKey,
|
|
5769
5761
|
children: [
|
|
5770
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsx38(CssBaseline, {}),
|
|
5771
5763
|
children
|
|
5772
5764
|
]
|
|
5773
5765
|
}
|
|
@@ -5777,7 +5769,7 @@ var ThemeProvider = ({ children }) => {
|
|
|
5777
5769
|
// src/components/Logo/index.tsx
|
|
5778
5770
|
import Link from "@mui/material/Link";
|
|
5779
5771
|
import Box2 from "@mui/material/Box";
|
|
5780
|
-
import { jsx as
|
|
5772
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5781
5773
|
var LOGO_MAP = {
|
|
5782
5774
|
full: {
|
|
5783
5775
|
black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black-full_mjngwu.png",
|
|
@@ -5805,7 +5797,7 @@ var Logo = ({
|
|
|
5805
5797
|
const type = isFull ? "full" : "single";
|
|
5806
5798
|
const color = isWhite ? "white" : isBlack ? "black" : "default";
|
|
5807
5799
|
const logoImg = src ?? LOGO_MAP[type][color];
|
|
5808
|
-
const logo = /* @__PURE__ */
|
|
5800
|
+
const logo = /* @__PURE__ */ jsx39(
|
|
5809
5801
|
Box2,
|
|
5810
5802
|
{
|
|
5811
5803
|
component: "img",
|
|
@@ -5818,7 +5810,7 @@ var Logo = ({
|
|
|
5818
5810
|
if (disableLink) {
|
|
5819
5811
|
return logo;
|
|
5820
5812
|
}
|
|
5821
|
-
return /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsx39(Link, { component: LinkComponent, href, sx: { display: "contents" }, children: logo });
|
|
5822
5814
|
};
|
|
5823
5815
|
var AnimatedLogo = () => {
|
|
5824
5816
|
return /* @__PURE__ */ jsxs22(
|
|
@@ -5830,7 +5822,7 @@ var AnimatedLogo = () => {
|
|
|
5830
5822
|
fill: "none",
|
|
5831
5823
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5832
5824
|
children: [
|
|
5833
|
-
/* @__PURE__ */
|
|
5825
|
+
/* @__PURE__ */ jsx39("style", { children: `
|
|
5834
5826
|
@keyframes fadeIn {
|
|
5835
5827
|
from {
|
|
5836
5828
|
opacity: 0;
|
|
@@ -5891,7 +5883,7 @@ var AnimatedLogo = () => {
|
|
|
5891
5883
|
transform-origin: center;
|
|
5892
5884
|
}
|
|
5893
5885
|
` }),
|
|
5894
|
-
/* @__PURE__ */
|
|
5886
|
+
/* @__PURE__ */ jsx39(
|
|
5895
5887
|
"rect",
|
|
5896
5888
|
{
|
|
5897
5889
|
className: "background-rect",
|
|
@@ -5902,7 +5894,7 @@ var AnimatedLogo = () => {
|
|
|
5902
5894
|
fill: "white"
|
|
5903
5895
|
}
|
|
5904
5896
|
),
|
|
5905
|
-
/* @__PURE__ */
|
|
5897
|
+
/* @__PURE__ */ jsx39(
|
|
5906
5898
|
"path",
|
|
5907
5899
|
{
|
|
5908
5900
|
className: "bars",
|
|
@@ -5910,7 +5902,7 @@ var AnimatedLogo = () => {
|
|
|
5910
5902
|
fill: "#5E30EB"
|
|
5911
5903
|
}
|
|
5912
5904
|
),
|
|
5913
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsx39(
|
|
5914
5906
|
"path",
|
|
5915
5907
|
{
|
|
5916
5908
|
className: "d-letter",
|
|
@@ -5930,7 +5922,7 @@ import { DataGrid } from "@mui/x-data-grid";
|
|
|
5930
5922
|
// src/components/Table/components/TableNoRows.tsx
|
|
5931
5923
|
import Box3 from "@mui/material/Box";
|
|
5932
5924
|
import { styled } from "@mui/material/styles";
|
|
5933
|
-
import { jsx as
|
|
5925
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
5934
5926
|
var StyledGridOverlay = styled("div")(({ theme }) => ({
|
|
5935
5927
|
display: "flex",
|
|
5936
5928
|
flexDirection: "column",
|
|
@@ -5940,7 +5932,7 @@ var StyledGridOverlay = styled("div")(({ theme }) => ({
|
|
|
5940
5932
|
height: "100%"
|
|
5941
5933
|
}));
|
|
5942
5934
|
var TableNoRows = ({ noRowsTitle = "No Rows" }) => {
|
|
5943
|
-
return /* @__PURE__ */
|
|
5935
|
+
return /* @__PURE__ */ jsx40(StyledGridOverlay, { children: /* @__PURE__ */ jsx40(Box3, { sx: { mt: 1 }, children: noRowsTitle }) });
|
|
5944
5936
|
};
|
|
5945
5937
|
var TableNoRows_default = TableNoRows;
|
|
5946
5938
|
|
|
@@ -5957,7 +5949,7 @@ import {
|
|
|
5957
5949
|
gridRowCountSelector,
|
|
5958
5950
|
gridPageCountSelector
|
|
5959
5951
|
} from "@mui/x-data-grid";
|
|
5960
|
-
import { jsx as
|
|
5952
|
+
import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5961
5953
|
var TablePagination = () => {
|
|
5962
5954
|
const apiRef = useGridApiContext();
|
|
5963
5955
|
const page = useGridSelector(apiRef, gridPageSelector);
|
|
@@ -5982,7 +5974,7 @@ var TablePagination = () => {
|
|
|
5982
5974
|
alignItems: { xs: "flex-start", md: "center" },
|
|
5983
5975
|
spacing: 2,
|
|
5984
5976
|
children: [
|
|
5985
|
-
/* @__PURE__ */
|
|
5977
|
+
/* @__PURE__ */ jsx41(
|
|
5986
5978
|
Pagination,
|
|
5987
5979
|
{
|
|
5988
5980
|
size: "medium",
|
|
@@ -5994,10 +5986,10 @@ var TablePagination = () => {
|
|
|
5994
5986
|
showFirstButton: true,
|
|
5995
5987
|
showLastButton: true,
|
|
5996
5988
|
onChange: (_, value) => apiRef.current.setPage(value - 1),
|
|
5997
|
-
renderItem: (item) => /* @__PURE__ */
|
|
5989
|
+
renderItem: (item) => /* @__PURE__ */ jsx41(PaginationItem, { ...item })
|
|
5998
5990
|
}
|
|
5999
5991
|
),
|
|
6000
|
-
/* @__PURE__ */
|
|
5992
|
+
/* @__PURE__ */ jsx41(Stack, { direction: "row", alignItems: "center", spacing: 1, children: /* @__PURE__ */ jsxs23(Typography, { variant: "body2", color: "text.secondary", children: [
|
|
6001
5993
|
pageSize,
|
|
6002
5994
|
" Items per page"
|
|
6003
5995
|
] }) })
|
|
@@ -6014,10 +6006,10 @@ var TablePagination = () => {
|
|
|
6014
6006
|
};
|
|
6015
6007
|
|
|
6016
6008
|
// src/components/Table/Table.tsx
|
|
6017
|
-
import { jsx as
|
|
6009
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
6018
6010
|
var Table = (props) => {
|
|
6019
6011
|
const { data, showToolbar = false, ...rest } = props;
|
|
6020
|
-
return /* @__PURE__ */
|
|
6012
|
+
return /* @__PURE__ */ jsx42(Box4, { children: /* @__PURE__ */ jsx42(
|
|
6021
6013
|
DataGrid,
|
|
6022
6014
|
{
|
|
6023
6015
|
rowHeight: 64,
|
|
@@ -6069,7 +6061,7 @@ var imageClasses = {
|
|
|
6069
6061
|
};
|
|
6070
6062
|
|
|
6071
6063
|
// src/components/Image/index.tsx
|
|
6072
|
-
import { jsx as
|
|
6064
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6073
6065
|
var Image = forwardRef(function Image2(props, ref) {
|
|
6074
6066
|
const {
|
|
6075
6067
|
src,
|
|
@@ -6183,7 +6175,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6183
6175
|
},
|
|
6184
6176
|
...rest,
|
|
6185
6177
|
children: [
|
|
6186
|
-
showLoader && (loadingIndicator ?? /* @__PURE__ */
|
|
6178
|
+
showLoader && (loadingIndicator ?? /* @__PURE__ */ jsx43(
|
|
6187
6179
|
Skeleton,
|
|
6188
6180
|
{
|
|
6189
6181
|
animation: "wave",
|
|
@@ -6198,7 +6190,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6198
6190
|
}
|
|
6199
6191
|
}
|
|
6200
6192
|
)),
|
|
6201
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsx43(
|
|
6202
6194
|
Box5,
|
|
6203
6195
|
{
|
|
6204
6196
|
ref: setRefs,
|
|
@@ -6227,7 +6219,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6227
6219
|
}
|
|
6228
6220
|
}
|
|
6229
6221
|
),
|
|
6230
|
-
withOverlay && !showError && /* @__PURE__ */
|
|
6222
|
+
withOverlay && !showError && /* @__PURE__ */ jsx43(
|
|
6231
6223
|
Box5,
|
|
6232
6224
|
{
|
|
6233
6225
|
className: imageClasses.overlay,
|
|
@@ -6239,7 +6231,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6239
6231
|
children: overlay
|
|
6240
6232
|
}
|
|
6241
6233
|
),
|
|
6242
|
-
showError && (renderError ?? /* @__PURE__ */
|
|
6234
|
+
showError && (renderError ?? /* @__PURE__ */ jsx43(
|
|
6243
6235
|
Box5,
|
|
6244
6236
|
{
|
|
6245
6237
|
className: imageClasses.overlay,
|
|
@@ -6272,7 +6264,7 @@ import FormHelperText from "@mui/material/FormHelperText";
|
|
|
6272
6264
|
// src/components/Upload/components/Placeholder.tsx
|
|
6273
6265
|
import Stack2 from "@mui/material/Stack";
|
|
6274
6266
|
import Box6 from "@mui/material/Box";
|
|
6275
|
-
import { jsx as
|
|
6267
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6276
6268
|
var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
6277
6269
|
return /* @__PURE__ */ jsxs25(
|
|
6278
6270
|
Box6,
|
|
@@ -6285,7 +6277,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6285
6277
|
},
|
|
6286
6278
|
...rest,
|
|
6287
6279
|
children: [
|
|
6288
|
-
/* @__PURE__ */
|
|
6280
|
+
/* @__PURE__ */ jsx44(
|
|
6289
6281
|
Icon,
|
|
6290
6282
|
{
|
|
6291
6283
|
icon: "CloudUpload",
|
|
@@ -6299,7 +6291,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6299
6291
|
/* @__PURE__ */ jsxs25(Stack2, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
|
|
6300
6292
|
/* @__PURE__ */ jsxs25(Box6, { sx: { typography: "h8" }, children: [
|
|
6301
6293
|
"Drag files here or",
|
|
6302
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ jsx44(
|
|
6303
6295
|
Box6,
|
|
6304
6296
|
{
|
|
6305
6297
|
component: "span",
|
|
@@ -6367,12 +6359,12 @@ var fileData = (file) => {
|
|
|
6367
6359
|
};
|
|
6368
6360
|
|
|
6369
6361
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6370
|
-
import { jsx as
|
|
6362
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6371
6363
|
var RejectionFiles = ({ files }) => {
|
|
6372
6364
|
if (!files.length) {
|
|
6373
6365
|
return null;
|
|
6374
6366
|
}
|
|
6375
|
-
return /* @__PURE__ */
|
|
6367
|
+
return /* @__PURE__ */ jsx45(
|
|
6376
6368
|
Paper,
|
|
6377
6369
|
{
|
|
6378
6370
|
variant: "outlined",
|
|
@@ -6406,7 +6398,7 @@ var RejectionFiles = ({ files }) => {
|
|
|
6406
6398
|
// src/components/Upload/components/UploadProgress.tsx
|
|
6407
6399
|
import Box8 from "@mui/material/Box";
|
|
6408
6400
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
6409
|
-
import { jsx as
|
|
6401
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6410
6402
|
var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
6411
6403
|
return /* @__PURE__ */ jsxs27(
|
|
6412
6404
|
Box8,
|
|
@@ -6420,7 +6412,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6420
6412
|
},
|
|
6421
6413
|
children: [
|
|
6422
6414
|
/* @__PURE__ */ jsxs27(Box8, { sx: { position: "relative", display: "inline-flex" }, children: [
|
|
6423
|
-
/* @__PURE__ */
|
|
6415
|
+
/* @__PURE__ */ jsx46(
|
|
6424
6416
|
CircularProgress,
|
|
6425
6417
|
{
|
|
6426
6418
|
variant: "determinate",
|
|
@@ -6433,7 +6425,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6433
6425
|
}
|
|
6434
6426
|
}
|
|
6435
6427
|
),
|
|
6436
|
-
/* @__PURE__ */
|
|
6428
|
+
/* @__PURE__ */ jsx46(
|
|
6437
6429
|
CircularProgress,
|
|
6438
6430
|
{
|
|
6439
6431
|
variant: "determinate",
|
|
@@ -6445,7 +6437,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6445
6437
|
}
|
|
6446
6438
|
}
|
|
6447
6439
|
),
|
|
6448
|
-
/* @__PURE__ */
|
|
6440
|
+
/* @__PURE__ */ jsx46(
|
|
6449
6441
|
Box8,
|
|
6450
6442
|
{
|
|
6451
6443
|
sx: {
|
|
@@ -6458,11 +6450,11 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6458
6450
|
alignItems: "center",
|
|
6459
6451
|
justifyContent: "center"
|
|
6460
6452
|
},
|
|
6461
|
-
children: /* @__PURE__ */
|
|
6453
|
+
children: /* @__PURE__ */ jsx46(Box8, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
|
|
6462
6454
|
}
|
|
6463
6455
|
)
|
|
6464
6456
|
] }),
|
|
6465
|
-
/* @__PURE__ */
|
|
6457
|
+
/* @__PURE__ */ jsx46(Box8, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
|
|
6466
6458
|
]
|
|
6467
6459
|
}
|
|
6468
6460
|
);
|
|
@@ -6476,11 +6468,11 @@ import IconButton2 from "@mui/material/IconButton";
|
|
|
6476
6468
|
// src/components/Upload/components/SingleFilePreview.tsx
|
|
6477
6469
|
import Box9 from "@mui/material/Box";
|
|
6478
6470
|
import IconButton from "@mui/material/IconButton";
|
|
6479
|
-
import { jsx as
|
|
6471
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
6480
6472
|
var SingleFilePreview = ({ file }) => {
|
|
6481
6473
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6482
6474
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6483
|
-
const renderImg = /* @__PURE__ */
|
|
6475
|
+
const renderImg = /* @__PURE__ */ jsx47(
|
|
6484
6476
|
Box9,
|
|
6485
6477
|
{
|
|
6486
6478
|
component: "img",
|
|
@@ -6494,7 +6486,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6494
6486
|
}
|
|
6495
6487
|
}
|
|
6496
6488
|
);
|
|
6497
|
-
return /* @__PURE__ */
|
|
6489
|
+
return /* @__PURE__ */ jsx47(
|
|
6498
6490
|
Box9,
|
|
6499
6491
|
{
|
|
6500
6492
|
sx: {
|
|
@@ -6510,7 +6502,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6510
6502
|
);
|
|
6511
6503
|
};
|
|
6512
6504
|
var DeleteButton = ({ sx, ...rest }) => {
|
|
6513
|
-
return /* @__PURE__ */
|
|
6505
|
+
return /* @__PURE__ */ jsx47(
|
|
6514
6506
|
IconButton,
|
|
6515
6507
|
{
|
|
6516
6508
|
size: "small",
|
|
@@ -6529,13 +6521,13 @@ var DeleteButton = ({ sx, ...rest }) => {
|
|
|
6529
6521
|
...sx
|
|
6530
6522
|
},
|
|
6531
6523
|
...rest,
|
|
6532
|
-
children: /* @__PURE__ */
|
|
6524
|
+
children: /* @__PURE__ */ jsx47(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
|
|
6533
6525
|
}
|
|
6534
6526
|
);
|
|
6535
6527
|
};
|
|
6536
6528
|
|
|
6537
6529
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6538
|
-
import { jsx as
|
|
6530
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6539
6531
|
var MultiFilePreview = ({ files, onRemove }) => {
|
|
6540
6532
|
const scrollRef = useRef5(null);
|
|
6541
6533
|
const handleScroll = (direction) => {
|
|
@@ -6550,7 +6542,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6550
6542
|
};
|
|
6551
6543
|
const showNavigation = files.length > 2;
|
|
6552
6544
|
return /* @__PURE__ */ jsxs28(Box10, { sx: { position: "relative", width: 1 }, children: [
|
|
6553
|
-
showNavigation && /* @__PURE__ */
|
|
6545
|
+
showNavigation && /* @__PURE__ */ jsx48(
|
|
6554
6546
|
IconButton2,
|
|
6555
6547
|
{
|
|
6556
6548
|
size: "small",
|
|
@@ -6567,10 +6559,10 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6567
6559
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6568
6560
|
}
|
|
6569
6561
|
},
|
|
6570
|
-
children: /* @__PURE__ */
|
|
6562
|
+
children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowLeft", width: 20 })
|
|
6571
6563
|
}
|
|
6572
6564
|
),
|
|
6573
|
-
/* @__PURE__ */
|
|
6565
|
+
/* @__PURE__ */ jsx48(
|
|
6574
6566
|
Box10,
|
|
6575
6567
|
{
|
|
6576
6568
|
ref: scrollRef,
|
|
@@ -6601,7 +6593,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6601
6593
|
flexShrink: 0
|
|
6602
6594
|
},
|
|
6603
6595
|
children: [
|
|
6604
|
-
/* @__PURE__ */
|
|
6596
|
+
/* @__PURE__ */ jsx48(
|
|
6605
6597
|
Box10,
|
|
6606
6598
|
{
|
|
6607
6599
|
component: "img",
|
|
@@ -6615,7 +6607,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6615
6607
|
}
|
|
6616
6608
|
}
|
|
6617
6609
|
),
|
|
6618
|
-
onRemove && /* @__PURE__ */
|
|
6610
|
+
onRemove && /* @__PURE__ */ jsx48(
|
|
6619
6611
|
DeleteButton,
|
|
6620
6612
|
{
|
|
6621
6613
|
onClick: (e) => {
|
|
@@ -6631,7 +6623,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6631
6623
|
})
|
|
6632
6624
|
}
|
|
6633
6625
|
),
|
|
6634
|
-
showNavigation && /* @__PURE__ */
|
|
6626
|
+
showNavigation && /* @__PURE__ */ jsx48(
|
|
6635
6627
|
IconButton2,
|
|
6636
6628
|
{
|
|
6637
6629
|
size: "small",
|
|
@@ -6648,14 +6640,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6648
6640
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6649
6641
|
}
|
|
6650
6642
|
},
|
|
6651
|
-
children: /* @__PURE__ */
|
|
6643
|
+
children: /* @__PURE__ */ jsx48(Icon, { icon: "NavArrowRight", width: 20 })
|
|
6652
6644
|
}
|
|
6653
6645
|
)
|
|
6654
6646
|
] });
|
|
6655
6647
|
};
|
|
6656
6648
|
|
|
6657
6649
|
// src/components/Upload/Upload.tsx
|
|
6658
|
-
import { jsx as
|
|
6650
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6659
6651
|
var Upload = ({
|
|
6660
6652
|
sx,
|
|
6661
6653
|
value,
|
|
@@ -6682,15 +6674,15 @@ var Upload = ({
|
|
|
6682
6674
|
const hasError = isDragReject || !!error2;
|
|
6683
6675
|
const renderContent = () => {
|
|
6684
6676
|
if (isUploading) {
|
|
6685
|
-
return /* @__PURE__ */
|
|
6677
|
+
return /* @__PURE__ */ jsx49(UploadProgress, { progress: uploadProgress });
|
|
6686
6678
|
}
|
|
6687
6679
|
if (hasFile) {
|
|
6688
|
-
return /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ jsx49(SingleFilePreview, { file: value });
|
|
6689
6681
|
}
|
|
6690
6682
|
if (hasFiles) {
|
|
6691
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsx49(MultiFilePreview, { files: value, onRemove });
|
|
6692
6684
|
}
|
|
6693
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsx49(UploadPlaceholder, { hasError });
|
|
6694
6686
|
};
|
|
6695
6687
|
const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
|
|
6696
6688
|
return /* @__PURE__ */ jsxs29(Box11, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
@@ -6733,37 +6725,37 @@ var Upload = ({
|
|
|
6733
6725
|
}
|
|
6734
6726
|
},
|
|
6735
6727
|
children: [
|
|
6736
|
-
shouldShowDropzone && /* @__PURE__ */
|
|
6728
|
+
shouldShowDropzone && /* @__PURE__ */ jsx49("input", { ...getInputProps() }),
|
|
6737
6729
|
renderContent()
|
|
6738
6730
|
]
|
|
6739
6731
|
}
|
|
6740
6732
|
),
|
|
6741
|
-
hasFile && !isUploading && /* @__PURE__ */
|
|
6733
|
+
hasFile && !isUploading && /* @__PURE__ */ jsx49(DeleteButton, { onClick: onDelete }),
|
|
6742
6734
|
hasFiles && /* @__PURE__ */ jsxs29(Stack3, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
|
|
6743
|
-
onRemoveAll && /* @__PURE__ */
|
|
6735
|
+
onRemoveAll && /* @__PURE__ */ jsx49(
|
|
6744
6736
|
Button,
|
|
6745
6737
|
{
|
|
6746
6738
|
variant: "outlined",
|
|
6747
6739
|
color: "inherit",
|
|
6748
6740
|
size: "small",
|
|
6749
6741
|
onClick: onRemoveAll,
|
|
6750
|
-
startIcon: /* @__PURE__ */
|
|
6742
|
+
startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
|
|
6751
6743
|
children: "Remove all"
|
|
6752
6744
|
}
|
|
6753
6745
|
),
|
|
6754
|
-
onUpload && /* @__PURE__ */
|
|
6746
|
+
onUpload && /* @__PURE__ */ jsx49(
|
|
6755
6747
|
Button,
|
|
6756
6748
|
{
|
|
6757
6749
|
variant: "contained",
|
|
6758
6750
|
size: "small",
|
|
6759
6751
|
onClick: onUpload,
|
|
6760
|
-
startIcon: /* @__PURE__ */
|
|
6752
|
+
startIcon: /* @__PURE__ */ jsx49(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
|
|
6761
6753
|
children: "Upload files"
|
|
6762
6754
|
}
|
|
6763
6755
|
)
|
|
6764
6756
|
] }),
|
|
6765
|
-
helperText && /* @__PURE__ */
|
|
6766
|
-
/* @__PURE__ */
|
|
6757
|
+
helperText && /* @__PURE__ */ jsx49(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
|
|
6758
|
+
/* @__PURE__ */ jsx49(RejectionFiles, { files: [...fileRejections] })
|
|
6767
6759
|
] });
|
|
6768
6760
|
};
|
|
6769
6761
|
|
|
@@ -6772,14 +6764,14 @@ import {
|
|
|
6772
6764
|
FormProvider as RHFForm
|
|
6773
6765
|
} from "react-hook-form";
|
|
6774
6766
|
import Box12 from "@mui/material/Box";
|
|
6775
|
-
import { jsx as
|
|
6767
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
6776
6768
|
var Form = ({
|
|
6777
6769
|
children,
|
|
6778
6770
|
onSubmit,
|
|
6779
6771
|
methods,
|
|
6780
6772
|
...rest
|
|
6781
6773
|
}) => {
|
|
6782
|
-
return /* @__PURE__ */
|
|
6774
|
+
return /* @__PURE__ */ jsx50(RHFForm, { ...methods, children: /* @__PURE__ */ jsx50(
|
|
6783
6775
|
Box12,
|
|
6784
6776
|
{
|
|
6785
6777
|
component: "form",
|
|
@@ -6808,7 +6800,7 @@ import FormLabel from "@mui/material/FormLabel";
|
|
|
6808
6800
|
import FormControl from "@mui/material/FormControl";
|
|
6809
6801
|
import FormHelperText2 from "@mui/material/FormHelperText";
|
|
6810
6802
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
6811
|
-
import { jsx as
|
|
6803
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6812
6804
|
var RHFSwitch = ({
|
|
6813
6805
|
name,
|
|
6814
6806
|
description,
|
|
@@ -6820,16 +6812,16 @@ var RHFSwitch = ({
|
|
|
6820
6812
|
}) => {
|
|
6821
6813
|
const { control } = useFormContext();
|
|
6822
6814
|
const baseAriaLabel = `Switch ${name}`;
|
|
6823
|
-
return /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsx51(
|
|
6824
6816
|
Controller,
|
|
6825
6817
|
{
|
|
6826
6818
|
name,
|
|
6827
6819
|
control,
|
|
6828
6820
|
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs30(Box13, { sx: slotProps?.wrap, children: [
|
|
6829
|
-
/* @__PURE__ */
|
|
6821
|
+
/* @__PURE__ */ jsx51(
|
|
6830
6822
|
FormControlLabel,
|
|
6831
6823
|
{
|
|
6832
|
-
control: /* @__PURE__ */
|
|
6824
|
+
control: /* @__PURE__ */ jsx51(
|
|
6833
6825
|
Switch,
|
|
6834
6826
|
{
|
|
6835
6827
|
...field,
|
|
@@ -6845,8 +6837,8 @@ var RHFSwitch = ({
|
|
|
6845
6837
|
}
|
|
6846
6838
|
),
|
|
6847
6839
|
label: /* @__PURE__ */ jsxs30(Stack4, { children: [
|
|
6848
|
-
/* @__PURE__ */
|
|
6849
|
-
description && /* @__PURE__ */
|
|
6840
|
+
/* @__PURE__ */ jsx51(Typography3, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
6841
|
+
description && /* @__PURE__ */ jsx51(Typography3, { variant: "body2", color: "textBody", children: description })
|
|
6850
6842
|
] }),
|
|
6851
6843
|
sx: {
|
|
6852
6844
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -6855,7 +6847,7 @@ var RHFSwitch = ({
|
|
|
6855
6847
|
...other
|
|
6856
6848
|
}
|
|
6857
6849
|
),
|
|
6858
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
6850
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx51(
|
|
6859
6851
|
FormHelperText2,
|
|
6860
6852
|
{
|
|
6861
6853
|
error: !!error2,
|
|
@@ -6878,7 +6870,7 @@ var RHFMultiSwitch = ({
|
|
|
6878
6870
|
}) => {
|
|
6879
6871
|
const { control } = useFormContext();
|
|
6880
6872
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
6881
|
-
return /* @__PURE__ */
|
|
6873
|
+
return /* @__PURE__ */ jsx51(
|
|
6882
6874
|
Controller,
|
|
6883
6875
|
{
|
|
6884
6876
|
name,
|
|
@@ -6890,7 +6882,7 @@ var RHFMultiSwitch = ({
|
|
|
6890
6882
|
sx: slotProps?.formControl?.sx,
|
|
6891
6883
|
...slotProps?.formControl,
|
|
6892
6884
|
children: [
|
|
6893
|
-
label && /* @__PURE__ */
|
|
6885
|
+
label && /* @__PURE__ */ jsx51(
|
|
6894
6886
|
FormLabel,
|
|
6895
6887
|
{
|
|
6896
6888
|
component: "legend",
|
|
@@ -6899,12 +6891,12 @@ var RHFMultiSwitch = ({
|
|
|
6899
6891
|
children: label
|
|
6900
6892
|
}
|
|
6901
6893
|
),
|
|
6902
|
-
/* @__PURE__ */
|
|
6894
|
+
/* @__PURE__ */ jsx51(FormGroup, { ...other, children: options.map((option) => {
|
|
6903
6895
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
6904
|
-
return /* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsx51(
|
|
6905
6897
|
FormControlLabel,
|
|
6906
6898
|
{
|
|
6907
|
-
control: /* @__PURE__ */
|
|
6899
|
+
control: /* @__PURE__ */ jsx51(
|
|
6908
6900
|
Switch,
|
|
6909
6901
|
{
|
|
6910
6902
|
checked: (field.value || []).includes(option.value),
|
|
@@ -6927,7 +6919,7 @@ var RHFMultiSwitch = ({
|
|
|
6927
6919
|
option.value
|
|
6928
6920
|
);
|
|
6929
6921
|
}) }),
|
|
6930
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
6922
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx51(FormHelperText2, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
6931
6923
|
]
|
|
6932
6924
|
}
|
|
6933
6925
|
)
|
|
@@ -6937,10 +6929,10 @@ var RHFMultiSwitch = ({
|
|
|
6937
6929
|
|
|
6938
6930
|
// src/components/HookForm/RHFUpload.tsx
|
|
6939
6931
|
import { Controller as Controller2, useFormContext as useFormContext2 } from "react-hook-form";
|
|
6940
|
-
import { jsx as
|
|
6932
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
6941
6933
|
var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
6942
6934
|
const { control, setValue } = useFormContext2();
|
|
6943
|
-
return /* @__PURE__ */
|
|
6935
|
+
return /* @__PURE__ */ jsx52(
|
|
6944
6936
|
Controller2,
|
|
6945
6937
|
{
|
|
6946
6938
|
name,
|
|
@@ -6968,7 +6960,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
6968
6960
|
const onRemoveAll = () => {
|
|
6969
6961
|
setValue(name, [], { shouldValidate: true });
|
|
6970
6962
|
};
|
|
6971
|
-
return /* @__PURE__ */
|
|
6963
|
+
return /* @__PURE__ */ jsx52(
|
|
6972
6964
|
Upload,
|
|
6973
6965
|
{
|
|
6974
6966
|
multiple,
|
|
@@ -6998,7 +6990,7 @@ import Box14 from "@mui/material/Box";
|
|
|
6998
6990
|
import FormHelperText3 from "@mui/material/FormHelperText";
|
|
6999
6991
|
import { inputBaseClasses as inputBaseClasses3 } from "@mui/material/InputBase";
|
|
7000
6992
|
import TextField from "@mui/material/TextField";
|
|
7001
|
-
import { Fragment, jsx as
|
|
6993
|
+
import { Fragment, jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7002
6994
|
var OTPInput = (props) => {
|
|
7003
6995
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
7004
6996
|
const theme = useTheme2();
|
|
@@ -7067,18 +7059,17 @@ var OTPInput = (props) => {
|
|
|
7067
7059
|
}
|
|
7068
7060
|
};
|
|
7069
7061
|
return /* @__PURE__ */ jsxs31(Fragment, { children: [
|
|
7070
|
-
/* @__PURE__ */
|
|
7062
|
+
/* @__PURE__ */ jsx53(Box14, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx53(
|
|
7071
7063
|
Box14,
|
|
7072
7064
|
{
|
|
7073
7065
|
display: "flex",
|
|
7074
7066
|
alignItems: "center",
|
|
7075
7067
|
sx: {
|
|
7076
|
-
width: "100%",
|
|
7077
7068
|
"&:not(:last-of-type)": {
|
|
7078
7069
|
mr: 1.5
|
|
7079
7070
|
}
|
|
7080
7071
|
},
|
|
7081
|
-
children: /* @__PURE__ */
|
|
7072
|
+
children: /* @__PURE__ */ jsx53(
|
|
7082
7073
|
TextField,
|
|
7083
7074
|
{
|
|
7084
7075
|
size: "medium",
|
|
@@ -7161,21 +7152,21 @@ var OTPInput = (props) => {
|
|
|
7161
7152
|
},
|
|
7162
7153
|
index
|
|
7163
7154
|
)) }),
|
|
7164
|
-
error2 && /* @__PURE__ */
|
|
7155
|
+
error2 && /* @__PURE__ */ jsx53(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
|
|
7165
7156
|
] });
|
|
7166
7157
|
};
|
|
7167
7158
|
var OTPInput_default = OTPInput;
|
|
7168
7159
|
|
|
7169
7160
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
7170
|
-
import { jsx as
|
|
7161
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
7171
7162
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
7172
7163
|
const { control, setValue } = useFormContext3();
|
|
7173
|
-
return /* @__PURE__ */
|
|
7164
|
+
return /* @__PURE__ */ jsx54(
|
|
7174
7165
|
Controller3,
|
|
7175
7166
|
{
|
|
7176
7167
|
name,
|
|
7177
7168
|
control,
|
|
7178
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7169
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx54(
|
|
7179
7170
|
OTPInput_default,
|
|
7180
7171
|
{
|
|
7181
7172
|
length,
|
|
@@ -7195,16 +7186,16 @@ import { Controller as Controller4, useFormContext as useFormContext4 } from "re
|
|
|
7195
7186
|
import IconButton3 from "@mui/material/IconButton";
|
|
7196
7187
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
7197
7188
|
import TextField2 from "@mui/material/TextField";
|
|
7198
|
-
import { jsx as
|
|
7189
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7199
7190
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
7200
7191
|
const { control } = useFormContext4();
|
|
7201
7192
|
const passwordVisibility = useBoolean();
|
|
7202
|
-
return /* @__PURE__ */
|
|
7193
|
+
return /* @__PURE__ */ jsx55(
|
|
7203
7194
|
Controller4,
|
|
7204
7195
|
{
|
|
7205
7196
|
name,
|
|
7206
7197
|
control,
|
|
7207
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7198
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
|
|
7208
7199
|
TextField2,
|
|
7209
7200
|
{
|
|
7210
7201
|
...field,
|
|
@@ -7225,7 +7216,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7225
7216
|
input: {
|
|
7226
7217
|
...slotProps?.input,
|
|
7227
7218
|
...type === "password" && {
|
|
7228
|
-
endAdornment: /* @__PURE__ */
|
|
7219
|
+
endAdornment: /* @__PURE__ */ jsx55(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx55(IconButton3, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx55(
|
|
7229
7220
|
Icon,
|
|
7230
7221
|
{
|
|
7231
7222
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -7252,7 +7243,7 @@ import FormLabel2 from "@mui/material/FormLabel";
|
|
|
7252
7243
|
import RadioGroup from "@mui/material/RadioGroup";
|
|
7253
7244
|
import FormControl2 from "@mui/material/FormControl";
|
|
7254
7245
|
import FormHelperText4 from "@mui/material/FormHelperText";
|
|
7255
|
-
import { jsx as
|
|
7246
|
+
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7256
7247
|
var RHFRadioGroup = ({
|
|
7257
7248
|
name,
|
|
7258
7249
|
label,
|
|
@@ -7264,13 +7255,13 @@ var RHFRadioGroup = ({
|
|
|
7264
7255
|
const { control } = useFormContext5();
|
|
7265
7256
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
7266
7257
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
7267
|
-
return /* @__PURE__ */
|
|
7258
|
+
return /* @__PURE__ */ jsx56(
|
|
7268
7259
|
Controller5,
|
|
7269
7260
|
{
|
|
7270
7261
|
name,
|
|
7271
7262
|
control,
|
|
7272
7263
|
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs32(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
7273
|
-
label && /* @__PURE__ */
|
|
7264
|
+
label && /* @__PURE__ */ jsx56(
|
|
7274
7265
|
FormLabel2,
|
|
7275
7266
|
{
|
|
7276
7267
|
id: labelledby,
|
|
@@ -7280,11 +7271,11 @@ var RHFRadioGroup = ({
|
|
|
7280
7271
|
children: label
|
|
7281
7272
|
}
|
|
7282
7273
|
),
|
|
7283
|
-
/* @__PURE__ */
|
|
7274
|
+
/* @__PURE__ */ jsx56(RadioGroup, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx56(
|
|
7284
7275
|
FormControlLabel2,
|
|
7285
7276
|
{
|
|
7286
7277
|
value: option.value,
|
|
7287
|
-
control: /* @__PURE__ */
|
|
7278
|
+
control: /* @__PURE__ */ jsx56(
|
|
7288
7279
|
Radio,
|
|
7289
7280
|
{
|
|
7290
7281
|
...slotProps?.radio,
|
|
@@ -7297,8 +7288,8 @@ var RHFRadioGroup = ({
|
|
|
7297
7288
|
}
|
|
7298
7289
|
),
|
|
7299
7290
|
label: /* @__PURE__ */ jsxs32(Stack5, { children: [
|
|
7300
|
-
/* @__PURE__ */
|
|
7301
|
-
option?.description && /* @__PURE__ */
|
|
7291
|
+
/* @__PURE__ */ jsx56(Typography4, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7292
|
+
option?.description && /* @__PURE__ */ jsx56(Typography4, { variant: "body2", color: "textBody", children: option?.description })
|
|
7302
7293
|
] }),
|
|
7303
7294
|
sx: {
|
|
7304
7295
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7306,7 +7297,7 @@ var RHFRadioGroup = ({
|
|
|
7306
7297
|
},
|
|
7307
7298
|
option.value
|
|
7308
7299
|
)) }),
|
|
7309
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7300
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx56(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7310
7301
|
] })
|
|
7311
7302
|
}
|
|
7312
7303
|
);
|
|
@@ -7316,7 +7307,7 @@ var RHFRadioGroup = ({
|
|
|
7316
7307
|
import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
|
|
7317
7308
|
import TextField3 from "@mui/material/TextField";
|
|
7318
7309
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
7319
|
-
import { jsx as
|
|
7310
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7320
7311
|
var RHFAutocomplete = ({
|
|
7321
7312
|
name,
|
|
7322
7313
|
label,
|
|
@@ -7327,12 +7318,12 @@ var RHFAutocomplete = ({
|
|
|
7327
7318
|
...other
|
|
7328
7319
|
}) => {
|
|
7329
7320
|
const { control, setValue } = useFormContext6();
|
|
7330
|
-
return /* @__PURE__ */
|
|
7321
|
+
return /* @__PURE__ */ jsx57(
|
|
7331
7322
|
Controller6,
|
|
7332
7323
|
{
|
|
7333
7324
|
name,
|
|
7334
7325
|
control,
|
|
7335
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7326
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx57(
|
|
7336
7327
|
Autocomplete,
|
|
7337
7328
|
{
|
|
7338
7329
|
...field,
|
|
@@ -7341,7 +7332,7 @@ var RHFAutocomplete = ({
|
|
|
7341
7332
|
setValue(name, newValue, { shouldValidate: true });
|
|
7342
7333
|
handleChange?.(newValue);
|
|
7343
7334
|
},
|
|
7344
|
-
renderInput: (params) => /* @__PURE__ */
|
|
7335
|
+
renderInput: (params) => /* @__PURE__ */ jsx57(
|
|
7345
7336
|
TextField3,
|
|
7346
7337
|
{
|
|
7347
7338
|
label,
|
|
@@ -7370,7 +7361,7 @@ import FormLabel3 from "@mui/material/FormLabel";
|
|
|
7370
7361
|
import FormControl3 from "@mui/material/FormControl";
|
|
7371
7362
|
import FormHelperText5 from "@mui/material/FormHelperText";
|
|
7372
7363
|
import FormControlLabel3 from "@mui/material/FormControlLabel";
|
|
7373
|
-
import { jsx as
|
|
7364
|
+
import { jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7374
7365
|
var RHFCheckbox = ({
|
|
7375
7366
|
name,
|
|
7376
7367
|
description,
|
|
@@ -7382,16 +7373,16 @@ var RHFCheckbox = ({
|
|
|
7382
7373
|
}) => {
|
|
7383
7374
|
const { control } = useFormContext7();
|
|
7384
7375
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
7385
|
-
return /* @__PURE__ */
|
|
7376
|
+
return /* @__PURE__ */ jsx58(
|
|
7386
7377
|
Controller7,
|
|
7387
7378
|
{
|
|
7388
7379
|
name,
|
|
7389
7380
|
control,
|
|
7390
7381
|
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(Box15, { sx: slotProps?.wrap, children: [
|
|
7391
|
-
/* @__PURE__ */
|
|
7382
|
+
/* @__PURE__ */ jsx58(
|
|
7392
7383
|
FormControlLabel3,
|
|
7393
7384
|
{
|
|
7394
|
-
control: /* @__PURE__ */
|
|
7385
|
+
control: /* @__PURE__ */ jsx58(
|
|
7395
7386
|
Checkbox,
|
|
7396
7387
|
{
|
|
7397
7388
|
...field,
|
|
@@ -7407,8 +7398,8 @@ var RHFCheckbox = ({
|
|
|
7407
7398
|
}
|
|
7408
7399
|
),
|
|
7409
7400
|
label: /* @__PURE__ */ jsxs33(Stack6, { children: [
|
|
7410
|
-
/* @__PURE__ */
|
|
7411
|
-
description && /* @__PURE__ */
|
|
7401
|
+
/* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7402
|
+
description && /* @__PURE__ */ jsx58(Typography5, { variant: "body2", color: "textBody", children: description })
|
|
7412
7403
|
] }),
|
|
7413
7404
|
sx: {
|
|
7414
7405
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7417,7 +7408,7 @@ var RHFCheckbox = ({
|
|
|
7417
7408
|
...other
|
|
7418
7409
|
}
|
|
7419
7410
|
),
|
|
7420
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7411
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx58(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7421
7412
|
] })
|
|
7422
7413
|
}
|
|
7423
7414
|
);
|
|
@@ -7433,7 +7424,7 @@ var RHFMultiCheckbox = ({
|
|
|
7433
7424
|
}) => {
|
|
7434
7425
|
const { control } = useFormContext7();
|
|
7435
7426
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7436
|
-
return /* @__PURE__ */
|
|
7427
|
+
return /* @__PURE__ */ jsx58(
|
|
7437
7428
|
Controller7,
|
|
7438
7429
|
{
|
|
7439
7430
|
name,
|
|
@@ -7447,7 +7438,7 @@ var RHFMultiCheckbox = ({
|
|
|
7447
7438
|
sx: slotProps?.formControl?.sx,
|
|
7448
7439
|
...slotProps?.formControl,
|
|
7449
7440
|
children: [
|
|
7450
|
-
label && /* @__PURE__ */
|
|
7441
|
+
label && /* @__PURE__ */ jsx58(
|
|
7451
7442
|
FormLabel3,
|
|
7452
7443
|
{
|
|
7453
7444
|
component: "legend",
|
|
@@ -7456,12 +7447,12 @@ var RHFMultiCheckbox = ({
|
|
|
7456
7447
|
children: label
|
|
7457
7448
|
}
|
|
7458
7449
|
),
|
|
7459
|
-
/* @__PURE__ */
|
|
7450
|
+
/* @__PURE__ */ jsx58(FormGroup2, { row, ...other, children: options.map((option) => {
|
|
7460
7451
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7461
|
-
return /* @__PURE__ */
|
|
7452
|
+
return /* @__PURE__ */ jsx58(
|
|
7462
7453
|
FormControlLabel3,
|
|
7463
7454
|
{
|
|
7464
|
-
control: /* @__PURE__ */
|
|
7455
|
+
control: /* @__PURE__ */ jsx58(
|
|
7465
7456
|
Checkbox,
|
|
7466
7457
|
{
|
|
7467
7458
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7480,8 +7471,8 @@ var RHFMultiCheckbox = ({
|
|
|
7480
7471
|
}
|
|
7481
7472
|
),
|
|
7482
7473
|
label: /* @__PURE__ */ jsxs33(Stack6, { children: [
|
|
7483
|
-
/* @__PURE__ */
|
|
7484
|
-
option?.description && /* @__PURE__ */
|
|
7474
|
+
/* @__PURE__ */ jsx58(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7475
|
+
option?.description && /* @__PURE__ */ jsx58(Typography5, { variant: "body2", color: "textBody", children: option?.description })
|
|
7485
7476
|
] }),
|
|
7486
7477
|
sx: {
|
|
7487
7478
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7490,7 +7481,7 @@ var RHFMultiCheckbox = ({
|
|
|
7490
7481
|
option.value
|
|
7491
7482
|
);
|
|
7492
7483
|
}) }),
|
|
7493
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7484
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx58(
|
|
7494
7485
|
FormHelperText5,
|
|
7495
7486
|
{
|
|
7496
7487
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -7520,17 +7511,17 @@ var Field = {
|
|
|
7520
7511
|
// src/components/CopyButton/index.tsx
|
|
7521
7512
|
import Tooltip from "@mui/material/Tooltip";
|
|
7522
7513
|
import IconButton4 from "@mui/material/IconButton";
|
|
7523
|
-
import { jsx as
|
|
7514
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
7524
7515
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
7525
7516
|
const { copy, isCopied } = useCopyToClipboard();
|
|
7526
|
-
return /* @__PURE__ */
|
|
7517
|
+
return /* @__PURE__ */ jsx59(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx59(
|
|
7527
7518
|
IconButton4,
|
|
7528
7519
|
{
|
|
7529
7520
|
size,
|
|
7530
7521
|
onClick: () => copy(text2),
|
|
7531
7522
|
"aria-label": "copy token",
|
|
7532
7523
|
sx: { color: "icon.black" },
|
|
7533
|
-
children: /* @__PURE__ */
|
|
7524
|
+
children: /* @__PURE__ */ jsx59(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
7534
7525
|
}
|
|
7535
7526
|
) });
|
|
7536
7527
|
};
|
|
@@ -7539,9 +7530,9 @@ var CopyButton = ({ text: text2, size = "small" }) => {
|
|
|
7539
7530
|
import Portal from "@mui/material/Portal";
|
|
7540
7531
|
import Box16 from "@mui/material/Box";
|
|
7541
7532
|
import LinearProgress from "@mui/material/LinearProgress";
|
|
7542
|
-
import { jsx as
|
|
7533
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7543
7534
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
7544
|
-
const content = /* @__PURE__ */
|
|
7535
|
+
const content = /* @__PURE__ */ jsx60(
|
|
7545
7536
|
Box16,
|
|
7546
7537
|
{
|
|
7547
7538
|
sx: {
|
|
@@ -7555,16 +7546,16 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
7555
7546
|
...sx
|
|
7556
7547
|
},
|
|
7557
7548
|
...rest,
|
|
7558
|
-
children: /* @__PURE__ */
|
|
7549
|
+
children: /* @__PURE__ */ jsx60(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
7559
7550
|
}
|
|
7560
7551
|
);
|
|
7561
7552
|
if (portal) {
|
|
7562
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsx60(Portal, { children: content });
|
|
7563
7554
|
}
|
|
7564
7555
|
return content;
|
|
7565
7556
|
};
|
|
7566
7557
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
7567
|
-
const content = /* @__PURE__ */
|
|
7558
|
+
const content = /* @__PURE__ */ jsx60(
|
|
7568
7559
|
Box16,
|
|
7569
7560
|
{
|
|
7570
7561
|
sx: {
|
|
@@ -7581,11 +7572,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7581
7572
|
...sx
|
|
7582
7573
|
},
|
|
7583
7574
|
...rest,
|
|
7584
|
-
children: /* @__PURE__ */
|
|
7575
|
+
children: /* @__PURE__ */ jsx60(AnimatedLogo, {})
|
|
7585
7576
|
}
|
|
7586
7577
|
);
|
|
7587
7578
|
if (portal) {
|
|
7588
|
-
return /* @__PURE__ */
|
|
7579
|
+
return /* @__PURE__ */ jsx60(Portal, { children: content });
|
|
7589
7580
|
}
|
|
7590
7581
|
return content;
|
|
7591
7582
|
};
|
|
@@ -7672,7 +7663,6 @@ export {
|
|
|
7672
7663
|
fShortenNumber,
|
|
7673
7664
|
formatFullname,
|
|
7674
7665
|
getCurrencySymbol,
|
|
7675
|
-
getInitColorSchemeScript,
|
|
7676
7666
|
getInitials,
|
|
7677
7667
|
getStorage,
|
|
7678
7668
|
grey,
|