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 +5 -3
- package/dist/cjs/icons.d.ts +1 -0
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/icons.d.ts +1 -0
- package/dist/esm/material-react-table.esm.js +8 -5
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +6 -3
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +2 -1
- package/src/head/MRT_TableHeadCellSortLabel.tsx +6 -2
- package/src/icons.ts +3 -0
package/dist/esm/icons.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useMemo, useRef, useState, useCallback, useEffect, Fragment, mem
|
|
|
2
2
|
import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedRowModel, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
|
|
3
3
|
import { alpha, lighten, useTheme, darken } from '@mui/material/styles';
|
|
4
4
|
import { rankItem, rankings, compareItems } from '@tanstack/match-sorter-utils';
|
|
5
|
+
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
|
5
6
|
import ArrowRightIcon from '@mui/icons-material/ArrowRight';
|
|
6
7
|
import CancelIcon from '@mui/icons-material/Cancel';
|
|
7
8
|
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
@@ -346,6 +347,7 @@ const MRT_FilterFns = Object.assign(Object.assign({}, filterFns), { between,
|
|
|
346
347
|
startsWith });
|
|
347
348
|
|
|
348
349
|
const MRT_Default_Icons = {
|
|
350
|
+
ArrowDownwardIcon,
|
|
349
351
|
ArrowRightIcon,
|
|
350
352
|
CancelIcon,
|
|
351
353
|
CheckBoxIcon,
|
|
@@ -1426,7 +1428,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
|
1426
1428
|
const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
|
|
1427
1429
|
return (React.createElement(React.Fragment, null,
|
|
1428
1430
|
React.createElement(Tooltip, { 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 },
|
|
1429
|
-
React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-
|
|
1431
|
+
React.createElement(IconButton, 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': {
|
|
1430
1432
|
opacity: 1,
|
|
1431
1433
|
} }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
1432
1434
|
? iconButtonProps.sx(theme)
|
|
@@ -1710,11 +1712,12 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
|
|
|
1710
1712
|
React.createElement(IconButton, { disableRipple: true, onClick: (event) => {
|
|
1711
1713
|
event.stopPropagation();
|
|
1712
1714
|
}, size: "small", sx: {
|
|
1715
|
+
height: '12px',
|
|
1713
1716
|
m: 0,
|
|
1714
1717
|
opacity: 0.8,
|
|
1715
1718
|
p: '2px',
|
|
1716
1719
|
transform: 'scale(0.66)',
|
|
1717
|
-
width: '
|
|
1720
|
+
width: '12px',
|
|
1718
1721
|
} },
|
|
1719
1722
|
React.createElement(FilterAltIcon, null))))));
|
|
1720
1723
|
};
|
|
@@ -1790,7 +1793,7 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
|
|
|
1790
1793
|
};
|
|
1791
1794
|
|
|
1792
1795
|
const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
1793
|
-
const { options: { localization }, } = table;
|
|
1796
|
+
const { options: { icons: { ArrowDownwardIcon }, localization, }, } = table;
|
|
1794
1797
|
const { column } = header;
|
|
1795
1798
|
const { columnDef } = column;
|
|
1796
1799
|
const sortTooltip = column.getIsSorted()
|
|
@@ -1803,11 +1806,11 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
|
1803
1806
|
? column.getIsSorted()
|
|
1804
1807
|
: undefined, sx: {
|
|
1805
1808
|
flex: '0 0',
|
|
1806
|
-
width: '
|
|
1809
|
+
width: '2.3ch',
|
|
1807
1810
|
transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
|
|
1808
1811
|
? 'translateX(-0.5ch)'
|
|
1809
1812
|
: undefined,
|
|
1810
|
-
} })));
|
|
1813
|
+
}, IconComponent: ArrowDownwardIcon })));
|
|
1811
1814
|
};
|
|
1812
1815
|
|
|
1813
1816
|
const MRT_TableHeadCell = ({ header, table }) => {
|