Merge pull request #18558 from oliviertassinari/mui-material-ui

fix: use Material UI vs. MUI where relevant
This commit is contained in:
Ben Lambert
2023-07-10 14:20:33 +02:00
committed by GitHub
57 changed files with 165 additions and 150 deletions
+5 -5
View File
@@ -11,9 +11,9 @@
### Minor Changes
- 1fd38bc4141a: **MUI v5 Support:** Adding platform-wide support for MUI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
- 1fd38bc4141a: **Material UI v5 Support:** Adding platform-wide support for Material UI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
To allow the future support of plugins & components using MUI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
To allow the future support of plugins & components using Material UI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
```diff
Provider: ({ children }) => (
@@ -38,9 +38,9 @@
### Minor Changes
- 1fd38bc4141a: **MUI v5 Support:** Adding platform-wide support for MUI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
- 1fd38bc4141a: **Material UI v5 Support:** Adding platform-wide support for Material UI v5 allowing a transition phase for migrating central plugins & components over. We still support v4 instances & plugins by adding a
To allow the future support of plugins & components using MUI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
To allow the future support of plugins & components using Material UI v5 you want to upgrade your `AppTheme`'s to using the `UnifiedThemeProvider`
```diff
Provider: ({ children }) => (
@@ -208,7 +208,7 @@
### Patch Changes
- 2089de76b: Deprecated `ItemCard`. Added `ItemCardGrid` and `ItemCardHeader` instead, that can be used to compose functionality around regular Material-UI `Card` components instead.
- 2089de76b: Deprecated `ItemCard`. Added `ItemCardGrid` and `ItemCardHeader` instead, that can be used to compose functionality around regular Material UI `Card` components instead.
## 0.2.3
@@ -17,7 +17,7 @@
import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className';
/**
* This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 MUI components from `@mui/*`
* This API is introduced in @mui/material (v5.0.5) as a replacement of deprecated createGenerateClassName & only affects v5 Material UI components from `@mui/*`
*/
ClassNameGenerator.configure(componentName => {
return `v5-${componentName}`;
+2 -2
View File
@@ -82,8 +82,8 @@ export function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme {
}
/**
* Creates a new {@link UnifiedTheme} using MUI v4 theme options.
* Note that this uses `adaptV4Theme` from MUI v5, which is deprecated.
* Creates a new {@link UnifiedTheme} using Material UI v4 theme options.
* Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.
*
* @public
*/
@@ -43,14 +43,14 @@ export interface UnifiedThemeProviderProps {
// Background at https://mui.com/x/migration/migration-data-grid-v4/#using-mui-core-v4-with-v5
// Rather than disabling globals and custom seed, we instead only set a production prefix that
// won't collide with MUI 5 styles. We've already got a separate class name generator for v5 set
// won't collide with Material UI 5 styles. We've already got a separate class name generator for v5 set
// up in MuiClassNameSetup.ts, so only the production JSS needs deduplication.
const generateV4ClassName = createGenerateClassName({
productionPrefix: 'jss4-',
});
/**
* Provides themes for all MUI versions supported by the provided unified theme.
* Provides themes for all Material UI versions supported by the provided unified theme.
*
* @public
*/
+1 -1
View File
@@ -131,7 +131,7 @@ function extractV5StateOverrides(
}
/**
* Transform MUI v5 component themes into a v4 theme props and overrides.
* Transform Material UI v5 component themes into a v4 theme props and overrides.
*
* @public
*/
+1 -1
View File
@@ -18,7 +18,7 @@ import { palettes } from '../base';
import { createUnifiedTheme } from './UnifiedTheme';
/**
* Built-in Backstage MUI themes.
* Built-in Backstage Material UI themes.
*
* @public
*/
+1 -1
View File
@@ -34,7 +34,7 @@ export type SupportedVersions = 'v4' | 'v5';
export type SupportedThemes = Mui4Theme | Mui5Theme;
/**
* A container of one theme for multiple different MUI versions.
* A container of one theme for multiple different Material UI versions.
*
* Currently known keys are 'v4' and 'v5'.
*
+3 -3
View File
@@ -29,7 +29,7 @@ import { defaultComponentThemes } from '../v5';
import { transformV5ComponentThemesToV4 } from '../unified/overrides';
/**
* An old helper for creating MUI v4 theme options.
* An old helper for creating Material UI v4 theme options.
*
* @public
* @deprecated Use {@link createBaseThemeOptions} instead.
@@ -47,7 +47,7 @@ export function createThemeOptions(options: SimpleThemeOptions): ThemeOptions {
}
/**
* * An old helper for creating MUI v4 theme overrides.
* * An old helper for creating Material UI v4 theme overrides.
*
* @public
* @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.
@@ -61,7 +61,7 @@ export function createThemeOverrides(theme: Theme): Overrides {
}
/**
* The old method to create a Backstage MUI v4 theme using a palette.
* The old method to create a Backstage Material UI v4 theme using a palette.
* The theme is created with the common Backstage options and component styles.
*
* @public
+2 -2
View File
@@ -18,7 +18,7 @@ import { createTheme } from './baseTheme';
import { palettes } from '../base';
/**
* The old MUI v4 Backstage light theme.
* The old Material UI v4 Backstage light theme.
*
* @public
* @deprecated Use {@link themes.light} instead.
@@ -28,7 +28,7 @@ export const lightTheme = createTheme({
});
/**
* The old MUI v4 Backstage dark theme.
* The old Material UI v4 Backstage dark theme.
*
* @public
* @deprecated Use {@link themes.dark} instead.
+4 -4
View File
@@ -33,7 +33,7 @@ import {
* The full Backstage palette.
*
* @public
* @deprecated This type is deprecated, the MUI Palette type is now always extended instead.
* @deprecated This type is deprecated, the Material UI Palette type is now always extended instead.
*/
export type BackstagePalette = MuiPalette & BackstagePaletteAdditions;
@@ -41,7 +41,7 @@ export type BackstagePalette = MuiPalette & BackstagePaletteAdditions;
* The full Backstage palette options.
*
* @public
* @deprecated This type is deprecated, the MUI PaletteOptions type is now always extended instead.
* @deprecated This type is deprecated, the Material UI PaletteOptions type is now always extended instead.
*/
export type BackstagePaletteOptions = MuiPaletteOptions &
BackstagePaletteAdditions;
@@ -50,7 +50,7 @@ export type BackstagePaletteOptions = MuiPaletteOptions &
* Backstage theme options.
*
* @public
* @deprecated This type is deprecated, the MUI ThemeOptions type is now always extended instead.
* @deprecated This type is deprecated, the Material UI ThemeOptions type is now always extended instead.
* @remarks
*
* This is essentially a partial theme definition made by the user, that then
@@ -68,7 +68,7 @@ export interface BackstageThemeOptions extends MuiThemeOptions {
* A Backstage theme.
*
* @public
* @deprecated This type is deprecated, the MUI Theme type is now always extended instead.
* @deprecated This type is deprecated, the Material UI Theme type is now always extended instead.
*/
export interface BackstageTheme extends MuiTheme {
palette: BackstagePalette;