@mui/material 6.2.0 → 6.3.0

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 (82) hide show
  1. package/AccordionSummary/AccordionSummary.js +4 -3
  2. package/Autocomplete/Autocomplete.js +7 -7
  3. package/AvatarGroup/AvatarGroup.js +5 -4
  4. package/Backdrop/Backdrop.js +1 -9
  5. package/CHANGELOG.md +76 -0
  6. package/CardHeader/CardHeader.js +7 -5
  7. package/Collapse/Collapse.js +5 -4
  8. package/Fade/Fade.js +5 -2
  9. package/FilledInput/FilledInput.js +1 -3
  10. package/FormControl/FormControl.js +5 -8
  11. package/FormLabel/FormLabel.js +5 -8
  12. package/Grow/Grow.js +5 -2
  13. package/Icon/Icon.js +1 -3
  14. package/Input/Input.js +1 -3
  15. package/OutlinedInput/OutlinedInput.js +1 -3
  16. package/Select/SelectInput.js +8 -0
  17. package/Slide/Slide.js +5 -2
  18. package/StepContent/StepContent.d.ts +31 -2
  19. package/StepContent/StepContent.js +39 -7
  20. package/StepLabel/StepLabel.js +1 -3
  21. package/SvgIcon/SvgIcon.js +1 -3
  22. package/TablePagination/TablePagination.d.ts +134 -18
  23. package/TablePagination/TablePagination.js +89 -33
  24. package/TextField/TextField.d.ts +1 -0
  25. package/TextField/TextField.js +1 -0
  26. package/Zoom/Zoom.js +5 -2
  27. package/index.js +1 -1
  28. package/modern/AccordionSummary/AccordionSummary.js +4 -3
  29. package/modern/Autocomplete/Autocomplete.js +7 -7
  30. package/modern/AvatarGroup/AvatarGroup.js +5 -4
  31. package/modern/Backdrop/Backdrop.js +1 -9
  32. package/modern/CardHeader/CardHeader.js +7 -5
  33. package/modern/Collapse/Collapse.js +5 -4
  34. package/modern/Fade/Fade.js +5 -2
  35. package/modern/FilledInput/FilledInput.js +1 -3
  36. package/modern/FormControl/FormControl.js +5 -8
  37. package/modern/FormLabel/FormLabel.js +5 -8
  38. package/modern/Grow/Grow.js +5 -2
  39. package/modern/Icon/Icon.js +1 -3
  40. package/modern/Input/Input.js +1 -3
  41. package/modern/OutlinedInput/OutlinedInput.js +1 -3
  42. package/modern/Select/SelectInput.js +8 -0
  43. package/modern/Slide/Slide.js +5 -2
  44. package/modern/StepContent/StepContent.js +39 -7
  45. package/modern/StepLabel/StepLabel.js +1 -3
  46. package/modern/SvgIcon/SvgIcon.js +1 -3
  47. package/modern/TablePagination/TablePagination.js +89 -33
  48. package/modern/TextField/TextField.js +1 -0
  49. package/modern/Zoom/Zoom.js +5 -2
  50. package/modern/index.js +1 -1
  51. package/modern/usePagination/usePagination.js +1 -1
  52. package/modern/version/index.js +2 -2
  53. package/node/AccordionSummary/AccordionSummary.js +4 -3
  54. package/node/Autocomplete/Autocomplete.js +7 -7
  55. package/node/AvatarGroup/AvatarGroup.js +5 -4
  56. package/node/Backdrop/Backdrop.js +1 -9
  57. package/node/CardHeader/CardHeader.js +7 -5
  58. package/node/Collapse/Collapse.js +5 -4
  59. package/node/Fade/Fade.js +5 -2
  60. package/node/FilledInput/FilledInput.js +1 -3
  61. package/node/FormControl/FormControl.js +5 -8
  62. package/node/FormLabel/FormLabel.js +5 -8
  63. package/node/Grow/Grow.js +5 -2
  64. package/node/Icon/Icon.js +1 -3
  65. package/node/Input/Input.js +1 -3
  66. package/node/OutlinedInput/OutlinedInput.js +1 -3
  67. package/node/Select/SelectInput.js +8 -0
  68. package/node/Slide/Slide.js +5 -2
  69. package/node/StepContent/StepContent.js +39 -7
  70. package/node/StepLabel/StepLabel.js +1 -3
  71. package/node/SvgIcon/SvgIcon.js +1 -3
  72. package/node/TablePagination/TablePagination.js +89 -33
  73. package/node/TextField/TextField.js +1 -0
  74. package/node/Zoom/Zoom.js +5 -2
  75. package/node/index.js +1 -1
  76. package/node/usePagination/usePagination.js +1 -1
  77. package/node/version/index.js +2 -2
  78. package/package.json +7 -7
  79. package/styles/useThemeProps.d.ts +27 -0
  80. package/useAutocomplete/useAutocomplete.d.ts +20 -5
  81. package/usePagination/usePagination.js +1 -1
  82. package/version/index.js +2 -2
@@ -181,7 +181,5 @@ process.env.NODE_ENV !== "production" ? Icon.propTypes /* remove-proptypes */ =
181
181
  */
182
182
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
183
183
  } : void 0;
184
- if (Icon) {
185
- Icon.muiName = 'Icon';
186
- }
184
+ Icon.muiName = 'Icon';
187
185
  export default Icon;
@@ -357,7 +357,5 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ =
357
357
  */
358
358
  value: PropTypes.any
359
359
  } : void 0;
360
- if (Input) {
361
- Input.muiName = 'Input';
362
- }
360
+ Input.muiName = 'Input';
363
361
  export default Input;
@@ -406,7 +406,5 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
406
406
  */
407
407
  value: PropTypes.any
408
408
  } : void 0;
409
- if (OutlinedInput) {
410
- OutlinedInput.muiName = 'Input';
411
- }
409
+ OutlinedInput.muiName = 'Input';
412
410
  export default OutlinedInput;
@@ -133,6 +133,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
133
133
  open: openProp,
134
134
  readOnly,
135
135
  renderValue,
136
+ required,
136
137
  SelectDisplayProps = {},
137
138
  tabIndex: tabIndexProp,
138
139
  // catching `type` from Input which makes no sense for SelectInput
@@ -449,6 +450,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
449
450
  "aria-label": ariaLabel,
450
451
  "aria-labelledby": [labelId, buttonId].filter(Boolean).join(' ') || undefined,
451
452
  "aria-describedby": ariaDescribedby,
453
+ "aria-required": required ? 'true' : undefined,
454
+ "aria-invalid": error ? 'true' : undefined,
452
455
  onKeyDown: handleKeyDown,
453
456
  onMouseDown: disabled || readOnly ? null : handleMouseDown,
454
457
  onBlur: handleBlur,
@@ -476,6 +479,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
476
479
  disabled: disabled,
477
480
  className: classes.nativeInput,
478
481
  autoFocus: autoFocus,
482
+ required: required,
479
483
  ...other,
480
484
  ownerState: ownerState
481
485
  }), /*#__PURE__*/_jsx(SelectIcon, {
@@ -641,6 +645,10 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
641
645
  * @returns {ReactNode}
642
646
  */
643
647
  renderValue: PropTypes.func,
648
+ /**
649
+ * If `true`, the component is required.
650
+ */
651
+ required: PropTypes.bool,
644
652
  /**
645
653
  * Props applied to the clickable div element.
646
654
  */
@@ -217,7 +217,10 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
217
217
  in: inProp,
218
218
  timeout: timeout,
219
219
  ...other,
220
- children: (state, childProps) => {
220
+ children: (state, {
221
+ ownerState,
222
+ ...restChildProps
223
+ }) => {
221
224
  return /*#__PURE__*/React.cloneElement(children, {
222
225
  ref: handleRef,
223
226
  style: {
@@ -225,7 +228,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
225
228
  ...style,
226
229
  ...children.props.style
227
230
  },
228
- ...childProps
231
+ ...restChildProps
229
232
  });
230
233
  }
231
234
  });
@@ -11,6 +11,7 @@ import Collapse from "../Collapse/index.js";
11
11
  import StepperContext from "../Stepper/StepperContext.js";
12
12
  import StepContext from "../Step/StepContext.js";
13
13
  import { getStepContentUtilityClass } from "./stepContentClasses.js";
14
+ import useSlot from "../utils/useSlot.js";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const useUtilityClasses = ownerState => {
16
17
  const {
@@ -66,6 +67,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
66
67
  TransitionComponent = Collapse,
67
68
  transitionDuration: transitionDurationProp = 'auto',
68
69
  TransitionProps,
70
+ slots = {},
71
+ slotProps = {},
69
72
  ...other
70
73
  } = props;
71
74
  const {
@@ -90,19 +93,32 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
90
93
  if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
91
94
  transitionDuration = undefined;
92
95
  }
96
+ const externalForwardedProps = {
97
+ slots,
98
+ slotProps: {
99
+ transition: TransitionProps,
100
+ ...slotProps
101
+ }
102
+ };
103
+ const [TransitionSlot, transitionProps] = useSlot('transition', {
104
+ elementType: StepContentTransition,
105
+ externalForwardedProps,
106
+ ownerState,
107
+ className: classes.transition,
108
+ additionalProps: {
109
+ in: active || expanded,
110
+ timeout: transitionDuration,
111
+ unmountOnExit: true
112
+ }
113
+ });
93
114
  return /*#__PURE__*/_jsx(StepContentRoot, {
94
115
  className: clsx(classes.root, className),
95
116
  ref: ref,
96
117
  ownerState: ownerState,
97
118
  ...other,
98
- children: /*#__PURE__*/_jsx(StepContentTransition, {
119
+ children: /*#__PURE__*/_jsx(TransitionSlot, {
99
120
  as: TransitionComponent,
100
- in: active || expanded,
101
- className: classes.transition,
102
- ownerState: ownerState,
103
- timeout: transitionDuration,
104
- unmountOnExit: true,
105
- ...TransitionProps,
121
+ ...transitionProps,
106
122
  children: children
107
123
  })
108
124
  });
@@ -124,6 +140,20 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
124
140
  * @ignore
125
141
  */
126
142
  className: PropTypes.string,
143
+ /**
144
+ * The props used for each slot inside.
145
+ * @default {}
146
+ */
147
+ slotProps: PropTypes.shape({
148
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
149
+ }),
150
+ /**
151
+ * The components used for each slot inside.
152
+ * @default {}
153
+ */
154
+ slots: PropTypes.shape({
155
+ transition: PropTypes.elementType
156
+ }),
127
157
  /**
128
158
  * The system prop that allows defining system overrides as well as additional CSS styles.
129
159
  */
@@ -132,6 +162,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
132
162
  * The component used for the transition.
133
163
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
134
164
  * @default Collapse
165
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
135
166
  */
136
167
  TransitionComponent: PropTypes.elementType,
137
168
  /**
@@ -149,6 +180,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
149
180
  /**
150
181
  * Props applied to the transition element.
151
182
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
183
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
152
184
  */
153
185
  TransitionProps: PropTypes.object
154
186
  } : void 0;
@@ -267,7 +267,5 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
267
267
  */
268
268
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
269
269
  } : void 0;
270
- if (StepLabel) {
271
- StepLabel.muiName = 'StepLabel';
272
- }
270
+ StepLabel.muiName = 'StepLabel';
273
271
  export default StepLabel;
@@ -230,7 +230,5 @@ process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */
230
230
  */
231
231
  viewBox: PropTypes.string
232
232
  } : void 0;
233
- if (SvgIcon) {
234
- SvgIcon.muiName = 'SvgIcon';
235
- }
233
+ SvgIcon.muiName = 'SvgIcon';
236
234
  export default SvgIcon;
@@ -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.
@@ -400,6 +400,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
400
400
  SelectProps: PropTypes.object,
401
401
  /**
402
402
  * The size of the component.
403
+ * @default 'medium'
403
404
  */
404
405
  size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
405
406
  /**
@@ -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/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.2.0
2
+ * @mui/material v6.3.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -95,7 +95,7 @@ export default function usePagination(props = {}) {
95
95
  page: item,
96
96
  selected: item === page,
97
97
  disabled,
98
- 'aria-current': item === page ? 'true' : undefined
98
+ 'aria-current': item === page ? 'page' : undefined
99
99
  } : {
100
100
  onClick: event => {
101
101
  handleClick(event, buttonPage(item));
@@ -1,6 +1,6 @@
1
- export const version = "6.2.0";
1
+ export const version = "6.3.0";
2
2
  export const major = Number("6");
3
- export const minor = Number("2");
3
+ export const minor = Number("3");
4
4
  export const patch = Number("0");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -45,6 +45,7 @@ const AccordionSummaryRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
45
45
  };
46
46
  return {
47
47
  display: 'flex',
48
+ width: '100%',
48
49
  minHeight: 48,
49
50
  padding: theme.spacing(0, 2),
50
51
  transition: theme.transitions.create(['min-height', 'background-color'], transition),
@@ -67,7 +68,7 @@ const AccordionSummaryRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
67
68
  }]
68
69
  };
69
70
  }));
70
- const AccordionSummaryContent = (0, _zeroStyled.styled)('div', {
71
+ const AccordionSummaryContent = (0, _zeroStyled.styled)('span', {
71
72
  name: 'MuiAccordionSummary',
72
73
  slot: 'Content',
73
74
  overridesResolver: (props, styles) => styles.content
@@ -75,6 +76,7 @@ const AccordionSummaryContent = (0, _zeroStyled.styled)('div', {
75
76
  theme
76
77
  }) => ({
77
78
  display: 'flex',
79
+ textAlign: 'start',
78
80
  flexGrow: 1,
79
81
  margin: '12px 0',
80
82
  variants: [{
@@ -89,7 +91,7 @@ const AccordionSummaryContent = (0, _zeroStyled.styled)('div', {
89
91
  }
90
92
  }]
91
93
  })));
92
- const AccordionSummaryExpandIconWrapper = (0, _zeroStyled.styled)('div', {
94
+ const AccordionSummaryExpandIconWrapper = (0, _zeroStyled.styled)('span', {
93
95
  name: 'MuiAccordionSummary',
94
96
  slot: 'ExpandIconWrapper',
95
97
  overridesResolver: (props, styles) => styles.expandIconWrapper
@@ -144,7 +146,6 @@ const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary
144
146
  focusRipple: false,
145
147
  disableRipple: true,
146
148
  disabled: disabled,
147
- component: "div",
148
149
  "aria-expanded": expanded,
149
150
  className: (0, _clsx.default)(classes.root, className),
150
151
  focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
@@ -264,12 +264,12 @@ const AutocompleteClearIndicator = (0, _zeroStyled.styled)(_IconButton.default,
264
264
  const AutocompletePopupIndicator = (0, _zeroStyled.styled)(_IconButton.default, {
265
265
  name: 'MuiAutocomplete',
266
266
  slot: 'PopupIndicator',
267
- overridesResolver: ({
268
- ownerState
269
- }, styles) => ({
270
- ...styles.popupIndicator,
271
- ...(ownerState.popupOpen && styles.popupIndicatorOpen)
272
- })
267
+ overridesResolver: (props, styles) => {
268
+ const {
269
+ ownerState
270
+ } = props;
271
+ return [styles.popupIndicator, ownerState.popupOpen && styles.popupIndicatorOpen];
272
+ }
273
273
  })({
274
274
  padding: 2,
275
275
  marginRight: -2,
@@ -964,7 +964,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
964
964
  * If provided, the options will be grouped under the returned string.
965
965
  * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
966
966
  *
967
- * @param {Value} options The options to group.
967
+ * @param {Value} option The Autocomplete option.
968
968
  * @returns {string}
969
969
  */
970
970
  groupBy: _propTypes.default.func,
@@ -37,10 +37,11 @@ const useUtilityClasses = ownerState => {
37
37
  const AvatarGroupRoot = (0, _zeroStyled.styled)('div', {
38
38
  name: 'MuiAvatarGroup',
39
39
  slot: 'Root',
40
- overridesResolver: (props, styles) => ({
41
- [`& .${_avatarGroupClasses.default.avatar}`]: styles.avatar,
42
- ...styles.root
43
- })
40
+ overridesResolver: (props, styles) => {
41
+ return [{
42
+ [`& .${_avatarGroupClasses.default.avatar}`]: styles.avatar
43
+ }, styles.root];
44
+ }
44
45
  })((0, _memoTheme.default)(({
45
46
  theme
46
47
  }) => ({
@@ -17,13 +17,6 @@ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
17
17
  var _Fade = _interopRequireDefault(require("../Fade"));
18
18
  var _backdropClasses = require("./backdropClasses");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
- const removeOwnerState = props => {
21
- const {
22
- ownerState,
23
- ...rest
24
- } = props;
25
- return rest;
26
- };
27
20
  const useUtilityClasses = ownerState => {
28
21
  const {
29
22
  classes,
@@ -112,12 +105,11 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
112
105
  externalForwardedProps,
113
106
  ownerState
114
107
  });
115
- const transitionPropsRemoved = removeOwnerState(transitionProps);
116
108
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionSlot, {
117
109
  in: open,
118
110
  timeout: transitionDuration,
119
111
  ...other,
120
- ...transitionPropsRemoved,
112
+ ...transitionProps,
121
113
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(RootSlot, {
122
114
  "aria-hidden": true,
123
115
  ...rootProps,
@@ -33,11 +33,13 @@ const useUtilityClasses = ownerState => {
33
33
  const CardHeaderRoot = (0, _zeroStyled.styled)('div', {
34
34
  name: 'MuiCardHeader',
35
35
  slot: 'Root',
36
- overridesResolver: (props, styles) => ({
37
- [`& .${_cardHeaderClasses.default.title}`]: styles.title,
38
- [`& .${_cardHeaderClasses.default.subheader}`]: styles.subheader,
39
- ...styles.root
40
- })
36
+ overridesResolver: (props, styles) => {
37
+ return [{
38
+ [`& .${_cardHeaderClasses.default.title}`]: styles.title
39
+ }, {
40
+ [`& .${_cardHeaderClasses.default.subheader}`]: styles.subheader
41
+ }, styles.root];
42
+ }
41
43
  })({
42
44
  display: 'flex',
43
45
  alignItems: 'center',
@@ -279,7 +279,10 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
279
279
  nodeRef: nodeRef,
280
280
  timeout: timeout === 'auto' ? null : timeout,
281
281
  ...other,
282
- children: (state, childProps) => /*#__PURE__*/(0, _jsxRuntime.jsx)(CollapseRoot, {
282
+ children: (state, {
283
+ ownerState: incomingOwnerState,
284
+ ...restChildProps
285
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(CollapseRoot, {
283
286
  as: component,
284
287
  className: (0, _clsx.default)(classes.root, className, {
285
288
  'entered': classes.entered,
@@ -290,13 +293,11 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
290
293
  ...style
291
294
  },
292
295
  ref: handleRef,
293
- ...childProps,
294
- // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
295
- // that might have been forwarded from the Transition component.
296
296
  ownerState: {
297
297
  ...ownerState,
298
298
  state
299
299
  },
300
+ ...restChildProps,
300
301
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CollapseWrapper, {
301
302
  ownerState: {
302
303
  ...ownerState,
package/node/Fade/Fade.js CHANGED
@@ -121,7 +121,10 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
121
121
  addEndListener: handleAddEndListener,
122
122
  timeout: timeout,
123
123
  ...other,
124
- children: (state, childProps) => {
124
+ children: (state, {
125
+ ownerState,
126
+ ...restChildProps
127
+ }) => {
125
128
  return /*#__PURE__*/React.cloneElement(children, {
126
129
  style: {
127
130
  opacity: 0,
@@ -131,7 +134,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
131
134
  ...children.props.style
132
135
  },
133
136
  ref: handleRef,
134
- ...childProps
137
+ ...restChildProps
135
138
  });
136
139
  }
137
140
  });
@@ -519,7 +519,5 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
519
519
  */
520
520
  value: _propTypes.default.any
521
521
  } : void 0;
522
- if (FilledInput) {
523
- FilledInput.muiName = 'Input';
524
- }
522
+ FilledInput.muiName = 'Input';
525
523
  var _default = exports.default = FilledInput;
@@ -33,14 +33,11 @@ const useUtilityClasses = ownerState => {
33
33
  const FormControlRoot = (0, _zeroStyled.styled)('div', {
34
34
  name: 'MuiFormControl',
35
35
  slot: 'Root',
36
- overridesResolver: ({
37
- ownerState
38
- }, styles) => {
39
- return {
40
- ...styles.root,
41
- ...styles[`margin${(0, _capitalize.default)(ownerState.margin)}`],
42
- ...(ownerState.fullWidth && styles.fullWidth)
43
- };
36
+ overridesResolver: (props, styles) => {
37
+ const {
38
+ ownerState
39
+ } = props;
40
+ return [styles.root, styles[`margin${(0, _capitalize.default)(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];
44
41
  }
45
42
  })({
46
43
  display: 'inline-flex',