@mui/material 5.13.4 → 5.13.6
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/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +58 -58
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/TouchRipple.js +4 -2
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +129 -4
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +42 -42
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +24 -24
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +38 -38
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.js +8 -0
- package/NativeSelect/nativeSelectClasses.d.ts +34 -34
- package/OutlinedInput/outlinedInputClasses.d.ts +38 -38
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/Popover.d.ts +13 -2
- package/Popover/Popover.js +3 -2
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +65 -65
- package/README.md +2 -3
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +32 -32
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Stack/stackClasses.d.ts +6 -6
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/SvgIcon.js +8 -4
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +6 -1
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/ButtonBase/TouchRipple.js +4 -2
- package/legacy/Modal/Modal.js +8 -0
- package/legacy/Popover/Popover.js +3 -2
- package/legacy/SvgIcon/SvgIcon.js +8 -4
- package/legacy/Tooltip/Tooltip.js +5 -2
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +80 -80
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/ButtonBase/TouchRipple.js +4 -2
- package/modern/Modal/Modal.js +8 -0
- package/modern/Popover/Popover.js +3 -2
- package/modern/SvgIcon/SvgIcon.js +8 -4
- package/modern/Tooltip/Tooltip.js +6 -1
- package/modern/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/ButtonBase/TouchRipple.js +4 -2
- package/node/Modal/Modal.js +8 -0
- package/node/Popover/Popover.js +3 -2
- package/node/SvgIcon/SvgIcon.js +8 -4
- package/node/Tooltip/Tooltip.js +6 -1
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/styles/CssVarsProvider.d.ts +20 -20
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/experimental_extendTheme.d.ts +1 -0
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/styles/identifier.d.ts +2 -2
- package/styles/shouldSkipGeneratingVar.d.ts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +109 -69
- package/umd/material-ui.production.min.js +4 -4
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -149,14 +149,16 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
149
149
|
const ignoringMouseDown = React.useRef(false);
|
|
150
150
|
// We use a timer in order to only show the ripples for touch "click" like events.
|
|
151
151
|
// We don't want to display the ripple for touch scroll events.
|
|
152
|
-
const startTimer = React.useRef(
|
|
152
|
+
const startTimer = React.useRef(0);
|
|
153
153
|
|
|
154
154
|
// This is the hook called once the previous timeout is ready.
|
|
155
155
|
const startTimerCommit = React.useRef(null);
|
|
156
156
|
const container = React.useRef(null);
|
|
157
157
|
React.useEffect(() => {
|
|
158
158
|
return () => {
|
|
159
|
-
|
|
159
|
+
if (startTimer.current) {
|
|
160
|
+
clearTimeout(startTimer.current);
|
|
161
|
+
}
|
|
160
162
|
};
|
|
161
163
|
}, []);
|
|
162
164
|
const startCommit = React.useCallback(params => {
|
package/modern/Modal/Modal.js
CHANGED
|
@@ -280,6 +280,14 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
|
|
|
280
280
|
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
|
281
281
|
*/
|
|
282
282
|
onClose: PropTypes.func,
|
|
283
|
+
/**
|
|
284
|
+
* A function called when a transition enters.
|
|
285
|
+
*/
|
|
286
|
+
onTransitionEnter: PropTypes.func,
|
|
287
|
+
/**
|
|
288
|
+
* A function called when a transition has exited.
|
|
289
|
+
*/
|
|
290
|
+
onTransitionExited: PropTypes.func,
|
|
283
291
|
/**
|
|
284
292
|
* If `true`, the component is shown.
|
|
285
293
|
*/
|
|
@@ -351,7 +351,8 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
351
351
|
*/
|
|
352
352
|
action: refType,
|
|
353
353
|
/**
|
|
354
|
-
* An HTML element,
|
|
354
|
+
* An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),
|
|
355
|
+
* or a function that returns either.
|
|
355
356
|
* It's used to set the position of the popover.
|
|
356
357
|
*/
|
|
357
358
|
anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {
|
|
@@ -363,7 +364,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
363
364
|
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
364
365
|
}
|
|
365
366
|
} else {
|
|
366
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element instance but it's \`${resolvedAnchorEl}\` instead.`].join('\n'));
|
|
367
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \`${resolvedAnchorEl}\` instead.`].join('\n'));
|
|
367
368
|
}
|
|
368
369
|
}
|
|
369
370
|
return null;
|
|
@@ -39,7 +39,9 @@ const SvgIconRoot = styled('svg', {
|
|
|
39
39
|
width: '1em',
|
|
40
40
|
height: '1em',
|
|
41
41
|
display: 'inline-block',
|
|
42
|
-
|
|
42
|
+
// the <svg> will define the property that has `currentColor`
|
|
43
|
+
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
44
|
+
fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
|
|
43
45
|
flexShrink: 0,
|
|
44
46
|
transition: theme.transitions?.create?.('fill', {
|
|
45
47
|
duration: theme.transitions?.duration?.shorter
|
|
@@ -74,13 +76,15 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
74
76
|
viewBox = '0 0 24 24'
|
|
75
77
|
} = props,
|
|
76
78
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
79
|
+
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
|
77
80
|
const ownerState = _extends({}, props, {
|
|
78
81
|
color,
|
|
79
82
|
component,
|
|
80
83
|
fontSize,
|
|
81
84
|
instanceFontSize: inProps.fontSize,
|
|
82
85
|
inheritViewBox,
|
|
83
|
-
viewBox
|
|
86
|
+
viewBox,
|
|
87
|
+
hasSvgAsChild
|
|
84
88
|
});
|
|
85
89
|
const more = {};
|
|
86
90
|
if (!inheritViewBox) {
|
|
@@ -95,9 +99,9 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
95
99
|
"aria-hidden": titleAccess ? undefined : true,
|
|
96
100
|
role: titleAccess ? 'img' : undefined,
|
|
97
101
|
ref: ref
|
|
98
|
-
}, more, other, {
|
|
102
|
+
}, more, other, hasSvgAsChild && children.props, {
|
|
99
103
|
ownerState: ownerState,
|
|
100
|
-
children: [children, titleAccess ? /*#__PURE__*/_jsx("title", {
|
|
104
|
+
children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx("title", {
|
|
101
105
|
children: titleAccess
|
|
102
106
|
}) : null]
|
|
103
107
|
}));
|
|
@@ -218,7 +218,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
218
218
|
});
|
|
219
219
|
const {
|
|
220
220
|
arrow = false,
|
|
221
|
-
children,
|
|
221
|
+
children: childrenProp,
|
|
222
222
|
components = {},
|
|
223
223
|
componentsProps = {},
|
|
224
224
|
describeChild = false,
|
|
@@ -246,6 +246,11 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
246
246
|
TransitionProps
|
|
247
247
|
} = props,
|
|
248
248
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
249
|
+
|
|
250
|
+
// to prevent runtime errors, developers will need to provide a child as a React element anyway.
|
|
251
|
+
const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx("span", {
|
|
252
|
+
children: childrenProp
|
|
253
|
+
});
|
|
249
254
|
const theme = useTheme();
|
|
250
255
|
const isRtl = theme.direction === 'rtl';
|
|
251
256
|
const [childNode, setChildNode] = React.useState();
|
package/modern/index.js
CHANGED
|
File without changes
|
|
@@ -161,14 +161,16 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
161
161
|
const ignoringMouseDown = React.useRef(false);
|
|
162
162
|
// We use a timer in order to only show the ripples for touch "click" like events.
|
|
163
163
|
// We don't want to display the ripple for touch scroll events.
|
|
164
|
-
const startTimer = React.useRef(
|
|
164
|
+
const startTimer = React.useRef(0);
|
|
165
165
|
|
|
166
166
|
// This is the hook called once the previous timeout is ready.
|
|
167
167
|
const startTimerCommit = React.useRef(null);
|
|
168
168
|
const container = React.useRef(null);
|
|
169
169
|
React.useEffect(() => {
|
|
170
170
|
return () => {
|
|
171
|
-
|
|
171
|
+
if (startTimer.current) {
|
|
172
|
+
clearTimeout(startTimer.current);
|
|
173
|
+
}
|
|
172
174
|
};
|
|
173
175
|
}, []);
|
|
174
176
|
const startCommit = React.useCallback(params => {
|
package/node/Modal/Modal.js
CHANGED
|
@@ -291,6 +291,14 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
|
|
|
291
291
|
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
|
292
292
|
*/
|
|
293
293
|
onClose: _propTypes.default.func,
|
|
294
|
+
/**
|
|
295
|
+
* A function called when a transition enters.
|
|
296
|
+
*/
|
|
297
|
+
onTransitionEnter: _propTypes.default.func,
|
|
298
|
+
/**
|
|
299
|
+
* A function called when a transition has exited.
|
|
300
|
+
*/
|
|
301
|
+
onTransitionExited: _propTypes.default.func,
|
|
294
302
|
/**
|
|
295
303
|
* If `true`, the component is shown.
|
|
296
304
|
*/
|
package/node/Popover/Popover.js
CHANGED
|
@@ -365,7 +365,8 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
365
365
|
*/
|
|
366
366
|
action: _utils.refType,
|
|
367
367
|
/**
|
|
368
|
-
* An HTML element,
|
|
368
|
+
* An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),
|
|
369
|
+
* or a function that returns either.
|
|
369
370
|
* It's used to set the position of the popover.
|
|
370
371
|
*/
|
|
371
372
|
anchorEl: (0, _utils.chainPropTypes)(_propTypes.default.oneOfType([_utils.HTMLElementType, _propTypes.default.func]), props => {
|
|
@@ -377,7 +378,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
377
378
|
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', "Make sure the element is present in the document or that it's not display none."].join('\n'));
|
|
378
379
|
}
|
|
379
380
|
} else {
|
|
380
|
-
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element instance but it's \`${resolvedAnchorEl}\` instead.`].join('\n'));
|
|
381
|
+
return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \`${resolvedAnchorEl}\` instead.`].join('\n'));
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
384
|
return null;
|
package/node/SvgIcon/SvgIcon.js
CHANGED
|
@@ -49,7 +49,9 @@ const SvgIconRoot = (0, _styled.default)('svg', {
|
|
|
49
49
|
width: '1em',
|
|
50
50
|
height: '1em',
|
|
51
51
|
display: 'inline-block',
|
|
52
|
-
|
|
52
|
+
// the <svg> will define the property that has `currentColor`
|
|
53
|
+
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
54
|
+
fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
|
|
53
55
|
flexShrink: 0,
|
|
54
56
|
transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
55
57
|
duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
|
|
@@ -85,13 +87,15 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
85
87
|
viewBox = '0 0 24 24'
|
|
86
88
|
} = props,
|
|
87
89
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
90
|
+
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
|
88
91
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
89
92
|
color,
|
|
90
93
|
component,
|
|
91
94
|
fontSize,
|
|
92
95
|
instanceFontSize: inProps.fontSize,
|
|
93
96
|
inheritViewBox,
|
|
94
|
-
viewBox
|
|
97
|
+
viewBox,
|
|
98
|
+
hasSvgAsChild
|
|
95
99
|
});
|
|
96
100
|
const more = {};
|
|
97
101
|
if (!inheritViewBox) {
|
|
@@ -106,9 +110,9 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
106
110
|
"aria-hidden": titleAccess ? undefined : true,
|
|
107
111
|
role: titleAccess ? 'img' : undefined,
|
|
108
112
|
ref: ref
|
|
109
|
-
}, more, other, {
|
|
113
|
+
}, more, other, hasSvgAsChild && children.props, {
|
|
110
114
|
ownerState: ownerState,
|
|
111
|
-
children: [children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
115
|
+
children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
112
116
|
children: titleAccess
|
|
113
117
|
}) : null]
|
|
114
118
|
}));
|
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -228,7 +228,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
228
228
|
});
|
|
229
229
|
const {
|
|
230
230
|
arrow = false,
|
|
231
|
-
children,
|
|
231
|
+
children: childrenProp,
|
|
232
232
|
components = {},
|
|
233
233
|
componentsProps = {},
|
|
234
234
|
describeChild = false,
|
|
@@ -256,6 +256,11 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
256
256
|
TransitionProps
|
|
257
257
|
} = props,
|
|
258
258
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
259
|
+
|
|
260
|
+
// to prevent runtime errors, developers will need to provide a child as a React element anyway.
|
|
261
|
+
const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
262
|
+
children: childrenProp
|
|
263
|
+
});
|
|
259
264
|
const theme = (0, _useTheme.default)();
|
|
260
265
|
const isRtl = theme.direction === 'rtl';
|
|
261
266
|
const [childNode, setChildNode] = React.useState();
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@babel/runtime": "^7.
|
|
49
|
-
"@mui/base": "5.0.0-beta.
|
|
48
|
+
"@babel/runtime": "^7.22.5",
|
|
49
|
+
"@mui/base": "5.0.0-beta.5",
|
|
50
50
|
"@mui/core-downloads-tracker": "^5.13.4",
|
|
51
|
-
"@mui/system": "^5.13.
|
|
51
|
+
"@mui/system": "^5.13.6",
|
|
52
52
|
"@mui/types": "^7.2.4",
|
|
53
|
-
"@mui/utils": "^5.13.
|
|
53
|
+
"@mui/utils": "^5.13.6",
|
|
54
54
|
"@types/react-transition-group": "^4.4.6",
|
|
55
55
|
"clsx": "^1.2.1",
|
|
56
56
|
"csstype": "^3.1.2",
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
-
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
4
|
-
theme?: {
|
|
5
|
-
cssVarPrefix?: string | undefined;
|
|
6
|
-
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
7
|
-
} | {
|
|
8
|
-
$$material: {
|
|
9
|
-
cssVarPrefix?: string | undefined;
|
|
10
|
-
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
11
|
-
};
|
|
12
|
-
} | undefined;
|
|
13
|
-
documentNode?: Document | null | undefined;
|
|
14
|
-
colorSchemeNode?: Element | null | undefined;
|
|
15
|
-
colorSchemeSelector?: string | undefined;
|
|
16
|
-
storageWindow?: Window | null | undefined;
|
|
17
|
-
disableNestedContext?: boolean | undefined;
|
|
18
|
-
disableStyleSheetGeneration?: boolean | undefined;
|
|
19
|
-
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
20
|
-
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
+
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
4
|
+
theme?: {
|
|
5
|
+
cssVarPrefix?: string | undefined;
|
|
6
|
+
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
7
|
+
} | {
|
|
8
|
+
$$material: {
|
|
9
|
+
cssVarPrefix?: string | undefined;
|
|
10
|
+
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
11
|
+
};
|
|
12
|
+
} | undefined;
|
|
13
|
+
documentNode?: Document | null | undefined;
|
|
14
|
+
colorSchemeNode?: Element | null | undefined;
|
|
15
|
+
colorSchemeSelector?: string | undefined;
|
|
16
|
+
storageWindow?: Window | null | undefined;
|
|
17
|
+
disableNestedContext?: boolean | undefined;
|
|
18
|
+
disableStyleSheetGeneration?: boolean | undefined;
|
|
19
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
20
|
+
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
-
*/
|
|
4
|
-
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
-
export default excludeVariablesFromRoot;
|
|
1
|
+
/**
|
|
2
|
+
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
+
*/
|
|
4
|
+
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
+
export default excludeVariablesFromRoot;
|
|
@@ -421,6 +421,7 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
421
421
|
shadows: Theme['shadows'];
|
|
422
422
|
mixins: Theme['mixins'];
|
|
423
423
|
zIndex: Theme['zIndex'];
|
|
424
|
+
direction: Theme['direction'];
|
|
424
425
|
/**
|
|
425
426
|
* A function to determine if the key, value should be attached as CSS Variable
|
|
426
427
|
* `keys` is an array that represents the object path keys.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
-
export default getOverlayAlpha;
|
|
1
|
+
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
+
export default getOverlayAlpha;
|
package/styles/identifier.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "$$material";
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: "$$material";
|
|
2
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function shouldSkipGeneratingVar(keys: string[]): boolean;
|
|
1
|
+
export default function shouldSkipGeneratingVar(keys: string[]): boolean;
|
package/transitions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './transition';
|
|
1
|
+
export * from './transition';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
-
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
-
export interface EasingProps {
|
|
6
|
-
easing: string | {
|
|
7
|
-
enter?: string;
|
|
8
|
-
exit?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
-
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
-
}
|
|
1
|
+
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
+
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
+
export interface EasingProps {
|
|
6
|
+
easing: string | {
|
|
7
|
+
enter?: string;
|
|
8
|
+
exit?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
+
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
}
|
package/transitions/utils.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const reflow: (node: Element) => number;
|
|
3
|
-
interface ComponentProps {
|
|
4
|
-
easing: string | {
|
|
5
|
-
enter?: string;
|
|
6
|
-
exit?: string;
|
|
7
|
-
} | undefined;
|
|
8
|
-
style: React.CSSProperties | undefined;
|
|
9
|
-
timeout: number | {
|
|
10
|
-
enter?: number;
|
|
11
|
-
exit?: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface Options {
|
|
15
|
-
mode: 'enter' | 'exit';
|
|
16
|
-
}
|
|
17
|
-
interface TransitionProps {
|
|
18
|
-
duration: string | number;
|
|
19
|
-
easing: string | undefined;
|
|
20
|
-
delay: string | undefined;
|
|
21
|
-
}
|
|
22
|
-
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const reflow: (node: Element) => number;
|
|
3
|
+
interface ComponentProps {
|
|
4
|
+
easing: string | {
|
|
5
|
+
enter?: string;
|
|
6
|
+
exit?: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
style: React.CSSProperties | undefined;
|
|
9
|
+
timeout: number | {
|
|
10
|
+
enter?: number;
|
|
11
|
+
exit?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface Options {
|
|
15
|
+
mode: 'enter' | 'exit';
|
|
16
|
+
}
|
|
17
|
+
interface TransitionProps {
|
|
18
|
+
duration: string | number;
|
|
19
|
+
easing: string | undefined;
|
|
20
|
+
delay: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
+
export {};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DistributiveOmit } from '@mui/types';
|
|
3
|
-
declare module '@mui/material/OverridableComponent' {
|
|
4
|
-
/**
|
|
5
|
-
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
-
*
|
|
7
|
-
* Adjusts valid props based on the type of `component`.
|
|
8
|
-
*/
|
|
9
|
-
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
-
<C extends React.ElementType>(props: {
|
|
11
|
-
/**
|
|
12
|
-
* The component used for the root node.
|
|
13
|
-
* Either a string to use a HTML element or a component.
|
|
14
|
-
*/
|
|
15
|
-
component: C;
|
|
16
|
-
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
-
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Props of the component if `component={Component}` is used.
|
|
21
|
-
*/
|
|
22
|
-
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
-
ref?: React.Ref<Element>;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Props if `component={Component}` is NOT used.
|
|
27
|
-
*/
|
|
28
|
-
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
-
ref?: React.Ref<Element>;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DistributiveOmit } from '@mui/types';
|
|
3
|
+
declare module '@mui/material/OverridableComponent' {
|
|
4
|
+
/**
|
|
5
|
+
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
+
*
|
|
7
|
+
* Adjusts valid props based on the type of `component`.
|
|
8
|
+
*/
|
|
9
|
+
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
+
<C extends React.ElementType>(props: {
|
|
11
|
+
/**
|
|
12
|
+
* The component used for the root node.
|
|
13
|
+
* Either a string to use a HTML element or a component.
|
|
14
|
+
*/
|
|
15
|
+
component: C;
|
|
16
|
+
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
+
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props of the component if `component={Component}` is used.
|
|
21
|
+
*/
|
|
22
|
+
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
+
ref?: React.Ref<Element>;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Props if `component={Component}` is NOT used.
|
|
27
|
+
*/
|
|
28
|
+
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
+
ref?: React.Ref<Element>;
|
|
30
|
+
};
|
|
31
|
+
}
|