@mui/material 7.0.0 → 7.0.2

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 (794) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.js +2 -2
  3. package/Alert/Alert.d.ts +2 -2
  4. package/Alert/Alert.js +2 -2
  5. package/Autocomplete/Autocomplete.d.ts +40 -10
  6. package/Autocomplete/Autocomplete.js +45 -33
  7. package/Avatar/Avatar.d.ts +1 -1
  8. package/Avatar/Avatar.js +1 -1
  9. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  10. package/AvatarGroup/AvatarGroup.js +11 -3
  11. package/Backdrop/Backdrop.d.ts +3 -3
  12. package/Backdrop/Backdrop.js +3 -3
  13. package/Badge/Badge.d.ts +2 -2
  14. package/Badge/Badge.js +2 -2
  15. package/Button/Button.js +1 -1
  16. package/CHANGELOG.md +100 -0
  17. package/CardHeader/CardHeader.d.ts +2 -2
  18. package/CardHeader/CardHeader.js +2 -2
  19. package/Checkbox/Checkbox.js +1 -1
  20. package/Dialog/Dialog.d.ts +3 -3
  21. package/Dialog/Dialog.js +3 -3
  22. package/Dialog/dialogClasses.d.ts +6 -2
  23. package/Drawer/Drawer.d.ts +2 -2
  24. package/Drawer/Drawer.js +2 -2
  25. package/Fab/Fab.js +1 -1
  26. package/FilledInput/FilledInput.js +2 -2
  27. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  28. package/FormControlLabel/FormControlLabel.js +1 -1
  29. package/IconButton/IconButton.js +1 -1
  30. package/Input/Input.js +2 -2
  31. package/InputBase/InputBase.d.ts +2 -2
  32. package/InputBase/InputBase.js +2 -2
  33. package/ListItem/ListItem.d.ts +4 -4
  34. package/ListItem/ListItem.js +6 -6
  35. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +1 -1
  36. package/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  37. package/ListItemText/ListItemText.d.ts +2 -2
  38. package/ListItemText/ListItemText.js +2 -2
  39. package/Menu/Menu.d.ts +2 -2
  40. package/Menu/Menu.js +2 -2
  41. package/MobileStepper/MobileStepper.d.ts +1 -1
  42. package/MobileStepper/MobileStepper.js +1 -1
  43. package/Modal/Modal.d.ts +2 -2
  44. package/Modal/Modal.js +2 -2
  45. package/OutlinedInput/OutlinedInput.js +1 -1
  46. package/PaginationItem/PaginationItem.d.ts +1 -1
  47. package/PaginationItem/PaginationItem.js +1 -1
  48. package/Popover/Popover.d.ts +5 -5
  49. package/Popover/Popover.js +5 -5
  50. package/Popper/Popper.d.ts +2 -2
  51. package/Popper/Popper.js +2 -2
  52. package/Radio/Radio.js +2 -2
  53. package/Rating/Rating.d.ts +1 -1
  54. package/Rating/Rating.js +1 -1
  55. package/Slider/Slider.d.ts +2 -2
  56. package/Slider/Slider.js +2 -2
  57. package/Snackbar/Snackbar.d.ts +4 -4
  58. package/Snackbar/Snackbar.js +4 -4
  59. package/SpeedDial/SpeedDial.d.ts +2 -2
  60. package/SpeedDial/SpeedDial.js +2 -2
  61. package/SpeedDialAction/SpeedDialAction.d.ts +5 -5
  62. package/SpeedDialAction/SpeedDialAction.js +5 -5
  63. package/StepContent/StepContent.d.ts +2 -2
  64. package/StepContent/StepContent.js +2 -2
  65. package/StepLabel/StepLabel.d.ts +3 -3
  66. package/StepLabel/StepLabel.js +3 -3
  67. package/SvgIcon/SvgIcon.d.ts +1 -1
  68. package/SvgIcon/SvgIcon.js +1 -1
  69. package/SwipeableDrawer/SwipeableDrawer.d.ts +1 -1
  70. package/SwipeableDrawer/SwipeableDrawer.js +1 -1
  71. package/Switch/Switch.js +2 -2
  72. package/Tabs/Tabs.d.ts +3 -3
  73. package/Tabs/Tabs.js +3 -3
  74. package/TextField/TextField.d.ts +7 -7
  75. package/TextField/TextField.js +5 -5
  76. package/Tooltip/Tooltip.d.ts +7 -7
  77. package/Tooltip/Tooltip.js +6 -6
  78. package/Typography/Typography.d.ts +1 -1
  79. package/Typography/Typography.js +1 -1
  80. package/esm/Accordion/Accordion.d.ts +2 -2
  81. package/esm/Accordion/Accordion.js +2 -2
  82. package/esm/Alert/Alert.d.ts +2 -2
  83. package/esm/Alert/Alert.js +2 -2
  84. package/esm/Autocomplete/Autocomplete.d.ts +40 -10
  85. package/esm/Autocomplete/Autocomplete.js +45 -33
  86. package/esm/Avatar/Avatar.d.ts +1 -1
  87. package/esm/Avatar/Avatar.js +1 -1
  88. package/esm/AvatarGroup/AvatarGroup.d.ts +2 -2
  89. package/esm/AvatarGroup/AvatarGroup.js +11 -3
  90. package/esm/Backdrop/Backdrop.d.ts +3 -3
  91. package/esm/Backdrop/Backdrop.js +3 -3
  92. package/esm/Badge/Badge.d.ts +2 -2
  93. package/esm/Badge/Badge.js +2 -2
  94. package/esm/Button/Button.js +1 -1
  95. package/esm/CardHeader/CardHeader.d.ts +2 -2
  96. package/esm/CardHeader/CardHeader.js +2 -2
  97. package/esm/Checkbox/Checkbox.js +1 -1
  98. package/esm/Dialog/Dialog.d.ts +3 -3
  99. package/esm/Dialog/Dialog.js +3 -3
  100. package/esm/Dialog/dialogClasses.d.ts +6 -2
  101. package/esm/Drawer/Drawer.d.ts +2 -2
  102. package/esm/Drawer/Drawer.js +2 -2
  103. package/esm/Fab/Fab.js +1 -1
  104. package/esm/FilledInput/FilledInput.js +2 -2
  105. package/esm/FormControlLabel/FormControlLabel.d.ts +1 -1
  106. package/esm/FormControlLabel/FormControlLabel.js +1 -1
  107. package/esm/IconButton/IconButton.js +1 -1
  108. package/esm/Input/Input.js +2 -2
  109. package/esm/InputBase/InputBase.d.ts +2 -2
  110. package/esm/InputBase/InputBase.js +2 -2
  111. package/esm/ListItem/ListItem.d.ts +4 -4
  112. package/esm/ListItem/ListItem.js +6 -6
  113. package/esm/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +1 -1
  114. package/esm/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
  115. package/esm/ListItemText/ListItemText.d.ts +2 -2
  116. package/esm/ListItemText/ListItemText.js +2 -2
  117. package/esm/Menu/Menu.d.ts +2 -2
  118. package/esm/Menu/Menu.js +2 -2
  119. package/esm/MobileStepper/MobileStepper.d.ts +1 -1
  120. package/esm/MobileStepper/MobileStepper.js +1 -1
  121. package/esm/Modal/Modal.d.ts +2 -2
  122. package/esm/Modal/Modal.js +2 -2
  123. package/esm/OutlinedInput/OutlinedInput.js +1 -1
  124. package/esm/PaginationItem/PaginationItem.d.ts +1 -1
  125. package/esm/PaginationItem/PaginationItem.js +1 -1
  126. package/esm/Popover/Popover.d.ts +5 -5
  127. package/esm/Popover/Popover.js +5 -5
  128. package/esm/Popper/Popper.d.ts +2 -2
  129. package/esm/Popper/Popper.js +2 -2
  130. package/esm/Radio/Radio.js +2 -2
  131. package/esm/Rating/Rating.d.ts +1 -1
  132. package/esm/Rating/Rating.js +1 -1
  133. package/esm/Slider/Slider.d.ts +2 -2
  134. package/esm/Slider/Slider.js +2 -2
  135. package/esm/Snackbar/Snackbar.d.ts +4 -4
  136. package/esm/Snackbar/Snackbar.js +4 -4
  137. package/esm/SpeedDial/SpeedDial.d.ts +2 -2
  138. package/esm/SpeedDial/SpeedDial.js +2 -2
  139. package/esm/SpeedDialAction/SpeedDialAction.d.ts +5 -5
  140. package/esm/SpeedDialAction/SpeedDialAction.js +5 -5
  141. package/esm/StepContent/StepContent.d.ts +2 -2
  142. package/esm/StepContent/StepContent.js +2 -2
  143. package/esm/StepLabel/StepLabel.d.ts +3 -3
  144. package/esm/StepLabel/StepLabel.js +3 -3
  145. package/esm/SvgIcon/SvgIcon.d.ts +1 -1
  146. package/esm/SvgIcon/SvgIcon.js +1 -1
  147. package/esm/SwipeableDrawer/SwipeableDrawer.d.ts +1 -1
  148. package/esm/SwipeableDrawer/SwipeableDrawer.js +1 -1
  149. package/esm/Switch/Switch.js +2 -2
  150. package/esm/Tabs/Tabs.d.ts +3 -3
  151. package/esm/Tabs/Tabs.js +3 -3
  152. package/esm/TextField/TextField.d.ts +7 -7
  153. package/esm/TextField/TextField.js +5 -5
  154. package/esm/Tooltip/Tooltip.d.ts +7 -7
  155. package/esm/Tooltip/Tooltip.js +6 -6
  156. package/esm/Typography/Typography.d.ts +1 -1
  157. package/esm/Typography/Typography.js +1 -1
  158. package/esm/index.d.ts +0 -1
  159. package/esm/index.js +1 -1
  160. package/esm/internal/SwitchBase.d.ts +2 -2
  161. package/esm/styles/createTypography.d.ts +1 -23
  162. package/esm/styles/cssUtils.d.ts +1 -1
  163. package/esm/styles/index.d.ts +2 -2
  164. package/esm/useAutocomplete/useAutocomplete.d.ts +26 -0
  165. package/esm/useAutocomplete/useAutocomplete.js +88 -42
  166. package/esm/utils/memoTheme.d.ts +1 -1
  167. package/esm/version/index.js +2 -2
  168. package/index.d.ts +0 -1
  169. package/index.js +1 -1
  170. package/internal/SwitchBase.d.ts +2 -2
  171. package/modern/Accordion/Accordion.d.ts +2 -2
  172. package/modern/Alert/Alert.d.ts +2 -2
  173. package/modern/Autocomplete/Autocomplete.d.ts +40 -10
  174. package/modern/Avatar/Avatar.d.ts +1 -1
  175. package/modern/AvatarGroup/AvatarGroup.d.ts +2 -2
  176. package/modern/Backdrop/Backdrop.d.ts +3 -3
  177. package/modern/Badge/Badge.d.ts +2 -2
  178. package/modern/CardHeader/CardHeader.d.ts +2 -2
  179. package/modern/Dialog/Dialog.d.ts +3 -3
  180. package/modern/Dialog/dialogClasses.d.ts +6 -2
  181. package/modern/Drawer/Drawer.d.ts +2 -2
  182. package/modern/FormControlLabel/FormControlLabel.d.ts +1 -1
  183. package/modern/InputBase/InputBase.d.ts +2 -2
  184. package/modern/ListItem/ListItem.d.ts +4 -4
  185. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +1 -1
  186. package/modern/ListItemText/ListItemText.d.ts +2 -2
  187. package/modern/Menu/Menu.d.ts +2 -2
  188. package/modern/MobileStepper/MobileStepper.d.ts +1 -1
  189. package/modern/Modal/Modal.d.ts +2 -2
  190. package/modern/PaginationItem/PaginationItem.d.ts +1 -1
  191. package/modern/Popover/Popover.d.ts +5 -5
  192. package/modern/Popper/Popper.d.ts +2 -2
  193. package/modern/Rating/Rating.d.ts +1 -1
  194. package/modern/Slider/Slider.d.ts +2 -2
  195. package/modern/Snackbar/Snackbar.d.ts +4 -4
  196. package/modern/SpeedDial/SpeedDial.d.ts +2 -2
  197. package/modern/SpeedDialAction/SpeedDialAction.d.ts +5 -5
  198. package/modern/StepContent/StepContent.d.ts +2 -2
  199. package/modern/StepLabel/StepLabel.d.ts +3 -3
  200. package/modern/SvgIcon/SvgIcon.d.ts +1 -1
  201. package/modern/SwipeableDrawer/SwipeableDrawer.d.ts +1 -1
  202. package/modern/Tabs/Tabs.d.ts +3 -3
  203. package/modern/TextField/TextField.d.ts +7 -7
  204. package/modern/Tooltip/Tooltip.d.ts +7 -7
  205. package/modern/Typography/Typography.d.ts +1 -1
  206. package/modern/index.d.ts +0 -1
  207. package/modern/internal/SwitchBase.d.ts +2 -2
  208. package/modern/styles/createTypography.d.ts +1 -23
  209. package/modern/styles/cssUtils.d.ts +1 -1
  210. package/modern/styles/index.d.ts +2 -2
  211. package/modern/useAutocomplete/useAutocomplete.d.ts +26 -0
  212. package/modern/utils/memoTheme.d.ts +1 -1
  213. package/package.json +8 -20
  214. package/styles/createTypography.d.ts +1 -23
  215. package/styles/cssUtils.d.ts +1 -1
  216. package/styles/index.d.ts +2 -2
  217. package/useAutocomplete/useAutocomplete.d.ts +26 -0
  218. package/useAutocomplete/useAutocomplete.js +88 -42
  219. package/utils/memoTheme.d.ts +1 -1
  220. package/version/index.js +2 -2
  221. package/modern/Accordion/Accordion.js +0 -328
  222. package/modern/Accordion/AccordionContext.js +0 -13
  223. package/modern/Accordion/accordionClasses.js +0 -7
  224. package/modern/Accordion/index.js +0 -3
  225. package/modern/AccordionActions/AccordionActions.js +0 -93
  226. package/modern/AccordionActions/accordionActionsClasses.js +0 -7
  227. package/modern/AccordionActions/index.js +0 -3
  228. package/modern/AccordionDetails/AccordionDetails.js +0 -70
  229. package/modern/AccordionDetails/accordionDetailsClasses.js +0 -7
  230. package/modern/AccordionDetails/index.js +0 -3
  231. package/modern/AccordionSummary/AccordionSummary.js +0 -250
  232. package/modern/AccordionSummary/accordionSummaryClasses.js +0 -7
  233. package/modern/AccordionSummary/index.js +0 -3
  234. package/modern/Alert/Alert.js +0 -386
  235. package/modern/Alert/alertClasses.js +0 -7
  236. package/modern/Alert/index.js +0 -3
  237. package/modern/AlertTitle/AlertTitle.js +0 -76
  238. package/modern/AlertTitle/alertTitleClasses.js +0 -7
  239. package/modern/AlertTitle/index.js +0 -3
  240. package/modern/AppBar/AppBar.js +0 -227
  241. package/modern/AppBar/appBarClasses.js +0 -7
  242. package/modern/AppBar/index.js +0 -3
  243. package/modern/Autocomplete/Autocomplete.js +0 -1186
  244. package/modern/Autocomplete/autocompleteClasses.js +0 -7
  245. package/modern/Autocomplete/index.js +0 -3
  246. package/modern/Avatar/Avatar.js +0 -299
  247. package/modern/Avatar/avatarClasses.js +0 -7
  248. package/modern/Avatar/index.js +0 -3
  249. package/modern/AvatarGroup/AvatarGroup.js +0 -223
  250. package/modern/AvatarGroup/avatarGroupClasses.js +0 -7
  251. package/modern/AvatarGroup/index.js +0 -3
  252. package/modern/Backdrop/Backdrop.js +0 -205
  253. package/modern/Backdrop/backdropClasses.js +0 -7
  254. package/modern/Backdrop/index.js +0 -3
  255. package/modern/Badge/Badge.js +0 -428
  256. package/modern/Badge/badgeClasses.js +0 -9
  257. package/modern/Badge/index.js +0 -3
  258. package/modern/Badge/useBadge.js +0 -41
  259. package/modern/Badge/useBadge.types.js +0 -1
  260. package/modern/BottomNavigation/BottomNavigation.js +0 -123
  261. package/modern/BottomNavigation/bottomNavigationClasses.js +0 -7
  262. package/modern/BottomNavigation/index.js +0 -3
  263. package/modern/BottomNavigationAction/BottomNavigationAction.js +0 -187
  264. package/modern/BottomNavigationAction/bottomNavigationActionClasses.js +0 -7
  265. package/modern/BottomNavigationAction/index.js +0 -3
  266. package/modern/Box/Box.js +0 -35
  267. package/modern/Box/boxClasses.js +0 -3
  268. package/modern/Box/index.js +0 -3
  269. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +0 -90
  270. package/modern/Breadcrumbs/Breadcrumbs.js +0 -240
  271. package/modern/Breadcrumbs/breadcrumbsClasses.js +0 -7
  272. package/modern/Breadcrumbs/index.js +0 -3
  273. package/modern/Button/Button.js +0 -688
  274. package/modern/Button/buttonClasses.js +0 -7
  275. package/modern/Button/index.js +0 -3
  276. package/modern/ButtonBase/ButtonBase.js +0 -447
  277. package/modern/ButtonBase/Ripple.js +0 -88
  278. package/modern/ButtonBase/TouchRipple.js +0 -324
  279. package/modern/ButtonBase/buttonBaseClasses.js +0 -7
  280. package/modern/ButtonBase/index.js +0 -5
  281. package/modern/ButtonBase/touchRippleClasses.js +0 -7
  282. package/modern/ButtonGroup/ButtonGroup.js +0 -390
  283. package/modern/ButtonGroup/ButtonGroupButtonContext.js +0 -11
  284. package/modern/ButtonGroup/ButtonGroupContext.js +0 -11
  285. package/modern/ButtonGroup/buttonGroupClasses.js +0 -7
  286. package/modern/ButtonGroup/index.js +0 -5
  287. package/modern/Card/Card.js +0 -84
  288. package/modern/Card/cardClasses.js +0 -7
  289. package/modern/Card/index.js +0 -3
  290. package/modern/CardActionArea/CardActionArea.js +0 -117
  291. package/modern/CardActionArea/cardActionAreaClasses.js +0 -7
  292. package/modern/CardActionArea/index.js +0 -3
  293. package/modern/CardActions/CardActions.js +0 -94
  294. package/modern/CardActions/cardActionsClasses.js +0 -7
  295. package/modern/CardActions/index.js +0 -3
  296. package/modern/CardContent/CardContent.js +0 -80
  297. package/modern/CardContent/cardContentClasses.js +0 -7
  298. package/modern/CardContent/index.js +0 -3
  299. package/modern/CardHeader/CardHeader.js +0 -267
  300. package/modern/CardHeader/cardHeaderClasses.js +0 -7
  301. package/modern/CardHeader/index.js +0 -3
  302. package/modern/CardMedia/CardMedia.js +0 -145
  303. package/modern/CardMedia/cardMediaClasses.js +0 -7
  304. package/modern/CardMedia/index.js +0 -3
  305. package/modern/Checkbox/Checkbox.js +0 -280
  306. package/modern/Checkbox/checkboxClasses.js +0 -7
  307. package/modern/Checkbox/index.js +0 -3
  308. package/modern/Chip/Chip.js +0 -576
  309. package/modern/Chip/chipClasses.js +0 -7
  310. package/modern/Chip/index.js +0 -3
  311. package/modern/CircularProgress/CircularProgress.js +0 -285
  312. package/modern/CircularProgress/circularProgressClasses.js +0 -7
  313. package/modern/CircularProgress/index.js +0 -3
  314. package/modern/ClickAwayListener/ClickAwayListener.js +0 -174
  315. package/modern/ClickAwayListener/index.js +0 -1
  316. package/modern/Collapse/Collapse.js +0 -411
  317. package/modern/Collapse/collapseClasses.js +0 -7
  318. package/modern/Collapse/index.js +0 -3
  319. package/modern/Container/Container.js +0 -67
  320. package/modern/Container/containerClasses.js +0 -7
  321. package/modern/Container/index.js +0 -3
  322. package/modern/CssBaseline/CssBaseline.js +0 -161
  323. package/modern/CssBaseline/index.js +0 -1
  324. package/modern/DefaultPropsProvider/DefaultPropsProvider.js +0 -29
  325. package/modern/DefaultPropsProvider/index.js +0 -1
  326. package/modern/Dialog/Dialog.js +0 -513
  327. package/modern/Dialog/DialogContext.js +0 -8
  328. package/modern/Dialog/dialogClasses.js +0 -7
  329. package/modern/Dialog/index.js +0 -3
  330. package/modern/DialogActions/DialogActions.js +0 -96
  331. package/modern/DialogActions/dialogActionsClasses.js +0 -7
  332. package/modern/DialogActions/index.js +0 -3
  333. package/modern/DialogContent/DialogContent.js +0 -109
  334. package/modern/DialogContent/dialogContentClasses.js +0 -7
  335. package/modern/DialogContent/index.js +0 -3
  336. package/modern/DialogContentText/DialogContentText.js +0 -77
  337. package/modern/DialogContentText/dialogContentTextClasses.js +0 -7
  338. package/modern/DialogContentText/index.js +0 -3
  339. package/modern/DialogTitle/DialogTitle.js +0 -81
  340. package/modern/DialogTitle/dialogTitleClasses.js +0 -7
  341. package/modern/DialogTitle/index.js +0 -3
  342. package/modern/Divider/Divider.js +0 -314
  343. package/modern/Divider/dividerClasses.js +0 -7
  344. package/modern/Divider/index.js +0 -3
  345. package/modern/Drawer/Drawer.js +0 -434
  346. package/modern/Drawer/drawerClasses.js +0 -7
  347. package/modern/Drawer/index.js +0 -3
  348. package/modern/Fab/Fab.js +0 -271
  349. package/modern/Fab/fabClasses.js +0 -7
  350. package/modern/Fab/index.js +0 -3
  351. package/modern/Fade/Fade.js +0 -210
  352. package/modern/Fade/index.js +0 -1
  353. package/modern/FilledInput/FilledInput.js +0 -516
  354. package/modern/FilledInput/filledInputClasses.js +0 -11
  355. package/modern/FilledInput/index.js +0 -3
  356. package/modern/FormControl/FormControl.js +0 -305
  357. package/modern/FormControl/FormControlContext.js +0 -11
  358. package/modern/FormControl/formControlClasses.js +0 -7
  359. package/modern/FormControl/formControlState.js +0 -15
  360. package/modern/FormControl/index.js +0 -4
  361. package/modern/FormControl/useFormControl.js +0 -7
  362. package/modern/FormControlLabel/FormControlLabel.js +0 -283
  363. package/modern/FormControlLabel/formControlLabelClasses.js +0 -7
  364. package/modern/FormControlLabel/index.js +0 -3
  365. package/modern/FormGroup/FormGroup.js +0 -108
  366. package/modern/FormGroup/formGroupClasses.js +0 -7
  367. package/modern/FormGroup/index.js +0 -3
  368. package/modern/FormHelperText/FormHelperText.js +0 -186
  369. package/modern/FormHelperText/formHelperTextClasses.js +0 -7
  370. package/modern/FormHelperText/index.js +0 -3
  371. package/modern/FormLabel/FormLabel.js +0 -182
  372. package/modern/FormLabel/formLabelClasses.js +0 -7
  373. package/modern/FormLabel/index.js +0 -4
  374. package/modern/GlobalStyles/GlobalStyles.js +0 -26
  375. package/modern/GlobalStyles/index.js +0 -1
  376. package/modern/Grid/Grid.js +0 -138
  377. package/modern/Grid/gridClasses.js +0 -19
  378. package/modern/Grid/index.js +0 -4
  379. package/modern/GridLegacy/GridLegacy.js +0 -588
  380. package/modern/GridLegacy/GridLegacyContext.js +0 -12
  381. package/modern/GridLegacy/gridLegacyClasses.js +0 -19
  382. package/modern/GridLegacy/index.js +0 -3
  383. package/modern/Grow/Grow.js +0 -262
  384. package/modern/Grow/index.js +0 -1
  385. package/modern/Icon/Icon.js +0 -185
  386. package/modern/Icon/iconClasses.js +0 -7
  387. package/modern/Icon/index.js +0 -3
  388. package/modern/IconButton/IconButton.js +0 -322
  389. package/modern/IconButton/iconButtonClasses.js +0 -7
  390. package/modern/IconButton/index.js +0 -3
  391. package/modern/ImageList/ImageList.js +0 -150
  392. package/modern/ImageList/ImageListContext.js +0 -13
  393. package/modern/ImageList/imageListClasses.js +0 -7
  394. package/modern/ImageList/index.js +0 -3
  395. package/modern/ImageListItem/ImageListItem.js +0 -188
  396. package/modern/ImageListItem/imageListItemClasses.js +0 -7
  397. package/modern/ImageListItem/index.js +0 -3
  398. package/modern/ImageListItemBar/ImageListItemBar.js +0 -253
  399. package/modern/ImageListItemBar/imageListItemBarClasses.js +0 -7
  400. package/modern/ImageListItemBar/index.js +0 -3
  401. package/modern/InitColorSchemeScript/InitColorSchemeScript.js +0 -16
  402. package/modern/InitColorSchemeScript/index.js +0 -1
  403. package/modern/Input/Input.js +0 -361
  404. package/modern/Input/index.js +0 -3
  405. package/modern/Input/inputClasses.js +0 -11
  406. package/modern/InputAdornment/InputAdornment.js +0 -186
  407. package/modern/InputAdornment/index.js +0 -3
  408. package/modern/InputAdornment/inputAdornmentClasses.js +0 -7
  409. package/modern/InputBase/InputBase.js +0 -749
  410. package/modern/InputBase/index.js +0 -3
  411. package/modern/InputBase/inputBaseClasses.js +0 -7
  412. package/modern/InputBase/utils.js +0 -30
  413. package/modern/InputLabel/InputLabel.js +0 -283
  414. package/modern/InputLabel/index.js +0 -3
  415. package/modern/InputLabel/inputLabelClasses.js +0 -7
  416. package/modern/LinearProgress/LinearProgress.js +0 -455
  417. package/modern/LinearProgress/index.js +0 -3
  418. package/modern/LinearProgress/linearProgressClasses.js +0 -7
  419. package/modern/Link/Link.js +0 -283
  420. package/modern/Link/getTextDecoration.js +0 -16
  421. package/modern/Link/index.js +0 -3
  422. package/modern/Link/linkClasses.js +0 -7
  423. package/modern/List/List.js +0 -134
  424. package/modern/List/ListContext.js +0 -12
  425. package/modern/List/index.js +0 -3
  426. package/modern/List/listClasses.js +0 -7
  427. package/modern/ListItem/ListItem.js +0 -388
  428. package/modern/ListItem/index.js +0 -3
  429. package/modern/ListItem/listItemClasses.js +0 -7
  430. package/modern/ListItemAvatar/ListItemAvatar.js +0 -91
  431. package/modern/ListItemAvatar/index.js +0 -3
  432. package/modern/ListItemAvatar/listItemAvatarClasses.js +0 -7
  433. package/modern/ListItemButton/ListItemButton.js +0 -264
  434. package/modern/ListItemButton/index.js +0 -3
  435. package/modern/ListItemButton/listItemButtonClasses.js +0 -7
  436. package/modern/ListItemIcon/ListItemIcon.js +0 -97
  437. package/modern/ListItemIcon/index.js +0 -3
  438. package/modern/ListItemIcon/listItemIconClasses.js +0 -7
  439. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +0 -96
  440. package/modern/ListItemSecondaryAction/index.js +0 -3
  441. package/modern/ListItemSecondaryAction/listItemSecondaryActionClasses.js +0 -7
  442. package/modern/ListItemText/ListItemText.js +0 -227
  443. package/modern/ListItemText/index.js +0 -3
  444. package/modern/ListItemText/listItemTextClasses.js +0 -7
  445. package/modern/ListSubheader/ListSubheader.js +0 -167
  446. package/modern/ListSubheader/index.js +0 -3
  447. package/modern/ListSubheader/listSubheaderClasses.js +0 -7
  448. package/modern/Menu/Menu.js +0 -341
  449. package/modern/Menu/index.js +0 -3
  450. package/modern/Menu/menuClasses.js +0 -7
  451. package/modern/MenuItem/MenuItem.js +0 -283
  452. package/modern/MenuItem/index.js +0 -3
  453. package/modern/MenuItem/menuItemClasses.js +0 -7
  454. package/modern/MenuList/MenuList.js +0 -290
  455. package/modern/MenuList/index.js +0 -1
  456. package/modern/MobileStepper/MobileStepper.js +0 -306
  457. package/modern/MobileStepper/index.js +0 -3
  458. package/modern/MobileStepper/mobileStepperClasses.js +0 -7
  459. package/modern/Modal/Modal.js +0 -396
  460. package/modern/Modal/ModalManager.js +0 -211
  461. package/modern/Modal/index.js +0 -4
  462. package/modern/Modal/modalClasses.js +0 -7
  463. package/modern/Modal/useModal.js +0 -200
  464. package/modern/Modal/useModal.types.js +0 -1
  465. package/modern/NativeSelect/NativeSelect.js +0 -133
  466. package/modern/NativeSelect/NativeSelectInput.js +0 -240
  467. package/modern/NativeSelect/index.js +0 -3
  468. package/modern/NativeSelect/nativeSelectClasses.js +0 -7
  469. package/modern/NoSsr/NoSsr.js +0 -70
  470. package/modern/NoSsr/NoSsr.types.js +0 -1
  471. package/modern/NoSsr/index.js +0 -1
  472. package/modern/OutlinedInput/NotchedOutline.js +0 -154
  473. package/modern/OutlinedInput/OutlinedInput.js +0 -410
  474. package/modern/OutlinedInput/index.js +0 -3
  475. package/modern/OutlinedInput/outlinedInputClasses.js +0 -11
  476. package/modern/OverridableComponent/index.js +0 -1
  477. package/modern/Pagination/Pagination.js +0 -245
  478. package/modern/Pagination/index.js +0 -3
  479. package/modern/Pagination/paginationClasses.js +0 -7
  480. package/modern/PaginationItem/PaginationItem.js +0 -472
  481. package/modern/PaginationItem/index.js +0 -3
  482. package/modern/PaginationItem/paginationItemClasses.js +0 -7
  483. package/modern/Paper/Paper.js +0 -170
  484. package/modern/Paper/index.js +0 -3
  485. package/modern/Paper/paperClasses.js +0 -7
  486. package/modern/PigmentContainer/PigmentContainer.js +0 -98
  487. package/modern/PigmentContainer/index.js +0 -3
  488. package/modern/PigmentGrid/PigmentGrid.js +0 -126
  489. package/modern/PigmentGrid/index.js +0 -3
  490. package/modern/PigmentStack/PigmentStack.js +0 -81
  491. package/modern/PigmentStack/index.js +0 -3
  492. package/modern/Popover/Popover.js +0 -583
  493. package/modern/Popover/index.js +0 -4
  494. package/modern/Popover/popoverClasses.js +0 -7
  495. package/modern/Popper/BasePopper.js +0 -370
  496. package/modern/Popper/BasePopper.types.js +0 -1
  497. package/modern/Popper/Popper.js +0 -210
  498. package/modern/Popper/index.js +0 -2
  499. package/modern/Popper/popperClasses.js +0 -7
  500. package/modern/Portal/Portal.js +0 -86
  501. package/modern/Portal/Portal.types.js +0 -1
  502. package/modern/Portal/index.js +0 -1
  503. package/modern/Radio/Radio.js +0 -309
  504. package/modern/Radio/RadioButtonIcon.js +0 -87
  505. package/modern/Radio/index.js +0 -3
  506. package/modern/Radio/radioClasses.js +0 -7
  507. package/modern/RadioGroup/RadioGroup.js +0 -114
  508. package/modern/RadioGroup/RadioGroupContext.js +0 -11
  509. package/modern/RadioGroup/index.js +0 -4
  510. package/modern/RadioGroup/radioGroupClasses.js +0 -7
  511. package/modern/RadioGroup/useRadioGroup.js +0 -7
  512. package/modern/Rating/Rating.js +0 -777
  513. package/modern/Rating/index.js +0 -3
  514. package/modern/Rating/ratingClasses.js +0 -7
  515. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +0 -120
  516. package/modern/ScopedCssBaseline/index.js +0 -3
  517. package/modern/ScopedCssBaseline/scopedCssBaselineClasses.js +0 -7
  518. package/modern/Select/Select.js +0 -300
  519. package/modern/Select/SelectInput.js +0 -673
  520. package/modern/Select/index.js +0 -3
  521. package/modern/Select/selectClasses.js +0 -7
  522. package/modern/Skeleton/Skeleton.js +0 -269
  523. package/modern/Skeleton/index.js +0 -3
  524. package/modern/Skeleton/skeletonClasses.js +0 -7
  525. package/modern/Slide/Slide.js +0 -338
  526. package/modern/Slide/index.js +0 -1
  527. package/modern/Slider/Slider.js +0 -1095
  528. package/modern/Slider/SliderValueLabel.js +0 -53
  529. package/modern/Slider/SliderValueLabel.types.js +0 -1
  530. package/modern/Slider/index.js +0 -4
  531. package/modern/Slider/sliderClasses.js +0 -7
  532. package/modern/Slider/useSlider.js +0 -704
  533. package/modern/Slider/useSlider.types.js +0 -1
  534. package/modern/Snackbar/Snackbar.js +0 -426
  535. package/modern/Snackbar/index.js +0 -3
  536. package/modern/Snackbar/snackbarClasses.js +0 -7
  537. package/modern/Snackbar/useSnackbar.js +0 -133
  538. package/modern/Snackbar/useSnackbar.types.js +0 -1
  539. package/modern/SnackbarContent/SnackbarContent.js +0 -132
  540. package/modern/SnackbarContent/index.js +0 -3
  541. package/modern/SnackbarContent/snackbarContentClasses.js +0 -7
  542. package/modern/SpeedDial/SpeedDial.js +0 -579
  543. package/modern/SpeedDial/index.js +0 -3
  544. package/modern/SpeedDial/speedDialClasses.js +0 -7
  545. package/modern/SpeedDialAction/SpeedDialAction.js +0 -351
  546. package/modern/SpeedDialAction/index.js +0 -3
  547. package/modern/SpeedDialAction/speedDialActionClasses.js +0 -7
  548. package/modern/SpeedDialIcon/SpeedDialIcon.js +0 -156
  549. package/modern/SpeedDialIcon/index.js +0 -3
  550. package/modern/SpeedDialIcon/speedDialIconClasses.js +0 -7
  551. package/modern/Stack/Stack.js +0 -62
  552. package/modern/Stack/index.js +0 -2
  553. package/modern/Stack/stackClasses.js +0 -7
  554. package/modern/Step/Step.js +0 -176
  555. package/modern/Step/StepContext.js +0 -19
  556. package/modern/Step/index.js +0 -5
  557. package/modern/Step/stepClasses.js +0 -7
  558. package/modern/StepButton/StepButton.js +0 -133
  559. package/modern/StepButton/index.js +0 -3
  560. package/modern/StepButton/stepButtonClasses.js +0 -7
  561. package/modern/StepConnector/StepConnector.js +0 -152
  562. package/modern/StepConnector/index.js +0 -3
  563. package/modern/StepConnector/stepConnectorClasses.js +0 -7
  564. package/modern/StepContent/StepContent.js +0 -187
  565. package/modern/StepContent/index.js +0 -3
  566. package/modern/StepContent/stepContentClasses.js +0 -7
  567. package/modern/StepIcon/StepIcon.js +0 -161
  568. package/modern/StepIcon/index.js +0 -3
  569. package/modern/StepIcon/stepIconClasses.js +0 -7
  570. package/modern/StepLabel/StepLabel.js +0 -280
  571. package/modern/StepLabel/index.js +0 -3
  572. package/modern/StepLabel/stepLabelClasses.js +0 -7
  573. package/modern/Stepper/Stepper.js +0 -167
  574. package/modern/Stepper/StepperContext.js +0 -19
  575. package/modern/Stepper/index.js +0 -5
  576. package/modern/Stepper/stepperClasses.js +0 -7
  577. package/modern/SvgIcon/SvgIcon.js +0 -234
  578. package/modern/SvgIcon/index.js +0 -3
  579. package/modern/SvgIcon/svgIconClasses.js +0 -7
  580. package/modern/SwipeableDrawer/SwipeArea.js +0 -104
  581. package/modern/SwipeableDrawer/SwipeableDrawer.js +0 -661
  582. package/modern/SwipeableDrawer/index.js +0 -1
  583. package/modern/Switch/Switch.js +0 -407
  584. package/modern/Switch/index.js +0 -3
  585. package/modern/Switch/switchClasses.js +0 -7
  586. package/modern/Tab/Tab.js +0 -338
  587. package/modern/Tab/index.js +0 -3
  588. package/modern/Tab/tabClasses.js +0 -7
  589. package/modern/TabScrollButton/TabScrollButton.js +0 -172
  590. package/modern/TabScrollButton/index.js +0 -3
  591. package/modern/TabScrollButton/tabScrollButtonClasses.js +0 -7
  592. package/modern/Table/Table.js +0 -136
  593. package/modern/Table/TableContext.js +0 -12
  594. package/modern/Table/Tablelvl2Context.js +0 -12
  595. package/modern/Table/index.js +0 -3
  596. package/modern/Table/tableClasses.js +0 -7
  597. package/modern/TableBody/TableBody.js +0 -86
  598. package/modern/TableBody/index.js +0 -3
  599. package/modern/TableBody/tableBodyClasses.js +0 -7
  600. package/modern/TableCell/TableCell.js +0 -270
  601. package/modern/TableCell/index.js +0 -3
  602. package/modern/TableCell/tableCellClasses.js +0 -7
  603. package/modern/TableContainer/TableContainer.js +0 -78
  604. package/modern/TableContainer/index.js +0 -3
  605. package/modern/TableContainer/tableContainerClasses.js +0 -7
  606. package/modern/TableFooter/TableFooter.js +0 -86
  607. package/modern/TableFooter/index.js +0 -3
  608. package/modern/TableFooter/tableFooterClasses.js +0 -7
  609. package/modern/TableHead/TableHead.js +0 -86
  610. package/modern/TableHead/index.js +0 -3
  611. package/modern/TableHead/tableHeadClasses.js +0 -7
  612. package/modern/TablePagination/TablePagination.js +0 -505
  613. package/modern/TablePagination/TablePaginationActions.js +0 -194
  614. package/modern/TablePagination/index.js +0 -3
  615. package/modern/TablePagination/tablePaginationClasses.js +0 -7
  616. package/modern/TableRow/TableRow.js +0 -127
  617. package/modern/TableRow/index.js +0 -3
  618. package/modern/TableRow/tableRowClasses.js +0 -7
  619. package/modern/TableSortLabel/TableSortLabel.js +0 -212
  620. package/modern/TableSortLabel/index.js +0 -3
  621. package/modern/TableSortLabel/tableSortLabelClasses.js +0 -7
  622. package/modern/Tabs/ScrollbarSize.js +0 -58
  623. package/modern/Tabs/Tabs.js +0 -956
  624. package/modern/Tabs/index.js +0 -3
  625. package/modern/Tabs/tabsClasses.js +0 -7
  626. package/modern/TextField/TextField.js +0 -457
  627. package/modern/TextField/index.js +0 -3
  628. package/modern/TextField/textFieldClasses.js +0 -7
  629. package/modern/TextareaAutosize/TextareaAutosize.js +0 -243
  630. package/modern/TextareaAutosize/TextareaAutosize.types.js +0 -1
  631. package/modern/TextareaAutosize/index.js +0 -1
  632. package/modern/ToggleButton/ToggleButton.js +0 -268
  633. package/modern/ToggleButton/index.js +0 -3
  634. package/modern/ToggleButton/toggleButtonClasses.js +0 -7
  635. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +0 -281
  636. package/modern/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +0 -11
  637. package/modern/ToggleButtonGroup/ToggleButtonGroupContext.js +0 -11
  638. package/modern/ToggleButtonGroup/index.js +0 -3
  639. package/modern/ToggleButtonGroup/isValueSelected.js +0 -11
  640. package/modern/ToggleButtonGroup/toggleButtonGroupClasses.js +0 -7
  641. package/modern/Toolbar/Toolbar.js +0 -129
  642. package/modern/Toolbar/index.js +0 -3
  643. package/modern/Toolbar/toolbarClasses.js +0 -7
  644. package/modern/Tooltip/Tooltip.js +0 -898
  645. package/modern/Tooltip/index.js +0 -3
  646. package/modern/Tooltip/tooltipClasses.js +0 -7
  647. package/modern/Typography/Typography.js +0 -268
  648. package/modern/Typography/index.js +0 -3
  649. package/modern/Typography/typographyClasses.js +0 -7
  650. package/modern/Unstable_TrapFocus/FocusTrap.js +0 -329
  651. package/modern/Unstable_TrapFocus/FocusTrap.types.js +0 -1
  652. package/modern/Unstable_TrapFocus/index.js +0 -1
  653. package/modern/Zoom/Zoom.js +0 -210
  654. package/modern/Zoom/index.js +0 -1
  655. package/modern/className/index.js +0 -2
  656. package/modern/colors/amber.js +0 -17
  657. package/modern/colors/blue.js +0 -17
  658. package/modern/colors/blueGrey.js +0 -17
  659. package/modern/colors/brown.js +0 -17
  660. package/modern/colors/common.js +0 -5
  661. package/modern/colors/cyan.js +0 -17
  662. package/modern/colors/deepOrange.js +0 -17
  663. package/modern/colors/deepPurple.js +0 -17
  664. package/modern/colors/green.js +0 -17
  665. package/modern/colors/grey.js +0 -17
  666. package/modern/colors/index.js +0 -20
  667. package/modern/colors/indigo.js +0 -17
  668. package/modern/colors/lightBlue.js +0 -17
  669. package/modern/colors/lightGreen.js +0 -17
  670. package/modern/colors/lime.js +0 -17
  671. package/modern/colors/orange.js +0 -17
  672. package/modern/colors/pink.js +0 -17
  673. package/modern/colors/purple.js +0 -17
  674. package/modern/colors/red.js +0 -17
  675. package/modern/colors/teal.js +0 -17
  676. package/modern/colors/yellow.js +0 -17
  677. package/modern/darkScrollbar/index.js +0 -32
  678. package/modern/generateUtilityClass/index.js +0 -1
  679. package/modern/generateUtilityClasses/index.js +0 -1
  680. package/modern/index.js +0 -286
  681. package/modern/internal/SwitchBase.js +0 -355
  682. package/modern/internal/animate.js +0 -39
  683. package/modern/internal/svg-icons/Add.js +0 -12
  684. package/modern/internal/svg-icons/ArrowDownward.js +0 -12
  685. package/modern/internal/svg-icons/ArrowDropDown.js +0 -12
  686. package/modern/internal/svg-icons/Cancel.js +0 -12
  687. package/modern/internal/svg-icons/CheckBox.js +0 -12
  688. package/modern/internal/svg-icons/CheckBoxOutlineBlank.js +0 -12
  689. package/modern/internal/svg-icons/CheckCircle.js +0 -12
  690. package/modern/internal/svg-icons/Close.js +0 -14
  691. package/modern/internal/svg-icons/ErrorOutline.js +0 -12
  692. package/modern/internal/svg-icons/FirstPage.js +0 -12
  693. package/modern/internal/svg-icons/IndeterminateCheckBox.js +0 -12
  694. package/modern/internal/svg-icons/InfoOutlined.js +0 -12
  695. package/modern/internal/svg-icons/KeyboardArrowLeft.js +0 -12
  696. package/modern/internal/svg-icons/KeyboardArrowRight.js +0 -12
  697. package/modern/internal/svg-icons/LastPage.js +0 -12
  698. package/modern/internal/svg-icons/MoreHoriz.js +0 -12
  699. package/modern/internal/svg-icons/NavigateBefore.js +0 -12
  700. package/modern/internal/svg-icons/NavigateNext.js +0 -12
  701. package/modern/internal/svg-icons/Person.js +0 -12
  702. package/modern/internal/svg-icons/RadioButtonChecked.js +0 -12
  703. package/modern/internal/svg-icons/RadioButtonUnchecked.js +0 -12
  704. package/modern/internal/svg-icons/ReportProblemOutlined.js +0 -12
  705. package/modern/internal/svg-icons/Star.js +0 -12
  706. package/modern/internal/svg-icons/StarBorder.js +0 -12
  707. package/modern/internal/svg-icons/SuccessOutlined.js +0 -12
  708. package/modern/internal/svg-icons/Warning.js +0 -12
  709. package/modern/internal/switchBaseClasses.js +0 -7
  710. package/modern/locale/index.js +0 -4324
  711. package/modern/package.json +0 -1
  712. package/modern/styles/ThemeProvider.js +0 -40
  713. package/modern/styles/ThemeProviderNoVars.js +0 -17
  714. package/modern/styles/ThemeProviderWithVars.js +0 -91
  715. package/modern/styles/adaptV4Theme.js +0 -83
  716. package/modern/styles/components.js +0 -1
  717. package/modern/styles/createColorScheme.js +0 -41
  718. package/modern/styles/createGetSelector.js +0 -60
  719. package/modern/styles/createMixins.js +0 -16
  720. package/modern/styles/createMuiStrictModeTheme.js +0 -7
  721. package/modern/styles/createPalette.js +0 -302
  722. package/modern/styles/createStyles.js +0 -10
  723. package/modern/styles/createTheme.js +0 -98
  724. package/modern/styles/createThemeNoVars.js +0 -91
  725. package/modern/styles/createThemeWithVars.js +0 -386
  726. package/modern/styles/createTransitions.js +0 -89
  727. package/modern/styles/createTypography.js +0 -92
  728. package/modern/styles/cssUtils.js +0 -125
  729. package/modern/styles/defaultTheme.js +0 -5
  730. package/modern/styles/excludeVariablesFromRoot.js +0 -5
  731. package/modern/styles/experimental_extendTheme.js +0 -9
  732. package/modern/styles/getOverlayAlpha.js +0 -10
  733. package/modern/styles/identifier.js +0 -1
  734. package/modern/styles/index.js +0 -37
  735. package/modern/styles/makeStyles.js +0 -4
  736. package/modern/styles/overrides.js +0 -1
  737. package/modern/styles/props.js +0 -1
  738. package/modern/styles/responsiveFontSizes.js +0 -67
  739. package/modern/styles/rootShouldForwardProp.js +0 -3
  740. package/modern/styles/shadows.js +0 -10
  741. package/modern/styles/shouldSkipGeneratingVar.js +0 -5
  742. package/modern/styles/slotShouldForwardProp.js +0 -5
  743. package/modern/styles/stringifyTheme.js +0 -54
  744. package/modern/styles/styled.js +0 -14
  745. package/modern/styles/useTheme.js +0 -15
  746. package/modern/styles/useThemeProps.js +0 -16
  747. package/modern/styles/variants.js +0 -1
  748. package/modern/styles/withStyles.js +0 -4
  749. package/modern/styles/withTheme.js +0 -4
  750. package/modern/styles/zIndex.js +0 -13
  751. package/modern/transitions/index.js +0 -1
  752. package/modern/transitions/transition.js +0 -1
  753. package/modern/transitions/utils.js +0 -13
  754. package/modern/types/OverridableComponentAugmentation.js +0 -1
  755. package/modern/useAutocomplete/index.js +0 -1
  756. package/modern/useAutocomplete/useAutocomplete.js +0 -973
  757. package/modern/useLazyRipple/index.js +0 -3
  758. package/modern/useLazyRipple/useLazyRipple.js +0 -85
  759. package/modern/useMediaQuery/index.js +0 -6
  760. package/modern/usePagination/index.js +0 -1
  761. package/modern/usePagination/usePagination.js +0 -113
  762. package/modern/useScrollTrigger/index.js +0 -1
  763. package/modern/useScrollTrigger/useScrollTrigger.js +0 -55
  764. package/modern/utils/PolymorphicComponent.js +0 -1
  765. package/modern/utils/areArraysEqual.js +0 -4
  766. package/modern/utils/capitalize.js +0 -2
  767. package/modern/utils/createChainedFunction.js +0 -2
  768. package/modern/utils/createSimplePaletteValueFilter.js +0 -41
  769. package/modern/utils/createSvgIcon.js +0 -26
  770. package/modern/utils/debounce.js +0 -2
  771. package/modern/utils/deprecatedPropType.js +0 -2
  772. package/modern/utils/getScrollbarSize.js +0 -2
  773. package/modern/utils/index.js +0 -31
  774. package/modern/utils/isHostComponent.js +0 -7
  775. package/modern/utils/isMuiElement.js +0 -2
  776. package/modern/utils/memoTheme.js +0 -3
  777. package/modern/utils/mergeSlotProps.js +0 -75
  778. package/modern/utils/omitEventHandlers.js +0 -18
  779. package/modern/utils/ownerDocument.js +0 -2
  780. package/modern/utils/ownerWindow.js +0 -2
  781. package/modern/utils/requirePropFactory.js +0 -2
  782. package/modern/utils/setRef.js +0 -2
  783. package/modern/utils/shouldSpreadAdditionalProps.js +0 -5
  784. package/modern/utils/types.js +0 -1
  785. package/modern/utils/unsupportedProp.js +0 -2
  786. package/modern/utils/useControlled.js +0 -4
  787. package/modern/utils/useEnhancedEffect.js +0 -4
  788. package/modern/utils/useEventCallback.js +0 -4
  789. package/modern/utils/useForkRef.js +0 -4
  790. package/modern/utils/useId.js +0 -4
  791. package/modern/utils/useSlot.js +0 -80
  792. package/modern/version/index.js +0 -6
  793. package/modern/zero-styled/index.js +0 -27
  794. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,956 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import { isFragment } from 'react-is';
5
- import PropTypes from 'prop-types';
6
- import clsx from 'clsx';
7
- import refType from '@mui/utils/refType';
8
- import composeClasses from '@mui/utils/composeClasses';
9
- import { useRtl } from '@mui/system/RtlProvider';
10
- import useSlotProps from '@mui/utils/useSlotProps';
11
- import { styled, useTheme } from "../zero-styled/index.js";
12
- import memoTheme from "../utils/memoTheme.js";
13
- import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
- import debounce from "../utils/debounce.js";
15
- import animate from "../internal/animate.js";
16
- import ScrollbarSize from "./ScrollbarSize.js";
17
- import TabScrollButton from "../TabScrollButton/index.js";
18
- import useEventCallback from "../utils/useEventCallback.js";
19
- import tabsClasses, { getTabsUtilityClass } from "./tabsClasses.js";
20
- import ownerDocument from "../utils/ownerDocument.js";
21
- import ownerWindow from "../utils/ownerWindow.js";
22
- import useSlot from "../utils/useSlot.js";
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- const nextItem = (list, item) => {
25
- if (list === item) {
26
- return list.firstChild;
27
- }
28
- if (item && item.nextElementSibling) {
29
- return item.nextElementSibling;
30
- }
31
- return list.firstChild;
32
- };
33
- const previousItem = (list, item) => {
34
- if (list === item) {
35
- return list.lastChild;
36
- }
37
- if (item && item.previousElementSibling) {
38
- return item.previousElementSibling;
39
- }
40
- return list.lastChild;
41
- };
42
- const moveFocus = (list, currentFocus, traversalFunction) => {
43
- let wrappedOnce = false;
44
- let nextFocus = traversalFunction(list, currentFocus);
45
- while (nextFocus) {
46
- // Prevent infinite loop.
47
- if (nextFocus === list.firstChild) {
48
- if (wrappedOnce) {
49
- return;
50
- }
51
- wrappedOnce = true;
52
- }
53
-
54
- // Same logic as useAutocomplete.js
55
- const nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';
56
- if (!nextFocus.hasAttribute('tabindex') || nextFocusDisabled) {
57
- // Move to the next element.
58
- nextFocus = traversalFunction(list, nextFocus);
59
- } else {
60
- nextFocus.focus();
61
- return;
62
- }
63
- }
64
- };
65
- const useUtilityClasses = ownerState => {
66
- const {
67
- vertical,
68
- fixed,
69
- hideScrollbar,
70
- scrollableX,
71
- scrollableY,
72
- centered,
73
- scrollButtonsHideMobile,
74
- classes
75
- } = ownerState;
76
- const slots = {
77
- root: ['root', vertical && 'vertical'],
78
- scroller: ['scroller', fixed && 'fixed', hideScrollbar && 'hideScrollbar', scrollableX && 'scrollableX', scrollableY && 'scrollableY'],
79
- list: ['list', 'flexContainer', vertical && 'flexContainerVertical', vertical && 'vertical', centered && 'centered'],
80
- indicator: ['indicator'],
81
- scrollButtons: ['scrollButtons', scrollButtonsHideMobile && 'scrollButtonsHideMobile'],
82
- scrollableX: [scrollableX && 'scrollableX'],
83
- hideScrollbar: [hideScrollbar && 'hideScrollbar']
84
- };
85
- return composeClasses(slots, getTabsUtilityClass, classes);
86
- };
87
- const TabsRoot = styled('div', {
88
- name: 'MuiTabs',
89
- slot: 'Root',
90
- overridesResolver: (props, styles) => {
91
- const {
92
- ownerState
93
- } = props;
94
- return [{
95
- [`& .${tabsClasses.scrollButtons}`]: styles.scrollButtons
96
- }, {
97
- [`& .${tabsClasses.scrollButtons}`]: ownerState.scrollButtonsHideMobile && styles.scrollButtonsHideMobile
98
- }, styles.root, ownerState.vertical && styles.vertical];
99
- }
100
- })(memoTheme(({
101
- theme
102
- }) => ({
103
- overflow: 'hidden',
104
- minHeight: 48,
105
- // Add iOS momentum scrolling for iOS < 13.0
106
- WebkitOverflowScrolling: 'touch',
107
- display: 'flex',
108
- variants: [{
109
- props: ({
110
- ownerState
111
- }) => ownerState.vertical,
112
- style: {
113
- flexDirection: 'column'
114
- }
115
- }, {
116
- props: ({
117
- ownerState
118
- }) => ownerState.scrollButtonsHideMobile,
119
- style: {
120
- [`& .${tabsClasses.scrollButtons}`]: {
121
- [theme.breakpoints.down('sm')]: {
122
- display: 'none'
123
- }
124
- }
125
- }
126
- }]
127
- })));
128
- const TabsScroller = styled('div', {
129
- name: 'MuiTabs',
130
- slot: 'Scroller',
131
- overridesResolver: (props, styles) => {
132
- const {
133
- ownerState
134
- } = props;
135
- return [styles.scroller, ownerState.fixed && styles.fixed, ownerState.hideScrollbar && styles.hideScrollbar, ownerState.scrollableX && styles.scrollableX, ownerState.scrollableY && styles.scrollableY];
136
- }
137
- })({
138
- position: 'relative',
139
- display: 'inline-block',
140
- flex: '1 1 auto',
141
- whiteSpace: 'nowrap',
142
- variants: [{
143
- props: ({
144
- ownerState
145
- }) => ownerState.fixed,
146
- style: {
147
- overflowX: 'hidden',
148
- width: '100%'
149
- }
150
- }, {
151
- props: ({
152
- ownerState
153
- }) => ownerState.hideScrollbar,
154
- style: {
155
- // Hide dimensionless scrollbar on macOS
156
- scrollbarWidth: 'none',
157
- // Firefox
158
- '&::-webkit-scrollbar': {
159
- display: 'none' // Safari + Chrome
160
- }
161
- }
162
- }, {
163
- props: ({
164
- ownerState
165
- }) => ownerState.scrollableX,
166
- style: {
167
- overflowX: 'auto',
168
- overflowY: 'hidden'
169
- }
170
- }, {
171
- props: ({
172
- ownerState
173
- }) => ownerState.scrollableY,
174
- style: {
175
- overflowY: 'auto',
176
- overflowX: 'hidden'
177
- }
178
- }]
179
- });
180
- const List = styled('div', {
181
- name: 'MuiTabs',
182
- slot: 'List',
183
- overridesResolver: (props, styles) => {
184
- const {
185
- ownerState
186
- } = props;
187
- return [styles.list, styles.flexContainer, ownerState.vertical && styles.flexContainerVertical, ownerState.centered && styles.centered];
188
- }
189
- })({
190
- display: 'flex',
191
- variants: [{
192
- props: ({
193
- ownerState
194
- }) => ownerState.vertical,
195
- style: {
196
- flexDirection: 'column'
197
- }
198
- }, {
199
- props: ({
200
- ownerState
201
- }) => ownerState.centered,
202
- style: {
203
- justifyContent: 'center'
204
- }
205
- }]
206
- });
207
- const TabsIndicator = styled('span', {
208
- name: 'MuiTabs',
209
- slot: 'Indicator',
210
- overridesResolver: (props, styles) => styles.indicator
211
- })(memoTheme(({
212
- theme
213
- }) => ({
214
- position: 'absolute',
215
- height: 2,
216
- bottom: 0,
217
- width: '100%',
218
- transition: theme.transitions.create(),
219
- variants: [{
220
- props: {
221
- indicatorColor: 'primary'
222
- },
223
- style: {
224
- backgroundColor: (theme.vars || theme).palette.primary.main
225
- }
226
- }, {
227
- props: {
228
- indicatorColor: 'secondary'
229
- },
230
- style: {
231
- backgroundColor: (theme.vars || theme).palette.secondary.main
232
- }
233
- }, {
234
- props: ({
235
- ownerState
236
- }) => ownerState.vertical,
237
- style: {
238
- height: '100%',
239
- width: 2,
240
- right: 0
241
- }
242
- }]
243
- })));
244
- const TabsScrollbarSize = styled(ScrollbarSize)({
245
- overflowX: 'auto',
246
- overflowY: 'hidden',
247
- // Hide dimensionless scrollbar on macOS
248
- scrollbarWidth: 'none',
249
- // Firefox
250
- '&::-webkit-scrollbar': {
251
- display: 'none' // Safari + Chrome
252
- }
253
- });
254
- const defaultIndicatorStyle = {};
255
- let warnedOnceTabPresent = false;
256
- const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
257
- const props = useDefaultProps({
258
- props: inProps,
259
- name: 'MuiTabs'
260
- });
261
- const theme = useTheme();
262
- const isRtl = useRtl();
263
- const {
264
- 'aria-label': ariaLabel,
265
- 'aria-labelledby': ariaLabelledBy,
266
- action,
267
- centered = false,
268
- children: childrenProp,
269
- className,
270
- component = 'div',
271
- allowScrollButtonsMobile = false,
272
- indicatorColor = 'primary',
273
- onChange,
274
- orientation = 'horizontal',
275
- ScrollButtonComponent,
276
- // TODO: remove in v7 (deprecated in v6)
277
- scrollButtons = 'auto',
278
- selectionFollowsFocus,
279
- slots = {},
280
- slotProps = {},
281
- TabIndicatorProps = {},
282
- // TODO: remove in v7 (deprecated in v6)
283
- TabScrollButtonProps = {},
284
- // TODO: remove in v7 (deprecated in v6)
285
- textColor = 'primary',
286
- value,
287
- variant = 'standard',
288
- visibleScrollbar = false,
289
- ...other
290
- } = props;
291
- const scrollable = variant === 'scrollable';
292
- const vertical = orientation === 'vertical';
293
- const scrollStart = vertical ? 'scrollTop' : 'scrollLeft';
294
- const start = vertical ? 'top' : 'left';
295
- const end = vertical ? 'bottom' : 'right';
296
- const clientSize = vertical ? 'clientHeight' : 'clientWidth';
297
- const size = vertical ? 'height' : 'width';
298
- const ownerState = {
299
- ...props,
300
- component,
301
- allowScrollButtonsMobile,
302
- indicatorColor,
303
- orientation,
304
- vertical,
305
- scrollButtons,
306
- textColor,
307
- variant,
308
- visibleScrollbar,
309
- fixed: !scrollable,
310
- hideScrollbar: scrollable && !visibleScrollbar,
311
- scrollableX: scrollable && !vertical,
312
- scrollableY: scrollable && vertical,
313
- centered: centered && !scrollable,
314
- scrollButtonsHideMobile: !allowScrollButtonsMobile
315
- };
316
- const classes = useUtilityClasses(ownerState);
317
- const startScrollButtonIconProps = useSlotProps({
318
- elementType: slots.StartScrollButtonIcon,
319
- externalSlotProps: slotProps.startScrollButtonIcon,
320
- ownerState
321
- });
322
- const endScrollButtonIconProps = useSlotProps({
323
- elementType: slots.EndScrollButtonIcon,
324
- externalSlotProps: slotProps.endScrollButtonIcon,
325
- ownerState
326
- });
327
- if (process.env.NODE_ENV !== 'production') {
328
- if (centered && scrollable) {
329
- console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties ' + 'at the same time on a `Tabs` component.');
330
- }
331
- }
332
- const [mounted, setMounted] = React.useState(false);
333
- const [indicatorStyle, setIndicatorStyle] = React.useState(defaultIndicatorStyle);
334
- const [displayStartScroll, setDisplayStartScroll] = React.useState(false);
335
- const [displayEndScroll, setDisplayEndScroll] = React.useState(false);
336
- const [updateScrollObserver, setUpdateScrollObserver] = React.useState(false);
337
- const [scrollerStyle, setScrollerStyle] = React.useState({
338
- overflow: 'hidden',
339
- scrollbarWidth: 0
340
- });
341
- const valueToIndex = new Map();
342
- const tabsRef = React.useRef(null);
343
- const tabListRef = React.useRef(null);
344
- const externalForwardedProps = {
345
- slots,
346
- slotProps: {
347
- indicator: TabIndicatorProps,
348
- scrollButton: TabScrollButtonProps,
349
- ...slotProps
350
- }
351
- };
352
- const getTabsMeta = () => {
353
- const tabsNode = tabsRef.current;
354
- let tabsMeta;
355
- if (tabsNode) {
356
- const rect = tabsNode.getBoundingClientRect();
357
- // create a new object with ClientRect class props + scrollLeft
358
- tabsMeta = {
359
- clientWidth: tabsNode.clientWidth,
360
- scrollLeft: tabsNode.scrollLeft,
361
- scrollTop: tabsNode.scrollTop,
362
- scrollWidth: tabsNode.scrollWidth,
363
- top: rect.top,
364
- bottom: rect.bottom,
365
- left: rect.left,
366
- right: rect.right
367
- };
368
- }
369
- let tabMeta;
370
- if (tabsNode && value !== false) {
371
- const children = tabListRef.current.children;
372
- if (children.length > 0) {
373
- const tab = children[valueToIndex.get(value)];
374
- if (process.env.NODE_ENV !== 'production') {
375
- if (!tab) {
376
- 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'));
377
- }
378
- }
379
- tabMeta = tab ? tab.getBoundingClientRect() : null;
380
- if (process.env.NODE_ENV !== 'production') {
381
- if (process.env.NODE_ENV !== 'test' && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0 &&
382
- // if the whole Tabs component is hidden, don't warn
383
- tabsMeta.clientWidth !== 0) {
384
- tabsMeta = null;
385
- 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'));
386
- warnedOnceTabPresent = true;
387
- }
388
- }
389
- }
390
- }
391
- return {
392
- tabsMeta,
393
- tabMeta
394
- };
395
- };
396
- const updateIndicatorState = useEventCallback(() => {
397
- const {
398
- tabsMeta,
399
- tabMeta
400
- } = getTabsMeta();
401
- let startValue = 0;
402
- let startIndicator;
403
- if (vertical) {
404
- startIndicator = 'top';
405
- if (tabMeta && tabsMeta) {
406
- startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;
407
- }
408
- } else {
409
- startIndicator = isRtl ? 'right' : 'left';
410
- if (tabMeta && tabsMeta) {
411
- startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + tabsMeta.scrollLeft);
412
- }
413
- }
414
- const newIndicatorStyle = {
415
- [startIndicator]: startValue,
416
- // May be wrong until the font is loaded.
417
- [size]: tabMeta ? tabMeta[size] : 0
418
- };
419
- if (typeof indicatorStyle[startIndicator] !== 'number' || typeof indicatorStyle[size] !== 'number') {
420
- setIndicatorStyle(newIndicatorStyle);
421
- } else {
422
- const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);
423
- const dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);
424
- if (dStart >= 1 || dSize >= 1) {
425
- setIndicatorStyle(newIndicatorStyle);
426
- }
427
- }
428
- });
429
- const scroll = (scrollValue, {
430
- animation = true
431
- } = {}) => {
432
- if (animation) {
433
- animate(scrollStart, tabsRef.current, scrollValue, {
434
- duration: theme.transitions.duration.standard
435
- });
436
- } else {
437
- tabsRef.current[scrollStart] = scrollValue;
438
- }
439
- };
440
- const moveTabsScroll = delta => {
441
- let scrollValue = tabsRef.current[scrollStart];
442
- if (vertical) {
443
- scrollValue += delta;
444
- } else {
445
- scrollValue += delta * (isRtl ? -1 : 1);
446
- }
447
- scroll(scrollValue);
448
- };
449
- const getScrollSize = () => {
450
- const containerSize = tabsRef.current[clientSize];
451
- let totalSize = 0;
452
- const children = Array.from(tabListRef.current.children);
453
- for (let i = 0; i < children.length; i += 1) {
454
- const tab = children[i];
455
- if (totalSize + tab[clientSize] > containerSize) {
456
- // If the first item is longer than the container size, then only scroll
457
- // by the container size.
458
- if (i === 0) {
459
- totalSize = containerSize;
460
- }
461
- break;
462
- }
463
- totalSize += tab[clientSize];
464
- }
465
- return totalSize;
466
- };
467
- const handleStartScrollClick = () => {
468
- moveTabsScroll(-1 * getScrollSize());
469
- };
470
- const handleEndScrollClick = () => {
471
- moveTabsScroll(getScrollSize());
472
- };
473
- const [ScrollbarSlot, {
474
- onChange: scrollbarOnChange,
475
- ...scrollbarSlotProps
476
- }] = useSlot('scrollbar', {
477
- className: clsx(classes.scrollableX, classes.hideScrollbar),
478
- elementType: TabsScrollbarSize,
479
- shouldForwardComponentProp: true,
480
- externalForwardedProps,
481
- ownerState
482
- });
483
-
484
- // TODO Remove <ScrollbarSize /> as browser support for hiding the scrollbar
485
- // with CSS improves.
486
- const handleScrollbarSizeChange = React.useCallback(scrollbarWidth => {
487
- scrollbarOnChange?.(scrollbarWidth);
488
- setScrollerStyle({
489
- overflow: null,
490
- scrollbarWidth
491
- });
492
- }, [scrollbarOnChange]);
493
- const [ScrollButtonsSlot, scrollButtonSlotProps] = useSlot('scrollButtons', {
494
- className: clsx(classes.scrollButtons, TabScrollButtonProps.className),
495
- elementType: TabScrollButton,
496
- externalForwardedProps,
497
- ownerState,
498
- additionalProps: {
499
- orientation,
500
- slots: {
501
- StartScrollButtonIcon: slots.startScrollButtonIcon || slots.StartScrollButtonIcon,
502
- EndScrollButtonIcon: slots.endScrollButtonIcon || slots.EndScrollButtonIcon
503
- },
504
- slotProps: {
505
- startScrollButtonIcon: startScrollButtonIconProps,
506
- endScrollButtonIcon: endScrollButtonIconProps
507
- }
508
- }
509
- });
510
- const getConditionalElements = () => {
511
- const conditionalElements = {};
512
- conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/_jsx(ScrollbarSlot, {
513
- ...scrollbarSlotProps,
514
- onChange: handleScrollbarSizeChange
515
- }) : null;
516
- const scrollButtonsActive = displayStartScroll || displayEndScroll;
517
- const showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === true);
518
- conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonsSlot, {
519
- direction: isRtl ? 'right' : 'left',
520
- onClick: handleStartScrollClick,
521
- disabled: !displayStartScroll,
522
- ...scrollButtonSlotProps
523
- }) : null;
524
- conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonsSlot, {
525
- direction: isRtl ? 'left' : 'right',
526
- onClick: handleEndScrollClick,
527
- disabled: !displayEndScroll,
528
- ...scrollButtonSlotProps
529
- }) : null;
530
- return conditionalElements;
531
- };
532
- const scrollSelectedIntoView = useEventCallback(animation => {
533
- const {
534
- tabsMeta,
535
- tabMeta
536
- } = getTabsMeta();
537
- if (!tabMeta || !tabsMeta) {
538
- return;
539
- }
540
- if (tabMeta[start] < tabsMeta[start]) {
541
- // left side of button is out of view
542
- const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);
543
- scroll(nextScrollStart, {
544
- animation
545
- });
546
- } else if (tabMeta[end] > tabsMeta[end]) {
547
- // right side of button is out of view
548
- const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);
549
- scroll(nextScrollStart, {
550
- animation
551
- });
552
- }
553
- });
554
- const updateScrollButtonState = useEventCallback(() => {
555
- if (scrollable && scrollButtons !== false) {
556
- setUpdateScrollObserver(!updateScrollObserver);
557
- }
558
- });
559
- React.useEffect(() => {
560
- const handleResize = debounce(() => {
561
- // If the Tabs component is replaced by Suspense with a fallback, the last
562
- // ResizeObserver's handler that runs because of the change in the layout is trying to
563
- // access a dom node that is no longer there (as the fallback component is being shown instead).
564
- // See https://github.com/mui/material-ui/issues/33276
565
- // TODO: Add tests that will ensure the component is not failing when
566
- // replaced by Suspense with a fallback, once React is updated to version 18
567
- if (tabsRef.current) {
568
- updateIndicatorState();
569
- }
570
- });
571
- let resizeObserver;
572
-
573
- /**
574
- * @type {MutationCallback}
575
- */
576
- const handleMutation = records => {
577
- records.forEach(record => {
578
- record.removedNodes.forEach(item => {
579
- resizeObserver?.unobserve(item);
580
- });
581
- record.addedNodes.forEach(item => {
582
- resizeObserver?.observe(item);
583
- });
584
- });
585
- handleResize();
586
- updateScrollButtonState();
587
- };
588
- const win = ownerWindow(tabsRef.current);
589
- win.addEventListener('resize', handleResize);
590
- let mutationObserver;
591
- if (typeof ResizeObserver !== 'undefined') {
592
- resizeObserver = new ResizeObserver(handleResize);
593
- Array.from(tabListRef.current.children).forEach(child => {
594
- resizeObserver.observe(child);
595
- });
596
- }
597
- if (typeof MutationObserver !== 'undefined') {
598
- mutationObserver = new MutationObserver(handleMutation);
599
- mutationObserver.observe(tabListRef.current, {
600
- childList: true
601
- });
602
- }
603
- return () => {
604
- handleResize.clear();
605
- win.removeEventListener('resize', handleResize);
606
- mutationObserver?.disconnect();
607
- resizeObserver?.disconnect();
608
- };
609
- }, [updateIndicatorState, updateScrollButtonState]);
610
-
611
- /**
612
- * Toggle visibility of start and end scroll buttons
613
- * Using IntersectionObserver on first and last Tabs.
614
- */
615
- React.useEffect(() => {
616
- const tabListChildren = Array.from(tabListRef.current.children);
617
- const length = tabListChildren.length;
618
- if (typeof IntersectionObserver !== 'undefined' && length > 0 && scrollable && scrollButtons !== false) {
619
- const firstTab = tabListChildren[0];
620
- const lastTab = tabListChildren[length - 1];
621
- const observerOptions = {
622
- root: tabsRef.current,
623
- threshold: 0.99
624
- };
625
- const handleScrollButtonStart = entries => {
626
- setDisplayStartScroll(!entries[0].isIntersecting);
627
- };
628
- const firstObserver = new IntersectionObserver(handleScrollButtonStart, observerOptions);
629
- firstObserver.observe(firstTab);
630
- const handleScrollButtonEnd = entries => {
631
- setDisplayEndScroll(!entries[0].isIntersecting);
632
- };
633
- const lastObserver = new IntersectionObserver(handleScrollButtonEnd, observerOptions);
634
- lastObserver.observe(lastTab);
635
- return () => {
636
- firstObserver.disconnect();
637
- lastObserver.disconnect();
638
- };
639
- }
640
- return undefined;
641
- }, [scrollable, scrollButtons, updateScrollObserver, childrenProp?.length]);
642
- React.useEffect(() => {
643
- setMounted(true);
644
- }, []);
645
- React.useEffect(() => {
646
- updateIndicatorState();
647
- });
648
- React.useEffect(() => {
649
- // Don't animate on the first render.
650
- scrollSelectedIntoView(defaultIndicatorStyle !== indicatorStyle);
651
- }, [scrollSelectedIntoView, indicatorStyle]);
652
- React.useImperativeHandle(action, () => ({
653
- updateIndicator: updateIndicatorState,
654
- updateScrollButtons: updateScrollButtonState
655
- }), [updateIndicatorState, updateScrollButtonState]);
656
- const [IndicatorSlot, indicatorSlotProps] = useSlot('indicator', {
657
- className: clsx(classes.indicator, TabIndicatorProps.className),
658
- elementType: TabsIndicator,
659
- externalForwardedProps,
660
- ownerState,
661
- additionalProps: {
662
- style: indicatorStyle
663
- }
664
- });
665
- const indicator = /*#__PURE__*/_jsx(IndicatorSlot, {
666
- ...indicatorSlotProps
667
- });
668
- let childIndex = 0;
669
- const children = React.Children.map(childrenProp, child => {
670
- if (! /*#__PURE__*/React.isValidElement(child)) {
671
- return null;
672
- }
673
- if (process.env.NODE_ENV !== 'production') {
674
- if (isFragment(child)) {
675
- console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", 'Consider providing an array instead.'].join('\n'));
676
- }
677
- }
678
- const childValue = child.props.value === undefined ? childIndex : child.props.value;
679
- valueToIndex.set(childValue, childIndex);
680
- const selected = childValue === value;
681
- childIndex += 1;
682
- return /*#__PURE__*/React.cloneElement(child, {
683
- fullWidth: variant === 'fullWidth',
684
- indicator: selected && !mounted && indicator,
685
- selected,
686
- selectionFollowsFocus,
687
- onChange,
688
- textColor,
689
- value: childValue,
690
- ...(childIndex === 1 && value === false && !child.props.tabIndex ? {
691
- tabIndex: 0
692
- } : {})
693
- });
694
- });
695
- const handleKeyDown = event => {
696
- // Check if a modifier key (Alt, Shift, Ctrl, Meta) is pressed
697
- if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
698
- return;
699
- }
700
- const list = tabListRef.current;
701
- const currentFocus = ownerDocument(list).activeElement;
702
- // Keyboard navigation assumes that [role="tab"] are siblings
703
- // though we might warn in the future about nested, interactive elements
704
- // as a a11y violation
705
- const role = currentFocus.getAttribute('role');
706
- if (role !== 'tab') {
707
- return;
708
- }
709
- let previousItemKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
710
- let nextItemKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
711
- if (orientation === 'horizontal' && isRtl) {
712
- // swap previousItemKey with nextItemKey
713
- previousItemKey = 'ArrowRight';
714
- nextItemKey = 'ArrowLeft';
715
- }
716
- switch (event.key) {
717
- case previousItemKey:
718
- event.preventDefault();
719
- moveFocus(list, currentFocus, previousItem);
720
- break;
721
- case nextItemKey:
722
- event.preventDefault();
723
- moveFocus(list, currentFocus, nextItem);
724
- break;
725
- case 'Home':
726
- event.preventDefault();
727
- moveFocus(list, null, nextItem);
728
- break;
729
- case 'End':
730
- event.preventDefault();
731
- moveFocus(list, null, previousItem);
732
- break;
733
- default:
734
- break;
735
- }
736
- };
737
- const conditionalElements = getConditionalElements();
738
- const [RootSlot, rootSlotProps] = useSlot('root', {
739
- ref,
740
- className: clsx(classes.root, className),
741
- elementType: TabsRoot,
742
- externalForwardedProps: {
743
- ...externalForwardedProps,
744
- ...other,
745
- component
746
- },
747
- ownerState
748
- });
749
- const [ScrollerSlot, scrollerSlotProps] = useSlot('scroller', {
750
- ref: tabsRef,
751
- className: classes.scroller,
752
- elementType: TabsScroller,
753
- externalForwardedProps,
754
- ownerState,
755
- additionalProps: {
756
- style: {
757
- overflow: scrollerStyle.overflow,
758
- [vertical ? `margin${isRtl ? 'Left' : 'Right'}` : 'marginBottom']: visibleScrollbar ? undefined : -scrollerStyle.scrollbarWidth
759
- }
760
- }
761
- });
762
- const [ListSlot, listSlotProps] = useSlot('list', {
763
- ref: tabListRef,
764
- className: clsx(classes.list, classes.flexContainer),
765
- elementType: List,
766
- externalForwardedProps,
767
- ownerState,
768
- getSlotProps: handlers => ({
769
- ...handlers,
770
- onKeyDown: event => {
771
- handleKeyDown(event);
772
- handlers.onKeyDown?.(event);
773
- }
774
- })
775
- });
776
- return /*#__PURE__*/_jsxs(RootSlot, {
777
- ...rootSlotProps,
778
- children: [conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/_jsxs(ScrollerSlot, {
779
- ...scrollerSlotProps,
780
- children: [/*#__PURE__*/_jsx(ListSlot, {
781
- "aria-label": ariaLabel,
782
- "aria-labelledby": ariaLabelledBy,
783
- "aria-orientation": orientation === 'vertical' ? 'vertical' : null,
784
- role: "tablist",
785
- ...listSlotProps,
786
- children: children
787
- }), mounted && indicator]
788
- }), conditionalElements.scrollButtonEnd]
789
- });
790
- });
791
- process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ = {
792
- // ┌────────────────────────────── Warning ──────────────────────────────┐
793
- // │ These PropTypes are generated from the TypeScript type definitions. │
794
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
795
- // └─────────────────────────────────────────────────────────────────────┘
796
- /**
797
- * Callback fired when the component mounts.
798
- * This is useful when you want to trigger an action programmatically.
799
- * It supports two actions: `updateIndicator()` and `updateScrollButtons()`
800
- *
801
- * @param {object} actions This object contains all possible actions
802
- * that can be triggered programmatically.
803
- */
804
- action: refType,
805
- /**
806
- * If `true`, the scroll buttons aren't forced hidden on mobile.
807
- * By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
808
- * @default false
809
- */
810
- allowScrollButtonsMobile: PropTypes.bool,
811
- /**
812
- * The label for the Tabs as a string.
813
- */
814
- 'aria-label': PropTypes.string,
815
- /**
816
- * An id or list of ids separated by a space that label the Tabs.
817
- */
818
- 'aria-labelledby': PropTypes.string,
819
- /**
820
- * If `true`, the tabs are centered.
821
- * This prop is intended for large views.
822
- * @default false
823
- */
824
- centered: PropTypes.bool,
825
- /**
826
- * The content of the component.
827
- */
828
- children: PropTypes.node,
829
- /**
830
- * Override or extend the styles applied to the component.
831
- */
832
- classes: PropTypes.object,
833
- /**
834
- * @ignore
835
- */
836
- className: PropTypes.string,
837
- /**
838
- * The component used for the root node.
839
- * Either a string to use a HTML element or a component.
840
- */
841
- component: PropTypes.elementType,
842
- /**
843
- * Determines the color of the indicator.
844
- * @default 'primary'
845
- */
846
- indicatorColor: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
847
- /**
848
- * Callback fired when the value changes.
849
- *
850
- * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
851
- * @param {any} value We default to the index of the child (number)
852
- */
853
- onChange: PropTypes.func,
854
- /**
855
- * The component orientation (layout flow direction).
856
- * @default 'horizontal'
857
- */
858
- orientation: PropTypes.oneOf(['horizontal', 'vertical']),
859
- /**
860
- * The component used to render the scroll buttons.
861
- * @deprecated use the `slots.scrollButtons` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
862
- * @default TabScrollButton
863
- */
864
- ScrollButtonComponent: PropTypes.elementType,
865
- /**
866
- * Determine behavior of scroll buttons when tabs are set to scroll:
867
- *
868
- * - `auto` will only present them when not all the items are visible.
869
- * - `true` will always present them.
870
- * - `false` will never present them.
871
- *
872
- * By default the scroll buttons are hidden on mobile.
873
- * This behavior can be disabled with `allowScrollButtonsMobile`.
874
- * @default 'auto'
875
- */
876
- scrollButtons: PropTypes /* @typescript-to-proptypes-ignore */.oneOf(['auto', false, true]),
877
- /**
878
- * If `true` the selected tab changes on focus. Otherwise it only
879
- * changes on activation.
880
- */
881
- selectionFollowsFocus: PropTypes.bool,
882
- /**
883
- * The props used for each slot inside.
884
- * @default {}
885
- */
886
- slotProps: PropTypes.shape({
887
- endScrollButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
888
- indicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
889
- list: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
890
- root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
891
- scrollbar: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
892
- scrollButtons: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
893
- scroller: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
894
- startScrollButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
895
- }),
896
- /**
897
- * The components used for each slot inside.
898
- * @default {}
899
- */
900
- slots: PropTypes.shape({
901
- endScrollButtonIcon: PropTypes.elementType,
902
- EndScrollButtonIcon: PropTypes.elementType,
903
- indicator: PropTypes.elementType,
904
- list: PropTypes.elementType,
905
- root: PropTypes.elementType,
906
- scrollbar: PropTypes.elementType,
907
- scrollButtons: PropTypes.elementType,
908
- scroller: PropTypes.elementType,
909
- startScrollButtonIcon: PropTypes.elementType,
910
- StartScrollButtonIcon: PropTypes.elementType
911
- }),
912
- /**
913
- * The system prop that allows defining system overrides as well as additional CSS styles.
914
- */
915
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
916
- /**
917
- * Props applied to the tab indicator element.
918
- * @deprecated use the `slotProps.indicator` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
919
- * @default {}
920
- */
921
- TabIndicatorProps: PropTypes.object,
922
- /**
923
- * Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
924
- * @deprecated use the `slotProps.scrollButtons` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
925
- * @default {}
926
- */
927
- TabScrollButtonProps: PropTypes.object,
928
- /**
929
- * Determines the color of the `Tab`.
930
- * @default 'primary'
931
- */
932
- textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),
933
- /**
934
- * The value of the currently selected `Tab`.
935
- * If you don't want any selected `Tab`, you can set this prop to `false`.
936
- */
937
- value: PropTypes.any,
938
- /**
939
- * Determines additional display behavior of the tabs:
940
- *
941
- * - `scrollable` will invoke scrolling properties and allow for horizontally
942
- * scrolling (or swiping) of the tab bar.
943
- * - `fullWidth` will make the tabs grow to use all the available space,
944
- * which should be used for small views, like on mobile.
945
- * - `standard` will render the default state.
946
- * @default 'standard'
947
- */
948
- variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard']),
949
- /**
950
- * If `true`, the scrollbar is visible. It can be useful when displaying
951
- * a long vertical list of tabs.
952
- * @default false
953
- */
954
- visibleScrollbar: PropTypes.bool
955
- } : void 0;
956
- export default Tabs;