material-react-table 1.2.7 → 1.2.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.
package/README.md CHANGED
@@ -33,7 +33,7 @@ Join the [Discord](https://discord.gg/5wqyRx6fnm) server to join in on the devel
33
33
 
34
34
  View the [Docs Website](https://www.material-react-table.com/)
35
35
 
36
- See all [Props and Options](https://www.material-react-table.com/docs/api)
36
+ See all [Props, Options, and APIs](https://www.material-react-table.com/docs/api)
37
37
 
38
38
  ## Quick Examples
39
39
 
@@ -94,13 +94,15 @@ _**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#gui
94
94
 
95
95
  View the full [Installation Docs](https://www.material-react-table.com/docs/getting-started/install)
96
96
 
97
- 1. Install Peer Dependencies (Material UI V5)
97
+ 1. Ensure that you have React 17 or later installed (MUI V5 requires React 17 or 18)
98
+
99
+ 2. Install Peer Dependencies (Material UI V5)
98
100
 
99
101
  ```bash
100
102
  npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
101
103
  ```
102
104
 
103
- 2. Install material-react-table
105
+ 3. Install material-react-table
104
106
 
105
107
  ```bash
106
108
  npm install material-react-table
@@ -1,4 +1,5 @@
1
1
  export interface MRT_Icons {
2
+ ArrowDownwardIcon: any;
2
3
  ArrowRightIcon: any;
3
4
  CancelIcon: any;
4
5
  CheckBoxIcon: any;
package/dist/cjs/index.js CHANGED
@@ -6,6 +6,7 @@ var React = require('react');
6
6
  var reactTable = require('@tanstack/react-table');
7
7
  var styles = require('@mui/material/styles');
8
8
  var matchSorterUtils = require('@tanstack/match-sorter-utils');
9
+ var ArrowDownwardIcon = require('@mui/icons-material/ArrowDownward');
9
10
  var ArrowRightIcon = require('@mui/icons-material/ArrowRight');
10
11
  var CancelIcon = require('@mui/icons-material/Cancel');
11
12
  var CheckBoxIcon = require('@mui/icons-material/CheckBox');
@@ -82,6 +83,7 @@ var Stack = require('@mui/material/Stack');
82
83
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
83
84
 
84
85
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
86
+ var ArrowDownwardIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowDownwardIcon);
85
87
  var ArrowRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(ArrowRightIcon);
86
88
  var CancelIcon__default = /*#__PURE__*/_interopDefaultLegacy(CancelIcon);
87
89
  var CheckBoxIcon__default = /*#__PURE__*/_interopDefaultLegacy(CheckBoxIcon);
@@ -425,6 +427,7 @@ const MRT_FilterFns = Object.assign(Object.assign({}, reactTable.filterFns), { b
425
427
  startsWith });
426
428
 
427
429
  const MRT_Default_Icons = {
430
+ ArrowDownwardIcon: ArrowDownwardIcon__default["default"],
428
431
  ArrowRightIcon: ArrowRightIcon__default["default"],
429
432
  CancelIcon: CancelIcon__default["default"],
430
433
  CheckBoxIcon: CheckBoxIcon__default["default"],
@@ -1505,7 +1508,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1505
1508
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1506
1509
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
1507
1510
  React__default["default"].createElement(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions },
1508
- React__default["default"].createElement(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-0.2rem', opacity: 0.5, transform: 'scale(0.85)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1511
+ React__default["default"].createElement(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-6px -3px', opacity: 0.5, transform: 'scale(0.85)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
1509
1512
  opacity: 1,
1510
1513
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1511
1514
  ? iconButtonProps.sx(theme)
@@ -1789,11 +1792,12 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
1789
1792
  React__default["default"].createElement(IconButton__default["default"], { disableRipple: true, onClick: (event) => {
1790
1793
  event.stopPropagation();
1791
1794
  }, size: "small", sx: {
1795
+ height: '12px',
1792
1796
  m: 0,
1793
1797
  opacity: 0.8,
1794
1798
  p: '2px',
1795
1799
  transform: 'scale(0.66)',
1796
- width: '1.5ch',
1800
+ width: '12px',
1797
1801
  } },
1798
1802
  React__default["default"].createElement(FilterAltIcon, null))))));
1799
1803
  };
@@ -1869,7 +1873,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1869
1873
  };
1870
1874
 
1871
1875
  const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1872
- const { options: { localization }, } = table;
1876
+ const { options: { icons: { ArrowDownwardIcon }, localization, }, } = table;
1873
1877
  const { column } = header;
1874
1878
  const { columnDef } = column;
1875
1879
  const sortTooltip = column.getIsSorted()
@@ -1882,11 +1886,11 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
1882
1886
  ? column.getIsSorted()
1883
1887
  : undefined, sx: {
1884
1888
  flex: '0 0',
1885
- width: '2ch',
1889
+ width: '2.3ch',
1886
1890
  transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
1887
1891
  ? 'translateX(-0.5ch)'
1888
1892
  : undefined,
1889
- } })));
1893
+ }, IconComponent: ArrowDownwardIcon })));
1890
1894
  };
1891
1895
 
1892
1896
  const MRT_TableHeadCell = ({ header, table }) => {