@mui/material 5.11.16 → 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 (259) 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/Box/Box.js +2 -0
  18. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  19. package/Button/Button.js +4 -2
  20. package/Button/buttonClasses.d.ts +100 -100
  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 +147 -22
  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/chipClasses.d.ts +96 -96
  34. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  35. package/ClickAwayListener/index.d.ts +2 -2
  36. package/Collapse/collapseClasses.d.ts +18 -18
  37. package/Container/containerClasses.d.ts +6 -6
  38. package/Dialog/DialogContext.d.ts +6 -6
  39. package/Dialog/dialogClasses.d.ts +36 -36
  40. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  41. package/DialogContent/dialogContentClasses.d.ts +10 -10
  42. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  43. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  44. package/Divider/dividerClasses.d.ts +34 -34
  45. package/Drawer/drawerClasses.d.ts +30 -30
  46. package/Fab/fabClasses.d.ts +26 -26
  47. package/FilledInput/filledInputClasses.d.ts +42 -40
  48. package/FormControl/FormControlContext.d.ts +17 -17
  49. package/FormControl/formControlClasses.d.ts +14 -14
  50. package/FormControl/useFormControl.d.ts +2 -2
  51. package/FormControlLabel/FormControlLabel.d.ts +4 -0
  52. package/FormControlLabel/FormControlLabel.js +34 -14
  53. package/FormControlLabel/formControlLabelClasses.d.ts +24 -20
  54. package/FormControlLabel/formControlLabelClasses.js +1 -1
  55. package/FormGroup/formGroupClasses.d.ts +12 -12
  56. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  57. package/FormLabel/formLabelClasses.d.ts +22 -22
  58. package/GlobalStyles/GlobalStyles.js +4 -4
  59. package/Grid/gridClasses.d.ts +48 -48
  60. package/Icon/iconClasses.d.ts +24 -24
  61. package/IconButton/iconButtonClasses.d.ts +34 -34
  62. package/ImageList/imageListClasses.d.ts +16 -16
  63. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  64. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  65. package/Input/inputClasses.d.ts +34 -34
  66. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  67. package/InputBase/inputBaseClasses.d.ts +46 -46
  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/Menu.js +1 -1
  81. package/Menu/menuClasses.d.ts +12 -12
  82. package/MenuItem/menuItemClasses.d.ts +20 -20
  83. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  84. package/NativeSelect/nativeSelectClasses.d.ts +34 -34
  85. package/OutlinedInput/outlinedInputClasses.d.ts +38 -36
  86. package/OverridableComponent.d.ts +1 -1
  87. package/Pagination/paginationClasses.d.ts +14 -14
  88. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  89. package/Paper/paperClasses.d.ts +39 -39
  90. package/Popover/popoverClasses.d.ts +10 -10
  91. package/Popper/Popper.d.ts +55 -55
  92. package/Popper/Popper.js +0 -4
  93. package/README.md +5 -5
  94. package/Radio/radioClasses.d.ts +16 -16
  95. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  96. package/RadioGroup/useRadioGroup.d.ts +4 -4
  97. package/Rating/ratingClasses.d.ts +40 -40
  98. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  99. package/Select/Select.d.ts +1 -1
  100. package/Select/Select.js +1 -1
  101. package/Select/selectClasses.d.ts +32 -32
  102. package/Skeleton/skeletonClasses.d.ts +26 -26
  103. package/Slider/SliderValueLabel.d.ts +15 -15
  104. package/Slider/SliderValueLabel.types.d.ts +24 -24
  105. package/Slider/sliderClasses.d.ts +58 -58
  106. package/Snackbar/snackbarClasses.d.ts +20 -20
  107. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  108. package/SpeedDial/speedDialClasses.d.ts +22 -22
  109. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  110. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  111. package/Stack/Stack.d.ts +1 -1
  112. package/Stack/Stack.js +1 -1
  113. package/Stack/stackClasses.d.ts +6 -6
  114. package/Step/StepContext.d.ts +20 -20
  115. package/Step/stepClasses.d.ts +16 -16
  116. package/StepButton/stepButtonClasses.d.ts +14 -14
  117. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  118. package/StepContent/stepContentClasses.d.ts +12 -12
  119. package/StepIcon/stepIconClasses.d.ts +16 -16
  120. package/StepLabel/stepLabelClasses.d.ts +28 -28
  121. package/Stepper/StepperContext.d.ts +18 -18
  122. package/Stepper/stepperClasses.d.ts +14 -14
  123. package/SvgIcon/svgIconClasses.d.ts +26 -26
  124. package/Switch/switchClasses.d.ts +32 -32
  125. package/Tab/tabClasses.d.ts +26 -26
  126. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  127. package/Table/tableClasses.d.ts +10 -10
  128. package/TableBody/tableBodyClasses.d.ts +8 -8
  129. package/TableCell/tableCellClasses.d.ts +32 -32
  130. package/TableContainer/tableContainerClasses.d.ts +8 -8
  131. package/TableFooter/tableFooterClasses.d.ts +8 -8
  132. package/TableHead/tableHeadClasses.d.ts +8 -8
  133. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  134. package/TableRow/tableRowClasses.d.ts +16 -16
  135. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  136. package/Tabs/ScrollbarSize.js +2 -2
  137. package/Tabs/Tabs.js +1 -1
  138. package/Tabs/tabsClasses.d.ts +32 -32
  139. package/TextField/textFieldClasses.d.ts +8 -8
  140. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  141. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  142. package/Toolbar/Toolbar.d.ts +1 -1
  143. package/Toolbar/Toolbar.js +1 -1
  144. package/Toolbar/toolbarClasses.d.ts +14 -14
  145. package/Tooltip/tooltipClasses.d.ts +30 -30
  146. package/Typography/typographyClasses.d.ts +50 -50
  147. package/Unstable_Grid2/Grid2.d.ts +4 -4
  148. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  149. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  150. package/Unstable_Grid2/index.d.ts +4 -4
  151. package/className/index.d.ts +1 -1
  152. package/darkScrollbar/index.d.ts +28 -28
  153. package/darkScrollbar/index.js +1 -1
  154. package/generateUtilityClass/index.d.ts +2 -2
  155. package/generateUtilityClasses/index.d.ts +1 -1
  156. package/index.js +1 -1
  157. package/internal/switchBaseClasses.d.ts +12 -12
  158. package/legacy/Autocomplete/Autocomplete.js +2 -2
  159. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  160. package/legacy/Box/Box.js +2 -0
  161. package/legacy/Button/Button.js +4 -2
  162. package/legacy/FormControlLabel/FormControlLabel.js +35 -14
  163. package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
  164. package/legacy/GlobalStyles/GlobalStyles.js +4 -4
  165. package/legacy/Menu/Menu.js +1 -1
  166. package/legacy/Popper/Popper.js +0 -4
  167. package/legacy/Select/Select.js +1 -1
  168. package/legacy/Stack/Stack.js +1 -1
  169. package/legacy/Tabs/ScrollbarSize.js +2 -2
  170. package/legacy/Tabs/Tabs.js +1 -1
  171. package/legacy/Toolbar/Toolbar.js +1 -1
  172. package/legacy/darkScrollbar/index.js +1 -1
  173. package/legacy/index.js +1 -1
  174. package/legacy/styles/CssVarsProvider.js +2 -0
  175. package/legacy/styles/ThemeProvider.js +26 -1
  176. package/legacy/styles/experimental_extendTheme.js +5 -1
  177. package/legacy/styles/identifier.js +1 -0
  178. package/legacy/styles/index.js +1 -0
  179. package/legacy/styles/styled.js +2 -0
  180. package/legacy/styles/useTheme.js +2 -1
  181. package/legacy/styles/useThemeProps.js +3 -1
  182. package/locale/index.d.ts +76 -76
  183. package/modern/Autocomplete/Autocomplete.js +2 -2
  184. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  185. package/modern/Box/Box.js +2 -0
  186. package/modern/Button/Button.js +100 -96
  187. package/modern/FormControlLabel/FormControlLabel.js +33 -13
  188. package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
  189. package/modern/GlobalStyles/GlobalStyles.js +4 -4
  190. package/modern/Menu/Menu.js +1 -1
  191. package/modern/Popper/Popper.js +0 -4
  192. package/modern/Select/Select.js +1 -1
  193. package/modern/Stack/Stack.js +1 -1
  194. package/modern/Tabs/ScrollbarSize.js +2 -2
  195. package/modern/Tabs/Tabs.js +1 -1
  196. package/modern/Toolbar/Toolbar.js +1 -1
  197. package/modern/darkScrollbar/index.js +1 -1
  198. package/modern/index.js +1 -1
  199. package/modern/styles/CssVarsProvider.js +2 -0
  200. package/modern/styles/ThemeProvider.js +29 -1
  201. package/modern/styles/experimental_extendTheme.js +5 -1
  202. package/modern/styles/identifier.js +1 -0
  203. package/modern/styles/index.js +1 -0
  204. package/modern/styles/styled.js +2 -0
  205. package/modern/styles/useTheme.js +2 -1
  206. package/modern/styles/useThemeProps.js +3 -1
  207. package/node/Autocomplete/Autocomplete.js +2 -2
  208. package/node/BottomNavigation/BottomNavigation.js +0 -0
  209. package/node/Box/Box.js +2 -0
  210. package/node/Button/Button.js +4 -2
  211. package/node/FormControlLabel/FormControlLabel.js +35 -15
  212. package/node/FormControlLabel/formControlLabelClasses.js +1 -1
  213. package/node/GlobalStyles/GlobalStyles.js +4 -4
  214. package/node/Menu/Menu.js +1 -1
  215. package/node/Popper/Popper.js +0 -4
  216. package/node/Select/Select.js +1 -1
  217. package/node/Stack/Stack.js +1 -1
  218. package/node/Tabs/ScrollbarSize.js +1 -1
  219. package/node/Tabs/Tabs.js +1 -1
  220. package/node/Toolbar/Toolbar.js +1 -1
  221. package/node/darkScrollbar/index.js +1 -1
  222. package/node/index.js +1 -1
  223. package/node/styles/CssVarsProvider.js +2 -0
  224. package/node/styles/ThemeProvider.js +33 -7
  225. package/node/styles/experimental_extendTheme.js +5 -1
  226. package/node/styles/identifier.js +8 -0
  227. package/node/styles/index.js +8 -0
  228. package/node/styles/styled.js +2 -0
  229. package/node/styles/useTheme.js +2 -1
  230. package/node/styles/useThemeProps.js +3 -1
  231. package/package.json +6 -6
  232. package/styles/CssVarsProvider.d.ts +20 -15
  233. package/styles/CssVarsProvider.js +2 -0
  234. package/styles/ThemeProvider.js +29 -1
  235. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  236. package/styles/experimental_extendTheme.d.ts +8 -1
  237. package/styles/experimental_extendTheme.js +5 -1
  238. package/styles/getOverlayAlpha.d.ts +2 -2
  239. package/styles/identifier.d.ts +2 -0
  240. package/styles/identifier.js +1 -0
  241. package/styles/index.d.ts +1 -0
  242. package/styles/index.js +1 -0
  243. package/styles/shouldSkipGeneratingVar.d.ts +1 -1
  244. package/styles/styled.js +2 -0
  245. package/styles/useTheme.js +2 -1
  246. package/styles/useThemeProps.js +3 -1
  247. package/transitions/index.d.ts +1 -1
  248. package/transitions/transition.d.ts +13 -13
  249. package/transitions/utils.d.ts +23 -23
  250. package/types/OverridableComponentAugmentation.d.ts +31 -31
  251. package/umd/material-ui.development.js +672 -535
  252. package/umd/material-ui.production.min.js +21 -21
  253. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  254. package/useTouchRipple/index.d.ts +1 -1
  255. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  256. package/utils/getScrollbarSize.d.ts +2 -2
  257. package/utils/ownerDocument.d.ts +2 -2
  258. package/utils/ownerWindow.d.ts +2 -2
  259. 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;
@@ -3,10 +3,12 @@ import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { GlobalStyles as SystemGlobalStyles } from '@mui/system';
5
5
  import defaultTheme from '../styles/defaultTheme';
6
+ import THEME_ID from '../styles/identifier';
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  function GlobalStyles(props) {
8
9
  return /*#__PURE__*/_jsx(SystemGlobalStyles, _extends({}, props, {
9
- defaultTheme: defaultTheme
10
+ defaultTheme: defaultTheme,
11
+ themeId: THEME_ID
10
12
  }));
11
13
  }
12
14
  process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptypes */ = {
@@ -17,8 +19,6 @@ process.env.NODE_ENV !== "production" ? GlobalStyles.propTypes /* remove-proptyp
17
19
  /**
18
20
  * The styles you want to apply globally.
19
21
  */
20
- styles: PropTypes.oneOfType([PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.shape({
21
- __emotion_styles: PropTypes.any.isRequired
22
- }), PropTypes.string, PropTypes.bool])
22
+ styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])
23
23
  } : void 0;
24
24
  export default GlobalStyles;
@@ -47,7 +47,7 @@ const MenuPaper = styled(Paper, {
47
47
  overridesResolver: (props, styles) => styles.paper
48
48
  })({
49
49
  // specZ: The maximum height of a simple menu should be one or more rows less than the view
50
- // height. This ensures a tapable area outside of the simple menu with which to dismiss
50
+ // height. This ensures a tappable area outside of the simple menu with which to dismiss
51
51
  // the menu.
52
52
  maxHeight: 'calc(100% - 96px)',
53
53
  // Add iOS momentum scrolling for iOS < 13.0
@@ -129,10 +129,6 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
129
129
  * If `true`, the component is shown.
130
130
  */
131
131
  open: PropTypes.bool.isRequired,
132
- /**
133
- * @ignore
134
- */
135
- ownerState: PropTypes.any,
136
132
  /**
137
133
  * Popper placement.
138
134
  * @default 'bottom'
@@ -228,7 +228,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes /* remove-proptypes */
228
228
  onChange: PropTypes.func,
229
229
  /**
230
230
  * Callback fired when the component requests to be closed.
231
- * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
231
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
232
232
  *
233
233
  * @param {object} event The event source of the callback.
234
234
  */
@@ -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();
@@ -418,7 +418,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
418
418
  moveTabsScroll(getScrollSize());
419
419
  };
420
420
 
421
- // TODO Remove <ScrollbarSize /> as browser support for hidding the scrollbar
421
+ // TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
422
422
  // with CSS improves.
423
423
  const handleScrollbarSizeChange = React.useCallback(scrollbarWidth => {
424
424
  setScrollerStyle({
@@ -81,7 +81,7 @@ process.env.NODE_ENV !== "production" ? Toolbar.propTypes /* remove-proptypes */
81
81
  // ----------------------------------------------------------------------
82
82
  /**
83
83
  * The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
84
- * The Toolbar is a flex container, allowing flex item properites to be used to lay out the children.
84
+ * The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
85
85
  */
86
86
  children: PropTypes.node,
87
87
  /**
@@ -1,4 +1,4 @@
1
- // track, thumb and active are derieved from macOS 10.15.7
1
+ // track, thumb and active are derived from macOS 10.15.7
2
2
  const scrollBar = {
3
3
  track: '#2b2b2b',
4
4
  thumb: '#6b6b6b',
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.11.16
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
@@ -3,12 +3,14 @@ import { unstable_createCssVarsProvider as createCssVarsProvider, unstable_style
3
3
  import experimental_extendTheme from './experimental_extendTheme';
4
4
  import createTypography from './createTypography';
5
5
  import excludeVariablesFromRoot from './excludeVariablesFromRoot';
6
+ import THEME_ID from './identifier';
6
7
  const defaultTheme = experimental_extendTheme();
7
8
  const {
8
9
  CssVarsProvider,
9
10
  useColorScheme,
10
11
  getInitColorSchemeScript
11
12
  } = createCssVarsProvider({
13
+ themeId: THEME_ID,
12
14
  theme: defaultTheme,
13
15
  attribute: 'data-mui-color-scheme',
14
16
  modeStorageKey: 'mui-mode',
@@ -1 +1,29 @@
1
- export { ThemeProvider as default } from '@mui/system';
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["theme"];
4
+ import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import { ThemeProvider as SystemThemeProvider } from '@mui/system';
7
+ import THEME_ID from './identifier';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ export default function ThemeProvider(_ref) {
10
+ let {
11
+ theme: themeInput
12
+ } = _ref,
13
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
14
+ const scopedTheme = themeInput[THEME_ID];
15
+ return /*#__PURE__*/_jsx(SystemThemeProvider, _extends({}, props, {
16
+ themeId: scopedTheme ? THEME_ID : undefined,
17
+ theme: scopedTheme || themeInput
18
+ }));
19
+ }
20
+ process.env.NODE_ENV !== "production" ? ThemeProvider.propTypes = {
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
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'));
@@ -0,0 +1 @@
1
+ export default '$$material';
@@ -1,4 +1,5 @@
1
1
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
2
+ export { default as THEME_ID } from './identifier';
2
3
  export { default as adaptV4Theme } from './adaptV4Theme';
3
4
  export { hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, alpha, darken, lighten, css, keyframes } from '@mui/system';
4
5
  // TODO: Remove this function in v6.
@@ -1,8 +1,10 @@
1
1
  import { createStyled, shouldForwardProp } from '@mui/system';
2
2
  import defaultTheme from './defaultTheme';
3
+ import THEME_ID from './identifier';
3
4
  export const rootShouldForwardProp = prop => shouldForwardProp(prop) && prop !== 'classes';
4
5
  export const slotShouldForwardProp = shouldForwardProp;
5
6
  const styled = createStyled({
7
+ themeId: THEME_ID,
6
8
  defaultTheme,
7
9
  rootShouldForwardProp
8
10
  });
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { useTheme as useThemeSystem } from '@mui/system';
3
3
  import defaultTheme from './defaultTheme';
4
+ import THEME_ID from './identifier';
4
5
  export default function useTheme() {
5
6
  const theme = useThemeSystem(defaultTheme);
6
7
  if (process.env.NODE_ENV !== 'production') {
7
8
  // eslint-disable-next-line react-hooks/rules-of-hooks
8
9
  React.useDebugValue(theme);
9
10
  }
10
- return theme;
11
+ return theme[THEME_ID] || theme;
11
12
  }
@@ -1,5 +1,6 @@
1
1
  import { useThemeProps as systemUseThemeProps } from '@mui/system';
2
2
  import defaultTheme from './defaultTheme';
3
+ import THEME_ID from './identifier';
3
4
  export default function useThemeProps({
4
5
  props,
5
6
  name
@@ -7,6 +8,7 @@ export default function useThemeProps({
7
8
  return systemUseThemeProps({
8
9
  props,
9
10
  name,
10
- defaultTheme
11
+ defaultTheme,
12
+ themeId: THEME_ID
11
13
  });
12
14
  }
@@ -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
package/node/Box/Box.js CHANGED
@@ -9,8 +9,10 @@ var _system = require("@mui/system");
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _className = require("../className");
11
11
  var _styles = require("../styles");
12
+ var _identifier = _interopRequireDefault(require("../styles/identifier"));
12
13
  const defaultTheme = (0, _styles.createTheme)();
13
14
  const Box = (0, _system.createBox)({
15
+ themeId: _identifier.default,
14
16
  defaultTheme,
15
17
  defaultClassName: 'MuiBox-root',
16
18
  generateClassName: _className.unstable_ClassNameGenerator.generate
@@ -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,