@mui/utils 9.2.0 → 9.3.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 +70 -3
- package/ClassNameGenerator/ClassNameGenerator.d.mts +2 -1
- package/ClassNameGenerator/ClassNameGenerator.d.ts +2 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -4
- package/useRovingTabIndex/useRovingTabIndex.d.mts +1 -1
- package/useRovingTabIndex/useRovingTabIndex.d.ts +1 -1
- package/useRovingTabIndex/useRovingTabIndex.js +4 -2
- package/useRovingTabIndex/useRovingTabIndex.mjs +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,88 @@
|
|
|
1
1
|
# [Versions](https://mui.com/material-ui/getting-started/versions/)
|
|
2
2
|
|
|
3
|
+
## 9.3.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.2.0..master -->
|
|
6
|
+
|
|
7
|
+
_Aug 4, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- ♿️ Keyboard navigation in the [Toggle Button Group](https://mui.com/material-ui/react-toggle-button/) now follows the roving tabindex pattern.
|
|
12
|
+
- ♿️ The [Autocomplete](https://mui.com/material-ui/react-autocomplete/) announces its loading and no options messages through a new `status` slot.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@9.3.0`
|
|
15
|
+
|
|
16
|
+
- [autocomplete] Wrap the no results and loading messages in an aria live region (#48690) @silviuaavram
|
|
17
|
+
- [buttongroup] Respect global disableRipple / disableFocusRipple in grouped buttons (#48762) @siriwatknp
|
|
18
|
+
- [checkbox][radio] Respect global disableRipple from MuiButtonBase defaultProps (#48795) @siriwatknp
|
|
19
|
+
- [formcontrollabel] Add missing `labelPlacementEnd` class (#48843) @siriwatknp
|
|
20
|
+
- [listitembutton] Fix typos in component code (#48868) @ZeeshanTamboli
|
|
21
|
+
- [menuitem] Add `aria-checked` for checkbox and radio menu items (#48651) @siriwatknp
|
|
22
|
+
- [modal] Replace custom findIndexOf with findIndex (#48827) @ZeeshanTamboli
|
|
23
|
+
- [modal][dialog] Fix scrollbar compensation in Shadow DOM (#48826) @ZeeshanTamboli
|
|
24
|
+
- [select] Fix endAdornment overlapping the open indicator (#48723) @siriwatknp
|
|
25
|
+
- [tablepagination] Add focus style to default InputBase used in Select (#48871) @silviuaavram
|
|
26
|
+
- [togglebuttongroup] Add roving tabindex keyboard navigation (#48849) @silviuaavram
|
|
27
|
+
|
|
28
|
+
### `@mui/system@9.3.0`
|
|
29
|
+
|
|
30
|
+
- Prevent prototype pollution in cssVarsParser (#48822) @Janpot
|
|
31
|
+
|
|
32
|
+
### `@mui/codemod@9.3.0`
|
|
33
|
+
|
|
34
|
+
- Don't leak state between files in v5.0.0/path-imports (#48797) @manbearwiz
|
|
35
|
+
- Remove use of eval() (#48701) @oliviertassinari
|
|
36
|
+
- Transform all style exports in `v5.0.0/path-imports` codemod (#48800) @manbearwiz
|
|
37
|
+
|
|
38
|
+
### Docs
|
|
39
|
+
|
|
40
|
+
- Clarify `container` prop inheritance for Shadow DOM (#48670) @Juan-C-Ceballos
|
|
41
|
+
- Clarify third-party script risk in CSP unsafe-inline note (#48787) @Janpot
|
|
42
|
+
- Document `box-sx-prop` codemod (#48888) @SR0725
|
|
43
|
+
- Document Grid direction column removal in v9 upgrade guide (#48880) @kalayciburak
|
|
44
|
+
- Fix color contrast in GitHub labels example (#48844) @silviuaavram
|
|
45
|
+
- Fix per-page canonical URL and stale SEO link (#48789) @brijeshb42
|
|
46
|
+
- Fix redirect loop on the Design Kits page (#48869) @Janpot
|
|
47
|
+
- Fix typo 'overriden' -> 'overridden' in CHANGELOG (#48785) @ZhouYinLong-lab
|
|
48
|
+
- Improve TransferList examples (#48845) @silviuaavram
|
|
49
|
+
- Link a new theme generator tool (#48847) @mansourcodes
|
|
50
|
+
- Remove broken learning resource links (#48598) @morning-verlu
|
|
51
|
+
- Update the 9.2.0 changelog (#48763) @silviuaavram
|
|
52
|
+
- [autocomplete] Clarify how to render custom start and end adornments (#48883) @DebadityaHait
|
|
53
|
+
- [drawer] Clarify clipped AppBar spacing (#48887) @rushijagani-dev
|
|
54
|
+
- [menu] Fix stale `selected` prop reference in Selected menu section (#48879) @LukasTy
|
|
55
|
+
- [skeleton] Document preserving typography sizing with custom border radius (#48596) @meaqua9420
|
|
56
|
+
|
|
57
|
+
### Core
|
|
58
|
+
|
|
59
|
+
- [blog] Fix caret annotation broken by Prettier wrapping (#48884) @bernardobelchior
|
|
60
|
+
- [code-infra] Automate team sync on about page (#48794) @brijeshb42
|
|
61
|
+
- [code-infra] Bump @mui/internal-code-infra to 0.0.4-canary.101 (#48878) @Janpot
|
|
62
|
+
- [code-infra] Fix Dependabot alerts (#48756) @Janpot
|
|
63
|
+
- [code-infra] Fix team sync PR creation (#48911) @brijeshb42
|
|
64
|
+
- [code-infra] Pin node version in publish CI (#48799) @brijeshb42
|
|
65
|
+
- [core-docs] Tighten service worker host check (#48581) @Janpot
|
|
66
|
+
- [docs-infra] Change branch name to the allowed one (#48910) @brijeshb42
|
|
67
|
+
|
|
68
|
+
All contributors of this release in alphabetical order: @bernardobelchior, @brijeshb42, @DebadityaHait, @Janpot, @Juan-C-Ceballos, @kalayciburak, @LukasTy, @manbearwiz, @mansourcodes, @meaqua9420, @morning-verlu, @oliviertassinari, @rushijagani-dev, @silviuaavram, @siriwatknp, @SR0725, @ZeeshanTamboli, @ZhouYinLong-lab
|
|
69
|
+
|
|
3
70
|
## 9.2.0
|
|
4
71
|
|
|
5
72
|
<!-- generated comparing v9.1.2..master -->
|
|
6
73
|
|
|
7
|
-
_Jul
|
|
74
|
+
_Jul 3, 2026_
|
|
8
75
|
|
|
9
76
|
A big thanks to the 9 contributors who made this release possible.
|
|
10
77
|
|
|
11
78
|
- ⚙️ Add support for [`data-*` attributes on `slotProps`](https://mui.com/material-ui/guides/typescript/#allowing-data-attributes-on-slotprops).
|
|
12
79
|
|
|
13
|
-
### `@mui/material@9.
|
|
80
|
+
### `@mui/material@9.2.0`
|
|
14
81
|
|
|
15
82
|
- [l10n] Add missing MuiPagination localization to zh-CN locale (#48741) @greymoth-jp
|
|
16
83
|
- [select] Guard display ref during mouse down (#48744) @michelengelen
|
|
17
84
|
|
|
18
|
-
### `@mui/utils@9.
|
|
85
|
+
### `@mui/utils@9.2.0`
|
|
19
86
|
|
|
20
87
|
- [utils] Add opt-in `DataAttributesOverrides` augmentation for slot props (#48554) @LukasTy
|
|
21
88
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
declare const defaultGenerator: (componentName: string) => string;
|
|
1
2
|
declare const ClassNameGenerator: {
|
|
2
|
-
configure(generator:
|
|
3
|
+
configure(generator: typeof defaultGenerator): void;
|
|
3
4
|
generate(componentName: string): string;
|
|
4
5
|
reset(): void;
|
|
5
6
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
declare const defaultGenerator: (componentName: string) => string;
|
|
1
2
|
declare const ClassNameGenerator: {
|
|
2
|
-
configure(generator:
|
|
3
|
+
configure(generator: typeof defaultGenerator): void;
|
|
3
4
|
generate(componentName: string): string;
|
|
4
5
|
reset(): void;
|
|
5
6
|
};
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Utility functions for React components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"url": "https://opencollective.com/mui-org"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@babel/runtime": "^7.29.
|
|
27
|
+
"@babel/runtime": "^7.29.7",
|
|
28
28
|
"@types/prop-types": "^15.7.15",
|
|
29
29
|
"clsx": "^2.1.1",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
|
-
"react-is": "^19.2.
|
|
32
|
-
"@mui/types": "^9.
|
|
31
|
+
"react-is": "^19.2.8",
|
|
32
|
+
"@mui/types": "^9.3.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -91,7 +91,7 @@ export interface UseRovingTabIndexReturnValue<Key = unknown> {
|
|
|
91
91
|
* Spread these props onto the list or composite root element that should listen for focus
|
|
92
92
|
* and keyboard events.
|
|
93
93
|
*/
|
|
94
|
-
getContainerProps: (ref?: React.Ref<HTMLElement>) => {
|
|
94
|
+
getContainerProps: (ref?: React.Ref<HTMLElement> | undefined, onFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined, onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) | undefined) => {
|
|
95
95
|
/**
|
|
96
96
|
* Keeps the active item in sync when focus moves onto one of the registered items.
|
|
97
97
|
*/
|
|
@@ -91,7 +91,7 @@ export interface UseRovingTabIndexReturnValue<Key = unknown> {
|
|
|
91
91
|
* Spread these props onto the list or composite root element that should listen for focus
|
|
92
92
|
* and keyboard events.
|
|
93
93
|
*/
|
|
94
|
-
getContainerProps: (ref?: React.Ref<HTMLElement>) => {
|
|
94
|
+
getContainerProps: (ref?: React.Ref<HTMLElement> | undefined, onFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined, onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) | undefined) => {
|
|
95
95
|
/**
|
|
96
96
|
* Keeps the active item in sync when focus moves onto one of the registered items.
|
|
97
97
|
*/
|
|
@@ -97,8 +97,9 @@ function useRovingTabIndexRoot(params) {
|
|
|
97
97
|
setActiveItemIdState(nextItem.id);
|
|
98
98
|
return nextItem;
|
|
99
99
|
}, [itemFilter]);
|
|
100
|
-
const getContainerProps = React.useCallback(ref => {
|
|
100
|
+
const getContainerProps = React.useCallback((ref, onFocusProp, onKeyDownProp) => {
|
|
101
101
|
const onFocus = event => {
|
|
102
|
+
onFocusProp?.(event);
|
|
102
103
|
const snapshot = getNavigableItemsSnapshot(itemMapRef.current);
|
|
103
104
|
const focusedIndex = findItemIndexByElement(snapshot, event.target);
|
|
104
105
|
if (focusedIndex !== -1) {
|
|
@@ -106,7 +107,8 @@ function useRovingTabIndexRoot(params) {
|
|
|
106
107
|
}
|
|
107
108
|
};
|
|
108
109
|
const onKeyDown = event => {
|
|
109
|
-
|
|
110
|
+
onKeyDownProp?.(event);
|
|
111
|
+
if (event.defaultPrevented || event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
|
|
110
112
|
return;
|
|
111
113
|
}
|
|
112
114
|
if (!SUPPORTED_KEYS.includes(event.key)) {
|
|
@@ -88,8 +88,9 @@ export function useRovingTabIndexRoot(params) {
|
|
|
88
88
|
setActiveItemIdState(nextItem.id);
|
|
89
89
|
return nextItem;
|
|
90
90
|
}, [itemFilter]);
|
|
91
|
-
const getContainerProps = React.useCallback(ref => {
|
|
91
|
+
const getContainerProps = React.useCallback((ref, onFocusProp, onKeyDownProp) => {
|
|
92
92
|
const onFocus = event => {
|
|
93
|
+
onFocusProp?.(event);
|
|
93
94
|
const snapshot = getNavigableItemsSnapshot(itemMapRef.current);
|
|
94
95
|
const focusedIndex = findItemIndexByElement(snapshot, event.target);
|
|
95
96
|
if (focusedIndex !== -1) {
|
|
@@ -97,7 +98,8 @@ export function useRovingTabIndexRoot(params) {
|
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
100
|
const onKeyDown = event => {
|
|
100
|
-
|
|
101
|
+
onKeyDownProp?.(event);
|
|
102
|
+
if (event.defaultPrevented || event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
|
|
101
103
|
return;
|
|
102
104
|
}
|
|
103
105
|
if (!SUPPORTED_KEYS.includes(event.key)) {
|