@mui/material 6.1.6 → 6.1.8

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 (51) 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 +111 -4
  10. package/Grid/Grid.js +2 -2
  11. package/Grid2/grid2Classes.js +1 -1
  12. package/Rating/Rating.d.ts +21 -4
  13. package/Rating/Rating.js +12 -0
  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/Grid/Grid.js +2 -2
  27. package/modern/Grid2/grid2Classes.js +1 -1
  28. package/modern/Rating/Rating.js +12 -0
  29. package/modern/SpeedDial/SpeedDial.js +2 -0
  30. package/modern/StepLabel/StepLabel.js +2 -0
  31. package/modern/Tooltip/Tooltip.js +84 -58
  32. package/modern/index.js +1 -1
  33. package/modern/useMediaQuery/index.js +6 -1
  34. package/modern/version/index.js +2 -2
  35. package/node/Accordion/Accordion.js +2 -0
  36. package/node/Autocomplete/Autocomplete.js +6 -1
  37. package/node/Avatar/Avatar.js +1 -0
  38. package/node/Backdrop/Backdrop.js +1 -0
  39. package/node/Grid/Grid.js +2 -2
  40. package/node/Grid2/grid2Classes.js +1 -1
  41. package/node/Rating/Rating.js +12 -0
  42. package/node/SpeedDial/SpeedDial.js +2 -0
  43. package/node/StepLabel/StepLabel.js +2 -0
  44. package/node/Tooltip/Tooltip.js +84 -58
  45. package/node/index.js +1 -1
  46. package/node/useMediaQuery/index.js +6 -6
  47. package/node/version/index.js +2 -2
  48. package/package.json +5 -5
  49. package/useMediaQuery/index.d.ts +11 -1
  50. package/useMediaQuery/index.js +6 -1
  51. 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,6 +1,113 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
- ## 6.1.6
3
+ ## v6.1.8
4
+
5
+ <!-- generated comparing v6.1.7..master -->
6
+
7
+ _Nov 20, 2024_
8
+
9
+ A big thanks to the 10 contributors who made this release possible.
10
+
11
+ TODO INSERT HIGHLIGHTS
12
+
13
+ ### `@mui/material@6.1.8`
14
+
15
+ - [Autocomplete] Use `ul` element for the listbox (#44422) @DiegoAndai
16
+ - [Grid2] Remove item and zeroMinWidth classes from grid2Classes (#44419) @sai6855
17
+ - [StepIcon] Add SvgIconOwnProps type to StepIcon props (#44337) @sai6855
18
+ - Add generic back to `useMediaQuery` to prevent a breaking change (#44455) @siriwatknp
19
+ - [Tooltip] Deprecate `*Component` and `*Props` for v6 (#44350) @siriwatknp
20
+
21
+ ### `@mui/system@6.1.8`
22
+
23
+ - Warn when calling `setMode` without configuring `colorSchemeSelector` (#43783) @siriwatknp
24
+
25
+ ### `@mui/styled-engine@6.1.8`
26
+
27
+ - Add back removed internal function (#44421) @mnajdova
28
+
29
+ ### `@mui/utils@6.1.8`
30
+
31
+ - Skip deep clone React element (#44400) @siriwatknp
32
+ - Add documentation to `useForkRef` (#44410) @JCQuintas
33
+
34
+ ### Docs
35
+
36
+ - [Accordion] Replace hardcoded classes with constants in demos (#44453) @ZeeshanTamboli
37
+ - [material-ui][Autocomplete] Fix virtualization demo (#44382) @DiegoAndai
38
+ - Revert #44388 (#44454) @prakhargupta1
39
+ - Add App starters in related-projects.md (#44315) @oliviertassinari
40
+ - Bring back `*Component` and `*Props` codemods and deprecation messages (#44383) @DiegoAndai
41
+ - [docs] Copyedit Templates page (#44461) @samuelsycamore
42
+
43
+ ### Core
44
+
45
+ - Remove `stylis-plugin-rtl-sc` (#44447) @renovate[bot]
46
+ - [test][Autocomplete] Make virtualize regression screenshots deterministic (#44425) @DiegoAndai
47
+ - [blog] Fix reference to subdomain on MUI X v8 alpha zero post (#44416) @joserodolfofreitas
48
+ - [blog] MUI X v8 alpha zero blog post (#44377) @joserodolfofreitas
49
+ - [code-infra] Use vitest-compatible skip in `describeConformance` (#44412) @JCQuintas
50
+ - Keep OpenSSF badge up-to-date (aef2bf2) @oliviertassinari
51
+ - Polish useForkRef docs (#44424) @oliviertassinari
52
+ - [infra] Upgrade Cherry-pick workflow to latest (#44448) @oliviertassinari
53
+
54
+ All contributors of this release in alphabetical order: @DiegoAndai, @JCQuintas, @joserodolfofreitas, @mnajdova, @oliviertassinari, @prakhargupta1, @sai6855, samuelsycamore, @siriwatknp, @ZeeshanTamboli
55
+
56
+ ## v6.1.7
57
+
58
+ <!-- generated comparing v6.1.6..master -->
59
+
60
+ _Nov 13, 2024_
61
+
62
+ A big thanks to the 13 contributors who made this release possible.
63
+ This release includes fixes as well as documentation improvements.
64
+
65
+ ### `@mui/material@6.1.7`
66
+
67
+ - Fix default props theme scoping (#44340) @siriwatknp
68
+ - Support theme scoping in `useMediaQuery` (#44339) @siriwatknp
69
+ - [Grid] Fix regression spacing prop with string value (#44376) @siriwatknp
70
+
71
+ ### `@mui/styled-engine-sc@6.1.7`
72
+
73
+ - Fix missing `@types/hoist-non-react-statics` causing `styled` returns any (#44397) @megos
74
+
75
+ ### Docs
76
+
77
+ - Replace 'Experimental APIs - Toolpad' with 'Toolpad (Beta)' (#44388) @prakhargupta1
78
+ - Fix Pigment CSS install (#44353) @oliviertassinari
79
+ - Fix dashboard menu warning (#44317) @siriwatknp
80
+ - Add runtime theme section for Material Pigment CSS (#44137) @siriwatknp
81
+ - Add hash to `key` to remove noise from console (#44289) @sai6855
82
+ - Revise Example Projects and Related Projects pages (#44191) @samuelsycamore
83
+ - [material-ui] Fix typo in typography theme set up for templates (#44338) @navedqb
84
+ - [material-ui] Add StackBlitz/CodeSandbox buttons to template cards (#44253) @zanivan
85
+ - [material-ui] Fix Sign-in/Sign-up templates layout (#44281) @zanivan
86
+ - [material-ui] Remove noise in template (#44260) @oliviertassinari
87
+ - [material-ui][Rating] Add uncontrolled example to Basic Rating demo (#44386) @sai6855
88
+ - [material-ui][TextField] Replace InputProps with slotProps.input in demo (#44288) @sai6855
89
+
90
+ ### Core
91
+
92
+ - [blog] Follow media asset guidelines (#44374) @oliviertassinari
93
+ - [code-infra] Changes for test util to work in `vitest` (#43625) @JCQuintas
94
+ - Remove old marked JS options (#44375) @ZeeshanTamboli
95
+ - Fix webpack capitalization (#44352) @oliviertassinari
96
+ - Fix Next.js link 404 (710cd95) @oliviertassinari
97
+ - Update Gold sponsoring backlinks (#44316) @oliviertassinari
98
+ - Fix tools-public.mui.com redirection (9196fa5) @oliviertassinari
99
+ - Remove blank AlertTitle test file (#44282) @ZeeshanTamboli
100
+ - [docs-infra] Fix ad in RTL (#44345) @oliviertassinari
101
+ - [docs-infra] Enforce punctuation on descriptions (#44292) @oliviertassinari
102
+ - [docs-infra] Add CodeSandbox and StackBlitz to vale vocab (6db477a) @oliviertassinari
103
+ - [docs-infra] Fix correct spelling of VS Code (#44277) @oliviertassinari
104
+ - [docs-infra] Add a `rawDescriptions` option (#44390) @vladmoroz
105
+ - [examples] Add missing `clsx` dependency (#43526) @Janpot
106
+ - [infra] Fix @renovate[bot] appearing in changelog (#44275) @mnajdova
107
+
108
+ All contributors of this release in alphabetical order: @Janpot, @JCQuintas, @megos, @mnajdova, @navedqb, @oliviertassinari, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @vladmoroz, @zanivan, @ZeeshanTamboli
109
+
110
+ ## v6.1.6
4
111
 
5
112
  <!-- generated comparing v6.1.5..master -->
6
113
 
@@ -52,7 +159,7 @@ A big thanks to the 13 contributors who made this release possible.
52
159
 
53
160
  All contributors of this release in alphabetical order: @aarongarciah, @blackcow1987, @DiegoAndai, @jimmycallin, @joshkel, @mnajdova, @navedqb, @nphmuller, @o-alexandrov, @oliviertassinari, @prakhargupta1, @sai6855, @siriwatknp
54
161
 
55
- ## 6.1.5
162
+ ## v6.1.5
56
163
 
57
164
  <!-- generated comparing v6.1.4..master -->
58
165
 
@@ -84,7 +191,7 @@ A big thanks to the 9 contributors who made this release possible.
84
191
  - [material-ui][TextField] Dynamically modify the eye password button aria-label (#44122) @ChinoUkaegbu
85
192
  - [icons] Run pnpm docs:mdicons:synonyms (#44098) @oliviertassinari
86
193
  - [joy-ui] Update Overview copy to match Readme (#44136) @samuelsycamore
87
- - Add CodeSandbox/Stackblitz to the rest of the templates (#43708) @siriwatknp
194
+ - Add CodeSandbox/StackBlitz to the rest of the templates (#43708) @siriwatknp
88
195
  - Update Figma link to fix 301 (a7b7d9c) @oliviertassinari
89
196
  - Link Toolpad from Core repo (#44111) @prakhargupta1
90
197
  - Remove HighlightedCode max-width (#43731) @Janpot
@@ -254,7 +361,7 @@ A big thanks to the 13 contributors who made this release possible.
254
361
  - Uniformity in version range @oliviertassinari
255
362
  - Replace `toBeAriaHidden` matcher with `toBeInaccessible` in tests (#43870) @ZeeshanTamboli
256
363
  - [docs-infra] Strengthen CSP (#43711) @oliviertassinari
257
- - [docs-infra] Open Codesandbox demo with fontsize=12 (#43860) @siriwatknp
364
+ - [docs-infra] Open CodeSandbox demo with fontsize=12 (#43860) @siriwatknp
258
365
  - [icons] Reduce Material Icon page size (#43911) @oliviertassinari
259
366
  - [test] Point Istanbul to correct URL (#43935) @sai6855
260
367
  - [test] Sync React.version parse logic with codebase (#43820) @oliviertassinari
package/Grid/Grid.js CHANGED
@@ -167,7 +167,7 @@ export function generateRowGap({
167
167
  const themeSpacing = theme.spacing(propValue);
168
168
  if (themeSpacing !== '0px') {
169
169
  return {
170
- marginTop: theme.spacing(-propValue),
170
+ marginTop: `-${themeSpacing}`,
171
171
  [`& > .${gridClasses.item}`]: {
172
172
  paddingTop: themeSpacing
173
173
  }
@@ -212,7 +212,7 @@ export function generateColumnGap({
212
212
  }, columnSpacingValues, (propValue, breakpoint) => {
213
213
  const themeSpacing = theme.spacing(propValue);
214
214
  if (themeSpacing !== '0px') {
215
- const negativeValue = theme.spacing(-propValue);
215
+ const negativeValue = `-${themeSpacing}`;
216
216
  return {
217
217
  width: `calc(100% + ${themeSpacing})`,
218
218
  marginLeft: negativeValue,
@@ -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
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
- import { InternalStandardProps as StandardProps, Theme } from '..';
4
+ import { Theme } from '..';
5
5
  import { RatingClasses } from './ratingClasses';
6
+ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
6
7
 
7
8
  export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement> {
8
9
  value: number;
@@ -10,8 +11,7 @@ export interface IconContainerProps extends React.HTMLAttributes<HTMLSpanElement
10
11
 
11
12
  export interface RatingPropsSizeOverrides {}
12
13
 
13
- export interface RatingProps
14
- extends StandardProps<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'onChange'> {
14
+ export interface RatingOwnProps {
15
15
  /**
16
16
  * Override or extend the styles applied to the component.
17
17
  */
@@ -114,6 +114,14 @@ export interface RatingProps
114
114
  value?: number | null;
115
115
  }
116
116
 
117
+ export type RatingTypeMap<
118
+ AdditionalProps = {},
119
+ RootComponent extends React.ElementType = 'span',
120
+ > = {
121
+ props: AdditionalProps & RatingOwnProps;
122
+ defaultComponent: RootComponent;
123
+ };
124
+
117
125
  /**
118
126
  *
119
127
  * Demos:
@@ -124,4 +132,13 @@ export interface RatingProps
124
132
  *
125
133
  * - [Rating API](https://mui.com/material-ui/api/rating/)
126
134
  */
127
- export default function Rating(props: RatingProps): React.JSX.Element;
135
+ declare const Rating: OverridableComponent<RatingTypeMap>;
136
+
137
+ export type RatingProps<
138
+ RootComponent extends React.ElementType = RatingTypeMap['defaultComponent'],
139
+ AdditionalProps = {},
140
+ > = OverrideProps<RatingTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
141
+ component?: React.ElementType;
142
+ };
143
+
144
+ export default Rating;
package/Rating/Rating.js CHANGED
@@ -317,6 +317,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
317
317
  props: inProps
318
318
  });
319
319
  const {
320
+ component = 'span',
320
321
  className,
321
322
  defaultValue = null,
322
323
  disabled = false,
@@ -457,6 +458,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
457
458
  const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
458
459
  const ownerState = {
459
460
  ...props,
461
+ component,
460
462
  defaultValue,
461
463
  disabled,
462
464
  emptyIcon,
@@ -473,6 +475,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
473
475
  };
474
476
  const classes = useUtilityClasses(ownerState);
475
477
  return /*#__PURE__*/_jsxs(RatingRoot, {
478
+ as: component,
476
479
  ref: handleRef,
477
480
  onMouseMove: handleMouseMove,
478
481
  onMouseLeave: handleMouseLeave,
@@ -558,6 +561,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
558
561
  // │ These PropTypes are generated from the TypeScript type definitions. │
559
562
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
560
563
  // └─────────────────────────────────────────────────────────────────────┘
564
+ /**
565
+ * @ignore
566
+ */
567
+ children: PropTypes.node,
561
568
  /**
562
569
  * Override or extend the styles applied to the component.
563
570
  */
@@ -566,6 +573,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
566
573
  * @ignore
567
574
  */
568
575
  className: PropTypes.string,
576
+ /**
577
+ * The component used for the root node.
578
+ * Either a string to use a HTML element or a component.
579
+ */
580
+ component: PropTypes.elementType,
569
581
  /**
570
582
  * The default value. Use when the component is not controlled.
571
583
  * @default null
@@ -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
  /**