@mui/material 6.0.0-alpha.5 → 6.0.0-alpha.6

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 (269) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.js +2 -2
  3. package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  4. package/Alert/Alert.d.ts +2 -2
  5. package/Alert/Alert.js +2 -2
  6. package/Alert/alertClasses.d.ts +12 -12
  7. package/Avatar/Avatar.d.ts +1 -1
  8. package/Avatar/Avatar.js +1 -1
  9. package/Backdrop/Backdrop.d.ts +1 -1
  10. package/Backdrop/Backdrop.js +1 -1
  11. package/Badge/Badge.d.ts +2 -2
  12. package/Badge/Badge.js +2 -2
  13. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  14. package/Button/Button.js +1 -1
  15. package/Button/buttonClasses.d.ts +33 -33
  16. package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  17. package/CHANGELOG.md +48 -0
  18. package/Checkbox/Checkbox.js +3 -1
  19. package/Chip/chipClasses.d.ts +28 -26
  20. package/Chip/chipClasses.js +1 -1
  21. package/Collapse/Collapse.js +66 -35
  22. package/Dialog/Dialog.js +105 -61
  23. package/DialogActions/DialogActions.js +16 -12
  24. package/DialogContent/DialogContent.js +25 -15
  25. package/DialogContentText/DialogContentText.js +3 -2
  26. package/DialogTitle/DialogTitle.js +2 -2
  27. package/Divider/Divider.d.ts +1 -1
  28. package/Divider/Divider.js +1 -1
  29. package/Drawer/Drawer.js +73 -32
  30. package/Fab/Fab.js +1 -1
  31. package/FilledInput/FilledInput.d.ts +1 -0
  32. package/FilledInput/FilledInput.js +170 -87
  33. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  34. package/FormControlLabel/FormControlLabel.js +1 -1
  35. package/FormHelperText/FormHelperText.js +2 -2
  36. package/FormLabel/FormLabel.js +23 -13
  37. package/Grow/Grow.js +3 -1
  38. package/Icon/Icon.js +63 -23
  39. package/ImageList/ImageList.js +2 -2
  40. package/ImageListItem/ImageListItem.js +2 -2
  41. package/ImageListItemBar/ImageListItemBar.js +2 -2
  42. package/Input/Input.d.ts +1 -0
  43. package/Input/Input.js +84 -61
  44. package/InputAdornment/InputAdornment.js +37 -21
  45. package/InputBase/InputBase.js +58 -28
  46. package/InputLabel/InputLabel.js +120 -58
  47. package/Link/Link.js +99 -54
  48. package/Link/getTextDecoration.d.ts +2 -8
  49. package/Link/getTextDecoration.js +16 -8
  50. package/List/List.js +22 -13
  51. package/ListItem/ListItem.js +2 -2
  52. package/ListItemAvatar/ListItemAvatar.js +2 -2
  53. package/ListItemButton/ListItemButton.js +3 -2
  54. package/ListItemIcon/ListItemIcon.js +14 -9
  55. package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  56. package/ListItemText/ListItemText.js +2 -2
  57. package/ListSubheader/ListSubheader.js +5 -3
  58. package/Menu/Menu.js +3 -2
  59. package/MenuItem/MenuItem.js +47 -27
  60. package/NativeSelect/NativeSelectInput.js +78 -49
  61. package/OutlinedInput/NotchedOutline.js +60 -43
  62. package/OutlinedInput/OutlinedInput.js +97 -39
  63. package/Pagination/Pagination.js +2 -2
  64. package/PaginationItem/PaginationItem.d.ts +1 -1
  65. package/PaginationItem/PaginationItem.js +1 -1
  66. package/PaginationItem/paginationItemClasses.d.ts +4 -4
  67. package/Paper/Paper.js +44 -21
  68. package/Radio/Radio.js +5 -3
  69. package/Radio/RadioButtonIcon.js +1 -1
  70. package/Rating/Rating.js +3 -2
  71. package/Select/Select.js +2 -1
  72. package/Select/SelectInput.js +8 -6
  73. package/Skeleton/Skeleton.js +109 -61
  74. package/Slider/Slider.d.ts +2 -2
  75. package/Slider/Slider.js +2 -2
  76. package/Snackbar/Snackbar.js +66 -40
  77. package/SnackbarContent/SnackbarContent.js +2 -2
  78. package/SpeedDial/SpeedDial.d.ts +28 -1
  79. package/SpeedDial/SpeedDial.js +107 -49
  80. package/SpeedDialAction/SpeedDialAction.js +50 -24
  81. package/SpeedDialIcon/SpeedDialIcon.js +37 -16
  82. package/StepConnector/stepConnectorClasses.d.ts +2 -2
  83. package/StepLabel/StepLabel.d.ts +3 -3
  84. package/StepLabel/StepLabel.js +3 -3
  85. package/SwipeableDrawer/SwipeArea.js +39 -18
  86. package/Tab/Tab.js +127 -55
  87. package/TabScrollButton/TabScrollButton.js +27 -15
  88. package/Table/Table.js +2 -2
  89. package/TableBody/TableBody.js +2 -2
  90. package/TableCell/TableCell.js +2 -2
  91. package/TableContainer/TableContainer.js +2 -2
  92. package/TableFooter/TableFooter.js +2 -2
  93. package/TableHead/TableHead.js +2 -2
  94. package/TablePagination/TablePagination.js +2 -2
  95. package/TableRow/TableRow.js +2 -2
  96. package/TableSortLabel/TableSortLabel.js +2 -2
  97. package/Tabs/Tabs.js +107 -54
  98. package/TextField/TextField.js +2 -2
  99. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  100. package/Toolbar/Toolbar.js +3 -7
  101. package/Tooltip/Tooltip.js +185 -88
  102. package/Typography/Typography.js +89 -39
  103. package/index.js +1 -1
  104. package/internal/SwitchBase.js +39 -11
  105. package/modern/Accordion/Accordion.js +2 -2
  106. package/modern/Alert/Alert.js +2 -2
  107. package/modern/Avatar/Avatar.js +1 -1
  108. package/modern/Backdrop/Backdrop.js +1 -1
  109. package/modern/Badge/Badge.js +2 -2
  110. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  111. package/modern/Button/Button.js +1 -1
  112. package/modern/Checkbox/Checkbox.js +3 -1
  113. package/modern/Chip/chipClasses.js +1 -1
  114. package/modern/Collapse/Collapse.js +66 -35
  115. package/modern/Dialog/Dialog.js +105 -61
  116. package/modern/DialogActions/DialogActions.js +16 -12
  117. package/modern/DialogContent/DialogContent.js +25 -15
  118. package/modern/DialogContentText/DialogContentText.js +3 -2
  119. package/modern/DialogTitle/DialogTitle.js +2 -2
  120. package/modern/Divider/Divider.js +1 -1
  121. package/modern/Drawer/Drawer.js +73 -32
  122. package/modern/Fab/Fab.js +1 -1
  123. package/modern/FilledInput/FilledInput.js +170 -87
  124. package/modern/FormControlLabel/FormControlLabel.js +1 -1
  125. package/modern/FormHelperText/FormHelperText.js +2 -2
  126. package/modern/FormLabel/FormLabel.js +23 -13
  127. package/modern/Grow/Grow.js +3 -1
  128. package/modern/Icon/Icon.js +63 -23
  129. package/modern/ImageList/ImageList.js +2 -2
  130. package/modern/ImageListItem/ImageListItem.js +2 -2
  131. package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
  132. package/modern/Input/Input.js +84 -61
  133. package/modern/InputAdornment/InputAdornment.js +37 -21
  134. package/modern/InputBase/InputBase.js +58 -28
  135. package/modern/InputLabel/InputLabel.js +120 -58
  136. package/modern/Link/Link.js +99 -54
  137. package/modern/Link/getTextDecoration.js +16 -8
  138. package/modern/List/List.js +22 -13
  139. package/modern/ListItem/ListItem.js +2 -2
  140. package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
  141. package/modern/ListItemButton/ListItemButton.js +3 -2
  142. package/modern/ListItemIcon/ListItemIcon.js +14 -9
  143. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  144. package/modern/ListItemText/ListItemText.js +2 -2
  145. package/modern/ListSubheader/ListSubheader.js +5 -3
  146. package/modern/Menu/Menu.js +3 -2
  147. package/modern/MenuItem/MenuItem.js +47 -27
  148. package/modern/NativeSelect/NativeSelectInput.js +78 -49
  149. package/modern/OutlinedInput/NotchedOutline.js +60 -43
  150. package/modern/OutlinedInput/OutlinedInput.js +97 -39
  151. package/modern/Pagination/Pagination.js +2 -2
  152. package/modern/PaginationItem/PaginationItem.js +1 -1
  153. package/modern/Paper/Paper.js +44 -21
  154. package/modern/Radio/Radio.js +5 -3
  155. package/modern/Radio/RadioButtonIcon.js +1 -1
  156. package/modern/Rating/Rating.js +3 -2
  157. package/modern/Select/Select.js +2 -1
  158. package/modern/Select/SelectInput.js +8 -6
  159. package/modern/Skeleton/Skeleton.js +109 -61
  160. package/modern/Slider/Slider.js +2 -2
  161. package/modern/Snackbar/Snackbar.js +66 -40
  162. package/modern/SnackbarContent/SnackbarContent.js +2 -2
  163. package/modern/SpeedDial/SpeedDial.js +107 -49
  164. package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
  165. package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
  166. package/modern/StepLabel/StepLabel.js +3 -3
  167. package/modern/SwipeableDrawer/SwipeArea.js +39 -18
  168. package/modern/Tab/Tab.js +127 -55
  169. package/modern/TabScrollButton/TabScrollButton.js +27 -15
  170. package/modern/Table/Table.js +2 -2
  171. package/modern/TableBody/TableBody.js +2 -2
  172. package/modern/TableCell/TableCell.js +2 -2
  173. package/modern/TableContainer/TableContainer.js +2 -2
  174. package/modern/TableFooter/TableFooter.js +2 -2
  175. package/modern/TableHead/TableHead.js +2 -2
  176. package/modern/TablePagination/TablePagination.js +2 -2
  177. package/modern/TableRow/TableRow.js +2 -2
  178. package/modern/TableSortLabel/TableSortLabel.js +2 -2
  179. package/modern/Tabs/Tabs.js +107 -54
  180. package/modern/TextField/TextField.js +2 -2
  181. package/modern/Toolbar/Toolbar.js +3 -7
  182. package/modern/Tooltip/Tooltip.js +185 -88
  183. package/modern/Typography/Typography.js +89 -39
  184. package/modern/index.js +1 -1
  185. package/modern/internal/SwitchBase.js +39 -11
  186. package/node/Accordion/Accordion.js +2 -2
  187. package/node/Alert/Alert.js +2 -2
  188. package/node/Avatar/Avatar.js +1 -1
  189. package/node/Backdrop/Backdrop.js +1 -1
  190. package/node/Badge/Badge.js +2 -2
  191. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
  192. package/node/Button/Button.js +2 -2
  193. package/node/Checkbox/Checkbox.js +3 -1
  194. package/node/Chip/chipClasses.js +1 -1
  195. package/node/Collapse/Collapse.js +70 -39
  196. package/node/Dialog/Dialog.js +110 -66
  197. package/node/DialogActions/DialogActions.js +18 -14
  198. package/node/DialogContent/DialogContent.js +27 -17
  199. package/node/DialogContentText/DialogContentText.js +6 -5
  200. package/node/DialogTitle/DialogTitle.js +4 -4
  201. package/node/Divider/Divider.js +1 -1
  202. package/node/Drawer/Drawer.js +78 -37
  203. package/node/Fab/Fab.js +2 -2
  204. package/node/FilledInput/FilledInput.js +176 -91
  205. package/node/FormControlLabel/FormControlLabel.js +1 -1
  206. package/node/FormHelperText/FormHelperText.js +4 -4
  207. package/node/FormLabel/FormLabel.js +26 -16
  208. package/node/Grow/Grow.js +3 -1
  209. package/node/Icon/Icon.js +65 -25
  210. package/node/ImageList/ImageList.js +4 -4
  211. package/node/ImageListItem/ImageListItem.js +4 -4
  212. package/node/ImageListItemBar/ImageListItemBar.js +8 -8
  213. package/node/Input/Input.js +87 -64
  214. package/node/InputAdornment/InputAdornment.js +39 -23
  215. package/node/InputBase/InputBase.js +61 -31
  216. package/node/InputLabel/InputLabel.js +123 -61
  217. package/node/Link/Link.js +101 -56
  218. package/node/Link/getTextDecoration.js +18 -10
  219. package/node/List/List.js +24 -15
  220. package/node/ListItem/ListItem.js +5 -5
  221. package/node/ListItemAvatar/ListItemAvatar.js +4 -4
  222. package/node/ListItemButton/ListItemButton.js +6 -5
  223. package/node/ListItemIcon/ListItemIcon.js +16 -11
  224. package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
  225. package/node/ListItemText/ListItemText.js +4 -4
  226. package/node/ListSubheader/ListSubheader.js +7 -5
  227. package/node/Menu/Menu.js +8 -7
  228. package/node/MenuItem/MenuItem.js +50 -30
  229. package/node/NativeSelect/NativeSelectInput.js +80 -53
  230. package/node/OutlinedInput/NotchedOutline.js +64 -47
  231. package/node/OutlinedInput/OutlinedInput.js +101 -43
  232. package/node/Pagination/Pagination.js +5 -5
  233. package/node/PaginationItem/PaginationItem.js +1 -1
  234. package/node/Paper/Paper.js +49 -28
  235. package/node/Radio/Radio.js +6 -4
  236. package/node/Radio/RadioButtonIcon.js +2 -2
  237. package/node/Rating/Rating.js +9 -8
  238. package/node/Select/Select.js +6 -5
  239. package/node/Select/SelectInput.js +9 -7
  240. package/node/Skeleton/Skeleton.js +113 -65
  241. package/node/Slider/Slider.js +2 -2
  242. package/node/Snackbar/Snackbar.js +68 -42
  243. package/node/SnackbarContent/SnackbarContent.js +6 -6
  244. package/node/SpeedDial/SpeedDial.js +111 -53
  245. package/node/SpeedDialAction/SpeedDialAction.js +54 -28
  246. package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
  247. package/node/StepLabel/StepLabel.js +3 -3
  248. package/node/SwipeableDrawer/SwipeArea.js +41 -20
  249. package/node/Tab/Tab.js +129 -57
  250. package/node/TabScrollButton/TabScrollButton.js +29 -17
  251. package/node/Table/Table.js +4 -4
  252. package/node/TableBody/TableBody.js +4 -4
  253. package/node/TableCell/TableCell.js +4 -4
  254. package/node/TableContainer/TableContainer.js +4 -4
  255. package/node/TableFooter/TableFooter.js +4 -4
  256. package/node/TableHead/TableHead.js +4 -4
  257. package/node/TablePagination/TablePagination.js +10 -10
  258. package/node/TableRow/TableRow.js +4 -4
  259. package/node/TableSortLabel/TableSortLabel.js +5 -5
  260. package/node/Tabs/Tabs.js +113 -60
  261. package/node/TextField/TextField.js +4 -4
  262. package/node/Toolbar/Toolbar.js +5 -9
  263. package/node/Tooltip/Tooltip.js +189 -92
  264. package/node/Typography/Typography.js +90 -40
  265. package/node/index.js +1 -1
  266. package/node/internal/SwitchBase.js +41 -13
  267. package/package.json +4 -4
  268. package/umd/material-ui.development.js +2585 -1287
  269. package/umd/material-ui.production.min.js +4 -4
@@ -5,12 +5,35 @@ import { InternalStandardProps as StandardProps } from '..';
5
5
  import { FabProps } from '../Fab';
6
6
  import { TransitionProps } from '../transitions';
7
7
  import { SpeedDialClasses } from './speedDialClasses';
8
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
8
9
 
9
10
  export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
10
11
  export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
11
12
 
13
+ export interface SpeedDialSlots {
14
+ /**
15
+ * The component that renders the transition.
16
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
17
+ * @default {}
18
+ */
19
+ transition?: React.JSXElementConstructor<
20
+ TransitionProps & { children: React.ReactElement<any, any> }
21
+ >;
22
+ }
23
+
24
+ export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<
25
+ SpeedDialSlots,
26
+ {
27
+ transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>;
28
+ }
29
+ >;
30
+
12
31
  export interface SpeedDialProps
13
- extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'> {
32
+ extends Omit<
33
+ StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>,
34
+ 'slots' | 'slotProps'
35
+ >,
36
+ SpeedDialSlotsAndSlotProps {
14
37
  /**
15
38
  * SpeedDialActions to display when the SpeedDial is `open`.
16
39
  */
@@ -74,6 +97,7 @@ export interface SpeedDialProps
74
97
  * The component used for the transition.
75
98
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
76
99
  * @default Zoom
100
+ * * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
77
101
  */
78
102
  TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
79
103
  /**
@@ -88,10 +112,13 @@ export interface SpeedDialProps
88
112
  /**
89
113
  * Props applied to the transition element.
90
114
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
115
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
91
116
  */
92
117
  TransitionProps?: TransitionProps;
93
118
  }
94
119
 
120
+ export interface SpeedDialOwnerState extends SpeedDialProps {}
121
+
95
122
  /**
96
123
  *
97
124
  * Demos:
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["ref"],
6
- _excluded2 = ["ariaLabel", "FabProps", "children", "className", "direction", "hidden", "icon", "onBlur", "onClose", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onOpen", "open", "openIcon", "TransitionComponent", "transitionDuration", "TransitionProps"],
6
+ _excluded2 = ["ariaLabel", "FabProps", "children", "className", "direction", "hidden", "icon", "onBlur", "onClose", "onFocus", "onKeyDown", "onMouseEnter", "onMouseLeave", "onOpen", "open", "openIcon", "slots", "slotProps", "TransitionComponent", "TransitionProps", "transitionDuration"],
7
7
  _excluded3 = ["ref"];
8
8
  import * as React from 'react';
9
9
  import { isFragment } from 'react-is';
@@ -12,8 +12,7 @@ import clsx from 'clsx';
12
12
  import composeClasses from '@mui/utils/composeClasses';
13
13
  import useTimeout from '@mui/utils/useTimeout';
14
14
  import clamp from '@mui/utils/clamp';
15
- import styled from '../styles/styled';
16
- import useThemeProps from '../styles/useThemeProps';
15
+ import { styled, createUseThemeProps } from '../zero-styled';
17
16
  import useTheme from '../styles/useTheme';
18
17
  import Zoom from '../Zoom';
19
18
  import Fab from '../Fab';
@@ -22,7 +21,9 @@ import isMuiElement from '../utils/isMuiElement';
22
21
  import useForkRef from '../utils/useForkRef';
23
22
  import useControlled from '../utils/useControlled';
24
23
  import speedDialClasses, { getSpeedDialUtilityClass } from './speedDialClasses';
24
+ import useSlot from '../utils/useSlot';
25
25
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
+ const useThemeProps = createUseThemeProps('MuiSpeedDial');
26
27
  const useUtilityClasses = ownerState => {
27
28
  const {
28
29
  classes,
@@ -57,41 +58,61 @@ const SpeedDialRoot = styled('div', {
57
58
  return [styles.root, styles[`direction${capitalize(ownerState.direction)}`]];
58
59
  }
59
60
  })(({
60
- theme,
61
- ownerState
62
- }) => _extends({
61
+ theme
62
+ }) => ({
63
63
  zIndex: (theme.vars || theme).zIndex.speedDial,
64
64
  display: 'flex',
65
65
  alignItems: 'center',
66
- pointerEvents: 'none'
67
- }, ownerState.direction === 'up' && {
68
- flexDirection: 'column-reverse',
69
- [`& .${speedDialClasses.actions}`]: {
70
- flexDirection: 'column-reverse',
71
- marginBottom: -dialRadius,
72
- paddingBottom: spacingActions + dialRadius
73
- }
74
- }, ownerState.direction === 'down' && {
75
- flexDirection: 'column',
76
- [`& .${speedDialClasses.actions}`]: {
77
- flexDirection: 'column',
78
- marginTop: -dialRadius,
79
- paddingTop: spacingActions + dialRadius
80
- }
81
- }, ownerState.direction === 'left' && {
82
- flexDirection: 'row-reverse',
83
- [`& .${speedDialClasses.actions}`]: {
84
- flexDirection: 'row-reverse',
85
- marginRight: -dialRadius,
86
- paddingRight: spacingActions + dialRadius
87
- }
88
- }, ownerState.direction === 'right' && {
89
- flexDirection: 'row',
90
- [`& .${speedDialClasses.actions}`]: {
91
- flexDirection: 'row',
92
- marginLeft: -dialRadius,
93
- paddingLeft: spacingActions + dialRadius
94
- }
66
+ pointerEvents: 'none',
67
+ variants: [{
68
+ props: {
69
+ direction: 'up'
70
+ },
71
+ style: {
72
+ flexDirection: 'column-reverse',
73
+ [`& .${speedDialClasses.actions}`]: {
74
+ flexDirection: 'column-reverse',
75
+ marginBottom: -dialRadius,
76
+ paddingBottom: spacingActions + dialRadius
77
+ }
78
+ }
79
+ }, {
80
+ props: {
81
+ direction: 'down'
82
+ },
83
+ style: {
84
+ flexDirection: 'column',
85
+ [`& .${speedDialClasses.actions}`]: {
86
+ flexDirection: 'column',
87
+ marginTop: -dialRadius,
88
+ paddingTop: spacingActions + dialRadius
89
+ }
90
+ }
91
+ }, {
92
+ props: {
93
+ direction: 'left'
94
+ },
95
+ style: {
96
+ flexDirection: 'row-reverse',
97
+ [`& .${speedDialClasses.actions}`]: {
98
+ flexDirection: 'row-reverse',
99
+ marginRight: -dialRadius,
100
+ paddingRight: spacingActions + dialRadius
101
+ }
102
+ }
103
+ }, {
104
+ props: {
105
+ direction: 'right'
106
+ },
107
+ style: {
108
+ flexDirection: 'row',
109
+ [`& .${speedDialClasses.actions}`]: {
110
+ flexDirection: 'row',
111
+ marginLeft: -dialRadius,
112
+ paddingLeft: spacingActions + dialRadius
113
+ }
114
+ }
115
+ }]
95
116
  }));
96
117
  const SpeedDialFab = styled(Fab, {
97
118
  name: 'MuiSpeedDial',
@@ -109,15 +130,19 @@ const SpeedDialActions = styled('div', {
109
130
  } = props;
110
131
  return [styles.actions, !ownerState.open && styles.actionsClosed];
111
132
  }
112
- })(({
113
- ownerState
114
- }) => _extends({
133
+ })({
115
134
  display: 'flex',
116
- pointerEvents: 'auto'
117
- }, !ownerState.open && {
118
- transition: 'top 0s linear 0.2s',
119
- pointerEvents: 'none'
120
- }));
135
+ pointerEvents: 'auto',
136
+ variants: [{
137
+ props: ({
138
+ ownerState
139
+ }) => !ownerState.open,
140
+ style: {
141
+ transition: 'top 0s linear 0.2s',
142
+ pointerEvents: 'none'
143
+ }
144
+ }]
145
+ });
121
146
  const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref) {
122
147
  const props = useThemeProps({
123
148
  props: inProps,
@@ -146,9 +171,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
146
171
  onMouseLeave,
147
172
  onOpen,
148
173
  open: openProp,
149
- TransitionComponent = Zoom,
150
- transitionDuration = defaultTransitionDuration,
151
- TransitionProps
174
+ slots = {},
175
+ slotProps = {},
176
+ TransitionComponent: TransitionComponentProp,
177
+ TransitionProps: TransitionPropsProp,
178
+ transitionDuration = defaultTransitionDuration
152
179
  } = props,
153
180
  FabProps = _objectWithoutPropertiesLoose(props.FabProps, _excluded),
154
181
  other = _objectWithoutPropertiesLoose(props, _excluded2);
@@ -336,6 +363,21 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
336
363
  id: `${id}-action-${index}`
337
364
  });
338
365
  });
366
+ const backwardCompatibleSlots = _extends({
367
+ transition: TransitionComponentProp
368
+ }, slots);
369
+ const backwardCompatibleSlotProps = _extends({
370
+ transition: TransitionPropsProp
371
+ }, slotProps);
372
+ const externalForwardedProps = {
373
+ slots: backwardCompatibleSlots,
374
+ slotProps: backwardCompatibleSlotProps
375
+ };
376
+ const [TransitionSlot, transitionProps] = useSlot('transition', {
377
+ elementType: Zoom,
378
+ externalForwardedProps,
379
+ ownerState
380
+ });
339
381
  return /*#__PURE__*/_jsxs(SpeedDialRoot, _extends({
340
382
  className: clsx(classes.root, className),
341
383
  ref: ref,
@@ -347,11 +389,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
347
389
  onMouseLeave: handleClose,
348
390
  ownerState: ownerState
349
391
  }, other, {
350
- children: [/*#__PURE__*/_jsx(TransitionComponent, _extends({
392
+ children: [/*#__PURE__*/_jsx(TransitionSlot, _extends({
351
393
  in: !hidden,
352
394
  timeout: transitionDuration,
353
395
  unmountOnExit: true
354
- }, TransitionProps, {
396
+ }, transitionProps, {
355
397
  children: /*#__PURE__*/_jsx(SpeedDialFab, _extends({
356
398
  color: "primary",
357
399
  "aria-label": ariaLabel,
@@ -461,6 +503,20 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
461
503
  * The icon to display in the SpeedDial Fab when the SpeedDial is open.
462
504
  */
463
505
  openIcon: PropTypes.node,
506
+ /**
507
+ * The props used for each slot inside.
508
+ * @default {}
509
+ */
510
+ slotProps: PropTypes.shape({
511
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
512
+ }),
513
+ /**
514
+ * The components used for each slot inside.
515
+ * @default {}
516
+ */
517
+ slots: PropTypes.shape({
518
+ transition: PropTypes.elementType
519
+ }),
464
520
  /**
465
521
  * The system prop that allows defining system overrides as well as additional CSS styles.
466
522
  */
@@ -469,6 +525,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
469
525
  * The component used for the transition.
470
526
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
471
527
  * @default Zoom
528
+ * * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
472
529
  */
473
530
  TransitionComponent: PropTypes.elementType,
474
531
  /**
@@ -487,6 +544,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
487
544
  /**
488
545
  * Props applied to the transition element.
489
546
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
547
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
490
548
  */
491
549
  TransitionProps: PropTypes.object
492
550
  } : void 0;
@@ -9,13 +9,13 @@ import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
10
10
  import composeClasses from '@mui/utils/composeClasses';
11
11
  import { emphasize } from '@mui/system/colorManipulator';
12
- import styled from '../styles/styled';
13
- import useThemeProps from '../styles/useThemeProps';
12
+ import { styled, createUseThemeProps } from '../zero-styled';
14
13
  import Fab from '../Fab';
15
14
  import Tooltip from '../Tooltip';
16
15
  import capitalize from '../utils/capitalize';
17
16
  import speedDialActionClasses, { getSpeedDialActionUtilityClass } from './speedDialActionClasses';
18
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ const useThemeProps = createUseThemeProps('MuiSpeedDialAction');
19
19
  const useUtilityClasses = ownerState => {
20
20
  const {
21
21
  open,
@@ -40,9 +40,8 @@ const SpeedDialActionFab = styled(Fab, {
40
40
  return [styles.fab, !ownerState.open && styles.fabClosed];
41
41
  }
42
42
  })(({
43
- theme,
44
- ownerState
45
- }) => _extends({
43
+ theme
44
+ }) => ({
46
45
  margin: 8,
47
46
  color: (theme.vars || theme).palette.text.secondary,
48
47
  backgroundColor: (theme.vars || theme).palette.background.paper,
@@ -52,10 +51,16 @@ const SpeedDialActionFab = styled(Fab, {
52
51
  transition: `${theme.transitions.create('transform', {
53
52
  duration: theme.transitions.duration.shorter
54
53
  })}, opacity 0.8s`,
55
- opacity: 1
56
- }, !ownerState.open && {
57
- opacity: 0,
58
- transform: 'scale(0)'
54
+ opacity: 1,
55
+ variants: [{
56
+ props: ({
57
+ ownerState
58
+ }) => !ownerState.open,
59
+ style: {
60
+ opacity: 0,
61
+ transform: 'scale(0)'
62
+ }
63
+ }]
59
64
  }));
60
65
  const SpeedDialActionStaticTooltip = styled('span', {
61
66
  name: 'MuiSpeedDialAction',
@@ -67,29 +72,50 @@ const SpeedDialActionStaticTooltip = styled('span', {
67
72
  return [styles.staticTooltip, !ownerState.open && styles.staticTooltipClosed, styles[`tooltipPlacement${capitalize(ownerState.tooltipPlacement)}`]];
68
73
  }
69
74
  })(({
70
- theme,
71
- ownerState
75
+ theme
72
76
  }) => ({
73
77
  position: 'relative',
74
78
  display: 'flex',
75
79
  alignItems: 'center',
76
- [`& .${speedDialActionClasses.staticTooltipLabel}`]: _extends({
80
+ [`& .${speedDialActionClasses.staticTooltipLabel}`]: {
77
81
  transition: theme.transitions.create(['transform', 'opacity'], {
78
82
  duration: theme.transitions.duration.shorter
79
83
  }),
80
84
  opacity: 1
81
- }, !ownerState.open && {
82
- opacity: 0,
83
- transform: 'scale(0.5)'
84
- }, ownerState.tooltipPlacement === 'left' && {
85
- transformOrigin: '100% 50%',
86
- right: '100%',
87
- marginRight: 8
88
- }, ownerState.tooltipPlacement === 'right' && {
89
- transformOrigin: '0% 50%',
90
- left: '100%',
91
- marginLeft: 8
92
- })
85
+ },
86
+ variants: [{
87
+ props: ({
88
+ ownerState
89
+ }) => !ownerState.open,
90
+ style: {
91
+ [`& .${speedDialActionClasses.staticTooltipLabel}`]: {
92
+ opacity: 0,
93
+ transform: 'scale(0.5)'
94
+ }
95
+ }
96
+ }, {
97
+ props: {
98
+ tooltipPlacement: 'left'
99
+ },
100
+ style: {
101
+ [`& .${speedDialActionClasses.staticTooltipLabel}`]: {
102
+ transformOrigin: '100% 50%',
103
+ right: '100%',
104
+ marginRight: 8
105
+ }
106
+ }
107
+ }, {
108
+ props: {
109
+ tooltipPlacement: 'right'
110
+ },
111
+ style: {
112
+ [`& .${speedDialActionClasses.staticTooltipLabel}`]: {
113
+ transformOrigin: '0% 50%',
114
+ left: '100%',
115
+ marginLeft: 8
116
+ }
117
+ }
118
+ }]
93
119
  }));
94
120
  const SpeedDialActionStaticTooltipLabel = styled('span', {
95
121
  name: 'MuiSpeedDialAction',
@@ -1,17 +1,17 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["className", "icon", "open", "openIcon"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import AddIcon from '../internal/svg-icons/Add';
13
12
  import speedDialIconClasses, { getSpeedDialIconUtilityClass } from './speedDialIconClasses';
14
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ const useThemeProps = createUseThemeProps('MuiSpeedDialIcon');
15
15
  const useUtilityClasses = ownerState => {
16
16
  const {
17
17
  classes,
@@ -45,30 +45,51 @@ const SpeedDialIconRoot = styled('span', {
45
45
  }, styles.root];
46
46
  }
47
47
  })(({
48
- theme,
49
- ownerState
48
+ theme
50
49
  }) => ({
51
50
  height: 24,
52
- [`& .${speedDialIconClasses.icon}`]: _extends({
51
+ [`& .${speedDialIconClasses.icon}`]: {
53
52
  transition: theme.transitions.create(['transform', 'opacity'], {
54
53
  duration: theme.transitions.duration.short
55
54
  })
56
- }, ownerState.open && _extends({
57
- transform: 'rotate(45deg)'
58
- }, ownerState.openIcon && {
59
- opacity: 0
60
- })),
61
- [`& .${speedDialIconClasses.openIcon}`]: _extends({
55
+ },
56
+ [`& .${speedDialIconClasses.openIcon}`]: {
62
57
  position: 'absolute',
63
58
  transition: theme.transitions.create(['transform', 'opacity'], {
64
59
  duration: theme.transitions.duration.short
65
60
  }),
66
61
  opacity: 0,
67
62
  transform: 'rotate(-45deg)'
68
- }, ownerState.open && {
69
- transform: 'rotate(0deg)',
70
- opacity: 1
71
- })
63
+ },
64
+ variants: [{
65
+ props: ({
66
+ ownerState
67
+ }) => ownerState.open,
68
+ style: {
69
+ [`& .${speedDialIconClasses.icon}`]: {
70
+ transform: 'rotate(45deg)'
71
+ }
72
+ }
73
+ }, {
74
+ props: ({
75
+ ownerState
76
+ }) => ownerState.open && ownerState.openIcon,
77
+ style: {
78
+ [`& .${speedDialIconClasses.icon}`]: {
79
+ opacity: 0
80
+ }
81
+ }
82
+ }, {
83
+ props: ({
84
+ ownerState
85
+ }) => ownerState.open,
86
+ style: {
87
+ [`& .${speedDialIconClasses.openIcon}`]: {
88
+ transform: 'rotate(0deg)',
89
+ opacity: 1
90
+ }
91
+ }
92
+ }]
72
93
  }));
73
94
  const SpeedDialIcon = /*#__PURE__*/React.forwardRef(function SpeedDialIcon(inProps, ref) {
74
95
  const props = useThemeProps({
@@ -16,11 +16,11 @@ export interface StepConnectorClasses {
16
16
  /** Styles applied to the line element. */
17
17
  line: string;
18
18
  /** Styles applied to the line element if `orientation="horizontal"`.
19
- * @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
19
+ * @deprecated Combine the [.MuiStepConnector-horizontal](/material-ui/api/step-connector/#step-connector-classes-horizontal) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
20
20
  */
21
21
  lineHorizontal: string;
22
22
  /** Styles applied to the line element if `orientation="vertical"`.
23
- * @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
23
+ * @deprecated Combine the [.MuiStepConnector-vertical](/material-ui/api/step-connector/#step-connector-classes-vertical) and [.MuiStepConnector-line](/material-ui/api/step-connector/#step-connector-classes-line) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
24
24
  */
25
25
  lineVertical: string;
26
26
  }
@@ -42,7 +42,7 @@ export interface StepLabelProps
42
42
  /**
43
43
  * The props used for each slot inside.
44
44
  * @default {}
45
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
45
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
46
46
  */
47
47
  componentsProps?: {
48
48
  /**
@@ -66,12 +66,12 @@ export interface StepLabelProps
66
66
  optional?: React.ReactNode;
67
67
  /**
68
68
  * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/).
69
- * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
69
+ * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
70
70
  */
71
71
  StepIconComponent?: React.ElementType<StepIconProps>;
72
72
  /**
73
73
  * Props applied to the [`StepIcon`](/material-ui/api/step-icon/) element.
74
- * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
74
+ * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
75
75
  */
76
76
  StepIconProps?: Partial<StepIconProps>;
77
77
  /**
@@ -215,7 +215,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
215
215
  /**
216
216
  * The props used for each slot inside.
217
217
  * @default {}
218
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
218
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
219
219
  */
220
220
  componentsProps: PropTypes.shape({
221
221
  label: PropTypes.object
@@ -251,12 +251,12 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
251
251
  }),
252
252
  /**
253
253
  * The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/).
254
- * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
254
+ * @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
255
255
  */
256
256
  StepIconComponent: PropTypes.elementType,
257
257
  /**
258
258
  * Props applied to the [`StepIcon`](/material-ui/api/step-icon/) element.
259
- * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
259
+ * @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
260
260
  */
261
261
  StepIconProps: PropTypes.object,
262
262
  /**
@@ -1,38 +1,59 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["anchor", "classes", "className", "width", "style"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
- import styled, { rootShouldForwardProp } from '../styles/styled';
9
+ import { styled } from '../zero-styled';
10
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
10
11
  import capitalize from '../utils/capitalize';
11
12
  import { isHorizontal } from '../Drawer/Drawer';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  const SwipeAreaRoot = styled('div', {
14
15
  shouldForwardProp: rootShouldForwardProp
15
16
  })(({
16
- theme,
17
- ownerState
18
- }) => _extends({
17
+ theme
18
+ }) => ({
19
19
  position: 'fixed',
20
20
  top: 0,
21
21
  left: 0,
22
22
  bottom: 0,
23
- zIndex: theme.zIndex.drawer - 1
24
- }, ownerState.anchor === 'left' && {
25
- right: 'auto'
26
- }, ownerState.anchor === 'right' && {
27
- left: 'auto',
28
- right: 0
29
- }, ownerState.anchor === 'top' && {
30
- bottom: 'auto',
31
- right: 0
32
- }, ownerState.anchor === 'bottom' && {
33
- top: 'auto',
34
- bottom: 0,
35
- right: 0
23
+ zIndex: theme.zIndex.drawer - 1,
24
+ variants: [{
25
+ props: {
26
+ anchor: 'left'
27
+ },
28
+ style: {
29
+ right: 'auto'
30
+ }
31
+ }, {
32
+ props: {
33
+ anchor: 'right'
34
+ },
35
+ style: {
36
+ left: 'auto',
37
+ right: 0
38
+ }
39
+ }, {
40
+ props: {
41
+ anchor: 'top'
42
+ },
43
+ style: {
44
+ bottom: 'auto',
45
+ right: 0
46
+ }
47
+ }, {
48
+ props: {
49
+ anchor: 'bottom'
50
+ },
51
+ style: {
52
+ top: 'auto',
53
+ bottom: 0,
54
+ right: 0
55
+ }
56
+ }]
36
57
  }));
37
58
 
38
59
  /**