@mui/utils 5.14.4 → 5.14.5
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 +74 -4
- package/ClassNameGenerator/ClassNameGenerator.d.ts +6 -6
- package/ClassNameGenerator/index.d.ts +1 -1
- package/HTMLElementType/HTMLElementType.d.ts +3 -3
- package/HTMLElementType/index.d.ts +1 -1
- package/capitalize/capitalize.d.ts +1 -1
- package/capitalize/index.d.ts +1 -1
- package/chainPropTypes/chainPropTypes.d.ts +2 -2
- package/chainPropTypes/index.d.ts +1 -1
- package/composeClasses/composeClasses.d.ts +1 -1
- package/composeClasses/index.d.ts +1 -1
- package/createChainedFunction.d.ts +7 -7
- package/debounce/debounce.d.ts +4 -4
- package/debounce/index.d.ts +2 -2
- package/deepmerge.d.ts +5 -5
- package/elementAcceptingRef.d.ts +3 -3
- package/elementTypeAcceptingRef.d.ts +3 -3
- package/esm/generateUtilityClass/generateUtilityClass.js +3 -0
- package/exactProp/exactProp.d.ts +2 -2
- package/exactProp/index.d.ts +1 -1
- package/formatMuiErrorMessage.d.ts +6 -6
- package/generateUtilityClass/generateUtilityClass.d.ts +2 -2
- package/generateUtilityClass/generateUtilityClass.js +2 -0
- 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/generateUtilityClass/generateUtilityClass.js +3 -0
- package/legacy/index.js +1 -1
- package/modern/generateUtilityClass/generateUtilityClass.js +3 -0
- package/modern/index.js +1 -1
- package/ownerDocument/index.d.ts +1 -1
- package/ownerDocument/ownerDocument.d.ts +1 -1
- package/ownerWindow/index.d.ts +1 -1
- package/ownerWindow/ownerWindow.d.ts +1 -1
- package/package.json +1 -1
- package/ponyfillGlobal/index.d.ts +1 -1
- package/ponyfillGlobal/ponyfillGlobal.d.ts +2 -2
- package/refType.d.ts +3 -3
- package/resolveProps.d.ts +12 -12
- package/setRef.d.ts +15 -15
- package/useEnhancedEffect/index.d.ts +1 -1
- package/useEnhancedEffect/useEnhancedEffect.d.ts +3 -3
- package/useEventCallback/index.d.ts +1 -1
- package/useEventCallback/useEventCallback.d.ts +6 -6
- package/useEventCallback/useEventCallback.spec.d.ts +1 -1
- package/useForkRef/index.d.ts +1 -1
- package/useForkRef/useForkRef.d.ts +2 -2
- package/useId/index.d.ts +1 -1
- package/useId/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,75 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.5
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.4..master -->
|
|
6
|
+
|
|
7
|
+
_Aug 14, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- @mnajdova [made it easier to use third-party components in Base UI slots](https://mui.com/base-ui/getting-started/customization/#overriding-subcomponent-slots) with the introduction of the `prepareForSlot` utility (#38138)
|
|
12
|
+
|
|
13
|
+
### `@mui/material@5.14.5`
|
|
14
|
+
|
|
15
|
+
- ​<!-- 04 -->[TextField] Fix to handle `onClick` on root element (#38072) @LukasTy
|
|
16
|
+
|
|
17
|
+
### `@mui/codemod@5.14.5`
|
|
18
|
+
|
|
19
|
+
- ​<!-- 31 -->[codemod] Add v5.0.0/tree-view-moved-to-x codemod (#38248) @flaviendelangle
|
|
20
|
+
|
|
21
|
+
### `@mui/joy@5.0.0-beta.2`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 07 -->[Input][joy-ui] Fix the `FormHelperText` icon color (#38387) @TheNatkat
|
|
24
|
+
- ​<!-- 06 -->[Skeleton][joy-ui] Soften the pulse animation (#38384) @zanivan
|
|
25
|
+
- ​<!-- 05 -->[TabPanel][joy-ui] Add `keepMounted` prop (#38293) @decadef20
|
|
26
|
+
|
|
27
|
+
### `@mui/base@5.0.0-beta.11`
|
|
28
|
+
|
|
29
|
+
- ​<!-- 30 -->[base-ui] Remove the legacy Extend\* types (#38184) @michaldudak
|
|
30
|
+
- ​<!-- 29 -->[base-ui] Add `useModal` hook (#38187) @mnajdova
|
|
31
|
+
- ​<!-- 28 -->[base-ui] Add `prepareForSlot` util (#38138) @mnajdova
|
|
32
|
+
- ​<!-- 26 -->[useButton][base-ui] Fix tabIndex not being forwarded (#38417) @DiegoAndai
|
|
33
|
+
- ​<!-- 25 -->[useButton][base-ui] Fix onFocusVisible not being handled (#38399) @DiegoAndai
|
|
34
|
+
|
|
35
|
+
### Docs
|
|
36
|
+
|
|
37
|
+
- ​<!-- 32 -->[blog] Blog post for MUI X mid v6. Date Pickers, Data Grid, and Charts (#38241) @richbustos
|
|
38
|
+
- ​<!-- 35 -->[docs][base-ui] Update number input API docs (#38363) @mj12albert
|
|
39
|
+
- ​<!-- 29 -->[docs] Improve page transition speed (#38394) @oliviertassinari
|
|
40
|
+
- ​<!-- 28 -->[docs] Improve examples (#38398) @oliviertassinari
|
|
41
|
+
- ​<!-- 19 -->[docs][docs] Add `FileUpload` demo (#38420) @sai6855
|
|
42
|
+
- ​<!-- 18 -->[docs][joy-ui] Refine the Order Dashboard template design (#38395) @zanivan
|
|
43
|
+
- ​<!-- 17 -->[docs][material-ui][joy-ui] Simplify the Quickstart section on the Usage page (#38385) @danilo-leal
|
|
44
|
+
- ​<!-- 16 -->[docs][Menu][joy] Explain how to control the open state (#38355) @michaldudak
|
|
45
|
+
- ​<!-- 15 -->[docs][material] Revise the Support page (#38207) @samuelsycamore
|
|
46
|
+
- ​<!-- 14 -->[docs][material-ui] Remove incorrect `aria-label`s in extended variant examples of Floating Action Button (#37170) @ashleykolodziej
|
|
47
|
+
- ​<!-- 13 -->[docs][material-ui] Adjust slightly the installation page content (#38380) @danilo-leal
|
|
48
|
+
- ​<!-- 12 -->[docs][Switch] Fix the readOnly class name in docs (#38277) @michaldudak
|
|
49
|
+
- ​<!-- 11 -->[docs][TablePagination] Add Tailwind CSS & plain CSS introduction demo (#38286) @mnajdova
|
|
50
|
+
|
|
51
|
+
### Examples
|
|
52
|
+
|
|
53
|
+
- ​<!-- 10 -->[examples] Add Joy UI + Vite.js + TypeScript example app (#37406) @nithins1
|
|
54
|
+
|
|
55
|
+
### Core
|
|
56
|
+
|
|
57
|
+
- ​<!-- 30 -->[core] Consistent URL add leading / @oliviertassinari
|
|
58
|
+
- ​<!-- 27 -->[docs-infra] Fix rebase issue @oliviertassinari
|
|
59
|
+
- ​<!-- 26 -->[docs-infra] Fix typo in docs infra docs @oliviertassinari
|
|
60
|
+
- ​<!-- 25 -->[docs-infra] Fix nested list margin (#38456) @oliviertassinari
|
|
61
|
+
- ​<!-- 24 -->[docs-infra] Move the Diamond Sponsors to the TOC (#38410) @danilo-leal
|
|
62
|
+
- ​<!-- 22 -->[docs-infra] Move imports into page data (#38297) @alexfauquette
|
|
63
|
+
- ​<!-- 21 -->[docs-infra] Adjust heading styles (#38365) @danilo-leal
|
|
64
|
+
- ​<!-- 20 -->[docs-infra] Fix info callout border color (#38370) @danilo-leal
|
|
65
|
+
- ​<!-- 05 -->[website] Upgrade the homepage hero demos design (#38388) @danilo-leal
|
|
66
|
+
- ​<!-- 04 -->[website] Improve Base UI hero section demo (#38255) @danilo-leal
|
|
67
|
+
- ​<!-- 03 -->[website] Fix EmailSubscribe look (#38429) @oliviertassinari
|
|
68
|
+
- ​<!-- 02 -->[website] Link Discord in footer (#38369) @richbustos
|
|
69
|
+
- ​<!-- 01 -->[website] Clean up the `GetStartedButtons` component (#38256) @danilo-leal
|
|
70
|
+
|
|
71
|
+
All contributors of this release in alphabetical order: @alexfauquette, @ashleykolodziej, @danilo-leal, @decadef20, @DiegoAndai, @flaviendelangle, @LukasTy, @michaldudak, @mj12albert, @mnajdova, @nithins1, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @TheNatkat, @zanivan
|
|
72
|
+
|
|
3
73
|
## 5.14.4
|
|
4
74
|
|
|
5
75
|
<!-- generated comparing v5.14.3..master -->
|
|
@@ -3717,7 +3787,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
3717
3787
|
- [docs] Add webpack alias for legacy utils package (#33376) @jgbae
|
|
3718
3788
|
- [docs] Improve external link icons synonyms (#33257) @davidgarciab
|
|
3719
3789
|
- [examples] Update Base UI with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
|
|
3720
|
-
- [examples] Add
|
|
3790
|
+
- [examples] Add Base UI example (#33154) @siriwatknp
|
|
3721
3791
|
|
|
3722
3792
|
### Core
|
|
3723
3793
|
|
|
@@ -3736,7 +3806,7 @@ _Jul 4, 2022_
|
|
|
3736
3806
|
|
|
3737
3807
|
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
3738
3808
|
|
|
3739
|
-
- 🐛 Fixed an issue causing
|
|
3809
|
+
- 🐛 Fixed an issue causing TypeScript errors when building a project with Material UI v5.8.6 (@michaldudak)
|
|
3740
3810
|
- 🐛 Fixed a few bugs in Material UI components. Thanks @henriqueholtz, @jake-collibra, @MattiasMartens and @TimoWilhelm!
|
|
3741
3811
|
- many other 🐛 bug fixes and 📚 documentation improvements
|
|
3742
3812
|
|
|
@@ -3765,7 +3835,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
3765
3835
|
|
|
3766
3836
|
### `@mui/base@5.0.0-alpha.88`
|
|
3767
3837
|
|
|
3768
|
-
- [base] Remove a type incompatible with
|
|
3838
|
+
- [base] Remove a type incompatible with TypeScript 3.5 (#33361) @michaldudak
|
|
3769
3839
|
- [BadgeUnstyled] Export BadgeUnstyledOwnProps interface to fix typescript compiler error (#33314) @aaronlademann-wf
|
|
3770
3840
|
- [TablePaginationUnstyled] Accept callbacks in componentsProps (#33309) @michaldudak
|
|
3771
3841
|
|
|
@@ -10382,7 +10452,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
|
|
|
10382
10452
|
- [theme] Add htmlFontSize to Typography interface (#23412) @fergusmcdonald
|
|
10383
10453
|
- [Tooltip] Fix PopperProps popper modifiers not being merged properly (#23421) @dominique-mueller
|
|
10384
10454
|
- [Tooltip] Long press select text on iOS (#23466) @hmaddisb
|
|
10385
|
-
- [Tooltip] Unexpected
|
|
10455
|
+
- [Tooltip] Unexpected behavior onOpen/onClose (#23482) @brorlarsnicklas
|
|
10386
10456
|
|
|
10387
10457
|
### `@material-ui/lab@v5.0.0-alpha.16`
|
|
10388
10458
|
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './HTMLElementType';
|
|
1
|
+
export { default } from './HTMLElementType';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function capitalize(string: string): string;
|
|
1
|
+
export default function capitalize(string: string): string;
|
package/capitalize/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './capitalize';
|
|
1
|
+
export { default } from './capitalize';
|
|
@@ -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 } from './chainPropTypes';
|
|
1
|
+
export { default } from './chainPropTypes';
|
|
@@ -1 +1 @@
|
|
|
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>;
|
|
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>;
|
|
@@ -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/debounce/debounce.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface Cancelable {
|
|
2
|
-
clear(): void;
|
|
3
|
-
}
|
|
4
|
-
export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number): T & Cancelable;
|
|
1
|
+
export interface Cancelable {
|
|
2
|
+
clear(): void;
|
|
3
|
+
}
|
|
4
|
+
export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number): T & Cancelable;
|
package/debounce/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './debounce';
|
|
2
|
-
export * from './debounce';
|
|
1
|
+
export { default } from './debounce';
|
|
2
|
+
export * from './debounce';
|
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,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
const globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
package/exactProp/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>;
|
package/exactProp/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './exactProp';
|
|
1
|
+
export { default } from './exactProp';
|
|
@@ -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;
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = generateUtilityClass;
|
|
8
8
|
var _ClassNameGenerator = _interopRequireDefault(require("../ClassNameGenerator"));
|
|
9
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
10
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
9
11
|
const globalStateClassesMapping = {
|
|
10
12
|
active: 'active',
|
|
11
13
|
checked: 'checked',
|
|
@@ -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,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
var globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
package/legacy/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
const globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
package/modern/index.js
CHANGED
package/ownerDocument/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ownerDocument';
|
|
1
|
+
export { default } from './ownerDocument';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ownerDocument(node: Node | null | undefined): Document;
|
|
1
|
+
export default function ownerDocument(node: Node | null | undefined): Document;
|
package/ownerWindow/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ownerWindow';
|
|
1
|
+
export { default } from './ownerWindow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ownerWindow(node: Node | undefined): Window;
|
|
1
|
+
export default function ownerWindow(node: Node | undefined): Window;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ponyfillGlobal';
|
|
1
|
+
export { default } from './ponyfillGlobal';
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './useEnhancedEffect';
|
|
1
|
+
export { default } from './useEnhancedEffect';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const useEnhancedEffect: typeof React.useLayoutEffect;
|
|
3
|
-
export default useEnhancedEffect;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const useEnhancedEffect: typeof React.useLayoutEffect;
|
|
3
|
+
export default useEnhancedEffect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './useEventCallback';
|
|
1
|
+
export { default } from './useEventCallback';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
3
|
-
*/
|
|
4
|
-
declare function useEventCallback<Fn extends (...args: any[]) => any = (...args: unknown[]) => unknown>(fn: Fn): Fn;
|
|
5
|
-
declare function useEventCallback<Args extends unknown[], Return>(fn: (...args: Args) => Return): (...args: Args) => Return;
|
|
6
|
-
export default useEventCallback;
|
|
1
|
+
/**
|
|
2
|
+
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
3
|
+
*/
|
|
4
|
+
declare function useEventCallback<Fn extends (...args: any[]) => any = (...args: unknown[]) => unknown>(fn: Fn): Fn;
|
|
5
|
+
declare function useEventCallback<Args extends unknown[], Return>(fn: (...args: Args) => Return): (...args: Args) => Return;
|
|
6
|
+
export default useEventCallback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/useForkRef/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './useForkRef';
|
|
1
|
+
export { default } from './useForkRef';
|
|
@@ -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/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './useId';
|
|
1
|
+
export { default } from './useId';
|
package/useId/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.RefCallback<Element>;
|
|
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.RefCallback<Element>;
|
|
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;
|