@mui/material 5.9.1 → 5.9.2

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 +54 -54
  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/buttonBaseClasses.d.ts +12 -12
  19. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  20. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  21. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  22. package/CHANGELOG.md +66 -4
  23. package/Card/cardClasses.d.ts +8 -8
  24. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  25. package/CardActions/cardActionsClasses.d.ts +10 -10
  26. package/CardContent/cardContentClasses.d.ts +8 -8
  27. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  28. package/CardMedia/cardMediaClasses.d.ts +12 -12
  29. package/Checkbox/checkboxClasses.d.ts +18 -18
  30. package/Chip/chipClasses.d.ts +80 -80
  31. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  32. package/ClickAwayListener/index.d.ts +2 -2
  33. package/Collapse/collapseClasses.d.ts +18 -18
  34. package/Container/containerClasses.d.ts +6 -6
  35. package/Dialog/Dialog.js +2 -1
  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 +40 -40
  46. package/FormControl/formControlClasses.d.ts +14 -14
  47. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  48. package/FormGroup/formGroupClasses.d.ts +12 -12
  49. package/FormHelperText/FormHelperText.d.ts +7 -1
  50. package/FormHelperText/FormHelperText.js +3 -1
  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 +26 -26
  56. package/ImageList/imageListClasses.d.ts +16 -16
  57. package/ImageListItem/ImageListItem.js +4 -4
  58. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  59. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  60. package/Input/inputClasses.d.ts +34 -34
  61. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  62. package/InputBase/inputBaseClasses.d.ts +44 -44
  63. package/InputLabel/inputLabelClasses.d.ts +32 -32
  64. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  65. package/Link/getTextDecoration.d.ts +15 -15
  66. package/Link/linkClasses.d.ts +18 -18
  67. package/List/listClasses.d.ts +14 -14
  68. package/ListItem/listItemClasses.d.ts +30 -30
  69. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  70. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  71. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  72. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  73. package/ListItemText/listItemTextClasses.d.ts +18 -18
  74. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  75. package/Menu/menuClasses.d.ts +12 -12
  76. package/MenuItem/menuItemClasses.d.ts +20 -20
  77. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  78. package/Modal/Modal.d.ts +2 -1
  79. package/Modal/Modal.js +2 -1
  80. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  81. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  82. package/OverridableComponent.d.ts +4 -0
  83. package/Pagination/paginationClasses.d.ts +14 -14
  84. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  85. package/Paper/paperClasses.d.ts +39 -39
  86. package/Popover/popoverClasses.d.ts +10 -10
  87. package/Popper/Popper.d.ts +24 -24
  88. package/Popper/Popper.js +24 -0
  89. package/README.md +3 -2
  90. package/Radio/radioClasses.d.ts +16 -16
  91. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  92. package/RadioGroup/useRadioGroup.d.ts +4 -4
  93. package/Rating/ratingClasses.d.ts +40 -40
  94. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  95. package/Select/selectClasses.d.ts +30 -30
  96. package/Skeleton/skeletonClasses.d.ts +24 -24
  97. package/Snackbar/snackbarClasses.d.ts +20 -20
  98. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  99. package/SpeedDial/speedDialClasses.d.ts +22 -22
  100. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  101. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  102. package/Stack/Stack.js +13 -1
  103. package/Step/StepContext.d.ts +20 -20
  104. package/Step/stepClasses.d.ts +16 -16
  105. package/StepButton/stepButtonClasses.d.ts +14 -14
  106. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  107. package/StepContent/stepContentClasses.d.ts +12 -12
  108. package/StepIcon/stepIconClasses.d.ts +16 -16
  109. package/StepLabel/stepLabelClasses.d.ts +28 -28
  110. package/Stepper/StepperContext.d.ts +18 -18
  111. package/Stepper/stepperClasses.d.ts +14 -14
  112. package/SvgIcon/svgIconClasses.d.ts +24 -24
  113. package/Switch/switchClasses.d.ts +32 -32
  114. package/Tab/tabClasses.d.ts +26 -26
  115. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  116. package/Table/tableClasses.d.ts +10 -10
  117. package/TableBody/tableBodyClasses.d.ts +8 -8
  118. package/TableCell/tableCellClasses.d.ts +32 -32
  119. package/TableContainer/tableContainerClasses.d.ts +8 -8
  120. package/TableFooter/tableFooterClasses.d.ts +8 -8
  121. package/TableHead/tableHeadClasses.d.ts +8 -8
  122. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  123. package/TableRow/tableRowClasses.d.ts +16 -16
  124. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  125. package/Tabs/Tabs.d.ts +7 -1
  126. package/Tabs/Tabs.js +3 -1
  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.js +5 -6
  133. package/Tooltip/tooltipClasses.d.ts +30 -30
  134. package/Typography/typographyClasses.d.ts +50 -50
  135. package/Unstable_Grid2/Grid2.d.ts +4 -4
  136. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  137. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  138. package/Unstable_Grid2/index.d.ts +4 -4
  139. package/className/index.d.ts +1 -1
  140. package/darkScrollbar/index.d.ts +28 -28
  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/Dialog/Dialog.js +2 -1
  145. package/legacy/FormHelperText/FormHelperText.js +3 -1
  146. package/legacy/ImageListItem/ImageListItem.js +4 -4
  147. package/legacy/Modal/Modal.js +2 -1
  148. package/legacy/Popper/Popper.js +24 -0
  149. package/legacy/Stack/Stack.js +13 -1
  150. package/legacy/Tabs/Tabs.js +3 -1
  151. package/legacy/Tooltip/Tooltip.js +5 -6
  152. package/legacy/index.js +1 -1
  153. package/locale/index.d.ts +71 -71
  154. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  155. package/modern/Dialog/Dialog.js +2 -1
  156. package/modern/FormHelperText/FormHelperText.js +3 -1
  157. package/modern/ImageListItem/ImageListItem.js +4 -4
  158. package/modern/Modal/Modal.js +2 -1
  159. package/modern/Popper/Popper.js +24 -0
  160. package/modern/Stack/Stack.js +13 -1
  161. package/modern/Tabs/Tabs.js +3 -1
  162. package/modern/Tooltip/Tooltip.js +5 -6
  163. package/modern/index.js +1 -1
  164. package/node/BottomNavigation/BottomNavigation.js +0 -0
  165. package/node/Dialog/Dialog.js +2 -1
  166. package/node/FormHelperText/FormHelperText.js +3 -1
  167. package/node/ImageListItem/ImageListItem.js +4 -4
  168. package/node/Modal/Modal.js +2 -1
  169. package/node/Popper/Popper.js +24 -0
  170. package/node/Stack/Stack.js +13 -1
  171. package/node/Tabs/Tabs.js +3 -1
  172. package/node/Tooltip/Tooltip.js +5 -6
  173. package/node/index.js +1 -1
  174. package/package.json +4 -4
  175. package/styles/CssVarsProvider.d.ts +14 -14
  176. package/transitions/index.d.ts +1 -1
  177. package/transitions/transition.d.ts +13 -13
  178. package/transitions/utils.d.ts +23 -23
  179. package/umd/material-ui.development.js +111 -25
  180. package/umd/material-ui.production.min.js +20 -20
  181. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  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
package/locale/index.d.ts CHANGED
@@ -1,71 +1,71 @@
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 arSD: Localization;
27
- export declare const azAZ: Localization;
28
- export declare const bnBD: Localization;
29
- export declare const bgBG: Localization;
30
- export declare const caES: Localization;
31
- export declare const csCZ: Localization;
32
- export declare const daDK: Localization;
33
- export declare const deDE: Localization;
34
- export declare const elGR: Localization;
35
- export declare const enUS: Localization;
36
- export declare const esES: Localization;
37
- export declare const etEE: Localization;
38
- export declare const faIR: Localization;
39
- export declare const fiFI: Localization;
40
- export declare const frFR: Localization;
41
- export declare const heIL: Localization;
42
- export declare const hiIN: Localization;
43
- export declare const hrHR: Localization;
44
- export declare const huHU: Localization;
45
- export declare const hyAM: Localization;
46
- export declare const idID: Localization;
47
- export declare const isIS: Localization;
48
- export declare const itIT: Localization;
49
- export declare const jaJP: Localization;
50
- export declare const khKH: Localization;
51
- export declare const koKR: Localization;
52
- export declare const kzKZ: Localization;
53
- export declare const mkMK: Localization;
54
- export declare const nbNO: Localization;
55
- export declare const nlNL: Localization;
56
- export declare const plPL: Localization;
57
- export declare const ptBR: Localization;
58
- export declare const ptPT: Localization;
59
- export declare const roRO: Localization;
60
- export declare const srRS: Localization;
61
- export declare const ruRU: Localization;
62
- export declare const siLK: Localization;
63
- export declare const skSK: Localization;
64
- export declare const svSE: Localization;
65
- export declare const thTH: Localization;
66
- export declare const trTR: Localization;
67
- export declare const ukUA: Localization;
68
- export declare const viVN: Localization;
69
- export declare const zhCN: Localization;
70
- export declare const zhHK: Localization;
71
- 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 arSD: Localization;
27
+ export declare const azAZ: Localization;
28
+ export declare const bnBD: Localization;
29
+ export declare const bgBG: Localization;
30
+ export declare const caES: Localization;
31
+ export declare const csCZ: Localization;
32
+ export declare const daDK: Localization;
33
+ export declare const deDE: Localization;
34
+ export declare const elGR: Localization;
35
+ export declare const enUS: Localization;
36
+ export declare const esES: Localization;
37
+ export declare const etEE: Localization;
38
+ export declare const faIR: Localization;
39
+ export declare const fiFI: Localization;
40
+ export declare const frFR: Localization;
41
+ export declare const heIL: Localization;
42
+ export declare const hiIN: Localization;
43
+ export declare const hrHR: Localization;
44
+ export declare const huHU: Localization;
45
+ export declare const hyAM: Localization;
46
+ export declare const idID: Localization;
47
+ export declare const isIS: Localization;
48
+ export declare const itIT: Localization;
49
+ export declare const jaJP: Localization;
50
+ export declare const khKH: Localization;
51
+ export declare const koKR: Localization;
52
+ export declare const kzKZ: Localization;
53
+ export declare const mkMK: Localization;
54
+ export declare const nbNO: Localization;
55
+ export declare const nlNL: Localization;
56
+ export declare const plPL: Localization;
57
+ export declare const ptBR: Localization;
58
+ export declare const ptPT: Localization;
59
+ export declare const roRO: Localization;
60
+ export declare const srRS: Localization;
61
+ export declare const ruRU: Localization;
62
+ export declare const siLK: Localization;
63
+ export declare const skSK: Localization;
64
+ export declare const svSE: Localization;
65
+ export declare const thTH: Localization;
66
+ export declare const trTR: Localization;
67
+ export declare const ukUA: Localization;
68
+ export declare const viVN: Localization;
69
+ export declare const zhCN: Localization;
70
+ export declare const zhHK: Localization;
71
+ export declare const zhTW: Localization;
File without changes
@@ -291,7 +291,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
291
291
 
292
292
  /**
293
293
  * A backdrop component. This prop enables custom backdrop rendering.
294
- * @deprecated Use `components.Backdrop` instead.
294
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
295
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
295
296
  * @default styled(Backdrop, {
296
297
  * name: 'MuiModal',
297
298
  * slot: 'Backdrop',
@@ -181,6 +181,8 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
181
181
  /**
182
182
  * The variant to use.
183
183
  */
184
- variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
184
+ variant: PropTypes
185
+ /* @typescript-to-proptypes-ignore */
186
+ .oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
185
187
  } : void 0;
186
188
  export default FormHelperText;
@@ -40,9 +40,8 @@ const ImageListItemRoot = styled('li', {
40
40
  })(({
41
41
  ownerState
42
42
  }) => _extends({
43
- display: 'inline-block',
44
- position: 'relative',
45
- lineHeight: 0
43
+ display: 'block',
44
+ position: 'relative'
46
45
  }, ownerState.variant === 'standard' && {
47
46
  // For titlebar under list item
48
47
  display: 'flex',
@@ -57,7 +56,8 @@ const ImageListItemRoot = styled('li', {
57
56
  [`& .${imageListItemClasses.img}`]: _extends({
58
57
  objectFit: 'cover',
59
58
  width: '100%',
60
- height: '100%'
59
+ height: '100%',
60
+ display: 'block'
61
61
  }, ownerState.variant === 'standard' && {
62
62
  height: 'auto',
63
63
  flexGrow: 1
@@ -138,7 +138,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
138
138
 
139
139
  /**
140
140
  * A backdrop component. This prop enables custom backdrop rendering.
141
- * @deprecated Use `components.Backdrop` instead.
141
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
142
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
142
143
  * @default styled(Backdrop, {
143
144
  * name: 'MuiModal',
144
145
  * slot: 'Backdrop',
@@ -61,6 +61,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
61
61
  /* @typescript-to-proptypes-ignore */
62
62
  .oneOfType([PropTypes.node, PropTypes.func]),
63
63
 
64
+ /**
65
+ * @ignore
66
+ */
67
+ component: PropTypes
68
+ /* @typescript-to-proptypes-ignore */
69
+ .elementType,
70
+
71
+ /**
72
+ * The components used for each slot inside the Popper.
73
+ * Either a string to use a HTML element or a component.
74
+ * @default {}
75
+ */
76
+ components: PropTypes.shape({
77
+ Root: PropTypes.elementType
78
+ }),
79
+
80
+ /**
81
+ * The props used for each slot inside the Popper.
82
+ * @default {}
83
+ */
84
+ componentsProps: PropTypes.shape({
85
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
86
+ }),
87
+
64
88
  /**
65
89
  * An HTML element or function that returns one.
66
90
  * The `container` will have the portal children appended to it.
@@ -46,7 +46,8 @@ export const style = ({
46
46
  theme
47
47
  }) => {
48
48
  let styles = _extends({
49
- display: 'flex'
49
+ display: 'flex',
50
+ flexDirection: 'column'
50
51
  }, handleBreakpoints({
51
52
  theme
52
53
  }, resolveBreakpointValues({
@@ -74,6 +75,17 @@ export const style = ({
74
75
  base
75
76
  });
76
77
 
78
+ if (typeof directionValues === 'object') {
79
+ Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
80
+ const directionValue = directionValues[breakpoint];
81
+
82
+ if (!directionValue) {
83
+ const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
84
+ directionValues[breakpoint] = previousDirectionValue;
85
+ }
86
+ });
87
+ }
88
+
77
89
  const styleFromPropValue = (propValue, breakpoint) => {
78
90
  return {
79
91
  '& > :not(style) + :not(style)': {
@@ -775,7 +775,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
775
775
  * Determines the color of the indicator.
776
776
  * @default 'primary'
777
777
  */
778
- indicatorColor: PropTypes.oneOf(['primary', 'secondary']),
778
+ indicatorColor: PropTypes
779
+ /* @typescript-to-proptypes-ignore */
780
+ .oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
779
781
 
780
782
  /**
781
783
  * Callback fired when the value changes.
@@ -336,15 +336,12 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
336
336
  const handleEnter = event => {
337
337
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
338
338
  return;
339
- } // Workaround for https://github.com/facebook/react/issues/7769
340
-
341
-
342
- if (!childNode) {
343
- setChildNode(event.currentTarget);
344
339
  } // Remove the title ahead of time.
345
340
  // We don't want to wait for the next render commit.
346
341
  // We would risk displaying two tooltips at the same time (native + this one).
347
- else {
342
+
343
+
344
+ if (childNode) {
348
345
  childNode.removeAttribute('title');
349
346
  }
350
347
 
@@ -389,6 +386,8 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
389
386
 
390
387
  const handleFocus = event => {
391
388
  // Workaround for https://github.com/facebook/react/issues/7769
389
+ // The autoFocus of React might trigger the event before the componentDidMount.
390
+ // We need to account for this eventuality.
392
391
  if (!childNode) {
393
392
  setChildNode(event.currentTarget);
394
393
  }
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.1
1
+ /** @license MUI v5.9.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
File without changes
@@ -320,7 +320,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
320
320
 
321
321
  /**
322
322
  * A backdrop component. This prop enables custom backdrop rendering.
323
- * @deprecated Use `components.Backdrop` instead.
323
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
324
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
324
325
  * @default styled(Backdrop, {
325
326
  * name: 'MuiModal',
326
327
  * slot: 'Backdrop',
@@ -202,7 +202,9 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
202
202
  /**
203
203
  * The variant to use.
204
204
  */
205
- variant: _propTypes.default.oneOf(['filled', 'outlined', 'standard'])
205
+ variant: _propTypes.default
206
+ /* @typescript-to-proptypes-ignore */
207
+ .oneOfType([_propTypes.default.oneOf(['filled', 'outlined', 'standard']), _propTypes.default.string])
206
208
  } : void 0;
207
209
  var _default = FormHelperText;
208
210
  exports.default = _default;
@@ -67,9 +67,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
67
67
  })(({
68
68
  ownerState
69
69
  }) => (0, _extends2.default)({
70
- display: 'inline-block',
71
- position: 'relative',
72
- lineHeight: 0
70
+ display: 'block',
71
+ position: 'relative'
73
72
  }, ownerState.variant === 'standard' && {
74
73
  // For titlebar under list item
75
74
  display: 'flex',
@@ -84,7 +83,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
84
83
  [`& .${_imageListItemClasses.default.img}`]: (0, _extends2.default)({
85
84
  objectFit: 'cover',
86
85
  width: '100%',
87
- height: '100%'
86
+ height: '100%',
87
+ display: 'block'
88
88
  }, ownerState.variant === 'standard' && {
89
89
  height: 'auto',
90
90
  flexGrow: 1
@@ -162,7 +162,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
162
162
 
163
163
  /**
164
164
  * A backdrop component. This prop enables custom backdrop rendering.
165
- * @deprecated Use `components.Backdrop` instead.
165
+ * @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
166
+ * Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
166
167
  * @default styled(Backdrop, {
167
168
  * name: 'MuiModal',
168
169
  * slot: 'Backdrop',
@@ -82,6 +82,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
82
82
  /* @typescript-to-proptypes-ignore */
83
83
  .oneOfType([_propTypes.default.node, _propTypes.default.func]),
84
84
 
85
+ /**
86
+ * @ignore
87
+ */
88
+ component: _propTypes.default
89
+ /* @typescript-to-proptypes-ignore */
90
+ .elementType,
91
+
92
+ /**
93
+ * The components used for each slot inside the Popper.
94
+ * Either a string to use a HTML element or a component.
95
+ * @default {}
96
+ */
97
+ components: _propTypes.default.shape({
98
+ Root: _propTypes.default.elementType
99
+ }),
100
+
101
+ /**
102
+ * The props used for each slot inside the Popper.
103
+ * @default {}
104
+ */
105
+ componentsProps: _propTypes.default.shape({
106
+ root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
107
+ }),
108
+
85
109
  /**
86
110
  * An HTML element or function that returns one.
87
111
  * The `container` will have the portal children appended to it.
@@ -67,7 +67,8 @@ const style = ({
67
67
  theme
68
68
  }) => {
69
69
  let styles = (0, _extends2.default)({
70
- display: 'flex'
70
+ display: 'flex',
71
+ flexDirection: 'column'
71
72
  }, (0, _system.handleBreakpoints)({
72
73
  theme
73
74
  }, (0, _system.unstable_resolveBreakpointValues)({
@@ -95,6 +96,17 @@ const style = ({
95
96
  base
96
97
  });
97
98
 
99
+ if (typeof directionValues === 'object') {
100
+ Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
101
+ const directionValue = directionValues[breakpoint];
102
+
103
+ if (!directionValue) {
104
+ const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
105
+ directionValues[breakpoint] = previousDirectionValue;
106
+ }
107
+ });
108
+ }
109
+
98
110
  const styleFromPropValue = (propValue, breakpoint) => {
99
111
  return {
100
112
  '& > :not(style) + :not(style)': {
package/node/Tabs/Tabs.js CHANGED
@@ -802,7 +802,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
802
802
  * Determines the color of the indicator.
803
803
  * @default 'primary'
804
804
  */
805
- indicatorColor: _propTypes.default.oneOf(['primary', 'secondary']),
805
+ indicatorColor: _propTypes.default
806
+ /* @typescript-to-proptypes-ignore */
807
+ .oneOfType([_propTypes.default.oneOf(['primary', 'secondary']), _propTypes.default.string]),
806
808
 
807
809
  /**
808
810
  * Callback fired when the value changes.
@@ -371,15 +371,12 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
371
371
  const handleEnter = event => {
372
372
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
373
373
  return;
374
- } // Workaround for https://github.com/facebook/react/issues/7769
375
-
376
-
377
- if (!childNode) {
378
- setChildNode(event.currentTarget);
379
374
  } // Remove the title ahead of time.
380
375
  // We don't want to wait for the next render commit.
381
376
  // We would risk displaying two tooltips at the same time (native + this one).
382
- else {
377
+
378
+
379
+ if (childNode) {
383
380
  childNode.removeAttribute('title');
384
381
  }
385
382
 
@@ -424,6 +421,8 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
424
421
 
425
422
  const handleFocus = event => {
426
423
  // Workaround for https://github.com/facebook/react/issues/7769
424
+ // The autoFocus of React might trigger the event before the componentDidMount.
425
+ // We need to account for this eventuality.
427
426
  if (!childNode) {
428
427
  setChildNode(event.currentTarget);
429
428
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.1
1
+ /** @license MUI v5.9.2
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.9.1",
3
+ "version": "5.9.2",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -46,9 +46,9 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.17.2",
49
- "@mui/base": "5.0.0-alpha.90",
50
- "@mui/system": "^5.9.1",
51
- "@mui/types": "^7.1.4",
49
+ "@mui/base": "5.0.0-alpha.91",
50
+ "@mui/system": "^5.9.2",
51
+ "@mui/types": "^7.1.5",
52
52
  "@mui/utils": "^5.9.1",
53
53
  "@types/react-transition-group": "^4.4.5",
54
54
  "clsx": "^1.2.1",
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- import { SupportedColorScheme } from './experimental_extendTheme';
3
- declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
4
- declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
5
- theme?: {
6
- cssVarPrefix?: string | undefined;
7
- colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
8
- } | undefined;
9
- documentNode?: Document | null | undefined;
10
- colorSchemeNode?: Document | HTMLElement | null | undefined;
11
- colorSchemeSelector?: string | undefined;
12
- storageWindow?: Window | null | undefined;
13
- }>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
14
- export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
1
+ /// <reference types="react" />
2
+ import { SupportedColorScheme } from './experimental_extendTheme';
3
+ declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
4
+ declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
5
+ theme?: {
6
+ cssVarPrefix?: string | undefined;
7
+ colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
8
+ } | undefined;
9
+ documentNode?: Document | null | undefined;
10
+ colorSchemeNode?: Document | HTMLElement | null | undefined;
11
+ colorSchemeSelector?: string | undefined;
12
+ storageWindow?: Window | null | undefined;
13
+ }>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
14
+ export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
@@ -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 declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
- export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
- export interface EasingProps {
6
- easing: string | {
7
- enter?: string;
8
- exit?: string;
9
- };
10
- }
11
- export declare 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 declare type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
4
+ export declare type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
5
+ export interface EasingProps {
6
+ easing: string | {
7
+ enter?: string;
8
+ exit?: string;
9
+ };
10
+ }
11
+ export declare 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 {};