cloudmr-ux 1.1.0 → 1.1.1

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
@@ -172,6 +172,16 @@
172
172
  margin-left: 4px;
173
173
  }
174
174
 
175
+ /* src/CmrComponents/checkbox/Checkbox.css */
176
+ .cmr-checkbox {
177
+ margin-bottom: 4px;
178
+ &__text {
179
+ font-size: 16px;
180
+ line-height: 15px;
181
+ text-align: justify;
182
+ }
183
+ }
184
+
175
185
  /* src/CmrTable/CmrTable.css */
176
186
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-columnHeader:focus-within,
177
187
  .css-1lymaxv-MuiDataGrid-root .MuiDataGrid-cell:focus-within {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ButtonProps, SxProps, Theme } from '@mui/material';
3
- import React, { ChangeEvent, ReactNode, CSSProperties, FC } from 'react';
3
+ import React, { ReactNode, ChangeEvent, CSSProperties, FC } from 'react';
4
4
  import { SizeType } from 'antd/lib/config-provider/SizeContext';
5
5
  import { CollapsibleType } from 'antd/es/collapse/CollapsePanel';
6
6
  import { ExpandIconPosition } from 'antd/es/collapse/Collapse';
@@ -9,18 +9,6 @@ import { DataGridProps } from '@mui/x-data-grid';
9
9
 
10
10
  declare const CmrButton: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
11
11
 
12
- interface CmrCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
13
- autoFocus?: boolean;
14
- checked?: boolean;
15
- defaultChecked?: boolean;
16
- disabled?: boolean;
17
- indeterminate?: boolean;
18
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
19
- children?: any;
20
- style?: any;
21
- }
22
- declare const CmrCheckbox: (props: CmrCheckboxProps) => react_jsx_runtime.JSX.Element;
23
-
24
12
  interface CmrInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
25
13
  defaultValue?: string;
26
14
  id?: string;
@@ -198,6 +186,19 @@ interface CmrTabsProps {
198
186
  }
199
187
  declare function CmrTabs(props: CmrTabsProps): react_jsx_runtime.JSX.Element;
200
188
 
189
+ interface CmrCheckboxProps extends React.HTMLAttributes<HTMLDivElement> {
190
+ autoFocus?: boolean;
191
+ checked?: boolean;
192
+ defaultChecked?: boolean;
193
+ disabled?: boolean;
194
+ indeterminate?: boolean;
195
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
196
+ children?: any;
197
+ style?: any;
198
+ sx?: any;
199
+ }
200
+ declare const CmrCheckbox: (props: CmrCheckboxProps) => react_jsx_runtime.JSX.Element;
201
+
201
202
  interface CmrTableProps extends Omit<DataGridProps, 'rows'> {
202
203
  dataSource: any[];
203
204
  idAlias?: string;
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var src_exports = {};
32
32
  __export(src_exports, {
33
33
  CMRUpload: () => Upload_default,
34
34
  CmrButton: () => CmrButton,
35
- CmrCheckbox: () => CmrCheckbox,
35
+ CmrCheckbox: () => Checkbox_default,
36
36
  CmrCollapse: () => Collapse_default,
37
37
  CmrConfirmation: () => CmrConfirmation,
38
38
  CmrInput: () => CmrInput,
@@ -76,28 +76,6 @@ var CmrButton = (props) => {
76
76
  var import_material2 = require("@mui/material");
77
77
  var import_material3 = require("@mui/material");
78
78
  var import_jsx_runtime2 = require("react/jsx-runtime");
79
- var CmrCheckbox = (props) => {
80
- const { defaultChecked, onChange, children, ...rest } = props;
81
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
82
- import_material3.FormControlLabel,
83
- {
84
- disabled: props.disabled,
85
- style: props.style,
86
- className: props.className,
87
- control: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
88
- import_material2.Checkbox,
89
- {
90
- style: props.style,
91
- checked: props.checked,
92
- defaultChecked,
93
- onChange
94
- }
95
- ),
96
- label: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "cmr-label", style: { paddingRight: 0, color: "var(--bs-card-color)" }, children: props.children }),
97
- labelPlacement: "end"
98
- }
99
- );
100
- };
101
79
 
102
80
  // src/CmrComponents/CmrInput/CmrInput.tsx
103
81
  var import_antd = require("antd");
@@ -969,9 +947,30 @@ function CmrTabs(props) {
969
947
  );
970
948
  }
971
949
 
950
+ // src/CmrComponents/checkbox/Checkbox.tsx
951
+ var import_material9 = require("@mui/material");
952
+ var import_material10 = require("@mui/material");
953
+ var import_jsx_runtime14 = require("react/jsx-runtime");
954
+ var CmrCheckbox = (props) => {
955
+ const { defaultChecked, onChange, children, ...rest } = props;
956
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
957
+ import_material10.FormControlLabel,
958
+ {
959
+ disabled: props.disabled,
960
+ style: props.style,
961
+ 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 }),
964
+ sx: props.sx,
965
+ labelPlacement: "end"
966
+ }
967
+ );
968
+ };
969
+ var Checkbox_default = CmrCheckbox;
970
+
972
971
  // src/CmrTable/CmrTable.tsx
973
972
  var import_x_data_grid = require("@mui/x-data-grid");
974
- var import_jsx_runtime14 = require("react/jsx-runtime");
973
+ var import_jsx_runtime15 = require("react/jsx-runtime");
975
974
  var CmrTable = (props) => {
976
975
  const {
977
976
  dataSource,
@@ -983,7 +982,7 @@ var CmrTable = (props) => {
983
982
  showCheckbox = true,
984
983
  ...rest
985
984
  } = props;
986
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
985
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
987
986
  import_x_data_grid.DataGrid,
988
987
  {
989
988
  rows: dataSource ? dataSource.map((row) => ({
package/dist/index.mjs CHANGED
@@ -29,28 +29,6 @@ var CmrButton = (props) => {
29
29
  import { Checkbox } from "@mui/material";
30
30
  import { FormControlLabel } from "@mui/material";
31
31
  import { jsx as jsx2 } from "react/jsx-runtime";
32
- var CmrCheckbox = (props) => {
33
- const { defaultChecked, onChange, children, ...rest } = props;
34
- return /* @__PURE__ */ jsx2(
35
- FormControlLabel,
36
- {
37
- disabled: props.disabled,
38
- style: props.style,
39
- className: props.className,
40
- control: /* @__PURE__ */ jsx2(
41
- Checkbox,
42
- {
43
- style: props.style,
44
- checked: props.checked,
45
- defaultChecked,
46
- onChange
47
- }
48
- ),
49
- label: /* @__PURE__ */ jsx2("span", { className: "cmr-label", style: { paddingRight: 0, color: "var(--bs-card-color)" }, children: props.children }),
50
- labelPlacement: "end"
51
- }
52
- );
53
- };
54
32
 
55
33
  // src/CmrComponents/CmrInput/CmrInput.tsx
56
34
  import { Input } from "antd";
@@ -928,9 +906,30 @@ function CmrTabs(props) {
928
906
  );
929
907
  }
930
908
 
909
+ // src/CmrComponents/checkbox/Checkbox.tsx
910
+ import { Checkbox as Checkbox2 } from "@mui/material";
911
+ import { FormControlLabel as FormControlLabel3 } from "@mui/material";
912
+ import { jsx as jsx14 } from "react/jsx-runtime";
913
+ var CmrCheckbox = (props) => {
914
+ const { defaultChecked, onChange, children, ...rest } = props;
915
+ return /* @__PURE__ */ jsx14(
916
+ FormControlLabel3,
917
+ {
918
+ disabled: props.disabled,
919
+ style: props.style,
920
+ 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 }),
923
+ sx: props.sx,
924
+ labelPlacement: "end"
925
+ }
926
+ );
927
+ };
928
+ var Checkbox_default = CmrCheckbox;
929
+
931
930
  // src/CmrTable/CmrTable.tsx
932
931
  import { DataGrid } from "@mui/x-data-grid";
933
- import { jsx as jsx14 } from "react/jsx-runtime";
932
+ import { jsx as jsx15 } from "react/jsx-runtime";
934
933
  var CmrTable = (props) => {
935
934
  const {
936
935
  dataSource,
@@ -942,7 +941,7 @@ var CmrTable = (props) => {
942
941
  showCheckbox = true,
943
942
  ...rest
944
943
  } = props;
945
- return /* @__PURE__ */ jsx14("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx14(
944
+ return /* @__PURE__ */ jsx15("div", { style: style ?? { height: "400px", width: "100%" }, className: className ?? "", children: /* @__PURE__ */ jsx15(
946
945
  DataGrid,
947
946
  {
948
947
  rows: dataSource ? dataSource.map((row) => ({
@@ -969,7 +968,7 @@ var CmrTable2 = CmrTable_default;
969
968
  export {
970
969
  Upload_default as CMRUpload,
971
970
  CmrButton,
972
- CmrCheckbox,
971
+ Checkbox_default as CmrCheckbox,
973
972
  Collapse_default as CmrCollapse,
974
973
  CmrConfirmation,
975
974
  CmrInput,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudmr-ux",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "author": "erosmontin@gmail.com",
5
5
  "license": "MIT",
6
6
  "repository": "erosmontin/cloudmr-ux",