material-react-table 3.0.0-rc.0 → 3.0.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.
package/dist/index.js CHANGED
@@ -54,7 +54,6 @@ var ViewColumnIcon = require('@mui/icons-material/ViewColumn');
54
54
  var VisibilityOffIcon = require('@mui/icons-material/VisibilityOff');
55
55
  var reactVirtual = require('@tanstack/react-virtual');
56
56
  var Paper = require('@mui/material/Paper');
57
- var FocusTrap = require('@mui/material/Unstable_TrapFocus/FocusTrap');
58
57
  var TableContainer = require('@mui/material/TableContainer');
59
58
  var Table = require('@mui/material/Table');
60
59
  var TableBody = require('@mui/material/TableBody');
@@ -145,7 +144,6 @@ var SyncAltIcon__default = /*#__PURE__*/_interopDefaultLegacy(SyncAltIcon);
145
144
  var ViewColumnIcon__default = /*#__PURE__*/_interopDefaultLegacy(ViewColumnIcon);
146
145
  var VisibilityOffIcon__default = /*#__PURE__*/_interopDefaultLegacy(VisibilityOffIcon);
147
146
  var Paper__default = /*#__PURE__*/_interopDefaultLegacy(Paper);
148
- var FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
149
147
  var TableContainer__default = /*#__PURE__*/_interopDefaultLegacy(TableContainer);
150
148
  var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
151
149
  var TableBody__default = /*#__PURE__*/_interopDefaultLegacy(TableBody);
@@ -4004,7 +4002,7 @@ const MRT_TablePagination = (_a) => {
4004
4002
  const theme = styles.useTheme();
4005
4003
  const isMobile = useMediaQuery__default["default"]('(max-width: 720px)');
4006
4004
  const { getState, options: { enableToolbarInternalActions, icons: { ChevronLeftIcon, ChevronRightIcon, FirstPageIcon, LastPageIcon }, id, localization, muiPaginationProps, paginationDisplayMode, }, } = table;
4007
- const { pagination: { pageIndex = 0, pageSize = 10 }, showGlobalFilter, } = getState();
4005
+ const { pagination: { pageIndex = 0, pageSize = 10 }, } = getState();
4008
4006
  const paginationProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiPaginationProps, {
4009
4007
  table,
4010
4008
  })), rest);
@@ -4027,9 +4025,7 @@ const MRT_TablePagination = (_a) => {
4027
4025
  gap: '8px',
4028
4026
  justifyContent: { md: 'space-between', sm: 'center' },
4029
4027
  justifySelf: 'flex-end',
4030
- mt: position === 'top' &&
4031
- enableToolbarInternalActions &&
4032
- !showGlobalFilter
4028
+ mt: position === 'top' && enableToolbarInternalActions
4033
4029
  ? '3rem'
4034
4030
  : undefined,
4035
4031
  position: 'relative',
@@ -4407,30 +4403,30 @@ const MRT_TablePaper = (_a) => {
4407
4403
  const { isFullScreen } = getState();
4408
4404
  const paperProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTablePaperProps, { table })), rest);
4409
4405
  const theme = styles.useTheme();
4410
- return (jsxRuntime.jsx(FocusTrap__default["default"], { open: isFullScreen, children: jsxRuntime.jsxs(Paper__default["default"], Object.assign({ elevation: 2, onKeyDown: (e) => e.key === 'Escape' && table.setIsFullScreen(false) }, paperProps, { ref: (ref) => {
4411
- tablePaperRef.current = ref;
4412
- if (paperProps === null || paperProps === void 0 ? void 0 : paperProps.ref) {
4413
- //@ts-ignore
4414
- paperProps.ref.current = ref;
4415
- }
4416
- }, style: Object.assign(Object.assign({}, (isFullScreen
4417
- ? {
4418
- bottom: 0,
4419
- height: '100dvh',
4420
- left: 0,
4421
- margin: 0,
4422
- maxHeight: '100dvh',
4423
- maxWidth: '100dvw',
4424
- padding: 0,
4425
- position: 'fixed',
4426
- right: 0,
4427
- top: 0,
4428
- width: '100dvw',
4429
- zIndex: theme.zIndex.modal,
4430
- }
4431
- : {})), paperProps === null || paperProps === void 0 ? void 0 : paperProps.style), sx: (theme) => (Object.assign({ backgroundColor: baseBackgroundColor, backgroundImage: 'unset', overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx, theme))), children: [enableTopToolbar &&
4432
- ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
4433
- ((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(MRT_BottomToolbar, { table: table })))] })) }));
4406
+ return (jsxRuntime.jsxs(Paper__default["default"], Object.assign({ elevation: 2, onKeyDown: (e) => e.key === 'Escape' && table.setIsFullScreen(false) }, paperProps, { ref: (ref) => {
4407
+ tablePaperRef.current = ref;
4408
+ if (paperProps === null || paperProps === void 0 ? void 0 : paperProps.ref) {
4409
+ //@ts-ignore
4410
+ paperProps.ref.current = ref;
4411
+ }
4412
+ }, style: Object.assign(Object.assign({}, (isFullScreen
4413
+ ? {
4414
+ bottom: 0,
4415
+ height: '100dvh',
4416
+ left: 0,
4417
+ margin: 0,
4418
+ maxHeight: '100dvh',
4419
+ maxWidth: '100dvw',
4420
+ padding: 0,
4421
+ position: 'fixed',
4422
+ right: 0,
4423
+ top: 0,
4424
+ width: '100dvw',
4425
+ zIndex: theme.zIndex.modal,
4426
+ }
4427
+ : {})), paperProps === null || paperProps === void 0 ? void 0 : paperProps.style), sx: (theme) => (Object.assign({ backgroundColor: baseBackgroundColor, backgroundImage: 'unset', overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx, theme))), children: [enableTopToolbar &&
4428
+ ((_b = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _b !== void 0 ? _b : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&
4429
+ ((_c = parseFromValuesOrFunc(renderBottomToolbar, { table })) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(MRT_BottomToolbar, { table: table })))] })));
4434
4430
  };
4435
4431
 
4436
4432
  const isTableInstanceProp = (props) => props.table !== undefined;