cloudmr-ux 1.1.5 → 1.1.7

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.css CHANGED
@@ -1,42 +1,4 @@
1
1
  /* src/CmrComponents/CmrButton/CmrButton.css */
2
- .cmr-button {
3
- background-color: #580F8B !important;
4
- color: white !important;
5
- padding-top: 0.375rem !important;
6
- padding-bottom: 0.375rem !important;
7
- padding-right: 0.75rem !important;
8
- padding-left: 0.75rem !important;
9
- border: 2px solid #580F8B !important;
10
- border-radius: 4px !important;
11
- text-align: center !important;
12
- font-family: "Source Sans 3", sans-serif !important;
13
- font-size: 14.4px !important;
14
- line-height: 1.5 !important;
15
- font-weight: 400 !important;
16
- }
17
- .cmr-button:hover {
18
- background-color: #390063 !important;
19
- }
20
- .cmr-button.outlined {
21
- background-color: transparent !important;
22
- border: 2px solid #580F8B !important;
23
- color: #580F8B !important;
24
- }
25
- .cmr-button.outlined:hover {
26
- background-color: #580F8B !important;
27
- color: white !important;
28
- }
29
- .cmr-button.Mui-disabled {
30
- background-color: #ced4da !important;
31
- color: #999 !important;
32
- border: 2px solid #ced4da !important;
33
- cursor: not-allowed !important;
34
- }
35
- .cmr-button.Mui-disabled:hover {
36
- background-color: #ced4da !important;
37
- color: #999 !important;
38
- }
39
-
40
2
  /* src/CmrComponents/CmrCheckbox/CmrCheckbox.css */
41
3
  .cmr-label {
42
4
  font-size: 14.4px;
@@ -182,6 +144,8 @@
182
144
  }
183
145
  }
184
146
 
147
+ /* src/CmrComponents/input-number/InputNumber.css */
148
+
185
149
  /* src/CmrTable/CmrTable.css */
186
150
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within,
187
151
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-cell:focus-within {
package/dist/index.d.ts CHANGED
@@ -224,6 +224,20 @@ interface CmrLabelProps extends React.HTMLAttributes<HTMLDivElement> {
224
224
  }
225
225
  declare const CmrLabel: (props: CmrLabelProps) => react_jsx_runtime.JSX.Element;
226
226
 
227
+ interface CmrInputNumberProps {
228
+ defaultValue?: number;
229
+ disabled?: boolean;
230
+ keyboard?: boolean;
231
+ max?: number;
232
+ min?: number;
233
+ size?: SizeType;
234
+ value?: number;
235
+ onChange?: (value: number | null) => void;
236
+ children?: React.ReactNode;
237
+ style?: CSSProperties;
238
+ }
239
+ declare const CmrInputNumber: (props: CmrInputNumberProps) => react_jsx_runtime.JSX.Element;
240
+
227
241
  interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
228
242
  dataSource: any[];
229
243
  idAlias?: string;
@@ -234,4 +248,4 @@ interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
234
248
 
235
249
  declare const CmrTable: FC<CmrTableProps>;
236
250
 
237
- export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
251
+ export { CmrUpload as CMRUpload, CmrButton, CmrCheckbox, CmrCollapse, CmrConfirmation, CmrDeletionDialog, CmrEditConfirmation, CmrInput, CmrInputNumber, CmrLabel, CmrNameDialog, CmrPanel, CmrRadioGroup, CmrSelect, CmrTable, CmrTableProps, CmrTabs, LambdaFile };
package/dist/index.js CHANGED
@@ -31,13 +31,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  CMRUpload: () => Upload_default,
34
- CmrButton: () => CmrButton,
34
+ CmrButton: () => CmrButton_default,
35
35
  CmrCheckbox: () => Checkbox_default,
36
36
  CmrCollapse: () => Collapse_default,
37
37
  CmrConfirmation: () => CmrConfirmation,
38
38
  CmrDeletionDialog: () => CmrDeletionDialog,
39
39
  CmrEditConfirmation: () => CmrEditConfirmation,
40
40
  CmrInput: () => CmrInput,
41
+ CmrInputNumber: () => InputNumber_default,
41
42
  CmrLabel: () => Label_default,
42
43
  CmrNameDialog: () => CmrNameDialog,
43
44
  CmrPanel: () => Panel_default,
@@ -52,28 +53,10 @@ module.exports = __toCommonJS(src_exports);
52
53
  var import_material = require("@mui/material");
53
54
  var import_jsx_runtime = require("react/jsx-runtime");
54
55
  var CmrButton = (props) => {
55
- const { children, onClick, variant = "contained", disabled = false, ...rest } = props;
56
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
- import_material.Button,
58
- {
59
- onClick,
60
- ...rest,
61
- className: `cmr-button ${variant}`,
62
- style: { textTransform: "none" },
63
- variant,
64
- disabled,
65
- sx: {
66
- boxShadow: "none",
67
- // Removes the shadow on the button by default
68
- "&:hover": {
69
- boxShadow: "none"
70
- // Removes the shadow on hover as well
71
- }
72
- },
73
- children
74
- }
75
- );
56
+ const { children, onClick, ...rest } = props;
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { onClick, ...rest, style: { ...props.style, textTransform: "none" }, children });
76
58
  };
59
+ var CmrButton_default = CmrButton;
77
60
 
78
61
  // src/CmrComponents/CmrCheckbox/CmrCheckbox.tsx
79
62
  var import_material2 = require("@mui/material");
@@ -823,8 +806,8 @@ function CmrNameDialog(props) {
823
806
  }
824
807
  ) }),
825
808
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_DialogActions2.default, { children: [
826
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CmrButton, { variant: "outlined", onClick: handleClose, children: "Cancel" }),
827
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CmrButton, { variant: "contained", color: "primary", onClick: handleConfirm, children: "Confirm" })
809
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CmrButton_default, { variant: "outlined", onClick: handleClose, children: "Cancel" }),
810
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CmrButton_default, { variant: "contained", color: "primary", onClick: handleConfirm, children: "Confirm" })
828
811
  ] })
829
812
  ]
830
813
  }
@@ -871,8 +854,8 @@ function CmrConfirmation({
871
854
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_DialogContent3.default, { sx: { width }, children: [
872
855
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_DialogContentText2.default, { alignContent: "center", children: message }),
873
856
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_DialogActions3.default, { className: "mt-4", children: [
874
- cancellable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: cancelText }),
875
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
857
+ cancellable && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton_default, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: cancelText }),
858
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
876
859
  ] })
877
860
  ] })
878
861
  ] });
@@ -989,8 +972,8 @@ function CmrEditConfirmation({
989
972
  }
990
973
  ) }),
991
974
  /* @__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" })
975
+ cancellable && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton_default, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
976
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
994
977
  ] })
995
978
  ] })
996
979
  ] });
@@ -1089,9 +1072,18 @@ var CmrCheckbox = (props) => {
1089
1072
  };
1090
1073
  var Checkbox_default = CmrCheckbox;
1091
1074
 
1075
+ // src/CmrComponents/input-number/InputNumber.tsx
1076
+ var import_antd2 = require("antd");
1077
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1078
+ var CmrInputNumber = (props) => {
1079
+ const { defaultValue, style, max, min, value, onChange, children, ...rest } = props;
1080
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd2.InputNumber, { defaultValue, max, style, min, value, onChange, ...rest, children });
1081
+ };
1082
+ var InputNumber_default = CmrInputNumber;
1083
+
1092
1084
  // src/CmrTable/CmrTable.tsx
1093
1085
  var import_x_data_grid = require("@mui/x-data-grid");
1094
- var import_jsx_runtime17 = require("react/jsx-runtime");
1086
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1095
1087
  var CmrTable = (props) => {
1096
1088
  const {
1097
1089
  dataSource,
@@ -1103,7 +1095,7 @@ var CmrTable = (props) => {
1103
1095
  showCheckbox = true,
1104
1096
  ...rest
1105
1097
  } = props;
1106
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1098
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1107
1099
  import_x_data_grid.DataGrid,
1108
1100
  {
1109
1101
  rows: dataSource ? dataSource.map((row) => ({
@@ -1137,6 +1129,7 @@ var CmrTable2 = CmrTable_default;
1137
1129
  CmrDeletionDialog,
1138
1130
  CmrEditConfirmation,
1139
1131
  CmrInput,
1132
+ CmrInputNumber,
1140
1133
  CmrLabel,
1141
1134
  CmrNameDialog,
1142
1135
  CmrPanel,
package/dist/index.mjs CHANGED
@@ -2,28 +2,10 @@
2
2
  import { Button } from "@mui/material";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var CmrButton = (props) => {
5
- const { children, onClick, variant = "contained", disabled = false, ...rest } = props;
6
- return /* @__PURE__ */ jsx(
7
- Button,
8
- {
9
- onClick,
10
- ...rest,
11
- className: `cmr-button ${variant}`,
12
- style: { textTransform: "none" },
13
- variant,
14
- disabled,
15
- sx: {
16
- boxShadow: "none",
17
- // Removes the shadow on the button by default
18
- "&:hover": {
19
- boxShadow: "none"
20
- // Removes the shadow on hover as well
21
- }
22
- },
23
- children
24
- }
25
- );
5
+ const { children, onClick, ...rest } = props;
6
+ return /* @__PURE__ */ jsx(Button, { onClick, ...rest, style: { ...props.style, textTransform: "none" }, children });
26
7
  };
8
+ var CmrButton_default = CmrButton;
27
9
 
28
10
  // src/CmrComponents/CmrCheckbox/CmrCheckbox.tsx
29
11
  import { Checkbox } from "@mui/material";
@@ -779,8 +761,8 @@ function CmrNameDialog(props) {
779
761
  }
780
762
  ) }),
781
763
  /* @__PURE__ */ jsxs7(DialogActions2, { children: [
782
- /* @__PURE__ */ jsx11(CmrButton, { variant: "outlined", onClick: handleClose, children: "Cancel" }),
783
- /* @__PURE__ */ jsx11(CmrButton, { variant: "contained", color: "primary", onClick: handleConfirm, children: "Confirm" })
764
+ /* @__PURE__ */ jsx11(CmrButton_default, { variant: "outlined", onClick: handleClose, children: "Cancel" }),
765
+ /* @__PURE__ */ jsx11(CmrButton_default, { variant: "contained", color: "primary", onClick: handleConfirm, children: "Confirm" })
784
766
  ] })
785
767
  ]
786
768
  }
@@ -827,8 +809,8 @@ function CmrConfirmation({
827
809
  /* @__PURE__ */ jsxs8(DialogContent3, { sx: { width }, children: [
828
810
  /* @__PURE__ */ jsx12(DialogContentText2, { alignContent: "center", children: message }),
829
811
  /* @__PURE__ */ jsxs8(DialogActions3, { className: "mt-4", children: [
830
- cancellable && /* @__PURE__ */ jsx12(CmrButton, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: cancelText }),
831
- /* @__PURE__ */ jsx12(CmrButton, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
812
+ cancellable && /* @__PURE__ */ jsx12(CmrButton_default, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: cancelText }),
813
+ /* @__PURE__ */ jsx12(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: confirmText })
832
814
  ] })
833
815
  ] })
834
816
  ] });
@@ -945,8 +927,8 @@ function CmrEditConfirmation({
945
927
  }
946
928
  ) }),
947
929
  /* @__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" })
930
+ cancellable && /* @__PURE__ */ jsx14(CmrButton_default, { variant: "outlined", color: "inherit", sx: { color: "#333" }, onClick: handleCancel, children: "Cancel" }),
931
+ /* @__PURE__ */ jsx14(CmrButton_default, { variant: "contained", color, onClick: handleConfirm, children: "Confirm" })
950
932
  ] })
951
933
  ] })
952
934
  ] });
@@ -1045,9 +1027,18 @@ var CmrCheckbox = (props) => {
1045
1027
  };
1046
1028
  var Checkbox_default = CmrCheckbox;
1047
1029
 
1030
+ // src/CmrComponents/input-number/InputNumber.tsx
1031
+ import { InputNumber } from "antd";
1032
+ import { jsx as jsx17 } from "react/jsx-runtime";
1033
+ var CmrInputNumber = (props) => {
1034
+ const { defaultValue, style, max, min, value, onChange, children, ...rest } = props;
1035
+ return /* @__PURE__ */ jsx17(InputNumber, { defaultValue, max, style, min, value, onChange, ...rest, children });
1036
+ };
1037
+ var InputNumber_default = CmrInputNumber;
1038
+
1048
1039
  // src/CmrTable/CmrTable.tsx
1049
1040
  import { DataGrid } from "@mui/x-data-grid";
1050
- import { jsx as jsx17 } from "react/jsx-runtime";
1041
+ import { jsx as jsx18 } from "react/jsx-runtime";
1051
1042
  var CmrTable = (props) => {
1052
1043
  const {
1053
1044
  dataSource,
@@ -1059,7 +1050,7 @@ var CmrTable = (props) => {
1059
1050
  showCheckbox = true,
1060
1051
  ...rest
1061
1052
  } = props;
1062
- return /* @__PURE__ */ jsx17("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx17(
1053
+ return /* @__PURE__ */ jsx18("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx18(
1063
1054
  DataGrid,
1064
1055
  {
1065
1056
  rows: dataSource ? dataSource.map((row) => ({
@@ -1085,13 +1076,14 @@ var CmrTable_default = CmrTable;
1085
1076
  var CmrTable2 = CmrTable_default;
1086
1077
  export {
1087
1078
  Upload_default as CMRUpload,
1088
- CmrButton,
1079
+ CmrButton_default as CmrButton,
1089
1080
  Checkbox_default as CmrCheckbox,
1090
1081
  Collapse_default as CmrCollapse,
1091
1082
  CmrConfirmation,
1092
1083
  CmrDeletionDialog,
1093
1084
  CmrEditConfirmation,
1094
1085
  CmrInput,
1086
+ InputNumber_default as CmrInputNumber,
1095
1087
  Label_default as CmrLabel,
1096
1088
  CmrNameDialog,
1097
1089
  Panel_default as CmrPanel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",