@mui/system 6.1.1 → 6.1.2
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 +62 -0
- package/cssVars/createCssVarsProvider.d.ts +6 -0
- package/cssVars/createCssVarsProvider.js +8 -2
- package/cssVars/useCurrentColorScheme.js +4 -4
- package/index.js +1 -1
- package/modern/cssVars/createCssVarsProvider.js +8 -2
- package/modern/cssVars/useCurrentColorScheme.js +4 -4
- package/modern/index.js +1 -1
- package/modern/version/index.js +2 -2
- package/node/cssVars/createCssVarsProvider.js +8 -2
- package/node/cssVars/useCurrentColorScheme.js +4 -4
- package/node/index.js +1 -1
- package/node/version/index.js +2 -2
- package/package.json +5 -5
- package/version/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v6.1.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.1.1..master -->
|
|
6
|
+
|
|
7
|
+
_Oct 2, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 13 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@6.1.2`
|
|
12
|
+
|
|
13
|
+
- [Modal] Remove unnecessary `manager` prop handling (#43867) @ZeeshanTamboli
|
|
14
|
+
- [Autocomplete] Fix listbox opens and closes on click when used with `limitTags` (#42494) @appleSimple
|
|
15
|
+
- [Button] Ignore `dark` and `contrastText` if not provided in the theme (#43861) @siriwatknp
|
|
16
|
+
- [Button] Fix regression for color `inherit` (#43862) @siriwatknp
|
|
17
|
+
- [LinearProgress] Fix background color (#43949) @sai6855
|
|
18
|
+
- Support CSS variables with shadow DOM (#43948) @siriwatknp
|
|
19
|
+
- Improve getReactElementRef() utils (#43022) @sai6855
|
|
20
|
+
- [Modal] Replace `show` parameter name with `hide` in modal manager (#43868) @ZeeshanTamboli
|
|
21
|
+
- [Rating] Use Rating `name` as prefix of input element ids (#43829) @yash49
|
|
22
|
+
- [Drawer] Refactor getScrollbarSize usages (#43828) @BrianWoolfolk
|
|
23
|
+
- [Drawer] Fix issue with main window being used instead of iframe's window (#43818) @albarv340
|
|
24
|
+
- [ThemeProvider] Support setting default mode (#43951) @siriwatknp
|
|
25
|
+
|
|
26
|
+
### Docs
|
|
27
|
+
|
|
28
|
+
- Update theme toggle demo (#43956) @Janpot
|
|
29
|
+
- Add note about minimum required webpack version (#43864) @Janpot
|
|
30
|
+
- Format Pigment CSS docs (#43812) @oliviertassinari
|
|
31
|
+
- Fix visual bug on dashboard template (#43836) @oliviertassinari
|
|
32
|
+
- Fix pigment-css.md syntax error (#43837) @kdichev
|
|
33
|
+
- Fix Sign-in template form experience (#43838) @oliviertassinari
|
|
34
|
+
- Remove "To be continued" section from v0 –> v1 migration guide (#43832) @samuelsycamore
|
|
35
|
+
- Fix 301 to chromium (#43809) @oliviertassinari
|
|
36
|
+
- [joy-ui] Add missing ComponentLinkHeader components (#43865) @samuelsycamore
|
|
37
|
+
- [Modal] Remove unnecessary type assertion (#43825) @ZeeshanTamboli
|
|
38
|
+
- [Table] Stabilize random series in virtualized table demo (#43744) @Janpot
|
|
39
|
+
- [system] Add migration guide link to `@mui/styles` pages (#43833) @samuelsycamore
|
|
40
|
+
|
|
41
|
+
### Core
|
|
42
|
+
|
|
43
|
+
- [code-infra] Fix flaky dashboard screenshot - take 2 (#43937) @Janpot
|
|
44
|
+
- [code-infra] Replace all instances of `e` with `event` and add eslint rule (#43866) @samuelsycamore
|
|
45
|
+
- [code-infra] Fix and update bundling fixtures (#43709) @Janpot
|
|
46
|
+
- [code-infra] Update transitive dependencies with vulnerabilties (#43895) @Janpot
|
|
47
|
+
- [code-infra] Optimize regression tests (#43889) @Janpot
|
|
48
|
+
- [code-infra] Remove custom playwright installation steps (#43881) @Janpot
|
|
49
|
+
- [code-infra] Fix flaky dashboard screenshot (#43890) @Janpot
|
|
50
|
+
- [code-infra] Add new instanceof proptypes for toolpad (#43814) @Janpot
|
|
51
|
+
- Fix eslint-plugin-react-compiler issues in usePagination tests (#43946) @wilhelmlofsten
|
|
52
|
+
- Uniformity in version range @oliviertassinari
|
|
53
|
+
- Replace `toBeAriaHidden` matcher with `toBeInaccessible` in tests (#43870) @ZeeshanTamboli
|
|
54
|
+
- [docs-infra] Strengthen CSP (#43711) @oliviertassinari
|
|
55
|
+
- [docs-infra] Open Codesandbox demo with fontsize=12 (#43860) @siriwatknp
|
|
56
|
+
- [icons] Reduce Material Icon page size (#43911) @oliviertassinari
|
|
57
|
+
- [test] Point Istanbul to correct URL (#43935) @sai6855
|
|
58
|
+
- [test] Sync React.version parse logic with codebase (#43820) @oliviertassinari
|
|
59
|
+
- [website] Add 'Row spanning' (#43831) @oliviertassinari
|
|
60
|
+
- [website] Improve Next roles section (#43822) @oliviertassinari
|
|
61
|
+
- [website] Open the xCharts, eXplore and X general react engineer roles (#43805) @DanailH
|
|
62
|
+
|
|
63
|
+
All contributors of this release in alphabetical order: @albarv340, @appleSimple, @BrianWoolfolk, @DanailH, @Janpot, @kdichev, @oliviertassinari, @sai6855, @samuelsycamore, @siriwatknp, @wilhelmlofsten, @yash49, @ZeeshanTamboli
|
|
64
|
+
|
|
3
65
|
## v6.1.1
|
|
4
66
|
|
|
5
67
|
<!-- generated comparing v6.1.0..master -->
|
|
@@ -54,6 +54,12 @@ export interface CreateCssVarsProviderResult<
|
|
|
54
54
|
colorSchemeSelector?: 'media' | 'class' | 'data' | string;
|
|
55
55
|
}
|
|
56
56
|
>;
|
|
57
|
+
/**
|
|
58
|
+
* The default mode when the storage is empty,
|
|
59
|
+
* require the theme to have `colorSchemes` with light and dark.
|
|
60
|
+
* @default 'system'
|
|
61
|
+
*/
|
|
62
|
+
defaultMode?: 'light' | 'dark' | 'system';
|
|
57
63
|
/**
|
|
58
64
|
* The document used to perform `disableTransitionOnChange` feature
|
|
59
65
|
* @default document
|
|
@@ -49,7 +49,8 @@ export default function createCssVarsProvider(options) {
|
|
|
49
49
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
50
50
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
51
51
|
disableNestedContext = false,
|
|
52
|
-
disableStyleSheetGeneration = false
|
|
52
|
+
disableStyleSheetGeneration = false,
|
|
53
|
+
defaultMode: initialMode = 'system'
|
|
53
54
|
} = props;
|
|
54
55
|
const hasMounted = React.useRef(false);
|
|
55
56
|
const upperTheme = muiUseTheme();
|
|
@@ -72,7 +73,7 @@ export default function createCssVarsProvider(options) {
|
|
|
72
73
|
const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);
|
|
73
74
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
74
75
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
75
|
-
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ?
|
|
76
|
+
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;
|
|
76
77
|
|
|
77
78
|
// 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
78
79
|
const {
|
|
@@ -244,6 +245,11 @@ export default function createCssVarsProvider(options) {
|
|
|
244
245
|
* localStorage key used to store `colorScheme`
|
|
245
246
|
*/
|
|
246
247
|
colorSchemeStorageKey: PropTypes.string,
|
|
248
|
+
/**
|
|
249
|
+
* The default mode when the storage is empty,
|
|
250
|
+
* require the theme to have `colorSchemes` with light and dark.
|
|
251
|
+
*/
|
|
252
|
+
defaultMode: PropTypes.string,
|
|
247
253
|
/**
|
|
248
254
|
* If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
|
|
249
255
|
*/
|
|
@@ -43,7 +43,7 @@ function initializeValue(key, defaultValue) {
|
|
|
43
43
|
// the first time that user enters the site.
|
|
44
44
|
localStorage.setItem(key, defaultValue);
|
|
45
45
|
}
|
|
46
|
-
} catch
|
|
46
|
+
} catch {
|
|
47
47
|
// Unsupported
|
|
48
48
|
}
|
|
49
49
|
return value || defaultValue;
|
|
@@ -90,7 +90,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
90
90
|
const newMode = mode ?? defaultMode;
|
|
91
91
|
try {
|
|
92
92
|
localStorage.setItem(modeStorageKey, newMode);
|
|
93
|
-
} catch
|
|
93
|
+
} catch {
|
|
94
94
|
// Unsupported
|
|
95
95
|
}
|
|
96
96
|
return {
|
|
@@ -106,7 +106,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
106
106
|
try {
|
|
107
107
|
localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);
|
|
108
108
|
localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);
|
|
109
|
-
} catch
|
|
109
|
+
} catch {
|
|
110
110
|
// Unsupported
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
@@ -126,7 +126,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
126
126
|
processState(currentState, mode => {
|
|
127
127
|
try {
|
|
128
128
|
localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);
|
|
129
|
-
} catch
|
|
129
|
+
} catch {
|
|
130
130
|
// Unsupported
|
|
131
131
|
}
|
|
132
132
|
if (mode === 'light') {
|
package/index.js
CHANGED
|
@@ -49,7 +49,8 @@ export default function createCssVarsProvider(options) {
|
|
|
49
49
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
50
50
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
51
51
|
disableNestedContext = false,
|
|
52
|
-
disableStyleSheetGeneration = false
|
|
52
|
+
disableStyleSheetGeneration = false,
|
|
53
|
+
defaultMode: initialMode = 'system'
|
|
53
54
|
} = props;
|
|
54
55
|
const hasMounted = React.useRef(false);
|
|
55
56
|
const upperTheme = muiUseTheme();
|
|
@@ -72,7 +73,7 @@ export default function createCssVarsProvider(options) {
|
|
|
72
73
|
const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);
|
|
73
74
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
74
75
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
75
|
-
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ?
|
|
76
|
+
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;
|
|
76
77
|
|
|
77
78
|
// 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
78
79
|
const {
|
|
@@ -244,6 +245,11 @@ export default function createCssVarsProvider(options) {
|
|
|
244
245
|
* localStorage key used to store `colorScheme`
|
|
245
246
|
*/
|
|
246
247
|
colorSchemeStorageKey: PropTypes.string,
|
|
248
|
+
/**
|
|
249
|
+
* The default mode when the storage is empty,
|
|
250
|
+
* require the theme to have `colorSchemes` with light and dark.
|
|
251
|
+
*/
|
|
252
|
+
defaultMode: PropTypes.string,
|
|
247
253
|
/**
|
|
248
254
|
* If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
|
|
249
255
|
*/
|
|
@@ -43,7 +43,7 @@ function initializeValue(key, defaultValue) {
|
|
|
43
43
|
// the first time that user enters the site.
|
|
44
44
|
localStorage.setItem(key, defaultValue);
|
|
45
45
|
}
|
|
46
|
-
} catch
|
|
46
|
+
} catch {
|
|
47
47
|
// Unsupported
|
|
48
48
|
}
|
|
49
49
|
return value || defaultValue;
|
|
@@ -90,7 +90,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
90
90
|
const newMode = mode ?? defaultMode;
|
|
91
91
|
try {
|
|
92
92
|
localStorage.setItem(modeStorageKey, newMode);
|
|
93
|
-
} catch
|
|
93
|
+
} catch {
|
|
94
94
|
// Unsupported
|
|
95
95
|
}
|
|
96
96
|
return {
|
|
@@ -106,7 +106,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
106
106
|
try {
|
|
107
107
|
localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);
|
|
108
108
|
localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);
|
|
109
|
-
} catch
|
|
109
|
+
} catch {
|
|
110
110
|
// Unsupported
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
@@ -126,7 +126,7 @@ export default function useCurrentColorScheme(options) {
|
|
|
126
126
|
processState(currentState, mode => {
|
|
127
127
|
try {
|
|
128
128
|
localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);
|
|
129
|
-
} catch
|
|
129
|
+
} catch {
|
|
130
130
|
// Unsupported
|
|
131
131
|
}
|
|
132
132
|
if (mode === 'light') {
|
package/modern/index.js
CHANGED
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.1.
|
|
1
|
+
export const version = "6.1.2";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("1");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("2");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
|
@@ -58,7 +58,8 @@ function createCssVarsProvider(options) {
|
|
|
58
58
|
documentNode = typeof document === 'undefined' ? undefined : document,
|
|
59
59
|
colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,
|
|
60
60
|
disableNestedContext = false,
|
|
61
|
-
disableStyleSheetGeneration = false
|
|
61
|
+
disableStyleSheetGeneration = false,
|
|
62
|
+
defaultMode: initialMode = 'system'
|
|
62
63
|
} = props;
|
|
63
64
|
const hasMounted = React.useRef(false);
|
|
64
65
|
const upperTheme = (0, _privateTheming.useTheme)();
|
|
@@ -81,7 +82,7 @@ function createCssVarsProvider(options) {
|
|
|
81
82
|
const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);
|
|
82
83
|
const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;
|
|
83
84
|
const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;
|
|
84
|
-
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ?
|
|
85
|
+
const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;
|
|
85
86
|
|
|
86
87
|
// 1. Get the data about the `mode`, `colorScheme`, and setter functions.
|
|
87
88
|
const {
|
|
@@ -253,6 +254,11 @@ function createCssVarsProvider(options) {
|
|
|
253
254
|
* localStorage key used to store `colorScheme`
|
|
254
255
|
*/
|
|
255
256
|
colorSchemeStorageKey: _propTypes.default.string,
|
|
257
|
+
/**
|
|
258
|
+
* The default mode when the storage is empty,
|
|
259
|
+
* require the theme to have `colorSchemes` with light and dark.
|
|
260
|
+
*/
|
|
261
|
+
defaultMode: _propTypes.default.string,
|
|
256
262
|
/**
|
|
257
263
|
* If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.
|
|
258
264
|
*/
|
|
@@ -51,7 +51,7 @@ function initializeValue(key, defaultValue) {
|
|
|
51
51
|
// the first time that user enters the site.
|
|
52
52
|
localStorage.setItem(key, defaultValue);
|
|
53
53
|
}
|
|
54
|
-
} catch
|
|
54
|
+
} catch {
|
|
55
55
|
// Unsupported
|
|
56
56
|
}
|
|
57
57
|
return value || defaultValue;
|
|
@@ -98,7 +98,7 @@ function useCurrentColorScheme(options) {
|
|
|
98
98
|
const newMode = mode ?? defaultMode;
|
|
99
99
|
try {
|
|
100
100
|
localStorage.setItem(modeStorageKey, newMode);
|
|
101
|
-
} catch
|
|
101
|
+
} catch {
|
|
102
102
|
// Unsupported
|
|
103
103
|
}
|
|
104
104
|
return {
|
|
@@ -114,7 +114,7 @@ function useCurrentColorScheme(options) {
|
|
|
114
114
|
try {
|
|
115
115
|
localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);
|
|
116
116
|
localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);
|
|
117
|
-
} catch
|
|
117
|
+
} catch {
|
|
118
118
|
// Unsupported
|
|
119
119
|
}
|
|
120
120
|
return {
|
|
@@ -134,7 +134,7 @@ function useCurrentColorScheme(options) {
|
|
|
134
134
|
processState(currentState, mode => {
|
|
135
135
|
try {
|
|
136
136
|
localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);
|
|
137
|
-
} catch
|
|
137
|
+
} catch {
|
|
138
138
|
// Unsupported
|
|
139
139
|
}
|
|
140
140
|
if (mode === 'light') {
|
package/node/index.js
CHANGED
package/node/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "6.1.
|
|
7
|
+
const version = exports.version = "6.1.2";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
9
|
const minor = exports.minor = Number("1");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("2");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/system",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "MUI System is a set of CSS utilities to help you build custom designs more efficiently. It makes it possible to rapidly lay out custom designs.",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"clsx": "^2.1.1",
|
|
31
31
|
"csstype": "^3.1.3",
|
|
32
32
|
"prop-types": "^15.8.1",
|
|
33
|
-
"@mui/private-theming": "^6.1.
|
|
34
|
-
"@mui/
|
|
35
|
-
"@mui/
|
|
36
|
-
"@mui/
|
|
33
|
+
"@mui/private-theming": "^6.1.2",
|
|
34
|
+
"@mui/types": "^7.2.17",
|
|
35
|
+
"@mui/styled-engine": "^6.1.2",
|
|
36
|
+
"@mui/utils": "^6.1.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@emotion/react": "^11.5.0",
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.1.
|
|
1
|
+
export const version = "6.1.2";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("1");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("2");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|