@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.
Files changed (58) hide show
  1. package/CHANGELOG.md +102 -4
  2. package/ClassNameGenerator/ClassNameGenerator.d.ts +6 -6
  3. package/ClassNameGenerator/index.d.ts +1 -1
  4. package/HTMLElementType/HTMLElementType.d.ts +3 -3
  5. package/HTMLElementType/index.d.ts +1 -1
  6. package/capitalize/capitalize.d.ts +1 -1
  7. package/capitalize/index.d.ts +1 -1
  8. package/chainPropTypes/chainPropTypes.d.ts +2 -2
  9. package/chainPropTypes/index.d.ts +1 -1
  10. package/composeClasses/composeClasses.d.ts +1 -1
  11. package/composeClasses/composeClasses.js +1 -1
  12. package/composeClasses/index.d.ts +1 -1
  13. package/createChainedFunction.d.ts +7 -7
  14. package/debounce/debounce.d.ts +4 -4
  15. package/debounce/index.d.ts +2 -2
  16. package/deepmerge.d.ts +5 -5
  17. package/elementAcceptingRef.d.ts +3 -3
  18. package/elementTypeAcceptingRef.d.ts +3 -3
  19. package/esm/composeClasses/composeClasses.js +1 -1
  20. package/exactProp/exactProp.d.ts +2 -2
  21. package/exactProp/index.d.ts +1 -1
  22. package/formatMuiErrorMessage.d.ts +6 -6
  23. package/generateUtilityClass/generateUtilityClass.d.ts +2 -2
  24. package/generateUtilityClass/index.d.ts +2 -2
  25. package/generateUtilityClasses/generateUtilityClasses.d.ts +1 -1
  26. package/generateUtilityClasses/index.d.ts +1 -1
  27. package/getDisplayName.d.ts +8 -8
  28. package/getScrollbarSize.d.ts +1 -1
  29. package/index.d.ts +38 -38
  30. package/index.js +1 -1
  31. package/integerPropType.d.ts +7 -7
  32. package/isMuiElement.d.ts +1 -1
  33. package/legacy/composeClasses/composeClasses.js +1 -1
  34. package/legacy/index.js +1 -1
  35. package/modern/composeClasses/composeClasses.js +1 -1
  36. package/modern/index.js +1 -1
  37. package/ownerDocument/index.d.ts +1 -1
  38. package/ownerDocument/ownerDocument.d.ts +1 -1
  39. package/ownerWindow/index.d.ts +1 -1
  40. package/ownerWindow/ownerWindow.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/ponyfillGlobal/index.d.ts +1 -1
  43. package/ponyfillGlobal/ponyfillGlobal.d.ts +2 -2
  44. package/refType.d.ts +3 -3
  45. package/resolveProps.d.ts +12 -12
  46. package/setRef.d.ts +15 -15
  47. package/useEnhancedEffect/index.d.ts +1 -1
  48. package/useEnhancedEffect/useEnhancedEffect.d.ts +3 -3
  49. package/useEventCallback/index.d.ts +1 -1
  50. package/useEventCallback/useEventCallback.d.ts +6 -6
  51. package/useEventCallback/useEventCallback.spec.d.ts +1 -1
  52. package/useForkRef/index.d.ts +1 -1
  53. package/useForkRef/useForkRef.d.ts +2 -2
  54. package/useId/index.d.ts +1 -1
  55. package/useId/useId.d.ts +7 -7
  56. package/useIsFocusVisible.d.ts +9 -9
  57. package/usePreviousProps.d.ts +2 -2
  58. 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
+ - &#8203;<!-- 25 -->[Checkbox][material] Add size classes (#38182) @michaldudak
16
+ - &#8203;<!-- 03 -->[Typography] Improve inherit variant logic (#38123) @ZeeshanTamboli
17
+
18
+ ### `@mui/system@5.14.4`
19
+
20
+ - &#8203;<!-- 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
+ - &#8203;<!-- 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
+ - &#8203;<!-- 31 -->[base] Create useNumberInput and NumberInput (#36119) @mj12albert
55
+ - &#8203;<!-- 28 -->[Select][base] Fix flicker on click of controlled Select button (#37855) @VishruthR
56
+ - &#8203;<!-- 09 -->[Dropdown] Fix imports of types (#38296) @yash-thakur
57
+
58
+ ### `@mui/joy@5.0.0-beta.1`
59
+
60
+ - &#8203;<!-- 06 -->[joy-ui][MenuButton] Fix disable of `MenuButton` (#38342) @sai6855
61
+
62
+ ### Docs
63
+
64
+ - &#8203;<!-- 33 -->[docs][AppBar] Fix `ResponsiveAppBar` demo logo href (#38346) @iownthegame
65
+ - &#8203;<!-- 30 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Button page (#38240) @alisasanib
66
+ - &#8203;<!-- 29 -->[docs][Menu][base] Remove `Unstyled` prefix from demos' function names (#38270) @sai6855
67
+ - &#8203;<!-- 22 -->[docs] Add themeable component guide (#37908) @siriwatknp
68
+ - &#8203;<!-- 21 -->[docs] Fix Joy UI demo background color (#38307) @oliviertassinari
69
+ - &#8203;<!-- 20 -->[docs] Update API docs for Number Input component (#38301) @ZeeshanTamboli
70
+ - &#8203;<!-- 14 -->[docs][joy-ui] Revise the theme typography page (#38285) @danilo-leal
71
+ - &#8203;<!-- 13 -->[docs][joy-ui] Add TS demo for Menu Bar (#38308) @sai6855
72
+ - &#8203;<!-- 10 -->[docs][joy-ui] Updated Typography callout at getting started (#38289) @zanivan
73
+ - &#8203;<!-- 12 -->[docs][joy-ui] Fix the Inter font installation instructions (#38284) @danilo-leal
74
+ - &#8203;<!-- 11 -->[docs][material] Add note to Autocomplete about ref forwarding (#38305) @samuelsycamore
75
+ - &#8203;<!-- 05 -->[docs][Skeleton] Make the demos feel more realistic (#38212) @oliviertassinari
76
+
77
+ - &#8203;<!-- 08 -->[examples] Swap Next.js examples between App Router and Pages Router; update naming convention (#38204) @samuelsycamore
78
+ - &#8203;<!-- 07 -->[examples][material-ui] Add Material UI + Next.js (App Router) example in JS (#38323) @samuelsycamore
79
+ - &#8203;<!-- 27 -->[blog] Discord announcement blog (#38258) @richbustos
80
+ - &#8203;<!-- 26 -->[blog] Fix 301 links to Toolpad @oliviertassinari
81
+ - &#8203;<!-- 04 -->[website] Updating Charts demo with real charts usage for MUI X marketing page (#38317) @richbustos
82
+ - &#8203;<!-- 03 -->[website] Adjust styles of the Product section on the homepage (#38366) @danilo-leal
83
+ - &#8203;<!-- 02 -->[website] Add Nora teamMember card to 'About' (#38358) @noraleonte
84
+ - &#8203;<!-- 01 -->[website] Fix image layout shift (#38326) @oliviertassinari
85
+
86
+ ### Core
87
+
88
+ - &#8203;<!-- 24 -->[core] Fix docs demo export function consistency (#38191) @oliviertassinari
89
+ - &#8203;<!-- 23 -->[core] Fix the link-check script on Windows (#38276) @michaldudak
90
+ - &#8203;<!-- 26 -->[core] Use @testing-library/user-event direct API (#38325) @mj12albert
91
+ - &#8203;<!-- 29 -->[core] Port GitHub workflow for ensuring triage label is present (#38312) @DanailH
92
+ - &#8203;<!-- 19 -->[docs-infra] Consider files ending with .types.ts as props files (#37533) @mnajdova
93
+ - &#8203;<!-- 18 -->[docs-infra] Fix skip to content design (#38304) @oliviertassinari
94
+ - &#8203;<!-- 17 -->[docs-infra] Add a general round of polish to the API content display (#38282) @danilo-leal
95
+ - &#8203;<!-- 16 -->[docs-infra] Make the side nav collapse animation snappier (#38259) @danilo-leal
96
+ - &#8203;<!-- 15 -->[docs-infra] New Component API design followup (#38183) @cherniavskii
97
+ - &#8203;<!-- 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
  - &#8203;<!-- 19 -->[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal
130
228
  - &#8203;<!-- 18 -->[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai
131
229
  - &#8203;<!-- 17 -->[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla
132
- - &#8203;<!-- 16 -->[examples] Fix material-next-app-router Font Usage with next/font (#38026) @onderonur
230
+ - &#8203;<!-- 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-next-app-router-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
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
  - &#8203;<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
463
561
  - &#8203;<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
464
562
  - &#8203;<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
465
- - &#8203;<!-- 16 -->[examples] Shell command fix in the readme file of material-next-app-router-ts example (#37675) @bablukpik
563
+ - &#8203;<!-- 16 -->[examples] Shell command fix in the readme file of material-next-ts example (#37675) @bablukpik
466
564
  - &#8203;<!-- 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;
@@ -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
- // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
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;
@@ -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;
@@ -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;
@@ -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
- // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
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) => {
@@ -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 +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';
@@ -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,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v5.14.3
2
+ * @mui/utils v5.14.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
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,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v5.14.3
2
+ * @mui/utils v5.14.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- // `Objet.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/utils v5.14.3
2
+ * @mui/utils v5.14.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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;
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/utils",
3
- "version": "5.14.3",
3
+ "version": "5.14.4",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Utility functions for React components.",
@@ -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 {};
@@ -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;
@@ -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;
@@ -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;
@@ -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;