@mui/material 6.2.1 → 6.3.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 (71) hide show
  1. package/AccordionSummary/AccordionSummary.js +4 -3
  2. package/AppBar/AppBar.d.ts +1 -1
  3. package/AppBar/AppBar.js +1 -1
  4. package/Autocomplete/Autocomplete.js +36 -49
  5. package/Backdrop/Backdrop.js +1 -9
  6. package/CHANGELOG.md +77 -0
  7. package/Collapse/Collapse.js +5 -4
  8. package/Fade/Fade.js +5 -2
  9. package/FilledInput/FilledInput.js +1 -3
  10. package/Grow/Grow.js +5 -2
  11. package/Icon/Icon.js +1 -3
  12. package/Input/Input.js +1 -3
  13. package/OutlinedInput/OutlinedInput.js +1 -3
  14. package/Select/selectClasses.d.ts +9 -3
  15. package/Slide/Slide.js +5 -2
  16. package/StepContent/StepContent.d.ts +31 -2
  17. package/StepContent/StepContent.js +39 -7
  18. package/StepLabel/StepLabel.js +1 -3
  19. package/SvgIcon/SvgIcon.js +1 -3
  20. package/TablePagination/TablePagination.d.ts +134 -18
  21. package/TablePagination/TablePagination.js +89 -33
  22. package/TableSortLabel/TableSortLabel.d.ts +43 -1
  23. package/TableSortLabel/TableSortLabel.js +40 -7
  24. package/Tooltip/Tooltip.js +1 -1
  25. package/Zoom/Zoom.js +5 -2
  26. package/index.js +1 -1
  27. package/modern/AccordionSummary/AccordionSummary.js +4 -3
  28. package/modern/AppBar/AppBar.js +1 -1
  29. package/modern/Autocomplete/Autocomplete.js +36 -49
  30. package/modern/Backdrop/Backdrop.js +1 -9
  31. package/modern/Collapse/Collapse.js +5 -4
  32. package/modern/Fade/Fade.js +5 -2
  33. package/modern/FilledInput/FilledInput.js +1 -3
  34. package/modern/Grow/Grow.js +5 -2
  35. package/modern/Icon/Icon.js +1 -3
  36. package/modern/Input/Input.js +1 -3
  37. package/modern/OutlinedInput/OutlinedInput.js +1 -3
  38. package/modern/Slide/Slide.js +5 -2
  39. package/modern/StepContent/StepContent.js +39 -7
  40. package/modern/StepLabel/StepLabel.js +1 -3
  41. package/modern/SvgIcon/SvgIcon.js +1 -3
  42. package/modern/TablePagination/TablePagination.js +89 -33
  43. package/modern/TableSortLabel/TableSortLabel.js +40 -7
  44. package/modern/Tooltip/Tooltip.js +1 -1
  45. package/modern/Zoom/Zoom.js +5 -2
  46. package/modern/index.js +1 -1
  47. package/modern/version/index.js +2 -2
  48. package/node/AccordionSummary/AccordionSummary.js +4 -3
  49. package/node/AppBar/AppBar.js +1 -1
  50. package/node/Autocomplete/Autocomplete.js +36 -49
  51. package/node/Backdrop/Backdrop.js +1 -9
  52. package/node/Collapse/Collapse.js +5 -4
  53. package/node/Fade/Fade.js +5 -2
  54. package/node/FilledInput/FilledInput.js +1 -3
  55. package/node/Grow/Grow.js +5 -2
  56. package/node/Icon/Icon.js +1 -3
  57. package/node/Input/Input.js +1 -3
  58. package/node/OutlinedInput/OutlinedInput.js +1 -3
  59. package/node/Slide/Slide.js +5 -2
  60. package/node/StepContent/StepContent.js +39 -7
  61. package/node/StepLabel/StepLabel.js +1 -3
  62. package/node/SvgIcon/SvgIcon.js +1 -3
  63. package/node/TablePagination/TablePagination.js +89 -33
  64. package/node/TableSortLabel/TableSortLabel.js +40 -7
  65. package/node/Tooltip/Tooltip.js +1 -1
  66. package/node/Zoom/Zoom.js +5 -2
  67. package/node/index.js +1 -1
  68. package/node/version/index.js +2 -2
  69. package/package.json +6 -6
  70. package/useAutocomplete/useAutocomplete.d.ts +20 -5
  71. package/version/index.js +2 -2
@@ -2,11 +2,14 @@ import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { Theme } from '../styles';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
- import { TablePaginationActionsProps } from './TablePaginationActions';
5
+ import { TablePaginationActionsProps, TablePaginationActionsSlots } from './TablePaginationActions';
6
6
  import { TableCellProps } from '../TableCell';
7
7
  import { IconButtonProps } from '../IconButton';
8
8
  import { SelectProps } from '../Select';
9
9
  import { TablePaginationClasses } from './tablePaginationClasses';
10
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
11
+ import { ToolbarProps } from '../Toolbar';
12
+ import { MenuItemProps } from '../MenuItem';
10
13
 
11
14
  export interface LabelDisplayedRowsArgs {
12
15
  from: number;
@@ -15,6 +18,133 @@ export interface LabelDisplayedRowsArgs {
15
18
  page: number;
16
19
  }
17
20
 
21
+ export interface TablePaginationRootSlotPropsOverrides {}
22
+
23
+ export interface TablePaginationToolbarSlotPropsOverrides {}
24
+
25
+ export interface TablePaginationSpacerSlotPropsOverrides {}
26
+
27
+ export interface TablePaginationSelectLabelSlotPropsOverrides {}
28
+
29
+ export interface TablePaginationSelectSlotPropsOverrides {}
30
+
31
+ export interface TablePaginationMenuItemSlotPropsOverrides {}
32
+
33
+ export interface TablePaginationDisplayedRowsSlotPropsOverrides {}
34
+
35
+ export interface TablePaginationActionsSlotPropsOverrides {}
36
+
37
+ export interface TablePaginationSlots {
38
+ /**
39
+ * The component that renders the root slot.
40
+ * [Follow this guide](https://mui.com/material-ui/api/table-cell/#props) to learn more about the requirements for this component.
41
+ * @default TableCell
42
+ */
43
+ root: React.ElementType;
44
+ /**
45
+ * The component that renders the toolbar slot.
46
+ * [Follow this guide](https://mui.com/material-ui/api/toolbar/#props) to learn more about the requirements for this component.
47
+ * @default Toolbar
48
+ */
49
+ toolbar: React.ElementType;
50
+ /**
51
+ * The tag that renders the spacer slot.
52
+ * @default 'div'
53
+ */
54
+ spacer: React.ElementType;
55
+ /**
56
+ * The tag that renders the selectLabel slot.
57
+ * @default 'p'
58
+ */
59
+ selectLabel: React.ElementType;
60
+ /**
61
+ * The component that renders the select slot.
62
+ * [Follow this guide](https://mui.com/material-ui/api/select/#props) to learn more about the requirements for this component.
63
+ * @default Select
64
+ */
65
+ select: React.ElementType;
66
+ /**
67
+ * The component that renders the select slot.
68
+ * [Follow this guide](https://mui.com/material-ui/api/menu-item/#props) to learn more about the requirements for this component.
69
+ * @default MenuItem
70
+ */
71
+ menuItem: React.ElementType;
72
+ /**
73
+ * The tag that renders the displayedRows slot.
74
+ * @default 'p'
75
+ */
76
+ displayedRows: React.ElementType;
77
+ /**
78
+ * The slots that passed to the actions slot.
79
+ */
80
+ actions: TablePaginationActionsSlots;
81
+ }
82
+
83
+ export type TablePaginationSlotsAndSlotProps = CreateSlotsAndSlotProps<
84
+ TablePaginationSlots,
85
+ {
86
+ /**
87
+ * Props forwarded to the root slot.
88
+ * By default, the avaible props are based on the [TableCell](https://mui.com/material-ui/api/table-cell/#props) component.
89
+ */
90
+ root: SlotProps<
91
+ React.ElementType<TableCellProps>,
92
+ TablePaginationRootSlotPropsOverrides,
93
+ TablePaginationOwnerState
94
+ >;
95
+ /**
96
+ * Props forwarded to the toolbar slot.
97
+ * By default, the avaible props are based on the [Toolbar](https://mui.com/material-ui/api/toolbar/#props) component.
98
+ */
99
+ toolbar: SlotProps<
100
+ React.ElementType<ToolbarProps>,
101
+ TablePaginationToolbarSlotPropsOverrides,
102
+ TablePaginationOwnerState
103
+ >;
104
+ /**
105
+ * Props forwarded to the spacer slot.
106
+ * By default, the avaible props are based on the div element.
107
+ */
108
+ spacer: SlotProps<'div', TablePaginationSpacerSlotPropsOverrides, TablePaginationOwnerState>;
109
+ /**
110
+ * Props forwarded to the selectLabel slot.
111
+ * By default, the avaible props are based on the paragraph element.
112
+ */
113
+ selectLabel: SlotProps<
114
+ 'p',
115
+ TablePaginationSelectLabelSlotPropsOverrides,
116
+ TablePaginationOwnerState
117
+ >;
118
+ /**
119
+ * Props forwarded to the select slot.
120
+ * By default, the avaible props are based on the [Select](https://mui.com/material-ui/api/select/#props) component.
121
+ */
122
+ select: Partial<SelectProps> & TablePaginationSelectSlotPropsOverrides;
123
+ /**
124
+ * Props forwarded to the menuItem slot.
125
+ * By default, the avaible props are based on the [MenuItem](https://mui.com/material-ui/api/menu-item/#props) component.
126
+ */
127
+ menuItem: SlotProps<
128
+ React.ElementType<MenuItemProps>,
129
+ TablePaginationMenuItemSlotPropsOverrides,
130
+ TablePaginationOwnerState
131
+ >;
132
+ /**
133
+ * Props forwarded to the displayedRows slot.
134
+ * By default, the avaible props are based on the paragraph element.
135
+ */
136
+ displayedRows: SlotProps<
137
+ 'p',
138
+ TablePaginationDisplayedRowsSlotPropsOverrides,
139
+ TablePaginationOwnerState
140
+ >;
141
+ /**
142
+ * Props forwarded to the actions slot.
143
+ */
144
+ actions: TablePaginationActionsProps['slotProps'] & TablePaginationActionsSlotPropsOverrides;
145
+ }
146
+ >;
147
+
18
148
  /**
19
149
  * This type is kept for compatibility. Use `TablePaginationOwnProps` instead.
20
150
  */
@@ -134,30 +264,16 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
134
264
  * @default false
135
265
  */
136
266
  showLastButton?: boolean;
137
- /**
138
- * The props used for each slot inside the TablePagination.
139
- * @default {}
140
- */
141
- slotProps?: {
142
- actions?: TablePaginationActionsProps['slotProps'];
143
- select?: Partial<SelectProps>;
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
- };
153
267
  /**
154
268
  * The system prop that allows defining system overrides as well as additional CSS styles.
155
269
  */
156
270
  sx?: SxProps<Theme>;
157
271
  }
158
272
 
273
+ export interface TablePaginationOwnerState extends TablePaginationOwnProps {}
274
+
159
275
  export interface TablePaginationTypeMap<AdditionalProps, RootComponent extends React.ElementType> {
160
- props: AdditionalProps & TablePaginationOwnProps;
276
+ props: AdditionalProps & TablePaginationOwnProps & TablePaginationSlotsAndSlotProps;
161
277
  defaultComponent: RootComponent;
162
278
  }
163
279
 
@@ -7,7 +7,6 @@ import clsx from 'clsx';
7
7
  import integerPropType from '@mui/utils/integerPropType';
8
8
  import chainPropTypes from '@mui/utils/chainPropTypes';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import isHostComponent from "../utils/isHostComponent.js";
11
10
  import { styled } from "../zero-styled/index.js";
12
11
  import memoTheme from "../utils/memoTheme.js";
13
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
@@ -19,6 +18,7 @@ import Toolbar from "../Toolbar/index.js";
19
18
  import TablePaginationActions from "./TablePaginationActions.js";
20
19
  import useId from "../utils/useId.js";
21
20
  import tablePaginationClasses, { getTablePaginationUtilityClass } from "./tablePaginationClasses.js";
21
+ import useSlot from "../utils/useSlot.js";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  import { createElement as _createElement } from "react";
24
24
  const TablePaginationRoot = styled(TableCell, {
@@ -154,7 +154,6 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
154
154
  const {
155
155
  ActionsComponent = TablePaginationActions,
156
156
  backIconButtonProps,
157
- className,
158
157
  colSpan: colSpanProp,
159
158
  component = TableCell,
160
159
  count,
@@ -191,22 +190,73 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
191
190
  }
192
191
  return rowsPerPage === -1 ? count : Math.min(count, (page + 1) * rowsPerPage);
193
192
  };
194
- return /*#__PURE__*/_jsx(TablePaginationRoot, {
195
- colSpan: colSpan,
196
- ref: ref,
197
- as: component,
198
- ownerState: ownerState,
199
- className: clsx(classes.root, className),
200
- ...other,
201
- children: /*#__PURE__*/_jsxs(TablePaginationToolbar, {
202
- className: classes.toolbar,
203
- children: [/*#__PURE__*/_jsx(TablePaginationSpacer, {
204
- className: classes.spacer
205
- }), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(TablePaginationSelectLabel, {
206
- className: classes.selectLabel,
207
- id: labelId,
193
+ const externalForwardedProps = {
194
+ slots,
195
+ slotProps
196
+ };
197
+ const [RootSlot, rootSlotProps] = useSlot('root', {
198
+ ref,
199
+ className: classes.root,
200
+ elementType: TablePaginationRoot,
201
+ externalForwardedProps: {
202
+ ...externalForwardedProps,
203
+ component,
204
+ ...other
205
+ },
206
+ ownerState,
207
+ additionalProps: {
208
+ colSpan
209
+ }
210
+ });
211
+ const [ToolbarSlot, toolbarSlotProps] = useSlot('toolbar', {
212
+ className: classes.toolbar,
213
+ elementType: TablePaginationToolbar,
214
+ externalForwardedProps,
215
+ ownerState
216
+ });
217
+ const [SpacerSlot, spacerSlotProps] = useSlot('spacer', {
218
+ className: classes.spacer,
219
+ elementType: TablePaginationSpacer,
220
+ externalForwardedProps,
221
+ ownerState
222
+ });
223
+ const [SelectLabelSlot, selectLabelSlotProps] = useSlot('selectLabel', {
224
+ className: classes.selectLabel,
225
+ elementType: TablePaginationSelectLabel,
226
+ externalForwardedProps,
227
+ ownerState,
228
+ additionalProps: {
229
+ id: labelId
230
+ }
231
+ });
232
+ const [SelectSlot, selectSlotProps] = useSlot('select', {
233
+ className: classes.select,
234
+ elementType: TablePaginationSelect,
235
+ externalForwardedProps,
236
+ ownerState
237
+ });
238
+ const [MenuItemSlot, menuItemSlotProps] = useSlot('menuItem', {
239
+ className: classes.menuItem,
240
+ elementType: MenuItemComponent,
241
+ externalForwardedProps,
242
+ ownerState
243
+ });
244
+ const [DisplayedRows, displayedRowsProps] = useSlot('displayedRows', {
245
+ className: classes.displayedRows,
246
+ elementType: TablePaginationDisplayedRows,
247
+ externalForwardedProps,
248
+ ownerState
249
+ });
250
+ return /*#__PURE__*/_jsx(RootSlot, {
251
+ ...rootSlotProps,
252
+ children: /*#__PURE__*/_jsxs(ToolbarSlot, {
253
+ ...toolbarSlotProps,
254
+ children: [/*#__PURE__*/_jsx(SpacerSlot, {
255
+ ...spacerSlotProps
256
+ }), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectLabelSlot, {
257
+ ...selectLabelSlotProps,
208
258
  children: labelRowsPerPage
209
- }), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(TablePaginationSelect, {
259
+ }), rowsPerPageOptions.length > 1 && /*#__PURE__*/_jsx(SelectSlot, {
210
260
  variant: "standard",
211
261
  ...(!selectProps.variant && {
212
262
  input: _InputBase || (_InputBase = /*#__PURE__*/_jsx(InputBase, {}))
@@ -225,16 +275,14 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
225
275
  icon: clsx(classes.selectIcon, (selectProps.classes || {}).icon)
226
276
  },
227
277
  disabled: disabled,
228
- children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItemComponent, {
229
- ...(!isHostComponent(MenuItemComponent) && {
230
- ownerState
231
- }),
232
- className: classes.menuItem,
278
+ ...selectSlotProps,
279
+ children: rowsPerPageOptions.map(rowsPerPageOption => /*#__PURE__*/_createElement(MenuItemSlot, {
280
+ ...menuItemSlotProps,
233
281
  key: rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption,
234
282
  value: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption
235
283
  }, rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption))
236
- }), /*#__PURE__*/_jsx(TablePaginationDisplayedRows, {
237
- className: classes.displayedRows,
284
+ }), /*#__PURE__*/_jsx(DisplayedRows, {
285
+ ...displayedRowsProps,
238
286
  children: labelDisplayedRows({
239
287
  from: count === 0 ? 0 : page * rowsPerPage + 1,
240
288
  to: getLabelDisplayedRowsTo(),
@@ -281,10 +329,6 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
281
329
  * Override or extend the styles applied to the component.
282
330
  */
283
331
  classes: PropTypes.object,
284
- /**
285
- * @ignore
286
- */
287
- className: PropTypes.string,
288
332
  /**
289
333
  * @ignore
290
334
  */
@@ -408,7 +452,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
408
452
  */
409
453
  showLastButton: PropTypes.bool,
410
454
  /**
411
- * The props used for each slot inside the TablePagination.
455
+ * The props used for each slot inside.
412
456
  * @default {}
413
457
  */
414
458
  slotProps: PropTypes.shape({
@@ -422,11 +466,16 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
422
466
  previousButton: PropTypes.object,
423
467
  previousButtonIcon: PropTypes.object
424
468
  }),
425
- select: PropTypes.object
469
+ displayedRows: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
470
+ menuItem: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
471
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
472
+ select: PropTypes.object,
473
+ selectLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
474
+ spacer: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
475
+ toolbar: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
426
476
  }),
427
477
  /**
428
- * The components used for each slot inside the TablePagination.
429
- * Either a string to use a HTML element or a component.
478
+ * The components used for each slot inside.
430
479
  * @default {}
431
480
  */
432
481
  slots: PropTypes.shape({
@@ -439,7 +488,14 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
439
488
  nextButtonIcon: PropTypes.elementType,
440
489
  previousButton: PropTypes.elementType,
441
490
  previousButtonIcon: PropTypes.elementType
442
- })
491
+ }),
492
+ displayedRows: PropTypes.elementType,
493
+ menuItem: PropTypes.elementType,
494
+ root: PropTypes.elementType,
495
+ select: PropTypes.elementType,
496
+ selectLabel: PropTypes.elementType,
497
+ spacer: PropTypes.elementType,
498
+ toolbar: PropTypes.elementType
443
499
  }),
444
500
  /**
445
501
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -4,6 +4,48 @@ import { Theme } from '..';
4
4
  import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
5
5
  import { OverrideProps } from '../OverridableComponent';
6
6
  import { TableSortLabelClasses } from './tableSortLabelClasses';
7
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
8
+
9
+ export interface TableSortLabelRootSlotPropsOverrides {}
10
+
11
+ export interface TableSortLabelIconSlotPropsOverrides {}
12
+
13
+ export interface TableSortLabelSlots {
14
+ /**
15
+ * The component that renders the root slot.
16
+ * @default span
17
+ */
18
+ root?: React.ElementType;
19
+ /**
20
+ * The component that renders the icon slot.
21
+ * @default ArrowDownwardIcon
22
+ */
23
+ icon?: React.ElementType;
24
+ }
25
+
26
+ export type TableSortLabelSlotsAndSlotProps = CreateSlotsAndSlotProps<
27
+ TableSortLabelSlots,
28
+ {
29
+ /**
30
+ * Props forwarded to the root slot.
31
+ */
32
+ root: SlotProps<
33
+ React.ElementType<React.HTMLAttributes<HTMLSpanElement>>,
34
+ TableSortLabelRootSlotPropsOverrides,
35
+ TableSortLabelOwnerState
36
+ >;
37
+ /**
38
+ * Props forwarded to the icon slot.
39
+ */
40
+ icon: SlotProps<
41
+ React.ElementType<React.SVGAttributes<SVGSVGElement>>,
42
+ TableSortLabelIconSlotPropsOverrides,
43
+ TableSortLabelOwnerState
44
+ >;
45
+ }
46
+ >;
47
+
48
+ export interface TableSortLabelOwnerState extends TableSortLabelOwnProps {}
7
49
 
8
50
  export interface TableSortLabelOwnProps {
9
51
  /**
@@ -46,7 +88,7 @@ export type TableSortLabelTypeMap<
46
88
  AdditionalProps = {},
47
89
  RootComponent extends React.ElementType = 'span',
48
90
  > = ExtendButtonBaseTypeMap<{
49
- props: AdditionalProps & TableSortLabelOwnProps;
91
+ props: AdditionalProps & TableSortLabelOwnProps & TableSortLabelSlotsAndSlotProps;
50
92
  defaultComponent: RootComponent;
51
93
  }>;
52
94
 
@@ -11,6 +11,7 @@ import memoTheme from "../utils/memoTheme.js";
11
11
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
12
12
  import capitalize from "../utils/capitalize.js";
13
13
  import tableSortLabelClasses, { getTableSortLabelUtilityClass } from "./tableSortLabelClasses.js";
14
+ import useSlot from "../utils/useSlot.js";
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const useUtilityClasses = ownerState => {
16
17
  const {
@@ -110,6 +111,8 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
110
111
  direction = 'asc',
111
112
  hideSortIcon = false,
112
113
  IconComponent = ArrowDownwardIcon,
114
+ slots = {},
115
+ slotProps = {},
113
116
  ...other
114
117
  } = props;
115
118
  const ownerState = {
@@ -120,17 +123,31 @@ const TableSortLabel = /*#__PURE__*/React.forwardRef(function TableSortLabel(inP
120
123
  IconComponent
121
124
  };
122
125
  const classes = useUtilityClasses(ownerState);
123
- return /*#__PURE__*/_jsxs(TableSortLabelRoot, {
126
+ const externalForwardedProps = {
127
+ slots,
128
+ slotProps
129
+ };
130
+ const [RootSlot, rootProps] = useSlot('root', {
131
+ elementType: TableSortLabelRoot,
132
+ externalForwardedProps,
133
+ ownerState,
124
134
  className: clsx(classes.root, className),
125
- component: "span",
135
+ ref
136
+ });
137
+ const [IconSlot, iconProps] = useSlot('icon', {
138
+ elementType: TableSortLabelIcon,
139
+ externalForwardedProps,
140
+ ownerState,
141
+ className: classes.icon
142
+ });
143
+ return /*#__PURE__*/_jsxs(RootSlot, {
126
144
  disableRipple: true,
127
- ownerState: ownerState,
128
- ref: ref,
145
+ component: "span",
146
+ ...rootProps,
129
147
  ...other,
130
- children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(TableSortLabelIcon, {
148
+ children: [children, hideSortIcon && !active ? null : /*#__PURE__*/_jsx(IconSlot, {
131
149
  as: IconComponent,
132
- className: clsx(classes.icon),
133
- ownerState: ownerState
150
+ ...iconProps
134
151
  })]
135
152
  });
136
153
  });
@@ -171,6 +188,22 @@ process.env.NODE_ENV !== "production" ? TableSortLabel.propTypes /* remove-propt
171
188
  * @default ArrowDownwardIcon
172
189
  */
173
190
  IconComponent: PropTypes.elementType,
191
+ /**
192
+ * The props used for each slot inside.
193
+ * @default {}
194
+ */
195
+ slotProps: PropTypes.shape({
196
+ icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
197
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
198
+ }),
199
+ /**
200
+ * The components used for each slot inside.
201
+ * @default {}
202
+ */
203
+ slots: PropTypes.shape({
204
+ icon: PropTypes.elementType,
205
+ root: PropTypes.elementType
206
+ }),
174
207
  /**
175
208
  * The system prop that allows defining system overrides as well as additional CSS styles.
176
209
  */
@@ -379,7 +379,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
379
379
  // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes
380
380
  React.useEffect(() => {
381
381
  if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
382
- console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
382
+ console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
383
383
  }
384
384
  }, [title, childNode, isControlled]);
385
385
  }
package/Zoom/Zoom.js CHANGED
@@ -114,7 +114,10 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
114
114
  addEndListener: handleAddEndListener,
115
115
  timeout: timeout,
116
116
  ...other,
117
- children: (state, childProps) => {
117
+ children: (state, {
118
+ ownerState,
119
+ ...restChildProps
120
+ }) => {
118
121
  return /*#__PURE__*/React.cloneElement(children, {
119
122
  style: {
120
123
  transform: 'scale(0)',
@@ -124,7 +127,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
124
127
  ...children.props.style
125
128
  },
126
129
  ref: handleRef,
127
- ...childProps
130
+ ...restChildProps
128
131
  });
129
132
  }
130
133
  });
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.2.1
2
+ * @mui/material v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -38,6 +38,7 @@ const AccordionSummaryRoot = styled(ButtonBase, {
38
38
  };
39
39
  return {
40
40
  display: 'flex',
41
+ width: '100%',
41
42
  minHeight: 48,
42
43
  padding: theme.spacing(0, 2),
43
44
  transition: theme.transitions.create(['min-height', 'background-color'], transition),
@@ -60,7 +61,7 @@ const AccordionSummaryRoot = styled(ButtonBase, {
60
61
  }]
61
62
  };
62
63
  }));
63
- const AccordionSummaryContent = styled('div', {
64
+ const AccordionSummaryContent = styled('span', {
64
65
  name: 'MuiAccordionSummary',
65
66
  slot: 'Content',
66
67
  overridesResolver: (props, styles) => styles.content
@@ -68,6 +69,7 @@ const AccordionSummaryContent = styled('div', {
68
69
  theme
69
70
  }) => ({
70
71
  display: 'flex',
72
+ textAlign: 'start',
71
73
  flexGrow: 1,
72
74
  margin: '12px 0',
73
75
  variants: [{
@@ -82,7 +84,7 @@ const AccordionSummaryContent = styled('div', {
82
84
  }
83
85
  }]
84
86
  })));
85
- const AccordionSummaryExpandIconWrapper = styled('div', {
87
+ const AccordionSummaryExpandIconWrapper = styled('span', {
86
88
  name: 'MuiAccordionSummary',
87
89
  slot: 'ExpandIconWrapper',
88
90
  overridesResolver: (props, styles) => styles.expandIconWrapper
@@ -137,7 +139,6 @@ const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary
137
139
  focusRipple: false,
138
140
  disableRipple: true,
139
141
  disabled: disabled,
140
- component: "div",
141
142
  "aria-expanded": expanded,
142
143
  className: clsx(classes.root, className),
143
144
  focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
@@ -214,7 +214,7 @@ process.env.NODE_ENV !== "production" ? AppBar.propTypes /* remove-proptypes */
214
214
  enableColorOnDark: PropTypes.bool,
215
215
  /**
216
216
  * The positioning type. The behavior of the different options is described
217
- * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
217
+ * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/position).
218
218
  * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
219
219
  * @default 'fixed'
220
220
  */