@mui/system 6.1.0 → 6.1.1

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,68 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## v6.1.1
4
+
5
+ <!-- generated comparing v6.1.0..master -->
6
+
7
+ _Sep 19, 2024_
8
+
9
+ A big thanks to the 18 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.1.1`
12
+
13
+ - [Grid] Bring back `GridProps` and `GridTypeMap` (#43717) @DiegoAndai
14
+ - [Paper] Fix wrong background-image on Paper when elevation is 0 (#43723) @ZeeshanTamboli
15
+ - [Skeleton] Fix wave animation for styled-components (#43740) @siriwatknp
16
+ - [Modal] Fix event handlers overriding behavior (#43757) @sai6855
17
+
18
+ ### `@mui/system@6.1.1`
19
+
20
+ - Pass the stylesheet directly to `GlobalStyles` (#43739) @siriwatknp
21
+
22
+ ### `@mui/utils@6.1.1`
23
+
24
+ - Fix "useId" & "useSyncExternalStore" imports to not be statically analyzable (#43360) @yash49
25
+
26
+ ### Docs
27
+
28
+ - [material-ui][Breadcrumbs] Document CondensedWithMenu option for Breadcrumbs (#42973) @Sergio16T
29
+ - [material-ui][CircularProgress] Add Circular size demo (#43734) @sai6855
30
+ - [material-ui][slider] Fix slider in color customization playground twitches when sliding (#43671) @Nashyn
31
+ - [material-ui][slider] Polish Music player demo (#43748) @oliviertassinari
32
+ - [material-ui] Document Typography color prop breaking change (#43735) @aarongarciah
33
+ - [material-ui] Add docs for complementary Table components (#43756) @Juneezee
34
+ - [material-ui] Improve minimizing bundle docs (#43781) @ZeeshanTamboli
35
+ - [pigment-css] Call out Pigment being in alpha (#43725) @aarongarciah
36
+ - [pigment-css] Fix typo globalCSS -> globalCss (#43754) @hiro0218
37
+ - [test] Improve demos for better regression screenshots (#43742) @aarongarciah
38
+ - Fix minor typo (#42899) @xconverge
39
+ - Revert icon search virtualization (#43569) @Janpot
40
+ - Fix MUI Treasury Layout broken links (#43752) @oliviertassinari
41
+ - Fix 301 link to design asset @oliviertassinari
42
+ - Update release schedule table after v6 stable (#43726) @sahil-ag
43
+ - Fix bundle size link regression @oliviertassinari
44
+
45
+ ### Core
46
+
47
+ - [code-infra] Allow overriding all `options` of `useFakeTimers` function (#43729) @LukasTy
48
+ - [core] Fix 301 link to Next.js and git diff @oliviertassinari
49
+ - [core] Fix package.json repository rule @oliviertassinari
50
+ - [core] Remove redundant window @oliviertassinari
51
+ - [core] Fix some issues reported by eslint-plugin-react-compiler (#43117) @binsmyth
52
+ - [core] Replace more `indexOf` with `includes` (#43694) @Juneezee
53
+ - [core] Remove /.yarn (#43712) @oliviertassinari
54
+ - [docs-infra] Enable synthetic default imports in TypeScript config (#43747) @morozow
55
+ - [docs-infra] Fix Vale config for TypeScript references (#43751) @oliviertassinari
56
+ - [docs-infra] Fix toolbar arrow order (#43627) @oliviertassinari
57
+ - [docs-infra] Fix missing dependencies in multi-tab demos (#43713) @cherniavskii
58
+ - [docs-infra] Fix API search link regression (#43662) @oliviertassinari
59
+ - [test] Update font-awesome CSS file in regression tests fixture (#43745) @Janpot
60
+ - [test] Remove position:relative from regression container (#43743) @aarongarciah
61
+ - [test] Remove top-level inline-block from the regression tests (#43656) @Janpot
62
+ - [website] Match pricing page with linked page h1 @oliviertassinari
63
+
64
+ All contributors of this release in alphabetical order: @aarongarciah, @binsmyth, @cherniavskii, @DiegoAndai, @Janpot, @Juneezee, @LukasTy, @mnajdova, @morozow, @Nashyn, @oliviertassinari, @sahil-ag, @sai6855, @Sergio16T, @siriwatknp, @xconverge, @yash49, @ZeeshanTamboli
65
+
3
66
  ## v6.1.0
4
67
 
5
68
  <!-- generated comparing v6.0.2..master -->
@@ -215,14 +215,12 @@ export default function createCssVarsProvider(options) {
215
215
  shouldGenerateStyleSheet = false;
216
216
  }
217
217
  const element = /*#__PURE__*/_jsxs(React.Fragment, {
218
- children: [shouldGenerateStyleSheet && /*#__PURE__*/_jsx(React.Fragment, {
219
- children: (theme.generateStyleSheets?.() || []).map((styles, index) => /*#__PURE__*/_jsx(GlobalStyles, {
220
- styles: styles
221
- }, index))
222
- }), /*#__PURE__*/_jsx(ThemeProvider, {
218
+ children: [/*#__PURE__*/_jsx(ThemeProvider, {
223
219
  themeId: scopedTheme ? themeId : undefined,
224
220
  theme: resolveTheme ? resolveTheme(theme) : theme,
225
221
  children: children
222
+ }), shouldGenerateStyleSheet && /*#__PURE__*/_jsx(GlobalStyles, {
223
+ styles: theme.generateStyleSheets?.() || []
226
224
  })]
227
225
  });
228
226
  if (nested) {
@@ -67,7 +67,7 @@ const getCssValue = (keys, value) => {
67
67
  return value;
68
68
  }
69
69
  const lastKey = keys[keys.length - 1];
70
- if (lastKey.toLowerCase().indexOf('opacity') >= 0) {
70
+ if (lastKey.toLowerCase().includes('opacity')) {
71
71
  // opacity values are unitless
72
72
  return value;
73
73
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.1.0
2
+ * @mui/system v6.1.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -215,14 +215,12 @@ export default function createCssVarsProvider(options) {
215
215
  shouldGenerateStyleSheet = false;
216
216
  }
217
217
  const element = /*#__PURE__*/_jsxs(React.Fragment, {
218
- children: [shouldGenerateStyleSheet && /*#__PURE__*/_jsx(React.Fragment, {
219
- children: (theme.generateStyleSheets?.() || []).map((styles, index) => /*#__PURE__*/_jsx(GlobalStyles, {
220
- styles: styles
221
- }, index))
222
- }), /*#__PURE__*/_jsx(ThemeProvider, {
218
+ children: [/*#__PURE__*/_jsx(ThemeProvider, {
223
219
  themeId: scopedTheme ? themeId : undefined,
224
220
  theme: resolveTheme ? resolveTheme(theme) : theme,
225
221
  children: children
222
+ }), shouldGenerateStyleSheet && /*#__PURE__*/_jsx(GlobalStyles, {
223
+ styles: theme.generateStyleSheets?.() || []
226
224
  })]
227
225
  });
228
226
  if (nested) {
@@ -67,7 +67,7 @@ const getCssValue = (keys, value) => {
67
67
  return value;
68
68
  }
69
69
  const lastKey = keys[keys.length - 1];
70
- if (lastKey.toLowerCase().indexOf('opacity') >= 0) {
70
+ if (lastKey.toLowerCase().includes('opacity')) {
71
71
  // opacity values are unitless
72
72
  return value;
73
73
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.1.0
2
+ * @mui/system v6.1.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
5
  import { getThemeProps } from "../useThemeProps/index.js";
6
6
  import useTheme from "../useThemeWithoutDefault/index.js";
7
+ // TODO React 17: Remove `useMediaQueryOld` once React 17 support is removed
7
8
  function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
8
9
  const [match, setMatch] = React.useState(() => {
9
10
  if (noSsr && matchMedia) {
@@ -34,8 +35,11 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
34
35
  return match;
35
36
  }
36
37
 
37
- // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
38
- const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
38
+ // See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
39
+ const safeReact = {
40
+ ...React
41
+ };
42
+ const maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;
39
43
  function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
40
44
  const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
41
45
  const getServerSnapshot = React.useMemo(() => {
@@ -89,8 +93,6 @@ export default function useMediaQuery(queryInput, options = {}) {
89
93
  }
90
94
  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
91
95
  query = query.replace(/^@media( ?)/m, '');
92
-
93
- // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
94
96
  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
95
97
  const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
96
98
  if (process.env.NODE_ENV !== 'production') {
@@ -1,6 +1,6 @@
1
- export const version = "6.1.0";
1
+ export const version = "6.1.1";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("1");
4
- export const patch = Number("0");
4
+ export const patch = Number("1");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -224,14 +224,12 @@ function createCssVarsProvider(options) {
224
224
  shouldGenerateStyleSheet = false;
225
225
  }
226
226
  const element = /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
227
- children: [shouldGenerateStyleSheet && /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
228
- children: (theme.generateStyleSheets?.() || []).map((styles, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
229
- styles: styles
230
- }, index))
231
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.default, {
227
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.default, {
232
228
  themeId: scopedTheme ? themeId : undefined,
233
229
  theme: resolveTheme ? resolveTheme(theme) : theme,
234
230
  children: children
231
+ }), shouldGenerateStyleSheet && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledEngine.GlobalStyles, {
232
+ styles: theme.generateStyleSheets?.() || []
235
233
  })]
236
234
  });
237
235
  if (nested) {
@@ -77,7 +77,7 @@ const getCssValue = (keys, value) => {
77
77
  return value;
78
78
  }
79
79
  const lastKey = keys[keys.length - 1];
80
- if (lastKey.toLowerCase().indexOf('opacity') >= 0) {
80
+ if (lastKey.toLowerCase().includes('opacity')) {
81
81
  // opacity values are unitless
82
82
  return value;
83
83
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/system v6.1.0
2
+ * @mui/system v6.1.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -11,6 +11,7 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
12
12
  var _useThemeProps = require("../useThemeProps");
13
13
  var _useThemeWithoutDefault = _interopRequireDefault(require("../useThemeWithoutDefault"));
14
+ // TODO React 17: Remove `useMediaQueryOld` once React 17 support is removed
14
15
  function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
15
16
  const [match, setMatch] = React.useState(() => {
16
17
  if (noSsr && matchMedia) {
@@ -41,8 +42,11 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
41
42
  return match;
42
43
  }
43
44
 
44
- // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
45
- const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
45
+ // See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
46
+ const safeReact = {
47
+ ...React
48
+ };
49
+ const maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;
46
50
  function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
47
51
  const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
48
52
  const getServerSnapshot = React.useMemo(() => {
@@ -96,8 +100,6 @@ function useMediaQuery(queryInput, options = {}) {
96
100
  }
97
101
  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
98
102
  query = query.replace(/^@media( ?)/m, '');
99
-
100
- // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
101
103
  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
102
104
  const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
103
105
  if (process.env.NODE_ENV !== 'production') {
@@ -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.0";
7
+ const version = exports.version = "6.1.1";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("1");
10
- const patch = exports.patch = Number("0");
10
+ const patch = exports.patch = Number("1");
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.0",
3
+ "version": "6.1.1",
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.",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/mui/material-ui.git",
16
+ "url": "git+https://github.com/mui/material-ui.git",
17
17
  "directory": "packages/mui-system"
18
18
  },
19
19
  "license": "MIT",
@@ -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.0",
34
- "@mui/styled-engine": "^6.1.0",
35
- "@mui/types": "^7.2.16",
36
- "@mui/utils": "^6.1.0"
33
+ "@mui/private-theming": "^6.1.1",
34
+ "@mui/styled-engine": "^6.1.1",
35
+ "@mui/utils": "^6.1.1",
36
+ "@mui/types": "^7.2.17"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@emotion/react": "^11.5.0",
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
5
  import { getThemeProps } from "../useThemeProps/index.js";
6
6
  import useTheme from "../useThemeWithoutDefault/index.js";
7
+ // TODO React 17: Remove `useMediaQueryOld` once React 17 support is removed
7
8
  function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
8
9
  const [match, setMatch] = React.useState(() => {
9
10
  if (noSsr && matchMedia) {
@@ -34,8 +35,11 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
34
35
  return match;
35
36
  }
36
37
 
37
- // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
38
- const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
38
+ // See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why
39
+ const safeReact = {
40
+ ...React
41
+ };
42
+ const maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;
39
43
  function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
40
44
  const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
41
45
  const getServerSnapshot = React.useMemo(() => {
@@ -89,8 +93,6 @@ export default function useMediaQuery(queryInput, options = {}) {
89
93
  }
90
94
  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
91
95
  query = query.replace(/^@media( ?)/m, '');
92
-
93
- // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
94
96
  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
95
97
  const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
96
98
  if (process.env.NODE_ENV !== 'production') {
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.1.0";
1
+ export const version = "6.1.1";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("1");
4
- export const patch = Number("0");
4
+ export const patch = Number("1");
5
5
  export const prerelease = undefined;
6
6
  export default version;