@undefine-ui/design-system 2.14.2 → 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 +388 -259
- 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 +383 -256
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1411,6 +1411,12 @@ var list = {
|
|
|
1411
1411
|
|
|
1412
1412
|
// src/theme/core/components/card.ts
|
|
1413
1413
|
var MuiCard = {
|
|
1414
|
+
/** **************************************
|
|
1415
|
+
* DEFAULT PROPS
|
|
1416
|
+
*************************************** */
|
|
1417
|
+
defaultProps: {
|
|
1418
|
+
variant: "outlined"
|
|
1419
|
+
},
|
|
1414
1420
|
/** **************************************
|
|
1415
1421
|
* STYLE
|
|
1416
1422
|
*************************************** */
|
|
@@ -1418,12 +1424,12 @@ var MuiCard = {
|
|
|
1418
1424
|
root: ({ theme, ownerState }) => ({
|
|
1419
1425
|
position: "relative",
|
|
1420
1426
|
boxShadow: theme.customShadows["shadow-sm"],
|
|
1421
|
-
borderRadius:
|
|
1427
|
+
borderRadius: theme.radius["radius-md"],
|
|
1422
1428
|
zIndex: 0,
|
|
1423
1429
|
// Fix Safari overflow: hidden with border radius
|
|
1424
1430
|
...ownerState.variant === "outlined" && {
|
|
1425
1431
|
boxShadow: "none",
|
|
1426
|
-
borderColor:
|
|
1432
|
+
borderColor: theme.vars.palette.border.mute
|
|
1427
1433
|
}
|
|
1428
1434
|
})
|
|
1429
1435
|
}
|
|
@@ -3629,7 +3635,7 @@ var MuiButton = {
|
|
|
3629
3635
|
*************************************** */
|
|
3630
3636
|
defaultProps: {
|
|
3631
3637
|
color: "primary",
|
|
3632
|
-
variant: "
|
|
3638
|
+
variant: "contained",
|
|
3633
3639
|
disableElevation: true,
|
|
3634
3640
|
disableRipple: true,
|
|
3635
3641
|
loadingIndicator: /* @__PURE__ */ jsx33(Icon, { icon: "Loader" })
|
|
@@ -4713,12 +4719,11 @@ var MuiPagination = {
|
|
|
4713
4719
|
*/
|
|
4714
4720
|
outlined: ({ ownerState, theme }) => ({
|
|
4715
4721
|
[`& .${paginationItemClasses.root}`]: {
|
|
4716
|
-
borderColor:
|
|
4722
|
+
borderColor: theme.vars.palette.border.mute,
|
|
4723
|
+
borderRadius: theme.radius["radius-sm"],
|
|
4717
4724
|
[`&.${paginationItemClasses.selected}`]: {
|
|
4718
|
-
borderColor: "currentColor",
|
|
4719
|
-
fontWeight: theme.typography.fontWeightSemiBold,
|
|
4720
4725
|
...ownerState.color === "standard" && {
|
|
4721
|
-
backgroundColor:
|
|
4726
|
+
backgroundColor: theme.vars.palette.neutral[200]
|
|
4722
4727
|
}
|
|
4723
4728
|
}
|
|
4724
4729
|
}
|
|
@@ -4812,30 +4817,42 @@ var MuiDataGrid = {
|
|
|
4812
4817
|
styleOverrides: {
|
|
4813
4818
|
root: ({ theme }) => ({
|
|
4814
4819
|
"--unstable_DataGrid-radius": 0,
|
|
4815
|
-
"--DataGrid-rowBorderColor": theme.vars.palette.
|
|
4816
|
-
"--DataGrid-containerBackground": theme.vars.palette.
|
|
4820
|
+
"--DataGrid-rowBorderColor": theme.vars.palette.border.mute,
|
|
4821
|
+
"--DataGrid-containerBackground": theme.vars.palette.neutral[50],
|
|
4817
4822
|
"--unstable_DataGrid-headWeight": theme.typography.fontWeightSemiBold,
|
|
4818
4823
|
borderWidth: 0,
|
|
4819
4824
|
scrollbarWidth: "thin",
|
|
4820
4825
|
scrollbarColor: `${varAlpha(theme.vars.palette.text.disableChannel, 0.4)} ${varAlpha(theme.vars.palette.text.disableChannel, 0.08)}`,
|
|
4821
|
-
"& .MuiDataGrid-filler > div": { borderTopStyle: "
|
|
4822
|
-
"& .MuiDataGrid-topContainer::after": { height: 0 }
|
|
4826
|
+
"& .MuiDataGrid-filler > div": { borderTopStyle: "solid" },
|
|
4827
|
+
"& .MuiDataGrid-topContainer::after": { height: 0 },
|
|
4828
|
+
minHeight: 320
|
|
4823
4829
|
}),
|
|
4824
4830
|
withBorderColor: { borderColor: "var(--DataGrid-rowBorderColor)" },
|
|
4825
4831
|
/**
|
|
4826
4832
|
* Column
|
|
4827
4833
|
*/
|
|
4834
|
+
columnHeaders: ({ theme }) => ({
|
|
4835
|
+
height: theme.spacing(5)
|
|
4836
|
+
}),
|
|
4828
4837
|
columnHeader: ({ theme }) => ({
|
|
4829
|
-
|
|
4830
|
-
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),
|
|
4831
4842
|
"&--sorted": { color: theme.vars.palette.text.primary }
|
|
4832
4843
|
}),
|
|
4833
|
-
|
|
4844
|
+
columnHeaderTitle: ({ theme }) => ({
|
|
4845
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
4846
|
+
}),
|
|
4847
|
+
columnSeparator: { color: "var(--DataGrid-rowBorderColor)", visibility: "hidden" },
|
|
4834
4848
|
/**
|
|
4835
4849
|
* Row, Cell
|
|
4836
4850
|
*/
|
|
4837
4851
|
cell: ({ theme }) => ({
|
|
4838
|
-
|
|
4852
|
+
fontSize: theme.typography.pxToRem(14),
|
|
4853
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
4854
|
+
color: theme.vars.palette.text.header,
|
|
4855
|
+
borderTopStyle: "solid",
|
|
4839
4856
|
"&--editing": {
|
|
4840
4857
|
boxShadow: "none",
|
|
4841
4858
|
backgroundColor: varAlpha(theme.vars.palette.primary.mainChannel, 0.08)
|
|
@@ -4895,13 +4912,8 @@ var MuiDataGrid = {
|
|
|
4895
4912
|
/**
|
|
4896
4913
|
* Footer
|
|
4897
4914
|
*/
|
|
4898
|
-
footerContainer: { minHeight: "auto", borderTopStyle: "
|
|
4915
|
+
footerContainer: { minHeight: "auto", borderTopStyle: "solid" },
|
|
4899
4916
|
selectedRowCount: { display: "none", whiteSpace: "nowrap" },
|
|
4900
|
-
overlay: ({ theme }) => ({
|
|
4901
|
-
[`& .${circularProgressClasses.root}`]: {
|
|
4902
|
-
color: theme.vars.palette.text.primary
|
|
4903
|
-
}
|
|
4904
|
-
}),
|
|
4905
4917
|
/**
|
|
4906
4918
|
* Column panel
|
|
4907
4919
|
*/
|
|
@@ -4940,6 +4952,12 @@ var MuiDataGrid = {
|
|
|
4940
4952
|
backgroundColor: varAlpha(theme.vars.palette.grey["500Channel"], 0.16),
|
|
4941
4953
|
[`& .${svgIconClasses2.root}`]: { width: 16, height: 16 }
|
|
4942
4954
|
}
|
|
4955
|
+
}),
|
|
4956
|
+
/** Overlay */
|
|
4957
|
+
overlay: ({ theme }) => ({
|
|
4958
|
+
[`& .${circularProgressClasses.root}`]: {
|
|
4959
|
+
color: theme.vars.palette.text.primary
|
|
4960
|
+
}
|
|
4943
4961
|
})
|
|
4944
4962
|
}
|
|
4945
4963
|
};
|
|
@@ -5588,7 +5606,7 @@ var breakpoints = () => ({
|
|
|
5588
5606
|
sm: 600,
|
|
5589
5607
|
md: 900,
|
|
5590
5608
|
lg: 1200,
|
|
5591
|
-
xl:
|
|
5609
|
+
xl: 1400
|
|
5592
5610
|
}
|
|
5593
5611
|
});
|
|
5594
5612
|
|
|
@@ -5929,29 +5947,103 @@ var AnimatedLogo = () => {
|
|
|
5929
5947
|
};
|
|
5930
5948
|
|
|
5931
5949
|
// src/components/Table/Table.tsx
|
|
5932
|
-
import Box4 from "@mui/material/Box";
|
|
5933
5950
|
import { DataGrid } from "@mui/x-data-grid";
|
|
5934
5951
|
|
|
5935
5952
|
// src/components/Table/components/TableNoRows.tsx
|
|
5936
|
-
import Box3 from "@mui/material/Box";
|
|
5937
5953
|
import { styled } from "@mui/material/styles";
|
|
5938
|
-
|
|
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";
|
|
5939
6032
|
var StyledGridOverlay = styled("div")(({ theme }) => ({
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
alignItems: "center",
|
|
5943
|
-
justifyContent: "center",
|
|
5944
|
-
padding: theme.spacing(3),
|
|
6033
|
+
padding: theme.spacing(1.5, 3, 3),
|
|
6034
|
+
width: "100%",
|
|
5945
6035
|
height: "100%"
|
|
5946
6036
|
}));
|
|
5947
|
-
var TableNoRows = (
|
|
5948
|
-
return /* @__PURE__ */
|
|
6037
|
+
var TableNoRows = (props) => {
|
|
6038
|
+
return /* @__PURE__ */ jsx41(StyledGridOverlay, { children: /* @__PURE__ */ jsx41(EmptyContent, { ...props, sx: { width: "100%" } }) });
|
|
5949
6039
|
};
|
|
5950
6040
|
var TableNoRows_default = TableNoRows;
|
|
5951
6041
|
|
|
5952
6042
|
// src/components/Table/components/TablePagination.tsx
|
|
5953
|
-
import
|
|
5954
|
-
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";
|
|
5955
6047
|
import Pagination from "@mui/material/Pagination";
|
|
5956
6048
|
import PaginationItem from "@mui/material/PaginationItem";
|
|
5957
6049
|
import {
|
|
@@ -5959,20 +6051,17 @@ import {
|
|
|
5959
6051
|
gridPageSelector,
|
|
5960
6052
|
useGridApiContext,
|
|
5961
6053
|
gridPageSizeSelector,
|
|
5962
|
-
gridRowCountSelector,
|
|
5963
6054
|
gridPageCountSelector
|
|
5964
6055
|
} from "@mui/x-data-grid";
|
|
5965
|
-
import { jsx as
|
|
6056
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5966
6057
|
var TablePagination = () => {
|
|
6058
|
+
const theme = useTheme2();
|
|
5967
6059
|
const apiRef = useGridApiContext();
|
|
5968
6060
|
const page = useGridSelector(apiRef, gridPageSelector);
|
|
5969
6061
|
const pageCount = useGridSelector(apiRef, gridPageCountSelector);
|
|
5970
6062
|
const pageSize = useGridSelector(apiRef, gridPageSizeSelector);
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
const to = Math.min((page + 1) * pageSize, rowCount);
|
|
5974
|
-
return /* @__PURE__ */ jsxs23(
|
|
5975
|
-
Stack,
|
|
6063
|
+
return /* @__PURE__ */ jsxs24(
|
|
6064
|
+
Stack2,
|
|
5976
6065
|
{
|
|
5977
6066
|
direction: "row",
|
|
5978
6067
|
alignItems: { xs: "flex-end", md: "center" },
|
|
@@ -5980,38 +6069,62 @@ var TablePagination = () => {
|
|
|
5980
6069
|
width: 1,
|
|
5981
6070
|
p: 1.5,
|
|
5982
6071
|
children: [
|
|
5983
|
-
/* @__PURE__ */
|
|
5984
|
-
|
|
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,
|
|
5985
6086
|
{
|
|
5986
6087
|
direction: { xs: "column", md: "row" },
|
|
5987
6088
|
alignItems: { xs: "flex-start", md: "center" },
|
|
5988
6089
|
spacing: 2,
|
|
5989
|
-
children:
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
),
|
|
6005
|
-
/* @__PURE__ */ jsx41(Stack, { direction: "row", alignItems: "center", spacing: 1, children: /* @__PURE__ */ jsxs23(Typography, { variant: "body2", color: "text.secondary", children: [
|
|
6006
|
-
pageSize,
|
|
6007
|
-
" Items per page"
|
|
6008
|
-
] }) })
|
|
6009
|
-
]
|
|
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
|
+
)
|
|
6010
6105
|
}
|
|
6011
6106
|
),
|
|
6012
|
-
/* @__PURE__ */
|
|
6013
|
-
|
|
6014
|
-
|
|
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
|
+
)
|
|
6015
6128
|
] })
|
|
6016
6129
|
]
|
|
6017
6130
|
}
|
|
@@ -6019,29 +6132,35 @@ var TablePagination = () => {
|
|
|
6019
6132
|
};
|
|
6020
6133
|
|
|
6021
6134
|
// src/components/Table/Table.tsx
|
|
6022
|
-
import { jsx as
|
|
6135
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6023
6136
|
var Table = (props) => {
|
|
6024
|
-
const { data,
|
|
6025
|
-
|
|
6137
|
+
const { data, showFooter = true, sx, ...rest } = props;
|
|
6138
|
+
const isEmpty = data.length === 0;
|
|
6139
|
+
return /* @__PURE__ */ jsx43(
|
|
6026
6140
|
DataGrid,
|
|
6027
6141
|
{
|
|
6028
|
-
rowHeight:
|
|
6142
|
+
rowHeight: 56,
|
|
6029
6143
|
rows: data,
|
|
6030
6144
|
pagination: true,
|
|
6031
|
-
showToolbar,
|
|
6032
6145
|
disableColumnFilter: true,
|
|
6146
|
+
disableColumnSelector: true,
|
|
6147
|
+
disableColumnSorting: true,
|
|
6148
|
+
disableColumnMenu: true,
|
|
6033
6149
|
slots: {
|
|
6034
6150
|
pagination: TablePagination,
|
|
6151
|
+
noRowsOverlay: TableNoRows_default,
|
|
6035
6152
|
noResultsOverlay: TableNoRows_default,
|
|
6036
|
-
// noRowsOverlay: TableNoRows,
|
|
6037
6153
|
...rest.slots
|
|
6038
6154
|
},
|
|
6039
6155
|
slotProps: {
|
|
6040
|
-
noResultsOverlay: {
|
|
6041
|
-
title: "No Results"
|
|
6042
|
-
},
|
|
6043
6156
|
noRowsOverlay: {
|
|
6044
|
-
|
|
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."
|
|
6045
6164
|
},
|
|
6046
6165
|
loadingOverlay: {
|
|
6047
6166
|
variant: "skeleton"
|
|
@@ -6056,14 +6175,21 @@ var Table = (props) => {
|
|
|
6056
6175
|
}
|
|
6057
6176
|
},
|
|
6058
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
|
+
},
|
|
6059
6185
|
...rest
|
|
6060
6186
|
}
|
|
6061
|
-
)
|
|
6187
|
+
);
|
|
6062
6188
|
};
|
|
6063
6189
|
|
|
6064
6190
|
// src/components/Image/index.tsx
|
|
6065
6191
|
import { useRef as useRef4, useState as useState9, useEffect as useEffect5, forwardRef } from "react";
|
|
6066
|
-
import
|
|
6192
|
+
import Box4 from "@mui/material/Box";
|
|
6067
6193
|
import Skeleton from "@mui/material/Skeleton";
|
|
6068
6194
|
|
|
6069
6195
|
// src/components/Image/classes.ts
|
|
@@ -6074,7 +6200,7 @@ var imageClasses = {
|
|
|
6074
6200
|
};
|
|
6075
6201
|
|
|
6076
6202
|
// src/components/Image/index.tsx
|
|
6077
|
-
import { jsx as
|
|
6203
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6078
6204
|
var Image = forwardRef(function Image2(props, ref) {
|
|
6079
6205
|
const {
|
|
6080
6206
|
src,
|
|
@@ -6173,8 +6299,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6173
6299
|
const showLoader = status === "idle" || status === "loading";
|
|
6174
6300
|
const showError = status === "error";
|
|
6175
6301
|
const loadingAttr = lazy ? "lazy" : imgLoading ?? "eager";
|
|
6176
|
-
return /* @__PURE__ */
|
|
6177
|
-
|
|
6302
|
+
return /* @__PURE__ */ jsxs25(
|
|
6303
|
+
Box4,
|
|
6178
6304
|
{
|
|
6179
6305
|
className: imageClasses.root.concat(className ? ` ${className}` : ""),
|
|
6180
6306
|
sx: {
|
|
@@ -6188,7 +6314,7 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6188
6314
|
},
|
|
6189
6315
|
...rest,
|
|
6190
6316
|
children: [
|
|
6191
|
-
showLoader && (loadingIndicator ?? /* @__PURE__ */
|
|
6317
|
+
showLoader && (loadingIndicator ?? /* @__PURE__ */ jsx44(
|
|
6192
6318
|
Skeleton,
|
|
6193
6319
|
{
|
|
6194
6320
|
animation: "wave",
|
|
@@ -6203,8 +6329,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6203
6329
|
}
|
|
6204
6330
|
}
|
|
6205
6331
|
)),
|
|
6206
|
-
/* @__PURE__ */
|
|
6207
|
-
|
|
6332
|
+
/* @__PURE__ */ jsx44(
|
|
6333
|
+
Box4,
|
|
6208
6334
|
{
|
|
6209
6335
|
ref: setRefs,
|
|
6210
6336
|
component: "img",
|
|
@@ -6232,8 +6358,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6232
6358
|
}
|
|
6233
6359
|
}
|
|
6234
6360
|
),
|
|
6235
|
-
withOverlay && !showError && /* @__PURE__ */
|
|
6236
|
-
|
|
6361
|
+
withOverlay && !showError && /* @__PURE__ */ jsx44(
|
|
6362
|
+
Box4,
|
|
6237
6363
|
{
|
|
6238
6364
|
className: imageClasses.overlay,
|
|
6239
6365
|
sx: {
|
|
@@ -6244,8 +6370,8 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6244
6370
|
children: overlay
|
|
6245
6371
|
}
|
|
6246
6372
|
),
|
|
6247
|
-
showError && (renderError ?? /* @__PURE__ */
|
|
6248
|
-
|
|
6373
|
+
showError && (renderError ?? /* @__PURE__ */ jsx44(
|
|
6374
|
+
Box4,
|
|
6249
6375
|
{
|
|
6250
6376
|
className: imageClasses.overlay,
|
|
6251
6377
|
sx: {
|
|
@@ -6269,18 +6395,18 @@ var Image = forwardRef(function Image2(props, ref) {
|
|
|
6269
6395
|
|
|
6270
6396
|
// src/components/Upload/Upload.tsx
|
|
6271
6397
|
import { useDropzone } from "react-dropzone";
|
|
6272
|
-
import
|
|
6273
|
-
import
|
|
6274
|
-
import
|
|
6398
|
+
import Box10 from "@mui/material/Box";
|
|
6399
|
+
import Stack4 from "@mui/material/Stack";
|
|
6400
|
+
import Button2 from "@mui/material/Button";
|
|
6275
6401
|
import FormHelperText from "@mui/material/FormHelperText";
|
|
6276
6402
|
|
|
6277
6403
|
// src/components/Upload/components/Placeholder.tsx
|
|
6278
|
-
import
|
|
6279
|
-
import
|
|
6280
|
-
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";
|
|
6281
6407
|
var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
6282
|
-
return /* @__PURE__ */
|
|
6283
|
-
|
|
6408
|
+
return /* @__PURE__ */ jsxs26(
|
|
6409
|
+
Box5,
|
|
6284
6410
|
{
|
|
6285
6411
|
sx: {
|
|
6286
6412
|
display: "flex",
|
|
@@ -6290,7 +6416,7 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6290
6416
|
},
|
|
6291
6417
|
...rest,
|
|
6292
6418
|
children: [
|
|
6293
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ jsx45(
|
|
6294
6420
|
Icon,
|
|
6295
6421
|
{
|
|
6296
6422
|
icon: "CloudUpload",
|
|
@@ -6301,11 +6427,11 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6301
6427
|
}
|
|
6302
6428
|
}
|
|
6303
6429
|
),
|
|
6304
|
-
/* @__PURE__ */
|
|
6305
|
-
/* @__PURE__ */
|
|
6430
|
+
/* @__PURE__ */ jsxs26(Stack3, { spacing: 1, sx: { textAlign: "center", mt: 2 }, children: [
|
|
6431
|
+
/* @__PURE__ */ jsxs26(Box5, { sx: { typography: "h8" }, children: [
|
|
6306
6432
|
"Drag files here or",
|
|
6307
|
-
/* @__PURE__ */
|
|
6308
|
-
|
|
6433
|
+
/* @__PURE__ */ jsx45(
|
|
6434
|
+
Box5,
|
|
6309
6435
|
{
|
|
6310
6436
|
component: "span",
|
|
6311
6437
|
sx: {
|
|
@@ -6317,8 +6443,8 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6317
6443
|
}
|
|
6318
6444
|
)
|
|
6319
6445
|
] }),
|
|
6320
|
-
/* @__PURE__ */
|
|
6321
|
-
|
|
6446
|
+
/* @__PURE__ */ jsxs26(
|
|
6447
|
+
Box5,
|
|
6322
6448
|
{
|
|
6323
6449
|
sx: {
|
|
6324
6450
|
typography: "bodyMd",
|
|
@@ -6339,9 +6465,9 @@ var UploadPlaceholder = ({ hasError, ...rest }) => {
|
|
|
6339
6465
|
};
|
|
6340
6466
|
|
|
6341
6467
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6342
|
-
import
|
|
6468
|
+
import Box6 from "@mui/material/Box";
|
|
6343
6469
|
import Paper from "@mui/material/Paper";
|
|
6344
|
-
import
|
|
6470
|
+
import Typography3 from "@mui/material/Typography";
|
|
6345
6471
|
|
|
6346
6472
|
// src/components/Upload/utils.tsx
|
|
6347
6473
|
var fileTypeByUrl = (fileUrl = "") => {
|
|
@@ -6372,12 +6498,12 @@ var fileData = (file) => {
|
|
|
6372
6498
|
};
|
|
6373
6499
|
|
|
6374
6500
|
// src/components/Upload/components/RejectionFiles.tsx
|
|
6375
|
-
import { jsx as
|
|
6501
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6376
6502
|
var RejectionFiles = ({ files }) => {
|
|
6377
6503
|
if (!files.length) {
|
|
6378
6504
|
return null;
|
|
6379
6505
|
}
|
|
6380
|
-
return /* @__PURE__ */
|
|
6506
|
+
return /* @__PURE__ */ jsx46(
|
|
6381
6507
|
Paper,
|
|
6382
6508
|
{
|
|
6383
6509
|
variant: "outlined",
|
|
@@ -6392,13 +6518,13 @@ var RejectionFiles = ({ files }) => {
|
|
|
6392
6518
|
},
|
|
6393
6519
|
children: files.map(({ file, errors }) => {
|
|
6394
6520
|
const { path, size } = fileData(file);
|
|
6395
|
-
return /* @__PURE__ */
|
|
6396
|
-
/* @__PURE__ */
|
|
6521
|
+
return /* @__PURE__ */ jsxs27(Box6, { sx: { my: 1 }, children: [
|
|
6522
|
+
/* @__PURE__ */ jsxs27(Typography3, { variant: "subtitle2", noWrap: true, children: [
|
|
6397
6523
|
path,
|
|
6398
6524
|
" - ",
|
|
6399
6525
|
size ? fData(size) : ""
|
|
6400
6526
|
] }),
|
|
6401
|
-
errors.map((error2) => /* @__PURE__ */
|
|
6527
|
+
errors.map((error2) => /* @__PURE__ */ jsxs27(Box6, { component: "span", sx: { typography: "caption" }, children: [
|
|
6402
6528
|
"- ",
|
|
6403
6529
|
error2.message
|
|
6404
6530
|
] }, error2.code))
|
|
@@ -6409,12 +6535,12 @@ var RejectionFiles = ({ files }) => {
|
|
|
6409
6535
|
};
|
|
6410
6536
|
|
|
6411
6537
|
// src/components/Upload/components/UploadProgress.tsx
|
|
6412
|
-
import
|
|
6538
|
+
import Box7 from "@mui/material/Box";
|
|
6413
6539
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
6414
|
-
import { jsx as
|
|
6540
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6415
6541
|
var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
6416
|
-
return /* @__PURE__ */
|
|
6417
|
-
|
|
6542
|
+
return /* @__PURE__ */ jsxs28(
|
|
6543
|
+
Box7,
|
|
6418
6544
|
{
|
|
6419
6545
|
sx: {
|
|
6420
6546
|
display: "flex",
|
|
@@ -6424,8 +6550,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6424
6550
|
height: "100%"
|
|
6425
6551
|
},
|
|
6426
6552
|
children: [
|
|
6427
|
-
/* @__PURE__ */
|
|
6428
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsxs28(Box7, { sx: { position: "relative", display: "inline-flex" }, children: [
|
|
6554
|
+
/* @__PURE__ */ jsx47(
|
|
6429
6555
|
CircularProgress,
|
|
6430
6556
|
{
|
|
6431
6557
|
variant: "determinate",
|
|
@@ -6438,7 +6564,7 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6438
6564
|
}
|
|
6439
6565
|
}
|
|
6440
6566
|
),
|
|
6441
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ jsx47(
|
|
6442
6568
|
CircularProgress,
|
|
6443
6569
|
{
|
|
6444
6570
|
variant: "determinate",
|
|
@@ -6450,8 +6576,8 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6450
6576
|
}
|
|
6451
6577
|
}
|
|
6452
6578
|
),
|
|
6453
|
-
/* @__PURE__ */
|
|
6454
|
-
|
|
6579
|
+
/* @__PURE__ */ jsx47(
|
|
6580
|
+
Box7,
|
|
6455
6581
|
{
|
|
6456
6582
|
sx: {
|
|
6457
6583
|
top: 0,
|
|
@@ -6463,11 +6589,11 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6463
6589
|
alignItems: "center",
|
|
6464
6590
|
justifyContent: "center"
|
|
6465
6591
|
},
|
|
6466
|
-
children: /* @__PURE__ */
|
|
6592
|
+
children: /* @__PURE__ */ jsx47(Box7, { sx: { typography: "h6", color: "common.black" }, children: `${Math.round(progress2)}` })
|
|
6467
6593
|
}
|
|
6468
6594
|
)
|
|
6469
6595
|
] }),
|
|
6470
|
-
/* @__PURE__ */
|
|
6596
|
+
/* @__PURE__ */ jsx47(Box7, { sx: { mt: 2, typography: "h6" }, children: "Uploading" })
|
|
6471
6597
|
]
|
|
6472
6598
|
}
|
|
6473
6599
|
);
|
|
@@ -6475,18 +6601,18 @@ var UploadProgress = ({ progress: progress2 = 20 }) => {
|
|
|
6475
6601
|
|
|
6476
6602
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6477
6603
|
import { useRef as useRef5 } from "react";
|
|
6478
|
-
import
|
|
6604
|
+
import Box9 from "@mui/material/Box";
|
|
6479
6605
|
import IconButton2 from "@mui/material/IconButton";
|
|
6480
6606
|
|
|
6481
6607
|
// src/components/Upload/components/SingleFilePreview.tsx
|
|
6482
|
-
import
|
|
6608
|
+
import Box8 from "@mui/material/Box";
|
|
6483
6609
|
import IconButton from "@mui/material/IconButton";
|
|
6484
|
-
import { jsx as
|
|
6610
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
6485
6611
|
var SingleFilePreview = ({ file }) => {
|
|
6486
6612
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6487
6613
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6488
|
-
const renderImg = /* @__PURE__ */
|
|
6489
|
-
|
|
6614
|
+
const renderImg = /* @__PURE__ */ jsx48(
|
|
6615
|
+
Box8,
|
|
6490
6616
|
{
|
|
6491
6617
|
component: "img",
|
|
6492
6618
|
alt: fileName,
|
|
@@ -6499,8 +6625,8 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6499
6625
|
}
|
|
6500
6626
|
}
|
|
6501
6627
|
);
|
|
6502
|
-
return /* @__PURE__ */
|
|
6503
|
-
|
|
6628
|
+
return /* @__PURE__ */ jsx48(
|
|
6629
|
+
Box8,
|
|
6504
6630
|
{
|
|
6505
6631
|
sx: {
|
|
6506
6632
|
p: 1,
|
|
@@ -6515,7 +6641,7 @@ var SingleFilePreview = ({ file }) => {
|
|
|
6515
6641
|
);
|
|
6516
6642
|
};
|
|
6517
6643
|
var DeleteButton = ({ sx, ...rest }) => {
|
|
6518
|
-
return /* @__PURE__ */
|
|
6644
|
+
return /* @__PURE__ */ jsx48(
|
|
6519
6645
|
IconButton,
|
|
6520
6646
|
{
|
|
6521
6647
|
size: "small",
|
|
@@ -6534,13 +6660,13 @@ var DeleteButton = ({ sx, ...rest }) => {
|
|
|
6534
6660
|
...sx
|
|
6535
6661
|
},
|
|
6536
6662
|
...rest,
|
|
6537
|
-
children: /* @__PURE__ */
|
|
6663
|
+
children: /* @__PURE__ */ jsx48(Icon, { icon: "XMark", sx: { width: 18, height: 18 } })
|
|
6538
6664
|
}
|
|
6539
6665
|
);
|
|
6540
6666
|
};
|
|
6541
6667
|
|
|
6542
6668
|
// src/components/Upload/components/MultiFilePreview.tsx
|
|
6543
|
-
import { jsx as
|
|
6669
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6544
6670
|
var MultiFilePreview = ({ files, onRemove }) => {
|
|
6545
6671
|
const scrollRef = useRef5(null);
|
|
6546
6672
|
const handleScroll = (direction) => {
|
|
@@ -6554,8 +6680,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6554
6680
|
}
|
|
6555
6681
|
};
|
|
6556
6682
|
const showNavigation = files.length > 2;
|
|
6557
|
-
return /* @__PURE__ */
|
|
6558
|
-
showNavigation && /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ jsxs29(Box9, { sx: { position: "relative", width: 1 }, children: [
|
|
6684
|
+
showNavigation && /* @__PURE__ */ jsx49(
|
|
6559
6685
|
IconButton2,
|
|
6560
6686
|
{
|
|
6561
6687
|
size: "small",
|
|
@@ -6572,11 +6698,11 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6572
6698
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6573
6699
|
}
|
|
6574
6700
|
},
|
|
6575
|
-
children: /* @__PURE__ */
|
|
6701
|
+
children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowLeft", width: 20 })
|
|
6576
6702
|
}
|
|
6577
6703
|
),
|
|
6578
|
-
/* @__PURE__ */
|
|
6579
|
-
|
|
6704
|
+
/* @__PURE__ */ jsx49(
|
|
6705
|
+
Box9,
|
|
6580
6706
|
{
|
|
6581
6707
|
ref: scrollRef,
|
|
6582
6708
|
sx: {
|
|
@@ -6594,8 +6720,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6594
6720
|
children: files.map((file, index) => {
|
|
6595
6721
|
const fileName = typeof file === "string" ? file : file.name;
|
|
6596
6722
|
const previewUrl = typeof file === "string" ? file : URL.createObjectURL(file);
|
|
6597
|
-
return /* @__PURE__ */
|
|
6598
|
-
|
|
6723
|
+
return /* @__PURE__ */ jsxs29(
|
|
6724
|
+
Box9,
|
|
6599
6725
|
{
|
|
6600
6726
|
sx: {
|
|
6601
6727
|
position: "relative",
|
|
@@ -6606,8 +6732,8 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6606
6732
|
flexShrink: 0
|
|
6607
6733
|
},
|
|
6608
6734
|
children: [
|
|
6609
|
-
/* @__PURE__ */
|
|
6610
|
-
|
|
6735
|
+
/* @__PURE__ */ jsx49(
|
|
6736
|
+
Box9,
|
|
6611
6737
|
{
|
|
6612
6738
|
component: "img",
|
|
6613
6739
|
alt: fileName,
|
|
@@ -6620,7 +6746,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6620
6746
|
}
|
|
6621
6747
|
}
|
|
6622
6748
|
),
|
|
6623
|
-
onRemove && /* @__PURE__ */
|
|
6749
|
+
onRemove && /* @__PURE__ */ jsx49(
|
|
6624
6750
|
DeleteButton,
|
|
6625
6751
|
{
|
|
6626
6752
|
onClick: (e) => {
|
|
@@ -6636,7 +6762,7 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6636
6762
|
})
|
|
6637
6763
|
}
|
|
6638
6764
|
),
|
|
6639
|
-
showNavigation && /* @__PURE__ */
|
|
6765
|
+
showNavigation && /* @__PURE__ */ jsx49(
|
|
6640
6766
|
IconButton2,
|
|
6641
6767
|
{
|
|
6642
6768
|
size: "small",
|
|
@@ -6653,14 +6779,14 @@ var MultiFilePreview = ({ files, onRemove }) => {
|
|
|
6653
6779
|
bgcolor: (theme) => varAlpha(theme.vars.palette.common.whiteChannel, 1)
|
|
6654
6780
|
}
|
|
6655
6781
|
},
|
|
6656
|
-
children: /* @__PURE__ */
|
|
6782
|
+
children: /* @__PURE__ */ jsx49(Icon, { icon: "NavArrowRight", width: 20 })
|
|
6657
6783
|
}
|
|
6658
6784
|
)
|
|
6659
6785
|
] });
|
|
6660
6786
|
};
|
|
6661
6787
|
|
|
6662
6788
|
// src/components/Upload/Upload.tsx
|
|
6663
|
-
import { jsx as
|
|
6789
|
+
import { jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6664
6790
|
var Upload = ({
|
|
6665
6791
|
sx,
|
|
6666
6792
|
value,
|
|
@@ -6687,20 +6813,20 @@ var Upload = ({
|
|
|
6687
6813
|
const hasError = isDragReject || !!error2;
|
|
6688
6814
|
const renderContent = () => {
|
|
6689
6815
|
if (isUploading) {
|
|
6690
|
-
return /* @__PURE__ */
|
|
6816
|
+
return /* @__PURE__ */ jsx50(UploadProgress, { progress: uploadProgress });
|
|
6691
6817
|
}
|
|
6692
6818
|
if (hasFile) {
|
|
6693
|
-
return /* @__PURE__ */
|
|
6819
|
+
return /* @__PURE__ */ jsx50(SingleFilePreview, { file: value });
|
|
6694
6820
|
}
|
|
6695
6821
|
if (hasFiles) {
|
|
6696
|
-
return /* @__PURE__ */
|
|
6822
|
+
return /* @__PURE__ */ jsx50(MultiFilePreview, { files: value, onRemove });
|
|
6697
6823
|
}
|
|
6698
|
-
return /* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ jsx50(UploadPlaceholder, { hasError });
|
|
6699
6825
|
};
|
|
6700
6826
|
const shouldShowDropzone = !hasFile && !hasFiles && !isUploading;
|
|
6701
|
-
return /* @__PURE__ */
|
|
6702
|
-
/* @__PURE__ */
|
|
6703
|
-
|
|
6827
|
+
return /* @__PURE__ */ jsxs30(Box10, { sx: { width: 1, position: "relative", ...sx }, children: [
|
|
6828
|
+
/* @__PURE__ */ jsxs30(
|
|
6829
|
+
Box10,
|
|
6704
6830
|
{
|
|
6705
6831
|
...shouldShowDropzone ? getRootProps() : {},
|
|
6706
6832
|
sx: {
|
|
@@ -6738,37 +6864,37 @@ var Upload = ({
|
|
|
6738
6864
|
}
|
|
6739
6865
|
},
|
|
6740
6866
|
children: [
|
|
6741
|
-
shouldShowDropzone && /* @__PURE__ */
|
|
6867
|
+
shouldShowDropzone && /* @__PURE__ */ jsx50("input", { ...getInputProps() }),
|
|
6742
6868
|
renderContent()
|
|
6743
6869
|
]
|
|
6744
6870
|
}
|
|
6745
6871
|
),
|
|
6746
|
-
hasFile && !isUploading && /* @__PURE__ */
|
|
6747
|
-
hasFiles && /* @__PURE__ */
|
|
6748
|
-
onRemoveAll && /* @__PURE__ */
|
|
6749
|
-
|
|
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,
|
|
6750
6876
|
{
|
|
6751
6877
|
variant: "outlined",
|
|
6752
6878
|
color: "inherit",
|
|
6753
6879
|
size: "small",
|
|
6754
6880
|
onClick: onRemoveAll,
|
|
6755
|
-
startIcon: /* @__PURE__ */
|
|
6881
|
+
startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "Trash", sx: { width: 14, height: 14 } }),
|
|
6756
6882
|
children: "Remove all"
|
|
6757
6883
|
}
|
|
6758
6884
|
),
|
|
6759
|
-
onUpload && /* @__PURE__ */
|
|
6760
|
-
|
|
6885
|
+
onUpload && /* @__PURE__ */ jsx50(
|
|
6886
|
+
Button2,
|
|
6761
6887
|
{
|
|
6762
6888
|
variant: "contained",
|
|
6763
6889
|
size: "small",
|
|
6764
6890
|
onClick: onUpload,
|
|
6765
|
-
startIcon: /* @__PURE__ */
|
|
6891
|
+
startIcon: /* @__PURE__ */ jsx50(Icon, { icon: "CloudUpload", sx: { width: 14, height: 14 } }),
|
|
6766
6892
|
children: "Upload files"
|
|
6767
6893
|
}
|
|
6768
6894
|
)
|
|
6769
6895
|
] }),
|
|
6770
|
-
helperText && /* @__PURE__ */
|
|
6771
|
-
/* @__PURE__ */
|
|
6896
|
+
helperText && /* @__PURE__ */ jsx50(FormHelperText, { error: !!error2, sx: { color: "text.body", fontWeight: 500, mt: 1 }, children: helperText }),
|
|
6897
|
+
/* @__PURE__ */ jsx50(RejectionFiles, { files: [...fileRejections] })
|
|
6772
6898
|
] });
|
|
6773
6899
|
};
|
|
6774
6900
|
|
|
@@ -6776,16 +6902,16 @@ var Upload = ({
|
|
|
6776
6902
|
import {
|
|
6777
6903
|
FormProvider as RHFForm
|
|
6778
6904
|
} from "react-hook-form";
|
|
6779
|
-
import
|
|
6780
|
-
import { jsx as
|
|
6905
|
+
import Box11 from "@mui/material/Box";
|
|
6906
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
6781
6907
|
var Form = ({
|
|
6782
6908
|
children,
|
|
6783
6909
|
onSubmit,
|
|
6784
6910
|
methods,
|
|
6785
6911
|
...rest
|
|
6786
6912
|
}) => {
|
|
6787
|
-
return /* @__PURE__ */
|
|
6788
|
-
|
|
6913
|
+
return /* @__PURE__ */ jsx51(RHFForm, { ...methods, children: /* @__PURE__ */ jsx51(
|
|
6914
|
+
Box11,
|
|
6789
6915
|
{
|
|
6790
6916
|
component: "form",
|
|
6791
6917
|
onSubmit: (e) => {
|
|
@@ -6804,16 +6930,16 @@ var Form = ({
|
|
|
6804
6930
|
|
|
6805
6931
|
// src/components/HookForm/RHFSwitch.tsx
|
|
6806
6932
|
import { Controller, useFormContext } from "react-hook-form";
|
|
6807
|
-
import
|
|
6808
|
-
import
|
|
6809
|
-
import
|
|
6933
|
+
import Stack5 from "@mui/material/Stack";
|
|
6934
|
+
import Box12 from "@mui/material/Box";
|
|
6935
|
+
import Typography4 from "@mui/material/Typography";
|
|
6810
6936
|
import Switch from "@mui/material/Switch";
|
|
6811
6937
|
import FormGroup from "@mui/material/FormGroup";
|
|
6812
6938
|
import FormLabel from "@mui/material/FormLabel";
|
|
6813
6939
|
import FormControl from "@mui/material/FormControl";
|
|
6814
6940
|
import FormHelperText2 from "@mui/material/FormHelperText";
|
|
6815
6941
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
6816
|
-
import { jsx as
|
|
6942
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6817
6943
|
var RHFSwitch = ({
|
|
6818
6944
|
name,
|
|
6819
6945
|
description,
|
|
@@ -6825,16 +6951,16 @@ var RHFSwitch = ({
|
|
|
6825
6951
|
}) => {
|
|
6826
6952
|
const { control } = useFormContext();
|
|
6827
6953
|
const baseAriaLabel = `Switch ${name}`;
|
|
6828
|
-
return /* @__PURE__ */
|
|
6954
|
+
return /* @__PURE__ */ jsx52(
|
|
6829
6955
|
Controller,
|
|
6830
6956
|
{
|
|
6831
6957
|
name,
|
|
6832
6958
|
control,
|
|
6833
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
6834
|
-
/* @__PURE__ */
|
|
6959
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(Box12, { sx: slotProps?.wrap, children: [
|
|
6960
|
+
/* @__PURE__ */ jsx52(
|
|
6835
6961
|
FormControlLabel,
|
|
6836
6962
|
{
|
|
6837
|
-
control: /* @__PURE__ */
|
|
6963
|
+
control: /* @__PURE__ */ jsx52(
|
|
6838
6964
|
Switch,
|
|
6839
6965
|
{
|
|
6840
6966
|
...field,
|
|
@@ -6849,9 +6975,9 @@ var RHFSwitch = ({
|
|
|
6849
6975
|
}
|
|
6850
6976
|
}
|
|
6851
6977
|
),
|
|
6852
|
-
label: /* @__PURE__ */
|
|
6853
|
-
/* @__PURE__ */
|
|
6854
|
-
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 })
|
|
6855
6981
|
] }),
|
|
6856
6982
|
sx: {
|
|
6857
6983
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -6860,7 +6986,7 @@ var RHFSwitch = ({
|
|
|
6860
6986
|
...other
|
|
6861
6987
|
}
|
|
6862
6988
|
),
|
|
6863
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
6989
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx52(
|
|
6864
6990
|
FormHelperText2,
|
|
6865
6991
|
{
|
|
6866
6992
|
error: !!error2,
|
|
@@ -6883,19 +7009,19 @@ var RHFMultiSwitch = ({
|
|
|
6883
7009
|
}) => {
|
|
6884
7010
|
const { control } = useFormContext();
|
|
6885
7011
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
6886
|
-
return /* @__PURE__ */
|
|
7012
|
+
return /* @__PURE__ */ jsx52(
|
|
6887
7013
|
Controller,
|
|
6888
7014
|
{
|
|
6889
7015
|
name,
|
|
6890
7016
|
control,
|
|
6891
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7017
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs31(
|
|
6892
7018
|
FormControl,
|
|
6893
7019
|
{
|
|
6894
7020
|
component: "fieldset",
|
|
6895
7021
|
sx: slotProps?.formControl?.sx,
|
|
6896
7022
|
...slotProps?.formControl,
|
|
6897
7023
|
children: [
|
|
6898
|
-
label && /* @__PURE__ */
|
|
7024
|
+
label && /* @__PURE__ */ jsx52(
|
|
6899
7025
|
FormLabel,
|
|
6900
7026
|
{
|
|
6901
7027
|
component: "legend",
|
|
@@ -6904,12 +7030,12 @@ var RHFMultiSwitch = ({
|
|
|
6904
7030
|
children: label
|
|
6905
7031
|
}
|
|
6906
7032
|
),
|
|
6907
|
-
/* @__PURE__ */
|
|
7033
|
+
/* @__PURE__ */ jsx52(FormGroup, { ...other, children: options.map((option) => {
|
|
6908
7034
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
6909
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx52(
|
|
6910
7036
|
FormControlLabel,
|
|
6911
7037
|
{
|
|
6912
|
-
control: /* @__PURE__ */
|
|
7038
|
+
control: /* @__PURE__ */ jsx52(
|
|
6913
7039
|
Switch,
|
|
6914
7040
|
{
|
|
6915
7041
|
checked: (field.value || []).includes(option.value),
|
|
@@ -6932,7 +7058,7 @@ var RHFMultiSwitch = ({
|
|
|
6932
7058
|
option.value
|
|
6933
7059
|
);
|
|
6934
7060
|
}) }),
|
|
6935
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7061
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx52(FormHelperText2, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
6936
7062
|
]
|
|
6937
7063
|
}
|
|
6938
7064
|
)
|
|
@@ -6942,10 +7068,10 @@ var RHFMultiSwitch = ({
|
|
|
6942
7068
|
|
|
6943
7069
|
// src/components/HookForm/RHFUpload.tsx
|
|
6944
7070
|
import { Controller as Controller2, useFormContext as useFormContext2 } from "react-hook-form";
|
|
6945
|
-
import { jsx as
|
|
7071
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6946
7072
|
var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
6947
7073
|
const { control, setValue } = useFormContext2();
|
|
6948
|
-
return /* @__PURE__ */
|
|
7074
|
+
return /* @__PURE__ */ jsx53(
|
|
6949
7075
|
Controller2,
|
|
6950
7076
|
{
|
|
6951
7077
|
name,
|
|
@@ -6973,7 +7099,7 @@ var RHFUpload = ({ name, multiple, helperText, ...rest }) => {
|
|
|
6973
7099
|
const onRemoveAll = () => {
|
|
6974
7100
|
setValue(name, [], { shouldValidate: true });
|
|
6975
7101
|
};
|
|
6976
|
-
return /* @__PURE__ */
|
|
7102
|
+
return /* @__PURE__ */ jsx53(
|
|
6977
7103
|
Upload,
|
|
6978
7104
|
{
|
|
6979
7105
|
multiple,
|
|
@@ -6998,15 +7124,15 @@ import { Controller as Controller3, useFormContext as useFormContext3 } from "re
|
|
|
6998
7124
|
|
|
6999
7125
|
// src/components/OTPInput/index.tsx
|
|
7000
7126
|
import { useRef as useRef6, useState as useState10 } from "react";
|
|
7001
|
-
import { useTheme as
|
|
7002
|
-
import
|
|
7127
|
+
import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
7128
|
+
import Box13 from "@mui/material/Box";
|
|
7003
7129
|
import FormHelperText3 from "@mui/material/FormHelperText";
|
|
7004
7130
|
import { inputBaseClasses as inputBaseClasses3 } from "@mui/material/InputBase";
|
|
7005
7131
|
import TextField from "@mui/material/TextField";
|
|
7006
|
-
import { Fragment, jsx as
|
|
7132
|
+
import { Fragment, jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7007
7133
|
var OTPInput = (props) => {
|
|
7008
7134
|
const { length = 6, onChange, onComplete, error: error2, helperText, containerProps, ...rest } = props;
|
|
7009
|
-
const theme =
|
|
7135
|
+
const theme = useTheme3();
|
|
7010
7136
|
const [otp, setOtp] = useState10(Array(length).fill(""));
|
|
7011
7137
|
const inputsRef = useRef6([]);
|
|
7012
7138
|
const handleChange = (value, index) => {
|
|
@@ -7071,9 +7197,9 @@ var OTPInput = (props) => {
|
|
|
7071
7197
|
onComplete?.(newOtp.join(""));
|
|
7072
7198
|
}
|
|
7073
7199
|
};
|
|
7074
|
-
return /* @__PURE__ */
|
|
7075
|
-
/* @__PURE__ */
|
|
7076
|
-
|
|
7200
|
+
return /* @__PURE__ */ jsxs32(Fragment, { children: [
|
|
7201
|
+
/* @__PURE__ */ jsx54(Box13, { display: "flex", justifyContent: "center", ...containerProps, children: otp.map((_, index) => /* @__PURE__ */ jsx54(
|
|
7202
|
+
Box13,
|
|
7077
7203
|
{
|
|
7078
7204
|
display: "flex",
|
|
7079
7205
|
alignItems: "center",
|
|
@@ -7082,7 +7208,7 @@ var OTPInput = (props) => {
|
|
|
7082
7208
|
mr: 1.5
|
|
7083
7209
|
}
|
|
7084
7210
|
},
|
|
7085
|
-
children: /* @__PURE__ */
|
|
7211
|
+
children: /* @__PURE__ */ jsx54(
|
|
7086
7212
|
TextField,
|
|
7087
7213
|
{
|
|
7088
7214
|
size: "medium",
|
|
@@ -7165,21 +7291,21 @@ var OTPInput = (props) => {
|
|
|
7165
7291
|
},
|
|
7166
7292
|
index
|
|
7167
7293
|
)) }),
|
|
7168
|
-
error2 && /* @__PURE__ */
|
|
7294
|
+
error2 && /* @__PURE__ */ jsx54(FormHelperText3, { sx: { color: "error.main" }, children: helperText })
|
|
7169
7295
|
] });
|
|
7170
7296
|
};
|
|
7171
7297
|
var OTPInput_default = OTPInput;
|
|
7172
7298
|
|
|
7173
7299
|
// src/components/HookForm/RHFOTPInput.tsx
|
|
7174
|
-
import { jsx as
|
|
7300
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7175
7301
|
var RHFOTPInput = ({ name, length = 6, helperText, ...rest }) => {
|
|
7176
7302
|
const { control, setValue } = useFormContext3();
|
|
7177
|
-
return /* @__PURE__ */
|
|
7303
|
+
return /* @__PURE__ */ jsx55(
|
|
7178
7304
|
Controller3,
|
|
7179
7305
|
{
|
|
7180
7306
|
name,
|
|
7181
7307
|
control,
|
|
7182
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7308
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx55(
|
|
7183
7309
|
OTPInput_default,
|
|
7184
7310
|
{
|
|
7185
7311
|
length,
|
|
@@ -7199,16 +7325,16 @@ import { Controller as Controller4, useFormContext as useFormContext4 } from "re
|
|
|
7199
7325
|
import IconButton3 from "@mui/material/IconButton";
|
|
7200
7326
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
7201
7327
|
import TextField2 from "@mui/material/TextField";
|
|
7202
|
-
import { jsx as
|
|
7328
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
7203
7329
|
var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
7204
7330
|
const { control } = useFormContext4();
|
|
7205
7331
|
const passwordVisibility = useBoolean();
|
|
7206
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ jsx56(
|
|
7207
7333
|
Controller4,
|
|
7208
7334
|
{
|
|
7209
7335
|
name,
|
|
7210
7336
|
control,
|
|
7211
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7337
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx56(
|
|
7212
7338
|
TextField2,
|
|
7213
7339
|
{
|
|
7214
7340
|
...field,
|
|
@@ -7229,7 +7355,7 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7229
7355
|
input: {
|
|
7230
7356
|
...slotProps?.input,
|
|
7231
7357
|
...type === "password" && {
|
|
7232
|
-
endAdornment: /* @__PURE__ */
|
|
7358
|
+
endAdornment: /* @__PURE__ */ jsx56(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx56(IconButton3, { edge: "end", onClick: passwordVisibility.onToggle, children: /* @__PURE__ */ jsx56(
|
|
7233
7359
|
Icon,
|
|
7234
7360
|
{
|
|
7235
7361
|
icon: passwordVisibility.value ? "EyeClosed" : "Eye",
|
|
@@ -7248,15 +7374,15 @@ var RHFTextField = ({ name, helperText, type, slotProps, ...rest }) => {
|
|
|
7248
7374
|
|
|
7249
7375
|
// src/components/HookForm/RHFRadioGroup.tsx
|
|
7250
7376
|
import { Controller as Controller5, useFormContext as useFormContext5 } from "react-hook-form";
|
|
7251
|
-
import
|
|
7252
|
-
import
|
|
7377
|
+
import Stack6 from "@mui/material/Stack";
|
|
7378
|
+
import Typography5 from "@mui/material/Typography";
|
|
7253
7379
|
import Radio from "@mui/material/Radio";
|
|
7254
7380
|
import FormControlLabel2 from "@mui/material/FormControlLabel";
|
|
7255
7381
|
import FormLabel2 from "@mui/material/FormLabel";
|
|
7256
7382
|
import RadioGroup from "@mui/material/RadioGroup";
|
|
7257
7383
|
import FormControl2 from "@mui/material/FormControl";
|
|
7258
7384
|
import FormHelperText4 from "@mui/material/FormHelperText";
|
|
7259
|
-
import { jsx as
|
|
7385
|
+
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7260
7386
|
var RHFRadioGroup = ({
|
|
7261
7387
|
name,
|
|
7262
7388
|
label,
|
|
@@ -7268,13 +7394,13 @@ var RHFRadioGroup = ({
|
|
|
7268
7394
|
const { control } = useFormContext5();
|
|
7269
7395
|
const labelledby = `${name}-radio-buttons-group-label`;
|
|
7270
7396
|
const ariaLabel = (val) => `Radio ${val}`;
|
|
7271
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ jsx57(
|
|
7272
7398
|
Controller5,
|
|
7273
7399
|
{
|
|
7274
7400
|
name,
|
|
7275
7401
|
control,
|
|
7276
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7277
|
-
label && /* @__PURE__ */
|
|
7402
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs33(FormControl2, { component: "fieldset", sx: slotProps?.wrap, children: [
|
|
7403
|
+
label && /* @__PURE__ */ jsx57(
|
|
7278
7404
|
FormLabel2,
|
|
7279
7405
|
{
|
|
7280
7406
|
id: labelledby,
|
|
@@ -7284,11 +7410,11 @@ var RHFRadioGroup = ({
|
|
|
7284
7410
|
children: label
|
|
7285
7411
|
}
|
|
7286
7412
|
),
|
|
7287
|
-
/* @__PURE__ */
|
|
7413
|
+
/* @__PURE__ */ jsx57(RadioGroup, { ...field, "aria-labelledby": labelledby, ...other, children: options.map((option) => /* @__PURE__ */ jsx57(
|
|
7288
7414
|
FormControlLabel2,
|
|
7289
7415
|
{
|
|
7290
7416
|
value: option.value,
|
|
7291
|
-
control: /* @__PURE__ */
|
|
7417
|
+
control: /* @__PURE__ */ jsx57(
|
|
7292
7418
|
Radio,
|
|
7293
7419
|
{
|
|
7294
7420
|
...slotProps?.radio,
|
|
@@ -7300,9 +7426,9 @@ var RHFRadioGroup = ({
|
|
|
7300
7426
|
}
|
|
7301
7427
|
}
|
|
7302
7428
|
),
|
|
7303
|
-
label: /* @__PURE__ */
|
|
7304
|
-
/* @__PURE__ */
|
|
7305
|
-
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 })
|
|
7306
7432
|
] }),
|
|
7307
7433
|
sx: {
|
|
7308
7434
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7310,7 +7436,7 @@ var RHFRadioGroup = ({
|
|
|
7310
7436
|
},
|
|
7311
7437
|
option.value
|
|
7312
7438
|
)) }),
|
|
7313
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7439
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx57(FormHelperText4, { error: !!error2, sx: { mx: 0 }, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7314
7440
|
] })
|
|
7315
7441
|
}
|
|
7316
7442
|
);
|
|
@@ -7320,7 +7446,7 @@ var RHFRadioGroup = ({
|
|
|
7320
7446
|
import { Controller as Controller6, useFormContext as useFormContext6 } from "react-hook-form";
|
|
7321
7447
|
import TextField3 from "@mui/material/TextField";
|
|
7322
7448
|
import Autocomplete from "@mui/material/Autocomplete";
|
|
7323
|
-
import { jsx as
|
|
7449
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
7324
7450
|
var RHFAutocomplete = ({
|
|
7325
7451
|
name,
|
|
7326
7452
|
label,
|
|
@@ -7331,12 +7457,12 @@ var RHFAutocomplete = ({
|
|
|
7331
7457
|
...other
|
|
7332
7458
|
}) => {
|
|
7333
7459
|
const { control, setValue } = useFormContext6();
|
|
7334
|
-
return /* @__PURE__ */
|
|
7460
|
+
return /* @__PURE__ */ jsx58(
|
|
7335
7461
|
Controller6,
|
|
7336
7462
|
{
|
|
7337
7463
|
name,
|
|
7338
7464
|
control,
|
|
7339
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7465
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsx58(
|
|
7340
7466
|
Autocomplete,
|
|
7341
7467
|
{
|
|
7342
7468
|
...field,
|
|
@@ -7345,7 +7471,7 @@ var RHFAutocomplete = ({
|
|
|
7345
7471
|
setValue(name, newValue, { shouldValidate: true });
|
|
7346
7472
|
handleChange?.(newValue);
|
|
7347
7473
|
},
|
|
7348
|
-
renderInput: (params) => /* @__PURE__ */
|
|
7474
|
+
renderInput: (params) => /* @__PURE__ */ jsx58(
|
|
7349
7475
|
TextField3,
|
|
7350
7476
|
{
|
|
7351
7477
|
label,
|
|
@@ -7365,16 +7491,16 @@ var RHFAutocomplete = ({
|
|
|
7365
7491
|
|
|
7366
7492
|
// src/components/HookForm/RHFCheckbox.tsx
|
|
7367
7493
|
import { Controller as Controller7, useFormContext as useFormContext7 } from "react-hook-form";
|
|
7368
|
-
import
|
|
7369
|
-
import
|
|
7370
|
-
import
|
|
7494
|
+
import Stack7 from "@mui/material/Stack";
|
|
7495
|
+
import Box14 from "@mui/material/Box";
|
|
7496
|
+
import Typography6 from "@mui/material/Typography";
|
|
7371
7497
|
import Checkbox from "@mui/material/Checkbox";
|
|
7372
7498
|
import FormGroup2 from "@mui/material/FormGroup";
|
|
7373
7499
|
import FormLabel3 from "@mui/material/FormLabel";
|
|
7374
7500
|
import FormControl3 from "@mui/material/FormControl";
|
|
7375
7501
|
import FormHelperText5 from "@mui/material/FormHelperText";
|
|
7376
7502
|
import FormControlLabel3 from "@mui/material/FormControlLabel";
|
|
7377
|
-
import { jsx as
|
|
7503
|
+
import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7378
7504
|
var RHFCheckbox = ({
|
|
7379
7505
|
name,
|
|
7380
7506
|
description,
|
|
@@ -7386,16 +7512,16 @@ var RHFCheckbox = ({
|
|
|
7386
7512
|
}) => {
|
|
7387
7513
|
const { control } = useFormContext7();
|
|
7388
7514
|
const baseAriaLabel = `Checkbox for ${name}`;
|
|
7389
|
-
return /* @__PURE__ */
|
|
7515
|
+
return /* @__PURE__ */ jsx59(
|
|
7390
7516
|
Controller7,
|
|
7391
7517
|
{
|
|
7392
7518
|
name,
|
|
7393
7519
|
control,
|
|
7394
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7520
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs34(Box14, { sx: slotProps?.wrap, children: [
|
|
7521
|
+
/* @__PURE__ */ jsx59(
|
|
7396
7522
|
FormControlLabel3,
|
|
7397
7523
|
{
|
|
7398
|
-
control: /* @__PURE__ */
|
|
7524
|
+
control: /* @__PURE__ */ jsx59(
|
|
7399
7525
|
Checkbox,
|
|
7400
7526
|
{
|
|
7401
7527
|
...field,
|
|
@@ -7410,9 +7536,9 @@ var RHFCheckbox = ({
|
|
|
7410
7536
|
}
|
|
7411
7537
|
}
|
|
7412
7538
|
),
|
|
7413
|
-
label: /* @__PURE__ */
|
|
7414
|
-
/* @__PURE__ */
|
|
7415
|
-
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 })
|
|
7416
7542
|
] }),
|
|
7417
7543
|
sx: {
|
|
7418
7544
|
alignItems: description ? "flex-start" : "center",
|
|
@@ -7421,7 +7547,7 @@ var RHFCheckbox = ({
|
|
|
7421
7547
|
...other
|
|
7422
7548
|
}
|
|
7423
7549
|
),
|
|
7424
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7550
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx59(FormHelperText5, { error: !!error2, ...slotProps?.formHelperText, children: error2 ? error2?.message : helperText })
|
|
7425
7551
|
] })
|
|
7426
7552
|
}
|
|
7427
7553
|
);
|
|
@@ -7437,13 +7563,13 @@ var RHFMultiCheckbox = ({
|
|
|
7437
7563
|
}) => {
|
|
7438
7564
|
const { control } = useFormContext7();
|
|
7439
7565
|
const getSelected = (currentValues, optionValue) => currentValues.includes(optionValue) ? currentValues.filter((value) => value !== optionValue) : [...currentValues, optionValue];
|
|
7440
|
-
return /* @__PURE__ */
|
|
7566
|
+
return /* @__PURE__ */ jsx59(
|
|
7441
7567
|
Controller7,
|
|
7442
7568
|
{
|
|
7443
7569
|
name,
|
|
7444
7570
|
control,
|
|
7445
7571
|
defaultValue: [],
|
|
7446
|
-
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */
|
|
7572
|
+
render: ({ field, fieldState: { error: error2 } }) => /* @__PURE__ */ jsxs34(
|
|
7447
7573
|
FormControl3,
|
|
7448
7574
|
{
|
|
7449
7575
|
component: "fieldset",
|
|
@@ -7451,7 +7577,7 @@ var RHFMultiCheckbox = ({
|
|
|
7451
7577
|
sx: slotProps?.formControl?.sx,
|
|
7452
7578
|
...slotProps?.formControl,
|
|
7453
7579
|
children: [
|
|
7454
|
-
label && /* @__PURE__ */
|
|
7580
|
+
label && /* @__PURE__ */ jsx59(
|
|
7455
7581
|
FormLabel3,
|
|
7456
7582
|
{
|
|
7457
7583
|
component: "legend",
|
|
@@ -7460,12 +7586,12 @@ var RHFMultiCheckbox = ({
|
|
|
7460
7586
|
children: label
|
|
7461
7587
|
}
|
|
7462
7588
|
),
|
|
7463
|
-
/* @__PURE__ */
|
|
7589
|
+
/* @__PURE__ */ jsx59(FormGroup2, { row, ...other, children: options.map((option) => {
|
|
7464
7590
|
const itemAriaLabel = option.label || `Option ${option.value}`;
|
|
7465
|
-
return /* @__PURE__ */
|
|
7591
|
+
return /* @__PURE__ */ jsx59(
|
|
7466
7592
|
FormControlLabel3,
|
|
7467
7593
|
{
|
|
7468
|
-
control: /* @__PURE__ */
|
|
7594
|
+
control: /* @__PURE__ */ jsx59(
|
|
7469
7595
|
Checkbox,
|
|
7470
7596
|
{
|
|
7471
7597
|
checked: (field.value || []).includes(option.value),
|
|
@@ -7483,9 +7609,9 @@ var RHFMultiCheckbox = ({
|
|
|
7483
7609
|
}
|
|
7484
7610
|
}
|
|
7485
7611
|
),
|
|
7486
|
-
label: /* @__PURE__ */
|
|
7487
|
-
/* @__PURE__ */
|
|
7488
|
-
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 })
|
|
7489
7615
|
] }),
|
|
7490
7616
|
sx: {
|
|
7491
7617
|
alignItems: option?.description ? "flex-start" : "center"
|
|
@@ -7494,7 +7620,7 @@ var RHFMultiCheckbox = ({
|
|
|
7494
7620
|
option.value
|
|
7495
7621
|
);
|
|
7496
7622
|
}) }),
|
|
7497
|
-
(!!error2 || helperText) && /* @__PURE__ */
|
|
7623
|
+
(!!error2 || helperText) && /* @__PURE__ */ jsx59(
|
|
7498
7624
|
FormHelperText5,
|
|
7499
7625
|
{
|
|
7500
7626
|
sx: { mx: 0, ...slotProps?.formHelperText?.sx },
|
|
@@ -7524,29 +7650,29 @@ var Field = {
|
|
|
7524
7650
|
// src/components/CopyButton/index.tsx
|
|
7525
7651
|
import Tooltip from "@mui/material/Tooltip";
|
|
7526
7652
|
import IconButton4 from "@mui/material/IconButton";
|
|
7527
|
-
import { jsx as
|
|
7653
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7528
7654
|
var CopyButton = ({ text: text2, size = "small" }) => {
|
|
7529
7655
|
const { copy, isCopied } = useCopyToClipboard();
|
|
7530
|
-
return /* @__PURE__ */
|
|
7656
|
+
return /* @__PURE__ */ jsx60(Tooltip, { title: isCopied ? "Copied" : "Copy", children: /* @__PURE__ */ jsx60(
|
|
7531
7657
|
IconButton4,
|
|
7532
7658
|
{
|
|
7533
7659
|
size,
|
|
7534
7660
|
onClick: () => copy(text2),
|
|
7535
7661
|
"aria-label": "copy token",
|
|
7536
7662
|
sx: { color: "icon.black" },
|
|
7537
|
-
children: /* @__PURE__ */
|
|
7663
|
+
children: /* @__PURE__ */ jsx60(Icon, { icon: isCopied ? "ClipboardCheck" : "Copy", sx: { width: 20, height: 20 } })
|
|
7538
7664
|
}
|
|
7539
7665
|
) });
|
|
7540
7666
|
};
|
|
7541
7667
|
|
|
7542
7668
|
// src/components/LoadingScreen/index.tsx
|
|
7543
7669
|
import Portal from "@mui/material/Portal";
|
|
7544
|
-
import
|
|
7670
|
+
import Box15 from "@mui/material/Box";
|
|
7545
7671
|
import LinearProgress from "@mui/material/LinearProgress";
|
|
7546
|
-
import { jsx as
|
|
7672
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7547
7673
|
var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
7548
|
-
const content = /* @__PURE__ */
|
|
7549
|
-
|
|
7674
|
+
const content = /* @__PURE__ */ jsx61(
|
|
7675
|
+
Box15,
|
|
7550
7676
|
{
|
|
7551
7677
|
sx: {
|
|
7552
7678
|
px: 5,
|
|
@@ -7559,17 +7685,17 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
7559
7685
|
...sx
|
|
7560
7686
|
},
|
|
7561
7687
|
...rest,
|
|
7562
|
-
children: /* @__PURE__ */
|
|
7688
|
+
children: /* @__PURE__ */ jsx61(LinearProgress, { color: "primary", sx: { width: 1, maxWidth: 360 } })
|
|
7563
7689
|
}
|
|
7564
7690
|
);
|
|
7565
7691
|
if (portal) {
|
|
7566
|
-
return /* @__PURE__ */
|
|
7692
|
+
return /* @__PURE__ */ jsx61(Portal, { children: content });
|
|
7567
7693
|
}
|
|
7568
7694
|
return content;
|
|
7569
7695
|
};
|
|
7570
7696
|
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
7571
|
-
const content = /* @__PURE__ */
|
|
7572
|
-
|
|
7697
|
+
const content = /* @__PURE__ */ jsx61(
|
|
7698
|
+
Box15,
|
|
7573
7699
|
{
|
|
7574
7700
|
sx: {
|
|
7575
7701
|
right: 0,
|
|
@@ -7585,11 +7711,11 @@ var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
|
7585
7711
|
...sx
|
|
7586
7712
|
},
|
|
7587
7713
|
...rest,
|
|
7588
|
-
children: /* @__PURE__ */
|
|
7714
|
+
children: /* @__PURE__ */ jsx61(AnimatedLogo, {})
|
|
7589
7715
|
}
|
|
7590
7716
|
);
|
|
7591
7717
|
if (portal) {
|
|
7592
|
-
return /* @__PURE__ */
|
|
7718
|
+
return /* @__PURE__ */ jsx61(Portal, { children: content });
|
|
7593
7719
|
}
|
|
7594
7720
|
return content;
|
|
7595
7721
|
};
|
|
@@ -7603,6 +7729,7 @@ export {
|
|
|
7603
7729
|
CloudUpload,
|
|
7604
7730
|
Copy,
|
|
7605
7731
|
CopyButton,
|
|
7732
|
+
EmptyContent,
|
|
7606
7733
|
Eye,
|
|
7607
7734
|
EyeClosed,
|
|
7608
7735
|
Field,
|