Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
111 changes: 111 additions & 0 deletions docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,117 @@ If you were using these deprecated class names as `styleOverrides` keys in your
});
```

#### FilledInput deprecated props removed

Use the [filled-input-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#filled-input-props) below to migrate the code as described in the following section:

```bash
npx @mui/codemod@latest deprecations/filled-input-props <path>
```

The following deprecated `FilledInput` props have been removed:

- `components` — use `slots` instead
- `componentsProps` — use `slotProps` instead

```diff
<FilledInput
- components={{ Root: CustomRoot, Input: CustomInput }}
- componentsProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
+ slots={{ root: CustomRoot, input: CustomInput }}
+ slotProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
/>
```

#### Input deprecated props removed

Use the [input-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#input-props) below to migrate the code as described in the following section:

```bash
npx @mui/codemod@latest deprecations/input-props <path>
```

The following deprecated `Input` props have been removed:

- `components` — use `slots` instead
- `componentsProps` — use `slotProps` instead

```diff
<Input
- components={{ Root: CustomRoot, Input: CustomInput }}
- componentsProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
+ slots={{ root: CustomRoot, input: CustomInput }}
+ slotProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
/>
```

#### InputBase deprecated props and classes removed

Use the [input-base-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#input-base-props) and [input-base-classes codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#input-base-classes) below to migrate the code as described in the following sections:

```bash
npx @mui/codemod@latest deprecations/input-base-props <path>
npx @mui/codemod@latest deprecations/input-base-classes <path>
```

The following deprecated `InputBase` props have been removed:

- `components` — use `slots` instead
- `componentsProps` — use `slotProps` instead

```diff
<InputBase
- components={{ Root: CustomRoot, Input: CustomInput }}
- componentsProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
+ slots={{ root: CustomRoot, input: CustomInput }}
+ slotProps={{ root: { className: 'my-root' }, input: { className: 'my-input' } }}
/>
```

The following deprecated classes have been removed:

- `inputSizeSmall` — combine `.MuiInputBase-input` and `.MuiInputBase-sizeSmall` instead
- `inputMultiline` — combine `.MuiInputBase-input` and `.MuiInputBase-multiline` instead
- `inputAdornedStart` — combine `.MuiInputBase-input` and `.MuiInputBase-adornedStart` instead
- `inputAdornedEnd` — combine `.MuiInputBase-input` and `.MuiInputBase-adornedEnd` instead
- `inputHiddenLabel` — combine `.MuiInputBase-input` and `.MuiInputBase-hiddenLabel` instead

```diff
-.MuiInputBase-inputSizeSmall
+.MuiInputBase-sizeSmall > .MuiInputBase-input

-.MuiInputBase-inputMultiline
+.MuiInputBase-multiline > .MuiInputBase-input

-.MuiInputBase-inputAdornedStart
+.MuiInputBase-adornedStart > .MuiInputBase-input

-.MuiInputBase-inputAdornedEnd
+.MuiInputBase-adornedEnd > .MuiInputBase-input

-.MuiInputBase-inputHiddenLabel
+.MuiInputBase-hiddenLabel > .MuiInputBase-input
```

#### OutlinedInput deprecated props removed

Use the [outlined-input-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#outlined-input-props) below to migrate the code as described in the following section:

```bash
npx @mui/codemod@latest deprecations/outlined-input-props <path>
```

The following deprecated `OutlinedInput` props have been removed:

- `components` — use `slots` instead

```diff
<OutlinedInput
- components={{ Root: CustomRoot, Input: CustomInput }}
+ slots={{ root: CustomRoot, input: CustomInput }}
/>
```

#### ListItem deprecated props removed

Use the [list-item-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#list-item-props) below to migrate the code as described in the following section:
Expand Down
12 changes: 0 additions & 12 deletions docs/pages/material-ui/api/filled-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
"description": "'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;string"
}
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slotProps</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableUnderline": { "type": { "name": "bool" }, "default": "false" },
Expand Down
47 changes: 0 additions & 47 deletions docs/pages/material-ui/api/input-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
"description": "'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;'error'<br>&#124;&nbsp;'info'<br>&#124;&nbsp;'success'<br>&#124;&nbsp;'warning'<br>&#124;&nbsp;string"
}
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slotProps</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableInjectingGlobalStyles": { "type": { "name": "bool" }, "default": "false" },
Expand Down Expand Up @@ -143,41 +131,6 @@
"description": "Styles applied to the input element.",
"isGlobal": false
},
{
"key": "inputAdornedEnd",
"className": "MuiInputBase-inputAdornedEnd",
"description": "Styles applied to the input element if `endAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputAdornedStart",
"className": "MuiInputBase-inputAdornedStart",
"description": "Styles applied to the input element if `startAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputHiddenLabel",
"className": "MuiInputBase-inputHiddenLabel",
"description": "Styles applied to the input element if `hiddenLabel={true}`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputMultiline",
"className": "MuiInputBase-inputMultiline",
"description": "Styles applied to the input element if `multiline={true}`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputSizeSmall",
"className": "MuiInputBase-inputSizeSmall",
"description": "Styles applied to the input element if `size=\"small\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputTypeSearch",
"className": "MuiInputBase-inputTypeSearch",
Expand Down
40 changes: 0 additions & 40 deletions docs/pages/material-ui/api/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
"description": "'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;string"
}
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"componentsProps": {
"type": { "name": "shape", "description": "{ input?: object, root?: object }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slotProps</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableUnderline": { "type": { "name": "bool" }, "default": "false" },
Expand Down Expand Up @@ -111,34 +99,6 @@
"description": "Styles applied to the input element.",
"isGlobal": false
},
{
"key": "inputAdornedEnd",
"className": "MuiInput-inputAdornedEnd",
"description": "Styles applied to the input element if `endAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputAdornedStart",
"className": "MuiInput-inputAdornedStart",
"description": "Styles applied to the input element if `startAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputMultiline",
"className": "MuiInput-inputMultiline",
"description": "Styles applied to the input element if `multiline={true}`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputSizeSmall",
"className": "MuiInput-inputSizeSmall",
"description": "Styles applied to the input element if `size=\"small\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputTypeSearch",
"className": "MuiInput-inputTypeSearch",
Expand Down
34 changes: 0 additions & 34 deletions docs/pages/material-ui/api/outlined-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
"description": "'primary'<br>&#124;&nbsp;'secondary'<br>&#124;&nbsp;string"
}
},
"components": {
"type": { "name": "shape", "description": "{ Input?: elementType, Root?: elementType }" },
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in a future major release. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"endAdornment": { "type": { "name": "node" } },
Expand Down Expand Up @@ -115,34 +109,6 @@
"description": "Styles applied to the input element.",
"isGlobal": false
},
{
"key": "inputAdornedEnd",
"className": "MuiOutlinedInput-inputAdornedEnd",
"description": "Styles applied to the input element if `endAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputAdornedStart",
"className": "MuiOutlinedInput-inputAdornedStart",
"description": "Styles applied to the input element if `startAdornment` is provided.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputMultiline",
"className": "MuiOutlinedInput-inputMultiline",
"description": "Styles applied to the input element if `multiline={true}`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputSizeSmall",
"className": "MuiOutlinedInput-inputSizeSmall",
"description": "Styles applied to the input element if `size=\"small\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "inputTypeSearch",
"className": "MuiOutlinedInput-inputTypeSearch",
Expand Down
10 changes: 2 additions & 8 deletions docs/translations/api-docs/filled-input/filled-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the <a href=\"https://mui.com/material-ui/customization/palette/#custom-colors\">palette customization guide</a>. The prop defaults to the value (<code>&#39;primary&#39;</code>) inherited from the parent FormControl component."
},
"components": { "description": "The components used for each slot inside." },
"componentsProps": {
"description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
},
Expand Down Expand Up @@ -75,11 +71,9 @@
},
"rows": { "description": "Number of rows to display when multiline option is set to true." },
"slotProps": {
"description": "The extra props for the slot components. You can override the existing props or add new ones.<br>This prop is an alias for the <code>componentsProps</code> prop, which will be deprecated in the future."
},
"slots": {
"description": "The components used for each slot inside.<br>This prop is an alias for the <code>components</code> prop, which will be deprecated in the future."
"description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"slots": { "description": "The components used for each slot inside." },
"startAdornment": { "description": "Start <code>InputAdornment</code> for this component." },
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
Expand Down
40 changes: 2 additions & 38 deletions docs/translations/api-docs/input-base/input-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"color": {
"description": "The color of the component. It supports both default and custom theme colors, which can be added as shown in the <a href=\"https://mui.com/material-ui/customization/palette/#custom-colors\">palette customization guide</a>. The prop defaults to the value (<code>&#39;primary&#39;</code>) inherited from the parent FormControl component."
},
"components": { "description": "The components used for each slot inside." },
"componentsProps": {
"description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
},
Expand Down Expand Up @@ -80,11 +76,9 @@
"rows": { "description": "Number of rows to display when multiline option is set to true." },
"size": { "description": "The size of the component." },
"slotProps": {
"description": "The extra props for the slot components. You can override the existing props or add new ones.<br>This prop is an alias for the <code>componentsProps</code> prop, which will be deprecated in the future."
},
"slots": {
"description": "The components used for each slot inside.<br>This prop is an alias for the <code>components</code> prop, which will be deprecated in the future."
"description": "The extra props for the slot components. You can override the existing props or add new ones."
},
"slots": { "description": "The components used for each slot inside." },
"startAdornment": { "description": "Start <code>InputAdornment</code> for this component." },
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
Expand Down Expand Up @@ -143,36 +137,6 @@
"conditions": "<code>hiddenLabel={true}</code>"
},
"input": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the input element" },
"inputAdornedEnd": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the input element",
"conditions": "<code>endAdornment</code> is provided",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-input\">.MuiInputBase-input</a> and <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-adornedEnd\">.MuiInputBase-adornedEnd</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputAdornedStart": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the input element",
"conditions": "<code>startAdornment</code> is provided",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-input\">.MuiInputBase-input</a> and <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-adornedStart\">.MuiInputBase-adornedStart</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputHiddenLabel": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the input element",
"conditions": "<code>hiddenLabel={true}</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-input\">.MuiInputBase-input</a> and <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-hiddenLabel\">.MuiInputBase-hiddenLabel</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputMultiline": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the input element",
"conditions": "<code>multiline={true}</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-input\">.MuiInputBase-input</a> and <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-multiline\">.MuiInputBase-multiline</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputSizeSmall": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the input element",
"conditions": "<code>size=\"small\"</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-input\">.MuiInputBase-input</a> and <a href=\"/material-ui/api/input-base/#input-base-classes-MuiInputBase-sizeSmall\">.MuiInputBase-sizeSmall</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"inputTypeSearch": { "description": "" },
"multiline": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
Expand Down
Loading
Loading