Skip to content
Merged
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
23 changes: 23 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 @@ -1203,6 +1203,29 @@ The following deprecated props have been removed:
/>
```

#### PaginationItem deprecated classes removed

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

```bash
npx @mui/codemod@latest deprecations/pagination-item-classes <path>
```

The following deprecated classes have been removed:

- `textPrimary` — combine the `.MuiPaginationItem-text` and `.MuiPaginationItem-colorPrimary` classes instead
- `textSecondary` — combine the `.MuiPaginationItem-text` and `.MuiPaginationItem-colorSecondary` classes instead
- `outlinedPrimary` — combine the `.MuiPaginationItem-outlined` and `.MuiPaginationItem-colorPrimary` classes instead
- `outlinedSecondary` — combine the `.MuiPaginationItem-outlined` and `.MuiPaginationItem-colorSecondary` classes instead

```diff
-.MuiPaginationItem-textPrimary
+.MuiPaginationItem-text.MuiPaginationItem-colorPrimary

-.MuiPaginationItem-outlinedPrimary
+.MuiPaginationItem-outlined.MuiPaginationItem-colorPrimary
```

#### Popper deprecated props removed

Use the [popper-props codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#popper-props) below to migrate the code as described in the following section:
Expand Down
28 changes: 0 additions & 28 deletions docs/pages/material-ui/api/pagination-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,6 @@
"description": "Styles applied to the root element if `variant=\"outlined\"`.",
"isGlobal": false
},
{
"key": "outlinedPrimary",
"className": "MuiPaginationItem-outlinedPrimary",
"description": "Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "outlinedSecondary",
"className": "MuiPaginationItem-outlinedSecondary",
"description": "Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "page",
"className": "MuiPaginationItem-page",
Expand Down Expand Up @@ -200,20 +186,6 @@
"className": "MuiPaginationItem-text",
"description": "Styles applied to the root element if `variant=\"text\"`.",
"isGlobal": false
},
{
"key": "textPrimary",
"className": "MuiPaginationItem-textPrimary",
"description": "Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`.",
"isGlobal": false,
"isDeprecated": true
},
{
"key": "textSecondary",
"className": "MuiPaginationItem-textSecondary",
"description": "Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`.",
"isGlobal": false,
"isDeprecated": true
}
],
"spread": true,
Expand Down
24 changes: 0 additions & 24 deletions docs/translations/api-docs/pagination-item/pagination-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@
"nodeName": "the root element",
"conditions": "<code>variant=\"outlined\"</code>"
},
"outlinedPrimary": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>variant=\"outlined\"</code> and <code>color=\"primary\"</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined\">.MuiPaginationItem-outlined</a> and <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary\">.MuiPaginationItem-colorPrimary</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"outlinedSecondary": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>variant=\"outlined\"</code> and <code>color=\"secondary\"</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined\">.MuiPaginationItem-outlined</a> and <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary\">.MuiPaginationItem-colorSecondary</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"page": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
Expand Down Expand Up @@ -105,18 +93,6 @@
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>variant=\"text\"</code>"
},
"textPrimary": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>variant=\"text\"</code> and <code>color=\"primary\"</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text\">.MuiPaginationItem-text</a> and <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary\">.MuiPaginationItem-colorPrimary</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
},
"textSecondary": {
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>variant=\"text\"</code> and <code>color=\"secondary\"</code>",
"deprecationInfo": "Combine the <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text\">.MuiPaginationItem-text</a> and <a href=\"/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary\">.MuiPaginationItem-colorSecondary</a> classes instead. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
}
},
"slotDescriptions": {
Expand Down
3 changes: 0 additions & 3 deletions packages/mui-material/src/PaginationItem/PaginationItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const overridesResolver = (props, styles) => {
styles.root,
styles[ownerState.variant],
styles[`size${capitalize(ownerState.size)}`],
ownerState.variant === 'text' && styles[`text${capitalize(ownerState.color)}`],
ownerState.variant === 'outlined' && styles[`outlined${capitalize(ownerState.color)}`],
ownerState.shape === 'rounded' && styles.rounded,
ownerState.type === 'page' && styles.page,
(ownerState.type === 'start-ellipsis' || ownerState.type === 'end-ellipsis') && styles.ellipsis,
Expand All @@ -44,7 +42,6 @@ const useUtilityClasses = (ownerState) => {
variant,
shape,
color !== 'standard' && `color${capitalize(color)}`,
color !== 'standard' && `${variant}${capitalize(color)}`,
disabled && 'disabled',
selected && 'selected',
{
Expand Down
20 changes: 0 additions & 20 deletions packages/mui-material/src/PaginationItem/paginationItemClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,8 @@ export interface PaginationItemClasses {
sizeLarge: string;
/** Styles applied to the root element if `variant="text"`. */
text: string;
/** Styles applied to the root element if `variant="text"` and `color="primary"`.
* @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
textPrimary: string;
/** Styles applied to the root element if `variant="text"` and `color="secondary"`.
* @deprecated Combine the [.MuiPaginationItem-text](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-text) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
textSecondary: string;
/** Styles applied to the root element if `variant="outlined"`. */
outlined: string;
/** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
* @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined) and [.MuiPaginationItem-colorPrimary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorPrimary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
outlinedPrimary: string;
/** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
* @deprecated Combine the [.MuiPaginationItem-outlined](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-outlined) and [.MuiPaginationItem-colorSecondary](/material-ui/api/pagination-item/#pagination-item-classes-MuiPaginationItem-colorSecondary) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
*/
outlinedSecondary: string;
/** Styles applied to the root element if `rounded="true"`. */
rounded: string;
/** Styles applied to the root element if `type="start-ellipsis"` or `type="end-ellipsis"`. */
Expand Down Expand Up @@ -64,11 +48,7 @@ const paginationItemClasses: PaginationItemClasses = generateUtilityClasses('Mui
'sizeSmall',
'sizeLarge',
'text',
'textPrimary',
'textSecondary',
'outlined',
'outlinedPrimary',
'outlinedSecondary',
'rounded',
'ellipsis',
'firstLast',
Expand Down
Loading