@mui/utils 5.14.3 → 5.14.4
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 +102 -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/composeClasses.js +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/composeClasses/composeClasses.js +1 -1
- 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/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 +1 -1
- package/legacy/index.js +1 -1
- package/modern/composeClasses/composeClasses.js +1 -1
- 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,103 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.4
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.3..master -->
|
|
6
|
+
|
|
7
|
+
_Aug 8, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🎉 Added [Number input](https://mui.com/base-ui/react-number-input) component & [useNumberInput](https://mui.com/base-ui/react-number-input#hook) hook in [Base UI](https://mui.com/base-ui/getting-started/) @mj12albert
|
|
12
|
+
|
|
13
|
+
### `@mui/material@5.14.4`
|
|
14
|
+
|
|
15
|
+
- ​<!-- 25 -->[Checkbox][material] Add size classes (#38182) @michaldudak
|
|
16
|
+
- ​<!-- 03 -->[Typography] Improve inherit variant logic (#38123) @ZeeshanTamboli
|
|
17
|
+
|
|
18
|
+
### `@mui/system@5.14.4`
|
|
19
|
+
|
|
20
|
+
- ​<!-- 34 -->Revert "[Box] Remove `component` from TypeMap (#38168)" (#38356) @michaldudak
|
|
21
|
+
|
|
22
|
+
### `@mui/base@5.0.0-beta.10`
|
|
23
|
+
|
|
24
|
+
#### Breaking changes
|
|
25
|
+
|
|
26
|
+
- ​<!-- 32 -->[base] Ban default exports (#38200) @michaldudak
|
|
27
|
+
|
|
28
|
+
Base UI default exports were changed to named ones. Previously we had a mix of default and named ones.
|
|
29
|
+
This was changed to improve consistency and avoid problems some bundlers have with default exports.
|
|
30
|
+
See https://github.com/mui/material-ui/issues/21862 for more context.
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
- import Button, { buttonClasses } from '@mui/base/Button';
|
|
34
|
+
+ import { Button, buttonClasses } from '@mui/base/Button';
|
|
35
|
+
- import BaseMenu from '@mui/base/Menu';
|
|
36
|
+
+ import { Menu as BaseMenu } from '@mui/base/Menu';
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Additionally, the `ClassNameGenerator` has been moved to the directory matching its name:
|
|
40
|
+
|
|
41
|
+
```diff
|
|
42
|
+
- import ClassNameGenerator from '@mui/base/className';
|
|
43
|
+
+ import { ClassNameGenerator } from '@mui/base/ClassNameGenerator';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
A codemod is provided to help with the migration:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx @mui/codemod v5.0.0/base-use-named-imports <path>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Changes
|
|
53
|
+
|
|
54
|
+
- ​<!-- 31 -->[base] Create useNumberInput and NumberInput (#36119) @mj12albert
|
|
55
|
+
- ​<!-- 28 -->[Select][base] Fix flicker on click of controlled Select button (#37855) @VishruthR
|
|
56
|
+
- ​<!-- 09 -->[Dropdown] Fix imports of types (#38296) @yash-thakur
|
|
57
|
+
|
|
58
|
+
### `@mui/joy@5.0.0-beta.1`
|
|
59
|
+
|
|
60
|
+
- ​<!-- 06 -->[joy-ui][MenuButton] Fix disable of `MenuButton` (#38342) @sai6855
|
|
61
|
+
|
|
62
|
+
### Docs
|
|
63
|
+
|
|
64
|
+
- ​<!-- 33 -->[docs][AppBar] Fix `ResponsiveAppBar` demo logo href (#38346) @iownthegame
|
|
65
|
+
- ​<!-- 30 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Button page (#38240) @alisasanib
|
|
66
|
+
- ​<!-- 29 -->[docs][Menu][base] Remove `Unstyled` prefix from demos' function names (#38270) @sai6855
|
|
67
|
+
- ​<!-- 22 -->[docs] Add themeable component guide (#37908) @siriwatknp
|
|
68
|
+
- ​<!-- 21 -->[docs] Fix Joy UI demo background color (#38307) @oliviertassinari
|
|
69
|
+
- ​<!-- 20 -->[docs] Update API docs for Number Input component (#38301) @ZeeshanTamboli
|
|
70
|
+
- ​<!-- 14 -->[docs][joy-ui] Revise the theme typography page (#38285) @danilo-leal
|
|
71
|
+
- ​<!-- 13 -->[docs][joy-ui] Add TS demo for Menu Bar (#38308) @sai6855
|
|
72
|
+
- ​<!-- 10 -->[docs][joy-ui] Updated Typography callout at getting started (#38289) @zanivan
|
|
73
|
+
- ​<!-- 12 -->[docs][joy-ui] Fix the Inter font installation instructions (#38284) @danilo-leal
|
|
74
|
+
- ​<!-- 11 -->[docs][material] Add note to Autocomplete about ref forwarding (#38305) @samuelsycamore
|
|
75
|
+
- ​<!-- 05 -->[docs][Skeleton] Make the demos feel more realistic (#38212) @oliviertassinari
|
|
76
|
+
|
|
77
|
+
- ​<!-- 08 -->[examples] Swap Next.js examples between App Router and Pages Router; update naming convention (#38204) @samuelsycamore
|
|
78
|
+
- ​<!-- 07 -->[examples][material-ui] Add Material UI + Next.js (App Router) example in JS (#38323) @samuelsycamore
|
|
79
|
+
- ​<!-- 27 -->[blog] Discord announcement blog (#38258) @richbustos
|
|
80
|
+
- ​<!-- 26 -->[blog] Fix 301 links to Toolpad @oliviertassinari
|
|
81
|
+
- ​<!-- 04 -->[website] Updating Charts demo with real charts usage for MUI X marketing page (#38317) @richbustos
|
|
82
|
+
- ​<!-- 03 -->[website] Adjust styles of the Product section on the homepage (#38366) @danilo-leal
|
|
83
|
+
- ​<!-- 02 -->[website] Add Nora teamMember card to 'About' (#38358) @noraleonte
|
|
84
|
+
- ​<!-- 01 -->[website] Fix image layout shift (#38326) @oliviertassinari
|
|
85
|
+
|
|
86
|
+
### Core
|
|
87
|
+
|
|
88
|
+
- ​<!-- 24 -->[core] Fix docs demo export function consistency (#38191) @oliviertassinari
|
|
89
|
+
- ​<!-- 23 -->[core] Fix the link-check script on Windows (#38276) @michaldudak
|
|
90
|
+
- ​<!-- 26 -->[core] Use @testing-library/user-event direct API (#38325) @mj12albert
|
|
91
|
+
- ​<!-- 29 -->[core] Port GitHub workflow for ensuring triage label is present (#38312) @DanailH
|
|
92
|
+
- ​<!-- 19 -->[docs-infra] Consider files ending with .types.ts as props files (#37533) @mnajdova
|
|
93
|
+
- ​<!-- 18 -->[docs-infra] Fix skip to content design (#38304) @oliviertassinari
|
|
94
|
+
- ​<!-- 17 -->[docs-infra] Add a general round of polish to the API content display (#38282) @danilo-leal
|
|
95
|
+
- ​<!-- 16 -->[docs-infra] Make the side nav collapse animation snappier (#38259) @danilo-leal
|
|
96
|
+
- ​<!-- 15 -->[docs-infra] New Component API design followup (#38183) @cherniavskii
|
|
97
|
+
- ​<!-- 06 -->[test] Remove unnecessary `async` keyword from test (#38373) @ZeeshanTamboli
|
|
98
|
+
|
|
99
|
+
All contributors of this release in alphabetical order: @alisasanib, @cherniavskii, @DanailH, @danilo-leal, @iownthegame, @michaldudak, @mj12albert, @mnajdova, @noraleonte, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @siriwatknp, @VishruthR, @yash-thakur, @zanivan, @ZeeshanTamboli
|
|
100
|
+
|
|
3
101
|
## 5.14.3
|
|
4
102
|
|
|
5
103
|
<!-- generated comparing v5.14.2..master -->
|
|
@@ -129,7 +227,7 @@ A big thanks to the 23 contributors who made this release possible.
|
|
|
129
227
|
- ​<!-- 19 -->[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal
|
|
130
228
|
- ​<!-- 18 -->[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai
|
|
131
229
|
- ​<!-- 17 -->[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla
|
|
132
|
-
- ​<!-- 16 -->[examples] Fix material-next
|
|
230
|
+
- ​<!-- 16 -->[examples] Fix material-next Font Usage with next/font (#38026) @onderonur
|
|
133
231
|
|
|
134
232
|
### Core
|
|
135
233
|
|
|
@@ -401,7 +499,7 @@ _Jun 21, 2023_
|
|
|
401
499
|
A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
|
|
402
500
|
|
|
403
501
|
- 💫 Added [Slider](https://mui.com/material-ui/react-slider/#material-you-version) component using the new Material You design language (#37520) @DiegoAndai.
|
|
404
|
-
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-
|
|
502
|
+
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
|
|
405
503
|
|
|
406
504
|
### `@mui/material@5.13.6`
|
|
407
505
|
|
|
@@ -462,7 +560,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
462
560
|
- ​<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
|
|
463
561
|
- ​<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
|
|
464
562
|
- ​<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
|
|
465
|
-
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-
|
|
563
|
+
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-ts example (#37675) @bablukpik
|
|
466
564
|
- ​<!-- 15 -->[examples] Next.js v13 app router with Material UI (#37315) @smo043
|
|
467
565
|
|
|
468
566
|
### Core
|
|
@@ -5109,7 +5207,7 @@ _Feb 1, 2022_
|
|
|
5109
5207
|
|
|
5110
5208
|
A big thanks to the 22 contributors who made this release possible. Here are some highlights ✨:
|
|
5111
5209
|
|
|
5112
|
-
- 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-vite) (#28241)
|
|
5210
|
+
- 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-ui-vite) (#28241)
|
|
5113
5211
|
- Number of 🐛 bug fixes and 📚 documentation improvements.
|
|
5114
5212
|
|
|
5115
5213
|
### `@mui/material@5.4.0`
|
|
@@ -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>;
|
|
@@ -7,7 +7,7 @@ exports.default = composeClasses;
|
|
|
7
7
|
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
8
8
|
const output = {};
|
|
9
9
|
Object.keys(slots).forEach(
|
|
10
|
-
// `
|
|
10
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
11
11
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
12
12
|
slot => {
|
|
13
13
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
|
-
// `
|
|
4
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5
5
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
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;
|
|
@@ -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;
|
|
@@ -2,7 +2,7 @@ export default function composeClasses(slots, getUtilityClass) {
|
|
|
2
2
|
var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
3
3
|
var output = {};
|
|
4
4
|
Object.keys(slots).forEach(
|
|
5
|
-
// `
|
|
5
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
6
6
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
7
7
|
function (slot) {
|
|
8
8
|
output[slot] = slots[slot].reduce(function (acc, key) {
|
package/legacy/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
|
-
// `
|
|
4
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5
5
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
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;
|