@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
@@ -55,7 +55,7 @@ export interface AccordionProps extends StandardProps<PaperProps, 'onChange'> {
55
55
  >;
56
56
  /**
57
57
  * Props applied to the transition element.
58
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.
58
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
59
59
  */
60
60
  TransitionProps?: TransitionProps;
61
61
  }
@@ -64,11 +64,11 @@ export interface AccordionProps extends StandardProps<PaperProps, 'onChange'> {
64
64
  *
65
65
  * Demos:
66
66
  *
67
- * - [Accordion](https://material-ui.com/components/accordion/)
67
+ * - [Accordion](https://mui.com/components/accordion/)
68
68
  *
69
69
  * API:
70
70
  *
71
- * - [Accordion API](https://material-ui.com/api/accordion/)
72
- * - inherits [Paper API](https://material-ui.com/api/paper/)
71
+ * - [Accordion API](https://mui.com/api/accordion/)
72
+ * - inherits [Paper API](https://mui.com/api/paper/)
73
73
  */
74
74
  export default function Accordion(props: AccordionProps): JSX.Element;
@@ -200,11 +200,11 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
200
200
  const summary = React.Children.toArray(props.children)[0];
201
201
 
202
202
  if (isFragment(summary)) {
203
- return new Error("Material-UI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
203
+ return new Error("MUI: The Accordion doesn't accept a Fragment as a child. " + 'Consider providing an array instead.');
204
204
  }
205
205
 
206
206
  if (! /*#__PURE__*/React.isValidElement(summary)) {
207
- return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');
207
+ return new Error('MUI: Expected the first child of Accordion to be a valid element.');
208
208
  }
209
209
 
210
210
  return null;
@@ -272,7 +272,7 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes
272
272
 
273
273
  /**
274
274
  * Props applied to the transition element.
275
- * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.
275
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition) component.
276
276
  */
277
277
  TransitionProps: PropTypes.object
278
278
  } : void 0;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  /**
3
3
  * @ignore - internal component.
4
- * @type {React.Context<{} | {expanded: boolean, disabled: boolean, disableGutters: boolean, toggle: () => void}>}
4
+ * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}
5
5
  */
6
6
 
7
7
  const AccordionContext = /*#__PURE__*/React.createContext({});
@@ -27,10 +27,10 @@ export interface AccordionActionsProps extends StandardProps<React.HTMLAttribute
27
27
  *
28
28
  * Demos:
29
29
  *
30
- * - [Accordion](https://material-ui.com/components/accordion/)
30
+ * - [Accordion](https://mui.com/components/accordion/)
31
31
  *
32
32
  * API:
33
33
  *
34
- * - [AccordionActions API](https://material-ui.com/api/accordion-actions/)
34
+ * - [AccordionActions API](https://mui.com/api/accordion-actions/)
35
35
  */
36
36
  export default function AccordionActions(props: AccordionActionsProps): JSX.Element;
@@ -22,10 +22,10 @@ export interface AccordionDetailsProps extends StandardProps<React.HTMLAttribute
22
22
  *
23
23
  * Demos:
24
24
  *
25
- * - [Accordion](https://material-ui.com/components/accordion/)
25
+ * - [Accordion](https://mui.com/components/accordion/)
26
26
  *
27
27
  * API:
28
28
  *
29
- * - [AccordionDetails API](https://material-ui.com/api/accordion-details/)
29
+ * - [AccordionDetails API](https://mui.com/api/accordion-details/)
30
30
  */
31
31
  export default function AccordionDetails(props: AccordionDetailsProps): JSX.Element;
@@ -34,12 +34,12 @@ export type AccordionSummaryTypeMap<
34
34
  *
35
35
  * Demos:
36
36
  *
37
- * - [Accordion](https://material-ui.com/components/accordion/)
37
+ * - [Accordion](https://mui.com/components/accordion/)
38
38
  *
39
39
  * API:
40
40
  *
41
- * - [AccordionSummary API](https://material-ui.com/api/accordion-summary/)
42
- * - inherits [ButtonBase API](https://material-ui.com/api/button-base/)
41
+ * - [AccordionSummary API](https://mui.com/api/accordion-summary/)
42
+ * - inherits [ButtonBase API](https://mui.com/api/button-base/)
43
43
  */
44
44
  declare const AccordionSummary: ExtendButtonBase<AccordionSummaryTypeMap>;
45
45
 
package/Alert/Alert.d.ts CHANGED
@@ -74,11 +74,11 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
74
74
  *
75
75
  * Demos:
76
76
  *
77
- * - [Alert](https://material-ui.com/components/alert/)
77
+ * - [Alert](https://mui.com/components/alert/)
78
78
  *
79
79
  * API:
80
80
  *
81
- * - [Alert API](https://material-ui.com/api/alert/)
82
- * - inherits [Paper API](https://material-ui.com/api/paper/)
81
+ * - [Alert API](https://mui.com/api/alert/)
82
+ * - inherits [Paper API](https://mui.com/api/paper/)
83
83
  */
84
84
  export default function Alert(props: AlertProps): JSX.Element;
@@ -22,10 +22,10 @@ export interface AlertTitleProps extends StandardProps<React.HTMLAttributes<HTML
22
22
  *
23
23
  * Demos:
24
24
  *
25
- * - [Alert](https://material-ui.com/components/alert/)
25
+ * - [Alert](https://mui.com/components/alert/)
26
26
  *
27
27
  * API:
28
28
  *
29
- * - [AlertTitle API](https://material-ui.com/api/alert-title/)
29
+ * - [AlertTitle API](https://mui.com/api/alert-title/)
30
30
  */
31
31
  export default function AlertTitle(props: AlertTitleProps): JSX.Element;
@@ -44,12 +44,12 @@ export interface AppBarTypeMap<P = {}, D extends React.ElementType = 'header'> {
44
44
  *
45
45
  * Demos:
46
46
  *
47
- * - [App Bar](https://material-ui.com/components/app-bar/)
47
+ * - [App Bar](https://mui.com/components/app-bar/)
48
48
  *
49
49
  * API:
50
50
  *
51
- * - [AppBar API](https://material-ui.com/api/app-bar/)
52
- * - inherits [Paper API](https://material-ui.com/api/paper/)
51
+ * - [AppBar API](https://mui.com/api/app-bar/)
52
+ * - inherits [Paper API](https://mui.com/api/paper/)
53
53
  */
54
54
 
55
55
  declare const AppBar: OverridableComponent<AppBarTypeMap>;
@@ -237,11 +237,11 @@ export interface AutocompleteProps<
237
237
  *
238
238
  * Demos:
239
239
  *
240
- * - [Autocomplete](https://material-ui.com/components/autocomplete/)
240
+ * - [Autocomplete](https://mui.com/components/autocomplete/)
241
241
  *
242
242
  * API:
243
243
  *
244
- * - [Autocomplete API](https://material-ui.com/api/autocomplete/)
244
+ * - [Autocomplete API](https://mui.com/api/autocomplete/)
245
245
  */
246
246
  export default function Autocomplete<
247
247
  T,
@@ -706,7 +706,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
706
706
  */
707
707
  defaultValue: chainPropTypes(PropTypes.any, props => {
708
708
  if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {
709
- 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'));
709
+ 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'));
710
710
  }
711
711
 
712
712
  return null;
@@ -1049,7 +1049,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
1049
1049
  */
1050
1050
  value: chainPropTypes(PropTypes.any, props => {
1051
1051
  if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {
1052
- 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'));
1052
+ 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'));
1053
1053
  }
1054
1054
 
1055
1055
  return null;
@@ -61,11 +61,11 @@ export interface AvatarTypeMap<P = {}, D extends React.ElementType = 'div'> {
61
61
  *
62
62
  * Demos:
63
63
  *
64
- * - [Avatars](https://material-ui.com/components/avatars/)
64
+ * - [Avatars](https://mui.com/components/avatars/)
65
65
  *
66
66
  * API:
67
67
  *
68
- * - [Avatar API](https://material-ui.com/api/avatar/)
68
+ * - [Avatar API](https://mui.com/api/avatar/)
69
69
  */
70
70
  declare const Avatar: OverridableComponent<AvatarTypeMap>;
71
71
 
@@ -43,10 +43,10 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
43
43
  *
44
44
  * Demos:
45
45
  *
46
- * - [Avatars](https://material-ui.com/components/avatars/)
46
+ * - [Avatars](https://mui.com/components/avatars/)
47
47
  *
48
48
  * API:
49
49
  *
50
- * - [AvatarGroup API](https://material-ui.com/api/avatar-group/)
50
+ * - [AvatarGroup API](https://mui.com/api/avatar-group/)
51
51
  */
52
52
  export default function AvatarGroup(props: AvatarGroupProps): JSX.Element;
@@ -89,7 +89,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
89
89
  const children = React.Children.toArray(childrenProp).filter(child => {
90
90
  if (process.env.NODE_ENV !== 'production') {
91
91
  if (isFragment(child)) {
92
- console.error(["Material-UI: The AvatarGroup component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
92
+ console.error(["MUI: The AvatarGroup 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 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
150
150
  */
151
151
  max: chainPropTypes(PropTypes.number, props => {
152
152
  if (props.max < 2) {
153
- return new Error(['Material-UI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
153
+ return new Error(['MUI: The prop `max` should be equal to 2 or above.', 'A value below is clamped to 2.'].join('\n'));
154
154
  }
155
155
 
156
156
  return null;
@@ -43,12 +43,12 @@ export type BackdropClassKey = keyof NonNullable<BackdropTypeMap['props']['class
43
43
  *
44
44
  * Demos:
45
45
  *
46
- * - [Backdrop](https://material-ui.com/components/backdrop/)
46
+ * - [Backdrop](https://mui.com/components/backdrop/)
47
47
  *
48
48
  * API:
49
49
  *
50
- * - [Backdrop API](https://material-ui.com/api/backdrop/)
51
- * - inherits [Fade API](https://material-ui.com/api/fade/)
50
+ * - [Backdrop API](https://mui.com/api/backdrop/)
51
+ * - inherits [Fade API](https://mui.com/api/fade/)
52
52
  */
53
53
 
54
54
  declare const Backdrop: OverridableComponent<BackdropTypeMap>;
package/Badge/Badge.d.ts CHANGED
@@ -63,13 +63,13 @@ export type BadgeClassKey = keyof NonNullable<BadgeTypeMap['props']['classes']>;
63
63
  *
64
64
  * Demos:
65
65
  *
66
- * - [Avatars](https://material-ui.com/components/avatars/)
67
- * - [Badges](https://material-ui.com/components/badges/)
66
+ * - [Avatars](https://mui.com/components/avatars/)
67
+ * - [Badges](https://mui.com/components/badges/)
68
68
  *
69
69
  * API:
70
70
  *
71
- * - [Badge API](https://material-ui.com/api/badge/)
72
- * - inherits [BadgeUnstyled API](https://material-ui.com/api/badge-unstyled/)
71
+ * - [Badge API](https://mui.com/api/badge/)
72
+ * - inherits [BadgeUnstyled API](https://mui.com/api/badge-unstyled/)
73
73
  */
74
74
  declare const Badge: OverridableComponent<BadgeTypeMap>;
75
75
 
@@ -42,11 +42,11 @@ export interface BottomNavigationTypeMap<P = {}, D extends React.ElementType = '
42
42
  *
43
43
  * Demos:
44
44
  *
45
- * - [Bottom Navigation](https://material-ui.com/components/bottom-navigation/)
45
+ * - [Bottom Navigation](https://mui.com/components/bottom-navigation/)
46
46
  *
47
47
  * API:
48
48
  *
49
- * - [BottomNavigation API](https://material-ui.com/api/bottom-navigation/)
49
+ * - [BottomNavigation API](https://mui.com/api/bottom-navigation/)
50
50
  */
51
51
  declare const BottomNavigation: OverridableComponent<BottomNavigationTypeMap>;
52
52
 
@@ -68,7 +68,7 @@ const BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation
68
68
 
69
69
  if (process.env.NODE_ENV !== 'production') {
70
70
  if (isFragment(child)) {
71
- console.error(["Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
71
+ console.error(["MUI: The BottomNavigation component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
72
72
  }
73
73
  }
74
74
 
@@ -51,12 +51,12 @@ export type BottomNavigationActionTypeMap<
51
51
  *
52
52
  * Demos:
53
53
  *
54
- * - [Bottom Navigation](https://material-ui.com/components/bottom-navigation/)
54
+ * - [Bottom Navigation](https://mui.com/components/bottom-navigation/)
55
55
  *
56
56
  * API:
57
57
  *
58
- * - [BottomNavigationAction API](https://material-ui.com/api/bottom-navigation-action/)
59
- * - inherits [ButtonBase API](https://material-ui.com/api/button-base/)
58
+ * - [BottomNavigationAction API](https://mui.com/api/bottom-navigation-action/)
59
+ * - inherits [ButtonBase API](https://mui.com/api/button-base/)
60
60
  */
61
61
  declare const BottomNavigationAction: ExtendButtonBase<
62
62
  BottomNavigationActionTypeMap<{}, ButtonBaseTypeMap['defaultComponent']>
package/Box/Box.d.ts CHANGED
@@ -16,11 +16,11 @@ export interface BoxTypeMap<P = {}, D extends React.ElementType = 'div'> {
16
16
  *
17
17
  * Demos:
18
18
  *
19
- * - [Box](https://material-ui.com/components/box/)
19
+ * - [Box](https://mui.com/components/box/)
20
20
  *
21
21
  * API:
22
22
  *
23
- * - [Box API](https://material-ui.com/api/box/)
23
+ * - [Box API](https://mui.com/api/box/)
24
24
  */
25
25
  declare const Box: OverridableComponent<BoxTypeMap>;
26
26
 
@@ -33,10 +33,10 @@ export type BoxProps<
33
33
  *
34
34
  * Demos:
35
35
  *
36
- * - [Box](https://material-ui.com/components/box/)
36
+ * - [Box](https://mui.com/components/box/)
37
37
  *
38
38
  * API:
39
39
  *
40
- * - [Box API](https://material-ui.com/api/box/)
40
+ * - [Box API](https://mui.com/api/box/)
41
41
  */
42
42
  export default Box;
@@ -55,11 +55,11 @@ export interface BreadcrumbsTypeMap<P = {}, D extends React.ElementType = 'nav'>
55
55
  *
56
56
  * Demos:
57
57
  *
58
- * - [Breadcrumbs](https://material-ui.com/components/breadcrumbs/)
58
+ * - [Breadcrumbs](https://mui.com/components/breadcrumbs/)
59
59
  *
60
60
  * API:
61
61
  *
62
- * - [Breadcrumbs API](https://material-ui.com/api/breadcrumbs/)
62
+ * - [Breadcrumbs API](https://mui.com/api/breadcrumbs/)
63
63
  */
64
64
  declare const Breadcrumbs: OverridableComponent<BreadcrumbsTypeMap>;
65
65
 
@@ -127,7 +127,7 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(inProps,
127
127
 
128
128
  if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {
129
129
  if (process.env.NODE_ENV !== 'production') {
130
- console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', `itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= maxItems={${maxItems}}`].join('\n'));
130
+ console.error(['MUI: You have provided an invalid combination of props to the Breadcrumbs.', `itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= maxItems={${maxItems}}`].join('\n'));
131
131
  }
132
132
 
133
133
  return allItems;
@@ -142,7 +142,7 @@ const Breadcrumbs = /*#__PURE__*/React.forwardRef(function Breadcrumbs(inProps,
142
142
  const allItems = React.Children.toArray(children).filter(child => {
143
143
  if (process.env.NODE_ENV !== 'production') {
144
144
  if (isFragment(child)) {
145
- console.error(["Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
145
+ console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
146
146
  }
147
147
  }
148
148
 
@@ -110,13 +110,13 @@ export type ExtendButton<M extends OverridableTypeMap> = ((
110
110
  *
111
111
  * Demos:
112
112
  *
113
- * - [Button Group](https://material-ui.com/components/button-group/)
114
- * - [Buttons](https://material-ui.com/components/buttons/)
113
+ * - [Button Group](https://mui.com/components/button-group/)
114
+ * - [Buttons](https://mui.com/components/buttons/)
115
115
  *
116
116
  * API:
117
117
  *
118
- * - [Button API](https://material-ui.com/api/button/)
119
- * - inherits [ButtonBase API](https://material-ui.com/api/button-base/)
118
+ * - [Button API](https://mui.com/api/button/)
119
+ * - inherits [ButtonBase API](https://mui.com/api/button-base/)
120
120
  */
121
121
  declare const Button: ExtendButtonBase<ButtonTypeMap>;
122
122
 
@@ -106,11 +106,11 @@ export type ExtendButtonBase<M extends OverridableTypeMap> = ((
106
106
  *
107
107
  * Demos:
108
108
  *
109
- * - [Buttons](https://material-ui.com/components/buttons/)
109
+ * - [Buttons](https://mui.com/components/buttons/)
110
110
  *
111
111
  * API:
112
112
  *
113
- * - [ButtonBase API](https://material-ui.com/api/button-base/)
113
+ * - [ButtonBase API](https://mui.com/api/button-base/)
114
114
  */
115
115
  declare const ButtonBase: ExtendButtonBase<ButtonBaseTypeMap>;
116
116
 
@@ -5,14 +5,14 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { elementTypeAcceptingRef, refType } from '@mui/utils';
8
- import { useButton } from '@mui/core/ButtonUnstyled';
9
8
  import composeClasses from '@mui/core/composeClasses';
10
9
  import styled from '../styles/styled';
11
10
  import useThemeProps from '../styles/useThemeProps';
12
11
  import useForkRef from '../utils/useForkRef';
12
+ import useEventCallback from '../utils/useEventCallback';
13
+ import useIsFocusVisible from '../utils/useIsFocusVisible';
13
14
  import TouchRipple from './TouchRipple';
14
15
  import buttonBaseClasses, { getButtonBaseUtilityClass } from './buttonBaseClasses';
15
- import useTouchRipple from '../useTouchRipple';
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
18
 
@@ -102,51 +102,205 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
102
102
  disableTouchRipple = false,
103
103
  focusRipple = false,
104
104
  LinkComponent = 'a',
105
+ onBlur,
106
+ onClick,
107
+ onContextMenu,
108
+ onDragLeave,
109
+ onFocus,
110
+ onFocusVisible,
111
+ onKeyDown,
112
+ onKeyUp,
113
+ onMouseDown,
114
+ onMouseLeave,
115
+ onMouseUp,
116
+ onTouchEnd,
117
+ onTouchMove,
118
+ onTouchStart,
105
119
  tabIndex = 0,
106
- TouchRippleProps
120
+ TouchRippleProps,
121
+ type
107
122
  } = props,
108
123
  other = _objectWithoutPropertiesLoose(props, _excluded);
109
124
 
110
125
  const buttonRef = React.useRef(null);
111
- const handleRef = useForkRef(buttonRef, ref);
112
126
  const rippleRef = React.useRef(null);
113
- let ComponentProp = component;
114
-
115
- if (ComponentProp === 'button' && (other.href || other.to)) {
116
- ComponentProp = LinkComponent;
127
+ const {
128
+ isFocusVisibleRef,
129
+ onFocus: handleFocusVisible,
130
+ onBlur: handleBlurVisible,
131
+ ref: focusVisibleRef
132
+ } = useIsFocusVisible();
133
+ const [focusVisible, setFocusVisible] = React.useState(false);
134
+
135
+ if (disabled && focusVisible) {
136
+ setFocusVisible(false);
117
137
  }
118
138
 
119
- const {
120
- focusVisible,
121
- setFocusVisible,
122
- getRootProps
123
- } = useButton(_extends({}, props, {
124
- component: ComponentProp,
125
- ref: handleRef
126
- }));
127
139
  React.useImperativeHandle(action, () => ({
128
140
  focusVisible: () => {
129
141
  setFocusVisible(true);
130
142
  buttonRef.current.focus();
131
143
  }
132
- }), [setFocusVisible]);
133
- const {
134
- enableTouchRipple,
135
- getRippleHandlers
136
- } = useTouchRipple({
137
- disabled,
138
- disableFocusRipple: !focusRipple,
139
- disableRipple,
140
- disableTouchRipple,
141
- focusVisible,
142
- rippleRef
144
+ }), []);
145
+ React.useEffect(() => {
146
+ if (focusVisible && focusRipple && !disableRipple) {
147
+ rippleRef.current.pulsate();
148
+ }
149
+ }, [disableRipple, focusRipple, focusVisible]);
150
+
151
+ function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
152
+ return useEventCallback(event => {
153
+ if (eventCallback) {
154
+ eventCallback(event);
155
+ }
156
+
157
+ const ignore = skipRippleAction;
158
+
159
+ if (!ignore && rippleRef.current) {
160
+ rippleRef.current[rippleAction](event);
161
+ }
162
+
163
+ return true;
164
+ });
165
+ }
166
+
167
+ const handleMouseDown = useRippleHandler('start', onMouseDown);
168
+ const handleContextMenu = useRippleHandler('stop', onContextMenu);
169
+ const handleDragLeave = useRippleHandler('stop', onDragLeave);
170
+ const handleMouseUp = useRippleHandler('stop', onMouseUp);
171
+ const handleMouseLeave = useRippleHandler('stop', event => {
172
+ if (focusVisible) {
173
+ event.preventDefault();
174
+ }
175
+
176
+ if (onMouseLeave) {
177
+ onMouseLeave(event);
178
+ }
179
+ });
180
+ const handleTouchStart = useRippleHandler('start', onTouchStart);
181
+ const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
182
+ const handleTouchMove = useRippleHandler('stop', onTouchMove);
183
+ const handleBlur = useRippleHandler('stop', event => {
184
+ handleBlurVisible(event);
185
+
186
+ if (isFocusVisibleRef.current === false) {
187
+ setFocusVisible(false);
188
+ }
189
+
190
+ if (onBlur) {
191
+ onBlur(event);
192
+ }
193
+ }, false);
194
+ const handleFocus = useEventCallback(event => {
195
+ // Fix for https://github.com/facebook/react/issues/7769
196
+ if (!buttonRef.current) {
197
+ buttonRef.current = event.currentTarget;
198
+ }
199
+
200
+ handleFocusVisible(event);
201
+
202
+ if (isFocusVisibleRef.current === true) {
203
+ setFocusVisible(true);
204
+
205
+ if (onFocusVisible) {
206
+ onFocusVisible(event);
207
+ }
208
+ }
209
+
210
+ if (onFocus) {
211
+ onFocus(event);
212
+ }
213
+ });
214
+
215
+ const isNonNativeButton = () => {
216
+ const button = buttonRef.current;
217
+ return component && component !== 'button' && !(button.tagName === 'A' && button.href);
218
+ };
219
+ /**
220
+ * IE11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
221
+ */
222
+
223
+
224
+ const keydownRef = React.useRef(false);
225
+ const handleKeyDown = useEventCallback(event => {
226
+ // Check if key is already down to avoid repeats being counted as multiple activations
227
+ if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
228
+ keydownRef.current = true;
229
+ rippleRef.current.stop(event, () => {
230
+ rippleRef.current.start(event);
231
+ });
232
+ }
233
+
234
+ if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {
235
+ event.preventDefault();
236
+ }
237
+
238
+ if (onKeyDown) {
239
+ onKeyDown(event);
240
+ } // Keyboard accessibility for non interactive elements
241
+
242
+
243
+ if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {
244
+ event.preventDefault();
245
+
246
+ if (onClick) {
247
+ onClick(event);
248
+ }
249
+ }
143
250
  });
251
+ const handleKeyUp = useEventCallback(event => {
252
+ // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
253
+ // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0
254
+ if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
255
+ keydownRef.current = false;
256
+ rippleRef.current.stop(event, () => {
257
+ rippleRef.current.pulsate(event);
258
+ });
259
+ }
260
+
261
+ if (onKeyUp) {
262
+ onKeyUp(event);
263
+ } // Keyboard accessibility for non interactive elements
264
+
265
+
266
+ if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {
267
+ onClick(event);
268
+ }
269
+ });
270
+ let ComponentProp = component;
271
+
272
+ if (ComponentProp === 'button' && (other.href || other.to)) {
273
+ ComponentProp = LinkComponent;
274
+ }
275
+
276
+ const buttonProps = {};
277
+
278
+ if (ComponentProp === 'button') {
279
+ buttonProps.type = type === undefined ? 'button' : type;
280
+ buttonProps.disabled = disabled;
281
+ } else {
282
+ if (!other.href && !other.to) {
283
+ buttonProps.role = 'button';
284
+ }
285
+
286
+ if (disabled) {
287
+ buttonProps['aria-disabled'] = disabled;
288
+ }
289
+ }
290
+
291
+ const handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
292
+ const handleRef = useForkRef(ref, handleOwnRef);
293
+ const [mountedState, setMountedState] = React.useState(false);
294
+ React.useEffect(() => {
295
+ setMountedState(true);
296
+ }, []);
297
+ const enableTouchRipple = mountedState && !disableRipple && !disabled;
144
298
 
145
299
  if (process.env.NODE_ENV !== 'production') {
146
300
  // eslint-disable-next-line react-hooks/rules-of-hooks
147
301
  React.useEffect(() => {
148
302
  if (enableTouchRipple && !rippleRef.current) {
149
- 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'));
303
+ 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'));
150
304
  }
151
305
  }, [enableTouchRipple]);
152
306
  }
@@ -166,8 +320,24 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
166
320
  return /*#__PURE__*/_jsxs(ButtonBaseRoot, _extends({
167
321
  as: ComponentProp,
168
322
  className: clsx(classes.root, className),
169
- ownerState: ownerState
170
- }, getRootProps(getRippleHandlers(props)), other, {
323
+ ownerState: ownerState,
324
+ onBlur: handleBlur,
325
+ onClick: onClick,
326
+ onContextMenu: handleContextMenu,
327
+ onFocus: handleFocus,
328
+ onKeyDown: handleKeyDown,
329
+ onKeyUp: handleKeyUp,
330
+ onMouseDown: handleMouseDown,
331
+ onMouseLeave: handleMouseLeave,
332
+ onMouseUp: handleMouseUp,
333
+ onDragLeave: handleDragLeave,
334
+ onTouchEnd: handleTouchEnd,
335
+ onTouchMove: handleTouchMove,
336
+ onTouchStart: handleTouchStart,
337
+ ref: handleRef,
338
+ tabIndex: disabled ? -1 : tabIndex,
339
+ type: type
340
+ }, buttonProps, other, {
171
341
  children: [children, enableTouchRipple ?
172
342
  /*#__PURE__*/
173
343