@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
@@ -209,7 +209,7 @@ function composeEventHandler(handler, eventHandler) {
209
209
 
210
210
 
211
211
  var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
212
- var _components$Popper, _ref5, _components$Transitio, _components$Tooltip, _components$Arrow, _componentsProps$popp;
212
+ var _ref5, _slots$popper, _ref6, _ref7, _slots$transition, _ref8, _slots$tooltip, _ref9, _slots$arrow, _slotProps$popper, _ref10, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref11, _slotProps$tooltip2, _slotProps$arrow, _ref12, _slotProps$arrow2;
213
213
 
214
214
  var props = useThemeProps({
215
215
  props: inProps,
@@ -255,11 +255,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
255
255
  PopperComponentProp = props.PopperComponent,
256
256
  _props$PopperProps = props.PopperProps,
257
257
  PopperProps = _props$PopperProps === void 0 ? {} : _props$PopperProps,
258
+ _props$slotProps = props.slotProps,
259
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
260
+ _props$slots = props.slots,
261
+ slots = _props$slots === void 0 ? {} : _props$slots,
258
262
  title = props.title,
259
263
  _props$TransitionComp = props.TransitionComponent,
260
264
  TransitionComponentProp = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,
261
265
  TransitionProps = props.TransitionProps,
262
- other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "title", "TransitionComponent", "TransitionProps"]);
266
+ other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]);
263
267
 
264
268
  var theme = useTheme();
265
269
  var isRtl = theme.direction === 'rtl';
@@ -486,7 +490,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
486
490
  }, [handleClose, open]);
487
491
  var handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
488
492
 
489
- if (typeof title !== 'number' && !title) {
493
+ if (!title && title !== 0) {
490
494
  open = false;
491
495
  }
492
496
 
@@ -606,14 +610,20 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
606
610
  });
607
611
 
608
612
  var classes = useUtilityClasses(ownerState);
609
- var PopperComponent = (_components$Popper = components.Popper) != null ? _components$Popper : TooltipPopper;
610
- var TransitionComponent = (_ref5 = (_components$Transitio = components.Transition) != null ? _components$Transitio : TransitionComponentProp) != null ? _ref5 : Grow;
611
- var TooltipComponent = (_components$Tooltip = components.Tooltip) != null ? _components$Tooltip : TooltipTooltip;
612
- var ArrowComponent = (_components$Arrow = components.Arrow) != null ? _components$Arrow : TooltipArrow;
613
- var popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, componentsProps.popper), ownerState);
614
- var transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, componentsProps.transition), ownerState);
615
- var tooltipProps = appendOwnerState(TooltipComponent, _extends({}, componentsProps.tooltip), ownerState);
616
- var tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, componentsProps.arrow), ownerState);
613
+ var PopperComponent = (_ref5 = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref5 : TooltipPopper;
614
+ var TransitionComponent = (_ref6 = (_ref7 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref7 : TransitionComponentProp) != null ? _ref6 : Grow;
615
+ var TooltipComponent = (_ref8 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref8 : TooltipTooltip;
616
+ var ArrowComponent = (_ref9 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref9 : TooltipArrow;
617
+ var popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {
618
+ className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref10 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref10.className)
619
+ }), ownerState);
620
+ var transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);
621
+ var tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {
622
+ className: clsx(classes.tooltip, (_ref11 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref11.className)
623
+ }), ownerState);
624
+ var tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {
625
+ className: clsx(classes.arrow, (_ref12 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref12.className)
626
+ }), ownerState);
617
627
  return /*#__PURE__*/_jsxs(React.Fragment, {
618
628
  children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({
619
629
  as: PopperComponentProp != null ? PopperComponentProp : Popper,
@@ -635,19 +645,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
635
645
  id: id,
636
646
  transition: true
637
647
  }, interactiveWrapperListeners, popperProps, {
638
- className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_componentsProps$popp = componentsProps.popper) == null ? void 0 : _componentsProps$popp.className),
639
648
  popperOptions: popperOptions,
640
- children: function children(_ref6) {
641
- var _componentsProps$tool, _componentsProps$arro;
642
-
643
- var TransitionPropsInner = _ref6.TransitionProps;
649
+ children: function children(_ref13) {
650
+ var TransitionPropsInner = _ref13.TransitionProps;
644
651
  return /*#__PURE__*/_jsx(TransitionComponent, _extends({
645
652
  timeout: theme.transitions.duration.shorter
646
653
  }, TransitionPropsInner, transitionProps, {
654
+ "data-foo": "bar",
647
655
  children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {
648
- className: clsx(classes.tooltip, (_componentsProps$tool = componentsProps.tooltip) == null ? void 0 : _componentsProps$tool.className),
649
656
  children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {
650
- className: clsx(classes.arrow, (_componentsProps$arro = componentsProps.arrow) == null ? void 0 : _componentsProps$arro.className),
651
657
  ref: setArrowRef
652
658
  })) : null]
653
659
  }))
@@ -686,8 +692,11 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
686
692
  className: PropTypes.string,
687
693
 
688
694
  /**
689
- * The components used for each slot inside the Tooltip.
690
- * Either a string to use a HTML element or a component.
695
+ * The components used for each slot inside.
696
+ *
697
+ * This prop is an alias for the `slots` prop.
698
+ * It's recommended to use the `slots` prop instead.
699
+ *
691
700
  * @default {}
692
701
  */
693
702
  components: PropTypes.shape({
@@ -698,9 +707,12 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
698
707
  }),
699
708
 
700
709
  /**
701
- * The props used for each slot inside the Tooltip.
702
- * Note that `componentsProps.popper` prop values win over `PopperProps`
703
- * and `componentsProps.transition` prop values win over `TransitionProps` if both are applied.
710
+ * The extra props for the slot components.
711
+ * You can override the existing props or add new ones.
712
+ *
713
+ * This prop is an alias for the `slotProps` prop.
714
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
715
+ *
704
716
  * @default {}
705
717
  */
706
718
  componentsProps: PropTypes.shape({
@@ -823,6 +835,35 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
823
835
  */
824
836
  PopperProps: PropTypes.object,
825
837
 
838
+ /**
839
+ * The extra props for the slot components.
840
+ * You can override the existing props or add new ones.
841
+ *
842
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
843
+ *
844
+ * @default {}
845
+ */
846
+ slotProps: PropTypes.shape({
847
+ arrow: PropTypes.object,
848
+ popper: PropTypes.object,
849
+ tooltip: PropTypes.object,
850
+ transition: PropTypes.object
851
+ }),
852
+
853
+ /**
854
+ * The components used for each slot inside.
855
+ *
856
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
857
+ *
858
+ * @default {}
859
+ */
860
+ slots: PropTypes.shape({
861
+ arrow: PropTypes.elementType,
862
+ popper: PropTypes.elementType,
863
+ tooltip: PropTypes.elementType,
864
+ transition: PropTypes.elementType
865
+ }),
866
+
826
867
  /**
827
868
  * The system prop that allows defining system overrides as well as additional CSS styles.
828
869
  */
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.11
1
+ /** @license MUI v5.10.13
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
3
+ const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -146,6 +146,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
146
146
  onClose,
147
147
  role = 'alert',
148
148
  severity = 'success',
149
+ slotProps = {},
150
+ slots = {},
149
151
  variant = 'standard'
150
152
  } = props,
151
153
  other = _objectWithoutPropertiesLoose(props, _excluded);
@@ -157,8 +159,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
157
159
  });
158
160
 
159
161
  const classes = useUtilityClasses(ownerState);
160
- const AlertCloseButton = components.CloseButton ?? IconButton;
161
- const AlertCloseIcon = components.CloseIcon ?? CloseIcon;
162
+ const AlertCloseButton = slots.closeButton ?? components.CloseButton ?? IconButton;
163
+ const AlertCloseIcon = slots.closeIcon ?? components.CloseIcon ?? CloseIcon;
164
+ const closeButtonProps = slotProps.closeButton ?? componentsProps.closeButton;
165
+ const closeIconProps = slotProps.closeIcon ?? componentsProps.closeIcon;
162
166
  return /*#__PURE__*/_jsxs(AlertRoot, _extends({
163
167
  role: role,
164
168
  elevation: 0,
@@ -187,10 +191,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
187
191
  title: closeText,
188
192
  color: "inherit",
189
193
  onClick: onClose
190
- }, componentsProps.closeButton, {
194
+ }, closeButtonProps, {
191
195
  children: /*#__PURE__*/_jsx(AlertCloseIcon, _extends({
192
196
  fontSize: "small"
193
- }, componentsProps.closeIcon))
197
+ }, closeIconProps))
194
198
  }))
195
199
  }) : null]
196
200
  }));
@@ -241,8 +245,11 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
241
245
  .oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),
242
246
 
243
247
  /**
244
- * The components used for each slot inside the Alert.
245
- * Either a string to use a HTML element or a component.
248
+ * The components used for each slot inside.
249
+ *
250
+ * This prop is an alias for the `slots` prop.
251
+ * It's recommended to use the `slots` prop instead.
252
+ *
246
253
  * @default {}
247
254
  */
248
255
  components: PropTypes.shape({
@@ -251,7 +258,12 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
251
258
  }),
252
259
 
253
260
  /**
254
- * The props used for each slot inside.
261
+ * The extra props for the slot components.
262
+ * You can override the existing props or add new ones.
263
+ *
264
+ * This prop is an alias for the `slotProps` prop.
265
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
266
+ *
255
267
  * @default {}
256
268
  */
257
269
  componentsProps: PropTypes.shape({
@@ -298,6 +310,31 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
298
310
  */
299
311
  severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),
300
312
 
313
+ /**
314
+ * The extra props for the slot components.
315
+ * You can override the existing props or add new ones.
316
+ *
317
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
318
+ *
319
+ * @default {}
320
+ */
321
+ slotProps: PropTypes.shape({
322
+ closeButton: PropTypes.object,
323
+ closeIcon: PropTypes.object
324
+ }),
325
+
326
+ /**
327
+ * The components used for each slot inside.
328
+ *
329
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
330
+ *
331
+ * @default {}
332
+ */
333
+ slots: PropTypes.shape({
334
+ closeButton: PropTypes.elementType,
335
+ closeIcon: PropTypes.elementType
336
+ }),
337
+
301
338
  /**
302
339
  * The system prop that allows defining system overrides as well as additional CSS styles.
303
340
  */
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
 
4
4
  var _ClearIcon, _ArrowDropDownIcon;
5
5
 
6
- 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"];
6
+ 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"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
@@ -408,7 +408,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
408
408
  renderOption: renderOptionProp,
409
409
  renderTags,
410
410
  selectOnFocus = !props.freeSolo,
411
- size = 'medium'
411
+ size = 'medium',
412
+ slotProps = {}
412
413
  } = props,
413
414
  other = _objectWithoutPropertiesLoose(props, _excluded);
414
415
  /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -517,6 +518,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
517
518
  });
518
519
  };
519
520
 
521
+ const clearIndicatorSlotProps = slotProps.clearIndicator ?? componentsProps.clearIndicator;
522
+ const paperSlotProps = slotProps.paper ?? componentsProps.paper;
523
+ const popperSlotProps = slotProps.popper ?? componentsProps.popper;
524
+ const popupIndicatorSlotProps = slotProps.popupIndicator ?? componentsProps.popupIndicator;
520
525
  return /*#__PURE__*/_jsxs(React.Fragment, {
521
526
  children: [/*#__PURE__*/_jsx(AutocompleteRoot, _extends({
522
527
  ref: ref,
@@ -541,16 +546,16 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
541
546
  "aria-label": clearText,
542
547
  title: clearText,
543
548
  ownerState: ownerState
544
- }, componentsProps.clearIndicator, {
545
- className: clsx(classes.clearIndicator, componentsProps.clearIndicator?.className),
549
+ }, clearIndicatorSlotProps, {
550
+ className: clsx(classes.clearIndicator, clearIndicatorSlotProps?.className),
546
551
  children: clearIcon
547
552
  })) : null, hasPopupIcon ? /*#__PURE__*/_jsx(AutocompletePopupIndicator, _extends({}, getPopupIndicatorProps(), {
548
553
  disabled: disabled,
549
554
  "aria-label": popupOpen ? closeText : openText,
550
555
  title: popupOpen ? closeText : openText,
551
556
  ownerState: ownerState
552
- }, componentsProps.popupIndicator, {
553
- className: clsx(classes.popupIndicator, componentsProps.popupIndicator?.className),
557
+ }, popupIndicatorSlotProps, {
558
+ className: clsx(classes.popupIndicator, popupIndicatorSlotProps?.className),
554
559
  children: popupIcon
555
560
  })) : null]
556
561
  })
@@ -571,13 +576,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
571
576
  role: "presentation",
572
577
  anchorEl: anchorEl,
573
578
  open: popupOpen
574
- }, componentsProps.popper, {
575
- className: clsx(classes.popper, componentsProps.popper?.className),
579
+ }, popperSlotProps, {
580
+ className: clsx(classes.popper, popperSlotProps?.className),
576
581
  children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
577
582
  ownerState: ownerState,
578
583
  as: PaperComponent
579
- }, componentsProps.paper, {
580
- className: clsx(classes.paper, componentsProps.paper?.className),
584
+ }, paperSlotProps, {
585
+ className: clsx(classes.paper, paperSlotProps?.className),
581
586
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
582
587
  className: classes.loading,
583
588
  ownerState: ownerState,
@@ -1061,6 +1066,17 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1061
1066
  /* @typescript-to-proptypes-ignore */
1062
1067
  .oneOfType([PropTypes.oneOf(['small', 'medium']), PropTypes.string]),
1063
1068
 
1069
+ /**
1070
+ * The props used for each slot inside.
1071
+ * @default {}
1072
+ */
1073
+ slotProps: PropTypes.shape({
1074
+ clearIndicator: PropTypes.object,
1075
+ paper: PropTypes.object,
1076
+ popper: PropTypes.object,
1077
+ popupIndicator: PropTypes.object
1078
+ }),
1079
+
1064
1080
  /**
1065
1081
  * The system prop that allows defining system overrides as well as additional CSS styles.
1066
1082
  */
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["children", "className", "component", "componentsProps", "max", "spacing", "total", "variant"];
3
+ const _excluded = ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { isFragment } from 'react-is';
@@ -74,6 +74,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
74
74
  component = 'div',
75
75
  componentsProps = {},
76
76
  max = 5,
77
+ slotProps = {},
77
78
  spacing = 'medium',
78
79
  total,
79
80
  variant = 'circular'
@@ -109,6 +110,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
109
110
  const maxAvatars = Math.min(children.length, clampedMax - 1);
110
111
  const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
111
112
  const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
113
+ const additionalAvatarSlotProps = slotProps.additionalAvatar ?? componentsProps.additionalAvatar;
112
114
  return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
113
115
  as: component,
114
116
  ownerState: ownerState,
@@ -118,11 +120,11 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
118
120
  children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, _extends({
119
121
  ownerState: ownerState,
120
122
  variant: variant
121
- }, componentsProps.additionalAvatar, {
122
- className: clsx(classes.avatar, componentsProps.additionalAvatar?.className),
123
+ }, additionalAvatarSlotProps, {
124
+ className: clsx(classes.avatar, additionalAvatarSlotProps?.className),
123
125
  style: _extends({
124
126
  marginLeft
125
- }, componentsProps.additionalAvatar?.style),
127
+ }, additionalAvatarSlotProps?.style),
126
128
  children: ["+", extraAvatars]
127
129
  })) : null, children.slice(0, maxAvatars).reverse().map((child, index) => {
128
130
  return /*#__PURE__*/React.cloneElement(child, {
@@ -167,7 +169,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
167
169
  component: PropTypes.elementType,
168
170
 
169
171
  /**
170
- * The props used for each slot inside the AvatarGroup.
172
+ * The extra props for the slot components.
173
+ * You can override the existing props or add new ones.
174
+ *
175
+ * This prop is an alias for the `slotProps` prop.
176
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
177
+ *
171
178
  * @default {}
172
179
  */
173
180
  componentsProps: PropTypes.shape({
@@ -186,6 +193,18 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
186
193
  return null;
187
194
  }),
188
195
 
196
+ /**
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 `componentsProps` prop, which will be deprecated in the future.
201
+ *
202
+ * @default {}
203
+ */
204
+ slotProps: PropTypes.shape({
205
+ additionalAvatar: PropTypes.object
206
+ }),
207
+
189
208
  /**
190
209
  * Spacing between avatars.
191
210
  * @default 'medium'
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "transitionDuration", "TransitionComponent"];
3
+ const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "slotProps", "slots", "transitionDuration", "TransitionComponent"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -61,6 +61,8 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
61
61
  className,
62
62
  invisible = false,
63
63
  open,
64
+ slotProps = {},
65
+ slots = {},
64
66
  transitionDuration,
65
67
  // eslint-disable-next-line react/prop-types
66
68
  TransitionComponent = Fade
@@ -73,19 +75,21 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
73
75
  });
74
76
 
75
77
  const classes = useUtilityClasses(ownerState);
78
+ const rootSlotProps = slotProps.root ?? componentsProps.root;
76
79
  return /*#__PURE__*/_jsx(TransitionComponent, _extends({
77
80
  in: open,
78
81
  timeout: transitionDuration
79
82
  }, other, {
80
- children: /*#__PURE__*/_jsx(BackdropRoot, {
81
- "aria-hidden": true,
82
- as: components.Root ?? component,
83
- className: clsx(classes.root, className),
84
- ownerState: _extends({}, ownerState, componentsProps.root?.ownerState),
83
+ children: /*#__PURE__*/_jsx(BackdropRoot, _extends({
84
+ "aria-hidden": true
85
+ }, rootSlotProps, {
86
+ as: slots.root ?? components.Root ?? component,
87
+ className: clsx(classes.root, className, rootSlotProps?.className),
88
+ ownerState: _extends({}, ownerState, rootSlotProps?.ownerState),
85
89
  classes: classes,
86
90
  ref: ref,
87
91
  children: children
88
- })
92
+ }))
89
93
  }));
90
94
  });
91
95
  process.env.NODE_ENV !== "production" ? Backdrop.propTypes
@@ -118,8 +122,11 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
118
122
  component: PropTypes.elementType,
119
123
 
120
124
  /**
121
- * The components used for each slot inside the Backdrop.
122
- * Either a string to use a HTML element or a component.
125
+ * The components used for each slot inside.
126
+ *
127
+ * This prop is an alias for the `slots` prop.
128
+ * It's recommended to use the `slots` prop instead.
129
+ *
123
130
  * @default {}
124
131
  */
125
132
  components: PropTypes.shape({
@@ -127,7 +134,12 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
127
134
  }),
128
135
 
129
136
  /**
130
- * The props used for each slot inside the Backdrop.
137
+ * The extra props for the slot components.
138
+ * You can override the existing props or add new ones.
139
+ *
140
+ * This prop is an alias for the `slotProps` prop.
141
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
142
+ *
131
143
  * @default {}
132
144
  */
133
145
  componentsProps: PropTypes.shape({
@@ -146,6 +158,29 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
146
158
  */
147
159
  open: PropTypes.bool.isRequired,
148
160
 
161
+ /**
162
+ * The extra props for the slot components.
163
+ * You can override the existing props or add new ones.
164
+ *
165
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
166
+ *
167
+ * @default {}
168
+ */
169
+ slotProps: PropTypes.shape({
170
+ root: PropTypes.object
171
+ }),
172
+
173
+ /**
174
+ * The components used for each slot inside.
175
+ *
176
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
177
+ *
178
+ * @default {}
179
+ */
180
+ slots: PropTypes.shape({
181
+ root: PropTypes.elementType
182
+ }),
183
+
149
184
  /**
150
185
  * The system prop that allows defining system overrides as well as additional CSS styles.
151
186
  */
@@ -314,8 +314,11 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
314
314
  component: PropTypes.elementType,
315
315
 
316
316
  /**
317
- * The components used for each slot inside the Badge.
318
- * Either a string to use a HTML element or a component.
317
+ * The components used for each slot inside.
318
+ *
319
+ * This prop is an alias for the `slots` prop.
320
+ * It's recommended to use the `slots` prop instead.
321
+ *
319
322
  * @default {}
320
323
  */
321
324
  components: PropTypes.shape({
@@ -324,7 +327,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
324
327
  }),
325
328
 
326
329
  /**
327
- * The props used for each slot inside the Badge.
330
+ * The extra props for the slot components.
331
+ * You can override the existing props or add new ones.
332
+ *
333
+ * This prop is an alias for the `slotProps` prop.
334
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
335
+ *
328
336
  * @default {}
329
337
  */
330
338
  componentsProps: PropTypes.shape({
@@ -184,7 +184,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
184
184
  nextKey.current += 1;
185
185
  rippleCallback.current = cb;
186
186
  }, [classes]);
187
- const start = React.useCallback((event = {}, options = {}, cb) => {
187
+ const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {
188
188
  const {
189
189
  pulsate = false,
190
190
  center = centerProp || options.pulsate,
@@ -23,6 +23,7 @@ const useUtilityClasses = ownerState => {
23
23
  disabled,
24
24
  size,
25
25
  color,
26
+ iconColor,
26
27
  onDelete,
27
28
  clickable,
28
29
  variant
@@ -31,7 +32,7 @@ const useUtilityClasses = ownerState => {
31
32
  root: ['root', variant, disabled && 'disabled', `size${capitalize(size)}`, `color${capitalize(color)}`, clickable && 'clickable', clickable && `clickableColor${capitalize(color)}`, onDelete && 'deletable', onDelete && `deletableColor${capitalize(color)}`, `${variant}${capitalize(color)}`],
32
33
  label: ['label', `label${capitalize(size)}`],
33
34
  avatar: ['avatar', `avatar${capitalize(size)}`, `avatarColor${capitalize(color)}`],
34
- icon: ['icon', `icon${capitalize(size)}`, `iconColor${capitalize(color)}`],
35
+ icon: ['icon', `icon${capitalize(size)}`, `iconColor${capitalize(iconColor)}`],
35
36
  deleteIcon: ['deleteIcon', `deleteIcon${capitalize(size)}`, `deleteIconColor${capitalize(color)}`, `deleteIcon${capitalize(variant)}Color${capitalize(color)}`]
36
37
  };
37
38
  return composeClasses(slots, getChipUtilityClass, classes);
@@ -46,6 +47,7 @@ const ChipRoot = styled('div', {
46
47
  } = props;
47
48
  const {
48
49
  color,
50
+ iconColor,
49
51
  clickable,
50
52
  onDelete,
51
53
  size,
@@ -62,7 +64,7 @@ const ChipRoot = styled('div', {
62
64
  }, {
63
65
  [`& .${chipClasses.icon}`]: styles[`icon${capitalize(size)}`]
64
66
  }, {
65
- [`& .${chipClasses.icon}`]: styles[`iconColor${capitalize(color)}`]
67
+ [`& .${chipClasses.icon}`]: styles[`iconColor${capitalize(iconColor)}`]
66
68
  }, {
67
69
  [`& .${chipClasses.deleteIcon}`]: styles.deleteIcon
68
70
  }, {
@@ -131,16 +133,17 @@ const ChipRoot = styled('div', {
131
133
  fontSize: theme.typography.pxToRem(10)
132
134
  },
133
135
  [`& .${chipClasses.icon}`]: _extends({
134
- color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
135
136
  marginLeft: 5,
136
137
  marginRight: -6
137
138
  }, ownerState.size === 'small' && {
138
139
  fontSize: 18,
139
140
  marginLeft: 4,
140
141
  marginRight: -4
142
+ }, ownerState.iconColor === ownerState.color && _extends({
143
+ color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
141
144
  }, ownerState.color !== 'default' && {
142
145
  color: 'inherit'
143
- }),
146
+ })),
144
147
  [`& .${chipClasses.deleteIcon}`]: _extends({
145
148
  WebkitTapHighlightColor: 'transparent',
146
149
  color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : deleteIconColor,
@@ -346,6 +349,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
346
349
  disabled,
347
350
  size,
348
351
  color,
352
+ iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
349
353
  onDelete: !!onDelete,
350
354
  clickable,
351
355
  variant