material-react-table 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.
@@ -1356,7 +1356,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1356
1356
  const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
1357
1357
  return (React.createElement(React.Fragment, null,
1358
1358
  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 },
1359
- React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', mt: '-0.2rem', opacity: 0.5, transition: 'opacity 150ms', width: '2rem', '&:hover': {
1359
+ React.createElement(IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-0.2rem', opacity: 0.5, transition: 'opacity 150ms', width: '2rem', '&:hover': {
1360
1360
  opacity: 1,
1361
1361
  } }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
1362
1362
  ? iconButtonProps.sx(theme)
@@ -1531,7 +1531,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1531
1531
  ? '100px'
1532
1532
  : !filterChipLabel
1533
1533
  ? '120px'
1534
- : 'auto', width: '100%', '& .MuiSelect-icon': {
1534
+ : 'auto', width: 'calc(100% + 4px)', mx: '-2px', '& .MuiSelect-icon': {
1535
1535
  mr: '1.5rem',
1536
1536
  } }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
1537
1537
  ? textFieldProps.sx(theme)
@@ -1690,31 +1690,36 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
1690
1690
  const { column } = header;
1691
1691
  const { columnDef } = column;
1692
1692
  const { columnDefType } = columnDef;
1693
- return (React.createElement(Divider, { flexItem: true, orientation: "vertical", onDoubleClick: () => column.resetSize(), sx: (theme) => ({
1694
- borderRadius: '2px',
1695
- borderRightWidth: '2px',
1693
+ return (React.createElement(Box, { onDoubleClick: () => column.resetSize(), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), sx: (theme) => ({
1696
1694
  cursor: 'col-resize',
1697
- height: showColumnFilters && columnDefType === 'data' ? '4rem' : '2rem',
1698
1695
  mr: density === 'compact' ? '-0.5rem' : '-1rem',
1699
- opacity: 0.8,
1700
1696
  position: 'absolute',
1701
1697
  right: '1px',
1702
- touchAction: 'none',
1703
- transition: column.getIsResizing()
1704
- ? undefined
1705
- : 'all 150ms ease-in-out',
1706
- userSelect: 'none',
1707
- zIndex: 4,
1708
- '&:active': {
1698
+ px: '4px',
1699
+ '&:active > hr': {
1709
1700
  backgroundColor: theme.palette.info.main,
1710
1701
  opacity: 1,
1711
1702
  },
1712
- }), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
1703
+ }), style: {
1713
1704
  transform: column.getIsResizing()
1714
1705
  ? `translateX(${((_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0) /
1715
1706
  (columnResizeMode === 'onChange' ? 16 : 1)}px)`
1716
- : 'none',
1717
- } }));
1707
+ : undefined,
1708
+ } },
1709
+ React.createElement(Divider, { flexItem: true, orientation: "vertical", sx: {
1710
+ borderRadius: '2px',
1711
+ borderWidth: '2px',
1712
+ height: showColumnFilters && columnDefType === 'data'
1713
+ ? '3.5rem'
1714
+ : '1.75rem',
1715
+ opacity: 0.8,
1716
+ touchAction: 'none',
1717
+ transition: column.getIsResizing()
1718
+ ? undefined
1719
+ : 'all 150ms ease-in-out',
1720
+ userSelect: 'none',
1721
+ zIndex: 4,
1722
+ } })));
1718
1723
  };
1719
1724
 
1720
1725
  const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
@@ -2315,7 +2320,7 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2315
2320
  ? '0.5rem'
2316
2321
  : density === 'comfortable'
2317
2322
  ? '1rem'
2318
- : '1.5rem', verticalAlign: 'top' }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
2323
+ : '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
2319
2324
  React.createElement(React.Fragment, null, footer.isPlaceholder
2320
2325
  ? null
2321
2326
  : (_c = (_b = (columnDef.Footer instanceof Function