@undefine-ui/design-system 2.13.0 → 2.14.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.cjs +157 -167
- 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 -136
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -112,7 +112,6 @@ __export(index_exports, {
|
|
|
112
112
|
fShortenNumber: () => fShortenNumber,
|
|
113
113
|
formatFullname: () => formatFullname,
|
|
114
114
|
getCurrencySymbol: () => getCurrencySymbol,
|
|
115
|
-
getInitColorSchemeScript: () => getInitColorSchemeScript,
|
|
116
115
|
getInitials: () => getInitials,
|
|
117
116
|
getStorage: () => getStorage,
|
|
118
117
|
grey: () => grey,
|
|
@@ -5851,8 +5850,10 @@ var getBackgroundDefault = (contrast) => {
|
|
|
5851
5850
|
// src/theme/create-theme.ts
|
|
5852
5851
|
var createTheme = (settings) => {
|
|
5853
5852
|
const initialTheme = {
|
|
5853
|
+
cssVariables: true,
|
|
5854
5854
|
colorSchemes,
|
|
5855
5855
|
breakpoints,
|
|
5856
|
+
defaultColorScheme: settings.colorScheme,
|
|
5856
5857
|
colorSchemeSelector: "data-mui-color-scheme",
|
|
5857
5858
|
shadows: shadows(settings.colorScheme),
|
|
5858
5859
|
customShadows: customShadows(settings.colorScheme),
|
|
@@ -5896,20 +5897,10 @@ var shouldSkipGeneratingVar = (keys) => {
|
|
|
5896
5897
|
};
|
|
5897
5898
|
|
|
5898
5899
|
// src/theme/color-scheme-script.tsx
|
|
5899
|
-
var import_InitColorSchemeScript = __toESM(require("@mui/material/InitColorSchemeScript"), 1);
|
|
5900
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5901
5900
|
var schemeConfig = {
|
|
5902
5901
|
modeStorageKey: "theme-mode",
|
|
5903
5902
|
defaultMode: defaultSettings.colorScheme
|
|
5904
5903
|
};
|
|
5905
|
-
var getInitColorSchemeScript = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5906
|
-
import_InitColorSchemeScript.default,
|
|
5907
|
-
{
|
|
5908
|
-
modeStorageKey: schemeConfig.modeStorageKey,
|
|
5909
|
-
colorSchemeNode: schemeConfig.defaultMode
|
|
5910
|
-
},
|
|
5911
|
-
schemeConfig.modeStorageKey
|
|
5912
|
-
);
|
|
5913
5904
|
|
|
5914
5905
|
// src/theme/ThemeProvider.tsx
|
|
5915
5906
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"), 1);
|
|
@@ -5925,18 +5916,18 @@ var import__8 = require("@fontsource/geist/500.css");
|
|
|
5925
5916
|
var import__9 = require("@fontsource/geist/600.css");
|
|
5926
5917
|
var import__10 = require("@fontsource/geist/700.css");
|
|
5927
5918
|
var import_satoshi = require("./satoshi-4X3TX4PE.css");
|
|
5928
|
-
var
|
|
5919
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5929
5920
|
var ThemeProvider = ({ children }) => {
|
|
5930
5921
|
const settings = useSettings();
|
|
5931
5922
|
const theme = createTheme(settings);
|
|
5932
|
-
return /* @__PURE__ */ (0,
|
|
5923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5933
5924
|
import_styles31.ThemeProvider,
|
|
5934
5925
|
{
|
|
5935
5926
|
theme,
|
|
5936
5927
|
defaultMode: schemeConfig.defaultMode,
|
|
5937
5928
|
modeStorageKey: schemeConfig.modeStorageKey,
|
|
5938
5929
|
children: [
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
5930
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_CssBaseline.default, {}),
|
|
5940
5931
|
children
|
|
5941
5932
|
]
|
|
5942
5933
|
}
|
|
@@ -5946,7 +5937,7 @@ var ThemeProvider = ({ children }) => {
|
|
|
5946
5937
|
// src/components/Logo/index.tsx
|
|
5947
5938
|
var import_Link = __toESM(require("@mui/material/Link"), 1);
|
|
5948
5939
|
var import_Box2 = __toESM(require("@mui/material/Box"), 1);
|
|
5949
|
-
var
|
|
5940
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5950
5941
|
var LOGO_MAP = {
|
|
5951
5942
|
full: {
|
|
5952
5943
|
black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black-full_mjngwu.png",
|
|
@@ -5974,7 +5965,7 @@ var Logo = ({
|
|
|
5974
5965
|
const type = isFull ? "full" : "single";
|
|
5975
5966
|
const color = isWhite ? "white" : isBlack ? "black" : "default";
|
|
5976
5967
|
const logoImg = src ?? LOGO_MAP[type][color];
|
|
5977
|
-
const logo = /* @__PURE__ */ (0,
|
|
5968
|
+
const logo = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5978
5969
|
import_Box2.default,
|
|
5979
5970
|
{
|
|
5980
5971
|
component: "img",
|
|
@@ -5987,10 +5978,10 @@ var Logo = ({
|
|
|
5987
5978
|
if (disableLink) {
|
|
5988
5979
|
return logo;
|
|
5989
5980
|
}
|
|
5990
|
-
return /* @__PURE__ */ (0,
|
|
5981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_Link.default, { component: LinkComponent, href, sx: { display: "contents" }, children: logo });
|
|
5991
5982
|
};
|
|
5992
5983
|
var AnimatedLogo = () => {
|
|
5993
|
-
return /* @__PURE__ */ (0,
|
|
5984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5994
5985
|
"svg",
|
|
5995
5986
|
{
|
|
5996
5987
|
width: "120",
|
|
@@ -5999,7 +5990,7 @@ var AnimatedLogo = () => {
|
|
|
5999
5990
|
fill: "none",
|
|
6000
5991
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6001
5992
|
children: [
|
|
6002
|
-
/* @__PURE__ */ (0,
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("style", { children: `
|
|
6003
5994
|
@keyframes fadeIn {
|
|
6004
5995
|
from {
|
|
6005
5996
|
opacity: 0;
|
|
@@ -6060,7 +6051,7 @@ var AnimatedLogo = () => {
|
|
|
6060
6051
|
transform-origin: center;
|
|
6061
6052
|
}
|
|
6062
6053
|
` }),
|
|
6063
|
-
/* @__PURE__ */ (0,
|
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6064
6055
|
"rect",
|
|
6065
6056
|
{
|
|
6066
6057
|
className: "background-rect",
|
|
@@ -6071,7 +6062,7 @@ var AnimatedLogo = () => {
|
|
|
6071
6062
|
fill: "white"
|
|
6072
6063
|
}
|
|
6073
6064
|
),
|
|
6074
|
-
/* @__PURE__ */ (0,
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6075
6066
|
"path",
|
|
6076
6067
|
{
|
|
6077
6068
|
className: "bars",
|
|
@@ -6079,7 +6070,7 @@ var AnimatedLogo = () => {
|
|
|
6079
6070
|
fill: "#5E30EB"
|
|
6080
6071
|
}
|
|
6081
6072
|
),
|
|
6082
|
-
/* @__PURE__ */ (0,
|
|
6073
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6083
6074
|
"path",
|
|
6084
6075
|
{
|
|
6085
6076
|
className: "d-letter",
|
|
@@ -6099,7 +6090,7 @@ var import_x_data_grid2 = require("@mui/x-data-grid");
|
|
|
6099
6090
|
// src/components/Table/components/TableNoRows.tsx
|
|
6100
6091
|
var import_Box3 = __toESM(require("@mui/material/Box"), 1);
|
|
6101
6092
|
var import_styles32 = require("@mui/material/styles");
|
|
6102
|
-
var
|
|
6093
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6103
6094
|
var StyledGridOverlay = (0, import_styles32.styled)("div")(({ theme }) => ({
|
|
6104
6095
|
display: "flex",
|
|
6105
6096
|
flexDirection: "column",
|
|
@@ -6109,7 +6100,7 @@ var StyledGridOverlay = (0, import_styles32.styled)("div")(({ theme }) => ({
|
|
|
6109
6100
|
height: "100%"
|
|
6110
6101
|
}));
|
|
6111
6102
|
var TableNoRows = ({ noRowsTitle = "No Rows" }) => {
|
|
6112
|
-
return /* @__PURE__ */ (0,
|
|
6103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StyledGridOverlay, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_Box3.default, { sx: { mt: 1 }, children: noRowsTitle }) });
|
|
6113
6104
|
};
|
|
6114
6105
|
var TableNoRows_default = TableNoRows;
|
|
6115
6106
|
|
|
@@ -6119,7 +6110,7 @@ var import_Typography2 = __toESM(require("@mui/material/Typography"), 1);
|
|
|
6119
6110
|
var import_Pagination = __toESM(require("@mui/material/Pagination"), 1);
|
|
6120
6111
|
var import_PaginationItem2 = __toESM(require("@mui/material/PaginationItem"), 1);
|
|
6121
6112
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
6122
|
-
var
|
|
6113
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6123
6114
|
var TablePagination = () => {
|
|
6124
6115
|
const apiRef = (0, import_x_data_grid.useGridApiContext)();
|
|
6125
6116
|
const page = (0, import_x_data_grid.useGridSelector)(apiRef, import_x_data_grid.gridPageSelector);
|
|
@@ -6128,7 +6119,7 @@ var TablePagination = () => {
|
|
|
6128
6119
|
const rowCount = (0, import_x_data_grid.useGridSelector)(apiRef, import_x_data_grid.gridRowCountSelector);
|
|
6129
6120
|
const from = page * pageSize + 1;
|
|
6130
6121
|
const to = Math.min((page + 1) * pageSize, rowCount);
|
|
6131
|
-
return /* @__PURE__ */ (0,
|
|
6122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6132
6123
|
import_Stack.default,
|
|
6133
6124
|
{
|
|
6134
6125
|
direction: "row",
|
|
@@ -6137,14 +6128,14 @@ var TablePagination = () => {
|
|
|
6137
6128
|
width: 1,
|
|
6138
6129
|
p: 1.5,
|
|
6139
6130
|
children: [
|
|
6140
|
-
/* @__PURE__ */ (0,
|
|
6131
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6141
6132
|
import_Stack.default,
|
|
6142
6133
|
{
|
|
6143
6134
|
direction: { xs: "column", md: "row" },
|
|
6144
6135
|
alignItems: { xs: "flex-start", md: "center" },
|
|
6145
6136
|
spacing: 2,
|
|
6146
6137
|
children: [
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6138
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6148
6139
|
import_Pagination.default,
|
|
6149
6140
|
{
|
|
6150
6141
|
size: "medium",
|
|
@@ -6156,17 +6147,17 @@ var TablePagination = () => {
|
|
|
6156
6147
|
showFirstButton: true,
|
|
6157
6148
|
showLastButton: true,
|
|
6158
6149
|
onChange: (_, value) => apiRef.current.setPage(value - 1),
|
|
6159
|
-
renderItem: (item) => /* @__PURE__ */ (0,
|
|
6150
|
+
renderItem: (item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_PaginationItem2.default, { ...item })
|
|
6160
6151
|
}
|
|
6161
6152
|
),
|
|
6162
|
-
/* @__PURE__ */ (0,
|
|
6153
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_Stack.default, { direction: "row", alignItems: "center", spacing: 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_Typography2.default, { variant: "body2", color: "text.secondary", children: [
|
|
6163
6154
|
pageSize,
|
|
6164
6155
|
" Items per page"
|
|
6165
6156
|
] }) })
|
|
6166
6157
|
]
|
|
6167
6158
|
}
|
|
6168
6159
|
),
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_Typography2.default, { variant: "body2", color: "text.secondary", children: [
|
|
6170
6161
|
`${from} \u2013 ${to} of ${rowCount !== -1 ? rowCount : `more than ${to}`} items`,
|
|
6171
6162
|
" "
|
|
6172
6163
|
] })
|
|
@@ -6176,10 +6167,10 @@ var TablePagination = () => {
|
|
|
6176
6167
|
};
|
|
6177
6168
|
|
|
6178
6169
|
// src/components/Table/Table.tsx
|
|
6179
|
-
var
|
|
6170
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6180
6171
|
var Table = (props) => {
|
|
6181
6172
|
const { data, showToolbar = false, ...rest } = props;
|
|
6182
|
-
return /* @__PURE__ */ (0,
|
|
6173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_Box4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6183
6174
|
import_x_data_grid2.DataGrid,
|
|
6184
6175
|
{
|
|
6185
6176
|
rowHeight: 64,
|
|
@@ -6231,7 +6222,7 @@ var imageClasses = {
|
|
|
6231
6222
|
};
|
|
6232
6223
|
|
|
6233
6224
|
// src/components/Image/index.tsx
|
|
6234
|
-
var
|
|
6225
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6235
6226
|
var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
6236
6227
|
const {
|
|
6237
6228
|
src,
|
|
@@ -6330,7 +6321,7 @@ var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
|
6330
6321
|
const showLoader = status === "idle" || status === "loading";
|
|
6331
6322
|
const showError = status === "error";
|
|
6332
6323
|
const loadingAttr = lazy ? "lazy" : imgLoading ?? "eager";
|
|
6333
|
-
return /* @__PURE__ */ (0,
|
|
6324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6334
6325
|
import_Box5.default,
|
|
6335
6326
|
{
|
|
6336
6327
|
className: imageClasses.root.concat(className ? ` ${className}` : ""),
|
|
@@ -6345,7 +6336,7 @@ var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
|
6345
6336
|
},
|
|
6346
6337
|
...rest,
|
|
6347
6338
|
children: [
|
|
6348
|
-
showLoader && (loadingIndicator ?? /* @__PURE__ */ (0,
|
|
6339
|
+
showLoader && (loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6349
6340
|
import_Skeleton.default,
|
|
6350
6341
|
{
|
|
6351
6342
|
animation: "wave",
|
|
@@ -6360,7 +6351,7 @@ var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
|
6360
6351
|
}
|
|
6361
6352
|
}
|
|
6362
6353
|
)),
|
|
6363
|
-
/* @__PURE__ */ (0,
|
|
6354
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6364
6355
|
import_Box5.default,
|
|
6365
6356
|
{
|
|
6366
6357
|
ref: setRefs,
|
|
@@ -6389,7 +6380,7 @@ var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
|
6389
6380
|
}
|
|
6390
6381
|
}
|
|
6391
6382
|
),
|
|
6392
|
-
withOverlay && !showError && /* @__PURE__ */ (0,
|
|
6383
|
+
withOverlay && !showError && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6393
6384
|
import_Box5.default,
|
|
6394
6385
|
{
|
|
6395
6386
|
className: imageClasses.overlay,
|
|
@@ -6401,7 +6392,7 @@ var Image = (0, import_react12.forwardRef)(function Image2(props, ref) {
|
|
|
6401
6392
|
children: overlay
|
|
6402
6393
|
}
|
|
6403
6394
|
),
|
|
6404
|
-
showError && (renderError ?? /* @__PURE__ */ (0,
|
|
6395
|
+
showError && (renderError ?? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6405
6396
|
import_Box5.default,
|
|
6406
6397
|
{
|
|
6407
6398
|
className: imageClasses.overlay,
|
|
@@ -6434,9 +6425,9 @@ var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
|
6434
6425
|
// src/components/Upload/components/Placeholder.tsx
|
|
6435
6426
|
var import_Stack2 = __toESM(require("@mui/material/Stack"), 1);
|
|
6436
6427
|
var import_Box6 = __toESM(require("@mui/material/Box"), 1);
|
|
6437
|
-
var
|
|
6428
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6438
6429
|
var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
6439
|
-
return /* @__PURE__ */ (0,
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6440
6431
|
import_Box6.default,
|
|
6441
6432
|
{
|
|
6442
6433
|
sx: {
|
|
@@ -6447,7 +6438,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6447
6438
|
},
|
|
6448
6439
|
...rest,
|
|
6449
6440
|
children: [
|
|
6450
|
-
/* @__PURE__ */ (0,
|
|
6441
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6451
6442
|
Icon,
|
|
6452
6443
|
{
|
|
6453
6444
|
icon: "CloudUpload",
|
|
@@ -6458,10 +6449,10 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6458
6449
|
}
|
|
6459
6450
|
}
|
|
6460
6451
|
),
|
|
6461
|
-
/* @__PURE__ */ (0,
|
|
6462
|
-
/* @__PURE__ */ (0,
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Stack2.default, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
|
|
6453
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_Box6.default, { sx: { typography: "h8" }, children: [
|
|
6463
6454
|
"Drag files here or",
|
|
6464
|
-
/* @__PURE__ */ (0,
|
|
6455
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6465
6456
|
import_Box6.default,
|
|
6466
6457
|
{
|
|
6467
6458
|
component: "span",
|
|
@@ -6474,7 +6465,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6474
6465
|
}
|
|
6475
6466
|
)
|
|
6476
6467
|
] }),
|
|
6477
|
-
/* @__PURE__ */ (0,
|
|
6468
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6478
6469
|
import_Box6.default,
|
|
6479
6470
|
{
|
|
6480
6471
|
sx: {
|
|
@@ -6529,12 +6520,12 @@ var fileData = (file) => {
|
|
|
6529
6520
|
};
|
|
6530
6521
|
|
|
6531
6522
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6532
|
-
var
|
|
6523
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6533
6524
|
var RejectionFiles = ({ files }) => {
|
|
6534
6525
|
if (!files.length) {
|
|
6535
6526
|
return null;
|
|
6536
6527
|
}
|
|
6537
|
-
return /* @__PURE__ */ (0,
|
|
6528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6538
6529
|
import_Paper2.default,
|
|
6539
6530
|
{
|
|
6540
6531
|
variant: "outlined",
|
|
@@ -6549,13 +6540,13 @@ var RejectionFiles = ({ files }) => {
|
|
|
6549
6540
|
},
|
|
6550
6541
|
children: files.map(({ file, errors }) => {
|
|
6551
6542
|
const { path, size } = fileData(file);
|
|
6552
|
-
return /* @__PURE__ */ (0,
|
|
6553
|
-
/* @__PURE__ */ (0,
|
|
6543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_Box7.default, { sx: { my: 1 }, children: [
|
|
6544
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_Typography3.default, { variant: "subtitle2", noWrap: true, children: [
|
|
6554
6545
|
path,
|
|
6555
6546
|
" - ",
|
|
6556
6547
|
size ? fData(size) : ""
|
|
6557
6548
|
] }),
|
|
6558
|
-
errors.map((error2) => /* @__PURE__ */ (0,
|
|
6549
|
+
errors.map((error2) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_Box7.default, { component: "span", sx: { typography: "caption" }, children: [
|
|
6559
6550
|
"- ",
|
|
6560
6551
|
error2.message
|
|
6561
6552
|
] }, error2.code))
|
|
@@ -6568,9 +6559,9 @@ var RejectionFiles = ({ files }) => {
|
|
|
6568
6559
|
// src/components/Upload/components/UploadProgress.tsx
|
|
6569
6560
|
var import_Box8 = __toESM(require("@mui/material/Box"), 1);
|
|
6570
6561
|
var import_CircularProgress2 = __toESM(require("@mui/material/CircularProgress"), 1);
|
|
6571
|
-
var
|
|
6562
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6572
6563
|
var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
6573
|
-
return /* @__PURE__ */ (0,
|
|
6564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6574
6565
|
import_Box8.default,
|
|
6575
6566
|
{
|
|
6576
6567
|
sx: {
|
|
@@ -6581,8 +6572,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6581
6572
|
height: "100%"
|
|
6582
6573
|
},
|
|
6583
6574
|
children: [
|
|
6584
|
-
/* @__PURE__ */ (0,
|
|
6585
|
-
/* @__PURE__ */ (0,
|
|
6575
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_Box8.default, { sx: { position: "relative", display: "inline-flex" }, children: [
|
|
6576
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6586
6577
|
import_CircularProgress2.default,
|
|
6587
6578
|
{
|
|
6588
6579
|
variant: "determinate",
|
|
@@ -6595,7 +6586,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6595
6586
|
}
|
|
6596
6587
|
}
|
|
6597
6588
|
),
|
|
6598
|
-
/* @__PURE__ */ (0,
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6599
6590
|
import_CircularProgress2.default,
|
|
6600
6591
|
{
|
|
6601
6592
|
variant: "determinate",
|
|
@@ -6607,7 +6598,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6607
6598
|
}
|
|
6608
6599
|
}
|
|
6609
6600
|
),
|
|
6610
|
-
/* @__PURE__ */ (0,
|
|
6601
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6611
6602
|
import_Box8.default,
|
|
6612
6603
|
{
|
|
6613
6604
|
sx: {
|
|
@@ -6620,11 +6611,11 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6620
6611
|
alignItems: "center",
|
|
6621
6612
|
justifyContent: "center"
|
|
6622
6613
|
},
|
|
6623
|
-
children: /* @__PURE__ */ (0,
|
|
6614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_Box8.default, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
|
|
6624
6615
|
}
|
|
6625
6616
|
)
|
|
6626
6617
|
] }),
|
|
6627
|
-
/* @__PURE__ */ (0,
|
|
6618
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_Box8.default, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
|
|
6628
6619
|
]
|
|
6629
6620
|
}
|
|
6630
6621
|
);
|
|
@@ -6638,11 +6629,11 @@ var import_IconButton3 = __toESM(require("@mui/material/IconButton"), 1);
|
|
|
6638
6629
|
// src/components/Upload/components/SingleFilePreview.tsx
|
|
6639
6630
|
var import_Box9 = __toESM(require("@mui/material/Box"), 1);
|
|
6640
6631
|
var import_IconButton2 = __toESM(require("@mui/material/IconButton"), 1);
|
|
6641
|
-
var
|
|
6632
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6642
6633
|
var SingleFilePreview = ({ file }) => {
|
|
6643
6634
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6644
6635
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6645
|
-
const renderImg = /* @__PURE__ */ (0,
|
|
6636
|
+
const renderImg = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6646
6637
|
import_Box9.default,
|
|
6647
6638
|
{
|
|
6648
6639
|
component: "img",
|
|
@@ -6656,7 +6647,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6656
6647
|
}
|
|
6657
6648
|
}
|
|
6658
6649
|
);
|
|
6659
|
-
return /* @__PURE__ */ (0,
|
|
6650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6660
6651
|
import_Box9.default,
|
|
6661
6652
|
{
|
|
6662
6653
|
sx: {
|
|
@@ -6672,7 +6663,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6672
6663
|
);
|
|
6673
6664
|
};
|
|
6674
6665
|
var DeleteButton = ({ sx, ...rest }) => {
|
|
6675
|
-
return /* @__PURE__ */ (0,
|
|
6666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6676
6667
|
import_IconButton2.default,
|
|
6677
6668
|
{
|
|
6678
6669
|
size: "small",
|
|
@@ -6691,13 +6682,13 @@ var DeleteButton = ({ sx, ...rest }) => {
|
|
|
6691
6682
|
...sx
|
|
6692
6683
|
},
|
|
6693
6684
|
...rest,
|
|
6694
|
-
children: /* @__PURE__ */ (0,
|
|
6685
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
|
|
6695
6686
|
}
|
|
6696
6687
|
);
|
|
6697
6688
|
};
|
|
6698
6689
|
|
|
6699
6690
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6700
|
-
var
|
|
6691
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6701
6692
|
var MultiFilePreview = ({ files, onRemove }) => {
|
|
6702
6693
|
const scrollRef = (0, import_react13.useRef)(null);
|
|
6703
6694
|
const handleScroll = (direction) => {
|
|
@@ -6711,8 +6702,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6711
6702
|
}
|
|
6712
6703
|
};
|
|
6713
6704
|
const showNavigation = files.length > 2;
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
6715
|
-
showNavigation && /* @__PURE__ */ (0,
|
|
6705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_Box10.default, { sx: { position: "relative", width: 1 }, children: [
|
|
6706
|
+
showNavigation && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6716
6707
|
import_IconButton3.default,
|
|
6717
6708
|
{
|
|
6718
6709
|
size: "small",
|
|
@@ -6729,10 +6720,10 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6729
6720
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6730
6721
|
}
|
|
6731
6722
|
},
|
|
6732
|
-
children: /* @__PURE__ */ (0,
|
|
6723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: "NavArrowLeft", width: 20 })
|
|
6733
6724
|
}
|
|
6734
6725
|
),
|
|
6735
|
-
/* @__PURE__ */ (0,
|
|
6726
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6736
6727
|
import_Box10.default,
|
|
6737
6728
|
{
|
|
6738
6729
|
ref: scrollRef,
|
|
@@ -6751,7 +6742,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6751
6742
|
children: files.map((file, index) => {
|
|
6752
6743
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6753
6744
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6754
|
-
return /* @__PURE__ */ (0,
|
|
6745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6755
6746
|
import_Box10.default,
|
|
6756
6747
|
{
|
|
6757
6748
|
sx: {
|
|
@@ -6763,7 +6754,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6763
6754
|
flexShrink: 0
|
|
6764
6755
|
},
|
|
6765
6756
|
children: [
|
|
6766
|
-
/* @__PURE__ */ (0,
|
|
6757
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6767
6758
|
import_Box10.default,
|
|
6768
6759
|
{
|
|
6769
6760
|
component: "img",
|
|
@@ -6777,7 +6768,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6777
6768
|
}
|
|
6778
6769
|
}
|
|
6779
6770
|
),
|
|
6780
|
-
onRemove && /* @__PURE__ */ (0,
|
|
6771
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6781
6772
|
DeleteButton,
|
|
6782
6773
|
{
|
|
6783
6774
|
onClick: (e) => {
|
|
@@ -6793,7 +6784,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6793
6784
|
})
|
|
6794
6785
|
}
|
|
6795
6786
|
),
|
|
6796
|
-
showNavigation && /* @__PURE__ */ (0,
|
|
6787
|
+
showNavigation && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6797
6788
|
import_IconButton3.default,
|
|
6798
6789
|
{
|
|
6799
6790
|
size: "small",
|
|
@@ -6810,14 +6801,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6810
6801
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6811
6802
|
}
|
|
6812
6803
|
},
|
|
6813
|
-
children: /* @__PURE__ */ (0,
|
|
6804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: "NavArrowRight", width: 20 })
|
|
6814
6805
|
}
|
|
6815
6806
|
)
|
|
6816
6807
|
] });
|
|
6817
6808
|
};
|
|
6818
6809
|
|
|
6819
6810
|
// src/components/Upload/Upload.tsx
|
|
6820
|
-
var
|
|
6811
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6821
6812
|
var Upload = ({
|
|
6822
6813
|
sx,
|
|
6823
6814
|
value,
|
|
@@ -6844,19 +6835,19 @@ var Upload = ({
|
|
|
6844
6835
|
const hasError = isDragReject || !!error2;
|
|
6845
6836
|
const renderContent = () => {
|
|
6846
6837
|
if (isUploading) {
|
|
6847
|
-
return /* @__PURE__ */ (0,
|
|
6838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UploadProgress, { progress: uploadProgress });
|
|
6848
6839
|
}
|
|
6849
6840
|
if (hasFile) {
|
|
6850
|
-
return /* @__PURE__ */ (0,
|
|
6841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SingleFilePreview, { file: value });
|
|
6851
6842
|
}
|
|
6852
6843
|
if (hasFiles) {
|
|
6853
|
-
return /* @__PURE__ */ (0,
|
|
6844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MultiFilePreview, { files: value, onRemove });
|
|
6854
6845
|
}
|
|
6855
|
-
return /* @__PURE__ */ (0,
|
|
6846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UploadPlaceholder, { hasError });
|
|
6856
6847
|
};
|
|
6857
6848
|
const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
|
|
6858
|
-
return /* @__PURE__ */ (0,
|
|
6859
|
-
/* @__PURE__ */ (0,
|
|
6849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_Box11.default, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
6850
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6860
6851
|
import_Box11.default,
|
|
6861
6852
|
{
|
|
6862
6853
|
...shouldShowDropzone ? getRootProps() : {},
|
|
@@ -6895,51 +6886,51 @@ var Upload = ({
|
|
|
6895
6886
|
}
|
|
6896
6887
|
},
|
|
6897
6888
|
children: [
|
|
6898
|
-
shouldShowDropzone && /* @__PURE__ */ (0,
|
|
6889
|
+
shouldShowDropzone && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("input", { ...getInputProps() }),
|
|
6899
6890
|
renderContent()
|
|
6900
6891
|
]
|
|
6901
6892
|
}
|
|
6902
6893
|
),
|
|
6903
|
-
hasFile && !isUploading && /* @__PURE__ */ (0,
|
|
6904
|
-
hasFiles && /* @__PURE__ */ (0,
|
|
6905
|
-
onRemoveAll && /* @__PURE__ */ (0,
|
|
6894
|
+
hasFile && !isUploading && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DeleteButton, { onClick: onDelete }),
|
|
6895
|
+
hasFiles && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_Stack3.default, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
|
|
6896
|
+
onRemoveAll && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6906
6897
|
import_Button3.default,
|
|
6907
6898
|
{
|
|
6908
6899
|
variant: "outlined",
|
|
6909
6900
|
color: "inherit",
|
|
6910
6901
|
size: "small",
|
|
6911
6902
|
onClick: onRemoveAll,
|
|
6912
|
-
startIcon: /* @__PURE__ */ (0,
|
|
6903
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
|
|
6913
6904
|
children: "Remove all"
|
|
6914
6905
|
}
|
|
6915
6906
|
),
|
|
6916
|
-
onUpload && /* @__PURE__ */ (0,
|
|
6907
|
+
onUpload && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6917
6908
|
import_Button3.default,
|
|
6918
6909
|
{
|
|
6919
6910
|
variant: "contained",
|
|
6920
6911
|
size: "small",
|
|
6921
6912
|
onClick: onUpload,
|
|
6922
|
-
startIcon: /* @__PURE__ */ (0,
|
|
6913
|
+
startIcon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
|
|
6923
6914
|
children: "Upload files"
|
|
6924
6915
|
}
|
|
6925
6916
|
)
|
|
6926
6917
|
] }),
|
|
6927
|
-
helperText && /* @__PURE__ */ (0,
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
6918
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_FormHelperText.default, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
|
|
6919
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RejectionFiles, { files: [...fileRejections] })
|
|
6929
6920
|
] });
|
|
6930
6921
|
};
|
|
6931
6922
|
|
|
6932
6923
|
// src/components/HookForm/Form.tsx
|
|
6933
6924
|
var import_react_hook_form = require("react-hook-form");
|
|
6934
6925
|
var import_Box12 = __toESM(require("@mui/material/Box"), 1);
|
|
6935
|
-
var
|
|
6926
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6936
6927
|
var Form = ({
|
|
6937
6928
|
children,
|
|
6938
6929
|
onSubmit,
|
|
6939
6930
|
methods,
|
|
6940
6931
|
...rest
|
|
6941
6932
|
}) => {
|
|
6942
|
-
return /* @__PURE__ */ (0,
|
|
6933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_hook_form.FormProvider, { ...methods, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6943
6934
|
import_Box12.default,
|
|
6944
6935
|
{
|
|
6945
6936
|
component: "form",
|
|
@@ -6968,7 +6959,7 @@ var import_FormLabel = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
6968
6959
|
var import_FormControl = __toESM(require("@mui/material/FormControl"), 1);
|
|
6969
6960
|
var import_FormHelperText2 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
6970
6961
|
var import_FormControlLabel2 = __toESM(require("@mui/material/FormControlLabel"), 1);
|
|
6971
|
-
var
|
|
6962
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6972
6963
|
var RHFSwitch = ({
|
|
6973
6964
|
name,
|
|
6974
6965
|
description,
|
|
@@ -6980,16 +6971,16 @@ var RHFSwitch = ({
|
|
|
6980
6971
|
}) => {
|
|
6981
6972
|
const { control } = (0, import_react_hook_form2.useFormContext)();
|
|
6982
6973
|
const baseAriaLabel = `Switch ${name}`;
|
|
6983
|
-
return /* @__PURE__ */ (0,
|
|
6974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6984
6975
|
import_react_hook_form2.Controller,
|
|
6985
6976
|
{
|
|
6986
6977
|
name,
|
|
6987
6978
|
control,
|
|
6988
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
6989
|
-
/* @__PURE__ */ (0,
|
|
6979
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_Box13.default, { sx: slotProps?.wrap, children: [
|
|
6980
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6990
6981
|
import_FormControlLabel2.default,
|
|
6991
6982
|
{
|
|
6992
|
-
control: /* @__PURE__ */ (0,
|
|
6983
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6993
6984
|
import_Switch2.default,
|
|
6994
6985
|
{
|
|
6995
6986
|
...field,
|
|
@@ -7004,9 +6995,9 @@ var RHFSwitch = ({
|
|
|
7004
6995
|
}
|
|
7005
6996
|
}
|
|
7006
6997
|
),
|
|
7007
|
-
label: /* @__PURE__ */ (0,
|
|
7008
|
-
/* @__PURE__ */ (0,
|
|
7009
|
-
description && /* @__PURE__ */ (0,
|
|
6998
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_Stack4.default, { children: [
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_Typography4.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7000
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_Typography4.default, { variant: "body2", color: "textBody", children: description })
|
|
7010
7001
|
] }),
|
|
7011
7002
|
sx: {
|
|
7012
7003
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7015,7 +7006,7 @@ var RHFSwitch = ({
|
|
|
7015
7006
|
...other
|
|
7016
7007
|
}
|
|
7017
7008
|
),
|
|
7018
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7009
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7019
7010
|
import_FormHelperText2.default,
|
|
7020
7011
|
{
|
|
7021
7012
|
error: !!error2,
|
|
@@ -7038,19 +7029,19 @@ var RHFMultiSwitch = ({
|
|
|
7038
7029
|
}) => {
|
|
7039
7030
|
const { control } = (0, import_react_hook_form2.useFormContext)();
|
|
7040
7031
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7041
|
-
return /* @__PURE__ */ (0,
|
|
7032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7042
7033
|
import_react_hook_form2.Controller,
|
|
7043
7034
|
{
|
|
7044
7035
|
name,
|
|
7045
7036
|
control,
|
|
7046
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7037
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
7047
7038
|
import_FormControl.default,
|
|
7048
7039
|
{
|
|
7049
7040
|
component: "fieldset",
|
|
7050
7041
|
sx: slotProps?.formControl?.sx,
|
|
7051
7042
|
...slotProps?.formControl,
|
|
7052
7043
|
children: [
|
|
7053
|
-
label && /* @__PURE__ */ (0,
|
|
7044
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7054
7045
|
import_FormLabel.default,
|
|
7055
7046
|
{
|
|
7056
7047
|
component: "legend",
|
|
@@ -7059,12 +7050,12 @@ var RHFMultiSwitch = ({
|
|
|
7059
7050
|
children: label
|
|
7060
7051
|
}
|
|
7061
7052
|
),
|
|
7062
|
-
/* @__PURE__ */ (0,
|
|
7053
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_FormGroup.default, { ...other, children: options.map((option) => {
|
|
7063
7054
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7064
|
-
return /* @__PURE__ */ (0,
|
|
7055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7065
7056
|
import_FormControlLabel2.default,
|
|
7066
7057
|
{
|
|
7067
|
-
control: /* @__PURE__ */ (0,
|
|
7058
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7068
7059
|
import_Switch2.default,
|
|
7069
7060
|
{
|
|
7070
7061
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7087,7 +7078,7 @@ var RHFMultiSwitch = ({
|
|
|
7087
7078
|
option.value
|
|
7088
7079
|
);
|
|
7089
7080
|
}) }),
|
|
7090
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7081
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_FormHelperText2.default, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7091
7082
|
]
|
|
7092
7083
|
}
|
|
7093
7084
|
)
|
|
@@ -7097,10 +7088,10 @@ var RHFMultiSwitch = ({
|
|
|
7097
7088
|
|
|
7098
7089
|
// src/components/HookForm/RHFUpload.tsx
|
|
7099
7090
|
var import_react_hook_form3 = require("react-hook-form");
|
|
7100
|
-
var
|
|
7091
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7101
7092
|
var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
7102
7093
|
const { control, setValue } = (0, import_react_hook_form3.useFormContext)();
|
|
7103
|
-
return /* @__PURE__ */ (0,
|
|
7094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7104
7095
|
import_react_hook_form3.Controller,
|
|
7105
7096
|
{
|
|
7106
7097
|
name,
|
|
@@ -7128,7 +7119,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
7128
7119
|
const onRemoveAll = () => {
|
|
7129
7120
|
setValue(name, [], { shouldValidate: true });
|
|
7130
7121
|
};
|
|
7131
|
-
return /* @__PURE__ */ (0,
|
|
7122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7132
7123
|
Upload,
|
|
7133
7124
|
{
|
|
7134
7125
|
multiple,
|
|
@@ -7158,7 +7149,7 @@ var import_Box14 = __toESM(require("@mui/material/Box"), 1);
|
|
|
7158
7149
|
var import_FormHelperText3 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
7159
7150
|
var import_InputBase3 = require("@mui/material/InputBase");
|
|
7160
7151
|
var import_TextField2 = __toESM(require("@mui/material/TextField"), 1);
|
|
7161
|
-
var
|
|
7152
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7162
7153
|
var OTPInput = (props) => {
|
|
7163
7154
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
7164
7155
|
const theme = (0, import_styles37.useTheme)();
|
|
@@ -7226,8 +7217,8 @@ var OTPInput = (props) => {
|
|
|
7226
7217
|
onComplete?.(newOtp.join(""));
|
|
7227
7218
|
}
|
|
7228
7219
|
};
|
|
7229
|
-
return /* @__PURE__ */ (0,
|
|
7230
|
-
/* @__PURE__ */ (0,
|
|
7220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
7221
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_Box14.default, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7231
7222
|
import_Box14.default,
|
|
7232
7223
|
{
|
|
7233
7224
|
display: "flex",
|
|
@@ -7238,7 +7229,7 @@ var OTPInput = (props) => {
|
|
|
7238
7229
|
mr: 1.5
|
|
7239
7230
|
}
|
|
7240
7231
|
},
|
|
7241
|
-
children: /* @__PURE__ */ (0,
|
|
7232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7242
7233
|
import_TextField2.default,
|
|
7243
7234
|
{
|
|
7244
7235
|
size: "medium",
|
|
@@ -7321,21 +7312,21 @@ var OTPInput = (props) => {
|
|
|
7321
7312
|
},
|
|
7322
7313
|
index
|
|
7323
7314
|
)) }),
|
|
7324
|
-
error2 && /* @__PURE__ */ (0,
|
|
7315
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_FormHelperText3.default, { sx: { color: "error.main" }, children: helperText })
|
|
7325
7316
|
] });
|
|
7326
7317
|
};
|
|
7327
7318
|
var OTPInput_default = OTPInput;
|
|
7328
7319
|
|
|
7329
7320
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
7330
|
-
var
|
|
7321
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7331
7322
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
7332
7323
|
const { control, setValue } = (0, import_react_hook_form4.useFormContext)();
|
|
7333
|
-
return /* @__PURE__ */ (0,
|
|
7324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7334
7325
|
import_react_hook_form4.Controller,
|
|
7335
7326
|
{
|
|
7336
7327
|
name,
|
|
7337
7328
|
control,
|
|
7338
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7329
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7339
7330
|
OTPInput_default,
|
|
7340
7331
|
{
|
|
7341
7332
|
length,
|
|
@@ -7355,16 +7346,16 @@ var import_react_hook_form5 = require("react-hook-form");
|
|
|
7355
7346
|
var import_IconButton4 = __toESM(require("@mui/material/IconButton"), 1);
|
|
7356
7347
|
var import_InputAdornment2 = __toESM(require("@mui/material/InputAdornment"), 1);
|
|
7357
7348
|
var import_TextField3 = __toESM(require("@mui/material/TextField"), 1);
|
|
7358
|
-
var
|
|
7349
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7359
7350
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
7360
7351
|
const { control } = (0, import_react_hook_form5.useFormContext)();
|
|
7361
7352
|
const passwordVisibility = useBoolean();
|
|
7362
|
-
return /* @__PURE__ */ (0,
|
|
7353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7363
7354
|
import_react_hook_form5.Controller,
|
|
7364
7355
|
{
|
|
7365
7356
|
name,
|
|
7366
7357
|
control,
|
|
7367
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7358
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7368
7359
|
import_TextField3.default,
|
|
7369
7360
|
{
|
|
7370
7361
|
...field,
|
|
@@ -7385,7 +7376,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7385
7376
|
input: {
|
|
7386
7377
|
...slotProps?.input,
|
|
7387
7378
|
...type === "password" && {
|
|
7388
|
-
endAdornment: /* @__PURE__ */ (0,
|
|
7379
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_InputAdornment2.default, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_IconButton4.default, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7389
7380
|
Icon,
|
|
7390
7381
|
{
|
|
7391
7382
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -7412,7 +7403,7 @@ var import_FormLabel2 = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
7412
7403
|
var import_RadioGroup = __toESM(require("@mui/material/RadioGroup"), 1);
|
|
7413
7404
|
var import_FormControl2 = __toESM(require("@mui/material/FormControl"), 1);
|
|
7414
7405
|
var import_FormHelperText4 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
7415
|
-
var
|
|
7406
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7416
7407
|
var RHFRadioGroup = ({
|
|
7417
7408
|
name,
|
|
7418
7409
|
label,
|
|
@@ -7424,13 +7415,13 @@ var RHFRadioGroup = ({
|
|
|
7424
7415
|
const { control } = (0, import_react_hook_form6.useFormContext)();
|
|
7425
7416
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
7426
7417
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
7427
|
-
return /* @__PURE__ */ (0,
|
|
7418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7428
7419
|
import_react_hook_form6.Controller,
|
|
7429
7420
|
{
|
|
7430
7421
|
name,
|
|
7431
7422
|
control,
|
|
7432
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7433
|
-
label && /* @__PURE__ */ (0,
|
|
7423
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_FormControl2.default, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
7424
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7434
7425
|
import_FormLabel2.default,
|
|
7435
7426
|
{
|
|
7436
7427
|
id: labelledby,
|
|
@@ -7440,11 +7431,11 @@ var RHFRadioGroup = ({
|
|
|
7440
7431
|
children: label
|
|
7441
7432
|
}
|
|
7442
7433
|
),
|
|
7443
|
-
/* @__PURE__ */ (0,
|
|
7434
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_RadioGroup.default, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7444
7435
|
import_FormControlLabel3.default,
|
|
7445
7436
|
{
|
|
7446
7437
|
value: option.value,
|
|
7447
|
-
control: /* @__PURE__ */ (0,
|
|
7438
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7448
7439
|
import_Radio2.default,
|
|
7449
7440
|
{
|
|
7450
7441
|
...slotProps?.radio,
|
|
@@ -7456,9 +7447,9 @@ var RHFRadioGroup = ({
|
|
|
7456
7447
|
}
|
|
7457
7448
|
}
|
|
7458
7449
|
),
|
|
7459
|
-
label: /* @__PURE__ */ (0,
|
|
7460
|
-
/* @__PURE__ */ (0,
|
|
7461
|
-
option?.description && /* @__PURE__ */ (0,
|
|
7450
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_Stack5.default, { children: [
|
|
7451
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_Typography5.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7452
|
+
option?.description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_Typography5.default, { variant: "body2", color: "textBody", children: option?.description })
|
|
7462
7453
|
] }),
|
|
7463
7454
|
sx: {
|
|
7464
7455
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7466,7 +7457,7 @@ var RHFRadioGroup = ({
|
|
|
7466
7457
|
},
|
|
7467
7458
|
option.value
|
|
7468
7459
|
)) }),
|
|
7469
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7460
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_FormHelperText4.default, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7470
7461
|
] })
|
|
7471
7462
|
}
|
|
7472
7463
|
);
|
|
@@ -7476,7 +7467,7 @@ var RHFRadioGroup = ({
|
|
|
7476
7467
|
var import_react_hook_form7 = require("react-hook-form");
|
|
7477
7468
|
var import_TextField4 = __toESM(require("@mui/material/TextField"), 1);
|
|
7478
7469
|
var import_Autocomplete4 = __toESM(require("@mui/material/Autocomplete"), 1);
|
|
7479
|
-
var
|
|
7470
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7480
7471
|
var RHFAutocomplete = ({
|
|
7481
7472
|
name,
|
|
7482
7473
|
label,
|
|
@@ -7487,12 +7478,12 @@ var RHFAutocomplete = ({
|
|
|
7487
7478
|
...other
|
|
7488
7479
|
}) => {
|
|
7489
7480
|
const { control, setValue } = (0, import_react_hook_form7.useFormContext)();
|
|
7490
|
-
return /* @__PURE__ */ (0,
|
|
7481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7491
7482
|
import_react_hook_form7.Controller,
|
|
7492
7483
|
{
|
|
7493
7484
|
name,
|
|
7494
7485
|
control,
|
|
7495
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7486
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7496
7487
|
import_Autocomplete4.default,
|
|
7497
7488
|
{
|
|
7498
7489
|
...field,
|
|
@@ -7501,7 +7492,7 @@ var RHFAutocomplete = ({
|
|
|
7501
7492
|
setValue(name, newValue, { shouldValidate: true });
|
|
7502
7493
|
handleChange?.(newValue);
|
|
7503
7494
|
},
|
|
7504
|
-
renderInput: (params) => /* @__PURE__ */ (0,
|
|
7495
|
+
renderInput: (params) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7505
7496
|
import_TextField4.default,
|
|
7506
7497
|
{
|
|
7507
7498
|
label,
|
|
@@ -7530,7 +7521,7 @@ var import_FormLabel3 = __toESM(require("@mui/material/FormLabel"), 1);
|
|
|
7530
7521
|
var import_FormControl3 = __toESM(require("@mui/material/FormControl"), 1);
|
|
7531
7522
|
var import_FormHelperText5 = __toESM(require("@mui/material/FormHelperText"), 1);
|
|
7532
7523
|
var import_FormControlLabel4 = __toESM(require("@mui/material/FormControlLabel"), 1);
|
|
7533
|
-
var
|
|
7524
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7534
7525
|
var RHFCheckbox = ({
|
|
7535
7526
|
name,
|
|
7536
7527
|
description,
|
|
@@ -7542,16 +7533,16 @@ var RHFCheckbox = ({
|
|
|
7542
7533
|
}) => {
|
|
7543
7534
|
const { control } = (0, import_react_hook_form8.useFormContext)();
|
|
7544
7535
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
7545
|
-
return /* @__PURE__ */ (0,
|
|
7536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7546
7537
|
import_react_hook_form8.Controller,
|
|
7547
7538
|
{
|
|
7548
7539
|
name,
|
|
7549
7540
|
control,
|
|
7550
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7551
|
-
/* @__PURE__ */ (0,
|
|
7541
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_Box15.default, { sx: slotProps?.wrap, children: [
|
|
7542
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7552
7543
|
import_FormControlLabel4.default,
|
|
7553
7544
|
{
|
|
7554
|
-
control: /* @__PURE__ */ (0,
|
|
7545
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7555
7546
|
import_Checkbox3.default,
|
|
7556
7547
|
{
|
|
7557
7548
|
...field,
|
|
@@ -7566,9 +7557,9 @@ var RHFCheckbox = ({
|
|
|
7566
7557
|
}
|
|
7567
7558
|
}
|
|
7568
7559
|
),
|
|
7569
|
-
label: /* @__PURE__ */ (0,
|
|
7570
|
-
/* @__PURE__ */ (0,
|
|
7571
|
-
description && /* @__PURE__ */ (0,
|
|
7560
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_Stack6.default, { children: [
|
|
7561
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_Typography6.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7562
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_Typography6.default, { variant: "body2", color: "textBody", children: description })
|
|
7572
7563
|
] }),
|
|
7573
7564
|
sx: {
|
|
7574
7565
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7577,7 +7568,7 @@ var RHFCheckbox = ({
|
|
|
7577
7568
|
...other
|
|
7578
7569
|
}
|
|
7579
7570
|
),
|
|
7580
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7571
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_FormHelperText5.default, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7581
7572
|
] })
|
|
7582
7573
|
}
|
|
7583
7574
|
);
|
|
@@ -7593,13 +7584,13 @@ var RHFMultiCheckbox = ({
|
|
|
7593
7584
|
}) => {
|
|
7594
7585
|
const { control } = (0, import_react_hook_form8.useFormContext)();
|
|
7595
7586
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7596
|
-
return /* @__PURE__ */ (0,
|
|
7587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7597
7588
|
import_react_hook_form8.Controller,
|
|
7598
7589
|
{
|
|
7599
7590
|
name,
|
|
7600
7591
|
control,
|
|
7601
7592
|
defaultValue: [],
|
|
7602
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0,
|
|
7593
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
7603
7594
|
import_FormControl3.default,
|
|
7604
7595
|
{
|
|
7605
7596
|
component: "fieldset",
|
|
@@ -7607,7 +7598,7 @@ var RHFMultiCheckbox = ({
|
|
|
7607
7598
|
sx: slotProps?.formControl?.sx,
|
|
7608
7599
|
...slotProps?.formControl,
|
|
7609
7600
|
children: [
|
|
7610
|
-
label && /* @__PURE__ */ (0,
|
|
7601
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7611
7602
|
import_FormLabel3.default,
|
|
7612
7603
|
{
|
|
7613
7604
|
component: "legend",
|
|
@@ -7616,12 +7607,12 @@ var RHFMultiCheckbox = ({
|
|
|
7616
7607
|
children: label
|
|
7617
7608
|
}
|
|
7618
7609
|
),
|
|
7619
|
-
/* @__PURE__ */ (0,
|
|
7610
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_FormGroup2.default, { row, ...other, children: options.map((option) => {
|
|
7620
7611
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7621
|
-
return /* @__PURE__ */ (0,
|
|
7612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7622
7613
|
import_FormControlLabel4.default,
|
|
7623
7614
|
{
|
|
7624
|
-
control: /* @__PURE__ */ (0,
|
|
7615
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7625
7616
|
import_Checkbox3.default,
|
|
7626
7617
|
{
|
|
7627
7618
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7639,9 +7630,9 @@ var RHFMultiCheckbox = ({
|
|
|
7639
7630
|
}
|
|
7640
7631
|
}
|
|
7641
7632
|
),
|
|
7642
|
-
label: /* @__PURE__ */ (0,
|
|
7643
|
-
/* @__PURE__ */ (0,
|
|
7644
|
-
option?.description && /* @__PURE__ */ (0,
|
|
7633
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_Stack6.default, { children: [
|
|
7634
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_Typography6.default, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7635
|
+
option?.description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_Typography6.default, { variant: "body2", color: "textBody", children: option?.description })
|
|
7645
7636
|
] }),
|
|
7646
7637
|
sx: {
|
|
7647
7638
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7650,7 +7641,7 @@ var RHFMultiCheckbox = ({
|
|
|
7650
7641
|
option.value
|
|
7651
7642
|
);
|
|
7652
7643
|
}) }),
|
|
7653
|
-
(!!error2 || helperText) && /* @__PURE__ */ (0,
|
|
7644
|
+
(!!error2 || helperText) && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7654
7645
|
import_FormHelperText5.default,
|
|
7655
7646
|
{
|
|
7656
7647
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -7680,17 +7671,17 @@ var Field = {
|
|
|
7680
7671
|
// src/components/CopyButton/index.tsx
|
|
7681
7672
|
var import_Tooltip2 = __toESM(require("@mui/material/Tooltip"), 1);
|
|
7682
7673
|
var import_IconButton5 = __toESM(require("@mui/material/IconButton"), 1);
|
|
7683
|
-
var
|
|
7674
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7684
7675
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
7685
7676
|
const { copy, isCopied } = useCopyToClipboard();
|
|
7686
|
-
return /* @__PURE__ */ (0,
|
|
7677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_Tooltip2.default, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7687
7678
|
import_IconButton5.default,
|
|
7688
7679
|
{
|
|
7689
7680
|
size,
|
|
7690
7681
|
onClick: () => copy(text2),
|
|
7691
7682
|
"aria-label": "copy token",
|
|
7692
7683
|
sx: { color: "icon.black" },
|
|
7693
|
-
children: /* @__PURE__ */ (0,
|
|
7684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
7694
7685
|
}
|
|
7695
7686
|
) });
|
|
7696
7687
|
};
|
|
@@ -7699,9 +7690,9 @@ var CopyButton = ({ text: text2, size = "small" }) => {
|
|
|
7699
7690
|
var import_Portal = __toESM(require("@mui/material/Portal"), 1);
|
|
7700
7691
|
var import_Box16 = __toESM(require("@mui/material/Box"), 1);
|
|
7701
7692
|
var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"), 1);
|
|
7702
|
-
var
|
|
7693
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7703
7694
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
7704
|
-
const content = /* @__PURE__ */ (0,
|
|
7695
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7705
7696
|
import_Box16.default,
|
|
7706
7697
|
{
|
|
7707
7698
|
sx: {
|
|
@@ -7715,16 +7706,16 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
7715
7706
|
...sx
|
|
7716
7707
|
},
|
|
7717
7708
|
...rest,
|
|
7718
|
-
children: /* @__PURE__ */ (0,
|
|
7709
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_LinearProgress.default, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
7719
7710
|
}
|
|
7720
7711
|
);
|
|
7721
7712
|
if (portal) {
|
|
7722
|
-
return /* @__PURE__ */ (0,
|
|
7713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_Portal.default, { children: content });
|
|
7723
7714
|
}
|
|
7724
7715
|
return content;
|
|
7725
7716
|
};
|
|
7726
7717
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
7727
|
-
const content = /* @__PURE__ */ (0,
|
|
7718
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7728
7719
|
import_Box16.default,
|
|
7729
7720
|
{
|
|
7730
7721
|
sx: {
|
|
@@ -7741,11 +7732,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7741
7732
|
...sx
|
|
7742
7733
|
},
|
|
7743
7734
|
...rest,
|
|
7744
|
-
children: /* @__PURE__ */ (0,
|
|
7735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AnimatedLogo, {})
|
|
7745
7736
|
}
|
|
7746
7737
|
);
|
|
7747
7738
|
if (portal) {
|
|
7748
|
-
return /* @__PURE__ */ (0,
|
|
7739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_Portal.default, { children: content });
|
|
7749
7740
|
}
|
|
7750
7741
|
return content;
|
|
7751
7742
|
};
|
|
@@ -7833,7 +7824,6 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7833
7824
|
fShortenNumber,
|
|
7834
7825
|
formatFullname,
|
|
7835
7826
|
getCurrencySymbol,
|
|
7836
|
-
getInitColorSchemeScript,
|
|
7837
7827
|
getInitials,
|
|
7838
7828
|
getStorage,
|
|
7839
7829
|
grey,
|