@mui/material 5.13.5 → 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 (181) 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 +83 -0
  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/popoverClasses.d.ts +10 -10
  84. package/Popper/Popper.d.ts +65 -65
  85. package/Radio/radioClasses.d.ts +16 -16
  86. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  87. package/RadioGroup/useRadioGroup.d.ts +4 -4
  88. package/Rating/ratingClasses.d.ts +40 -40
  89. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  90. package/Select/selectClasses.d.ts +32 -32
  91. package/Skeleton/skeletonClasses.d.ts +26 -26
  92. package/Slider/SliderValueLabel.d.ts +15 -15
  93. package/Slider/SliderValueLabel.types.d.ts +24 -24
  94. package/Slider/sliderClasses.d.ts +58 -58
  95. package/Snackbar/snackbarClasses.d.ts +20 -20
  96. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  97. package/SpeedDial/speedDialClasses.d.ts +22 -22
  98. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  99. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  100. package/Stack/stackClasses.d.ts +6 -6
  101. package/Step/StepContext.d.ts +20 -20
  102. package/Step/stepClasses.d.ts +16 -16
  103. package/StepButton/stepButtonClasses.d.ts +14 -14
  104. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  105. package/StepContent/stepContentClasses.d.ts +12 -12
  106. package/StepIcon/stepIconClasses.d.ts +16 -16
  107. package/StepLabel/stepLabelClasses.d.ts +28 -28
  108. package/Stepper/StepperContext.d.ts +18 -18
  109. package/Stepper/stepperClasses.d.ts +14 -14
  110. package/SvgIcon/SvgIcon.js +8 -4
  111. package/SvgIcon/svgIconClasses.d.ts +26 -26
  112. package/Switch/switchClasses.d.ts +32 -32
  113. package/Tab/tabClasses.d.ts +26 -26
  114. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  115. package/Table/tableClasses.d.ts +10 -10
  116. package/TableBody/tableBodyClasses.d.ts +8 -8
  117. package/TableCell/tableCellClasses.d.ts +32 -32
  118. package/TableContainer/tableContainerClasses.d.ts +8 -8
  119. package/TableFooter/tableFooterClasses.d.ts +8 -8
  120. package/TableHead/tableHeadClasses.d.ts +8 -8
  121. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  122. package/TableRow/tableRowClasses.d.ts +16 -16
  123. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  124. package/Tabs/tabsClasses.d.ts +32 -32
  125. package/TextField/textFieldClasses.d.ts +8 -8
  126. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  127. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  128. package/Toolbar/toolbarClasses.d.ts +14 -14
  129. package/Tooltip/Tooltip.d.ts +2 -2
  130. package/Tooltip/Tooltip.js +6 -1
  131. package/Tooltip/tooltipClasses.d.ts +30 -30
  132. package/Typography/typographyClasses.d.ts +50 -50
  133. package/Unstable_Grid2/Grid2.d.ts +4 -4
  134. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  135. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  136. package/Unstable_Grid2/index.d.ts +4 -4
  137. package/className/index.d.ts +1 -1
  138. package/darkScrollbar/index.d.ts +28 -28
  139. package/generateUtilityClass/index.d.ts +2 -2
  140. package/generateUtilityClasses/index.d.ts +1 -1
  141. package/index.js +1 -1
  142. package/internal/switchBaseClasses.d.ts +12 -12
  143. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  144. package/legacy/ButtonBase/TouchRipple.js +4 -2
  145. package/legacy/Modal/Modal.js +8 -0
  146. package/legacy/SvgIcon/SvgIcon.js +8 -4
  147. package/legacy/Tooltip/Tooltip.js +5 -2
  148. package/legacy/index.js +1 -1
  149. package/locale/index.d.ts +80 -80
  150. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  151. package/modern/ButtonBase/TouchRipple.js +4 -2
  152. package/modern/Modal/Modal.js +8 -0
  153. package/modern/SvgIcon/SvgIcon.js +8 -4
  154. package/modern/Tooltip/Tooltip.js +6 -1
  155. package/modern/index.js +1 -1
  156. package/node/BottomNavigation/BottomNavigation.js +0 -0
  157. package/node/ButtonBase/TouchRipple.js +4 -2
  158. package/node/Modal/Modal.js +8 -0
  159. package/node/SvgIcon/SvgIcon.js +8 -4
  160. package/node/Tooltip/Tooltip.js +6 -1
  161. package/node/index.js +1 -1
  162. package/package.json +5 -5
  163. package/styles/CssVarsProvider.d.ts +20 -20
  164. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  165. package/styles/experimental_extendTheme.d.ts +1 -0
  166. package/styles/getOverlayAlpha.d.ts +2 -2
  167. package/styles/identifier.d.ts +2 -2
  168. package/styles/shouldSkipGeneratingVar.d.ts +1 -1
  169. package/transitions/index.d.ts +1 -1
  170. package/transitions/transition.d.ts +13 -13
  171. package/transitions/utils.d.ts +23 -23
  172. package/types/OverridableComponentAugmentation.d.ts +31 -31
  173. package/umd/material-ui.development.js +51 -19
  174. package/umd/material-ui.production.min.js +4 -4
  175. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  176. package/useTouchRipple/index.d.ts +1 -1
  177. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  178. package/utils/getScrollbarSize.d.ts +2 -2
  179. package/utils/ownerDocument.d.ts +2 -2
  180. package/utils/ownerWindow.d.ts +2 -2
  181. package/utils/setRef.d.ts +2 -2
@@ -298,6 +298,14 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes /* remove-proptypes */ =
298
298
  * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
299
299
  */
300
300
  onClose: PropTypes.func,
301
+ /**
302
+ * A function called when a transition enters.
303
+ */
304
+ onTransitionEnter: PropTypes.func,
305
+ /**
306
+ * A function called when a transition has exited.
307
+ */
308
+ onTransitionExited: PropTypes.func,
301
309
  /**
302
310
  * If `true`, the component is shown.
303
311
  */
@@ -35,7 +35,9 @@ var SvgIconRoot = styled('svg', {
35
35
  width: '1em',
36
36
  height: '1em',
37
37
  display: 'inline-block',
38
- fill: 'currentColor',
38
+ // the <svg> will define the property that has `currentColor`
39
+ // e.g. heroicons uses fill="none" and stroke="currentColor"
40
+ fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
39
41
  flexShrink: 0,
40
42
  transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
41
43
  duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
@@ -74,13 +76,15 @@ var SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
74
76
  _props$viewBox = props.viewBox,
75
77
  viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,
76
78
  other = _objectWithoutProperties(props, ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"]);
79
+ var hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
77
80
  var ownerState = _extends({}, props, {
78
81
  color: color,
79
82
  component: component,
80
83
  fontSize: fontSize,
81
84
  instanceFontSize: inProps.fontSize,
82
85
  inheritViewBox: inheritViewBox,
83
- viewBox: viewBox
86
+ viewBox: viewBox,
87
+ hasSvgAsChild: hasSvgAsChild
84
88
  });
85
89
  var more = {};
86
90
  if (!inheritViewBox) {
@@ -95,9 +99,9 @@ var 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
  }));
@@ -211,7 +211,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
211
211
  });
212
212
  var _props$arrow = props.arrow,
213
213
  arrow = _props$arrow === void 0 ? false : _props$arrow,
214
- children = props.children,
214
+ childrenProp = props.children,
215
215
  classesProp = props.classes,
216
216
  _props$components = props.components,
217
217
  components = _props$components === void 0 ? {} : _props$components,
@@ -256,7 +256,10 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
256
256
  _props$TransitionComp = props.TransitionComponent,
257
257
  TransitionComponentProp = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,
258
258
  TransitionProps = props.TransitionProps,
259
- other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]);
259
+ other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]); // to prevent runtime errors, developers will need to provide a child as a React element anyway.
260
+ var children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx("span", {
261
+ children: childrenProp
262
+ });
260
263
  var theme = useTheme();
261
264
  var isRtl = theme.direction === 'rtl';
262
265
  var _React$useState = React.useState(),
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.13.5
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/locale/index.d.ts CHANGED
@@ -1,80 +1,80 @@
1
- import { ComponentsPropsList } from '../styles/props';
2
- export interface Localization {
3
- components?: {
4
- MuiAlert?: {
5
- defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
- };
7
- MuiBreadcrumbs?: {
8
- defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
- };
10
- MuiTablePagination?: {
11
- defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
- };
13
- MuiRating?: {
14
- defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
- };
16
- MuiAutocomplete?: {
17
- defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
- };
19
- MuiPagination?: {
20
- defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
- };
22
- };
23
- }
24
- export declare const amET: Localization;
25
- export declare const arEG: Localization;
26
- export declare const arSA: Localization;
27
- export declare const arSD: Localization;
28
- export declare const azAZ: Localization;
29
- export declare const bnBD: Localization;
30
- export declare const beBY: Localization;
31
- export declare const bgBG: Localization;
32
- export declare const caES: Localization;
33
- export declare const csCZ: Localization;
34
- export declare const daDK: Localization;
35
- export declare const deDE: Localization;
36
- export declare const elGR: Localization;
37
- export declare const enUS: Localization;
38
- export declare const esES: Localization;
39
- export declare const etEE: Localization;
40
- export declare const faIR: Localization;
41
- export declare const fiFI: Localization;
42
- export declare const frFR: Localization;
43
- export declare const heIL: Localization;
44
- export declare const hiIN: Localization;
45
- export declare const hrHR: Localization;
46
- export declare const huHU: Localization;
47
- export declare const hyAM: Localization;
48
- export declare const idID: Localization;
49
- export declare const isIS: Localization;
50
- export declare const itIT: Localization;
51
- export declare const jaJP: Localization;
52
- export declare const khKH: Localization;
53
- export declare const koKR: Localization;
54
- export declare const kuCKB: Localization;
55
- export declare const kuLatn: Localization;
56
- export declare const kkKZ: Localization;
57
- export declare const mkMK: Localization;
58
- export declare const myMY: Localization;
59
- export declare const msMS: Localization;
60
- export declare const neNP: Localization;
61
- export declare const nbNO: Localization;
62
- export declare const nlNL: Localization;
63
- export declare const plPL: Localization;
64
- export declare const ptBR: Localization;
65
- export declare const ptPT: Localization;
66
- export declare const roRO: Localization;
67
- export declare const srRS: Localization;
68
- export declare const ruRU: Localization;
69
- export declare const siLK: Localization;
70
- export declare const skSK: Localization;
71
- export declare const svSE: Localization;
72
- export declare const thTH: Localization;
73
- export declare const trTR: Localization;
74
- export declare const tlTL: Localization;
75
- export declare const ukUA: Localization;
76
- export declare const urPK: Localization;
77
- export declare const viVN: Localization;
78
- export declare const zhCN: Localization;
79
- export declare const zhHK: Localization;
80
- export declare const zhTW: Localization;
1
+ import { ComponentsPropsList } from '../styles/props';
2
+ export interface Localization {
3
+ components?: {
4
+ MuiAlert?: {
5
+ defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
6
+ };
7
+ MuiBreadcrumbs?: {
8
+ defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
9
+ };
10
+ MuiTablePagination?: {
11
+ defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
12
+ };
13
+ MuiRating?: {
14
+ defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
15
+ };
16
+ MuiAutocomplete?: {
17
+ defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
18
+ };
19
+ MuiPagination?: {
20
+ defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
21
+ };
22
+ };
23
+ }
24
+ export declare const amET: Localization;
25
+ export declare const arEG: Localization;
26
+ export declare const arSA: Localization;
27
+ export declare const arSD: Localization;
28
+ export declare const azAZ: Localization;
29
+ export declare const bnBD: Localization;
30
+ export declare const beBY: Localization;
31
+ export declare const bgBG: Localization;
32
+ export declare const caES: Localization;
33
+ export declare const csCZ: Localization;
34
+ export declare const daDK: Localization;
35
+ export declare const deDE: Localization;
36
+ export declare const elGR: Localization;
37
+ export declare const enUS: Localization;
38
+ export declare const esES: Localization;
39
+ export declare const etEE: Localization;
40
+ export declare const faIR: Localization;
41
+ export declare const fiFI: Localization;
42
+ export declare const frFR: Localization;
43
+ export declare const heIL: Localization;
44
+ export declare const hiIN: Localization;
45
+ export declare const hrHR: Localization;
46
+ export declare const huHU: Localization;
47
+ export declare const hyAM: Localization;
48
+ export declare const idID: Localization;
49
+ export declare const isIS: Localization;
50
+ export declare const itIT: Localization;
51
+ export declare const jaJP: Localization;
52
+ export declare const khKH: Localization;
53
+ export declare const koKR: Localization;
54
+ export declare const kuCKB: Localization;
55
+ export declare const kuLatn: Localization;
56
+ export declare const kkKZ: Localization;
57
+ export declare const mkMK: Localization;
58
+ export declare const myMY: Localization;
59
+ export declare const msMS: Localization;
60
+ export declare const neNP: Localization;
61
+ export declare const nbNO: Localization;
62
+ export declare const nlNL: Localization;
63
+ export declare const plPL: Localization;
64
+ export declare const ptBR: Localization;
65
+ export declare const ptPT: Localization;
66
+ export declare const roRO: Localization;
67
+ export declare const srRS: Localization;
68
+ export declare const ruRU: Localization;
69
+ export declare const siLK: Localization;
70
+ export declare const skSK: Localization;
71
+ export declare const svSE: Localization;
72
+ export declare const thTH: Localization;
73
+ export declare const trTR: Localization;
74
+ export declare const tlTL: Localization;
75
+ export declare const ukUA: Localization;
76
+ export declare const urPK: Localization;
77
+ export declare const viVN: Localization;
78
+ export declare const zhCN: Localization;
79
+ export declare const zhHK: Localization;
80
+ export declare const zhTW: Localization;
File without changes
@@ -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
  */
@@ -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.5
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
  */
@@ -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.5
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.5",
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.5",
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
+ }