@mui/system 5.2.1 → 5.2.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/Box/Box.spec.d.ts +1 -1
- package/CHANGELOG.md +279 -1
- package/createBox.d.ts +3 -3
- package/createBox.spec.d.ts +1 -0
- package/createTheme/createBreakpoints.d.ts +6 -0
- package/createTheme/createBreakpoints.js +16 -0
- package/createTheme/createSpacing.d.ts +10 -10
- package/cssVars/createCssVarsProvider.d.ts +24 -10
- package/cssVars/createCssVarsProvider.js +81 -8
- package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
- package/cssVars/cssVarsParser.d.ts +68 -68
- package/cssVars/cssVarsParser.js +18 -17
- package/cssVars/getInitColorSchemeScript.d.ts +12 -12
- package/cssVars/getInitColorSchemeScript.js +1 -1
- package/cssVars/index.d.ts +2 -2
- package/cssVars/useCurrentColorScheme.d.ts +50 -50
- package/esm/createTheme/createBreakpoints.js +16 -0
- package/esm/cssVars/createCssVarsProvider.js +78 -9
- package/esm/cssVars/cssVarsParser.js +18 -16
- package/esm/cssVars/getInitColorSchemeScript.js +1 -1
- package/esm/useThemeProps/getThemeProps.js +2 -17
- package/index.js +1 -1
- package/index.spec.d.ts +1 -1
- package/legacy/createTheme/createBreakpoints.js +16 -0
- package/legacy/cssVars/createCssVarsProvider.js +81 -9
- package/legacy/cssVars/cssVarsParser.js +20 -14
- package/legacy/cssVars/getInitColorSchemeScript.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/useThemeProps/getThemeProps.js +2 -17
- package/modern/createTheme/createBreakpoints.js +16 -0
- package/modern/cssVars/createCssVarsProvider.js +76 -9
- package/modern/cssVars/cssVarsParser.js +18 -16
- package/modern/cssVars/getInitColorSchemeScript.js +1 -1
- package/modern/index.js +1 -1
- package/modern/useThemeProps/getThemeProps.js +2 -17
- package/package.json +5 -5
- package/styleFunctionSx/styleFunctionSx.d.ts +1 -1
- package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
- package/useThemeProps/getThemeProps.js +2 -17
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/* eslint-disable no-restricted-syntax */
|
|
1
|
+
import { internal_resolveProps as resolveProps } from '@mui/utils';
|
|
4
2
|
export default function getThemeProps(params) {
|
|
5
3
|
const {
|
|
6
4
|
theme,
|
|
@@ -12,18 +10,5 @@ export default function getThemeProps(params) {
|
|
|
12
10
|
return props;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
// https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const defaultProps = theme.components[name].defaultProps;
|
|
20
|
-
let propName;
|
|
21
|
-
|
|
22
|
-
for (propName in defaultProps) {
|
|
23
|
-
if (output[propName] === undefined) {
|
|
24
|
-
output[propName] = defaultProps[propName];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return output;
|
|
13
|
+
return resolveProps(theme.components[name].defaultProps, props);
|
|
29
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "CSS utilities for rapidly laying out custom designs.",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"homepage": "https://mui.com/system/basics/",
|
|
24
24
|
"funding": {
|
|
25
25
|
"type": "opencollective",
|
|
26
|
-
"url": "https://opencollective.com/
|
|
26
|
+
"url": "https://opencollective.com/mui"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@emotion/react": "^11.5.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@babel/runtime": "^7.16.3",
|
|
47
|
-
"@mui/private-theming": "^5.2.
|
|
48
|
-
"@mui/styled-engine": "^5.2.
|
|
47
|
+
"@mui/private-theming": "^5.2.3",
|
|
48
|
+
"@mui/styled-engine": "^5.2.5",
|
|
49
49
|
"@mui/types": "^7.1.0",
|
|
50
|
-
"@mui/utils": "^5.2.
|
|
50
|
+
"@mui/utils": "^5.2.3",
|
|
51
51
|
"clsx": "^1.1.1",
|
|
52
52
|
"csstype": "^3.0.10",
|
|
53
53
|
"prop-types": "^15.7.2"
|
|
@@ -57,7 +57,7 @@ export type SystemStyleObject<Theme extends object = {}> =
|
|
|
57
57
|
export type SxProps<Theme extends object = {}> =
|
|
58
58
|
| SystemStyleObject<Theme>
|
|
59
59
|
| ((theme: Theme) => SystemStyleObject<Theme>)
|
|
60
|
-
| Array<SystemStyleObject<Theme> | ((theme: Theme) => SystemStyleObject<Theme>)>;
|
|
60
|
+
| Array<boolean | SystemStyleObject<Theme> | ((theme: Theme) => SystemStyleObject<Theme>)>;
|
|
61
61
|
|
|
62
62
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
63
63
|
export default function unstable_styleFunctionSx(props: object): object;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = getThemeProps;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _utils = require("@mui/utils");
|
|
11
9
|
|
|
12
|
-
/* eslint-disable no-restricted-syntax */
|
|
13
10
|
function getThemeProps(params) {
|
|
14
11
|
const {
|
|
15
12
|
theme,
|
|
@@ -21,17 +18,5 @@ function getThemeProps(params) {
|
|
|
21
18
|
return props;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
// https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221
|
|
26
|
-
|
|
27
|
-
const defaultProps = theme.components[name].defaultProps;
|
|
28
|
-
let propName;
|
|
29
|
-
|
|
30
|
-
for (propName in defaultProps) {
|
|
31
|
-
if (output[propName] === undefined) {
|
|
32
|
-
output[propName] = defaultProps[propName];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return output;
|
|
21
|
+
return (0, _utils.internal_resolveProps)(theme.components[name].defaultProps, props);
|
|
37
22
|
}
|