@mui/material 5.5.1 → 5.6.0

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 (357) 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/Alert.d.ts +3 -1
  6. package/Alert/Alert.js +3 -1
  7. package/Alert/alertClasses.d.ts +44 -44
  8. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  9. package/AppBar/AppBar.d.ts +3 -1
  10. package/AppBar/AppBar.js +3 -1
  11. package/AppBar/appBarClasses.d.ts +28 -28
  12. package/Autocomplete/Autocomplete.js +1 -1
  13. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  14. package/Avatar/avatarClasses.d.ts +20 -20
  15. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  16. package/Backdrop/Backdrop.d.ts +32 -15
  17. package/Backdrop/Backdrop.js +26 -20
  18. package/Backdrop/backdropClasses.d.ts +10 -0
  19. package/Backdrop/backdropClasses.js +6 -0
  20. package/Backdrop/index.d.ts +3 -0
  21. package/Backdrop/index.js +2 -1
  22. package/Badge/Badge.d.ts +23 -8
  23. package/Badge/Badge.js +46 -22
  24. package/Badge/badgeClasses.d.ts +24 -0
  25. package/Badge/badgeClasses.js +8 -0
  26. package/Badge/index.d.ts +3 -0
  27. package/Badge/index.js +2 -1
  28. package/BottomNavigation/BottomNavigation.js +0 -0
  29. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  30. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  31. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  32. package/Button/Button.d.ts +3 -1
  33. package/Button/Button.js +104 -97
  34. package/Button/buttonClasses.d.ts +76 -76
  35. package/ButtonBase/ButtonBase.js +7 -7
  36. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  37. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  38. package/ButtonGroup/ButtonGroup.d.ts +3 -1
  39. package/ButtonGroup/ButtonGroup.js +3 -1
  40. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  41. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  42. package/CHANGELOG.md +215 -0
  43. package/Card/Card.d.ts +1 -0
  44. package/Card/cardClasses.d.ts +8 -8
  45. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  46. package/CardActions/cardActionsClasses.d.ts +10 -10
  47. package/CardContent/cardContentClasses.d.ts +8 -8
  48. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  49. package/CardMedia/cardMediaClasses.d.ts +12 -12
  50. package/Checkbox/Checkbox.d.ts +3 -1
  51. package/Checkbox/Checkbox.js +3 -1
  52. package/Checkbox/checkboxClasses.d.ts +18 -18
  53. package/Chip/Chip.d.ts +3 -1
  54. package/Chip/Chip.js +3 -1
  55. package/Chip/chipClasses.d.ts +80 -80
  56. package/CircularProgress/CircularProgress.d.ts +3 -1
  57. package/CircularProgress/CircularProgress.js +3 -1
  58. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  59. package/ClickAwayListener/index.d.ts +2 -2
  60. package/Collapse/collapseClasses.d.ts +18 -18
  61. package/Container/containerClasses.d.ts +22 -22
  62. package/Dialog/DialogContext.d.ts +6 -6
  63. package/Dialog/dialogClasses.d.ts +36 -36
  64. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  65. package/DialogContent/dialogContentClasses.d.ts +10 -10
  66. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  67. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  68. package/Divider/dividerClasses.d.ts +34 -34
  69. package/Drawer/drawerClasses.d.ts +30 -30
  70. package/Fab/Fab.d.ts +3 -1
  71. package/Fab/Fab.js +3 -1
  72. package/Fab/fabClasses.d.ts +26 -26
  73. package/FilledInput/FilledInput.js +3 -1
  74. package/FilledInput/filledInputClasses.d.ts +40 -40
  75. package/FormControl/FormControl.d.ts +3 -1
  76. package/FormControl/FormControl.js +3 -1
  77. package/FormControl/formControlClasses.d.ts +14 -14
  78. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  79. package/FormControlLabel/FormControlLabel.js +14 -9
  80. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  81. package/FormGroup/formGroupClasses.d.ts +12 -12
  82. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  83. package/FormLabel/FormLabel.d.ts +3 -1
  84. package/FormLabel/FormLabel.js +3 -1
  85. package/FormLabel/formLabelClasses.d.ts +22 -22
  86. package/Grid/gridClasses.d.ts +48 -48
  87. package/Grow/Grow.js +11 -5
  88. package/Icon/Icon.d.ts +3 -1
  89. package/Icon/Icon.js +3 -1
  90. package/Icon/iconClasses.d.ts +24 -24
  91. package/IconButton/IconButton.d.ts +3 -1
  92. package/IconButton/IconButton.js +3 -1
  93. package/IconButton/iconButtonClasses.d.ts +26 -26
  94. package/ImageList/imageListClasses.d.ts +16 -16
  95. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  96. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  97. package/Input/Input.js +3 -1
  98. package/Input/inputClasses.d.ts +34 -34
  99. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  100. package/InputBase/InputBase.d.ts +3 -1
  101. package/InputBase/InputBase.js +3 -1
  102. package/InputBase/inputBaseClasses.d.ts +44 -44
  103. package/InputLabel/InputLabel.js +3 -1
  104. package/InputLabel/inputLabelClasses.d.ts +32 -32
  105. package/LinearProgress/LinearProgress.d.ts +3 -1
  106. package/LinearProgress/LinearProgress.js +3 -1
  107. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  108. package/Link/Link.js +12 -5
  109. package/Link/linkClasses.d.ts +18 -18
  110. package/List/listClasses.d.ts +14 -14
  111. package/ListItem/listItemClasses.d.ts +30 -30
  112. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  113. package/ListItemButton/ListItemButton.js +1 -0
  114. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  115. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  116. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  117. package/ListItemText/listItemTextClasses.d.ts +18 -18
  118. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  119. package/Menu/menuClasses.d.ts +12 -12
  120. package/MenuItem/menuItemClasses.d.ts +20 -20
  121. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  122. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  123. package/OutlinedInput/OutlinedInput.js +3 -1
  124. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  125. package/Pagination/Pagination.d.ts +2 -0
  126. package/Pagination/Pagination.js +2 -0
  127. package/Pagination/paginationClasses.d.ts +14 -14
  128. package/PaginationItem/PaginationItem.d.ts +2 -0
  129. package/PaginationItem/PaginationItem.js +2 -0
  130. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  131. package/Paper/paperClasses.d.ts +39 -39
  132. package/Popover/popoverClasses.d.ts +10 -10
  133. package/Popper/Popper.d.ts +29 -17
  134. package/Popper/Popper.js +16 -6
  135. package/Radio/Radio.d.ts +3 -1
  136. package/Radio/Radio.js +3 -1
  137. package/Radio/radioClasses.d.ts +16 -16
  138. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  139. package/RadioGroup/useRadioGroup.d.ts +4 -4
  140. package/Rating/ratingClasses.d.ts +40 -40
  141. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  142. package/Select/selectClasses.d.ts +30 -30
  143. package/Skeleton/skeletonClasses.d.ts +24 -24
  144. package/Slider/Slider.d.ts +3 -1
  145. package/Slider/Slider.js +3 -1
  146. package/Snackbar/snackbarClasses.d.ts +20 -20
  147. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  148. package/SpeedDial/speedDialClasses.d.ts +22 -22
  149. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  150. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  151. package/Step/StepContext.d.ts +20 -20
  152. package/Step/stepClasses.d.ts +16 -16
  153. package/StepButton/stepButtonClasses.d.ts +14 -14
  154. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  155. package/StepContent/stepContentClasses.d.ts +12 -12
  156. package/StepIcon/stepIconClasses.d.ts +16 -16
  157. package/StepLabel/stepLabelClasses.d.ts +28 -28
  158. package/Stepper/stepperClasses.d.ts +14 -14
  159. package/SvgIcon/SvgIcon.d.ts +3 -1
  160. package/SvgIcon/SvgIcon.js +3 -1
  161. package/SvgIcon/svgIconClasses.d.ts +24 -24
  162. package/Switch/Switch.d.ts +3 -1
  163. package/Switch/Switch.js +3 -1
  164. package/Switch/switchClasses.d.ts +32 -32
  165. package/Tab/tabClasses.d.ts +26 -26
  166. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  167. package/Table/tableClasses.d.ts +10 -10
  168. package/TableBody/tableBodyClasses.d.ts +8 -8
  169. package/TableCell/tableCellClasses.d.ts +32 -32
  170. package/TableContainer/tableContainerClasses.d.ts +8 -8
  171. package/TableFooter/tableFooterClasses.d.ts +8 -8
  172. package/TableHead/tableHeadClasses.d.ts +8 -8
  173. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  174. package/TableRow/tableRowClasses.d.ts +16 -16
  175. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  176. package/Tabs/tabsClasses.d.ts +32 -32
  177. package/TextField/TextField.d.ts +3 -2
  178. package/TextField/TextField.js +3 -1
  179. package/TextField/textFieldClasses.d.ts +8 -8
  180. package/ToggleButton/ToggleButton.d.ts +2 -0
  181. package/ToggleButton/ToggleButton.js +2 -0
  182. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  183. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -1
  184. package/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
  185. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  186. package/Toolbar/toolbarClasses.d.ts +14 -14
  187. package/Tooltip/tooltipClasses.d.ts +30 -30
  188. package/Typography/typographyClasses.d.ts +50 -50
  189. package/Unstable_TrapFocus/index.d.ts +2 -2
  190. package/Unstable_TrapFocus/index.js +1 -1
  191. package/className/index.d.ts +8 -8
  192. package/darkScrollbar/index.d.ts +28 -28
  193. package/index.js +1 -1
  194. package/internal/switchBaseClasses.d.ts +12 -12
  195. package/legacy/Alert/Alert.js +3 -1
  196. package/legacy/AppBar/AppBar.js +3 -1
  197. package/legacy/Autocomplete/Autocomplete.js +1 -1
  198. package/legacy/Backdrop/Backdrop.js +27 -20
  199. package/legacy/Backdrop/backdropClasses.js +6 -0
  200. package/legacy/Backdrop/index.js +2 -1
  201. package/legacy/Badge/Badge.js +47 -22
  202. package/legacy/Badge/badgeClasses.js +8 -0
  203. package/legacy/Badge/index.js +2 -1
  204. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  205. package/legacy/Button/Button.js +33 -30
  206. package/legacy/ButtonBase/ButtonBase.js +11 -11
  207. package/legacy/ButtonGroup/ButtonGroup.js +3 -1
  208. package/legacy/Checkbox/Checkbox.js +3 -1
  209. package/legacy/Chip/Chip.js +3 -1
  210. package/legacy/CircularProgress/CircularProgress.js +3 -1
  211. package/legacy/Fab/Fab.js +3 -1
  212. package/legacy/FilledInput/FilledInput.js +3 -1
  213. package/legacy/FormControl/FormControl.js +3 -1
  214. package/legacy/FormControlLabel/FormControlLabel.js +14 -9
  215. package/legacy/FormLabel/FormLabel.js +3 -1
  216. package/legacy/Grow/Grow.js +11 -5
  217. package/legacy/Icon/Icon.js +3 -1
  218. package/legacy/IconButton/IconButton.js +3 -1
  219. package/legacy/Input/Input.js +3 -1
  220. package/legacy/InputBase/InputBase.js +3 -1
  221. package/legacy/InputLabel/InputLabel.js +3 -1
  222. package/legacy/LinearProgress/LinearProgress.js +3 -1
  223. package/legacy/Link/Link.js +12 -4
  224. package/legacy/ListItemButton/ListItemButton.js +1 -0
  225. package/legacy/OutlinedInput/OutlinedInput.js +3 -1
  226. package/legacy/Pagination/Pagination.js +2 -0
  227. package/legacy/PaginationItem/PaginationItem.js +2 -0
  228. package/legacy/Popper/Popper.js +18 -6
  229. package/legacy/Radio/Radio.js +3 -1
  230. package/legacy/Slider/Slider.js +3 -1
  231. package/legacy/SvgIcon/SvgIcon.js +3 -1
  232. package/legacy/Switch/Switch.js +3 -1
  233. package/legacy/TextField/TextField.js +3 -1
  234. package/legacy/ToggleButton/ToggleButton.js +2 -0
  235. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
  236. package/legacy/Unstable_TrapFocus/index.js +1 -1
  237. package/legacy/index.js +1 -1
  238. package/legacy/locale/index.js +115 -111
  239. package/legacy/styles/CssVarsProvider.js +31 -0
  240. package/legacy/styles/experimental_extendTheme.js +96 -0
  241. package/legacy/styles/index.js +3 -1
  242. package/locale/index.d.ts +71 -71
  243. package/locale/index.js +6 -3
  244. package/modern/Alert/Alert.js +3 -1
  245. package/modern/AppBar/AppBar.js +3 -1
  246. package/modern/Autocomplete/Autocomplete.js +1 -1
  247. package/modern/Backdrop/Backdrop.js +25 -19
  248. package/modern/Backdrop/backdropClasses.js +6 -0
  249. package/modern/Backdrop/index.js +2 -1
  250. package/modern/Badge/Badge.js +43 -19
  251. package/modern/Badge/badgeClasses.js +8 -0
  252. package/modern/Badge/index.js +2 -1
  253. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  254. package/modern/Button/Button.js +32 -29
  255. package/modern/ButtonBase/ButtonBase.js +7 -7
  256. package/modern/ButtonGroup/ButtonGroup.js +3 -1
  257. package/modern/Checkbox/Checkbox.js +3 -1
  258. package/modern/Chip/Chip.js +3 -1
  259. package/modern/CircularProgress/CircularProgress.js +3 -1
  260. package/modern/Fab/Fab.js +3 -1
  261. package/modern/FilledInput/FilledInput.js +3 -1
  262. package/modern/FormControl/FormControl.js +3 -1
  263. package/modern/FormControlLabel/FormControlLabel.js +14 -9
  264. package/modern/FormLabel/FormLabel.js +3 -1
  265. package/modern/Grow/Grow.js +11 -5
  266. package/modern/Icon/Icon.js +3 -1
  267. package/modern/IconButton/IconButton.js +3 -1
  268. package/modern/Input/Input.js +3 -1
  269. package/modern/InputBase/InputBase.js +3 -1
  270. package/modern/InputLabel/InputLabel.js +3 -1
  271. package/modern/LinearProgress/LinearProgress.js +3 -1
  272. package/modern/Link/Link.js +12 -5
  273. package/modern/ListItemButton/ListItemButton.js +1 -0
  274. package/modern/OutlinedInput/OutlinedInput.js +3 -1
  275. package/modern/Pagination/Pagination.js +2 -0
  276. package/modern/PaginationItem/PaginationItem.js +2 -0
  277. package/modern/Popper/Popper.js +16 -6
  278. package/modern/Radio/Radio.js +3 -1
  279. package/modern/Slider/Slider.js +3 -1
  280. package/modern/SvgIcon/SvgIcon.js +3 -1
  281. package/modern/Switch/Switch.js +3 -1
  282. package/modern/TextField/TextField.js +3 -1
  283. package/modern/ToggleButton/ToggleButton.js +2 -0
  284. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
  285. package/modern/Unstable_TrapFocus/index.js +1 -1
  286. package/modern/index.js +1 -1
  287. package/modern/locale/index.js +6 -3
  288. package/modern/styles/CssVarsProvider.js +28 -0
  289. package/modern/styles/experimental_extendTheme.js +89 -0
  290. package/modern/styles/index.js +3 -1
  291. package/node/Alert/Alert.js +3 -1
  292. package/node/AppBar/AppBar.js +3 -1
  293. package/node/Autocomplete/Autocomplete.js +1 -1
  294. package/node/Backdrop/Backdrop.js +28 -23
  295. package/node/Backdrop/backdropClasses.js +17 -0
  296. package/node/Backdrop/index.js +17 -5
  297. package/node/Badge/Badge.js +56 -33
  298. package/node/Badge/badgeClasses.js +22 -0
  299. package/node/Badge/index.js +17 -5
  300. package/node/BottomNavigation/BottomNavigation.js +0 -0
  301. package/node/Button/Button.js +104 -97
  302. package/node/ButtonBase/ButtonBase.js +7 -7
  303. package/node/ButtonGroup/ButtonGroup.js +3 -1
  304. package/node/Checkbox/Checkbox.js +3 -1
  305. package/node/Chip/Chip.js +3 -1
  306. package/node/CircularProgress/CircularProgress.js +3 -1
  307. package/node/Fab/Fab.js +3 -1
  308. package/node/FilledInput/FilledInput.js +3 -1
  309. package/node/FormControl/FormControl.js +3 -1
  310. package/node/FormControlLabel/FormControlLabel.js +14 -9
  311. package/node/FormLabel/FormLabel.js +3 -1
  312. package/node/Grow/Grow.js +10 -4
  313. package/node/Icon/Icon.js +3 -1
  314. package/node/IconButton/IconButton.js +3 -1
  315. package/node/Input/Input.js +3 -1
  316. package/node/InputBase/InputBase.js +3 -1
  317. package/node/InputLabel/InputLabel.js +3 -1
  318. package/node/LinearProgress/LinearProgress.js +3 -1
  319. package/node/Link/Link.js +13 -5
  320. package/node/ListItemButton/ListItemButton.js +1 -0
  321. package/node/OutlinedInput/OutlinedInput.js +3 -1
  322. package/node/Pagination/Pagination.js +2 -0
  323. package/node/PaginationItem/PaginationItem.js +2 -0
  324. package/node/Popper/Popper.js +19 -8
  325. package/node/Radio/Radio.js +3 -1
  326. package/node/Slider/Slider.js +3 -1
  327. package/node/SvgIcon/SvgIcon.js +3 -1
  328. package/node/Switch/Switch.js +3 -1
  329. package/node/TextField/TextField.js +3 -1
  330. package/node/ToggleButton/ToggleButton.js +2 -0
  331. package/node/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
  332. package/node/Unstable_TrapFocus/index.js +2 -2
  333. package/node/index.js +1 -1
  334. package/node/locale/index.js +6 -3
  335. package/node/styles/CssVarsProvider.js +41 -0
  336. package/node/styles/experimental_extendTheme.js +105 -0
  337. package/node/styles/index.js +58 -0
  338. package/package.json +7 -7
  339. package/styles/CssVarsProvider.d.ts +28 -0
  340. package/styles/CssVarsProvider.js +28 -0
  341. package/styles/createPalette.d.ts +26 -0
  342. package/styles/experimental_extendTheme.d.ts +90 -0
  343. package/styles/experimental_extendTheme.js +91 -0
  344. package/styles/index.d.ts +5 -0
  345. package/styles/index.js +3 -1
  346. package/transitions/index.d.ts +1 -1
  347. package/transitions/transition.d.ts +13 -13
  348. package/transitions/utils.d.ts +23 -23
  349. package/umd/material-ui.development.js +1314 -505
  350. package/umd/material-ui.production.min.js +21 -21
  351. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  352. package/useTouchRipple/index.d.ts +1 -1
  353. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  354. package/utils/getScrollbarSize.d.ts +2 -2
  355. package/utils/ownerDocument.d.ts +2 -2
  356. package/utils/ownerWindow.d.ts +2 -2
  357. package/utils/setRef.d.ts +2 -2
@@ -89,106 +89,111 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
89
89
  })(({
90
90
  theme,
91
91
  ownerState
92
- }) => (0, _extends2.default)({}, theme.typography.button, {
93
- minWidth: 64,
94
- padding: '6px 16px',
95
- borderRadius: theme.shape.borderRadius,
96
- transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
97
- duration: theme.transitions.duration.short
98
- }),
99
- '&:hover': (0, _extends2.default)({
100
- textDecoration: 'none',
101
- backgroundColor: (0, _system.alpha)(theme.palette.text.primary, theme.palette.action.hoverOpacity),
102
- // Reset on touch devices, it doesn't add specificity
103
- '@media (hover: none)': {
104
- backgroundColor: 'transparent'
105
- }
92
+ }) => {
93
+ var _theme$palette$getCon, _theme$palette;
94
+
95
+ return (0, _extends2.default)({}, theme.typography.button, {
96
+ minWidth: 64,
97
+ padding: '6px 16px',
98
+ borderRadius: (theme.vars || theme).shape.borderRadius,
99
+ transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
100
+ duration: theme.transitions.duration.short
101
+ }),
102
+ '&:hover': (0, _extends2.default)({
103
+ textDecoration: 'none',
104
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette.text.primary, theme.palette.action.hoverOpacity),
105
+ // Reset on touch devices, it doesn't add specificity
106
+ '@media (hover: none)': {
107
+ backgroundColor: 'transparent'
108
+ }
109
+ }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
110
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
111
+ // Reset on touch devices, it doesn't add specificity
112
+ '@media (hover: none)': {
113
+ backgroundColor: 'transparent'
114
+ }
115
+ }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
116
+ border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
117
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
118
+ // Reset on touch devices, it doesn't add specificity
119
+ '@media (hover: none)': {
120
+ backgroundColor: 'transparent'
121
+ }
122
+ }, ownerState.variant === 'contained' && {
123
+ backgroundColor: (theme.vars || theme).palette.grey.A100,
124
+ boxShadow: (theme.vars || theme).shadows[4],
125
+ // Reset on touch devices, it doesn't add specificity
126
+ '@media (hover: none)': {
127
+ boxShadow: (theme.vars || theme).shadows[2],
128
+ backgroundColor: (theme.vars || theme).palette.grey[300]
129
+ }
130
+ }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
131
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
132
+ // Reset on touch devices, it doesn't add specificity
133
+ '@media (hover: none)': {
134
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
135
+ }
136
+ }),
137
+ '&:active': (0, _extends2.default)({}, ownerState.variant === 'contained' && {
138
+ boxShadow: (theme.vars || theme).shadows[8]
139
+ }),
140
+ [`&.${_buttonClasses.default.focusVisible}`]: (0, _extends2.default)({}, ownerState.variant === 'contained' && {
141
+ boxShadow: (theme.vars || theme).shadows[6]
142
+ }),
143
+ [`&.${_buttonClasses.default.disabled}`]: (0, _extends2.default)({
144
+ color: (theme.vars || theme).palette.action.disabled
145
+ }, ownerState.variant === 'outlined' && {
146
+ border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
147
+ }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
148
+ border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
149
+ }, ownerState.variant === 'contained' && {
150
+ color: (theme.vars || theme).palette.action.disabled,
151
+ boxShadow: (theme.vars || theme).shadows[0],
152
+ backgroundColor: (theme.vars || theme).palette.action.disabledBackground
153
+ })
154
+ }, ownerState.variant === 'text' && {
155
+ padding: '6px 8px'
106
156
  }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
107
- backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
108
- // Reset on touch devices, it doesn't add specificity
109
- '@media (hover: none)': {
110
- backgroundColor: 'transparent'
111
- }
157
+ color: (theme.vars || theme).palette[ownerState.color].main
158
+ }, ownerState.variant === 'outlined' && {
159
+ padding: '5px 15px',
160
+ border: '1px solid currentColor'
112
161
  }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
113
- border: `1px solid ${theme.palette[ownerState.color].main}`,
114
- backgroundColor: (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
115
- // Reset on touch devices, it doesn't add specificity
116
- '@media (hover: none)': {
117
- backgroundColor: 'transparent'
118
- }
162
+ color: (theme.vars || theme).palette[ownerState.color].main,
163
+ border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.5)}`
119
164
  }, ownerState.variant === 'contained' && {
120
- backgroundColor: theme.palette.grey.A100,
121
- boxShadow: theme.shadows[4],
122
- // Reset on touch devices, it doesn't add specificity
123
- '@media (hover: none)': {
124
- boxShadow: theme.shadows[2],
125
- backgroundColor: theme.palette.grey[300]
126
- }
165
+ color: theme.vars ? // this is safe because grey does not change between default light/dark mode
166
+ 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]),
167
+ backgroundColor: (theme.vars || theme).palette.grey[300],
168
+ boxShadow: (theme.vars || theme).shadows[2]
127
169
  }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
128
- backgroundColor: theme.palette[ownerState.color].dark,
129
- // Reset on touch devices, it doesn't add specificity
130
- '@media (hover: none)': {
131
- backgroundColor: theme.palette[ownerState.color].main
132
- }
133
- }),
134
- '&:active': (0, _extends2.default)({}, ownerState.variant === 'contained' && {
135
- boxShadow: theme.shadows[8]
136
- }),
137
- [`&.${_buttonClasses.default.focusVisible}`]: (0, _extends2.default)({}, ownerState.variant === 'contained' && {
138
- boxShadow: theme.shadows[6]
139
- }),
140
- [`&.${_buttonClasses.default.disabled}`]: (0, _extends2.default)({
141
- color: theme.palette.action.disabled
142
- }, ownerState.variant === 'outlined' && {
143
- border: `1px solid ${theme.palette.action.disabledBackground}`
144
- }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
145
- border: `1px solid ${theme.palette.action.disabled}`
146
- }, ownerState.variant === 'contained' && {
147
- color: theme.palette.action.disabled,
148
- boxShadow: theme.shadows[0],
149
- backgroundColor: theme.palette.action.disabledBackground
150
- })
151
- }, ownerState.variant === 'text' && {
152
- padding: '6px 8px'
153
- }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
154
- color: theme.palette[ownerState.color].main
155
- }, ownerState.variant === 'outlined' && {
156
- padding: '5px 15px',
157
- border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`
158
- }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
159
- color: theme.palette[ownerState.color].main,
160
- border: `1px solid ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.5)}`
161
- }, ownerState.variant === 'contained' && {
162
- color: theme.palette.getContrastText(theme.palette.grey[300]),
163
- backgroundColor: theme.palette.grey[300],
164
- boxShadow: theme.shadows[2]
165
- }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
166
- color: theme.palette[ownerState.color].contrastText,
167
- backgroundColor: theme.palette[ownerState.color].main
168
- }, ownerState.color === 'inherit' && {
169
- color: 'inherit',
170
- borderColor: 'currentColor'
171
- }, ownerState.size === 'small' && ownerState.variant === 'text' && {
172
- padding: '4px 5px',
173
- fontSize: theme.typography.pxToRem(13)
174
- }, ownerState.size === 'large' && ownerState.variant === 'text' && {
175
- padding: '8px 11px',
176
- fontSize: theme.typography.pxToRem(15)
177
- }, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
178
- padding: '3px 9px',
179
- fontSize: theme.typography.pxToRem(13)
180
- }, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
181
- padding: '7px 21px',
182
- fontSize: theme.typography.pxToRem(15)
183
- }, ownerState.size === 'small' && ownerState.variant === 'contained' && {
184
- padding: '4px 10px',
185
- fontSize: theme.typography.pxToRem(13)
186
- }, ownerState.size === 'large' && ownerState.variant === 'contained' && {
187
- padding: '8px 22px',
188
- fontSize: theme.typography.pxToRem(15)
189
- }, ownerState.fullWidth && {
190
- width: '100%'
191
- }), ({
170
+ color: (theme.vars || theme).palette[ownerState.color].contrastText,
171
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
172
+ }, ownerState.color === 'inherit' && {
173
+ color: 'inherit',
174
+ borderColor: 'currentColor'
175
+ }, ownerState.size === 'small' && ownerState.variant === 'text' && {
176
+ padding: '4px 5px',
177
+ fontSize: theme.typography.pxToRem(13)
178
+ }, ownerState.size === 'large' && ownerState.variant === 'text' && {
179
+ padding: '8px 11px',
180
+ fontSize: theme.typography.pxToRem(15)
181
+ }, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
182
+ padding: '3px 9px',
183
+ fontSize: theme.typography.pxToRem(13)
184
+ }, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
185
+ padding: '7px 21px',
186
+ fontSize: theme.typography.pxToRem(15)
187
+ }, ownerState.size === 'small' && ownerState.variant === 'contained' && {
188
+ padding: '4px 10px',
189
+ fontSize: theme.typography.pxToRem(13)
190
+ }, ownerState.size === 'large' && ownerState.variant === 'contained' && {
191
+ padding: '8px 22px',
192
+ fontSize: theme.typography.pxToRem(15)
193
+ }, ownerState.fullWidth && {
194
+ width: '100%'
195
+ });
196
+ }, ({
192
197
  ownerState
193
198
  }) => ownerState.disableElevation && {
194
199
  boxShadow: 'none',
@@ -326,7 +331,9 @@ process.env.NODE_ENV !== "production" ? Button.propTypes
326
331
  className: _propTypes.default.string,
327
332
 
328
333
  /**
329
- * The color of the component. It supports those theme colors that make sense for this component.
334
+ * The color of the component.
335
+ * It supports both default and custom theme colors, which can be added as shown in the
336
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
330
337
  * @default 'primary'
331
338
  */
332
339
  color: _propTypes.default
@@ -170,11 +170,16 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
170
170
  buttonRef.current.focus();
171
171
  }
172
172
  }), []);
173
+ const [mountedState, setMountedState] = React.useState(false);
174
+ React.useEffect(() => {
175
+ setMountedState(true);
176
+ }, []);
177
+ const enableTouchRipple = mountedState && !disableRipple && !disabled;
173
178
  React.useEffect(() => {
174
- if (focusVisible && focusRipple && !disableRipple) {
179
+ if (focusVisible && focusRipple && !disableRipple && mountedState) {
175
180
  rippleRef.current.pulsate();
176
181
  }
177
- }, [disableRipple, focusRipple, focusVisible]);
182
+ }, [disableRipple, focusRipple, focusVisible, mountedState]);
178
183
 
179
184
  function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
180
185
  return (0, _useEventCallback.default)(event => {
@@ -318,11 +323,6 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
318
323
 
319
324
  const handleOwnRef = (0, _useForkRef.default)(focusVisibleRef, buttonRef);
320
325
  const handleRef = (0, _useForkRef.default)(ref, handleOwnRef);
321
- const [mountedState, setMountedState] = React.useState(false);
322
- React.useEffect(() => {
323
- setMountedState(true);
324
- }, []);
325
- const enableTouchRipple = mountedState && !disableRipple && !disabled;
326
326
 
327
327
  if (process.env.NODE_ENV !== 'production') {
328
328
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -228,7 +228,9 @@ process.env.NODE_ENV !== "production" ? ButtonGroup.propTypes
228
228
  className: _propTypes.default.string,
229
229
 
230
230
  /**
231
- * The color of the component. It supports those theme colors that make sense for this component.
231
+ * The color of the component.
232
+ * It supports both default and custom theme colors, which can be added as shown in the
233
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
232
234
  * @default 'primary'
233
235
  */
234
236
  color: _propTypes.default
@@ -159,7 +159,9 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes
159
159
  classes: _propTypes.default.object,
160
160
 
161
161
  /**
162
- * The color of the component. It supports those theme colors that make sense for this component.
162
+ * The color of the component.
163
+ * It supports both default and custom theme colors, which can be added as shown in the
164
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
163
165
  * @default 'primary'
164
166
  */
165
167
  color: _propTypes.default
package/node/Chip/Chip.js CHANGED
@@ -474,7 +474,9 @@ process.env.NODE_ENV !== "production" ? Chip.propTypes
474
474
  clickable: _propTypes.default.bool,
475
475
 
476
476
  /**
477
- * The color of the component. It supports those theme colors that make sense for this component.
477
+ * The color of the component.
478
+ * It supports both default and custom theme colors, which can be added as shown in the
479
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
478
480
  * @default 'default'
479
481
  */
480
482
  color: _propTypes.default
@@ -229,7 +229,9 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes
229
229
  className: _propTypes.default.string,
230
230
 
231
231
  /**
232
- * The color of the component. It supports those theme colors that make sense for this component.
232
+ * The color of the component.
233
+ * It supports both default and custom theme colors, which can be added as shown in the
234
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
233
235
  * @default 'primary'
234
236
  */
235
237
  color: _propTypes.default
package/node/Fab/Fab.js CHANGED
@@ -198,7 +198,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
198
198
  className: _propTypes.default.string,
199
199
 
200
200
  /**
201
- * The color of the component. It supports those theme colors that make sense for this component.
201
+ * The color of the component.
202
+ * It supports both default and custom theme colors, which can be added as shown in the
203
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
202
204
  * @default 'default'
203
205
  */
204
206
  color: _propTypes.default.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
@@ -258,7 +258,9 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
258
258
  classes: _propTypes.default.object,
259
259
 
260
260
  /**
261
- * The color of the component. It supports those theme colors that make sense for this component.
261
+ * The color of the component.
262
+ * It supports both default and custom theme colors, which can be added as shown in the
263
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
262
264
  * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
263
265
  */
264
266
  color: _propTypes.default
@@ -271,7 +271,9 @@ process.env.NODE_ENV !== "production" ? FormControl.propTypes
271
271
  className: _propTypes.default.string,
272
272
 
273
273
  /**
274
- * The color of the component. It supports those theme colors that make sense for this component.
274
+ * The color of the component.
275
+ * It supports both default and custom theme colors, which can be added as shown in the
276
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
275
277
  * @default 'primary'
276
278
  */
277
279
  color: _propTypes.default
@@ -119,7 +119,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
119
119
  control,
120
120
  disabled: disabledProp,
121
121
  disableTypography,
122
- label,
122
+ label: labelProp,
123
123
  labelPlacement = 'end'
124
124
  } = props,
125
125
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
@@ -149,22 +149,27 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
149
149
  });
150
150
  const ownerState = (0, _extends2.default)({}, props, {
151
151
  disabled,
152
- label,
153
152
  labelPlacement,
154
153
  error: fcs.error
155
154
  });
156
155
  const classes = useUtilityClasses(ownerState);
156
+ let label = labelProp;
157
+
158
+ if (label != null && label.type !== _Typography.default && !disableTypography) {
159
+ label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
160
+ component: "span",
161
+ className: classes.label
162
+ }, componentsProps.typography, {
163
+ children: label
164
+ }));
165
+ }
166
+
157
167
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(FormControlLabelRoot, (0, _extends2.default)({
158
168
  className: (0, _clsx.default)(classes.root, className),
159
169
  ownerState: ownerState,
160
170
  ref: ref
161
171
  }, other, {
162
- children: [/*#__PURE__*/React.cloneElement(control, controlProps), label.type === _Typography.default || disableTypography ? label : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
163
- component: "span",
164
- className: classes.label
165
- }, componentsProps.typography, {
166
- children: label
167
- }))]
172
+ children: [/*#__PURE__*/React.cloneElement(control, controlProps), label]
168
173
  }));
169
174
  });
170
175
  process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
@@ -221,7 +226,7 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
221
226
  /**
222
227
  * A text or an element to be used in an enclosing label element.
223
228
  */
224
- label: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.number, _propTypes.default.string]).isRequired,
229
+ label: _propTypes.default.node,
225
230
 
226
231
  /**
227
232
  * The position of the label.
@@ -160,7 +160,9 @@ process.env.NODE_ENV !== "production" ? FormLabel.propTypes
160
160
  className: _propTypes.default.string,
161
161
 
162
162
  /**
163
- * The color of the component. It supports those theme colors that make sense for this component.
163
+ * The color of the component.
164
+ * It supports both default and custom theme colors, which can be added as shown in the
165
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
164
166
  */
165
167
  color: _propTypes.default
166
168
  /* @typescript-to-proptypes-ignore */
package/node/Grow/Grow.js CHANGED
@@ -47,6 +47,12 @@ const styles = {
47
47
  transform: 'none'
48
48
  }
49
49
  };
50
+ /**
51
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
52
+ * Remove this workaround once the Safari bug is fixed.
53
+ */
54
+
55
+ const isSafari154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && /version\/15\.[4-9]/i.test(navigator.userAgent);
50
56
  /**
51
57
  * The Grow transition is used by the [Tooltip](/components/tooltips/) and
52
58
  * [Popover](/components/popover/) components.
@@ -119,7 +125,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
119
125
  duration,
120
126
  delay
121
127
  }), theme.transitions.create('transform', {
122
- duration: duration * 0.666,
128
+ duration: isSafari154 ? duration : duration * 0.666,
123
129
  delay,
124
130
  easing: transitionTimingFunction
125
131
  })].join(',');
@@ -155,11 +161,11 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
155
161
  duration,
156
162
  delay
157
163
  }), theme.transitions.create('transform', {
158
- duration: duration * 0.666,
159
- delay: delay || duration * 0.333,
164
+ duration: isSafari154 ? duration : duration * 0.666,
165
+ delay: isSafari154 ? delay : delay || duration * 0.333,
160
166
  easing: transitionTimingFunction
161
167
  })].join(',');
162
- node.style.opacity = '0';
168
+ node.style.opacity = 0;
163
169
  node.style.transform = getScale(0.75);
164
170
 
165
171
  if (onExit) {
package/node/Icon/Icon.js CHANGED
@@ -151,7 +151,9 @@ process.env.NODE_ENV !== "production" ? Icon.propTypes
151
151
  className: _propTypes.default.string,
152
152
 
153
153
  /**
154
- * The color of the component. It supports those theme colors that make sense for this component.
154
+ * The color of the component.
155
+ * It supports both default and custom theme colors, which can be added as shown in the
156
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
155
157
  * @default 'inherit'
156
158
  */
157
159
  color: _propTypes.default
@@ -189,7 +189,9 @@ process.env.NODE_ENV !== "production" ? IconButton.propTypes
189
189
  className: _propTypes.default.string,
190
190
 
191
191
  /**
192
- * The color of the component. It supports those theme colors that make sense for this component.
192
+ * The color of the component.
193
+ * It supports both default and custom theme colors, which can be added as shown in the
194
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
193
195
  * @default 'default'
194
196
  */
195
197
  color: _propTypes.default
@@ -194,7 +194,9 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
194
194
  classes: _propTypes.default.object,
195
195
 
196
196
  /**
197
- * The color of the component. It supports those theme colors that make sense for this component.
197
+ * The color of the component.
198
+ * It supports both default and custom theme colors, which can be added as shown in the
199
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
198
200
  * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
199
201
  */
200
202
  color: _propTypes.default
@@ -563,7 +563,9 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
563
563
  className: _propTypes.default.string,
564
564
 
565
565
  /**
566
- * The color of the component. It supports those theme colors that make sense for this component.
566
+ * The color of the component.
567
+ * It supports both default and custom theme colors, which can be added as shown in the
568
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
567
569
  * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
568
570
  */
569
571
  color: _propTypes.default
@@ -185,7 +185,9 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
185
185
  classes: _propTypes.default.object,
186
186
 
187
187
  /**
188
- * The color of the component. It supports those theme colors that make sense for this component.
188
+ * The color of the component.
189
+ * It supports both default and custom theme colors, which can be added as shown in the
190
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
189
191
  */
190
192
  color: _propTypes.default
191
193
  /* @typescript-to-proptypes-ignore */
@@ -351,7 +351,9 @@ process.env.NODE_ENV !== "production" ? LinearProgress.propTypes
351
351
  className: _propTypes.default.string,
352
352
 
353
353
  /**
354
- * The color of the component. It supports those theme colors that make sense for this component.
354
+ * The color of the component.
355
+ * It supports both default and custom theme colors, which can be added as shown in the
356
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
355
357
  * @default 'primary'
356
358
  */
357
359
  color: _propTypes.default
package/node/Link/Link.js CHANGED
@@ -27,6 +27,8 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
27
27
 
28
28
  var _styled = _interopRequireDefault(require("../styles/styled"));
29
29
 
30
+ var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
31
+
30
32
  var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
31
33
 
32
34
  var _useIsFocusVisible = _interopRequireDefault(require("../utils/useIsFocusVisible"));
@@ -39,7 +41,7 @@ var _linkClasses = _interopRequireWildcard(require("./linkClasses"));
39
41
 
40
42
  var _jsxRuntime = require("react/jsx-runtime");
41
43
 
42
- const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant"];
44
+ const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
43
45
 
44
46
  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); }
45
47
 
@@ -127,6 +129,7 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
127
129
  });
128
130
  });
129
131
  const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
132
+ const theme = (0, _useTheme.default)();
130
133
  const props = (0, _useThemeProps.default)({
131
134
  props: inProps,
132
135
  name: 'MuiLink'
@@ -139,7 +142,8 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
139
142
  onFocus,
140
143
  TypographyClasses,
141
144
  underline = 'always',
142
- variant = 'inherit'
145
+ variant = 'inherit',
146
+ sx
143
147
  } = props,
144
148
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
145
149
  const {
@@ -176,7 +180,9 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
176
180
  };
177
181
 
178
182
  const ownerState = (0, _extends2.default)({}, props, {
179
- color,
183
+ // It is too complex to support any types of `sx`.
184
+ // Need to find a better way to get rid of the color manipulation for `textDecorationColor`.
185
+ color: (typeof sx === 'function' ? sx(theme).color : sx == null ? void 0 : sx.color) || color,
180
186
  component,
181
187
  focusVisible,
182
188
  underline,
@@ -186,13 +192,15 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
186
192
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkRoot, (0, _extends2.default)({
187
193
  className: (0, _clsx.default)(classes.root, className),
188
194
  classes: TypographyClasses,
189
- color: color,
190
195
  component: component,
191
196
  onBlur: handleBlur,
192
197
  onFocus: handleFocus,
193
198
  ref: handlerRef,
194
199
  ownerState: ownerState,
195
- variant: variant
200
+ variant: variant,
201
+ sx: [{
202
+ color: colorTransformations[color] || color
203
+ }, ...(Array.isArray(sx) ? sx : [sx])]
196
204
  }, other));
197
205
  });
198
206
  process.env.NODE_ENV !== "production" ? Link.propTypes
@@ -84,6 +84,7 @@ const ListItemButtonRoot = (0, _styled.default)(_ButtonBase.default, {
84
84
  alignItems: 'center',
85
85
  position: 'relative',
86
86
  textDecoration: 'none',
87
+ minWidth: 0,
87
88
  boxSizing: 'border-box',
88
89
  textAlign: 'left',
89
90
  paddingTop: 8,
@@ -202,7 +202,9 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes
202
202
  classes: _propTypes.default.object,
203
203
 
204
204
  /**
205
- * The color of the component. It supports those theme colors that make sense for this component.
205
+ * The color of the component.
206
+ * It supports both default and custom theme colors, which can be added as shown in the
207
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
206
208
  * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
207
209
  */
208
210
  color: _propTypes.default
@@ -177,6 +177,8 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes
177
177
 
178
178
  /**
179
179
  * The active color.
180
+ * It supports both default and custom theme colors, which can be added as shown in the
181
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
180
182
  * @default 'standard'
181
183
  */
182
184
  color: _propTypes.default
@@ -327,6 +327,8 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
327
327
 
328
328
  /**
329
329
  * The active color.
330
+ * It supports both default and custom theme colors, which can be added as shown in the
331
+ * [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
330
332
  * @default 'standard'
331
333
  */
332
334
  color: _propTypes.default