@mui/utils 5.10.16 → 5.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +204 -0
- 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/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/resolveProps.js +19 -1
- 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/index.js +1 -1
- package/legacy/resolveProps.js +19 -1
- package/modern/index.js +1 -1
- package/modern/resolveProps.js +19 -1
- package/ownerDocument.d.ts +1 -1
- package/ownerWindow.d.ts +1 -1
- package/package.json +2 -2
- package/ponyfillGlobal.d.ts +2 -2
- package/refType.d.ts +3 -3
- package/resolveProps.d.ts +12 -9
- package/resolveProps.js +19 -1
- 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,209 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.11.1
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.11.0..master -->
|
|
6
|
+
|
|
7
|
+
_Dec 20, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 💅 @mnajdova added motion and shape design tokens to Material You package (#35384 and #35393).
|
|
12
|
+
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.11.1`
|
|
15
|
+
|
|
16
|
+
- [Chip] Fix hover and focus style with CSS Variables (#35502) @DimaAbr
|
|
17
|
+
- [InputLabel] Enable `size` prop overrides via TypeScript module augmentation (#35460) @MickaelAustoni
|
|
18
|
+
- [l10n] Change Kazakh locale name to match ISO-639-1 codes (#34664) @talgautb
|
|
19
|
+
- [TextField] Fix error focus style (#35167) @42tte
|
|
20
|
+
- [core] Bring `experimental_sx` back with error code (#35528) @siriwatknp
|
|
21
|
+
|
|
22
|
+
### `@mui/utils@5.11.1`
|
|
23
|
+
|
|
24
|
+
- [Theme] Merge components and slots props (#35477) @siriwatknp
|
|
25
|
+
|
|
26
|
+
### `@mui/material-next@6.0.0-alpha.67`
|
|
27
|
+
|
|
28
|
+
- [Material You] Add motion design tokens (#35384) @mnajdova
|
|
29
|
+
- [Material You] Add shape design tokens (#35393) @mnajdova
|
|
30
|
+
|
|
31
|
+
### `@mui/joy@5.0.0-alpha.59`
|
|
32
|
+
|
|
33
|
+
- [Tooltip] Fix arrow does not appear (#35473) @siriwatknp
|
|
34
|
+
- [Input] Fix autofill styles (#35056) @siriwatknp
|
|
35
|
+
- [ChipDelete] Add onDelete prop to ChipDelete (#35412) @sai6855
|
|
36
|
+
|
|
37
|
+
### `@mui/base@5.0.0-alpha.111`
|
|
38
|
+
|
|
39
|
+
- [Button][base] Set active class when a subcomponent is clicked (#35410) @michaldudak
|
|
40
|
+
- [Popper][base] Fix Tooltip Anchor Element Setter (#35469) @sydneyjodon-wk
|
|
41
|
+
|
|
42
|
+
### Docs
|
|
43
|
+
|
|
44
|
+
- [docs] Fixed the `Select` component `onChange` event type in the migration guide (#35509) @tzynwang
|
|
45
|
+
- [docs] Add missing comma to `Providing the colors directly` section (#35507) @cassidoo
|
|
46
|
+
- [docs] Add `CardMedia` example without `component="img"` prop (#35470) @lucasmfredmark
|
|
47
|
+
- [docs] Fix `unstable_sxConfig` typo (#35478) @siriwatknp
|
|
48
|
+
- [docs] List component introduction example default code is missing ListItemContent component (#35492) @Miigaarino
|
|
49
|
+
- [website] Close our first people role @oliviertassinari
|
|
50
|
+
- [website] Update product icons (#35413) @danilo-leal
|
|
51
|
+
|
|
52
|
+
### Core
|
|
53
|
+
|
|
54
|
+
- [test] Terminate BrowserStack after 5 minutes (#35454) @oliviertassinari
|
|
55
|
+
- [test] Fix broken master branch (#35446) @oliviertassinari
|
|
56
|
+
|
|
57
|
+
All contributors of this release in alphabetical order: @42tte, @cassidoo, @danilo-leal, @DimaAbr, @lucasmfredmark, @michaldudak, @MickaelAustoni, @Miigaarino, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @sydneyjodon-wk, @talgautb, @tzynwang
|
|
58
|
+
|
|
59
|
+
## 5.11.0
|
|
60
|
+
|
|
61
|
+
<!-- generated comparing v5.10.17..master -->
|
|
62
|
+
|
|
63
|
+
_Dec 13, 2022_
|
|
64
|
+
|
|
65
|
+
A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
66
|
+
|
|
67
|
+
- 🔥 @mnajdova enabled configuration of the `sx` prop in the `theme` (#35150)
|
|
68
|
+
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
69
|
+
|
|
70
|
+
### `@mui/material@5.11.0`
|
|
71
|
+
|
|
72
|
+
- [Alert] Update icon color in all variants (#35414) @danilo-leal
|
|
73
|
+
- [Select] Fix `MenuProps.PopoverClasses` being overriden (#35394) @vitorfrs-dev
|
|
74
|
+
- [SwipeableDrawer] Fixed typescript warning "prop open undefined" (#34710) @kraftware
|
|
75
|
+
|
|
76
|
+
### `@mui/icons-material@5.11.0`
|
|
77
|
+
|
|
78
|
+
- [icons] Restore the PhoneInTalk icons (#35409) @michaldudak
|
|
79
|
+
|
|
80
|
+
### `@mui/system@5.11.0`
|
|
81
|
+
|
|
82
|
+
#### BREAKING CHANGES
|
|
83
|
+
|
|
84
|
+
- [system] Enable configuring the `sx` prop in the `theme` (#35150) @mnajdova
|
|
85
|
+
|
|
86
|
+
The breaking change is regarding an experimental API:
|
|
87
|
+
|
|
88
|
+
```diff
|
|
89
|
+
-import { styled, experimental_sx } from '@mui/material/styles';
|
|
90
|
+
+import { styled } from '@mui/material/styles';
|
|
91
|
+
|
|
92
|
+
-const Component = styled('div)(experimental_sx({ p: 1 }});
|
|
93
|
+
+const Component = styled('div)(({ theme }) => theme.unstable_sx({ p: 1 }});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `@mui/joy@5.0.0-alpha.58`
|
|
97
|
+
|
|
98
|
+
- [Joy] Miscellaneous fixes (#35447) @siriwatknp
|
|
99
|
+
|
|
100
|
+
### `@mui/base@5.0.0-alpha.110`
|
|
101
|
+
|
|
102
|
+
- [PopperUnstyled] Update PopperTooltip to have correct width when closing with transition (#34714) @EduardoSCosta
|
|
103
|
+
|
|
104
|
+
### `@mui/material-next@6.0.0-alpha.66`
|
|
105
|
+
|
|
106
|
+
- [Material You] Add ripple on the button (#35299) @mnajdova
|
|
107
|
+
|
|
108
|
+
### Docs
|
|
109
|
+
|
|
110
|
+
- [docs] Simplify state management in Text Field demo page (#35051) @PratikDev
|
|
111
|
+
- [docs] Improve `Responsive App bar with Drawer` demo (#35418) @ZeeshanTamboli
|
|
112
|
+
- [docs] Improve line-height readability (#35387) @oliviertassinari
|
|
113
|
+
- [docs] Improve a bit the Composition docs (#35329) @oliviertassinari
|
|
114
|
+
- [docs] Refactor `ToggleButtonSizes` demo (#35375) @Armanio
|
|
115
|
+
- [docs] Standardize the usage of callouts in the MUI Core docs (#35361) @samuelsycamore
|
|
116
|
+
- [docs] Format feedback to add a link to the commented section (#35381) @alexfauquette
|
|
117
|
+
- [docs] Direct users from Material UI to MUI Base for duplicated components (#35293) @samuelsycamore
|
|
118
|
+
- [docs] Fix typo in FormControl API docs (#35449) @Spanishiwa
|
|
119
|
+
- [docs] Update callouts design (#35390) @danilo-leal
|
|
120
|
+
- [website] New wave of open roles (#35240) @mnajdova
|
|
121
|
+
- [website] Developer survey 2022 (#35407) @joserodolfofreitas
|
|
122
|
+
|
|
123
|
+
### Core
|
|
124
|
+
|
|
125
|
+
- [core] Fix @mui/material package building (#35324) @timbset
|
|
126
|
+
- [core] Fix leaking theme color override (#35444) @oliviertassinari
|
|
127
|
+
- [typescript] Add null to return type of OverridableComponent (#35311) @tsollbach
|
|
128
|
+
- [website] Migrate X page to use CSS theme variables (#34922) @jesrodri
|
|
129
|
+
- [website] Migrate `/core` page to use CSS variables (#35366) @siriwatknp
|
|
130
|
+
|
|
131
|
+
All contributors of this release in alphabetical order: @alexfauquette, @Armanio, @danilo-leal, @EduardoSCosta, @flaviendelangle, @jesrodri, @joserodolfofreitas, @kraftware, @michaldudak, @mnajdova, @oliviertassinari, @PratikDev, @samuelsycamore, @siriwatknp, @Spanishiwa, @timbset, @tsollbach, @vitorfrs-dev, @ZeeshanTamboli
|
|
132
|
+
|
|
133
|
+
## 5.10.17
|
|
134
|
+
|
|
135
|
+
<!-- generated comparing v5.10.16..master -->
|
|
136
|
+
|
|
137
|
+
_Dec 6, 2022_
|
|
138
|
+
|
|
139
|
+
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
140
|
+
|
|
141
|
+
- ✨ @mnajdova added a [Material You Button playground](https://mui.com/material-ui/react-button/#material-you-version) (#35222)
|
|
142
|
+
- 🔧 @hbjORbj renamed `components` / `componentProps` to `slots` / `slotProps` prop in Joy UI to create consistency across products (#34997)
|
|
143
|
+
- Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
|
|
144
|
+
|
|
145
|
+
### `@mui/material@5.10.17`
|
|
146
|
+
|
|
147
|
+
- ​<!-- 31 -->[Slider] Fix `markActive` theme class not getting applied (#35067) @ZeeshanTamboli
|
|
148
|
+
- ​<!-- 30 -->[SwipeableDrawer] Fix missing close animation when initial open is true (#35010) @sai6855
|
|
149
|
+
- ​<!-- 28 -->[material-ui] Add channel colors if possible (#35178) @siriwatknp
|
|
150
|
+
- ​<!-- 10 -->[Fab] Increase disabled styles precedence (#35304) @Uzwername
|
|
151
|
+
- ​<!-- 05 -->[Rating] Apply `labelEmptyValueActive` style overrides from theme (#35315) @sai6855
|
|
152
|
+
|
|
153
|
+
### `@mui/system@5.10.17`
|
|
154
|
+
|
|
155
|
+
- ​<!-- 04 -->[system] Add support for nested CssVarsProvider (#35277) @siriwatknp
|
|
156
|
+
|
|
157
|
+
### `@mui/joy@5.0.0-alpha.57`
|
|
158
|
+
|
|
159
|
+
#### BREAKING CHANGE
|
|
160
|
+
|
|
161
|
+
- ​<!-- 08 -->[Joy] Add `slots`/`slotProps` props to the typing of all components and apply `useSlot` to all components (#34997) @hbjORbj
|
|
162
|
+
|
|
163
|
+
- Change all occurrences of `components` and `componentsProps` props in Joy UI components to `slots` and `slotProps`, respectively.
|
|
164
|
+
|
|
165
|
+
```diff
|
|
166
|
+
-<Autocomplete components={{listbox: CustomListbox}} componentsProps={{listbox: { className: 'custom-listbox' }}} />
|
|
167
|
+
+<Autocomplete slots={{listbox: CustomListbox}} slotProps={{listbox: { className: 'custom-listbox' }}} />
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
You can use this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-rename-components-to-slots) to help with the migration.
|
|
171
|
+
|
|
172
|
+
#### Changes
|
|
173
|
+
|
|
174
|
+
- ​<!-- 07 -->[Joy] Miscellaneous fixes (#35345) @siriwatknp
|
|
175
|
+
- ​<!-- 06 -->[Joy][textarea] Expose decorator classes (#35247) @zignis
|
|
176
|
+
|
|
177
|
+
### Docs
|
|
178
|
+
|
|
179
|
+
- ​<!-- 29 -->[docs] Improve spacing with ul (#35302) @oliviertassinari
|
|
180
|
+
- ​<!-- 23 -->[docs] Correct grammatically incorrect sentences in CONTRIBUTING.md (#34949) @Pandey-utkarsh
|
|
181
|
+
- ​<!-- 22 -->[docs] Move the demo higher in the API TOC (#35202) @oliviertassinari
|
|
182
|
+
- ​<!-- 21 -->[docs] Fix incorrect link in minimizing-bundle-size (#35297) @Juneezee
|
|
183
|
+
- ​<!-- 20 -->[docs] Revise and expand Joy UI "Breadcrumbs" page (#35292) @samuelsycamore
|
|
184
|
+
- ​<!-- 19 -->[docs] Fix wrong import in the unstyled tabs page (#35310) @guotie
|
|
185
|
+
- ​<!-- 18 -->[docs] Disable translations (#34820) @mnajdova
|
|
186
|
+
- ​<!-- 17 -->[docs] Fix typo (#35312) @flaviendelangle
|
|
187
|
+
- ​<!-- 16 -->[docs] Add Material You Button playground (#35222) @mnajdova
|
|
188
|
+
- ​<!-- 15 -->[docs] Fix experimental API page duplication (#35213) @oliviertassinari
|
|
189
|
+
- ​<!-- 14 -->[docs] Improve the autogenerated "Unstyled" and "API" text (#35185) @samuelsycamore
|
|
190
|
+
- ​<!-- 13 -->[docs] Fix ad margin on API pages (#35201) @oliviertassinari
|
|
191
|
+
- ​<!-- 12 -->[docs] Revise and expand the Joy UI "Badge" page (#35199) @samuelsycamore
|
|
192
|
+
- ​<!-- 11 -->[docs] Update MUI Base docs with latest style conventions (#35034) @samuelsycamore
|
|
193
|
+
- ​<!-- 09 -->[l10n] Improve Chinese (Taiwan) zh-TW locale (#35328) @happyincent
|
|
194
|
+
- ​<!-- 02 -->[website] Update MUI stats: GitHub stars, Twitter followers, etc. (#35318) @nomandhoni-cs
|
|
195
|
+
|
|
196
|
+
### Core
|
|
197
|
+
|
|
198
|
+
- ​<!-- 27 -->[core] Use componentStyles.name over componentName (#35303) @oliviertassinari
|
|
199
|
+
- ​<!-- 26 -->[core] Fix warning leak in production (#35313) @oliviertassinari
|
|
200
|
+
- ​<!-- 25 -->[core] Move the internal packages from docs/packages (#35305) @michaldudak
|
|
201
|
+
- ​<!-- 24 -->[core] Clean up the API docs generation scripts (#35244) @michaldudak
|
|
202
|
+
- ​<!-- 03 -->[test] Scope the tests to just Material UI components (#35219) @siriwatknp
|
|
203
|
+
- ​<!-- 01 -->[website] Remove BlackFriday notification @oliviertassinari
|
|
204
|
+
|
|
205
|
+
All contributors of this release in alphabetical order: @flaviendelangle, @guotie, @happyincent, @hbjORbj, @Juneezee, @michaldudak, @mnajdova, @nomandhoni-cs, @oliviertassinari, @Pandey-utkarsh, @sai6855, @samuelsycamore, @siriwatknp, @Uzwername, @zignis
|
|
206
|
+
|
|
3
207
|
## 5.10.16
|
|
4
208
|
|
|
5
209
|
<!-- generated comparing v5.10.15..master -->
|
|
@@ -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: 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/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;
|
package/esm/resolveProps.js
CHANGED
|
@@ -8,7 +8,25 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
8
8
|
export default function resolveProps(defaultProps, props) {
|
|
9
9
|
const output = _extends({}, props);
|
|
10
10
|
Object.keys(defaultProps).forEach(propName => {
|
|
11
|
-
if (
|
|
11
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
12
|
+
output[propName] = _extends({}, defaultProps[propName], output[propName]);
|
|
13
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
14
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
15
|
+
const slotProps = props[propName];
|
|
16
|
+
output[propName] = {};
|
|
17
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
18
|
+
// Reduce the iteration if the slot props is empty
|
|
19
|
+
output[propName] = defaultSlotProps;
|
|
20
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
21
|
+
// Reduce the iteration if the default slot props is empty
|
|
22
|
+
output[propName] = slotProps;
|
|
23
|
+
} else {
|
|
24
|
+
output[propName] = _extends({}, slotProps);
|
|
25
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
26
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
} else if (output[propName] === undefined) {
|
|
12
30
|
output[propName] = defaultProps[propName];
|
|
13
31
|
}
|
|
14
32
|
});
|
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' | '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' | '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;
|
package/legacy/index.js
CHANGED
package/legacy/resolveProps.js
CHANGED
|
@@ -8,7 +8,25 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
8
8
|
export default function resolveProps(defaultProps, props) {
|
|
9
9
|
var output = _extends({}, props);
|
|
10
10
|
Object.keys(defaultProps).forEach(function (propName) {
|
|
11
|
-
if (
|
|
11
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
12
|
+
output[propName] = _extends({}, defaultProps[propName], output[propName]);
|
|
13
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
14
|
+
var defaultSlotProps = defaultProps[propName] || {};
|
|
15
|
+
var slotProps = props[propName];
|
|
16
|
+
output[propName] = {};
|
|
17
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
18
|
+
// Reduce the iteration if the slot props is empty
|
|
19
|
+
output[propName] = defaultSlotProps;
|
|
20
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
21
|
+
// Reduce the iteration if the default slot props is empty
|
|
22
|
+
output[propName] = slotProps;
|
|
23
|
+
} else {
|
|
24
|
+
output[propName] = _extends({}, slotProps);
|
|
25
|
+
Object.keys(defaultSlotProps).forEach(function (slotPropName) {
|
|
26
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
} else if (output[propName] === undefined) {
|
|
12
30
|
output[propName] = defaultProps[propName];
|
|
13
31
|
}
|
|
14
32
|
});
|
package/modern/index.js
CHANGED
package/modern/resolveProps.js
CHANGED
|
@@ -8,7 +8,25 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
8
8
|
export default function resolveProps(defaultProps, props) {
|
|
9
9
|
const output = _extends({}, props);
|
|
10
10
|
Object.keys(defaultProps).forEach(propName => {
|
|
11
|
-
if (
|
|
11
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
12
|
+
output[propName] = _extends({}, defaultProps[propName], output[propName]);
|
|
13
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
14
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
15
|
+
const slotProps = props[propName];
|
|
16
|
+
output[propName] = {};
|
|
17
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
18
|
+
// Reduce the iteration if the slot props is empty
|
|
19
|
+
output[propName] = defaultSlotProps;
|
|
20
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
21
|
+
// Reduce the iteration if the default slot props is empty
|
|
22
|
+
output[propName] = slotProps;
|
|
23
|
+
} else {
|
|
24
|
+
output[propName] = _extends({}, slotProps);
|
|
25
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
26
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
} else if (output[propName] === undefined) {
|
|
12
30
|
output[propName] = defaultProps[propName];
|
|
13
31
|
}
|
|
14
32
|
});
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Utility functions for React components.",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react": "^17.0.0 || ^18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/runtime": "^7.20.
|
|
32
|
+
"@babel/runtime": "^7.20.6",
|
|
33
33
|
"@types/prop-types": "^15.7.5",
|
|
34
34
|
"@types/react-is": "^16.7.1 || ^17.0.0",
|
|
35
35
|
"prop-types": "^15.8.1",
|
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,9 +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
|
-
|
|
9
|
-
|
|
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/resolveProps.js
CHANGED
|
@@ -15,7 +15,25 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
function resolveProps(defaultProps, props) {
|
|
16
16
|
const output = (0, _extends2.default)({}, props);
|
|
17
17
|
Object.keys(defaultProps).forEach(propName => {
|
|
18
|
-
if (
|
|
18
|
+
if (propName.toString().match(/^(components|slots)$/)) {
|
|
19
|
+
output[propName] = (0, _extends2.default)({}, defaultProps[propName], output[propName]);
|
|
20
|
+
} else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
|
|
21
|
+
const defaultSlotProps = defaultProps[propName] || {};
|
|
22
|
+
const slotProps = props[propName];
|
|
23
|
+
output[propName] = {};
|
|
24
|
+
if (!slotProps || !Object.keys(slotProps)) {
|
|
25
|
+
// Reduce the iteration if the slot props is empty
|
|
26
|
+
output[propName] = defaultSlotProps;
|
|
27
|
+
} else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
|
|
28
|
+
// Reduce the iteration if the default slot props is empty
|
|
29
|
+
output[propName] = slotProps;
|
|
30
|
+
} else {
|
|
31
|
+
output[propName] = (0, _extends2.default)({}, slotProps);
|
|
32
|
+
Object.keys(defaultSlotProps).forEach(slotPropName => {
|
|
33
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
} else if (output[propName] === undefined) {
|
|
19
37
|
output[propName] = defaultProps[propName];
|
|
20
38
|
}
|
|
21
39
|
});
|
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: (value: object) => object;
|
|
2
|
-
export default usePreviousProps;
|
|
1
|
+
declare const usePreviousProps: (value: object) => object;
|
|
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;
|