@mui/system 6.0.0-alpha.8 → 6.0.0-alpha.9

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 CHANGED
@@ -1,5 +1,81 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v6.0.0-alpha.9
4
+
5
+ <!-- generated comparing v6.0.0-alpha.8..next -->
6
+
7
+ _May 29, 2024_
8
+
9
+ A big thanks to the 23 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 `CssVarsProvider` and `extendTheme` are now stable (#42246) @siriwatknp
12
+
13
+ ### `@mui/material@6.0.0-alpha.9`
14
+
15
+ - &#8203;<!-- 49 -->[AlertTitle] Enable extending Typography props (#42269) @lucasgmelo
16
+ - &#8203;<!-- 48 -->[AvatarGroup] deprecate `componentsProps` for v6 (#42122) @lhilgert9
17
+ - &#8203;<!-- 15 -->[Grid] Deprecate `wrap` prop (#42363) @fedirjh
18
+ - &#8203;<!-- 14 -->[ListItem] Document `*Component` and `*Props` props deprecations (#42263) @aarongarciah
19
+ - &#8203;<!-- 13 -->[ListItem] Deprecate ListItem's components and componentsProps (#42219) @aarongarciah
20
+ - &#8203;<!-- 12 -->[ListItemSecondaryAction] Deprecate component (#42251) @aarongarciah
21
+ - &#8203;<!-- 11 -->Stabilize `CssVarsProvider` and `extendTheme` (#42246) @siriwatknp
22
+ - &#8203;<!-- 10 -->[Popper] Deprecate components and componentProps props for v6 (#42111) @ChronicusUA
23
+ - &#8203;<!-- 09 -->[responsiveFontSizes] Handled undefined variants (#42412) @brijeshb42
24
+ - &#8203;<!-- 08 -->[Slider] Fix wrong CSS value (#42370) @mnajdova
25
+ - &#8203;<!-- 07 -->[Tooltip] Deprecate components and componentProps props for v6 (#42107) @ChronicusUA
26
+
27
+ ### `@mui/system@6.0.0-alpha.9`
28
+
29
+ - &#8203;<!-- 34 -->[createStyled] Intercept `ownerState` coming from `props` and `ownerState` (#42358) @DiegoAndai
30
+
31
+ ### `@mui/codemod@6.0.0-alpha.9`
32
+
33
+ - &#8203;<!-- 41 -->Add `sx` prop for v6 migration (#42153) @siriwatknp
34
+ - &#8203;<!-- 40 -->Add codemod for removing system props (#42282) @siriwatknp
35
+
36
+ ### Docs
37
+
38
+ - &#8203;<!-- 33 -->Remove unused images (#42324) @danilo-leal
39
+ - &#8203;<!-- 32 -->Add Pigment CSS and Base UI logos SVGs (#42322) @danilo-leal
40
+ - &#8203;<!-- 22 -->[joy-ui] Fix template responsiveness (#42422) @j4marcos
41
+ - &#8203;<!-- 21 -->[material-ui] Add the Pashto locale (#42244) @sayoubiaf
42
+ - &#8203;<!-- 20 -->[material-ui] Remove duplicate Design Kits page (#42338) @danilo-leal
43
+ - &#8203;<!-- 19 -->[material-ui] Document callback to access theme in GlobalStyles (#42257) @aarongarciah
44
+ - &#8203;<!-- 18 -->[material-ui] Add minor modifications to the Vertical stepper demo (#42342) @mihilt
45
+ - &#8203;<!-- 17 -->[material-ui][Tabs] Improve the Basic Tabs demo (#42374) @MatheusEli
46
+ - &#8203;<!-- 16 -->[pigment-css] Polish redirection mention @oliviertassinari
47
+
48
+ ### Core
49
+
50
+ - &#8203;<!-- 47 -->[blog] Add fixes and clean ups to the Blog page (#42311) @danilo-leal
51
+ - &#8203;<!-- 46 -->[blog] Add the "Product" tag to the Pigment CSS post (#42365) @danilo-leal
52
+ - &#8203;<!-- 45 -->[code-infra] Simplify .stylelintrc.js @oliviertassinari
53
+ - &#8203;<!-- 44 -->[code-infra] Fix stylelint locally (#42411) @oliviertassinari
54
+ - &#8203;<!-- 43 -->[code-infra] Run corepack enable on all CI jobs (#42331) @Janpot
55
+ - &#8203;<!-- 42 -->[code-infra] Create examples eslint rule (#42170) @oliviertassinari
56
+ - &#8203;<!-- 39 -->[core] Apply React 19 type changes that don't require upcoming `@types/` packages (#42346) @DiegoAndai
57
+ - &#8203;<!-- 38 -->[core] Remove `react-swipeable-views-utils` package from docs (#42378) @ZeeshanTamboli
58
+ - &#8203;<!-- 37 -->[core] Update `@testing-library/react` and `@testing-library/dom` packages (#42349) @ZeeshanTamboli
59
+ - &#8203;<!-- 36 -->[core] Remove `@types/prettier` package (#42339) @ZeeshanTamboli
60
+ - &#8203;<!-- 35 -->[core] Remove `WyW-in-JS` from Renovate config (#42335) @ZeeshanTamboli
61
+ - &#8203;<!-- 31 -->[docs-infra] Split feedback channels per product (#42413) @alexfauquette
62
+ - &#8203;<!-- 30 -->[docs-infra] Avoid cryptic errors when tests don't exist (#42356) @Janpot
63
+ - &#8203;<!-- 29 -->[docs-infra] Make menu styles consistent (#42387) @danilo-leal
64
+ - &#8203;<!-- 28 -->[docs-infra] Display deprecation messages in API pages (#42352) @aarongarciah
65
+ - &#8203;<!-- 27 -->[docs-infra] Standardize API pages Alert styles (#42386) @danilo-leal
66
+ - &#8203;<!-- 26 -->[docs-infra] Fix Toolpad Core API links (#42362) @apedroferreira
67
+ - &#8203;<!-- 25 -->[docs-infra] Tigthen up the header design (#42180) @danilo-leal
68
+ - &#8203;<!-- 24 -->[docs-infra] Add Toolpad to muiNpmOrgs for codesandbox demos (#42316) @Janpot
69
+ - &#8203;<!-- 23 -->[docs-infra] Allow JSDoc tags (#42337) @aarongarciah
70
+ - &#8203;<!-- 06 -->[test] Remove `userAgent` override in `jsdom` env (#42344) @cherniavskii
71
+ - &#8203;<!-- 05 -->[utils] Fix GitHub-reported prototype pollution vulnerability in `deepmerge` (#41652) @tjcouch-sil
72
+ - &#8203;<!-- 04 -->[website] Add Nikita to the about page (#42418) @nikitaa24
73
+ - &#8203;<!-- 03 -->[website] Fix hero spacing changes applying at the wrong breakpoint (#42341) @KenanYusuf
74
+ - &#8203;<!-- 02 -->[website] Adds Kenan Yusuf to about page (#42317) @KenanYusuf
75
+ - &#8203;<!-- 01 -->[website] Improve about page @oliviertassinari
76
+
77
+ All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @apedroferreira, @brijeshb42, @cherniavskii, @ChronicusUA, @danilo-leal, @DiegoAndai, @fedirjh, @j4marcos, @Janpot, @KenanYusuf, @lhilgert9, @lucasgmelo, @MatheusEli, @mihilt, @mnajdova, @nikitaa24, @oliviertassinari, @sayoubiaf, @siriwatknp, @tjcouch-sil, @ZeeshanTamboli
78
+
3
79
  ## v6.0.0-alpha.8
4
80
 
5
81
  <!-- generated comparing v6.0.0-alpha.7..next -->
@@ -56,6 +56,11 @@ function processStyleArg(callableStyle, {
56
56
  ...props
57
57
  }));
58
58
  }
59
+ const mergedState = {
60
+ ...props,
61
+ ...ownerState,
62
+ ownerState
63
+ };
59
64
  if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {
60
65
  const {
61
66
  variants = [],
@@ -65,11 +70,7 @@ function processStyleArg(callableStyle, {
65
70
  variants.forEach(variant => {
66
71
  let isMatch = true;
67
72
  if (typeof variant.props === 'function') {
68
- isMatch = variant.props({
69
- ownerState,
70
- ...props,
71
- ...ownerState
72
- });
73
+ isMatch = variant.props(mergedState);
73
74
  } else {
74
75
  Object.keys(variant.props).forEach(key => {
75
76
  if (ownerState?.[key] !== variant.props[key] && props[key] !== variant.props[key]) {
@@ -81,11 +82,7 @@ function processStyleArg(callableStyle, {
81
82
  if (!Array.isArray(result)) {
82
83
  result = [result];
83
84
  }
84
- result.push(typeof variant.style === 'function' ? variant.style({
85
- ownerState,
86
- ...props,
87
- ...ownerState
88
- }) : variant.style);
85
+ result.push(typeof variant.style === 'function' ? variant.style(mergedState) : variant.style);
89
86
  }
90
87
  });
91
88
  return result;
@@ -6,7 +6,7 @@ export interface ApplyStyles<K extends string> {
6
6
  * A universal utility to style components with multiple color modes. Always use it from the theme object.
7
7
  * It works with:
8
8
  * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
9
- * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
9
+ * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
10
10
  * - Zero-runtime engine
11
11
  *
12
12
  * Tips: Use an array over object spread and place `theme.applyStyles()` last.
@@ -2,7 +2,7 @@
2
2
  * A universal utility to style components with multiple color modes. Always use it from the theme object.
3
3
  * It works with:
4
4
  * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
5
- * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
5
+ * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
6
6
  * - Zero-runtime engine
7
7
  *
8
8
  * Tips: Use an array over object spread and place `theme.applyStyles()` last.
@@ -90,7 +90,7 @@ export interface CreateCssVarsProviderResult<
90
90
  disableStyleSheetGeneration?: boolean;
91
91
  }
92
92
  >,
93
- ) => React.ReactElement;
93
+ ) => React.ReactElement<any>;
94
94
  useColorScheme: () => ColorSchemeContextValue<ColorScheme>;
95
95
  getInitColorSchemeScript: typeof getInitColorSchemeScript;
96
96
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.0.0-alpha.8
2
+ * @mui/system v6.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -56,6 +56,11 @@ function processStyleArg(callableStyle, {
56
56
  ...props
57
57
  }));
58
58
  }
59
+ const mergedState = {
60
+ ...props,
61
+ ...ownerState,
62
+ ownerState
63
+ };
59
64
  if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {
60
65
  const {
61
66
  variants = [],
@@ -65,11 +70,7 @@ function processStyleArg(callableStyle, {
65
70
  variants.forEach(variant => {
66
71
  let isMatch = true;
67
72
  if (typeof variant.props === 'function') {
68
- isMatch = variant.props({
69
- ownerState,
70
- ...props,
71
- ...ownerState
72
- });
73
+ isMatch = variant.props(mergedState);
73
74
  } else {
74
75
  Object.keys(variant.props).forEach(key => {
75
76
  if (ownerState?.[key] !== variant.props[key] && props[key] !== variant.props[key]) {
@@ -81,11 +82,7 @@ function processStyleArg(callableStyle, {
81
82
  if (!Array.isArray(result)) {
82
83
  result = [result];
83
84
  }
84
- result.push(typeof variant.style === 'function' ? variant.style({
85
- ownerState,
86
- ...props,
87
- ...ownerState
88
- }) : variant.style);
85
+ result.push(typeof variant.style === 'function' ? variant.style(mergedState) : variant.style);
89
86
  }
90
87
  });
91
88
  return result;
@@ -2,7 +2,7 @@
2
2
  * A universal utility to style components with multiple color modes. Always use it from the theme object.
3
3
  * It works with:
4
4
  * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
5
- * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
5
+ * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
6
6
  * - Zero-runtime engine
7
7
  *
8
8
  * Tips: Use an array over object spread and place `theme.applyStyles()` last.
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.0.0-alpha.8
2
+ * @mui/system v6.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -128,9 +128,9 @@ function createGrid(options = {}) {
128
128
  ...other,
129
129
  children: React.Children.map(children, child => {
130
130
  if ( /*#__PURE__*/React.isValidElement(child) && (0, _isMuiElement.default)(child, ['Grid'])) {
131
- var _child$props$unstable;
131
+ var _unstable_level;
132
132
  return /*#__PURE__*/React.cloneElement(child, {
133
- unstable_level: (_child$props$unstable = child.props.unstable_level) != null ? _child$props$unstable : level + 1
133
+ unstable_level: (_unstable_level = child.props.unstable_level) != null ? _unstable_level : level + 1
134
134
  });
135
135
  }
136
136
  return child;
@@ -68,6 +68,11 @@ function processStyleArg(callableStyle, {
68
68
  ...props
69
69
  }));
70
70
  }
71
+ const mergedState = {
72
+ ...props,
73
+ ...ownerState,
74
+ ownerState
75
+ };
71
76
  if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {
72
77
  const {
73
78
  variants = [],
@@ -77,11 +82,7 @@ function processStyleArg(callableStyle, {
77
82
  variants.forEach(variant => {
78
83
  let isMatch = true;
79
84
  if (typeof variant.props === 'function') {
80
- isMatch = variant.props({
81
- ownerState,
82
- ...props,
83
- ...ownerState
84
- });
85
+ isMatch = variant.props(mergedState);
85
86
  } else {
86
87
  Object.keys(variant.props).forEach(key => {
87
88
  if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {
@@ -93,11 +94,7 @@ function processStyleArg(callableStyle, {
93
94
  if (!Array.isArray(result)) {
94
95
  result = [result];
95
96
  }
96
- result.push(typeof variant.style === 'function' ? variant.style({
97
- ownerState,
98
- ...props,
99
- ...ownerState
100
- }) : variant.style);
97
+ result.push(typeof variant.style === 'function' ? variant.style(mergedState) : variant.style);
101
98
  }
102
99
  });
103
100
  return result;
@@ -8,7 +8,7 @@ exports.default = applyStyles;
8
8
  * A universal utility to style components with multiple color modes. Always use it from the theme object.
9
9
  * It works with:
10
10
  * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)
11
- * - [CSS theme variables](https://mui.com/material-ui/experimental-api/css-theme-variables/overview/)
11
+ * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)
12
12
  * - Zero-runtime engine
13
13
  *
14
14
  * Tips: Use an array over object spread and place `theme.applyStyles()` last.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.0.0-alpha.8
2
+ * @mui/system v6.0.0-alpha.9
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/system",
3
- "version": "6.0.0-alpha.8",
3
+ "version": "6.0.0-alpha.9",
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.",
@@ -26,14 +26,14 @@
26
26
  "url": "https://opencollective.com/mui-org"
27
27
  },
28
28
  "dependencies": {
29
- "@babel/runtime": "^7.24.5",
29
+ "@babel/runtime": "^7.24.6",
30
30
  "clsx": "^2.1.1",
31
31
  "csstype": "^3.1.3",
32
32
  "prop-types": "^15.8.1",
33
- "@mui/private-theming": "^6.0.0-alpha.8",
34
- "@mui/styled-engine": "^6.0.0-alpha.8",
35
- "@mui/utils": "^6.0.0-alpha.8",
36
- "@mui/types": "^7.2.14"
33
+ "@mui/private-theming": "^6.0.0-alpha.9",
34
+ "@mui/styled-engine": "^6.0.0-alpha.9",
35
+ "@mui/types": "^7.2.14",
36
+ "@mui/utils": "^6.0.0-alpha.9"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@emotion/react": "^11.5.0",