@mui/utils 9.0.0-alpha.4 → 9.0.0-beta.0

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,62 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 9.0.0-beta.0
4
+
5
+ <!-- generated comparing v9.0.0-alpha.4..master -->
6
+
7
+ _Mar 25, 2026_
8
+
9
+ A big thanks to the 8 contributors who made this release possible.
10
+
11
+ ### `@mui/material@9.0.0-beta.0`
12
+
13
+ #### Breaking Changes
14
+
15
+ - [linear-progress] Remove deprecated CSS classes (#48068) @mj12albert
16
+ - [list-item, list-item-text] Remove deprecated props (#48042) @siriwatknp
17
+ - [button-group] Remove deprecated classes (#48043) @siriwatknp
18
+ - [card] Remove deprecated CardHeader props (#47995) @silviuaavram
19
+ - [checkbox][radio][switch] Remove deprecated inputProps and inputRef (#48059) @siriwatknp
20
+ - [chip] Remove deprecated classes (#48046) @silviuaavram
21
+ - [dialog][modal][drawer][swipeabledrawer] Remove deprecated props and classes (#48039) @silviuaavram
22
+ - [divider] Remove deprecated CSS classes (#48075) @siriwatknp
23
+ - [drawer] Remove deprecated CSS classes (#48077) @siriwatknp
24
+ - [image-list-item-bar] Remove deprecated CSS classes (#48064) @siriwatknp
25
+ - [inputs] Remove deprecated props & classes (#48071) @mj12albert
26
+ - [material-ui] Remove unnecessary overridesResolvers from styled components (#48082) @ZeeshanTamboli
27
+ - [material-ui][system] Remove deprecated system props from Box, Stack, Typography (#48072) @siriwatknp
28
+ - [pagination-item] Remove deprecated CSS classes (#48076) @siriwatknp
29
+ - [pagination-item] Remove deprecated props (#48038) @siriwatknp
30
+ - [rating] Remove deprecated IconContainerComponent (#48019) @siriwatknp
31
+ - [select] Remove deprecated CSS classes (#48065) @mj12albert
32
+ - [slider] Remove deprecated CSS classes (#48074) @siriwatknp
33
+ - [step-connector][step-content][step-label] Remove deprecated props and classes (#48058) @siriwatknp
34
+ - [tabs][tab] Remove deprecated CSS classes (#48078) @siriwatknp
35
+ - [table-pagination][table-sort-label] Remove deprecated props and classes (#48060) @siriwatknp
36
+ - [toggle-button-group] Remove deprecated classes (#48061) @siriwatknp
37
+
38
+ #### Changes
39
+
40
+ - [system] Improve performance when using sx prop (#44254) @romgrk
41
+
42
+ ### `@mui/codemod@9.0.0-beta.0`
43
+
44
+ - [codemod] Add missing codemod links in upgrade guide (#48069) @silviuaavram
45
+
46
+ ### Docs
47
+
48
+ - Mention all breaking changes in changelog (#48091) @silviuaavram
49
+ - Fix link to upgrade-to-v9 docs in release CHANGELOG (#48081) @ZeeshanTamboli
50
+
51
+ ### Core
52
+
53
+ - Update browserslistrc (#48085) @silviuaavram
54
+ - [code-infra] Prevent major version updates of bundler/framework packages in bundling fixtures (#48062) @Copilot
55
+ - [code-infra][icons-material] Avoid material utils barrel in createSvgIcon (#48029) @anchmelev
56
+ - [docs-infra] Migrate more leaf components to mui-docs (#48018) @brijeshb42
57
+
58
+ All contributors of this release in alphabetical order: @anchmelev, @brijeshb42, @Copilot, @mj12albert, @romgrk, @silviuaavram, @siriwatknp, @ZeeshanTamboli
59
+
3
60
  ## 9.0.0-alpha.4
4
61
 
5
62
  <!-- generated comparing v9.0.0-alpha.3..master -->
@@ -118,7 +175,7 @@ A big thanks to the 11 contributors who made this release possible.
118
175
  - [tablepagination] Format pagination numbers according to locale (#47803) @siriwatknp
119
176
  - [textfield] Use non-native label for `<TextField select/>` (#47958) @mj12albert
120
177
 
121
- Check out the [v9 upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
178
+ Check out the [v9 upgrade guide](https://next.mui.com/material-ui/migration/upgrade-to-v9/).
122
179
 
123
180
  #### Changes
124
181
 
@@ -167,11 +224,16 @@ A big thanks to the 10 contributors who made this release possible. Here are som
167
224
 
168
225
  ### `@mui/material@9.0.0-alpha.3`
169
226
 
227
+ #### Breaking Changes
228
+
229
+ - [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
230
+
231
+ #### Changes
232
+
170
233
  - [autocomplete] Add `root` slot (#47852) @GerardasB
171
234
  - [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
172
235
  - [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
173
236
  - [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
174
- - [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
175
237
 
176
238
  ### Docs
177
239
 
@@ -229,16 +291,21 @@ A big thanks to the 13 contributors who made this release possible. Here are som
229
291
 
230
292
  ### @mui/material@9.0.0-alpha.1
231
293
 
294
+ #### Breaking Changes
295
+
232
296
  - [Autocomplete] Prevents Autocomplete menu from opening on right click (#47797) @silviuaavram
233
297
  - [Backdrop] Remove aria-hidden by default (#47798) @silviuaavram
234
298
  - [ButtonBase] Ensure that onClick propagates when non-native button is clicked (#47800) @silviuaavram
235
299
  - [Dialog][Modal] Remove `disableEscapeKeyDown` prop (#47695) @silviuaavram
236
300
  - [Grid] Remove system props support (#47846) @siriwatknp
237
- - [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
238
301
  - [theme] Remove MuiTouchRipple from theme component types (#47849) @siriwatknp
239
- - [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
240
302
  - [useAutocomplete] Improve isOptionEqualToValue value argument type (#47801) @silviuaavram
241
303
 
304
+ #### Changes
305
+
306
+ - [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
307
+ - [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
308
+
242
309
  ### Docs
243
310
 
244
311
  - [docs] Add updated community theme resource (#47847) @PeterTYLiu
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Assigns props from one object to another. Focused on performance, only normal objects with no
3
+ * prototype are supported.
4
+ */
5
+ export default function fastDeepAssign<T extends Record<string, any>>(target: T, source: any): any;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Assigns props from one object to another. Focused on performance, only normal objects with no
3
+ * prototype are supported.
4
+ */
5
+ export default function fastDeepAssign<T extends Record<string, any>>(target: T, source: any): any;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = fastDeepAssign;
7
+ // Based on https://github.com/TehShrike/deepmerge
8
+ // Based on https://github.com/fastify/deepmerge
9
+ // MIT License
10
+ // Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge
11
+
12
+ /* eslint-disable guard-for-in */
13
+ /* eslint-disable no-else-return */
14
+
15
+ /**
16
+ * Assigns props from one object to another. Focused on performance, only normal objects with no
17
+ * prototype are supported.
18
+ */
19
+ function fastDeepAssign(target, source) {
20
+ const sourceIsArray = Array.isArray(source);
21
+ const targetIsArray = Array.isArray(target);
22
+ if (isPrimitive(source)) {
23
+ return source;
24
+ } else if (isPrimitiveOrBuiltIn(target)) {
25
+ return clone(source);
26
+ } else if (sourceIsArray && targetIsArray) {
27
+ return mergeArray(target, source);
28
+ } else if (sourceIsArray !== targetIsArray) {
29
+ return clone(source);
30
+ } else {
31
+ return mergeObject(target, source);
32
+ }
33
+ }
34
+ function cloneArray(value) {
35
+ let i = 0;
36
+ const il = value.length;
37
+ const result = new Array(il);
38
+ for (i = 0; i < il; i += 1) {
39
+ result[i] = clone(value[i]);
40
+ }
41
+ return result;
42
+ }
43
+ function cloneObject(target) {
44
+ const result = {};
45
+ for (const key in target) {
46
+ result[key] = clone(target[key]);
47
+ }
48
+ return result;
49
+ }
50
+ function mergeArray(target, source) {
51
+ const tl = target.length;
52
+ for (let i = 0; i < source.length; i += 1) {
53
+ target[tl + i] = clone(source[i]);
54
+ }
55
+ return target;
56
+ }
57
+ function isMergeableObject(value) {
58
+ return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
59
+ }
60
+ function isPrimitive(value) {
61
+ return typeof value !== 'object' || value === null;
62
+ }
63
+ function isPrimitiveOrBuiltIn(value) {
64
+ return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;
65
+ }
66
+ function clone(entry) {
67
+ // eslint-disable-next-line no-nested-ternary
68
+ return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
69
+ }
70
+ function mergeObject(target, source) {
71
+ for (const key in source) {
72
+ if (key in target) {
73
+ target[key] = fastDeepAssign(target[key], source[key]);
74
+ } else {
75
+ target[key] = clone(source[key]);
76
+ }
77
+ }
78
+ return target;
79
+ }
@@ -0,0 +1,73 @@
1
+ // Based on https://github.com/TehShrike/deepmerge
2
+ // Based on https://github.com/fastify/deepmerge
3
+ // MIT License
4
+ // Copyright (c) 2012 - 2022 James Halliday, Josh Duff, and other contributors of deepmerge
5
+
6
+ /* eslint-disable guard-for-in */
7
+ /* eslint-disable no-else-return */
8
+
9
+ /**
10
+ * Assigns props from one object to another. Focused on performance, only normal objects with no
11
+ * prototype are supported.
12
+ */
13
+ export default function fastDeepAssign(target, source) {
14
+ const sourceIsArray = Array.isArray(source);
15
+ const targetIsArray = Array.isArray(target);
16
+ if (isPrimitive(source)) {
17
+ return source;
18
+ } else if (isPrimitiveOrBuiltIn(target)) {
19
+ return clone(source);
20
+ } else if (sourceIsArray && targetIsArray) {
21
+ return mergeArray(target, source);
22
+ } else if (sourceIsArray !== targetIsArray) {
23
+ return clone(source);
24
+ } else {
25
+ return mergeObject(target, source);
26
+ }
27
+ }
28
+ function cloneArray(value) {
29
+ let i = 0;
30
+ const il = value.length;
31
+ const result = new Array(il);
32
+ for (i = 0; i < il; i += 1) {
33
+ result[i] = clone(value[i]);
34
+ }
35
+ return result;
36
+ }
37
+ function cloneObject(target) {
38
+ const result = {};
39
+ for (const key in target) {
40
+ result[key] = clone(target[key]);
41
+ }
42
+ return result;
43
+ }
44
+ function mergeArray(target, source) {
45
+ const tl = target.length;
46
+ for (let i = 0; i < source.length; i += 1) {
47
+ target[tl + i] = clone(source[i]);
48
+ }
49
+ return target;
50
+ }
51
+ function isMergeableObject(value) {
52
+ return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
53
+ }
54
+ function isPrimitive(value) {
55
+ return typeof value !== 'object' || value === null;
56
+ }
57
+ function isPrimitiveOrBuiltIn(value) {
58
+ return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date;
59
+ }
60
+ function clone(entry) {
61
+ // eslint-disable-next-line no-nested-ternary
62
+ return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
63
+ }
64
+ function mergeObject(target, source) {
65
+ for (const key in source) {
66
+ if (key in target) {
67
+ target[key] = fastDeepAssign(target[key], source[key]);
68
+ } else {
69
+ target[key] = clone(source[key]);
70
+ }
71
+ }
72
+ return target;
73
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./fastDeepAssign.mjs";
@@ -0,0 +1 @@
1
+ export { default } from "./fastDeepAssign.js";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _fastDeepAssign.default;
11
+ }
12
+ });
13
+ var _fastDeepAssign = _interopRequireDefault(require("./fastDeepAssign"));
@@ -0,0 +1 @@
1
+ export { default } from "./fastDeepAssign.mjs";
package/index.d.mts CHANGED
@@ -14,6 +14,8 @@ export { default as unstable_capitalize } from "./capitalize/index.mjs";
14
14
  export { default as unstable_createChainedFunction } from "./createChainedFunction/index.mjs";
15
15
  export { default as unstable_debounce } from "./debounce/index.mjs";
16
16
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
17
+ export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
18
+ export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
17
19
  export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
18
20
  export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
19
21
  export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
package/index.d.ts CHANGED
@@ -14,6 +14,8 @@ export { default as unstable_capitalize } from "./capitalize/index.js";
14
14
  export { default as unstable_createChainedFunction } from "./createChainedFunction/index.js";
15
15
  export { default as unstable_debounce } from "./debounce/index.js";
16
16
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.js";
17
+ export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.js";
18
+ export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.js";
17
19
  export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
18
20
  export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
19
21
  export { default as unstable_ownerWindow } from "./ownerWindow/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.0.0-alpha.4
2
+ * @mui/utils v9.0.0-beta.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -29,6 +29,8 @@ var _exportNames = {
29
29
  unstable_createChainedFunction: true,
30
30
  unstable_debounce: true,
31
31
  unstable_deprecatedPropType: true,
32
+ unstable_fastDeepAssign: true,
33
+ unstable_isObjectEmpty: true,
32
34
  unstable_isMuiElement: true,
33
35
  unstable_ownerDocument: true,
34
36
  unstable_ownerWindow: true,
@@ -203,6 +205,12 @@ Object.defineProperty(exports, "unstable_extractEventHandlers", {
203
205
  return _extractEventHandlers.default;
204
206
  }
205
207
  });
208
+ Object.defineProperty(exports, "unstable_fastDeepAssign", {
209
+ enumerable: true,
210
+ get: function () {
211
+ return _fastDeepAssign.default;
212
+ }
213
+ });
206
214
  Object.defineProperty(exports, "unstable_generateUtilityClass", {
207
215
  enumerable: true,
208
216
  get: function () {
@@ -257,6 +265,12 @@ Object.defineProperty(exports, "unstable_isMuiElement", {
257
265
  return _isMuiElement.default;
258
266
  }
259
267
  });
268
+ Object.defineProperty(exports, "unstable_isObjectEmpty", {
269
+ enumerable: true,
270
+ get: function () {
271
+ return _isObjectEmpty.default;
272
+ }
273
+ });
260
274
  Object.defineProperty(exports, "unstable_ownerDocument", {
261
275
  enumerable: true,
262
276
  get: function () {
@@ -386,6 +400,8 @@ var _capitalize = _interopRequireDefault(require("./capitalize"));
386
400
  var _createChainedFunction = _interopRequireDefault(require("./createChainedFunction"));
387
401
  var _debounce = _interopRequireDefault(require("./debounce"));
388
402
  var _deprecatedPropType = _interopRequireDefault(require("./deprecatedPropType"));
403
+ var _fastDeepAssign = _interopRequireDefault(require("./fastDeepAssign"));
404
+ var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
389
405
  var _isMuiElement = _interopRequireDefault(require("./isMuiElement"));
390
406
  var _ownerDocument = _interopRequireDefault(require("./ownerDocument"));
391
407
  var _ownerWindow = _interopRequireDefault(require("./ownerWindow"));
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.0.0-alpha.4
2
+ * @mui/utils v9.0.0-beta.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -21,6 +21,8 @@ export { default as unstable_capitalize } from "./capitalize/index.mjs";
21
21
  export { default as unstable_createChainedFunction } from "./createChainedFunction/index.mjs";
22
22
  export { default as unstable_debounce } from "./debounce/index.mjs";
23
23
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
24
+ export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
25
+ export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
24
26
  export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
25
27
  export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
26
28
  export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
@@ -0,0 +1 @@
1
+ export { default } from "./isObjectEmpty.mjs";
@@ -0,0 +1 @@
1
+ export { default } from "./isObjectEmpty.js";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _isObjectEmpty.default;
11
+ }
12
+ });
13
+ var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
@@ -0,0 +1 @@
1
+ export { default } from "./isObjectEmpty.mjs";
@@ -0,0 +1 @@
1
+ export default function isObjectEmpty(object: any): boolean;
@@ -0,0 +1 @@
1
+ export default function isObjectEmpty(object: any): boolean;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = isObjectEmpty;
7
+ function isObjectEmpty(object) {
8
+ if (object == null) {
9
+ return true;
10
+ }
11
+ // eslint-disable-next-line
12
+ for (const _ in object) {
13
+ return false;
14
+ }
15
+ return true;
16
+ }
@@ -0,0 +1,10 @@
1
+ export default function isObjectEmpty(object) {
2
+ if (object == null) {
3
+ return true;
4
+ }
5
+ // eslint-disable-next-line
6
+ for (const _ in object) {
7
+ return false;
8
+ }
9
+ return true;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/utils",
3
- "version": "9.0.0-alpha.4",
3
+ "version": "9.0.0-beta.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Utility functions for React components.",
6
6
  "keywords": [
@@ -24,12 +24,12 @@
24
24
  "url": "https://opencollective.com/mui-org"
25
25
  },
26
26
  "dependencies": {
27
- "@babel/runtime": "^7.28.6",
27
+ "@babel/runtime": "^7.29.2",
28
28
  "@types/prop-types": "^15.7.15",
29
29
  "clsx": "^2.1.1",
30
30
  "prop-types": "^15.8.1",
31
31
  "react-is": "^19.2.4",
32
- "@mui/types": "^9.0.0-alpha.3"
32
+ "@mui/types": "^9.0.0-beta.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
@@ -274,6 +274,20 @@
274
274
  "default": "./extractEventHandlers/index.mjs"
275
275
  }
276
276
  },
277
+ "./fastDeepAssign": {
278
+ "import": {
279
+ "types": "./fastDeepAssign/index.d.mts",
280
+ "default": "./fastDeepAssign/index.mjs"
281
+ },
282
+ "require": {
283
+ "types": "./fastDeepAssign/index.d.ts",
284
+ "default": "./fastDeepAssign/index.js"
285
+ },
286
+ "default": {
287
+ "types": "./fastDeepAssign/index.d.mts",
288
+ "default": "./fastDeepAssign/index.mjs"
289
+ }
290
+ },
277
291
  "./formatMuiErrorMessage": {
278
292
  "import": {
279
293
  "types": "./formatMuiErrorMessage/index.d.mts",
@@ -456,6 +470,20 @@
456
470
  "default": "./isMuiElement/index.mjs"
457
471
  }
458
472
  },
473
+ "./isObjectEmpty": {
474
+ "import": {
475
+ "types": "./isObjectEmpty/index.d.mts",
476
+ "default": "./isObjectEmpty/index.mjs"
477
+ },
478
+ "require": {
479
+ "types": "./isObjectEmpty/index.d.ts",
480
+ "default": "./isObjectEmpty/index.js"
481
+ },
482
+ "default": {
483
+ "types": "./isObjectEmpty/index.d.mts",
484
+ "default": "./isObjectEmpty/index.mjs"
485
+ }
486
+ },
459
487
  "./mergeSlotProps": {
460
488
  "import": {
461
489
  "types": "./mergeSlotProps/index.d.mts",