cloudmr-ux 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +21 -1
- package/dist/index.js +87 -18
- package/dist/index.mjs +82 -15
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,20 @@ declare function CmrDeletionDialog(props: {
|
|
|
178
178
|
deletionCallback: () => void;
|
|
179
179
|
}): react_jsx_runtime.JSX.Element;
|
|
180
180
|
|
|
181
|
+
interface EditConfirmationProps {
|
|
182
|
+
name?: string;
|
|
183
|
+
defaultText?: string;
|
|
184
|
+
message?: string;
|
|
185
|
+
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
186
|
+
open: boolean;
|
|
187
|
+
setOpen: (open: boolean) => void;
|
|
188
|
+
confirmCallback?: (text: string) => void;
|
|
189
|
+
cancellable?: boolean;
|
|
190
|
+
cancelCallback?: (edit: string) => void;
|
|
191
|
+
suffix?: string;
|
|
192
|
+
}
|
|
193
|
+
declare function CmrEditConfirmation({ name, message, defaultText, color, open, setOpen, confirmCallback, cancellable, cancelCallback, suffix }: EditConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
194
|
+
|
|
181
195
|
interface TabInfo {
|
|
182
196
|
id: number;
|
|
183
197
|
text: string;
|
|
@@ -204,6 +218,12 @@ interface CmrCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
204
218
|
}
|
|
205
219
|
declare const CmrCheckbox: (props: CmrCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
206
220
|
|
|
221
|
+
interface CmrLabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
222
|
+
required?: boolean;
|
|
223
|
+
children?: any;
|
|
224
|
+
}
|
|
225
|
+
declare const CmrLabel: (props: CmrLabelProps) => react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
207
227
|
interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
|
|
208
228
|
dataSource: any[];
|
|
209
229
|
idAlias?: string;
|
|
@@ -214,4 +234,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
|
|
|
214
234
|
|
|
215
235
|
declare const CmrTable: FC<CmrTableProps>;
|
|
216
236
|
|
|
217
|
-
export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrInput, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
|
|
237
|
+
export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,9 @@ __export(src_exports, {
|
|
|
36
36
|
CmrCollapse: () => Collapse_default,
|
|
37
37
|
CmrConfirmation: () => CmrConfirmation,
|
|
38
38
|
CmrDeletionDialog: () => CmrDeletionDialog,
|
|
39
|
+
CmrEditConfirmation: () => CmrEditConfirmation,
|
|
39
40
|
CmrInput: () => CmrInput,
|
|
41
|
+
CmrLabel: () => Label_default,
|
|
40
42
|
CmrNameDialog: () => CmrNameDialog,
|
|
41
43
|
CmrPanel: () => Panel_default,
|
|
42
44
|
CmrRadioGroup: () => CmrRadioGroup_default,
|
|
@@ -929,18 +931,83 @@ function CmrDeletionDialog(props) {
|
|
|
929
931
|
] }) });
|
|
930
932
|
}
|
|
931
933
|
|
|
932
|
-
// src/
|
|
934
|
+
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
933
935
|
var React9 = __toESM(require("react"));
|
|
936
|
+
var import_TextField4 = __toESM(require("@mui/material/TextField"));
|
|
937
|
+
var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
|
|
938
|
+
var import_DialogActions5 = __toESM(require("@mui/material/DialogActions"));
|
|
939
|
+
var import_DialogContent5 = __toESM(require("@mui/material/DialogContent"));
|
|
940
|
+
var import_DialogContentText4 = __toESM(require("@mui/material/DialogContentText"));
|
|
941
|
+
var import_DialogTitle5 = __toESM(require("@mui/material/DialogTitle"));
|
|
942
|
+
var import_material9 = require("@mui/material");
|
|
943
|
+
var import_react6 = require("react");
|
|
944
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
945
|
+
function CmrEditConfirmation({
|
|
946
|
+
name,
|
|
947
|
+
message,
|
|
948
|
+
defaultText = "",
|
|
949
|
+
color,
|
|
950
|
+
open,
|
|
951
|
+
setOpen,
|
|
952
|
+
confirmCallback = () => {
|
|
953
|
+
},
|
|
954
|
+
cancellable = false,
|
|
955
|
+
cancelCallback = () => {
|
|
956
|
+
},
|
|
957
|
+
suffix = ""
|
|
958
|
+
}) {
|
|
959
|
+
const [text, setText] = React9.useState(defaultText);
|
|
960
|
+
(0, import_react6.useEffect)(() => {
|
|
961
|
+
if (open)
|
|
962
|
+
setText(defaultText);
|
|
963
|
+
}, [open]);
|
|
964
|
+
const handleClose = () => {
|
|
965
|
+
setOpen(false);
|
|
966
|
+
};
|
|
967
|
+
const handleConfirm = () => {
|
|
968
|
+
confirmCallback(text + suffix);
|
|
969
|
+
handleClose();
|
|
970
|
+
};
|
|
971
|
+
const handleCancel = () => {
|
|
972
|
+
cancelCallback(text + suffix);
|
|
973
|
+
handleClose();
|
|
974
|
+
};
|
|
975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_Dialog5.default, { maxWidth: "xs", fullWidth: true, open, onClose: handleCancel, children: [
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogTitle5.default, { children: name ? name : "Confirmation" }),
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogContent5.default, { children: [
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogContentText4.default, { alignContent: "center", children: message }),
|
|
979
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogActions5.default, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
980
|
+
import_TextField4.default,
|
|
981
|
+
{
|
|
982
|
+
fullWidth: true,
|
|
983
|
+
variant: "standard",
|
|
984
|
+
InputProps: {
|
|
985
|
+
endAdornment: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.InputAdornment, { position: "end", sx: { whiteSpace: "nowrap" }, children: suffix })
|
|
986
|
+
},
|
|
987
|
+
defaultValue: text,
|
|
988
|
+
onChange: (e) => setText(e.target.value)
|
|
989
|
+
}
|
|
990
|
+
) }),
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogActions5.default, { children: [
|
|
992
|
+
cancellable && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
|
|
993
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
|
|
994
|
+
] })
|
|
995
|
+
] })
|
|
996
|
+
] });
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// src/CmrTabs/CmrTabs.tsx
|
|
1000
|
+
var React10 = __toESM(require("react"));
|
|
934
1001
|
var import_Tabs = __toESM(require("@mui/material/Tabs"));
|
|
935
1002
|
var import_Tab = __toESM(require("@mui/material/Tab"));
|
|
936
1003
|
var import_Container = __toESM(require("@mui/material/Container"));
|
|
937
1004
|
var import_Typography2 = __toESM(require("@mui/material/Typography"));
|
|
938
1005
|
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
939
|
-
var
|
|
940
|
-
var
|
|
1006
|
+
var import_react7 = require("react");
|
|
1007
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
941
1008
|
function CustomTabPanel(props) {
|
|
942
1009
|
const { children, value, index, ...other } = props;
|
|
943
|
-
return /* @__PURE__ */ (0,
|
|
1010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
944
1011
|
"div",
|
|
945
1012
|
{
|
|
946
1013
|
role: "tabpanel",
|
|
@@ -948,7 +1015,7 @@ function CustomTabPanel(props) {
|
|
|
948
1015
|
id: `simple-tabpanel-${index}`,
|
|
949
1016
|
"aria-labelledby": `simple-tab-${index}`,
|
|
950
1017
|
...other,
|
|
951
|
-
children: /* @__PURE__ */ (0,
|
|
1018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Box2.default, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Typography2.default, { children }) })
|
|
952
1019
|
}
|
|
953
1020
|
);
|
|
954
1021
|
}
|
|
@@ -959,13 +1026,13 @@ function a11yProps(index) {
|
|
|
959
1026
|
};
|
|
960
1027
|
}
|
|
961
1028
|
function CmrTabs(props) {
|
|
962
|
-
const [value, setValue] =
|
|
1029
|
+
const [value, setValue] = React10.useState(0);
|
|
963
1030
|
const handleChange = (event, newValue) => {
|
|
964
1031
|
setValue(newValue);
|
|
965
1032
|
if (props.onTabSelected)
|
|
966
1033
|
props.onTabSelected(newValue);
|
|
967
1034
|
};
|
|
968
|
-
return /* @__PURE__ */ (0,
|
|
1035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
969
1036
|
import_Container.default,
|
|
970
1037
|
{
|
|
971
1038
|
maxWidth: "lg",
|
|
@@ -976,7 +1043,7 @@ function CmrTabs(props) {
|
|
|
976
1043
|
mt: 4
|
|
977
1044
|
},
|
|
978
1045
|
children: [
|
|
979
|
-
/* @__PURE__ */ (0,
|
|
1046
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Box2.default, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
980
1047
|
import_Tabs.default,
|
|
981
1048
|
{
|
|
982
1049
|
value,
|
|
@@ -988,11 +1055,11 @@ function CmrTabs(props) {
|
|
|
988
1055
|
backgroundColor: "#580F8B"
|
|
989
1056
|
}
|
|
990
1057
|
},
|
|
991
|
-
children: props.tabList.map((tab, index) => /* @__PURE__ */ (0,
|
|
1058
|
+
children: props.tabList.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Tab.default, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
|
|
992
1059
|
}
|
|
993
1060
|
) }),
|
|
994
1061
|
props.tabList.map(
|
|
995
|
-
(tab, index) => /* @__PURE__ */ (0,
|
|
1062
|
+
(tab, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomTabPanel, { value, index, children: (0, import_react7.cloneElement)(tab.children, {
|
|
996
1063
|
visible: value == index
|
|
997
1064
|
}) })
|
|
998
1065
|
)
|
|
@@ -1002,19 +1069,19 @@ function CmrTabs(props) {
|
|
|
1002
1069
|
}
|
|
1003
1070
|
|
|
1004
1071
|
// src/CmrComponents/checkbox/Checkbox.tsx
|
|
1005
|
-
var import_material9 = require("@mui/material");
|
|
1006
1072
|
var import_material10 = require("@mui/material");
|
|
1007
|
-
var
|
|
1073
|
+
var import_material11 = require("@mui/material");
|
|
1074
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1008
1075
|
var CmrCheckbox = (props) => {
|
|
1009
1076
|
const { defaultChecked, onChange, children, ...rest } = props;
|
|
1010
|
-
return /* @__PURE__ */ (0,
|
|
1011
|
-
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1078
|
+
import_material11.FormControlLabel,
|
|
1012
1079
|
{
|
|
1013
1080
|
disabled: props.disabled,
|
|
1014
1081
|
style: props.style,
|
|
1015
1082
|
className: props.className,
|
|
1016
|
-
control: /* @__PURE__ */ (0,
|
|
1017
|
-
label: /* @__PURE__ */ (0,
|
|
1083
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.Checkbox, { style: props.style, checked: props.checked, defaultChecked, onChange }),
|
|
1084
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label_default, { children: props.children }),
|
|
1018
1085
|
sx: props.sx,
|
|
1019
1086
|
labelPlacement: "end"
|
|
1020
1087
|
}
|
|
@@ -1024,7 +1091,7 @@ var Checkbox_default = CmrCheckbox;
|
|
|
1024
1091
|
|
|
1025
1092
|
// src/CmrTable/CmrTable.tsx
|
|
1026
1093
|
var import_x_data_grid = require("@mui/x-data-grid");
|
|
1027
|
-
var
|
|
1094
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1028
1095
|
var CmrTable = (props) => {
|
|
1029
1096
|
const {
|
|
1030
1097
|
dataSource,
|
|
@@ -1036,7 +1103,7 @@ var CmrTable = (props) => {
|
|
|
1036
1103
|
showCheckbox = true,
|
|
1037
1104
|
...rest
|
|
1038
1105
|
} = props;
|
|
1039
|
-
return /* @__PURE__ */ (0,
|
|
1106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1040
1107
|
import_x_data_grid.DataGrid,
|
|
1041
1108
|
{
|
|
1042
1109
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1068,7 +1135,9 @@ var CmrTable2 = CmrTable_default;
|
|
|
1068
1135
|
CmrCollapse,
|
|
1069
1136
|
CmrConfirmation,
|
|
1070
1137
|
CmrDeletionDialog,
|
|
1138
|
+
CmrEditConfirmation,
|
|
1071
1139
|
CmrInput,
|
|
1140
|
+
CmrLabel,
|
|
1072
1141
|
CmrNameDialog,
|
|
1073
1142
|
CmrPanel,
|
|
1074
1143
|
CmrRadioGroup,
|
package/dist/index.mjs
CHANGED
|
@@ -887,18 +887,83 @@ function CmrDeletionDialog(props) {
|
|
|
887
887
|
] }) });
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
// src/
|
|
890
|
+
// src/CmrComponents/dialogue/EditConfirmation.tsx
|
|
891
891
|
import * as React9 from "react";
|
|
892
|
+
import TextField4 from "@mui/material/TextField";
|
|
893
|
+
import Dialog5 from "@mui/material/Dialog";
|
|
894
|
+
import DialogActions5 from "@mui/material/DialogActions";
|
|
895
|
+
import DialogContent5 from "@mui/material/DialogContent";
|
|
896
|
+
import DialogContentText4 from "@mui/material/DialogContentText";
|
|
897
|
+
import DialogTitle5 from "@mui/material/DialogTitle";
|
|
898
|
+
import { InputAdornment } from "@mui/material";
|
|
899
|
+
import { useEffect as useEffect2 } from "react";
|
|
900
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
901
|
+
function CmrEditConfirmation({
|
|
902
|
+
name,
|
|
903
|
+
message,
|
|
904
|
+
defaultText = "",
|
|
905
|
+
color,
|
|
906
|
+
open,
|
|
907
|
+
setOpen,
|
|
908
|
+
confirmCallback = () => {
|
|
909
|
+
},
|
|
910
|
+
cancellable = false,
|
|
911
|
+
cancelCallback = () => {
|
|
912
|
+
},
|
|
913
|
+
suffix = ""
|
|
914
|
+
}) {
|
|
915
|
+
const [text, setText] = React9.useState(defaultText);
|
|
916
|
+
useEffect2(() => {
|
|
917
|
+
if (open)
|
|
918
|
+
setText(defaultText);
|
|
919
|
+
}, [open]);
|
|
920
|
+
const handleClose = () => {
|
|
921
|
+
setOpen(false);
|
|
922
|
+
};
|
|
923
|
+
const handleConfirm = () => {
|
|
924
|
+
confirmCallback(text + suffix);
|
|
925
|
+
handleClose();
|
|
926
|
+
};
|
|
927
|
+
const handleCancel = () => {
|
|
928
|
+
cancelCallback(text + suffix);
|
|
929
|
+
handleClose();
|
|
930
|
+
};
|
|
931
|
+
return /* @__PURE__ */ jsxs10(Dialog5, { maxWidth: "xs", fullWidth: true, open, onClose: handleCancel, children: [
|
|
932
|
+
/* @__PURE__ */ jsx14(DialogTitle5, { children: name ? name : "Confirmation" }),
|
|
933
|
+
/* @__PURE__ */ jsxs10(DialogContent5, { children: [
|
|
934
|
+
/* @__PURE__ */ jsx14(DialogContentText4, { alignContent: "center", children: message }),
|
|
935
|
+
/* @__PURE__ */ jsx14(DialogActions5, { children: /* @__PURE__ */ jsx14(
|
|
936
|
+
TextField4,
|
|
937
|
+
{
|
|
938
|
+
fullWidth: true,
|
|
939
|
+
variant: "standard",
|
|
940
|
+
InputProps: {
|
|
941
|
+
endAdornment: /* @__PURE__ */ jsx14(InputAdornment, { position: "end", sx: { whiteSpace: "nowrap" }, children: suffix })
|
|
942
|
+
},
|
|
943
|
+
defaultValue: text,
|
|
944
|
+
onChange: (e) => setText(e.target.value)
|
|
945
|
+
}
|
|
946
|
+
) }),
|
|
947
|
+
/* @__PURE__ */ jsxs10(DialogActions5, { children: [
|
|
948
|
+
cancellable && /* @__PURE__ */ jsx14(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
|
|
949
|
+
/* @__PURE__ */ jsx14(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
|
|
950
|
+
] })
|
|
951
|
+
] })
|
|
952
|
+
] });
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// src/CmrTabs/CmrTabs.tsx
|
|
956
|
+
import * as React10 from "react";
|
|
892
957
|
import Tabs from "@mui/material/Tabs";
|
|
893
958
|
import Tab from "@mui/material/Tab";
|
|
894
959
|
import Container from "@mui/material/Container";
|
|
895
960
|
import Typography3 from "@mui/material/Typography";
|
|
896
961
|
import Box3 from "@mui/material/Box";
|
|
897
962
|
import { cloneElement as cloneElement2 } from "react";
|
|
898
|
-
import { jsx as
|
|
963
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
899
964
|
function CustomTabPanel(props) {
|
|
900
965
|
const { children, value, index, ...other } = props;
|
|
901
|
-
return /* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ jsx15(
|
|
902
967
|
"div",
|
|
903
968
|
{
|
|
904
969
|
role: "tabpanel",
|
|
@@ -906,7 +971,7 @@ function CustomTabPanel(props) {
|
|
|
906
971
|
id: `simple-tabpanel-${index}`,
|
|
907
972
|
"aria-labelledby": `simple-tab-${index}`,
|
|
908
973
|
...other,
|
|
909
|
-
children: /* @__PURE__ */
|
|
974
|
+
children: /* @__PURE__ */ jsx15(Box3, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ jsx15(Typography3, { children }) })
|
|
910
975
|
}
|
|
911
976
|
);
|
|
912
977
|
}
|
|
@@ -917,13 +982,13 @@ function a11yProps(index) {
|
|
|
917
982
|
};
|
|
918
983
|
}
|
|
919
984
|
function CmrTabs(props) {
|
|
920
|
-
const [value, setValue] =
|
|
985
|
+
const [value, setValue] = React10.useState(0);
|
|
921
986
|
const handleChange = (event, newValue) => {
|
|
922
987
|
setValue(newValue);
|
|
923
988
|
if (props.onTabSelected)
|
|
924
989
|
props.onTabSelected(newValue);
|
|
925
990
|
};
|
|
926
|
-
return /* @__PURE__ */
|
|
991
|
+
return /* @__PURE__ */ jsxs11(
|
|
927
992
|
Container,
|
|
928
993
|
{
|
|
929
994
|
maxWidth: "lg",
|
|
@@ -934,7 +999,7 @@ function CmrTabs(props) {
|
|
|
934
999
|
mt: 4
|
|
935
1000
|
},
|
|
936
1001
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ jsx15(Box3, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ jsx15(
|
|
938
1003
|
Tabs,
|
|
939
1004
|
{
|
|
940
1005
|
value,
|
|
@@ -946,11 +1011,11 @@ function CmrTabs(props) {
|
|
|
946
1011
|
backgroundColor: "#580F8B"
|
|
947
1012
|
}
|
|
948
1013
|
},
|
|
949
|
-
children: props.tabList.map((tab, index) => /* @__PURE__ */
|
|
1014
|
+
children: props.tabList.map((tab, index) => /* @__PURE__ */ jsx15(Tab, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
|
|
950
1015
|
}
|
|
951
1016
|
) }),
|
|
952
1017
|
props.tabList.map(
|
|
953
|
-
(tab, index) => /* @__PURE__ */
|
|
1018
|
+
(tab, index) => /* @__PURE__ */ jsx15(CustomTabPanel, { value, index, children: cloneElement2(tab.children, {
|
|
954
1019
|
visible: value == index
|
|
955
1020
|
}) })
|
|
956
1021
|
)
|
|
@@ -962,17 +1027,17 @@ function CmrTabs(props) {
|
|
|
962
1027
|
// src/CmrComponents/checkbox/Checkbox.tsx
|
|
963
1028
|
import { Checkbox as Checkbox2 } from "@mui/material";
|
|
964
1029
|
import { FormControlLabel as FormControlLabel3 } from "@mui/material";
|
|
965
|
-
import { jsx as
|
|
1030
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
966
1031
|
var CmrCheckbox = (props) => {
|
|
967
1032
|
const { defaultChecked, onChange, children, ...rest } = props;
|
|
968
|
-
return /* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ jsx16(
|
|
969
1034
|
FormControlLabel3,
|
|
970
1035
|
{
|
|
971
1036
|
disabled: props.disabled,
|
|
972
1037
|
style: props.style,
|
|
973
1038
|
className: props.className,
|
|
974
|
-
control: /* @__PURE__ */
|
|
975
|
-
label: /* @__PURE__ */
|
|
1039
|
+
control: /* @__PURE__ */ jsx16(Checkbox2, { style: props.style, checked: props.checked, defaultChecked, onChange }),
|
|
1040
|
+
label: /* @__PURE__ */ jsx16(Label_default, { children: props.children }),
|
|
976
1041
|
sx: props.sx,
|
|
977
1042
|
labelPlacement: "end"
|
|
978
1043
|
}
|
|
@@ -982,7 +1047,7 @@ var Checkbox_default = CmrCheckbox;
|
|
|
982
1047
|
|
|
983
1048
|
// src/CmrTable/CmrTable.tsx
|
|
984
1049
|
import { DataGrid } from "@mui/x-data-grid";
|
|
985
|
-
import { jsx as
|
|
1050
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
986
1051
|
var CmrTable = (props) => {
|
|
987
1052
|
const {
|
|
988
1053
|
dataSource,
|
|
@@ -994,7 +1059,7 @@ var CmrTable = (props) => {
|
|
|
994
1059
|
showCheckbox = true,
|
|
995
1060
|
...rest
|
|
996
1061
|
} = props;
|
|
997
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsx17("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx17(
|
|
998
1063
|
DataGrid,
|
|
999
1064
|
{
|
|
1000
1065
|
rows: dataSource ? dataSource.map((row) => ({
|
|
@@ -1025,7 +1090,9 @@ export {
|
|
|
1025
1090
|
Collapse_default as CmrCollapse,
|
|
1026
1091
|
CmrConfirmation,
|
|
1027
1092
|
CmrDeletionDialog,
|
|
1093
|
+
CmrEditConfirmation,
|
|
1028
1094
|
CmrInput,
|
|
1095
|
+
Label_default as CmrLabel,
|
|
1029
1096
|
CmrNameDialog,
|
|
1030
1097
|
Panel_default as CmrPanel,
|
|
1031
1098
|
CmrRadioGroup_default as CmrRadioGroup,
|