Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui] Revert deprecation warnings for *Components and *Props for v6 #42466

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions docs/pages/material-ui/api/accordion.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,8 @@
},
"additionalInfo": { "sx": true }
},
"TransitionComponent": {
"type": { "name": "elementType" },
"deprecated": true,
"deprecationInfo": "Use <code>slots.transition</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"TransitionProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.transition</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
}
"TransitionComponent": { "type": { "name": "elementType" } },
"TransitionProps": { "type": { "name": "object" } }
},
"name": "Accordion",
"imports": [
Expand Down
33 changes: 5 additions & 28 deletions docs/pages/material-ui/api/autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
},
"default": "false"
},
"ChipProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.chip</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"ChipProps": { "type": { "name": "object" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"clearIcon": { "type": { "name": "node" }, "default": "<ClearIcon fontSize=\"small\" />" },
"clearOnBlur": { "type": { "name": "bool" }, "default": "!props.freeSolo" },
Expand Down Expand Up @@ -97,17 +93,8 @@
}
},
"limitTags": { "type": { "name": "custom", "description": "integer" }, "default": "-1" },
"ListboxComponent": {
"type": { "name": "elementType" },
"default": "'ul'",
"deprecated": true,
"deprecationInfo": "Use <code>slots.listbox</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"ListboxProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.listbox</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> 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" },
Expand Down Expand Up @@ -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 <code>slots.paper</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"PopperComponent": {
"type": { "name": "elementType" },
"default": "Popper",
"deprecated": true,
"deprecationInfo": "Use <code>slots.popper</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"PaperComponent": { "type": { "name": "elementType" }, "default": "Paper" },
"PopperComponent": { "type": { "name": "elementType" }, "default": "Popper" },
"popupIcon": { "type": { "name": "node" }, "default": "<ArrowDropDownIcon />" },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"renderGroup": {
Expand Down
6 changes: 1 addition & 5 deletions docs/pages/material-ui/api/avatar.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>slotProps.img</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"imgProps": { "type": { "name": "object" } },
"sizes": { "type": { "name": "string" } },
"slotProps": {
"type": { "name": "shape", "description": "{ img?: func<br>&#124;&nbsp;object }" },
Expand Down
7 changes: 1 addition & 6 deletions docs/pages/material-ui/api/backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
},
"additionalInfo": { "sx": true }
},
"TransitionComponent": {
"type": { "name": "elementType" },
"default": "Fade",
"deprecated": true,
"deprecationInfo": "Use <code>slots.transition</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"TransitionComponent": { "type": { "name": "elementType" }, "default": "Fade" },
"transitionDuration": {
"type": {
"name": "union",
Expand Down
11 changes: 2 additions & 9 deletions docs/pages/material-ui/api/list-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,9 @@
},
"ContainerComponent": {
"type": { "name": "custom", "description": "element type" },
"default": "'li'",
"deprecated": true,
"deprecationInfo": "Use the <code>component</code> or <code>slots.root</code> prop instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"ContainerProps": {
"type": { "name": "object" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "Use the <code>slotProps.root</code> prop instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
"default": "'li'"
},
"ContainerProps": { "type": { "name": "object" }, "default": "{}" },
"dense": { "type": { "name": "bool" }, "default": "false" },
"disabled": {
"type": { "name": "bool" },
Expand Down
13 changes: 2 additions & 11 deletions docs/pages/material-ui/api/speed-dial.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,15 @@
},
"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 <code>slots.transition</code> instead. This prop will be removed in v7. <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">How to migrate</a>"
},
"TransitionComponent": { "type": { "name": "elementType" }, "default": "Zoom" },
"transitionDuration": {
"type": {
"name": "union",
"description": "number<br>&#124;&nbsp;{ appear?: number, enter?: number, exit?: number }"
},
"default": "{\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen,\n}"
},
"TransitionProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.transition</code> instead. This prop will be removed in v7. <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">How to migrate</a>"
}
"TransitionProps": { "type": { "name": "object" } }
},
"name": "SpeedDial",
"imports": [
Expand Down
12 changes: 2 additions & 10 deletions docs/pages/material-ui/api/step-label.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,8 @@
"type": { "name": "shape", "description": "{ label?: elementType, stepIcon?: elementType }" },
"default": "{}"
},
"StepIconComponent": {
"type": { "name": "elementType" },
"deprecated": true,
"deprecationInfo": "Use <code>slots.stepIcon</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"StepIconProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.stepIcon</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"StepIconComponent": { "type": { "name": "elementType" } },
"StepIconProps": { "type": { "name": "object" } },
"sx": {
"type": {
"name": "union",
Expand Down
30 changes: 5 additions & 25 deletions docs/pages/material-ui/api/text-field.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>slotProps.formHelperText</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> 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 <code>slotProps.inputLabel</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.htmlInput</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"InputProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.input</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> 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": {
Expand All @@ -57,11 +41,7 @@
"required": { "type": { "name": "bool" }, "default": "false" },
"rows": { "type": { "name": "union", "description": "number<br>&#124;&nbsp;string" } },
"select": { "type": { "name": "bool" }, "default": "false" },
"SelectProps": {
"type": { "name": "object" },
"deprecated": true,
"deprecationInfo": "Use <code>slotProps.select</code> instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"SelectProps": { "type": { "name": "object" } },
"size": {
"type": {
"name": "union",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,18 @@ 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,
/**
* Props applied to the Input element.
* 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']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,13 @@ 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<any, any> }
>;
/**
* 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;
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Accordion/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
5 changes: 0 additions & 5 deletions packages/mui-material/src/Autocomplete/Autocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export interface AutocompleteProps<
AutocompleteSlotsAndSlotProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> {
/**
* 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<ChipComponent>;
/**
Expand Down Expand Up @@ -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<React.HTMLAttributes<HTMLElement>>;
/**
* 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<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
sx?: SxProps<Theme>;
Expand Down Expand Up @@ -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<React.HTMLAttributes<HTMLElement>>;
/**
* 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<PopperProps>;
/**
Expand Down
5 changes: 0 additions & 5 deletions packages/mui-material/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
/**
Expand Down Expand Up @@ -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,
/**
Expand Down Expand Up @@ -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,
/**
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Avatar/Avatar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLImageElement> & {
sx?: SxProps<Theme>;
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Avatar/Avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
/**
Expand Down
Loading
Loading