@mui/material 6.4.3 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/Accordion/Accordion.d.ts +3 -3
  2. package/AccordionActions/AccordionActions.d.ts +2 -2
  3. package/AccordionDetails/AccordionDetails.d.ts +2 -2
  4. package/AccordionSummary/AccordionSummary.d.ts +3 -3
  5. package/Alert/Alert.d.ts +3 -3
  6. package/AlertTitle/AlertTitle.d.ts +3 -3
  7. package/AppBar/AppBar.d.ts +3 -3
  8. package/Autocomplete/Autocomplete.d.ts +2 -2
  9. package/Avatar/Avatar.d.ts +2 -2
  10. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  11. package/Backdrop/Backdrop.d.ts +3 -3
  12. package/Badge/Badge.d.ts +3 -3
  13. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  14. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  15. package/Box/Box.d.ts +2 -2
  16. package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  17. package/Button/Button.d.ts +4 -4
  18. package/ButtonBase/ButtonBase.d.ts +2 -2
  19. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  20. package/CHANGELOG.md +24 -2242
  21. package/Card/Card.d.ts +3 -3
  22. package/CardActionArea/CardActionArea.d.ts +3 -3
  23. package/CardActions/CardActions.d.ts +2 -2
  24. package/CardContent/CardContent.d.ts +2 -2
  25. package/CardHeader/CardHeader.d.ts +2 -2
  26. package/CardMedia/CardMedia.d.ts +2 -2
  27. package/Checkbox/Checkbox.d.ts +4 -4
  28. package/Chip/Chip.d.ts +2 -2
  29. package/CircularProgress/CircularProgress.d.ts +3 -7
  30. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  31. package/ClickAwayListener/ClickAwayListener.js +3 -3
  32. package/Collapse/Collapse.d.ts +5 -5
  33. package/Container/Container.d.ts +2 -2
  34. package/CssBaseline/CssBaseline.d.ts +2 -2
  35. package/Dialog/Dialog.d.ts +3 -3
  36. package/DialogActions/DialogActions.d.ts +2 -2
  37. package/DialogContent/DialogContent.d.ts +2 -2
  38. package/DialogContentText/DialogContentText.d.ts +3 -3
  39. package/DialogTitle/DialogTitle.d.ts +3 -3
  40. package/Divider/Divider.d.ts +3 -3
  41. package/Drawer/Drawer.d.ts +3 -3
  42. package/Fab/Fab.d.ts +3 -3
  43. package/Fade/Fade.d.ts +3 -3
  44. package/FilledInput/FilledInput.d.ts +3 -3
  45. package/FormControl/FormControl.d.ts +6 -6
  46. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  47. package/FormGroup/FormGroup.d.ts +3 -3
  48. package/FormHelperText/FormHelperText.d.ts +2 -2
  49. package/FormLabel/FormLabel.d.ts +4 -4
  50. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  51. package/Grid/Grid.d.ts +2 -2
  52. package/Grid2/Grid2.d.ts +2 -2
  53. package/Grid2/Grid2.js +2 -2
  54. package/Grow/Grow.d.ts +5 -5
  55. package/Hidden/Hidden.d.ts +2 -2
  56. package/Icon/Icon.d.ts +3 -3
  57. package/IconButton/IconButton.d.ts +4 -4
  58. package/ImageList/ImageList.d.ts +2 -2
  59. package/ImageListItem/ImageListItem.d.ts +2 -2
  60. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  61. package/Input/Input.d.ts +3 -3
  62. package/InputAdornment/InputAdornment.d.ts +2 -2
  63. package/InputBase/InputBase.d.ts +2 -2
  64. package/InputLabel/InputLabel.d.ts +3 -3
  65. package/LinearProgress/LinearProgress.d.ts +3 -7
  66. package/Link/Link.d.ts +4 -4
  67. package/List/List.d.ts +3 -3
  68. package/ListItem/ListItem.d.ts +3 -3
  69. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  70. package/ListItemButton/ListItemButton.d.ts +3 -3
  71. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  72. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  73. package/ListItemText/ListItemText.d.ts +2 -2
  74. package/ListSubheader/ListSubheader.d.ts +2 -2
  75. package/Menu/Menu.d.ts +4 -4
  76. package/Menu/Menu.js +6 -2
  77. package/MenuItem/MenuItem.d.ts +3 -3
  78. package/MenuList/MenuList.d.ts +4 -4
  79. package/MobileStepper/MobileStepper.d.ts +3 -3
  80. package/Modal/Modal.d.ts +7 -7
  81. package/Modal/Modal.js +9 -10
  82. package/NativeSelect/NativeSelect.d.ts +3 -3
  83. package/NoSsr/NoSsr.d.ts +2 -2
  84. package/NoSsr/NoSsr.js +2 -2
  85. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  86. package/Pagination/Pagination.d.ts +2 -2
  87. package/PaginationItem/PaginationItem.d.ts +2 -2
  88. package/Paper/Paper.d.ts +3 -3
  89. package/PigmentContainer/PigmentContainer.d.ts +2 -2
  90. package/PigmentContainer/PigmentContainer.js +2 -2
  91. package/PigmentGrid/PigmentGrid.d.ts +2 -2
  92. package/PigmentGrid/PigmentGrid.js +2 -2
  93. package/PigmentHidden/PigmentHidden.d.ts +2 -2
  94. package/PigmentHidden/PigmentHidden.js +2 -2
  95. package/PigmentStack/PigmentStack.d.ts +2 -2
  96. package/PigmentStack/PigmentStack.js +2 -2
  97. package/Popover/Popover.d.ts +64 -10
  98. package/Popover/Popover.js +78 -51
  99. package/Popper/Popper.d.ts +4 -4
  100. package/Popper/Popper.js +4 -4
  101. package/Portal/Portal.d.ts +2 -2
  102. package/Portal/Portal.js +2 -2
  103. package/README.md +4 -3
  104. package/Radio/Radio.d.ts +3 -3
  105. package/RadioGroup/RadioGroup.d.ts +3 -3
  106. package/Rating/Rating.d.ts +2 -2
  107. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  108. package/Select/Select.d.ts +3 -3
  109. package/Skeleton/Skeleton.d.ts +2 -2
  110. package/Slide/Slide.d.ts +4 -4
  111. package/Slider/Slider.d.ts +20 -11
  112. package/Slider/Slider.js +2 -2
  113. package/Snackbar/Snackbar.d.ts +80 -3
  114. package/Snackbar/Snackbar.js +122 -32
  115. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  116. package/SpeedDial/SpeedDial.d.ts +2 -2
  117. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  118. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  119. package/Stack/Stack.d.ts +2 -2
  120. package/Step/Step.d.ts +2 -2
  121. package/StepButton/StepButton.d.ts +3 -3
  122. package/StepConnector/StepConnector.d.ts +2 -2
  123. package/StepContent/StepContent.d.ts +2 -2
  124. package/StepIcon/StepIcon.d.ts +3 -3
  125. package/StepLabel/StepLabel.d.ts +2 -2
  126. package/Stepper/Stepper.d.ts +2 -2
  127. package/SvgIcon/SvgIcon.d.ts +3 -3
  128. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  129. package/Switch/Switch.d.ts +4 -4
  130. package/Tab/Tab.d.ts +3 -3
  131. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  132. package/Table/Table.d.ts +2 -2
  133. package/TableBody/TableBody.d.ts +2 -2
  134. package/TableCell/TableCell.d.ts +2 -2
  135. package/TableContainer/TableContainer.d.ts +2 -2
  136. package/TableFooter/TableFooter.d.ts +2 -2
  137. package/TableHead/TableHead.d.ts +2 -2
  138. package/TablePagination/TablePagination.d.ts +4 -4
  139. package/TableRow/TableRow.d.ts +2 -2
  140. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  141. package/Tabs/Tabs.d.ts +2 -2
  142. package/TextField/TextField.d.ts +10 -10
  143. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  144. package/TextareaAutosize/TextareaAutosize.js +2 -2
  145. package/ToggleButton/ToggleButton.d.ts +3 -3
  146. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  147. package/Toolbar/Toolbar.d.ts +2 -2
  148. package/Tooltip/Tooltip.d.ts +2 -2
  149. package/Typography/Typography.d.ts +3 -3
  150. package/Zoom/Zoom.d.ts +3 -3
  151. package/index.js +1 -1
  152. package/internal/SwitchBase.d.ts +33 -1
  153. package/internal/SwitchBase.js +84 -30
  154. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  155. package/modern/Grid2/Grid2.js +2 -2
  156. package/modern/Menu/Menu.js +6 -2
  157. package/modern/Modal/Modal.js +9 -10
  158. package/modern/NoSsr/NoSsr.js +2 -2
  159. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  160. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  161. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  162. package/modern/PigmentStack/PigmentStack.js +2 -2
  163. package/modern/Popover/Popover.js +78 -51
  164. package/modern/Popper/Popper.js +4 -4
  165. package/modern/Portal/Portal.js +2 -2
  166. package/modern/Slider/Slider.js +2 -2
  167. package/modern/Snackbar/Snackbar.js +122 -32
  168. package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
  169. package/modern/index.js +1 -1
  170. package/modern/internal/SwitchBase.js +84 -30
  171. package/modern/utils/mergeSlotProps.js +10 -3
  172. package/modern/version/index.js +5 -5
  173. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  174. package/node/Grid2/Grid2.js +2 -2
  175. package/node/Menu/Menu.js +6 -2
  176. package/node/Modal/Modal.js +9 -10
  177. package/node/NoSsr/NoSsr.js +2 -2
  178. package/node/PigmentContainer/PigmentContainer.js +2 -2
  179. package/node/PigmentGrid/PigmentGrid.js +2 -2
  180. package/node/PigmentHidden/PigmentHidden.js +2 -2
  181. package/node/PigmentStack/PigmentStack.js +2 -2
  182. package/node/Popover/Popover.js +78 -51
  183. package/node/Popper/Popper.js +4 -4
  184. package/node/Portal/Portal.js +2 -2
  185. package/node/Slider/Slider.js +2 -2
  186. package/node/Snackbar/Snackbar.js +122 -32
  187. package/node/TextareaAutosize/TextareaAutosize.js +2 -2
  188. package/node/index.js +1 -1
  189. package/node/internal/SwitchBase.js +84 -30
  190. package/node/utils/mergeSlotProps.js +10 -3
  191. package/node/version/index.js +5 -5
  192. package/package.json +7 -7
  193. package/utils/mergeSlotProps.js +10 -3
  194. package/version/index.js +5 -5
@@ -18,12 +18,12 @@ function clickedRootScrollbar(event, doc) {
18
18
  *
19
19
  * Demos:
20
20
  *
21
- * - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)
22
- * - [Menu](https://mui.com/material-ui/react-menu/)
21
+ * - [Click-Away Listener](https://next.mui.com/material-ui/react-click-away-listener/)
22
+ * - [Menu](https://next.mui.com/material-ui/react-menu/)
23
23
  *
24
24
  * API:
25
25
  *
26
- * - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)
26
+ * - [ClickAwayListener API](https://next.mui.com/material-ui/api/click-away-listener/)
27
27
  */
28
28
  function ClickAwayListener(props) {
29
29
  const {
@@ -10,11 +10,11 @@ import useTheme from "../styles/useTheme.js";
10
10
  *
11
11
  * Demos:
12
12
  *
13
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
13
+ * - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
14
14
  *
15
15
  * API:
16
16
  *
17
- * - [Grid2 API](https://mui.com/material-ui/api/grid-2/)
17
+ * - [Grid2 API](https://next.mui.com/material-ui/api/grid-2/)
18
18
  */
19
19
  const Grid2 = createGrid2({
20
20
  createStyledComponent: styled('div', {
@@ -263,16 +263,20 @@ process.env.NODE_ENV !== "production" ? Menu.propTypes /* remove-proptypes */ =
263
263
  * @default {}
264
264
  */
265
265
  slotProps: PropTypes.shape({
266
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
266
267
  paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
267
- root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
268
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
269
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
268
270
  }),
269
271
  /**
270
272
  * The components used for each slot inside.
271
273
  * @default {}
272
274
  */
273
275
  slots: PropTypes.shape({
276
+ backdrop: PropTypes.elementType,
274
277
  paper: PropTypes.elementType,
275
- root: PropTypes.elementType
278
+ root: PropTypes.elementType,
279
+ transition: PropTypes.elementType
276
280
  }),
277
281
  /**
278
282
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -15,7 +15,6 @@ import Backdrop from "../Backdrop/index.js";
15
15
  import useModal from "./useModal.js";
16
16
  import { getModalUtilityClass } from "./modalClasses.js";
17
17
  import useSlot from "../utils/useSlot.js";
18
- import { useForkRef } from "../utils/index.js";
19
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  const useUtilityClasses = ownerState => {
21
20
  const {
@@ -158,7 +157,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
158
157
  childProps.onExited = onExited;
159
158
  }
160
159
  const externalForwardedProps = {
161
- ...other,
162
160
  slots: {
163
161
  root: components.Root,
164
162
  backdrop: components.Backdrop,
@@ -170,19 +168,22 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
170
168
  }
171
169
  };
172
170
  const [RootSlot, rootProps] = useSlot('root', {
171
+ ref,
173
172
  elementType: ModalRoot,
174
- externalForwardedProps,
175
- getSlotProps: getRootProps,
176
- additionalProps: {
177
- ref,
178
- as: component
173
+ externalForwardedProps: {
174
+ ...externalForwardedProps,
175
+ ...other,
176
+ component
179
177
  },
178
+ getSlotProps: getRootProps,
180
179
  ownerState,
181
180
  className: clsx(className, classes?.root, !ownerState.open && ownerState.exited && classes?.hidden)
182
181
  });
183
182
  const [BackdropSlot, backdropProps] = useSlot('backdrop', {
183
+ ref: BackdropProps?.ref,
184
184
  elementType: BackdropComponent,
185
185
  externalForwardedProps,
186
+ shouldForwardComponentProp: true,
186
187
  additionalProps: BackdropProps,
187
188
  getSlotProps: otherHandlers => {
188
189
  return getBackdropProps({
@@ -200,7 +201,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
200
201
  className: clsx(BackdropProps?.className, classes?.backdrop),
201
202
  ownerState
202
203
  });
203
- const backdropRef = useForkRef(BackdropProps?.ref, backdropProps.ref);
204
204
  if (!keepMounted && !open && (!hasTransition || exited)) {
205
205
  return null;
206
206
  }
@@ -211,8 +211,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
211
211
  children: /*#__PURE__*/_jsxs(RootSlot, {
212
212
  ...rootProps,
213
213
  children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, {
214
- ...backdropProps,
215
- ref: backdropRef
214
+ ...backdropProps
216
215
  }) : null, /*#__PURE__*/_jsx(FocusTrap, {
217
216
  disableEnforceFocus: disableEnforceFocus,
218
217
  disableAutoFocus: disableAutoFocus,
@@ -15,11 +15,11 @@ import { exactProp, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui
15
15
  *
16
16
  * Demos:
17
17
  *
18
- * - [No SSR](https://mui.com/material-ui/react-no-ssr/)
18
+ * - [No SSR](https://next.mui.com/material-ui/react-no-ssr/)
19
19
  *
20
20
  * API:
21
21
  *
22
- * - [NoSsr API](https://mui.com/material-ui/api/no-ssr/)
22
+ * - [NoSsr API](https://next.mui.com/material-ui/api/no-ssr/)
23
23
  */
24
24
  function NoSsr(props) {
25
25
  const {
@@ -23,11 +23,11 @@ const useUtilityClasses = ownerState => {
23
23
  *
24
24
  * Demos:
25
25
  *
26
- * - [Container](https://mui.com/material-ui/react-container/)
26
+ * - [Container](https://next.mui.com/material-ui/react-container/)
27
27
  *
28
28
  * API:
29
29
  *
30
- * - [PigmentContainer API](https://mui.com/material-ui/api/pigment-container/)
30
+ * - [PigmentContainer API](https://next.mui.com/material-ui/api/pigment-container/)
31
31
  */
32
32
  const PigmentContainer = /*#__PURE__*/React.forwardRef(function PigmentContainer({
33
33
  className,
@@ -37,11 +37,11 @@ const useUtilityClasses = ownerState => {
37
37
  *
38
38
  * Demos:
39
39
  *
40
- * - [Grid version 2](https://mui.com/material-ui/react-grid2/)
40
+ * - [Grid version 2](https://next.mui.com/material-ui/react-grid2/)
41
41
  *
42
42
  * API:
43
43
  *
44
- * - [PigmentGrid API](https://mui.com/material-ui/api/pigment-grid/)
44
+ * - [PigmentGrid API](https://next.mui.com/material-ui/api/pigment-grid/)
45
45
  */
46
46
  const PigmentGrid = /*#__PURE__*/React.forwardRef(function PigmentGrid(props, ref) {
47
47
  const {
@@ -171,11 +171,11 @@ process.env.NODE_ENV !== "production" ? HiddenCss.propTypes /* remove-proptypes
171
171
  *
172
172
  * Demos:
173
173
  *
174
- * - [Hidden](https://mui.com/material-ui/react-hidden/)
174
+ * - [Hidden](https://next.mui.com/material-ui/react-hidden/)
175
175
  *
176
176
  * API:
177
177
  *
178
- * - [PigmentHidden API](https://mui.com/material-ui/api/pigment-hidden/)
178
+ * - [PigmentHidden API](https://next.mui.com/material-ui/api/pigment-hidden/)
179
179
  */
180
180
  function PigmentHidden({
181
181
  implementation = 'js',
@@ -16,11 +16,11 @@ const useUtilityClasses = () => {
16
16
  *
17
17
  * Demos:
18
18
  *
19
- * - [Stack](https://mui.com/material-ui/react-stack/)
19
+ * - [Stack](https://next.mui.com/material-ui/react-stack/)
20
20
  *
21
21
  * API:
22
22
  *
23
- * - [PigmentStack API](https://mui.com/material-ui/api/pigment-stack/)
23
+ * - [PigmentStack API](https://next.mui.com/material-ui/api/pigment-stack/)
24
24
  */
25
25
  const PigmentStack = /*#__PURE__*/React.forwardRef(function PigmentStack({
26
26
  className,
@@ -15,12 +15,12 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
15
15
  import debounce from "../utils/debounce.js";
16
16
  import ownerDocument from "../utils/ownerDocument.js";
17
17
  import ownerWindow from "../utils/ownerWindow.js";
18
- import useForkRef from "../utils/useForkRef.js";
19
18
  import Grow from "../Grow/index.js";
20
19
  import Modal from "../Modal/index.js";
21
20
  import PaperBase from "../Paper/index.js";
22
21
  import { getPopoverUtilityClass } from "./popoverClasses.js";
23
22
  import useSlot from "../utils/useSlot.js";
23
+ import { mergeSlotProps } from "../utils/index.js";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  export function getOffsetTop(rect, vertical) {
26
26
  let offset = 0;
@@ -103,22 +103,21 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
103
103
  marginThreshold = 16,
104
104
  open,
105
105
  PaperProps: PaperPropsProp = {},
106
+ // TODO: remove in v7
106
107
  slots = {},
107
108
  slotProps = {},
108
109
  transformOrigin = {
109
110
  vertical: 'top',
110
111
  horizontal: 'left'
111
112
  },
112
- TransitionComponent = Grow,
113
+ TransitionComponent,
114
+ // TODO: remove in v7
113
115
  transitionDuration: transitionDurationProp = 'auto',
114
- TransitionProps: {
115
- onEntering,
116
- ...TransitionProps
117
- } = {},
116
+ TransitionProps = {},
117
+ // TODO: remove in v7
118
118
  disableScrollLock = false,
119
119
  ...other
120
120
  } = props;
121
- const externalPaperSlotProps = slotProps?.paper ?? PaperPropsProp;
122
121
  const paperRef = React.useRef();
123
122
  const ownerState = {
124
123
  ...props,
@@ -126,7 +125,6 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
126
125
  anchorReference,
127
126
  elevation,
128
127
  marginThreshold,
129
- externalPaperSlotProps,
130
128
  transformOrigin,
131
129
  TransitionComponent,
132
130
  transitionDuration: transitionDurationProp,
@@ -255,10 +253,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
255
253
  }
256
254
  return () => window.removeEventListener('scroll', setPositioningStyles);
257
255
  }, [anchorEl, disableScrollLock, setPositioningStyles]);
258
- const handleEntering = (element, isAppearing) => {
259
- if (onEntering) {
260
- onEntering(element, isAppearing);
261
- }
256
+ const handleEntering = () => {
262
257
  setPositioningStyles();
263
258
  };
264
259
  const handleExited = () => {
@@ -289,45 +284,65 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
289
284
  };
290
285
  }, [anchorEl, open, setPositioningStyles]);
291
286
  let transitionDuration = transitionDurationProp;
292
- if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
293
- transitionDuration = undefined;
294
- }
295
-
296
- // If the container prop is provided, use that
297
- // If the anchorEl prop is provided, use its parent body element as the container
298
- // If neither are provided let the Modal take care of choosing the container
299
- const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);
300
287
  const externalForwardedProps = {
301
- slots,
288
+ slots: {
289
+ transition: TransitionComponent,
290
+ ...slots
291
+ },
302
292
  slotProps: {
303
- ...slotProps,
304
- paper: externalPaperSlotProps
293
+ transition: TransitionProps,
294
+ paper: PaperPropsProp,
295
+ ...slotProps
305
296
  }
306
297
  };
307
- const [PaperSlot, paperProps] = useSlot('paper', {
308
- elementType: PopoverPaper,
298
+ const [TransitionSlot, transitionSlotProps] = useSlot('transition', {
299
+ elementType: Grow,
309
300
  externalForwardedProps,
310
- additionalProps: {
311
- elevation,
312
- className: clsx(classes.paper, externalPaperSlotProps?.className),
313
- style: isPositioned ? externalPaperSlotProps.style : {
314
- ...externalPaperSlotProps.style,
315
- opacity: 0
301
+ ownerState,
302
+ getSlotProps: handlers => ({
303
+ ...handlers,
304
+ onEntering: (element, isAppearing) => {
305
+ handlers.onEntering?.(element, isAppearing);
306
+ handleEntering();
307
+ },
308
+ onExited: element => {
309
+ handlers.onExited?.(element);
310
+ handleExited();
316
311
  }
317
- },
318
- ownerState
312
+ }),
313
+ additionalProps: {
314
+ appear: true,
315
+ in: open
316
+ }
319
317
  });
318
+ if (transitionDurationProp === 'auto' && !TransitionSlot.muiSupportAuto) {
319
+ transitionDuration = undefined;
320
+ }
321
+
322
+ // If the container prop is provided, use that
323
+ // If the anchorEl prop is provided, use its parent body element as the container
324
+ // If neither are provided let the Modal take care of choosing the container
325
+ const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);
320
326
  const [RootSlot, {
327
+ slots: rootSlotsProp,
321
328
  slotProps: rootSlotPropsProp,
322
329
  ...rootProps
323
330
  }] = useSlot('root', {
331
+ ref,
324
332
  elementType: PopoverRoot,
325
- externalForwardedProps,
333
+ externalForwardedProps: {
334
+ ...externalForwardedProps,
335
+ ...other
336
+ },
337
+ shouldForwardComponentProp: true,
326
338
  additionalProps: {
339
+ slots: {
340
+ backdrop: slots.backdrop
341
+ },
327
342
  slotProps: {
328
- backdrop: {
343
+ backdrop: mergeSlotProps(typeof slotProps.backdrop === 'function' ? slotProps.backdrop(ownerState) : slotProps.backdrop, {
329
344
  invisible: true
330
- }
345
+ })
331
346
  },
332
347
  container,
333
348
  open
@@ -335,25 +350,32 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
335
350
  ownerState,
336
351
  className: clsx(classes.root, className)
337
352
  });
338
- const handlePaperRef = useForkRef(paperRef, paperProps.ref);
353
+ const [PaperSlot, paperProps] = useSlot('paper', {
354
+ ref: paperRef,
355
+ className: classes.paper,
356
+ elementType: PopoverPaper,
357
+ externalForwardedProps,
358
+ shouldForwardComponentProp: true,
359
+ additionalProps: {
360
+ elevation,
361
+ style: isPositioned ? undefined : {
362
+ opacity: 0
363
+ }
364
+ },
365
+ ownerState
366
+ });
339
367
  return /*#__PURE__*/_jsx(RootSlot, {
340
368
  ...rootProps,
341
369
  ...(!isHostComponent(RootSlot) && {
370
+ slots: rootSlotsProp,
342
371
  slotProps: rootSlotPropsProp,
343
372
  disableScrollLock
344
373
  }),
345
- ...other,
346
- ref: ref,
347
- children: /*#__PURE__*/_jsx(TransitionComponent, {
348
- appear: true,
349
- in: open,
350
- onEntering: handleEntering,
351
- onExited: handleExited,
374
+ children: /*#__PURE__*/_jsx(TransitionSlot, {
375
+ ...transitionSlotProps,
352
376
  timeout: transitionDuration,
353
- ...TransitionProps,
354
377
  children: /*#__PURE__*/_jsx(PaperSlot, {
355
378
  ...paperProps,
356
- ref: handlePaperRef,
357
379
  children: children
358
380
  })
359
381
  })
@@ -421,8 +443,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
421
443
  anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),
422
444
  /**
423
445
  * A backdrop component. This prop enables custom backdrop rendering.
424
- * @deprecated Use `slotProps.root.slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
425
- * Use the `slotProps.root.slots.backdrop` prop to make your application ready for the next version of Material UI.
446
+ * @deprecated Use `slots.backdrop` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
426
447
  * @default styled(Backdrop, {
427
448
  * name: 'MuiModal',
428
449
  * slot: 'Backdrop',
@@ -436,7 +457,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
436
457
  BackdropComponent: PropTypes.elementType,
437
458
  /**
438
459
  * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
439
- * @deprecated Use `slotProps.root.slotProps.backdrop` instead.
460
+ * @deprecated Use `slotProps.backdrop` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
440
461
  */
441
462
  BackdropProps: PropTypes.object,
442
463
  /**
@@ -500,16 +521,20 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
500
521
  * @default {}
501
522
  */
502
523
  slotProps: PropTypes.shape({
524
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
503
525
  paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
504
- root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
526
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
527
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
505
528
  }),
506
529
  /**
507
530
  * The components used for each slot inside.
508
531
  * @default {}
509
532
  */
510
533
  slots: PropTypes.shape({
534
+ backdrop: PropTypes.elementType,
511
535
  paper: PropTypes.elementType,
512
- root: PropTypes.elementType
536
+ root: PropTypes.elementType,
537
+ transition: PropTypes.elementType
513
538
  }),
514
539
  /**
515
540
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -534,6 +559,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
534
559
  /**
535
560
  * The component used for the transition.
536
561
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
562
+ * @deprecated use the `slots.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
537
563
  * @default Grow
538
564
  */
539
565
  TransitionComponent: PropTypes.elementType,
@@ -549,6 +575,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
549
575
  /**
550
576
  * Props applied to the transition element.
551
577
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
578
+ * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
552
579
  * @default {}
553
580
  */
554
581
  TransitionProps: PropTypes.object
@@ -19,13 +19,13 @@ const PopperRoot = styled(BasePopper, {
19
19
  *
20
20
  * Demos:
21
21
  *
22
- * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
23
- * - [Menu](https://mui.com/material-ui/react-menu/)
24
- * - [Popper](https://mui.com/material-ui/react-popper/)
22
+ * - [Autocomplete](https://next.mui.com/material-ui/react-autocomplete/)
23
+ * - [Menu](https://next.mui.com/material-ui/react-menu/)
24
+ * - [Popper](https://next.mui.com/material-ui/react-popper/)
25
25
  *
26
26
  * API:
27
27
  *
28
- * - [Popper API](https://mui.com/material-ui/api/popper/)
28
+ * - [Popper API](https://next.mui.com/material-ui/api/popper/)
29
29
  */
30
30
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
31
31
  const isRtl = useRtl();
@@ -14,11 +14,11 @@ function getContainer(container) {
14
14
  *
15
15
  * Demos:
16
16
  *
17
- * - [Portal](https://mui.com/material-ui/react-portal/)
17
+ * - [Portal](https://next.mui.com/material-ui/react-portal/)
18
18
  *
19
19
  * API:
20
20
  *
21
- * - [Portal API](https://mui.com/material-ui/api/portal/)
21
+ * - [Portal API](https://next.mui.com/material-ui/api/portal/)
22
22
  */
23
23
  const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {
24
24
  const {
@@ -966,7 +966,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
966
966
  * @param {Event} event The event source of the callback.
967
967
  * You can pull out the new value by accessing `event.target.value` (any).
968
968
  * **Warning**: This is a generic event not a change event.
969
- * @param {number | number[]} value The new value.
969
+ * @param {Value} value The new value.
970
970
  * @param {number} activeThumb Index of the currently moved thumb.
971
971
  */
972
972
  onChange: PropTypes.func,
@@ -974,7 +974,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
974
974
  * Callback function that is fired when the `mouseup` is triggered.
975
975
  *
976
976
  * @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
977
- * @param {number | number[]} value The new value.
977
+ * @param {Value} value The new value.
978
978
  */
979
979
  onChangeCommitted: PropTypes.func,
980
980
  /**