@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
@@ -204,12 +204,7 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
204
204
  color = _props$color === void 0 ? 'standard' : _props$color,
205
205
  component = props.component,
206
206
  _props$components = props.components,
207
- components = _props$components === void 0 ? {
208
- first: FirstPageIcon,
209
- last: LastPageIcon,
210
- next: NavigateNextIcon,
211
- previous: NavigateBeforeIcon
212
- } : _props$components,
207
+ components = _props$components === void 0 ? {} : _props$components,
213
208
  _props$disabled = props.disabled,
214
209
  disabled = _props$disabled === void 0 ? false : _props$disabled,
215
210
  page = props.page,
@@ -219,11 +214,13 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
219
214
  shape = _props$shape === void 0 ? 'circular' : _props$shape,
220
215
  _props$size = props.size,
221
216
  size = _props$size === void 0 ? 'medium' : _props$size,
217
+ _props$slots = props.slots,
218
+ slots = _props$slots === void 0 ? {} : _props$slots,
222
219
  _props$type = props.type,
223
220
  type = _props$type === void 0 ? 'page' : _props$type,
224
221
  _props$variant = props.variant,
225
222
  variant = _props$variant === void 0 ? 'text' : _props$variant,
226
- other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "type", "variant"]);
223
+ other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"]);
227
224
 
228
225
  var ownerState = _extends({}, props, {
229
226
  color: color,
@@ -238,15 +235,15 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
238
235
  var theme = useTheme();
239
236
  var classes = useUtilityClasses(ownerState);
240
237
  var normalizedIcons = theme.direction === 'rtl' ? {
241
- previous: components.next || NavigateNextIcon,
242
- next: components.previous || NavigateBeforeIcon,
243
- last: components.first || FirstPageIcon,
244
- first: components.last || LastPageIcon
238
+ previous: slots.next || components.next || NavigateNextIcon,
239
+ next: slots.previous || components.previous || NavigateBeforeIcon,
240
+ last: slots.first || components.first || FirstPageIcon,
241
+ first: slots.last || components.last || LastPageIcon
245
242
  } : {
246
- previous: components.previous || NavigateBeforeIcon,
247
- next: components.next || NavigateNextIcon,
248
- first: components.first || FirstPageIcon,
249
- last: components.last || LastPageIcon
243
+ previous: slots.previous || components.previous || NavigateBeforeIcon,
244
+ next: slots.next || components.next || NavigateNextIcon,
245
+ first: slots.first || components.first || FirstPageIcon,
246
+ last: slots.last || components.last || LastPageIcon
250
247
  };
251
248
  var Icon = normalizedIcons[type];
252
249
  return type === 'start-ellipsis' || type === 'end-ellipsis' ? /*#__PURE__*/_jsx(PaginationItemEllipsis, {
@@ -308,13 +305,12 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
308
305
  component: PropTypes.elementType,
309
306
 
310
307
  /**
311
- * The components used for first, last, next & previous item type
312
- * @default {
313
- * first: FirstPageIcon,
314
- * last: LastPageIcon,
315
- * next: NavigateNextIcon,
316
- * previous: NavigateBeforeIcon,
317
- * }
308
+ * The components used for each slot inside.
309
+ *
310
+ * This prop is an alias for the `slots` prop.
311
+ * It's recommended to use the `slots` prop instead.
312
+ *
313
+ * @default {}
318
314
  */
319
315
  components: PropTypes.shape({
320
316
  first: PropTypes.elementType,
@@ -354,6 +350,20 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
354
350
  /* @typescript-to-proptypes-ignore */
355
351
  .oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
356
352
 
353
+ /**
354
+ * The components used for each slot inside.
355
+ *
356
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
357
+ *
358
+ * @default {}
359
+ */
360
+ slots: PropTypes.shape({
361
+ first: PropTypes.elementType,
362
+ last: PropTypes.elementType,
363
+ next: PropTypes.elementType,
364
+ previous: PropTypes.elementType
365
+ }),
366
+
357
367
  /**
358
368
  * The system prop that allows defining system overrides as well as additional CSS styles.
359
369
  */
@@ -251,14 +251,14 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
251
251
  *
252
252
  * @param {SelectChangeEvent<T>} event The event source of the callback.
253
253
  * You can pull out the new value by accessing `event.target.value` (any).
254
- * **Warning**: This is a generic event not a change event unless the change event is caused by browser autofill.
254
+ * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
255
255
  * @param {object} [child] The react element that was selected when `native` is `false` (default).
256
256
  */
257
257
  onChange: PropTypes.func,
258
258
 
259
259
  /**
260
260
  * Callback fired when the component requests to be closed.
261
- * Use in controlled mode (see open).
261
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
262
262
  *
263
263
  * @param {object} event The event source of the callback.
264
264
  */
@@ -266,7 +266,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
266
266
 
267
267
  /**
268
268
  * Callback fired when the component requests to be opened.
269
- * Use in controlled mode (see open).
269
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
270
270
  *
271
271
  * @param {object} event The event source of the callback.
272
272
  */
@@ -594,8 +594,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
594
594
  .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
595
595
 
596
596
  /**
597
- * The components used for each slot inside the Slider.
598
- * Either a string to use a HTML element or a component.
597
+ * The components used for each slot inside.
598
+ *
599
+ * This prop is an alias for the `slots` prop.
600
+ * It's recommended to use the `slots` prop instead.
601
+ *
599
602
  * @default {}
600
603
  */
601
604
  components: PropTypes.shape({
@@ -610,7 +613,13 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
610
613
  }),
611
614
 
612
615
  /**
613
- * @ignore
616
+ * The extra props for the slot components.
617
+ * You can override the existing props or add new ones.
618
+ *
619
+ * This prop is an alias for the `slotProps` prop.
620
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
621
+ *
622
+ * @default {}
614
623
  */
615
624
  componentsProps: PropTypes.shape({
616
625
  input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
@@ -113,6 +113,8 @@ var StepLabelLabelContainer = styled('span', {
113
113
  });
114
114
  });
115
115
  var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
116
+ var _slotProps$label;
117
+
116
118
  var props = useThemeProps({
117
119
  props: inProps,
118
120
  name: 'MuiStepLabel'
@@ -126,9 +128,11 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
126
128
  error = _props$error === void 0 ? false : _props$error,
127
129
  iconProp = props.icon,
128
130
  optional = props.optional,
131
+ _props$slotProps = props.slotProps,
132
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
129
133
  StepIconComponentProp = props.StepIconComponent,
130
134
  StepIconProps = props.StepIconProps,
131
- other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "StepIconComponent", "StepIconProps"]);
135
+ other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "slotProps", "StepIconComponent", "StepIconProps"]);
132
136
 
133
137
  var _React$useContext = React.useContext(StepperContext),
134
138
  alternativeLabel = _React$useContext.alternativeLabel,
@@ -157,6 +161,7 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
157
161
  });
158
162
 
159
163
  var classes = useUtilityClasses(ownerState);
164
+ var labelSlotProps = (_slotProps$label = slotProps.label) != null ? _slotProps$label : componentsProps.label;
160
165
  return /*#__PURE__*/_jsxs(StepLabelRoot, _extends({
161
166
  className: clsx(classes.root, className),
162
167
  ref: ref,
@@ -175,9 +180,9 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
175
180
  className: classes.labelContainer,
176
181
  ownerState: ownerState,
177
182
  children: [children ? /*#__PURE__*/_jsx(StepLabelLabel, _extends({
178
- className: classes.label,
179
183
  ownerState: ownerState
180
- }, componentsProps.label, {
184
+ }, labelSlotProps, {
185
+ className: clsx(classes.label, labelSlotProps == null ? void 0 : labelSlotProps.className),
181
186
  children: children
182
187
  })) : null, optional]
183
188
  })]
@@ -230,6 +235,14 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
230
235
  */
231
236
  optional: PropTypes.node,
232
237
 
238
+ /**
239
+ * The props used for each slot inside.
240
+ * @default {}
241
+ */
242
+ slotProps: PropTypes.shape({
243
+ label: PropTypes.object
244
+ }),
245
+
233
246
  /**
234
247
  * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/).
235
248
  */
@@ -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';
@@ -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.12
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.
package/locale/index.d.ts CHANGED
@@ -1,72 +1,72 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSA: Localization;
27
- export declare const arSD: Localization;
28
- export declare const azAZ: Localization;
29
- export declare const bnBD: Localization;
30
- export declare const bgBG: Localization;
31
- export declare const caES: Localization;
32
- export declare const csCZ: Localization;
33
- export declare const daDK: Localization;
34
- export declare const deDE: Localization;
35
- export declare const elGR: Localization;
36
- export declare const enUS: Localization;
37
- export declare const esES: Localization;
38
- export declare const etEE: Localization;
39
- export declare const faIR: Localization;
40
- export declare const fiFI: Localization;
41
- export declare const frFR: Localization;
42
- export declare const heIL: Localization;
43
- export declare const hiIN: Localization;
44
- export declare const hrHR: Localization;
45
- export declare const huHU: Localization;
46
- export declare const hyAM: Localization;
47
- export declare const idID: Localization;
48
- export declare const isIS: Localization;
49
- export declare const itIT: Localization;
50
- export declare const jaJP: Localization;
51
- export declare const khKH: Localization;
52
- export declare const koKR: Localization;
53
- export declare const kzKZ: Localization;
54
- export declare const mkMK: Localization;
55
- export declare const nbNO: Localization;
56
- export declare const nlNL: Localization;
57
- export declare const plPL: Localization;
58
- export declare const ptBR: Localization;
59
- export declare const ptPT: Localization;
60
- export declare const roRO: Localization;
61
- export declare const srRS: Localization;
62
- export declare const ruRU: Localization;
63
- export declare const siLK: Localization;
64
- export declare const skSK: Localization;
65
- export declare const svSE: Localization;
66
- export declare const thTH: Localization;
67
- export declare const trTR: Localization;
68
- export declare const ukUA: Localization;
69
- export declare const viVN: Localization;
70
- export declare const zhCN: Localization;
71
- export declare const zhHK: Localization;
72
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSA: Localization;
27
+ export declare const arSD: Localization;
28
+ export declare const azAZ: Localization;
29
+ export declare const bnBD: Localization;
30
+ export declare const bgBG: Localization;
31
+ export declare const caES: Localization;
32
+ export declare const csCZ: Localization;
33
+ export declare const daDK: Localization;
34
+ export declare const deDE: Localization;
35
+ export declare const elGR: Localization;
36
+ export declare const enUS: Localization;
37
+ export declare const esES: Localization;
38
+ export declare const etEE: Localization;
39
+ export declare const faIR: Localization;
40
+ export declare const fiFI: Localization;
41
+ export declare const frFR: Localization;
42
+ export declare const heIL: Localization;
43
+ export declare const hiIN: Localization;
44
+ export declare const hrHR: Localization;
45
+ export declare const huHU: Localization;
46
+ export declare const hyAM: Localization;
47
+ export declare const idID: Localization;
48
+ export declare const isIS: Localization;
49
+ export declare const itIT: Localization;
50
+ export declare const jaJP: Localization;
51
+ export declare const khKH: Localization;
52
+ export declare const koKR: Localization;
53
+ export declare const kzKZ: Localization;
54
+ export declare const mkMK: Localization;
55
+ export declare const nbNO: Localization;
56
+ export declare const nlNL: Localization;
57
+ export declare const plPL: Localization;
58
+ export declare const ptBR: Localization;
59
+ export declare const ptPT: Localization;
60
+ export declare const roRO: Localization;
61
+ export declare const srRS: Localization;
62
+ export declare const ruRU: Localization;
63
+ export declare const siLK: Localization;
64
+ export declare const skSK: Localization;
65
+ export declare const svSE: Localization;
66
+ export declare const thTH: Localization;
67
+ export declare const trTR: Localization;
68
+ export declare const ukUA: Localization;
69
+ export declare const viVN: Localization;
70
+ export declare const zhCN: Localization;
71
+ export declare const zhHK: Localization;
72
+ export declare const zhTW: Localization;
@@ -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
  */