@undefine-ui/design-system 2.14.1 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -1
- package/dist/index.cjs +402 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +860 -848
- package/dist/index.d.ts +860 -848
- package/dist/index.js +397 -257
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1338,6 +1338,18 @@ function shadows(colorScheme) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
1340
|
// src/theme/core/components/list.ts
|
|
1341
|
+
var MuiList = {
|
|
1342
|
+
/** **************************************
|
|
1343
|
+
* STYLE
|
|
1344
|
+
*************************************** */
|
|
1345
|
+
styleOverrides: {
|
|
1346
|
+
root: ({ theme }) => ({
|
|
1347
|
+
'&[role="listbox"]': {
|
|
1348
|
+
padding: theme.spacing(0, 1)
|
|
1349
|
+
}
|
|
1350
|
+
})
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1341
1353
|
var MuiListSubheader = {
|
|
1342
1354
|
/** **************************************
|
|
1343
1355
|
* STYLE
|
|
@@ -1390,6 +1402,7 @@ var MuiListItemText = {
|
|
|
1390
1402
|
styleOverrides: { root: { margin: 0 }, multiline: { margin: 0 } }
|
|
1391
1403
|
};
|
|
1392
1404
|
var list = {
|
|
1405
|
+
MuiList,
|
|
1393
1406
|
MuiListSubheader,
|
|
1394
1407
|
MuiListItemIcon,
|
|
1395
1408
|
MuiListItemAvatar,
|
|
@@ -1398,6 +1411,12 @@ var list = {
|
|
|
1398
1411
|
|
|
1399
1412
|
// src/theme/core/components/card.ts
|
|
1400
1413
|
var MuiCard = {
|
|
1414
|
+
/** **************************************
|
|
1415
|
+
* DEFAULT PROPS
|
|
1416
|
+
*************************************** */
|
|
1417
|
+
defaultProps: {
|
|
1418
|
+
variant: "outlined"
|
|
1419
|
+
},
|
|
1401
1420
|
/** **************************************
|
|
1402
1421
|
* STYLE
|
|
1403
1422
|
*************************************** */
|
|
@@ -1405,12 +1424,12 @@ var MuiCard = {
|
|
|
1405
1424
|
root: ({ theme, ownerState }) => ({
|
|
1406
1425
|
position: "relative",
|
|
1407
1426
|
boxShadow: theme.customShadows["shadow-sm"],
|
|
1408
|
-
borderRadius:
|
|
1427
|
+
borderRadius: theme.radius["radius-md"],
|
|
1409
1428
|
zIndex: 0,
|
|
1410
1429
|
// Fix Safari overflow: hidden with border radius
|
|
1411
1430
|
...ownerState.variant === "outlined" && {
|
|
1412
1431
|
boxShadow: "none",
|
|
1413
|
-
borderColor:
|
|
1432
|
+
borderColor: theme.vars.palette.border.mute
|
|
1414
1433
|
}
|
|
1415
1434
|
})
|
|
1416
1435
|
}
|
|
@@ -3616,7 +3635,7 @@ var MuiButton = {
|
|
|
3616
3635
|
*************************************** */
|
|
3617
3636
|
defaultProps: {
|
|
3618
3637
|
color: "primary",
|
|
3619
|
-
variant: "
|
|
3638
|
+
variant: "contained",
|
|
3620
3639
|
disableElevation: true,
|
|
3621
3640
|
disableRipple: true,
|
|
3622
3641
|
loadingIndicator: /* @__PURE__ */ jsx33(Icon, { icon: "Loader" })
|
|
@@ -4700,12 +4719,11 @@ var MuiPagination = {
|
|
|
4700
4719
|
*/
|
|
4701
4720
|
outlined: ({ ownerState, theme }) => ({
|
|
4702
4721
|
[`& .${paginationItemClasses.root}`]: {
|
|
4703
|
-
borderColor:
|
|
4722
|
+
borderColor: theme.vars.palette.border.mute,
|
|
4723
|
+
borderRadius: theme.radius["radius-sm"],
|
|
4704
4724
|
[`&.${paginationItemClasses.selected}`]: {
|
|
4705
|
-
borderColor: "currentColor",
|
|
4706
|
-
fontWeight: theme.typography.fontWeightSemiBold,
|
|
4707
4725
|
...ownerState.color === "standard" && {
|
|
4708
|
-
backgroundColor:
|
|
4726
|
+
backgroundColor: theme.vars.palette.neutral[200]
|
|
4709
4727
|
}
|
|
4710
4728
|
}
|
|
4711
4729
|
}
|
|
@@ -4799,30 +4817,42 @@ var MuiDataGrid = {
|
|
|
4799
4817
|
styleOverrides: {
|
|
4800
4818
|
root: ({ theme }) => ({
|
|
4801
4819
|
"--unstable_DataGrid-radius": 0,
|
|
4802
|
-
"--DataGrid-rowBorderColor": theme.vars.palette.
|
|
4803
|
-
"--DataGrid-containerBackground": theme.vars.palette.
|
|
4820
|
+
"--DataGrid-rowBorderColor": theme.vars.palette.border.mute,
|
|
4821
|
+
"--DataGrid-containerBackground": theme.vars.palette.neutral[50],
|
|
4804
4822
|
"--unstable_DataGrid-headWeight": theme.typography.fontWeightSemiBold,
|
|
4805
4823
|
borderWidth: 0,
|
|
4806
4824
|
scrollbarWidth: "thin",
|
|
4807
4825
|
scrollbarColor: `${varAlpha(theme.vars.palette.text.disableChannel, 0.4)} ${varAlpha(theme.vars.palette.text.disableChannel, 0.08)}`,
|
|
4808
|
-
"& .MuiDataGrid-filler > div": { borderTopStyle: "
|
|
4809
|
-
"& .MuiDataGrid-topContainer::after": { height: 0 }
|
|
4826
|
+
"& .MuiDataGrid-filler > div": { borderTopStyle: "solid" },
|
|
4827
|
+
"& .MuiDataGrid-topContainer::after": { height: 0 },
|
|
4828
|
+
minHeight: 320
|
|
4810
4829
|
}),
|
|
4811
4830
|
withBorderColor: { borderColor: "var(--DataGrid-rowBorderColor)" },
|
|
4812
4831
|
/**
|
|
4813
4832
|
* Column
|
|
4814
4833
|
*/
|
|
4834
|
+
columnHeaders: ({ theme }) => ({
|
|
4835
|
+
height: theme.spacing(5)
|
|
4836
|
+
}),
|
|
4815
4837
|
columnHeader: ({ theme }) => ({
|
|
4816
|
-
|
|
4817
|
-
color: theme.vars.palette.text.
|
|
4838
|
+
...theme.typography.body2,
|
|
4839
|
+
color: theme.vars.palette.text.body,
|
|
4840
|
+
backgroundColor: theme.vars.palette.neutral[50],
|
|
4841
|
+
height: theme.spacing(5),
|
|
4818
4842
|
"&--sorted": { color: theme.vars.palette.text.primary }
|
|
4819
4843
|
}),
|
|
4820
|
-
|
|
4844
|
+
columnHeaderTitle: ({ theme }) => ({
|
|
4845
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
4846
|
+
}),
|
|
4847
|
+
columnSeparator: { color: "var(--DataGrid-rowBorderColor)", visibility: "hidden" },
|
|
4821
4848
|
/**
|
|
4822
4849
|
* Row, Cell
|
|
4823
4850
|
*/
|
|
4824
4851
|
cell: ({ theme }) => ({
|
|
4825
|
-
|
|
4852
|
+
fontSize: theme.typography.pxToRem(14),
|
|
4853
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
4854
|
+
color: theme.vars.palette.text.header,
|
|
4855
|
+
borderTopStyle: "solid",
|
|
4826
4856
|
"&--editing": {
|
|
4827
4857
|
boxShadow: "none",
|
|
4828
4858
|
backgroundColor: varAlpha(theme.vars.palette.primary.mainChannel, 0.08)
|
|
@@ -4882,13 +4912,8 @@ var MuiDataGrid = {
|
|
|
4882
4912
|
/**
|
|
4883
4913
|
* Footer
|
|
4884
4914
|
*/
|
|
4885
|
-
footerContainer: { minHeight: "auto", borderTopStyle: "
|
|
4915
|
+
footerContainer: { minHeight: "auto", borderTopStyle: "solid" },
|
|
4886
4916
|
selectedRowCount: { display: "none", whiteSpace: "nowrap" },
|
|
4887
|
-
overlay: ({ theme }) => ({
|
|
4888
|
-
[`& .${circularProgressClasses.root}`]: {
|
|
4889
|
-
color: theme.vars.palette.text.primary
|
|
4890
|
-
}
|
|
4891
|
-
}),
|
|
4892
4917
|
/**
|
|
4893
4918
|
* Column panel
|
|
4894
4919
|
*/
|
|
@@ -4927,6 +4952,12 @@ var MuiDataGrid = {
|
|
|
4927
4952
|
backgroundColor: varAlpha(theme.vars.palette.grey["500Channel"], 0.16),
|
|
4928
4953
|
[`& .${svgIconClasses2.root}`]: { width: 16, height: 16 }
|
|
4929
4954
|
}
|
|
4955
|
+
}),
|
|
4956
|
+
/** Overlay */
|
|
4957
|
+
overlay: ({ theme }) => ({
|
|
4958
|
+
[`& .${circularProgressClasses.root}`]: {
|
|
4959
|
+
color: theme.vars.palette.text.primary
|
|
4960
|
+
}
|
|
4930
4961
|
})
|
|
4931
4962
|
}
|
|
4932
4963
|
};
|
|
@@ -5241,7 +5272,7 @@ var MuiAutocomplete = {
|
|
|
5241
5272
|
...paper({ theme, dropdown: true })
|
|
5242
5273
|
}),
|
|
5243
5274
|
listbox: ({ theme }) => ({
|
|
5244
|
-
padding: 0,
|
|
5275
|
+
padding: theme.spacing(0, 1),
|
|
5245
5276
|
[`& .${autocompleteClasses3.option}`]: {
|
|
5246
5277
|
...menuItem(theme)
|
|
5247
5278
|
}
|
|
@@ -5575,7 +5606,7 @@ var breakpoints = () => ({
|
|
|
5575
5606
|
sm: 600,
|
|
5576
5607
|
md: 900,
|
|
5577
5608
|
lg: 1200,
|
|
5578
|
-
xl:
|
|
5609
|
+
xl: 1400
|
|
5579
5610
|
}
|
|
5580
5611
|
});
|
|
5581
5612
|
|
|
@@ -5916,29 +5947,103 @@ var AnimatedLogo = () => {
|
|
|
5916
5947
|
};
|
|
5917
5948
|
|
|
5918
5949
|
// src/components/Table/Table.tsx
|
|
5919
|
-
import Box4 from "@mui/material/Box";
|
|
5920
5950
|
import { DataGrid } from "@mui/x-data-grid";
|
|
5921
5951
|
|
|
5922
5952
|
// src/components/Table/components/TableNoRows.tsx
|
|
5923
|
-
import Box3 from "@mui/material/Box";
|
|
5924
5953
|
import { styled } from "@mui/material/styles";
|
|
5925
|
-
|
|
5954
|
+
|
|
5955
|
+
// src/components/EmptyContent/index.tsx
|
|
5956
|
+
import Box3 from "@mui/material/Box";
|
|
5957
|
+
import Stack from "@mui/material/Stack";
|
|
5958
|
+
import Typography from "@mui/material/Typography";
|
|
5959
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5960
|
+
var EmptyContent = ({
|
|
5961
|
+
sx,
|
|
5962
|
+
imgUrl,
|
|
5963
|
+
action: action2,
|
|
5964
|
+
filled,
|
|
5965
|
+
slotProps,
|
|
5966
|
+
description,
|
|
5967
|
+
title = "No data",
|
|
5968
|
+
...rest
|
|
5969
|
+
}) => {
|
|
5970
|
+
return /* @__PURE__ */ jsxs23(
|
|
5971
|
+
Stack,
|
|
5972
|
+
{
|
|
5973
|
+
flexGrow: 1,
|
|
5974
|
+
alignItems: "center",
|
|
5975
|
+
justifyContent: "center",
|
|
5976
|
+
sx: {
|
|
5977
|
+
px: 3,
|
|
5978
|
+
height: 1,
|
|
5979
|
+
...filled && {
|
|
5980
|
+
borderRadius: (theme) => theme.radius["radius-lg"],
|
|
5981
|
+
bgcolor: (theme) => theme.vars.palette.neutral[50],
|
|
5982
|
+
border: (theme) => `dashed 1px ${theme.vars.palette.border.default}`
|
|
5983
|
+
},
|
|
5984
|
+
...sx
|
|
5985
|
+
},
|
|
5986
|
+
...rest,
|
|
5987
|
+
children: [
|
|
5988
|
+
imgUrl && /* @__PURE__ */ jsx40(
|
|
5989
|
+
Box3,
|
|
5990
|
+
{
|
|
5991
|
+
component: "img",
|
|
5992
|
+
alt: "empty content",
|
|
5993
|
+
src: imgUrl,
|
|
5994
|
+
sx: { width: 1, maxWidth: 160, ...slotProps?.img, mb: 2 }
|
|
5995
|
+
}
|
|
5996
|
+
),
|
|
5997
|
+
title && /* @__PURE__ */ jsx40(
|
|
5998
|
+
Typography,
|
|
5999
|
+
{
|
|
6000
|
+
variant: filled ? "h7" : "h6",
|
|
6001
|
+
sx: {
|
|
6002
|
+
mb: 0.5,
|
|
6003
|
+
textAlign: "center",
|
|
6004
|
+
fontWeight: 500,
|
|
6005
|
+
...slotProps?.title,
|
|
6006
|
+
color: "text.header"
|
|
6007
|
+
},
|
|
6008
|
+
children: title
|
|
6009
|
+
}
|
|
6010
|
+
),
|
|
6011
|
+
description && /* @__PURE__ */ jsx40(
|
|
6012
|
+
Typography,
|
|
6013
|
+
{
|
|
6014
|
+
variant: "h8",
|
|
6015
|
+
sx: {
|
|
6016
|
+
mb: 3,
|
|
6017
|
+
textAlign: "center",
|
|
6018
|
+
color: "text.body",
|
|
6019
|
+
...slotProps?.description
|
|
6020
|
+
},
|
|
6021
|
+
children: description
|
|
6022
|
+
}
|
|
6023
|
+
),
|
|
6024
|
+
action2 && action2
|
|
6025
|
+
]
|
|
6026
|
+
}
|
|
6027
|
+
);
|
|
6028
|
+
};
|
|
6029
|
+
|
|
6030
|
+
// src/components/Table/components/TableNoRows.tsx
|
|
6031
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
5926
6032
|
var StyledGridOverlay = styled("div")(({ theme }) => ({
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
alignItems: "center",
|
|
5930
|
-
justifyContent: "center",
|
|
5931
|
-
padding: theme.spacing(3),
|
|
6033
|
+
padding: theme.spacing(1.5, 3, 3),
|
|
6034
|
+
width: "100%",
|
|
5932
6035
|
height: "100%"
|
|
5933
6036
|
}));
|
|
5934
|
-
var TableNoRows = (
|
|
5935
|
-
return /* @__PURE__ */
|
|
6037
|
+
var TableNoRows = (props) => {
|
|
6038
|
+
return /* @__PURE__ */ jsx41(StyledGridOverlay, { children: /* @__PURE__ */ jsx41(EmptyContent, { ...props, sx: { width: "100%" } }) });
|
|
5936
6039
|
};
|
|
5937
6040
|
var TableNoRows_default = TableNoRows;
|
|
5938
6041
|
|
|
5939
6042
|
// src/components/Table/components/TablePagination.tsx
|
|
5940
|
-
import
|
|
5941
|
-
import
|
|
6043
|
+
import Stack2 from "@mui/material/Stack";
|
|
6044
|
+
import Button from "@mui/material/Button";
|
|
6045
|
+
import { useTheme as useTheme2 } from "@mui/material/styles";
|
|
6046
|
+
import Typography2 from "@mui/material/Typography";
|
|
5942
6047
|
import Pagination from "@mui/material/Pagination";
|
|
5943
6048
|
import PaginationItem from "@mui/material/PaginationItem";
|
|
5944
6049
|
import {
|
|
@@ -5946,20 +6051,17 @@ import {
|
|
|
5946
6051
|
gridPageSelector,
|
|
5947
6052
|
useGridApiContext,
|
|
5948
6053
|
gridPageSizeSelector,
|
|
5949
|
-
gridRowCountSelector,
|
|
5950
6054
|
gridPageCountSelector
|
|
5951
6055
|
} from "@mui/x-data-grid";
|
|
5952
|
-
import { jsx as
|
|
6056
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5953
6057
|
var TablePagination = () => {
|
|
6058
|
+
const theme = useTheme2();
|
|
5954
6059
|
const apiRef = useGridApiContext();
|
|
5955
6060
|
const page = useGridSelector(apiRef, gridPageSelector);
|
|
5956
6061
|
const pageCount = useGridSelector(apiRef, gridPageCountSelector);
|
|
5957
6062
|
const pageSize = useGridSelector(apiRef, gridPageSizeSelector);
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
const to = Math.min((page + 1) * pageSize, rowCount);
|
|
5961
|
-
return /* @__PURE__ */ jsxs23(
|
|
5962
|
-
Stack,
|
|
6063
|
+
return /* @__PURE__ */ jsxs24(
|
|
6064
|
+
Stack2,
|
|
5963
6065
|
{
|
|
5964
6066
|
direction: "row",
|
|
5965
6067
|
alignItems: { xs: "flex-end", md: "center" },
|
|
@@ -5967,38 +6069,62 @@ var TablePagination = () => {
|
|
|
5967
6069
|
width: 1,
|
|
5968
6070
|
p: 1.5,
|
|
5969
6071
|
children: [
|
|
5970
|
-
/* @__PURE__ */
|
|
5971
|
-
|
|
6072
|
+
/* @__PURE__ */ jsx42(Stack2, { direction: "row", alignItems: "center", spacing: 1, children: /* @__PURE__ */ jsxs24(
|
|
6073
|
+
Typography2,
|
|
6074
|
+
{
|
|
6075
|
+
variant: "h8",
|
|
6076
|
+
color: "text.header",
|
|
6077
|
+
fontFamily: theme.typography.fontSecondaryFamily,
|
|
6078
|
+
children: [
|
|
6079
|
+
pageSize,
|
|
6080
|
+
" rows per page"
|
|
6081
|
+
]
|
|
6082
|
+
}
|
|
6083
|
+
) }),
|
|
6084
|
+
/* @__PURE__ */ jsx42(
|
|
6085
|
+
Stack2,
|
|
5972
6086
|
{
|
|
5973
6087
|
direction: { xs: "column", md: "row" },
|
|
5974
6088
|
alignItems: { xs: "flex-start", md: "center" },
|
|
5975
6089
|
spacing: 2,
|
|
5976
|
-
children:
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
),
|
|
5992
|
-
/* @__PURE__ */ jsx41(Stack, { direction: "row", alignItems: "center", spacing: 1, children: /* @__PURE__ */ jsxs23(Typography, { variant: "body2", color: "text.secondary", children: [
|
|
5993
|
-
pageSize,
|
|
5994
|
-
" Items per page"
|
|
5995
|
-
] }) })
|
|
5996
|
-
]
|
|
6090
|
+
children: /* @__PURE__ */ jsx42(
|
|
6091
|
+
Pagination,
|
|
6092
|
+
{
|
|
6093
|
+
size: "medium",
|
|
6094
|
+
variant: "outlined",
|
|
6095
|
+
shape: "rounded",
|
|
6096
|
+
page: page + 1,
|
|
6097
|
+
count: pageCount,
|
|
6098
|
+
siblingCount: 1,
|
|
6099
|
+
hideNextButton: true,
|
|
6100
|
+
hidePrevButton: true,
|
|
6101
|
+
onChange: (_, value) => apiRef.current.setPage(value - 1),
|
|
6102
|
+
renderItem: (item) => /* @__PURE__ */ jsx42(PaginationItem, { ...item })
|
|
6103
|
+
}
|
|
6104
|
+
)
|
|
5997
6105
|
}
|
|
5998
6106
|
),
|
|
5999
|
-
/* @__PURE__ */
|
|
6000
|
-
|
|
6001
|
-
|
|
6107
|
+
/* @__PURE__ */ jsxs24(Stack2, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
6108
|
+
/* @__PURE__ */ jsx42(
|
|
6109
|
+
Button,
|
|
6110
|
+
{
|
|
6111
|
+
color: "inherit",
|
|
6112
|
+
variant: page === 0 ? "contained" : "outlined",
|
|
6113
|
+
disabled: page === 0,
|
|
6114
|
+
onClick: () => apiRef.current.setPage(page - 1),
|
|
6115
|
+
children: "Previous"
|
|
6116
|
+
}
|
|
6117
|
+
),
|
|
6118
|
+
/* @__PURE__ */ jsx42(
|
|
6119
|
+
Button,
|
|
6120
|
+
{
|
|
6121
|
+
color: "inherit",
|
|
6122
|
+
variant: page >= pageCount - 1 ? "contained" : "outlined",
|
|
6123
|
+
disabled: page >= pageCount - 1,
|
|
6124
|
+
onClick: () => apiRef.current.setPage(page + 1),
|
|
6125
|
+
children: "Next"
|
|
6126
|
+
}
|
|
6127
|
+
)
|
|
6002
6128
|
] })
|
|
6003
6129
|
]
|
|
6004
6130
|
}
|
|
@@ -6006,29 +6132,35 @@ var TablePagination = () => {
|
|
|
6006
6132
|
};
|
|
6007
6133
|
|
|
6008
6134
|
// src/components/Table/Table.tsx
|
|
6009
|
-
import { jsx as
|
|
6135
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6010
6136
|
var Table = (props) => {
|
|
6011
|
-
const { data,
|
|
6012
|
-
|
|
6137
|
+
const { data, showFooter = true, sx, ...rest } = props;
|
|
6138
|
+
const isEmpty = data.length === 0;
|
|
6139
|
+
return /* @__PURE__ */ jsx43(
|
|
6013
6140
|
DataGrid,
|
|
6014
6141
|
{
|
|
6015
|
-
rowHeight:
|
|
6142
|
+
rowHeight: 56,
|
|
6016
6143
|
rows: data,
|
|
6017
6144
|
pagination: true,
|
|
6018
|
-
showToolbar,
|
|
6019
6145
|
disableColumnFilter: true,
|
|
6146
|
+
disableColumnSelector: true,
|
|
6147
|
+
disableColumnSorting: true,
|
|
6148
|
+
disableColumnMenu: true,
|
|
6020
6149
|
slots: {
|
|
6021
6150
|
pagination: TablePagination,
|
|
6151
|
+
noRowsOverlay: TableNoRows_default,
|
|
6022
6152
|
noResultsOverlay: TableNoRows_default,
|
|
6023
|
-
// noRowsOverlay: TableNoRows,
|
|
6024
6153
|
...rest.slots
|
|
6025
6154
|
},
|
|
6026
6155
|
slotProps: {
|
|
6027
|
-
noResultsOverlay: {
|
|
6028
|
-
title: "No Results"
|
|
6029
|
-
},
|
|
6030
6156
|
noRowsOverlay: {
|
|
6031
|
-
|
|
6157
|
+
filled: true,
|
|
6158
|
+
title: "No booking data yet",
|
|
6159
|
+
description: "Try adjusting your search or filter to find what you are looking for."
|
|
6160
|
+
},
|
|
6161
|
+
noResultsOverlay: {
|
|
6162
|
+
title: "No booking data yet",
|
|
6163
|
+
description: "Try adjusting your search or filter to find what you are looking for."
|
|
6032
6164
|
},
|
|
6033
6165
|
loadingOverlay: {
|
|
6034
6166
|
variant: "skeleton"
|
|
@@ -6043,14 +6175,21 @@ var Table = (props) => {
|
|
|
6043
6175
|
}
|
|
6044
6176
|
},
|
|
6045
6177
|
disableRowSelectionOnClick: true,
|
|
6178
|
+
pageSizeOptions: [5, 10, 25, 50, 75, 100],
|
|
6179
|
+
sx: {
|
|
6180
|
+
"& .MuiDataGrid-footerContainer": {
|
|
6181
|
+
display: !isEmpty && showFooter ? "flex" : "none"
|
|
6182
|
+
},
|
|
6183
|
+
...sx
|
|
6184
|
+
},
|
|
6046
6185
|
...rest
|
|
6047
6186
|
}
|
|
6048
|
-
)
|
|
6187
|
+
);
|
|
6049
6188
|
};
|
|
6050
6189
|
|
|
6051
6190
|
// src/components/Image/index.tsx
|
|
6052
6191
|
import { useRef as useRef4, useState as useState9, useEffect as useEffect5, forwardRef } from "react";
|
|
6053
|
-
import
|
|
6192
|
+
import Box4 from "@mui/material/Box";
|
|
6054
6193
|
import Skeleton from "@mui/material/Skeleton";
|
|
6055
6194
|
|
|
6056
6195
|
// src/components/Image/classes.ts
|
|
@@ -6061,7 +6200,7 @@ var imageClasses = {
|
|
|
6061
6200
|
};
|
|
6062
6201
|
|
|
6063
6202
|
// src/components/Image/index.tsx
|
|
6064
|
-
import { jsx as
|
|
6203
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6065
6204
|
var Image = forwardRef(function Image2(props, ref) {
|
|
6066
6205
|
const {
|
|
6067
6206
|
src,
|
|
@@ -6160,8 +6299,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6160
6299
|
const showLoader = status === "idle" || status === "loading";
|
|
6161
6300
|
const showError = status === "error";
|
|
6162
6301
|
const loadingAttr = lazy ? "lazy" : imgLoading ?? "eager";
|
|
6163
|
-
return /* @__PURE__ */
|
|
6164
|
-
|
|
6302
|
+
return /* @__PURE__ */ jsxs25(
|
|
6303
|
+
Box4,
|
|
6165
6304
|
{
|
|
6166
6305
|
className: imageClasses.root.concat(className ? ` ${className}` : ""),
|
|
6167
6306
|
sx: {
|
|
@@ -6175,7 +6314,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6175
6314
|
},
|
|
6176
6315
|
...rest,
|
|
6177
6316
|
children: [
|
|
6178
|
-
showLoader && (loadingIndicator ?? /* @__PURE__ */
|
|
6317
|
+
showLoader && (loadingIndicator ?? /* @__PURE__ */ jsx44(
|
|
6179
6318
|
Skeleton,
|
|
6180
6319
|
{
|
|
6181
6320
|
animation: "wave",
|
|
@@ -6190,8 +6329,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6190
6329
|
}
|
|
6191
6330
|
}
|
|
6192
6331
|
)),
|
|
6193
|
-
/* @__PURE__ */
|
|
6194
|
-
|
|
6332
|
+
/* @__PURE__ */ jsx44(
|
|
6333
|
+
Box4,
|
|
6195
6334
|
{
|
|
6196
6335
|
ref: setRefs,
|
|
6197
6336
|
component: "img",
|
|
@@ -6219,8 +6358,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6219
6358
|
}
|
|
6220
6359
|
}
|
|
6221
6360
|
),
|
|
6222
|
-
withOverlay && !showError && /* @__PURE__ */
|
|
6223
|
-
|
|
6361
|
+
withOverlay && !showError && /* @__PURE__ */ jsx44(
|
|
6362
|
+
Box4,
|
|
6224
6363
|
{
|
|
6225
6364
|
className: imageClasses.overlay,
|
|
6226
6365
|
sx: {
|
|
@@ -6231,8 +6370,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6231
6370
|
children: overlay
|
|
6232
6371
|
}
|
|
6233
6372
|
),
|
|
6234
|
-
showError && (renderError ?? /* @__PURE__ */
|
|
6235
|
-
|
|
6373
|
+
showError && (renderError ?? /* @__PURE__ */ jsx44(
|
|
6374
|
+
Box4,
|
|
6236
6375
|
{
|
|
6237
6376
|
className: imageClasses.overlay,
|
|
6238
6377
|
sx: {
|
|
@@ -6256,18 +6395,18 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6256
6395
|
|
|
6257
6396
|
// src/components/Upload/Upload.tsx
|
|
6258
6397
|
import { useDropzone } from "react-dropzone";
|
|
6259
|
-
import
|
|
6260
|
-
import
|
|
6261
|
-
import
|
|
6398
|
+
import Box10 from "@mui/material/Box";
|
|
6399
|
+
import Stack4 from "@mui/material/Stack";
|
|
6400
|
+
import Button2 from "@mui/material/Button";
|
|
6262
6401
|
import FormHelperText from "@mui/material/FormHelperText";
|
|
6263
6402
|
|
|
6264
6403
|
// src/components/Upload/components/Placeholder.tsx
|
|
6265
|
-
import
|
|
6266
|
-
import
|
|
6267
|
-
import { jsx as
|
|
6404
|
+
import Stack3 from "@mui/material/Stack";
|
|
6405
|
+
import Box5 from "@mui/material/Box";
|
|
6406
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6268
6407
|
var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
6269
|
-
return /* @__PURE__ */
|
|
6270
|
-
|
|
6408
|
+
return /* @__PURE__ */ jsxs26(
|
|
6409
|
+
Box5,
|
|
6271
6410
|
{
|
|
6272
6411
|
sx: {
|
|
6273
6412
|
display: "flex",
|
|
@@ -6277,7 +6416,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6277
6416
|
},
|
|
6278
6417
|
...rest,
|
|
6279
6418
|
children: [
|
|
6280
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ jsx45(
|
|
6281
6420
|
Icon,
|
|
6282
6421
|
{
|
|
6283
6422
|
icon: "CloudUpload",
|
|
@@ -6288,11 +6427,11 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6288
6427
|
}
|
|
6289
6428
|
}
|
|
6290
6429
|
),
|
|
6291
|
-
/* @__PURE__ */
|
|
6292
|
-
/* @__PURE__ */
|
|
6430
|
+
/* @__PURE__ */ jsxs26(Stack3, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
|
|
6431
|
+
/* @__PURE__ */ jsxs26(Box5, { sx: { typography: "h8" }, children: [
|
|
6293
6432
|
"Drag files here or",
|
|
6294
|
-
/* @__PURE__ */
|
|
6295
|
-
|
|
6433
|
+
/* @__PURE__ */ jsx45(
|
|
6434
|
+
Box5,
|
|
6296
6435
|
{
|
|
6297
6436
|
component: "span",
|
|
6298
6437
|
sx: {
|
|
@@ -6304,8 +6443,8 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6304
6443
|
}
|
|
6305
6444
|
)
|
|
6306
6445
|
] }),
|
|
6307
|
-
/* @__PURE__ */
|
|
6308
|
-
|
|
6446
|
+
/* @__PURE__ */ jsxs26(
|
|
6447
|
+
Box5,
|
|
6309
6448
|
{
|
|
6310
6449
|
sx: {
|
|
6311
6450
|
typography: "bodyMd",
|
|
@@ -6326,9 +6465,9 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6326
6465
|
};
|
|
6327
6466
|
|
|
6328
6467
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6329
|
-
import
|
|
6468
|
+
import Box6 from "@mui/material/Box";
|
|
6330
6469
|
import Paper from "@mui/material/Paper";
|
|
6331
|
-
import
|
|
6470
|
+
import Typography3 from "@mui/material/Typography";
|
|
6332
6471
|
|
|
6333
6472
|
// src/components/Upload/utils.tsx
|
|
6334
6473
|
var fileTypeByUrl = (fileUrl = "") => {
|
|
@@ -6359,12 +6498,12 @@ var fileData = (file) => {
|
|
|
6359
6498
|
};
|
|
6360
6499
|
|
|
6361
6500
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6362
|
-
import { jsx as
|
|
6501
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6363
6502
|
var RejectionFiles = ({ files }) => {
|
|
6364
6503
|
if (!files.length) {
|
|
6365
6504
|
return null;
|
|
6366
6505
|
}
|
|
6367
|
-
return /* @__PURE__ */
|
|
6506
|
+
return /* @__PURE__ */ jsx46(
|
|
6368
6507
|
Paper,
|
|
6369
6508
|
{
|
|
6370
6509
|
variant: "outlined",
|
|
@@ -6379,13 +6518,13 @@ var RejectionFiles = ({ files }) => {
|
|
|
6379
6518
|
},
|
|
6380
6519
|
children: files.map(({ file, errors }) => {
|
|
6381
6520
|
const { path, size } = fileData(file);
|
|
6382
|
-
return /* @__PURE__ */
|
|
6383
|
-
/* @__PURE__ */
|
|
6521
|
+
return /* @__PURE__ */ jsxs27(Box6, { sx: { my: 1 }, children: [
|
|
6522
|
+
/* @__PURE__ */ jsxs27(Typography3, { variant: "subtitle2", noWrap: true, children: [
|
|
6384
6523
|
path,
|
|
6385
6524
|
" - ",
|
|
6386
6525
|
size ? fData(size) : ""
|
|
6387
6526
|
] }),
|
|
6388
|
-
errors.map((error2) => /* @__PURE__ */
|
|
6527
|
+
errors.map((error2) => /* @__PURE__ */ jsxs27(Box6, { component: "span", sx: { typography: "caption" }, children: [
|
|
6389
6528
|
"- ",
|
|
6390
6529
|
error2.message
|
|
6391
6530
|
] }, error2.code))
|
|
@@ -6396,12 +6535,12 @@ var RejectionFiles = ({ files }) => {
|
|
|
6396
6535
|
};
|
|
6397
6536
|
|
|
6398
6537
|
// src/components/Upload/components/UploadProgress.tsx
|
|
6399
|
-
import
|
|
6538
|
+
import Box7 from "@mui/material/Box";
|
|
6400
6539
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
6401
|
-
import { jsx as
|
|
6540
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6402
6541
|
var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
6403
|
-
return /* @__PURE__ */
|
|
6404
|
-
|
|
6542
|
+
return /* @__PURE__ */ jsxs28(
|
|
6543
|
+
Box7,
|
|
6405
6544
|
{
|
|
6406
6545
|
sx: {
|
|
6407
6546
|
display: "flex",
|
|
@@ -6411,8 +6550,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6411
6550
|
height: "100%"
|
|
6412
6551
|
},
|
|
6413
6552
|
children: [
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsxs28(Box7, { sx: { position: "relative", display: "inline-flex" }, children: [
|
|
6554
|
+
/* @__PURE__ */ jsx47(
|
|
6416
6555
|
CircularProgress,
|
|
6417
6556
|
{
|
|
6418
6557
|
variant: "determinate",
|
|
@@ -6425,7 +6564,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6425
6564
|
}
|
|
6426
6565
|
}
|
|
6427
6566
|
),
|
|
6428
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ jsx47(
|
|
6429
6568
|
CircularProgress,
|
|
6430
6569
|
{
|
|
6431
6570
|
variant: "determinate",
|
|
@@ -6437,8 +6576,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6437
6576
|
}
|
|
6438
6577
|
}
|
|
6439
6578
|
),
|
|
6440
|
-
/* @__PURE__ */
|
|
6441
|
-
|
|
6579
|
+
/* @__PURE__ */ jsx47(
|
|
6580
|
+
Box7,
|
|
6442
6581
|
{
|
|
6443
6582
|
sx: {
|
|
6444
6583
|
top: 0,
|
|
@@ -6450,11 +6589,11 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6450
6589
|
alignItems: "center",
|
|
6451
6590
|
justifyContent: "center"
|
|
6452
6591
|
},
|
|
6453
|
-
children: /* @__PURE__ */
|
|
6592
|
+
children: /* @__PURE__ */ jsx47(Box7, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
|
|
6454
6593
|
}
|
|
6455
6594
|
)
|
|
6456
6595
|
] }),
|
|
6457
|
-
/* @__PURE__ */
|
|
6596
|
+
/* @__PURE__ */ jsx47(Box7, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
|
|
6458
6597
|
]
|
|
6459
6598
|
}
|
|
6460
6599
|
);
|
|
@@ -6462,18 +6601,18 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6462
6601
|
|
|
6463
6602
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6464
6603
|
import { useRef as useRef5 } from "react";
|
|
6465
|
-
import
|
|
6604
|
+
import Box9 from "@mui/material/Box";
|
|
6466
6605
|
import IconButton2 from "@mui/material/IconButton";
|
|
6467
6606
|
|
|
6468
6607
|
// src/components/Upload/components/SingleFilePreview.tsx
|
|
6469
|
-
import
|
|
6608
|
+
import Box8 from "@mui/material/Box";
|
|
6470
6609
|
import IconButton from "@mui/material/IconButton";
|
|
6471
|
-
import { jsx as
|
|
6610
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
6472
6611
|
var SingleFilePreview = ({ file }) => {
|
|
6473
6612
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6474
6613
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6475
|
-
const renderImg = /* @__PURE__ */
|
|
6476
|
-
|
|
6614
|
+
const renderImg = /* @__PURE__ */ jsx48(
|
|
6615
|
+
Box8,
|
|
6477
6616
|
{
|
|
6478
6617
|
component: "img",
|
|
6479
6618
|
alt: fileName,
|
|
@@ -6486,8 +6625,8 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6486
6625
|
}
|
|
6487
6626
|
}
|
|
6488
6627
|
);
|
|
6489
|
-
return /* @__PURE__ */
|
|
6490
|
-
|
|
6628
|
+
return /* @__PURE__ */ jsx48(
|
|
6629
|
+
Box8,
|
|
6491
6630
|
{
|
|
6492
6631
|
sx: {
|
|
6493
6632
|
p: 1,
|
|
@@ -6502,7 +6641,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6502
6641
|
);
|
|
6503
6642
|
};
|
|
6504
6643
|
var DeleteButton = ({ sx, ...rest }) => {
|
|
6505
|
-
return /* @__PURE__ */
|
|
6644
|
+
return /* @__PURE__ */ jsx48(
|
|
6506
6645
|
IconButton,
|
|
6507
6646
|
{
|
|
6508
6647
|
size: "small",
|
|
@@ -6521,13 +6660,13 @@ var DeleteButton = ({ sx, ...rest }) => {
|
|
|
6521
6660
|
...sx
|
|
6522
6661
|
},
|
|
6523
6662
|
...rest,
|
|
6524
|
-
children: /* @__PURE__ */
|
|
6663
|
+
children: /* @__PURE__ */ jsx48(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
|
|
6525
6664
|
}
|
|
6526
6665
|
);
|
|
6527
6666
|
};
|
|
6528
6667
|
|
|
6529
6668
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6530
|
-
import { jsx as
|
|
6669
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6531
6670
|
var MultiFilePreview = ({ files, onRemove }) => {
|
|
6532
6671
|
const scrollRef = useRef5(null);
|
|
6533
6672
|
const handleScroll = (direction) => {
|
|
@@ -6541,8 +6680,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6541
6680
|
}
|
|
6542
6681
|
};
|
|
6543
6682
|
const showNavigation = files.length > 2;
|
|
6544
|
-
return /* @__PURE__ */
|
|
6545
|
-
showNavigation && /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsxs29(Box9, { sx: { position: "relative", width: 1 }, children: [
|
|
6684
|
+
showNavigation && /* @__PURE__ */ jsx49(
|
|
6546
6685
|
IconButton2,
|
|
6547
6686
|
{
|
|
6548
6687
|
size: "small",
|
|
@@ -6559,11 +6698,11 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6559
6698
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6560
6699
|
}
|
|
6561
6700
|
},
|
|
6562
|
-
children: /* @__PURE__ */
|
|
6701
|
+
children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowLeft", width: 20 })
|
|
6563
6702
|
}
|
|
6564
6703
|
),
|
|
6565
|
-
/* @__PURE__ */
|
|
6566
|
-
|
|
6704
|
+
/* @__PURE__ */ jsx49(
|
|
6705
|
+
Box9,
|
|
6567
6706
|
{
|
|
6568
6707
|
ref: scrollRef,
|
|
6569
6708
|
sx: {
|
|
@@ -6581,8 +6720,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6581
6720
|
children: files.map((file, index) => {
|
|
6582
6721
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6583
6722
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6584
|
-
return /* @__PURE__ */
|
|
6585
|
-
|
|
6723
|
+
return /* @__PURE__ */ jsxs29(
|
|
6724
|
+
Box9,
|
|
6586
6725
|
{
|
|
6587
6726
|
sx: {
|
|
6588
6727
|
position: "relative",
|
|
@@ -6593,8 +6732,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6593
6732
|
flexShrink: 0
|
|
6594
6733
|
},
|
|
6595
6734
|
children: [
|
|
6596
|
-
/* @__PURE__ */
|
|
6597
|
-
|
|
6735
|
+
/* @__PURE__ */ jsx49(
|
|
6736
|
+
Box9,
|
|
6598
6737
|
{
|
|
6599
6738
|
component: "img",
|
|
6600
6739
|
alt: fileName,
|
|
@@ -6607,7 +6746,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6607
6746
|
}
|
|
6608
6747
|
}
|
|
6609
6748
|
),
|
|
6610
|
-
onRemove && /* @__PURE__ */
|
|
6749
|
+
onRemove && /* @__PURE__ */ jsx49(
|
|
6611
6750
|
DeleteButton,
|
|
6612
6751
|
{
|
|
6613
6752
|
onClick: (e) => {
|
|
@@ -6623,7 +6762,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6623
6762
|
})
|
|
6624
6763
|
}
|
|
6625
6764
|
),
|
|
6626
|
-
showNavigation && /* @__PURE__ */
|
|
6765
|
+
showNavigation && /* @__PURE__ */ jsx49(
|
|
6627
6766
|
IconButton2,
|
|
6628
6767
|
{
|
|
6629
6768
|
size: "small",
|
|
@@ -6640,14 +6779,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6640
6779
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6641
6780
|
}
|
|
6642
6781
|
},
|
|
6643
|
-
children: /* @__PURE__ */
|
|
6782
|
+
children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowRight", width: 20 })
|
|
6644
6783
|
}
|
|
6645
6784
|
)
|
|
6646
6785
|
] });
|
|
6647
6786
|
};
|
|
6648
6787
|
|
|
6649
6788
|
// src/components/Upload/Upload.tsx
|
|
6650
|
-
import { jsx as
|
|
6789
|
+
import { jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6651
6790
|
var Upload = ({
|
|
6652
6791
|
sx,
|
|
6653
6792
|
value,
|
|
@@ -6674,20 +6813,20 @@ var Upload = ({
|
|
|
6674
6813
|
const hasError = isDragReject || !!error2;
|
|
6675
6814
|
const renderContent = () => {
|
|
6676
6815
|
if (isUploading) {
|
|
6677
|
-
return /* @__PURE__ */
|
|
6816
|
+
return /* @__PURE__ */ jsx50(UploadProgress, { progress: uploadProgress });
|
|
6678
6817
|
}
|
|
6679
6818
|
if (hasFile) {
|
|
6680
|
-
return /* @__PURE__ */
|
|
6819
|
+
return /* @__PURE__ */ jsx50(SingleFilePreview, { file: value });
|
|
6681
6820
|
}
|
|
6682
6821
|
if (hasFiles) {
|
|
6683
|
-
return /* @__PURE__ */
|
|
6822
|
+
return /* @__PURE__ */ jsx50(MultiFilePreview, { files: value, onRemove });
|
|
6684
6823
|
}
|
|
6685
|
-
return /* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ jsx50(UploadPlaceholder, { hasError });
|
|
6686
6825
|
};
|
|
6687
6826
|
const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
|
|
6688
|
-
return /* @__PURE__ */
|
|
6689
|
-
/* @__PURE__ */
|
|
6690
|
-
|
|
6827
|
+
return /* @__PURE__ */ jsxs30(Box10, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
6828
|
+
/* @__PURE__ */ jsxs30(
|
|
6829
|
+
Box10,
|
|
6691
6830
|
{
|
|
6692
6831
|
...shouldShowDropzone ? getRootProps() : {},
|
|
6693
6832
|
sx: {
|
|
@@ -6725,37 +6864,37 @@ var Upload = ({
|
|
|
6725
6864
|
}
|
|
6726
6865
|
},
|
|
6727
6866
|
children: [
|
|
6728
|
-
shouldShowDropzone && /* @__PURE__ */
|
|
6867
|
+
shouldShowDropzone && /* @__PURE__ */ jsx50("input", { ...getInputProps() }),
|
|
6729
6868
|
renderContent()
|
|
6730
6869
|
]
|
|
6731
6870
|
}
|
|
6732
6871
|
),
|
|
6733
|
-
hasFile && !isUploading && /* @__PURE__ */
|
|
6734
|
-
hasFiles && /* @__PURE__ */
|
|
6735
|
-
onRemoveAll && /* @__PURE__ */
|
|
6736
|
-
|
|
6872
|
+
hasFile && !isUploading && /* @__PURE__ */ jsx50(DeleteButton, { onClick: onDelete }),
|
|
6873
|
+
hasFiles && /* @__PURE__ */ jsxs30(Stack4, { direction: "row", spacing: 2, sx: { mt: 2 }, children: [
|
|
6874
|
+
onRemoveAll && /* @__PURE__ */ jsx50(
|
|
6875
|
+
Button2,
|
|
6737
6876
|
{
|
|
6738
6877
|
variant: "outlined",
|
|
6739
6878
|
color: "inherit",
|
|
6740
6879
|
size: "small",
|
|
6741
6880
|
onClick: onRemoveAll,
|
|
6742
|
-
startIcon: /* @__PURE__ */
|
|
6881
|
+
startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
|
|
6743
6882
|
children: "Remove all"
|
|
6744
6883
|
}
|
|
6745
6884
|
),
|
|
6746
|
-
onUpload && /* @__PURE__ */
|
|
6747
|
-
|
|
6885
|
+
onUpload && /* @__PURE__ */ jsx50(
|
|
6886
|
+
Button2,
|
|
6748
6887
|
{
|
|
6749
6888
|
variant: "contained",
|
|
6750
6889
|
size: "small",
|
|
6751
6890
|
onClick: onUpload,
|
|
6752
|
-
startIcon: /* @__PURE__ */
|
|
6891
|
+
startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
|
|
6753
6892
|
children: "Upload files"
|
|
6754
6893
|
}
|
|
6755
6894
|
)
|
|
6756
6895
|
] }),
|
|
6757
|
-
helperText && /* @__PURE__ */
|
|
6758
|
-
/* @__PURE__ */
|
|
6896
|
+
helperText && /* @__PURE__ */ jsx50(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
|
|
6897
|
+
/* @__PURE__ */ jsx50(RejectionFiles, { files: [...fileRejections] })
|
|
6759
6898
|
] });
|
|
6760
6899
|
};
|
|
6761
6900
|
|
|
@@ -6763,16 +6902,16 @@ var Upload = ({
|
|
|
6763
6902
|
import {
|
|
6764
6903
|
FormProvider as RHFForm
|
|
6765
6904
|
} from "react-hook-form";
|
|
6766
|
-
import
|
|
6767
|
-
import { jsx as
|
|
6905
|
+
import Box11 from "@mui/material/Box";
|
|
6906
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
6768
6907
|
var Form = ({
|
|
6769
6908
|
children,
|
|
6770
6909
|
onSubmit,
|
|
6771
6910
|
methods,
|
|
6772
6911
|
...rest
|
|
6773
6912
|
}) => {
|
|
6774
|
-
return /* @__PURE__ */
|
|
6775
|
-
|
|
6913
|
+
return /* @__PURE__ */ jsx51(RHFForm, { ...methods, children: /* @__PURE__ */ jsx51(
|
|
6914
|
+
Box11,
|
|
6776
6915
|
{
|
|
6777
6916
|
component: "form",
|
|
6778
6917
|
onSubmit: (e) => {
|
|
@@ -6791,16 +6930,16 @@ var Form = ({
|
|
|
6791
6930
|
|
|
6792
6931
|
// src/components/HookForm/RHFSwitch.tsx
|
|
6793
6932
|
import { Controller, useFormContext } from "react-hook-form";
|
|
6794
|
-
import
|
|
6795
|
-
import
|
|
6796
|
-
import
|
|
6933
|
+
import Stack5 from "@mui/material/Stack";
|
|
6934
|
+
import Box12 from "@mui/material/Box";
|
|
6935
|
+
import Typography4 from "@mui/material/Typography";
|
|
6797
6936
|
import Switch from "@mui/material/Switch";
|
|
6798
6937
|
import FormGroup from "@mui/material/FormGroup";
|
|
6799
6938
|
import FormLabel from "@mui/material/FormLabel";
|
|
6800
6939
|
import FormControl from "@mui/material/FormControl";
|
|
6801
6940
|
import FormHelperText2 from "@mui/material/FormHelperText";
|
|
6802
6941
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
6803
|
-
import { jsx as
|
|
6942
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6804
6943
|
var RHFSwitch = ({
|
|
6805
6944
|
name,
|
|
6806
6945
|
description,
|
|
@@ -6812,16 +6951,16 @@ var RHFSwitch = ({
|
|
|
6812
6951
|
}) => {
|
|
6813
6952
|
const { control } = useFormContext();
|
|
6814
6953
|
const baseAriaLabel = `Switch ${name}`;
|
|
6815
|
-
return /* @__PURE__ */
|
|
6954
|
+
return /* @__PURE__ */ jsx52(
|
|
6816
6955
|
Controller,
|
|
6817
6956
|
{
|
|
6818
6957
|
name,
|
|
6819
6958
|
control,
|
|
6820
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
6821
|
-
/* @__PURE__ */
|
|
6959
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(Box12, { sx: slotProps?.wrap, children: [
|
|
6960
|
+
/* @__PURE__ */ jsx52(
|
|
6822
6961
|
FormControlLabel,
|
|
6823
6962
|
{
|
|
6824
|
-
control: /* @__PURE__ */
|
|
6963
|
+
control: /* @__PURE__ */ jsx52(
|
|
6825
6964
|
Switch,
|
|
6826
6965
|
{
|
|
6827
6966
|
...field,
|
|
@@ -6836,9 +6975,9 @@ var RHFSwitch = ({
|
|
|
6836
6975
|
}
|
|
6837
6976
|
}
|
|
6838
6977
|
),
|
|
6839
|
-
label: /* @__PURE__ */
|
|
6840
|
-
/* @__PURE__ */
|
|
6841
|
-
description && /* @__PURE__ */
|
|
6978
|
+
label: /* @__PURE__ */ jsxs31(Stack5, { children: [
|
|
6979
|
+
/* @__PURE__ */ jsx52(Typography4, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
6980
|
+
description && /* @__PURE__ */ jsx52(Typography4, { variant: "body2", color: "textBody", children: description })
|
|
6842
6981
|
] }),
|
|
6843
6982
|
sx: {
|
|
6844
6983
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -6847,7 +6986,7 @@ var RHFSwitch = ({
|
|
|
6847
6986
|
...other
|
|
6848
6987
|
}
|
|
6849
6988
|
),
|
|
6850
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
6989
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx52(
|
|
6851
6990
|
FormHelperText2,
|
|
6852
6991
|
{
|
|
6853
6992
|
error: !!error2,
|
|
@@ -6870,19 +7009,19 @@ var RHFMultiSwitch = ({
|
|
|
6870
7009
|
}) => {
|
|
6871
7010
|
const { control } = useFormContext();
|
|
6872
7011
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
6873
|
-
return /* @__PURE__ */
|
|
7012
|
+
return /* @__PURE__ */ jsx52(
|
|
6874
7013
|
Controller,
|
|
6875
7014
|
{
|
|
6876
7015
|
name,
|
|
6877
7016
|
control,
|
|
6878
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7017
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(
|
|
6879
7018
|
FormControl,
|
|
6880
7019
|
{
|
|
6881
7020
|
component: "fieldset",
|
|
6882
7021
|
sx: slotProps?.formControl?.sx,
|
|
6883
7022
|
...slotProps?.formControl,
|
|
6884
7023
|
children: [
|
|
6885
|
-
label && /* @__PURE__ */
|
|
7024
|
+
label && /* @__PURE__ */ jsx52(
|
|
6886
7025
|
FormLabel,
|
|
6887
7026
|
{
|
|
6888
7027
|
component: "legend",
|
|
@@ -6891,12 +7030,12 @@ var RHFMultiSwitch = ({
|
|
|
6891
7030
|
children: label
|
|
6892
7031
|
}
|
|
6893
7032
|
),
|
|
6894
|
-
/* @__PURE__ */
|
|
7033
|
+
/* @__PURE__ */ jsx52(FormGroup, { ...other, children: options.map((option) => {
|
|
6895
7034
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
6896
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx52(
|
|
6897
7036
|
FormControlLabel,
|
|
6898
7037
|
{
|
|
6899
|
-
control: /* @__PURE__ */
|
|
7038
|
+
control: /* @__PURE__ */ jsx52(
|
|
6900
7039
|
Switch,
|
|
6901
7040
|
{
|
|
6902
7041
|
checked: (field.value || []).includes(option.value),
|
|
@@ -6919,7 +7058,7 @@ var RHFMultiSwitch = ({
|
|
|
6919
7058
|
option.value
|
|
6920
7059
|
);
|
|
6921
7060
|
}) }),
|
|
6922
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7061
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx52(FormHelperText2, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
6923
7062
|
]
|
|
6924
7063
|
}
|
|
6925
7064
|
)
|
|
@@ -6929,10 +7068,10 @@ var RHFMultiSwitch = ({
|
|
|
6929
7068
|
|
|
6930
7069
|
// src/components/HookForm/RHFUpload.tsx
|
|
6931
7070
|
import { Controller as Controller2, useFormContext as useFormContext2 } from "react-hook-form";
|
|
6932
|
-
import { jsx as
|
|
7071
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6933
7072
|
var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
6934
7073
|
const { control, setValue } = useFormContext2();
|
|
6935
|
-
return /* @__PURE__ */
|
|
7074
|
+
return /* @__PURE__ */ jsx53(
|
|
6936
7075
|
Controller2,
|
|
6937
7076
|
{
|
|
6938
7077
|
name,
|
|
@@ -6960,7 +7099,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
6960
7099
|
const onRemoveAll = () => {
|
|
6961
7100
|
setValue(name, [], { shouldValidate: true });
|
|
6962
7101
|
};
|
|
6963
|
-
return /* @__PURE__ */
|
|
7102
|
+
return /* @__PURE__ */ jsx53(
|
|
6964
7103
|
Upload,
|
|
6965
7104
|
{
|
|
6966
7105
|
multiple,
|
|
@@ -6985,15 +7124,15 @@ import { Controller as Controller3, useFormContext as useFormContext3 } from "re
|
|
|
6985
7124
|
|
|
6986
7125
|
// src/components/OTPInput/index.tsx
|
|
6987
7126
|
import { useRef as useRef6, useState as useState10 } from "react";
|
|
6988
|
-
import { useTheme as
|
|
6989
|
-
import
|
|
7127
|
+
import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
7128
|
+
import Box13 from "@mui/material/Box";
|
|
6990
7129
|
import FormHelperText3 from "@mui/material/FormHelperText";
|
|
6991
7130
|
import { inputBaseClasses as inputBaseClasses3 } from "@mui/material/InputBase";
|
|
6992
7131
|
import TextField from "@mui/material/TextField";
|
|
6993
|
-
import { Fragment, jsx as
|
|
7132
|
+
import { Fragment, jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6994
7133
|
var OTPInput = (props) => {
|
|
6995
7134
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
6996
|
-
const theme =
|
|
7135
|
+
const theme = useTheme3();
|
|
6997
7136
|
const [otp, setOtp] = useState10(Array(length).fill(""));
|
|
6998
7137
|
const inputsRef = useRef6([]);
|
|
6999
7138
|
const handleChange = (value, index) => {
|
|
@@ -7058,9 +7197,9 @@ var OTPInput = (props) => {
|
|
|
7058
7197
|
onComplete?.(newOtp.join(""));
|
|
7059
7198
|
}
|
|
7060
7199
|
};
|
|
7061
|
-
return /* @__PURE__ */
|
|
7062
|
-
/* @__PURE__ */
|
|
7063
|
-
|
|
7200
|
+
return /* @__PURE__ */ jsxs32(Fragment, { children: [
|
|
7201
|
+
/* @__PURE__ */ jsx54(Box13, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx54(
|
|
7202
|
+
Box13,
|
|
7064
7203
|
{
|
|
7065
7204
|
display: "flex",
|
|
7066
7205
|
alignItems: "center",
|
|
@@ -7069,7 +7208,7 @@ var OTPInput = (props) => {
|
|
|
7069
7208
|
mr: 1.5
|
|
7070
7209
|
}
|
|
7071
7210
|
},
|
|
7072
|
-
children: /* @__PURE__ */
|
|
7211
|
+
children: /* @__PURE__ */ jsx54(
|
|
7073
7212
|
TextField,
|
|
7074
7213
|
{
|
|
7075
7214
|
size: "medium",
|
|
@@ -7152,21 +7291,21 @@ var OTPInput = (props) => {
|
|
|
7152
7291
|
},
|
|
7153
7292
|
index
|
|
7154
7293
|
)) }),
|
|
7155
|
-
error2 && /* @__PURE__ */
|
|
7294
|
+
error2 && /* @__PURE__ */ jsx54(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
|
|
7156
7295
|
] });
|
|
7157
7296
|
};
|
|
7158
7297
|
var OTPInput_default = OTPInput;
|
|
7159
7298
|
|
|
7160
7299
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
7161
|
-
import { jsx as
|
|
7300
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7162
7301
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
7163
7302
|
const { control, setValue } = useFormContext3();
|
|
7164
|
-
return /* @__PURE__ */
|
|
7303
|
+
return /* @__PURE__ */ jsx55(
|
|
7165
7304
|
Controller3,
|
|
7166
7305
|
{
|
|
7167
7306
|
name,
|
|
7168
7307
|
control,
|
|
7169
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7308
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
|
|
7170
7309
|
OTPInput_default,
|
|
7171
7310
|
{
|
|
7172
7311
|
length,
|
|
@@ -7186,16 +7325,16 @@ import { Controller as Controller4, useFormContext as useFormContext4 } from "re
|
|
|
7186
7325
|
import IconButton3 from "@mui/material/IconButton";
|
|
7187
7326
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
7188
7327
|
import TextField2 from "@mui/material/TextField";
|
|
7189
|
-
import { jsx as
|
|
7328
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
7190
7329
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
7191
7330
|
const { control } = useFormContext4();
|
|
7192
7331
|
const passwordVisibility = useBoolean();
|
|
7193
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ jsx56(
|
|
7194
7333
|
Controller4,
|
|
7195
7334
|
{
|
|
7196
7335
|
name,
|
|
7197
7336
|
control,
|
|
7198
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7337
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx56(
|
|
7199
7338
|
TextField2,
|
|
7200
7339
|
{
|
|
7201
7340
|
...field,
|
|
@@ -7216,7 +7355,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7216
7355
|
input: {
|
|
7217
7356
|
...slotProps?.input,
|
|
7218
7357
|
...type === "password" && {
|
|
7219
|
-
endAdornment: /* @__PURE__ */
|
|
7358
|
+
endAdornment: /* @__PURE__ */ jsx56(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx56(IconButton3, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx56(
|
|
7220
7359
|
Icon,
|
|
7221
7360
|
{
|
|
7222
7361
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -7235,15 +7374,15 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7235
7374
|
|
|
7236
7375
|
// src/components/HookForm/RHFRadioGroup.tsx
|
|
7237
7376
|
import { Controller as Controller5, useFormContext as useFormContext5 } from "react-hook-form";
|
|
7238
|
-
import
|
|
7239
|
-
import
|
|
7377
|
+
import Stack6 from "@mui/material/Stack";
|
|
7378
|
+
import Typography5 from "@mui/material/Typography";
|
|
7240
7379
|
import Radio from "@mui/material/Radio";
|
|
7241
7380
|
import FormControlLabel2 from "@mui/material/FormControlLabel";
|
|
7242
7381
|
import FormLabel2 from "@mui/material/FormLabel";
|
|
7243
7382
|
import RadioGroup from "@mui/material/RadioGroup";
|
|
7244
7383
|
import FormControl2 from "@mui/material/FormControl";
|
|
7245
7384
|
import FormHelperText4 from "@mui/material/FormHelperText";
|
|
7246
|
-
import { jsx as
|
|
7385
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7247
7386
|
var RHFRadioGroup = ({
|
|
7248
7387
|
name,
|
|
7249
7388
|
label,
|
|
@@ -7255,13 +7394,13 @@ var RHFRadioGroup = ({
|
|
|
7255
7394
|
const { control } = useFormContext5();
|
|
7256
7395
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
7257
7396
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
7258
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ jsx57(
|
|
7259
7398
|
Controller5,
|
|
7260
7399
|
{
|
|
7261
7400
|
name,
|
|
7262
7401
|
control,
|
|
7263
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7264
|
-
label && /* @__PURE__ */
|
|
7402
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
7403
|
+
label && /* @__PURE__ */ jsx57(
|
|
7265
7404
|
FormLabel2,
|
|
7266
7405
|
{
|
|
7267
7406
|
id: labelledby,
|
|
@@ -7271,11 +7410,11 @@ var RHFRadioGroup = ({
|
|
|
7271
7410
|
children: label
|
|
7272
7411
|
}
|
|
7273
7412
|
),
|
|
7274
|
-
/* @__PURE__ */
|
|
7413
|
+
/* @__PURE__ */ jsx57(RadioGroup, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx57(
|
|
7275
7414
|
FormControlLabel2,
|
|
7276
7415
|
{
|
|
7277
7416
|
value: option.value,
|
|
7278
|
-
control: /* @__PURE__ */
|
|
7417
|
+
control: /* @__PURE__ */ jsx57(
|
|
7279
7418
|
Radio,
|
|
7280
7419
|
{
|
|
7281
7420
|
...slotProps?.radio,
|
|
@@ -7287,9 +7426,9 @@ var RHFRadioGroup = ({
|
|
|
7287
7426
|
}
|
|
7288
7427
|
}
|
|
7289
7428
|
),
|
|
7290
|
-
label: /* @__PURE__ */
|
|
7291
|
-
/* @__PURE__ */
|
|
7292
|
-
option?.description && /* @__PURE__ */
|
|
7429
|
+
label: /* @__PURE__ */ jsxs33(Stack6, { children: [
|
|
7430
|
+
/* @__PURE__ */ jsx57(Typography5, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7431
|
+
option?.description && /* @__PURE__ */ jsx57(Typography5, { variant: "body2", color: "textBody", children: option?.description })
|
|
7293
7432
|
] }),
|
|
7294
7433
|
sx: {
|
|
7295
7434
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7297,7 +7436,7 @@ var RHFRadioGroup = ({
|
|
|
7297
7436
|
},
|
|
7298
7437
|
option.value
|
|
7299
7438
|
)) }),
|
|
7300
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7439
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx57(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7301
7440
|
] })
|
|
7302
7441
|
}
|
|
7303
7442
|
);
|
|
@@ -7307,7 +7446,7 @@ var RHFRadioGroup = ({
|
|
|
7307
7446
|
import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
|
|
7308
7447
|
import TextField3 from "@mui/material/TextField";
|
|
7309
7448
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
7310
|
-
import { jsx as
|
|
7449
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
7311
7450
|
var RHFAutocomplete = ({
|
|
7312
7451
|
name,
|
|
7313
7452
|
label,
|
|
@@ -7318,12 +7457,12 @@ var RHFAutocomplete = ({
|
|
|
7318
7457
|
...other
|
|
7319
7458
|
}) => {
|
|
7320
7459
|
const { control, setValue } = useFormContext6();
|
|
7321
|
-
return /* @__PURE__ */
|
|
7460
|
+
return /* @__PURE__ */ jsx58(
|
|
7322
7461
|
Controller6,
|
|
7323
7462
|
{
|
|
7324
7463
|
name,
|
|
7325
7464
|
control,
|
|
7326
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7465
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx58(
|
|
7327
7466
|
Autocomplete,
|
|
7328
7467
|
{
|
|
7329
7468
|
...field,
|
|
@@ -7332,7 +7471,7 @@ var RHFAutocomplete = ({
|
|
|
7332
7471
|
setValue(name, newValue, { shouldValidate: true });
|
|
7333
7472
|
handleChange?.(newValue);
|
|
7334
7473
|
},
|
|
7335
|
-
renderInput: (params) => /* @__PURE__ */
|
|
7474
|
+
renderInput: (params) => /* @__PURE__ */ jsx58(
|
|
7336
7475
|
TextField3,
|
|
7337
7476
|
{
|
|
7338
7477
|
label,
|
|
@@ -7352,16 +7491,16 @@ var RHFAutocomplete = ({
|
|
|
7352
7491
|
|
|
7353
7492
|
// src/components/HookForm/RHFCheckbox.tsx
|
|
7354
7493
|
import { Controller as Controller7, useFormContext as useFormContext7 } from "react-hook-form";
|
|
7355
|
-
import
|
|
7356
|
-
import
|
|
7357
|
-
import
|
|
7494
|
+
import Stack7 from "@mui/material/Stack";
|
|
7495
|
+
import Box14 from "@mui/material/Box";
|
|
7496
|
+
import Typography6 from "@mui/material/Typography";
|
|
7358
7497
|
import Checkbox from "@mui/material/Checkbox";
|
|
7359
7498
|
import FormGroup2 from "@mui/material/FormGroup";
|
|
7360
7499
|
import FormLabel3 from "@mui/material/FormLabel";
|
|
7361
7500
|
import FormControl3 from "@mui/material/FormControl";
|
|
7362
7501
|
import FormHelperText5 from "@mui/material/FormHelperText";
|
|
7363
7502
|
import FormControlLabel3 from "@mui/material/FormControlLabel";
|
|
7364
|
-
import { jsx as
|
|
7503
|
+
import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7365
7504
|
var RHFCheckbox = ({
|
|
7366
7505
|
name,
|
|
7367
7506
|
description,
|
|
@@ -7373,16 +7512,16 @@ var RHFCheckbox = ({
|
|
|
7373
7512
|
}) => {
|
|
7374
7513
|
const { control } = useFormContext7();
|
|
7375
7514
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
7376
|
-
return /* @__PURE__ */
|
|
7515
|
+
return /* @__PURE__ */ jsx59(
|
|
7377
7516
|
Controller7,
|
|
7378
7517
|
{
|
|
7379
7518
|
name,
|
|
7380
7519
|
control,
|
|
7381
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7520
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs34(Box14, { sx: slotProps?.wrap, children: [
|
|
7521
|
+
/* @__PURE__ */ jsx59(
|
|
7383
7522
|
FormControlLabel3,
|
|
7384
7523
|
{
|
|
7385
|
-
control: /* @__PURE__ */
|
|
7524
|
+
control: /* @__PURE__ */ jsx59(
|
|
7386
7525
|
Checkbox,
|
|
7387
7526
|
{
|
|
7388
7527
|
...field,
|
|
@@ -7397,9 +7536,9 @@ var RHFCheckbox = ({
|
|
|
7397
7536
|
}
|
|
7398
7537
|
}
|
|
7399
7538
|
),
|
|
7400
|
-
label: /* @__PURE__ */
|
|
7401
|
-
/* @__PURE__ */
|
|
7402
|
-
description && /* @__PURE__ */
|
|
7539
|
+
label: /* @__PURE__ */ jsxs34(Stack7, { children: [
|
|
7540
|
+
/* @__PURE__ */ jsx59(Typography6, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: label }),
|
|
7541
|
+
description && /* @__PURE__ */ jsx59(Typography6, { variant: "body2", color: "textBody", children: description })
|
|
7403
7542
|
] }),
|
|
7404
7543
|
sx: {
|
|
7405
7544
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7408,7 +7547,7 @@ var RHFCheckbox = ({
|
|
|
7408
7547
|
...other
|
|
7409
7548
|
}
|
|
7410
7549
|
),
|
|
7411
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7550
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx59(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7412
7551
|
] })
|
|
7413
7552
|
}
|
|
7414
7553
|
);
|
|
@@ -7424,13 +7563,13 @@ var RHFMultiCheckbox = ({
|
|
|
7424
7563
|
}) => {
|
|
7425
7564
|
const { control } = useFormContext7();
|
|
7426
7565
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7427
|
-
return /* @__PURE__ */
|
|
7566
|
+
return /* @__PURE__ */ jsx59(
|
|
7428
7567
|
Controller7,
|
|
7429
7568
|
{
|
|
7430
7569
|
name,
|
|
7431
7570
|
control,
|
|
7432
7571
|
defaultValue: [],
|
|
7433
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7572
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs34(
|
|
7434
7573
|
FormControl3,
|
|
7435
7574
|
{
|
|
7436
7575
|
component: "fieldset",
|
|
@@ -7438,7 +7577,7 @@ var RHFMultiCheckbox = ({
|
|
|
7438
7577
|
sx: slotProps?.formControl?.sx,
|
|
7439
7578
|
...slotProps?.formControl,
|
|
7440
7579
|
children: [
|
|
7441
|
-
label && /* @__PURE__ */
|
|
7580
|
+
label && /* @__PURE__ */ jsx59(
|
|
7442
7581
|
FormLabel3,
|
|
7443
7582
|
{
|
|
7444
7583
|
component: "legend",
|
|
@@ -7447,12 +7586,12 @@ var RHFMultiCheckbox = ({
|
|
|
7447
7586
|
children: label
|
|
7448
7587
|
}
|
|
7449
7588
|
),
|
|
7450
|
-
/* @__PURE__ */
|
|
7589
|
+
/* @__PURE__ */ jsx59(FormGroup2, { row, ...other, children: options.map((option) => {
|
|
7451
7590
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7452
|
-
return /* @__PURE__ */
|
|
7591
|
+
return /* @__PURE__ */ jsx59(
|
|
7453
7592
|
FormControlLabel3,
|
|
7454
7593
|
{
|
|
7455
|
-
control: /* @__PURE__ */
|
|
7594
|
+
control: /* @__PURE__ */ jsx59(
|
|
7456
7595
|
Checkbox,
|
|
7457
7596
|
{
|
|
7458
7597
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7470,9 +7609,9 @@ var RHFMultiCheckbox = ({
|
|
|
7470
7609
|
}
|
|
7471
7610
|
}
|
|
7472
7611
|
),
|
|
7473
|
-
label: /* @__PURE__ */
|
|
7474
|
-
/* @__PURE__ */
|
|
7475
|
-
option?.description && /* @__PURE__ */
|
|
7612
|
+
label: /* @__PURE__ */ jsxs34(Stack7, { children: [
|
|
7613
|
+
/* @__PURE__ */ jsx59(Typography6, { variant: "bodyMd", color: "textHeader", fontWeight: 500, children: option.label }),
|
|
7614
|
+
option?.description && /* @__PURE__ */ jsx59(Typography6, { variant: "body2", color: "textBody", children: option?.description })
|
|
7476
7615
|
] }),
|
|
7477
7616
|
sx: {
|
|
7478
7617
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7481,7 +7620,7 @@ var RHFMultiCheckbox = ({
|
|
|
7481
7620
|
option.value
|
|
7482
7621
|
);
|
|
7483
7622
|
}) }),
|
|
7484
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7623
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx59(
|
|
7485
7624
|
FormHelperText5,
|
|
7486
7625
|
{
|
|
7487
7626
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -7511,29 +7650,29 @@ var Field = {
|
|
|
7511
7650
|
// src/components/CopyButton/index.tsx
|
|
7512
7651
|
import Tooltip from "@mui/material/Tooltip";
|
|
7513
7652
|
import IconButton4 from "@mui/material/IconButton";
|
|
7514
|
-
import { jsx as
|
|
7653
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7515
7654
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
7516
7655
|
const { copy, isCopied } = useCopyToClipboard();
|
|
7517
|
-
return /* @__PURE__ */
|
|
7656
|
+
return /* @__PURE__ */ jsx60(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx60(
|
|
7518
7657
|
IconButton4,
|
|
7519
7658
|
{
|
|
7520
7659
|
size,
|
|
7521
7660
|
onClick: () => copy(text2),
|
|
7522
7661
|
"aria-label": "copy token",
|
|
7523
7662
|
sx: { color: "icon.black" },
|
|
7524
|
-
children: /* @__PURE__ */
|
|
7663
|
+
children: /* @__PURE__ */ jsx60(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
7525
7664
|
}
|
|
7526
7665
|
) });
|
|
7527
7666
|
};
|
|
7528
7667
|
|
|
7529
7668
|
// src/components/LoadingScreen/index.tsx
|
|
7530
7669
|
import Portal from "@mui/material/Portal";
|
|
7531
|
-
import
|
|
7670
|
+
import Box15 from "@mui/material/Box";
|
|
7532
7671
|
import LinearProgress from "@mui/material/LinearProgress";
|
|
7533
|
-
import { jsx as
|
|
7672
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7534
7673
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
7535
|
-
const content = /* @__PURE__ */
|
|
7536
|
-
|
|
7674
|
+
const content = /* @__PURE__ */ jsx61(
|
|
7675
|
+
Box15,
|
|
7537
7676
|
{
|
|
7538
7677
|
sx: {
|
|
7539
7678
|
px: 5,
|
|
@@ -7546,17 +7685,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
7546
7685
|
...sx
|
|
7547
7686
|
},
|
|
7548
7687
|
...rest,
|
|
7549
|
-
children: /* @__PURE__ */
|
|
7688
|
+
children: /* @__PURE__ */ jsx61(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
7550
7689
|
}
|
|
7551
7690
|
);
|
|
7552
7691
|
if (portal) {
|
|
7553
|
-
return /* @__PURE__ */
|
|
7692
|
+
return /* @__PURE__ */ jsx61(Portal, { children: content });
|
|
7554
7693
|
}
|
|
7555
7694
|
return content;
|
|
7556
7695
|
};
|
|
7557
7696
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
7558
|
-
const content = /* @__PURE__ */
|
|
7559
|
-
|
|
7697
|
+
const content = /* @__PURE__ */ jsx61(
|
|
7698
|
+
Box15,
|
|
7560
7699
|
{
|
|
7561
7700
|
sx: {
|
|
7562
7701
|
right: 0,
|
|
@@ -7572,11 +7711,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7572
7711
|
...sx
|
|
7573
7712
|
},
|
|
7574
7713
|
...rest,
|
|
7575
|
-
children: /* @__PURE__ */
|
|
7714
|
+
children: /* @__PURE__ */ jsx61(AnimatedLogo, {})
|
|
7576
7715
|
}
|
|
7577
7716
|
);
|
|
7578
7717
|
if (portal) {
|
|
7579
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx61(Portal, { children: content });
|
|
7580
7719
|
}
|
|
7581
7720
|
return content;
|
|
7582
7721
|
};
|
|
@@ -7590,6 +7729,7 @@ export {
|
|
|
7590
7729
|
CloudUpload,
|
|
7591
7730
|
Copy,
|
|
7592
7731
|
CopyButton,
|
|
7732
|
+
EmptyContent,
|
|
7593
7733
|
Eye,
|
|
7594
7734
|
EyeClosed,
|
|
7595
7735
|
Field,
|