@mui/utils 5.10.15 → 5.11.0

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 CHANGED
@@ -1,5 +1,199 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.0
4
+
5
+ <!-- generated comparing v5.10.17..master -->
6
+
7
+ _Dec 13, 2022_
8
+
9
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🔥 @mnajdova enabled configuration of the `sx` prop in the `theme` (#35150)
12
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
13
+
14
+ ### `@mui/material@5.11.0`
15
+
16
+ - [Alert] Update icon color in all variants (#35414) @danilo-leal
17
+ - [Select] Fix `MenuProps.PopoverClasses` being overriden (#35394) @vitorfrs-dev
18
+ - [SwipeableDrawer] Fixed typescript warning "prop open undefined" (#34710) @kraftware
19
+
20
+ ### `@mui/icons-material@5.11.0`
21
+
22
+ - [icons] Restore the PhoneInTalk icons (#35409) @michaldudak
23
+
24
+ ### `@mui/system@5.11.0`
25
+
26
+ #### BREAKING CHANGES
27
+
28
+ - [system] Enable configuring the `sx` prop in the `theme` (#35150) @mnajdova
29
+
30
+ The breaking change is regarding an experimental API:
31
+
32
+ ```diff
33
+ -import { styled, experimental_sx } from '@mui/material/styles';
34
+ +import { styled } from '@mui/material/styles';
35
+
36
+ -const Component = styled('div)(experimental_sx({ p: 1 }});
37
+ +const Component = styled('div)(({ theme }) => theme.unstable_sx({ p: 1 }});
38
+ ```
39
+
40
+ ### `@mui/joy@5.0.0-alpha.58`
41
+
42
+ - [Joy] Miscellaneous fixes (#35447) @siriwatknp
43
+
44
+ ### `@mui/base@5.0.0-alpha.110`
45
+
46
+ - [PopperUnstyled] Update PopperTooltip to have correct width when closing with transition (#34714) @EduardoSCosta
47
+
48
+ ### `@mui/material-next@6.0.0-alpha.66`
49
+
50
+ - [Material You] Add ripple on the button (#35299) @mnajdova
51
+
52
+ ### Docs
53
+
54
+ - [docs] Simplify state management in Text Field demo page (#35051) @PratikDev
55
+ - [docs] Improve `Responsive App bar with Drawer` demo (#35418) @ZeeshanTamboli
56
+ - [docs] Improve line-height readability (#35387) @oliviertassinari
57
+ - [docs] Improve a bit the Composition docs (#35329) @oliviertassinari
58
+ - [docs] Refactor `ToggleButtonSizes` demo (#35375) @Armanio
59
+ - [docs] Standardize the usage of callouts in the MUI Core docs (#35361) @samuelsycamore
60
+ - [docs] Format feedback to add a link to the commented section (#35381) @alexfauquette
61
+ - [docs] Direct users from Material UI to MUI Base for duplicated components (#35293) @samuelsycamore
62
+ - [docs] Fix typo in FormControl API docs (#35449) @Spanishiwa
63
+ - [docs] Update callouts design (#35390) @danilo-leal
64
+ - [website] New wave of open roles (#35240) @mnajdova
65
+ - [website] Developer survey 2022 (#35407) @joserodolfofreitas
66
+
67
+ ### Core
68
+
69
+ - [core] Fix @mui/material package building (#35324) @timbset
70
+ - [core] Fix leaking theme color override (#35444) @oliviertassinari
71
+ - [typescript] Add null to return type of OverridableComponent (#35311) @tsollbach
72
+ - [website] Migrate X page to use CSS theme variables (#34922) @jesrodri
73
+ - [website] Migrate `/core` page to use CSS variables (#35366) @siriwatknp
74
+
75
+ 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
76
+
77
+ ## 5.10.17
78
+
79
+ <!-- generated comparing v5.10.16..master -->
80
+
81
+ _Dec 6, 2022_
82
+
83
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
84
+
85
+ - ✨ @mnajdova added a [Material You Button playground](https://mui.com/material-ui/react-button/#material-you-version) (#35222)
86
+ - 🔧 @hbjORbj renamed `components` / `componentProps` to `slots` / `slotProps` prop in Joy UI to create consistency across products (#34997)
87
+ - Many other 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements
88
+
89
+ ### `@mui/material@5.10.17`
90
+
91
+ - &#8203;<!-- 31 -->[Slider] Fix `markActive` theme class not getting applied (#35067) @ZeeshanTamboli
92
+ - &#8203;<!-- 30 -->[SwipeableDrawer] Fix missing close animation when initial open is true (#35010) @sai6855
93
+ - &#8203;<!-- 28 -->[material-ui] Add channel colors if possible (#35178) @siriwatknp
94
+ - &#8203;<!-- 10 -->[Fab] Increase disabled styles precedence (#35304) @Uzwername
95
+ - &#8203;<!-- 05 -->[Rating] Apply `labelEmptyValueActive` style overrides from theme (#35315) @sai6855
96
+
97
+ ### `@mui/system@5.10.17`
98
+
99
+ - &#8203;<!-- 04 -->[system] Add support for nested CssVarsProvider (#35277) @siriwatknp
100
+
101
+ ### `@mui/joy@5.0.0-alpha.57`
102
+
103
+ #### BREAKING CHANGE
104
+
105
+ - &#8203;<!-- 08 -->[Joy] Add `slots`/`slotProps` props to the typing of all components and apply `useSlot` to all components (#34997) @hbjORbj
106
+
107
+ - Change all occurrences of `components` and `componentsProps` props in Joy UI components to `slots` and `slotProps`, respectively.
108
+
109
+ ```diff
110
+ -<Autocomplete components={{listbox: CustomListbox}} componentsProps={{listbox: { className: 'custom-listbox' }}} />
111
+ +<Autocomplete slots={{listbox: CustomListbox}} slotProps={{listbox: { className: 'custom-listbox' }}} />
112
+ ```
113
+
114
+ 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.
115
+
116
+ #### Changes
117
+
118
+ - &#8203;<!-- 07 -->[Joy] Miscellaneous fixes (#35345) @siriwatknp
119
+ - &#8203;<!-- 06 -->[Joy][textarea] Expose decorator classes (#35247) @zignis
120
+
121
+ ### Docs
122
+
123
+ - &#8203;<!-- 29 -->[docs] Improve spacing with ul (#35302) @oliviertassinari
124
+ - &#8203;<!-- 23 -->[docs] Correct grammatically incorrect sentences in CONTRIBUTING.md (#34949) @Pandey-utkarsh
125
+ - &#8203;<!-- 22 -->[docs] Move the demo higher in the API TOC (#35202) @oliviertassinari
126
+ - &#8203;<!-- 21 -->[docs] Fix incorrect link in minimizing-bundle-size (#35297) @Juneezee
127
+ - &#8203;<!-- 20 -->[docs] Revise and expand Joy UI "Breadcrumbs" page (#35292) @samuelsycamore
128
+ - &#8203;<!-- 19 -->[docs] Fix wrong import in the unstyled tabs page (#35310) @guotie
129
+ - &#8203;<!-- 18 -->[docs] Disable translations (#34820) @mnajdova
130
+ - &#8203;<!-- 17 -->[docs] Fix typo (#35312) @flaviendelangle
131
+ - &#8203;<!-- 16 -->[docs] Add Material You Button playground (#35222) @mnajdova
132
+ - &#8203;<!-- 15 -->[docs] Fix experimental API page duplication (#35213) @oliviertassinari
133
+ - &#8203;<!-- 14 -->[docs] Improve the autogenerated "Unstyled" and "API" text (#35185) @samuelsycamore
134
+ - &#8203;<!-- 13 -->[docs] Fix ad margin on API pages (#35201) @oliviertassinari
135
+ - &#8203;<!-- 12 -->[docs] Revise and expand the Joy UI "Badge" page (#35199) @samuelsycamore
136
+ - &#8203;<!-- 11 -->[docs] Update MUI Base docs with latest style conventions (#35034) @samuelsycamore
137
+ - &#8203;<!-- 09 -->[l10n] Improve Chinese (Taiwan) zh-TW locale (#35328) @happyincent
138
+ - &#8203;<!-- 02 -->[website] Update MUI stats: GitHub stars, Twitter followers, etc. (#35318) @nomandhoni-cs
139
+
140
+ ### Core
141
+
142
+ - &#8203;<!-- 27 -->[core] Use componentStyles.name over componentName (#35303) @oliviertassinari
143
+ - &#8203;<!-- 26 -->[core] Fix warning leak in production (#35313) @oliviertassinari
144
+ - &#8203;<!-- 25 -->[core] Move the internal packages from docs/packages (#35305) @michaldudak
145
+ - &#8203;<!-- 24 -->[core] Clean up the API docs generation scripts (#35244) @michaldudak
146
+ - &#8203;<!-- 03 -->[test] Scope the tests to just Material UI components (#35219) @siriwatknp
147
+ - &#8203;<!-- 01 -->[website] Remove BlackFriday notification @oliviertassinari
148
+
149
+ 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
150
+
151
+ ## 5.10.16
152
+
153
+ <!-- generated comparing v5.10.15..master -->
154
+
155
+ _Nov 28, 2022_
156
+
157
+ A big thanks to the 13 contributors who made this release possible. This release contains various 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
158
+
159
+ ### `@mui/material@5.10.16`
160
+
161
+ - &#8203;<!-- 21 -->[Autocomplete] Fix inferred value type when `multiple` prop is `true` (#35275) @fenghan34
162
+ - &#8203;<!-- 19 -->[Chip] Add `skipFocusWhenDisabled` prop to not allow focussing deletable chip if disabled (#35065) @sai6855
163
+ - &#8203;<!-- 18 -->[Chip] Remove unnecessary handleKeyDown event handler (#35231) @ZeeshanTamboli
164
+ - &#8203;<!-- 05 -->[FormControl] Add missing types in `useFormControl` (#35168) @ZeeshanTamboli
165
+ - &#8203;<!-- 04 -->[IconButton] Add missing color classes (#33820) @Zetta56
166
+ - &#8203;<!-- 03 -->[SwipeableDrawer] Make paper ref accessible (#35082) @sai6855
167
+
168
+ ### `@mui/system@5.10.16`
169
+
170
+ - &#8203;<!-- 02 -->[system] Remove unnecessary parsed theme (#35239) @siriwatknp
171
+ - &#8203;<!-- 01 -->[theme] Fix TypeScript type for custom variants in responsive font sizes (#35057) @ZeeshanTamboli
172
+
173
+ ### `@mui/base@5.0.0-alpha.108`
174
+
175
+ - &#8203;<!-- 20 -->[Base] Allow useSlotProps to receive undefined elementType (#35192) @leventdeniz
176
+
177
+ ### Docs
178
+
179
+ - &#8203;<!-- 13 -->[docs] Improve feedback precision (#34641) @alexfauquette
180
+ - &#8203;<!-- 12 -->[docs] Add Black Friday notification @oliviertassinari
181
+ - &#8203;<!-- 11 -->[docs] Fix migration feedback (#35232) @alexfauquette
182
+ - &#8203;<!-- 10 -->[docs] Improve the useSelect demo styling (#33883) @michaldudak
183
+ - &#8203;<!-- 09 -->[docs] Fix layout jump on first mistake (#35215) @oliviertassinari
184
+ - &#8203;<!-- 08 -->[docs] Support demos with side effect imports (#35177) @m4theushw
185
+ - &#8203;<!-- 07 -->[examples] Fix Next.js errors (#35246) @oliviertassinari
186
+ - &#8203;<!-- 06 -->[examples] Updated Remix examples with the lates changes using React 18 (#35092) @58bits
187
+
188
+ ### Core
189
+
190
+ - &#8203;<!-- 17 -->[core] Remove unused pattern (#35165) @iamxukai
191
+ - &#8203;<!-- 16 -->[core] Fix Base version in changelog (#35224) @siriwatknp
192
+ - &#8203;<!-- 15 -->[core] Migrate `describeConformance` to TypeScript (#35193) @flaviendelangle
193
+ - &#8203;<!-- 14 -->[core] Skip CI for docs and examples paths (#35225) @siriwatknp
194
+
195
+ All contributors of this release in alphabetical order: @58bits, @alexfauquette, @fenghan34, @flaviendelangle, @iamxukai, @leventdeniz, @m4theushw, @michaldudak, @oliviertassinari, @sai6855, @siriwatknp, @ZeeshanTamboli, @Zetta56
196
+
3
197
  ## 5.10.15
4
198
 
5
199
  <!-- generated comparing v5.10.14..master -->
@@ -26,7 +220,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some
26
220
 
27
221
  - [Material You] Add theme structure & Button component (#34650) @mnajdova
28
222
 
29
- ### `@mui/base@5.0.0-alpha.106`
223
+ ### `@mui/base@5.0.0-alpha.107`
30
224
 
31
225
  - [Select] Add attributes to conform with ARIA 1.2 (#35182) @michaldudak
32
226
 
@@ -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,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;
@@ -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/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 declare 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';
@@ -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;
@@ -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
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.15
1
+ /** @license MUI v5.11.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.15
1
+ /** @license MUI v5.11.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.10.15
1
+ /** @license MUI v5.11.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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.10.15",
3
+ "version": "5.11.0",
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.1",
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",
@@ -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,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
- className?: string;
9
- } & 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
+ className?: string;
9
+ } & 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,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;
@@ -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;
@@ -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;
@@ -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;