@mui/material 5.0.0-rc.1 → 5.0.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 (378) hide show
  1. package/Accordion/Accordion.d.ts +4 -4
  2. package/Accordion/Accordion.js +3 -3
  3. package/Accordion/AccordionContext.js +1 -1
  4. package/AccordionActions/AccordionActions.d.ts +2 -2
  5. package/AccordionDetails/AccordionDetails.d.ts +2 -2
  6. package/AccordionSummary/AccordionSummary.d.ts +3 -3
  7. package/Alert/Alert.d.ts +3 -3
  8. package/AlertTitle/AlertTitle.d.ts +2 -2
  9. package/AppBar/AppBar.d.ts +3 -3
  10. package/Autocomplete/Autocomplete.d.ts +2 -2
  11. package/Autocomplete/Autocomplete.js +2 -2
  12. package/Avatar/Avatar.d.ts +2 -2
  13. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  14. package/AvatarGroup/AvatarGroup.js +2 -2
  15. package/Backdrop/Backdrop.d.ts +3 -3
  16. package/Badge/Badge.d.ts +4 -4
  17. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  18. package/BottomNavigation/BottomNavigation.js +1 -1
  19. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  20. package/Box/Box.d.ts +4 -4
  21. package/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  22. package/Breadcrumbs/Breadcrumbs.js +2 -2
  23. package/Button/Button.d.ts +4 -4
  24. package/ButtonBase/ButtonBase.d.ts +2 -2
  25. package/ButtonBase/ButtonBase.js +200 -30
  26. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  27. package/ButtonGroup/ButtonGroup.js +1 -1
  28. package/CHANGELOG.md +119 -39
  29. package/Card/Card.d.ts +3 -3
  30. package/Card/Card.js +1 -1
  31. package/CardActionArea/CardActionArea.d.ts +3 -3
  32. package/CardActions/CardActions.d.ts +2 -2
  33. package/CardContent/CardContent.d.ts +2 -2
  34. package/CardHeader/CardHeader.d.ts +2 -2
  35. package/CardMedia/CardMedia.d.ts +2 -2
  36. package/CardMedia/CardMedia.js +1 -1
  37. package/Checkbox/Checkbox.d.ts +4 -4
  38. package/Checkbox/Checkbox.js +1 -1
  39. package/Chip/Chip.d.ts +2 -2
  40. package/Chip/Chip.js +1 -1
  41. package/CircularProgress/CircularProgress.d.ts +2 -2
  42. package/CircularProgress/CircularProgress.js +1 -1
  43. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  44. package/ClickAwayListener/ClickAwayListener.js +3 -3
  45. package/Collapse/Collapse.d.ts +5 -5
  46. package/Container/Container.d.ts +2 -2
  47. package/CssBaseline/CssBaseline.d.ts +2 -2
  48. package/Dialog/Dialog.d.ts +4 -4
  49. package/Dialog/Dialog.js +1 -1
  50. package/DialogActions/DialogActions.d.ts +2 -2
  51. package/DialogContent/DialogContent.d.ts +2 -2
  52. package/DialogContentText/DialogContentText.d.ts +3 -3
  53. package/DialogTitle/DialogTitle.d.ts +2 -2
  54. package/Divider/Divider.d.ts +3 -3
  55. package/Drawer/Drawer.d.ts +3 -3
  56. package/Fab/Fab.d.ts +3 -3
  57. package/Fade/Fade.d.ts +3 -3
  58. package/FilledInput/FilledInput.d.ts +3 -3
  59. package/FormControl/FormControl.d.ts +6 -6
  60. package/FormControl/FormControl.js +1 -1
  61. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  62. package/FormGroup/FormGroup.d.ts +3 -3
  63. package/FormHelperText/FormHelperText.d.ts +2 -2
  64. package/FormLabel/FormLabel.d.ts +4 -4
  65. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  66. package/Grid/Grid.d.ts +2 -2
  67. package/Grow/Grow.d.ts +5 -5
  68. package/Hidden/Hidden.d.ts +2 -2
  69. package/Hidden/HiddenCss.js +1 -1
  70. package/Icon/Icon.d.ts +3 -3
  71. package/IconButton/IconButton.d.ts +4 -4
  72. package/IconButton/IconButton.js +1 -1
  73. package/ImageList/ImageList.d.ts +2 -2
  74. package/ImageList/ImageList.js +2 -4
  75. package/ImageListItem/ImageListItem.d.ts +2 -2
  76. package/ImageListItem/ImageListItem.js +1 -1
  77. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  78. package/Input/Input.d.ts +3 -3
  79. package/InputAdornment/InputAdornment.d.ts +2 -2
  80. package/InputAdornment/InputAdornment.js +1 -1
  81. package/InputBase/InputBase.d.ts +2 -2
  82. package/InputBase/InputBase.js +3 -3
  83. package/InputLabel/InputLabel.d.ts +3 -3
  84. package/LinearProgress/LinearProgress.d.ts +2 -2
  85. package/LinearProgress/LinearProgress.js +2 -2
  86. package/Link/Link.d.ts +4 -4
  87. package/List/List.d.ts +3 -3
  88. package/ListItem/ListItem.d.ts +3 -3
  89. package/ListItem/ListItem.js +2 -2
  90. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  91. package/ListItemButton/ListItemButton.d.ts +3 -3
  92. package/ListItemButton/ListItemButton.js +1 -1
  93. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  94. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  95. package/ListItemText/ListItemText.d.ts +2 -2
  96. package/ListSubheader/ListSubheader.d.ts +2 -2
  97. package/Menu/Menu.d.ts +5 -5
  98. package/Menu/Menu.js +2 -2
  99. package/MenuItem/MenuItem.d.ts +3 -3
  100. package/MenuItem/MenuItem.js +1 -1
  101. package/MenuList/MenuList.d.ts +4 -4
  102. package/MenuList/MenuList.js +1 -1
  103. package/MobileStepper/MobileStepper.d.ts +3 -3
  104. package/Modal/Modal.d.ts +7 -7
  105. package/NativeSelect/NativeSelect.d.ts +3 -3
  106. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  107. package/Pagination/Pagination.d.ts +2 -2
  108. package/PaginationItem/PaginationItem.d.ts +2 -2
  109. package/Paper/Paper.d.ts +3 -3
  110. package/Paper/Paper.js +2 -2
  111. package/Popover/Popover.d.ts +5 -5
  112. package/Popover/Popover.js +6 -6
  113. package/Popper/Popper.d.ts +4 -4
  114. package/Popper/Popper.js +3 -3
  115. package/README.md +24 -35
  116. package/Radio/Radio.d.ts +3 -3
  117. package/RadioGroup/RadioGroup.d.ts +3 -3
  118. package/Rating/Rating.d.ts +2 -2
  119. package/Rating/Rating.js +1 -1
  120. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +4 -4
  121. package/Select/Select.d.ts +3 -3
  122. package/Select/SelectInput.js +3 -3
  123. package/Skeleton/Skeleton.d.ts +2 -2
  124. package/Slide/Slide.d.ts +4 -4
  125. package/Slide/Slide.js +2 -2
  126. package/Slider/Slider.d.ts +3 -3
  127. package/Slider/Slider.js +2 -2
  128. package/Snackbar/Snackbar.d.ts +3 -3
  129. package/Snackbar/Snackbar.js +1 -1
  130. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  131. package/SpeedDial/SpeedDial.d.ts +3 -3
  132. package/SpeedDial/SpeedDial.js +2 -2
  133. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  134. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  135. package/Stack/Stack.d.ts +2 -2
  136. package/Step/Step.d.ts +2 -2
  137. package/StepButton/StepButton.d.ts +3 -3
  138. package/StepConnector/StepConnector.d.ts +2 -2
  139. package/StepContent/StepContent.d.ts +3 -3
  140. package/StepContent/StepContent.js +2 -2
  141. package/StepIcon/StepIcon.d.ts +2 -2
  142. package/StepLabel/StepLabel.d.ts +2 -2
  143. package/Stepper/Stepper.d.ts +2 -2
  144. package/SvgIcon/SvgIcon.d.ts +3 -3
  145. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  146. package/Switch/Switch.d.ts +4 -4
  147. package/Tab/Tab.d.ts +3 -3
  148. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  149. package/Table/Table.d.ts +2 -2
  150. package/TableBody/TableBody.d.ts +2 -2
  151. package/TableCell/TableCell.d.ts +2 -2
  152. package/TableContainer/TableContainer.d.ts +2 -2
  153. package/TableFooter/TableFooter.d.ts +2 -2
  154. package/TableHead/TableHead.d.ts +2 -2
  155. package/TablePagination/TablePagination.d.ts +3 -3
  156. package/TablePagination/TablePagination.js +1 -1
  157. package/TableRow/TableRow.d.ts +2 -2
  158. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  159. package/Tabs/Tabs.d.ts +2 -2
  160. package/Tabs/Tabs.js +4 -4
  161. package/TextField/TextField.d.ts +11 -11
  162. package/TextField/TextField.js +4 -2
  163. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  164. package/TextareaAutosize/TextareaAutosize.js +1 -1
  165. package/ToggleButton/ToggleButton.d.ts +3 -3
  166. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  167. package/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  168. package/Toolbar/Toolbar.d.ts +2 -2
  169. package/Tooltip/Tooltip.d.ts +3 -3
  170. package/Tooltip/Tooltip.js +5 -5
  171. package/Typography/Typography.d.ts +3 -3
  172. package/Zoom/Zoom.d.ts +3 -3
  173. package/colors/amber.d.ts +15 -15
  174. package/colors/blue.d.ts +15 -15
  175. package/colors/blueGrey.d.ts +15 -15
  176. package/colors/brown.d.ts +15 -15
  177. package/colors/common.d.ts +3 -3
  178. package/colors/cyan.d.ts +15 -15
  179. package/colors/deepOrange.d.ts +15 -15
  180. package/colors/deepPurple.d.ts +15 -15
  181. package/colors/green.d.ts +15 -15
  182. package/colors/grey.d.ts +15 -15
  183. package/colors/indigo.d.ts +15 -15
  184. package/colors/lightBlue.d.ts +15 -15
  185. package/colors/lightGreen.d.ts +15 -15
  186. package/colors/lime.d.ts +15 -15
  187. package/colors/orange.d.ts +15 -15
  188. package/colors/pink.d.ts +15 -15
  189. package/colors/purple.d.ts +15 -15
  190. package/colors/red.d.ts +15 -15
  191. package/colors/teal.d.ts +15 -15
  192. package/colors/yellow.d.ts +15 -15
  193. package/index.js +1 -1
  194. package/legacy/Accordion/Accordion.js +3 -3
  195. package/legacy/Accordion/AccordionContext.js +1 -1
  196. package/legacy/Autocomplete/Autocomplete.js +2 -2
  197. package/legacy/AvatarGroup/AvatarGroup.js +2 -2
  198. package/legacy/BottomNavigation/BottomNavigation.js +1 -1
  199. package/legacy/Breadcrumbs/Breadcrumbs.js +2 -2
  200. package/legacy/ButtonBase/ButtonBase.js +191 -28
  201. package/legacy/ButtonGroup/ButtonGroup.js +1 -1
  202. package/legacy/Card/Card.js +1 -1
  203. package/legacy/CardMedia/CardMedia.js +1 -1
  204. package/legacy/Checkbox/Checkbox.js +1 -1
  205. package/legacy/Chip/Chip.js +1 -1
  206. package/legacy/CircularProgress/CircularProgress.js +1 -1
  207. package/legacy/ClickAwayListener/ClickAwayListener.js +3 -3
  208. package/legacy/Dialog/Dialog.js +1 -1
  209. package/legacy/FormControl/FormControl.js +1 -1
  210. package/legacy/Hidden/HiddenCss.js +1 -1
  211. package/legacy/IconButton/IconButton.js +1 -1
  212. package/legacy/ImageList/ImageList.js +2 -4
  213. package/legacy/ImageListItem/ImageListItem.js +1 -1
  214. package/legacy/InputAdornment/InputAdornment.js +1 -1
  215. package/legacy/InputBase/InputBase.js +3 -3
  216. package/legacy/LinearProgress/LinearProgress.js +2 -2
  217. package/legacy/ListItem/ListItem.js +2 -2
  218. package/legacy/ListItemButton/ListItemButton.js +1 -1
  219. package/legacy/Menu/Menu.js +2 -2
  220. package/legacy/MenuItem/MenuItem.js +1 -1
  221. package/legacy/MenuList/MenuList.js +1 -1
  222. package/legacy/Paper/Paper.js +2 -2
  223. package/legacy/Popover/Popover.js +6 -6
  224. package/legacy/Popper/Popper.js +3 -3
  225. package/legacy/Rating/Rating.js +1 -1
  226. package/legacy/Select/SelectInput.js +3 -3
  227. package/legacy/Slide/Slide.js +2 -2
  228. package/legacy/Slider/Slider.js +2 -2
  229. package/legacy/Snackbar/Snackbar.js +1 -1
  230. package/legacy/SpeedDial/SpeedDial.js +2 -2
  231. package/legacy/StepContent/StepContent.js +2 -2
  232. package/legacy/TablePagination/TablePagination.js +1 -1
  233. package/legacy/Tabs/Tabs.js +4 -4
  234. package/legacy/TextField/TextField.js +4 -2
  235. package/legacy/TextareaAutosize/TextareaAutosize.js +1 -1
  236. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  237. package/legacy/Tooltip/Tooltip.js +5 -5
  238. package/legacy/index.js +1 -1
  239. package/legacy/styles/adaptV4Theme.js +1 -1
  240. package/legacy/styles/createPalette.js +4 -4
  241. package/legacy/styles/createStyles.js +1 -1
  242. package/legacy/styles/createTheme.js +3 -3
  243. package/legacy/styles/createTransitions.js +5 -5
  244. package/legacy/styles/createTypography.js +2 -2
  245. package/legacy/styles/makeStyles.js +1 -1
  246. package/legacy/styles/responsiveFontSizes.js +1 -1
  247. package/legacy/styles/withStyles.js +1 -1
  248. package/legacy/styles/withTheme.js +1 -1
  249. package/legacy/useMediaQuery/useMediaQuery.js +2 -2
  250. package/modern/Accordion/Accordion.js +3 -3
  251. package/modern/Accordion/AccordionContext.js +1 -1
  252. package/modern/Autocomplete/Autocomplete.js +2 -2
  253. package/modern/AvatarGroup/AvatarGroup.js +2 -2
  254. package/modern/BottomNavigation/BottomNavigation.js +1 -1
  255. package/modern/Breadcrumbs/Breadcrumbs.js +2 -2
  256. package/modern/ButtonBase/ButtonBase.js +200 -30
  257. package/modern/ButtonGroup/ButtonGroup.js +1 -1
  258. package/modern/Card/Card.js +1 -1
  259. package/modern/CardMedia/CardMedia.js +1 -1
  260. package/modern/Checkbox/Checkbox.js +1 -1
  261. package/modern/Chip/Chip.js +1 -1
  262. package/modern/CircularProgress/CircularProgress.js +1 -1
  263. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  264. package/modern/Dialog/Dialog.js +1 -1
  265. package/modern/FormControl/FormControl.js +1 -1
  266. package/modern/Hidden/HiddenCss.js +1 -1
  267. package/modern/IconButton/IconButton.js +1 -1
  268. package/modern/ImageList/ImageList.js +2 -4
  269. package/modern/ImageListItem/ImageListItem.js +1 -1
  270. package/modern/InputAdornment/InputAdornment.js +1 -1
  271. package/modern/InputBase/InputBase.js +3 -3
  272. package/modern/LinearProgress/LinearProgress.js +2 -2
  273. package/modern/ListItem/ListItem.js +2 -2
  274. package/modern/ListItemButton/ListItemButton.js +1 -1
  275. package/modern/Menu/Menu.js +2 -2
  276. package/modern/MenuItem/MenuItem.js +1 -1
  277. package/modern/MenuList/MenuList.js +1 -1
  278. package/modern/Paper/Paper.js +2 -2
  279. package/modern/Popover/Popover.js +6 -6
  280. package/modern/Popper/Popper.js +3 -3
  281. package/modern/Rating/Rating.js +1 -1
  282. package/modern/Select/SelectInput.js +3 -3
  283. package/modern/Slide/Slide.js +2 -2
  284. package/modern/Slider/Slider.js +2 -2
  285. package/modern/Snackbar/Snackbar.js +1 -1
  286. package/modern/SpeedDial/SpeedDial.js +2 -2
  287. package/modern/StepContent/StepContent.js +2 -2
  288. package/modern/TablePagination/TablePagination.js +1 -1
  289. package/modern/Tabs/Tabs.js +4 -4
  290. package/modern/TextField/TextField.js +4 -2
  291. package/modern/TextareaAutosize/TextareaAutosize.js +1 -1
  292. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  293. package/modern/Tooltip/Tooltip.js +5 -5
  294. package/modern/index.js +1 -1
  295. package/modern/styles/adaptV4Theme.js +1 -1
  296. package/modern/styles/createPalette.js +4 -4
  297. package/modern/styles/createStyles.js +1 -1
  298. package/modern/styles/createTheme.js +3 -3
  299. package/modern/styles/createTransitions.js +5 -5
  300. package/modern/styles/createTypography.js +3 -3
  301. package/modern/styles/makeStyles.js +2 -2
  302. package/modern/styles/responsiveFontSizes.js +1 -1
  303. package/modern/styles/withStyles.js +2 -2
  304. package/modern/styles/withTheme.js +2 -2
  305. package/modern/useMediaQuery/useMediaQuery.js +2 -2
  306. package/node/Accordion/Accordion.js +3 -3
  307. package/node/Accordion/AccordionContext.js +1 -1
  308. package/node/Autocomplete/Autocomplete.js +2 -2
  309. package/node/AvatarGroup/AvatarGroup.js +2 -2
  310. package/node/BottomNavigation/BottomNavigation.js +1 -1
  311. package/node/Breadcrumbs/Breadcrumbs.js +2 -2
  312. package/node/ButtonBase/ButtonBase.js +202 -32
  313. package/node/ButtonGroup/ButtonGroup.js +1 -1
  314. package/node/Card/Card.js +1 -1
  315. package/node/CardMedia/CardMedia.js +1 -1
  316. package/node/Checkbox/Checkbox.js +1 -1
  317. package/node/Chip/Chip.js +1 -1
  318. package/node/CircularProgress/CircularProgress.js +1 -1
  319. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  320. package/node/Dialog/Dialog.js +1 -1
  321. package/node/FormControl/FormControl.js +1 -1
  322. package/node/Hidden/HiddenCss.js +1 -1
  323. package/node/IconButton/IconButton.js +1 -1
  324. package/node/ImageList/ImageList.js +2 -4
  325. package/node/ImageListItem/ImageListItem.js +1 -1
  326. package/node/InputAdornment/InputAdornment.js +1 -1
  327. package/node/InputBase/InputBase.js +3 -3
  328. package/node/LinearProgress/LinearProgress.js +2 -2
  329. package/node/ListItem/ListItem.js +2 -2
  330. package/node/ListItemButton/ListItemButton.js +1 -1
  331. package/node/Menu/Menu.js +2 -2
  332. package/node/MenuItem/MenuItem.js +1 -1
  333. package/node/MenuList/MenuList.js +1 -1
  334. package/node/Paper/Paper.js +2 -2
  335. package/node/Popover/Popover.js +6 -6
  336. package/node/Popper/Popper.js +3 -3
  337. package/node/Rating/Rating.js +1 -1
  338. package/node/Select/SelectInput.js +3 -3
  339. package/node/Slide/Slide.js +2 -2
  340. package/node/Slider/Slider.js +2 -2
  341. package/node/Snackbar/Snackbar.js +1 -1
  342. package/node/SpeedDial/SpeedDial.js +2 -2
  343. package/node/StepContent/StepContent.js +2 -2
  344. package/node/TablePagination/TablePagination.js +1 -1
  345. package/node/Tabs/Tabs.js +4 -4
  346. package/node/TextField/TextField.js +4 -2
  347. package/node/TextareaAutosize/TextareaAutosize.js +1 -1
  348. package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  349. package/node/Tooltip/Tooltip.js +5 -5
  350. package/node/index.js +1 -1
  351. package/node/styles/adaptV4Theme.js +1 -1
  352. package/node/styles/createPalette.js +4 -4
  353. package/node/styles/createStyles.js +1 -1
  354. package/node/styles/createTheme.js +3 -3
  355. package/node/styles/createTransitions.js +5 -5
  356. package/node/styles/createTypography.js +3 -3
  357. package/node/styles/makeStyles.js +2 -2
  358. package/node/styles/responsiveFontSizes.js +1 -1
  359. package/node/styles/withStyles.js +2 -2
  360. package/node/styles/withTheme.js +2 -2
  361. package/node/useMediaQuery/useMediaQuery.js +2 -2
  362. package/package.json +10 -10
  363. package/styles/ThemeProvider.d.ts +1 -1
  364. package/styles/adaptV4Theme.d.ts +2 -2
  365. package/styles/adaptV4Theme.js +1 -1
  366. package/styles/createPalette.js +4 -4
  367. package/styles/createStyles.js +1 -1
  368. package/styles/createTheme.d.ts +2 -2
  369. package/styles/createTheme.js +3 -3
  370. package/styles/createTransitions.js +5 -5
  371. package/styles/createTypography.js +3 -3
  372. package/styles/makeStyles.js +2 -2
  373. package/styles/responsiveFontSizes.js +1 -1
  374. package/styles/withStyles.js +2 -2
  375. package/styles/withTheme.js +2 -2
  376. package/umd/material-ui.development.js +787 -364
  377. package/umd/material-ui.production.min.js +21 -21
  378. package/useMediaQuery/useMediaQuery.js +2 -2
@@ -84,7 +84,7 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
84
84
 
85
85
  if (process.env.NODE_ENV !== 'production') {
86
86
  if (orientation !== 'vertical') {
87
- console.error('Material-UI: <StepContent /> is only designed for use with the vertical stepper.');
87
+ console.error('MUI: <StepContent /> is only designed for use with the vertical stepper.');
88
88
  }
89
89
  }
90
90
 
@@ -161,7 +161,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes
161
161
 
162
162
  /**
163
163
  * Props applied to the transition element.
164
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.
164
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
165
165
  */
166
166
  TransitionProps: PropTypes.object
167
167
  } : void 0;
@@ -372,7 +372,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes
372
372
  const newLastPage = Math.max(0, Math.ceil(count / rowsPerPage) - 1);
373
373
 
374
374
  if (page < 0 || page > newLastPage) {
375
- return new Error('Material-UI: The page prop of a TablePagination is out of range ' + `(0 to ${newLastPage}, but page is ${page}).`);
375
+ return new Error('MUI: The page prop of a TablePagination is out of range ' + `(0 to ${newLastPage}, but page is ${page}).`);
376
376
  }
377
377
 
378
378
  return null;
@@ -279,7 +279,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
279
279
 
280
280
  if (process.env.NODE_ENV !== 'production') {
281
281
  if (centered && scrollable) {
282
- console.error('Material-UI: You can not use the `centered={true}` and `variant="scrollable"` properties ' + 'at the same time on a `Tabs` component.');
282
+ console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties ' + 'at the same time on a `Tabs` component.');
283
283
  }
284
284
  }
285
285
 
@@ -327,7 +327,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
327
327
 
328
328
  if (process.env.NODE_ENV !== 'production') {
329
329
  if (!tab) {
330
- console.error([`Material-UI: The \`value\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with "${value}".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\n'));
330
+ console.error([`MUI: The \`value\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with "${value}".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\n'));
331
331
  }
332
332
  }
333
333
 
@@ -336,7 +336,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
336
336
  if (process.env.NODE_ENV !== 'production') {
337
337
  if (process.env.NODE_ENV !== 'test' && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0) {
338
338
  tabsMeta = null;
339
- console.error(['Material-UI: The `value` provided to the Tabs component is invalid.', `The Tab with this \`value\` ("${value}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join('\n'));
339
+ console.error(['MUI: The `value` provided to the Tabs component is invalid.', `The Tab with this \`value\` ("${value}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join('\n'));
340
340
  warnedOnceTabPresent = true;
341
341
  }
342
342
  }
@@ -596,7 +596,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
596
596
 
597
597
  if (process.env.NODE_ENV !== 'production') {
598
598
  if (isFragment(child)) {
599
- console.error(["Material-UI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
599
+ console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
600
600
  }
601
601
  }
602
602
 
@@ -130,7 +130,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
130
130
 
131
131
  if (process.env.NODE_ENV !== 'production') {
132
132
  if (select && !children) {
133
- console.error('Material-UI: `children` must be passed when using the `TextField` component with `select`.');
133
+ console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
134
134
  }
135
135
  }
136
136
 
@@ -414,7 +414,9 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes
414
414
  /**
415
415
  * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
416
416
  */
417
- type: PropTypes.string,
417
+ type: PropTypes
418
+ /* @typescript-to-proptypes-ignore */
419
+ .string,
418
420
 
419
421
  /**
420
422
  * The value of the `input` element, required for a controlled component.
@@ -103,7 +103,7 @@ const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize
103
103
 
104
104
  if (process.env.NODE_ENV !== 'production') {
105
105
  if (renders.current === 20) {
106
- console.error(['Material-UI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
106
+ console.error(['MUI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\n'));
107
107
  }
108
108
  }
109
109
 
@@ -151,7 +151,7 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef(function ToggleButtonGro
151
151
 
152
152
  if (process.env.NODE_ENV !== 'production') {
153
153
  if (isFragment(child)) {
154
- console.error(["Material-UI: The ToggleButtonGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
154
+ console.error(["MUI: The ToggleButtonGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
155
155
  }
156
156
  }
157
157
 
@@ -272,7 +272,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
272
272
 
273
273
  React.useEffect(() => {
274
274
  if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {
275
- console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
275
+ console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', "Tooltip needs to listen to the child element's events to display the title.", '', 'Add a simple wrapper element, such as a `span`.'].join('\n'));
276
276
  }
277
277
  }, [title, childNode, isControlled]);
278
278
  }
@@ -428,7 +428,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
428
428
  children.props.onTouchEnd(event);
429
429
  }
430
430
 
431
- clearTimeout(touchTimer.current);
431
+ stopTouchInteraction();
432
432
  clearTimeout(leaveTimer.current);
433
433
  leaveTimer.current = setTimeout(() => {
434
434
  handleClose(event);
@@ -511,7 +511,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
511
511
 
512
512
  React.useEffect(() => {
513
513
  if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {
514
- console.error(['Material-UI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\n'));
514
+ console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\n'));
515
515
  }
516
516
  }, [childNode]);
517
517
  }
@@ -545,7 +545,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
545
545
 
546
546
  if (process.env.NODE_ENV !== 'production') {
547
547
  if (children.props.title) {
548
- console.error(['Material-UI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \`${children.props.title}\` or the Tooltip component.`].join('\n'));
548
+ console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \`${children.props.title}\` or the Tooltip component.`].join('\n'));
549
549
  }
550
550
  }
551
551
 
@@ -781,7 +781,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
781
781
 
782
782
  /**
783
783
  * Props applied to the transition element.
784
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.
784
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
785
785
  */
786
786
  TransitionProps: PropTypes.object
787
787
  } : void 0;
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Material-UI v5.0.0-rc.1
1
+ /** @license MUI v5.0.0
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.
@@ -5,7 +5,7 @@ const _excluded = ["defaultProps", "mixins", "overrides", "palette", "props", "s
5
5
  import { createBreakpoints, createSpacing } from '@mui/system';
6
6
  export default function adaptV4Theme(inputTheme) {
7
7
  if (process.env.NODE_ENV !== 'production') {
8
- console.warn(['Material-UI: adaptV4Theme() is deprecated.', 'Follow the upgrade guide on https://material-ui.com/r/migration-v4#theme.'].join('\n'));
8
+ console.warn(['MUI: adaptV4Theme() is deprecated.', 'Follow the upgrade guide on https://mui.com/r/migration-v4#theme.'].join('\n'));
9
9
  }
10
10
 
11
11
  const {
@@ -213,7 +213,7 @@ export default function createPalette(palette) {
213
213
  const contrast = getContrastRatio(background, contrastText);
214
214
 
215
215
  if (contrast < 3) {
216
- console.error([`Material-UI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\n'));
216
+ console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\n'));
217
217
  }
218
218
  }
219
219
 
@@ -234,12 +234,12 @@ export default function createPalette(palette) {
234
234
  }
235
235
 
236
236
  if (!color.hasOwnProperty('main')) {
237
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
237
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
238
238
  The color object needs to have a \`main\` property or a \`${mainShade}\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));
239
239
  }
240
240
 
241
241
  if (typeof color.main !== 'string') {
242
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
242
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.
243
243
  \`color.main\` should be a string, but \`${JSON.stringify(color.main)}\` was provided instead.
244
244
 
245
245
  Did you intend to use one of the following approaches?
@@ -272,7 +272,7 @@ const theme2 = createTheme({ palette: {
272
272
 
273
273
  if (process.env.NODE_ENV !== 'production') {
274
274
  if (!modes[mode]) {
275
- console.error(`Material-UI: The palette mode \`${mode}\` is not supported.`);
275
+ console.error(`MUI: The palette mode \`${mode}\` is not supported.`);
276
276
  }
277
277
  }
278
278
 
@@ -2,7 +2,7 @@ let warnedOnce = false; // To remove in v6
2
2
 
3
3
  export default function createStyles(styles) {
4
4
  if (!warnedOnce) {
5
- console.warn(['Material-UI: createStyles from @mui/material/styles is deprecated.', 'Please use @mui/styles/createStyles'].join('\n'));
5
+ console.warn(['MUI: createStyles from @mui/material/styles is deprecated.', 'Please use @mui/styles/createStyles'].join('\n'));
6
6
  warnedOnce = true;
7
7
  }
8
8
 
@@ -46,11 +46,11 @@ function createTheme(options = {}, ...args) {
46
46
  if (stateClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
47
47
  if (process.env.NODE_ENV !== 'production') {
48
48
  const stateClass = generateUtilityClass('', key);
49
- console.error([`Material-UI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
49
+ console.error([`MUI: The \`${component}\` component increases ` + `the CSS specificity of the \`${key}\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({
50
50
  root: {
51
51
  [`&.${stateClass}`]: child
52
52
  }
53
- }, null, 2), '', 'https://material-ui.com/r/state-classes-guide'].join('\n'));
53
+ }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\n'));
54
54
  } // Remove the style to prevent global conflicts.
55
55
 
56
56
 
@@ -76,7 +76,7 @@ export function createMuiTheme(...args) {
76
76
  if (process.env.NODE_ENV !== 'production') {
77
77
  if (!warnedOnce) {
78
78
  warnedOnce = true;
79
- console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@mui/material/styles'`"].join('\n'));
79
+ console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@mui/material/styles'`"].join('\n'));
80
80
  }
81
81
  }
82
82
 
@@ -65,23 +65,23 @@ export default function createTransitions(inputTransitions) {
65
65
  const isNumber = value => !isNaN(parseFloat(value));
66
66
 
67
67
  if (!isString(props) && !Array.isArray(props)) {
68
- console.error('Material-UI: Argument "props" must be a string or Array.');
68
+ console.error('MUI: Argument "props" must be a string or Array.');
69
69
  }
70
70
 
71
71
  if (!isNumber(durationOption) && !isString(durationOption)) {
72
- console.error(`Material-UI: Argument "duration" must be a number or a string but found ${durationOption}.`);
72
+ console.error(`MUI: Argument "duration" must be a number or a string but found ${durationOption}.`);
73
73
  }
74
74
 
75
75
  if (!isString(easingOption)) {
76
- console.error('Material-UI: Argument "easing" must be a string.');
76
+ console.error('MUI: Argument "easing" must be a string.');
77
77
  }
78
78
 
79
79
  if (!isNumber(delay) && !isString(delay)) {
80
- console.error('Material-UI: Argument "delay" must be a number or a string.');
80
+ console.error('MUI: Argument "delay" must be a number or a string.');
81
81
  }
82
82
 
83
83
  if (Object.keys(other).length !== 0) {
84
- console.error(`Material-UI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);
84
+ console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);
85
85
  }
86
86
  }
87
87
 
@@ -27,7 +27,7 @@ export default function createTypography(palette, typography) {
27
27
  fontWeightRegular = 400,
28
28
  fontWeightMedium = 500,
29
29
  fontWeightBold = 700,
30
- // Tell Material-UI what's the font-size on the html element.
30
+ // Tell MUI what's the font-size on the html element.
31
31
  // 16px is the default font-size used by browsers.
32
32
  htmlFontSize = 16,
33
33
  // Apply the CSS properties to all the variants.
@@ -38,11 +38,11 @@ export default function createTypography(palette, typography) {
38
38
 
39
39
  if (process.env.NODE_ENV !== 'production') {
40
40
  if (typeof fontSize !== 'number') {
41
- console.error('Material-UI: `fontSize` is required to be a number.');
41
+ console.error('MUI: `fontSize` is required to be a number.');
42
42
  }
43
43
 
44
44
  if (typeof htmlFontSize !== 'number') {
45
- console.error('Material-UI: `htmlFontSize` is required to be a number.');
45
+ console.error('MUI: `htmlFontSize` is required to be a number.');
46
46
  }
47
47
  }
48
48
 
@@ -1,6 +1,6 @@
1
1
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
2
2
  export default function makeStyles() {
3
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: makeStyles is not longer exported from @mui/material/styles.
3
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: makeStyles is not longer exported from @mui/material/styles.
4
4
  You have to import it from @mui/styles.
5
- See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(14));
5
+ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(14));
6
6
  }
@@ -32,7 +32,7 @@ export default function responsiveFontSizes(themeInput, options = {}) {
32
32
  } = style;
33
33
 
34
34
  if (!isUnitless(lineHeight) && !disableAlign) {
35
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: Unsupported non-unitless line height with grid alignment.
35
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported non-unitless line height with grid alignment.
36
36
  Use unitless line heights instead.` : _formatMuiErrorMessage(6));
37
37
  }
38
38
 
@@ -1,6 +1,6 @@
1
1
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
2
2
  export default function withStyles() {
3
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: withStyles is not longer exported from @mui/material/styles.
3
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withStyles is not longer exported from @mui/material/styles.
4
4
  You have to import it from @mui/styles.
5
- See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(15));
5
+ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(15));
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
2
2
  export default function withTheme() {
3
- throw new Error(process.env.NODE_ENV !== "production" ? `Material-UI: withTheme is not longer exported from @mui/material/styles.
3
+ throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withTheme is not longer exported from @mui/material/styles.
4
4
  You have to import it from @mui/styles.
5
- See https://material-ui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(16));
5
+ See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.` : _formatMuiErrorMessage(16));
6
6
  }
@@ -12,13 +12,13 @@ export default function useMediaQuery(queryInput, options = {}) {
12
12
 
13
13
  if (process.env.NODE_ENV !== 'production') {
14
14
  if (typeof queryInput === 'function' && theme === null) {
15
- console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
15
+ console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
16
16
  }
17
17
  }
18
18
 
19
19
  let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
20
20
  query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.
21
- // All the browsers Material-UI support have this built-in.
21
+ // All the browsers MUI support have this built-in.
22
22
  // This defensive check is here for simplicity.
23
23
  // Most of the time, the match media logic isn't central to people tests.
24
24
 
@@ -224,11 +224,11 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
224
224
  const summary = React.Children.toArray(props.children)[0];
225
225
 
226
226
  if ((0, _reactIs.isFragment)(summary)) {
227
- return new Error("Material-UI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
227
+ return new Error("MUI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
228
228
  }
229
229
 
230
230
  if (! /*#__PURE__*/React.isValidElement(summary)) {
231
- return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');
231
+ return new Error('MUI: Expected the first child of Accordion to be a valid element.');
232
232
  }
233
233
 
234
234
  return null;
@@ -296,7 +296,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
296
296
 
297
297
  /**
298
298
  * Props applied to the transition element.
299
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.
299
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
300
300
  */
301
301
  TransitionProps: _propTypes.default.object
302
302
  } : void 0;
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
13
13
 
14
14
  /**
15
15
  * @ignore - internal component.
16
- * @type {React.Context<{} | {expanded: boolean, disabled: boolean, disableGutters: boolean, toggle: () => void}>}
16
+ * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
17
17
  */
18
18
  const AccordionContext = /*#__PURE__*/React.createContext({});
19
19
 
@@ -739,7 +739,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
739
739
  */
740
740
  defaultValue: (0, _utils.chainPropTypes)(_propTypes.default.any, props => {
741
741
  if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {
742
- return new Error(['Material-UI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', `However, ${props.defaultValue} was provided.`].join('\n'));
742
+ return new Error(['MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', `However, ${props.defaultValue} was provided.`].join('\n'));
743
743
  }
744
744
 
745
745
  return null;
@@ -1082,7 +1082,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1082
1082
  */
1083
1083
  value: (0, _utils.chainPropTypes)(_propTypes.default.any, props => {
1084
1084
  if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {
1085
- return new Error(['Material-UI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', `However, ${props.value} was provided.`].join('\n'));
1085
+ return new Error(['MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', `However, ${props.value} was provided.`].join('\n'));
1086
1086
  }
1087
1087
 
1088
1088
  return null;
@@ -112,7 +112,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
112
112
  const children = React.Children.toArray(childrenProp).filter(child => {
113
113
  if (process.env.NODE_ENV !== 'production') {
114
114
  if ((0, _reactIs.isFragment)(child)) {
115
- console.error(["Material-UI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
115
+ console.error(["MUI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
116
116
  }
117
117
  }
118
118
 
@@ -173,7 +173,7 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
173
173
  */
174
174
  max: (0, _utils.chainPropTypes)(_propTypes.default.number, props => {
175
175
  if (props.max < 2) {
176
- return new Error(['Material-UI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
176
+ return new Error(['MUI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
177
177
  }
178
178
 
179
179
  return null;
@@ -89,7 +89,7 @@ const BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation
89
89
 
90
90
  if (process.env.NODE_ENV !== 'production') {
91
91
  if ((0, _reactIs.isFragment)(child)) {
92
- console.error(["Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
92
+ console.error(["MUI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
93
93
  }
94
94
  }
95
95
 
@@ -150,7 +150,7 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(inProps,
150
150
 
151
151
  if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {
152
152
  if (process.env.NODE_ENV !== 'production') {
153
- console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', `itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= maxItems={${maxItems}}`].join('\n'));
153
+ console.error(['MUI: You have provided an invalid combination of props to the Breadcrumbs.', `itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= maxItems={${maxItems}}`].join('\n'));
154
154
  }
155
155
 
156
156
  return allItems;
@@ -165,7 +165,7 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(inProps,
165
165
  const allItems = React.Children.toArray(children).filter(child => {
166
166
  if (process.env.NODE_ENV !== 'production') {
167
167
  if ((0, _reactIs.isFragment)(child)) {
168
- console.error(["Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
168
+ console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
169
169
  }
170
170
  }
171
171
 
@@ -19,8 +19,6 @@ var _clsx = _interopRequireDefault(require("clsx"));
19
19
 
20
20
  var _utils = require("@mui/utils");
21
21
 
22
- var _ButtonUnstyled = require("@mui/core/ButtonUnstyled");
23
-
24
22
  var _composeClasses = _interopRequireDefault(require("@mui/core/composeClasses"));
25
23
 
26
24
  var _styled = _interopRequireDefault(require("../styles/styled"));
@@ -29,12 +27,14 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
29
27
 
30
28
  var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
31
29
 
30
+ var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallback"));
31
+
32
+ var _useIsFocusVisible = _interopRequireDefault(require("../utils/useIsFocusVisible"));
33
+
32
34
  var _TouchRipple = _interopRequireDefault(require("./TouchRipple"));
33
35
 
34
36
  var _buttonBaseClasses = _interopRequireWildcard(require("./buttonBaseClasses"));
35
37
 
36
- var _useTouchRipple = _interopRequireDefault(require("../useTouchRipple"));
37
-
38
38
  var _jsxRuntime = require("react/jsx-runtime");
39
39
 
40
40
  const _excluded = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "type"];
@@ -129,50 +129,204 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
129
129
  disableTouchRipple = false,
130
130
  focusRipple = false,
131
131
  LinkComponent = 'a',
132
+ onBlur,
133
+ onClick,
134
+ onContextMenu,
135
+ onDragLeave,
136
+ onFocus,
137
+ onFocusVisible,
138
+ onKeyDown,
139
+ onKeyUp,
140
+ onMouseDown,
141
+ onMouseLeave,
142
+ onMouseUp,
143
+ onTouchEnd,
144
+ onTouchMove,
145
+ onTouchStart,
132
146
  tabIndex = 0,
133
- TouchRippleProps
147
+ TouchRippleProps,
148
+ type
134
149
  } = props,
135
150
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
136
151
  const buttonRef = React.useRef(null);
137
- const handleRef = (0, _useForkRef.default)(buttonRef, ref);
138
152
  const rippleRef = React.useRef(null);
139
- let ComponentProp = component;
140
-
141
- if (ComponentProp === 'button' && (other.href || other.to)) {
142
- ComponentProp = LinkComponent;
153
+ const {
154
+ isFocusVisibleRef,
155
+ onFocus: handleFocusVisible,
156
+ onBlur: handleBlurVisible,
157
+ ref: focusVisibleRef
158
+ } = (0, _useIsFocusVisible.default)();
159
+ const [focusVisible, setFocusVisible] = React.useState(false);
160
+
161
+ if (disabled && focusVisible) {
162
+ setFocusVisible(false);
143
163
  }
144
164
 
145
- const {
146
- focusVisible,
147
- setFocusVisible,
148
- getRootProps
149
- } = (0, _ButtonUnstyled.useButton)((0, _extends2.default)({}, props, {
150
- component: ComponentProp,
151
- ref: handleRef
152
- }));
153
165
  React.useImperativeHandle(action, () => ({
154
166
  focusVisible: () => {
155
167
  setFocusVisible(true);
156
168
  buttonRef.current.focus();
157
169
  }
158
- }), [setFocusVisible]);
159
- const {
160
- enableTouchRipple,
161
- getRippleHandlers
162
- } = (0, _useTouchRipple.default)({
163
- disabled,
164
- disableFocusRipple: !focusRipple,
165
- disableRipple,
166
- disableTouchRipple,
167
- focusVisible,
168
- rippleRef
170
+ }), []);
171
+ React.useEffect(() => {
172
+ if (focusVisible && focusRipple && !disableRipple) {
173
+ rippleRef.current.pulsate();
174
+ }
175
+ }, [disableRipple, focusRipple, focusVisible]);
176
+
177
+ function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
178
+ return (0, _useEventCallback.default)(event => {
179
+ if (eventCallback) {
180
+ eventCallback(event);
181
+ }
182
+
183
+ const ignore = skipRippleAction;
184
+
185
+ if (!ignore && rippleRef.current) {
186
+ rippleRef.current[rippleAction](event);
187
+ }
188
+
189
+ return true;
190
+ });
191
+ }
192
+
193
+ const handleMouseDown = useRippleHandler('start', onMouseDown);
194
+ const handleContextMenu = useRippleHandler('stop', onContextMenu);
195
+ const handleDragLeave = useRippleHandler('stop', onDragLeave);
196
+ const handleMouseUp = useRippleHandler('stop', onMouseUp);
197
+ const handleMouseLeave = useRippleHandler('stop', event => {
198
+ if (focusVisible) {
199
+ event.preventDefault();
200
+ }
201
+
202
+ if (onMouseLeave) {
203
+ onMouseLeave(event);
204
+ }
205
+ });
206
+ const handleTouchStart = useRippleHandler('start', onTouchStart);
207
+ const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
208
+ const handleTouchMove = useRippleHandler('stop', onTouchMove);
209
+ const handleBlur = useRippleHandler('stop', event => {
210
+ handleBlurVisible(event);
211
+
212
+ if (isFocusVisibleRef.current === false) {
213
+ setFocusVisible(false);
214
+ }
215
+
216
+ if (onBlur) {
217
+ onBlur(event);
218
+ }
219
+ }, false);
220
+ const handleFocus = (0, _useEventCallback.default)(event => {
221
+ // Fix for https://github.com/facebook/react/issues/7769
222
+ if (!buttonRef.current) {
223
+ buttonRef.current = event.currentTarget;
224
+ }
225
+
226
+ handleFocusVisible(event);
227
+
228
+ if (isFocusVisibleRef.current === true) {
229
+ setFocusVisible(true);
230
+
231
+ if (onFocusVisible) {
232
+ onFocusVisible(event);
233
+ }
234
+ }
235
+
236
+ if (onFocus) {
237
+ onFocus(event);
238
+ }
239
+ });
240
+
241
+ const isNonNativeButton = () => {
242
+ const button = buttonRef.current;
243
+ return component && component !== 'button' && !(button.tagName === 'A' && button.href);
244
+ };
245
+ /**
246
+ * IE11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
247
+ */
248
+
249
+
250
+ const keydownRef = React.useRef(false);
251
+ const handleKeyDown = (0, _useEventCallback.default)(event => {
252
+ // Check if key is already down to avoid repeats being counted as multiple activations
253
+ if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
254
+ keydownRef.current = true;
255
+ rippleRef.current.stop(event, () => {
256
+ rippleRef.current.start(event);
257
+ });
258
+ }
259
+
260
+ if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {
261
+ event.preventDefault();
262
+ }
263
+
264
+ if (onKeyDown) {
265
+ onKeyDown(event);
266
+ } // Keyboard accessibility for non interactive elements
267
+
268
+
269
+ if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {
270
+ event.preventDefault();
271
+
272
+ if (onClick) {
273
+ onClick(event);
274
+ }
275
+ }
276
+ });
277
+ const handleKeyUp = (0, _useEventCallback.default)(event => {
278
+ // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
279
+ // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0
280
+ if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
281
+ keydownRef.current = false;
282
+ rippleRef.current.stop(event, () => {
283
+ rippleRef.current.pulsate(event);
284
+ });
285
+ }
286
+
287
+ if (onKeyUp) {
288
+ onKeyUp(event);
289
+ } // Keyboard accessibility for non interactive elements
290
+
291
+
292
+ if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {
293
+ onClick(event);
294
+ }
169
295
  });
296
+ let ComponentProp = component;
297
+
298
+ if (ComponentProp === 'button' && (other.href || other.to)) {
299
+ ComponentProp = LinkComponent;
300
+ }
301
+
302
+ const buttonProps = {};
303
+
304
+ if (ComponentProp === 'button') {
305
+ buttonProps.type = type === undefined ? 'button' : type;
306
+ buttonProps.disabled = disabled;
307
+ } else {
308
+ if (!other.href && !other.to) {
309
+ buttonProps.role = 'button';
310
+ }
311
+
312
+ if (disabled) {
313
+ buttonProps['aria-disabled'] = disabled;
314
+ }
315
+ }
316
+
317
+ const handleOwnRef = (0, _useForkRef.default)(focusVisibleRef, buttonRef);
318
+ const handleRef = (0, _useForkRef.default)(ref, handleOwnRef);
319
+ const [mountedState, setMountedState] = React.useState(false);
320
+ React.useEffect(() => {
321
+ setMountedState(true);
322
+ }, []);
323
+ const enableTouchRipple = mountedState && !disableRipple && !disabled;
170
324
 
171
325
  if (process.env.NODE_ENV !== 'production') {
172
326
  // eslint-disable-next-line react-hooks/rules-of-hooks
173
327
  React.useEffect(() => {
174
328
  if (enableTouchRipple && !rippleRef.current) {
175
- console.error(['Material-UI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\n'));
329
+ console.error(['MUI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\n'));
176
330
  }
177
331
  }, [enableTouchRipple]);
178
332
  }
@@ -191,8 +345,24 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
191
345
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ButtonBaseRoot, (0, _extends2.default)({
192
346
  as: ComponentProp,
193
347
  className: (0, _clsx.default)(classes.root, className),
194
- ownerState: ownerState
195
- }, getRootProps(getRippleHandlers(props)), other, {
348
+ ownerState: ownerState,
349
+ onBlur: handleBlur,
350
+ onClick: onClick,
351
+ onContextMenu: handleContextMenu,
352
+ onFocus: handleFocus,
353
+ onKeyDown: handleKeyDown,
354
+ onKeyUp: handleKeyUp,
355
+ onMouseDown: handleMouseDown,
356
+ onMouseLeave: handleMouseLeave,
357
+ onMouseUp: handleMouseUp,
358
+ onDragLeave: handleDragLeave,
359
+ onTouchEnd: handleTouchEnd,
360
+ onTouchMove: handleTouchMove,
361
+ onTouchStart: handleTouchStart,
362
+ ref: handleRef,
363
+ tabIndex: disabled ? -1 : tabIndex,
364
+ type: type
365
+ }, buttonProps, other, {
196
366
  children: [children, enableTouchRipple ?
197
367
  /*#__PURE__*/
198
368