@mui/utils 9.0.0-alpha.4 → 9.0.0-beta.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 +119 -4
- package/fastDeepAssign/fastDeepAssign.d.mts +5 -0
- package/fastDeepAssign/fastDeepAssign.d.ts +5 -0
- package/fastDeepAssign/fastDeepAssign.js +79 -0
- package/fastDeepAssign/fastDeepAssign.mjs +73 -0
- package/fastDeepAssign/index.d.mts +1 -0
- package/fastDeepAssign/index.d.ts +1 -0
- package/fastDeepAssign/index.js +13 -0
- package/fastDeepAssign/index.mjs +1 -0
- package/fastObjectShallowCompare/fastObjectShallowCompare.d.mts +6 -0
- package/fastObjectShallowCompare/fastObjectShallowCompare.d.ts +6 -0
- package/fastObjectShallowCompare/fastObjectShallowCompare.js +41 -0
- package/fastObjectShallowCompare/fastObjectShallowCompare.mjs +35 -0
- package/fastObjectShallowCompare/index.d.mts +1 -0
- package/fastObjectShallowCompare/index.d.ts +1 -0
- package/fastObjectShallowCompare/index.js +13 -0
- package/fastObjectShallowCompare/index.mjs +1 -0
- package/index.d.mts +3 -1
- package/index.d.ts +3 -1
- package/index.js +26 -10
- package/index.mjs +4 -2
- package/isObjectEmpty/index.d.mts +1 -0
- package/isObjectEmpty/index.d.ts +1 -0
- package/isObjectEmpty/index.js +13 -0
- package/isObjectEmpty/index.mjs +1 -0
- package/isObjectEmpty/isObjectEmpty.d.mts +1 -0
- package/isObjectEmpty/isObjectEmpty.d.ts +1 -0
- package/isObjectEmpty/isObjectEmpty.js +16 -0
- package/isObjectEmpty/isObjectEmpty.mjs +10 -0
- package/package.json +45 -3
- package/useRovingTabIndex/RovingTabIndexContext.d.mts +6 -0
- package/useRovingTabIndex/RovingTabIndexContext.d.ts +6 -0
- package/useRovingTabIndex/RovingTabIndexContext.js +21 -0
- package/useRovingTabIndex/RovingTabIndexContext.mjs +14 -0
- package/useRovingTabIndex/index.d.mts +2 -1
- package/useRovingTabIndex/index.d.ts +2 -1
- package/useRovingTabIndex/index.js +21 -7
- package/useRovingTabIndex/index.mjs +2 -1
- package/useRovingTabIndex/useRovingTabIndex.d.mts +166 -18
- package/useRovingTabIndex/useRovingTabIndex.d.ts +166 -18
- package/useRovingTabIndex/useRovingTabIndex.js +352 -76
- package/useRovingTabIndex/useRovingTabIndex.mjs +349 -75
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,110 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 9.0.0-beta.1
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.0.0-beta.0..master -->
|
|
6
|
+
|
|
7
|
+
_Apr 2, 2026_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 11 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@9.0.0-beta.1`
|
|
12
|
+
|
|
13
|
+
#### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- [grid] Remove 'column' and 'column-reverse' options from `direction` prop (#47564) @sai6855
|
|
16
|
+
- [icons] Remove legacy `*Outline` icons (#48116) @mj12albert
|
|
17
|
+
- [list-item-icon] Use theme spacing instead of hardcoded minWidth (#46597) @adiitxa
|
|
18
|
+
|
|
19
|
+
#### Changes
|
|
20
|
+
|
|
21
|
+
- [all components] Fix `slotProps.transition` types (#48153) @mj12albert
|
|
22
|
+
- [alert][dialog] Accessibility improvements (#48113) @silviuaavram
|
|
23
|
+
- [autocomplete] Fix helper text focusing input when clicked (#48156) @mj12albert
|
|
24
|
+
- [button-base] Add `nativeButton` prop (#47989) @mj12albert
|
|
25
|
+
- [input] Fix high contrast cutoff on first character (#48150) @silviuaavram
|
|
26
|
+
- [menu] Fix empty roving focus container (#48114) @mj12albert
|
|
27
|
+
- [utils] Explicitly register roving tab items with parent (#48122) @mj12albert
|
|
28
|
+
|
|
29
|
+
### Docs
|
|
30
|
+
|
|
31
|
+
- Fix HTML validation errors (#48107) @Janpot
|
|
32
|
+
- Fix duplicate IDs and HTML validation issues (#48095) @Janpot
|
|
33
|
+
- Fix the dark mode footer row shadow for the Data Grid on the advanced components page (#48149) @arminmeh
|
|
34
|
+
- Improve jsdom section (#48098) @oliviertassinari
|
|
35
|
+
- Update "Deprecated APIs removed" section to h2 in "Upgrade to v9" docs (#48115) @ZeeshanTamboli
|
|
36
|
+
- [docs][progress] Label all demo components (#48143) @mj12albert
|
|
37
|
+
- [docs-infra] Add x-scheduler to component API URL resolver (#48097) @rita-codes
|
|
38
|
+
- [docs-infra] Resolve some redirects (#48165) @Janpot
|
|
39
|
+
- [docs-infra] Update v9 Search Index (#48028) @dav-is
|
|
40
|
+
|
|
41
|
+
### Core
|
|
42
|
+
|
|
43
|
+
- [code-infra] Discover exports for bundle size report (#48170) @Janpot
|
|
44
|
+
- [internal] Fix use of ellipsis (#48096) @oliviertassinari
|
|
45
|
+
- [test] Add screenshot test for Virtualized Table (#47947) @mnajdova
|
|
46
|
+
- [test] Remove `componentsProp` from `describeConformance` tests (#48142) @ZeeshanTamboli
|
|
47
|
+
- [theme] Do not create channel tokens for custom colors when `nativeColor` is used (#47765) @ZeeshanTamboli
|
|
48
|
+
|
|
49
|
+
All contributors of this release in alphabetical order: @adiitxa, @arminmeh, @dav-is, @Janpot, @mj12albert, @mnajdova, @oliviertassinari, @rita-codes, @sai6855, @silviuaavram, @ZeeshanTamboli
|
|
50
|
+
|
|
51
|
+
## 9.0.0-beta.0
|
|
52
|
+
|
|
53
|
+
<!-- generated comparing v9.0.0-alpha.4..master -->
|
|
54
|
+
|
|
55
|
+
_Mar 25, 2026_
|
|
56
|
+
|
|
57
|
+
A big thanks to the 8 contributors who made this release possible.
|
|
58
|
+
|
|
59
|
+
### `@mui/material@9.0.0-beta.0`
|
|
60
|
+
|
|
61
|
+
#### Breaking Changes
|
|
62
|
+
|
|
63
|
+
- [linear-progress] Remove deprecated CSS classes (#48068) @mj12albert
|
|
64
|
+
- [list-item, list-item-text] Remove deprecated props (#48042) @siriwatknp
|
|
65
|
+
- [button-group] Remove deprecated classes (#48043) @siriwatknp
|
|
66
|
+
- [card] Remove deprecated CardHeader props (#47995) @silviuaavram
|
|
67
|
+
- [checkbox][radio][switch] Remove deprecated inputProps and inputRef (#48059) @siriwatknp
|
|
68
|
+
- [chip] Remove deprecated classes (#48046) @silviuaavram
|
|
69
|
+
- [dialog][modal][drawer][swipeabledrawer] Remove deprecated props and classes (#48039) @silviuaavram
|
|
70
|
+
- [divider] Remove deprecated CSS classes (#48075) @siriwatknp
|
|
71
|
+
- [drawer] Remove deprecated CSS classes (#48077) @siriwatknp
|
|
72
|
+
- [image-list-item-bar] Remove deprecated CSS classes (#48064) @siriwatknp
|
|
73
|
+
- [inputs] Remove deprecated props & classes (#48071) @mj12albert
|
|
74
|
+
- [material-ui] Remove unnecessary overridesResolvers from styled components (#48082) @ZeeshanTamboli
|
|
75
|
+
- [material-ui][system] Remove deprecated system props from Box, Stack, Typography (#48072) @siriwatknp
|
|
76
|
+
- [pagination-item] Remove deprecated CSS classes (#48076) @siriwatknp
|
|
77
|
+
- [pagination-item] Remove deprecated props (#48038) @siriwatknp
|
|
78
|
+
- [rating] Remove deprecated IconContainerComponent (#48019) @siriwatknp
|
|
79
|
+
- [select] Remove deprecated CSS classes (#48065) @mj12albert
|
|
80
|
+
- [slider] Remove deprecated CSS classes (#48074) @siriwatknp
|
|
81
|
+
- [step-connector][step-content][step-label] Remove deprecated props and classes (#48058) @siriwatknp
|
|
82
|
+
- [tabs][tab] Remove deprecated CSS classes (#48078) @siriwatknp
|
|
83
|
+
- [table-pagination][table-sort-label] Remove deprecated props and classes (#48060) @siriwatknp
|
|
84
|
+
- [toggle-button-group] Remove deprecated classes (#48061) @siriwatknp
|
|
85
|
+
|
|
86
|
+
#### Changes
|
|
87
|
+
|
|
88
|
+
- [system] Improve performance when using sx prop (#44254) @romgrk
|
|
89
|
+
|
|
90
|
+
### `@mui/codemod@9.0.0-beta.0`
|
|
91
|
+
|
|
92
|
+
- [codemod] Add missing codemod links in upgrade guide (#48069) @silviuaavram
|
|
93
|
+
|
|
94
|
+
### Docs
|
|
95
|
+
|
|
96
|
+
- Mention all breaking changes in changelog (#48091) @silviuaavram
|
|
97
|
+
- Fix link to upgrade-to-v9 docs in release CHANGELOG (#48081) @ZeeshanTamboli
|
|
98
|
+
|
|
99
|
+
### Core
|
|
100
|
+
|
|
101
|
+
- Update browserslistrc (#48085) @silviuaavram
|
|
102
|
+
- [code-infra] Prevent major version updates of bundler/framework packages in bundling fixtures (#48062) @Copilot
|
|
103
|
+
- [code-infra][icons-material] Avoid material utils barrel in createSvgIcon (#48029) @anchmelev
|
|
104
|
+
- [docs-infra] Migrate more leaf components to mui-docs (#48018) @brijeshb42
|
|
105
|
+
|
|
106
|
+
All contributors of this release in alphabetical order: @anchmelev, @brijeshb42, @Copilot, @mj12albert, @romgrk, @silviuaavram, @siriwatknp, @ZeeshanTamboli
|
|
107
|
+
|
|
3
108
|
## 9.0.0-alpha.4
|
|
4
109
|
|
|
5
110
|
<!-- generated comparing v9.0.0-alpha.3..master -->
|
|
@@ -118,7 +223,7 @@ A big thanks to the 11 contributors who made this release possible.
|
|
|
118
223
|
- [tablepagination] Format pagination numbers according to locale (#47803) @siriwatknp
|
|
119
224
|
- [textfield] Use non-native label for `<TextField select/>` (#47958) @mj12albert
|
|
120
225
|
|
|
121
|
-
Check out the [v9 upgrade guide](https://mui.com/material-ui/migration/upgrade-to-v9/).
|
|
226
|
+
Check out the [v9 upgrade guide](https://next.mui.com/material-ui/migration/upgrade-to-v9/).
|
|
122
227
|
|
|
123
228
|
#### Changes
|
|
124
229
|
|
|
@@ -167,11 +272,16 @@ A big thanks to the 10 contributors who made this release possible. Here are som
|
|
|
167
272
|
|
|
168
273
|
### `@mui/material@9.0.0-alpha.3`
|
|
169
274
|
|
|
275
|
+
#### Breaking Changes
|
|
276
|
+
|
|
277
|
+
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
278
|
+
|
|
279
|
+
#### Changes
|
|
280
|
+
|
|
170
281
|
- [autocomplete] Add `root` slot (#47852) @GerardasB
|
|
171
282
|
- [autocomplete] Fix popup reopening on window focus regain with openOnFocus (#47790) @aman44444
|
|
172
283
|
- [autocomplete] Support full slots for clearIndicator and popupIndicator (#47891) @silviuaavram
|
|
173
284
|
- [material-ui] Partially revert "[material-ui] Clean up duplicated CSS rules (#47838)" (#47927) @sai6855
|
|
174
|
-
- [stepper][menulist][tabs] Improve accessibility (#47687) @silviuaavram
|
|
175
285
|
|
|
176
286
|
### Docs
|
|
177
287
|
|
|
@@ -229,16 +339,21 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
229
339
|
|
|
230
340
|
### @mui/material@9.0.0-alpha.1
|
|
231
341
|
|
|
342
|
+
#### Breaking Changes
|
|
343
|
+
|
|
232
344
|
- [Autocomplete] Prevents Autocomplete menu from opening on right click (#47797) @silviuaavram
|
|
233
345
|
- [Backdrop] Remove aria-hidden by default (#47798) @silviuaavram
|
|
234
346
|
- [ButtonBase] Ensure that onClick propagates when non-native button is clicked (#47800) @silviuaavram
|
|
235
347
|
- [Dialog][Modal] Remove `disableEscapeKeyDown` prop (#47695) @silviuaavram
|
|
236
348
|
- [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
349
|
- [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
350
|
- [useAutocomplete] Improve isOptionEqualToValue value argument type (#47801) @silviuaavram
|
|
241
351
|
|
|
352
|
+
#### Changes
|
|
353
|
+
|
|
354
|
+
- [TableCell][theme] Apply `alpha` before color mixing to border bottom color when nativeColor + cssVariables is used (#47762) @ZeeshanTamboli
|
|
355
|
+
- [Tooltip] Fix error is thrown when wrapping an input which is disabled while focused (#47684) @ZeeshanTamboli
|
|
356
|
+
|
|
242
357
|
### Docs
|
|
243
358
|
|
|
244
359
|
- [docs] Add updated community theme resource (#47847) @PeterTYLiu
|
|
@@ -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";
|
|
@@ -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
|
@@ -14,6 +14,9 @@ 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_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.mjs";
|
|
19
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
|
|
17
20
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
|
|
18
21
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
|
|
19
22
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
|
|
@@ -49,5 +52,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
|
|
|
49
52
|
export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.mjs";
|
|
50
53
|
export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.mjs";
|
|
51
54
|
export { default as unstable_getReactElementRef } from "./getReactElementRef/index.mjs";
|
|
52
|
-
export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.mjs";
|
|
53
55
|
export * from "./types/index.mjs";
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ 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_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.js";
|
|
19
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.js";
|
|
17
20
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.js";
|
|
18
21
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.js";
|
|
19
22
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.js";
|
|
@@ -49,5 +52,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
|
|
|
49
52
|
export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.js";
|
|
50
53
|
export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.js";
|
|
51
54
|
export { default as unstable_getReactElementRef } from "./getReactElementRef/index.js";
|
|
52
|
-
export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.js";
|
|
53
55
|
export * from "./types/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v9.0.0-
|
|
2
|
+
* @mui/utils v9.0.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -29,6 +29,9 @@ var _exportNames = {
|
|
|
29
29
|
unstable_createChainedFunction: true,
|
|
30
30
|
unstable_debounce: true,
|
|
31
31
|
unstable_deprecatedPropType: true,
|
|
32
|
+
unstable_fastDeepAssign: true,
|
|
33
|
+
unstable_fastObjectShallowCompare: true,
|
|
34
|
+
unstable_isObjectEmpty: true,
|
|
32
35
|
unstable_isMuiElement: true,
|
|
33
36
|
unstable_ownerDocument: true,
|
|
34
37
|
unstable_ownerWindow: true,
|
|
@@ -62,8 +65,7 @@ var _exportNames = {
|
|
|
62
65
|
unstable_resolveComponentProps: true,
|
|
63
66
|
unstable_extractEventHandlers: true,
|
|
64
67
|
unstable_getReactNodeRef: true,
|
|
65
|
-
unstable_getReactElementRef: true
|
|
66
|
-
unstable_useRovingTabIndex: true
|
|
68
|
+
unstable_getReactElementRef: true
|
|
67
69
|
};
|
|
68
70
|
Object.defineProperty(exports, "HTMLElementType", {
|
|
69
71
|
enumerable: true,
|
|
@@ -203,6 +205,18 @@ 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
|
+
});
|
|
214
|
+
Object.defineProperty(exports, "unstable_fastObjectShallowCompare", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
get: function () {
|
|
217
|
+
return _fastObjectShallowCompare.default;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
206
220
|
Object.defineProperty(exports, "unstable_generateUtilityClass", {
|
|
207
221
|
enumerable: true,
|
|
208
222
|
get: function () {
|
|
@@ -257,6 +271,12 @@ Object.defineProperty(exports, "unstable_isMuiElement", {
|
|
|
257
271
|
return _isMuiElement.default;
|
|
258
272
|
}
|
|
259
273
|
});
|
|
274
|
+
Object.defineProperty(exports, "unstable_isObjectEmpty", {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: function () {
|
|
277
|
+
return _isObjectEmpty.default;
|
|
278
|
+
}
|
|
279
|
+
});
|
|
260
280
|
Object.defineProperty(exports, "unstable_ownerDocument", {
|
|
261
281
|
enumerable: true,
|
|
262
282
|
get: function () {
|
|
@@ -341,12 +361,6 @@ Object.defineProperty(exports, "unstable_useOnMount", {
|
|
|
341
361
|
return _useOnMount.default;
|
|
342
362
|
}
|
|
343
363
|
});
|
|
344
|
-
Object.defineProperty(exports, "unstable_useRovingTabIndex", {
|
|
345
|
-
enumerable: true,
|
|
346
|
-
get: function () {
|
|
347
|
-
return _useRovingTabIndex.default;
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
364
|
Object.defineProperty(exports, "unstable_useSlotProps", {
|
|
351
365
|
enumerable: true,
|
|
352
366
|
get: function () {
|
|
@@ -386,6 +400,9 @@ 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 _fastObjectShallowCompare = _interopRequireDefault(require("./fastObjectShallowCompare"));
|
|
405
|
+
var _isObjectEmpty = _interopRequireDefault(require("./isObjectEmpty"));
|
|
389
406
|
var _isMuiElement = _interopRequireDefault(require("./isMuiElement"));
|
|
390
407
|
var _ownerDocument = _interopRequireDefault(require("./ownerDocument"));
|
|
391
408
|
var _ownerWindow = _interopRequireDefault(require("./ownerWindow"));
|
|
@@ -429,7 +446,6 @@ var _resolveComponentProps = _interopRequireDefault(require("./resolveComponentP
|
|
|
429
446
|
var _extractEventHandlers = _interopRequireDefault(require("./extractEventHandlers"));
|
|
430
447
|
var _getReactNodeRef = _interopRequireDefault(require("./getReactNodeRef"));
|
|
431
448
|
var _getReactElementRef = _interopRequireDefault(require("./getReactElementRef"));
|
|
432
|
-
var _useRovingTabIndex = _interopRequireDefault(require("./useRovingTabIndex"));
|
|
433
449
|
var _types = require("./types");
|
|
434
450
|
Object.keys(_types).forEach(function (key) {
|
|
435
451
|
if (key === "default" || key === "__esModule") return;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/utils v9.0.0-
|
|
2
|
+
* @mui/utils v9.0.0-beta.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -21,6 +21,9 @@ 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_fastObjectShallowCompare } from "./fastObjectShallowCompare/index.mjs";
|
|
26
|
+
export { default as unstable_isObjectEmpty } from "./isObjectEmpty/index.mjs";
|
|
24
27
|
export { default as unstable_isMuiElement } from "./isMuiElement/index.mjs";
|
|
25
28
|
export { default as unstable_ownerDocument } from "./ownerDocument/index.mjs";
|
|
26
29
|
export { default as unstable_ownerWindow } from "./ownerWindow/index.mjs";
|
|
@@ -55,5 +58,4 @@ export { default as unstable_resolveComponentProps } from "./resolveComponentPro
|
|
|
55
58
|
export { default as unstable_extractEventHandlers } from "./extractEventHandlers/index.mjs";
|
|
56
59
|
export { default as unstable_getReactNodeRef } from "./getReactNodeRef/index.mjs";
|
|
57
60
|
export { default as unstable_getReactElementRef } from "./getReactElementRef/index.mjs";
|
|
58
|
-
export { default as unstable_useRovingTabIndex } from "./useRovingTabIndex/index.mjs";
|
|
59
61
|
export * from "./types/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
|
+
}
|