@mui/material 5.12.0 → 5.12.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 (198) 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/Autocomplete.js +2 -2
  9. package/Autocomplete/autocompleteClasses.d.ts +56 -56
  10. package/Avatar/avatarClasses.d.ts +20 -20
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/Backdrop/backdropClasses.d.ts +10 -10
  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 +4 -2
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +74 -0
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/checkboxClasses.d.ts +18 -18
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/containerClasses.d.ts +6 -6
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/drawerClasses.d.ts +30 -30
  45. package/Fab/fabClasses.d.ts +26 -26
  46. package/FilledInput/filledInputClasses.d.ts +42 -40
  47. package/FormControl/FormControlContext.d.ts +17 -17
  48. package/FormControl/formControlClasses.d.ts +14 -14
  49. package/FormControl/useFormControl.d.ts +2 -2
  50. package/FormControlLabel/FormControlLabel.d.ts +4 -0
  51. package/FormControlLabel/FormControlLabel.js +34 -14
  52. package/FormControlLabel/formControlLabelClasses.d.ts +24 -20
  53. package/FormControlLabel/formControlLabelClasses.js +1 -1
  54. package/FormGroup/formGroupClasses.d.ts +12 -12
  55. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  56. package/FormLabel/formLabelClasses.d.ts +22 -22
  57. package/Grid/gridClasses.d.ts +48 -48
  58. package/Icon/iconClasses.d.ts +24 -24
  59. package/IconButton/iconButtonClasses.d.ts +34 -34
  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/inputBaseClasses.d.ts +46 -46
  66. package/InputLabel/inputLabelClasses.d.ts +32 -32
  67. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  68. package/Link/getTextDecoration.d.ts +15 -15
  69. package/Link/linkClasses.d.ts +18 -18
  70. package/List/listClasses.d.ts +14 -14
  71. package/ListItem/listItemClasses.d.ts +30 -30
  72. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  73. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  74. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  75. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  76. package/ListItemText/listItemTextClasses.d.ts +18 -18
  77. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  78. package/Menu/menuClasses.d.ts +12 -12
  79. package/MenuItem/menuItemClasses.d.ts +20 -20
  80. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  81. package/NativeSelect/nativeSelectClasses.d.ts +34 -34
  82. package/OutlinedInput/outlinedInputClasses.d.ts +38 -36
  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 +55 -55
  88. package/Radio/radioClasses.d.ts +16 -16
  89. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  90. package/RadioGroup/useRadioGroup.d.ts +4 -4
  91. package/Rating/ratingClasses.d.ts +40 -40
  92. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  93. package/Select/selectClasses.d.ts +32 -32
  94. package/Skeleton/skeletonClasses.d.ts +26 -26
  95. package/Slider/SliderValueLabel.d.ts +15 -15
  96. package/Slider/SliderValueLabel.types.d.ts +24 -24
  97. package/Slider/sliderClasses.d.ts +58 -58
  98. package/Snackbar/snackbarClasses.d.ts +20 -20
  99. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  100. package/SpeedDial/speedDialClasses.d.ts +22 -22
  101. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  102. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  103. package/Stack/Stack.d.ts +1 -1
  104. package/Stack/Stack.js +1 -1
  105. package/Stack/stackClasses.d.ts +6 -6
  106. package/Step/StepContext.d.ts +20 -20
  107. package/Step/stepClasses.d.ts +16 -16
  108. package/StepButton/stepButtonClasses.d.ts +14 -14
  109. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  110. package/StepContent/stepContentClasses.d.ts +12 -12
  111. package/StepIcon/stepIconClasses.d.ts +16 -16
  112. package/StepLabel/stepLabelClasses.d.ts +28 -28
  113. package/Stepper/StepperContext.d.ts +18 -18
  114. package/Stepper/stepperClasses.d.ts +14 -14
  115. package/SvgIcon/svgIconClasses.d.ts +26 -26
  116. package/Switch/switchClasses.d.ts +32 -32
  117. package/Tab/tabClasses.d.ts +26 -26
  118. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  119. package/Table/tableClasses.d.ts +10 -10
  120. package/TableBody/tableBodyClasses.d.ts +8 -8
  121. package/TableCell/tableCellClasses.d.ts +32 -32
  122. package/TableContainer/tableContainerClasses.d.ts +8 -8
  123. package/TableFooter/tableFooterClasses.d.ts +8 -8
  124. package/TableHead/tableHeadClasses.d.ts +8 -8
  125. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  126. package/TableRow/tableRowClasses.d.ts +16 -16
  127. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  128. package/Tabs/ScrollbarSize.js +2 -2
  129. package/Tabs/tabsClasses.d.ts +32 -32
  130. package/TextField/textFieldClasses.d.ts +8 -8
  131. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  132. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  133. package/Toolbar/toolbarClasses.d.ts +14 -14
  134. package/Tooltip/tooltipClasses.d.ts +30 -30
  135. package/Typography/typographyClasses.d.ts +50 -50
  136. package/Unstable_Grid2/Grid2.d.ts +4 -4
  137. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  138. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  139. package/Unstable_Grid2/index.d.ts +4 -4
  140. package/className/index.d.ts +1 -1
  141. package/darkScrollbar/index.d.ts +28 -28
  142. package/generateUtilityClass/index.d.ts +2 -2
  143. package/generateUtilityClasses/index.d.ts +1 -1
  144. package/index.js +1 -1
  145. package/internal/switchBaseClasses.d.ts +12 -12
  146. package/legacy/Autocomplete/Autocomplete.js +2 -2
  147. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  148. package/legacy/Button/Button.js +4 -2
  149. package/legacy/FormControlLabel/FormControlLabel.js +35 -14
  150. package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
  151. package/legacy/Stack/Stack.js +1 -1
  152. package/legacy/Tabs/ScrollbarSize.js +2 -2
  153. package/legacy/index.js +1 -1
  154. package/legacy/styles/ThemeProvider.js +8 -1
  155. package/legacy/styles/experimental_extendTheme.js +5 -1
  156. package/locale/index.d.ts +76 -76
  157. package/modern/Autocomplete/Autocomplete.js +2 -2
  158. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  159. package/modern/Button/Button.js +100 -96
  160. package/modern/FormControlLabel/FormControlLabel.js +33 -13
  161. package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
  162. package/modern/Stack/Stack.js +1 -1
  163. package/modern/Tabs/ScrollbarSize.js +2 -2
  164. package/modern/index.js +1 -1
  165. package/modern/styles/ThemeProvider.js +8 -1
  166. package/modern/styles/experimental_extendTheme.js +5 -1
  167. package/node/Autocomplete/Autocomplete.js +2 -2
  168. package/node/BottomNavigation/BottomNavigation.js +0 -0
  169. package/node/Button/Button.js +4 -2
  170. package/node/FormControlLabel/FormControlLabel.js +35 -15
  171. package/node/FormControlLabel/formControlLabelClasses.js +1 -1
  172. package/node/Stack/Stack.js +1 -1
  173. package/node/Tabs/ScrollbarSize.js +1 -1
  174. package/node/index.js +1 -1
  175. package/node/styles/ThemeProvider.js +8 -1
  176. package/node/styles/experimental_extendTheme.js +5 -1
  177. package/package.json +4 -4
  178. package/styles/CssVarsProvider.d.ts +20 -20
  179. package/styles/ThemeProvider.js +8 -1
  180. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  181. package/styles/experimental_extendTheme.d.ts +7 -0
  182. package/styles/experimental_extendTheme.js +5 -1
  183. package/styles/getOverlayAlpha.d.ts +2 -2
  184. package/styles/identifier.d.ts +2 -2
  185. package/styles/shouldSkipGeneratingVar.d.ts +1 -1
  186. package/transitions/index.d.ts +1 -1
  187. package/transitions/transition.d.ts +13 -13
  188. package/transitions/utils.d.ts +23 -23
  189. package/types/OverridableComponentAugmentation.d.ts +31 -31
  190. package/umd/material-ui.development.js +95 -49
  191. package/umd/material-ui.production.min.js +15 -15
  192. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  193. package/useTouchRipple/index.d.ts +1 -1
  194. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  195. package/utils/getScrollbarSize.d.ts +2 -2
  196. package/utils/ownerDocument.d.ts +2 -2
  197. package/utils/ownerWindow.d.ts +2 -2
  198. package/utils/setRef.d.ts +2 -2
@@ -59,106 +59,110 @@ const ButtonRoot = styled(ButtonBase, {
59
59
  })(({
60
60
  theme,
61
61
  ownerState
62
- }) => _extends({}, theme.typography.button, {
63
- minWidth: 64,
64
- padding: '6px 16px',
65
- borderRadius: (theme.vars || theme).shape.borderRadius,
66
- transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
67
- duration: theme.transitions.duration.short
68
- }),
69
- '&:hover': _extends({
70
- textDecoration: 'none',
71
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
72
- // Reset on touch devices, it doesn't add specificity
73
- '@media (hover: none)': {
74
- backgroundColor: 'transparent'
75
- }
62
+ }) => {
63
+ const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
64
+ const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
65
+ return _extends({}, theme.typography.button, {
66
+ minWidth: 64,
67
+ padding: '6px 16px',
68
+ borderRadius: (theme.vars || theme).shape.borderRadius,
69
+ transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
70
+ duration: theme.transitions.duration.short
71
+ }),
72
+ '&:hover': _extends({
73
+ textDecoration: 'none',
74
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
75
+ // Reset on touch devices, it doesn't add specificity
76
+ '@media (hover: none)': {
77
+ backgroundColor: 'transparent'
78
+ }
79
+ }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
80
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
81
+ // Reset on touch devices, it doesn't add specificity
82
+ '@media (hover: none)': {
83
+ backgroundColor: 'transparent'
84
+ }
85
+ }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
86
+ border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
87
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
88
+ // Reset on touch devices, it doesn't add specificity
89
+ '@media (hover: none)': {
90
+ backgroundColor: 'transparent'
91
+ }
92
+ }, ownerState.variant === 'contained' && {
93
+ backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
94
+ boxShadow: (theme.vars || theme).shadows[4],
95
+ // Reset on touch devices, it doesn't add specificity
96
+ '@media (hover: none)': {
97
+ boxShadow: (theme.vars || theme).shadows[2],
98
+ backgroundColor: (theme.vars || theme).palette.grey[300]
99
+ }
100
+ }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
101
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
102
+ // Reset on touch devices, it doesn't add specificity
103
+ '@media (hover: none)': {
104
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
105
+ }
106
+ }),
107
+ '&:active': _extends({}, ownerState.variant === 'contained' && {
108
+ boxShadow: (theme.vars || theme).shadows[8]
109
+ }),
110
+ [`&.${buttonClasses.focusVisible}`]: _extends({}, ownerState.variant === 'contained' && {
111
+ boxShadow: (theme.vars || theme).shadows[6]
112
+ }),
113
+ [`&.${buttonClasses.disabled}`]: _extends({
114
+ color: (theme.vars || theme).palette.action.disabled
115
+ }, ownerState.variant === 'outlined' && {
116
+ border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
117
+ }, ownerState.variant === 'contained' && {
118
+ color: (theme.vars || theme).palette.action.disabled,
119
+ boxShadow: (theme.vars || theme).shadows[0],
120
+ backgroundColor: (theme.vars || theme).palette.action.disabledBackground
121
+ })
122
+ }, ownerState.variant === 'text' && {
123
+ padding: '6px 8px'
76
124
  }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
77
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
78
- // Reset on touch devices, it doesn't add specificity
79
- '@media (hover: none)': {
80
- backgroundColor: 'transparent'
81
- }
125
+ color: (theme.vars || theme).palette[ownerState.color].main
126
+ }, ownerState.variant === 'outlined' && {
127
+ padding: '5px 15px',
128
+ border: '1px solid currentColor'
82
129
  }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
83
- border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
84
- backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
85
- // Reset on touch devices, it doesn't add specificity
86
- '@media (hover: none)': {
87
- backgroundColor: 'transparent'
88
- }
130
+ color: (theme.vars || theme).palette[ownerState.color].main,
131
+ border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`
89
132
  }, ownerState.variant === 'contained' && {
90
- backgroundColor: (theme.vars || theme).palette.grey.A100,
91
- boxShadow: (theme.vars || theme).shadows[4],
92
- // Reset on touch devices, it doesn't add specificity
93
- '@media (hover: none)': {
94
- boxShadow: (theme.vars || theme).shadows[2],
95
- backgroundColor: (theme.vars || theme).palette.grey[300]
96
- }
133
+ color: theme.vars ?
134
+ // this is safe because grey does not change between default light/dark mode
135
+ theme.vars.palette.text.primary : theme.palette.getContrastText?.(theme.palette.grey[300]),
136
+ backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
137
+ boxShadow: (theme.vars || theme).shadows[2]
97
138
  }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
98
- backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
99
- // Reset on touch devices, it doesn't add specificity
100
- '@media (hover: none)': {
101
- backgroundColor: (theme.vars || theme).palette[ownerState.color].main
102
- }
103
- }),
104
- '&:active': _extends({}, ownerState.variant === 'contained' && {
105
- boxShadow: (theme.vars || theme).shadows[8]
106
- }),
107
- [`&.${buttonClasses.focusVisible}`]: _extends({}, ownerState.variant === 'contained' && {
108
- boxShadow: (theme.vars || theme).shadows[6]
109
- }),
110
- [`&.${buttonClasses.disabled}`]: _extends({
111
- color: (theme.vars || theme).palette.action.disabled
112
- }, ownerState.variant === 'outlined' && {
113
- border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
114
- }, ownerState.variant === 'contained' && {
115
- color: (theme.vars || theme).palette.action.disabled,
116
- boxShadow: (theme.vars || theme).shadows[0],
117
- backgroundColor: (theme.vars || theme).palette.action.disabledBackground
118
- })
119
- }, ownerState.variant === 'text' && {
120
- padding: '6px 8px'
121
- }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
122
- color: (theme.vars || theme).palette[ownerState.color].main
123
- }, ownerState.variant === 'outlined' && {
124
- padding: '5px 15px',
125
- border: '1px solid currentColor'
126
- }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
127
- color: (theme.vars || theme).palette[ownerState.color].main,
128
- border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`
129
- }, ownerState.variant === 'contained' && {
130
- color: theme.vars ?
131
- // this is safe because grey does not change between default light/dark mode
132
- theme.vars.palette.text.primary : theme.palette.getContrastText?.(theme.palette.grey[300]),
133
- backgroundColor: (theme.vars || theme).palette.grey[300],
134
- boxShadow: (theme.vars || theme).shadows[2]
135
- }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
136
- color: (theme.vars || theme).palette[ownerState.color].contrastText,
137
- backgroundColor: (theme.vars || theme).palette[ownerState.color].main
138
- }, ownerState.color === 'inherit' && {
139
- color: 'inherit',
140
- borderColor: 'currentColor'
141
- }, ownerState.size === 'small' && ownerState.variant === 'text' && {
142
- padding: '4px 5px',
143
- fontSize: theme.typography.pxToRem(13)
144
- }, ownerState.size === 'large' && ownerState.variant === 'text' && {
145
- padding: '8px 11px',
146
- fontSize: theme.typography.pxToRem(15)
147
- }, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
148
- padding: '3px 9px',
149
- fontSize: theme.typography.pxToRem(13)
150
- }, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
151
- padding: '7px 21px',
152
- fontSize: theme.typography.pxToRem(15)
153
- }, ownerState.size === 'small' && ownerState.variant === 'contained' && {
154
- padding: '4px 10px',
155
- fontSize: theme.typography.pxToRem(13)
156
- }, ownerState.size === 'large' && ownerState.variant === 'contained' && {
157
- padding: '8px 22px',
158
- fontSize: theme.typography.pxToRem(15)
159
- }, ownerState.fullWidth && {
160
- width: '100%'
161
- }), ({
139
+ color: (theme.vars || theme).palette[ownerState.color].contrastText,
140
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
141
+ }, ownerState.color === 'inherit' && {
142
+ color: 'inherit',
143
+ borderColor: 'currentColor'
144
+ }, ownerState.size === 'small' && ownerState.variant === 'text' && {
145
+ padding: '4px 5px',
146
+ fontSize: theme.typography.pxToRem(13)
147
+ }, ownerState.size === 'large' && ownerState.variant === 'text' && {
148
+ padding: '8px 11px',
149
+ fontSize: theme.typography.pxToRem(15)
150
+ }, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
151
+ padding: '3px 9px',
152
+ fontSize: theme.typography.pxToRem(13)
153
+ }, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
154
+ padding: '7px 21px',
155
+ fontSize: theme.typography.pxToRem(15)
156
+ }, ownerState.size === 'small' && ownerState.variant === 'contained' && {
157
+ padding: '4px 10px',
158
+ fontSize: theme.typography.pxToRem(13)
159
+ }, ownerState.size === 'large' && ownerState.variant === 'contained' && {
160
+ padding: '8px 22px',
161
+ fontSize: theme.typography.pxToRem(15)
162
+ }, ownerState.fullWidth && {
163
+ width: '100%'
164
+ });
165
+ }, ({
162
166
  ownerState
163
167
  }) => ownerState.disableElevation && {
164
168
  boxShadow: 'none',
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"];
3
+ const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -20,11 +20,13 @@ const useUtilityClasses = ownerState => {
20
20
  classes,
21
21
  disabled,
22
22
  labelPlacement,
23
- error
23
+ error,
24
+ required
24
25
  } = ownerState;
25
26
  const slots = {
26
- root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error'],
27
- label: ['label', disabled && 'disabled']
27
+ root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error', required && 'required'],
28
+ label: ['label', disabled && 'disabled'],
29
+ asterisk: ['asterisk', error && 'error']
28
30
  };
29
31
  return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
30
32
  };
@@ -73,6 +75,17 @@ export const FormControlLabelRoot = styled('label', {
73
75
  }
74
76
  }
75
77
  }));
78
+ const AsteriskComponent = styled('span', {
79
+ name: 'MuiFormControlLabel',
80
+ slot: 'Asterisk',
81
+ overridesResolver: (props, styles) => styles.asterisk
82
+ })(({
83
+ theme
84
+ }) => ({
85
+ [`&.${formControlLabelClasses.error}`]: {
86
+ color: (theme.vars || theme).palette.error.main
87
+ }
88
+ }));
76
89
 
77
90
  /**
78
91
  * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.
@@ -91,19 +104,16 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
91
104
  disableTypography,
92
105
  label: labelProp,
93
106
  labelPlacement = 'end',
107
+ required: requiredProp,
94
108
  slotProps = {}
95
109
  } = props,
96
110
  other = _objectWithoutPropertiesLoose(props, _excluded);
97
111
  const muiFormControl = useFormControl();
98
- let disabled = disabledProp;
99
- if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {
100
- disabled = control.props.disabled;
101
- }
102
- if (typeof disabled === 'undefined' && muiFormControl) {
103
- disabled = muiFormControl.disabled;
104
- }
112
+ const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;
113
+ const required = requiredProp ?? control.props.required;
105
114
  const controlProps = {
106
- disabled
115
+ disabled,
116
+ required
107
117
  };
108
118
  ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {
109
119
  if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {
@@ -118,6 +128,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
118
128
  const ownerState = _extends({}, props, {
119
129
  disabled,
120
130
  labelPlacement,
131
+ required,
121
132
  error: fcs.error
122
133
  });
123
134
  const classes = useUtilityClasses(ownerState);
@@ -136,7 +147,12 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
136
147
  ownerState: ownerState,
137
148
  ref: ref
138
149
  }, other, {
139
- children: [/*#__PURE__*/React.cloneElement(control, controlProps), label]
150
+ children: [/*#__PURE__*/React.cloneElement(control, controlProps), label, required && /*#__PURE__*/_jsxs(AsteriskComponent, {
151
+ ownerState: ownerState,
152
+ "aria-hidden": true,
153
+ className: classes.asterisk,
154
+ children: ["\u2009", '*']
155
+ })]
140
156
  }));
141
157
  });
142
158
  process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-proptypes */ = {
@@ -199,6 +215,10 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
199
215
  * You can pull out the new checked state by accessing `event.target.checked` (boolean).
200
216
  */
201
217
  onChange: PropTypes.func,
218
+ /**
219
+ * If `true`, the label will indicate that the `input` is required.
220
+ */
221
+ required: PropTypes.bool,
202
222
  /**
203
223
  * The props used for each slot inside.
204
224
  * @default {}
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
3
3
  export function getFormControlLabelUtilityClasses(slot) {
4
4
  return generateUtilityClass('MuiFormControlLabel', slot);
5
5
  }
6
- const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
6
+ const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);
7
7
  export default formControlLabelClasses;
@@ -49,7 +49,7 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
49
49
  /**
50
50
  * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
51
51
  *
52
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack#limitations),
52
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
53
53
  * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
54
54
  *
55
55
  * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
@@ -4,7 +4,7 @@ const _excluded = ["onChange"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import debounce from '../utils/debounce';
7
- import { ownerWindow } from '../utils';
7
+ import { ownerWindow, unstable_useEnhancedEffect as useEnhancedEffect } from '../utils';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const styles = {
10
10
  width: 99,
@@ -29,7 +29,7 @@ export default function ScrollbarSize(props) {
29
29
  const setMeasurements = () => {
30
30
  scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
31
31
  };
32
- React.useEffect(() => {
32
+ useEnhancedEffect(() => {
33
33
  const handleResize = debounce(() => {
34
34
  const prevHeight = scrollbarHeight.current;
35
35
  setMeasurements();
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.12.0
2
+ * @mui/material v5.12.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -18,5 +18,12 @@ export default function ThemeProvider(_ref) {
18
18
  }));
19
19
  }
20
20
  process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
21
- theme: PropTypes.object
21
+ /**
22
+ * Your component tree.
23
+ */
24
+ children: PropTypes.node,
25
+ /**
26
+ * A theme object. You can provide a function to extend the outer theme.
27
+ */
28
+ theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired
22
29
  } : void 0;
@@ -109,7 +109,7 @@ export default function extendTheme(options = {}, ...args) {
109
109
  }
110
110
 
111
111
  // assign component variables
112
- assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
112
+ assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
113
113
  if (key === 'light') {
114
114
  setColor(palette.Alert, 'errorColor', safeDarken(palette.error.light, 0.6));
115
115
  setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));
@@ -133,6 +133,8 @@ export default function extendTheme(options = {}, ...args) {
133
133
  setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));
134
134
  setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));
135
135
  setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));
136
+ setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));
137
+ setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));
136
138
  setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));
137
139
  setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));
138
140
  setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));
@@ -193,6 +195,8 @@ export default function extendTheme(options = {}, ...args) {
193
195
  setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode
194
196
  setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode
195
197
  setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));
198
+ setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));
199
+ setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));
196
200
  setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));
197
201
  setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));
198
202
  setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));
@@ -152,7 +152,7 @@ const AutocompleteRoot = (0, _styled.default)('div', {
152
152
  paddingRight: 52 + 4 + 9
153
153
  },
154
154
  [`& .${_autocompleteClasses.default.input}`]: {
155
- padding: '7.5px 4px 7.5px 6px'
155
+ padding: '7.5px 4px 7.5px 5px'
156
156
  },
157
157
  [`& .${_autocompleteClasses.default.endAdornment}`]: {
158
158
  right: 9
@@ -165,7 +165,7 @@ const AutocompleteRoot = (0, _styled.default)('div', {
165
165
  paddingBottom: 6,
166
166
  paddingLeft: 6,
167
167
  [`& .${_autocompleteClasses.default.input}`]: {
168
- padding: '2.5px 4px 2.5px 6px'
168
+ padding: '2.5px 4px 2.5px 8px'
169
169
  }
170
170
  },
171
171
  [`& .${_filledInputClasses.default.root}`]: {
File without changes
@@ -69,6 +69,8 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
69
69
  ownerState
70
70
  }) => {
71
71
  var _theme$palette$getCon, _theme$palette;
72
+ const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
73
+ const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
72
74
  return (0, _extends2.default)({}, theme.typography.button, {
73
75
  minWidth: 64,
74
76
  padding: '6px 16px',
@@ -97,7 +99,7 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
97
99
  backgroundColor: 'transparent'
98
100
  }
99
101
  }, ownerState.variant === 'contained' && {
100
- backgroundColor: (theme.vars || theme).palette.grey.A100,
102
+ backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
101
103
  boxShadow: (theme.vars || theme).shadows[4],
102
104
  // Reset on touch devices, it doesn't add specificity
103
105
  '@media (hover: none)': {
@@ -140,7 +142,7 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
140
142
  color: theme.vars ?
141
143
  // this is safe because grey does not change between default light/dark mode
142
144
  theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
143
- backgroundColor: (theme.vars || theme).palette.grey[300],
145
+ backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
144
146
  boxShadow: (theme.vars || theme).shadows[2]
145
147
  }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
146
148
  color: (theme.vars || theme).palette[ownerState.color].contrastText,
@@ -20,7 +20,7 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
20
20
  var _formControlLabelClasses = _interopRequireWildcard(require("./formControlLabelClasses"));
21
21
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
- const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "slotProps", "value"];
23
+ const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
26
  const useUtilityClasses = ownerState => {
@@ -28,11 +28,13 @@ const useUtilityClasses = ownerState => {
28
28
  classes,
29
29
  disabled,
30
30
  labelPlacement,
31
- error
31
+ error,
32
+ required
32
33
  } = ownerState;
33
34
  const slots = {
34
- root: ['root', disabled && 'disabled', `labelPlacement${(0, _capitalize.default)(labelPlacement)}`, error && 'error'],
35
- label: ['label', disabled && 'disabled']
35
+ root: ['root', disabled && 'disabled', `labelPlacement${(0, _capitalize.default)(labelPlacement)}`, error && 'error', required && 'required'],
36
+ label: ['label', disabled && 'disabled'],
37
+ asterisk: ['asterisk', error && 'error']
36
38
  };
37
39
  return (0, _base.unstable_composeClasses)(slots, _formControlLabelClasses.getFormControlLabelUtilityClasses, classes);
38
40
  };
@@ -81,14 +83,25 @@ const FormControlLabelRoot = (0, _styled.default)('label', {
81
83
  }
82
84
  }
83
85
  }));
86
+ exports.FormControlLabelRoot = FormControlLabelRoot;
87
+ const AsteriskComponent = (0, _styled.default)('span', {
88
+ name: 'MuiFormControlLabel',
89
+ slot: 'Asterisk',
90
+ overridesResolver: (props, styles) => styles.asterisk
91
+ })(({
92
+ theme
93
+ }) => ({
94
+ [`&.${_formControlLabelClasses.default.error}`]: {
95
+ color: (theme.vars || theme).palette.error.main
96
+ }
97
+ }));
84
98
 
85
99
  /**
86
100
  * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.
87
101
  * Use this component if you want to display an extra label.
88
102
  */
89
- exports.FormControlLabelRoot = FormControlLabelRoot;
90
103
  const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {
91
- var _slotProps$typography;
104
+ var _ref, _slotProps$typography;
92
105
  const props = (0, _useThemeProps.default)({
93
106
  props: inProps,
94
107
  name: 'MuiFormControlLabel'
@@ -101,19 +114,16 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
101
114
  disableTypography,
102
115
  label: labelProp,
103
116
  labelPlacement = 'end',
117
+ required: requiredProp,
104
118
  slotProps = {}
105
119
  } = props,
106
120
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
107
121
  const muiFormControl = (0, _FormControl.useFormControl)();
108
- let disabled = disabledProp;
109
- if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {
110
- disabled = control.props.disabled;
111
- }
112
- if (typeof disabled === 'undefined' && muiFormControl) {
113
- disabled = muiFormControl.disabled;
114
- }
122
+ const disabled = (_ref = disabledProp != null ? disabledProp : control.props.disabled) != null ? _ref : muiFormControl == null ? void 0 : muiFormControl.disabled;
123
+ const required = requiredProp != null ? requiredProp : control.props.required;
115
124
  const controlProps = {
116
- disabled
125
+ disabled,
126
+ required
117
127
  };
118
128
  ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {
119
129
  if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {
@@ -128,6 +138,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
128
138
  const ownerState = (0, _extends2.default)({}, props, {
129
139
  disabled,
130
140
  labelPlacement,
141
+ required,
131
142
  error: fcs.error
132
143
  });
133
144
  const classes = useUtilityClasses(ownerState);
@@ -146,7 +157,12 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
146
157
  ownerState: ownerState,
147
158
  ref: ref
148
159
  }, other, {
149
- children: [/*#__PURE__*/React.cloneElement(control, controlProps), label]
160
+ children: [/*#__PURE__*/React.cloneElement(control, controlProps), label, required && /*#__PURE__*/(0, _jsxRuntime.jsxs)(AsteriskComponent, {
161
+ ownerState: ownerState,
162
+ "aria-hidden": true,
163
+ className: classes.asterisk,
164
+ children: ["\u2009", '*']
165
+ })]
150
166
  }));
151
167
  });
152
168
  process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-proptypes */ = {
@@ -209,6 +225,10 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
209
225
  * You can pull out the new checked state by accessing `event.target.checked` (boolean).
210
226
  */
211
227
  onChange: _propTypes.default.func,
228
+ /**
229
+ * If `true`, the label will indicate that the `input` is required.
230
+ */
231
+ required: _propTypes.default.bool,
212
232
  /**
213
233
  * The props used for each slot inside.
214
234
  * @default {}
@@ -11,6 +11,6 @@ var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityCl
11
11
  function getFormControlLabelUtilityClasses(slot) {
12
12
  return (0, _generateUtilityClass.default)('MuiFormControlLabel', slot);
13
13
  }
14
- const formControlLabelClasses = (0, _utils.unstable_generateUtilityClasses)('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
14
+ const formControlLabelClasses = (0, _utils.unstable_generateUtilityClasses)('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);
15
15
  var _default = formControlLabelClasses;
16
16
  exports.default = _default;
@@ -56,7 +56,7 @@ process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ =
56
56
  /**
57
57
  * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
58
58
  *
59
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack#limitations),
59
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
60
60
  * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
61
61
  *
62
62
  * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
@@ -38,7 +38,7 @@ function ScrollbarSize(props) {
38
38
  const setMeasurements = () => {
39
39
  scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
40
40
  };
41
- React.useEffect(() => {
41
+ (0, _utils.unstable_useEnhancedEffect)(() => {
42
42
  const handleResize = (0, _debounce.default)(() => {
43
43
  const prevHeight = scrollbarHeight.current;
44
44
  setMeasurements();
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.12.0
2
+ * @mui/material v5.12.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -27,5 +27,12 @@ function ThemeProvider(_ref) {
27
27
  }));
28
28
  }
29
29
  process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
30
- theme: _propTypes.default.object
30
+ /**
31
+ * Your component tree.
32
+ */
33
+ children: _propTypes.default.node,
34
+ /**
35
+ * A theme object. You can provide a function to extend the outer theme.
36
+ */
37
+ theme: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]).isRequired
31
38
  } : void 0;