@mui/material 5.9.2 → 5.10.1

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 (222) 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/Badge.js +1 -1
  13. package/Badge/badgeClasses.d.ts +56 -56
  14. package/BottomNavigation/BottomNavigation.js +0 -0
  15. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  16. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  17. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  18. package/Button/Button.js +8 -3
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/TouchRipple.js +1 -1
  21. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  22. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  23. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  24. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  25. package/CHANGELOG.md +196 -5
  26. package/Card/cardClasses.d.ts +8 -8
  27. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  28. package/CardActions/cardActionsClasses.d.ts +10 -10
  29. package/CardContent/cardContentClasses.d.ts +8 -8
  30. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  31. package/CardMedia/cardMediaClasses.d.ts +12 -12
  32. package/Checkbox/checkboxClasses.d.ts +18 -18
  33. package/Chip/Chip.js +5 -7
  34. package/Chip/chipClasses.d.ts +88 -80
  35. package/Chip/chipClasses.js +1 -1
  36. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  37. package/ClickAwayListener/index.d.ts +2 -2
  38. package/Collapse/collapseClasses.d.ts +18 -18
  39. package/Container/containerClasses.d.ts +6 -6
  40. package/Dialog/DialogContext.d.ts +6 -6
  41. package/Dialog/dialogClasses.d.ts +36 -36
  42. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  43. package/DialogContent/dialogContentClasses.d.ts +10 -10
  44. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  45. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  46. package/Divider/dividerClasses.d.ts +34 -34
  47. package/Drawer/drawerClasses.d.ts +30 -30
  48. package/Fab/fabClasses.d.ts +26 -26
  49. package/FilledInput/filledInputClasses.d.ts +40 -40
  50. package/FormControl/formControlClasses.d.ts +14 -14
  51. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  52. package/FormGroup/formGroupClasses.d.ts +12 -12
  53. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  54. package/FormLabel/formLabelClasses.d.ts +22 -22
  55. package/Grid/Grid.d.ts +1 -1
  56. package/Grid/Grid.js +71 -4
  57. package/Grid/gridClasses.d.ts +48 -48
  58. package/Icon/iconClasses.d.ts +24 -24
  59. package/IconButton/iconButtonClasses.d.ts +26 -26
  60. package/ImageList/imageListClasses.d.ts +16 -16
  61. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  62. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  63. package/Input/inputClasses.d.ts +34 -34
  64. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  65. package/InputBase/InputBase.js +3 -2
  66. package/InputBase/inputBaseClasses.d.ts +46 -44
  67. package/InputBase/inputBaseClasses.js +1 -1
  68. package/InputLabel/inputLabelClasses.d.ts +32 -32
  69. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  70. package/Link/getTextDecoration.d.ts +15 -15
  71. package/Link/linkClasses.d.ts +18 -18
  72. package/List/listClasses.d.ts +14 -14
  73. package/ListItem/listItemClasses.d.ts +30 -30
  74. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  75. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  76. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  77. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  78. package/ListItemText/listItemTextClasses.d.ts +18 -18
  79. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  80. package/Menu/menuClasses.d.ts +12 -12
  81. package/MenuItem/menuItemClasses.d.ts +20 -20
  82. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  83. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  84. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  85. package/Pagination/paginationClasses.d.ts +14 -14
  86. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  87. package/Paper/paperClasses.d.ts +39 -39
  88. package/Popover/popoverClasses.d.ts +10 -10
  89. package/Popper/Popper.d.ts +24 -24
  90. package/README.md +8 -8
  91. package/Radio/radioClasses.d.ts +16 -16
  92. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  93. package/RadioGroup/useRadioGroup.d.ts +4 -4
  94. package/Rating/ratingClasses.d.ts +40 -40
  95. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  96. package/Select/SelectInput.js +1 -1
  97. package/Select/selectClasses.d.ts +30 -30
  98. package/Skeleton/Skeleton.d.ts +1 -1
  99. package/Skeleton/Skeleton.js +3 -1
  100. package/Skeleton/skeletonClasses.d.ts +26 -24
  101. package/Skeleton/skeletonClasses.js +1 -1
  102. package/Snackbar/snackbarClasses.d.ts +20 -20
  103. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  104. package/SpeedDial/speedDialClasses.d.ts +22 -22
  105. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  106. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  107. package/Stack/Stack.js +2 -1
  108. package/Step/StepContext.d.ts +20 -20
  109. package/Step/stepClasses.d.ts +16 -16
  110. package/StepButton/stepButtonClasses.d.ts +14 -14
  111. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  112. package/StepContent/stepContentClasses.d.ts +12 -12
  113. package/StepIcon/stepIconClasses.d.ts +16 -16
  114. package/StepLabel/StepLabel.js +1 -1
  115. package/StepLabel/stepLabelClasses.d.ts +28 -28
  116. package/Stepper/StepperContext.d.ts +18 -18
  117. package/Stepper/stepperClasses.d.ts +14 -14
  118. package/SvgIcon/svgIconClasses.d.ts +24 -24
  119. package/Switch/switchClasses.d.ts +32 -32
  120. package/Tab/tabClasses.d.ts +26 -26
  121. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  122. package/Table/tableClasses.d.ts +10 -10
  123. package/TableBody/tableBodyClasses.d.ts +8 -8
  124. package/TableCell/TableCell.d.ts +6 -2
  125. package/TableCell/TableCell.js +6 -2
  126. package/TableCell/tableCellClasses.d.ts +32 -32
  127. package/TableContainer/tableContainerClasses.d.ts +8 -8
  128. package/TableFooter/tableFooterClasses.d.ts +8 -8
  129. package/TableHead/tableHeadClasses.d.ts +8 -8
  130. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  131. package/TableRow/tableRowClasses.d.ts +16 -16
  132. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  133. package/Tabs/tabsClasses.d.ts +32 -32
  134. package/TextField/textFieldClasses.d.ts +8 -8
  135. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  136. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  137. package/Toolbar/toolbarClasses.d.ts +14 -14
  138. package/Tooltip/Tooltip.js +1 -1
  139. package/Tooltip/tooltipClasses.d.ts +30 -30
  140. package/Typography/typographyClasses.d.ts +50 -50
  141. package/Unstable_Grid2/Grid2.d.ts +4 -4
  142. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  143. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  144. package/Unstable_Grid2/index.d.ts +4 -4
  145. package/className/index.d.ts +1 -1
  146. package/darkScrollbar/index.d.ts +28 -28
  147. package/index.js +1 -1
  148. package/internal/switchBaseClasses.d.ts +12 -12
  149. package/legacy/Badge/Badge.js +1 -1
  150. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  151. package/legacy/Button/Button.js +4 -2
  152. package/legacy/ButtonBase/TouchRipple.js +1 -1
  153. package/legacy/Chip/Chip.js +4 -6
  154. package/legacy/Chip/chipClasses.js +1 -1
  155. package/legacy/Grid/Grid.js +76 -12
  156. package/legacy/InputBase/InputBase.js +3 -2
  157. package/legacy/InputBase/inputBaseClasses.js +1 -1
  158. package/legacy/Select/SelectInput.js +1 -1
  159. package/legacy/Skeleton/Skeleton.js +3 -1
  160. package/legacy/Skeleton/skeletonClasses.js +1 -1
  161. package/legacy/Stack/Stack.js +2 -1
  162. package/legacy/StepLabel/StepLabel.js +1 -1
  163. package/legacy/TableCell/TableCell.js +6 -2
  164. package/legacy/Tooltip/Tooltip.js +1 -1
  165. package/legacy/index.js +1 -1
  166. package/legacy/styles/createTheme.js +5 -0
  167. package/legacy/useScrollTrigger/useScrollTrigger.js +6 -2
  168. package/locale/index.d.ts +71 -71
  169. package/modern/Badge/Badge.js +1 -1
  170. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  171. package/modern/Button/Button.js +8 -3
  172. package/modern/ButtonBase/TouchRipple.js +1 -1
  173. package/modern/Chip/Chip.js +5 -7
  174. package/modern/Chip/chipClasses.js +1 -1
  175. package/modern/Grid/Grid.js +67 -4
  176. package/modern/InputBase/InputBase.js +3 -2
  177. package/modern/InputBase/inputBaseClasses.js +1 -1
  178. package/modern/Select/SelectInput.js +1 -1
  179. package/modern/Skeleton/Skeleton.js +3 -1
  180. package/modern/Skeleton/skeletonClasses.js +1 -1
  181. package/modern/Stack/Stack.js +2 -1
  182. package/modern/StepLabel/StepLabel.js +1 -1
  183. package/modern/TableCell/TableCell.js +6 -2
  184. package/modern/Tooltip/Tooltip.js +1 -1
  185. package/modern/index.js +1 -1
  186. package/modern/styles/createTheme.js +6 -0
  187. package/modern/useScrollTrigger/useScrollTrigger.js +6 -2
  188. package/node/Badge/Badge.js +1 -1
  189. package/node/BottomNavigation/BottomNavigation.js +0 -0
  190. package/node/Button/Button.js +10 -3
  191. package/node/ButtonBase/TouchRipple.js +1 -1
  192. package/node/Chip/Chip.js +5 -7
  193. package/node/Chip/chipClasses.js +1 -1
  194. package/node/Grid/Grid.js +71 -4
  195. package/node/InputBase/InputBase.js +3 -2
  196. package/node/InputBase/inputBaseClasses.js +1 -1
  197. package/node/Select/SelectInput.js +1 -1
  198. package/node/Skeleton/Skeleton.js +3 -1
  199. package/node/Skeleton/skeletonClasses.js +1 -1
  200. package/node/Stack/Stack.js +1 -0
  201. package/node/StepLabel/StepLabel.js +1 -1
  202. package/node/TableCell/TableCell.js +6 -2
  203. package/node/Tooltip/Tooltip.js +1 -1
  204. package/node/index.js +1 -1
  205. package/node/styles/createTheme.js +6 -0
  206. package/node/useScrollTrigger/useScrollTrigger.js +6 -2
  207. package/package.json +6 -5
  208. package/styles/CssVarsProvider.d.ts +14 -14
  209. package/styles/createTheme.js +6 -0
  210. package/transitions/index.d.ts +1 -1
  211. package/transitions/transition.d.ts +13 -13
  212. package/transitions/utils.d.ts +23 -23
  213. package/umd/material-ui.development.js +245 -104
  214. package/umd/material-ui.production.min.js +20 -20
  215. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  216. package/useScrollTrigger/useScrollTrigger.js +6 -2
  217. package/useTouchRipple/index.d.ts +1 -1
  218. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  219. package/utils/getScrollbarSize.d.ts +2 -2
  220. package/utils/ownerDocument.d.ts +2 -2
  221. package/utils/ownerWindow.d.ts +2 -2
  222. package/utils/setRef.d.ts +2 -2
@@ -12,6 +12,6 @@ function getChipUtilityClass(slot) {
12
12
  return (0, _base.generateUtilityClass)('MuiChip', slot);
13
13
  }
14
14
 
15
- const chipClasses = (0, _base.generateUtilityClasses)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'focusVisible']);
15
+ const chipClasses = (0, _base.generateUtilityClasses)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
16
16
  var _default = chipClasses;
17
17
  exports.default = _default;
package/node/Grid/Grid.js CHANGED
@@ -155,6 +155,32 @@ function generateDirection({
155
155
  return output;
156
156
  });
157
157
  }
158
+ /**
159
+ * Extracts zero value breakpoint keys before a non-zero value breakpoint key.
160
+ * @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]
161
+ * @returns [xs, sm]
162
+ */
163
+
164
+
165
+ function extractZeroValueBreakpointKeys({
166
+ breakpoints,
167
+ values
168
+ }) {
169
+ let nonZeroKey = '';
170
+ Object.keys(values).forEach(key => {
171
+ if (nonZeroKey !== '') {
172
+ return;
173
+ }
174
+
175
+ if (values[key] !== 0) {
176
+ nonZeroKey = key;
177
+ }
178
+ });
179
+ const sortedBreakpointKeysByValue = Object.keys(breakpoints).sort((a, b) => {
180
+ return breakpoints[a] - breakpoints[b];
181
+ });
182
+ return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));
183
+ }
158
184
 
159
185
  function generateRowGap({
160
186
  theme,
@@ -171,9 +197,20 @@ function generateRowGap({
171
197
  values: rowSpacing,
172
198
  breakpoints: theme.breakpoints.values
173
199
  });
200
+ let zeroValueBreakpointKeys;
201
+
202
+ if (typeof rowSpacingValues === 'object') {
203
+ zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
204
+ breakpoints: theme.breakpoints.values,
205
+ values: rowSpacingValues
206
+ });
207
+ }
208
+
174
209
  styles = (0, _system.handleBreakpoints)({
175
210
  theme
176
- }, rowSpacingValues, propValue => {
211
+ }, rowSpacingValues, (propValue, breakpoint) => {
212
+ var _zeroValueBreakpointK;
213
+
177
214
  const themeSpacing = theme.spacing(propValue);
178
215
 
179
216
  if (themeSpacing !== '0px') {
@@ -185,7 +222,16 @@ function generateRowGap({
185
222
  };
186
223
  }
187
224
 
188
- return {};
225
+ if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {
226
+ return {};
227
+ }
228
+
229
+ return {
230
+ marginTop: 0,
231
+ [`& > .${_gridClasses.default.item}`]: {
232
+ paddingTop: 0
233
+ }
234
+ };
189
235
  });
190
236
  }
191
237
 
@@ -207,9 +253,20 @@ function generateColumnGap({
207
253
  values: columnSpacing,
208
254
  breakpoints: theme.breakpoints.values
209
255
  });
256
+ let zeroValueBreakpointKeys;
257
+
258
+ if (typeof columnSpacingValues === 'object') {
259
+ zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
260
+ breakpoints: theme.breakpoints.values,
261
+ values: columnSpacingValues
262
+ });
263
+ }
264
+
210
265
  styles = (0, _system.handleBreakpoints)({
211
266
  theme
212
- }, columnSpacingValues, propValue => {
267
+ }, columnSpacingValues, (propValue, breakpoint) => {
268
+ var _zeroValueBreakpointK2;
269
+
213
270
  const themeSpacing = theme.spacing(propValue);
214
271
 
215
272
  if (themeSpacing !== '0px') {
@@ -222,7 +279,17 @@ function generateColumnGap({
222
279
  };
223
280
  }
224
281
 
225
- return {};
282
+ if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {
283
+ return {};
284
+ }
285
+
286
+ return {
287
+ width: '100%',
288
+ marginLeft: 0,
289
+ [`& > .${_gridClasses.default.item}`]: {
290
+ paddingLeft: 0
291
+ }
292
+ };
226
293
  });
227
294
  }
228
295
 
@@ -81,13 +81,14 @@ const useUtilityClasses = ownerState => {
81
81
  fullWidth,
82
82
  hiddenLabel,
83
83
  multiline,
84
+ readOnly,
84
85
  size,
85
86
  startAdornment,
86
87
  type
87
88
  } = ownerState;
88
89
  const slots = {
89
- root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],
90
- input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']
90
+ root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
91
+ input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
91
92
  };
92
93
  return (0, _base.unstable_composeClasses)(slots, _inputBaseClasses.getInputBaseUtilityClass, classes);
93
94
  };
@@ -12,6 +12,6 @@ function getInputBaseUtilityClass(slot) {
12
12
  return (0, _base.generateUtilityClass)('MuiInputBase', slot);
13
13
  }
14
14
 
15
- const inputBaseClasses = (0, _base.generateUtilityClasses)('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
15
+ const inputBaseClasses = (0, _base.generateUtilityClasses)('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
16
16
  var _default = inputBaseClasses;
17
17
  exports.default = _default;
@@ -533,7 +533,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
533
533
  onFocus: onFocus
534
534
  }, SelectDisplayProps, {
535
535
  ownerState: ownerState,
536
- className: (0, _clsx.default)(classes.select, className, SelectDisplayProps.className) // The id is required for proper a11y
536
+ className: (0, _clsx.default)(SelectDisplayProps.className, classes.select, className) // The id is required for proper a11y
537
537
  ,
538
538
  id: buttonId,
539
539
  children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
@@ -111,6 +111,8 @@ const SkeletonRoot = (0, _styled.default)('span', {
111
111
  }
112
112
  }, ownerState.variant === 'circular' && {
113
113
  borderRadius: '50%'
114
+ }, ownerState.variant === 'rounded' && {
115
+ borderRadius: (theme.vars || theme).shape.borderRadius
114
116
  }, ownerState.hasChildren && {
115
117
  '& > *': {
116
118
  visibility: 'hidden'
@@ -243,7 +245,7 @@ process.env.NODE_ENV !== "production" ? Skeleton.propTypes
243
245
  */
244
246
  variant: _propTypes.default
245
247
  /* @typescript-to-proptypes-ignore */
246
- .oneOfType([_propTypes.default.oneOf(['circular', 'rectangular', 'text']), _propTypes.default.string]),
248
+ .oneOfType([_propTypes.default.oneOf(['circular', 'rectangular', 'rounded', 'text']), _propTypes.default.string]),
247
249
 
248
250
  /**
249
251
  * Width of the skeleton.
@@ -12,6 +12,6 @@ function getSkeletonUtilityClass(slot) {
12
12
  return (0, _base.generateUtilityClass)('MuiSkeleton', slot);
13
13
  }
14
14
 
15
- const skeletonClasses = (0, _base.generateUtilityClasses)('MuiSkeleton', ['root', 'text', 'rectangular', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
15
+ const skeletonClasses = (0, _base.generateUtilityClasses)('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
16
16
  var _default = skeletonClasses;
17
17
  exports.default = _default;
@@ -121,6 +121,7 @@ const style = ({
121
121
  }, spacingValues, styleFromPropValue));
122
122
  }
123
123
 
124
+ styles = (0, _system.mergeBreakpointsInOrder)(theme.breakpoints, styles);
124
125
  return styles;
125
126
  };
126
127
 
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
52
52
  const slots = {
53
53
  root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
54
54
  label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
55
- iconContainer: ['iconContainer', alternativeLabel && 'alternativeLabel'],
55
+ iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
56
56
  labelContainer: ['labelContainer']
57
57
  };
58
58
  return (0, _base.unstable_composeClasses)(slots, _stepLabelClasses.getStepLabelUtilityClass, classes);
@@ -235,7 +235,9 @@ process.env.NODE_ENV !== "production" ? TableCell.propTypes
235
235
  * Specify the size of the cell.
236
236
  * The prop defaults to the value (`'medium'`) inherited from the parent Table component.
237
237
  */
238
- size: _propTypes.default.oneOf(['small', 'medium']),
238
+ size: _propTypes.default
239
+ /* @typescript-to-proptypes-ignore */
240
+ .oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
239
241
 
240
242
  /**
241
243
  * Set aria-sort direction.
@@ -251,7 +253,9 @@ process.env.NODE_ENV !== "production" ? TableCell.propTypes
251
253
  * Specify the cell type.
252
254
  * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.
253
255
  */
254
- variant: _propTypes.default.oneOf(['body', 'footer', 'head'])
256
+ variant: _propTypes.default
257
+ /* @typescript-to-proptypes-ignore */
258
+ .oneOfType([_propTypes.default.oneOf(['body', 'footer', 'head']), _propTypes.default.string])
255
259
  } : void 0;
256
260
  var _default = TableCell;
257
261
  exports.default = _default;
@@ -219,7 +219,7 @@ const TooltipArrow = (0, _styled.default)('span', {
219
219
  /* = width / sqrt(2) = (length of the hypotenuse) */
220
220
  ,
221
221
  boxSizing: 'border-box',
222
- color: theme.vars ? `rgba(${theme.vars.palette.grey.darkChannel} / 0.9)` : (0, _system.alpha)(theme.palette.grey[700], 0.9),
222
+ color: theme.vars ? theme.vars.palette.Tooltip.bg : (0, _system.alpha)(theme.palette.grey[700], 0.9),
223
223
  '&::before': {
224
224
  content: '""',
225
225
  margin: 'auto',
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.9.2
1
+ /** @license MUI v5.10.1
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.
@@ -40,6 +40,12 @@ function createTheme(options = {}, ...args) {
40
40
  typography: typographyInput = {}
41
41
  } = options,
42
42
  other = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);
43
+
44
+ if (options.vars) {
45
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
46
+ Please use another name.` : (0, _utils.formatMuiErrorMessage)(18));
47
+ }
48
+
43
49
  const palette = (0, _createPalette.default)(paletteInput);
44
50
  const systemTheme = (0, _system.createTheme)(options);
45
51
  let muiTheme = (0, _utils.deepmerge)(systemTheme, {
@@ -60,9 +60,13 @@ function useScrollTrigger(options = {}) {
60
60
 
61
61
  handleScroll(); // Re-evaluate trigger when dependencies change
62
62
 
63
- target.addEventListener('scroll', handleScroll);
63
+ target.addEventListener('scroll', handleScroll, {
64
+ passive: true
65
+ });
64
66
  return () => {
65
- target.removeEventListener('scroll', handleScroll);
67
+ target.removeEventListener('scroll', handleScroll, {
68
+ passive: true
69
+ });
66
70
  }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
67
71
  // eslint-disable-next-line react-hooks/exhaustive-deps
68
72
  }, [target, getTrigger, JSON.stringify(other)]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.9.2",
3
+ "version": "5.10.1",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -46,16 +46,17 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.17.2",
49
- "@mui/base": "5.0.0-alpha.91",
50
- "@mui/system": "^5.9.2",
49
+ "@mui/base": "5.0.0-alpha.93",
50
+ "@mui/core-downloads-tracker": "^5.10.1",
51
+ "@mui/system": "^5.10.1",
51
52
  "@mui/types": "^7.1.5",
52
- "@mui/utils": "^5.9.1",
53
+ "@mui/utils": "^5.9.3",
53
54
  "@types/react-transition-group": "^4.4.5",
54
55
  "clsx": "^1.2.1",
55
56
  "csstype": "^3.1.0",
56
57
  "prop-types": "^15.8.1",
57
58
  "react-is": "^18.2.0",
58
- "react-transition-group": "^4.4.2"
59
+ "react-transition-group": "^4.4.5"
59
60
  },
60
61
  "sideEffects": false,
61
62
  "publishConfig": {
@@ -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,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
3
4
  const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
4
5
  import { deepmerge } from '@mui/utils';
5
6
  import { generateUtilityClass } from '@mui/base';
@@ -20,6 +21,11 @@ function createTheme(options = {}, ...args) {
20
21
  } = options,
21
22
  other = _objectWithoutPropertiesLoose(options, _excluded);
22
23
 
24
+ if (options.vars) {
25
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
26
+ Please use another name.` : _formatMuiErrorMessage(18));
27
+ }
28
+
23
29
  const palette = createPalette(paletteInput);
24
30
  const systemTheme = systemCreateTheme(options);
25
31
  let muiTheme = deepmerge(systemTheme, {
@@ -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 {};