@mui/material 5.10.12 → 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 (240) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/Alert.d.ts +34 -3
  6. package/Alert/Alert.js +46 -9
  7. package/Alert/alertClasses.d.ts +44 -44
  8. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  9. package/AppBar/appBarClasses.d.ts +28 -28
  10. package/Autocomplete/Autocomplete.d.ts +10 -0
  11. package/Autocomplete/Autocomplete.js +27 -11
  12. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  13. package/Avatar/avatarClasses.d.ts +20 -20
  14. package/AvatarGroup/AvatarGroup.d.ts +18 -1
  15. package/AvatarGroup/AvatarGroup.js +25 -6
  16. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  17. package/Backdrop/Backdrop.d.ts +33 -3
  18. package/Backdrop/Backdrop.js +46 -11
  19. package/Backdrop/backdropClasses.d.ts +10 -10
  20. package/Badge/Badge.d.ts +11 -3
  21. package/Badge/Badge.js +11 -3
  22. package/Badge/badgeClasses.d.ts +56 -56
  23. package/BottomNavigation/BottomNavigation.js +0 -0
  24. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  25. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  26. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  27. package/Button/buttonClasses.d.ts +100 -100
  28. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  29. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  30. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  31. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  32. package/CHANGELOG.md +58 -0
  33. package/Card/cardClasses.d.ts +8 -8
  34. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  35. package/CardActions/cardActionsClasses.d.ts +10 -10
  36. package/CardContent/cardContentClasses.d.ts +8 -8
  37. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  38. package/CardMedia/cardMediaClasses.d.ts +12 -12
  39. package/Checkbox/checkboxClasses.d.ts +18 -18
  40. package/Chip/chipClasses.d.ts +96 -96
  41. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  42. package/ClickAwayListener/index.d.ts +2 -2
  43. package/Collapse/collapseClasses.d.ts +18 -18
  44. package/Container/containerClasses.d.ts +6 -6
  45. package/Dialog/DialogContext.d.ts +6 -6
  46. package/Dialog/dialogClasses.d.ts +36 -36
  47. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  48. package/DialogContent/dialogContentClasses.d.ts +10 -10
  49. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  50. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  51. package/Divider/dividerClasses.d.ts +34 -34
  52. package/Drawer/drawerClasses.d.ts +30 -30
  53. package/Fab/fabClasses.d.ts +26 -26
  54. package/FilledInput/FilledInput.js +48 -9
  55. package/FilledInput/filledInputClasses.d.ts +40 -40
  56. package/FormControl/formControlClasses.d.ts +14 -14
  57. package/FormControlLabel/FormControlLabel.d.ts +12 -0
  58. package/FormControlLabel/FormControlLabel.js +17 -5
  59. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  60. package/FormGroup/formGroupClasses.d.ts +12 -12
  61. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  62. package/FormLabel/formLabelClasses.d.ts +22 -22
  63. package/Grid/gridClasses.d.ts +48 -48
  64. package/Icon/iconClasses.d.ts +24 -24
  65. package/IconButton/iconButtonClasses.d.ts +26 -26
  66. package/ImageList/imageListClasses.d.ts +16 -16
  67. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  68. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  69. package/Input/Input.js +49 -10
  70. package/Input/inputClasses.d.ts +34 -34
  71. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  72. package/InputBase/InputBase.d.ts +34 -3
  73. package/InputBase/InputBase.js +45 -8
  74. package/InputBase/inputBaseClasses.d.ts +46 -46
  75. package/InputLabel/inputLabelClasses.d.ts +32 -32
  76. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  77. package/Link/getTextDecoration.d.ts +15 -15
  78. package/Link/linkClasses.d.ts +18 -18
  79. package/List/listClasses.d.ts +14 -14
  80. package/ListItem/ListItem.d.ts +32 -3
  81. package/ListItem/ListItem.js +41 -9
  82. package/ListItem/listItemClasses.d.ts +30 -30
  83. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  84. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  85. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  86. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  87. package/ListItemText/listItemTextClasses.d.ts +18 -18
  88. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  89. package/Menu/menuClasses.d.ts +12 -12
  90. package/MenuItem/menuItemClasses.d.ts +20 -20
  91. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  92. package/Modal/Modal.d.ts +11 -3
  93. package/Modal/Modal.js +11 -3
  94. package/NativeSelect/NativeSelectInput.js +11 -9
  95. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  96. package/OutlinedInput/OutlinedInput.js +26 -8
  97. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  98. package/OverridableComponentAugmentation.d.ts +31 -31
  99. package/Pagination/paginationClasses.d.ts +14 -14
  100. package/PaginationItem/PaginationItem.d.ts +19 -7
  101. package/PaginationItem/PaginationItem.js +31 -22
  102. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  103. package/Paper/paperClasses.d.ts +39 -39
  104. package/Popover/popoverClasses.d.ts +10 -10
  105. package/Popper/Popper.d.ts +37 -37
  106. package/README.md +1 -0
  107. package/Radio/radioClasses.d.ts +16 -16
  108. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  109. package/RadioGroup/useRadioGroup.d.ts +4 -4
  110. package/Rating/ratingClasses.d.ts +40 -40
  111. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  112. package/Select/Select.d.ts +3 -3
  113. package/Select/Select.js +3 -3
  114. package/Select/selectClasses.d.ts +30 -30
  115. package/Skeleton/skeletonClasses.d.ts +26 -26
  116. package/Slider/Slider.d.ts +14 -2
  117. package/Slider/Slider.js +12 -3
  118. package/Snackbar/snackbarClasses.d.ts +20 -20
  119. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  120. package/SpeedDial/speedDialClasses.d.ts +22 -22
  121. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  122. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  123. package/Step/StepContext.d.ts +20 -20
  124. package/Step/stepClasses.d.ts +16 -16
  125. package/StepButton/stepButtonClasses.d.ts +14 -14
  126. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  127. package/StepContent/stepContentClasses.d.ts +12 -12
  128. package/StepIcon/stepIconClasses.d.ts +16 -16
  129. package/StepLabel/StepLabel.d.ts +11 -0
  130. package/StepLabel/StepLabel.js +15 -3
  131. package/StepLabel/stepLabelClasses.d.ts +28 -28
  132. package/Stepper/StepperContext.d.ts +18 -18
  133. package/Stepper/stepperClasses.d.ts +14 -14
  134. package/SvgIcon/svgIconClasses.d.ts +26 -26
  135. package/Switch/switchClasses.d.ts +32 -32
  136. package/Tab/tabClasses.d.ts +26 -26
  137. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  138. package/Table/tableClasses.d.ts +10 -10
  139. package/TableBody/tableBodyClasses.d.ts +8 -8
  140. package/TableCell/tableCellClasses.d.ts +32 -32
  141. package/TableContainer/tableContainerClasses.d.ts +8 -8
  142. package/TableFooter/tableFooterClasses.d.ts +8 -8
  143. package/TableHead/tableHeadClasses.d.ts +8 -8
  144. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  145. package/TableRow/tableRowClasses.d.ts +16 -16
  146. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  147. package/Tabs/tabsClasses.d.ts +32 -32
  148. package/TextField/textFieldClasses.d.ts +8 -8
  149. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  150. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  151. package/Toolbar/toolbarClasses.d.ts +14 -14
  152. package/Tooltip/Tooltip.d.ts +43 -6
  153. package/Tooltip/Tooltip.js +68 -31
  154. package/Tooltip/tooltipClasses.d.ts +30 -30
  155. package/Typography/typographyClasses.d.ts +50 -50
  156. package/Unstable_Grid2/Grid2.d.ts +4 -4
  157. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  158. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  159. package/Unstable_Grid2/index.d.ts +4 -4
  160. package/className/index.d.ts +1 -1
  161. package/darkScrollbar/index.d.ts +28 -28
  162. package/esm/Alert/Alert.js +46 -9
  163. package/esm/Autocomplete/Autocomplete.js +27 -11
  164. package/esm/AvatarGroup/AvatarGroup.js +25 -6
  165. package/esm/Backdrop/Backdrop.js +46 -11
  166. package/esm/Badge/Badge.js +11 -3
  167. package/esm/BottomNavigation/BottomNavigation.js +0 -0
  168. package/esm/FilledInput/FilledInput.js +48 -9
  169. package/esm/FormControlLabel/FormControlLabel.js +17 -5
  170. package/esm/Input/Input.js +49 -10
  171. package/esm/InputBase/InputBase.js +45 -8
  172. package/esm/ListItem/ListItem.js +41 -9
  173. package/esm/Modal/Modal.js +11 -3
  174. package/esm/NativeSelect/NativeSelectInput.js +11 -9
  175. package/esm/OutlinedInput/OutlinedInput.js +26 -8
  176. package/esm/PaginationItem/PaginationItem.js +31 -22
  177. package/esm/Select/Select.js +3 -3
  178. package/esm/Slider/Slider.js +12 -3
  179. package/esm/StepLabel/StepLabel.js +15 -3
  180. package/esm/Tooltip/Tooltip.js +68 -31
  181. package/generateUtilityClass/index.d.ts +2 -2
  182. package/generateUtilityClasses/index.d.ts +1 -1
  183. package/index.js +1 -1
  184. package/internal/switchBaseClasses.d.ts +12 -12
  185. package/legacy/Alert/Alert.js +48 -9
  186. package/legacy/Autocomplete/Autocomplete.js +27 -10
  187. package/legacy/AvatarGroup/AvatarGroup.js +26 -6
  188. package/legacy/Backdrop/Backdrop.js +48 -11
  189. package/legacy/Badge/Badge.js +11 -3
  190. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  191. package/legacy/FilledInput/FilledInput.js +49 -9
  192. package/legacy/FormControlLabel/FormControlLabel.js +17 -4
  193. package/legacy/Input/Input.js +50 -10
  194. package/legacy/InputBase/InputBase.js +47 -8
  195. package/legacy/ListItem/ListItem.js +42 -8
  196. package/legacy/Modal/Modal.js +11 -3
  197. package/legacy/NativeSelect/NativeSelectInput.js +11 -9
  198. package/legacy/OutlinedInput/OutlinedInput.js +27 -8
  199. package/legacy/PaginationItem/PaginationItem.js +32 -22
  200. package/legacy/Select/Select.js +3 -3
  201. package/legacy/Slider/Slider.js +12 -3
  202. package/legacy/StepLabel/StepLabel.js +16 -3
  203. package/legacy/Tooltip/Tooltip.js +63 -22
  204. package/legacy/index.js +1 -1
  205. package/locale/index.d.ts +72 -72
  206. package/modern/Alert/Alert.js +45 -8
  207. package/modern/Autocomplete/Autocomplete.js +26 -10
  208. package/modern/AvatarGroup/AvatarGroup.js +24 -5
  209. package/modern/Backdrop/Backdrop.js +45 -10
  210. package/modern/Badge/Badge.js +11 -3
  211. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  212. package/modern/FilledInput/FilledInput.js +46 -9
  213. package/modern/FormControlLabel/FormControlLabel.js +15 -5
  214. package/modern/Input/Input.js +47 -10
  215. package/modern/InputBase/InputBase.js +43 -8
  216. package/modern/ListItem/ListItem.js +41 -9
  217. package/modern/Modal/Modal.js +11 -3
  218. package/modern/NativeSelect/NativeSelectInput.js +11 -9
  219. package/modern/OutlinedInput/OutlinedInput.js +25 -7
  220. package/modern/PaginationItem/PaginationItem.js +31 -22
  221. package/modern/Select/Select.js +3 -3
  222. package/modern/Slider/Slider.js +12 -3
  223. package/modern/StepLabel/StepLabel.js +13 -3
  224. package/modern/Tooltip/Tooltip.js +58 -17
  225. package/modern/index.js +1 -1
  226. package/package.json +4 -4
  227. package/styles/CssVarsProvider.d.ts +14 -14
  228. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  229. package/transitions/index.d.ts +1 -1
  230. package/transitions/transition.d.ts +13 -13
  231. package/transitions/utils.d.ts +23 -23
  232. package/umd/material-ui.development.js +534 -165
  233. package/umd/material-ui.production.min.js +14 -14
  234. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  235. package/useTouchRipple/index.d.ts +1 -1
  236. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  237. package/utils/getScrollbarSize.d.ts +2 -2
  238. package/utils/ownerDocument.d.ts +2 -2
  239. package/utils/ownerWindow.d.ts +2 -2
  240. package/utils/setRef.d.ts +2 -2
@@ -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({
File without changes
@@ -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 = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "type"];
3
+ const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"];
4
4
  import * as React from 'react';
5
5
  import { refType, deepmerge } from '@mui/utils';
6
6
  import PropTypes from 'prop-types';
@@ -191,6 +191,8 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
191
191
  // declare here to prevent spreading to DOM
192
192
  inputComponent = 'input',
193
193
  multiline = false,
194
+ slotProps,
195
+ slots = {},
194
196
  type = 'text'
195
197
  } = props,
196
198
  other = _objectWithoutPropertiesLoose(props, _excluded);
@@ -211,12 +213,14 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
211
213
  ownerState
212
214
  }
213
215
  };
214
- const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;
216
+ const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(slotProps ?? componentsPropsProp, filledInputComponentsProps) : filledInputComponentsProps;
217
+ const RootSlot = slots.root ?? components.Root ?? FilledInputRoot;
218
+ const InputSlot = slots.input ?? components.Input ?? FilledInputInput;
215
219
  return /*#__PURE__*/_jsx(InputBase, _extends({
216
- components: _extends({
217
- Root: FilledInputRoot,
218
- Input: FilledInputInput
219
- }, components),
220
+ slots: {
221
+ root: RootSlot,
222
+ input: InputSlot
223
+ },
220
224
  componentsProps: componentsProps,
221
225
  fullWidth: fullWidth,
222
226
  inputComponent: inputComponent,
@@ -263,8 +267,11 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
263
267
  .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
264
268
 
265
269
  /**
266
- * The components used for each slot inside the InputBase.
267
- * Either a string to use a HTML element or a component.
270
+ * The components used for each slot inside.
271
+ *
272
+ * This prop is an alias for the `slots` prop.
273
+ * It's recommended to use the `slots` prop instead.
274
+ *
268
275
  * @default {}
269
276
  */
270
277
  components: PropTypes.shape({
@@ -273,7 +280,12 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
273
280
  }),
274
281
 
275
282
  /**
276
- * The props used for each slot inside the Input.
283
+ * The extra props for the slot components.
284
+ * You can override the existing props or add new ones.
285
+ *
286
+ * This prop is an alias for the `slotProps` prop.
287
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
288
+ *
277
289
  * @default {}
278
290
  */
279
291
  componentsProps: PropTypes.shape({
@@ -403,6 +415,31 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
403
415
  */
404
416
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
405
417
 
418
+ /**
419
+ * The extra props for the slot components.
420
+ * You can override the existing props or add new ones.
421
+ *
422
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
423
+ *
424
+ * @default {}
425
+ */
426
+ slotProps: PropTypes.shape({
427
+ input: PropTypes.object,
428
+ root: PropTypes.object
429
+ }),
430
+
431
+ /**
432
+ * The components used for each slot inside.
433
+ *
434
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
435
+ *
436
+ * @default {}
437
+ */
438
+ slots: PropTypes.shape({
439
+ input: PropTypes.elementType,
440
+ root: PropTypes.elementType
441
+ }),
442
+
406
443
  /**
407
444
  * Start `InputAdornment` for this component.
408
445
  */
@@ -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 = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "value"];
3
+ const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -93,7 +93,8 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
93
93
  disabled: disabledProp,
94
94
  disableTypography,
95
95
  label: labelProp,
96
- labelPlacement = 'end'
96
+ labelPlacement = 'end',
97
+ slotProps = {}
97
98
  } = props,
98
99
  other = _objectWithoutPropertiesLoose(props, _excluded);
99
100
 
@@ -129,13 +130,14 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
129
130
  });
130
131
 
131
132
  const classes = useUtilityClasses(ownerState);
133
+ const typographySlotProps = slotProps.typography ?? componentsProps.typography;
132
134
  let label = labelProp;
133
135
 
134
136
  if (label != null && label.type !== Typography && !disableTypography) {
135
137
  label = /*#__PURE__*/_jsx(Typography, _extends({
136
- component: "span",
137
- className: classes.label
138
- }, componentsProps.typography, {
138
+ component: "span"
139
+ }, typographySlotProps, {
140
+ className: clsx(classes.label, typographySlotProps?.className),
139
141
  children: label
140
142
  }));
141
143
  }
@@ -223,6 +225,14 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
223
225
  */
224
226
  onChange: PropTypes.func,
225
227
 
228
+ /**
229
+ * The props used for each slot inside.
230
+ * @default {}
231
+ */
232
+ slotProps: PropTypes.shape({
233
+ typography: PropTypes.object
234
+ }),
235
+
226
236
  /**
227
237
  * The system prop that allows defining system overrides as well as additional CSS styles.
228
238
  */
@@ -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 = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "type"];
3
+ const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "slotProps", "slots", "type"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { unstable_composeClasses as composeClasses } from '@mui/base';
@@ -123,6 +123,8 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
123
123
  fullWidth = false,
124
124
  inputComponent = 'input',
125
125
  multiline = false,
126
+ slotProps,
127
+ slots = {},
126
128
  type = 'text'
127
129
  } = props,
128
130
  other = _objectWithoutPropertiesLoose(props, _excluded);
@@ -136,13 +138,15 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
136
138
  ownerState
137
139
  }
138
140
  };
139
- const componentsProps = componentsPropsProp ? deepmerge(componentsPropsProp, inputComponentsProps) : inputComponentsProps;
141
+ const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(slotProps ?? componentsPropsProp, inputComponentsProps) : inputComponentsProps;
142
+ const RootSlot = slots.root ?? components.Root ?? InputRoot;
143
+ const InputSlot = slots.input ?? components.Input ?? InputInput;
140
144
  return /*#__PURE__*/_jsx(InputBase, _extends({
141
- components: _extends({
142
- Root: InputRoot,
143
- Input: InputInput
144
- }, components),
145
- componentsProps: componentsProps,
145
+ slots: {
146
+ root: RootSlot,
147
+ input: InputSlot
148
+ },
149
+ slotProps: componentsProps,
146
150
  fullWidth: fullWidth,
147
151
  inputComponent: inputComponent,
148
152
  multiline: multiline,
@@ -188,8 +192,11 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
188
192
  .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
189
193
 
190
194
  /**
191
- * The components used for each slot inside the InputBase.
192
- * Either a string to use a HTML element or a component.
195
+ * The components used for each slot inside.
196
+ *
197
+ * This prop is an alias for the `slots` prop.
198
+ * It's recommended to use the `slots` prop instead.
199
+ *
193
200
  * @default {}
194
201
  */
195
202
  components: PropTypes.shape({
@@ -198,7 +205,12 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
198
205
  }),
199
206
 
200
207
  /**
201
- * The props used for each slot inside the Input.
208
+ * The extra props for the slot components.
209
+ * You can override the existing props or add new ones.
210
+ *
211
+ * This prop is an alias for the `slotProps` prop.
212
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
213
+ *
202
214
  * @default {}
203
215
  */
204
216
  componentsProps: PropTypes.shape({
@@ -320,6 +332,31 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
320
332
  */
321
333
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
322
334
 
335
+ /**
336
+ * The extra props for the slot components.
337
+ * You can override the existing props or add new ones.
338
+ *
339
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
340
+ *
341
+ * @default {}
342
+ */
343
+ slotProps: PropTypes.shape({
344
+ input: PropTypes.object,
345
+ root: PropTypes.object
346
+ }),
347
+
348
+ /**
349
+ * The components used for each slot inside.
350
+ *
351
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
352
+ *
353
+ * @default {}
354
+ */
355
+ slots: PropTypes.shape({
356
+ input: PropTypes.elementType,
357
+ root: PropTypes.elementType
358
+ }),
359
+
323
360
  /**
324
361
  * Start `InputAdornment` for this component.
325
362
  */
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
4
- const _excluded = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "startAdornment", "type", "value"];
4
+ const _excluded = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
@@ -250,6 +250,8 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
250
250
  readOnly,
251
251
  renderSuffix,
252
252
  rows,
253
+ slotProps = {},
254
+ slots = {},
253
255
  startAdornment,
254
256
  type = 'text',
255
257
  value: valueProp
@@ -453,10 +455,10 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
453
455
  });
454
456
 
455
457
  const classes = useUtilityClasses(ownerState);
456
- const Root = components.Root || InputBaseRoot;
457
- const rootProps = componentsProps.root || {};
458
- const Input = components.Input || InputBaseComponent;
459
- inputProps = _extends({}, inputProps, componentsProps.input);
458
+ const Root = slots.root || components.Root || InputBaseRoot;
459
+ const rootProps = slotProps.root || componentsProps.root || {};
460
+ const Input = slots.input || components.Input || InputBaseComponent;
461
+ inputProps = _extends({}, inputProps, slotProps.input ?? componentsProps.input);
460
462
  return /*#__PURE__*/_jsxs(React.Fragment, {
461
463
  children: [!disableInjectingGlobalStyles && inputGlobalStyles, /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, !isHostComponent(Root) && {
462
464
  ownerState: _extends({}, ownerState, rootProps.ownerState)
@@ -548,8 +550,11 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
548
550
  .oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
549
551
 
550
552
  /**
551
- * The components used for each slot inside the InputBase.
552
- * Either a string to use a HTML element or a component.
553
+ * The components used for each slot inside.
554
+ *
555
+ * This prop is an alias for the `slots` prop.
556
+ * It's recommended to use the `slots` prop instead.
557
+ *
553
558
  * @default {}
554
559
  */
555
560
  components: PropTypes.shape({
@@ -558,7 +563,12 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
558
563
  }),
559
564
 
560
565
  /**
561
- * The props used for each slot inside the Input.
566
+ * The extra props for the slot components.
567
+ * You can override the existing props or add new ones.
568
+ *
569
+ * This prop is an alias for the `slotProps` prop.
570
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
571
+ *
562
572
  * @default {}
563
573
  */
564
574
  componentsProps: PropTypes.shape({
@@ -726,6 +736,31 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
726
736
  /* @typescript-to-proptypes-ignore */
727
737
  .oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
728
738
 
739
+ /**
740
+ * The extra props for the slot components.
741
+ * You can override the existing props or add new ones.
742
+ *
743
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
744
+ *
745
+ * @default {}
746
+ */
747
+ slotProps: PropTypes.shape({
748
+ input: PropTypes.object,
749
+ root: PropTypes.object
750
+ }),
751
+
752
+ /**
753
+ * The components used for each slot inside.
754
+ *
755
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
756
+ *
757
+ * @default {}
758
+ */
759
+ slots: PropTypes.shape({
760
+ input: PropTypes.elementType,
761
+ root: PropTypes.elementType
762
+ }),
763
+
729
764
  /**
730
765
  * Start `InputAdornment` for this component.
731
766
  */