@mui/material 5.16.7 → 5.16.9
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/AccordionActions/AccordionActions.d.ts +1 -1
- package/AccordionDetails/AccordionDetails.d.ts +1 -1
- package/Alert/Alert.d.ts +1 -1
- package/AlertTitle/AlertTitle.d.ts +1 -1
- package/Autocomplete/Autocomplete.d.ts +1 -1
- package/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/Button/Button.d.ts +1 -1
- package/ButtonBase/ButtonBase.d.ts +1 -1
- package/CHANGELOG.md +65 -0
- package/CardActions/CardActions.d.ts +1 -1
- package/CardHeader/CardHeader.d.ts +1 -1
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Chip/Chip.d.ts +3 -3
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/ClickAwayListener/ClickAwayListener.js +2 -3
- package/Collapse/Collapse.d.ts +1 -1
- package/CssBaseline/CssBaseline.d.ts +1 -1
- package/Dialog/Dialog.d.ts +1 -1
- package/DialogActions/DialogActions.d.ts +1 -1
- package/DialogContent/DialogContent.d.ts +1 -1
- package/Drawer/Drawer.d.ts +1 -1
- package/Fade/Fade.d.ts +1 -1
- package/Fade/Fade.js +2 -1
- package/FilledInput/FilledInput.d.ts +1 -1
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormGroup/FormGroup.d.ts +1 -1
- package/GlobalStyles/GlobalStyles.d.ts +1 -1
- package/Grow/Grow.d.ts +1 -1
- package/Grow/Grow.js +2 -1
- package/ImageListItemBar/ImageListItemBar.d.ts +1 -1
- package/Input/Input.d.ts +1 -1
- package/InputBase/InputBase.d.ts +1 -1
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/ListItemAvatar/ListItemAvatar.d.ts +1 -1
- package/ListItemIcon/ListItemIcon.d.ts +1 -1
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +3 -1
- package/ListItemText/ListItemText.d.ts +3 -1
- package/Menu/Menu.d.ts +1 -1
- package/MobileStepper/MobileStepper.d.ts +1 -1
- package/Modal/Modal.d.ts +1 -1
- package/NativeSelect/NativeSelect.d.ts +1 -1
- package/OutlinedInput/OutlinedInput.d.ts +3 -1
- package/OverridableComponent.d.ts +2 -2
- package/Pagination/Pagination.d.ts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Portal/Portal.js +2 -3
- package/README.md +5 -5
- package/Radio/Radio.d.ts +1 -1
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/Rating/Rating.d.ts +1 -1
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +2 -1
- package/Slide/Slide.d.ts +1 -1
- package/Slide/Slide.js +2 -1
- package/Slider/Slider.d.ts +1 -1
- package/Slider/SliderValueLabel.types.d.ts +1 -1
- package/Slider/useSlider.js +3 -3
- package/Snackbar/Snackbar.d.ts +1 -1
- package/SnackbarContent/SnackbarContent.d.ts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDialAction/SpeedDialAction.d.ts +1 -1
- package/SpeedDialIcon/SpeedDialIcon.d.ts +3 -1
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepContent/StepContent.d.ts +1 -1
- package/StepIcon/StepIcon.d.ts +1 -1
- package/StepLabel/StepLabel.d.ts +3 -1
- package/Switch/Switch.d.ts +1 -1
- package/Tab/Tab.d.ts +1 -1
- package/TabScrollButton/TabScrollButton.d.ts +1 -1
- package/TableCell/TableCell.d.ts +1 -1
- package/Tabs/ScrollbarSize.js +3 -2
- package/TextField/TextField.d.ts +1 -1
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +2 -1
- package/Unstable_TrapFocus/FocusTrap.js +2 -3
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +2 -1
- package/index.js +1 -1
- package/legacy/ClickAwayListener/ClickAwayListener.js +2 -3
- package/legacy/Fade/Fade.js +2 -1
- package/legacy/Grow/Grow.js +2 -1
- package/legacy/Portal/Portal.js +3 -3
- package/legacy/Select/Select.js +2 -1
- package/legacy/Slide/Slide.js +2 -1
- package/legacy/Slider/useSlider.js +3 -3
- package/legacy/Tabs/ScrollbarSize.js +3 -2
- package/legacy/Tooltip/Tooltip.js +2 -1
- package/legacy/Unstable_TrapFocus/FocusTrap.js +2 -3
- package/legacy/Zoom/Zoom.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/useAutocomplete/useAutocomplete.js +2 -1
- package/legacy/version/index.js +2 -2
- package/modern/ClickAwayListener/ClickAwayListener.js +2 -3
- package/modern/Fade/Fade.js +2 -1
- package/modern/Grow/Grow.js +2 -1
- package/modern/Portal/Portal.js +2 -3
- package/modern/Select/Select.js +2 -1
- package/modern/Slide/Slide.js +2 -1
- package/modern/Slider/useSlider.js +3 -3
- package/modern/Tabs/ScrollbarSize.js +3 -2
- package/modern/Tooltip/Tooltip.js +2 -1
- package/modern/Unstable_TrapFocus/FocusTrap.js +2 -3
- package/modern/Zoom/Zoom.js +2 -1
- package/modern/index.js +1 -1
- package/modern/useAutocomplete/useAutocomplete.js +2 -1
- package/modern/version/index.js +2 -2
- package/node/ClickAwayListener/ClickAwayListener.js +2 -3
- package/node/Fade/Fade.js +2 -1
- package/node/Grow/Grow.js +2 -1
- package/node/Portal/Portal.js +1 -2
- package/node/Select/Select.js +2 -1
- package/node/Slide/Slide.js +2 -1
- package/node/Slider/useSlider.js +3 -3
- package/node/Tabs/ScrollbarSize.js +3 -2
- package/node/Tooltip/Tooltip.js +2 -1
- package/node/Unstable_TrapFocus/FocusTrap.js +1 -2
- package/node/Zoom/Zoom.js +2 -1
- package/node/index.js +1 -1
- package/node/useAutocomplete/useAutocomplete.js +2 -1
- package/node/version/index.js +2 -2
- package/package.json +8 -8
- package/styles/CssVarsProvider.d.ts +1 -1
- package/types/OverridableComponentAugmentation.d.ts +2 -2
- package/umd/material-ui.development.js +43 -24
- package/umd/material-ui.production.min.js +4 -4
- package/useAutocomplete/useAutocomplete.d.ts +1 -1
- package/useAutocomplete/useAutocomplete.js +2 -1
- package/version/index.js +2 -2
|
@@ -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;
|
|
@@ -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;
|
package/Button/Button.d.ts
CHANGED
|
@@ -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,70 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.16.9
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.16.8..v5.x -->
|
|
6
|
+
|
|
7
|
+
_Dec 3, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 2 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@5.16.9`
|
|
12
|
+
|
|
13
|
+
- [Tabs] Cherry pick `ScrollbarSize` ref being overridden fix (#44595) @DiegoAndai
|
|
14
|
+
|
|
15
|
+
### Core
|
|
16
|
+
|
|
17
|
+
- Ignore browserslist and remove tag latest (#44589) @siriwatknp
|
|
18
|
+
|
|
19
|
+
All contributors of this release in alphabetical order: @DiegoAndai, @siriwatknp
|
|
20
|
+
|
|
21
|
+
## 5.16.8
|
|
22
|
+
|
|
23
|
+
<!-- generated comparing v5.16.7..v5.x -->
|
|
24
|
+
|
|
25
|
+
_Nov 26, 2024_
|
|
26
|
+
|
|
27
|
+
A big thanks to the 8 contributors who made this release possible.
|
|
28
|
+
|
|
29
|
+
### `@mui/material@5.16.8`
|
|
30
|
+
|
|
31
|
+
- Cherry pick ref accessing PRs (#44543) @DiegoAndai
|
|
32
|
+
|
|
33
|
+
### `@mui/utils@5.16.8`
|
|
34
|
+
|
|
35
|
+
- Skip deep clone React element (v5.x) (#44494) @jukkatupamaki
|
|
36
|
+
|
|
37
|
+
### Docs
|
|
38
|
+
|
|
39
|
+
- Keep sponsors up to date @oliviertassinari
|
|
40
|
+
- Fix MUI Treasury Layout broken links (#43753) @oliviertassinari
|
|
41
|
+
- Strengthen CSP rule @oliviertassinari
|
|
42
|
+
- Give up on restoring search @oliviertassinari
|
|
43
|
+
- Normalize next major message @oliviertassinari
|
|
44
|
+
- Fix versions URL @oliviertassinari
|
|
45
|
+
- Fix use of absolute URLs (#43567) @oliviertassinari
|
|
46
|
+
- Restore search on v5 (#43566) @oliviertassinari
|
|
47
|
+
- Fix link from v5 to v6 (#43585) @alexfauquette
|
|
48
|
+
- Updated mui-x roadmap links with the new project URL (@michelengelen) (#43446) @michelengelen
|
|
49
|
+
- Fix broken link to Next.js docs @oliviertassinari
|
|
50
|
+
|
|
51
|
+
### Core
|
|
52
|
+
|
|
53
|
+
- [blog] Polish Upcoming changes to MUI X pricing in 2024 (#43438) @oliviertassinari
|
|
54
|
+
- [blog] Add video to the Pigment CSS blog post (#42500) @oliviertassinari
|
|
55
|
+
- [blog] Announcing pricing changes Sep 2024 (#43272) @cherniavskii
|
|
56
|
+
- Prepare for moving to v5.x branch (#43447) @siriwatknp
|
|
57
|
+
- [core] Cherry pick #42346 to v5 (#44475) @DiegoAndai
|
|
58
|
+
- [core] Fix CI on v5.x branch (#44487) @DiegoAndai
|
|
59
|
+
- [core] Fix CI on v5.x branch (#43564) @oliviertassinari
|
|
60
|
+
- [examples] Fix v5 clone example instructions (#43755) @oliviertassinari
|
|
61
|
+
- [examples] Fix CLI download instructions @oliviertassinari
|
|
62
|
+
- [examples] Fix CDN live preview example @oliviertassinari
|
|
63
|
+
- [examples] Fix more examples to work with v5 @oliviertassinari
|
|
64
|
+
- [examples] Freeze examples dependency range (#43435) @oliviertassinari
|
|
65
|
+
|
|
66
|
+
All contributors of this release in alphabetical order: @alexfauquette, @cherniavskii, @DiegoAndai, @jukkatupamaki, @michelengelen, @oliviertassinari, @rluzists1, @siriwatknp
|
|
67
|
+
|
|
3
68
|
## 5.16.7
|
|
4
69
|
|
|
5
70
|
<!-- generated comparing v5.16.6..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;
|
package/Checkbox/Checkbox.d.ts
CHANGED
|
@@ -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
|
//
|
package/Collapse/Collapse.d.ts
CHANGED
|
@@ -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;
|
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -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;
|
package/Drawer/Drawer.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/FormGroup/FormGroup.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/InputBase/InputBase.d.ts
CHANGED
|
@@ -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: ((
|
|
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
|
-
>(
|
|
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
|
@@ -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) & {
|
|
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;
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/Rating/Rating.d.ts
CHANGED
package/Select/Select.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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.
|