@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.16.
|
|
2
|
+
* @mui/material v5.16.9
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -5068,7 +5068,7 @@
|
|
|
5068
5068
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
|
|
5069
5069
|
}
|
|
5070
5070
|
function deepClone(source) {
|
|
5071
|
-
if (!isPlainObject(source)) {
|
|
5071
|
+
if ( /*#__PURE__*/React__namespace.isValidElement(source) || !isPlainObject(source)) {
|
|
5072
5072
|
return source;
|
|
5073
5073
|
}
|
|
5074
5074
|
var output = {};
|
|
@@ -5084,7 +5084,9 @@
|
|
|
5084
5084
|
var output = options.clone ? _extends({}, target) : target;
|
|
5085
5085
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
5086
5086
|
Object.keys(source).forEach(function (key) {
|
|
5087
|
-
if (
|
|
5087
|
+
if ( /*#__PURE__*/React__namespace.isValidElement(source[key])) {
|
|
5088
|
+
output[key] = source[key];
|
|
5089
|
+
} else if (isPlainObject(source[key]) &&
|
|
5088
5090
|
// Avoid prototype pollution
|
|
5089
5091
|
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
5090
5092
|
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
@@ -8659,6 +8661,24 @@
|
|
|
8659
8661
|
return props;
|
|
8660
8662
|
}
|
|
8661
8663
|
|
|
8664
|
+
/**
|
|
8665
|
+
* Returns the ref of a React element handling differences between React 19 and older versions.
|
|
8666
|
+
* It will throw runtime error if the element is not a valid React element.
|
|
8667
|
+
*
|
|
8668
|
+
* @param element React.ReactElement
|
|
8669
|
+
* @returns React.Ref<any> | null
|
|
8670
|
+
*/
|
|
8671
|
+
function getReactElementRef(element) {
|
|
8672
|
+
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions
|
|
8673
|
+
if (parseInt(React__namespace.version, 10) >= 19) {
|
|
8674
|
+
var _element$props;
|
|
8675
|
+
return (element == null || (_element$props = element.props) == null ? void 0 : _element$props.ref) || null;
|
|
8676
|
+
}
|
|
8677
|
+
// @ts-expect-error element.ref is not included in the ReactElement type
|
|
8678
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189
|
|
8679
|
+
return (element == null ? void 0 : element.ref) || null;
|
|
8680
|
+
}
|
|
8681
|
+
|
|
8662
8682
|
var ThemeContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
8663
8683
|
{
|
|
8664
8684
|
ThemeContext.displayName = 'ThemeContext';
|
|
@@ -10233,9 +10253,9 @@
|
|
|
10233
10253
|
}, other, {
|
|
10234
10254
|
children: React__namespace.Children.map(children, function (child) {
|
|
10235
10255
|
if ( /*#__PURE__*/React__namespace.isValidElement(child) && isMuiElement(child, ['Grid'])) {
|
|
10236
|
-
var _child$props
|
|
10256
|
+
var _unstable_level, _child$props;
|
|
10237
10257
|
return /*#__PURE__*/React__namespace.cloneElement(child, {
|
|
10238
|
-
unstable_level: (_child$props
|
|
10258
|
+
unstable_level: (_unstable_level = (_child$props = child.props) == null ? void 0 : _child$props.unstable_level) != null ? _unstable_level : level + 1
|
|
10239
10259
|
});
|
|
10240
10260
|
}
|
|
10241
10261
|
return child;
|
|
@@ -16132,6 +16152,7 @@
|
|
|
16132
16152
|
var _listboxRef$current$p;
|
|
16133
16153
|
return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement));
|
|
16134
16154
|
};
|
|
16155
|
+
var MULTIPLE_DEFAULT_VALUE = [];
|
|
16135
16156
|
function useAutocomplete(props) {
|
|
16136
16157
|
var _props$unstable_isAct = props.unstable_isActiveElementInListbox,
|
|
16137
16158
|
unstable_isActiveElementInListbox = _props$unstable_isAct === void 0 ? defaultIsActiveElementInListbox : _props$unstable_isAct,
|
|
@@ -16152,7 +16173,7 @@
|
|
|
16152
16173
|
_props$componentName = props.componentName,
|
|
16153
16174
|
componentName = _props$componentName === void 0 ? 'useAutocomplete' : _props$componentName,
|
|
16154
16175
|
_props$defaultValue = props.defaultValue,
|
|
16155
|
-
defaultValue = _props$defaultValue === void 0 ? props.multiple ?
|
|
16176
|
+
defaultValue = _props$defaultValue === void 0 ? props.multiple ? MULTIPLE_DEFAULT_VALUE : null : _props$defaultValue,
|
|
16156
16177
|
_props$disableClearab = props.disableClearable,
|
|
16157
16178
|
disableClearable = _props$disableClearab === void 0 ? false : _props$disableClearab,
|
|
16158
16179
|
_props$disableCloseOn = props.disableCloseOnSelect,
|
|
@@ -18958,8 +18979,8 @@
|
|
|
18958
18979
|
disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal;
|
|
18959
18980
|
var _React$useState = React__namespace.useState(null),
|
|
18960
18981
|
mountNode = _React$useState[0],
|
|
18961
|
-
setMountNode = _React$useState[1];
|
|
18962
|
-
var handleRef = useForkRef( /*#__PURE__*/React__namespace.isValidElement(children) ? children
|
|
18982
|
+
setMountNode = _React$useState[1];
|
|
18983
|
+
var handleRef = useForkRef( /*#__PURE__*/React__namespace.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
|
|
18963
18984
|
useEnhancedEffect$1(function () {
|
|
18964
18985
|
if (!disablePortal) {
|
|
18965
18986
|
setMountNode(getContainer$1(container) || document.body);
|
|
@@ -22786,7 +22807,7 @@
|
|
|
22786
22807
|
TransitionComponent = _props$TransitionComp === void 0 ? Transition$1 : _props$TransitionComp,
|
|
22787
22808
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
22788
22809
|
var nodeRef = React__namespace.useRef(null);
|
|
22789
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
22810
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
22790
22811
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
22791
22812
|
return function (maybeIsAppearing) {
|
|
22792
22813
|
if (callback) {
|
|
@@ -26267,9 +26288,7 @@
|
|
|
26267
26288
|
activatedRef.current = false;
|
|
26268
26289
|
};
|
|
26269
26290
|
}, []);
|
|
26270
|
-
var handleRef = useForkRef(
|
|
26271
|
-
// @ts-expect-error TODO upstream fix
|
|
26272
|
-
children.ref, nodeRef);
|
|
26291
|
+
var handleRef = useForkRef(getReactElementRef(children), nodeRef);
|
|
26273
26292
|
|
|
26274
26293
|
// The handler doesn't take event.defaultPrevented into account:
|
|
26275
26294
|
//
|
|
@@ -26924,8 +26943,7 @@
|
|
|
26924
26943
|
// It waits for the active element to move into the component to activate.
|
|
26925
26944
|
var activated = React__namespace.useRef(false);
|
|
26926
26945
|
var rootRef = React__namespace.useRef(null);
|
|
26927
|
-
|
|
26928
|
-
var handleRef = useForkRef(children.ref, rootRef);
|
|
26946
|
+
var handleRef = useForkRef(getReactElementRef(children), rootRef);
|
|
26929
26947
|
var lastKeydown = React__namespace.useRef(null);
|
|
26930
26948
|
React__namespace.useEffect(function () {
|
|
26931
26949
|
// We might render an empty child.
|
|
@@ -28789,7 +28807,7 @@
|
|
|
28789
28807
|
TransitionComponent = _props$TransitionComp === void 0 ? Transition$1 : _props$TransitionComp,
|
|
28790
28808
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "container", "direction", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
28791
28809
|
var childrenRef = React__namespace.useRef(null);
|
|
28792
|
-
var handleRef = useForkRef(_children
|
|
28810
|
+
var handleRef = useForkRef(getReactElementRef(_children), childrenRef, ref);
|
|
28793
28811
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
28794
28812
|
return function (isAppearing) {
|
|
28795
28813
|
if (callback) {
|
|
@@ -31608,7 +31626,7 @@
|
|
|
31608
31626
|
var autoTimeout = React__namespace.useRef();
|
|
31609
31627
|
var theme = useTheme();
|
|
31610
31628
|
var nodeRef = React__namespace.useRef(null);
|
|
31611
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
31629
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
31612
31630
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
31613
31631
|
return function (maybeIsAppearing) {
|
|
31614
31632
|
if (callback) {
|
|
@@ -40292,7 +40310,7 @@
|
|
|
40292
40310
|
ownerState: ownerState
|
|
40293
40311
|
})
|
|
40294
40312
|
}[variant];
|
|
40295
|
-
var inputComponentRef = useForkRef(ref, InputComponent
|
|
40313
|
+
var inputComponentRef = useForkRef(ref, getReactElementRef(InputComponent));
|
|
40296
40314
|
return /*#__PURE__*/jsxRuntime_1(React__namespace.Fragment, {
|
|
40297
40315
|
children: /*#__PURE__*/React__namespace.cloneElement(InputComponent, _extends({
|
|
40298
40316
|
// Most of the logic is implemented in `SelectInput`.
|
|
@@ -40846,7 +40864,7 @@
|
|
|
40846
40864
|
shiftStep = _parameters$shiftStep === void 0 ? 10 : _parameters$shiftStep,
|
|
40847
40865
|
tabIndex = parameters.tabIndex,
|
|
40848
40866
|
valueProp = parameters.value;
|
|
40849
|
-
var touchId = React__namespace.useRef();
|
|
40867
|
+
var touchId = React__namespace.useRef(undefined);
|
|
40850
40868
|
// We can't use the :active browser pseudo-classes.
|
|
40851
40869
|
// - The active state isn't triggered when clicking on the rail.
|
|
40852
40870
|
// - The active state isn't transferred when inversing a range slider.
|
|
@@ -40906,7 +40924,7 @@
|
|
|
40906
40924
|
var _React$useState4 = React__namespace.useState(-1),
|
|
40907
40925
|
focusedThumbIndex = _React$useState4[0],
|
|
40908
40926
|
setFocusedThumbIndex = _React$useState4[1];
|
|
40909
|
-
var sliderRef = React__namespace.useRef();
|
|
40927
|
+
var sliderRef = React__namespace.useRef(null);
|
|
40910
40928
|
var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
|
40911
40929
|
var handleRef = useForkRef(ref, handleFocusRef);
|
|
40912
40930
|
var createHandleHiddenInputFocus = function createHandleHiddenInputFocus(otherHandlers) {
|
|
@@ -41025,7 +41043,7 @@
|
|
|
41025
41043
|
changeValue(event, event.target.valueAsNumber);
|
|
41026
41044
|
};
|
|
41027
41045
|
};
|
|
41028
|
-
var previousIndex = React__namespace.useRef();
|
|
41046
|
+
var previousIndex = React__namespace.useRef(undefined);
|
|
41029
41047
|
var axis = orientation;
|
|
41030
41048
|
if (isRtl && orientation === 'horizontal') {
|
|
41031
41049
|
axis += '-reverse';
|
|
@@ -43038,7 +43056,7 @@
|
|
|
43038
43056
|
TransitionComponent = _props$TransitionComp === void 0 ? Transition$1 : _props$TransitionComp,
|
|
43039
43057
|
other = _objectWithoutProperties(props, ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
|
43040
43058
|
var nodeRef = React__namespace.useRef(null);
|
|
43041
|
-
var handleRef = useForkRef(nodeRef, _children
|
|
43059
|
+
var handleRef = useForkRef(nodeRef, getReactElementRef(_children), ref);
|
|
43042
43060
|
var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
|
43043
43061
|
return function (maybeIsAppearing) {
|
|
43044
43062
|
if (callback) {
|
|
@@ -44086,7 +44104,7 @@
|
|
|
44086
44104
|
document.removeEventListener('keydown', handleKeyDown);
|
|
44087
44105
|
};
|
|
44088
44106
|
}, [handleClose, open]);
|
|
44089
|
-
var handleRef = useForkRef(children
|
|
44107
|
+
var handleRef = useForkRef(getReactElementRef(children), focusVisibleRef, setChildNode, ref);
|
|
44090
44108
|
|
|
44091
44109
|
// There is no point in displaying an empty tooltip.
|
|
44092
44110
|
// So we exclude all falsy values, except 0, which is valid.
|
|
@@ -48842,9 +48860,10 @@
|
|
|
48842
48860
|
onChange(scrollbarHeight.current);
|
|
48843
48861
|
}, [onChange]);
|
|
48844
48862
|
return /*#__PURE__*/jsxRuntime_1("div", _extends({
|
|
48845
|
-
style: styles
|
|
48863
|
+
style: styles
|
|
48864
|
+
}, other, {
|
|
48846
48865
|
ref: nodeRef
|
|
48847
|
-
}
|
|
48866
|
+
}));
|
|
48848
48867
|
}
|
|
48849
48868
|
ScrollbarSize.propTypes = {
|
|
48850
48869
|
onChange: PropTypes.func.isRequired
|