@mui/material 5.14.17 → 5.14.19

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.
Files changed (113) hide show
  1. package/Autocomplete/Autocomplete.d.ts +3 -0
  2. package/Autocomplete/Autocomplete.js +24 -5
  3. package/BottomNavigation/BottomNavigation.js +0 -0
  4. package/Box/Box.js +2 -1
  5. package/Box/boxClasses.d.ts +7 -0
  6. package/Box/boxClasses.js +3 -0
  7. package/Box/index.d.ts +3 -0
  8. package/Box/index.js +3 -1
  9. package/CHANGELOG.md +154 -6
  10. package/Chip/Chip.js +2 -2
  11. package/FilledInput/FilledInput.js +9 -6
  12. package/FormControlLabel/FormControlLabel.js +1 -2
  13. package/InputAdornment/InputAdornment.js +2 -2
  14. package/InputLabel/InputLabel.js +5 -1
  15. package/Modal/Modal.d.ts +3 -0
  16. package/Modal/Modal.js +3 -0
  17. package/Popper/Popper.js +3 -0
  18. package/Rating/Rating.js +4 -6
  19. package/Select/Select.d.ts +1 -2
  20. package/Select/SelectInput.js +2 -1
  21. package/StepButton/StepButton.js +1 -1
  22. package/TablePagination/TablePagination.d.ts +23 -0
  23. package/TablePagination/TablePagination.js +47 -12
  24. package/TablePagination/TablePaginationActions.d.ts +19 -0
  25. package/TablePagination/TablePaginationActions.js +35 -15
  26. package/index.js +1 -1
  27. package/legacy/Accordion/Accordion.js +4 -5
  28. package/legacy/AccordionSummary/AccordionSummary.js +5 -6
  29. package/legacy/Autocomplete/Autocomplete.js +55 -41
  30. package/legacy/AvatarGroup/AvatarGroup.js +2 -3
  31. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  32. package/legacy/Box/Box.js +2 -1
  33. package/legacy/Box/boxClasses.js +3 -0
  34. package/legacy/Box/index.js +3 -1
  35. package/legacy/Button/Button.js +10 -11
  36. package/legacy/ButtonBase/ButtonBase.js +4 -5
  37. package/legacy/ButtonGroup/ButtonGroup.js +4 -5
  38. package/legacy/CardActionArea/CardActionArea.js +4 -5
  39. package/legacy/CardHeader/CardHeader.js +1 -2
  40. package/legacy/Checkbox/Checkbox.js +3 -4
  41. package/legacy/Chip/Chip.js +29 -32
  42. package/legacy/FilledInput/FilledInput.js +20 -17
  43. package/legacy/FormControlLabel/FormControlLabel.js +1 -2
  44. package/legacy/FormHelperText/FormHelperText.js +4 -5
  45. package/legacy/FormLabel/FormLabel.js +5 -6
  46. package/legacy/Input/Input.js +7 -8
  47. package/legacy/InputAdornment/InputAdornment.js +2 -2
  48. package/legacy/InputBase/InputBase.js +5 -6
  49. package/legacy/InputLabel/InputLabel.js +5 -1
  50. package/legacy/ListItem/ListItem.js +4 -5
  51. package/legacy/ListItemButton/ListItemButton.js +6 -7
  52. package/legacy/MenuItem/MenuItem.js +11 -12
  53. package/legacy/Modal/Modal.js +3 -0
  54. package/legacy/NativeSelect/NativeSelectInput.js +6 -7
  55. package/legacy/OutlinedInput/OutlinedInput.js +7 -8
  56. package/legacy/PaginationItem/PaginationItem.js +9 -10
  57. package/legacy/Popper/Popper.js +3 -0
  58. package/legacy/Rating/Rating.js +8 -10
  59. package/legacy/Select/SelectInput.js +2 -1
  60. package/legacy/Slider/Slider.js +11 -14
  61. package/legacy/SpeedDialIcon/SpeedDialIcon.js +4 -5
  62. package/legacy/StepButton/StepButton.js +1 -1
  63. package/legacy/StepIcon/StepIcon.js +5 -6
  64. package/legacy/StepLabel/StepLabel.js +10 -12
  65. package/legacy/Switch/Switch.js +14 -17
  66. package/legacy/Tab/Tab.js +10 -11
  67. package/legacy/TablePagination/TablePagination.js +53 -19
  68. package/legacy/TablePagination/TablePaginationActions.js +35 -14
  69. package/legacy/TableRow/TableRow.js +4 -5
  70. package/legacy/Tabs/Tabs.js +1 -2
  71. package/legacy/ToggleButton/ToggleButton.js +4 -5
  72. package/legacy/Tooltip/Tooltip.js +10 -12
  73. package/legacy/index.js +1 -1
  74. package/legacy/styles/createMixins.js +4 -5
  75. package/modern/Autocomplete/Autocomplete.js +24 -5
  76. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  77. package/modern/Box/Box.js +2 -1
  78. package/modern/Box/boxClasses.js +3 -0
  79. package/modern/Box/index.js +3 -1
  80. package/modern/Chip/Chip.js +2 -2
  81. package/modern/FilledInput/FilledInput.js +9 -6
  82. package/modern/FormControlLabel/FormControlLabel.js +1 -2
  83. package/modern/InputAdornment/InputAdornment.js +2 -2
  84. package/modern/InputLabel/InputLabel.js +5 -1
  85. package/modern/Modal/Modal.js +3 -0
  86. package/modern/Popper/Popper.js +3 -0
  87. package/modern/Rating/Rating.js +4 -6
  88. package/modern/Select/SelectInput.js +2 -1
  89. package/modern/StepButton/StepButton.js +1 -1
  90. package/modern/TablePagination/TablePagination.js +46 -12
  91. package/modern/TablePagination/TablePaginationActions.js +34 -15
  92. package/modern/index.js +1 -1
  93. package/node/Autocomplete/Autocomplete.js +24 -5
  94. package/node/BottomNavigation/BottomNavigation.js +0 -0
  95. package/node/Box/Box.js +2 -1
  96. package/node/Box/boxClasses.js +9 -0
  97. package/node/Box/index.js +24 -1
  98. package/node/Chip/Chip.js +2 -2
  99. package/node/FilledInput/FilledInput.js +9 -6
  100. package/node/FormControlLabel/FormControlLabel.js +1 -2
  101. package/node/InputAdornment/InputAdornment.js +2 -2
  102. package/node/InputLabel/InputLabel.js +5 -1
  103. package/node/Modal/Modal.js +3 -0
  104. package/node/Popper/Popper.js +3 -0
  105. package/node/Rating/Rating.js +4 -6
  106. package/node/Select/SelectInput.js +2 -1
  107. package/node/StepButton/StepButton.js +1 -1
  108. package/node/TablePagination/TablePagination.js +47 -12
  109. package/node/TablePagination/TablePaginationActions.js +35 -15
  110. package/node/index.js +1 -1
  111. package/package.json +9 -9
  112. package/umd/material-ui.development.js +180 -102
  113. package/umd/material-ui.production.min.js +21 -21
@@ -42,7 +42,6 @@ var SwitchRoot = styled('span', {
42
42
  return [styles.root, ownerState.edge && styles["edge".concat(capitalize(ownerState.edge))], styles["size".concat(capitalize(ownerState.size))]];
43
43
  }
44
44
  })(function (_ref) {
45
- var _ref2;
46
45
  var ownerState = _ref.ownerState;
47
46
  return _extends({
48
47
  display: 'inline-flex',
@@ -64,18 +63,18 @@ var SwitchRoot = styled('span', {
64
63
  marginLeft: -8
65
64
  }, ownerState.edge === 'end' && {
66
65
  marginRight: -8
67
- }, ownerState.size === 'small' && (_ref2 = {
66
+ }, ownerState.size === 'small' && _defineProperty(_defineProperty({
68
67
  width: 40,
69
68
  height: 24,
70
69
  padding: 7
71
- }, _defineProperty(_ref2, "& .".concat(switchClasses.thumb), {
70
+ }, "& .".concat(switchClasses.thumb), {
72
71
  width: 16,
73
72
  height: 16
74
- }), _defineProperty(_ref2, "& .".concat(switchClasses.switchBase), _defineProperty({
73
+ }), "& .".concat(switchClasses.switchBase), _defineProperty({
75
74
  padding: 4
76
75
  }, "&.".concat(switchClasses.checked), {
77
76
  transform: 'translateX(16px)'
78
- })), _ref2));
77
+ })));
79
78
  });
80
79
  var SwitchSwitchBase = styled(SwitchBase, {
81
80
  name: 'MuiSwitch',
@@ -85,9 +84,8 @@ var SwitchSwitchBase = styled(SwitchBase, {
85
84
  return [styles.switchBase, _defineProperty({}, "& .".concat(switchClasses.input), styles.input), ownerState.color !== 'default' && styles["color".concat(capitalize(ownerState.color))]];
86
85
  }
87
86
  })(function (_ref4) {
88
- var _ref5;
89
87
  var theme = _ref4.theme;
90
- return _ref5 = {
88
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
91
89
  position: 'absolute',
92
90
  top: 0,
93
91
  left: 0,
@@ -97,20 +95,19 @@ var SwitchSwitchBase = styled(SwitchBase, {
97
95
  transition: theme.transitions.create(['left', 'transform'], {
98
96
  duration: theme.transitions.duration.shortest
99
97
  })
100
- }, _defineProperty(_ref5, "&.".concat(switchClasses.checked), {
98
+ }, "&.".concat(switchClasses.checked), {
101
99
  transform: 'translateX(20px)'
102
- }), _defineProperty(_ref5, "&.".concat(switchClasses.disabled), {
100
+ }), "&.".concat(switchClasses.disabled), {
103
101
  color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : "".concat(theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600])
104
- }), _defineProperty(_ref5, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
102
+ }), "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
105
103
  opacity: 0.5
106
- }), _defineProperty(_ref5, "&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track), {
104
+ }), "&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track), {
107
105
  opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : "".concat(theme.palette.mode === 'light' ? 0.12 : 0.2)
108
- }), _defineProperty(_ref5, "& .".concat(switchClasses.input), {
106
+ }), "& .".concat(switchClasses.input), {
109
107
  left: '-100%',
110
108
  width: '300%'
111
- }), _ref5;
109
+ });
112
110
  }, function (_ref6) {
113
- var _ref7;
114
111
  var theme = _ref6.theme,
115
112
  ownerState = _ref6.ownerState;
116
113
  return _extends({
@@ -121,7 +118,7 @@ var SwitchSwitchBase = styled(SwitchBase, {
121
118
  backgroundColor: 'transparent'
122
119
  }
123
120
  }
124
- }, ownerState.color !== 'default' && (_ref7 = {}, _defineProperty(_ref7, "&.".concat(switchClasses.checked), _defineProperty({
121
+ }, ownerState.color !== 'default' && _defineProperty(_defineProperty({}, "&.".concat(switchClasses.checked), _defineProperty({
125
122
  color: (theme.vars || theme).palette[ownerState.color].main,
126
123
  '&:hover': {
127
124
  backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
@@ -131,9 +128,9 @@ var SwitchSwitchBase = styled(SwitchBase, {
131
128
  }
132
129
  }, "&.".concat(switchClasses.disabled), {
133
130
  color: theme.vars ? theme.vars.palette.Switch["".concat(ownerState.color, "DisabledColor")] : "".concat(theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55))
134
- })), _defineProperty(_ref7, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
131
+ })), "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
135
132
  backgroundColor: (theme.vars || theme).palette[ownerState.color].main
136
- }), _ref7));
133
+ }));
137
134
  });
138
135
  var SwitchTrack = styled('span', {
139
136
  name: 'MuiSwitch',
package/legacy/Tab/Tab.js CHANGED
@@ -37,7 +37,6 @@ var TabRoot = styled(ButtonBase, {
37
37
  return [styles.root, ownerState.label && ownerState.icon && styles.labelIcon, styles["textColor".concat(capitalize(ownerState.textColor))], ownerState.fullWidth && styles.fullWidth, ownerState.wrapped && styles.wrapped];
38
38
  }
39
39
  })(function (_ref) {
40
- var _ref3, _ref4, _ref5;
41
40
  var theme = _ref.theme,
42
41
  ownerState = _ref.ownerState;
43
42
  return _extends({}, theme.typography.button, {
@@ -66,26 +65,26 @@ var TabRoot = styled(ButtonBase, {
66
65
  marginRight: theme.spacing(1)
67
66
  }, ownerState.iconPosition === 'end' && {
68
67
  marginLeft: theme.spacing(1)
69
- })), ownerState.textColor === 'inherit' && (_ref3 = {
68
+ })), ownerState.textColor === 'inherit' && _defineProperty(_defineProperty({
70
69
  color: 'inherit',
71
70
  opacity: 0.6
72
- }, _defineProperty(_ref3, "&.".concat(tabClasses.selected), {
71
+ }, "&.".concat(tabClasses.selected), {
73
72
  opacity: 1
74
- }), _defineProperty(_ref3, "&.".concat(tabClasses.disabled), {
73
+ }), "&.".concat(tabClasses.disabled), {
75
74
  opacity: (theme.vars || theme).palette.action.disabledOpacity
76
- }), _ref3), ownerState.textColor === 'primary' && (_ref4 = {
75
+ }), ownerState.textColor === 'primary' && _defineProperty(_defineProperty({
77
76
  color: (theme.vars || theme).palette.text.secondary
78
- }, _defineProperty(_ref4, "&.".concat(tabClasses.selected), {
77
+ }, "&.".concat(tabClasses.selected), {
79
78
  color: (theme.vars || theme).palette.primary.main
80
- }), _defineProperty(_ref4, "&.".concat(tabClasses.disabled), {
79
+ }), "&.".concat(tabClasses.disabled), {
81
80
  color: (theme.vars || theme).palette.text.disabled
82
- }), _ref4), ownerState.textColor === 'secondary' && (_ref5 = {
81
+ }), ownerState.textColor === 'secondary' && _defineProperty(_defineProperty({
83
82
  color: (theme.vars || theme).palette.text.secondary
84
- }, _defineProperty(_ref5, "&.".concat(tabClasses.selected), {
83
+ }, "&.".concat(tabClasses.selected), {
85
84
  color: (theme.vars || theme).palette.secondary.main
86
- }), _defineProperty(_ref5, "&.".concat(tabClasses.disabled), {
85
+ }), "&.".concat(tabClasses.disabled), {
87
86
  color: (theme.vars || theme).palette.text.disabled
88
- }), _ref5), ownerState.fullWidth && {
87
+ }), ownerState.fullWidth && {
89
88
  flexShrink: 1,
90
89
  flexGrow: 1,
91
90
  flexBasis: 0,
@@ -47,20 +47,19 @@ var TablePaginationToolbar = styled(Toolbar, {
47
47
  return _extends(_defineProperty({}, "& .".concat(tablePaginationClasses.actions), styles.actions), styles.toolbar);
48
48
  }
49
49
  })(function (_ref2) {
50
- var _ref3;
51
50
  var theme = _ref2.theme;
52
- return _ref3 = {
51
+ return _defineProperty(_defineProperty(_defineProperty({
53
52
  minHeight: 52,
54
53
  paddingRight: 2
55
- }, _defineProperty(_ref3, "".concat(theme.breakpoints.up('xs'), " and (orientation: landscape)"), {
54
+ }, "".concat(theme.breakpoints.up('xs'), " and (orientation: landscape)"), {
56
55
  minHeight: 52
57
- }), _defineProperty(_ref3, theme.breakpoints.up('sm'), {
56
+ }), theme.breakpoints.up('sm'), {
58
57
  minHeight: 52,
59
58
  paddingRight: 2
60
- }), _defineProperty(_ref3, "& .".concat(tablePaginationClasses.actions), {
59
+ }), "& .".concat(tablePaginationClasses.actions), {
61
60
  flexShrink: 0,
62
61
  marginLeft: 20
63
- }), _ref3;
62
+ });
64
63
  });
65
64
  var TablePaginationSpacer = styled('div', {
66
65
  name: 'MuiTablePagination',
@@ -87,8 +86,7 @@ var TablePaginationSelect = styled(Select, {
87
86
  name: 'MuiTablePagination',
88
87
  slot: 'Select',
89
88
  overridesResolver: function overridesResolver(props, styles) {
90
- var _extends3;
91
- return _extends((_extends3 = {}, _defineProperty(_extends3, "& .".concat(tablePaginationClasses.selectIcon), styles.selectIcon), _defineProperty(_extends3, "& .".concat(tablePaginationClasses.select), styles.select), _extends3), styles.input, styles.selectRoot);
89
+ return _extends(_defineProperty(_defineProperty({}, "& .".concat(tablePaginationClasses.selectIcon), styles.selectIcon), "& .".concat(tablePaginationClasses.select), styles.select), styles.input, styles.selectRoot);
92
90
  }
93
91
  })(_defineProperty({
94
92
  color: 'inherit',
@@ -152,6 +150,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
152
150
  * A `TableCell` based component for placing inside `TableFooter` for pagination.
153
151
  */
154
152
  var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inProps, ref) {
153
+ var _slotProps$select;
155
154
  var props = useThemeProps({
156
155
  props: inProps,
157
156
  name: 'MuiTablePagination'
@@ -164,6 +163,8 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
164
163
  _props$component = props.component,
165
164
  component = _props$component === void 0 ? TableCell : _props$component,
166
165
  count = props.count,
166
+ _props$disabled = props.disabled,
167
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
167
168
  _props$getItemAriaLab = props.getItemAriaLabel,
168
169
  getItemAriaLabel = _props$getItemAriaLab === void 0 ? defaultGetAriaLabel : _props$getItemAriaLab,
169
170
  _props$labelDisplayed = props.labelDisplayedRows,
@@ -183,17 +184,19 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
183
184
  showFirstButton = _props$showFirstButto === void 0 ? false : _props$showFirstButto,
184
185
  _props$showLastButton = props.showLastButton,
185
186
  showLastButton = _props$showLastButton === void 0 ? false : _props$showLastButton,
186
- other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton"]);
187
+ slotProps = props.slotProps,
188
+ other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps"]);
187
189
  var ownerState = props;
188
190
  var classes = useUtilityClasses(ownerState);
189
- var MenuItemComponent = SelectProps.native ? 'option' : TablePaginationMenuItem;
191
+ var selectProps = (_slotProps$select = slotProps == null ? void 0 : slotProps.select) != null ? _slotProps$select : SelectProps;
192
+ var MenuItemComponent = selectProps.native ? 'option' : TablePaginationMenuItem;
190
193
  var colSpan;
191
194
  if (component === TableCell || component === 'td') {
192
195
  colSpan = colSpanProp || 1000; // col-span over everything
193
196
  }
194
197
 
195
- var selectId = useId(SelectProps.id);
196
- var labelId = useId(SelectProps.labelId);
198
+ var selectId = useId(selectProps.id);
199
+ var labelId = useId(selectProps.labelId);
197
200
  var getLabelDisplayedRowsTo = function getLabelDisplayedRowsTo() {
198
201
  if (count === -1) {
199
202
  return (page + 1) * rowsPerPage;
@@ -217,21 +220,22 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
217
220
  children: labelRowsPerPage
218
221
  }), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(TablePaginationSelect, _extends({
219
222
  variant: "standard"
220
- }, !SelectProps.variant && {
223
+ }, !selectProps.variant && {
221
224
  input: _InputBase || (_InputBase = /*#__PURE__*/_jsx(InputBase, {}))
222
225
  }, {
223
226
  value: rowsPerPage,
224
227
  onChange: onRowsPerPageChange,
225
228
  id: selectId,
226
229
  labelId: labelId
227
- }, SelectProps, {
228
- classes: _extends({}, SelectProps.classes, {
230
+ }, selectProps, {
231
+ classes: _extends({}, selectProps.classes, {
229
232
  // TODO v5 remove `classes.input`
230
- root: clsx(classes.input, classes.selectRoot, (SelectProps.classes || {}).root),
231
- select: clsx(classes.select, (SelectProps.classes || {}).select),
233
+ root: clsx(classes.input, classes.selectRoot, (selectProps.classes || {}).root),
234
+ select: clsx(classes.select, (selectProps.classes || {}).select),
232
235
  // TODO v5 remove `selectIcon`
233
- icon: clsx(classes.selectIcon, (SelectProps.classes || {}).icon)
236
+ icon: clsx(classes.selectIcon, (selectProps.classes || {}).icon)
234
237
  }),
238
+ disabled: disabled,
235
239
  children: rowsPerPageOptions.map(function (rowsPerPageOption) {
236
240
  return /*#__PURE__*/_createElement(MenuItemComponent, _extends({}, !isHostComponent(MenuItemComponent) && {
237
241
  ownerState: ownerState
@@ -259,7 +263,9 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
259
263
  rowsPerPage: rowsPerPage,
260
264
  showFirstButton: showFirstButton,
261
265
  showLastButton: showLastButton,
262
- getItemAriaLabel: getItemAriaLabel
266
+ slotProps: slotProps == null ? void 0 : slotProps.actions,
267
+ getItemAriaLabel: getItemAriaLabel,
268
+ disabled: disabled
263
269
  })]
264
270
  })
265
271
  }));
@@ -277,6 +283,9 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
277
283
  ActionsComponent: PropTypes.elementType,
278
284
  /**
279
285
  * Props applied to the back arrow [`IconButton`](/material-ui/api/icon-button/) component.
286
+ *
287
+ * This prop is an alias for `slotProps.actions.previousButton` and will be overriden by it if both are used.
288
+ * @deprecated Use `slotProps.actions.previousButton` instead.
280
289
  */
281
290
  backIconButtonProps: PropTypes.object,
282
291
  /**
@@ -302,6 +311,11 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
302
311
  * To enable server side pagination for an unknown number of items, provide -1.
303
312
  */
304
313
  count: integerPropType.isRequired,
314
+ /**
315
+ * If `true`, the component is disabled.
316
+ * @default false
317
+ */
318
+ disabled: PropTypes.bool,
305
319
  /**
306
320
  * Accepts a function which returns a string value that provides a user-friendly name for the current page.
307
321
  * This is important for screen reader users.
@@ -333,6 +347,9 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
333
347
  labelRowsPerPage: PropTypes.node,
334
348
  /**
335
349
  * Props applied to the next arrow [`IconButton`](/material-ui/api/icon-button/) element.
350
+ *
351
+ * This prop is an alias for `slotProps.actions.nextButton` and will be overriden by it if both are used.
352
+ * @deprecated Use `slotProps.actions.nextButton` instead.
336
353
  */
337
354
  nextIconButtonProps: PropTypes.object,
338
355
  /**
@@ -382,6 +399,10 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
382
399
  })]).isRequired),
383
400
  /**
384
401
  * Props applied to the rows per page [`Select`](/material-ui/api/select/) element.
402
+ *
403
+ * This prop is an alias for `slotProps.select` and will be overriden by it if both are used.
404
+ * @deprecated Use `slotProps.select` instead.
405
+ *
385
406
  * @default {}
386
407
  */
387
408
  SelectProps: PropTypes.object,
@@ -395,6 +416,19 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
395
416
  * @default false
396
417
  */
397
418
  showLastButton: PropTypes.bool,
419
+ /**
420
+ * The props used for each slot inside the TablePagination.
421
+ * @default {}
422
+ */
423
+ slotProps: PropTypes.shape({
424
+ actions: PropTypes.shape({
425
+ firstButton: PropTypes.object,
426
+ lastButton: PropTypes.object,
427
+ nextButton: PropTypes.object,
428
+ previousButton: PropTypes.object
429
+ }),
430
+ select: PropTypes.object
431
+ }),
398
432
  /**
399
433
  * The system prop that allows defining system overrides as well as additional CSS styles.
400
434
  */
@@ -18,8 +18,11 @@ import FirstPageIcon from '../internal/svg-icons/FirstPage';
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
20
  var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
21
+ var _slotProps$firstButto, _slotProps$previousBu, _slotProps$nextButton, _slotProps$lastButton;
21
22
  var backIconButtonProps = props.backIconButtonProps,
22
23
  count = props.count,
24
+ _props$disabled = props.disabled,
25
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
23
26
  getItemAriaLabel = props.getItemAriaLabel,
24
27
  nextIconButtonProps = props.nextIconButtonProps,
25
28
  onPageChange = props.onPageChange,
@@ -27,7 +30,8 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
27
30
  rowsPerPage = props.rowsPerPage,
28
31
  showFirstButton = props.showFirstButton,
29
32
  showLastButton = props.showLastButton,
30
- other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton"]);
33
+ slotProps = props.slotProps,
34
+ other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slotProps"]);
31
35
  var theme = useTheme();
32
36
  var handleFirstPageButtonClick = function handleFirstPageButtonClick(event) {
33
37
  onPageChange(event, 0);
@@ -44,35 +48,37 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
44
48
  return /*#__PURE__*/_jsxs("div", _extends({
45
49
  ref: ref
46
50
  }, other, {
47
- children: [showFirstButton && /*#__PURE__*/_jsx(IconButton, {
51
+ children: [showFirstButton && /*#__PURE__*/_jsx(IconButton, _extends({
48
52
  onClick: handleFirstPageButtonClick,
49
- disabled: page === 0,
53
+ disabled: disabled || page === 0,
50
54
  "aria-label": getItemAriaLabel('first', page),
51
- title: getItemAriaLabel('first', page),
55
+ title: getItemAriaLabel('first', page)
56
+ }, (_slotProps$firstButto = slotProps == null ? void 0 : slotProps.firstButton) != null ? _slotProps$firstButto : {}, {
52
57
  children: theme.direction === 'rtl' ? _LastPageIcon || (_LastPageIcon = /*#__PURE__*/_jsx(LastPageIcon, {})) : _FirstPageIcon || (_FirstPageIcon = /*#__PURE__*/_jsx(FirstPageIcon, {}))
53
- }), /*#__PURE__*/_jsx(IconButton, _extends({
58
+ })), /*#__PURE__*/_jsx(IconButton, _extends({
54
59
  onClick: handleBackButtonClick,
55
- disabled: page === 0,
60
+ disabled: disabled || page === 0,
56
61
  color: "inherit",
57
62
  "aria-label": getItemAriaLabel('previous', page),
58
63
  title: getItemAriaLabel('previous', page)
59
- }, backIconButtonProps, {
64
+ }, (_slotProps$previousBu = slotProps == null ? void 0 : slotProps.previousButton) != null ? _slotProps$previousBu : backIconButtonProps, {
60
65
  children: theme.direction === 'rtl' ? _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {})) : _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {}))
61
66
  })), /*#__PURE__*/_jsx(IconButton, _extends({
62
67
  onClick: handleNextButtonClick,
63
- disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,
68
+ disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
64
69
  color: "inherit",
65
70
  "aria-label": getItemAriaLabel('next', page),
66
71
  title: getItemAriaLabel('next', page)
67
- }, nextIconButtonProps, {
72
+ }, (_slotProps$nextButton = slotProps == null ? void 0 : slotProps.nextButton) != null ? _slotProps$nextButton : nextIconButtonProps, {
68
73
  children: theme.direction === 'rtl' ? _KeyboardArrowLeft2 || (_KeyboardArrowLeft2 = /*#__PURE__*/_jsx(KeyboardArrowLeft, {})) : _KeyboardArrowRight2 || (_KeyboardArrowRight2 = /*#__PURE__*/_jsx(KeyboardArrowRight, {}))
69
- })), showLastButton && /*#__PURE__*/_jsx(IconButton, {
74
+ })), showLastButton && /*#__PURE__*/_jsx(IconButton, _extends({
70
75
  onClick: handleLastPageButtonClick,
71
- disabled: page >= Math.ceil(count / rowsPerPage) - 1,
76
+ disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
72
77
  "aria-label": getItemAriaLabel('last', page),
73
- title: getItemAriaLabel('last', page),
78
+ title: getItemAriaLabel('last', page)
79
+ }, (_slotProps$lastButton = slotProps == null ? void 0 : slotProps.lastButton) != null ? _slotProps$lastButton : {}, {
74
80
  children: theme.direction === 'rtl' ? _FirstPageIcon2 || (_FirstPageIcon2 = /*#__PURE__*/_jsx(FirstPageIcon, {})) : _LastPageIcon2 || (_LastPageIcon2 = /*#__PURE__*/_jsx(LastPageIcon, {}))
75
- })]
81
+ }))]
76
82
  }));
77
83
  });
78
84
  process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
@@ -84,6 +90,11 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
84
90
  * The total number of rows.
85
91
  */
86
92
  count: PropTypes.number.isRequired,
93
+ /**
94
+ * If `true`, the component is disabled.
95
+ * @default false
96
+ */
97
+ disabled: PropTypes.bool,
87
98
  /**
88
99
  * Accepts a function which returns a string value that provides a user-friendly name for the current page.
89
100
  *
@@ -120,6 +131,16 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
120
131
  /**
121
132
  * If `true`, show the last-page button.
122
133
  */
123
- showLastButton: PropTypes.bool.isRequired
134
+ showLastButton: PropTypes.bool.isRequired,
135
+ /**
136
+ * The props used for each slot inside the TablePaginationActions.
137
+ * @default {}
138
+ */
139
+ slotProps: PropTypes.shape({
140
+ firstButton: PropTypes.object,
141
+ lastButton: PropTypes.object,
142
+ nextButton: PropTypes.object,
143
+ previousButton: PropTypes.object
144
+ })
124
145
  } : void 0;
125
146
  export default TablePaginationActions;
@@ -32,22 +32,21 @@ var TableRowRoot = styled('tr', {
32
32
  return [styles.root, ownerState.head && styles.head, ownerState.footer && styles.footer];
33
33
  }
34
34
  })(function (_ref) {
35
- var _ref2;
36
35
  var theme = _ref.theme;
37
- return _ref2 = {
36
+ return _defineProperty(_defineProperty({
38
37
  color: 'inherit',
39
38
  display: 'table-row',
40
39
  verticalAlign: 'middle',
41
40
  // We disable the focus ring for mouse, touch and keyboard users.
42
41
  outline: 0
43
- }, _defineProperty(_ref2, "&.".concat(tableRowClasses.hover, ":hover"), {
42
+ }, "&.".concat(tableRowClasses.hover, ":hover"), {
44
43
  backgroundColor: (theme.vars || theme).palette.action.hover
45
- }), _defineProperty(_ref2, "&.".concat(tableRowClasses.selected), {
44
+ }), "&.".concat(tableRowClasses.selected), {
46
45
  backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.primary.mainChannel, " / ").concat(theme.vars.palette.action.selectedOpacity, ")") : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
47
46
  '&:hover': {
48
47
  backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.primary.mainChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity, " + ").concat(theme.vars.palette.action.hoverOpacity, "))") : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
49
48
  }
50
- }), _ref2;
49
+ });
51
50
  });
52
51
  var defaultComponent = 'tr';
53
52
  /**
@@ -347,7 +347,6 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
347
347
  };
348
348
  };
349
349
  var updateIndicatorState = useEventCallback(function () {
350
- var _newIndicatorStyle;
351
350
  var _getTabsMeta = getTabsMeta(),
352
351
  tabsMeta = _getTabsMeta.tabsMeta,
353
352
  tabMeta = _getTabsMeta.tabMeta;
@@ -365,7 +364,7 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
365
364
  startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + correction);
366
365
  }
367
366
  }
368
- var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, startIndicator, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);
367
+ var newIndicatorStyle = _defineProperty(_defineProperty({}, startIndicator, startValue), size, tabMeta ? tabMeta[size] : 0);
369
368
 
370
369
  // IE11 support, replace with Number.isNaN
371
370
  // eslint-disable-next-line no-restricted-globals
@@ -35,7 +35,6 @@ var ToggleButtonRoot = styled(ButtonBase, {
35
35
  return [styles.root, styles["size".concat(capitalize(ownerState.size))]];
36
36
  }
37
37
  })(function (_ref) {
38
- var _extends2;
39
38
  var theme = _ref.theme,
40
39
  ownerState = _ref.ownerState;
41
40
  var selectedColor = ownerState.color === 'standard' ? theme.palette.text.primary : theme.palette[ownerState.color].main;
@@ -51,17 +50,17 @@ var ToggleButtonRoot = styled(ButtonBase, {
51
50
  color: (theme.vars || theme).palette.action.active
52
51
  }, ownerState.fullWidth && {
53
52
  width: '100%'
54
- }, (_extends2 = {}, _defineProperty(_extends2, "&.".concat(toggleButtonClasses.disabled), {
53
+ }, _defineProperty(_defineProperty(_defineProperty({}, "&.".concat(toggleButtonClasses.disabled), {
55
54
  color: (theme.vars || theme).palette.action.disabled,
56
55
  border: "1px solid ".concat((theme.vars || theme).palette.action.disabledBackground)
57
- }), _defineProperty(_extends2, '&:hover', {
56
+ }), '&:hover', {
58
57
  textDecoration: 'none',
59
58
  // Reset on mouse devices
60
59
  backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
61
60
  '@media (hover: none)': {
62
61
  backgroundColor: 'transparent'
63
62
  }
64
- }), _defineProperty(_extends2, "&.".concat(toggleButtonClasses.selected), {
63
+ }), "&.".concat(toggleButtonClasses.selected), {
65
64
  color: selectedColor,
66
65
  backgroundColor: theme.vars ? "rgba(".concat(selectedColorChannel, " / ").concat(theme.vars.palette.action.selectedOpacity, ")") : alpha(selectedColor, theme.palette.action.selectedOpacity),
67
66
  '&:hover': {
@@ -71,7 +70,7 @@ var ToggleButtonRoot = styled(ButtonBase, {
71
70
  backgroundColor: theme.vars ? "rgba(".concat(selectedColorChannel, " / ").concat(theme.vars.palette.action.selectedOpacity, ")") : alpha(selectedColor, theme.palette.action.selectedOpacity)
72
71
  }
73
72
  }
74
- }), _extends2), ownerState.size === 'small' && {
73
+ }), ownerState.size === 'small' && {
75
74
  padding: 7,
76
75
  fontSize: theme.typography.pxToRem(13)
77
76
  }, ownerState.size === 'large' && {
@@ -48,7 +48,6 @@ var TooltipPopper = styled(Popper, {
48
48
  return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];
49
49
  }
50
50
  })(function (_ref) {
51
- var _ref2;
52
51
  var theme = _ref.theme,
53
52
  ownerState = _ref.ownerState,
54
53
  open = _ref.open;
@@ -59,19 +58,19 @@ var TooltipPopper = styled(Popper, {
59
58
  pointerEvents: 'auto'
60
59
  }, !open && {
61
60
  pointerEvents: 'none'
62
- }, ownerState.arrow && (_ref2 = {}, _defineProperty(_ref2, "&[data-popper-placement*=\"bottom\"] .".concat(tooltipClasses.arrow), {
61
+ }, ownerState.arrow && _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "&[data-popper-placement*=\"bottom\"] .".concat(tooltipClasses.arrow), {
63
62
  top: 0,
64
63
  marginTop: '-0.71em',
65
64
  '&::before': {
66
65
  transformOrigin: '0 100%'
67
66
  }
68
- }), _defineProperty(_ref2, "&[data-popper-placement*=\"top\"] .".concat(tooltipClasses.arrow), {
67
+ }), "&[data-popper-placement*=\"top\"] .".concat(tooltipClasses.arrow), {
69
68
  bottom: 0,
70
69
  marginBottom: '-0.71em',
71
70
  '&::before': {
72
71
  transformOrigin: '100% 0'
73
72
  }
74
- }), _defineProperty(_ref2, "&[data-popper-placement*=\"right\"] .".concat(tooltipClasses.arrow), _extends({}, !ownerState.isRtl ? {
73
+ }), "&[data-popper-placement*=\"right\"] .".concat(tooltipClasses.arrow), _extends({}, !ownerState.isRtl ? {
75
74
  left: 0,
76
75
  marginLeft: '-0.71em'
77
76
  } : {
@@ -83,7 +82,7 @@ var TooltipPopper = styled(Popper, {
83
82
  '&::before': {
84
83
  transformOrigin: '100% 100%'
85
84
  }
86
- })), _defineProperty(_ref2, "&[data-popper-placement*=\"left\"] .".concat(tooltipClasses.arrow), _extends({}, !ownerState.isRtl ? {
85
+ })), "&[data-popper-placement*=\"left\"] .".concat(tooltipClasses.arrow), _extends({}, !ownerState.isRtl ? {
87
86
  right: 0,
88
87
  marginRight: '-0.71em'
89
88
  } : {
@@ -95,7 +94,7 @@ var TooltipPopper = styled(Popper, {
95
94
  '&::before': {
96
95
  transformOrigin: '0 0'
97
96
  }
98
- })), _ref2));
97
+ })));
99
98
  });
100
99
  var TooltipTooltip = styled('div', {
101
100
  name: 'MuiTooltip',
@@ -105,7 +104,6 @@ var TooltipTooltip = styled('div', {
105
104
  return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles["tooltipPlacement".concat(capitalize(ownerState.placement.split('-')[0]))]];
106
105
  }
107
106
  })(function (_ref3) {
108
- var _extends2;
109
107
  var theme = _ref3.theme,
110
108
  ownerState = _ref3.ownerState;
111
109
  return _extends({
@@ -127,7 +125,7 @@ var TooltipTooltip = styled('div', {
127
125
  fontSize: theme.typography.pxToRem(14),
128
126
  lineHeight: "".concat(round(16 / 14), "em"),
129
127
  fontWeight: theme.typography.fontWeightRegular
130
- }, (_extends2 = {}, _defineProperty(_extends2, ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"left\"] &"), _extends({
128
+ }, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"left\"] &"), _extends({
131
129
  transformOrigin: 'right center'
132
130
  }, !ownerState.isRtl ? _extends({
133
131
  marginRight: '14px'
@@ -137,7 +135,7 @@ var TooltipTooltip = styled('div', {
137
135
  marginLeft: '14px'
138
136
  }, ownerState.touch && {
139
137
  marginLeft: '24px'
140
- }))), _defineProperty(_extends2, ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"right\"] &"), _extends({
138
+ }))), ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"right\"] &"), _extends({
141
139
  transformOrigin: 'left center'
142
140
  }, !ownerState.isRtl ? _extends({
143
141
  marginLeft: '14px'
@@ -147,17 +145,17 @@ var TooltipTooltip = styled('div', {
147
145
  marginRight: '14px'
148
146
  }, ownerState.touch && {
149
147
  marginRight: '24px'
150
- }))), _defineProperty(_extends2, ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"top\"] &"), _extends({
148
+ }))), ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"top\"] &"), _extends({
151
149
  transformOrigin: 'center bottom',
152
150
  marginBottom: '14px'
153
151
  }, ownerState.touch && {
154
152
  marginBottom: '24px'
155
- })), _defineProperty(_extends2, ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"bottom\"] &"), _extends({
153
+ })), ".".concat(tooltipClasses.popper, "[data-popper-placement*=\"bottom\"] &"), _extends({
156
154
  transformOrigin: 'center top',
157
155
  marginTop: '14px'
158
156
  }, ownerState.touch && {
159
157
  marginTop: '24px'
160
- })), _extends2));
158
+ })));
161
159
  });
162
160
  var TooltipArrow = styled('span', {
163
161
  name: 'MuiTooltip',
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.14.17
2
+ * @mui/material v5.14.19
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,16 +1,15 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  export default function createMixins(breakpoints, mixins) {
4
- var _toolbar;
5
4
  return _extends({
6
- toolbar: (_toolbar = {
5
+ toolbar: _defineProperty(_defineProperty({
7
6
  minHeight: 56
8
- }, _defineProperty(_toolbar, breakpoints.up('xs'), {
7
+ }, breakpoints.up('xs'), {
9
8
  '@media (orientation: landscape)': {
10
9
  minHeight: 48
11
10
  }
12
- }), _defineProperty(_toolbar, breakpoints.up('sm'), {
11
+ }), breakpoints.up('sm'), {
13
12
  minHeight: 64
14
- }), _toolbar)
13
+ })
15
14
  }, mixins);
16
15
  }