@mui/utils 7.3.5 → 7.3.6
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 +87 -0
- package/esm/getActiveElement/getActiveElement.d.ts +20 -0
- package/esm/getActiveElement/getActiveElement.js +26 -0
- package/esm/getActiveElement/index.d.ts +1 -0
- package/esm/getActiveElement/index.js +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/getActiveElement/getActiveElement.d.ts +20 -0
- package/getActiveElement/getActiveElement.js +32 -0
- package/getActiveElement/index.d.ts +1 -0
- package/getActiveElement/index.js +13 -0
- package/index.d.ts +1 -0
- package/index.js +9 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 7.3.6
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v7.3.5..master -->
|
|
6
|
+
|
|
7
|
+
_Dec 3, 2025_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 22 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### @mui/material@7.3.6
|
|
12
|
+
|
|
13
|
+
- [Accordion] Move properties to the AccordionOwnProps interface (#47348) @Aleksan4e3
|
|
14
|
+
- [Autocomplete] Remove unnecessary `filterSelectedOptions` dependency from `syncHighlightedIndex` useCallback (#47378) @ZeeshanTamboli
|
|
15
|
+
- [Autocomplete] Fix input caret not showing when focusing after chip navigation (#47249) @vrachuri28
|
|
16
|
+
- [Autocomplete] Fix ArrowLeft crash when value is not set with single-value rendering (#47214) @rithik56
|
|
17
|
+
- [Button] Fix running formAction when passed (#47185) @sai6855
|
|
18
|
+
- [Chip] Remove leftover closing parenthesis in CSS class key (#47345) @ZeeshanTamboli
|
|
19
|
+
- [ListItem] Add `secondaryAction` slot to `ListItem` (#47399) @sai6855
|
|
20
|
+
- [NumberField] Fix scroll behavior (#47397) @oliviertassinari
|
|
21
|
+
- [Select] Fix keyboard navigation while rendering in shadow DOM (#47380) @xBlizZer
|
|
22
|
+
- [Select] Fix cannot pass certain event handlers (#47366) @ZeeshanTamboli
|
|
23
|
+
- [Slider] Accept readonly array for `marks` prop (#47370) @pcorpet
|
|
24
|
+
- [Snackbar] Avoid unnecessary `ownerState` spread into `useSnackbar` (#47373) @ZeeshanTamboli
|
|
25
|
+
- [TextField] Allow custom props in slot props via TS module augmentation (#47367) @kumarvishwajeettrivedi
|
|
26
|
+
- [Tabs] Fix Arrow key navigation failing when component is rendered in shadow DOM (#47178) @sai6855
|
|
27
|
+
- Fix typings for theme `applyStyles` with custom color schemes (#47242) @akankshahu
|
|
28
|
+
|
|
29
|
+
### @mui/system@7.3.6
|
|
30
|
+
|
|
31
|
+
- Fix unwanted attribute on DOM from InitColorSchemeScript `class` attribute (#47200) @siriwatknp
|
|
32
|
+
|
|
33
|
+
### @mui/lab@7.3.6
|
|
34
|
+
|
|
35
|
+
- [Masonry] Fix layout flicker and single column issue (#43903) @Fanzzzd
|
|
36
|
+
|
|
37
|
+
### Docs
|
|
38
|
+
|
|
39
|
+
- Fix default theme viewer styling (#47400) @sai6855
|
|
40
|
+
- Remove repetitive words (#47384) @rifeplight
|
|
41
|
+
- Fix link to Portal API docs (#47383) @ZeeshanTamboli
|
|
42
|
+
- Remove mentions of MUI Base from Material UI docs (#47324) @mapache-salvaje
|
|
43
|
+
- Update CSP guidance (#47342) @rossdakin
|
|
44
|
+
- Fix pathname collision in LLMs docs generator (#47209) @siriwatknp
|
|
45
|
+
- Resolve redirected urls to their final location (#47193) @Janpot
|
|
46
|
+
- Document correct default values for `elevation` and `square` props (#47261) @Ad1tya-007
|
|
47
|
+
- Fix display of colors in dark mode in palette customization page (#47403) @sai6855
|
|
48
|
+
- Add Number Field component page (#47165) @siriwatknp
|
|
49
|
+
- Fix mcp schema change (#47171) @sai6855
|
|
50
|
+
|
|
51
|
+
### Core
|
|
52
|
+
|
|
53
|
+
- [code-infra] Add types for markdown loader (#47075) @Janpot
|
|
54
|
+
- [code-infra] Build test utils with code-infra pipeline (#47405) @Janpot
|
|
55
|
+
- [code-infra] Vitest test migration (#44325) @JCQuintas
|
|
56
|
+
- [code-infra] Revive docs bundle analyzer (#47401) @Janpot
|
|
57
|
+
- [code-infra] Update tests from vitest PR (#47344) @Janpot
|
|
58
|
+
- [code-infra] Use util from code-infra to fetch changelogs (#47350) @brijeshb42
|
|
59
|
+
- [code-infra] Enable production sourcemaps (#47352) @Janpot
|
|
60
|
+
- [code-infra] Use code-infra orb utils in circle ci (#47179) @brijeshb42
|
|
61
|
+
- [code-infra] Use `next/font` for local fonts (#47351) @Janpot
|
|
62
|
+
- [code-infra] New broken links checker (#47113) @Janpot
|
|
63
|
+
- [code-infra] Remove profiler (#47258) @Janpot
|
|
64
|
+
- [code-infra] Api doc optimizations (#47188) @Janpot
|
|
65
|
+
- [code-infra] Increase type check parallelism (#47192) @Janpot
|
|
66
|
+
- [code-infra] Remove deprecated baseUrl (#47210) @Janpot
|
|
67
|
+
- [code-infra] Disable next.js cache (#47233) @Janpot
|
|
68
|
+
- [code-infra] release:build for bundle checker (#47207) @Janpot
|
|
69
|
+
- [code-infra] Parallelize module augmentation tests (#47208) @Janpot
|
|
70
|
+
- [code-infra] Fix next.js parallelism at 2 for macos runner (#47201) @Janpot
|
|
71
|
+
- [code-infra] Fix bash escape (#46969) @oliviertassinari
|
|
72
|
+
- [code-infra] Utilise eslint cache in CI (#47194) @Janpot
|
|
73
|
+
- [code-infra] Enable Next.js build cache to improve CI performance (#47176) @Copilot
|
|
74
|
+
- [code-infra] Remove `apps` folder (#47183) @Janpot
|
|
75
|
+
- [code-infra] Migrate everything to getStaticProps (#47152) @Janpot
|
|
76
|
+
- [docs-infra] Migrate to `next/font` (#47347) @Janpot
|
|
77
|
+
- [docs-infra] Add some `ComponentLinkHeader` bottom margin (#47328) @Janpot
|
|
78
|
+
- [docs-infra] Exclude a few pages from llms-txt (#47111) @Janpot
|
|
79
|
+
- [examples] Add missing .gitignore to NextJS App Router example (#47251) @shamblonaut
|
|
80
|
+
- [examples] Migrate Next.js `next.config.js` to `next.config.mjs` (#44040) @albarv340
|
|
81
|
+
- [internal] Remove leftover testing-library libraries from `mui-material` package (#47392) @ZeeshanTamboli
|
|
82
|
+
- [internal] Remove unnecessary `clean-css` package from docs (#47314) @ZeeshanTamboli
|
|
83
|
+
- [internal] Fix typo `buidApiDocs` -> `buildApiDocs` (#47235) @Ad1tya-007
|
|
84
|
+
- [internal] Remove unused `@vitest/browser` and `@vitest/coverage-v8` (#47189) @ZeeshanTamboli
|
|
85
|
+
- [test] Update e2e test app (#47252) @Ad1tya-007
|
|
86
|
+
- [test] Fix flaky Virtualize Autocomplete regression test (#47199) @ZeeshanTamboli
|
|
87
|
+
|
|
88
|
+
All contributors of this release in alphabetical order: @Ad1tya-007, @akankshahu, @albarv340, @Aleksan4e3, @brijeshb42, @Copilot, @Fanzzzd, @Janpot, @JCQuintas, @kumarvishwajeettrivedi, @mapache-salvaje, @oliviertassinari, @pcorpet, @rifeplight, @rithik56, @rossdakin, @sai6855, @shamblonaut, @siriwatknp, @vrachuri28, @xBlizZer, @ZeeshanTamboli
|
|
89
|
+
|
|
3
90
|
## 7.3.5
|
|
4
91
|
|
|
5
92
|
<!-- generated comparing v7.3.4..master -->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the actual active element, traversing through shadow roots if necessary.
|
|
3
|
+
*
|
|
4
|
+
* When an element inside a shadow root has focus, `document.activeElement` returns
|
|
5
|
+
* the shadow host element. This function recursively traverses shadow roots to find
|
|
6
|
+
* the actual focused element.
|
|
7
|
+
*
|
|
8
|
+
* @param root - The document or shadow root to start the search from.
|
|
9
|
+
* @returns The actual focused element, or null if no element has focus.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // In a shadow DOM context
|
|
13
|
+
* const activeElement = getActiveElement(document);
|
|
14
|
+
* // Returns the actual focused element inside the shadow root
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Starting from a specific document
|
|
18
|
+
* const activeElement = getActiveElement(ownerDocument(element));
|
|
19
|
+
*/
|
|
20
|
+
export default function activeElement(doc: Document | ShadowRoot): Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the actual active element, traversing through shadow roots if necessary.
|
|
3
|
+
*
|
|
4
|
+
* When an element inside a shadow root has focus, `document.activeElement` returns
|
|
5
|
+
* the shadow host element. This function recursively traverses shadow roots to find
|
|
6
|
+
* the actual focused element.
|
|
7
|
+
*
|
|
8
|
+
* @param root - The document or shadow root to start the search from.
|
|
9
|
+
* @returns The actual focused element, or null if no element has focus.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // In a shadow DOM context
|
|
13
|
+
* const activeElement = getActiveElement(document);
|
|
14
|
+
* // Returns the actual focused element inside the shadow root
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Starting from a specific document
|
|
18
|
+
* const activeElement = getActiveElement(ownerDocument(element));
|
|
19
|
+
*/
|
|
20
|
+
export default function activeElement(doc) {
|
|
21
|
+
let element = doc.activeElement;
|
|
22
|
+
while (element?.shadowRoot?.activeElement != null) {
|
|
23
|
+
element = element.shadowRoot.activeElement;
|
|
24
|
+
}
|
|
25
|
+
return element;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./getActiveElement.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./getActiveElement.js";
|
package/esm/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as elementAcceptingRef } from "./elementAcceptingRef/index.js";
|
|
|
5
5
|
export { default as elementTypeAcceptingRef } from "./elementTypeAcceptingRef/index.js";
|
|
6
6
|
export { default as exactProp } from "./exactProp/index.js";
|
|
7
7
|
export { default as formatMuiErrorMessage } from "./formatMuiErrorMessage/index.js";
|
|
8
|
+
export { default as unstable_getActiveElement } from "./getActiveElement/index.js";
|
|
8
9
|
export { default as getDisplayName } from "./getDisplayName/index.js";
|
|
9
10
|
export { default as HTMLElementType } from "./HTMLElementType/index.js";
|
|
10
11
|
export { default as ponyfillGlobal } from "./ponyfillGlobal/index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v7.3.
|
|
2
|
+
* @mui/utils v7.3.6
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -12,6 +12,7 @@ export { default as elementAcceptingRef } from "./elementAcceptingRef/index.js";
|
|
|
12
12
|
export { default as elementTypeAcceptingRef } from "./elementTypeAcceptingRef/index.js";
|
|
13
13
|
export { default as exactProp } from "./exactProp/index.js";
|
|
14
14
|
export { default as formatMuiErrorMessage } from "./formatMuiErrorMessage/index.js";
|
|
15
|
+
export { default as unstable_getActiveElement } from "./getActiveElement/index.js";
|
|
15
16
|
export { default as getDisplayName } from "./getDisplayName/index.js";
|
|
16
17
|
export { default as HTMLElementType } from "./HTMLElementType/index.js";
|
|
17
18
|
export { default as ponyfillGlobal } from "./ponyfillGlobal/index.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the actual active element, traversing through shadow roots if necessary.
|
|
3
|
+
*
|
|
4
|
+
* When an element inside a shadow root has focus, `document.activeElement` returns
|
|
5
|
+
* the shadow host element. This function recursively traverses shadow roots to find
|
|
6
|
+
* the actual focused element.
|
|
7
|
+
*
|
|
8
|
+
* @param root - The document or shadow root to start the search from.
|
|
9
|
+
* @returns The actual focused element, or null if no element has focus.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // In a shadow DOM context
|
|
13
|
+
* const activeElement = getActiveElement(document);
|
|
14
|
+
* // Returns the actual focused element inside the shadow root
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Starting from a specific document
|
|
18
|
+
* const activeElement = getActiveElement(ownerDocument(element));
|
|
19
|
+
*/
|
|
20
|
+
export default function activeElement(doc: Document | ShadowRoot): Element | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = activeElement;
|
|
7
|
+
/**
|
|
8
|
+
* Gets the actual active element, traversing through shadow roots if necessary.
|
|
9
|
+
*
|
|
10
|
+
* When an element inside a shadow root has focus, `document.activeElement` returns
|
|
11
|
+
* the shadow host element. This function recursively traverses shadow roots to find
|
|
12
|
+
* the actual focused element.
|
|
13
|
+
*
|
|
14
|
+
* @param root - The document or shadow root to start the search from.
|
|
15
|
+
* @returns The actual focused element, or null if no element has focus.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // In a shadow DOM context
|
|
19
|
+
* const activeElement = getActiveElement(document);
|
|
20
|
+
* // Returns the actual focused element inside the shadow root
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Starting from a specific document
|
|
24
|
+
* const activeElement = getActiveElement(ownerDocument(element));
|
|
25
|
+
*/
|
|
26
|
+
function activeElement(doc) {
|
|
27
|
+
let element = doc.activeElement;
|
|
28
|
+
while (element?.shadowRoot?.activeElement != null) {
|
|
29
|
+
element = element.shadowRoot.activeElement;
|
|
30
|
+
}
|
|
31
|
+
return element;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./getActiveElement.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 _getActiveElement.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _getActiveElement = _interopRequireDefault(require("./getActiveElement"));
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as elementAcceptingRef } from "./elementAcceptingRef/index.js";
|
|
|
5
5
|
export { default as elementTypeAcceptingRef } from "./elementTypeAcceptingRef/index.js";
|
|
6
6
|
export { default as exactProp } from "./exactProp/index.js";
|
|
7
7
|
export { default as formatMuiErrorMessage } from "./formatMuiErrorMessage/index.js";
|
|
8
|
+
export { default as unstable_getActiveElement } from "./getActiveElement/index.js";
|
|
8
9
|
export { default as getDisplayName } from "./getDisplayName/index.js";
|
|
9
10
|
export { default as HTMLElementType } from "./HTMLElementType/index.js";
|
|
10
11
|
export { default as ponyfillGlobal } from "./ponyfillGlobal/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v7.3.
|
|
2
|
+
* @mui/utils v7.3.6
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -20,6 +20,7 @@ var _exportNames = {
|
|
|
20
20
|
elementTypeAcceptingRef: true,
|
|
21
21
|
exactProp: true,
|
|
22
22
|
formatMuiErrorMessage: true,
|
|
23
|
+
unstable_getActiveElement: true,
|
|
23
24
|
getDisplayName: true,
|
|
24
25
|
HTMLElementType: true,
|
|
25
26
|
ponyfillGlobal: true,
|
|
@@ -213,6 +214,12 @@ Object.defineProperty(exports, "unstable_generateUtilityClasses", {
|
|
|
213
214
|
return _generateUtilityClasses.default;
|
|
214
215
|
}
|
|
215
216
|
});
|
|
217
|
+
Object.defineProperty(exports, "unstable_getActiveElement", {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function () {
|
|
220
|
+
return _getActiveElement.default;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
216
223
|
Object.defineProperty(exports, "unstable_getReactElementRef", {
|
|
217
224
|
enumerable: true,
|
|
218
225
|
get: function () {
|
|
@@ -363,6 +370,7 @@ var _elementAcceptingRef = _interopRequireDefault(require("./elementAcceptingRef
|
|
|
363
370
|
var _elementTypeAcceptingRef = _interopRequireDefault(require("./elementTypeAcceptingRef"));
|
|
364
371
|
var _exactProp = _interopRequireDefault(require("./exactProp"));
|
|
365
372
|
var _formatMuiErrorMessage = _interopRequireDefault(require("./formatMuiErrorMessage"));
|
|
373
|
+
var _getActiveElement = _interopRequireDefault(require("./getActiveElement"));
|
|
366
374
|
var _getDisplayName = _interopRequireDefault(require("./getDisplayName"));
|
|
367
375
|
var _HTMLElementType = _interopRequireDefault(require("./HTMLElementType"));
|
|
368
376
|
var _ponyfillGlobal = _interopRequireDefault(require("./ponyfillGlobal"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.6",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Utility functions for React components.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"clsx": "^2.1.1",
|
|
30
30
|
"prop-types": "^15.8.1",
|
|
31
31
|
"react-is": "^19.2.0",
|
|
32
|
-
"@mui/types": "^7.4.
|
|
32
|
+
"@mui/types": "^7.4.9"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|