@mui/material 6.4.4 → 6.4.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 (82) hide show
  1. package/Accordion/Accordion.d.ts +14 -12
  2. package/Alert/Alert.d.ts +3 -15
  3. package/Backdrop/Backdrop.d.ts +14 -12
  4. package/Button/Button.js +3 -3
  5. package/CHANGELOG.md +63 -0
  6. package/CardHeader/CardHeader.d.ts +4 -20
  7. package/Checkbox/Checkbox.d.ts +45 -9
  8. package/Checkbox/Checkbox.js +51 -21
  9. package/Dialog/Dialog.d.ts +4 -4
  10. package/Drawer/Drawer.d.ts +92 -1
  11. package/Drawer/Drawer.js +108 -36
  12. package/IconButton/IconButton.js +3 -3
  13. package/InputBase/inputBaseClasses.d.ts +15 -6
  14. package/Menu/Menu.d.ts +88 -1
  15. package/Menu/Menu.js +58 -19
  16. package/Modal/Modal.js +9 -10
  17. package/Popover/Popover.d.ts +60 -6
  18. package/Popover/Popover.js +78 -51
  19. package/Radio/Radio.d.ts +45 -1
  20. package/Radio/Radio.js +59 -16
  21. package/Select/SelectInput.js +8 -8
  22. package/Snackbar/Snackbar.d.ts +79 -2
  23. package/Snackbar/Snackbar.js +110 -32
  24. package/SpeedDial/SpeedDial.d.ts +8 -6
  25. package/SpeedDialAction/SpeedDialAction.d.ts +82 -1
  26. package/SpeedDialAction/SpeedDialAction.js +108 -30
  27. package/StepContent/StepContent.d.ts +2 -2
  28. package/SwipeableDrawer/SwipeableDrawer.d.ts +28 -2
  29. package/SwipeableDrawer/SwipeableDrawer.js +60 -13
  30. package/Switch/Switch.js +2 -0
  31. package/Tabs/Tabs.d.ts +129 -29
  32. package/Tabs/Tabs.js +120 -52
  33. package/Tabs/tabsClasses.d.ts +4 -0
  34. package/Tabs/tabsClasses.js +1 -1
  35. package/Tooltip/Tooltip.d.ts +20 -12
  36. package/index.js +1 -1
  37. package/internal/SwitchBase.d.ts +35 -1
  38. package/internal/SwitchBase.js +84 -30
  39. package/modern/Button/Button.js +3 -3
  40. package/modern/Checkbox/Checkbox.js +51 -21
  41. package/modern/Drawer/Drawer.js +108 -36
  42. package/modern/IconButton/IconButton.js +3 -3
  43. package/modern/Menu/Menu.js +58 -19
  44. package/modern/Modal/Modal.js +9 -10
  45. package/modern/Popover/Popover.js +78 -51
  46. package/modern/Radio/Radio.js +59 -16
  47. package/modern/Select/SelectInput.js +8 -8
  48. package/modern/Snackbar/Snackbar.js +110 -32
  49. package/modern/SpeedDialAction/SpeedDialAction.js +108 -30
  50. package/modern/SwipeableDrawer/SwipeableDrawer.js +60 -13
  51. package/modern/Switch/Switch.js +2 -0
  52. package/modern/Tabs/Tabs.js +120 -52
  53. package/modern/Tabs/tabsClasses.js +1 -1
  54. package/modern/index.js +1 -1
  55. package/modern/internal/SwitchBase.js +84 -30
  56. package/modern/styles/createThemeNoVars.js +7 -2
  57. package/modern/useAutocomplete/useAutocomplete.js +0 -1
  58. package/modern/version/index.js +2 -2
  59. package/node/Button/Button.js +3 -3
  60. package/node/Checkbox/Checkbox.js +51 -21
  61. package/node/Drawer/Drawer.js +108 -36
  62. package/node/IconButton/IconButton.js +3 -3
  63. package/node/Menu/Menu.js +58 -19
  64. package/node/Modal/Modal.js +9 -10
  65. package/node/Popover/Popover.js +78 -51
  66. package/node/Radio/Radio.js +59 -16
  67. package/node/Select/SelectInput.js +8 -8
  68. package/node/Snackbar/Snackbar.js +110 -32
  69. package/node/SpeedDialAction/SpeedDialAction.js +108 -30
  70. package/node/SwipeableDrawer/SwipeableDrawer.js +60 -13
  71. package/node/Switch/Switch.js +2 -0
  72. package/node/Tabs/Tabs.js +120 -52
  73. package/node/Tabs/tabsClasses.js +1 -1
  74. package/node/index.js +1 -1
  75. package/node/internal/SwitchBase.js +84 -30
  76. package/node/styles/createThemeNoVars.js +7 -2
  77. package/node/useAutocomplete/useAutocomplete.js +0 -1
  78. package/node/version/index.js +2 -2
  79. package/package.json +5 -5
  80. package/styles/createThemeNoVars.js +7 -2
  81. package/useAutocomplete/useAutocomplete.js +0 -1
  82. package/version/index.js +2 -2
@@ -1,11 +1,80 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
- import { ClickAwayListenerProps } from '../ClickAwayListener';
3
+ import ClickAwayListener, { ClickAwayListenerProps } from '../ClickAwayListener';
4
4
  import { Theme } from '../styles';
5
5
  import { InternalStandardProps as StandardProps } from '..';
6
6
  import { SnackbarContentProps } from '../SnackbarContent';
7
7
  import { TransitionProps } from '../transitions/transition';
8
8
  import { SnackbarClasses } from './snackbarClasses';
9
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from '../utils/types';
10
+
11
+ export interface SnackbarSlots {
12
+ /**
13
+ * The component that renders the root slot.
14
+ * @default 'div'
15
+ */
16
+ root: React.ElementType;
17
+ /**
18
+ * The component that renders the content slot.
19
+ * @default SnackbarContent
20
+ */
21
+ content: React.ElementType;
22
+ /**
23
+ * The component that renders the clickAwayListener slot.
24
+ * @default ClickAwayListener
25
+ */
26
+ clickAwayListener: React.ElementType;
27
+ /**
28
+ * The component that renders the transition.
29
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
30
+ * @default Grow
31
+ */
32
+ transition: React.ElementType;
33
+ }
34
+
35
+ export interface SnackbarRootSlotPropsOverrides {}
36
+ export interface SnackbarContentSlotPropsOverrides {}
37
+ export interface SnackbarClickAwayListenerSlotPropsOverrides {}
38
+
39
+ export interface SnackbarTransitionSlotPropsOverrides {}
40
+
41
+ export type SnackbarSlotsAndSlotProps = CreateSlotsAndSlotProps<
42
+ SnackbarSlots,
43
+ {
44
+ /**
45
+ * Props forwarded to the root slot.
46
+ * By default, the avaible props are based on the div element.
47
+ */
48
+ root: SlotProps<'div', SnackbarRootSlotPropsOverrides, SnackbarOwnerState>;
49
+ /**
50
+ * Props forwarded to the content slot.
51
+ * By default, the avaible props are based on the [SnackbarContent](https://mui.com/material-ui/api/snackbar-content/#props) component.
52
+ */
53
+ content: SlotProps<
54
+ React.ElementType<SnackbarContentProps>,
55
+ SnackbarContentSlotPropsOverrides,
56
+ SnackbarOwnerState
57
+ >;
58
+ /**
59
+ * Props forwarded to the clickAwayListener slot.
60
+ * By default, the avaible props are based on the [ClickAwayListener](https://mui.com/material-ui/api/click-away-listener/#props) component.
61
+ */
62
+ clickAwayListener: SlotComponentProps<
63
+ typeof ClickAwayListener,
64
+ SnackbarClickAwayListenerSlotPropsOverrides,
65
+ SnackbarOwnerState
66
+ >;
67
+ /**
68
+ * Props applied to the transition element.
69
+ * By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component.
70
+ */
71
+ transition: SlotComponentProps<
72
+ React.ElementType,
73
+ TransitionProps & SnackbarTransitionSlotPropsOverrides,
74
+ SnackbarOwnerState
75
+ >;
76
+ }
77
+ >;
9
78
 
10
79
  export interface SnackbarOrigin {
11
80
  vertical: 'top' | 'bottom';
@@ -14,7 +83,9 @@ export interface SnackbarOrigin {
14
83
 
15
84
  export type SnackbarCloseReason = 'timeout' | 'clickaway' | 'escapeKeyDown';
16
85
 
17
- export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
86
+ export interface SnackbarProps
87
+ extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>>, 'slots' | 'slotProps'>,
88
+ SnackbarSlotsAndSlotProps {
18
89
  /**
19
90
  * The action to display. It renders after the message, at the end of the snackbar.
20
91
  */
@@ -44,10 +115,12 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
44
115
  classes?: Partial<SnackbarClasses>;
45
116
  /**
46
117
  * Props applied to the `ClickAwayListener` element.
118
+ * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
47
119
  */
48
120
  ClickAwayListenerProps?: Partial<ClickAwayListenerProps>;
49
121
  /**
50
122
  * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
123
+ * @deprecated Use `slotProps.content` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
51
124
  */
52
125
  ContentProps?: Partial<SnackbarContentProps>;
53
126
  /**
@@ -95,6 +168,7 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
95
168
  /**
96
169
  * The component used for the transition.
97
170
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
171
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
98
172
  * @default Grow
99
173
  */
100
174
  TransitionComponent?: React.JSXElementConstructor<
@@ -112,6 +186,7 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
112
186
  /**
113
187
  * Props applied to the transition element.
114
188
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
189
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
115
190
  * @default {}
116
191
  */
117
192
  TransitionProps?: TransitionProps;
@@ -128,3 +203,5 @@ export interface SnackbarProps extends StandardProps<React.HTMLAttributes<HTMLDi
128
203
  * - [Snackbar API](https://mui.com/material-ui/api/snackbar/)
129
204
  */
130
205
  export default function Snackbar(props: SnackbarProps): React.JSX.Element;
206
+
207
+ export interface SnackbarOwnerState extends Omit<SnackbarProps, 'slots' | 'slotProps'> {}
@@ -3,7 +3,6 @@
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import composeClasses from '@mui/utils/composeClasses';
6
- import useSlotProps from '@mui/utils/useSlotProps';
7
6
  import useSnackbar from "./useSnackbar.js";
8
7
  import ClickAwayListener from "../ClickAwayListener/index.js";
9
8
  import { styled, useTheme } from "../zero-styled/index.js";
@@ -13,6 +12,7 @@ import capitalize from "../utils/capitalize.js";
13
12
  import Grow from "../Grow/index.js";
14
13
  import SnackbarContent from "../SnackbarContent/index.js";
15
14
  import { getSnackbarUtilityClass } from "./snackbarClasses.js";
15
+ import useSlot from "../utils/useSlot.js";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  const useUtilityClasses = ownerState => {
18
18
  const {
@@ -120,8 +120,8 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
120
120
  autoHideDuration = null,
121
121
  children,
122
122
  className,
123
- ClickAwayListenerProps,
124
- ContentProps,
123
+ ClickAwayListenerProps: ClickAwayListenerPropsProp,
124
+ ContentProps: ContentPropsProp,
125
125
  disableWindowBlurListener = false,
126
126
  message,
127
127
  onBlur,
@@ -131,12 +131,14 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
131
131
  onMouseLeave,
132
132
  open,
133
133
  resumeHideDuration,
134
- TransitionComponent = Grow,
134
+ slots = {},
135
+ slotProps = {},
136
+ TransitionComponent: TransitionComponentProp,
135
137
  transitionDuration = defaultTransitionDuration,
136
138
  TransitionProps: {
137
139
  onEnter,
138
140
  onExited,
139
- ...TransitionProps
141
+ ...TransitionPropsProp
140
142
  } = {},
141
143
  ...other
142
144
  } = props;
@@ -148,7 +150,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
148
150
  },
149
151
  autoHideDuration,
150
152
  disableWindowBlurListener,
151
- TransitionComponent,
153
+ TransitionComponent: TransitionComponentProp,
152
154
  transitionDuration
153
155
  };
154
156
  const classes = useUtilityClasses(ownerState);
@@ -159,16 +161,6 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
159
161
  ...ownerState
160
162
  });
161
163
  const [exited, setExited] = React.useState(true);
162
- const rootProps = useSlotProps({
163
- elementType: SnackbarRoot,
164
- getSlotProps: getRootProps,
165
- externalForwardedProps: other,
166
- ownerState,
167
- additionalProps: {
168
- ref
169
- },
170
- className: [classes.root, className]
171
- });
172
164
  const handleExited = node => {
173
165
  setExited(true);
174
166
  if (onExited) {
@@ -181,28 +173,84 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
181
173
  onEnter(node, isAppearing);
182
174
  }
183
175
  };
176
+ const externalForwardedProps = {
177
+ slots: {
178
+ transition: TransitionComponentProp,
179
+ ...slots
180
+ },
181
+ slotProps: {
182
+ content: ContentPropsProp,
183
+ clickAwayListener: ClickAwayListenerPropsProp,
184
+ transition: TransitionPropsProp,
185
+ ...slotProps
186
+ }
187
+ };
188
+ const [Root, rootProps] = useSlot('root', {
189
+ ref,
190
+ className: [classes.root, className],
191
+ elementType: SnackbarRoot,
192
+ getSlotProps: getRootProps,
193
+ externalForwardedProps: {
194
+ ...externalForwardedProps,
195
+ ...other
196
+ },
197
+ ownerState
198
+ });
199
+ const [ClickAwaySlot, clickAwayListenerProps] = useSlot('clickAwayListener', {
200
+ elementType: ClickAwayListener,
201
+ externalForwardedProps,
202
+ getSlotProps: handlers => ({
203
+ onClickAway: (...params) => {
204
+ handlers.onClickAway?.(...params);
205
+ onClickAway(...params);
206
+ }
207
+ }),
208
+ ownerState
209
+ });
210
+ const [ContentSlot, contentSlotProps] = useSlot('content', {
211
+ elementType: SnackbarContent,
212
+ shouldForwardComponentProp: true,
213
+ externalForwardedProps,
214
+ additionalProps: {
215
+ message,
216
+ action
217
+ },
218
+ ownerState
219
+ });
220
+ const [TransitionSlot, transitionProps] = useSlot('transition', {
221
+ elementType: Grow,
222
+ externalForwardedProps,
223
+ getSlotProps: handlers => ({
224
+ onEnter: (...params) => {
225
+ handlers.onEnter?.(...params);
226
+ handleEnter(...params);
227
+ },
228
+ onExited: (...params) => {
229
+ handlers.onExited?.(...params);
230
+ handleExited(...params);
231
+ }
232
+ }),
233
+ additionalProps: {
234
+ appear: true,
235
+ in: open,
236
+ timeout: transitionDuration,
237
+ direction: vertical === 'top' ? 'down' : 'up'
238
+ },
239
+ ownerState
240
+ });
184
241
 
185
242
  // So we only render active snackbars.
186
243
  if (!open && exited) {
187
244
  return null;
188
245
  }
189
- return /*#__PURE__*/_jsx(ClickAwayListener, {
190
- onClickAway: onClickAway,
191
- ...ClickAwayListenerProps,
192
- children: /*#__PURE__*/_jsx(SnackbarRoot, {
246
+ return /*#__PURE__*/_jsx(ClickAwaySlot, {
247
+ ...clickAwayListenerProps,
248
+ children: /*#__PURE__*/_jsx(Root, {
193
249
  ...rootProps,
194
- children: /*#__PURE__*/_jsx(TransitionComponent, {
195
- appear: true,
196
- in: open,
197
- timeout: transitionDuration,
198
- direction: vertical === 'top' ? 'down' : 'up',
199
- onEnter: handleEnter,
200
- onExited: handleExited,
201
- ...TransitionProps,
202
- children: children || /*#__PURE__*/_jsx(SnackbarContent, {
203
- message: message,
204
- action: action,
205
- ...ContentProps
250
+ children: /*#__PURE__*/_jsx(TransitionSlot, {
251
+ ...transitionProps,
252
+ children: children || /*#__PURE__*/_jsx(ContentSlot, {
253
+ ...contentSlotProps
206
254
  })
207
255
  })
208
256
  })
@@ -249,10 +297,12 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
249
297
  className: PropTypes.string,
250
298
  /**
251
299
  * Props applied to the `ClickAwayListener` element.
300
+ * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
252
301
  */
253
302
  ClickAwayListenerProps: PropTypes.object,
254
303
  /**
255
304
  * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
305
+ * @deprecated Use `slotProps.content` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
256
306
  */
257
307
  ContentProps: PropTypes.object,
258
308
  /**
@@ -309,6 +359,32 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
309
359
  * we default to `autoHideDuration / 2` ms.
310
360
  */
311
361
  resumeHideDuration: PropTypes.number,
362
+ /**
363
+ * The props used for each slot inside.
364
+ * @default {}
365
+ */
366
+ slotProps: PropTypes.shape({
367
+ clickAwayListener: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
368
+ children: PropTypes.element.isRequired,
369
+ disableReactTree: PropTypes.bool,
370
+ mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', 'onPointerDown', 'onPointerUp', false]),
371
+ onClickAway: PropTypes.func,
372
+ touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])
373
+ })]),
374
+ content: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
375
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
376
+ transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
377
+ }),
378
+ /**
379
+ * The components used for each slot inside.
380
+ * @default {}
381
+ */
382
+ slots: PropTypes.shape({
383
+ clickAwayListener: PropTypes.elementType,
384
+ content: PropTypes.elementType,
385
+ root: PropTypes.elementType,
386
+ transition: PropTypes.elementType
387
+ }),
312
388
  /**
313
389
  * The system prop that allows defining system overrides as well as additional CSS styles.
314
390
  */
@@ -316,6 +392,7 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
316
392
  /**
317
393
  * The component used for the transition.
318
394
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
395
+ * @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
319
396
  * @default Grow
320
397
  */
321
398
  TransitionComponent: PropTypes.elementType,
@@ -335,6 +412,7 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
335
412
  /**
336
413
  * Props applied to the transition element.
337
414
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
415
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
338
416
  * @default {}
339
417
  */
340
418
  TransitionProps: PropTypes.object
@@ -5,7 +5,7 @@ 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
+ import { CreateSlotsAndSlotProps, SlotComponentProps } from '../utils/types';
9
9
 
10
10
  export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
11
11
  export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
@@ -14,17 +14,19 @@ export interface SpeedDialSlots {
14
14
  /**
15
15
  * The component that renders the transition.
16
16
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
17
- * @default {}
17
+ * @default Zoom
18
18
  */
19
- transition: React.JSXElementConstructor<
20
- TransitionProps & { children: React.ReactElement<unknown, any> }
21
- >;
19
+ transition: React.ElementType;
22
20
  }
23
21
 
24
22
  export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<
25
23
  SpeedDialSlots,
26
24
  {
27
- transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>;
25
+ /**
26
+ * Props forwarded to the transition slot.
27
+ * By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component.
28
+ */
29
+ transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>;
28
30
  }
29
31
  >;
30
32
 
@@ -5,8 +5,81 @@ import { InternalStandardProps as StandardProps } from '..';
5
5
  import { FabProps } from '../Fab';
6
6
  import { TooltipProps } from '../Tooltip';
7
7
  import { SpeedDialActionClasses } from './speedDialActionClasses';
8
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
8
9
 
9
- export interface SpeedDialActionProps extends StandardProps<Partial<TooltipProps>, 'children'> {
10
+ export interface SpeedDialActionSlots {
11
+ /**
12
+ * The component that renders the fab.
13
+ * @default Fab
14
+ */
15
+ fab?: React.ElementType;
16
+ /**
17
+ * The component that renders the tooltip.
18
+ * @default Tooltip
19
+ */
20
+ tooltip?: React.ElementType;
21
+ /**
22
+ * The component that renders the static tooltip.
23
+ * @default 'span'
24
+ */
25
+ staticTooltip?: React.ElementType;
26
+ /**
27
+ * The component that renders the static tooltip label.
28
+ * @default 'span'
29
+ */
30
+ staticTooltipLabel?: React.ElementType;
31
+ }
32
+
33
+ export interface SpeedDialActionFabSlotPropsOverrides {}
34
+ export interface SpeedDialActionTooltipSlotPropsOverrides {}
35
+ export interface SpeedDialActionStaticTooltipSlotPropsOverrides {}
36
+ export interface SpeedDialActionStaticTooltipLabelSlotPropsOverrides {}
37
+
38
+ export type SpeedDialActionSlotsAndSlotProps = CreateSlotsAndSlotProps<
39
+ SpeedDialActionSlots,
40
+ {
41
+ /**
42
+ * Props forwarded to the fab slot.
43
+ * By default, the avaible props are based on the [Fab](https://mui.com/material-ui/api/fab/#props) component.
44
+ */
45
+ fab: SlotProps<
46
+ React.ElementType<FabProps>,
47
+ SpeedDialActionFabSlotPropsOverrides,
48
+ SpeedDialActionOwnerState
49
+ >;
50
+ /**
51
+ * Props forwarded to the tooltip slot.
52
+ * By default, the avaible props are based on the [Tooltip](https://mui.com/material-ui/api/tooltip/#props) component.
53
+ */
54
+ tooltip: SlotProps<
55
+ React.ElementType<TooltipProps>,
56
+ SpeedDialActionTooltipSlotPropsOverrides,
57
+ SpeedDialActionOwnerState
58
+ >;
59
+ /**
60
+ * Props forwarded to the static tooltip slot.
61
+ * By default, the avaible props are based on a span element.
62
+ */
63
+ staticTooltip: SlotProps<
64
+ 'span',
65
+ SpeedDialActionStaticTooltipSlotPropsOverrides,
66
+ SpeedDialActionOwnerState
67
+ >;
68
+ /**
69
+ * Props forwarded to the static tooltip label slot.
70
+ * By default, the avaible props are based on a span element.
71
+ */
72
+ staticTooltipLabel: SlotProps<
73
+ 'span',
74
+ SpeedDialActionStaticTooltipLabelSlotPropsOverrides,
75
+ SpeedDialActionOwnerState
76
+ >;
77
+ }
78
+ >;
79
+
80
+ export interface SpeedDialActionProps
81
+ extends Omit<StandardProps<Partial<TooltipProps>, 'children'>, 'slotProps' | 'slots'>,
82
+ SpeedDialActionSlotsAndSlotProps {
10
83
  /**
11
84
  * Override or extend the styles applied to the component.
12
85
  */
@@ -14,6 +87,7 @@ export interface SpeedDialActionProps extends StandardProps<Partial<TooltipProps
14
87
  /**
15
88
  * Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) component.
16
89
  * @default {}
90
+ * @deprecated Use `slotProps.fab` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
17
91
  */
18
92
  FabProps?: Partial<FabProps>;
19
93
  /**
@@ -31,20 +105,24 @@ export interface SpeedDialActionProps extends StandardProps<Partial<TooltipProps
31
105
  sx?: SxProps<Theme>;
32
106
  /**
33
107
  * `classes` prop applied to the [`Tooltip`](https://mui.com/material-ui/api/tooltip/) element.
108
+ * @deprecated Use `slotProps.tooltip.classes` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
34
109
  */
35
110
  TooltipClasses?: TooltipProps['classes'];
36
111
  /**
37
112
  * Placement of the tooltip.
38
113
  * @default 'left'
114
+ * @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
39
115
  */
40
116
  tooltipPlacement?: TooltipProps['placement'];
41
117
  /**
42
118
  * Label to display in the tooltip.
119
+ * @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
43
120
  */
44
121
  tooltipTitle?: React.ReactNode;
45
122
  /**
46
123
  * Make the tooltip always visible when the SpeedDial is open.
47
124
  * @default false
125
+ * @deprecated Use `slotProps.tooltip.open` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
48
126
  */
49
127
  tooltipOpen?: boolean;
50
128
  }
@@ -61,3 +139,6 @@ export interface SpeedDialActionProps extends StandardProps<Partial<TooltipProps
61
139
  * - inherits [Tooltip API](https://mui.com/material-ui/api/tooltip/)
62
140
  */
63
141
  export default function SpeedDialAction(props: SpeedDialActionProps): React.JSX.Element;
142
+
143
+ export interface SpeedDialActionOwnerState
144
+ extends Omit<SpeedDialActionProps, 'slots' | 'slotProps'> {}