@mui/material 5.16.6 → 5.16.8

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 (128) hide show
  1. package/AccordionActions/AccordionActions.d.ts +1 -1
  2. package/AccordionDetails/AccordionDetails.d.ts +1 -1
  3. package/Alert/Alert.d.ts +1 -1
  4. package/AlertTitle/AlertTitle.d.ts +1 -1
  5. package/Autocomplete/Autocomplete.d.ts +1 -1
  6. package/AvatarGroup/AvatarGroup.d.ts +1 -1
  7. package/Button/Button.d.ts +1 -1
  8. package/ButtonBase/ButtonBase.d.ts +1 -1
  9. package/CHANGELOG.md +70 -0
  10. package/CardActions/CardActions.d.ts +1 -1
  11. package/CardHeader/CardHeader.d.ts +1 -1
  12. package/Checkbox/Checkbox.d.ts +1 -1
  13. package/Chip/Chip.d.ts +3 -3
  14. package/CircularProgress/CircularProgress.d.ts +1 -1
  15. package/ClickAwayListener/ClickAwayListener.js +2 -3
  16. package/Collapse/Collapse.d.ts +1 -1
  17. package/CssBaseline/CssBaseline.d.ts +1 -1
  18. package/Dialog/Dialog.d.ts +1 -1
  19. package/DialogActions/DialogActions.d.ts +1 -1
  20. package/DialogContent/DialogContent.d.ts +1 -1
  21. package/Drawer/Drawer.d.ts +1 -1
  22. package/Fade/Fade.d.ts +1 -1
  23. package/Fade/Fade.js +2 -1
  24. package/FilledInput/FilledInput.d.ts +1 -1
  25. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  26. package/FormGroup/FormGroup.d.ts +1 -1
  27. package/GlobalStyles/GlobalStyles.d.ts +1 -1
  28. package/Grow/Grow.d.ts +1 -1
  29. package/Grow/Grow.js +2 -1
  30. package/ImageListItemBar/ImageListItemBar.d.ts +1 -1
  31. package/Input/Input.d.ts +1 -1
  32. package/InputBase/InputBase.d.ts +1 -1
  33. package/LinearProgress/LinearProgress.d.ts +1 -1
  34. package/ListItemAvatar/ListItemAvatar.d.ts +1 -1
  35. package/ListItemIcon/ListItemIcon.d.ts +1 -1
  36. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +3 -1
  37. package/ListItemText/ListItemText.d.ts +3 -1
  38. package/Menu/Menu.d.ts +1 -1
  39. package/MobileStepper/MobileStepper.d.ts +1 -1
  40. package/Modal/Modal.d.ts +1 -1
  41. package/NativeSelect/NativeSelect.d.ts +1 -1
  42. package/OutlinedInput/OutlinedInput.d.ts +3 -1
  43. package/OverridableComponent.d.ts +2 -2
  44. package/Pagination/Pagination.d.ts +1 -1
  45. package/Popover/Popover.d.ts +1 -1
  46. package/Portal/Portal.js +2 -3
  47. package/README.md +5 -5
  48. package/Radio/Radio.d.ts +1 -1
  49. package/RadioGroup/RadioGroup.d.ts +1 -1
  50. package/Rating/Rating.d.ts +1 -1
  51. package/Select/Select.d.ts +1 -1
  52. package/Select/Select.js +2 -1
  53. package/Slide/Slide.d.ts +1 -1
  54. package/Slide/Slide.js +2 -1
  55. package/Slider/Slider.d.ts +1 -1
  56. package/Slider/SliderValueLabel.types.d.ts +1 -1
  57. package/Slider/useSlider.js +3 -3
  58. package/Snackbar/Snackbar.d.ts +1 -1
  59. package/SnackbarContent/SnackbarContent.d.ts +1 -1
  60. package/SpeedDial/SpeedDial.d.ts +1 -1
  61. package/SpeedDialAction/SpeedDialAction.d.ts +1 -1
  62. package/SpeedDialIcon/SpeedDialIcon.d.ts +3 -1
  63. package/StepConnector/StepConnector.d.ts +2 -2
  64. package/StepContent/StepContent.d.ts +1 -1
  65. package/StepIcon/StepIcon.d.ts +1 -1
  66. package/StepLabel/StepLabel.d.ts +3 -1
  67. package/Switch/Switch.d.ts +1 -1
  68. package/Tab/Tab.d.ts +1 -1
  69. package/TabScrollButton/TabScrollButton.d.ts +1 -1
  70. package/TableCell/TableCell.d.ts +1 -1
  71. package/TextField/TextField.d.ts +1 -1
  72. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
  73. package/Tooltip/Tooltip.d.ts +1 -1
  74. package/Tooltip/Tooltip.js +2 -1
  75. package/Unstable_TrapFocus/FocusTrap.js +2 -3
  76. package/Zoom/Zoom.d.ts +1 -1
  77. package/Zoom/Zoom.js +2 -1
  78. package/index.d.ts +2 -0
  79. package/index.js +3 -2
  80. package/legacy/ClickAwayListener/ClickAwayListener.js +2 -3
  81. package/legacy/Fade/Fade.js +2 -1
  82. package/legacy/Grow/Grow.js +2 -1
  83. package/legacy/Portal/Portal.js +3 -3
  84. package/legacy/Select/Select.js +2 -1
  85. package/legacy/Slide/Slide.js +2 -1
  86. package/legacy/Slider/useSlider.js +3 -3
  87. package/legacy/Tooltip/Tooltip.js +2 -1
  88. package/legacy/Unstable_TrapFocus/FocusTrap.js +2 -3
  89. package/legacy/Zoom/Zoom.js +2 -1
  90. package/legacy/index.js +3 -2
  91. package/legacy/useAutocomplete/useAutocomplete.js +2 -1
  92. package/legacy/version/index.js +7 -0
  93. package/modern/ClickAwayListener/ClickAwayListener.js +2 -3
  94. package/modern/Fade/Fade.js +2 -1
  95. package/modern/Grow/Grow.js +2 -1
  96. package/modern/Portal/Portal.js +2 -3
  97. package/modern/Select/Select.js +2 -1
  98. package/modern/Slide/Slide.js +2 -1
  99. package/modern/Slider/useSlider.js +3 -3
  100. package/modern/Tooltip/Tooltip.js +2 -1
  101. package/modern/Unstable_TrapFocus/FocusTrap.js +2 -3
  102. package/modern/Zoom/Zoom.js +2 -1
  103. package/modern/index.js +3 -2
  104. package/modern/useAutocomplete/useAutocomplete.js +2 -1
  105. package/modern/version/index.js +7 -0
  106. package/node/ClickAwayListener/ClickAwayListener.js +2 -3
  107. package/node/Fade/Fade.js +2 -1
  108. package/node/Grow/Grow.js +2 -1
  109. package/node/Portal/Portal.js +1 -2
  110. package/node/Select/Select.js +2 -1
  111. package/node/Slide/Slide.js +2 -1
  112. package/node/Slider/useSlider.js +3 -3
  113. package/node/Tooltip/Tooltip.js +2 -1
  114. package/node/Unstable_TrapFocus/FocusTrap.js +1 -2
  115. package/node/Zoom/Zoom.js +2 -1
  116. package/node/index.js +13 -1
  117. package/node/useAutocomplete/useAutocomplete.js +2 -1
  118. package/node/version/index.js +13 -0
  119. package/package.json +9 -9
  120. package/styles/CssVarsProvider.d.ts +1 -1
  121. package/types/OverridableComponentAugmentation.d.ts +2 -2
  122. package/umd/material-ui.development.js +53 -22
  123. package/umd/material-ui.production.min.js +4 -4
  124. package/useAutocomplete/useAutocomplete.d.ts +1 -1
  125. package/useAutocomplete/useAutocomplete.js +2 -1
  126. package/version/index.d.ts +7 -0
  127. package/version/index.js +7 -0
  128. package/version/package.json +6 -0
@@ -33,4 +33,4 @@ export interface AccordionActionsProps extends StandardProps<React.HTMLAttribute
33
33
  *
34
34
  * - [AccordionActions API](https://mui.com/material-ui/api/accordion-actions/)
35
35
  */
36
- export default function AccordionActions(props: AccordionActionsProps): JSX.Element;
36
+ export default function AccordionActions(props: AccordionActionsProps): React.JSX.Element;
@@ -28,4 +28,4 @@ export interface AccordionDetailsProps extends StandardProps<React.HTMLAttribute
28
28
  *
29
29
  * - [AccordionDetails API](https://mui.com/material-ui/api/accordion-details/)
30
30
  */
31
- export default function AccordionDetails(props: AccordionDetailsProps): JSX.Element;
31
+ export default function AccordionDetails(props: AccordionDetailsProps): React.JSX.Element;
package/Alert/Alert.d.ts CHANGED
@@ -142,4 +142,4 @@ export interface AlertOwnerState extends AlertProps {}
142
142
  * - [Alert API](https://mui.com/material-ui/api/alert/)
143
143
  * - inherits [Paper API](https://mui.com/material-ui/api/paper/)
144
144
  */
145
- export default function Alert(props: AlertProps): JSX.Element;
145
+ export default function Alert(props: AlertProps): React.JSX.Element;
@@ -29,4 +29,4 @@ export interface AlertTitleProps extends TypographyProps<'div'> {
29
29
  * - [AlertTitle API](https://mui.com/material-ui/api/alert-title/)
30
30
  * - inherits [Typography API](https://mui.com/material-ui/api/typography/)
31
31
  */
32
- export default function AlertTitle(props: AlertTitleProps): JSX.Element;
32
+ export default function AlertTitle(props: AlertTitleProps): React.JSX.Element;
@@ -305,4 +305,4 @@ export default function Autocomplete<
305
305
  ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'],
306
306
  >(
307
307
  props: AutocompleteProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent>,
308
- ): JSX.Element;
308
+ ): React.JSX.Element;
@@ -92,4 +92,4 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
92
92
  *
93
93
  * - [AvatarGroup API](https://mui.com/material-ui/api/avatar-group/)
94
94
  */
95
- export default function AvatarGroup(props: AvatarGroupProps): JSX.Element;
95
+ export default function AvatarGroup(props: AvatarGroupProps): React.JSX.Element;
@@ -104,7 +104,7 @@ export interface ExtendButtonTypeMap<TypeMap extends OverridableTypeMap> {
104
104
 
105
105
  export type ExtendButton<TypeMap extends OverridableTypeMap> = ((
106
106
  props: { href: string } & OverrideProps<ExtendButtonBaseTypeMap<TypeMap>, 'a'>,
107
- ) => JSX.Element) &
107
+ ) => React.JSX.Element) &
108
108
  OverridableComponent<ExtendButtonBaseTypeMap<TypeMap>>;
109
109
 
110
110
  /**
@@ -105,7 +105,7 @@ export interface ExtendButtonBaseTypeMap<TypeMap extends OverridableTypeMap> {
105
105
 
106
106
  export type ExtendButtonBase<TypeMap extends OverridableTypeMap> = ((
107
107
  props: { href: string } & OverrideProps<ExtendButtonBaseTypeMap<TypeMap>, 'a'>,
108
- ) => JSX.Element) &
108
+ ) => React.JSX.Element) &
109
109
  OverridableComponent<ExtendButtonBaseTypeMap<TypeMap>>;
110
110
 
111
111
  /**
package/CHANGELOG.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.16.8
4
+
5
+ <!-- generated comparing v5.16.7..v5.x -->
6
+
7
+ _Nov 26, 2024_
8
+
9
+ A big thanks to the 8 contributors who made this release possible.
10
+
11
+ ### `@mui/material@5.16.8`
12
+
13
+ - Cherry pick ref accessing PRs (#44543) @DiegoAndai
14
+
15
+ ### `@mui/utils@5.16.8`
16
+
17
+ - Skip deep clone React element (v5.x) (#44494) @jukkatupamaki
18
+
19
+ ### Docs
20
+
21
+ - Keep sponsors up to date @oliviertassinari
22
+ - Fix MUI Treasury Layout broken links (#43753) @oliviertassinari
23
+ - Strengthen CSP rule @oliviertassinari
24
+ - Give up on restoring search @oliviertassinari
25
+ - Normalize next major message @oliviertassinari
26
+ - Fix versions URL @oliviertassinari
27
+ - Fix use of absolute URLs (#43567) @oliviertassinari
28
+ - Restore search on v5 (#43566) @oliviertassinari
29
+ - Fix link from v5 to v6 (#43585) @alexfauquette
30
+ - Updated mui-x roadmap links with the new project URL (@michelengelen) (#43446) @michelengelen
31
+ - Fix broken link to Next.js docs @oliviertassinari
32
+
33
+ ### Core
34
+
35
+ - [blog] Polish Upcoming changes to MUI X pricing in 2024 (#43438) @oliviertassinari
36
+ - [blog] Add video to the Pigment CSS blog post (#42500) @oliviertassinari
37
+ - [blog] Announcing pricing changes Sep 2024 (#43272) @cherniavskii
38
+ - Prepare for moving to v5.x branch (#43447) @siriwatknp
39
+ - [core] Cherry pick #42346 to v5 (#44475) @DiegoAndai
40
+ - [core] Fix CI on v5.x branch (#44487) @DiegoAndai
41
+ - [core] Fix CI on v5.x branch (#43564) @oliviertassinari
42
+ - [examples] Fix v5 clone example instructions (#43755) @oliviertassinari
43
+ - [examples] Fix CLI download instructions @oliviertassinari
44
+ - [examples] Fix CDN live preview example @oliviertassinari
45
+ - [examples] Fix more examples to work with v5 @oliviertassinari
46
+ - [examples] Freeze examples dependency range (#43435) @oliviertassinari
47
+
48
+ All contributors of this release in alphabetical order: @alexfauquette, @cherniavskii, @DiegoAndai, @jukkatupamaki, @michelengelen, @oliviertassinari, @rluzists1, @siriwatknp
49
+
50
+ ## 5.16.7
51
+
52
+ <!-- generated comparing v5.16.6..master -->
53
+
54
+ _Aug 9, 2024_
55
+
56
+ A big thanks to the 3 contributors who made this release possible.
57
+
58
+ ### `@mui/material@5.16.7`
59
+
60
+ - &#8203;<!-- 3 -->[material-ui][mui-system] Add support for version runtime checks (#43233) @DiegoAndai
61
+
62
+ ### Docs
63
+
64
+ - &#8203;<!-- 4 -->[docs] Fix 301 @oliviertassinari
65
+
66
+ ### Core
67
+
68
+ - &#8203;<!-- 2 -->[website] Fix wrong link in pricing table (@zanivan) (#43143) @zanivan
69
+ - &#8203;<!-- 1 -->[website] Add blog link to pricing table (@zanivan) (#43140) @zanivan
70
+
71
+ All contributors of this release in alphabetical order: @DiegoAndai, @oliviertassinari, @zanivan
72
+
3
73
  ## 5.16.6
4
74
 
5
75
  <!-- generated comparing v5.16.5..master -->
@@ -33,4 +33,4 @@ export interface CardActionsProps extends StandardProps<React.HTMLAttributes<HTM
33
33
  *
34
34
  * - [CardActions API](https://mui.com/material-ui/api/card-actions/)
35
35
  */
36
- export default function CardActions(props: CardActionsProps): JSX.Element;
36
+ export default function CardActions(props: CardActionsProps): React.JSX.Element;
@@ -98,7 +98,7 @@ export interface OverridableCardHeader extends OverridableComponent<CardHeaderTy
98
98
  TitleTypographyComponent,
99
99
  SubheaderTypographyComponent
100
100
  >,
101
- ): JSX.Element;
101
+ ): React.JSX.Element;
102
102
  }
103
103
 
104
104
  export type CardHeaderProps<
@@ -115,4 +115,4 @@ export interface CheckboxProps
115
115
  * - [Checkbox API](https://mui.com/material-ui/api/checkbox/)
116
116
  * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
117
117
  */
118
- export default function Checkbox(props: CheckboxProps): JSX.Element;
118
+ export default function Checkbox(props: CheckboxProps): React.JSX.Element;
package/Chip/Chip.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface ChipOwnProps {
15
15
  /**
16
16
  * The Avatar element to display.
17
17
  */
18
- avatar?: React.ReactElement;
18
+ avatar?: React.ReactElement<any>;
19
19
  /**
20
20
  * This prop isn't supported.
21
21
  * Use the `component` prop if you need to change the children structure.
@@ -47,7 +47,7 @@ export interface ChipOwnProps {
47
47
  /**
48
48
  * Override the default delete icon element. Shown only if `onDelete` is set.
49
49
  */
50
- deleteIcon?: React.ReactElement;
50
+ deleteIcon?: React.ReactElement<any>;
51
51
  /**
52
52
  * If `true`, the component is disabled.
53
53
  * @default false
@@ -56,7 +56,7 @@ export interface ChipOwnProps {
56
56
  /**
57
57
  * Icon element.
58
58
  */
59
- icon?: React.ReactElement;
59
+ icon?: React.ReactElement<any>;
60
60
  /**
61
61
  * The content of the component.
62
62
  */
@@ -73,4 +73,4 @@ export interface CircularProgressProps
73
73
  *
74
74
  * - [CircularProgress API](https://mui.com/material-ui/api/circular-progress/)
75
75
  */
76
- export default function CircularProgress(props: CircularProgressProps): JSX.Element;
76
+ export default function CircularProgress(props: CircularProgressProps): React.JSX.Element;
@@ -3,6 +3,7 @@
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { elementAcceptingRef, exactProp, unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback } from '@mui/utils';
6
+ import getReactElementRef from '@mui/utils/getReactElementRef';
6
7
 
7
8
  // TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase<EventName> : never` once generatePropTypes runs with TS 4.1
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -47,9 +48,7 @@ function ClickAwayListener(props) {
47
48
  activatedRef.current = false;
48
49
  };
49
50
  }, []);
50
- const handleRef = useForkRef(
51
- // @ts-expect-error TODO upstream fix
52
- children.ref, nodeRef);
51
+ const handleRef = useForkRef(getReactElementRef(children), nodeRef);
53
52
 
54
53
  // The handler doesn't take event.defaultPrevented into account:
55
54
  //
@@ -69,4 +69,4 @@ export interface CollapseProps extends StandardProps<TransitionProps, 'timeout'>
69
69
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
70
70
  */
71
71
 
72
- export default function Collapse(props: CollapseProps): JSX.Element;
72
+ export default function Collapse(props: CollapseProps): React.JSX.Element;
@@ -26,4 +26,4 @@ export interface CssBaselineProps extends StyledComponentProps<never> {
26
26
  *
27
27
  * - [CssBaseline API](https://mui.com/material-ui/api/css-baseline/)
28
28
  */
29
- export default function CssBaseline(props: CssBaselineProps): JSX.Element;
29
+ export default function CssBaseline(props: CssBaselineProps): React.JSX.Element;
@@ -118,4 +118,4 @@ export interface DialogProps extends StandardProps<ModalProps, 'children'> {
118
118
  * - [Dialog API](https://mui.com/material-ui/api/dialog/)
119
119
  * - inherits [Modal API](https://mui.com/material-ui/api/modal/)
120
120
  */
121
- export default function Dialog(props: DialogProps): JSX.Element;
121
+ export default function Dialog(props: DialogProps): React.JSX.Element;
@@ -33,4 +33,4 @@ export interface DialogActionsProps extends StandardProps<React.HTMLAttributes<H
33
33
  *
34
34
  * - [DialogActions API](https://mui.com/material-ui/api/dialog-actions/)
35
35
  */
36
- export default function DialogActions(props: DialogActionsProps): JSX.Element;
36
+ export default function DialogActions(props: DialogActionsProps): React.JSX.Element;
@@ -33,4 +33,4 @@ export interface DialogContentProps extends StandardProps<React.HTMLAttributes<H
33
33
  *
34
34
  * - [DialogContent API](https://mui.com/material-ui/api/dialog-content/)
35
35
  */
36
- export default function DialogContent(props: DialogContentProps): JSX.Element;
36
+ export default function DialogContent(props: DialogContentProps): React.JSX.Element;
@@ -85,4 +85,4 @@ export interface DrawerProps extends StandardProps<ModalProps, 'open' | 'childre
85
85
  *
86
86
  * - [Drawer API](https://mui.com/material-ui/api/drawer/)
87
87
  */
88
- export default function Drawer(props: DrawerProps): JSX.Element;
88
+ export default function Drawer(props: DrawerProps): React.JSX.Element;
package/Fade/Fade.d.ts CHANGED
@@ -46,4 +46,4 @@ export interface FadeProps extends Omit<TransitionProps, 'children'> {
46
46
  * - [Fade API](https://mui.com/material-ui/api/fade/)
47
47
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
48
48
  */
49
- export default function Fade(props: FadeProps): JSX.Element;
49
+ export default function Fade(props: FadeProps): React.JSX.Element;
package/Fade/Fade.js CHANGED
@@ -7,6 +7,7 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { Transition } from 'react-transition-group';
9
9
  import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
10
+ import getReactElementRef from '@mui/utils/getReactElementRef';
10
11
  import useTheme from '../styles/useTheme';
11
12
  import { reflow, getTransitionProps } from '../transitions/utils';
12
13
  import useForkRef from '../utils/useForkRef';
@@ -50,7 +51,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
50
51
  other = _objectWithoutPropertiesLoose(props, _excluded);
51
52
  const enableStrictModeCompat = true;
52
53
  const nodeRef = React.useRef(null);
53
- const handleRef = useForkRef(nodeRef, children.ref, ref);
54
+ const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
54
55
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
55
56
  if (callback) {
56
57
  const node = nodeRef.current;
@@ -36,6 +36,6 @@ export interface FilledInputProps extends StandardProps<InputBaseProps> {
36
36
  * - [FilledInput API](https://mui.com/material-ui/api/filled-input/)
37
37
  * - inherits [InputBase API](https://mui.com/material-ui/api/input-base/)
38
38
  */
39
- declare const FilledInput: ((props: FilledInputProps) => JSX.Element) & { muiName: string };
39
+ declare const FilledInput: ((props: FilledInputProps) => React.JSX.Element) & { muiName: string };
40
40
 
41
41
  export default FilledInput;
@@ -99,4 +99,4 @@ export interface FormControlLabelProps
99
99
  *
100
100
  * - [FormControlLabel API](https://mui.com/material-ui/api/form-control-label/)
101
101
  */
102
- export default function FormControlLabel(props: FormControlLabelProps): JSX.Element;
102
+ export default function FormControlLabel(props: FormControlLabelProps): React.JSX.Element;
@@ -37,4 +37,4 @@ export interface FormGroupProps extends StandardProps<React.HTMLAttributes<HTMLD
37
37
  *
38
38
  * - [FormGroup API](https://mui.com/material-ui/api/form-group/)
39
39
  */
40
- export default function FormGroup(props: FormGroupProps): JSX.Element;
40
+ export default function FormGroup(props: FormGroupProps): React.JSX.Element;
@@ -18,4 +18,4 @@ export interface GlobalStylesProps {
18
18
  *
19
19
  * - [GlobalStyles API](https://mui.com/material-ui/api/global-styles/)
20
20
  */
21
- export default function GlobalStyles(props: GlobalStylesProps): React.ReactElement;
21
+ export default function GlobalStyles(props: GlobalStylesProps): React.ReactElement<any>;
package/Grow/Grow.d.ts CHANGED
@@ -47,4 +47,4 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {
47
47
  * - [Grow API](https://mui.com/material-ui/api/grow/)
48
48
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
49
49
  */
50
- export default function Grow(props: GrowProps): JSX.Element;
50
+ export default function Grow(props: GrowProps): React.JSX.Element;
package/Grow/Grow.js CHANGED
@@ -7,6 +7,7 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import useTimeout from '@mui/utils/useTimeout';
9
9
  import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
10
+ import getReactElementRef from '@mui/utils/getReactElementRef';
10
11
  import { Transition } from 'react-transition-group';
11
12
  import useTheme from '../styles/useTheme';
12
13
  import { getTransitionProps, reflow } from '../transitions/utils';
@@ -60,7 +61,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
60
61
  const autoTimeout = React.useRef();
61
62
  const theme = useTheme();
62
63
  const nodeRef = React.useRef(null);
63
- const handleRef = useForkRef(nodeRef, children.ref, ref);
64
+ const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
64
65
  const normalizedTransitionCallback = callback => maybeIsAppearing => {
65
66
  if (callback) {
66
67
  const node = nodeRef.current;
@@ -48,4 +48,4 @@ export interface ImageListItemBarProps
48
48
  *
49
49
  * - [ImageListItemBar API](https://mui.com/material-ui/api/image-list-item-bar/)
50
50
  */
51
- export default function ImageListItemBar(props: ImageListItemBarProps): JSX.Element;
51
+ export default function ImageListItemBar(props: ImageListItemBarProps): React.JSX.Element;
package/Input/Input.d.ts CHANGED
@@ -29,6 +29,6 @@ export interface InputProps extends StandardProps<InputBaseProps> {
29
29
  * - [Input API](https://mui.com/material-ui/api/input/)
30
30
  * - inherits [InputBase API](https://mui.com/material-ui/api/input-base/)
31
31
  */
32
- declare const Input: ((props: InputProps) => JSX.Element) & { muiName: string };
32
+ declare const Input: ((props: InputProps) => React.JSX.Element) & { muiName: string };
33
33
 
34
34
  export default Input;
@@ -263,4 +263,4 @@ export interface InputBaseComponentProps
263
263
  *
264
264
  * - [InputBase API](https://mui.com/material-ui/api/input-base/)
265
265
  */
266
- export default function InputBase(props: InputBaseProps): JSX.Element;
266
+ export default function InputBase(props: InputBaseProps): React.JSX.Element;
@@ -59,4 +59,4 @@ export interface LinearProgressProps
59
59
  *
60
60
  * - [LinearProgress API](https://mui.com/material-ui/api/linear-progress/)
61
61
  */
62
- export default function LinearProgress(props: LinearProgressProps): JSX.Element;
62
+ export default function LinearProgress(props: LinearProgressProps): React.JSX.Element;
@@ -28,4 +28,4 @@ export interface ListItemAvatarProps extends StandardProps<React.HTMLAttributes<
28
28
  *
29
29
  * - [ListItemAvatar API](https://mui.com/material-ui/api/list-item-avatar/)
30
30
  */
31
- export default function ListItemAvatar(props: ListItemAvatarProps): JSX.Element;
31
+ export default function ListItemAvatar(props: ListItemAvatarProps): React.JSX.Element;
@@ -30,4 +30,4 @@ export interface ListItemIconProps extends StandardProps<React.HTMLAttributes<HT
30
30
  *
31
31
  * - [ListItemIcon API](https://mui.com/material-ui/api/list-item-icon/)
32
32
  */
33
- export default function ListItemIcon(props: ListItemIconProps): JSX.Element;
33
+ export default function ListItemIcon(props: ListItemIconProps): React.JSX.Element;
@@ -30,7 +30,9 @@ export interface ListItemSecondaryActionProps
30
30
  *
31
31
  * - [ListItemSecondaryAction API](https://mui.com/material-ui/api/list-item-secondary-action/)
32
32
  */
33
- declare const ListItemSecondaryAction: ((props: ListItemSecondaryActionProps) => JSX.Element) & {
33
+ declare const ListItemSecondaryAction: ((
34
+ props: ListItemSecondaryActionProps,
35
+ ) => React.JSX.Element) & {
34
36
  muiName: string;
35
37
  };
36
38
 
@@ -73,4 +73,6 @@ export interface ListItemTextProps<
73
73
  export default function ListItemText<
74
74
  PrimaryTypographyComponent extends React.ElementType = 'span',
75
75
  SecondaryTypographyComponent extends React.ElementType = 'p',
76
- >(props: ListItemTextProps<PrimaryTypographyComponent, SecondaryTypographyComponent>): JSX.Element;
76
+ >(
77
+ props: ListItemTextProps<PrimaryTypographyComponent, SecondaryTypographyComponent>,
78
+ ): React.JSX.Element;
package/Menu/Menu.d.ts CHANGED
@@ -94,4 +94,4 @@ export declare const MenuPaper: React.FC<PaperProps>;
94
94
  * - [Menu API](https://mui.com/material-ui/api/menu/)
95
95
  * - inherits [Popover API](https://mui.com/material-ui/api/popover/)
96
96
  */
97
- export default function Menu(props: MenuProps): JSX.Element;
97
+ export default function Menu(props: MenuProps): React.JSX.Element;
@@ -59,4 +59,4 @@ export interface MobileStepperProps extends StandardProps<PaperProps, 'children'
59
59
  * - [MobileStepper API](https://mui.com/material-ui/api/mobile-stepper/)
60
60
  * - inherits [Paper API](https://mui.com/material-ui/api/paper/)
61
61
  */
62
- export default function MobileStepper(props: MobileStepperProps): JSX.Element;
62
+ export default function MobileStepper(props: MobileStepperProps): React.JSX.Element;
package/Modal/Modal.d.ts CHANGED
@@ -50,7 +50,7 @@ export interface ModalOwnProps {
50
50
  /**
51
51
  * A single child content element.
52
52
  */
53
- children: React.ReactElement;
53
+ children: React.ReactElement<any>;
54
54
  /**
55
55
  * Override or extend the styles applied to the component.
56
56
  */
@@ -64,6 +64,6 @@ export interface NativeSelectProps
64
64
  * - [NativeSelect API](https://mui.com/material-ui/api/native-select/)
65
65
  * - inherits [Input API](https://mui.com/material-ui/api/input/)
66
66
  */
67
- declare const NativeSelect: ((props: NativeSelectProps) => JSX.Element) & { muiName: string };
67
+ declare const NativeSelect: ((props: NativeSelectProps) => React.JSX.Element) & { muiName: string };
68
68
 
69
69
  export default NativeSelect;
@@ -35,6 +35,8 @@ export interface OutlinedInputProps extends StandardProps<InputBaseProps> {
35
35
  * - [OutlinedInput API](https://mui.com/material-ui/api/outlined-input/)
36
36
  * - inherits [InputBase API](https://mui.com/material-ui/api/input-base/)
37
37
  */
38
- declare const OutlinedInput: ((props: OutlinedInputProps) => JSX.Element) & { muiName: string };
38
+ declare const OutlinedInput: ((props: OutlinedInputProps) => React.JSX.Element) & {
39
+ muiName: string;
40
+ };
39
41
 
40
42
  export default OutlinedInput;
@@ -20,8 +20,8 @@ export interface OverridableComponent<TypeMap extends OverridableTypeMap> {
20
20
  */
21
21
  component: RootComponent;
22
22
  } & OverrideProps<TypeMap, RootComponent>,
23
- ): JSX.Element | null;
24
- (props: DefaultComponentProps<TypeMap>): JSX.Element | null;
23
+ ): React.JSX.Element | null;
24
+ (props: DefaultComponentProps<TypeMap>): React.JSX.Element | null;
25
25
  }
26
26
 
27
27
  /**
@@ -86,4 +86,4 @@ export interface PaginationProps
86
86
  *
87
87
  * - [Pagination API](https://mui.com/material-ui/api/pagination/)
88
88
  */
89
- export default function Pagination(props: PaginationProps): JSX.Element;
89
+ export default function Pagination(props: PaginationProps): React.JSX.Element;
@@ -195,4 +195,4 @@ export declare const PopoverPaper: React.FC<PopoverPaperProps>;
195
195
  * - [Popover API](https://mui.com/material-ui/api/popover/)
196
196
  * - inherits [Modal API](https://mui.com/material-ui/api/modal/)
197
197
  */
198
- export default function Popover(props: PopoverProps): JSX.Element;
198
+ export default function Popover(props: PopoverProps): React.JSX.Element;
package/Portal/Portal.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react';
4
4
  import * as ReactDOM from 'react-dom';
5
5
  import PropTypes from 'prop-types';
6
- import { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef } from '@mui/utils';
6
+ import { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef, unstable_getReactElementRef as getReactElementRef } from '@mui/utils';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  function getContainer(container) {
9
9
  return typeof container === 'function' ? container() : container;
@@ -28,8 +28,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
28
28
  disablePortal = false
29
29
  } = props;
30
30
  const [mountNode, setMountNode] = React.useState(null);
31
- // @ts-expect-error TODO upstream fix
32
- const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);
31
+ const handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
33
32
  useEnhancedEffect(() => {
34
33
  if (!disablePortal) {
35
34
  setMountNode(getContainer(container) || document.body);
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- markdownlint-disable-next-line -->
2
2
  <p align="center">
3
- <a href="https://mui.com/material-ui/" rel="noopener" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="Material UI logo"></a>
3
+ <a href="https://v5.mui.com/material-ui/" rel="noopener" target="_blank"><img width="150" height="133" src="https://v5.mui.com/static/logo.svg" alt="Material UI logo"></a>
4
4
  </p>
5
5
 
6
6
  <h1 align="center">Material UI</h1>
@@ -17,7 +17,7 @@ npm install @mui/material @emotion/react @emotion/styled
17
17
 
18
18
  ## Documentation
19
19
 
20
- Visit [https://mui.com/material-ui/](https://mui.com/material-ui/) to view the full documentation.
20
+ Visit [https://v5.mui.com/material-ui/](https://v5.mui.com/material-ui/) to view the full documentation.
21
21
 
22
22
  ## Questions
23
23
 
@@ -26,14 +26,14 @@ Use the "material-ui" tag on Stack Overflow to make it easier for the community
26
26
 
27
27
  ## Examples
28
28
 
29
- Our documentation features [a collection of example projects using Material UI](https://mui.com/material-ui/getting-started/example-projects/).
29
+ Our documentation features [a collection of example projects using Material UI](https://v5.mui.com/material-ui/getting-started/example-projects/).
30
30
 
31
31
  ## Contributing
32
32
 
33
33
  Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
34
34
 
35
35
  Contributing to Material UI is about more than just issues and pull requests!
36
- There are many other ways to [support Material UI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
36
+ There are many other ways to [support Material UI](https://v5.mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
37
37
 
38
38
  ## Changelog
39
39
 
@@ -41,7 +41,7 @@ The [changelog](https://github.com/mui/material-ui/releases) is regularly update
41
41
 
42
42
  ## Roadmap
43
43
 
44
- Future plans and high-priority features and enhancements can be found in the [roadmap](https://mui.com/material-ui/discover-more/roadmap/).
44
+ Future plans and high-priority features and enhancements can be found in the [roadmap](https://v5.mui.com/material-ui/discover-more/roadmap/).
45
45
 
46
46
  ## License
47
47
 
package/Radio/Radio.d.ts CHANGED
@@ -62,4 +62,4 @@ export interface RadioProps
62
62
  * - [Radio API](https://mui.com/material-ui/api/radio/)
63
63
  * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
64
64
  */
65
- export default function Radio(props: RadioProps): JSX.Element;
65
+ export default function Radio(props: RadioProps): React.JSX.Element;
@@ -36,4 +36,4 @@ export interface RadioGroupProps extends Omit<FormGroupProps, 'onChange'> {
36
36
  * - [RadioGroup API](https://mui.com/material-ui/api/radio-group/)
37
37
  * - inherits [FormGroup API](https://mui.com/material-ui/api/form-group/)
38
38
  */
39
- export default function RadioGroup(props: RadioGroupProps): JSX.Element;
39
+ export default function RadioGroup(props: RadioGroupProps): React.JSX.Element;
@@ -124,4 +124,4 @@ export interface RatingProps
124
124
  *
125
125
  * - [Rating API](https://mui.com/material-ui/api/rating/)
126
126
  */
127
- export default function Rating(props: RatingProps): JSX.Element;
127
+ export default function Rating(props: RatingProps): React.JSX.Element;
@@ -196,7 +196,7 @@ export type SelectProps<Value = unknown> =
196
196
  * - [Select API](https://mui.com/material-ui/api/select/)
197
197
  * - inherits [OutlinedInput API](https://mui.com/material-ui/api/outlined-input/)
198
198
  */
199
- declare const Select: (<Value = unknown>(props: SelectProps<Value>) => JSX.Element) & {
199
+ declare const Select: (<Value = unknown>(props: SelectProps<Value>) => React.JSX.Element) & {
200
200
  muiName: string;
201
201
  };
202
202
 
package/Select/Select.js CHANGED
@@ -8,6 +8,7 @@ import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
10
10
  import deepmerge from '@mui/utils/deepmerge';
11
+ import getReactElementRef from '@mui/utils/getReactElementRef';
11
12
  import SelectInput from './SelectInput';
12
13
  import formControlState from '../FormControl/formControlState';
13
14
  import useFormControl from '../FormControl/useFormControl';
@@ -90,7 +91,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
90
91
  ownerState: ownerState
91
92
  })
92
93
  }[variant];
93
- const inputComponentRef = useForkRef(ref, InputComponent.ref);
94
+ const inputComponentRef = useForkRef(ref, getReactElementRef(InputComponent));
94
95
  return /*#__PURE__*/_jsx(React.Fragment, {
95
96
  children: /*#__PURE__*/React.cloneElement(InputComponent, _extends({
96
97
  // Most of the logic is implemented in `SelectInput`.
package/Slide/Slide.d.ts CHANGED
@@ -61,4 +61,4 @@ export interface SlideProps extends TransitionProps {
61
61
  * - [Slide API](https://mui.com/material-ui/api/slide/)
62
62
  * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
63
63
  */
64
- export default function Slide(props: SlideProps): JSX.Element;
64
+ export default function Slide(props: SlideProps): React.JSX.Element;
package/Slide/Slide.js CHANGED
@@ -9,6 +9,7 @@ import { Transition } from 'react-transition-group';
9
9
  import chainPropTypes from '@mui/utils/chainPropTypes';
10
10
  import HTMLElementType from '@mui/utils/HTMLElementType';
11
11
  import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
12
+ import getReactElementRef from '@mui/utils/getReactElementRef';
12
13
  import debounce from '../utils/debounce';
13
14
  import useForkRef from '../utils/useForkRef';
14
15
  import useTheme from '../styles/useTheme';
@@ -108,7 +109,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
108
109
  } = props,
109
110
  other = _objectWithoutPropertiesLoose(props, _excluded);
110
111
  const childrenRef = React.useRef(null);
111
- const handleRef = useForkRef(children.ref, childrenRef, ref);
112
+ const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);
112
113
  const normalizedTransitionCallback = callback => isAppearing => {
113
114
  if (callback) {
114
115
  // onEnterXxx and onExitXxx callbacks have a different arguments.length value.