@mui/material 7.0.0-beta.3 → 7.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +13 -2
- package/Accordion/Accordion.js +18 -6
- package/AccordionSummary/AccordionSummary.d.ts +39 -4
- package/AccordionSummary/AccordionSummary.js +67 -16
- package/CHANGELOG.md +60 -0
- package/ListItemText/ListItemText.d.ts +10 -0
- package/ListItemText/ListItemText.js +14 -5
- package/SpeedDial/SpeedDial.d.ts +10 -0
- package/SpeedDial/SpeedDial.js +40 -11
- package/SpeedDialAction/SpeedDialAction.js +1 -1
- package/TextareaAutosize/TextareaAutosize.js +25 -14
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +1 -1
- package/Typography/Typography.d.ts +3 -3
- package/esm/Accordion/Accordion.d.ts +13 -2
- package/esm/Accordion/Accordion.js +18 -6
- package/esm/AccordionSummary/AccordionSummary.d.ts +39 -4
- package/esm/AccordionSummary/AccordionSummary.js +67 -16
- package/esm/ListItemText/ListItemText.d.ts +10 -0
- package/esm/ListItemText/ListItemText.js +14 -5
- package/esm/SpeedDial/SpeedDial.d.ts +10 -0
- package/esm/SpeedDial/SpeedDial.js +40 -11
- package/esm/SpeedDialAction/SpeedDialAction.js +1 -1
- package/esm/TextareaAutosize/TextareaAutosize.js +26 -15
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +1 -1
- package/esm/Typography/Typography.d.ts +3 -3
- package/esm/index.js +1 -1
- package/esm/styles/ThemeProvider.d.ts +6 -0
- package/esm/styles/ThemeProvider.js +11 -0
- package/esm/styles/adaptV4Theme.d.ts +2 -2
- package/esm/styles/createThemeNoVars.d.ts +3 -3
- package/esm/styles/createTypography.d.ts +4 -4
- package/esm/styles/index.d.ts +1 -1
- package/esm/styles/responsiveFontSizes.d.ts +3 -3
- package/esm/useScrollTrigger/useScrollTrigger.d.ts +1 -1
- package/esm/useScrollTrigger/useScrollTrigger.js +3 -0
- package/esm/version/index.js +2 -2
- package/index.js +1 -1
- package/modern/Accordion/Accordion.d.ts +13 -2
- package/modern/Accordion/Accordion.js +18 -6
- package/modern/AccordionSummary/AccordionSummary.d.ts +39 -4
- package/modern/AccordionSummary/AccordionSummary.js +67 -16
- package/modern/ListItemText/ListItemText.d.ts +10 -0
- package/modern/ListItemText/ListItemText.js +14 -5
- package/modern/SpeedDial/SpeedDial.d.ts +10 -0
- package/modern/SpeedDial/SpeedDial.js +40 -11
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -1
- package/modern/TextareaAutosize/TextareaAutosize.js +26 -15
- package/modern/Tooltip/Tooltip.d.ts +1 -1
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/Typography/Typography.d.ts +3 -3
- package/modern/index.js +1 -1
- package/modern/styles/ThemeProvider.d.ts +6 -0
- package/modern/styles/ThemeProvider.js +11 -0
- package/modern/styles/adaptV4Theme.d.ts +2 -2
- package/modern/styles/createThemeNoVars.d.ts +3 -3
- package/modern/styles/createTypography.d.ts +4 -4
- package/modern/styles/index.d.ts +1 -1
- package/modern/styles/responsiveFontSizes.d.ts +3 -3
- package/modern/useScrollTrigger/useScrollTrigger.d.ts +1 -1
- package/modern/useScrollTrigger/useScrollTrigger.js +3 -0
- package/modern/version/index.js +2 -2
- package/package.json +6 -6
- package/styles/ThemeProvider.d.ts +6 -0
- package/styles/ThemeProvider.js +11 -0
- package/styles/adaptV4Theme.d.ts +2 -2
- package/styles/createThemeNoVars.d.ts +3 -3
- package/styles/createTypography.d.ts +4 -4
- package/styles/index.d.ts +1 -1
- package/styles/responsiveFontSizes.d.ts +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/useScrollTrigger/useScrollTrigger.d.ts +1 -1
- package/useScrollTrigger/useScrollTrigger.js +3 -0
- package/version/index.js +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BreakpointsOptions, ShapeOptions, SpacingOptions } from '@mui/system';
|
|
2
2
|
import { MixinsOptions } from "./createMixins.js";
|
|
3
3
|
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TypographyVariantsOptions } from "./createTypography.js";
|
|
5
5
|
import { Shadows } from "./shadows.js";
|
|
6
6
|
import { TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndexOptions } from "./zIndex.js";
|
|
@@ -21,7 +21,7 @@ export interface DeprecatedThemeOptions {
|
|
|
21
21
|
shadows?: Shadows;
|
|
22
22
|
spacing?: SpacingOptions;
|
|
23
23
|
transitions?: TransitionsOptions;
|
|
24
|
-
typography?:
|
|
24
|
+
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
25
25
|
variants?: ComponentsVariants;
|
|
26
26
|
zIndex?: ZIndexOptions;
|
|
27
27
|
unstable_strictMode?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme, SxProps, CSSObject, SxConfig } from '@mui/system';
|
|
2
2
|
import { Mixins, MixinsOptions } from "./createMixins.js";
|
|
3
3
|
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TypographyVariants, TypographyVariantsOptions } from "./createTypography.js";
|
|
5
5
|
import { Shadows } from "./shadows.js";
|
|
6
6
|
import { Transitions, TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndex, ZIndexOptions } from "./zIndex.js";
|
|
@@ -28,7 +28,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
|
|
|
28
28
|
palette?: PaletteOptions;
|
|
29
29
|
shadows?: Shadows;
|
|
30
30
|
transitions?: TransitionsOptions;
|
|
31
|
-
typography?:
|
|
31
|
+
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
32
32
|
zIndex?: ZIndexOptions;
|
|
33
33
|
unstable_strictMode?: boolean;
|
|
34
34
|
unstable_sxConfig?: SxConfig;
|
|
@@ -40,7 +40,7 @@ export interface BaseTheme extends SystemTheme {
|
|
|
40
40
|
} ? CssVarsPalette : {});
|
|
41
41
|
shadows: Shadows;
|
|
42
42
|
transitions: Transitions;
|
|
43
|
-
typography:
|
|
43
|
+
typography: TypographyVariants;
|
|
44
44
|
zIndex: ZIndex;
|
|
45
45
|
unstable_strictMode?: boolean;
|
|
46
46
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
3
|
import { Palette } from "./createPalette.js";
|
|
4
|
-
export type
|
|
4
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline';
|
|
5
5
|
export interface FontStyle {
|
|
6
6
|
fontFamily: React.CSSProperties['fontFamily'];
|
|
7
7
|
fontSize: number;
|
|
@@ -45,6 +45,6 @@ export interface TypographyStyleOptions extends TypographyStyle {}
|
|
|
45
45
|
export interface TypographyUtils {
|
|
46
46
|
pxToRem: (px: number) => string;
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
49
|
-
export interface
|
|
50
|
-
export default function createTypography(palette: Palette, typography:
|
|
48
|
+
export interface TypographyVariants extends Record<TypographyVariant, TypographyStyle>, FontStyle, TypographyUtils {}
|
|
49
|
+
export interface TypographyVariantsOptions extends Partial<Record<TypographyVariant, TypographyStyleOptions> & FontStyleOptions> {}
|
|
50
|
+
export default function createTypography(palette: Palette, typography: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions)): TypographyVariants;
|
package/modern/styles/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { ZIndex } from "./zIndex.js";
|
|
|
6
6
|
export { CommonColors, Palette, PaletteColor, PaletteColorOptions, PaletteOptions, SimplePaletteColorOptions, TypeText, TypeAction, TypeBackground, PaletteMode, Color } from "./createPalette.js";
|
|
7
7
|
export { default as createColorScheme } from "./createColorScheme.js";
|
|
8
8
|
export { default as createStyles } from "./createStyles.js";
|
|
9
|
-
export {
|
|
9
|
+
export { TypographyVariants, TypographyVariantsOptions, TypographyStyle, TypographyVariant } from "./createTypography.js";
|
|
10
10
|
export { default as responsiveFontSizes } from "./responsiveFontSizes.js";
|
|
11
11
|
export { Duration, Easing, Transitions, TransitionsOptions, duration, easing } from "./createTransitions.js";
|
|
12
12
|
export { Mixins } from "./createMixins.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Breakpoint } from '@mui/system';
|
|
2
|
-
import {
|
|
2
|
+
import { TypographyVariants } from "./createTypography.js";
|
|
3
3
|
export interface ResponsiveFontSizesOptions {
|
|
4
4
|
breakpoints?: Breakpoint[];
|
|
5
5
|
disableAlign?: boolean;
|
|
6
6
|
factor?: number;
|
|
7
|
-
variants?: Array<keyof
|
|
7
|
+
variants?: Array<keyof TypographyVariants>;
|
|
8
8
|
}
|
|
9
9
|
export default function responsiveFontSizes<T extends {
|
|
10
|
-
typography:
|
|
10
|
+
typography: TypographyVariants;
|
|
11
11
|
}>(theme: T, options?: ResponsiveFontSizesOptions): T;
|
|
@@ -29,6 +29,9 @@ export default function useScrollTrigger(options = {}) {
|
|
|
29
29
|
const store = React.useRef();
|
|
30
30
|
const [trigger, setTrigger] = React.useState(() => getTrigger(store, other));
|
|
31
31
|
React.useEffect(() => {
|
|
32
|
+
if (target === null) {
|
|
33
|
+
return setTrigger(false);
|
|
34
|
+
}
|
|
32
35
|
const handleScroll = () => {
|
|
33
36
|
setTrigger(getTrigger(store, {
|
|
34
37
|
target,
|
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "7.0.0-beta.
|
|
1
|
+
export const version = "7.0.0-beta.4";
|
|
2
2
|
export const major = Number("7");
|
|
3
3
|
export const minor = Number("0");
|
|
4
4
|
export const patch = Number("0");
|
|
5
|
-
export const prerelease = "beta.
|
|
5
|
+
export const prerelease = "beta.4";
|
|
6
6
|
export default version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/core-downloads-tracker": "^7.0.0-beta.
|
|
38
|
+
"@mui/types": "^7.3.0",
|
|
39
|
+
"@mui/utils": "7.0.0-beta.4",
|
|
40
|
+
"@mui/system": "7.0.0-beta.4",
|
|
41
|
+
"@mui/core-downloads-tracker": "^7.0.0-beta.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
47
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@mui/material-pigment-css": "7.0.0-beta.
|
|
49
|
+
"@mui/material-pigment-css": "7.0.0-beta.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -21,6 +21,12 @@ type ThemeProviderCssVariablesProps = CssThemeVariables extends {
|
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
disableStyleSheetGeneration?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* If `true`, theme values are recalculated when the mode changes.
|
|
26
|
+
* The `theme.colorSchemes.{mode}.*` nodes will be shallow merged to the top-level of the theme.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
forceThemeRerender?: boolean;
|
|
24
30
|
} : {};
|
|
25
31
|
export interface ThemeProviderProps<Theme = DefaultTheme> extends ThemeProviderCssVariablesProps {
|
|
26
32
|
children?: React.ReactNode;
|
package/styles/ThemeProvider.js
CHANGED
|
@@ -24,6 +24,17 @@ function ThemeProvider({
|
|
|
24
24
|
}
|
|
25
25
|
const muiTheme = _identifier.default in theme ? theme[_identifier.default] : theme;
|
|
26
26
|
if (!('colorSchemes' in muiTheme)) {
|
|
27
|
+
if (!('vars' in muiTheme)) {
|
|
28
|
+
// For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
|
|
29
|
+
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProviderNoVars.default, {
|
|
31
|
+
theme: {
|
|
32
|
+
...theme,
|
|
33
|
+
vars: null
|
|
34
|
+
},
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
27
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProviderNoVars.default, {
|
|
28
39
|
theme: theme,
|
|
29
40
|
...props
|
package/styles/adaptV4Theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BreakpointsOptions, ShapeOptions, SpacingOptions } from '@mui/system';
|
|
2
2
|
import { MixinsOptions } from "./createMixins.js";
|
|
3
3
|
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TypographyVariantsOptions } from "./createTypography.js";
|
|
5
5
|
import { Shadows } from "./shadows.js";
|
|
6
6
|
import { TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndexOptions } from "./zIndex.js";
|
|
@@ -21,7 +21,7 @@ export interface DeprecatedThemeOptions {
|
|
|
21
21
|
shadows?: Shadows;
|
|
22
22
|
spacing?: SpacingOptions;
|
|
23
23
|
transitions?: TransitionsOptions;
|
|
24
|
-
typography?:
|
|
24
|
+
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
25
25
|
variants?: ComponentsVariants;
|
|
26
26
|
zIndex?: ZIndexOptions;
|
|
27
27
|
unstable_strictMode?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme, SxProps, CSSObject, SxConfig } from '@mui/system';
|
|
2
2
|
import { Mixins, MixinsOptions } from "./createMixins.js";
|
|
3
3
|
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TypographyVariants, TypographyVariantsOptions } from "./createTypography.js";
|
|
5
5
|
import { Shadows } from "./shadows.js";
|
|
6
6
|
import { Transitions, TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndex, ZIndexOptions } from "./zIndex.js";
|
|
@@ -28,7 +28,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
|
|
|
28
28
|
palette?: PaletteOptions;
|
|
29
29
|
shadows?: Shadows;
|
|
30
30
|
transitions?: TransitionsOptions;
|
|
31
|
-
typography?:
|
|
31
|
+
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
32
32
|
zIndex?: ZIndexOptions;
|
|
33
33
|
unstable_strictMode?: boolean;
|
|
34
34
|
unstable_sxConfig?: SxConfig;
|
|
@@ -40,7 +40,7 @@ export interface BaseTheme extends SystemTheme {
|
|
|
40
40
|
} ? CssVarsPalette : {});
|
|
41
41
|
shadows: Shadows;
|
|
42
42
|
transitions: Transitions;
|
|
43
|
-
typography:
|
|
43
|
+
typography: TypographyVariants;
|
|
44
44
|
zIndex: ZIndex;
|
|
45
45
|
unstable_strictMode?: boolean;
|
|
46
46
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as CSS from 'csstype';
|
|
3
3
|
import { Palette } from "./createPalette.js";
|
|
4
|
-
export type
|
|
4
|
+
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline';
|
|
5
5
|
export interface FontStyle {
|
|
6
6
|
fontFamily: React.CSSProperties['fontFamily'];
|
|
7
7
|
fontSize: number;
|
|
@@ -45,6 +45,6 @@ export interface TypographyStyleOptions extends TypographyStyle {}
|
|
|
45
45
|
export interface TypographyUtils {
|
|
46
46
|
pxToRem: (px: number) => string;
|
|
47
47
|
}
|
|
48
|
-
export interface
|
|
49
|
-
export interface
|
|
50
|
-
export default function createTypography(palette: Palette, typography:
|
|
48
|
+
export interface TypographyVariants extends Record<TypographyVariant, TypographyStyle>, FontStyle, TypographyUtils {}
|
|
49
|
+
export interface TypographyVariantsOptions extends Partial<Record<TypographyVariant, TypographyStyleOptions> & FontStyleOptions> {}
|
|
50
|
+
export default function createTypography(palette: Palette, typography: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions)): TypographyVariants;
|
package/styles/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { ZIndex } from "./zIndex.js";
|
|
|
6
6
|
export { CommonColors, Palette, PaletteColor, PaletteColorOptions, PaletteOptions, SimplePaletteColorOptions, TypeText, TypeAction, TypeBackground, PaletteMode, Color } from "./createPalette.js";
|
|
7
7
|
export { default as createColorScheme } from "./createColorScheme.js";
|
|
8
8
|
export { default as createStyles } from "./createStyles.js";
|
|
9
|
-
export {
|
|
9
|
+
export { TypographyVariants, TypographyVariantsOptions, TypographyStyle, TypographyVariant } from "./createTypography.js";
|
|
10
10
|
export { default as responsiveFontSizes } from "./responsiveFontSizes.js";
|
|
11
11
|
export { Duration, Easing, Transitions, TransitionsOptions, duration, easing } from "./createTransitions.js";
|
|
12
12
|
export { Mixins } from "./createMixins.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Breakpoint } from '@mui/system';
|
|
2
|
-
import {
|
|
2
|
+
import { TypographyVariants } from "./createTypography.js";
|
|
3
3
|
export interface ResponsiveFontSizesOptions {
|
|
4
4
|
breakpoints?: Breakpoint[];
|
|
5
5
|
disableAlign?: boolean;
|
|
6
6
|
factor?: number;
|
|
7
|
-
variants?: Array<keyof
|
|
7
|
+
variants?: Array<keyof TypographyVariants>;
|
|
8
8
|
}
|
|
9
9
|
export default function responsiveFontSizes<T extends {
|
|
10
|
-
typography:
|
|
10
|
+
typography: TypographyVariants;
|
|
11
11
|
}>(theme: T, options?: ResponsiveFontSizesOptions): T;
|