From 84766c523cff7511c2b9192fc94b7cde5153ce6f Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Fri, 31 May 2024 19:13:01 +0200 Subject: [PATCH 01/13] revert deprecation warnings --- docs/pages/material-ui/api/accordion.json | 12 ++----- docs/pages/material-ui/api/autocomplete.json | 33 +++---------------- docs/pages/material-ui/api/avatar.json | 6 +--- docs/pages/material-ui/api/backdrop.json | 7 +--- docs/pages/material-ui/api/list-item.json | 11 ++----- docs/pages/material-ui/api/speed-dial.json | 13 ++------ docs/pages/material-ui/api/step-label.json | 12 ++----- docs/pages/material-ui/api/text-field.json | 30 +++-------------- .../mui-material/src/Accordion/Accordion.d.ts | 2 -- .../mui-material/src/Accordion/Accordion.js | 2 -- .../src/Autocomplete/Autocomplete.d.ts | 5 --- .../src/Autocomplete/Autocomplete.js | 5 --- packages/mui-material/src/Avatar/Avatar.d.ts | 1 - packages/mui-material/src/Avatar/Avatar.js | 1 - .../mui-material/src/Backdrop/Backdrop.d.ts | 1 - .../mui-material/src/Backdrop/Backdrop.js | 1 - .../mui-material/src/ListItem/ListItem.d.ts | 2 -- .../mui-material/src/ListItem/ListItem.js | 2 -- .../mui-material/src/SpeedDial/SpeedDial.d.ts | 2 -- .../mui-material/src/SpeedDial/SpeedDial.js | 2 -- .../mui-material/src/StepLabel/StepLabel.d.ts | 2 -- .../mui-material/src/StepLabel/StepLabel.js | 2 -- .../mui-material/src/TextField/TextField.d.ts | 7 ---- .../mui-material/src/TextField/TextField.js | 5 --- 24 files changed, 20 insertions(+), 146 deletions(-) diff --git a/docs/pages/material-ui/api/accordion.json b/docs/pages/material-ui/api/accordion.json index 52e4b0b1b4419a..94c89fd40989f1 100644 --- a/docs/pages/material-ui/api/accordion.json +++ b/docs/pages/material-ui/api/accordion.json @@ -29,16 +29,8 @@ }, "additionalInfo": { "sx": true } }, - "TransitionComponent": { - "type": { "name": "elementType" }, - "deprecated": true, - "deprecationInfo": "Use slots.transition instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "TransitionProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.transition instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - } + "TransitionComponent": { "type": { "name": "elementType" } }, + "TransitionProps": { "type": { "name": "object" } } }, "name": "Accordion", "imports": [ diff --git a/docs/pages/material-ui/api/autocomplete.json b/docs/pages/material-ui/api/autocomplete.json index a351cf39d96bd8..6d8aa34cc72031 100644 --- a/docs/pages/material-ui/api/autocomplete.json +++ b/docs/pages/material-ui/api/autocomplete.json @@ -16,11 +16,7 @@ }, "default": "false" }, - "ChipProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.chip instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "ChipProps": { "type": { "name": "object" } }, "classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } }, "clearIcon": { "type": { "name": "node" }, "default": "" }, "clearOnBlur": { "type": { "name": "bool" }, "default": "!props.freeSolo" }, @@ -97,17 +93,8 @@ } }, "limitTags": { "type": { "name": "custom", "description": "integer" }, "default": "-1" }, - "ListboxComponent": { - "type": { "name": "elementType" }, - "default": "'ul'", - "deprecated": true, - "deprecationInfo": "Use slots.listbox instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "ListboxProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.listbox instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "ListboxComponent": { "type": { "name": "elementType" }, "default": "'ul'" }, + "ListboxProps": { "type": { "name": "object" } }, "loading": { "type": { "name": "bool" }, "default": "false" }, "loadingText": { "type": { "name": "node" }, "default": "'Loading…'" }, "multiple": { "type": { "name": "bool" }, "default": "false" }, @@ -150,18 +137,8 @@ "open": { "type": { "name": "bool" } }, "openOnFocus": { "type": { "name": "bool" }, "default": "false" }, "openText": { "type": { "name": "string" }, "default": "'Open'" }, - "PaperComponent": { - "type": { "name": "elementType" }, - "default": "Paper", - "deprecated": true, - "deprecationInfo": "Use slots.paper instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "PopperComponent": { - "type": { "name": "elementType" }, - "default": "Popper", - "deprecated": true, - "deprecationInfo": "Use slots.popper instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "PaperComponent": { "type": { "name": "elementType" }, "default": "Paper" }, + "PopperComponent": { "type": { "name": "elementType" }, "default": "Popper" }, "popupIcon": { "type": { "name": "node" }, "default": "" }, "readOnly": { "type": { "name": "bool" }, "default": "false" }, "renderGroup": { diff --git a/docs/pages/material-ui/api/avatar.json b/docs/pages/material-ui/api/avatar.json index b73b810f760854..fe17a8e52b8d1b 100644 --- a/docs/pages/material-ui/api/avatar.json +++ b/docs/pages/material-ui/api/avatar.json @@ -4,11 +4,7 @@ "children": { "type": { "name": "node" } }, "classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } }, "component": { "type": { "name": "elementType" } }, - "imgProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.img instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "imgProps": { "type": { "name": "object" } }, "sizes": { "type": { "name": "string" } }, "slotProps": { "type": { "name": "shape", "description": "{ img?: func
| object }" }, diff --git a/docs/pages/material-ui/api/backdrop.json b/docs/pages/material-ui/api/backdrop.json index c201d45e204f74..7a63417d6b9ffc 100644 --- a/docs/pages/material-ui/api/backdrop.json +++ b/docs/pages/material-ui/api/backdrop.json @@ -34,12 +34,7 @@ }, "additionalInfo": { "sx": true } }, - "TransitionComponent": { - "type": { "name": "elementType" }, - "default": "Fade", - "deprecated": true, - "deprecationInfo": "Use slots.transition instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "TransitionComponent": { "type": { "name": "elementType" }, "default": "Fade" }, "transitionDuration": { "type": { "name": "union", diff --git a/docs/pages/material-ui/api/list-item.json b/docs/pages/material-ui/api/list-item.json index f9f795a1e09b04..50fe0e3a6cbe5a 100644 --- a/docs/pages/material-ui/api/list-item.json +++ b/docs/pages/material-ui/api/list-item.json @@ -33,16 +33,9 @@ }, "ContainerComponent": { "type": { "name": "custom", "description": "element type" }, - "default": "'li'", - "deprecated": true, - "deprecationInfo": "Use the component or slots.root prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "ContainerProps": { - "type": { "name": "object" }, - "default": "{}", - "deprecated": true, - "deprecationInfo": "Use the slotProps.root prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + "default": "'li'" }, + "ContainerProps": { "type": { "name": "object" }, "default": "{}" }, "dense": { "type": { "name": "bool" }, "default": "false" }, "disabled": { "type": { "name": "bool" }, diff --git a/docs/pages/material-ui/api/speed-dial.json b/docs/pages/material-ui/api/speed-dial.json index e5ac729f1ff19f..71c089e3f565f9 100644 --- a/docs/pages/material-ui/api/speed-dial.json +++ b/docs/pages/material-ui/api/speed-dial.json @@ -44,12 +44,7 @@ }, "additionalInfo": { "sx": true } }, - "TransitionComponent": { - "type": { "name": "elementType" }, - "default": "Zoom\n* @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)", - "deprecated": true, - "deprecationInfo": "Use slots.transition instead. This prop will be removed in v7. How to migrate" - }, + "TransitionComponent": { "type": { "name": "elementType" }, "default": "Zoom" }, "transitionDuration": { "type": { "name": "union", @@ -57,11 +52,7 @@ }, "default": "{\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen,\n}" }, - "TransitionProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.transition instead. This prop will be removed in v7. How to migrate" - } + "TransitionProps": { "type": { "name": "object" } } }, "name": "SpeedDial", "imports": [ diff --git a/docs/pages/material-ui/api/step-label.json b/docs/pages/material-ui/api/step-label.json index 1c3fde1ffaedc4..de93ef10e42822 100644 --- a/docs/pages/material-ui/api/step-label.json +++ b/docs/pages/material-ui/api/step-label.json @@ -22,16 +22,8 @@ "type": { "name": "shape", "description": "{ label?: elementType, stepIcon?: elementType }" }, "default": "{}" }, - "StepIconComponent": { - "type": { "name": "elementType" }, - "deprecated": true, - "deprecationInfo": "Use slots.stepIcon instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "StepIconProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.stepIcon instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "StepIconComponent": { "type": { "name": "elementType" } }, + "StepIconProps": { "type": { "name": "object" } }, "sx": { "type": { "name": "union", diff --git a/docs/pages/material-ui/api/text-field.json b/docs/pages/material-ui/api/text-field.json index 0bbad58b8b4746..b2023391f3b8e6 100644 --- a/docs/pages/material-ui/api/text-field.json +++ b/docs/pages/material-ui/api/text-field.json @@ -13,29 +13,13 @@ "defaultValue": { "type": { "name": "any" } }, "disabled": { "type": { "name": "bool" }, "default": "false" }, "error": { "type": { "name": "bool" }, "default": "false" }, - "FormHelperTextProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.formHelperText instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "FormHelperTextProps": { "type": { "name": "object" } }, "fullWidth": { "type": { "name": "bool" }, "default": "false" }, "helperText": { "type": { "name": "node" } }, "id": { "type": { "name": "string" } }, - "InputLabelProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.inputLabel instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "inputProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.htmlInput instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, - "InputProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.input instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "InputLabelProps": { "type": { "name": "object" } }, + "inputProps": { "type": { "name": "object" } }, + "InputProps": { "type": { "name": "object" } }, "inputRef": { "type": { "name": "custom", "description": "ref" } }, "label": { "type": { "name": "node" } }, "margin": { @@ -57,11 +41,7 @@ "required": { "type": { "name": "bool" }, "default": "false" }, "rows": { "type": { "name": "union", "description": "number
| string" } }, "select": { "type": { "name": "bool" }, "default": "false" }, - "SelectProps": { - "type": { "name": "object" }, - "deprecated": true, - "deprecationInfo": "Use slotProps.select instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." - }, + "SelectProps": { "type": { "name": "object" } }, "size": { "type": { "name": "union", diff --git a/packages/mui-material/src/Accordion/Accordion.d.ts b/packages/mui-material/src/Accordion/Accordion.d.ts index 5102ada787aacf..45727e0d31950f 100644 --- a/packages/mui-material/src/Accordion/Accordion.d.ts +++ b/packages/mui-material/src/Accordion/Accordion.d.ts @@ -79,7 +79,6 @@ export type AccordionTypeMap< /** * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. - * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionComponent?: React.JSXElementConstructor< TransitionProps & { children?: React.ReactElement } @@ -87,7 +86,6 @@ export type AccordionTypeMap< /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. - * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionProps?: TransitionProps; } & AccordionSlotsAndSlotProps; diff --git a/packages/mui-material/src/Accordion/Accordion.js b/packages/mui-material/src/Accordion/Accordion.js index dfff92e9a797e7..1a4cced080c75e 100644 --- a/packages/mui-material/src/Accordion/Accordion.js +++ b/packages/mui-material/src/Accordion/Accordion.js @@ -300,13 +300,11 @@ Accordion.propTypes /* remove-proptypes */ = { /** * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. - * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionComponent: PropTypes.elementType, /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. - * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionProps: PropTypes.object, }; diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.d.ts b/packages/mui-material/src/Autocomplete/Autocomplete.d.ts index 3119083dab2ef3..246b43755185fc 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.d.ts +++ b/packages/mui-material/src/Autocomplete/Autocomplete.d.ts @@ -165,7 +165,6 @@ export interface AutocompleteProps< AutocompleteSlotsAndSlotProps { /** * Props applied to the [`Chip`](/material-ui/api/chip/) element. - * @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ChipProps?: ChipProps; /** @@ -232,12 +231,10 @@ export interface AutocompleteProps< /** * The component used to render the listbox. * @default 'ul' - * @deprecated Use `slots.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ListboxComponent?: React.JSXElementConstructor>; /** * Props applied to the Listbox element. - * @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ListboxProps?: ReturnType['getListboxProps']> & { sx?: SxProps; @@ -282,13 +279,11 @@ export interface AutocompleteProps< /** * The component used to render the body of the popup. * @default Paper - * @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ PaperComponent?: React.JSXElementConstructor>; /** * The component used to position the popup. * @default Popper - * @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ PopperComponent?: React.JSXElementConstructor; /** diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.js b/packages/mui-material/src/Autocomplete/Autocomplete.js index ef226758b7d093..50a4546babf516 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.js @@ -823,7 +823,6 @@ Autocomplete.propTypes /* remove-proptypes */ = { blurOnSelect: PropTypes.oneOfType([PropTypes.oneOf(['mouse', 'touch']), PropTypes.bool]), /** * Props applied to the [`Chip`](/material-ui/api/chip/) element. - * @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ChipProps: PropTypes.object, /** @@ -1031,12 +1030,10 @@ Autocomplete.propTypes /* remove-proptypes */ = { /** * The component used to render the listbox. * @default 'ul' - * @deprecated Use `slots.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ListboxComponent: PropTypes.elementType, /** * Props applied to the Listbox element. - * @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ListboxProps: PropTypes.object, /** @@ -1131,13 +1128,11 @@ Autocomplete.propTypes /* remove-proptypes */ = { /** * The component used to render the body of the popup. * @default Paper - * @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ PaperComponent: PropTypes.elementType, /** * The component used to position the popup. * @default Popper - * @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ PopperComponent: PropTypes.elementType, /** diff --git a/packages/mui-material/src/Avatar/Avatar.d.ts b/packages/mui-material/src/Avatar/Avatar.d.ts index f42c37daec3c92..d0e73b8ac1b802 100644 --- a/packages/mui-material/src/Avatar/Avatar.d.ts +++ b/packages/mui-material/src/Avatar/Avatar.d.ts @@ -46,7 +46,6 @@ export interface AvatarOwnProps { /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image. * It can be used to listen for the loading error event. - * @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ imgProps?: React.ImgHTMLAttributes & { sx?: SxProps; diff --git a/packages/mui-material/src/Avatar/Avatar.js b/packages/mui-material/src/Avatar/Avatar.js index 30c2f794d52534..92acf7abc207c2 100644 --- a/packages/mui-material/src/Avatar/Avatar.js +++ b/packages/mui-material/src/Avatar/Avatar.js @@ -244,7 +244,6 @@ Avatar.propTypes /* remove-proptypes */ = { /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image. * It can be used to listen for the loading error event. - * @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ imgProps: PropTypes.object, /** diff --git a/packages/mui-material/src/Backdrop/Backdrop.d.ts b/packages/mui-material/src/Backdrop/Backdrop.d.ts index 610b0ec4e9eddc..ef44dcc5b9d680 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.d.ts +++ b/packages/mui-material/src/Backdrop/Backdrop.d.ts @@ -99,7 +99,6 @@ export interface BackdropOwnProps * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Fade - * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionComponent?: React.JSXElementConstructor< TransitionProps & { diff --git a/packages/mui-material/src/Backdrop/Backdrop.js b/packages/mui-material/src/Backdrop/Backdrop.js index fff194c3e036ef..1d168f23e5b5d1 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.js +++ b/packages/mui-material/src/Backdrop/Backdrop.js @@ -192,7 +192,6 @@ Backdrop.propTypes /* remove-proptypes */ = { * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Fade - * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ TransitionComponent: PropTypes.elementType, /** diff --git a/packages/mui-material/src/ListItem/ListItem.d.ts b/packages/mui-material/src/ListItem/ListItem.d.ts index 44ce52818c2c22..743516b8b55577 100644 --- a/packages/mui-material/src/ListItem/ListItem.d.ts +++ b/packages/mui-material/src/ListItem/ListItem.d.ts @@ -35,13 +35,11 @@ export interface ListItemBaseProps { /** * The container component used when a `ListItemSecondaryAction` is the last child. * @default 'li' - * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerComponent?: React.ElementType>; /** * Props applied to the container component if used. * @default {} - * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerProps?: React.HTMLAttributes; /** diff --git a/packages/mui-material/src/ListItem/ListItem.js b/packages/mui-material/src/ListItem/ListItem.js index 3597750670b2a3..cb6cbd746461aa 100644 --- a/packages/mui-material/src/ListItem/ListItem.js +++ b/packages/mui-material/src/ListItem/ListItem.js @@ -442,13 +442,11 @@ ListItem.propTypes /* remove-proptypes */ = { /** * The container component used when a `ListItemSecondaryAction` is the last child. * @default 'li' - * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerComponent: elementTypeAcceptingRef, /** * Props applied to the container component if used. * @default {} - * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerProps: PropTypes.object, /** diff --git a/packages/mui-material/src/SpeedDial/SpeedDial.d.ts b/packages/mui-material/src/SpeedDial/SpeedDial.d.ts index cd0d58af0e0350..7bddaf9259f8f8 100644 --- a/packages/mui-material/src/SpeedDial/SpeedDial.d.ts +++ b/packages/mui-material/src/SpeedDial/SpeedDial.d.ts @@ -97,7 +97,6 @@ export interface SpeedDialProps * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Zoom - * * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) */ TransitionComponent?: React.JSXElementConstructor; /** @@ -112,7 +111,6 @@ export interface SpeedDialProps /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. - * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) */ TransitionProps?: TransitionProps; } diff --git a/packages/mui-material/src/SpeedDial/SpeedDial.js b/packages/mui-material/src/SpeedDial/SpeedDial.js index f65f03100530c8..70b6da1cd342c3 100644 --- a/packages/mui-material/src/SpeedDial/SpeedDial.js +++ b/packages/mui-material/src/SpeedDial/SpeedDial.js @@ -554,7 +554,6 @@ SpeedDial.propTypes /* remove-proptypes */ = { * The component used for the transition. * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. * @default Zoom - * * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) */ TransitionComponent: PropTypes.elementType, /** @@ -576,7 +575,6 @@ SpeedDial.propTypes /* remove-proptypes */ = { /** * Props applied to the transition element. * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component. - * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) */ TransitionProps: PropTypes.object, }; diff --git a/packages/mui-material/src/StepLabel/StepLabel.d.ts b/packages/mui-material/src/StepLabel/StepLabel.d.ts index f3606a5e8c7b55..c72b93925a4724 100644 --- a/packages/mui-material/src/StepLabel/StepLabel.d.ts +++ b/packages/mui-material/src/StepLabel/StepLabel.d.ts @@ -66,12 +66,10 @@ export interface StepLabelProps optional?: React.ReactNode; /** * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/). - * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ StepIconComponent?: React.ElementType; /** * Props applied to the [`StepIcon`](/material-ui/api/step-icon/) element. - * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ StepIconProps?: Partial; /** diff --git a/packages/mui-material/src/StepLabel/StepLabel.js b/packages/mui-material/src/StepLabel/StepLabel.js index 0141fc7e395f07..e0db7eb968bf8a 100644 --- a/packages/mui-material/src/StepLabel/StepLabel.js +++ b/packages/mui-material/src/StepLabel/StepLabel.js @@ -269,12 +269,10 @@ StepLabel.propTypes /* remove-proptypes */ = { }), /** * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/). - * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ StepIconComponent: PropTypes.elementType, /** * Props applied to the [`StepIcon`](/material-ui/api/step-icon/) element. - * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ StepIconProps: PropTypes.object, /** diff --git a/packages/mui-material/src/TextField/TextField.d.ts b/packages/mui-material/src/TextField/TextField.d.ts index eaa9d2ab97c03d..42e737a47e8758 100644 --- a/packages/mui-material/src/TextField/TextField.d.ts +++ b/packages/mui-material/src/TextField/TextField.d.ts @@ -107,7 +107,6 @@ export interface BaseTextFieldProps error?: boolean; /** * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element. - * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ FormHelperTextProps?: Partial; /** @@ -127,12 +126,10 @@ export interface BaseTextFieldProps /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. - * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps?: Partial; /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. - * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ inputProps?: InputBaseProps['inputProps']; /** @@ -183,7 +180,6 @@ export interface BaseTextFieldProps select?: boolean; /** * Props applied to the [`Select`](/material-ui/api/select/) element. - * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps?: Partial; /** @@ -224,7 +220,6 @@ export interface StandardTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } @@ -249,7 +244,6 @@ export interface FilledTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } @@ -274,7 +268,6 @@ export interface OutlinedTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } diff --git a/packages/mui-material/src/TextField/TextField.js b/packages/mui-material/src/TextField/TextField.js index 6f0c0d14c0cade..4a207604479c64 100644 --- a/packages/mui-material/src/TextField/TextField.js +++ b/packages/mui-material/src/TextField/TextField.js @@ -325,7 +325,6 @@ TextField.propTypes /* remove-proptypes */ = { error: PropTypes.bool, /** * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element. - * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ FormHelperTextProps: PropTypes.object, /** @@ -345,12 +344,10 @@ TextField.propTypes /* remove-proptypes */ = { /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. - * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps: PropTypes.object, /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. - * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ inputProps: PropTypes.object, /** @@ -358,7 +355,6 @@ TextField.propTypes /* remove-proptypes */ = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, /** @@ -427,7 +423,6 @@ TextField.propTypes /* remove-proptypes */ = { select: PropTypes.bool, /** * Props applied to the [`Select`](/material-ui/api/select/) element. - * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps: PropTypes.object, /** From da003053662076e239f7cf5c0dbe4c3f3c686173 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Fri, 31 May 2024 19:32:56 +0200 Subject: [PATCH 02/13] pnpm docs:typescript:formatted --- .../premium-themes/onepirate/modules/components/TextField.js | 3 --- .../pages/premium-themes/onepirate/modules/form/RFTextField.js | 1 - 2 files changed, 4 deletions(-) diff --git a/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js b/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js index 84708a61630ef9..9ddaeaeb152f4c 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js +++ b/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js @@ -119,7 +119,6 @@ TextField.propTypes = { /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. - * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps: PropTypes.object, /** @@ -127,13 +126,11 @@ TextField.propTypes = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, noBorder: PropTypes.bool, /** * Props applied to the [`Select`](/material-ui/api/select/) element. - * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps: PropTypes.object, size: PropTypes.oneOf(['large', 'medium', 'small', 'xlarge']), diff --git a/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js b/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js index e7e89210d54761..196430fcc284a9 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js +++ b/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js @@ -51,7 +51,6 @@ RFTextField.propTypes = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. - * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, meta: PropTypes.shape({ From d93516a908ece5565c8fc58e4f30a76150a8bbc7 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Sun, 30 Jun 2024 15:42:15 +0200 Subject: [PATCH 03/13] revert removing deprecation warnings on TextField --- docs/pages/material-ui/api/text-field.json | 30 +++++++++++++++---- .../mui-material/src/TextField/TextField.d.ts | 7 +++++ .../mui-material/src/TextField/TextField.js | 5 ++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/pages/material-ui/api/text-field.json b/docs/pages/material-ui/api/text-field.json index b2023391f3b8e6..0bbad58b8b4746 100644 --- a/docs/pages/material-ui/api/text-field.json +++ b/docs/pages/material-ui/api/text-field.json @@ -13,13 +13,29 @@ "defaultValue": { "type": { "name": "any" } }, "disabled": { "type": { "name": "bool" }, "default": "false" }, "error": { "type": { "name": "bool" }, "default": "false" }, - "FormHelperTextProps": { "type": { "name": "object" } }, + "FormHelperTextProps": { + "type": { "name": "object" }, + "deprecated": true, + "deprecationInfo": "Use slotProps.formHelperText instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, "fullWidth": { "type": { "name": "bool" }, "default": "false" }, "helperText": { "type": { "name": "node" } }, "id": { "type": { "name": "string" } }, - "InputLabelProps": { "type": { "name": "object" } }, - "inputProps": { "type": { "name": "object" } }, - "InputProps": { "type": { "name": "object" } }, + "InputLabelProps": { + "type": { "name": "object" }, + "deprecated": true, + "deprecationInfo": "Use slotProps.inputLabel instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, + "inputProps": { + "type": { "name": "object" }, + "deprecated": true, + "deprecationInfo": "Use slotProps.htmlInput instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, + "InputProps": { + "type": { "name": "object" }, + "deprecated": true, + "deprecationInfo": "Use slotProps.input instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, "inputRef": { "type": { "name": "custom", "description": "ref" } }, "label": { "type": { "name": "node" } }, "margin": { @@ -41,7 +57,11 @@ "required": { "type": { "name": "bool" }, "default": "false" }, "rows": { "type": { "name": "union", "description": "number
| string" } }, "select": { "type": { "name": "bool" }, "default": "false" }, - "SelectProps": { "type": { "name": "object" } }, + "SelectProps": { + "type": { "name": "object" }, + "deprecated": true, + "deprecationInfo": "Use slotProps.select instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, "size": { "type": { "name": "union", diff --git a/packages/mui-material/src/TextField/TextField.d.ts b/packages/mui-material/src/TextField/TextField.d.ts index 42e737a47e8758..eaa9d2ab97c03d 100644 --- a/packages/mui-material/src/TextField/TextField.d.ts +++ b/packages/mui-material/src/TextField/TextField.d.ts @@ -107,6 +107,7 @@ export interface BaseTextFieldProps error?: boolean; /** * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element. + * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ FormHelperTextProps?: Partial; /** @@ -126,10 +127,12 @@ export interface BaseTextFieldProps /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. + * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps?: Partial; /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. + * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ inputProps?: InputBaseProps['inputProps']; /** @@ -180,6 +183,7 @@ export interface BaseTextFieldProps select?: boolean; /** * Props applied to the [`Select`](/material-ui/api/select/) element. + * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps?: Partial; /** @@ -220,6 +224,7 @@ export interface StandardTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } @@ -244,6 +249,7 @@ export interface FilledTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } @@ -268,6 +274,7 @@ export interface OutlinedTextFieldProps * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps?: Partial; } diff --git a/packages/mui-material/src/TextField/TextField.js b/packages/mui-material/src/TextField/TextField.js index 4a207604479c64..6f0c0d14c0cade 100644 --- a/packages/mui-material/src/TextField/TextField.js +++ b/packages/mui-material/src/TextField/TextField.js @@ -325,6 +325,7 @@ TextField.propTypes /* remove-proptypes */ = { error: PropTypes.bool, /** * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element. + * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ FormHelperTextProps: PropTypes.object, /** @@ -344,10 +345,12 @@ TextField.propTypes /* remove-proptypes */ = { /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. + * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps: PropTypes.object, /** * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. + * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ inputProps: PropTypes.object, /** @@ -355,6 +358,7 @@ TextField.propTypes /* remove-proptypes */ = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, /** @@ -423,6 +427,7 @@ TextField.propTypes /* remove-proptypes */ = { select: PropTypes.bool, /** * Props applied to the [`Select`](/material-ui/api/select/) element. + * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps: PropTypes.object, /** From 512dcf85fb4df9e3432cfe8be4e779641bfaef60 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Sun, 30 Jun 2024 15:57:31 +0200 Subject: [PATCH 04/13] remove removed deprecations from the migration guide --- .../migrating-from-deprecated-apis.md | 157 ------------------ 1 file changed, 157 deletions(-) diff --git a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md index cfd2b504ea6f9d..963932ac26fba5 100644 --- a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md +++ b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md @@ -40,36 +40,6 @@ The composed CSS classes are going to be deprecated and eventually removed in fa For example, the `.MuiAccordionSummary-contentGutters` class was deprecated in favor of the `.MuiAccordionSummary-gutters` and `.MuiAccordionSummary-content` classes. This improves the developer experience by reducing bloat and cognitive load. -## Accordion - -Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#accordion-props) below to migrate the code as described in the following sections: - -```bash -npx @mui/codemod@latest deprecations/accordion-props -``` - -### TransitionComponent - -The Accordion's `TransitionComponent` prop was deprecated in favor of `slots.transition`: - -```diff - -``` - -### TransitionProps - -The Accordion's `TransitionProps` prop was deprecated in favor of `slotProps.transition`: - -```diff - -``` - ## AccordionSummary Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#accordion-summary-classes) below to migrate the code as described in the following sections: @@ -235,38 +205,6 @@ Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-code npx @mui/codemod@next deprecations/autocomplete-props ``` -### \*Component props - -All of the Autocomplete's slot (`*Component`) props were deprecated in favor of equivalent `slots` entries: - -```diff - -``` - -### \*Props props - -All of the Autocomplete's slot props (`*Props`) props were deprecated in favor of equivalent `slotProps` entries: - -```diff - -``` - ### componentsProps The Autocomplete's `componentsProps` prop was deprecated in favor of `slotProps`: @@ -287,32 +225,6 @@ The Autocomplete's `componentsProps` prop was deprecated in favor of `slotProps` /> ``` -## Avatar - -Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#avatar-props) below to migrate the code as described in the following sections: - -```bash -npx @mui/codemod@latest deprecations/avatar-props -``` - -### imgProps - -The Avatar's `imgProps` prop was deprecated in favor of `slotProps.img`: - -```diff - {}, -- onLoad: () => {}, -+ slotProps={{ -+ img: { -+ onError: () => {}, -+ onLoad: () => {}, -+ } - }} - />; -``` - ## AvatarGroup Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#avatar-group-props) below to migrate the code as described in the following sections: @@ -401,16 +313,6 @@ The Backdrop's `componentsProps` prop was deprecated in favor of `slotProps`: /> ``` -### TransitionComponent - -The Backdrop's `TransitionComponent` prop was deprecated in favor of `slots.transition`: - -```diff - ``` -### ContainerComponent - -The ListItem's `ContainerComponent` prop was deprecated in favor of `slots.root` or `component` instead. - -### ContainerProps - -The ListItem's `ContainerProps` prop was deprecated in favor of `slotProps.root` instead. - ## ListItemSecondaryAction ### Deprecated component @@ -1616,28 +1510,6 @@ The StepLabel's `componentsProps` prop was deprecated in favor of `slotProps`: /> ``` -### StepIconComponent - -The StepLabel's `StepIconComponent` prop was deprecated in favor of `slots.stepIcon`: - -```diff - -``` - -### StepIconProps - -The StepLabel's `StepIconProps` prop was deprecated in favor of `slotProps.stepIcon`: - -```diff - -``` - ## StepConnector Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#step-connector-classes) below to migrate the code as described in the following sections: @@ -1677,32 +1549,3 @@ Here's how to migrate: }, }, ``` - -## SpeedDial - -Use the [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 sections: - -```bash -npx @mui/codemod@next deprecations/speed-dial-props -``` - -### TransitionComponent - -The SpeedDial's `TransitionComponent` prop was deprecated in favor of `slots.transition`: - -```diff - -``` From faa9bdc2735e5d5707f46ca25d1037f069427bf9 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Sun, 30 Jun 2024 15:57:49 +0200 Subject: [PATCH 05/13] pnpm docs:typescript:formatted --- .../premium-themes/onepirate/modules/components/TextField.js | 3 +++ .../pages/premium-themes/onepirate/modules/form/RFTextField.js | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js b/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js index 9ddaeaeb152f4c..84708a61630ef9 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js +++ b/docs/src/pages/premium-themes/onepirate/modules/components/TextField.js @@ -119,6 +119,7 @@ TextField.propTypes = { /** * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element. * Pointer events like `onClick` are enabled if and only if `shrink` is `true`. + * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputLabelProps: PropTypes.object, /** @@ -126,11 +127,13 @@ TextField.propTypes = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, noBorder: PropTypes.bool, /** * Props applied to the [`Select`](/material-ui/api/select/) element. + * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ SelectProps: PropTypes.object, size: PropTypes.oneOf(['large', 'medium', 'small', 'xlarge']), diff --git a/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js b/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js index 196430fcc284a9..e7e89210d54761 100644 --- a/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js +++ b/docs/src/pages/premium-themes/onepirate/modules/form/RFTextField.js @@ -51,6 +51,7 @@ RFTextField.propTypes = { * It will be a [`FilledInput`](/material-ui/api/filled-input/), * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/) * component depending on the `variant` prop value. + * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ InputProps: PropTypes.object, meta: PropTypes.shape({ From 3315302fb2cc6ab92135648dfadb0833c351feab Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Sun, 30 Jun 2024 16:02:49 +0200 Subject: [PATCH 06/13] remove possible removed deprecations from deprecations-all --- .../mui-codemod/src/deprecations/all/deprecations-all.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/mui-codemod/src/deprecations/all/deprecations-all.js b/packages/mui-codemod/src/deprecations/all/deprecations-all.js index 7cc1c3964126d0..aff9ab5da72113 100644 --- a/packages/mui-codemod/src/deprecations/all/deprecations-all.js +++ b/packages/mui-codemod/src/deprecations/all/deprecations-all.js @@ -1,9 +1,7 @@ import transformAccordionClasses from '../accordion-summary-classes'; -import transformAccordionProps from '../accordion-props'; import transformAlertClasses from '../alert-classes'; import transformAvatarGroupProps from '../avatar-group-props'; import transformAutocompleteProps from '../autocomplete-props'; -import transformAvatarProps from '../avatar-props'; import transformBackdropProps from '../backdrop-props'; import transformButtonClasses from '../button-classes'; import transformButtonGroupClasses from '../button-group-classes'; @@ -18,7 +16,6 @@ import transformInputProps from '../input-props'; import transformModalProps from '../modal-props'; import transformOutlinedInputProps from '../outlined-input-props'; import transformPaginationItemClasses from '../pagination-item-classes'; -import transformSpeedDialProps from '../speed-dial-props'; import transformTableSortLabelClasses from '../table-sort-label-classes'; import transformStepConnectorClasses from '../step-connector-classes'; import transformStepLabelProps from '../step-label-props'; @@ -32,11 +29,9 @@ import transformToggleButtonGroupClasses from '../toggle-button-group-classes'; */ export default function deprecationsAll(file, api, options) { file.source = transformAccordionClasses(file, api, options); - file.source = transformAccordionProps(file, api, options); file.source = transformAlertClasses(file, api, options); file.source = transformAvatarGroupProps(file, api, options); file.source = transformAutocompleteProps(file, api, options); - file.source = transformAvatarProps(file, api, options); file.source = transformBackdropProps(file, api, options); file.source = transformButtonClasses(file, api, options); file.source = transformButtonGroupClasses(file, api, options); @@ -51,7 +46,6 @@ export default function deprecationsAll(file, api, options) { file.source = transformModalProps(file, api, options); file.source = transformOutlinedInputProps(file, api, options); file.source = transformPaginationItemClasses(file, api, options); - file.source = transformSpeedDialProps(file, api, options); file.source = transformStepConnectorClasses(file, api, options); file.source = transformStepLabelProps(file, api, options); file.source = transformTableSortLabelClasses(file, api, options); From b6fd8ca99da6a66301272f3887c648e0d643156f Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Tue, 2 Jul 2024 19:34:31 +0200 Subject: [PATCH 07/13] remove not needed code from deprecations/autocomplete-props --- .../autocomplete-props/autocomplete-props.js | 37 ---------------- .../autocomplete-props/test-cases/actual.js | 26 +++--------- .../autocomplete-props/test-cases/expected.js | 42 ++++++------------- .../test-cases/theme.actual.js | 10 ----- .../test-cases/theme.expected.js | 21 +--------- 5 files changed, 20 insertions(+), 116 deletions(-) diff --git a/packages/mui-codemod/src/deprecations/autocomplete-props/autocomplete-props.js b/packages/mui-codemod/src/deprecations/autocomplete-props/autocomplete-props.js index 9e9099616050d1..540bc4fa306a9e 100644 --- a/packages/mui-codemod/src/deprecations/autocomplete-props/autocomplete-props.js +++ b/packages/mui-codemod/src/deprecations/autocomplete-props/autocomplete-props.js @@ -1,5 +1,3 @@ -import movePropIntoSlots from '../utils/movePropIntoSlots'; -import movePropIntoSlotProps from '../utils/movePropIntoSlotProps'; import replaceComponentsWithSlots from '../utils/replaceComponentsWithSlots'; /** @@ -11,41 +9,6 @@ export default function transformer(file, api, options) { const root = j(file.source); const printOptions = options.printOptions; - movePropIntoSlots(j, { - root, - componentName: 'Autocomplete', - propName: 'PaperComponent', - slotName: 'paper', - }); - - movePropIntoSlots(j, { - root, - componentName: 'Autocomplete', - propName: 'PopperComponent', - slotName: 'popper', - }); - - movePropIntoSlots(j, { - root, - componentName: 'Autocomplete', - propName: 'ListboxComponent', - slotName: 'listbox', - }); - - movePropIntoSlotProps(j, { - root, - componentName: 'Autocomplete', - propName: 'ListboxProps', - slotName: 'listbox', - }); - - movePropIntoSlotProps(j, { - root, - componentName: 'Autocomplete', - propName: 'ChipProps', - slotName: 'chip', - }); - replaceComponentsWithSlots(j, { root, componentName: 'Autocomplete' }); return root.toSource(printOptions); diff --git a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/actual.js b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/actual.js index e8cbd448f45d9f..91256850d51b37 100644 --- a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/actual.js +++ b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/actual.js @@ -2,11 +2,6 @@ import Autocomplete from '@mui/material/Autocomplete'; import {Autocomplete as MyAutocomplete} from '@mui/material'; ; ; ; diff --git a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/expected.js b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/expected.js index 2dd939b1c424b7..ca1cc8744cb73a 100644 --- a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/expected.js +++ b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/expected.js @@ -2,24 +2,16 @@ import Autocomplete from '@mui/material/Autocomplete'; import {Autocomplete as MyAutocomplete} from '@mui/material'; ; + popupIndicator: { width: 16 }, + }} +/>; ; ; + popupIndicator: { width: 16 }, + }} +/>; diff --git a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.actual.js b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.actual.js index 5b144b5440188b..b2a362ab99a596 100644 --- a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.actual.js +++ b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.actual.js @@ -1,11 +1,6 @@ fn({ MuiAutocomplete: { defaultProps: { - ChipProps: { height: 10 }, - PaperComponent: CustomPaper, - PopperComponent: CustomPopper, - ListboxComponent: CustomListbox, - ListboxProps: { height: 12 }, componentsProps: { clearIndicator: { width: 10 }, paper: { width: 12 }, @@ -19,11 +14,6 @@ fn({ fn({ MuiAutocomplete: { defaultProps: { - ChipProps: { height: 10 }, - PaperComponent: CustomPaper, - PopperComponent: CustomPopper, - ListboxComponent: CustomListbox, - ListboxProps: { height: 12 }, slotProps: { popupIndicator: { width: 20 } }, diff --git a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.expected.js b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.expected.js index 1ba8e119a32210..06c6da749b8bf6 100644 --- a/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.expected.js +++ b/packages/mui-codemod/src/deprecations/autocomplete-props/test-cases/theme.expected.js @@ -1,19 +1,11 @@ fn({ MuiAutocomplete: { defaultProps: { - slots: { - paper: CustomPaper, - popper: CustomPopper, - listbox: CustomListbox - }, - slotProps: { clearIndicator: { width: 10 }, paper: { width: 12 }, popper: { width: 14 }, - popupIndicator: { width: 16 }, - listbox: { height: 12 }, - chip: { height: 10 } + popupIndicator: { width: 16 } } }, }, @@ -30,16 +22,7 @@ fn({ popupIndicator: { ...{ width: 16 }, ...{ width: 20 } - }, - - listbox: { height: 12 }, - chip: { height: 10 } - }, - - slots: { - paper: CustomPaper, - popper: CustomPopper, - listbox: CustomListbox + } } }, }, From 1af4d6e43e837accea3552302d994692e944a987 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Tue, 2 Jul 2024 19:48:10 +0200 Subject: [PATCH 08/13] remove not needed code from deprecations/backdrop-props --- .../backdrop-props/backdrop-props.js | 8 ----- .../backdrop-props/test-cases/actual.js | 25 --------------- .../backdrop-props/test-cases/expected.js | 25 --------------- .../backdrop-props/test-cases/theme.actual.js | 31 ------------------ .../test-cases/theme.expected.js | 32 ------------------- 5 files changed, 121 deletions(-) diff --git a/packages/mui-codemod/src/deprecations/backdrop-props/backdrop-props.js b/packages/mui-codemod/src/deprecations/backdrop-props/backdrop-props.js index 0d831486177b84..1654904706db6b 100644 --- a/packages/mui-codemod/src/deprecations/backdrop-props/backdrop-props.js +++ b/packages/mui-codemod/src/deprecations/backdrop-props/backdrop-props.js @@ -1,4 +1,3 @@ -import movePropIntoSlots from '../utils/movePropIntoSlots'; import replaceComponentsWithSlots from '../utils/replaceComponentsWithSlots'; /** @@ -12,12 +11,5 @@ export default function transformer(file, api, options) { replaceComponentsWithSlots(j, { root, componentName: 'Backdrop' }); - movePropIntoSlots(j, { - root, - componentName: 'Backdrop', - propName: 'TransitionComponent', - slotName: 'transition', - }); - return root.toSource(printOptions); } diff --git a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/actual.js b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/actual.js index f2df3ef6a74e10..3107ff6d22d408 100644 --- a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/actual.js +++ b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/actual.js @@ -1,31 +1,6 @@ import Backdrop from '@mui/material/Backdrop'; import { Backdrop as MyBackdrop } from '@mui/material'; -; -; -; -; -; - -// should skip non MUI components -; - ; ; ; diff --git a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/expected.js b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/expected.js index a81133b9babe6d..e1a26591a40b7f 100644 --- a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/expected.js +++ b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/expected.js @@ -1,31 +1,6 @@ import Backdrop from '@mui/material/Backdrop'; import { Backdrop as MyBackdrop } from '@mui/material'; -; -; -; -; -; - -// should skip non MUI components -; - ; diff --git a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.actual.js b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.actual.js index bfb2da0b7c4393..47551ec725be36 100644 --- a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.actual.js +++ b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.actual.js @@ -1,34 +1,3 @@ -fn({ - MuiBackdrop: { - defaultProps: { - TransitionComponent: CustomTransition, - }, - }, -}); - -fn({ - MuiBackdrop: { - defaultProps: { - TransitionComponent: CustomTransition, - slots: { - root: 'div', - }, - }, - }, -}); - -fn({ - MuiBackdrop: { - defaultProps: { - TransitionComponent: ComponentTransition, - slots: { - root: 'div', - transition: SlotTransition - }, - }, - }, -}); - fn({ MuiBackdrop: { defaultProps: { diff --git a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.expected.js b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.expected.js index fb75b1ec670c19..ddb91a2cde9ee6 100644 --- a/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.expected.js +++ b/packages/mui-codemod/src/deprecations/backdrop-props/test-cases/theme.expected.js @@ -1,35 +1,3 @@ -fn({ - MuiBackdrop: { - defaultProps: { - slots: { - transition: CustomTransition - } - }, - }, -}); - -fn({ - MuiBackdrop: { - defaultProps: { - slots: { - root: 'div', - transition: CustomTransition - } - }, - }, -}); - -fn({ - MuiBackdrop: { - defaultProps: { - slots: { - root: 'div', - transition: SlotTransition - } - }, - }, -}); - fn({ MuiBackdrop: { defaultProps: { From eebfff3659e8e657ce16a3a4168c6a935ff7e0ba Mon Sep 17 00:00:00 2001 From: Lucas Hilgert Date: Tue, 2 Jul 2024 19:54:51 +0200 Subject: [PATCH 09/13] remove not needed code from deprecations/step-label-props --- .../step-label-props/step-label-props.js | 16 --------- .../step-label-props/test-cases/actual.js | 12 ------- .../step-label-props/test-cases/expected.js | 26 --------------- .../test-cases/theme.actual.js | 20 ----------- .../test-cases/theme.expected.js | 33 ------------------- 5 files changed, 107 deletions(-) diff --git a/packages/mui-codemod/src/deprecations/step-label-props/step-label-props.js b/packages/mui-codemod/src/deprecations/step-label-props/step-label-props.js index b2fec09fa3b826..d71fbba3a84810 100644 --- a/packages/mui-codemod/src/deprecations/step-label-props/step-label-props.js +++ b/packages/mui-codemod/src/deprecations/step-label-props/step-label-props.js @@ -1,6 +1,4 @@ import replaceComponentsWithSlots from '../utils/replaceComponentsWithSlots'; -import movePropIntoSlots from '../utils/movePropIntoSlots'; -import movePropIntoSlotProps from '../utils/movePropIntoSlotProps'; /** * @param {import('jscodeshift').FileInfo} file @@ -13,19 +11,5 @@ export default function transformer(file, api, options) { replaceComponentsWithSlots(j, { root, componentName: 'StepLabel' }); - movePropIntoSlots(j, { - root, - componentName: 'StepLabel', - propName: 'StepIconComponent', - slotName: 'stepIcon', - }); - - movePropIntoSlotProps(j, { - root, - componentName: 'StepLabel', - propName: 'StepIconProps', - slotName: 'stepIcon', - }); - return root.toSource(printOptions); } diff --git a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/actual.js b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/actual.js index 20a1428f7b1598..9caf4e5a411080 100644 --- a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/actual.js +++ b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/actual.js @@ -6,15 +6,3 @@ import StepLabel from '@mui/material/StepLabel'; slotProps={{ label: slotLabelProps }} componentsProps={{ label: componentsLabelProps }} />; -; -; -; diff --git a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/expected.js b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/expected.js index 3dfec474599baf..b26c217086b36d 100644 --- a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/expected.js +++ b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/expected.js @@ -7,29 +7,3 @@ import StepLabel from '@mui/material/StepLabel'; ...componentsLabelProps, ...slotLabelProps } }} />; -; -; -; diff --git a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.actual.js b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.actual.js index 68624f70881f49..4f68c1fe687871 100644 --- a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.actual.js +++ b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.actual.js @@ -14,23 +14,3 @@ fn({ }, }, }); - -fn({ - MuiStepLabel: { - defaultProps: { - StepIconComponent: StepIconComponent, - StepIconProps: StepIconProps, - }, - }, -}); - -fn({ - MuiStepLabel: { - defaultProps: { - componentsProps: { label: componentsLabelProps }, - slotProps: { label: slotLabelProps }, - StepIconComponent: StepIconComponent, - StepIconProps: StepIconProps, - }, - }, -}); diff --git a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.expected.js b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.expected.js index 3919652d47b97d..c8874c72137cab 100644 --- a/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.expected.js +++ b/packages/mui-codemod/src/deprecations/step-label-props/test-cases/theme.expected.js @@ -20,36 +20,3 @@ fn({ }, }, }); - -fn({ - MuiStepLabel: { - defaultProps: { - slots: { - stepIcon: StepIconComponent - }, - - slotProps: { - stepIcon: StepIconProps - } - }, - }, -}); - -fn({ - MuiStepLabel: { - defaultProps: { - slotProps: { - label: { - ...componentsLabelProps, - ...slotLabelProps - }, - - stepIcon: StepIconProps - }, - - slots: { - stepIcon: StepIconComponent - } - }, - }, -}); From e5f7ccdada4724d87a03f5d7ee0c476af635ec1e Mon Sep 17 00:00:00 2001 From: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:41:56 +0200 Subject: [PATCH 10/13] Bring ListItems deprecations back to migration Guide Signed-off-by: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> --- .../migrating-from-deprecated-apis.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md index 963932ac26fba5..8d8db39876683a 100644 --- a/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md +++ b/docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md @@ -1093,6 +1093,14 @@ The ListItem's `componentsProps` prop was deprecated in favor of `slotProps`: /> ``` +### ContainerComponent + +The ListItem's `ContainerComponent` prop was deprecated in favor of `slots.root` or `component` instead. + +### ContainerProps + +The ListItem's `ContainerProps` prop was deprecated in favor of `slotProps.root` instead. + ## ListItemSecondaryAction ### Deprecated component From 5032e06804e059fff6b7d4004b65af8d0a6281e6 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:48:49 +0200 Subject: [PATCH 11/13] Bring removed deprecations back ListItem.d.ts Signed-off-by: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> --- packages/mui-material/src/ListItem/ListItem.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mui-material/src/ListItem/ListItem.d.ts b/packages/mui-material/src/ListItem/ListItem.d.ts index 267c1567fdfddf..e0ac9ab0deb244 100644 --- a/packages/mui-material/src/ListItem/ListItem.d.ts +++ b/packages/mui-material/src/ListItem/ListItem.d.ts @@ -35,11 +35,13 @@ export interface ListItemBaseProps { /** * The container component used when a `ListItemSecondaryAction` is the last child. * @default 'li' + * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerComponent?: React.ElementType>; /** * Props applied to the container component if used. * @default {} + * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerProps?: React.HTMLAttributes; /** From 0d515baccc681caab26a053fc91c42184d704aa6 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:51:02 +0200 Subject: [PATCH 12/13] Bring removed deprecations back ListItem.js Signed-off-by: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> --- packages/mui-material/src/ListItem/ListItem.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mui-material/src/ListItem/ListItem.js b/packages/mui-material/src/ListItem/ListItem.js index 8de1b79d1d9dea..187bcaf84db17d 100644 --- a/packages/mui-material/src/ListItem/ListItem.js +++ b/packages/mui-material/src/ListItem/ListItem.js @@ -441,11 +441,13 @@ ListItem.propTypes /* remove-proptypes */ = { /** * The container component used when a `ListItemSecondaryAction` is the last child. * @default 'li' + * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerComponent: elementTypeAcceptingRef, /** * Props applied to the container component if used. * @default {} + * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. */ ContainerProps: PropTypes.object, /** From afb6af55b251c9e95d6d3396b214bbee6c4924c9 Mon Sep 17 00:00:00 2001 From: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:55:37 +0200 Subject: [PATCH 13/13] Bring removed deprecations back list-item.json Signed-off-by: Lucas Hilgert <77863078+lhilgert9@users.noreply.github.com> --- docs/pages/material-ui/api/list-item.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/pages/material-ui/api/list-item.json b/docs/pages/material-ui/api/list-item.json index 50fe0e3a6cbe5a..f9f795a1e09b04 100644 --- a/docs/pages/material-ui/api/list-item.json +++ b/docs/pages/material-ui/api/list-item.json @@ -33,9 +33,16 @@ }, "ContainerComponent": { "type": { "name": "custom", "description": "element type" }, - "default": "'li'" + "default": "'li'", + "deprecated": true, + "deprecationInfo": "Use the component or slots.root prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." + }, + "ContainerProps": { + "type": { "name": "object" }, + "default": "{}", + "deprecated": true, + "deprecationInfo": "Use the slotProps.root prop instead. This prop will be removed in v7. See Migrating from deprecated APIs for more details." }, - "ContainerProps": { "type": { "name": "object" }, "default": "{}" }, "dense": { "type": { "name": "bool" }, "default": "false" }, "disabled": { "type": { "name": "bool" },