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..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 @@ -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 - ``` -### 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 +1557,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 - -``` 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 4403600086204a..bcd93a93d9e280 100644 --- a/docs/pages/material-ui/api/backdrop.json +++ b/docs/pages/material-ui/api/backdrop.json @@ -38,12 +38,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/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/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); 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 + } } }, }, 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: { 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 - } - }, - }, -}); diff --git a/packages/mui-material/src/Accordion/Accordion.d.ts b/packages/mui-material/src/Accordion/Accordion.d.ts index 038002eea62a53..d3880f53622e01 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 6d38d0f05c4443..a0dab71d213812 100644 --- a/packages/mui-material/src/Accordion/Accordion.js +++ b/packages/mui-material/src/Accordion/Accordion.js @@ -299,13 +299,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 ab215eeae54cef..b3cf3cb08df550 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 c8ba035f39ee56..d02f3daaa10c83 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.js @@ -814,7 +814,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, /** @@ -1022,12 +1021,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, /** @@ -1122,13 +1119,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 789ba38e97d727..4ece9bebc8282f 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 90425bcae320aa..9f1c21adacf21c 100644 --- a/packages/mui-material/src/Avatar/Avatar.js +++ b/packages/mui-material/src/Avatar/Avatar.js @@ -243,7 +243,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 ee1af3b53b300a..699948790dbf10 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.d.ts +++ b/packages/mui-material/src/Backdrop/Backdrop.d.ts @@ -97,7 +97,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 549666a047fd94..49cdf89ea186d7 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.js +++ b/packages/mui-material/src/Backdrop/Backdrop.js @@ -189,7 +189,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/SpeedDial/SpeedDial.d.ts b/packages/mui-material/src/SpeedDial/SpeedDial.d.ts index 4595362e7fa6ca..b163ce53477207 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 9c9badd4f085da..f130cf4876855d 100644 --- a/packages/mui-material/src/SpeedDial/SpeedDial.js +++ b/packages/mui-material/src/SpeedDial/SpeedDial.js @@ -552,7 +552,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, /** @@ -574,7 +573,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 bda7f441e42f00..da324c2a58e4c2 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 41441f449525aa..13988e3ee7b3a5 100644 --- a/packages/mui-material/src/StepLabel/StepLabel.js +++ b/packages/mui-material/src/StepLabel/StepLabel.js @@ -267,12 +267,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, /**