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 584b1c04faaebb..48cc314c13bb0b 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 @@ -709,6 +709,28 @@ Use `sx={{ opacity : "0.6" }}` (or any opacity): /> ``` +#### Popper deprecated props removed + +Use the [popper-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#popper-props) below to migrate the code as described in the following section: + +```bash +npx @mui/codemod@latest deprecations/popper-props +``` + +The following deprecated props have been removed: + +- `components` — use `slots` instead +- `componentsProps` — use `slotProps` instead + +```diff + +``` + #### Tabs deprecated props removed Use the [tabs-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#tabs-props) below to migrate the code as described in the following section: diff --git a/docs/pages/material-ui/api/popper.json b/docs/pages/material-ui/api/popper.json index 62d64083b18522..cfee7a431e7ede 100644 --- a/docs/pages/material-ui/api/popper.json +++ b/docs/pages/material-ui/api/popper.json @@ -9,18 +9,6 @@ }, "children": { "type": { "name": "union", "description": "node
| func" } }, "component": { "type": { "name": "elementType" } }, - "components": { - "type": { "name": "shape", "description": "{ Root?: elementType }" }, - "default": "{}", - "deprecated": true, - "deprecationInfo": "use the slots prop instead. This prop will be removed in a future major release. How to migrate." - }, - "componentsProps": { - "type": { "name": "shape", "description": "{ root?: func
| object }" }, - "default": "{}", - "deprecated": true, - "deprecationInfo": "use the slotProps prop instead. This prop will be removed in a future major release. How to migrate." - }, "container": { "type": { "name": "union", "description": "HTML element
| func" } }, "disablePortal": { "type": { "name": "bool" }, "default": "false" }, "keepMounted": { "type": { "name": "bool" }, "default": "false" }, diff --git a/docs/translations/api-docs/popper/popper.json b/docs/translations/api-docs/popper/popper.json index 23b39e61d6fa7a..49511d73d12766 100644 --- a/docs/translations/api-docs/popper/popper.json +++ b/docs/translations/api-docs/popper/popper.json @@ -8,10 +8,6 @@ "component": { "description": "The component used for the root node. Either a string to use a HTML element or a component." }, - "components": { - "description": "The components used for each slot inside the Popper. Either a string to use a HTML element or a component." - }, - "componentsProps": { "description": "The props used for each slot inside the Popper." }, "container": { "description": "An HTML element or function that returns one. The container will have the portal children appended to it.
You can also provide a callback, which is called in a React layout effect. This lets you set the container from a ref, and also makes server-side rendering possible.
By default, it uses the body of the top-level document object, so it's simply document.body most of the time." }, diff --git a/packages/mui-material/src/Popper/Popper.test.js b/packages/mui-material/src/Popper/Popper.test.js index a010d2a4be450b..750c7a0c3358f1 100644 --- a/packages/mui-material/src/Popper/Popper.test.js +++ b/packages/mui-material/src/Popper/Popper.test.js @@ -36,7 +36,6 @@ describe('', () => { inheritComponent: 'div', render, refInstanceof: window.HTMLDivElement, - testLegacyComponentsProp: true, slots: { root: {}, }, diff --git a/packages/mui-material/src/Popper/Popper.tsx b/packages/mui-material/src/Popper/Popper.tsx index 06b5966260a204..72bb149ed124fc 100644 --- a/packages/mui-material/src/Popper/Popper.tsx +++ b/packages/mui-material/src/Popper/Popper.tsx @@ -17,25 +17,6 @@ export interface PopperProps extends Omit { * Either a string to use a HTML element or a component. */ component?: React.ElementType | undefined; - /** - * The components used for each slot inside the Popper. - * Either a string to use a HTML element or a component. - * - * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/). - * @default {} - */ - components?: - | { - Root?: React.ElementType | undefined; - } - | undefined; - /** - * The props used for each slot inside the Popper. - * - * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/). - * @default {} - */ - componentsProps?: BasePopperProps['slotProps'] | undefined; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ @@ -72,8 +53,6 @@ const Popper = React.forwardRef(function Popper( const { anchorEl, component, - components, - componentsProps, container, disablePortal, keepMounted, @@ -88,7 +67,6 @@ const Popper = React.forwardRef(function Popper( ...other } = props; - const RootComponent = slots?.root ?? components?.Root; const otherProps = { anchorEl, container, @@ -106,8 +84,8 @@ const Popper = React.forwardRef(function Popper( @@ -142,25 +120,6 @@ Popper.propTypes /* remove-proptypes */ = { * Either a string to use a HTML element or a component. */ component: PropTypes.elementType, - /** - * The components used for each slot inside the Popper. - * Either a string to use a HTML element or a component. - * - * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/). - * @default {} - */ - components: PropTypes.shape({ - Root: PropTypes.elementType, - }), - /** - * The props used for each slot inside the Popper. - * - * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/). - * @default {} - */ - componentsProps: PropTypes.shape({ - root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), - }), /** * An HTML element or function that returns one. * The `container` will have the portal children appended to it.