@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.
Files changed (187) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/autocompleteClasses.d.ts +58 -58
  9. package/Avatar/avatarClasses.d.ts +20 -20
  10. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  11. package/Backdrop/backdropClasses.d.ts +10 -10
  12. package/Badge/badgeClasses.d.ts +56 -56
  13. package/BottomNavigation/BottomNavigation.js +0 -0
  14. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  15. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  16. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  17. package/Button/buttonClasses.d.ts +100 -100
  18. package/ButtonBase/TouchRipple.js +4 -2
  19. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  20. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  21. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  22. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  23. package/CHANGELOG.md +129 -4
  24. package/Card/cardClasses.d.ts +8 -8
  25. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  26. package/CardActions/cardActionsClasses.d.ts +10 -10
  27. package/CardContent/cardContentClasses.d.ts +8 -8
  28. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  29. package/CardMedia/cardMediaClasses.d.ts +12 -12
  30. package/Checkbox/checkboxClasses.d.ts +18 -18
  31. package/Chip/chipClasses.d.ts +96 -96
  32. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  33. package/ClickAwayListener/index.d.ts +2 -2
  34. package/Collapse/collapseClasses.d.ts +18 -18
  35. package/Container/containerClasses.d.ts +6 -6
  36. package/Dialog/DialogContext.d.ts +6 -6
  37. package/Dialog/dialogClasses.d.ts +36 -36
  38. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  39. package/DialogContent/dialogContentClasses.d.ts +10 -10
  40. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  41. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  42. package/Divider/dividerClasses.d.ts +34 -34
  43. package/Drawer/drawerClasses.d.ts +30 -30
  44. package/Fab/fabClasses.d.ts +26 -26
  45. package/FilledInput/filledInputClasses.d.ts +42 -42
  46. package/FormControl/FormControlContext.d.ts +17 -17
  47. package/FormControl/formControlClasses.d.ts +14 -14
  48. package/FormControl/useFormControl.d.ts +2 -2
  49. package/FormControlLabel/formControlLabelClasses.d.ts +24 -24
  50. package/FormGroup/formGroupClasses.d.ts +12 -12
  51. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  52. package/FormLabel/formLabelClasses.d.ts +22 -22
  53. package/Grid/gridClasses.d.ts +48 -48
  54. package/Icon/iconClasses.d.ts +24 -24
  55. package/IconButton/iconButtonClasses.d.ts +34 -34
  56. package/ImageList/imageListClasses.d.ts +16 -16
  57. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  58. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  59. package/Input/inputClasses.d.ts +38 -38
  60. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  61. package/InputBase/inputBaseClasses.d.ts +46 -46
  62. package/InputLabel/inputLabelClasses.d.ts +32 -32
  63. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  64. package/Link/getTextDecoration.d.ts +15 -15
  65. package/Link/linkClasses.d.ts +18 -18
  66. package/List/listClasses.d.ts +14 -14
  67. package/ListItem/listItemClasses.d.ts +30 -30
  68. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  69. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  70. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  71. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  72. package/ListItemText/listItemTextClasses.d.ts +18 -18
  73. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  74. package/Menu/menuClasses.d.ts +12 -12
  75. package/MenuItem/menuItemClasses.d.ts +20 -20
  76. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  77. package/Modal/Modal.js +8 -0
  78. package/NativeSelect/nativeSelectClasses.d.ts +34 -34
  79. package/OutlinedInput/outlinedInputClasses.d.ts +38 -38
  80. package/Pagination/paginationClasses.d.ts +14 -14
  81. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  82. package/Paper/paperClasses.d.ts +39 -39
  83. package/Popover/Popover.d.ts +13 -2
  84. package/Popover/Popover.js +3 -2
  85. package/Popover/popoverClasses.d.ts +10 -10
  86. package/Popper/Popper.d.ts +65 -65
  87. package/README.md +2 -3
  88. package/Radio/radioClasses.d.ts +16 -16
  89. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  90. package/RadioGroup/useRadioGroup.d.ts +4 -4
  91. package/Rating/ratingClasses.d.ts +40 -40
  92. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  93. package/Select/selectClasses.d.ts +32 -32
  94. package/Skeleton/skeletonClasses.d.ts +26 -26
  95. package/Slider/SliderValueLabel.d.ts +15 -15
  96. package/Slider/SliderValueLabel.types.d.ts +24 -24
  97. package/Slider/sliderClasses.d.ts +58 -58
  98. package/Snackbar/snackbarClasses.d.ts +20 -20
  99. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  100. package/SpeedDial/speedDialClasses.d.ts +22 -22
  101. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  102. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  103. package/Stack/stackClasses.d.ts +6 -6
  104. package/Step/StepContext.d.ts +20 -20
  105. package/Step/stepClasses.d.ts +16 -16
  106. package/StepButton/stepButtonClasses.d.ts +14 -14
  107. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  108. package/StepContent/stepContentClasses.d.ts +12 -12
  109. package/StepIcon/stepIconClasses.d.ts +16 -16
  110. package/StepLabel/stepLabelClasses.d.ts +28 -28
  111. package/Stepper/StepperContext.d.ts +18 -18
  112. package/Stepper/stepperClasses.d.ts +14 -14
  113. package/SvgIcon/SvgIcon.js +8 -4
  114. package/SvgIcon/svgIconClasses.d.ts +26 -26
  115. package/Switch/switchClasses.d.ts +32 -32
  116. package/Tab/tabClasses.d.ts +26 -26
  117. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  118. package/Table/tableClasses.d.ts +10 -10
  119. package/TableBody/tableBodyClasses.d.ts +8 -8
  120. package/TableCell/tableCellClasses.d.ts +32 -32
  121. package/TableContainer/tableContainerClasses.d.ts +8 -8
  122. package/TableFooter/tableFooterClasses.d.ts +8 -8
  123. package/TableHead/tableHeadClasses.d.ts +8 -8
  124. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  125. package/TableRow/tableRowClasses.d.ts +16 -16
  126. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  127. package/Tabs/tabsClasses.d.ts +32 -32
  128. package/TextField/textFieldClasses.d.ts +8 -8
  129. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  130. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  131. package/Toolbar/toolbarClasses.d.ts +14 -14
  132. package/Tooltip/Tooltip.d.ts +2 -2
  133. package/Tooltip/Tooltip.js +6 -1
  134. package/Tooltip/tooltipClasses.d.ts +30 -30
  135. package/Typography/typographyClasses.d.ts +50 -50
  136. package/Unstable_Grid2/Grid2.d.ts +4 -4
  137. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  138. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  139. package/Unstable_Grid2/index.d.ts +4 -4
  140. package/className/index.d.ts +1 -1
  141. package/darkScrollbar/index.d.ts +28 -28
  142. package/generateUtilityClass/index.d.ts +2 -2
  143. package/generateUtilityClasses/index.d.ts +1 -1
  144. package/index.js +1 -1
  145. package/internal/switchBaseClasses.d.ts +12 -12
  146. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  147. package/legacy/ButtonBase/TouchRipple.js +4 -2
  148. package/legacy/Modal/Modal.js +8 -0
  149. package/legacy/Popover/Popover.js +3 -2
  150. package/legacy/SvgIcon/SvgIcon.js +8 -4
  151. package/legacy/Tooltip/Tooltip.js +5 -2
  152. package/legacy/index.js +1 -1
  153. package/locale/index.d.ts +80 -80
  154. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  155. package/modern/ButtonBase/TouchRipple.js +4 -2
  156. package/modern/Modal/Modal.js +8 -0
  157. package/modern/Popover/Popover.js +3 -2
  158. package/modern/SvgIcon/SvgIcon.js +8 -4
  159. package/modern/Tooltip/Tooltip.js +6 -1
  160. package/modern/index.js +1 -1
  161. package/node/BottomNavigation/BottomNavigation.js +0 -0
  162. package/node/ButtonBase/TouchRipple.js +4 -2
  163. package/node/Modal/Modal.js +8 -0
  164. package/node/Popover/Popover.js +3 -2
  165. package/node/SvgIcon/SvgIcon.js +8 -4
  166. package/node/Tooltip/Tooltip.js +6 -1
  167. package/node/index.js +1 -1
  168. package/package.json +5 -5
  169. package/styles/CssVarsProvider.d.ts +20 -20
  170. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  171. package/styles/experimental_extendTheme.d.ts +1 -0
  172. package/styles/getOverlayAlpha.d.ts +2 -2
  173. package/styles/identifier.d.ts +2 -2
  174. package/styles/shouldSkipGeneratingVar.d.ts +1 -1
  175. package/transitions/index.d.ts +1 -1
  176. package/transitions/transition.d.ts +13 -13
  177. package/transitions/utils.d.ts +23 -23
  178. package/types/OverridableComponentAugmentation.d.ts +31 -31
  179. package/umd/material-ui.development.js +109 -69
  180. package/umd/material-ui.production.min.js +4 -4
  181. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  182. package/useTouchRipple/index.d.ts +1 -1
  183. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  184. package/utils/getScrollbarSize.d.ts +2 -2
  185. package/utils/ownerDocument.d.ts +2 -2
  186. package/utils/ownerWindow.d.ts +2 -2
  187. 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(null);
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
- clearTimeout(startTimer.current);
159
+ if (startTimer.current) {
160
+ clearTimeout(startTimer.current);
161
+ }
160
162
  };
161
163
  }, []);
162
164
  const startCommit = React.useCallback(params => {
@@ -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, or a function that returns one.
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
- fill: 'currentColor',
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.4
2
+ * @mui/material v5.13.6
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
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(null);
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
- clearTimeout(startTimer.current);
171
+ if (startTimer.current) {
172
+ clearTimeout(startTimer.current);
173
+ }
172
174
  };
173
175
  }, []);
174
176
  const startCommit = React.useCallback(params => {
@@ -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
  */
@@ -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, or a function that returns one.
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;
@@ -49,7 +49,9 @@ const SvgIconRoot = (0, _styled.default)('svg', {
49
49
  width: '1em',
50
50
  height: '1em',
51
51
  display: 'inline-block',
52
- fill: 'currentColor',
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
  }));
@@ -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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.4
2
+ * @mui/material v5.13.6
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.13.4",
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.21.0",
49
- "@mui/base": "5.0.0-beta.4",
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.2",
51
+ "@mui/system": "^5.13.6",
52
52
  "@mui/types": "^7.2.4",
53
- "@mui/utils": "^5.13.1",
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;
@@ -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;
@@ -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
+ }
@@ -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
+ }