@mui/material 6.0.0-alpha.3 → 6.0.0-alpha.5
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/CHANGELOG.md +93 -0
- package/Checkbox/Checkbox.js +51 -20
- package/FormControlLabel/FormControlLabel.d.ts +21 -14
- package/FormControlLabel/FormControlLabel.js +22 -4
- package/FormHelperText/FormHelperText.js +18 -8
- package/IconButton/IconButton.js +97 -40
- package/ImageList/ImageList.js +16 -14
- package/ImageListItem/ImageListItem.js +37 -22
- package/ImageListItemBar/ImageListItemBar.js +65 -32
- package/ListItem/ListItem.js +94 -50
- package/ListItemAvatar/ListItemAvatar.js +12 -8
- package/ListItemButton/ListItemButton.js +35 -15
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/ListItemText/ListItemText.js +20 -11
- package/ListSubheader/ListSubheader.js +44 -19
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +64 -20
- package/Radio/Radio.js +50 -20
- package/Radio/RadioButtonIcon.js +18 -12
- package/Rating/Rating.js +71 -37
- package/SvgIcon/SvgIcon.js +73 -21
- package/Table/Table.js +11 -6
- package/TableCell/TableCell.js +96 -41
- package/TableSortLabel/TableSortLabel.js +19 -9
- package/Toolbar/Toolbar.js +33 -17
- package/Typography/Typography.js +3 -2
- package/index.js +1 -1
- package/modern/Checkbox/Checkbox.js +51 -20
- package/modern/FormControlLabel/FormControlLabel.js +22 -4
- package/modern/FormHelperText/FormHelperText.js +18 -8
- package/modern/IconButton/IconButton.js +97 -40
- package/modern/ImageList/ImageList.js +16 -14
- package/modern/ImageListItem/ImageListItem.js +37 -22
- package/modern/ImageListItemBar/ImageListItemBar.js +65 -32
- package/modern/ListItem/ListItem.js +94 -50
- package/modern/ListItemAvatar/ListItemAvatar.js +12 -8
- package/modern/ListItemButton/ListItemButton.js +35 -15
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/modern/ListItemText/ListItemText.js +20 -11
- package/modern/ListSubheader/ListSubheader.js +44 -19
- package/modern/PaginationItem/PaginationItem.js +64 -20
- package/modern/Radio/Radio.js +50 -20
- package/modern/Radio/RadioButtonIcon.js +18 -12
- package/modern/Rating/Rating.js +71 -37
- package/modern/SvgIcon/SvgIcon.js +73 -21
- package/modern/Table/Table.js +11 -6
- package/modern/TableCell/TableCell.js +96 -41
- package/modern/TableSortLabel/TableSortLabel.js +19 -9
- package/modern/Toolbar/Toolbar.js +33 -17
- package/modern/Typography/Typography.js +3 -2
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +2 -1
- package/modern/styles/getOverlayAlpha.js +3 -4
- package/node/Checkbox/Checkbox.js +54 -23
- package/node/FormControlLabel/FormControlLabel.js +23 -5
- package/node/FormHelperText/FormHelperText.js +18 -8
- package/node/IconButton/IconButton.js +99 -43
- package/node/ImageList/ImageList.js +16 -14
- package/node/ImageListItem/ImageListItem.js +37 -22
- package/node/ImageListItemBar/ImageListItemBar.js +65 -32
- package/node/ListItem/ListItem.js +94 -50
- package/node/ListItemAvatar/ListItemAvatar.js +12 -8
- package/node/ListItemButton/ListItemButton.js +35 -15
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/node/ListItemText/ListItemText.js +20 -11
- package/node/ListSubheader/ListSubheader.js +44 -19
- package/node/PaginationItem/PaginationItem.js +65 -20
- package/node/Radio/Radio.js +52 -22
- package/node/Radio/RadioButtonIcon.js +21 -15
- package/node/Rating/Rating.js +71 -37
- package/node/SvgIcon/SvgIcon.js +79 -24
- package/node/Table/Table.js +11 -6
- package/node/TableCell/TableCell.js +96 -41
- package/node/TableSortLabel/TableSortLabel.js +19 -9
- package/node/Toolbar/Toolbar.js +33 -17
- package/node/Typography/Typography.js +3 -2
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +1 -0
- package/node/styles/getOverlayAlpha.js +4 -5
- package/package.json +6 -6
- package/styles/experimental_extendTheme.d.ts +2 -0
- package/styles/experimental_extendTheme.js +2 -1
- package/styles/getOverlayAlpha.d.ts +1 -2
- package/styles/getOverlayAlpha.js +3 -4
- package/umd/material-ui.development.js +1223 -583
- package/umd/material-ui.production.min.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.5",
|
|
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.",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.24.4",
|
|
31
31
|
"@types/react-transition-group": "^4.4.10",
|
|
32
|
-
"clsx": "^2.1.
|
|
32
|
+
"clsx": "^2.1.1",
|
|
33
33
|
"csstype": "^3.1.3",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"react-is": "^18.2.0",
|
|
36
36
|
"react-transition-group": "^4.4.5",
|
|
37
|
-
"@mui/
|
|
38
|
-
"@mui/system": "^6.0.0-alpha.3",
|
|
37
|
+
"@mui/core-downloads-tracker": "^6.0.0-alpha.5",
|
|
39
38
|
"@mui/types": "^7.2.14",
|
|
40
|
-
"@mui/utils": "^6.0.0-alpha.
|
|
41
|
-
"@mui/
|
|
39
|
+
"@mui/utils": "^6.0.0-alpha.5",
|
|
40
|
+
"@mui/system": "^6.0.0-alpha.5",
|
|
41
|
+
"@mui/base": "5.0.0-beta.43"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
import { OverridableStringUnion } from '@mui/types';
|
|
3
3
|
import { SxConfig, SxProps, CSSObject, ApplyStyles } from '@mui/system';
|
|
4
|
+
import { ExtractTypographyTokens } from '@mui/system/cssVars';
|
|
4
5
|
import { ThemeOptions, Theme } from './createTheme';
|
|
5
6
|
import { Palette, PaletteOptions } from './createPalette';
|
|
6
7
|
import { Shadows } from './shadows';
|
|
@@ -321,6 +322,7 @@ export interface CssVarsThemeOptions extends Omit<ThemeOptions, 'palette' | 'com
|
|
|
321
322
|
|
|
322
323
|
// should not include keys defined in `shouldSkipGeneratingVar` and have value typeof function
|
|
323
324
|
export interface ThemeVars {
|
|
325
|
+
font: ExtractTypographyTokens<Theme['typography']>;
|
|
324
326
|
palette: Omit<
|
|
325
327
|
ColorSystem['palette'],
|
|
326
328
|
| 'colorScheme'
|
|
@@ -5,7 +5,7 @@ const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar", "g
|
|
|
5
5
|
import deepmerge from '@mui/utils/deepmerge';
|
|
6
6
|
import { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';
|
|
7
7
|
import { createUnarySpacing } from '@mui/system/spacing';
|
|
8
|
-
import { prepareCssVars } from '@mui/system/cssVars';
|
|
8
|
+
import { prepareCssVars, prepareTypographyVars } from '@mui/system/cssVars';
|
|
9
9
|
import styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';
|
|
10
10
|
import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';
|
|
11
11
|
import defaultShouldSkipGeneratingVar from './shouldSkipGeneratingVar';
|
|
@@ -118,6 +118,7 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
118
118
|
overlays: colorSchemesInput.dark?.overlays || defaultDarkOverlays
|
|
119
119
|
})
|
|
120
120
|
}),
|
|
121
|
+
font: _extends({}, prepareTypographyVars(muiTheme.typography), muiTheme.font),
|
|
121
122
|
spacing: getSpacingVal(input.spacing)
|
|
122
123
|
});
|
|
123
124
|
Object.keys(theme.colorSchemes).forEach(key => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default getOverlayAlpha;
|
|
1
|
+
export default function getOverlayAlpha(elevation: number): number;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
|
|
2
|
-
|
|
2
|
+
export default function getOverlayAlpha(elevation) {
|
|
3
3
|
let alphaValue;
|
|
4
4
|
if (elevation < 1) {
|
|
5
5
|
alphaValue = 5.11916 * elevation ** 2;
|
|
6
6
|
} else {
|
|
7
7
|
alphaValue = 4.5 * Math.log(elevation + 1) + 2;
|
|
8
8
|
}
|
|
9
|
-
return (alphaValue /
|
|
10
|
-
}
|
|
11
|
-
export default getOverlayAlpha;
|
|
9
|
+
return Math.round(alphaValue * 10) / 1000;
|
|
10
|
+
}
|