@mui/material 5.4.2 → 5.5.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 (259) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  9. package/Avatar/avatarClasses.d.ts +20 -20
  10. package/AvatarGroup/AvatarGroup.js +4 -2
  11. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  12. package/BottomNavigation/BottomNavigation.js +0 -0
  13. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  14. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  15. package/Box/Box.js +1 -1
  16. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  17. package/Button/buttonClasses.d.ts +76 -76
  18. package/ButtonBase/ButtonBase.d.ts +1 -1
  19. package/ButtonBase/ButtonBase.js +1 -1
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +196 -2
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/checkboxClasses.d.ts +18 -18
  32. package/Chip/Chip.js +1 -0
  33. package/Chip/chipClasses.d.ts +80 -80
  34. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  35. package/ClickAwayListener/index.d.ts +2 -2
  36. package/Collapse/collapseClasses.d.ts +18 -18
  37. package/Container/containerClasses.d.ts +22 -22
  38. package/Dialog/Dialog.d.ts +4 -1
  39. package/Dialog/Dialog.js +10 -6
  40. package/Dialog/DialogContext.d.ts +6 -6
  41. package/Dialog/dialogClasses.d.ts +36 -36
  42. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  43. package/DialogContent/dialogContentClasses.d.ts +10 -10
  44. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  45. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  46. package/Divider/dividerClasses.d.ts +34 -34
  47. package/Drawer/Drawer.d.ts +4 -1
  48. package/Drawer/Drawer.js +11 -9
  49. package/Drawer/drawerClasses.d.ts +30 -30
  50. package/Fab/fabClasses.d.ts +26 -26
  51. package/Fade/Fade.d.ts +2 -2
  52. package/Fade/Fade.js +8 -8
  53. package/FilledInput/filledInputClasses.d.ts +40 -40
  54. package/FilledInput/filledInputClasses.js +5 -1
  55. package/FormControl/formControlClasses.d.ts +14 -14
  56. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  57. package/FormGroup/formGroupClasses.d.ts +12 -12
  58. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  59. package/FormLabel/formLabelClasses.d.ts +22 -22
  60. package/Grid/gridClasses.d.ts +48 -48
  61. package/Icon/iconClasses.d.ts +24 -24
  62. package/IconButton/iconButtonClasses.d.ts +26 -26
  63. package/ImageList/imageListClasses.d.ts +16 -16
  64. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  65. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  66. package/Input/inputClasses.d.ts +34 -34
  67. package/Input/inputClasses.js +5 -1
  68. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  69. package/InputBase/inputBaseClasses.d.ts +44 -44
  70. package/InputLabel/inputLabelClasses.d.ts +32 -32
  71. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  72. package/Link/linkClasses.d.ts +18 -18
  73. package/List/listClasses.d.ts +14 -14
  74. package/ListItem/listItemClasses.d.ts +30 -30
  75. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  76. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  77. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  78. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  79. package/ListItemText/listItemTextClasses.d.ts +18 -18
  80. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  81. package/Menu/menuClasses.d.ts +12 -12
  82. package/MenuItem/menuItemClasses.d.ts +20 -20
  83. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  84. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  85. package/OutlinedInput/NotchedOutline.js +3 -1
  86. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  87. package/OutlinedInput/outlinedInputClasses.js +5 -1
  88. package/Pagination/paginationClasses.d.ts +14 -14
  89. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  90. package/Paper/paperClasses.d.ts +39 -39
  91. package/Popover/popoverClasses.d.ts +10 -10
  92. package/Popper/Popper.d.ts +17 -17
  93. package/Popper/Popper.js +1 -1
  94. package/README.md +1 -1
  95. package/Radio/radioClasses.d.ts +16 -16
  96. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  97. package/RadioGroup/useRadioGroup.d.ts +4 -4
  98. package/Rating/ratingClasses.d.ts +40 -40
  99. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  100. package/Select/Select.d.ts +2 -0
  101. package/Select/selectClasses.d.ts +30 -30
  102. package/Skeleton/skeletonClasses.d.ts +24 -24
  103. package/Slide/Slide.d.ts +4 -4
  104. package/Slide/Slide.js +14 -14
  105. package/Snackbar/Snackbar.d.ts +2 -2
  106. package/Snackbar/Snackbar.js +8 -8
  107. package/Snackbar/snackbarClasses.d.ts +20 -20
  108. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  109. package/SpeedDial/SpeedDial.d.ts +2 -2
  110. package/SpeedDial/SpeedDial.js +9 -7
  111. package/SpeedDial/speedDialClasses.d.ts +22 -22
  112. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  113. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  114. package/Step/StepContext.d.ts +20 -0
  115. package/Step/StepContext.js +10 -2
  116. package/Step/index.d.ts +3 -0
  117. package/Step/index.js +3 -1
  118. package/Step/stepClasses.d.ts +16 -16
  119. package/StepButton/stepButtonClasses.d.ts +14 -14
  120. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  121. package/StepContent/stepContentClasses.d.ts +12 -12
  122. package/StepIcon/stepIconClasses.d.ts +16 -16
  123. package/StepLabel/stepLabelClasses.d.ts +28 -28
  124. package/Stepper/stepperClasses.d.ts +14 -14
  125. package/SvgIcon/SvgIcon.js +1 -0
  126. package/SvgIcon/svgIconClasses.d.ts +24 -24
  127. package/SwipeableDrawer/SwipeableDrawer.js +8 -6
  128. package/Switch/switchClasses.d.ts +32 -32
  129. package/Tab/tabClasses.d.ts +26 -26
  130. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  131. package/Table/tableClasses.d.ts +10 -10
  132. package/TableBody/tableBodyClasses.d.ts +8 -8
  133. package/TableCell/tableCellClasses.d.ts +32 -32
  134. package/TableContainer/tableContainerClasses.d.ts +8 -8
  135. package/TableFooter/tableFooterClasses.d.ts +8 -8
  136. package/TableHead/tableHeadClasses.d.ts +8 -8
  137. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  138. package/TableRow/tableRowClasses.d.ts +16 -16
  139. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  140. package/Tabs/tabsClasses.d.ts +32 -32
  141. package/TextField/textFieldClasses.d.ts +8 -8
  142. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  143. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  144. package/Toolbar/toolbarClasses.d.ts +14 -14
  145. package/Tooltip/tooltipClasses.d.ts +30 -30
  146. package/Typography/typographyClasses.d.ts +50 -50
  147. package/Zoom/Zoom.d.ts +2 -2
  148. package/Zoom/Zoom.js +8 -8
  149. package/className/index.d.ts +8 -0
  150. package/className/index.js +9 -0
  151. package/className/package.json +6 -0
  152. package/darkScrollbar/index.d.ts +28 -28
  153. package/index.js +1 -1
  154. package/internal/switchBaseClasses.d.ts +12 -12
  155. package/legacy/AvatarGroup/AvatarGroup.js +4 -2
  156. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  157. package/legacy/Box/Box.js +1 -1
  158. package/legacy/ButtonBase/ButtonBase.js +1 -1
  159. package/legacy/Chip/Chip.js +1 -0
  160. package/legacy/Dialog/Dialog.js +10 -6
  161. package/legacy/Drawer/Drawer.js +11 -9
  162. package/legacy/Fade/Fade.js +8 -8
  163. package/legacy/FilledInput/filledInputClasses.js +5 -1
  164. package/legacy/Input/inputClasses.js +5 -1
  165. package/legacy/OutlinedInput/NotchedOutline.js +3 -1
  166. package/legacy/OutlinedInput/outlinedInputClasses.js +5 -1
  167. package/legacy/Popper/Popper.js +1 -1
  168. package/legacy/Slide/Slide.js +14 -14
  169. package/legacy/Snackbar/Snackbar.js +8 -8
  170. package/legacy/SpeedDial/SpeedDial.js +9 -7
  171. package/legacy/Step/StepContext.js +10 -2
  172. package/legacy/Step/index.js +3 -1
  173. package/legacy/SvgIcon/SvgIcon.js +1 -0
  174. package/legacy/SwipeableDrawer/SwipeableDrawer.js +8 -6
  175. package/legacy/Zoom/Zoom.js +8 -8
  176. package/legacy/className/index.js +9 -0
  177. package/legacy/index.js +1 -1
  178. package/legacy/locale/index.js +268 -78
  179. package/legacy/styles/makeStyles.js +1 -1
  180. package/legacy/styles/withStyles.js +1 -1
  181. package/legacy/styles/withTheme.js +1 -1
  182. package/legacy/utils/index.js +10 -2
  183. package/locale/index.d.ts +70 -68
  184. package/locale/index.js +192 -6
  185. package/modern/AvatarGroup/AvatarGroup.js +4 -2
  186. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  187. package/modern/Box/Box.js +1 -1
  188. package/modern/ButtonBase/ButtonBase.js +1 -1
  189. package/modern/Chip/Chip.js +1 -0
  190. package/modern/Dialog/Dialog.js +10 -6
  191. package/modern/Drawer/Drawer.js +11 -9
  192. package/modern/Fade/Fade.js +8 -8
  193. package/modern/FilledInput/filledInputClasses.js +5 -1
  194. package/modern/Input/inputClasses.js +5 -1
  195. package/modern/OutlinedInput/NotchedOutline.js +3 -1
  196. package/modern/OutlinedInput/outlinedInputClasses.js +5 -1
  197. package/modern/Popper/Popper.js +1 -1
  198. package/modern/Slide/Slide.js +14 -14
  199. package/modern/Snackbar/Snackbar.js +8 -8
  200. package/modern/SpeedDial/SpeedDial.js +9 -7
  201. package/modern/Step/StepContext.js +10 -2
  202. package/modern/Step/index.js +3 -1
  203. package/modern/SvgIcon/SvgIcon.js +1 -0
  204. package/modern/SwipeableDrawer/SwipeableDrawer.js +8 -6
  205. package/modern/Zoom/Zoom.js +8 -8
  206. package/modern/className/index.js +9 -0
  207. package/modern/index.js +1 -1
  208. package/modern/locale/index.js +192 -6
  209. package/modern/styles/makeStyles.js +1 -1
  210. package/modern/styles/withStyles.js +1 -1
  211. package/modern/styles/withTheme.js +1 -1
  212. package/modern/utils/index.js +10 -2
  213. package/node/AvatarGroup/AvatarGroup.js +4 -2
  214. package/node/BottomNavigation/BottomNavigation.js +0 -0
  215. package/node/Box/Box.js +2 -2
  216. package/node/ButtonBase/ButtonBase.js +1 -1
  217. package/node/Chip/Chip.js +1 -0
  218. package/node/Dialog/Dialog.js +11 -7
  219. package/node/Drawer/Drawer.js +11 -10
  220. package/node/Fade/Fade.js +7 -9
  221. package/node/FilledInput/filledInputClasses.js +7 -1
  222. package/node/Input/inputClasses.js +7 -1
  223. package/node/OutlinedInput/NotchedOutline.js +3 -1
  224. package/node/OutlinedInput/outlinedInputClasses.js +7 -1
  225. package/node/Popper/Popper.js +1 -1
  226. package/node/Slide/Slide.js +14 -16
  227. package/node/Snackbar/Snackbar.js +8 -9
  228. package/node/SpeedDial/SpeedDial.js +9 -7
  229. package/node/Step/StepContext.js +11 -1
  230. package/node/Step/index.js +22 -1
  231. package/node/SvgIcon/SvgIcon.js +1 -0
  232. package/node/SwipeableDrawer/SwipeableDrawer.js +8 -7
  233. package/node/Zoom/Zoom.js +7 -9
  234. package/node/className/index.js +13 -0
  235. package/node/index.js +1 -1
  236. package/node/locale/index.js +197 -9
  237. package/node/styles/makeStyles.js +1 -1
  238. package/node/styles/withStyles.js +1 -1
  239. package/node/styles/withTheme.js +1 -1
  240. package/node/utils/index.js +13 -7
  241. package/package.json +6 -6
  242. package/styles/components.d.ts +0 -339
  243. package/styles/makeStyles.js +1 -1
  244. package/styles/withStyles.js +1 -1
  245. package/styles/withTheme.js +1 -1
  246. package/transitions/index.d.ts +1 -1
  247. package/transitions/transition.d.ts +13 -13
  248. package/transitions/utils.d.ts +23 -23
  249. package/umd/material-ui.development.js +9242 -9030
  250. package/umd/material-ui.production.min.js +21 -21
  251. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  252. package/useTouchRipple/index.d.ts +1 -1
  253. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  254. package/utils/getScrollbarSize.d.ts +2 -2
  255. package/utils/index.d.ts +1 -1
  256. package/utils/index.js +10 -2
  257. package/utils/ownerDocument.d.ts +2 -2
  258. package/utils/ownerWindow.d.ts +2 -2
  259. package/utils/setRef.d.ts +2 -2
@@ -1,8 +1,8 @@
1
- export interface ScopedCssBaselineClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
5
- export declare type ScopedCssBaselineClassKey = keyof ScopedCssBaselineClasses;
6
- export declare function getScopedCssBaselineUtilityClass(slot: string): string;
7
- declare const scopedCssBaselineClasses: Record<"root", string>;
8
- export default scopedCssBaselineClasses;
1
+ export interface ScopedCssBaselineClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ }
5
+ export declare type ScopedCssBaselineClassKey = keyof ScopedCssBaselineClasses;
6
+ export declare function getScopedCssBaselineUtilityClass(slot: string): string;
7
+ declare const scopedCssBaselineClasses: Record<"root", string>;
8
+ export default scopedCssBaselineClasses;
@@ -5,11 +5,13 @@ import { InputProps } from '../Input';
5
5
  import { MenuProps } from '../Menu';
6
6
  import { SelectChangeEvent, SelectInputProps } from './SelectInput';
7
7
  import { SelectClasses } from './selectClasses';
8
+ import { OutlinedInputProps } from '../OutlinedInput';
8
9
 
9
10
  export { SelectChangeEvent };
10
11
 
11
12
  export interface SelectProps<T = unknown>
12
13
  extends StandardProps<InputProps, 'value' | 'onChange'>,
14
+ Omit<OutlinedInputProps, 'value' | 'onChange'>,
13
15
  Pick<SelectInputProps<T>, 'onChange'> {
14
16
  /**
15
17
  * If `true`, the width of the popover will automatically be set according to the items inside the
@@ -1,30 +1,30 @@
1
- export interface SelectClasses {
2
- /** Styles applied to the select component `select` class. */
3
- select: string;
4
- /** Styles applied to the select component if `multiple={true}`. */
5
- multiple: string;
6
- /** Styles applied to the select component if `variant="filled"`. */
7
- filled: string;
8
- /** Styles applied to the select component if `variant="outlined"`. */
9
- outlined: string;
10
- /** Styles applied to the select component if `variant="standard"`. */
11
- standard: string;
12
- /** State class applied to the select component `disabled` class. */
13
- disabled: string;
14
- /** Styles applied to the icon component. */
15
- icon: string;
16
- /** Styles applied to the icon component if the popup is open. */
17
- iconOpen: string;
18
- /** Styles applied to the icon component if `variant="filled"`. */
19
- iconFilled: string;
20
- /** Styles applied to the icon component if `variant="outlined"`. */
21
- iconOutlined: string;
22
- /** Styles applied to the icon component if `variant="standard"`. */
23
- iconStandard: string;
24
- /** Styles applied to the underlying native input component. */
25
- nativeInput: string;
26
- }
27
- export declare type SelectClassKey = keyof SelectClasses;
28
- export declare function getSelectUtilityClasses(slot: string): string;
29
- declare const selectClasses: SelectClasses;
30
- export default selectClasses;
1
+ export interface SelectClasses {
2
+ /** Styles applied to the select component `select` class. */
3
+ select: string;
4
+ /** Styles applied to the select component if `multiple={true}`. */
5
+ multiple: string;
6
+ /** Styles applied to the select component if `variant="filled"`. */
7
+ filled: string;
8
+ /** Styles applied to the select component if `variant="outlined"`. */
9
+ outlined: string;
10
+ /** Styles applied to the select component if `variant="standard"`. */
11
+ standard: string;
12
+ /** State class applied to the select component `disabled` class. */
13
+ disabled: string;
14
+ /** Styles applied to the icon component. */
15
+ icon: string;
16
+ /** Styles applied to the icon component if the popup is open. */
17
+ iconOpen: string;
18
+ /** Styles applied to the icon component if `variant="filled"`. */
19
+ iconFilled: string;
20
+ /** Styles applied to the icon component if `variant="outlined"`. */
21
+ iconOutlined: string;
22
+ /** Styles applied to the icon component if `variant="standard"`. */
23
+ iconStandard: string;
24
+ /** Styles applied to the underlying native input component. */
25
+ nativeInput: string;
26
+ }
27
+ export declare type SelectClassKey = keyof SelectClasses;
28
+ export declare function getSelectUtilityClasses(slot: string): string;
29
+ declare const selectClasses: SelectClasses;
30
+ export default selectClasses;
@@ -1,24 +1,24 @@
1
- export interface SkeletonClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `variant="text"`. */
5
- text: string;
6
- /** Styles applied to the root element if `variant="rectangular"`. */
7
- rectangular: string;
8
- /** Styles applied to the root element if `variant="circular"`. */
9
- circular: string;
10
- /** Styles applied to the root element if `animation="pulse"`. */
11
- pulse: string;
12
- /** Styles applied to the root element if `animation="wave"`. */
13
- wave: string;
14
- /** Styles applied when the component is passed children. */
15
- withChildren: string;
16
- /** Styles applied when the component is passed children and no width. */
17
- fitContent: string;
18
- /** Styles applied when the component is passed children and no height. */
19
- heightAuto: string;
20
- }
21
- export declare type SkeletonClassKey = keyof SkeletonClasses;
22
- export declare function getSkeletonUtilityClass(slot: string): string;
23
- declare const skeletonClasses: SkeletonClasses;
24
- export default skeletonClasses;
1
+ export interface SkeletonClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `variant="text"`. */
5
+ text: string;
6
+ /** Styles applied to the root element if `variant="rectangular"`. */
7
+ rectangular: string;
8
+ /** Styles applied to the root element if `variant="circular"`. */
9
+ circular: string;
10
+ /** Styles applied to the root element if `animation="pulse"`. */
11
+ pulse: string;
12
+ /** Styles applied to the root element if `animation="wave"`. */
13
+ wave: string;
14
+ /** Styles applied when the component is passed children. */
15
+ withChildren: string;
16
+ /** Styles applied when the component is passed children and no width. */
17
+ fitContent: string;
18
+ /** Styles applied when the component is passed children and no height. */
19
+ heightAuto: string;
20
+ }
21
+ export declare type SkeletonClassKey = keyof SkeletonClasses;
22
+ export declare function getSkeletonUtilityClass(slot: string): string;
23
+ declare const skeletonClasses: SkeletonClasses;
24
+ export default skeletonClasses;
package/Slide/Slide.d.ts CHANGED
@@ -26,8 +26,8 @@ export interface SlideProps extends TransitionProps {
26
26
  * The transition timing function.
27
27
  * You may specify a single easing or a object containing enter and exit values.
28
28
  * @default {
29
- * enter: easing.easeOut,
30
- * exit: easing.sharp,
29
+ * enter: theme.transitions.easing.easeOut,
30
+ * exit: theme.transitions.easing.sharp,
31
31
  * }
32
32
  */
33
33
  easing?: TransitionProps['easing'];
@@ -40,8 +40,8 @@ export interface SlideProps extends TransitionProps {
40
40
  * The duration for the transition, in milliseconds.
41
41
  * You may specify a single timeout for all transitions, or individually with an object.
42
42
  * @default {
43
- * enter: duration.enteringScreen,
44
- * exit: duration.leavingScreen,
43
+ * enter: theme.transitions.duration.enteringScreen,
44
+ * exit: theme.transitions.duration.leavingScreen,
45
45
  * }
46
46
  */
47
47
  timeout?: TransitionProps['timeout'];
package/Slide/Slide.js CHANGED
@@ -8,7 +8,6 @@ import { elementAcceptingRef, HTMLElementType, chainPropTypes } from '@mui/utils
8
8
  import debounce from '../utils/debounce';
9
9
  import useForkRef from '../utils/useForkRef';
10
10
  import useTheme from '../styles/useTheme';
11
- import { duration, easing } from '../styles/createTransitions';
12
11
  import { reflow, getTransitionProps } from '../transitions/utils';
13
12
  import { ownerWindow } from '../utils'; // Translate the node so it can't be seen on the screen.
14
13
  // Later, we're going to translate the node back to its original location with `none`.
@@ -82,20 +81,22 @@ export function setTranslateValue(direction, node, containerProp) {
82
81
  node.style.transform = transform;
83
82
  }
84
83
  }
85
- const defaultEasing = {
86
- enter: easing.easeOut,
87
- exit: easing.sharp
88
- };
89
- const defaultTimeout = {
90
- enter: duration.enteringScreen,
91
- exit: duration.leavingScreen
92
- };
93
84
  /**
94
85
  * The Slide transition is used by the [Drawer](/components/drawers/) component.
95
86
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
96
87
  */
97
88
 
98
89
  const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
90
+ const theme = useTheme();
91
+ const defaultEasing = {
92
+ enter: theme.transitions.easing.easeOut,
93
+ exit: theme.transitions.easing.sharp
94
+ };
95
+ const defaultTimeout = {
96
+ enter: theme.transitions.duration.enteringScreen,
97
+ exit: theme.transitions.duration.leavingScreen
98
+ };
99
+
99
100
  const {
100
101
  addEndListener,
101
102
  appear = true,
@@ -117,7 +118,6 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
117
118
  } = props,
118
119
  other = _objectWithoutPropertiesLoose(props, _excluded);
119
120
 
120
- const theme = useTheme();
121
121
  const childrenRef = React.useRef(null);
122
122
  const handleRefIntermediary = useForkRef(children.ref, childrenRef);
123
123
  const handleRef = useForkRef(handleRefIntermediary, ref);
@@ -305,8 +305,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
305
305
  * The transition timing function.
306
306
  * You may specify a single easing or a object containing enter and exit values.
307
307
  * @default {
308
- * enter: easing.easeOut,
309
- * exit: easing.sharp,
308
+ * enter: theme.transitions.easing.easeOut,
309
+ * exit: theme.transitions.easing.sharp,
310
310
  * }
311
311
  */
312
312
  easing: PropTypes.oneOfType([PropTypes.shape({
@@ -358,8 +358,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
358
358
  * The duration for the transition, in milliseconds.
359
359
  * You may specify a single timeout for all transitions, or individually with an object.
360
360
  * @default {
361
- * enter: duration.enteringScreen,
362
- * exit: duration.leavingScreen,
361
+ * enter: theme.transitions.duration.enteringScreen,
362
+ * exit: theme.transitions.duration.leavingScreen,
363
363
  * }
364
364
  */
365
365
  timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -104,8 +104,8 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
104
104
  * The duration for the transition, in milliseconds.
105
105
  * You may specify a single timeout for all transitions, or individually with an object.
106
106
  * @default {
107
- * enter: duration.enteringScreen,
108
- * exit: duration.leavingScreen,
107
+ * enter: theme.transitions.duration.enteringScreen,
108
+ * exit: theme.transitions.duration.leavingScreen,
109
109
  * }
110
110
  */
111
111
  transitionDuration?: TransitionProps['timeout'];
@@ -10,7 +10,6 @@ import ClickAwayListener from '@mui/base/ClickAwayListener';
10
10
  import styled from '../styles/styled';
11
11
  import useTheme from '../styles/useTheme';
12
12
  import useThemeProps from '../styles/useThemeProps';
13
- import { duration } from '../styles/createTransitions';
14
13
  import useEventCallback from '../utils/useEventCallback';
15
14
  import capitalize from '../utils/capitalize';
16
15
  import Grow from '../Grow';
@@ -93,6 +92,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
93
92
  props: inProps,
94
93
  name: 'MuiSnackbar'
95
94
  });
95
+ const theme = useTheme();
96
+ const defaultTransitionDuration = {
97
+ enter: theme.transitions.duration.enteringScreen,
98
+ exit: theme.transitions.duration.leavingScreen
99
+ };
96
100
 
97
101
  const {
98
102
  action,
@@ -118,10 +122,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
118
122
  open,
119
123
  resumeHideDuration,
120
124
  TransitionComponent = Grow,
121
- transitionDuration = {
122
- enter: duration.enteringScreen,
123
- exit: duration.leavingScreen
124
- },
125
+ transitionDuration = defaultTransitionDuration,
125
126
  TransitionProps: {
126
127
  onEnter,
127
128
  onExited
@@ -130,7 +131,6 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
130
131
  TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
131
132
  other = _objectWithoutPropertiesLoose(props, _excluded2);
132
133
 
133
- const theme = useTheme();
134
134
  const isRtl = theme.direction === 'rtl';
135
135
 
136
136
  const ownerState = _extends({}, props, {
@@ -449,8 +449,8 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes
449
449
  * The duration for the transition, in milliseconds.
450
450
  * You may specify a single timeout for all transitions, or individually with an object.
451
451
  * @default {
452
- * enter: duration.enteringScreen,
453
- * exit: duration.leavingScreen,
452
+ * enter: theme.transitions.duration.enteringScreen,
453
+ * exit: theme.transitions.duration.leavingScreen,
454
454
  * }
455
455
  */
456
456
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -1,20 +1,20 @@
1
- export interface SnackbarClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */
5
- anchorOriginTopCenter: string;
6
- /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */
7
- anchorOriginBottomCenter: string;
8
- /** Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */
9
- anchorOriginTopRight: string;
10
- /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */
11
- anchorOriginBottomRight: string;
12
- /** Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */
13
- anchorOriginTopLeft: string;
14
- /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */
15
- anchorOriginBottomLeft: string;
16
- }
17
- export declare type SnackbarClassKey = keyof SnackbarClasses;
18
- export declare function getSnackbarUtilityClass(slot: string): string;
19
- declare const snackbarClasses: SnackbarClasses;
20
- export default snackbarClasses;
1
+ export interface SnackbarClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */
5
+ anchorOriginTopCenter: string;
6
+ /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */
7
+ anchorOriginBottomCenter: string;
8
+ /** Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */
9
+ anchorOriginTopRight: string;
10
+ /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */
11
+ anchorOriginBottomRight: string;
12
+ /** Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */
13
+ anchorOriginTopLeft: string;
14
+ /** Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */
15
+ anchorOriginBottomLeft: string;
16
+ }
17
+ export declare type SnackbarClassKey = keyof SnackbarClasses;
18
+ export declare function getSnackbarUtilityClass(slot: string): string;
19
+ declare const snackbarClasses: SnackbarClasses;
20
+ export default snackbarClasses;
@@ -1,12 +1,12 @@
1
- export interface SnackbarContentClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the message wrapper element. */
5
- message: string;
6
- /** Styles applied to the action wrapper element if `action` is provided. */
7
- action: string;
8
- }
9
- export declare type SnackbarContentClassKey = keyof SnackbarContentClasses;
10
- export declare function getSnackbarContentUtilityClass(slot: string): string;
11
- declare const snackbarContentClasses: SnackbarContentClasses;
12
- export default snackbarContentClasses;
1
+ export interface SnackbarContentClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the message wrapper element. */
5
+ message: string;
6
+ /** Styles applied to the action wrapper element if `action` is provided. */
7
+ action: string;
8
+ }
9
+ export declare type SnackbarContentClassKey = keyof SnackbarContentClasses;
10
+ export declare function getSnackbarContentUtilityClass(slot: string): string;
11
+ declare const snackbarContentClasses: SnackbarContentClasses;
12
+ export default snackbarContentClasses;
@@ -80,8 +80,8 @@ export interface SpeedDialProps
80
80
  * The duration for the transition, in milliseconds.
81
81
  * You may specify a single timeout for all transitions, or individually with an object.
82
82
  * @default {
83
- * enter: duration.enteringScreen,
84
- * exit: duration.leavingScreen,
83
+ * enter: theme.transitions.duration.enteringScreen,
84
+ * exit: theme.transitions.duration.leavingScreen,
85
85
  * }
86
86
  */
87
87
  transitionDuration?: TransitionProps['timeout'];
@@ -10,7 +10,7 @@ import clsx from 'clsx';
10
10
  import { unstable_composeClasses as composeClasses } from '@mui/base';
11
11
  import styled from '../styles/styled';
12
12
  import useThemeProps from '../styles/useThemeProps';
13
- import { duration } from '../styles/createTransitions';
13
+ import useTheme from '../styles/useTheme';
14
14
  import Zoom from '../Zoom';
15
15
  import Fab from '../Fab';
16
16
  import capitalize from '../utils/capitalize';
@@ -137,6 +137,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
137
137
  props: inProps,
138
138
  name: 'MuiSpeedDial'
139
139
  });
140
+ const theme = useTheme();
141
+ const defaultTransitionDuration = {
142
+ enter: theme.transitions.duration.enteringScreen,
143
+ exit: theme.transitions.duration.leavingScreen
144
+ };
140
145
 
141
146
  const {
142
147
  ariaLabel,
@@ -157,10 +162,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
157
162
  onOpen,
158
163
  open: openProp,
159
164
  TransitionComponent = Zoom,
160
- transitionDuration = {
161
- enter: duration.enteringScreen,
162
- exit: duration.leavingScreen
163
- },
165
+ transitionDuration = defaultTransitionDuration,
164
166
  TransitionProps
165
167
  } = props,
166
168
  FabProps = _objectWithoutPropertiesLoose(props.FabProps, _excluded),
@@ -542,8 +544,8 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes
542
544
  * The duration for the transition, in milliseconds.
543
545
  * You may specify a single timeout for all transitions, or individually with an object.
544
546
  * @default {
545
- * enter: duration.enteringScreen,
546
- * exit: duration.leavingScreen,
547
+ * enter: theme.transitions.duration.enteringScreen,
548
+ * exit: theme.transitions.duration.leavingScreen,
547
549
  * }
548
550
  */
549
551
  transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
@@ -1,22 +1,22 @@
1
- export interface SpeedDialClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the Fab component. */
5
- fab: string;
6
- /** Styles applied to the root element if direction="up" */
7
- directionUp: string;
8
- /** Styles applied to the root element if direction="down" */
9
- directionDown: string;
10
- /** Styles applied to the root element if direction="left" */
11
- directionLeft: string;
12
- /** Styles applied to the root element if direction="right" */
13
- directionRight: string;
14
- /** Styles applied to the actions (`children` wrapper) element. */
15
- actions: string;
16
- /** Styles applied to the actions (`children` wrapper) element if `open={false}`. */
17
- actionsClosed: string;
18
- }
19
- export declare type SpeedDialClassKey = keyof SpeedDialClasses;
20
- export declare function getSpeedDialUtilityClass(slot: string): string;
21
- declare const speedDialClasses: SpeedDialClasses;
22
- export default speedDialClasses;
1
+ export interface SpeedDialClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the Fab component. */
5
+ fab: string;
6
+ /** Styles applied to the root element if direction="up" */
7
+ directionUp: string;
8
+ /** Styles applied to the root element if direction="down" */
9
+ directionDown: string;
10
+ /** Styles applied to the root element if direction="left" */
11
+ directionLeft: string;
12
+ /** Styles applied to the root element if direction="right" */
13
+ directionRight: string;
14
+ /** Styles applied to the actions (`children` wrapper) element. */
15
+ actions: string;
16
+ /** Styles applied to the actions (`children` wrapper) element if `open={false}`. */
17
+ actionsClosed: string;
18
+ }
19
+ export declare type SpeedDialClassKey = keyof SpeedDialClasses;
20
+ export declare function getSpeedDialUtilityClass(slot: string): string;
21
+ declare const speedDialClasses: SpeedDialClasses;
22
+ export default speedDialClasses;
@@ -1,20 +1,20 @@
1
- export interface SpeedDialActionClasses {
2
- /** Styles applied to the Fab component. */
3
- fab: string;
4
- /** Styles applied to the Fab component if `open={false}`. */
5
- fabClosed: string;
6
- /** Styles applied to the root element if `tooltipOpen={true}`. */
7
- staticTooltip: string;
8
- /** Styles applied to the root element if `tooltipOpen={true}` and `open={false}`. */
9
- staticTooltipClosed: string;
10
- /** Styles applied to the static tooltip label if `tooltipOpen={true}`. */
11
- staticTooltipLabel: string;
12
- /** Styles applied to the root element if `tooltipOpen={true}` and `tooltipPlacement="left"`` */
13
- tooltipPlacementLeft: string;
14
- /** Styles applied to the root element if `tooltipOpen={true}` and `tooltipPlacement="right"`` */
15
- tooltipPlacementRight: string;
16
- }
17
- export declare type SpeedDialActionClassKey = keyof SpeedDialActionClasses;
18
- export declare function getSpeedDialActionUtilityClass(slot: string): string;
19
- declare const speedDialActionClasses: SpeedDialActionClasses;
20
- export default speedDialActionClasses;
1
+ export interface SpeedDialActionClasses {
2
+ /** Styles applied to the Fab component. */
3
+ fab: string;
4
+ /** Styles applied to the Fab component if `open={false}`. */
5
+ fabClosed: string;
6
+ /** Styles applied to the root element if `tooltipOpen={true}`. */
7
+ staticTooltip: string;
8
+ /** Styles applied to the root element if `tooltipOpen={true}` and `open={false}`. */
9
+ staticTooltipClosed: string;
10
+ /** Styles applied to the static tooltip label if `tooltipOpen={true}`. */
11
+ staticTooltipLabel: string;
12
+ /** Styles applied to the root element if `tooltipOpen={true}` and `tooltipPlacement="left"`` */
13
+ tooltipPlacementLeft: string;
14
+ /** Styles applied to the root element if `tooltipOpen={true}` and `tooltipPlacement="right"`` */
15
+ tooltipPlacementRight: string;
16
+ }
17
+ export declare type SpeedDialActionClassKey = keyof SpeedDialActionClasses;
18
+ export declare function getSpeedDialActionUtilityClass(slot: string): string;
19
+ declare const speedDialActionClasses: SpeedDialActionClasses;
20
+ export default speedDialActionClasses;
@@ -1,18 +1,18 @@
1
- export interface SpeedDialIconClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the icon component. */
5
- icon: string;
6
- /** Styles applied to the icon component if `open={true}`. */
7
- iconOpen: string;
8
- /** Styles applied to the icon when an `openIcon` is provided and if `open={true}`. */
9
- iconWithOpenIconOpen: string;
10
- /** Styles applied to the `openIcon` if provided. */
11
- openIcon: string;
12
- /** Styles applied to the `openIcon` if provided and if `open={true}`. */
13
- openIconOpen: string;
14
- }
15
- export declare type SpeedDialIconClassKey = keyof SpeedDialIconClasses;
16
- export declare function getSpeedDialIconUtilityClass(slot: string): string;
17
- declare const speedDialIconClasses: SpeedDialIconClasses;
18
- export default speedDialIconClasses;
1
+ export interface SpeedDialIconClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the icon component. */
5
+ icon: string;
6
+ /** Styles applied to the icon component if `open={true}`. */
7
+ iconOpen: string;
8
+ /** Styles applied to the icon when an `openIcon` is provided and if `open={true}`. */
9
+ iconWithOpenIconOpen: string;
10
+ /** Styles applied to the `openIcon` if provided. */
11
+ openIcon: string;
12
+ /** Styles applied to the `openIcon` if provided and if `open={true}`. */
13
+ openIconOpen: string;
14
+ }
15
+ export declare type SpeedDialIconClassKey = keyof SpeedDialIconClasses;
16
+ export declare function getSpeedDialIconUtilityClass(slot: string): string;
17
+ declare const speedDialIconClasses: SpeedDialIconClasses;
18
+ export default speedDialIconClasses;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ export interface StepContextType {
3
+ index: number;
4
+ last: boolean;
5
+ expanded: boolean;
6
+ icon: React.ReactNode;
7
+ active: boolean;
8
+ completed: boolean;
9
+ disabled: boolean;
10
+ }
11
+ /**
12
+ * Provides information about the current step in Stepper.
13
+ */
14
+ declare const StepContext: React.Context<{} | StepContextType>;
15
+ /**
16
+ * Returns the current StepContext or an empty object if no StepContext
17
+ * has been defined in the component tree.
18
+ */
19
+ export declare function useStepContext(): StepContextType | {};
20
+ export default StepContext;
@@ -1,12 +1,20 @@
1
1
  import * as React from 'react';
2
+
2
3
  /**
3
- * @ignore - internal component.
4
+ * Provides information about the current step in Stepper.
4
5
  */
5
-
6
6
  const StepContext = /*#__PURE__*/React.createContext({});
7
7
 
8
8
  if (process.env.NODE_ENV !== 'production') {
9
9
  StepContext.displayName = 'StepContext';
10
10
  }
11
+ /**
12
+ * Returns the current StepContext or an empty object if no StepContext
13
+ * has been defined in the component tree.
14
+ */
15
+
11
16
 
17
+ export function useStepContext() {
18
+ return React.useContext(StepContext);
19
+ }
12
20
  export default StepContext;
package/Step/index.d.ts CHANGED
@@ -3,3 +3,6 @@ export * from './Step';
3
3
 
4
4
  export { default as stepClasses } from './stepClasses';
5
5
  export * from './stepClasses';
6
+
7
+ export { default as StepContext } from './StepContext';
8
+ export * from './StepContext';
package/Step/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { default } from './Step';
2
2
  export { default as stepClasses } from './stepClasses';
3
- export * from './stepClasses';
3
+ export * from './stepClasses';
4
+ export { default as StepContext } from './StepContext';
5
+ export * from './StepContext';
@@ -1,16 +1,16 @@
1
- export interface StepClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `orientation="horizontal"`. */
5
- horizontal: string;
6
- /** Styles applied to the root element if `orientation="vertical"`. */
7
- vertical: string;
8
- /** Styles applied to the root element if `alternativeLabel={true}`. */
9
- alternativeLabel: string;
10
- /** State class applied to the root element if `completed={true}`. */
11
- completed: string;
12
- }
13
- export declare type StepClassKey = keyof StepClasses;
14
- export declare function getStepUtilityClass(slot: string): string;
15
- declare const stepClasses: StepClasses;
16
- export default stepClasses;
1
+ export interface StepClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `orientation="horizontal"`. */
5
+ horizontal: string;
6
+ /** Styles applied to the root element if `orientation="vertical"`. */
7
+ vertical: string;
8
+ /** Styles applied to the root element if `alternativeLabel={true}`. */
9
+ alternativeLabel: string;
10
+ /** State class applied to the root element if `completed={true}`. */
11
+ completed: string;
12
+ }
13
+ export declare type StepClassKey = keyof StepClasses;
14
+ export declare function getStepUtilityClass(slot: string): string;
15
+ declare const stepClasses: StepClasses;
16
+ export default stepClasses;