@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
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';
|
|
@@ -51,9 +51,10 @@ export default function ScrollbarSize(props) {
|
|
|
51
51
|
onChange(scrollbarHeight.current);
|
|
52
52
|
}, [onChange]);
|
|
53
53
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
54
|
-
style: styles
|
|
54
|
+
style: styles
|
|
55
|
+
}, other, {
|
|
55
56
|
ref: nodeRef
|
|
56
|
-
}
|
|
57
|
+
}));
|
|
57
58
|
}
|
|
58
59
|
process.env.NODE_ENV !== "production" ? ScrollbarSize.propTypes = {
|
|
59
60
|
onChange: PropTypes.func.isRequired
|
|
@@ -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.
|
|
@@ -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/modern/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/modern/index.js
CHANGED
|
@@ -58,6 +58,7 @@ const defaultFilterOptions = createFilterOptions();
|
|
|
58
58
|
// Number of options to jump in list box when `Page Up` and `Page Down` keys are used.
|
|
59
59
|
const pageSize = 5;
|
|
60
60
|
const defaultIsActiveElementInListbox = listboxRef => listboxRef.current !== null && listboxRef.current.parentElement?.contains(document.activeElement);
|
|
61
|
+
const MULTIPLE_DEFAULT_VALUE = [];
|
|
61
62
|
function useAutocomplete(props) {
|
|
62
63
|
const {
|
|
63
64
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -71,7 +72,7 @@ function useAutocomplete(props) {
|
|
|
71
72
|
clearOnBlur = !props.freeSolo,
|
|
72
73
|
clearOnEscape = false,
|
|
73
74
|
componentName = 'useAutocomplete',
|
|
74
|
-
defaultValue = props.multiple ?
|
|
75
|
+
defaultValue = props.multiple ? MULTIPLE_DEFAULT_VALUE : null,
|
|
75
76
|
disableClearable = false,
|
|
76
77
|
disableCloseOnSelect = false,
|
|
77
78
|
disabled: disabledProp,
|
package/modern/version/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const version = "5.16.
|
|
1
|
+
export const version = "5.16.9";
|
|
2
2
|
export const major = Number("5");
|
|
3
3
|
export const minor = Number("16");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("9");
|
|
5
5
|
export const preReleaseLabel = undefined || null;
|
|
6
6
|
export const preReleaseNumber = Number(undefined) || null;
|
|
7
7
|
export default version;
|
|
@@ -9,6 +9,7 @@ exports.ClickAwayListener = ClickAwayListener;
|
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _utils = require("@mui/utils");
|
|
12
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -54,9 +55,7 @@ function ClickAwayListener(props) {
|
|
|
54
55
|
activatedRef.current = false;
|
|
55
56
|
};
|
|
56
57
|
}, []);
|
|
57
|
-
const handleRef = (0, _utils.unstable_useForkRef)(
|
|
58
|
-
// @ts-expect-error TODO upstream fix
|
|
59
|
-
children.ref, nodeRef);
|
|
58
|
+
const handleRef = (0, _utils.unstable_useForkRef)((0, _getReactElementRef.default)(children), nodeRef);
|
|
60
59
|
|
|
61
60
|
// The handler doesn't take event.defaultPrevented into account:
|
|
62
61
|
//
|
package/node/Fade/Fade.js
CHANGED
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _reactTransitionGroup = require("react-transition-group");
|
|
14
14
|
var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
|
|
15
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
15
16
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
16
17
|
var _utils = require("../transitions/utils");
|
|
17
18
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
@@ -58,7 +59,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
58
59
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
59
60
|
const enableStrictModeCompat = true;
|
|
60
61
|
const nodeRef = React.useRef(null);
|
|
61
|
-
const handleRef = (0, _useForkRef.default)(nodeRef, children
|
|
62
|
+
const handleRef = (0, _useForkRef.default)(nodeRef, (0, _getReactElementRef.default)(children), ref);
|
|
62
63
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
63
64
|
if (callback) {
|
|
64
65
|
const node = nodeRef.current;
|
package/node/Grow/Grow.js
CHANGED
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _useTimeout = _interopRequireDefault(require("@mui/utils/useTimeout"));
|
|
14
14
|
var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
|
|
15
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
15
16
|
var _reactTransitionGroup = require("react-transition-group");
|
|
16
17
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
17
18
|
var _utils = require("../transitions/utils");
|
|
@@ -68,7 +69,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
68
69
|
const autoTimeout = React.useRef();
|
|
69
70
|
const theme = (0, _useTheme.default)();
|
|
70
71
|
const nodeRef = React.useRef(null);
|
|
71
|
-
const handleRef = (0, _useForkRef.default)(nodeRef, children
|
|
72
|
+
const handleRef = (0, _useForkRef.default)(nodeRef, (0, _getReactElementRef.default)(children), ref);
|
|
72
73
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
73
74
|
if (callback) {
|
|
74
75
|
const node = nodeRef.current;
|
package/node/Portal/Portal.js
CHANGED
|
@@ -36,8 +36,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
|
36
36
|
disablePortal = false
|
|
37
37
|
} = props;
|
|
38
38
|
const [mountNode, setMountNode] = React.useState(null);
|
|
39
|
-
|
|
40
|
-
const handleRef = (0, _utils.unstable_useForkRef)( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, forwardedRef);
|
|
39
|
+
const handleRef = (0, _utils.unstable_useForkRef)( /*#__PURE__*/React.isValidElement(children) ? (0, _utils.unstable_getReactElementRef)(children) : null, forwardedRef);
|
|
41
40
|
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
42
41
|
if (!disablePortal) {
|
|
43
42
|
setMountNode(getContainer(container) || document.body);
|
package/node/Select/Select.js
CHANGED
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
|
15
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
15
16
|
var _SelectInput = _interopRequireDefault(require("./SelectInput"));
|
|
16
17
|
var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
|
|
17
18
|
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
@@ -98,7 +99,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
98
99
|
ownerState: ownerState
|
|
99
100
|
})
|
|
100
101
|
}[variant];
|
|
101
|
-
const inputComponentRef = (0, _useForkRef.default)(ref,
|
|
102
|
+
const inputComponentRef = (0, _useForkRef.default)(ref, (0, _getReactElementRef.default)(InputComponent));
|
|
102
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
103
104
|
children: /*#__PURE__*/React.cloneElement(InputComponent, (0, _extends2.default)({
|
|
104
105
|
// Most of the logic is implemented in `SelectInput`.
|
package/node/Slide/Slide.js
CHANGED
|
@@ -15,6 +15,7 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
15
15
|
var _chainPropTypes = _interopRequireDefault(require("@mui/utils/chainPropTypes"));
|
|
16
16
|
var _HTMLElementType = _interopRequireDefault(require("@mui/utils/HTMLElementType"));
|
|
17
17
|
var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
|
|
18
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
18
19
|
var _debounce = _interopRequireDefault(require("../utils/debounce"));
|
|
19
20
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
20
21
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
@@ -115,7 +116,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
115
116
|
} = props,
|
|
116
117
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
117
118
|
const childrenRef = React.useRef(null);
|
|
118
|
-
const handleRef = (0, _useForkRef.default)(children
|
|
119
|
+
const handleRef = (0, _useForkRef.default)((0, _getReactElementRef.default)(children), childrenRef, ref);
|
|
119
120
|
const normalizedTransitionCallback = callback => isAppearing => {
|
|
120
121
|
if (callback) {
|
|
121
122
|
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
package/node/Slider/useSlider.js
CHANGED
|
@@ -192,7 +192,7 @@ function useSlider(parameters) {
|
|
|
192
192
|
tabIndex,
|
|
193
193
|
value: valueProp
|
|
194
194
|
} = parameters;
|
|
195
|
-
const touchId = React.useRef();
|
|
195
|
+
const touchId = React.useRef(undefined);
|
|
196
196
|
// We can't use the :active browser pseudo-classes.
|
|
197
197
|
// - The active state isn't triggered when clicking on the rail.
|
|
198
198
|
// - The active state isn't transferred when inversing a range slider.
|
|
@@ -236,7 +236,7 @@ function useSlider(parameters) {
|
|
|
236
236
|
ref: focusVisibleRef
|
|
237
237
|
} = (0, _utils.unstable_useIsFocusVisible)();
|
|
238
238
|
const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);
|
|
239
|
-
const sliderRef = React.useRef();
|
|
239
|
+
const sliderRef = React.useRef(null);
|
|
240
240
|
const handleFocusRef = (0, _utils.unstable_useForkRef)(focusVisibleRef, sliderRef);
|
|
241
241
|
const handleRef = (0, _utils.unstable_useForkRef)(ref, handleFocusRef);
|
|
242
242
|
const createHandleHiddenInputFocus = otherHandlers => event => {
|
|
@@ -347,7 +347,7 @@ function useSlider(parameters) {
|
|
|
347
347
|
// @ts-ignore
|
|
348
348
|
changeValue(event, event.target.valueAsNumber);
|
|
349
349
|
};
|
|
350
|
-
const previousIndex = React.useRef();
|
|
350
|
+
const previousIndex = React.useRef(undefined);
|
|
351
351
|
let axis = orientation;
|
|
352
352
|
if (isRtl && orientation === 'horizontal') {
|
|
353
353
|
axis += '-reverse';
|
|
@@ -59,9 +59,10 @@ function ScrollbarSize(props) {
|
|
|
59
59
|
onChange(scrollbarHeight.current);
|
|
60
60
|
}, [onChange]);
|
|
61
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
|
|
62
|
-
style: styles
|
|
62
|
+
style: styles
|
|
63
|
+
}, other, {
|
|
63
64
|
ref: nodeRef
|
|
64
|
-
}
|
|
65
|
+
}));
|
|
65
66
|
}
|
|
66
67
|
process.env.NODE_ENV !== "production" ? ScrollbarSize.propTypes = {
|
|
67
68
|
onChange: _propTypes.default.func.isRequired
|
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -18,6 +18,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
18
18
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
19
19
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
20
20
|
var _appendOwnerState = _interopRequireDefault(require("@mui/utils/appendOwnerState"));
|
|
21
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
21
22
|
var _styles = require("../styles");
|
|
22
23
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
23
24
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
@@ -436,7 +437,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
436
437
|
document.removeEventListener('keydown', handleKeyDown);
|
|
437
438
|
};
|
|
438
439
|
}, [handleClose, open]);
|
|
439
|
-
const handleRef = (0, _useForkRef.default)(children
|
|
440
|
+
const handleRef = (0, _useForkRef.default)((0, _getReactElementRef.default)(children), focusVisibleRef, setChildNode, ref);
|
|
440
441
|
|
|
441
442
|
// There is no point in displaying an empty tooltip.
|
|
442
443
|
// So we exclude all falsy values, except 0, which is valid.
|
|
@@ -100,8 +100,7 @@ function FocusTrap(props) {
|
|
|
100
100
|
// It waits for the active element to move into the component to activate.
|
|
101
101
|
const activated = React.useRef(false);
|
|
102
102
|
const rootRef = React.useRef(null);
|
|
103
|
-
|
|
104
|
-
const handleRef = (0, _utils.unstable_useForkRef)(children.ref, rootRef);
|
|
103
|
+
const handleRef = (0, _utils.unstable_useForkRef)((0, _utils.unstable_getReactElementRef)(children), rootRef);
|
|
105
104
|
const lastKeydown = React.useRef(null);
|
|
106
105
|
React.useEffect(() => {
|
|
107
106
|
// We might render an empty child.
|
package/node/Zoom/Zoom.js
CHANGED
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _reactTransitionGroup = require("react-transition-group");
|
|
14
14
|
var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
|
|
15
|
+
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
15
16
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
16
17
|
var _utils = require("../transitions/utils");
|
|
17
18
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
@@ -58,7 +59,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
58
59
|
} = props,
|
|
59
60
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
60
61
|
const nodeRef = React.useRef(null);
|
|
61
|
-
const handleRef = (0, _useForkRef.default)(nodeRef, children
|
|
62
|
+
const handleRef = (0, _useForkRef.default)(nodeRef, (0, _getReactElementRef.default)(children), ref);
|
|
62
63
|
const normalizedTransitionCallback = callback => maybeIsAppearing => {
|
|
63
64
|
if (callback) {
|
|
64
65
|
const node = nodeRef.current;
|
package/node/index.js
CHANGED
|
@@ -69,6 +69,7 @@ const defaultIsActiveElementInListbox = listboxRef => {
|
|
|
69
69
|
var _listboxRef$current$p;
|
|
70
70
|
return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement));
|
|
71
71
|
};
|
|
72
|
+
const MULTIPLE_DEFAULT_VALUE = [];
|
|
72
73
|
function useAutocomplete(props) {
|
|
73
74
|
const {
|
|
74
75
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -82,7 +83,7 @@ function useAutocomplete(props) {
|
|
|
82
83
|
clearOnBlur = !props.freeSolo,
|
|
83
84
|
clearOnEscape = false,
|
|
84
85
|
componentName = 'useAutocomplete',
|
|
85
|
-
defaultValue = props.multiple ?
|
|
86
|
+
defaultValue = props.multiple ? MULTIPLE_DEFAULT_VALUE : null,
|
|
86
87
|
disableClearable = false,
|
|
87
88
|
disableCloseOnSelect = false,
|
|
88
89
|
disabled: disabledProp,
|
package/node/version/index.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.preReleaseNumber = exports.preReleaseLabel = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "5.16.
|
|
7
|
+
const version = exports.version = "5.16.9";
|
|
8
8
|
const major = exports.major = Number("5");
|
|
9
9
|
const minor = exports.minor = Number("16");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("9");
|
|
11
11
|
const preReleaseLabel = exports.preReleaseLabel = undefined || null;
|
|
12
12
|
const preReleaseNumber = exports.preReleaseNumber = Number(undefined) || null;
|
|
13
13
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/mui/material-ui/issues"
|
|
23
23
|
},
|
|
24
|
-
"homepage": "https://mui.com/material-ui/",
|
|
24
|
+
"homepage": "https://v5.mui.com/material-ui/",
|
|
25
25
|
"funding": {
|
|
26
26
|
"type": "opencollective",
|
|
27
27
|
"url": "https://opencollective.com/mui-org"
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^18.3.1",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/utils": "^5.16.
|
|
38
|
+
"@mui/core-downloads-tracker": "^5.16.9",
|
|
39
|
+
"@mui/utils": "^5.16.8",
|
|
40
40
|
"@mui/types": "^7.2.15",
|
|
41
|
-
"@mui/
|
|
41
|
+
"@mui/system": "^5.16.8"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
45
45
|
"@emotion/styled": "^11.3.0",
|
|
46
|
-
"@types/react": "^17.0.0 || ^18.0.0",
|
|
47
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
48
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
46
|
+
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@types/react": {
|
|
@@ -16,7 +16,7 @@ declare const CssVarsProvider: (props: React.PropsWithChildren<Partial<import("@
|
|
|
16
16
|
storageWindow?: Window | null | undefined;
|
|
17
17
|
disableNestedContext?: boolean | undefined;
|
|
18
18
|
disableStyleSheetGeneration?: boolean | undefined;
|
|
19
|
-
}>) => React.
|
|
19
|
+
}>) => React.JSX.Element, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>;
|
|
20
20
|
/**
|
|
21
21
|
* @deprecated Use `InitColorSchemeScript` instead
|
|
22
22
|
* ```diff
|
|
@@ -13,8 +13,8 @@ declare module '@mui/material/OverridableComponent' {
|
|
|
13
13
|
* Either a string to use a HTML element or a component.
|
|
14
14
|
*/
|
|
15
15
|
component: DefaultComponent;
|
|
16
|
-
} & OverridePropsVer2<TypeMap, DefaultComponent>): JSX.Element;
|
|
17
|
-
(props: DefaultComponentPropsVer2<TypeMap>): JSX.Element;
|
|
16
|
+
} & OverridePropsVer2<TypeMap, DefaultComponent>): React.JSX.Element;
|
|
17
|
+
(props: DefaultComponentPropsVer2<TypeMap>): React.JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Props of the component if `component={Component}` is used.
|