@mui/material 6.1.7 → 6.1.9

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 (46) hide show
  1. package/Accordion/Accordion.d.ts +2 -0
  2. package/Accordion/Accordion.js +2 -0
  3. package/Autocomplete/Autocomplete.d.ts +5 -0
  4. package/Autocomplete/Autocomplete.js +6 -1
  5. package/Avatar/Avatar.d.ts +1 -0
  6. package/Avatar/Avatar.js +1 -0
  7. package/Backdrop/Backdrop.d.ts +1 -0
  8. package/Backdrop/Backdrop.js +1 -0
  9. package/CHANGELOG.md +99 -0
  10. package/Grid2/Grid2.d.ts +0 -1
  11. package/Grid2/grid2Classes.d.ts +8 -3
  12. package/Grid2/grid2Classes.js +1 -1
  13. package/Select/Select.d.ts +10 -4
  14. package/SpeedDial/SpeedDial.d.ts +2 -0
  15. package/SpeedDial/SpeedDial.js +2 -0
  16. package/StepIcon/StepIcon.d.ts +5 -2
  17. package/StepLabel/StepLabel.d.ts +2 -0
  18. package/StepLabel/StepLabel.js +2 -0
  19. package/Tooltip/Tooltip.d.ts +69 -36
  20. package/Tooltip/Tooltip.js +84 -58
  21. package/index.js +1 -1
  22. package/modern/Accordion/Accordion.js +2 -0
  23. package/modern/Autocomplete/Autocomplete.js +6 -1
  24. package/modern/Avatar/Avatar.js +1 -0
  25. package/modern/Backdrop/Backdrop.js +1 -0
  26. package/modern/Grid2/grid2Classes.js +1 -1
  27. package/modern/SpeedDial/SpeedDial.js +2 -0
  28. package/modern/StepLabel/StepLabel.js +2 -0
  29. package/modern/Tooltip/Tooltip.js +84 -58
  30. package/modern/index.js +1 -1
  31. package/modern/version/index.js +2 -2
  32. package/node/Accordion/Accordion.js +2 -0
  33. package/node/Autocomplete/Autocomplete.js +6 -1
  34. package/node/Avatar/Avatar.js +1 -0
  35. package/node/Backdrop/Backdrop.js +1 -0
  36. package/node/Grid2/grid2Classes.js +1 -1
  37. package/node/SpeedDial/SpeedDial.js +2 -0
  38. package/node/StepLabel/StepLabel.js +2 -0
  39. package/node/Tooltip/Tooltip.js +84 -58
  40. package/node/index.js +1 -1
  41. package/node/version/index.js +2 -2
  42. package/package.json +5 -5
  43. package/styles/ThemeProvider.d.ts +1 -0
  44. package/styles/overrides.d.ts +2 -2
  45. package/useMediaQuery/index.d.ts +3 -2
  46. package/version/index.js +2 -2
@@ -90,6 +90,7 @@ export type AccordionTypeMap<
90
90
  /**
91
91
  * The component used for the transition.
92
92
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
93
+ * @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.
93
94
  */
94
95
  TransitionComponent?: React.JSXElementConstructor<
95
96
  TransitionProps & { children?: React.ReactElement<unknown, any> }
@@ -97,6 +98,7 @@ export type AccordionTypeMap<
97
98
  /**
98
99
  * Props applied to the transition element.
99
100
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
101
+ * @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.
100
102
  */
101
103
  TransitionProps?: TransitionProps;
102
104
  } & AccordionSlotsAndSlotProps;
@@ -303,11 +303,13 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
303
303
  /**
304
304
  * The component used for the transition.
305
305
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
306
+ * @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.
306
307
  */
307
308
  TransitionComponent: PropTypes.elementType,
308
309
  /**
309
310
  * Props applied to the transition element.
310
311
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
312
+ * @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.
311
313
  */
312
314
  TransitionProps: PropTypes.object
313
315
  } : void 0;
@@ -167,6 +167,7 @@ export interface AutocompleteProps<
167
167
  AutocompleteSlotsAndSlotProps<Value, Multiple, DisableClearable, FreeSolo, ChipComponent> {
168
168
  /**
169
169
  * Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
170
+ * @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
170
171
  */
171
172
  ChipProps?: ChipProps<ChipComponent>;
172
173
  /**
@@ -233,10 +234,12 @@ export interface AutocompleteProps<
233
234
  /**
234
235
  * The component used to render the listbox.
235
236
  * @default 'ul'
237
+ * @deprecated Use `slotProps.listbox.component` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
236
238
  */
237
239
  ListboxComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
238
240
  /**
239
241
  * Props applied to the Listbox element.
242
+ * @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
240
243
  */
241
244
  ListboxProps?: ReturnType<ReturnType<typeof useAutocomplete>['getListboxProps']> & {
242
245
  sx?: SxProps<Theme>;
@@ -281,11 +284,13 @@ export interface AutocompleteProps<
281
284
  /**
282
285
  * The component used to render the body of the popup.
283
286
  * @default Paper
287
+ * @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
284
288
  */
285
289
  PaperComponent?: React.JSXElementConstructor<React.HTMLAttributes<HTMLElement>>;
286
290
  /**
287
291
  * The component used to position the popup.
288
292
  * @default Popper
293
+ * @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
289
294
  */
290
295
  PopperComponent?: React.JSXElementConstructor<PopperProps>;
291
296
  /**
@@ -323,7 +323,7 @@ const AutocompleteNoOptions = styled('div', {
323
323
  color: (theme.vars || theme).palette.text.secondary,
324
324
  padding: '14px 16px'
325
325
  })));
326
- const AutocompleteListbox = styled('div', {
326
+ const AutocompleteListbox = styled('ul', {
327
327
  name: 'MuiAutocomplete',
328
328
  slot: 'Listbox',
329
329
  overridesResolver: (props, styles) => styles.listbox
@@ -792,6 +792,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
792
792
  blurOnSelect: PropTypes.oneOfType([PropTypes.oneOf(['mouse', 'touch']), PropTypes.bool]),
793
793
  /**
794
794
  * Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
795
+ * @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
795
796
  */
796
797
  ChipProps: PropTypes.object,
797
798
  /**
@@ -994,10 +995,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
994
995
  /**
995
996
  * The component used to render the listbox.
996
997
  * @default 'ul'
998
+ * @deprecated Use `slotProps.listbox.component` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
997
999
  */
998
1000
  ListboxComponent: PropTypes.elementType,
999
1001
  /**
1000
1002
  * Props applied to the Listbox element.
1003
+ * @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1001
1004
  */
1002
1005
  ListboxProps: PropTypes.object,
1003
1006
  /**
@@ -1092,11 +1095,13 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
1092
1095
  /**
1093
1096
  * The component used to render the body of the popup.
1094
1097
  * @default Paper
1098
+ * @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1095
1099
  */
1096
1100
  PaperComponent: PropTypes.elementType,
1097
1101
  /**
1098
1102
  * The component used to position the popup.
1099
1103
  * @default Popper
1104
+ * @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1100
1105
  */
1101
1106
  PopperComponent: PropTypes.elementType,
1102
1107
  /**
@@ -46,6 +46,7 @@ export interface AvatarOwnProps {
46
46
  /**
47
47
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
48
48
  * It can be used to listen for the loading error event.
49
+ * @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
49
50
  */
50
51
  imgProps?: React.ImgHTMLAttributes<HTMLImageElement> & {
51
52
  sx?: SxProps<Theme>;
package/Avatar/Avatar.js CHANGED
@@ -255,6 +255,7 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
255
255
  /**
256
256
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
257
257
  * It can be used to listen for the loading error event.
258
+ * @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
258
259
  */
259
260
  imgProps: PropTypes.object,
260
261
  /**
@@ -97,6 +97,7 @@ export interface BackdropOwnProps
97
97
  * The component used for the transition.
98
98
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
99
99
  * @default Fade
100
+ * @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.
100
101
  */
101
102
  TransitionComponent?: React.JSXElementConstructor<
102
103
  TransitionProps & {
@@ -197,6 +197,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
197
197
  * The component used for the transition.
198
198
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
199
199
  * @default Fade
200
+ * @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.
200
201
  */
201
202
  TransitionComponent: PropTypes.elementType,
202
203
  /**
package/CHANGELOG.md CHANGED
@@ -1,5 +1,104 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.1.9
4
+
5
+ <!-- generated comparing v6.1.8..master -->
6
+
7
+ _Nov 27, 2024_
8
+
9
+ A big thanks to the 8 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.1.9`
12
+
13
+ - [Select] Omit `placeholder` from props (#44502) @Juneezee
14
+ - [Grid2] Add container class to `Grid2Classes` (#44562) @sai6855
15
+
16
+ ### `@mui/system@6.1.9`
17
+
18
+ - Add ThemeProvider `noSsr` to prevent double rendering (#44451) @siriwatknp
19
+
20
+ ### `@mui/codemod@6.1.9`
21
+
22
+ - [codemod] Fix handling of computed `paragraph` props (#44195) @joshkel
23
+
24
+ ### `@mui/material-pigment-css@6.1.9`
25
+
26
+ - Make @pigment-css/react as peer dependency (#44498) @brijeshb42
27
+
28
+ ### Docs
29
+
30
+ - [material-ui] Add missing required dependencies in dashboard template README (#44476) @mesqueeb
31
+ - [material-ui] Add missing Roboto import to Next.js integration docs (#44462) @StaceyD22
32
+ - [material-ui][Dialog] Fix padding in SimpleDialog demo (#44467) @oliviertassinari
33
+ - Fix template page issues (#44466) @oliviertassinari
34
+ - [examples] Add dark mode example for Material UI + Pigment CSS (#44480) @mnajdova
35
+
36
+ ### Core
37
+
38
+ - Remove TODO line in the changelog (#44484) @mnajdova
39
+ - Polish image display (418e888) @oliviertassinari
40
+ - [core-infra] Add no-relative-packages (#44489) @oliviertassinari
41
+ - [docs-infra] Support CSS variables API info (#44559) @mnajdova
42
+ - [docs-infra] Fix display when ad-block triggers (#44567) @oliviertassinari
43
+ - [docs-infra] Improve locator finding using visible option (#44541) @siriwatknp
44
+ - [docs-infra] Correctly flatten the pages tree (#44514) @oliviertassinari
45
+ - [docs-infra] Fix Sponsor design regression (#44515) @oliviertassinari
46
+ - [test] Remove React.ReactElement<any> from describeConformance.tsx (#44318) @sai6855
47
+ - [test] Do not enforce the presence of `ownerState.className` in `describeConformance` (#44479) @flaviendelangle
48
+
49
+ All contributors of this release in alphabetical order: @brijeshb42, @flaviendelangle, @joshkel, @Juneezee, @mesqueeb, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @StaceyD22
50
+
51
+ ## v6.1.8
52
+
53
+ <!-- generated comparing v6.1.7..master -->
54
+
55
+ _Nov 20, 2024_
56
+
57
+ A big thanks to the 10 contributors who made this release possible.
58
+
59
+ ### `@mui/material@6.1.8`
60
+
61
+ - [Autocomplete] Use `ul` element for the listbox (#44422) @DiegoAndai
62
+ - [Grid2] Remove item and zeroMinWidth classes from grid2Classes (#44419) @sai6855
63
+ - [StepIcon] Add SvgIconOwnProps type to StepIcon props (#44337) @sai6855
64
+ - Add generic back to `useMediaQuery` to prevent a breaking change (#44455) @siriwatknp
65
+ - [Tooltip] Deprecate `*Component` and `*Props` for v6 (#44350) @siriwatknp
66
+
67
+ ### `@mui/system@6.1.8`
68
+
69
+ - Warn when calling `setMode` without configuring `colorSchemeSelector` (#43783) @siriwatknp
70
+
71
+ ### `@mui/styled-engine@6.1.8`
72
+
73
+ - Add back removed internal function (#44421) @mnajdova
74
+
75
+ ### `@mui/utils@6.1.8`
76
+
77
+ - Skip deep clone React element (#44400) @siriwatknp
78
+ - Add documentation to `useForkRef` (#44410) @JCQuintas
79
+
80
+ ### Docs
81
+
82
+ - [Accordion] Replace hardcoded classes with constants in demos (#44453) @ZeeshanTamboli
83
+ - [material-ui][Autocomplete] Fix virtualization demo (#44382) @DiegoAndai
84
+ - Revert #44388 (#44454) @prakhargupta1
85
+ - Add App starters in related-projects.md (#44315) @oliviertassinari
86
+ - Bring back `*Component` and `*Props` codemods and deprecation messages (#44383) @DiegoAndai
87
+ - [docs] Copyedit Templates page (#44461) @samuelsycamore
88
+
89
+ ### Core
90
+
91
+ - Remove `stylis-plugin-rtl-sc` (#44447) @renovate[bot]
92
+ - [test][Autocomplete] Make virtualize regression screenshots deterministic (#44425) @DiegoAndai
93
+ - [blog] Fix reference to subdomain on MUI X v8 alpha zero post (#44416) @joserodolfofreitas
94
+ - [blog] MUI X v8 alpha zero blog post (#44377) @joserodolfofreitas
95
+ - [code-infra] Use vitest-compatible skip in `describeConformance` (#44412) @JCQuintas
96
+ - Keep OpenSSF badge up-to-date (aef2bf2) @oliviertassinari
97
+ - Polish useForkRef docs (#44424) @oliviertassinari
98
+ - [infra] Upgrade Cherry-pick workflow to latest (#44448) @oliviertassinari
99
+
100
+ All contributors of this release in alphabetical order: @DiegoAndai, @JCQuintas, @joserodolfofreitas, @mnajdova, @oliviertassinari, @prakhargupta1, @sai6855, samuelsycamore, @siriwatknp, @ZeeshanTamboli
101
+
3
102
  ## v6.1.7
4
103
 
5
104
  <!-- generated comparing v6.1.6..master -->
package/Grid2/Grid2.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { SxProps, SystemProps } from '@mui/system';
2
2
  import { OverridableComponent, OverrideProps } from '@mui/types';
3
3
  import { Theme, Breakpoint } from '../styles';
4
- export type Grid2Slot = 'root';
5
4
  type ResponsiveStyleValue<T> = T | Array<T | null> | {
6
5
  [key in Breakpoint]?: T | null;
7
6
  };
@@ -1,5 +1,10 @@
1
- import { GridClasses } from '@mui/system/Grid';
2
- export type Grid2ClassKey = keyof GridClasses;
1
+ export interface Grid2Classes {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `container={true}`. */
5
+ container: string;
6
+ }
7
+ export type Grid2ClassKey = keyof Grid2Classes;
3
8
  export declare function getGrid2UtilityClass(slot: string): string;
4
- declare const grid2Classes: GridClasses;
9
+ declare const grid2Classes: Grid2Classes;
5
10
  export default grid2Classes;
@@ -7,7 +7,7 @@ const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
7
7
  const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
8
8
  const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
9
9
  const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
10
- const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth',
10
+ const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container',
11
11
  // spacings
12
12
  ...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
13
13
  // direction values
@@ -11,7 +11,7 @@ import { FilledInputProps } from '../FilledInput';
11
11
  export { SelectChangeEvent };
12
12
 
13
13
  export interface BaseSelectProps<Value = unknown>
14
- extends StandardProps<InputProps, 'value' | 'onChange'> {
14
+ extends StandardProps<InputProps, 'value' | 'onChange' | 'placeholder'> {
15
15
  /**
16
16
  * If `true`, the width of the popover will automatically be set according to the items inside the
17
17
  * menu, otherwise it will be at least the width of the select input.
@@ -152,7 +152,10 @@ export interface BaseSelectProps<Value = unknown>
152
152
  }
153
153
 
154
154
  export interface FilledSelectProps
155
- extends Omit<FilledInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
155
+ extends Omit<
156
+ FilledInputProps,
157
+ 'value' | 'onChange' | 'id' | 'classes' | 'inputProps' | 'placeholder'
158
+ > {
156
159
  /**
157
160
  * The variant to use.
158
161
  * @default 'outlined'
@@ -161,7 +164,7 @@ export interface FilledSelectProps
161
164
  }
162
165
 
163
166
  export interface StandardSelectProps
164
- extends Omit<InputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
167
+ extends Omit<InputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps' | 'placeholder'> {
165
168
  /**
166
169
  * The variant to use.
167
170
  * @default 'outlined'
@@ -170,7 +173,10 @@ export interface StandardSelectProps
170
173
  }
171
174
 
172
175
  export interface OutlinedSelectProps
173
- extends Omit<OutlinedInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
176
+ extends Omit<
177
+ OutlinedInputProps,
178
+ 'value' | 'onChange' | 'id' | 'classes' | 'inputProps' | 'placeholder'
179
+ > {
174
180
  /**
175
181
  * The variant to use.
176
182
  * @default 'outlined'
@@ -97,6 +97,7 @@ export interface SpeedDialProps
97
97
  * The component used for the transition.
98
98
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
99
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/)
100
101
  */
101
102
  TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
102
103
  /**
@@ -111,6 +112,7 @@ export interface SpeedDialProps
111
112
  /**
112
113
  * Props applied to the transition element.
113
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/)
114
116
  */
115
117
  TransitionProps?: TransitionProps;
116
118
  }
@@ -524,6 +524,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
524
524
  * The component used for the transition.
525
525
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
526
526
  * @default Zoom
527
+ * * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
527
528
  */
528
529
  TransitionComponent: PropTypes.elementType,
529
530
  /**
@@ -542,6 +543,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
542
543
  /**
543
544
  * Props applied to the transition element.
544
545
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
546
+ * @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
545
547
  */
546
548
  TransitionProps: PropTypes.object
547
549
  } : void 0;
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
- import { InternalStandardProps as StandardProps } from '..';
3
+ import { InternalStandardProps as StandardProps, SvgIconOwnProps } from '..';
4
4
  import { Theme } from '../styles';
5
5
  import { StepIconClasses } from './stepIconClasses';
6
6
 
7
7
  export interface StepIconProps
8
- extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'> {
8
+ // TODO v7: extend React.HTMLAttributes<SVGSVGElement> as svg is root component of StepIcon not div
9
+ extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'color' | 'children'>,
10
+ Omit<SvgIconOwnProps, 'children'> {
9
11
  /**
10
12
  * Whether this step is active.
11
13
  * @default false
@@ -46,5 +48,6 @@ export type StepIconClasskey = keyof NonNullable<StepIconProps['classes']>;
46
48
  * API:
47
49
  *
48
50
  * - [StepIcon API](https://mui.com/material-ui/api/step-icon/)
51
+ * - inherits [SvgIcon API](https://mui.com/material-ui/api/svg-icon/)
49
52
  */
50
53
  export default function StepIcon(props: StepIconProps): React.JSX.Element;
@@ -66,10 +66,12 @@ export interface StepLabelProps
66
66
  optional?: React.ReactNode;
67
67
  /**
68
68
  * The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
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.
69
70
  */
70
71
  StepIconComponent?: React.ElementType<StepIconProps>;
71
72
  /**
72
73
  * Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
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.
73
75
  */
74
76
  StepIconProps?: Partial<StepIconProps>;
75
77
  /**
@@ -254,10 +254,12 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
254
254
  }),
255
255
  /**
256
256
  * The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
257
+ * @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.
257
258
  */
258
259
  StepIconComponent: PropTypes.elementType,
259
260
  /**
260
261
  * Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
262
+ * @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.
261
263
  */
262
264
  StepIconProps: PropTypes.object,
263
265
  /**
@@ -2,12 +2,71 @@ import * as React from 'react';
2
2
  import { MUIStyledCommonProps, SxProps } from '@mui/system';
3
3
  import { PopperProps } from '@mui/material/Popper';
4
4
  import { InternalStandardProps as StandardProps, Theme } from '..';
5
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
5
6
  import { TransitionProps } from '../transitions/transition';
6
7
  import { TooltipClasses } from './tooltipClasses';
7
8
 
8
9
  export interface TooltipComponentsPropsOverrides {}
9
10
 
10
- export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'> {
11
+ export interface TooltipPopperSlotPropsOverrides {}
12
+
13
+ export interface TooltipTransitionSlotPropsOverrides {}
14
+
15
+ export interface TooltipTooltipSlotPropsOverrides {}
16
+
17
+ export interface TooltipArrowSlotPropsOverrides {}
18
+
19
+ export interface TooltipSlots {
20
+ /**
21
+ * The component used for the popper.
22
+ * @default Popper
23
+ */
24
+ popper: React.ElementType<PopperProps>;
25
+ /**
26
+ * The component used for the transition.
27
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
28
+ * @default Grow
29
+ */
30
+ transition: React.ElementType;
31
+ /**
32
+ * The component used for the tooltip.
33
+ */
34
+ tooltip: React.ElementType;
35
+ /**
36
+ * The component used for the arrow.
37
+ */
38
+ arrow: React.ElementType;
39
+ }
40
+
41
+ export type TooltipSlotsAndSlotProps = CreateSlotsAndSlotProps<
42
+ TooltipSlots,
43
+ {
44
+ popper: SlotProps<
45
+ React.ElementType<PopperProps>,
46
+ TooltipPopperSlotPropsOverrides,
47
+ TooltipOwnerState
48
+ >;
49
+ transition: SlotProps<
50
+ React.ElementType<TransitionProps>,
51
+ TooltipTransitionSlotPropsOverrides,
52
+ TooltipOwnerState
53
+ >;
54
+ tooltip: SlotProps<
55
+ React.ElementType<React.HTMLProps<HTMLDivElement>>,
56
+ TooltipTooltipSlotPropsOverrides,
57
+ TooltipOwnerState
58
+ >;
59
+ arrow: SlotProps<
60
+ React.ElementType<React.HTMLProps<HTMLSpanElement>>,
61
+ TooltipArrowSlotPropsOverrides,
62
+ TooltipOwnerState
63
+ >;
64
+ }
65
+ >;
66
+
67
+ export interface TooltipProps
68
+ extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'>,
69
+ TooltipSlotsAndSlotProps {
11
70
  /**
12
71
  * If `true`, adds an arrow to the tooltip.
13
72
  * @default false
@@ -24,7 +83,7 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
24
83
  /**
25
84
  * The components used for each slot inside.
26
85
  *
27
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).
86
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
28
87
  *
29
88
  * @default {}
30
89
  */
@@ -38,7 +97,7 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
38
97
  * The extra props for the slot components.
39
98
  * You can override the existing props or add new ones.
40
99
  *
41
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).
100
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
42
101
  *
43
102
  * @default {}
44
103
  */
@@ -151,45 +210,15 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
151
210
  | 'top';
152
211
  /**
153
212
  * The component used for the popper.
154
- * @default Popper
213
+ * @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
155
214
  */
156
215
  PopperComponent?: React.JSXElementConstructor<PopperProps>;
157
216
  /**
158
217
  * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.
218
+ * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
159
219
  * @default {}
160
220
  */
161
221
  PopperProps?: Partial<PopperProps>;
162
- /**
163
- * The extra props for the slot components.
164
- * You can override the existing props or add new ones.
165
- *
166
- * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
167
- *
168
- * @default {}
169
- */
170
- slotProps?: {
171
- popper?: Partial<PopperProps> & TooltipComponentsPropsOverrides;
172
- transition?: TransitionProps & TooltipComponentsPropsOverrides;
173
- tooltip?: React.HTMLProps<HTMLDivElement> &
174
- MUIStyledCommonProps<Theme> &
175
- TooltipComponentsPropsOverrides;
176
- arrow?: React.HTMLProps<HTMLSpanElement> &
177
- MUIStyledCommonProps<Theme> &
178
- TooltipComponentsPropsOverrides;
179
- };
180
- /**
181
- * The components used for each slot inside.
182
- *
183
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
184
- *
185
- * @default {}
186
- */
187
- slots?: {
188
- popper?: React.ElementType<PopperProps>;
189
- transition?: React.ElementType;
190
- tooltip?: React.ElementType;
191
- arrow?: React.ElementType;
192
- };
193
222
  /**
194
223
  * The system prop that allows defining system overrides as well as additional CSS styles.
195
224
  */
@@ -201,7 +230,7 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
201
230
  /**
202
231
  * The component used for the transition.
203
232
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
204
- * @default Grow
233
+ * @deprecated use the `slots.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
205
234
  */
206
235
  TransitionComponent?: React.JSXElementConstructor<
207
236
  TransitionProps & { children: React.ReactElement<unknown, any> }
@@ -209,10 +238,14 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
209
238
  /**
210
239
  * Props applied to the transition element.
211
240
  * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
241
+ * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
242
+ * @default {}
212
243
  */
213
244
  TransitionProps?: TransitionProps;
214
245
  }
215
246
 
247
+ export interface TooltipOwnerState extends TooltipProps {}
248
+
216
249
  /**
217
250
  *
218
251
  * Demos: