@mui/utils 5.11.12 โ 5.11.13
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 +43 -2
- package/ClassNameGenerator/ClassNameGenerator.d.ts +6 -6
- package/ClassNameGenerator/index.d.ts +1 -1
- package/HTMLElementType.d.ts +3 -3
- package/chainPropTypes.d.ts +2 -2
- package/composeClasses/composeClasses.d.ts +1 -1
- package/composeClasses/composeClasses.js +5 -2
- package/composeClasses/index.d.ts +1 -1
- package/createChainedFunction.d.ts +7 -7
- package/deepmerge.d.ts +5 -5
- package/elementAcceptingRef.d.ts +3 -3
- package/elementTypeAcceptingRef.d.ts +3 -3
- package/esm/composeClasses/composeClasses.js +5 -2
- package/exactProp.d.ts +2 -2
- package/formatMuiErrorMessage.d.ts +6 -6
- package/generateUtilityClass/generateUtilityClass.d.ts +2 -2
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/generateUtilityClasses.d.ts +1 -1
- package/generateUtilityClasses/index.d.ts +1 -1
- package/getDisplayName.d.ts +8 -8
- package/getScrollbarSize.d.ts +1 -1
- package/index.d.ts +38 -38
- package/index.js +1 -1
- package/integerPropType.d.ts +7 -7
- package/isMuiElement.d.ts +1 -1
- package/legacy/composeClasses/composeClasses.js +6 -2
- package/legacy/index.js +1 -1
- package/modern/composeClasses/composeClasses.js +5 -2
- package/modern/index.js +1 -1
- package/ownerDocument.d.ts +1 -1
- package/ownerWindow.d.ts +1 -1
- package/package.json +1 -1
- package/ponyfillGlobal.d.ts +2 -2
- package/refType.d.ts +3 -3
- package/resolveProps.d.ts +12 -12
- package/setRef.d.ts +15 -15
- package/useEventCallback.d.ts +4 -4
- package/useEventCallback.spec.d.ts +1 -1
- package/useForkRef.d.ts +2 -2
- package/useId.d.ts +7 -7
- package/useIsFocusVisible.d.ts +9 -9
- package/usePreviousProps.d.ts +2 -2
- package/visuallyHidden.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.11.13
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.11.12..master -->
|
|
6
|
+
|
|
7
|
+
_Mar 14, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 13 contributors who made this release possible. Here are some highlights โจ:
|
|
10
|
+
|
|
11
|
+
- @michaldudak added an option for [disabling the generation](https://mui.com/base/getting-started/customization/#disabling-default-css-classes) of the default classes in MUI Base (#35963)
|
|
12
|
+
- other ๐ bug fixes and ๐ documentation improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.11.13`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 13 -->[core] Bump MUI Base's version in Material UI (#36492) @hbjORbj
|
|
17
|
+
- ​<!-- 17 -->[material] Export `shouldSkipGeneratingVar` from Material UI (#36489) @siriwatknp
|
|
18
|
+
- ​<!-- 06 -->[Typography] Apply font properties to typography inherit variant (#33621) @oyar99
|
|
19
|
+
|
|
20
|
+
### `@mui/base@5.0.0-alpha.121`
|
|
21
|
+
|
|
22
|
+
- ​<!-- 16 -->[base] Disable classes generation via a context (#35963) @michaldudak
|
|
23
|
+
- ​<!-- 15 -->[useMenu][base] Add return interface for useMenu hook (#36376) @HeVictor
|
|
24
|
+
- ​<!-- 05 -->[useBadge] Add interface for the return value (#36042) @skevprog
|
|
25
|
+
- ​<!-- 04 -->[useMenuItem] Add explicit return type (#36359) @rayrw
|
|
26
|
+
- ​<!-- 03 -->[useTabs] Add explicit return type (#36047) @sai6855
|
|
27
|
+
|
|
28
|
+
### Docs
|
|
29
|
+
|
|
30
|
+
- ​<!-- 14 -->[blog] Update fields behavior on date pickers blog post (#36480) @joserodolfofreitas
|
|
31
|
+
- ​<!-- 12 -->[docs] Info markdown not rendering in Contributing Guide README (#36487) @hbjORbj
|
|
32
|
+
- ​<!-- 11 -->[docs] Remove 301 redirection to MUI X lab migration @oliviertassinari
|
|
33
|
+
- ​<!-- 10 -->[docs] Fix a grammar error (#36486) @hbjORbj
|
|
34
|
+
- ​<!-- 09 -->[docs] Add blog post notification for v6 release (#36446) @joserodolfofreitas
|
|
35
|
+
- ​<!-- 08 -->[docs] Update link to v5 docs (#36421) @m4theushw
|
|
36
|
+
- ​<!-- 07 -->[docs] Fix 404 in the API page links (#36419) @oliviertassinari
|
|
37
|
+
- ​<!-- 08 -->[docs][joy] Error in the exemplary Codesandbox of using Material UI and Joy UI together (#36462) @hbjORbj
|
|
38
|
+
- ​<!-- 06 -->[examples] Refactor to have better types in the Next.js + TypeScript examples (#36355) @erikian
|
|
39
|
+
- ​<!-- 02 -->[website] Fix layout shift when loading /blog/mui-x-v6/ @oliviertassinari
|
|
40
|
+
- ​<!-- 01 -->[website] Update stats (#36477) @hrutik7
|
|
41
|
+
|
|
42
|
+
All contributors of this release in alphabetical order: @erikian, @hbjORbj, @HeVictor, @hrutik7, @joserodolfofreitas, @m4theushw, @michaldudak, @oliviertassinari, @oyar99, @rayrw, @sai6855, @siriwatknp, @skevprog
|
|
43
|
+
|
|
3
44
|
## 5.11.12
|
|
4
45
|
|
|
5
46
|
<!-- generated comparing v5.11.11..master -->
|
|
@@ -2242,7 +2283,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
2242
2283
|
- ๐งช Exported Grid v2 as `Unstable_Grid2` (#33479) @siriwatknp
|
|
2243
2284
|
- ๐ Added a guide for using Joy UI and Material UI together (#33396) @siriwatknp
|
|
2244
2285
|
- ๐ Fixed a few bugs in Material UI components. Thanks to @ZeeshanTamboli, @ivan-ngchakming, and @joebingham-wk.
|
|
2245
|
-
- โ ๏ธ **[BREAKING CHANGE]** Date pickers were removed from the lab. Learn how to migrate by visiting the [migration guide](https://mui.com/x/
|
|
2286
|
+
- โ ๏ธ **[BREAKING CHANGE]** Date pickers were removed from the lab. Learn how to migrate by visiting the [migration guide](https://mui.com/x/migration/migration-pickers-lab/). (#33386) @flaviendelangle
|
|
2246
2287
|
- many other ๐ bug fixes and ๐ documentation improvements
|
|
2247
2288
|
- our documentation site is now running with React 18! (#33196) @mnajdova
|
|
2248
2289
|
|
|
@@ -2268,7 +2309,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
2268
2309
|
|
|
2269
2310
|
- [lab] Remove the pickers (#33386) @flaviendelangle
|
|
2270
2311
|
|
|
2271
|
-
The pickers are moved to MUI X, check out the [migration guide](https://mui.com/x/
|
|
2312
|
+
The pickers are moved to MUI X, check out the [migration guide](https://mui.com/x/migration/migration-pickers-lab/).
|
|
2272
2313
|
|
|
2273
2314
|
**Changes**
|
|
2274
2315
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const ClassNameGenerator: {
|
|
2
|
-
configure(generator: (componentName: string) => string): void;
|
|
3
|
-
generate(componentName: string): string;
|
|
4
|
-
reset(): void;
|
|
5
|
-
};
|
|
6
|
-
export default ClassNameGenerator;
|
|
1
|
+
declare const ClassNameGenerator: {
|
|
2
|
+
configure(generator: (componentName: string) => string): void;
|
|
3
|
+
generate(componentName: string): string;
|
|
4
|
+
reset(): void;
|
|
5
|
+
};
|
|
6
|
+
export default ClassNameGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ClassNameGenerator';
|
|
1
|
+
export { default } from './ClassNameGenerator';
|
package/HTMLElementType.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default function HTMLElementType(props: {
|
|
2
|
-
[key: string]: unknown;
|
|
3
|
-
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;
|
|
1
|
+
export default function HTMLElementType(props: {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
}, propName: string, componentName: string, location: string, propFullName: string): Error | null;
|
package/chainPropTypes.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export default function chainPropTypes<A, B>(propType1: PropTypes.Validator<A>, propType2: PropTypes.Validator<B>): PropTypes.Validator<A & B>;
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export default function chainPropTypes<A, B>(propType1: PropTypes.Validator<A>, propType2: PropTypes.Validator<B>): PropTypes.Validator<A & B>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function composeClasses<ClassKey extends string>(slots: Record<ClassKey, ReadonlyArray<string | false | undefined | null>>, getUtilityClass: (slot: string) => string, classes
|
|
1
|
+
export default function composeClasses<ClassKey extends string>(slots: Record<ClassKey, ReadonlyArray<string | false | undefined | null>>, getUtilityClass: (slot: string) => string, classes?: Record<string, string> | undefined): Record<ClassKey, string>;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = composeClasses;
|
|
7
|
-
function composeClasses(slots, getUtilityClass, classes) {
|
|
7
|
+
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
8
8
|
const output = {};
|
|
9
9
|
Object.keys(slots).forEach(
|
|
10
10
|
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
@@ -12,7 +12,10 @@ function composeClasses(slots, getUtilityClass, classes) {
|
|
|
12
12
|
slot => {
|
|
13
13
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
14
14
|
if (key) {
|
|
15
|
-
|
|
15
|
+
const utilityClass = getUtilityClass(key);
|
|
16
|
+
if (utilityClass !== '') {
|
|
17
|
+
acc.push(utilityClass);
|
|
18
|
+
}
|
|
16
19
|
if (classes && classes[key]) {
|
|
17
20
|
acc.push(classes[key]);
|
|
18
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './composeClasses';
|
|
1
|
+
export { default } from './composeClasses';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Safe chained function.
|
|
3
|
-
*
|
|
4
|
-
* Will only create a new function if needed,
|
|
5
|
-
* otherwise will pass back existing functions or null.
|
|
6
|
-
*/
|
|
7
|
-
export default function createChainedFunction<Args extends any[], This>(...funcs: Array<(this: This, ...args: Args) => any>): (this: This, ...args: Args) => void;
|
|
1
|
+
/**
|
|
2
|
+
* Safe chained function.
|
|
3
|
+
*
|
|
4
|
+
* Will only create a new function if needed,
|
|
5
|
+
* otherwise will pass back existing functions or null.
|
|
6
|
+
*/
|
|
7
|
+
export default function createChainedFunction<Args extends any[], This>(...funcs: Array<(this: This, ...args: Args) => any>): (this: This, ...args: Args) => void;
|
package/deepmerge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
|
|
2
|
-
export interface DeepmergeOptions {
|
|
3
|
-
clone?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;
|
|
1
|
+
export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
|
|
2
|
+
export interface DeepmergeOptions {
|
|
3
|
+
clone?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;
|
package/elementAcceptingRef.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
declare const elementAcceptingRef: PropTypes.Requireable<unknown>;
|
|
3
|
-
export default elementAcceptingRef;
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const elementAcceptingRef: PropTypes.Requireable<unknown>;
|
|
3
|
+
export default elementAcceptingRef;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
declare const _default: PropTypes.Validator<PropTypes.ReactComponentLike | null | undefined>;
|
|
3
|
-
export default _default;
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const _default: PropTypes.Validator<PropTypes.ReactComponentLike | null | undefined>;
|
|
3
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function composeClasses(slots, getUtilityClass, classes) {
|
|
1
|
+
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
4
|
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
@@ -6,7 +6,10 @@ export default function composeClasses(slots, getUtilityClass, classes) {
|
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
8
8
|
if (key) {
|
|
9
|
-
|
|
9
|
+
const utilityClass = getUtilityClass(key);
|
|
10
|
+
if (utilityClass !== '') {
|
|
11
|
+
acc.push(utilityClass);
|
|
12
|
+
}
|
|
10
13
|
if (classes && classes[key]) {
|
|
11
14
|
acc.push(classes[key]);
|
|
12
15
|
}
|
package/exactProp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ValidationMap } from 'prop-types';
|
|
2
|
-
export default function exactProp<T>(propTypes: ValidationMap<T>): ValidationMap<T>;
|
|
1
|
+
import { ValidationMap } from 'prop-types';
|
|
2
|
+
export default function exactProp<T>(propTypes: ValidationMap<T>): ValidationMap<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WARNING: Don't import this directly.
|
|
3
|
-
* Use `MuiError` from `@mui/utils/macros/MuiError.macro` instead.
|
|
4
|
-
* @param {number} code
|
|
5
|
-
*/
|
|
6
|
-
export default function formatMuiErrorMessage(code: number): string;
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: Don't import this directly.
|
|
3
|
+
* Use `MuiError` from `@mui/utils/macros/MuiError.macro` instead.
|
|
4
|
+
* @param {number} code
|
|
5
|
+
*/
|
|
6
|
+
export default function formatMuiErrorMessage(code: number): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type GlobalStateSlot = 'active' | 'checked' | 'completed' | 'disabled' | 'readOnly' | 'error' | 'expanded' | 'focused' | 'focusVisible' | 'required' | 'selected';
|
|
2
|
-
export default function generateUtilityClass(componentName: string, slot: string, globalStatePrefix?: string): string;
|
|
1
|
+
export type GlobalStateSlot = 'active' | 'checked' | 'completed' | 'disabled' | 'readOnly' | 'error' | 'expanded' | 'focused' | 'focusVisible' | 'required' | 'selected';
|
|
2
|
+
export default function generateUtilityClass(componentName: string, slot: string, globalStatePrefix?: string): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './generateUtilityClass';
|
|
2
|
-
export * from './generateUtilityClass';
|
|
1
|
+
export { default } from './generateUtilityClass';
|
|
2
|
+
export * from './generateUtilityClass';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function generateUtilityClasses<T extends string>(componentName: string, slots: T[], globalStatePrefix?: string): Record<T, string>;
|
|
1
|
+
export default function generateUtilityClasses<T extends string>(componentName: string, slots: T[], globalStatePrefix?: string): Record<T, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './generateUtilityClasses';
|
|
1
|
+
export { default } from './generateUtilityClasses';
|
package/getDisplayName.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare function getFunctionName(fn: Function): string;
|
|
3
|
-
/**
|
|
4
|
-
* cherry-pick from
|
|
5
|
-
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
|
|
6
|
-
* originally forked from recompose/getDisplayName with added IE11 support
|
|
7
|
-
*/
|
|
8
|
-
export default function getDisplayName(Component: React.ElementType): string | undefined;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function getFunctionName(fn: Function): string;
|
|
3
|
+
/**
|
|
4
|
+
* cherry-pick from
|
|
5
|
+
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
|
|
6
|
+
* originally forked from recompose/getDisplayName with added IE11 support
|
|
7
|
+
*/
|
|
8
|
+
export default function getDisplayName(Component: React.ElementType): string | undefined;
|
package/getScrollbarSize.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function getScrollbarSize(doc: Document): number;
|
|
1
|
+
export default function getScrollbarSize(doc: Document): number;
|
package/index.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
export { default as chainPropTypes } from './chainPropTypes';
|
|
2
|
-
export { default as deepmerge } from './deepmerge';
|
|
3
|
-
export { isPlainObject } from './deepmerge';
|
|
4
|
-
export { default as elementAcceptingRef } from './elementAcceptingRef';
|
|
5
|
-
export { default as elementTypeAcceptingRef } from './elementTypeAcceptingRef';
|
|
6
|
-
export { default as exactProp } from './exactProp';
|
|
7
|
-
export { default as formatMuiErrorMessage } from './formatMuiErrorMessage';
|
|
8
|
-
export { default as getDisplayName } from './getDisplayName';
|
|
9
|
-
export { default as HTMLElementType } from './HTMLElementType';
|
|
10
|
-
export { default as ponyfillGlobal } from './ponyfillGlobal';
|
|
11
|
-
export { default as refType } from './refType';
|
|
12
|
-
export { default as unstable_capitalize } from './capitalize';
|
|
13
|
-
export { default as unstable_createChainedFunction } from './createChainedFunction';
|
|
14
|
-
export { default as unstable_debounce } from './debounce';
|
|
15
|
-
export { default as unstable_deprecatedPropType } from './deprecatedPropType';
|
|
16
|
-
export { default as unstable_isMuiElement } from './isMuiElement';
|
|
17
|
-
export { default as unstable_ownerDocument } from './ownerDocument';
|
|
18
|
-
export { default as unstable_ownerWindow } from './ownerWindow';
|
|
19
|
-
export { default as unstable_requirePropFactory } from './requirePropFactory';
|
|
20
|
-
export { default as unstable_setRef } from './setRef';
|
|
21
|
-
export { default as unstable_useEnhancedEffect } from './useEnhancedEffect';
|
|
22
|
-
export { default as unstable_useId } from './useId';
|
|
23
|
-
export { default as unstable_unsupportedProp } from './unsupportedProp';
|
|
24
|
-
export { default as unstable_useControlled } from './useControlled';
|
|
25
|
-
export { default as unstable_useEventCallback } from './useEventCallback';
|
|
26
|
-
export { default as unstable_useForkRef } from './useForkRef';
|
|
27
|
-
export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
28
|
-
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
29
|
-
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft, } from './scrollLeft';
|
|
30
|
-
export { default as usePreviousProps } from './usePreviousProps';
|
|
31
|
-
export { default as visuallyHidden } from './visuallyHidden';
|
|
32
|
-
export { default as integerPropType } from './integerPropType';
|
|
33
|
-
export { default as internal_resolveProps } from './resolveProps';
|
|
34
|
-
export { default as unstable_composeClasses } from './composeClasses';
|
|
35
|
-
export { default as unstable_generateUtilityClass } from './generateUtilityClass';
|
|
36
|
-
export * from './generateUtilityClass';
|
|
37
|
-
export { default as unstable_generateUtilityClasses } from './generateUtilityClasses';
|
|
38
|
-
export { default as unstable_ClassNameGenerator } from './ClassNameGenerator';
|
|
1
|
+
export { default as chainPropTypes } from './chainPropTypes';
|
|
2
|
+
export { default as deepmerge } from './deepmerge';
|
|
3
|
+
export { isPlainObject } from './deepmerge';
|
|
4
|
+
export { default as elementAcceptingRef } from './elementAcceptingRef';
|
|
5
|
+
export { default as elementTypeAcceptingRef } from './elementTypeAcceptingRef';
|
|
6
|
+
export { default as exactProp } from './exactProp';
|
|
7
|
+
export { default as formatMuiErrorMessage } from './formatMuiErrorMessage';
|
|
8
|
+
export { default as getDisplayName } from './getDisplayName';
|
|
9
|
+
export { default as HTMLElementType } from './HTMLElementType';
|
|
10
|
+
export { default as ponyfillGlobal } from './ponyfillGlobal';
|
|
11
|
+
export { default as refType } from './refType';
|
|
12
|
+
export { default as unstable_capitalize } from './capitalize';
|
|
13
|
+
export { default as unstable_createChainedFunction } from './createChainedFunction';
|
|
14
|
+
export { default as unstable_debounce } from './debounce';
|
|
15
|
+
export { default as unstable_deprecatedPropType } from './deprecatedPropType';
|
|
16
|
+
export { default as unstable_isMuiElement } from './isMuiElement';
|
|
17
|
+
export { default as unstable_ownerDocument } from './ownerDocument';
|
|
18
|
+
export { default as unstable_ownerWindow } from './ownerWindow';
|
|
19
|
+
export { default as unstable_requirePropFactory } from './requirePropFactory';
|
|
20
|
+
export { default as unstable_setRef } from './setRef';
|
|
21
|
+
export { default as unstable_useEnhancedEffect } from './useEnhancedEffect';
|
|
22
|
+
export { default as unstable_useId } from './useId';
|
|
23
|
+
export { default as unstable_unsupportedProp } from './unsupportedProp';
|
|
24
|
+
export { default as unstable_useControlled } from './useControlled';
|
|
25
|
+
export { default as unstable_useEventCallback } from './useEventCallback';
|
|
26
|
+
export { default as unstable_useForkRef } from './useForkRef';
|
|
27
|
+
export { default as unstable_useIsFocusVisible } from './useIsFocusVisible';
|
|
28
|
+
export { default as unstable_getScrollbarSize } from './getScrollbarSize';
|
|
29
|
+
export { detectScrollType as unstable_detectScrollType, getNormalizedScrollLeft as unstable_getNormalizedScrollLeft, } from './scrollLeft';
|
|
30
|
+
export { default as usePreviousProps } from './usePreviousProps';
|
|
31
|
+
export { default as visuallyHidden } from './visuallyHidden';
|
|
32
|
+
export { default as integerPropType } from './integerPropType';
|
|
33
|
+
export { default as internal_resolveProps } from './resolveProps';
|
|
34
|
+
export { default as unstable_composeClasses } from './composeClasses';
|
|
35
|
+
export { default as unstable_generateUtilityClass } from './generateUtilityClass';
|
|
36
|
+
export * from './generateUtilityClass';
|
|
37
|
+
export { default as unstable_generateUtilityClasses } from './generateUtilityClasses';
|
|
38
|
+
export { default as unstable_ClassNameGenerator } from './ClassNameGenerator';
|
package/index.js
CHANGED
package/integerPropType.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function getTypeByValue(value: any): any;
|
|
2
|
-
declare function _default(props: any, propName: any, ...other: any[]): RangeError | null;
|
|
3
|
-
declare namespace _default {
|
|
4
|
-
export { requiredInteger as isRequired };
|
|
5
|
-
}
|
|
6
|
-
export default _default;
|
|
7
|
-
declare function requiredInteger(props: any, propName: any, componentName: any, location: any): RangeError | null;
|
|
1
|
+
export function getTypeByValue(value: any): any;
|
|
2
|
+
declare function _default(props: any, propName: any, ...other: any[]): RangeError | null;
|
|
3
|
+
declare namespace _default {
|
|
4
|
+
export { requiredInteger as isRequired };
|
|
5
|
+
}
|
|
6
|
+
export default _default;
|
|
7
|
+
declare function requiredInteger(props: any, propName: any, componentName: any, location: any): RangeError | null;
|
package/isMuiElement.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function isMuiElement(element: any, muiNames: readonly string[]): boolean;
|
|
1
|
+
export default function isMuiElement(element: any, muiNames: readonly string[]): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export default function composeClasses(slots, getUtilityClass
|
|
1
|
+
export default function composeClasses(slots, getUtilityClass) {
|
|
2
|
+
var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
2
3
|
var output = {};
|
|
3
4
|
Object.keys(slots).forEach(
|
|
4
5
|
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
@@ -6,7 +7,10 @@ export default function composeClasses(slots, getUtilityClass, classes) {
|
|
|
6
7
|
function (slot) {
|
|
7
8
|
output[slot] = slots[slot].reduce(function (acc, key) {
|
|
8
9
|
if (key) {
|
|
9
|
-
|
|
10
|
+
var utilityClass = getUtilityClass(key);
|
|
11
|
+
if (utilityClass !== '') {
|
|
12
|
+
acc.push(utilityClass);
|
|
13
|
+
}
|
|
10
14
|
if (classes && classes[key]) {
|
|
11
15
|
acc.push(classes[key]);
|
|
12
16
|
}
|
package/legacy/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function composeClasses(slots, getUtilityClass, classes) {
|
|
1
|
+
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
4
|
// `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
@@ -6,7 +6,10 @@ export default function composeClasses(slots, getUtilityClass, classes) {
|
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
8
8
|
if (key) {
|
|
9
|
-
|
|
9
|
+
const utilityClass = getUtilityClass(key);
|
|
10
|
+
if (utilityClass !== '') {
|
|
11
|
+
acc.push(utilityClass);
|
|
12
|
+
}
|
|
10
13
|
if (classes && classes[key]) {
|
|
11
14
|
acc.push(classes[key]);
|
|
12
15
|
}
|
package/modern/index.js
CHANGED
package/ownerDocument.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ownerDocument(node: Node | null | undefined): Document;
|
|
1
|
+
export default function ownerDocument(node: Node | null | undefined): Document;
|
package/ownerWindow.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ownerWindow(node: Node | undefined): Window;
|
|
1
|
+
export default function ownerWindow(node: Node | undefined): Window;
|
package/package.json
CHANGED
package/ponyfillGlobal.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: any;
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: any;
|
|
2
|
+
export default _default;
|
package/refType.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
declare const refType: PropTypes.Requireable<object>;
|
|
3
|
-
export default refType;
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare const refType: PropTypes.Requireable<object>;
|
|
3
|
+
export default refType;
|
package/resolveProps.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
3
|
-
* @param {object} defaultProps
|
|
4
|
-
* @param {object} props
|
|
5
|
-
* @returns {object} resolved props
|
|
6
|
-
*/
|
|
7
|
-
export default function resolveProps<T extends {
|
|
8
|
-
components?: Record<string, unknown>;
|
|
9
|
-
componentsProps?: Record<string, unknown>;
|
|
10
|
-
slots?: Record<string, unknown>;
|
|
11
|
-
slotProps?: Record<string, unknown>;
|
|
12
|
-
} & Record<string, unknown>>(defaultProps: T, props: T): T;
|
|
1
|
+
/**
|
|
2
|
+
* Add keys, values of `defaultProps` that does not exist in `props`
|
|
3
|
+
* @param {object} defaultProps
|
|
4
|
+
* @param {object} props
|
|
5
|
+
* @returns {object} resolved props
|
|
6
|
+
*/
|
|
7
|
+
export default function resolveProps<T extends {
|
|
8
|
+
components?: Record<string, unknown>;
|
|
9
|
+
componentsProps?: Record<string, unknown>;
|
|
10
|
+
slots?: Record<string, unknown>;
|
|
11
|
+
slotProps?: Record<string, unknown>;
|
|
12
|
+
} & Record<string, unknown>>(defaultProps: T, props: T): T;
|
package/setRef.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* TODO v5: consider making it private
|
|
4
|
-
*
|
|
5
|
-
* passes {value} to {ref}
|
|
6
|
-
*
|
|
7
|
-
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
8
|
-
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
9
|
-
* https://github.com/mui/material-ui/issues/13539
|
|
10
|
-
*
|
|
11
|
-
* Useful if you want to expose the ref of an inner component to the public API
|
|
12
|
-
* while still using it inside the component.
|
|
13
|
-
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
14
|
-
*/
|
|
15
|
-
export default function setRef<T>(ref: React.MutableRefObject<T | null> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* TODO v5: consider making it private
|
|
4
|
+
*
|
|
5
|
+
* passes {value} to {ref}
|
|
6
|
+
*
|
|
7
|
+
* WARNING: Be sure to only call this inside a callback that is passed as a ref.
|
|
8
|
+
* Otherwise, make sure to cleanup the previous {ref} if it changes. See
|
|
9
|
+
* https://github.com/mui/material-ui/issues/13539
|
|
10
|
+
*
|
|
11
|
+
* Useful if you want to expose the ref of an inner component to the public API
|
|
12
|
+
* while still using it inside the component.
|
|
13
|
+
* @param ref A ref callback or ref object. If anything falsy, this is a no-op.
|
|
14
|
+
*/
|
|
15
|
+
export default function setRef<T>(ref: React.MutableRefObject<T | null> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
|
package/useEventCallback.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
3
|
-
*/
|
|
4
|
-
export default function useEventCallback<Args extends unknown[], Return>(fn: (...args: Args) => Return): (...args: Args) => Return;
|
|
1
|
+
/**
|
|
2
|
+
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
3
|
+
*/
|
|
4
|
+
export default function useEventCallback<Args extends unknown[], Return>(fn: (...args: Args) => Return): (...args: Args) => Return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/useForkRef.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export default function useForkRef<Instance>(...refs: Array<React.Ref<Instance> | undefined>): React.RefCallback<Instance> | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function useForkRef<Instance>(...refs: Array<React.Ref<Instance> | undefined>): React.RefCallback<Instance> | null;
|
package/useId.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @example <div id={useId()} />
|
|
4
|
-
* @param idOverride
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
export default function useId(idOverride?: string): string | undefined;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @example <div id={useId()} />
|
|
4
|
+
* @param idOverride
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export default function useId(idOverride?: string): string | undefined;
|
package/useIsFocusVisible.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare function teardown(doc: Document): void;
|
|
3
|
-
export interface UseIsFocusVisibleResult {
|
|
4
|
-
isFocusVisibleRef: React.MutableRefObject<boolean>;
|
|
5
|
-
onBlur: (event: React.FocusEvent<any>) => void;
|
|
6
|
-
onFocus: (event: React.FocusEvent<any>) => void;
|
|
7
|
-
ref: React.Ref<unknown>;
|
|
8
|
-
}
|
|
9
|
-
export default function useIsFocusVisible(): UseIsFocusVisibleResult;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function teardown(doc: Document): void;
|
|
3
|
+
export interface UseIsFocusVisibleResult {
|
|
4
|
+
isFocusVisibleRef: React.MutableRefObject<boolean>;
|
|
5
|
+
onBlur: (event: React.FocusEvent<any>) => void;
|
|
6
|
+
onFocus: (event: React.FocusEvent<any>) => void;
|
|
7
|
+
ref: React.Ref<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export default function useIsFocusVisible(): UseIsFocusVisibleResult;
|
package/usePreviousProps.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const usePreviousProps: <T>(value: T) => Partial<T>;
|
|
2
|
-
export default usePreviousProps;
|
|
1
|
+
declare const usePreviousProps: <T>(value: T) => Partial<T>;
|
|
2
|
+
export default usePreviousProps;
|
package/visuallyHidden.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const visuallyHidden: import('react').CSSProperties;
|
|
2
|
-
export default visuallyHidden;
|
|
1
|
+
declare const visuallyHidden: import('react').CSSProperties;
|
|
2
|
+
export default visuallyHidden;
|