@mui/material 5.16.7 → 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.
- 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 +47 -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/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/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/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/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 +40 -22
- 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
package/Slider/useSlider.js
CHANGED
|
@@ -181,7 +181,7 @@ export function useSlider(parameters) {
|
|
|
181
181
|
tabIndex,
|
|
182
182
|
value: valueProp
|
|
183
183
|
} = parameters;
|
|
184
|
-
const touchId = React.useRef();
|
|
184
|
+
const touchId = React.useRef(undefined);
|
|
185
185
|
// We can't use the :active browser pseudo-classes.
|
|
186
186
|
// - The active state isn't triggered when clicking on the rail.
|
|
187
187
|
// - The active state isn't transferred when inversing a range slider.
|
|
@@ -225,7 +225,7 @@ export function useSlider(parameters) {
|
|
|
225
225
|
ref: focusVisibleRef
|
|
226
226
|
} = useIsFocusVisible();
|
|
227
227
|
const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);
|
|
228
|
-
const sliderRef = React.useRef();
|
|
228
|
+
const sliderRef = React.useRef(null);
|
|
229
229
|
const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
|
230
230
|
const handleRef = useForkRef(ref, handleFocusRef);
|
|
231
231
|
const createHandleHiddenInputFocus = otherHandlers => event => {
|
|
@@ -336,7 +336,7 @@ export function useSlider(parameters) {
|
|
|
336
336
|
// @ts-ignore
|
|
337
337
|
changeValue(event, event.target.valueAsNumber);
|
|
338
338
|
};
|
|
339
|
-
const previousIndex = React.useRef();
|
|
339
|
+
const previousIndex = React.useRef(undefined);
|
|
340
340
|
let axis = orientation;
|
|
341
341
|
if (isRtl && orientation === 'horizontal') {
|
|
342
342
|
axis += '-reverse';
|
package/Snackbar/Snackbar.d.ts
CHANGED
|
@@ -127,4 +127,4 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
|
|
|
127
127
|
*
|
|
128
128
|
* - [Snackbar API](https://mui.com/material-ui/api/snackbar/)
|
|
129
129
|
*/
|
|
130
|
-
export default function Snackbar(props: SnackbarProps): JSX.Element;
|
|
130
|
+
export default function Snackbar(props: SnackbarProps): React.JSX.Element;
|
|
@@ -40,4 +40,4 @@ export interface SnackbarContentProps extends StandardProps<PaperProps, 'childre
|
|
|
40
40
|
* - [SnackbarContent API](https://mui.com/material-ui/api/snackbar-content/)
|
|
41
41
|
* - inherits [Paper API](https://mui.com/material-ui/api/paper/)
|
|
42
42
|
*/
|
|
43
|
-
export default function SnackbarContent(props: SnackbarContentProps): JSX.Element;
|
|
43
|
+
export default function SnackbarContent(props: SnackbarContentProps): React.JSX.Element;
|
package/SpeedDial/SpeedDial.d.ts
CHANGED
|
@@ -102,4 +102,4 @@ export interface SpeedDialProps
|
|
|
102
102
|
*
|
|
103
103
|
* - [SpeedDial API](https://mui.com/material-ui/api/speed-dial/)
|
|
104
104
|
*/
|
|
105
|
-
export default function SpeedDial(props: SpeedDialProps): JSX.Element;
|
|
105
|
+
export default function SpeedDial(props: SpeedDialProps): React.JSX.Element;
|
|
@@ -60,4 +60,4 @@ export interface SpeedDialActionProps extends StandardProps<Partial<TooltipProps
|
|
|
60
60
|
* - [SpeedDialAction API](https://mui.com/material-ui/api/speed-dial-action/)
|
|
61
61
|
* - inherits [Tooltip API](https://mui.com/material-ui/api/tooltip/)
|
|
62
62
|
*/
|
|
63
|
-
export default function SpeedDialAction(props: SpeedDialActionProps): JSX.Element;
|
|
63
|
+
export default function SpeedDialAction(props: SpeedDialActionProps): React.JSX.Element;
|
|
@@ -39,6 +39,8 @@ export interface SpeedDialIconProps
|
|
|
39
39
|
*
|
|
40
40
|
* - [SpeedDialIcon API](https://mui.com/material-ui/api/speed-dial-icon/)
|
|
41
41
|
*/
|
|
42
|
-
declare const SpeedDialIcon: ((props: SpeedDialIconProps) => JSX.Element) & {
|
|
42
|
+
declare const SpeedDialIcon: ((props: SpeedDialIconProps) => React.JSX.Element) & {
|
|
43
|
+
muiName: string;
|
|
44
|
+
};
|
|
43
45
|
|
|
44
46
|
export default SpeedDialIcon;
|
|
@@ -4,7 +4,7 @@ import { InternalStandardProps as StandardProps } from '..';
|
|
|
4
4
|
import { Theme } from '../styles';
|
|
5
5
|
import { StepConnectorClasses } from './stepConnectorClasses';
|
|
6
6
|
|
|
7
|
-
export type StepConnectorIcon = React.ReactElement | string | number;
|
|
7
|
+
export type StepConnectorIcon = React.ReactElement<any> | string | number;
|
|
8
8
|
|
|
9
9
|
export interface StepConnectorProps
|
|
10
10
|
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
@@ -30,4 +30,4 @@ export type StepConnectorClasskey = keyof NonNullable<StepConnectorProps['classe
|
|
|
30
30
|
*
|
|
31
31
|
* - [StepConnector API](https://mui.com/material-ui/api/step-connector/)
|
|
32
32
|
*/
|
|
33
|
-
export default function StepConnector(props: StepConnectorProps): JSX.Element;
|
|
33
|
+
export default function StepConnector(props: StepConnectorProps): React.JSX.Element;
|
|
@@ -53,4 +53,4 @@ export type StepContentClasskey = keyof NonNullable<StepContentProps['classes']>
|
|
|
53
53
|
*
|
|
54
54
|
* - [StepContent API](https://mui.com/material-ui/api/step-content/)
|
|
55
55
|
*/
|
|
56
|
-
export default function StepContent(props: StepContentProps): JSX.Element;
|
|
56
|
+
export default function StepContent(props: StepContentProps): React.JSX.Element;
|
package/StepIcon/StepIcon.d.ts
CHANGED
|
@@ -47,4 +47,4 @@ export type StepIconClasskey = keyof NonNullable<StepIconProps['classes']>;
|
|
|
47
47
|
*
|
|
48
48
|
* - [StepIcon API](https://mui.com/material-ui/api/step-icon/)
|
|
49
49
|
*/
|
|
50
|
-
export default function StepIcon(props: StepIconProps): JSX.Element;
|
|
50
|
+
export default function StepIcon(props: StepIconProps): React.JSX.Element;
|
package/StepLabel/StepLabel.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ export type StepLabelClasskey = keyof NonNullable<StepLabelProps['classes']>;
|
|
|
75
75
|
*
|
|
76
76
|
* - [StepLabel API](https://mui.com/material-ui/api/step-label/)
|
|
77
77
|
*/
|
|
78
|
-
declare const StepLabel: ((props: StepLabelProps) => JSX.Element) & {
|
|
78
|
+
declare const StepLabel: ((props: StepLabelProps) => React.JSX.Element) & {
|
|
79
|
+
muiName: string;
|
|
80
|
+
};
|
|
79
81
|
|
|
80
82
|
export default StepLabel;
|
package/Switch/Switch.d.ts
CHANGED
|
@@ -66,4 +66,4 @@ export interface SwitchProps
|
|
|
66
66
|
* - [Switch API](https://mui.com/material-ui/api/switch/)
|
|
67
67
|
* - inherits [IconButton API](https://mui.com/material-ui/api/icon-button/)
|
|
68
68
|
*/
|
|
69
|
-
export default function Switch(props: SwitchProps): JSX.Element;
|
|
69
|
+
export default function Switch(props: SwitchProps): React.JSX.Element;
|
package/Tab/Tab.d.ts
CHANGED
|
@@ -75,4 +75,4 @@ export interface TabScrollButtonProps extends ButtonBaseProps {
|
|
|
75
75
|
*
|
|
76
76
|
* - [TabScrollButton API](https://mui.com/material-ui/api/tab-scroll-button/)
|
|
77
77
|
*/
|
|
78
|
-
export default function TabScrollButton(props: TabScrollButtonProps): JSX.Element;
|
|
78
|
+
export default function TabScrollButton(props: TabScrollButtonProps): React.JSX.Element;
|
package/TableCell/TableCell.d.ts
CHANGED
|
@@ -83,4 +83,4 @@ export type SortDirection = 'asc' | 'desc' | false;
|
|
|
83
83
|
*
|
|
84
84
|
* - [TableCell API](https://mui.com/material-ui/api/table-cell/)
|
|
85
85
|
*/
|
|
86
|
-
export default function TableCell(props: TableCellProps): JSX.Element;
|
|
86
|
+
export default function TableCell(props: TableCellProps): React.JSX.Element;
|
package/TextField/TextField.d.ts
CHANGED
|
@@ -86,4 +86,4 @@ export interface ToggleButtonGroupProps
|
|
|
86
86
|
*
|
|
87
87
|
* - [ToggleButtonGroup API](https://mui.com/material-ui/api/toggle-button-group/)
|
|
88
88
|
*/
|
|
89
|
-
export default function ToggleButtonGroup(props: ToggleButtonGroupProps): JSX.Element;
|
|
89
|
+
export default function ToggleButtonGroup(props: ToggleButtonGroupProps): React.JSX.Element;
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -225,4 +225,4 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
|
|
|
225
225
|
*
|
|
226
226
|
* - [Tooltip API](https://mui.com/material-ui/api/tooltip/)
|
|
227
227
|
*/
|
|
228
|
-
export default function Tooltip(props: TooltipProps): JSX.Element;
|
|
228
|
+
export default function Tooltip(props: TooltipProps): React.JSX.Element;
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -12,6 +12,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
12
12
|
import { alpha } from '@mui/system/colorManipulator';
|
|
13
13
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
14
14
|
import appendOwnerState from '@mui/utils/appendOwnerState';
|
|
15
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
15
16
|
import { styled, useTheme } from '../styles';
|
|
16
17
|
import { useDefaultProps } from '../DefaultPropsProvider';
|
|
17
18
|
import capitalize from '../utils/capitalize';
|
|
@@ -428,7 +429,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
428
429
|
document.removeEventListener('keydown', handleKeyDown);
|
|
429
430
|
};
|
|
430
431
|
}, [handleClose, open]);
|
|
431
|
-
const handleRef = useForkRef(children
|
|
432
|
+
const handleRef = useForkRef(getReactElementRef(children), focusVisibleRef, setChildNode, ref);
|
|
432
433
|
|
|
433
434
|
// There is no point in displaying an empty tooltip.
|
|
434
435
|
// So we exclude all falsy values, except 0, which is valid.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';
|
|
6
|
+
import { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument, unstable_getReactElementRef as getReactElementRef } from '@mui/utils';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
// Inspired by https://github.com/focus-trap/tabbable
|
|
@@ -93,8 +93,7 @@ function FocusTrap(props) {
|
|
|
93
93
|
// It waits for the active element to move into the component to activate.
|
|
94
94
|
const activated = React.useRef(false);
|
|
95
95
|
const rootRef = React.useRef(null);
|
|
96
|
-
|
|
97
|
-
const handleRef = useForkRef(children.ref, rootRef);
|
|
96
|
+
const handleRef = useForkRef(getReactElementRef(children), rootRef);
|
|
98
97
|
const lastKeydown = React.useRef(null);
|
|
99
98
|
React.useEffect(() => {
|
|
100
99
|
// We might render an empty child.
|
package/Zoom/Zoom.d.ts
CHANGED
|
@@ -47,4 +47,4 @@ export interface ZoomProps extends TransitionProps {
|
|
|
47
47
|
* - [Zoom API](https://mui.com/material-ui/api/zoom/)
|
|
48
48
|
* - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
|
|
49
49
|
*/
|
|
50
|
-
export default function Zoom(props: ZoomProps): JSX.Element;
|
|
50
|
+
export default function Zoom(props: ZoomProps): React.JSX.Element;
|
package/Zoom/Zoom.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 Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
50
51
|
} = props,
|
|
51
52
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
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;
|
package/index.js
CHANGED
|
@@ -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";
|
|
@@ -48,9 +49,7 @@ function ClickAwayListener(props) {
|
|
|
48
49
|
activatedRef.current = false;
|
|
49
50
|
};
|
|
50
51
|
}, []);
|
|
51
|
-
var handleRef = useForkRef(
|
|
52
|
-
// @ts-expect-error TODO upstream fix
|
|
53
|
-
children.ref, nodeRef);
|
|
52
|
+
var handleRef = useForkRef(getReactElementRef(children), nodeRef);
|
|
54
53
|
|
|
55
54
|
// The handler doesn't take event.defaultPrevented into account:
|
|
56
55
|
//
|
package/legacy/Fade/Fade.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Transition } from 'react-transition-group';
|
|
8
8
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
9
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
9
10
|
import useTheme from '../styles/useTheme';
|
|
10
11
|
import { reflow, getTransitionProps } from '../transitions/utils';
|
|
11
12
|
import useForkRef from '../utils/useForkRef';
|
|
@@ -49,7 +50,7 @@ var Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
49
50
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
50
51
|
var enableStrictModeCompat = true;
|
|
51
52
|
var nodeRef = React.useRef(null);
|
|
52
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
53
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
53
54
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
54
55
|
return function (maybeIsAppearing) {
|
|
55
56
|
if (callback) {
|
package/legacy/Grow/Grow.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import useTimeout from '@mui/utils/useTimeout';
|
|
8
8
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
9
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
9
10
|
import { Transition } from 'react-transition-group';
|
|
10
11
|
import useTheme from '../styles/useTheme';
|
|
11
12
|
import { getTransitionProps, reflow } from '../transitions/utils';
|
|
@@ -59,7 +60,7 @@ var Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
59
60
|
var autoTimeout = React.useRef();
|
|
60
61
|
var theme = useTheme();
|
|
61
62
|
var nodeRef = React.useRef(null);
|
|
62
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
63
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
63
64
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
64
65
|
return function (maybeIsAppearing) {
|
|
65
66
|
if (callback) {
|
package/legacy/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,8 @@ var Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef)
|
|
|
28
28
|
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal;
|
|
29
29
|
var _React$useState = React.useState(null),
|
|
30
30
|
mountNode = _React$useState[0],
|
|
31
|
-
setMountNode = _React$useState[1];
|
|
32
|
-
var handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children
|
|
31
|
+
setMountNode = _React$useState[1];
|
|
32
|
+
var handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
|
|
33
33
|
useEnhancedEffect(function () {
|
|
34
34
|
if (!disablePortal) {
|
|
35
35
|
setMountNode(getContainer(container) || document.body);
|
package/legacy/Select/Select.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import deepmerge from '@mui/utils/deepmerge';
|
|
9
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
9
10
|
import SelectInput from './SelectInput';
|
|
10
11
|
import formControlState from '../FormControl/formControlState';
|
|
11
12
|
import useFormControl from '../FormControl/useFormControl';
|
|
@@ -97,7 +98,7 @@ var Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
97
98
|
ownerState: ownerState
|
|
98
99
|
})
|
|
99
100
|
}[variant];
|
|
100
|
-
var inputComponentRef = useForkRef(ref, InputComponent
|
|
101
|
+
var inputComponentRef = useForkRef(ref, getReactElementRef(InputComponent));
|
|
101
102
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
102
103
|
children: /*#__PURE__*/React.cloneElement(InputComponent, _extends({
|
|
103
104
|
// Most of the logic is implemented in `SelectInput`.
|
package/legacy/Slide/Slide.js
CHANGED
|
@@ -8,6 +8,7 @@ import { Transition } from 'react-transition-group';
|
|
|
8
8
|
import chainPropTypes from '@mui/utils/chainPropTypes';
|
|
9
9
|
import HTMLElementType from '@mui/utils/HTMLElementType';
|
|
10
10
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
11
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
11
12
|
import debounce from '../utils/debounce';
|
|
12
13
|
import useForkRef from '../utils/useForkRef';
|
|
13
14
|
import useTheme from '../styles/useTheme';
|
|
@@ -109,7 +110,7 @@ var Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
109
110
|
TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,
|
|
110
111
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "container", "direction", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
111
112
|
var childrenRef = React.useRef(null);
|
|
112
|
-
var handleRef = useForkRef(_children
|
|
113
|
+
var handleRef = useForkRef(getReactElementRef(_children), childrenRef, ref);
|
|
113
114
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
114
115
|
return function (isAppearing) {
|
|
115
116
|
if (callback) {
|
|
@@ -203,7 +203,7 @@ export function useSlider(parameters) {
|
|
|
203
203
|
shiftStep = _parameters$shiftStep === void 0 ? 10 : _parameters$shiftStep,
|
|
204
204
|
tabIndex = parameters.tabIndex,
|
|
205
205
|
valueProp = parameters.value;
|
|
206
|
-
var touchId = React.useRef();
|
|
206
|
+
var touchId = React.useRef(undefined);
|
|
207
207
|
// We can't use the :active browser pseudo-classes.
|
|
208
208
|
// - The active state isn't triggered when clicking on the rail.
|
|
209
209
|
// - The active state isn't transferred when inversing a range slider.
|
|
@@ -263,7 +263,7 @@ export function useSlider(parameters) {
|
|
|
263
263
|
var _React$useState4 = React.useState(-1),
|
|
264
264
|
focusedThumbIndex = _React$useState4[0],
|
|
265
265
|
setFocusedThumbIndex = _React$useState4[1];
|
|
266
|
-
var sliderRef = React.useRef();
|
|
266
|
+
var sliderRef = React.useRef(null);
|
|
267
267
|
var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
|
268
268
|
var handleRef = useForkRef(ref, handleFocusRef);
|
|
269
269
|
var createHandleHiddenInputFocus = function createHandleHiddenInputFocus(otherHandlers) {
|
|
@@ -382,7 +382,7 @@ export function useSlider(parameters) {
|
|
|
382
382
|
changeValue(event, event.target.valueAsNumber);
|
|
383
383
|
};
|
|
384
384
|
};
|
|
385
|
-
var previousIndex = React.useRef();
|
|
385
|
+
var previousIndex = React.useRef(undefined);
|
|
386
386
|
var axis = orientation;
|
|
387
387
|
if (isRtl && orientation === 'horizontal') {
|
|
388
388
|
axis += '-reverse';
|
|
@@ -13,6 +13,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
13
13
|
import { alpha } from '@mui/system/colorManipulator';
|
|
14
14
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
15
15
|
import appendOwnerState from '@mui/utils/appendOwnerState';
|
|
16
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
16
17
|
import { styled, useTheme } from '../styles';
|
|
17
18
|
import { useDefaultProps } from '../DefaultPropsProvider';
|
|
18
19
|
import capitalize from '../utils/capitalize';
|
|
@@ -442,7 +443,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
442
443
|
document.removeEventListener('keydown', handleKeyDown);
|
|
443
444
|
};
|
|
444
445
|
}, [handleClose, open]);
|
|
445
|
-
var handleRef = useForkRef(children
|
|
446
|
+
var handleRef = useForkRef(getReactElementRef(children), focusVisibleRef, setChildNode, ref);
|
|
446
447
|
|
|
447
448
|
// There is no point in displaying an empty tooltip.
|
|
448
449
|
// So we exclude all falsy values, except 0, which is valid.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';
|
|
6
|
+
import { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument, unstable_getReactElementRef as getReactElementRef } from '@mui/utils';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
// Inspired by https://github.com/focus-trap/tabbable
|
|
@@ -102,8 +102,7 @@ function FocusTrap(props) {
|
|
|
102
102
|
// It waits for the active element to move into the component to activate.
|
|
103
103
|
var activated = React.useRef(false);
|
|
104
104
|
var rootRef = React.useRef(null);
|
|
105
|
-
|
|
106
|
-
var handleRef = useForkRef(children.ref, rootRef);
|
|
105
|
+
var handleRef = useForkRef(getReactElementRef(children), rootRef);
|
|
107
106
|
var lastKeydown = React.useRef(null);
|
|
108
107
|
React.useEffect(function () {
|
|
109
108
|
// We might render an empty child.
|
package/legacy/Zoom/Zoom.js
CHANGED
|
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { Transition } from 'react-transition-group';
|
|
8
8
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
9
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
9
10
|
import useTheme from '../styles/useTheme';
|
|
10
11
|
import { reflow, getTransitionProps } from '../transitions/utils';
|
|
11
12
|
import useForkRef from '../utils/useForkRef';
|
|
@@ -49,7 +50,7 @@ var Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
49
50
|
TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,
|
|
50
51
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
51
52
|
var nodeRef = React.useRef(null);
|
|
52
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
53
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
53
54
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
54
55
|
return function (maybeIsAppearing) {
|
|
55
56
|
if (callback) {
|
package/legacy/index.js
CHANGED
|
@@ -65,6 +65,7 @@ var defaultIsActiveElementInListbox = function defaultIsActiveElementInListbox(l
|
|
|
65
65
|
var _listboxRef$current$p;
|
|
66
66
|
return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement));
|
|
67
67
|
};
|
|
68
|
+
var MULTIPLE_DEFAULT_VALUE = [];
|
|
68
69
|
function useAutocomplete(props) {
|
|
69
70
|
var _props$unstable_isAct = props.unstable_isActiveElementInListbox,
|
|
70
71
|
unstable_isActiveElementInListbox = _props$unstable_isAct === void 0 ? defaultIsActiveElementInListbox : _props$unstable_isAct,
|
|
@@ -85,7 +86,7 @@ function useAutocomplete(props) {
|
|
|
85
86
|
_props$componentName = props.componentName,
|
|
86
87
|
componentName = _props$componentName === void 0 ? 'useAutocomplete' : _props$componentName,
|
|
87
88
|
_props$defaultValue = props.defaultValue,
|
|
88
|
-
defaultValue = _props$defaultValue === void 0 ? props.multiple ?
|
|
89
|
+
defaultValue = _props$defaultValue === void 0 ? props.multiple ? MULTIPLE_DEFAULT_VALUE : null : _props$defaultValue,
|
|
89
90
|
_props$disableClearab = props.disableClearable,
|
|
90
91
|
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
|
91
92
|
_props$disableCloseOn = props.disableCloseOnSelect,
|
package/legacy/version/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export var version = "5.16.
|
|
1
|
+
export var version = "5.16.8";
|
|
2
2
|
export var major = Number("5");
|
|
3
3
|
export var minor = Number("16");
|
|
4
|
-
export var patch = Number("
|
|
4
|
+
export var patch = Number("8");
|
|
5
5
|
export var preReleaseLabel = undefined || null;
|
|
6
6
|
export var preReleaseNumber = Number(undefined) || null;
|
|
7
7
|
export default version;
|
|
@@ -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/modern/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;
|
package/modern/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;
|
package/modern/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/modern/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/modern/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.
|
|
@@ -178,7 +178,7 @@ export function useSlider(parameters) {
|
|
|
178
178
|
tabIndex,
|
|
179
179
|
value: valueProp
|
|
180
180
|
} = parameters;
|
|
181
|
-
const touchId = React.useRef();
|
|
181
|
+
const touchId = React.useRef(undefined);
|
|
182
182
|
// We can't use the :active browser pseudo-classes.
|
|
183
183
|
// - The active state isn't triggered when clicking on the rail.
|
|
184
184
|
// - The active state isn't transferred when inversing a range slider.
|
|
@@ -222,7 +222,7 @@ export function useSlider(parameters) {
|
|
|
222
222
|
ref: focusVisibleRef
|
|
223
223
|
} = useIsFocusVisible();
|
|
224
224
|
const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);
|
|
225
|
-
const sliderRef = React.useRef();
|
|
225
|
+
const sliderRef = React.useRef(null);
|
|
226
226
|
const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
|
227
227
|
const handleRef = useForkRef(ref, handleFocusRef);
|
|
228
228
|
const createHandleHiddenInputFocus = otherHandlers => event => {
|
|
@@ -328,7 +328,7 @@ export function useSlider(parameters) {
|
|
|
328
328
|
// @ts-ignore
|
|
329
329
|
changeValue(event, event.target.valueAsNumber);
|
|
330
330
|
};
|
|
331
|
-
const previousIndex = React.useRef();
|
|
331
|
+
const previousIndex = React.useRef(undefined);
|
|
332
332
|
let axis = orientation;
|
|
333
333
|
if (isRtl && orientation === 'horizontal') {
|
|
334
334
|
axis += '-reverse';
|
|
@@ -12,6 +12,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
12
12
|
import { alpha } from '@mui/system/colorManipulator';
|
|
13
13
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
14
14
|
import appendOwnerState from '@mui/utils/appendOwnerState';
|
|
15
|
+
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
15
16
|
import { styled, useTheme } from '../styles';
|
|
16
17
|
import { useDefaultProps } from '../DefaultPropsProvider';
|
|
17
18
|
import capitalize from '../utils/capitalize';
|
|
@@ -427,7 +428,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
427
428
|
document.removeEventListener('keydown', handleKeyDown);
|
|
428
429
|
};
|
|
429
430
|
}, [handleClose, open]);
|
|
430
|
-
const handleRef = useForkRef(children
|
|
431
|
+
const handleRef = useForkRef(getReactElementRef(children), focusVisibleRef, setChildNode, ref);
|
|
431
432
|
|
|
432
433
|
// There is no point in displaying an empty tooltip.
|
|
433
434
|
// So we exclude all falsy values, except 0, which is valid.
|