@mui/material 5.10.11 → 5.10.13

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 (127) hide show
  1. package/Alert/Alert.d.ts +34 -3
  2. package/Alert/Alert.js +46 -9
  3. package/Autocomplete/Autocomplete.d.ts +10 -0
  4. package/Autocomplete/Autocomplete.js +27 -11
  5. package/AvatarGroup/AvatarGroup.d.ts +18 -1
  6. package/AvatarGroup/AvatarGroup.js +25 -6
  7. package/Backdrop/Backdrop.d.ts +33 -3
  8. package/Backdrop/Backdrop.js +46 -11
  9. package/Badge/Badge.d.ts +11 -3
  10. package/Badge/Badge.js +11 -3
  11. package/ButtonBase/TouchRipple.js +1 -1
  12. package/CHANGELOG.md +134 -0
  13. package/Chip/Chip.js +8 -4
  14. package/FilledInput/FilledInput.js +48 -9
  15. package/FormControl/FormControl.js +29 -29
  16. package/FormControlLabel/FormControlLabel.d.ts +12 -0
  17. package/FormControlLabel/FormControlLabel.js +17 -5
  18. package/Input/Input.js +49 -10
  19. package/InputBase/InputBase.d.ts +34 -3
  20. package/InputBase/InputBase.js +45 -8
  21. package/ListItem/ListItem.d.ts +32 -3
  22. package/ListItem/ListItem.js +43 -11
  23. package/ListItemButton/ListItemButton.js +2 -2
  24. package/MenuItem/MenuItem.js +2 -2
  25. package/Modal/Modal.d.ts +11 -3
  26. package/Modal/Modal.js +11 -3
  27. package/NativeSelect/NativeSelectInput.js +11 -9
  28. package/OutlinedInput/OutlinedInput.js +26 -8
  29. package/PaginationItem/PaginationItem.d.ts +19 -7
  30. package/PaginationItem/PaginationItem.js +31 -22
  31. package/README.md +1 -0
  32. package/Radio/Radio.js +2 -1
  33. package/RadioGroup/RadioGroup.js +12 -12
  34. package/Select/Select.d.ts +3 -3
  35. package/Select/Select.js +3 -3
  36. package/Slider/Slider.d.ts +14 -2
  37. package/Slider/Slider.js +12 -3
  38. package/StepLabel/StepLabel.d.ts +11 -0
  39. package/StepLabel/StepLabel.js +15 -3
  40. package/SwipeableDrawer/SwipeableDrawer.js +10 -2
  41. package/Tooltip/Tooltip.d.ts +43 -6
  42. package/Tooltip/Tooltip.js +69 -32
  43. package/Unstable_Grid2/Grid2Props.d.ts +1 -1
  44. package/esm/Alert/Alert.js +46 -9
  45. package/esm/Autocomplete/Autocomplete.js +27 -11
  46. package/esm/AvatarGroup/AvatarGroup.js +25 -6
  47. package/esm/Backdrop/Backdrop.js +46 -11
  48. package/esm/Badge/Badge.js +11 -3
  49. package/esm/ButtonBase/TouchRipple.js +1 -1
  50. package/esm/Chip/Chip.js +8 -4
  51. package/esm/FilledInput/FilledInput.js +48 -9
  52. package/esm/FormControl/FormControl.js +29 -29
  53. package/esm/FormControlLabel/FormControlLabel.js +17 -5
  54. package/esm/Input/Input.js +49 -10
  55. package/esm/InputBase/InputBase.js +45 -8
  56. package/esm/ListItem/ListItem.js +43 -11
  57. package/esm/ListItemButton/ListItemButton.js +2 -2
  58. package/esm/MenuItem/MenuItem.js +2 -2
  59. package/esm/Modal/Modal.js +11 -3
  60. package/esm/NativeSelect/NativeSelectInput.js +11 -9
  61. package/esm/OutlinedInput/OutlinedInput.js +26 -8
  62. package/esm/PaginationItem/PaginationItem.js +31 -22
  63. package/esm/Radio/Radio.js +2 -1
  64. package/esm/RadioGroup/RadioGroup.js +12 -12
  65. package/esm/Select/Select.js +3 -3
  66. package/esm/Slider/Slider.js +12 -3
  67. package/esm/StepLabel/StepLabel.js +15 -3
  68. package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
  69. package/esm/Tooltip/Tooltip.js +69 -32
  70. package/index.js +1 -1
  71. package/legacy/Alert/Alert.js +48 -9
  72. package/legacy/Autocomplete/Autocomplete.js +27 -10
  73. package/legacy/AvatarGroup/AvatarGroup.js +26 -6
  74. package/legacy/Backdrop/Backdrop.js +48 -11
  75. package/legacy/Badge/Badge.js +11 -3
  76. package/legacy/ButtonBase/TouchRipple.js +1 -1
  77. package/legacy/Chip/Chip.js +8 -4
  78. package/legacy/FilledInput/FilledInput.js +49 -9
  79. package/legacy/FormControl/FormControl.js +29 -29
  80. package/legacy/FormControlLabel/FormControlLabel.js +17 -4
  81. package/legacy/Input/Input.js +50 -10
  82. package/legacy/InputBase/InputBase.js +47 -8
  83. package/legacy/ListItem/ListItem.js +49 -13
  84. package/legacy/ListItemButton/ListItemButton.js +7 -5
  85. package/legacy/MenuItem/MenuItem.js +6 -4
  86. package/legacy/Modal/Modal.js +11 -3
  87. package/legacy/NativeSelect/NativeSelectInput.js +11 -9
  88. package/legacy/OutlinedInput/OutlinedInput.js +27 -8
  89. package/legacy/PaginationItem/PaginationItem.js +32 -22
  90. package/legacy/Radio/Radio.js +2 -1
  91. package/legacy/RadioGroup/RadioGroup.js +14 -14
  92. package/legacy/Select/Select.js +3 -3
  93. package/legacy/Slider/Slider.js +12 -3
  94. package/legacy/StepLabel/StepLabel.js +16 -3
  95. package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
  96. package/legacy/Tooltip/Tooltip.js +64 -23
  97. package/legacy/index.js +1 -1
  98. package/modern/Alert/Alert.js +45 -8
  99. package/modern/Autocomplete/Autocomplete.js +26 -10
  100. package/modern/AvatarGroup/AvatarGroup.js +24 -5
  101. package/modern/Backdrop/Backdrop.js +45 -10
  102. package/modern/Badge/Badge.js +11 -3
  103. package/modern/ButtonBase/TouchRipple.js +1 -1
  104. package/modern/Chip/Chip.js +8 -4
  105. package/modern/FilledInput/FilledInput.js +46 -9
  106. package/modern/FormControl/FormControl.js +29 -29
  107. package/modern/FormControlLabel/FormControlLabel.js +15 -5
  108. package/modern/Input/Input.js +47 -10
  109. package/modern/InputBase/InputBase.js +43 -8
  110. package/modern/ListItem/ListItem.js +43 -11
  111. package/modern/ListItemButton/ListItemButton.js +2 -2
  112. package/modern/MenuItem/MenuItem.js +2 -2
  113. package/modern/Modal/Modal.js +11 -3
  114. package/modern/NativeSelect/NativeSelectInput.js +11 -9
  115. package/modern/OutlinedInput/OutlinedInput.js +25 -7
  116. package/modern/PaginationItem/PaginationItem.js +31 -22
  117. package/modern/Radio/Radio.js +2 -1
  118. package/modern/RadioGroup/RadioGroup.js +12 -12
  119. package/modern/Select/Select.js +3 -3
  120. package/modern/Slider/Slider.js +12 -3
  121. package/modern/StepLabel/StepLabel.js +13 -3
  122. package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
  123. package/modern/Tooltip/Tooltip.js +59 -18
  124. package/modern/index.js +1 -1
  125. package/package.json +4 -4
  126. package/umd/material-ui.development.js +617 -234
  127. package/umd/material-ui.production.min.js +20 -20
package/Alert/Alert.d.ts CHANGED
@@ -34,8 +34,11 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
34
34
  */
35
35
  color?: OverridableStringUnion<AlertColor, AlertPropsColorOverrides>;
36
36
  /**
37
- * The components used for each slot inside the Alert.
38
- * Either a string to use a HTML element or a component.
37
+ * The components used for each slot inside.
38
+ *
39
+ * This prop is an alias for the `slots` prop.
40
+ * It's recommended to use the `slots` prop instead.
41
+ *
39
42
  * @default {}
40
43
  */
41
44
  components?: {
@@ -43,7 +46,12 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
43
46
  CloseIcon?: React.ElementType;
44
47
  };
45
48
  /**
46
- * The props used for each slot inside.
49
+ * The extra props for the slot components.
50
+ * You can override the existing props or add new ones.
51
+ *
52
+ * This prop is an alias for the `slotProps` prop.
53
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
54
+ *
47
55
  * @default {}
48
56
  */
49
57
  componentsProps?: {
@@ -84,6 +92,29 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
84
92
  * @default 'standard'
85
93
  */
86
94
  variant?: OverridableStringUnion<'standard' | 'filled' | 'outlined', AlertPropsVariantOverrides>;
95
+ /**
96
+ * The extra props for the slot components.
97
+ * You can override the existing props or add new ones.
98
+ *
99
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
100
+ *
101
+ * @default {}
102
+ */
103
+ slotProps?: {
104
+ closeButton?: IconButtonProps;
105
+ closeIcon?: SvgIconProps;
106
+ };
107
+ /**
108
+ * The components used for each slot inside.
109
+ *
110
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
111
+ *
112
+ * @default {}
113
+ */
114
+ slots?: {
115
+ closeButton?: React.ElementType;
116
+ closeIcon?: React.ElementType;
117
+ };
87
118
  /**
88
119
  * The system prop that allows defining system overrides as well as additional CSS styles.
89
120
  */
package/Alert/Alert.js CHANGED
@@ -45,7 +45,7 @@ var _Close = _interopRequireDefault(require("../internal/svg-icons/Close"));
45
45
 
46
46
  var _jsxRuntime = require("react/jsx-runtime");
47
47
 
48
- const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
48
+ const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
49
49
 
50
50
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
51
51
 
@@ -159,7 +159,7 @@ const defaultIconMapping = {
159
159
  })
160
160
  };
161
161
  const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
162
- var _components$CloseButt, _components$CloseIcon;
162
+ var _ref, _slots$closeButton, _ref2, _slots$closeIcon, _slotProps$closeButto, _slotProps$closeIcon;
163
163
 
164
164
  const props = (0, _useThemeProps.default)({
165
165
  props: inProps,
@@ -178,6 +178,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
178
178
  onClose,
179
179
  role = 'alert',
180
180
  severity = 'success',
181
+ slotProps = {},
182
+ slots = {},
181
183
  variant = 'standard'
182
184
  } = props,
183
185
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
@@ -187,8 +189,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
187
189
  variant
188
190
  });
189
191
  const classes = useUtilityClasses(ownerState);
190
- const AlertCloseButton = (_components$CloseButt = components.CloseButton) != null ? _components$CloseButt : _IconButton.default;
191
- const AlertCloseIcon = (_components$CloseIcon = components.CloseIcon) != null ? _components$CloseIcon : _Close.default;
192
+ const AlertCloseButton = (_ref = (_slots$closeButton = slots.closeButton) != null ? _slots$closeButton : components.CloseButton) != null ? _ref : _IconButton.default;
193
+ const AlertCloseIcon = (_ref2 = (_slots$closeIcon = slots.closeIcon) != null ? _slots$closeIcon : components.CloseIcon) != null ? _ref2 : _Close.default;
194
+ const closeButtonProps = (_slotProps$closeButto = slotProps.closeButton) != null ? _slotProps$closeButto : componentsProps.closeButton;
195
+ const closeIconProps = (_slotProps$closeIcon = slotProps.closeIcon) != null ? _slotProps$closeIcon : componentsProps.closeIcon;
192
196
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AlertRoot, (0, _extends2.default)({
193
197
  role: role,
194
198
  elevation: 0,
@@ -217,10 +221,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
217
221
  title: closeText,
218
222
  color: "inherit",
219
223
  onClick: onClose
220
- }, componentsProps.closeButton, {
224
+ }, closeButtonProps, {
221
225
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AlertCloseIcon, (0, _extends2.default)({
222
226
  fontSize: "small"
223
- }, componentsProps.closeIcon))
227
+ }, closeIconProps))
224
228
  }))
225
229
  }) : null]
226
230
  }));
@@ -271,8 +275,11 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
271
275
  .oneOfType([_propTypes.default.oneOf(['error', 'info', 'success', 'warning']), _propTypes.default.string]),
272
276
 
273
277
  /**
274
- * The components used for each slot inside the Alert.
275
- * Either a string to use a HTML element or a component.
278
+ * The components used for each slot inside.
279
+ *
280
+ * This prop is an alias for the `slots` prop.
281
+ * It's recommended to use the `slots` prop instead.
282
+ *
276
283
  * @default {}
277
284
  */
278
285
  components: _propTypes.default.shape({
@@ -281,7 +288,12 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
281
288
  }),
282
289
 
283
290
  /**
284
- * The props used for each slot inside.
291
+ * The extra props for the slot components.
292
+ * You can override the existing props or add new ones.
293
+ *
294
+ * This prop is an alias for the `slotProps` prop.
295
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
296
+ *
285
297
  * @default {}
286
298
  */
287
299
  componentsProps: _propTypes.default.shape({
@@ -328,6 +340,31 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
328
340
  */
329
341
  severity: _propTypes.default.oneOf(['error', 'info', 'success', 'warning']),
330
342
 
343
+ /**
344
+ * The extra props for the slot components.
345
+ * You can override the existing props or add new ones.
346
+ *
347
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
348
+ *
349
+ * @default {}
350
+ */
351
+ slotProps: _propTypes.default.shape({
352
+ closeButton: _propTypes.default.object,
353
+ closeIcon: _propTypes.default.object
354
+ }),
355
+
356
+ /**
357
+ * The components used for each slot inside.
358
+ *
359
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
360
+ *
361
+ * @default {}
362
+ */
363
+ slots: _propTypes.default.shape({
364
+ closeButton: _propTypes.default.elementType,
365
+ closeIcon: _propTypes.default.elementType
366
+ }),
367
+
331
368
  /**
332
369
  * The system prop that allows defining system overrides as well as additional CSS styles.
333
370
  */
@@ -258,6 +258,16 @@ export interface AutocompleteProps<
258
258
  * @default 'medium'
259
259
  */
260
260
  size?: OverridableStringUnion<'small' | 'medium', AutocompletePropsSizeOverrides>;
261
+ /**
262
+ * The props used for each slot inside.
263
+ * @default {}
264
+ */
265
+ slotProps?: {
266
+ clearIndicator?: Partial<IconButtonProps>;
267
+ paper?: PaperProps;
268
+ popper?: Partial<PopperProps>;
269
+ popupIndicator?: Partial<IconButtonProps>;
270
+ };
261
271
  /**
262
272
  * The system prop that allows defining system overrides as well as additional CSS styles.
263
273
  */
@@ -63,7 +63,7 @@ var _jsxRuntime = require("react/jsx-runtime");
63
63
 
64
64
  var _ClearIcon, _ArrowDropDownIcon;
65
65
 
66
- const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"];
66
+ const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"];
67
67
 
68
68
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
69
69
 
@@ -393,7 +393,7 @@ const AutocompleteGroupUl = (0, _styled.default)('ul', {
393
393
  }
394
394
  });
395
395
  const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
396
- var _componentsProps$clea, _componentsProps$popu, _componentsProps$popp, _componentsProps$pape;
396
+ var _slotProps$clearIndic, _slotProps$paper, _slotProps$popper, _slotProps$popupIndic;
397
397
 
398
398
  const props = (0, _useThemeProps.default)({
399
399
  props: inProps,
@@ -454,7 +454,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
454
454
  renderOption: renderOptionProp,
455
455
  renderTags,
456
456
  selectOnFocus = !props.freeSolo,
457
- size = 'medium'
457
+ size = 'medium',
458
+ slotProps = {}
458
459
  } = props,
459
460
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
460
461
  /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -561,6 +562,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
561
562
  });
562
563
  };
563
564
 
565
+ const clearIndicatorSlotProps = (_slotProps$clearIndic = slotProps.clearIndicator) != null ? _slotProps$clearIndic : componentsProps.clearIndicator;
566
+ const paperSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : componentsProps.paper;
567
+ const popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
568
+ const popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
564
569
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
565
570
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteRoot, (0, _extends2.default)({
566
571
  ref: ref,
@@ -585,16 +590,16 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
585
590
  "aria-label": clearText,
586
591
  title: clearText,
587
592
  ownerState: ownerState
588
- }, componentsProps.clearIndicator, {
589
- className: (0, _clsx.default)(classes.clearIndicator, (_componentsProps$clea = componentsProps.clearIndicator) == null ? void 0 : _componentsProps$clea.className),
593
+ }, clearIndicatorSlotProps, {
594
+ className: (0, _clsx.default)(classes.clearIndicator, clearIndicatorSlotProps == null ? void 0 : clearIndicatorSlotProps.className),
590
595
  children: clearIcon
591
596
  })) : null, hasPopupIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopupIndicator, (0, _extends2.default)({}, getPopupIndicatorProps(), {
592
597
  disabled: disabled,
593
598
  "aria-label": popupOpen ? closeText : openText,
594
599
  title: popupOpen ? closeText : openText,
595
600
  ownerState: ownerState
596
- }, componentsProps.popupIndicator, {
597
- className: (0, _clsx.default)(classes.popupIndicator, (_componentsProps$popu = componentsProps.popupIndicator) == null ? void 0 : _componentsProps$popu.className),
601
+ }, popupIndicatorSlotProps, {
602
+ className: (0, _clsx.default)(classes.popupIndicator, popupIndicatorSlotProps == null ? void 0 : popupIndicatorSlotProps.className),
598
603
  children: popupIcon
599
604
  })) : null]
600
605
  })
@@ -615,13 +620,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
615
620
  role: "presentation",
616
621
  anchorEl: anchorEl,
617
622
  open: popupOpen
618
- }, componentsProps.popper, {
619
- className: (0, _clsx.default)(classes.popper, (_componentsProps$popp = componentsProps.popper) == null ? void 0 : _componentsProps$popp.className),
623
+ }, popperSlotProps, {
624
+ className: (0, _clsx.default)(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
620
625
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompletePaper, (0, _extends2.default)({
621
626
  ownerState: ownerState,
622
627
  as: PaperComponent
623
- }, componentsProps.paper, {
624
- className: (0, _clsx.default)(classes.paper, (_componentsProps$pape = componentsProps.paper) == null ? void 0 : _componentsProps$pape.className),
628
+ }, paperSlotProps, {
629
+ className: (0, _clsx.default)(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
625
630
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteLoading, {
626
631
  className: classes.loading,
627
632
  ownerState: ownerState,
@@ -1105,6 +1110,17 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1105
1110
  /* @typescript-to-proptypes-ignore */
1106
1111
  .oneOfType([_propTypes.default.oneOf(['small', 'medium']), _propTypes.default.string]),
1107
1112
 
1113
+ /**
1114
+ * The props used for each slot inside.
1115
+ * @default {}
1116
+ */
1117
+ slotProps: _propTypes.default.shape({
1118
+ clearIndicator: _propTypes.default.object,
1119
+ paper: _propTypes.default.object,
1120
+ popper: _propTypes.default.object,
1121
+ popupIndicator: _propTypes.default.object
1122
+ }),
1123
+
1108
1124
  /**
1109
1125
  * The system prop that allows defining system overrides as well as additional CSS styles.
1110
1126
  */
@@ -23,7 +23,12 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
23
23
  */
24
24
  component?: React.ElementType;
25
25
  /**
26
- * The props used for each slot inside the AvatarGroup.
26
+ * The extra props for the slot components.
27
+ * You can override the existing props or add new ones.
28
+ *
29
+ * This prop is an alias for the `slotProps` prop.
30
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
31
+ *
27
32
  * @default {}
28
33
  */
29
34
  componentsProps?: {
@@ -35,6 +40,18 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
35
40
  * @default 5
36
41
  */
37
42
  max?: number;
43
+ /**
44
+ * The extra props for the slot components.
45
+ * You can override the existing props or add new ones.
46
+ *
47
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
48
+ *
49
+ * @default {}
50
+ */
51
+ slotProps?: {
52
+ additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
53
+ AvatarGroupComponentsPropsOverrides;
54
+ };
38
55
  /**
39
56
  * Spacing between avatars.
40
57
  * @default 'medium'
@@ -33,7 +33,7 @@ var _avatarGroupClasses = _interopRequireWildcard(require("./avatarGroupClasses"
33
33
 
34
34
  var _jsxRuntime = require("react/jsx-runtime");
35
35
 
36
- const _excluded = ["children", "className", "component", "componentsProps", "max", "spacing", "total", "variant"];
36
+ const _excluded = ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"];
37
37
 
38
38
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
39
 
@@ -90,7 +90,7 @@ const AvatarGroupAvatar = (0, _styled.default)(_Avatar.default, {
90
90
  }
91
91
  }));
92
92
  const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
93
- var _componentsProps$addi, _componentsProps$addi2;
93
+ var _slotProps$additional;
94
94
 
95
95
  const props = (0, _useThemeProps.default)({
96
96
  props: inProps,
@@ -102,6 +102,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
102
102
  component = 'div',
103
103
  componentsProps = {},
104
104
  max = 5,
105
+ slotProps = {},
105
106
  spacing = 'medium',
106
107
  total,
107
108
  variant = 'circular'
@@ -134,6 +135,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
134
135
  const maxAvatars = Math.min(children.length, clampedMax - 1);
135
136
  const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
136
137
  const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
138
+ const additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
137
139
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AvatarGroupRoot, (0, _extends2.default)({
138
140
  as: component,
139
141
  ownerState: ownerState,
@@ -143,11 +145,11 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
143
145
  children: [extraAvatars ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(AvatarGroupAvatar, (0, _extends2.default)({
144
146
  ownerState: ownerState,
145
147
  variant: variant
146
- }, componentsProps.additionalAvatar, {
147
- className: (0, _clsx.default)(classes.avatar, (_componentsProps$addi = componentsProps.additionalAvatar) == null ? void 0 : _componentsProps$addi.className),
148
+ }, additionalAvatarSlotProps, {
149
+ className: (0, _clsx.default)(classes.avatar, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.className),
148
150
  style: (0, _extends2.default)({
149
151
  marginLeft
150
- }, (_componentsProps$addi2 = componentsProps.additionalAvatar) == null ? void 0 : _componentsProps$addi2.style),
152
+ }, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
151
153
  children: ["+", extraAvatars]
152
154
  })) : null, children.slice(0, maxAvatars).reverse().map((child, index) => {
153
155
  return /*#__PURE__*/React.cloneElement(child, {
@@ -192,7 +194,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
192
194
  component: _propTypes.default.elementType,
193
195
 
194
196
  /**
195
- * The props used for each slot inside the AvatarGroup.
197
+ * The extra props for the slot components.
198
+ * You can override the existing props or add new ones.
199
+ *
200
+ * This prop is an alias for the `slotProps` prop.
201
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
202
+ *
196
203
  * @default {}
197
204
  */
198
205
  componentsProps: _propTypes.default.shape({
@@ -211,6 +218,18 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
211
218
  return null;
212
219
  }),
213
220
 
221
+ /**
222
+ * The extra props for the slot components.
223
+ * You can override the existing props or add new ones.
224
+ *
225
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
226
+ *
227
+ * @default {}
228
+ */
229
+ slotProps: _propTypes.default.shape({
230
+ additionalAvatar: _propTypes.default.object
231
+ }),
232
+
214
233
  /**
215
234
  * Spacing between avatars.
216
235
  * @default 'medium'
@@ -16,15 +16,23 @@ export interface BackdropTypeMap<P = {}, D extends React.ElementType = 'div'> {
16
16
  */
17
17
  children?: React.ReactNode;
18
18
  /**
19
- * The components used for each slot inside the Backdrop.
20
- * Either a string to use a HTML element or a component.
19
+ * The components used for each slot inside.
20
+ *
21
+ * This prop is an alias for the `slots` prop.
22
+ * It's recommended to use the `slots` prop instead.
23
+ *
21
24
  * @default {}
22
25
  */
23
26
  components?: {
24
27
  Root?: React.ElementType;
25
28
  };
26
29
  /**
27
- * The props used for each slot inside the Backdrop.
30
+ * The extra props for the slot components.
31
+ * You can override the existing props or add new ones.
32
+ *
33
+ * This prop is an alias for the `slotProps` prop.
34
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
35
+ *
28
36
  * @default {}
29
37
  */
30
38
  componentsProps?: {
@@ -44,6 +52,28 @@ export interface BackdropTypeMap<P = {}, D extends React.ElementType = 'div'> {
44
52
  * If `true`, the component is shown.
45
53
  */
46
54
  open: boolean;
55
+ /**
56
+ * The extra props for the slot components.
57
+ * You can override the existing props or add new ones.
58
+ *
59
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
60
+ *
61
+ * @default {}
62
+ */
63
+ slotProps?: {
64
+ root?: React.HTMLAttributes<HTMLDivElement> & BackdropComponentsPropsOverrides;
65
+ };
66
+ /**
67
+ * The components used for each slot inside.
68
+ *
69
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
70
+ *
71
+ * @default {}
72
+ */
73
+ slots?: {
74
+ root?: React.ElementType;
75
+ };
76
+
47
77
  /**
48
78
  * The system prop that allows defining system overrides as well as additional CSS styles.
49
79
  */
@@ -29,7 +29,7 @@ var _backdropClasses = require("./backdropClasses");
29
29
 
30
30
  var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
- const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "transitionDuration", "TransitionComponent"];
32
+ const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "slotProps", "slots", "transitionDuration", "TransitionComponent"];
33
33
 
34
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
35
 
@@ -72,7 +72,7 @@ const BackdropRoot = (0, _styled.default)('div', {
72
72
  backgroundColor: 'transparent'
73
73
  }));
74
74
  const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
75
- var _components$Root, _componentsProps$root;
75
+ var _slotProps$root, _ref, _slots$root;
76
76
 
77
77
  const props = (0, _useThemeProps.default)({
78
78
  props: inProps,
@@ -86,6 +86,8 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
86
86
  className,
87
87
  invisible = false,
88
88
  open,
89
+ slotProps = {},
90
+ slots = {},
89
91
  transitionDuration,
90
92
  // eslint-disable-next-line react/prop-types
91
93
  TransitionComponent = _Fade.default
@@ -96,19 +98,21 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
96
98
  invisible
97
99
  });
98
100
  const classes = useUtilityClasses(ownerState);
101
+ const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;
99
102
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
100
103
  in: open,
101
104
  timeout: transitionDuration
102
105
  }, other, {
103
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropRoot, {
104
- "aria-hidden": true,
105
- as: (_components$Root = components.Root) != null ? _components$Root : component,
106
- className: (0, _clsx.default)(classes.root, className),
107
- ownerState: (0, _extends2.default)({}, ownerState, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState),
106
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropRoot, (0, _extends2.default)({
107
+ "aria-hidden": true
108
+ }, rootSlotProps, {
109
+ as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,
110
+ className: (0, _clsx.default)(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),
111
+ ownerState: (0, _extends2.default)({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),
108
112
  classes: classes,
109
113
  ref: ref,
110
114
  children: children
111
- })
115
+ }))
112
116
  }));
113
117
  });
114
118
  process.env.NODE_ENV !== "production" ? Backdrop.propTypes
@@ -141,8 +145,11 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
141
145
  component: _propTypes.default.elementType,
142
146
 
143
147
  /**
144
- * The components used for each slot inside the Backdrop.
145
- * Either a string to use a HTML element or a component.
148
+ * The components used for each slot inside.
149
+ *
150
+ * This prop is an alias for the `slots` prop.
151
+ * It's recommended to use the `slots` prop instead.
152
+ *
146
153
  * @default {}
147
154
  */
148
155
  components: _propTypes.default.shape({
@@ -150,7 +157,12 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
150
157
  }),
151
158
 
152
159
  /**
153
- * The props used for each slot inside the Backdrop.
160
+ * The extra props for the slot components.
161
+ * You can override the existing props or add new ones.
162
+ *
163
+ * This prop is an alias for the `slotProps` prop.
164
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
165
+ *
154
166
  * @default {}
155
167
  */
156
168
  componentsProps: _propTypes.default.shape({
@@ -169,6 +181,29 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
169
181
  */
170
182
  open: _propTypes.default.bool.isRequired,
171
183
 
184
+ /**
185
+ * The extra props for the slot components.
186
+ * You can override the existing props or add new ones.
187
+ *
188
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
189
+ *
190
+ * @default {}
191
+ */
192
+ slotProps: _propTypes.default.shape({
193
+ root: _propTypes.default.object
194
+ }),
195
+
196
+ /**
197
+ * The components used for each slot inside.
198
+ *
199
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
200
+ *
201
+ * @default {}
202
+ */
203
+ slots: _propTypes.default.shape({
204
+ root: _propTypes.default.elementType
205
+ }),
206
+
172
207
  /**
173
208
  * The system prop that allows defining system overrides as well as additional CSS styles.
174
209
  */
package/Badge/Badge.d.ts CHANGED
@@ -47,13 +47,21 @@ export type BadgeTypeMap<
47
47
  BadgePropsColorOverrides
48
48
  >;
49
49
  /**
50
- * The props used for each slot inside the Badge.
50
+ * The extra props for the slot components.
51
+ * You can override the existing props or add new ones.
52
+ *
53
+ * This prop is an alias for the `slotProps` prop.
54
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
55
+ *
51
56
  * @default {}
52
57
  */
53
58
  componentsProps?: BadgeUnstyledTypeMap['props']['slotProps'];
54
59
  /**
55
- * The components used for each slot inside the Badge.
56
- * Either a string to use a HTML element or a component.
60
+ * The components used for each slot inside.
61
+ *
62
+ * This prop is an alias for the `slots` prop.
63
+ * It's recommended to use the `slots` prop instead.
64
+ *
57
65
  * @default {}
58
66
  */
59
67
  components?: {
package/Badge/Badge.js CHANGED
@@ -340,8 +340,11 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
340
340
  component: _propTypes.default.elementType,
341
341
 
342
342
  /**
343
- * The components used for each slot inside the Badge.
344
- * Either a string to use a HTML element or a component.
343
+ * The components used for each slot inside.
344
+ *
345
+ * This prop is an alias for the `slots` prop.
346
+ * It's recommended to use the `slots` prop instead.
347
+ *
345
348
  * @default {}
346
349
  */
347
350
  components: _propTypes.default.shape({
@@ -350,7 +353,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
350
353
  }),
351
354
 
352
355
  /**
353
- * The props used for each slot inside the Badge.
356
+ * The extra props for the slot components.
357
+ * You can override the existing props or add new ones.
358
+ *
359
+ * This prop is an alias for the `slotProps` prop.
360
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
361
+ *
354
362
  * @default {}
355
363
  */
356
364
  componentsProps: _propTypes.default.shape({
@@ -211,7 +211,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
211
211
  nextKey.current += 1;
212
212
  rippleCallback.current = cb;
213
213
  }, [classes]);
214
- const start = React.useCallback((event = {}, options = {}, cb) => {
214
+ const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {
215
215
  const {
216
216
  pulsate = false,
217
217
  center = centerProp || options.pulsate,