diff --git a/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md b/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md index 4df0f7f48f3443..3b80c6a93fcadb 100644 --- a/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md +++ b/docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md @@ -1277,6 +1277,12 @@ If you were using these deprecated class names as `styleOverrides` keys in your #### SpeedDial deprecated props removed +Use the [speed-dial-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#speed-dial-props) below to migrate the code as described in the following section: + +```bash +npx @mui/codemod@latest deprecations/speed-dial-props +``` + The deprecated `SpeedDial` props have been removed. Use the `slots` and `slotProps` props instead: @@ -1291,6 +1297,12 @@ Use the `slots` and `slotProps` props instead: #### SpeedDialAction deprecated props removed +Use the [speed-dial-action-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#speed-dial-action-props) below to migrate the code as described in the following section: + +```bash +npx @mui/codemod@latest deprecations/speed-dial-action-props +``` + The deprecated `SpeedDialAction` props have been removed. Use the `slotProps` prop instead: @@ -1313,6 +1325,12 @@ Use the `slotProps` prop instead: #### Menu deprecated props removed +Use the [menu-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#menu-props) below to migrate the code as described in the following section: + +```bash +npx @mui/codemod@latest deprecations/menu-props +``` + The following deprecated props have been removed: - `MenuListProps` — use `slotProps.list` instead @@ -1370,6 +1388,12 @@ The following deprecated props have been removed: #### Popover deprecated props removed +Use the [popover-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#popover-props) below to migrate the code as described in the following section: + +```bash +npx @mui/codemod@latest deprecations/popover-props +``` + The following deprecated props have been removed: - `BackdropComponent` — use `slots.backdrop` instead diff --git a/packages/mui-codemod/README.md b/packages/mui-codemod/README.md index 5b7ddd549b93ca..9c1539a5f676f3 100644 --- a/packages/mui-codemod/README.md +++ b/packages/mui-codemod/README.md @@ -1277,6 +1277,46 @@ CSS transforms: npx @mui/codemod@next deprecations/drawer-classes ``` +#### `drawer-props` + +```diff + +``` + +The same applies to `SwipeableDrawer`. + +```diff + MuiDrawer: { + defaultProps: { +- BackdropComponent: CustomBackdrop, +- BackdropProps: { transitionDuration: 300 }, +- PaperProps: { elevation: 20 }, +- SlideProps: { direction: 'right' }, ++ slots: { backdrop: CustomBackdrop }, ++ slotProps: { ++ backdrop: { transitionDuration: 300 }, ++ paper: { elevation: 20 }, ++ transition: { direction: 'right' }, ++ }, + }, + }, +``` + +```bash +npx @mui/codemod@next deprecations/drawer-props +``` + #### `filled-input-props` ```diff @@ -1640,6 +1680,40 @@ npx @mui/codemod@next deprecations/modal-props npx @mui/codemod@next deprecations/mobile-stepper-props ``` +#### `menu-props` + +```diff + +``` + +```diff + MuiMenu: { + defaultProps: { +- TransitionComponent: CustomTransition, +- MenuListProps: { disablePadding: true }, +- TransitionProps: { timeout: 200 }, ++ slots: { transition: CustomTransition }, ++ slotProps: { ++ list: { disablePadding: true }, ++ transition: { timeout: 200 }, ++ }, + }, + }, +``` + +```bash +npx @mui/codemod@next deprecations/menu-props +``` + #### `pagination-item-classes` JS transforms: @@ -1726,6 +1800,46 @@ npx @mui/codemod@next deprecations/pagination-item-classes npx @mui/codemod@next deprecations/pagination-item-props ``` +#### `popover-props` + +```diff + +``` + +```diff + MuiPopover: { + defaultProps: { +- BackdropComponent: 'div', +- BackdropProps: { timeout: 200 }, +- PaperProps: { elevation: 8 }, +- TransitionComponent: 'em', +- TransitionProps: { timeout: 200 }, ++ slots: { backdrop: 'div', transition: 'em' }, ++ slotProps: { ++ backdrop: { timeout: 200 }, ++ paper: { elevation: 8 }, ++ transition: { timeout: 200 }, ++ }, + }, + }, +``` + +```bash +npx @mui/codemod@next deprecations/popover-props +``` + #### `popper-props` ```diff @@ -1906,6 +2020,78 @@ npx @mui/codemod@next deprecations/slider-props npx @mui/codemod@next deprecations/snackbar-props ``` +#### `speed-dial-props` + +```diff + +``` + +```diff + MuiSpeedDial: { + defaultProps: { +- TransitionComponent: CustomTransition, +- TransitionProps: CustomTransitionProps, ++ slots: { transition: CustomTransition }, ++ slotProps: { transition: CustomTransitionProps }, + }, + }, +``` + +```bash +npx @mui/codemod@next deprecations/speed-dial-props +``` + +#### `speed-dial-action-props` + +```diff + +``` + +```diff + MuiSpeedDialAction: { + defaultProps: { +- FabProps: { id: 'test' }, +- TooltipClasses: classes, +- tooltipOpen: true, +- tooltipPlacement: 'top', +- tooltipTitle: 'test', ++ slotProps: { ++ fab: { id: 'test' }, ++ tooltip: { ++ classes: classes, ++ open: true, ++ placement: 'top', ++ title: 'test', ++ }, ++ }, + }, + }, +``` + +```bash +npx @mui/codemod@next deprecations/speed-dial-action-props +``` + #### `slider-classes` JS transforms: