@mui/material 5.6.4 → 5.8.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 (387) 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.js +1 -0
  6. package/Alert/alertClasses.d.ts +44 -44
  7. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  8. package/AppBar/appBarClasses.d.ts +28 -28
  9. package/Autocomplete/Autocomplete.d.ts +23 -1
  10. package/Autocomplete/Autocomplete.js +18 -16
  11. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  12. package/Avatar/avatarClasses.d.ts +20 -20
  13. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  14. package/Backdrop/backdropClasses.d.ts +10 -10
  15. package/Badge/Badge.d.ts +1 -34
  16. package/Badge/badgeClasses.d.ts +56 -24
  17. package/BottomNavigation/BottomNavigation.js +0 -0
  18. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  19. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  20. package/Box/Box.js +1 -1
  21. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  22. package/Button/buttonClasses.d.ts +76 -76
  23. package/ButtonBase/TouchRipple.js +5 -5
  24. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  25. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  26. package/ButtonGroup/ButtonGroup.js +10 -10
  27. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  28. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  29. package/CHANGELOG.md +241 -0
  30. package/Card/cardClasses.d.ts +8 -8
  31. package/CardActionArea/CardActionArea.js +2 -2
  32. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  33. package/CardActions/cardActionsClasses.d.ts +10 -10
  34. package/CardContent/cardContentClasses.d.ts +8 -8
  35. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  36. package/CardMedia/cardMediaClasses.d.ts +12 -12
  37. package/Checkbox/checkboxClasses.d.ts +18 -18
  38. package/Chip/chipClasses.d.ts +80 -80
  39. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  40. package/ClickAwayListener/index.d.ts +2 -2
  41. package/Collapse/collapseClasses.d.ts +18 -18
  42. package/Container/Container.js +17 -106
  43. package/Container/containerClasses.d.ts +6 -22
  44. package/CssBaseline/CssBaseline.js +4 -4
  45. package/Dialog/DialogContext.d.ts +6 -6
  46. package/Dialog/dialogClasses.d.ts +36 -36
  47. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  48. package/DialogContent/DialogContent.js +2 -2
  49. package/DialogContent/dialogContentClasses.d.ts +10 -10
  50. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  51. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  52. package/Divider/Divider.js +4 -4
  53. package/Divider/dividerClasses.d.ts +34 -34
  54. package/Drawer/Drawer.js +6 -6
  55. package/Drawer/drawerClasses.d.ts +30 -30
  56. package/Fab/Fab.js +72 -66
  57. package/Fab/fabClasses.d.ts +26 -26
  58. package/FilledInput/filledInputClasses.d.ts +40 -40
  59. package/FormControl/formControlClasses.d.ts +14 -14
  60. package/FormControlLabel/FormControlLabel.js +1 -1
  61. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  62. package/FormGroup/formGroupClasses.d.ts +12 -12
  63. package/FormHelperText/FormHelperText.js +3 -3
  64. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  65. package/FormLabel/FormLabel.js +5 -5
  66. package/FormLabel/formLabelClasses.d.ts +22 -22
  67. package/Grid/gridClasses.d.ts +48 -48
  68. package/Icon/Icon.js +8 -8
  69. package/Icon/iconClasses.d.ts +24 -24
  70. package/IconButton/IconButton.js +5 -5
  71. package/IconButton/iconButtonClasses.d.ts +26 -26
  72. package/ImageList/imageListClasses.d.ts +16 -16
  73. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  74. package/ImageListItemBar/ImageListItemBar.js +1 -1
  75. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  76. package/Input/Input.js +9 -4
  77. package/Input/inputClasses.d.ts +34 -34
  78. package/InputAdornment/InputAdornment.js +1 -1
  79. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  80. package/InputBase/InputBase.js +16 -8
  81. package/InputBase/inputBaseClasses.d.ts +44 -44
  82. package/InputLabel/inputLabelClasses.d.ts +32 -32
  83. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  84. package/Link/Link.js +3 -8
  85. package/Link/linkClasses.d.ts +18 -18
  86. package/List/listClasses.d.ts +14 -14
  87. package/ListItem/ListItem.js +8 -8
  88. package/ListItem/listItemClasses.d.ts +30 -30
  89. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  90. package/ListItemButton/ListItemButton.js +15 -9
  91. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  92. package/ListItemIcon/ListItemIcon.js +1 -1
  93. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  94. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  95. package/ListItemText/listItemTextClasses.d.ts +18 -18
  96. package/ListSubheader/ListSubheader.js +3 -3
  97. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  98. package/Menu/menuClasses.d.ts +12 -12
  99. package/MenuItem/MenuItem.js +8 -8
  100. package/MenuItem/menuItemClasses.d.ts +20 -20
  101. package/MenuList/MenuList.d.ts +1 -1
  102. package/MenuList/MenuList.js +1 -1
  103. package/MobileStepper/MobileStepper.js +5 -5
  104. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  105. package/Modal/Modal.js +1 -1
  106. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  107. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  108. package/Pagination/paginationClasses.d.ts +14 -14
  109. package/PaginationItem/PaginationItem.js +27 -27
  110. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  111. package/Paper/Paper.js +20 -15
  112. package/Paper/index.d.ts +1 -1
  113. package/Paper/paperClasses.d.ts +39 -39
  114. package/Popover/popoverClasses.d.ts +10 -10
  115. package/Popper/Popper.d.ts +29 -29
  116. package/README.md +2 -1
  117. package/Radio/Radio.js +4 -4
  118. package/Radio/radioClasses.d.ts +16 -16
  119. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  120. package/RadioGroup/useRadioGroup.d.ts +4 -4
  121. package/Rating/Rating.js +2 -2
  122. package/Rating/ratingClasses.d.ts +40 -40
  123. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  124. package/Select/SelectInput.js +2 -2
  125. package/Select/selectClasses.d.ts +30 -30
  126. package/Skeleton/skeletonClasses.d.ts +24 -24
  127. package/Slider/Slider.js +1 -5
  128. package/Snackbar/Snackbar.js +1 -1
  129. package/Snackbar/snackbarClasses.d.ts +20 -20
  130. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  131. package/SpeedDial/SpeedDial.js +1 -1
  132. package/SpeedDial/speedDialClasses.d.ts +22 -22
  133. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  134. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  135. package/Step/StepContext.d.ts +20 -20
  136. package/Step/stepClasses.d.ts +16 -16
  137. package/StepButton/stepButtonClasses.d.ts +14 -14
  138. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  139. package/StepContent/stepContentClasses.d.ts +12 -12
  140. package/StepIcon/StepIcon.js +5 -5
  141. package/StepIcon/stepIconClasses.d.ts +16 -16
  142. package/StepLabel/StepLabel.js +4 -4
  143. package/StepLabel/stepLabelClasses.d.ts +28 -28
  144. package/Stepper/StepperContext.d.ts +18 -0
  145. package/Stepper/StepperContext.js +10 -2
  146. package/Stepper/index.d.ts +3 -0
  147. package/Stepper/index.js +3 -1
  148. package/Stepper/stepperClasses.d.ts +14 -14
  149. package/SvgIcon/SvgIcon.js +4 -4
  150. package/SvgIcon/svgIconClasses.d.ts +24 -24
  151. package/Switch/switchClasses.d.ts +32 -32
  152. package/Tab/Tab.js +7 -7
  153. package/Tab/tabClasses.d.ts +26 -26
  154. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  155. package/Table/Table.js +1 -1
  156. package/Table/tableClasses.d.ts +10 -10
  157. package/TableBody/tableBodyClasses.d.ts +8 -8
  158. package/TableCell/tableCellClasses.d.ts +32 -32
  159. package/TableContainer/tableContainerClasses.d.ts +8 -8
  160. package/TableFooter/tableFooterClasses.d.ts +8 -8
  161. package/TableHead/tableHeadClasses.d.ts +8 -8
  162. package/TablePagination/TablePagination.js +1 -1
  163. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  164. package/TableRow/TableRow.js +3 -3
  165. package/TableRow/tableRowClasses.d.ts +16 -16
  166. package/TableSortLabel/TableSortLabel.js +4 -4
  167. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  168. package/Tabs/Tabs.js +4 -4
  169. package/Tabs/tabsClasses.d.ts +32 -32
  170. package/TextField/textFieldClasses.d.ts +8 -8
  171. package/ToggleButton/ToggleButton.js +17 -10
  172. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  173. package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  174. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  175. package/Toolbar/toolbarClasses.d.ts +14 -14
  176. package/Tooltip/Tooltip.js +5 -5
  177. package/Tooltip/tooltipClasses.d.ts +30 -30
  178. package/Typography/typographyClasses.d.ts +50 -50
  179. package/className/index.d.ts +1 -8
  180. package/className/index.js +1 -8
  181. package/darkScrollbar/index.d.ts +28 -28
  182. package/index.js +1 -1
  183. package/internal/switchBaseClasses.d.ts +12 -12
  184. package/legacy/Alert/Alert.js +1 -0
  185. package/legacy/Autocomplete/Autocomplete.js +18 -16
  186. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  187. package/legacy/Box/Box.js +1 -1
  188. package/legacy/ButtonBase/TouchRipple.js +5 -5
  189. package/legacy/ButtonGroup/ButtonGroup.js +10 -10
  190. package/legacy/CardActionArea/CardActionArea.js +2 -2
  191. package/legacy/Container/Container.js +18 -103
  192. package/legacy/CssBaseline/CssBaseline.js +4 -4
  193. package/legacy/DialogContent/DialogContent.js +2 -2
  194. package/legacy/Divider/Divider.js +4 -4
  195. package/legacy/Drawer/Drawer.js +6 -6
  196. package/legacy/Fab/Fab.js +20 -18
  197. package/legacy/FormControlLabel/FormControlLabel.js +1 -1
  198. package/legacy/FormHelperText/FormHelperText.js +3 -3
  199. package/legacy/FormLabel/FormLabel.js +5 -5
  200. package/legacy/Icon/Icon.js +8 -8
  201. package/legacy/IconButton/IconButton.js +5 -5
  202. package/legacy/ImageListItemBar/ImageListItemBar.js +1 -1
  203. package/legacy/Input/Input.js +8 -3
  204. package/legacy/InputAdornment/InputAdornment.js +1 -1
  205. package/legacy/InputBase/InputBase.js +16 -8
  206. package/legacy/Link/Link.js +3 -9
  207. package/legacy/ListItem/ListItem.js +8 -8
  208. package/legacy/ListItemButton/ListItemButton.js +15 -9
  209. package/legacy/ListItemIcon/ListItemIcon.js +1 -1
  210. package/legacy/ListSubheader/ListSubheader.js +3 -3
  211. package/legacy/MenuItem/MenuItem.js +8 -8
  212. package/legacy/MenuList/MenuList.js +1 -1
  213. package/legacy/MobileStepper/MobileStepper.js +5 -5
  214. package/legacy/Modal/Modal.js +1 -1
  215. package/legacy/PaginationItem/PaginationItem.js +27 -27
  216. package/legacy/Paper/Paper.js +10 -7
  217. package/legacy/Radio/Radio.js +4 -4
  218. package/legacy/Rating/Rating.js +2 -2
  219. package/legacy/Select/SelectInput.js +2 -2
  220. package/legacy/Slider/Slider.js +1 -10
  221. package/legacy/Snackbar/Snackbar.js +1 -1
  222. package/legacy/SpeedDial/SpeedDial.js +1 -1
  223. package/legacy/StepIcon/StepIcon.js +5 -5
  224. package/legacy/StepLabel/StepLabel.js +4 -4
  225. package/legacy/Stepper/StepperContext.js +10 -2
  226. package/legacy/Stepper/index.js +3 -1
  227. package/legacy/SvgIcon/SvgIcon.js +4 -4
  228. package/legacy/Tab/Tab.js +7 -7
  229. package/legacy/Table/Table.js +1 -1
  230. package/legacy/TablePagination/TablePagination.js +1 -1
  231. package/legacy/TableRow/TableRow.js +3 -3
  232. package/legacy/TableSortLabel/TableSortLabel.js +4 -4
  233. package/legacy/Tabs/Tabs.js +4 -4
  234. package/legacy/ToggleButton/ToggleButton.js +16 -9
  235. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  236. package/legacy/Tooltip/Tooltip.js +5 -5
  237. package/legacy/className/index.js +1 -8
  238. package/legacy/index.js +1 -1
  239. package/legacy/locale/index.js +22 -22
  240. package/legacy/styles/createMixins.js +5 -3
  241. package/legacy/styles/createPalette.js +2 -1
  242. package/legacy/styles/createTheme.js +1 -1
  243. package/legacy/styles/experimental_extendTheme.js +70 -42
  244. package/locale/index.d.ts +71 -71
  245. package/locale/index.js +22 -22
  246. package/modern/Alert/Alert.js +1 -0
  247. package/modern/Autocomplete/Autocomplete.js +18 -16
  248. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  249. package/modern/Box/Box.js +1 -1
  250. package/modern/ButtonBase/TouchRipple.js +5 -5
  251. package/modern/ButtonGroup/ButtonGroup.js +10 -10
  252. package/modern/CardActionArea/CardActionArea.js +2 -2
  253. package/modern/Container/Container.js +17 -106
  254. package/modern/CssBaseline/CssBaseline.js +4 -4
  255. package/modern/DialogContent/DialogContent.js +2 -2
  256. package/modern/Divider/Divider.js +4 -4
  257. package/modern/Drawer/Drawer.js +6 -6
  258. package/modern/Fab/Fab.js +19 -17
  259. package/modern/FormControlLabel/FormControlLabel.js +1 -1
  260. package/modern/FormHelperText/FormHelperText.js +3 -3
  261. package/modern/FormLabel/FormLabel.js +5 -5
  262. package/modern/Icon/Icon.js +8 -8
  263. package/modern/IconButton/IconButton.js +5 -5
  264. package/modern/ImageListItemBar/ImageListItemBar.js +1 -1
  265. package/modern/Input/Input.js +9 -4
  266. package/modern/InputAdornment/InputAdornment.js +1 -1
  267. package/modern/InputBase/InputBase.js +16 -8
  268. package/modern/Link/Link.js +3 -8
  269. package/modern/ListItem/ListItem.js +8 -8
  270. package/modern/ListItemButton/ListItemButton.js +15 -9
  271. package/modern/ListItemIcon/ListItemIcon.js +1 -1
  272. package/modern/ListSubheader/ListSubheader.js +3 -3
  273. package/modern/MenuItem/MenuItem.js +8 -8
  274. package/modern/MenuList/MenuList.js +1 -1
  275. package/modern/MobileStepper/MobileStepper.js +5 -5
  276. package/modern/Modal/Modal.js +1 -1
  277. package/modern/PaginationItem/PaginationItem.js +27 -27
  278. package/modern/Paper/Paper.js +8 -7
  279. package/modern/Radio/Radio.js +4 -4
  280. package/modern/Rating/Rating.js +2 -2
  281. package/modern/Select/SelectInput.js +2 -2
  282. package/modern/Slider/Slider.js +1 -5
  283. package/modern/Snackbar/Snackbar.js +1 -1
  284. package/modern/SpeedDial/SpeedDial.js +1 -1
  285. package/modern/StepIcon/StepIcon.js +5 -5
  286. package/modern/StepLabel/StepLabel.js +4 -4
  287. package/modern/Stepper/StepperContext.js +10 -2
  288. package/modern/Stepper/index.js +3 -1
  289. package/modern/SvgIcon/SvgIcon.js +3 -3
  290. package/modern/Tab/Tab.js +7 -7
  291. package/modern/Table/Table.js +1 -1
  292. package/modern/TablePagination/TablePagination.js +1 -1
  293. package/modern/TableRow/TableRow.js +3 -3
  294. package/modern/TableSortLabel/TableSortLabel.js +4 -4
  295. package/modern/Tabs/Tabs.js +4 -4
  296. package/modern/ToggleButton/ToggleButton.js +17 -10
  297. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  298. package/modern/Tooltip/Tooltip.js +5 -5
  299. package/modern/className/index.js +1 -8
  300. package/modern/index.js +1 -1
  301. package/modern/locale/index.js +22 -22
  302. package/modern/styles/createMixins.js +5 -3
  303. package/modern/styles/createPalette.js +2 -1
  304. package/modern/styles/createTheme.js +1 -1
  305. package/modern/styles/experimental_extendTheme.js +71 -44
  306. package/node/Alert/Alert.js +1 -0
  307. package/node/Autocomplete/Autocomplete.js +19 -16
  308. package/node/BottomNavigation/BottomNavigation.js +0 -0
  309. package/node/Box/Box.js +2 -2
  310. package/node/ButtonBase/TouchRipple.js +5 -5
  311. package/node/ButtonGroup/ButtonGroup.js +10 -10
  312. package/node/CardActionArea/CardActionArea.js +2 -2
  313. package/node/Container/Container.js +17 -113
  314. package/node/CssBaseline/CssBaseline.js +4 -4
  315. package/node/DialogContent/DialogContent.js +2 -2
  316. package/node/Divider/Divider.js +4 -4
  317. package/node/Drawer/Drawer.js +6 -6
  318. package/node/Fab/Fab.js +72 -66
  319. package/node/FormControlLabel/FormControlLabel.js +1 -1
  320. package/node/FormHelperText/FormHelperText.js +3 -3
  321. package/node/FormLabel/FormLabel.js +5 -5
  322. package/node/Icon/Icon.js +8 -8
  323. package/node/IconButton/IconButton.js +5 -5
  324. package/node/ImageListItemBar/ImageListItemBar.js +1 -1
  325. package/node/Input/Input.js +9 -4
  326. package/node/InputAdornment/InputAdornment.js +1 -1
  327. package/node/InputBase/InputBase.js +14 -8
  328. package/node/Link/Link.js +3 -9
  329. package/node/ListItem/ListItem.js +8 -8
  330. package/node/ListItemButton/ListItemButton.js +15 -9
  331. package/node/ListItemIcon/ListItemIcon.js +1 -1
  332. package/node/ListSubheader/ListSubheader.js +3 -3
  333. package/node/MenuItem/MenuItem.js +8 -8
  334. package/node/MenuList/MenuList.js +1 -1
  335. package/node/MobileStepper/MobileStepper.js +5 -5
  336. package/node/Modal/Modal.js +1 -1
  337. package/node/PaginationItem/PaginationItem.js +27 -27
  338. package/node/Paper/Paper.js +22 -14
  339. package/node/Radio/Radio.js +4 -4
  340. package/node/Rating/Rating.js +2 -2
  341. package/node/Select/SelectInput.js +2 -2
  342. package/node/Slider/Slider.js +1 -5
  343. package/node/Snackbar/Snackbar.js +1 -1
  344. package/node/SpeedDial/SpeedDial.js +1 -1
  345. package/node/StepIcon/StepIcon.js +5 -5
  346. package/node/StepLabel/StepLabel.js +4 -4
  347. package/node/Stepper/StepperContext.js +11 -1
  348. package/node/Stepper/index.js +22 -1
  349. package/node/SvgIcon/SvgIcon.js +4 -4
  350. package/node/Tab/Tab.js +7 -7
  351. package/node/Table/Table.js +1 -1
  352. package/node/TablePagination/TablePagination.js +1 -1
  353. package/node/TableRow/TableRow.js +3 -3
  354. package/node/TableSortLabel/TableSortLabel.js +4 -4
  355. package/node/Tabs/Tabs.js +4 -4
  356. package/node/ToggleButton/ToggleButton.js +17 -10
  357. package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  358. package/node/Tooltip/Tooltip.js +5 -5
  359. package/node/className/index.js +2 -2
  360. package/node/index.js +1 -1
  361. package/node/locale/index.js +22 -22
  362. package/node/styles/createMixins.js +5 -3
  363. package/node/styles/createPalette.js +2 -1
  364. package/node/styles/createTheme.js +1 -1
  365. package/node/styles/experimental_extendTheme.js +72 -45
  366. package/package.json +5 -5
  367. package/styles/ThemeProvider.d.ts +1 -1
  368. package/styles/createMixins.d.ts +2 -6
  369. package/styles/createMixins.js +5 -3
  370. package/styles/createPalette.d.ts +10 -3
  371. package/styles/createPalette.js +2 -1
  372. package/styles/createTheme.js +1 -1
  373. package/styles/experimental_extendTheme.d.ts +43 -16
  374. package/styles/experimental_extendTheme.js +72 -45
  375. package/styles/index.d.ts +1 -0
  376. package/transitions/index.d.ts +1 -1
  377. package/transitions/transition.d.ts +13 -13
  378. package/transitions/utils.d.ts +23 -23
  379. package/umd/material-ui.development.js +1079 -894
  380. package/umd/material-ui.production.min.js +21 -21
  381. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  382. package/useTouchRipple/index.d.ts +1 -1
  383. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  384. package/utils/getScrollbarSize.d.ts +2 -2
  385. package/utils/ownerDocument.d.ts +2 -2
  386. package/utils/ownerWindow.d.ts +2 -2
  387. package/utils/setRef.d.ts +2 -2
@@ -66,10 +66,10 @@ const PaginationItemEllipsis = styled('div', {
66
66
  minWidth: 32,
67
67
  padding: '0 6px',
68
68
  margin: '0 3px',
69
- color: theme.palette.text.primary,
69
+ color: (theme.vars || theme).palette.text.primary,
70
70
  height: 'auto',
71
71
  [`&.${paginationItemClasses.disabled}`]: {
72
- opacity: theme.palette.action.disabledOpacity
72
+ opacity: (theme.vars || theme).palette.action.disabledOpacity
73
73
  }
74
74
  }, ownerState.size === 'small' && {
75
75
  minWidth: 26,
@@ -97,39 +97,39 @@ const PaginationItemPage = styled(ButtonBase, {
97
97
  height: 32,
98
98
  padding: '0 6px',
99
99
  margin: '0 3px',
100
- color: theme.palette.text.primary,
100
+ color: (theme.vars || theme).palette.text.primary,
101
101
  [`&.${paginationItemClasses.focusVisible}`]: {
102
- backgroundColor: theme.palette.action.focus
102
+ backgroundColor: (theme.vars || theme).palette.action.focus
103
103
  },
104
104
  [`&.${paginationItemClasses.disabled}`]: {
105
- opacity: theme.palette.action.disabledOpacity
105
+ opacity: (theme.vars || theme).palette.action.disabledOpacity
106
106
  },
107
107
  transition: theme.transitions.create(['color', 'background-color'], {
108
108
  duration: theme.transitions.duration.short
109
109
  }),
110
110
  '&:hover': {
111
- backgroundColor: theme.palette.action.hover,
111
+ backgroundColor: (theme.vars || theme).palette.action.hover,
112
112
  // Reset on touch devices, it doesn't add specificity
113
113
  '@media (hover: none)': {
114
114
  backgroundColor: 'transparent'
115
115
  }
116
116
  },
117
117
  [`&.${paginationItemClasses.selected}`]: {
118
- backgroundColor: theme.palette.action.selected,
118
+ backgroundColor: (theme.vars || theme).palette.action.selected,
119
119
  '&:hover': {
120
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
120
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selected} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
121
121
  // Reset on touch devices, it doesn't add specificity
122
122
  '@media (hover: none)': {
123
- backgroundColor: theme.palette.action.selected
123
+ backgroundColor: (theme.vars || theme).palette.action.selected
124
124
  }
125
125
  },
126
126
  [`&.${paginationItemClasses.focusVisible}`]: {
127
- backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
127
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selected} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
128
128
  },
129
129
  [`&.${paginationItemClasses.disabled}`]: {
130
130
  opacity: 1,
131
- color: theme.palette.action.disabled,
132
- backgroundColor: theme.palette.action.selected
131
+ color: (theme.vars || theme).palette.action.disabled,
132
+ backgroundColor: (theme.vars || theme).palette.action.selected
133
133
  }
134
134
  }
135
135
  }, ownerState.size === 'small' && {
@@ -145,49 +145,49 @@ const PaginationItemPage = styled(ButtonBase, {
145
145
  padding: '0 10px',
146
146
  fontSize: theme.typography.pxToRem(15)
147
147
  }, ownerState.shape === 'rounded' && {
148
- borderRadius: theme.shape.borderRadius
148
+ borderRadius: (theme.vars || theme).shape.borderRadius
149
149
  }), ({
150
150
  theme,
151
151
  ownerState
152
152
  }) => _extends({}, ownerState.variant === 'text' && {
153
153
  [`&.${paginationItemClasses.selected}`]: _extends({}, ownerState.color !== 'standard' && {
154
- color: theme.palette[ownerState.color].contrastText,
155
- backgroundColor: theme.palette[ownerState.color].main,
154
+ color: (theme.vars || theme).palette[ownerState.color].contrastText,
155
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
156
156
  '&:hover': {
157
- backgroundColor: theme.palette[ownerState.color].dark,
157
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
158
158
  // Reset on touch devices, it doesn't add specificity
159
159
  '@media (hover: none)': {
160
- backgroundColor: theme.palette[ownerState.color].main
160
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].main
161
161
  }
162
162
  },
163
163
  [`&.${paginationItemClasses.focusVisible}`]: {
164
- backgroundColor: theme.palette[ownerState.color].dark
164
+ backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
165
165
  }
166
166
  }, {
167
167
  [`&.${paginationItemClasses.disabled}`]: {
168
- color: theme.palette.action.disabled
168
+ color: (theme.vars || theme).palette.action.disabled
169
169
  }
170
170
  })
171
171
  }, ownerState.variant === 'outlined' && {
172
- border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
172
+ border: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
173
173
  [`&.${paginationItemClasses.selected}`]: _extends({}, ownerState.color !== 'standard' && {
174
- color: theme.palette[ownerState.color].main,
175
- border: `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`,
176
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity),
174
+ color: (theme.vars || theme).palette[ownerState.color].main,
175
+ border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)}`,
176
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.activatedOpacity})` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity),
177
177
  '&:hover': {
178
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity),
178
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity),
179
179
  // Reset on touch devices, it doesn't add specificity
180
180
  '@media (hover: none)': {
181
181
  backgroundColor: 'transparent'
182
182
  }
183
183
  },
184
184
  [`&.${paginationItemClasses.focusVisible}`]: {
185
- backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity)
185
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity)
186
186
  }
187
187
  }, {
188
188
  [`&.${paginationItemClasses.disabled}`]: {
189
- borderColor: theme.palette.action.disabledBackground,
190
- color: theme.palette.action.disabled
189
+ borderColor: (theme.vars || theme).palette.action.disabledBackground,
190
+ color: (theme.vars || theme).palette.action.disabled
191
191
  }
192
192
  })
193
193
  }));
@@ -13,8 +13,7 @@ import useTheme from '../styles/useTheme';
13
13
  import { getPaperUtilityClass } from './paperClasses'; // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
14
14
 
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
-
17
- const getOverlayAlpha = elevation => {
16
+ export const getOverlayAlpha = elevation => {
18
17
  let alphaValue;
19
18
 
20
19
  if (elevation < 1) {
@@ -52,17 +51,19 @@ const PaperRoot = styled('div', {
52
51
  theme,
53
52
  ownerState
54
53
  }) => _extends({
55
- backgroundColor: theme.palette.background.paper,
56
- color: theme.palette.text.primary,
54
+ backgroundColor: (theme.vars || theme).palette.background.paper,
55
+ color: (theme.vars || theme).palette.text.primary,
57
56
  transition: theme.transitions.create('box-shadow')
58
57
  }, !ownerState.square && {
59
58
  borderRadius: theme.shape.borderRadius
60
59
  }, ownerState.variant === 'outlined' && {
61
- border: `1px solid ${theme.palette.divider}`
60
+ border: `1px solid ${(theme.vars || theme).palette.divider}`
62
61
  }, ownerState.variant === 'elevation' && _extends({
63
- boxShadow: theme.shadows[ownerState.elevation]
64
- }, theme.palette.mode === 'dark' && {
62
+ boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
63
+ }, !theme.vars && theme.palette.mode === 'dark' && {
65
64
  backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`
65
+ }, theme.vars && {
66
+ backgroundImage: theme.vars.overlays?.[ownerState.elevation]
66
67
  })));
67
68
  const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
68
69
  const props = useThemeProps({
@@ -41,9 +41,9 @@ const RadioRoot = styled(SwitchBase, {
41
41
  theme,
42
42
  ownerState
43
43
  }) => _extends({
44
- color: theme.palette.text.secondary,
44
+ color: (theme.vars || theme).palette.text.secondary,
45
45
  '&:hover': {
46
- backgroundColor: alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
46
+ backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
47
47
  // Reset on touch devices, it doesn't add specificity
48
48
  '@media (hover: none)': {
49
49
  backgroundColor: 'transparent'
@@ -51,11 +51,11 @@ const RadioRoot = styled(SwitchBase, {
51
51
  }
52
52
  }, ownerState.color !== 'default' && {
53
53
  [`&.${radioClasses.checked}`]: {
54
- color: theme.palette[ownerState.color].main
54
+ color: (theme.vars || theme).palette[ownerState.color].main
55
55
  }
56
56
  }, {
57
57
  [`&.${radioClasses.disabled}`]: {
58
- color: theme.palette.action.disabled
58
+ color: (theme.vars || theme).palette.action.disabled
59
59
  }
60
60
  }));
61
61
 
@@ -92,7 +92,7 @@ const RatingRoot = styled('span', {
92
92
  textAlign: 'left',
93
93
  WebkitTapHighlightColor: 'transparent',
94
94
  [`&.${ratingClasses.disabled}`]: {
95
- opacity: theme.palette.action.disabledOpacity,
95
+ opacity: (theme.vars || theme).palette.action.disabledOpacity,
96
96
  pointerEvents: 'none'
97
97
  },
98
98
  [`&.${ratingClasses.focusVisible} .${ratingClasses.iconActive}`]: {
@@ -145,7 +145,7 @@ const RatingIcon = styled('span', {
145
145
  }, ownerState.iconActive && {
146
146
  transform: 'scale(1.2)'
147
147
  }, ownerState.iconEmpty && {
148
- color: theme.palette.action.disabled
148
+ color: (theme.vars || theme).palette.action.disabled
149
149
  }));
150
150
  const RatingDecimal = styled('span', {
151
151
  name: 'MuiRating',
@@ -311,8 +311,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
311
311
 
312
312
  const handleKeyDown = event => {
313
313
  if (!readOnly) {
314
- const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by
315
- // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
314
+ const validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on macOS, but it's recommended by
315
+ // https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
316
316
  'Enter'];
317
317
 
318
318
  if (validKeys.indexOf(event.key) !== -1) {
@@ -22,11 +22,7 @@ const SliderRoot = styled('span', {
22
22
  const {
23
23
  ownerState
24
24
  } = props;
25
- const marks = ownerState.marksProp === true && ownerState.step !== null ? [...Array(Math.floor((ownerState.max - ownerState.min) / ownerState.step) + 1)].map((_, index) => ({
26
- value: ownerState.min + ownerState.step * index
27
- })) : ownerState.marksProp || [];
28
- const marked = marks.length > 0 && marks.some(mark => mark.label);
29
- return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
25
+ return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];
30
26
  }
31
27
  })(({
32
28
  theme,
@@ -52,7 +52,7 @@ const SnackbarRoot = styled('div', {
52
52
  });
53
53
 
54
54
  return _extends({
55
- zIndex: theme.zIndex.snackbar,
55
+ zIndex: (theme.vars || theme).zIndex.snackbar,
56
56
  position: 'fixed',
57
57
  display: 'flex',
58
58
  left: 8,
@@ -74,7 +74,7 @@ const SpeedDialRoot = styled('div', {
74
74
  theme,
75
75
  ownerState
76
76
  }) => _extends({
77
- zIndex: theme.zIndex.speedDial,
77
+ zIndex: (theme.vars || theme).zIndex.speedDial,
78
78
  display: 'flex',
79
79
  alignItems: 'center',
80
80
  pointerEvents: 'none'
@@ -42,15 +42,15 @@ const StepIconRoot = styled(SvgIcon, {
42
42
  transition: theme.transitions.create('color', {
43
43
  duration: theme.transitions.duration.shortest
44
44
  }),
45
- color: theme.palette.text.disabled,
45
+ color: (theme.vars || theme).palette.text.disabled,
46
46
  [`&.${stepIconClasses.completed}`]: {
47
- color: theme.palette.primary.main
47
+ color: (theme.vars || theme).palette.primary.main
48
48
  },
49
49
  [`&.${stepIconClasses.active}`]: {
50
- color: theme.palette.primary.main
50
+ color: (theme.vars || theme).palette.primary.main
51
51
  },
52
52
  [`&.${stepIconClasses.error}`]: {
53
- color: theme.palette.error.main
53
+ color: (theme.vars || theme).palette.error.main
54
54
  }
55
55
  }));
56
56
  const StepIconText = styled('text', {
@@ -60,7 +60,7 @@ const StepIconText = styled('text', {
60
60
  })(({
61
61
  theme
62
62
  }) => ({
63
- fill: theme.palette.primary.contrastText,
63
+ fill: (theme.vars || theme).palette.primary.contrastText,
64
64
  fontSize: theme.typography.caption.fontSize,
65
65
  fontFamily: theme.typography.fontFamily
66
66
  }));
@@ -69,11 +69,11 @@ const StepLabelLabel = styled('span', {
69
69
  duration: theme.transitions.duration.shortest
70
70
  }),
71
71
  [`&.${stepLabelClasses.active}`]: {
72
- color: theme.palette.text.primary,
72
+ color: (theme.vars || theme).palette.text.primary,
73
73
  fontWeight: 500
74
74
  },
75
75
  [`&.${stepLabelClasses.completed}`]: {
76
- color: theme.palette.text.primary,
76
+ color: (theme.vars || theme).palette.text.primary,
77
77
  fontWeight: 500
78
78
  },
79
79
  [`&.${stepLabelClasses.alternativeLabel}`]: {
@@ -81,7 +81,7 @@ const StepLabelLabel = styled('span', {
81
81
  marginTop: 16
82
82
  },
83
83
  [`&.${stepLabelClasses.error}`]: {
84
- color: theme.palette.error.main
84
+ color: (theme.vars || theme).palette.error.main
85
85
  }
86
86
  }));
87
87
  const StepLabelIconContainer = styled('span', {
@@ -105,7 +105,7 @@ const StepLabelLabelContainer = styled('span', {
105
105
  theme
106
106
  }) => ({
107
107
  width: '100%',
108
- color: theme.palette.text.secondary
108
+ color: (theme.vars || theme).palette.text.secondary
109
109
  }));
110
110
  const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
111
111
  const props = useThemeProps({
@@ -1,12 +1,20 @@
1
1
  import * as React from 'react';
2
+
2
3
  /**
3
- * @ignore - internal component.
4
+ * Provides information about the current step in Stepper.
4
5
  */
5
-
6
6
  const StepperContext = /*#__PURE__*/React.createContext({});
7
7
 
8
8
  if (process.env.NODE_ENV !== 'production') {
9
9
  StepperContext.displayName = 'StepperContext';
10
10
  }
11
+ /**
12
+ * Returns the current StepperContext or an empty object if no StepperContext
13
+ * has been defined in the component tree.
14
+ */
15
+
11
16
 
17
+ export function useStepperContext() {
18
+ return React.useContext(StepperContext);
19
+ }
12
20
  export default StepperContext;
@@ -1,3 +1,5 @@
1
1
  export { default } from './Stepper';
2
2
  export { default as stepperClasses } from './stepperClasses';
3
- export * from './stepperClasses';
3
+ export * from './stepperClasses';
4
+ export { default as StepperContext } from './StepperContext';
5
+ export * from './StepperContext';
@@ -53,9 +53,9 @@ const SvgIconRoot = styled('svg', {
53
53
  large: theme.typography?.pxToRem?.(35) || '2.1875'
54
54
  }[ownerState.fontSize],
55
55
  // TODO v5 deprecate, v6 remove for sx
56
- color: theme.palette?.[ownerState.color]?.main ?? {
57
- action: theme.palette?.action?.active,
58
- disabled: theme.palette?.action?.disabled,
56
+ color: (theme.vars || theme).palette?.[ownerState.color]?.main ?? {
57
+ action: (theme.vars || theme).palette?.action?.active,
58
+ disabled: (theme.vars || theme).palette?.action?.disabled,
59
59
  inherit: undefined
60
60
  }[ownerState.color]
61
61
  }));
package/modern/Tab/Tab.js CHANGED
@@ -78,23 +78,23 @@ const TabRoot = styled(ButtonBase, {
78
78
  opacity: 1
79
79
  },
80
80
  [`&.${tabClasses.disabled}`]: {
81
- opacity: theme.palette.action.disabledOpacity
81
+ opacity: (theme.vars || theme).palette.action.disabledOpacity
82
82
  }
83
83
  }, ownerState.textColor === 'primary' && {
84
- color: theme.palette.text.secondary,
84
+ color: (theme.vars || theme).palette.text.secondary,
85
85
  [`&.${tabClasses.selected}`]: {
86
- color: theme.palette.primary.main
86
+ color: (theme.vars || theme).palette.primary.main
87
87
  },
88
88
  [`&.${tabClasses.disabled}`]: {
89
- color: theme.palette.text.disabled
89
+ color: (theme.vars || theme).palette.text.disabled
90
90
  }
91
91
  }, ownerState.textColor === 'secondary' && {
92
- color: theme.palette.text.secondary,
92
+ color: (theme.vars || theme).palette.text.secondary,
93
93
  [`&.${tabClasses.selected}`]: {
94
- color: theme.palette.secondary.main
94
+ color: (theme.vars || theme).palette.secondary.main
95
95
  },
96
96
  [`&.${tabClasses.disabled}`]: {
97
- color: theme.palette.text.disabled
97
+ color: (theme.vars || theme).palette.text.disabled
98
98
  }
99
99
  }, ownerState.fullWidth && {
100
100
  flexShrink: 1,
@@ -41,7 +41,7 @@ const TableRoot = styled('table', {
41
41
  borderSpacing: 0,
42
42
  '& caption': _extends({}, theme.typography.body2, {
43
43
  padding: theme.spacing(2),
44
- color: theme.palette.text.secondary,
44
+ color: (theme.vars || theme).palette.text.secondary,
45
45
  textAlign: 'left',
46
46
  captionSide: 'bottom'
47
47
  })
@@ -30,7 +30,7 @@ const TablePaginationRoot = styled(TableCell, {
30
30
  theme
31
31
  }) => ({
32
32
  overflow: 'auto',
33
- color: theme.palette.text.primary,
33
+ color: (theme.vars || theme).palette.text.primary,
34
34
  fontSize: theme.typography.pxToRem(14),
35
35
  // Increase the specificity to override TableCell.
36
36
  '&:last-child': {
@@ -44,12 +44,12 @@ const TableRowRoot = styled('tr', {
44
44
  // We disable the focus ring for mouse, touch and keyboard users.
45
45
  outline: 0,
46
46
  [`&.${tableRowClasses.hover}:hover`]: {
47
- backgroundColor: theme.palette.action.hover
47
+ backgroundColor: (theme.vars || theme).palette.action.hover
48
48
  },
49
49
  [`&.${tableRowClasses.selected}`]: {
50
- backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
50
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
51
51
  '&:hover': {
52
- backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
52
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
53
53
  }
54
54
  }
55
55
  }));
@@ -45,19 +45,19 @@ const TableSortLabelRoot = styled(ButtonBase, {
45
45
  flexDirection: 'inherit',
46
46
  alignItems: 'center',
47
47
  '&:focus': {
48
- color: theme.palette.text.secondary
48
+ color: (theme.vars || theme).palette.text.secondary
49
49
  },
50
50
  '&:hover': {
51
- color: theme.palette.text.secondary,
51
+ color: (theme.vars || theme).palette.text.secondary,
52
52
  [`& .${tableSortLabelClasses.icon}`]: {
53
53
  opacity: 0.5
54
54
  }
55
55
  },
56
56
  [`&.${tableSortLabelClasses.active}`]: {
57
- color: theme.palette.text.primary,
57
+ color: (theme.vars || theme).palette.text.primary,
58
58
  [`& .${tableSortLabelClasses.icon}`]: {
59
59
  opacity: 1,
60
- color: theme.palette.text.secondary
60
+ color: (theme.vars || theme).palette.text.secondary
61
61
  }
62
62
  }
63
63
  }));
@@ -147,7 +147,7 @@ const TabsScroller = styled('div', {
147
147
  overflowX: 'hidden',
148
148
  width: '100%'
149
149
  }, ownerState.hideScrollbar && {
150
- // Hide dimensionless scrollbar on MacOS
150
+ // Hide dimensionless scrollbar on macOS
151
151
  scrollbarWidth: 'none',
152
152
  // Firefox
153
153
  '&::-webkit-scrollbar': {
@@ -193,9 +193,9 @@ const TabsIndicator = styled('span', {
193
193
  width: '100%',
194
194
  transition: theme.transitions.create()
195
195
  }, ownerState.indicatorColor === 'primary' && {
196
- backgroundColor: theme.palette.primary.main
196
+ backgroundColor: (theme.vars || theme).palette.primary.main
197
197
  }, ownerState.indicatorColor === 'secondary' && {
198
- backgroundColor: theme.palette.secondary.main
198
+ backgroundColor: (theme.vars || theme).palette.secondary.main
199
199
  }, ownerState.vertical && {
200
200
  height: '100%',
201
201
  width: 2,
@@ -207,7 +207,7 @@ const TabsScrollbarSize = styled(ScrollbarSize, {
207
207
  })({
208
208
  overflowX: 'auto',
209
209
  overflowY: 'hidden',
210
- // Hide dimensionless scrollbar on MacOS
210
+ // Hide dimensionless scrollbar on macOS
211
211
  scrollbarWidth: 'none',
212
212
  // Firefox
213
213
  '&::-webkit-scrollbar': {
@@ -42,35 +42,42 @@ const ToggleButtonRoot = styled(ButtonBase, {
42
42
  theme,
43
43
  ownerState
44
44
  }) => {
45
- const selectedColor = ownerState.color === 'standard' ? theme.palette.text.primary : theme.palette[ownerState.color].main;
45
+ let selectedColor = ownerState.color === 'standard' ? theme.palette.text.primary : theme.palette[ownerState.color].main;
46
+ let selectedColorChannel;
47
+
48
+ if (theme.vars) {
49
+ selectedColor = ownerState.color === 'standard' ? theme.vars.palette.text.primary : theme.vars.palette[ownerState.color].main;
50
+ selectedColorChannel = ownerState.color === 'standard' ? theme.vars.palette.text.primaryChannel : theme.vars.palette[ownerState.color].mainChannel;
51
+ }
52
+
46
53
  return _extends({}, theme.typography.button, {
47
- borderRadius: theme.shape.borderRadius,
54
+ borderRadius: (theme.vars || theme).shape.borderRadius,
48
55
  padding: 11,
49
- border: `1px solid ${theme.palette.divider}`,
50
- color: theme.palette.action.active
56
+ border: `1px solid ${(theme.vars || theme).palette.divider}`,
57
+ color: (theme.vars || theme).palette.action.active
51
58
  }, ownerState.fullWidth && {
52
59
  width: '100%'
53
60
  }, {
54
61
  [`&.${toggleButtonClasses.disabled}`]: {
55
- color: theme.palette.action.disabled,
56
- border: `1px solid ${theme.palette.action.disabledBackground}`
62
+ color: (theme.vars || theme).palette.action.disabled,
63
+ border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
57
64
  },
58
65
  '&:hover': {
59
66
  textDecoration: 'none',
60
67
  // Reset on mouse devices
61
- backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
68
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
62
69
  '@media (hover: none)': {
63
70
  backgroundColor: 'transparent'
64
71
  }
65
72
  },
66
73
  [`&.${toggleButtonClasses.selected}`]: {
67
74
  color: selectedColor,
68
- backgroundColor: alpha(selectedColor, theme.palette.action.selectedOpacity),
75
+ backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(selectedColor, theme.palette.action.selectedOpacity),
69
76
  '&:hover': {
70
- backgroundColor: alpha(selectedColor, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
77
+ backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(selectedColor, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
71
78
  // Reset on touch devices, it doesn't add specificity
72
79
  '@media (hover: none)': {
73
- backgroundColor: alpha(selectedColor, theme.palette.action.selectedOpacity)
80
+ backgroundColor: theme.vars ? `rgba(${selectedColorChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(selectedColor, theme.palette.action.selectedOpacity)
74
81
  }
75
82
  }
76
83
  }
@@ -45,7 +45,7 @@ const ToggleButtonGroupRoot = styled('div', {
45
45
  theme
46
46
  }) => _extends({
47
47
  display: 'inline-flex',
48
- borderRadius: theme.shape.borderRadius
48
+ borderRadius: (theme.vars || theme).shape.borderRadius
49
49
  }, ownerState.orientation === 'vertical' && {
50
50
  flexDirection: 'column'
51
51
  }, ownerState.fullWidth && {
@@ -56,7 +56,7 @@ const TooltipPopper = styled(Popper, {
56
56
  ownerState,
57
57
  open
58
58
  }) => _extends({
59
- zIndex: theme.zIndex.tooltip,
59
+ zIndex: (theme.vars || theme).zIndex.tooltip,
60
60
  pointerEvents: 'none'
61
61
  }, !ownerState.disableInteractive && {
62
62
  pointerEvents: 'auto'
@@ -117,9 +117,9 @@ const TooltipTooltip = styled('div', {
117
117
  theme,
118
118
  ownerState
119
119
  }) => _extends({
120
- backgroundColor: alpha(theme.palette.grey[700], 0.92),
121
- borderRadius: theme.shape.borderRadius,
122
- color: theme.palette.common.white,
120
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.grey.darkChannel} / 0.92)` : alpha(theme.palette.grey[700], 0.92),
121
+ borderRadius: (theme.vars || theme).shape.borderRadius,
122
+ color: (theme.vars || theme).palette.common.white,
123
123
  fontFamily: theme.typography.fontFamily,
124
124
  padding: '4px 8px',
125
125
  fontSize: theme.typography.pxToRem(11),
@@ -185,7 +185,7 @@ const TooltipArrow = styled('span', {
185
185
  /* = width / sqrt(2) = (length of the hypotenuse) */
186
186
  ,
187
187
  boxSizing: 'border-box',
188
- color: alpha(theme.palette.grey[700], 0.9),
188
+ color: theme.vars ? `rgba(${theme.vars.palette.grey.darkChannel} / 0.9)` : alpha(theme.palette.grey[700], 0.9),
189
189
  '&::before': {
190
190
  content: '""',
191
191
  margin: 'auto',
@@ -1,9 +1,2 @@
1
- /**
2
- * Caution! this module must not include unstyled components import from `@mui/base`, otherwise, it will break the ClassNameGenerator.
3
- * ❌ import { ... } from '@mui/base';
4
- * ✅ import { ... } from '@mui/base/utils'; // must be specific base module
5
- *
6
- * Issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401
7
- */
8
1
  // eslint-disable-next-line import/prefer-default-export
9
- export { unstable_ClassNameGenerator } from '@mui/base/className';
2
+ export { unstable_ClassNameGenerator } from '@mui/utils';
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.6.4
1
+ /** @license MUI v5.8.1
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.