cloudmr-ux 1.1.1 → 1.1.3

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 CHANGED
@@ -173,6 +173,25 @@ declare function CmrConfirmation({ name, message, cancelText, color, open, setOp
173
173
  confirmText?: string;
174
174
  }): react_jsx_runtime.JSX.Element;
175
175
 
176
+ declare function CmrDeletionDialog(props: {
177
+ name: string | undefined;
178
+ deletionCallback: () => void;
179
+ }): react_jsx_runtime.JSX.Element;
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
+
176
195
  interface TabInfo {
177
196
  id: number;
178
197
  text: string;
@@ -209,4 +228,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
209
228
 
210
229
  declare const CmrTable: FC<CmrTableProps>;
211
230
 
212
- export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrInput, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
231
+ export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
package/dist/index.js CHANGED
@@ -35,6 +35,8 @@ __export(src_exports, {
35
35
  CmrCheckbox: () => Checkbox_default,
36
36
  CmrCollapse: () => Collapse_default,
37
37
  CmrConfirmation: () => CmrConfirmation,
38
+ CmrDeletionDialog: () => CmrDeletionDialog,
39
+ CmrEditConfirmation: () => CmrEditConfirmation,
38
40
  CmrInput: () => CmrInput,
39
41
  CmrNameDialog: () => CmrNameDialog,
40
42
  CmrPanel: () => Panel_default,
@@ -875,18 +877,136 @@ function CmrConfirmation({
875
877
  ] });
876
878
  }
877
879
 
878
- // src/CmrTabs/CmrTabs.tsx
880
+ // src/CmrComponents/dialogue/DeletionDialog.tsx
879
881
  var React8 = __toESM(require("react"));
882
+ var import_TextField3 = __toESM(require("@mui/material/TextField"));
883
+ var import_Dialog4 = __toESM(require("@mui/material/Dialog"));
884
+ var import_DialogActions4 = __toESM(require("@mui/material/DialogActions"));
885
+ var import_DialogContent4 = __toESM(require("@mui/material/DialogContent"));
886
+ var import_DialogContentText3 = __toESM(require("@mui/material/DialogContentText"));
887
+ var import_DialogTitle4 = __toESM(require("@mui/material/DialogTitle"));
888
+ var import_jsx_runtime13 = require("react/jsx-runtime");
889
+ function CmrDeletionDialog(props) {
890
+ const [open, setOpen] = React8.useState(true);
891
+ const [text, setText] = React8.useState("");
892
+ const handleClickOpen = () => {
893
+ setOpen(true);
894
+ };
895
+ const handleClose = () => {
896
+ setOpen(false);
897
+ };
898
+ const handleConfirm = () => {
899
+ if (text === props.name) {
900
+ props.deletionCallback();
901
+ setOpen(false);
902
+ }
903
+ };
904
+ const handleTextFieldChange = (e) => {
905
+ setText(e.target.value);
906
+ };
907
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_Dialog4.default, { open, onClose: handleClose, children: [
908
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_DialogTitle4.default, { children: "Confirmation" }),
909
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_DialogContent4.default, { children: [
910
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_DialogContentText3.default, { children: "To delete the files, please type your full name below and confirm." }),
911
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
912
+ import_TextField3.default,
913
+ {
914
+ autoFocus: true,
915
+ margin: "dense",
916
+ id: "name",
917
+ type: "email",
918
+ placeholder: props.name,
919
+ fullWidth: true,
920
+ inputProps: { style: { fontSize: "16pt" } },
921
+ variant: "standard",
922
+ onChange: handleTextFieldChange
923
+ }
924
+ )
925
+ ] }),
926
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_DialogActions4.default, { children: [
927
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { className: "btn btn-secondary", onClick: handleClose, children: "Cancel" }),
928
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("button", { className: "btn btn-danger", onClick: handleConfirm, children: "Confirm" })
929
+ ] })
930
+ ] }) });
931
+ }
932
+
933
+ // src/CmrComponents/dialogue/EditConfirmation.tsx
934
+ var React9 = __toESM(require("react"));
935
+ var import_TextField4 = __toESM(require("@mui/material/TextField"));
936
+ var import_Dialog5 = __toESM(require("@mui/material/Dialog"));
937
+ var import_DialogActions5 = __toESM(require("@mui/material/DialogActions"));
938
+ var import_DialogContent5 = __toESM(require("@mui/material/DialogContent"));
939
+ var import_DialogContentText4 = __toESM(require("@mui/material/DialogContentText"));
940
+ var import_DialogTitle5 = __toESM(require("@mui/material/DialogTitle"));
941
+ var import_material9 = require("@mui/material");
942
+ var import_react6 = require("react");
943
+ var import_jsx_runtime14 = require("react/jsx-runtime");
944
+ function CmrEditConfirmation({
945
+ name,
946
+ message,
947
+ defaultText = "",
948
+ color,
949
+ open,
950
+ setOpen,
951
+ confirmCallback = () => {
952
+ },
953
+ cancellable = false,
954
+ cancelCallback = () => {
955
+ },
956
+ suffix = ""
957
+ }) {
958
+ const [text, setText] = React9.useState(defaultText);
959
+ (0, import_react6.useEffect)(() => {
960
+ if (open)
961
+ setText(defaultText);
962
+ }, [open]);
963
+ const handleClose = () => {
964
+ setOpen(false);
965
+ };
966
+ const handleConfirm = () => {
967
+ confirmCallback(text + suffix);
968
+ handleClose();
969
+ };
970
+ const handleCancel = () => {
971
+ cancelCallback(text + suffix);
972
+ handleClose();
973
+ };
974
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_Dialog5.default, { maxWidth: "xs", fullWidth: true, open, onClose: handleCancel, children: [
975
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogTitle5.default, { children: name ? name : "Confirmation" }),
976
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogContent5.default, { children: [
977
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogContentText4.default, { alignContent: "center", children: message }),
978
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_DialogActions5.default, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
979
+ import_TextField4.default,
980
+ {
981
+ fullWidth: true,
982
+ variant: "standard",
983
+ InputProps: {
984
+ endAdornment: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.InputAdornment, { position: "end", sx: { whiteSpace: "nowrap" }, children: suffix })
985
+ },
986
+ defaultValue: text,
987
+ onChange: (e) => setText(e.target.value)
988
+ }
989
+ ) }),
990
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_DialogActions5.default, { children: [
991
+ cancellable && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
992
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
993
+ ] })
994
+ ] })
995
+ ] });
996
+ }
997
+
998
+ // src/CmrTabs/CmrTabs.tsx
999
+ var React10 = __toESM(require("react"));
880
1000
  var import_Tabs = __toESM(require("@mui/material/Tabs"));
881
1001
  var import_Tab = __toESM(require("@mui/material/Tab"));
882
1002
  var import_Container = __toESM(require("@mui/material/Container"));
883
1003
  var import_Typography2 = __toESM(require("@mui/material/Typography"));
884
1004
  var import_Box2 = __toESM(require("@mui/material/Box"));
885
- var import_react6 = require("react");
886
- var import_jsx_runtime13 = require("react/jsx-runtime");
1005
+ var import_react7 = require("react");
1006
+ var import_jsx_runtime15 = require("react/jsx-runtime");
887
1007
  function CustomTabPanel(props) {
888
1008
  const { children, value, index, ...other } = props;
889
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1009
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
890
1010
  "div",
891
1011
  {
892
1012
  role: "tabpanel",
@@ -894,7 +1014,7 @@ function CustomTabPanel(props) {
894
1014
  id: `simple-tabpanel-${index}`,
895
1015
  "aria-labelledby": `simple-tab-${index}`,
896
1016
  ...other,
897
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Box2.default, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Typography2.default, { children }) })
1017
+ 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 }) })
898
1018
  }
899
1019
  );
900
1020
  }
@@ -905,13 +1025,13 @@ function a11yProps(index) {
905
1025
  };
906
1026
  }
907
1027
  function CmrTabs(props) {
908
- const [value, setValue] = React8.useState(0);
1028
+ const [value, setValue] = React10.useState(0);
909
1029
  const handleChange = (event, newValue) => {
910
1030
  setValue(newValue);
911
1031
  if (props.onTabSelected)
912
1032
  props.onTabSelected(newValue);
913
1033
  };
914
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1034
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
915
1035
  import_Container.default,
916
1036
  {
917
1037
  maxWidth: "lg",
@@ -922,7 +1042,7 @@ function CmrTabs(props) {
922
1042
  mt: 4
923
1043
  },
924
1044
  children: [
925
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Box2.default, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1045
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Box2.default, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
926
1046
  import_Tabs.default,
927
1047
  {
928
1048
  value,
@@ -934,11 +1054,11 @@ function CmrTabs(props) {
934
1054
  backgroundColor: "#580F8B"
935
1055
  }
936
1056
  },
937
- children: props.tabList.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Tab.default, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
1057
+ 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) }))
938
1058
  }
939
1059
  ) }),
940
1060
  props.tabList.map(
941
- (tab, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CustomTabPanel, { value, index, children: (0, import_react6.cloneElement)(tab.children, {
1061
+ (tab, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CustomTabPanel, { value, index, children: (0, import_react7.cloneElement)(tab.children, {
942
1062
  visible: value == index
943
1063
  }) })
944
1064
  )
@@ -948,19 +1068,19 @@ function CmrTabs(props) {
948
1068
  }
949
1069
 
950
1070
  // src/CmrComponents/checkbox/Checkbox.tsx
951
- var import_material9 = require("@mui/material");
952
1071
  var import_material10 = require("@mui/material");
953
- var import_jsx_runtime14 = require("react/jsx-runtime");
1072
+ var import_material11 = require("@mui/material");
1073
+ var import_jsx_runtime16 = require("react/jsx-runtime");
954
1074
  var CmrCheckbox = (props) => {
955
1075
  const { defaultChecked, onChange, children, ...rest } = props;
956
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
957
- import_material10.FormControlLabel,
1076
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1077
+ import_material11.FormControlLabel,
958
1078
  {
959
1079
  disabled: props.disabled,
960
1080
  style: props.style,
961
1081
  className: props.className,
962
- control: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_material9.Checkbox, { style: props.style, checked: props.checked, defaultChecked, onChange }),
963
- label: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Label_default, { children: props.children }),
1082
+ control: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.Checkbox, { style: props.style, checked: props.checked, defaultChecked, onChange }),
1083
+ label: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Label_default, { children: props.children }),
964
1084
  sx: props.sx,
965
1085
  labelPlacement: "end"
966
1086
  }
@@ -970,7 +1090,7 @@ var Checkbox_default = CmrCheckbox;
970
1090
 
971
1091
  // src/CmrTable/CmrTable.tsx
972
1092
  var import_x_data_grid = require("@mui/x-data-grid");
973
- var import_jsx_runtime15 = require("react/jsx-runtime");
1093
+ var import_jsx_runtime17 = require("react/jsx-runtime");
974
1094
  var CmrTable = (props) => {
975
1095
  const {
976
1096
  dataSource,
@@ -982,7 +1102,7 @@ var CmrTable = (props) => {
982
1102
  showCheckbox = true,
983
1103
  ...rest
984
1104
  } = props;
985
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1105
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
986
1106
  import_x_data_grid.DataGrid,
987
1107
  {
988
1108
  rows: dataSource ? dataSource.map((row) => ({
@@ -1013,6 +1133,8 @@ var CmrTable2 = CmrTable_default;
1013
1133
  CmrCheckbox,
1014
1134
  CmrCollapse,
1015
1135
  CmrConfirmation,
1136
+ CmrDeletionDialog,
1137
+ CmrEditConfirmation,
1016
1138
  CmrInput,
1017
1139
  CmrNameDialog,
1018
1140
  CmrPanel,
package/dist/index.mjs CHANGED
@@ -834,18 +834,136 @@ function CmrConfirmation({
834
834
  ] });
835
835
  }
836
836
 
837
- // src/CmrTabs/CmrTabs.tsx
837
+ // src/CmrComponents/dialogue/DeletionDialog.tsx
838
838
  import * as React8 from "react";
839
+ import TextField3 from "@mui/material/TextField";
840
+ import Dialog4 from "@mui/material/Dialog";
841
+ import DialogActions4 from "@mui/material/DialogActions";
842
+ import DialogContent4 from "@mui/material/DialogContent";
843
+ import DialogContentText3 from "@mui/material/DialogContentText";
844
+ import DialogTitle4 from "@mui/material/DialogTitle";
845
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
846
+ function CmrDeletionDialog(props) {
847
+ const [open, setOpen] = React8.useState(true);
848
+ const [text, setText] = React8.useState("");
849
+ const handleClickOpen = () => {
850
+ setOpen(true);
851
+ };
852
+ const handleClose = () => {
853
+ setOpen(false);
854
+ };
855
+ const handleConfirm = () => {
856
+ if (text === props.name) {
857
+ props.deletionCallback();
858
+ setOpen(false);
859
+ }
860
+ };
861
+ const handleTextFieldChange = (e) => {
862
+ setText(e.target.value);
863
+ };
864
+ return /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsxs9(Dialog4, { open, onClose: handleClose, children: [
865
+ /* @__PURE__ */ jsx13(DialogTitle4, { children: "Confirmation" }),
866
+ /* @__PURE__ */ jsxs9(DialogContent4, { children: [
867
+ /* @__PURE__ */ jsx13(DialogContentText3, { children: "To delete the files, please type your full name below and confirm." }),
868
+ /* @__PURE__ */ jsx13(
869
+ TextField3,
870
+ {
871
+ autoFocus: true,
872
+ margin: "dense",
873
+ id: "name",
874
+ type: "email",
875
+ placeholder: props.name,
876
+ fullWidth: true,
877
+ inputProps: { style: { fontSize: "16pt" } },
878
+ variant: "standard",
879
+ onChange: handleTextFieldChange
880
+ }
881
+ )
882
+ ] }),
883
+ /* @__PURE__ */ jsxs9(DialogActions4, { children: [
884
+ /* @__PURE__ */ jsx13("button", { className: "btn btn-secondary", onClick: handleClose, children: "Cancel" }),
885
+ /* @__PURE__ */ jsx13("button", { className: "btn btn-danger", onClick: handleConfirm, children: "Confirm" })
886
+ ] })
887
+ ] }) });
888
+ }
889
+
890
+ // src/CmrComponents/dialogue/EditConfirmation.tsx
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";
839
957
  import Tabs from "@mui/material/Tabs";
840
958
  import Tab from "@mui/material/Tab";
841
959
  import Container from "@mui/material/Container";
842
960
  import Typography3 from "@mui/material/Typography";
843
961
  import Box3 from "@mui/material/Box";
844
962
  import { cloneElement as cloneElement2 } from "react";
845
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
963
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
846
964
  function CustomTabPanel(props) {
847
965
  const { children, value, index, ...other } = props;
848
- return /* @__PURE__ */ jsx13(
966
+ return /* @__PURE__ */ jsx15(
849
967
  "div",
850
968
  {
851
969
  role: "tabpanel",
@@ -853,7 +971,7 @@ function CustomTabPanel(props) {
853
971
  id: `simple-tabpanel-${index}`,
854
972
  "aria-labelledby": `simple-tab-${index}`,
855
973
  ...other,
856
- children: /* @__PURE__ */ jsx13(Box3, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ jsx13(Typography3, { children }) })
974
+ children: /* @__PURE__ */ jsx15(Box3, { sx: { p: 0 }, style: { display: value === index ? void 0 : "none" }, children: /* @__PURE__ */ jsx15(Typography3, { children }) })
857
975
  }
858
976
  );
859
977
  }
@@ -864,13 +982,13 @@ function a11yProps(index) {
864
982
  };
865
983
  }
866
984
  function CmrTabs(props) {
867
- const [value, setValue] = React8.useState(0);
985
+ const [value, setValue] = React10.useState(0);
868
986
  const handleChange = (event, newValue) => {
869
987
  setValue(newValue);
870
988
  if (props.onTabSelected)
871
989
  props.onTabSelected(newValue);
872
990
  };
873
- return /* @__PURE__ */ jsxs9(
991
+ return /* @__PURE__ */ jsxs11(
874
992
  Container,
875
993
  {
876
994
  maxWidth: "lg",
@@ -881,7 +999,7 @@ function CmrTabs(props) {
881
999
  mt: 4
882
1000
  },
883
1001
  children: [
884
- /* @__PURE__ */ jsx13(Box3, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ jsx13(
1002
+ /* @__PURE__ */ jsx15(Box3, { sx: { borderBottom: 1, borderColor: "divider", mb: 4 }, children: /* @__PURE__ */ jsx15(
885
1003
  Tabs,
886
1004
  {
887
1005
  value,
@@ -893,11 +1011,11 @@ function CmrTabs(props) {
893
1011
  backgroundColor: "#580F8B"
894
1012
  }
895
1013
  },
896
- children: props.tabList.map((tab, index) => /* @__PURE__ */ jsx13(Tab, { sx: { color: value == index ? "#580F8B" : void 0 }, style: { fontSize: "14px", textTransform: "uppercase", fontWeight: 400 }, label: tab.text, ...a11yProps(index) }))
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) }))
897
1015
  }
898
1016
  ) }),
899
1017
  props.tabList.map(
900
- (tab, index) => /* @__PURE__ */ jsx13(CustomTabPanel, { value, index, children: cloneElement2(tab.children, {
1018
+ (tab, index) => /* @__PURE__ */ jsx15(CustomTabPanel, { value, index, children: cloneElement2(tab.children, {
901
1019
  visible: value == index
902
1020
  }) })
903
1021
  )
@@ -909,17 +1027,17 @@ function CmrTabs(props) {
909
1027
  // src/CmrComponents/checkbox/Checkbox.tsx
910
1028
  import { Checkbox as Checkbox2 } from "@mui/material";
911
1029
  import { FormControlLabel as FormControlLabel3 } from "@mui/material";
912
- import { jsx as jsx14 } from "react/jsx-runtime";
1030
+ import { jsx as jsx16 } from "react/jsx-runtime";
913
1031
  var CmrCheckbox = (props) => {
914
1032
  const { defaultChecked, onChange, children, ...rest } = props;
915
- return /* @__PURE__ */ jsx14(
1033
+ return /* @__PURE__ */ jsx16(
916
1034
  FormControlLabel3,
917
1035
  {
918
1036
  disabled: props.disabled,
919
1037
  style: props.style,
920
1038
  className: props.className,
921
- control: /* @__PURE__ */ jsx14(Checkbox2, { style: props.style, checked: props.checked, defaultChecked, onChange }),
922
- label: /* @__PURE__ */ jsx14(Label_default, { children: props.children }),
1039
+ control: /* @__PURE__ */ jsx16(Checkbox2, { style: props.style, checked: props.checked, defaultChecked, onChange }),
1040
+ label: /* @__PURE__ */ jsx16(Label_default, { children: props.children }),
923
1041
  sx: props.sx,
924
1042
  labelPlacement: "end"
925
1043
  }
@@ -929,7 +1047,7 @@ var Checkbox_default = CmrCheckbox;
929
1047
 
930
1048
  // src/CmrTable/CmrTable.tsx
931
1049
  import { DataGrid } from "@mui/x-data-grid";
932
- import { jsx as jsx15 } from "react/jsx-runtime";
1050
+ import { jsx as jsx17 } from "react/jsx-runtime";
933
1051
  var CmrTable = (props) => {
934
1052
  const {
935
1053
  dataSource,
@@ -941,7 +1059,7 @@ var CmrTable = (props) => {
941
1059
  showCheckbox = true,
942
1060
  ...rest
943
1061
  } = props;
944
- return /* @__PURE__ */ jsx15("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx15(
1062
+ return /* @__PURE__ */ jsx17("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx17(
945
1063
  DataGrid,
946
1064
  {
947
1065
  rows: dataSource ? dataSource.map((row) => ({
@@ -971,6 +1089,8 @@ export {
971
1089
  Checkbox_default as CmrCheckbox,
972
1090
  Collapse_default as CmrCollapse,
973
1091
  CmrConfirmation,
1092
+ CmrDeletionDialog,
1093
+ CmrEditConfirmation,
974
1094
  CmrInput,
975
1095
  CmrNameDialog,
976
1096
  Panel_default as CmrPanel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",