@bento-core/table 1.0.1-icdc.7 → 1.0.1-icdc.9

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.
@@ -17,7 +17,10 @@ const CheckboxView = _ref => {
17
17
  }, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
18
18
  disableRipple: true,
19
19
  onClick: event => onRowSelectChange(event, row),
20
- checked: row.isChecked
20
+ checked: row.isChecked,
21
+ inputProps: {
22
+ 'aria-label': 'checkbox'
23
+ }
21
24
  }));
22
25
  };
23
26
  var _default = CheckboxView;
@@ -19,6 +19,7 @@ const DeleteCellView = _ref => {
19
19
  }, /*#__PURE__*/_react.default.createElement(_core.IconButton, {
20
20
  disableRipple: true,
21
21
  className: "del_row_btn",
22
+ "aria-label": "delete",
22
23
  onClick: () => column.cellEventHandler(row)
23
24
  }, /*#__PURE__*/_react.default.createElement(_icons.DeleteOutline, {
24
25
  className: "del_row_btn_icon",
@@ -7,19 +7,35 @@ 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
+ });
10
15
  const CheckboxView = _ref => {
11
16
  let {
12
17
  includeSelectedIds,
13
18
  toggleSelectAll,
14
19
  Ids
15
20
  } = _ref;
21
+ const {
22
+ label
23
+ } = useStyles();
16
24
  return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
17
- padding: "checkbox"
25
+ padding: "checkbox",
26
+ component: "td"
18
27
  }, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
28
+ label: "checkbox",
29
+ classes: {
30
+ label
31
+ },
19
32
  control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
20
33
  color: "primary",
21
34
  indeterminate: includeSelectedIds,
22
35
  checked: includeSelectedIds,
36
+ inputProps: {
37
+ 'aria-label': 'checkbox'
38
+ },
23
39
  onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
24
40
  })
25
41
  }));
@@ -55,6 +55,12 @@ const CustomPagination = _ref => {
55
55
  }, /*#__PURE__*/_react.default.createElement(_core.TablePagination, {
56
56
  rowsPerPageOptions: rowsPerPageOptions,
57
57
  component: "div",
58
+ SelectProps: {
59
+ inputProps: {
60
+ title: 'checkbox',
61
+ 'aria-label': 'checkbox'
62
+ }
63
+ },
58
64
  count: count,
59
65
  rowsPerPage: rowsPerPage,
60
66
  page: page,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-icdc.7",
3
+ "version": "1.0.1-icdc.9",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,6 +13,9 @@ const CheckboxView = ({
13
13
  disableRipple
14
14
  onClick={(event) => onRowSelectChange(event, row)}
15
15
  checked={row.isChecked}
16
+ inputProps={{
17
+ 'aria-label': 'checkbox',
18
+ }}
16
19
  />
17
20
  </TableCell>
18
21
  );
@@ -18,6 +18,7 @@ const DeleteCellView = ({
18
18
  <IconButton
19
19
  disableRipple
20
20
  className="del_row_btn"
21
+ aria-label="delete"
21
22
  onClick={() => column.cellEventHandler(row)}
22
23
  >
23
24
  <DeleteOutlineIcon
@@ -3,25 +3,43 @@ import {
3
3
  TableCell,
4
4
  Checkbox,
5
5
  FormControlLabel,
6
+ makeStyles,
6
7
  } from '@material-ui/core';
7
8
 
9
+ const useStyles = makeStyles({
10
+ label: {
11
+ opacity: '0',
12
+ },
13
+ });
14
+
8
15
  const CheckboxView = ({
9
16
  includeSelectedIds,
10
17
  toggleSelectAll,
11
18
  Ids,
12
- }) => (
13
- <TableCell padding="checkbox">
14
- <FormControlLabel
15
- control={(
16
- <Checkbox
17
- color="primary"
18
- indeterminate={includeSelectedIds}
19
- checked={includeSelectedIds}
20
- onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
21
- />
22
- )}
23
- />
24
- </TableCell>
25
- );
19
+ }) => {
20
+ const { label } = useStyles();
21
+
22
+ return (
23
+ <TableCell padding="checkbox" component="td">
24
+ <FormControlLabel
25
+ label="checkbox"
26
+ classes={{
27
+ label,
28
+ }}
29
+ control={(
30
+ <Checkbox
31
+ color="primary"
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
+ };
26
44
 
27
45
  export default CheckboxView;
@@ -45,6 +45,12 @@ const CustomPagination = ({
45
45
  <TablePagination
46
46
  rowsPerPageOptions={rowsPerPageOptions}
47
47
  component="div"
48
+ SelectProps={{
49
+ inputProps: {
50
+ title: 'checkbox',
51
+ 'aria-label': 'checkbox',
52
+ },
53
+ }}
48
54
  count={count}
49
55
  rowsPerPage={rowsPerPage}
50
56
  page={page}