@mui/system 5.10.9 → 5.10.12
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 +447 -213
- package/Container/Container.d.ts +13 -13
- package/Container/ContainerProps.d.ts +40 -40
- package/Container/containerClasses.d.ts +22 -22
- package/Container/createContainer.d.ts +18 -18
- package/Stack/Stack.d.ts +13 -13
- package/Stack/StackProps.d.ts +42 -42
- package/Stack/createStack.d.ts +21 -21
- package/Stack/index.d.ts +5 -5
- package/Stack/stackClasses.d.ts +8 -8
- package/ThemeProvider/ThemeProvider.js +3 -1
- package/Unstable_Grid/Grid.d.ts +12 -12
- package/Unstable_Grid/GridProps.d.ts +162 -162
- package/Unstable_Grid/createGrid.d.ts +11 -11
- package/Unstable_Grid/gridClasses.d.ts +20 -20
- package/Unstable_Grid/gridGenerator.d.ts +28 -28
- package/Unstable_Grid/index.d.ts +5 -5
- package/createBox.spec.d.ts +1 -1
- package/createTheme/createSpacing.d.ts +10 -10
- package/createTheme/createSpacing.js +1 -1
- package/cssVars/createCssVarsProvider.js +11 -10
- package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
- package/cssVars/createGetCssVar.d.ts +5 -5
- package/cssVars/cssVarsParser.d.ts +65 -65
- package/cssVars/cssVarsParser.js +1 -1
- package/cssVars/getInitColorSchemeScript.d.ts +42 -42
- package/cssVars/index.d.ts +3 -3
- package/cssVars/useCurrentColorScheme.d.ts +53 -53
- package/esm/ThemeProvider/ThemeProvider.js +2 -1
- package/esm/createTheme/createSpacing.js +1 -1
- package/esm/cssVars/createCssVarsProvider.js +11 -10
- package/esm/cssVars/cssVarsParser.js +1 -1
- package/esm/palette.js +15 -3
- package/esm/style.js +1 -1
- package/index.js +1 -1
- package/index.spec.d.ts +1 -1
- package/legacy/ThemeProvider/ThemeProvider.js +2 -1
- package/legacy/createTheme/createSpacing.js +1 -1
- package/legacy/cssVars/createCssVarsProvider.js +6 -3
- package/legacy/cssVars/cssVarsParser.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/palette.js +15 -3
- package/legacy/style.js +1 -1
- package/modern/ThemeProvider/ThemeProvider.js +2 -1
- package/modern/createTheme/createSpacing.js +1 -1
- package/modern/cssVars/createCssVarsProvider.js +11 -10
- package/modern/cssVars/cssVarsParser.js +1 -1
- package/modern/index.js +1 -1
- package/modern/palette.js +15 -3
- package/modern/style.js +1 -1
- package/package.json +1 -1
- package/palette.js +14 -3
- package/style.d.ts +4 -1
- package/style.js +1 -1
- package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
package/modern/palette.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import style from './style';
|
|
2
2
|
import compose from './compose';
|
|
3
|
+
|
|
4
|
+
function transform(value, userValue) {
|
|
5
|
+
if (userValue === 'grey') {
|
|
6
|
+
return userValue;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
export const color = style({
|
|
4
13
|
prop: 'color',
|
|
5
|
-
themeKey: 'palette'
|
|
14
|
+
themeKey: 'palette',
|
|
15
|
+
transform
|
|
6
16
|
});
|
|
7
17
|
export const bgcolor = style({
|
|
8
18
|
prop: 'bgcolor',
|
|
9
19
|
cssProperty: 'backgroundColor',
|
|
10
|
-
themeKey: 'palette'
|
|
20
|
+
themeKey: 'palette',
|
|
21
|
+
transform
|
|
11
22
|
});
|
|
12
23
|
export const backgroundColor = style({
|
|
13
24
|
prop: 'backgroundColor',
|
|
14
|
-
themeKey: 'palette'
|
|
25
|
+
themeKey: 'palette',
|
|
26
|
+
transform
|
|
15
27
|
});
|
|
16
28
|
const palette = compose(color, bgcolor, backgroundColor);
|
|
17
29
|
export default palette;
|
package/modern/style.js
CHANGED
package/package.json
CHANGED
package/palette.js
CHANGED
|
@@ -11,20 +11,31 @@ var _style = _interopRequireDefault(require("./style"));
|
|
|
11
11
|
|
|
12
12
|
var _compose = _interopRequireDefault(require("./compose"));
|
|
13
13
|
|
|
14
|
+
function transform(value, userValue) {
|
|
15
|
+
if (userValue === 'grey') {
|
|
16
|
+
return userValue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
const color = (0, _style.default)({
|
|
15
23
|
prop: 'color',
|
|
16
|
-
themeKey: 'palette'
|
|
24
|
+
themeKey: 'palette',
|
|
25
|
+
transform
|
|
17
26
|
});
|
|
18
27
|
exports.color = color;
|
|
19
28
|
const bgcolor = (0, _style.default)({
|
|
20
29
|
prop: 'bgcolor',
|
|
21
30
|
cssProperty: 'backgroundColor',
|
|
22
|
-
themeKey: 'palette'
|
|
31
|
+
themeKey: 'palette',
|
|
32
|
+
transform
|
|
23
33
|
});
|
|
24
34
|
exports.bgcolor = bgcolor;
|
|
25
35
|
const backgroundColor = (0, _style.default)({
|
|
26
36
|
prop: 'backgroundColor',
|
|
27
|
-
themeKey: 'palette'
|
|
37
|
+
themeKey: 'palette',
|
|
38
|
+
transform
|
|
28
39
|
});
|
|
29
40
|
exports.backgroundColor = backgroundColor;
|
|
30
41
|
const palette = (0, _compose.default)(color, bgcolor, backgroundColor);
|
package/style.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ export interface StyleOptions<PropKey> {
|
|
|
8
8
|
* dot access in `Theme`
|
|
9
9
|
*/
|
|
10
10
|
themeKey?: string;
|
|
11
|
-
transform?: (
|
|
11
|
+
transform?: (
|
|
12
|
+
cssValue: unknown,
|
|
13
|
+
userValue: unknown,
|
|
14
|
+
) => number | string | React.CSSProperties | CSSObject;
|
|
12
15
|
}
|
|
13
16
|
export function style<PropKey extends string, Theme extends object>(
|
|
14
17
|
options: StyleOptions<PropKey>,
|
package/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|