@mui/utils 9.0.0-beta.0 → 9.0.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,81 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 9.0.0
4
+
5
+ <!-- generated comparing v9.0.0-beta.1..master -->
6
+
7
+ _Apr 7, 2026_
8
+
9
+ A big thanks to the 7 contributors who made this release possible.
10
+
11
+ 🥳 We're excited to announce the stable release of Material UI v9! This major release focus on accessibility improvements, sx prop performance, and cleanup of deprecated APIs.
12
+
13
+ For more details, check out the [upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
14
+
15
+ ### `@mui/material@9.0.0`
16
+
17
+ - [slider] Use pointer events instead of mouse events (#48164) @mj12albert
18
+ - [switch] Add border to make it visible in high contrast mode (#48180) @silviuaavram
19
+ - [transitions] Performance improvements & misc fixes (#48151) @mj12albert
20
+ - Remove unnecessary overridesResolvers from styled components (#48204) @sai6855
21
+
22
+ ### Core
23
+
24
+ - [code-infra] Setup workflow to publish internal packages (#47952) @brijeshb42
25
+ - [core-docs] Add `x-scheduler` to `MuiProductId` type (#48185) @rita-codes
26
+ - [docs-infra] Add scheduler to product switcher (#48208) @rita-codes
27
+ - [internal] Prepare libraries for v9 stable release (#48206) @siriwatknp
28
+
29
+ All contributors of this release in alphabetical order: @brijeshb42, @mj12albert, @noraleonte, @rita-codes, @sai6855, @silviuaavram, @siriwatknp
30
+
31
+ ## 9.0.0-beta.1
32
+
33
+ <!-- generated comparing v9.0.0-beta.0..master -->
34
+
35
+ _Apr 2, 2026_
36
+
37
+ A big thanks to the 11 contributors who made this release possible.
38
+
39
+ ### `@mui/material@9.0.0-beta.1`
40
+
41
+ #### Breaking Changes
42
+
43
+ - [grid] Remove 'column' and 'column-reverse' options from `direction` prop (#47564) @sai6855
44
+ - [icons] Remove legacy `*Outline` icons (#48116) @mj12albert
45
+ - [list-item-icon] Use theme spacing instead of hardcoded minWidth (#46597) @adiitxa
46
+
47
+ #### Changes
48
+
49
+ - [all components] Fix `slotProps.transition` types (#48153) @mj12albert
50
+ - [alert][dialog] Accessibility improvements (#48113) @silviuaavram
51
+ - [autocomplete] Fix helper text focusing input when clicked (#48156) @mj12albert
52
+ - [button-base] Add `nativeButton` prop (#47989) @mj12albert
53
+ - [input] Fix high contrast cutoff on first character (#48150) @silviuaavram
54
+ - [menu] Fix empty roving focus container (#48114) @mj12albert
55
+ - [utils] Explicitly register roving tab items with parent (#48122) @mj12albert
56
+
57
+ ### Docs
58
+
59
+ - Fix HTML validation errors (#48107) @Janpot
60
+ - Fix duplicate IDs and HTML validation issues (#48095) @Janpot
61
+ - Fix the dark mode footer row shadow for the Data Grid on the advanced components page (#48149) @arminmeh
62
+ - Improve jsdom section (#48098) @oliviertassinari
63
+ - Update "Deprecated APIs removed" section to h2 in "Upgrade to v9" docs (#48115) @ZeeshanTamboli
64
+ - [docs][progress] Label all demo components (#48143) @mj12albert
65
+ - [docs-infra] Add x-scheduler to component API URL resolver (#48097) @rita-codes
66
+ - [docs-infra] Resolve some redirects (#48165) @Janpot
67
+ - [docs-infra] Update v9 Search Index (#48028) @dav-is
68
+
69
+ ### Core
70
+
71
+ - [code-infra] Discover exports for bundle size report (#48170) @Janpot
72
+ - [internal] Fix use of ellipsis (#48096) @oliviertassinari
73
+ - [test] Add screenshot test for Virtualized Table (#47947) @mnajdova
74
+ - [test] Remove `componentsProp` from `describeConformance` tests (#48142) @ZeeshanTamboli
75
+ - [theme] Do not create channel tokens for custom colors when `nativeColor` is used (#47765) @ZeeshanTamboli
76
+
77
+ All contributors of this release in alphabetical order: @adiitxa, @arminmeh, @dav-is, @Janpot, @mj12albert, @mnajdova, @oliviertassinari, @rita-codes, @sai6855, @silviuaavram, @ZeeshanTamboli
78
+
3
79
  ## 9.0.0-beta.0
4
80
 
5
81
  <!-- generated comparing v9.0.0-alpha.4..master -->
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Fast shallow compare for plain objects.
3
+ * Returns `true` when both objects have the same own enumerable keys and each value is equal
4
+ * according to `Object.is()`.
5
+ */
6
+ export default function fastObjectShallowCompare<T extends Record<string, any> | null>(a: T, b: T): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Fast shallow compare for plain objects.
3
+ * Returns `true` when both objects have the same own enumerable keys and each value is equal
4
+ * according to `Object.is()`.
5
+ */
6
+ export default function fastObjectShallowCompare<T extends Record<string, any> | null>(a: T, b: T): boolean;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = fastObjectShallowCompare;
7
+ // From mui-x: https://github.com/mui/mui-x/blob/bb92fb0adac6764461adea9a9d7d43f1095f49e5/packages/x-internals/src/fastObjectShallowCompare/fastObjectShallowCompare.ts
8
+ /* eslint-disable guard-for-in */
9
+
10
+ const is = Object.is;
11
+
12
+ /**
13
+ * Fast shallow compare for plain objects.
14
+ * Returns `true` when both objects have the same own enumerable keys and each value is equal
15
+ * according to `Object.is()`.
16
+ */
17
+ function fastObjectShallowCompare(a, b) {
18
+ if (a === b) {
19
+ return true;
20
+ }
21
+ if (!(a instanceof Object) || !(b instanceof Object)) {
22
+ return false;
23
+ }
24
+ let aLength = 0;
25
+ let bLength = 0;
26
+ for (const key in a) {
27
+ aLength += 1;
28
+ if (!is(a[key], b[key])) {
29
+ return false;
30
+ }
31
+ if (!(key in b)) {
32
+ return false;
33
+ }
34
+ }
35
+
36
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
37
+ for (const _ in b) {
38
+ bLength += 1;
39
+ }
40
+ return aLength === bLength;
41
+ }
@@ -0,0 +1,35 @@
1
+ // From mui-x: https://github.com/mui/mui-x/blob/bb92fb0adac6764461adea9a9d7d43f1095f49e5/packages/x-internals/src/fastObjectShallowCompare/fastObjectShallowCompare.ts
2
+ /* eslint-disable guard-for-in */
3
+
4
+ const is = Object.is;
5
+
6
+ /**
7
+ * Fast shallow compare for plain objects.
8
+ * Returns `true` when both objects have the same own enumerable keys and each value is equal
9
+ * according to `Object.is()`.
10
+ */
11
+ export default function fastObjectShallowCompare(a, b) {
12
+ if (a === b) {
13
+ return true;
14
+ }
15
+ if (!(a instanceof Object) || !(b instanceof Object)) {
16
+ return false;
17
+ }
18
+ let aLength = 0;
19
+ let bLength = 0;
20
+ for (const key in a) {
21
+ aLength += 1;
22
+ if (!is(a[key], b[key])) {
23
+ return false;
24
+ }
25
+ if (!(key in b)) {
26
+ return false;
27
+ }
28
+ }
29
+
30
+ // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars
31
+ for (const _ in b) {
32
+ bLength += 1;
33
+ }
34
+ return aLength === bLength;
35
+ }
@@ -0,0 +1 @@
1
+ export { default } from "./fastObjectShallowCompare.mjs";
@@ -0,0 +1 @@
1
+ export { default } from "./fastObjectShallowCompare.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 _fastObjectShallowCompare.default;
11
+ }
12
+ });
13
+ var _fastObjectShallowCompare = _interopRequireDefault(require("./fastObjectShallowCompare"));
@@ -0,0 +1 @@
1
+ export { default } from "./fastObjectShallowCompare.mjs";
package/index.d.mts CHANGED
@@ -15,6 +15,7 @@ export { default as unstable_createChainedFunction } from "./createChainedFuncti
15
15
  export { default as unstable_debounce } from "./debounce/index.mjs";
16
16
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
17
17
  export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
18
+ export { default as unstable_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.mjs";
18
19
  export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
19
20
  export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
20
21
  export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
@@ -51,5 +52,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
51
52
  export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.mjs";
52
53
  export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.mjs";
53
54
  export { default as unstable_getReactElementRef } from "./getReactElementRef/index.mjs";
54
- export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.mjs";
55
55
  export * from "./types/index.mjs";
package/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { default as unstable_createChainedFunction } from "./createChainedFuncti
15
15
  export { default as unstable_debounce } from "./debounce/index.js";
16
16
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.js";
17
17
  export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.js";
18
+ export { default as unstable_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.js";
18
19
  export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.js";
19
20
  export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
20
21
  export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
@@ -51,5 +52,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
51
52
  export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.js";
52
53
  export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.js";
53
54
  export { default as unstable_getReactElementRef } from "./getReactElementRef/index.js";
54
- export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.js";
55
55
  export * from "./types/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.0.0-beta.0
2
+ * @mui/utils v9.0.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -30,6 +30,7 @@ var _exportNames = {
30
30
  unstable_debounce: true,
31
31
  unstable_deprecatedPropType: true,
32
32
  unstable_fastDeepAssign: true,
33
+ unstable_fastObjectShallowCompare: true,
33
34
  unstable_isObjectEmpty: true,
34
35
  unstable_isMuiElement: true,
35
36
  unstable_ownerDocument: true,
@@ -64,8 +65,7 @@ var _exportNames = {
64
65
  unstable_resolveComponentProps: true,
65
66
  unstable_extractEventHandlers: true,
66
67
  unstable_getReactNodeRef: true,
67
- unstable_getReactElementRef: true,
68
- unstable_useRovingTabIndex: true
68
+ unstable_getReactElementRef: true
69
69
  };
70
70
  Object.defineProperty(exports, "HTMLElementType", {
71
71
  enumerable: true,
@@ -211,6 +211,12 @@ Object.defineProperty(exports, "unstable_fastDeepAssign", {
211
211
  return _fastDeepAssign.default;
212
212
  }
213
213
  });
214
+ Object.defineProperty(exports, "unstable_fastObjectShallowCompare", {
215
+ enumerable: true,
216
+ get: function () {
217
+ return _fastObjectShallowCompare.default;
218
+ }
219
+ });
214
220
  Object.defineProperty(exports, "unstable_generateUtilityClass", {
215
221
  enumerable: true,
216
222
  get: function () {
@@ -355,12 +361,6 @@ Object.defineProperty(exports, "unstable_useOnMount", {
355
361
  return _useOnMount.default;
356
362
  }
357
363
  });
358
- Object.defineProperty(exports, "unstable_useRovingTabIndex", {
359
- enumerable: true,
360
- get: function () {
361
- return _useRovingTabIndex.default;
362
- }
363
- });
364
364
  Object.defineProperty(exports, "unstable_useSlotProps", {
365
365
  enumerable: true,
366
366
  get: function () {
@@ -401,6 +401,7 @@ var _createChainedFunction = _interopRequireDefault(require("./createChainedFunc
401
401
  var _debounce = _interopRequireDefault(require("./debounce"));
402
402
  var _deprecatedPropType = _interopRequireDefault(require("./deprecatedPropType"));
403
403
  var _fastDeepAssign = _interopRequireDefault(require("./fastDeepAssign"));
404
+ var _fastObjectShallowCompare = _interopRequireDefault(require("./fastObjectShallowCompare"));
404
405
  var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
405
406
  var _isMuiElement = _interopRequireDefault(require("./isMuiElement"));
406
407
  var _ownerDocument = _interopRequireDefault(require("./ownerDocument"));
@@ -445,7 +446,6 @@ var _resolveComponentProps = _interopRequireDefault(require("./resolveComponentP
445
446
  var _extractEventHandlers = _interopRequireDefault(require("./extractEventHandlers"));
446
447
  var _getReactNodeRef = _interopRequireDefault(require("./getReactNodeRef"));
447
448
  var _getReactElementRef = _interopRequireDefault(require("./getReactElementRef"));
448
- var _useRovingTabIndex = _interopRequireDefault(require("./useRovingTabIndex"));
449
449
  var _types = require("./types");
450
450
  Object.keys(_types).forEach(function (key) {
451
451
  if (key === "default" || key === "__esModule") return;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v9.0.0-beta.0
2
+ * @mui/utils v9.0.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -22,6 +22,7 @@ export { default as unstable_createChainedFunction } from "./createChainedFuncti
22
22
  export { default as unstable_debounce } from "./debounce/index.mjs";
23
23
  export { default as unstable_deprecatedPropType } from "./deprecatedPropType/index.mjs";
24
24
  export { default as unstable_fastDeepAssign } from "./fastDeepAssign/index.mjs";
25
+ export { default as unstable_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.mjs";
25
26
  export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
26
27
  export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
27
28
  export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
@@ -57,5 +58,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
57
58
  export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.mjs";
58
59
  export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.mjs";
59
60
  export { default as unstable_getReactElementRef } from "./getReactElementRef/index.mjs";
60
- export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.mjs";
61
61
  export * from "./types/index.mjs";
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@mui/utils",
3
- "version": "9.0.0-beta.0",
3
+ "version": "9.0.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Utility functions for React components.",
6
+ "license": "MIT",
6
7
  "keywords": [
7
8
  "react",
8
9
  "react-component",
@@ -14,7 +15,6 @@
14
15
  "url": "git+https://github.com/mui/material-ui.git",
15
16
  "directory": "packages/mui-utils"
16
17
  },
17
- "license": "MIT",
18
18
  "bugs": {
19
19
  "url": "https://github.com/mui/material-ui/issues"
20
20
  },
@@ -29,7 +29,7 @@
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-beta.0"
32
+ "@mui/types": "^9.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
@@ -288,6 +288,20 @@
288
288
  "default": "./fastDeepAssign/index.mjs"
289
289
  }
290
290
  },
291
+ "./fastObjectShallowCompare": {
292
+ "import": {
293
+ "types": "./fastObjectShallowCompare/index.d.mts",
294
+ "default": "./fastObjectShallowCompare/index.mjs"
295
+ },
296
+ "require": {
297
+ "types": "./fastObjectShallowCompare/index.d.ts",
298
+ "default": "./fastObjectShallowCompare/index.js"
299
+ },
300
+ "default": {
301
+ "types": "./fastObjectShallowCompare/index.d.mts",
302
+ "default": "./fastObjectShallowCompare/index.mjs"
303
+ }
304
+ },
291
305
  "./formatMuiErrorMessage": {
292
306
  "import": {
293
307
  "types": "./formatMuiErrorMessage/index.d.mts",
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { UseRovingTabIndexReturnValue } from "./useRovingTabIndex.mjs";
3
+ type RovingTabIndexContextValue = UseRovingTabIndexReturnValue<unknown>;
4
+ export declare const RovingTabIndexContext: React.Context<RovingTabIndexContextValue | undefined>;
5
+ export declare function useRovingTabIndexContext(): RovingTabIndexContextValue;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { UseRovingTabIndexReturnValue } from "./useRovingTabIndex.js";
3
+ type RovingTabIndexContextValue = UseRovingTabIndexReturnValue<unknown>;
4
+ export declare const RovingTabIndexContext: React.Context<RovingTabIndexContextValue | undefined>;
5
+ export declare function useRovingTabIndexContext(): RovingTabIndexContextValue;
6
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.RovingTabIndexContext = void 0;
9
+ exports.useRovingTabIndexContext = useRovingTabIndexContext;
10
+ var React = _interopRequireWildcard(require("react"));
11
+ const RovingTabIndexContext = exports.RovingTabIndexContext = /*#__PURE__*/React.createContext(undefined);
12
+ if (process.env.NODE_ENV !== 'production') {
13
+ RovingTabIndexContext.displayName = 'RovingTabIndexContext';
14
+ }
15
+ function useRovingTabIndexContext() {
16
+ const context = React.useContext(RovingTabIndexContext);
17
+ if (context === undefined) {
18
+ throw new Error('MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.');
19
+ }
20
+ return context;
21
+ }
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ export const RovingTabIndexContext = /*#__PURE__*/React.createContext(undefined);
5
+ if (process.env.NODE_ENV !== 'production') {
6
+ RovingTabIndexContext.displayName = 'RovingTabIndexContext';
7
+ }
8
+ export function useRovingTabIndexContext() {
9
+ const context = React.useContext(RovingTabIndexContext);
10
+ if (context === undefined) {
11
+ throw new Error('MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.');
12
+ }
13
+ return context;
14
+ }
@@ -1 +1,2 @@
1
- export { default } from "./useRovingTabIndex.mjs";
1
+ export * from "./RovingTabIndexContext.mjs";
2
+ export * from "./useRovingTabIndex.mjs";
@@ -1 +1,2 @@
1
- export { default } from "./useRovingTabIndex.js";
1
+ export * from "./RovingTabIndexContext.js";
2
+ export * from "./useRovingTabIndex.js";
@@ -1,13 +1,27 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _useRovingTabIndex.default;
11
- }
6
+ var _RovingTabIndexContext = require("./RovingTabIndexContext");
7
+ Object.keys(_RovingTabIndexContext).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _RovingTabIndexContext[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _RovingTabIndexContext[key];
14
+ }
15
+ });
12
16
  });
13
- var _useRovingTabIndex = _interopRequireDefault(require("./useRovingTabIndex"));
17
+ var _useRovingTabIndex = require("./useRovingTabIndex");
18
+ Object.keys(_useRovingTabIndex).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _useRovingTabIndex[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _useRovingTabIndex[key];
25
+ }
26
+ });
27
+ });
@@ -1 +1,2 @@
1
- export { default } from "./useRovingTabIndex.mjs";
1
+ export * from "./RovingTabIndexContext.mjs";
2
+ export * from "./useRovingTabIndex.mjs";