@mui/material 5.15.0 → 5.15.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.
Files changed (34) hide show
  1. package/AccordionActions/AccordionActions.js +1 -1
  2. package/Autocomplete/Autocomplete.js +4 -4
  3. package/CHANGELOG.md +42 -0
  4. package/CardActions/CardActions.js +1 -1
  5. package/TablePagination/TablePagination.d.ts +8 -0
  6. package/TablePagination/TablePagination.js +27 -4
  7. package/TablePagination/TablePaginationActions.d.ts +49 -0
  8. package/TablePagination/TablePaginationActions.js +54 -19
  9. package/index.js +1 -1
  10. package/legacy/AccordionActions/AccordionActions.js +1 -1
  11. package/legacy/Autocomplete/Autocomplete.js +4 -4
  12. package/legacy/CardActions/CardActions.js +1 -1
  13. package/legacy/TablePagination/TablePagination.js +29 -4
  14. package/legacy/TablePagination/TablePaginationActions.js +56 -19
  15. package/legacy/index.js +1 -1
  16. package/legacy/styles/experimental_extendTheme.js +12 -6
  17. package/modern/AccordionActions/AccordionActions.js +1 -1
  18. package/modern/Autocomplete/Autocomplete.js +4 -4
  19. package/modern/CardActions/CardActions.js +1 -1
  20. package/modern/TablePagination/TablePagination.js +27 -4
  21. package/modern/TablePagination/TablePaginationActions.js +53 -18
  22. package/modern/index.js +1 -1
  23. package/modern/styles/experimental_extendTheme.js +12 -6
  24. package/node/AccordionActions/AccordionActions.js +1 -1
  25. package/node/Autocomplete/Autocomplete.js +4 -4
  26. package/node/CardActions/CardActions.js +1 -1
  27. package/node/TablePagination/TablePagination.js +27 -4
  28. package/node/TablePagination/TablePaginationActions.js +54 -19
  29. package/node/index.js +1 -1
  30. package/node/styles/experimental_extendTheme.js +11 -5
  31. package/package.json +6 -6
  32. package/styles/experimental_extendTheme.js +12 -6
  33. package/umd/material-ui.development.js +103 -39
  34. package/umd/material-ui.production.min.js +20 -20
@@ -38,7 +38,7 @@ const AccordionActionsRoot = styled('div', {
38
38
  padding: 8,
39
39
  justifyContent: 'flex-end'
40
40
  }, !ownerState.disableSpacing && {
41
- '& > :not(:first-of-type)': {
41
+ '& > :not(style) ~ :not(style)': {
42
42
  marginLeft: 8
43
43
  }
44
44
  }));
@@ -660,7 +660,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
660
660
  // | To update them edit the d.ts file and run "yarn proptypes" |
661
661
  // ----------------------------------------------------------------------
662
662
  /**
663
- * If `true`, the portion of the selected suggestion that has not been typed by the user,
663
+ * If `true`, the portion of the selected suggestion that the user hasn't typed,
664
664
  * known as the completion string, appears inline after the input cursor in the textbox.
665
665
  * The inline completion string is visually highlighted and has a selected state.
666
666
  * @default false
@@ -676,7 +676,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
676
676
  * when the Autocomplete loses focus unless the user chooses
677
677
  * a different option or changes the character string in the input.
678
678
  *
679
- * When using `freeSolo` mode, the typed value will be the input value
679
+ * When using the `freeSolo` mode, the typed value will be the input value
680
680
  * if the Autocomplete loses focus without highlighting an option.
681
681
  * @default false
682
682
  */
@@ -711,8 +711,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
711
711
  /**
712
712
  * If `true`, the input's text is cleared on blur if no value is selected.
713
713
  *
714
- * Set to `true` if you want to help the user enter a new value.
715
- * Set to `false` if you want to help the user resume their search.
714
+ * Set it to `true` if you want to help the user enter a new value.
715
+ * Set it to `false` if you want to help the user resume their search.
716
716
  * @default !props.freeSolo
717
717
  */
718
718
  clearOnBlur: PropTypes.bool,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.15.1
4
+
5
+ <!-- generated comparing v5.15.0..master -->
6
+
7
+ _Dec 19, 2023_
8
+
9
+ A big thanks to the 15 contributors who made this release possible.
10
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
11
+
12
+ ### `@mui/material@5.15.1`
13
+
14
+ - &#8203;<!-- 13 -->[CardActions][DialogActions] Apply margin for all children except for 1st child (#40168) @sai6855
15
+ - &#8203;<!-- 03 -->[TablePagination] Add ability to change icons in TablePaginationActions using `slots` and `slotProps` (#33797) @pratikkarad
16
+ - &#8203;<!-- 13 -->[CssVarsProvider] Fix HSL breaking button styles (#39869) @gitstart
17
+
18
+ ### `@mui/joy@5.0.0-beta.19`
19
+
20
+ - &#8203;<!-- 05 -->[FormControl] Fix issue with the conditional setting of `htmlFor` and `id` attributes not functioning properly for form labels (#40180) @ReaZzy
21
+ - &#8203;<!-- 04 -->[typescript] Address TypeScript issue with custom zIndex not functioning (#40133) @qiweiii
22
+
23
+ ### `@mui/styled-engine-sc@6.0.0-alpha.9`
24
+
25
+ - &#8203;<!-- 02 -->[typescript] Fix `theme` being of type any (#40200) @mnajdova
26
+
27
+ ### Docs
28
+
29
+ - &#8203;<!-- 09 -->[joy-ui] Fix typo in the CSS baseline page (#40222) @possibilities
30
+ - &#8203;<!-- 08 -->[joy-ui] Document missing Autocomplete props (#39979) @ZeeshanTamboli
31
+ - &#8203;<!-- 10 -->[joy-ui] Fix typo about Typography levels (#40230) @zanivan
32
+ - &#8203;<!-- 07 -->[material-ui] Update the related projects page to list `mui-tiptap` for rich text (#40216) @sjdemartini
33
+ - &#8203;<!-- 06 -->[material-ui] Fix typo in the Next.js integration page (#40209) @s8990
34
+
35
+ ### Core
36
+
37
+ - &#8203;<!-- 14 -->[blog] Fix access to Notion without an account @oliviertassinari
38
+ - &#8203;<!-- 12 -->[core] Update workflows and issue templates to reflect the updated label (#40197) @MBilalShafi
39
+ - &#8203;<!-- 11 -->[docs] Replace Twitter with X (#40193) @mbrookes
40
+ - &#8203;<!-- 10 -->[docs-infra] Uplift the Algolia search modal design (#40186) @danilo-leal
41
+ - &#8203;<!-- 01 -->[website] Update product descriptions and social preview images (#32181) @danilo-leal
42
+
43
+ All contributors of this release in alphabetical order: @danilo-leal, @gitstart, @MBilalShafi, @mbrookes, @mnajdova, @oliviertassinari, @possibilities, @pratikkarad, @qiweiii, @ReaZzy, @s8990, @sai6855, @sjdemartini, @zanivan, @ZeeshanTamboli
44
+
3
45
  ## 5.15.0
4
46
 
5
47
  <!-- generated comparing v5.14.20..master -->
@@ -37,7 +37,7 @@ const CardActionsRoot = styled('div', {
37
37
  alignItems: 'center',
38
38
  padding: 8
39
39
  }, !ownerState.disableSpacing && {
40
- '& > :not(:first-of-type)': {
40
+ '& > :not(style) ~ :not(style)': {
41
41
  marginLeft: 8
42
42
  }
43
43
  }));
@@ -142,6 +142,14 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
142
142
  actions?: TablePaginationActionsProps['slotProps'];
143
143
  select?: Partial<SelectProps>;
144
144
  };
145
+ /**
146
+ * The components used for each slot inside the TablePagination.
147
+ * Either a string to use a HTML element or a component.
148
+ * @default {}
149
+ */
150
+ slots?: {
151
+ actions?: TablePaginationActionsProps['slots'];
152
+ };
145
153
  /**
146
154
  * The system prop that allows defining system overrides as well as additional CSS styles.
147
155
  */
@@ -3,7 +3,7 @@
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  var _InputBase;
6
- const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps"];
6
+ const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps", "slots"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
@@ -168,7 +168,8 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
168
168
  SelectProps = {},
169
169
  showFirstButton = false,
170
170
  showLastButton = false,
171
- slotProps
171
+ slotProps = {},
172
+ slots = {}
172
173
  } = props,
173
174
  other = _objectWithoutPropertiesLoose(props, _excluded);
174
175
  const ownerState = props;
@@ -245,7 +246,8 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
245
246
  rowsPerPage: rowsPerPage,
246
247
  showFirstButton: showFirstButton,
247
248
  showLastButton: showLastButton,
248
- slotProps: slotProps == null ? void 0 : slotProps.actions,
249
+ slotProps: slotProps.actions,
250
+ slots: slots.actions,
249
251
  getItemAriaLabel: getItemAriaLabel,
250
252
  disabled: disabled
251
253
  })]
@@ -407,12 +409,33 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
407
409
  slotProps: PropTypes.shape({
408
410
  actions: PropTypes.shape({
409
411
  firstButton: PropTypes.object,
412
+ firstButtonIcon: PropTypes.object,
410
413
  lastButton: PropTypes.object,
414
+ lastButtonIcon: PropTypes.object,
411
415
  nextButton: PropTypes.object,
412
- previousButton: PropTypes.object
416
+ nextButtonIcon: PropTypes.object,
417
+ previousButton: PropTypes.object,
418
+ previousButtonIcon: PropTypes.object
413
419
  }),
414
420
  select: PropTypes.object
415
421
  }),
422
+ /**
423
+ * The components used for each slot inside the TablePagination.
424
+ * Either a string to use a HTML element or a component.
425
+ * @default {}
426
+ */
427
+ slots: PropTypes.shape({
428
+ actions: PropTypes.shape({
429
+ firstButton: PropTypes.elementType,
430
+ firstButtonIcon: PropTypes.elementType,
431
+ lastButton: PropTypes.elementType,
432
+ lastButtonIcon: PropTypes.elementType,
433
+ nextButton: PropTypes.elementType,
434
+ nextButtonIcon: PropTypes.elementType,
435
+ previousButton: PropTypes.elementType,
436
+ previousButtonIcon: PropTypes.elementType
437
+ })
438
+ }),
416
439
  /**
417
440
  * The system prop that allows defining system overrides as well as additional CSS styles.
418
441
  */
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconButtonProps } from '../IconButton/IconButton';
3
+ import { SvgIconProps } from '../SvgIcon';
3
4
 
4
5
  export interface TablePaginationActionsProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  /**
@@ -41,7 +42,55 @@ export interface TablePaginationActionsProps extends React.HTMLAttributes<HTMLDi
41
42
  lastButton?: Partial<IconButtonProps>;
42
43
  nextButton?: Partial<IconButtonProps>;
43
44
  previousButton?: Partial<IconButtonProps>;
45
+ firstButtonIcon?: Partial<SvgIconProps>;
46
+ lastButtonIcon?: Partial<SvgIconProps>;
47
+ nextButtonIcon?: Partial<SvgIconProps>;
48
+ previousButtonIcon?: Partial<SvgIconProps>;
44
49
  };
50
+ slots?: TablePaginationActionsSlots;
51
+ }
52
+
53
+ export interface TablePaginationActionsSlots {
54
+ /**
55
+ * The component that renders the first button.
56
+ * @default IconButton
57
+ */
58
+ firstButton?: React.ElementType;
59
+ /**
60
+ * The component that renders the last button.
61
+ * @default IconButton
62
+ */
63
+ lastButton?: React.ElementType;
64
+ /**
65
+ * The component that renders the next button.
66
+ * @default IconButton
67
+ */
68
+ nextButton?: React.ElementType;
69
+ /**
70
+ * The component that renders the previous button.
71
+ * @default IconButton
72
+ */
73
+ previousButton?: React.ElementType;
74
+ /**
75
+ * The component that renders the first button icon.
76
+ * @default FirstPageIcon
77
+ */
78
+ firstButtonIcon?: React.ElementType;
79
+ /**
80
+ * The component that renders the last button icon.
81
+ * @default LastPageIcon
82
+ */
83
+ lastButtonIcon?: React.ElementType;
84
+ /**
85
+ * The component that renders the next button icon.
86
+ * @default KeyboardArrowRight
87
+ */
88
+ nextButtonIcon?: React.ElementType;
89
+ /**
90
+ * The component that renders the previous button icon.
91
+ * @default KeyboardArrowLeft
92
+ */
93
+ previousButtonIcon?: React.ElementType;
45
94
  }
46
95
 
47
96
  declare const TablePaginationActions: React.JSXElementConstructor<TablePaginationActionsProps>;
@@ -2,16 +2,15 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- var _LastPageIcon, _FirstPageIcon, _KeyboardArrowRight, _KeyboardArrowLeft, _KeyboardArrowLeft2, _KeyboardArrowRight2, _FirstPageIcon2, _LastPageIcon2;
6
- const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slotProps"];
5
+ const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"];
7
6
  import * as React from 'react';
8
7
  import PropTypes from 'prop-types';
9
8
  import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
10
9
  import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
11
10
  import useTheme from '../styles/useTheme';
12
11
  import IconButton from '../IconButton';
13
- import LastPageIcon from '../internal/svg-icons/LastPage';
14
- import FirstPageIcon from '../internal/svg-icons/FirstPage';
12
+ import LastPageIconDefault from '../internal/svg-icons/LastPage';
13
+ import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
15
14
 
16
15
  /**
17
16
  * @ignore - internal component.
@@ -19,7 +18,7 @@ import FirstPageIcon from '../internal/svg-icons/FirstPage';
19
18
  import { jsx as _jsx } from "react/jsx-runtime";
20
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
20
  const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
22
- var _slotProps$firstButto, _slotProps$previousBu, _slotProps$nextButton, _slotProps$lastButton;
21
+ var _slots$firstButton, _slots$lastButton, _slots$nextButton, _slots$previousButton, _slots$firstButtonIco, _slots$lastButtonIcon, _slots$nextButtonIcon, _slots$previousButton2;
23
22
  const {
24
23
  backIconButtonProps,
25
24
  count,
@@ -31,7 +30,8 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
31
30
  rowsPerPage,
32
31
  showFirstButton,
33
32
  showLastButton,
34
- slotProps
33
+ slots = {},
34
+ slotProps = {}
35
35
  } = props,
36
36
  other = _objectWithoutPropertiesLoose(props, _excluded);
37
37
  const theme = useTheme();
@@ -47,39 +47,55 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
47
47
  const handleLastPageButtonClick = event => {
48
48
  onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
49
49
  };
50
+ const FirstButton = (_slots$firstButton = slots.firstButton) != null ? _slots$firstButton : IconButton;
51
+ const LastButton = (_slots$lastButton = slots.lastButton) != null ? _slots$lastButton : IconButton;
52
+ const NextButton = (_slots$nextButton = slots.nextButton) != null ? _slots$nextButton : IconButton;
53
+ const PreviousButton = (_slots$previousButton = slots.previousButton) != null ? _slots$previousButton : IconButton;
54
+ const FirstButtonIcon = (_slots$firstButtonIco = slots.firstButtonIcon) != null ? _slots$firstButtonIco : FirstPageIconDefault;
55
+ const LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
56
+ const NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
57
+ const PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
58
+ const FirstButtonSlot = theme.direction === 'rtl' ? LastButton : FirstButton;
59
+ const PreviousButtonSlot = theme.direction === 'rtl' ? NextButton : PreviousButton;
60
+ const NextButtonSlot = theme.direction === 'rtl' ? PreviousButton : NextButton;
61
+ const LastButtonSlot = theme.direction === 'rtl' ? FirstButton : LastButton;
62
+ const firstButtonSlotProps = theme.direction === 'rtl' ? slotProps.lastButton : slotProps.firstButton;
63
+ const previousButtonSlotProps = theme.direction === 'rtl' ? slotProps.nextButton : slotProps.previousButton;
64
+ const nextButtonSlotProps = theme.direction === 'rtl' ? slotProps.previousButton : slotProps.nextButton;
65
+ const lastButtonSlotProps = theme.direction === 'rtl' ? slotProps.firstButton : slotProps.lastButton;
50
66
  return /*#__PURE__*/_jsxs("div", _extends({
51
67
  ref: ref
52
68
  }, other, {
53
- children: [showFirstButton && /*#__PURE__*/_jsx(IconButton, _extends({
69
+ children: [showFirstButton && /*#__PURE__*/_jsx(FirstButtonSlot, _extends({
54
70
  onClick: handleFirstPageButtonClick,
55
71
  disabled: disabled || page === 0,
56
72
  "aria-label": getItemAriaLabel('first', page),
57
73
  title: getItemAriaLabel('first', page)
58
- }, (_slotProps$firstButto = slotProps == null ? void 0 : slotProps.firstButton) != null ? _slotProps$firstButto : {}, {
59
- children: theme.direction === 'rtl' ? _LastPageIcon || (_LastPageIcon = /*#__PURE__*/_jsx(LastPageIcon, {})) : _FirstPageIcon || (_FirstPageIcon = /*#__PURE__*/_jsx(FirstPageIcon, {}))
60
- })), /*#__PURE__*/_jsx(IconButton, _extends({
74
+ }, firstButtonSlotProps, {
75
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
76
+ })), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
61
77
  onClick: handleBackButtonClick,
62
78
  disabled: disabled || page === 0,
63
79
  color: "inherit",
64
80
  "aria-label": getItemAriaLabel('previous', page),
65
81
  title: getItemAriaLabel('previous', page)
66
- }, (_slotProps$previousBu = slotProps == null ? void 0 : slotProps.previousButton) != null ? _slotProps$previousBu : backIconButtonProps, {
67
- children: theme.direction === 'rtl' ? _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {})) : _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {}))
68
- })), /*#__PURE__*/_jsx(IconButton, _extends({
82
+ }, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
83
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
84
+ })), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
69
85
  onClick: handleNextButtonClick,
70
86
  disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
71
87
  color: "inherit",
72
88
  "aria-label": getItemAriaLabel('next', page),
73
89
  title: getItemAriaLabel('next', page)
74
- }, (_slotProps$nextButton = slotProps == null ? void 0 : slotProps.nextButton) != null ? _slotProps$nextButton : nextIconButtonProps, {
75
- children: theme.direction === 'rtl' ? _KeyboardArrowLeft2 || (_KeyboardArrowLeft2 = /*#__PURE__*/_jsx(KeyboardArrowLeft, {})) : _KeyboardArrowRight2 || (_KeyboardArrowRight2 = /*#__PURE__*/_jsx(KeyboardArrowRight, {}))
76
- })), showLastButton && /*#__PURE__*/_jsx(IconButton, _extends({
90
+ }, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
91
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
92
+ })), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
77
93
  onClick: handleLastPageButtonClick,
78
94
  disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
79
95
  "aria-label": getItemAriaLabel('last', page),
80
96
  title: getItemAriaLabel('last', page)
81
- }, (_slotProps$lastButton = slotProps == null ? void 0 : slotProps.lastButton) != null ? _slotProps$lastButton : {}, {
82
- children: theme.direction === 'rtl' ? _FirstPageIcon2 || (_FirstPageIcon2 = /*#__PURE__*/_jsx(FirstPageIcon, {})) : _LastPageIcon2 || (_LastPageIcon2 = /*#__PURE__*/_jsx(LastPageIcon, {}))
97
+ }, lastButtonSlotProps, {
98
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
83
99
  }))]
84
100
  }));
85
101
  });
@@ -140,9 +156,28 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
140
156
  */
141
157
  slotProps: PropTypes.shape({
142
158
  firstButton: PropTypes.object,
159
+ firstButtonIcon: PropTypes.object,
143
160
  lastButton: PropTypes.object,
161
+ lastButtonIcon: PropTypes.object,
144
162
  nextButton: PropTypes.object,
145
- previousButton: PropTypes.object
163
+ nextButtonIcon: PropTypes.object,
164
+ previousButton: PropTypes.object,
165
+ previousButtonIcon: PropTypes.object
166
+ }),
167
+ /**
168
+ * The components used for each slot inside the TablePaginationActions.
169
+ * Either a string to use a HTML element or a component.
170
+ * @default {}
171
+ */
172
+ slots: PropTypes.shape({
173
+ firstButton: PropTypes.elementType,
174
+ firstButtonIcon: PropTypes.elementType,
175
+ lastButton: PropTypes.elementType,
176
+ lastButtonIcon: PropTypes.elementType,
177
+ nextButton: PropTypes.elementType,
178
+ nextButtonIcon: PropTypes.elementType,
179
+ previousButton: PropTypes.elementType,
180
+ previousButtonIcon: PropTypes.elementType
146
181
  })
147
182
  } : void 0;
148
183
  export default TablePaginationActions;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.0
2
+ * @mui/material v5.15.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -33,7 +33,7 @@ var AccordionActionsRoot = styled('div', {
33
33
  padding: 8,
34
34
  justifyContent: 'flex-end'
35
35
  }, !ownerState.disableSpacing && {
36
- '& > :not(:first-of-type)': {
36
+ '& > :not(style) ~ :not(style)': {
37
37
  marginLeft: 8
38
38
  }
39
39
  });
@@ -671,7 +671,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
671
671
  // | To update them edit the d.ts file and run "yarn proptypes" |
672
672
  // ----------------------------------------------------------------------
673
673
  /**
674
- * If `true`, the portion of the selected suggestion that has not been typed by the user,
674
+ * If `true`, the portion of the selected suggestion that the user hasn't typed,
675
675
  * known as the completion string, appears inline after the input cursor in the textbox.
676
676
  * The inline completion string is visually highlighted and has a selected state.
677
677
  * @default false
@@ -687,7 +687,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
687
687
  * when the Autocomplete loses focus unless the user chooses
688
688
  * a different option or changes the character string in the input.
689
689
  *
690
- * When using `freeSolo` mode, the typed value will be the input value
690
+ * When using the `freeSolo` mode, the typed value will be the input value
691
691
  * if the Autocomplete loses focus without highlighting an option.
692
692
  * @default false
693
693
  */
@@ -722,8 +722,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
722
722
  /**
723
723
  * If `true`, the input's text is cleared on blur if no value is selected.
724
724
  *
725
- * Set to `true` if you want to help the user enter a new value.
726
- * Set to `false` if you want to help the user resume their search.
725
+ * Set it to `true` if you want to help the user enter a new value.
726
+ * Set it to `false` if you want to help the user resume their search.
727
727
  * @default !props.freeSolo
728
728
  */
729
729
  clearOnBlur: PropTypes.bool,
@@ -32,7 +32,7 @@ var CardActionsRoot = styled('div', {
32
32
  alignItems: 'center',
33
33
  padding: 8
34
34
  }, !ownerState.disableSpacing && {
35
- '& > :not(:first-of-type)': {
35
+ '& > :not(style) ~ :not(style)': {
36
36
  marginLeft: 8
37
37
  }
38
38
  });
@@ -183,8 +183,11 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
183
183
  showFirstButton = _props$showFirstButto === void 0 ? false : _props$showFirstButto,
184
184
  _props$showLastButton = props.showLastButton,
185
185
  showLastButton = _props$showLastButton === void 0 ? false : _props$showLastButton,
186
- slotProps = props.slotProps,
187
- other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps"]);
186
+ _props$slotProps = props.slotProps,
187
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
188
+ _props$slots = props.slots,
189
+ slots = _props$slots === void 0 ? {} : _props$slots,
190
+ other = _objectWithoutProperties(props, ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps", "slots"]);
188
191
  var ownerState = props;
189
192
  var classes = useUtilityClasses(ownerState);
190
193
  var selectProps = (_slotProps$select = slotProps == null ? void 0 : slotProps.select) != null ? _slotProps$select : SelectProps;
@@ -261,7 +264,8 @@ var TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(inP
261
264
  rowsPerPage: rowsPerPage,
262
265
  showFirstButton: showFirstButton,
263
266
  showLastButton: showLastButton,
264
- slotProps: slotProps == null ? void 0 : slotProps.actions,
267
+ slotProps: slotProps.actions,
268
+ slots: slots.actions,
265
269
  getItemAriaLabel: getItemAriaLabel,
266
270
  disabled: disabled
267
271
  })]
@@ -421,12 +425,33 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
421
425
  slotProps: PropTypes.shape({
422
426
  actions: PropTypes.shape({
423
427
  firstButton: PropTypes.object,
428
+ firstButtonIcon: PropTypes.object,
424
429
  lastButton: PropTypes.object,
430
+ lastButtonIcon: PropTypes.object,
425
431
  nextButton: PropTypes.object,
426
- previousButton: PropTypes.object
432
+ nextButtonIcon: PropTypes.object,
433
+ previousButton: PropTypes.object,
434
+ previousButtonIcon: PropTypes.object
427
435
  }),
428
436
  select: PropTypes.object
429
437
  }),
438
+ /**
439
+ * The components used for each slot inside the TablePagination.
440
+ * Either a string to use a HTML element or a component.
441
+ * @default {}
442
+ */
443
+ slots: PropTypes.shape({
444
+ actions: PropTypes.shape({
445
+ firstButton: PropTypes.elementType,
446
+ firstButtonIcon: PropTypes.elementType,
447
+ lastButton: PropTypes.elementType,
448
+ lastButtonIcon: PropTypes.elementType,
449
+ nextButton: PropTypes.elementType,
450
+ nextButtonIcon: PropTypes.elementType,
451
+ previousButton: PropTypes.elementType,
452
+ previousButtonIcon: PropTypes.elementType
453
+ })
454
+ }),
430
455
  /**
431
456
  * The system prop that allows defining system overrides as well as additional CSS styles.
432
457
  */
@@ -2,15 +2,14 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _LastPageIcon, _FirstPageIcon, _KeyboardArrowRight, _KeyboardArrowLeft, _KeyboardArrowLeft2, _KeyboardArrowRight2, _FirstPageIcon2, _LastPageIcon2;
6
5
  import * as React from 'react';
7
6
  import PropTypes from 'prop-types';
8
7
  import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
9
8
  import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
10
9
  import useTheme from '../styles/useTheme';
11
10
  import IconButton from '../IconButton';
12
- import LastPageIcon from '../internal/svg-icons/LastPage';
13
- import FirstPageIcon from '../internal/svg-icons/FirstPage';
11
+ import LastPageIconDefault from '../internal/svg-icons/LastPage';
12
+ import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
14
13
 
15
14
  /**
16
15
  * @ignore - internal component.
@@ -18,7 +17,7 @@ import FirstPageIcon from '../internal/svg-icons/FirstPage';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
19
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
19
  var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
21
- var _slotProps$firstButto, _slotProps$previousBu, _slotProps$nextButton, _slotProps$lastButton;
20
+ var _slots$firstButton, _slots$lastButton, _slots$nextButton, _slots$previousButton, _slots$firstButtonIco, _slots$lastButtonIcon, _slots$nextButtonIcon, _slots$previousButton2;
22
21
  var backIconButtonProps = props.backIconButtonProps,
23
22
  count = props.count,
24
23
  _props$disabled = props.disabled,
@@ -30,8 +29,11 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
30
29
  rowsPerPage = props.rowsPerPage,
31
30
  showFirstButton = props.showFirstButton,
32
31
  showLastButton = props.showLastButton,
33
- slotProps = props.slotProps,
34
- other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slotProps"]);
32
+ _props$slots = props.slots,
33
+ slots = _props$slots === void 0 ? {} : _props$slots,
34
+ _props$slotProps = props.slotProps,
35
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
36
+ other = _objectWithoutProperties(props, ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"]);
35
37
  var theme = useTheme();
36
38
  var handleFirstPageButtonClick = function handleFirstPageButtonClick(event) {
37
39
  onPageChange(event, 0);
@@ -45,39 +47,55 @@ var TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginat
45
47
  var handleLastPageButtonClick = function handleLastPageButtonClick(event) {
46
48
  onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
47
49
  };
50
+ var FirstButton = (_slots$firstButton = slots.firstButton) != null ? _slots$firstButton : IconButton;
51
+ var LastButton = (_slots$lastButton = slots.lastButton) != null ? _slots$lastButton : IconButton;
52
+ var NextButton = (_slots$nextButton = slots.nextButton) != null ? _slots$nextButton : IconButton;
53
+ var PreviousButton = (_slots$previousButton = slots.previousButton) != null ? _slots$previousButton : IconButton;
54
+ var FirstButtonIcon = (_slots$firstButtonIco = slots.firstButtonIcon) != null ? _slots$firstButtonIco : FirstPageIconDefault;
55
+ var LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
56
+ var NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
57
+ var PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
58
+ var FirstButtonSlot = theme.direction === 'rtl' ? LastButton : FirstButton;
59
+ var PreviousButtonSlot = theme.direction === 'rtl' ? NextButton : PreviousButton;
60
+ var NextButtonSlot = theme.direction === 'rtl' ? PreviousButton : NextButton;
61
+ var LastButtonSlot = theme.direction === 'rtl' ? FirstButton : LastButton;
62
+ var firstButtonSlotProps = theme.direction === 'rtl' ? slotProps.lastButton : slotProps.firstButton;
63
+ var previousButtonSlotProps = theme.direction === 'rtl' ? slotProps.nextButton : slotProps.previousButton;
64
+ var nextButtonSlotProps = theme.direction === 'rtl' ? slotProps.previousButton : slotProps.nextButton;
65
+ var lastButtonSlotProps = theme.direction === 'rtl' ? slotProps.firstButton : slotProps.lastButton;
48
66
  return /*#__PURE__*/_jsxs("div", _extends({
49
67
  ref: ref
50
68
  }, other, {
51
- children: [showFirstButton && /*#__PURE__*/_jsx(IconButton, _extends({
69
+ children: [showFirstButton && /*#__PURE__*/_jsx(FirstButtonSlot, _extends({
52
70
  onClick: handleFirstPageButtonClick,
53
71
  disabled: disabled || page === 0,
54
72
  "aria-label": getItemAriaLabel('first', page),
55
73
  title: getItemAriaLabel('first', page)
56
- }, (_slotProps$firstButto = slotProps == null ? void 0 : slotProps.firstButton) != null ? _slotProps$firstButto : {}, {
57
- children: theme.direction === 'rtl' ? _LastPageIcon || (_LastPageIcon = /*#__PURE__*/_jsx(LastPageIcon, {})) : _FirstPageIcon || (_FirstPageIcon = /*#__PURE__*/_jsx(FirstPageIcon, {}))
58
- })), /*#__PURE__*/_jsx(IconButton, _extends({
74
+ }, firstButtonSlotProps, {
75
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
76
+ })), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
59
77
  onClick: handleBackButtonClick,
60
78
  disabled: disabled || page === 0,
61
79
  color: "inherit",
62
80
  "aria-label": getItemAriaLabel('previous', page),
63
81
  title: getItemAriaLabel('previous', page)
64
- }, (_slotProps$previousBu = slotProps == null ? void 0 : slotProps.previousButton) != null ? _slotProps$previousBu : backIconButtonProps, {
65
- children: theme.direction === 'rtl' ? _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {})) : _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {}))
66
- })), /*#__PURE__*/_jsx(IconButton, _extends({
82
+ }, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
83
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
84
+ })), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
67
85
  onClick: handleNextButtonClick,
68
86
  disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
69
87
  color: "inherit",
70
88
  "aria-label": getItemAriaLabel('next', page),
71
89
  title: getItemAriaLabel('next', page)
72
- }, (_slotProps$nextButton = slotProps == null ? void 0 : slotProps.nextButton) != null ? _slotProps$nextButton : nextIconButtonProps, {
73
- children: theme.direction === 'rtl' ? _KeyboardArrowLeft2 || (_KeyboardArrowLeft2 = /*#__PURE__*/_jsx(KeyboardArrowLeft, {})) : _KeyboardArrowRight2 || (_KeyboardArrowRight2 = /*#__PURE__*/_jsx(KeyboardArrowRight, {}))
74
- })), showLastButton && /*#__PURE__*/_jsx(IconButton, _extends({
90
+ }, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
91
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
92
+ })), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
75
93
  onClick: handleLastPageButtonClick,
76
94
  disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
77
95
  "aria-label": getItemAriaLabel('last', page),
78
96
  title: getItemAriaLabel('last', page)
79
- }, (_slotProps$lastButton = slotProps == null ? void 0 : slotProps.lastButton) != null ? _slotProps$lastButton : {}, {
80
- children: theme.direction === 'rtl' ? _FirstPageIcon2 || (_FirstPageIcon2 = /*#__PURE__*/_jsx(FirstPageIcon, {})) : _LastPageIcon2 || (_LastPageIcon2 = /*#__PURE__*/_jsx(LastPageIcon, {}))
97
+ }, lastButtonSlotProps, {
98
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
81
99
  }))]
82
100
  }));
83
101
  });
@@ -138,9 +156,28 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
138
156
  */
139
157
  slotProps: PropTypes.shape({
140
158
  firstButton: PropTypes.object,
159
+ firstButtonIcon: PropTypes.object,
141
160
  lastButton: PropTypes.object,
161
+ lastButtonIcon: PropTypes.object,
142
162
  nextButton: PropTypes.object,
143
- previousButton: PropTypes.object
163
+ nextButtonIcon: PropTypes.object,
164
+ previousButton: PropTypes.object,
165
+ previousButtonIcon: PropTypes.object
166
+ }),
167
+ /**
168
+ * The components used for each slot inside the TablePaginationActions.
169
+ * Either a string to use a HTML element or a component.
170
+ * @default {}
171
+ */
172
+ slots: PropTypes.shape({
173
+ firstButton: PropTypes.elementType,
174
+ firstButtonIcon: PropTypes.elementType,
175
+ lastButton: PropTypes.elementType,
176
+ lastButtonIcon: PropTypes.elementType,
177
+ nextButton: PropTypes.elementType,
178
+ nextButtonIcon: PropTypes.elementType,
179
+ previousButton: PropTypes.elementType,
180
+ previousButtonIcon: PropTypes.elementType
144
181
  })
145
182
  } : void 0;
146
183
  export default TablePaginationActions;
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.15.0
2
+ * @mui/material v5.15.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the