@bento-core/table 1.0.1-icdc.10 → 1.0.1-icdc.12
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.
|
@@ -7,37 +7,23 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const useStyles = (0, _core.makeStyles)({
|
|
11
|
-
label: {
|
|
12
|
-
opacity: '0'
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
10
|
const CheckboxView = _ref => {
|
|
16
11
|
let {
|
|
17
12
|
includeSelectedIds,
|
|
18
13
|
toggleSelectAll,
|
|
19
14
|
Ids
|
|
20
15
|
} = _ref;
|
|
21
|
-
const {
|
|
22
|
-
label
|
|
23
|
-
} = useStyles();
|
|
24
16
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
25
17
|
padding: "checkbox",
|
|
26
18
|
component: "td"
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement(_core.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
20
|
+
color: "primary",
|
|
21
|
+
indeterminate: includeSelectedIds,
|
|
22
|
+
checked: includeSelectedIds,
|
|
23
|
+
inputProps: {
|
|
24
|
+
'aria-label': 'checkbox'
|
|
31
25
|
},
|
|
32
|
-
|
|
33
|
-
color: "primary",
|
|
34
|
-
indeterminate: includeSelectedIds,
|
|
35
|
-
checked: includeSelectedIds,
|
|
36
|
-
inputProps: {
|
|
37
|
-
'aria-label': 'checkbox'
|
|
38
|
-
},
|
|
39
|
-
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
|
|
40
|
-
})
|
|
26
|
+
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
|
|
41
27
|
}));
|
|
42
28
|
};
|
|
43
29
|
var _default = CheckboxView;
|
package/package.json
CHANGED
|
@@ -2,44 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
TableCell,
|
|
4
4
|
Checkbox,
|
|
5
|
-
FormControlLabel,
|
|
6
|
-
makeStyles,
|
|
7
5
|
} from '@material-ui/core';
|
|
8
6
|
|
|
9
|
-
const useStyles = makeStyles({
|
|
10
|
-
label: {
|
|
11
|
-
opacity: '0',
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
7
|
const CheckboxView = ({
|
|
16
8
|
includeSelectedIds,
|
|
17
9
|
toggleSelectAll,
|
|
18
10
|
Ids,
|
|
19
|
-
}) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
indeterminate={includeSelectedIds}
|
|
33
|
-
checked={includeSelectedIds}
|
|
34
|
-
inputProps={{
|
|
35
|
-
'aria-label': 'checkbox',
|
|
36
|
-
}}
|
|
37
|
-
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
38
|
-
/>
|
|
39
|
-
)}
|
|
40
|
-
/>
|
|
41
|
-
</TableCell>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
11
|
+
}) => (
|
|
12
|
+
<TableCell padding="checkbox" component="td">
|
|
13
|
+
<Checkbox
|
|
14
|
+
color="primary"
|
|
15
|
+
indeterminate={includeSelectedIds}
|
|
16
|
+
checked={includeSelectedIds}
|
|
17
|
+
inputProps={{
|
|
18
|
+
'aria-label': 'checkbox',
|
|
19
|
+
}}
|
|
20
|
+
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
21
|
+
/>
|
|
22
|
+
</TableCell>
|
|
23
|
+
);
|
|
44
24
|
|
|
45
25
|
export default CheckboxView;
|