@mui/material 7.0.0-alpha.1 → 7.0.0-alpha.2

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 (105) hide show
  1. package/Accordion/Accordion.d.ts +12 -6
  2. package/Backdrop/Backdrop.d.ts +12 -6
  3. package/Button/Button.js +3 -3
  4. package/CHANGELOG.md +31 -0
  5. package/Dialog/Dialog.d.ts +2 -2
  6. package/IconButton/IconButton.js +3 -3
  7. package/InputBase/inputBaseClasses.d.ts +15 -6
  8. package/InputLabel/InputLabel.d.ts +2 -2
  9. package/InputLabel/InputLabel.js +3 -3
  10. package/Popover/Popover.d.ts +1 -1
  11. package/Snackbar/Snackbar.d.ts +2 -2
  12. package/SpeedDial/SpeedDial.d.ts +8 -6
  13. package/StepContent/StepContent.d.ts +2 -2
  14. package/Tooltip/Tooltip.d.ts +19 -3
  15. package/esm/Accordion/Accordion.d.ts +12 -6
  16. package/esm/Backdrop/Backdrop.d.ts +12 -6
  17. package/esm/Button/Button.js +3 -3
  18. package/esm/Dialog/Dialog.d.ts +2 -2
  19. package/esm/IconButton/IconButton.js +3 -3
  20. package/esm/InputBase/inputBaseClasses.d.ts +15 -6
  21. package/esm/InputLabel/InputLabel.d.ts +2 -2
  22. package/esm/InputLabel/InputLabel.js +3 -3
  23. package/esm/Popover/Popover.d.ts +1 -1
  24. package/esm/Snackbar/Snackbar.d.ts +2 -2
  25. package/esm/SpeedDial/SpeedDial.d.ts +8 -6
  26. package/esm/StepContent/StepContent.d.ts +2 -2
  27. package/esm/Tooltip/Tooltip.d.ts +19 -3
  28. package/esm/index.d.ts +0 -2
  29. package/esm/index.js +1 -3
  30. package/esm/useAutocomplete/useAutocomplete.js +0 -1
  31. package/esm/utils/mergeSlotProps.d.ts +1 -1
  32. package/esm/version/index.js +2 -2
  33. package/index.d.ts +0 -2
  34. package/index.js +1 -20
  35. package/modern/Accordion/Accordion.d.ts +12 -6
  36. package/modern/Backdrop/Backdrop.d.ts +12 -6
  37. package/modern/Button/Button.js +3 -3
  38. package/modern/Dialog/Dialog.d.ts +2 -2
  39. package/modern/IconButton/IconButton.js +3 -3
  40. package/modern/InputBase/inputBaseClasses.d.ts +15 -6
  41. package/modern/InputLabel/InputLabel.d.ts +2 -2
  42. package/modern/InputLabel/InputLabel.js +3 -3
  43. package/modern/Popover/Popover.d.ts +1 -1
  44. package/modern/Snackbar/Snackbar.d.ts +2 -2
  45. package/modern/SpeedDial/SpeedDial.d.ts +8 -6
  46. package/modern/StepContent/StepContent.d.ts +2 -2
  47. package/modern/Tooltip/Tooltip.d.ts +19 -3
  48. package/modern/index.d.ts +0 -2
  49. package/modern/index.js +1 -3
  50. package/modern/useAutocomplete/useAutocomplete.js +0 -1
  51. package/modern/utils/mergeSlotProps.d.ts +1 -1
  52. package/modern/version/index.js +2 -2
  53. package/package.json +9 -7
  54. package/tsconfig.build.tsbuildinfo +1 -1
  55. package/useAutocomplete/useAutocomplete.js +0 -1
  56. package/utils/mergeSlotProps.d.ts +1 -1
  57. package/version/index.js +2 -2
  58. package/Hidden/Hidden.d.ts +0 -96
  59. package/Hidden/Hidden.js +0 -145
  60. package/Hidden/HiddenCss.d.ts +0 -17
  61. package/Hidden/HiddenCss.js +0 -189
  62. package/Hidden/HiddenJs.d.ts +0 -18
  63. package/Hidden/HiddenJs.js +0 -127
  64. package/Hidden/hiddenCssClasses.d.ts +0 -3
  65. package/Hidden/hiddenCssClasses.js +0 -15
  66. package/Hidden/index.d.ts +0 -2
  67. package/Hidden/index.js +0 -13
  68. package/Hidden/withWidth.d.ts +0 -17
  69. package/Hidden/withWidth.js +0 -118
  70. package/PigmentHidden/PigmentHidden.d.ts +0 -100
  71. package/PigmentHidden/PigmentHidden.js +0 -287
  72. package/PigmentHidden/index.d.ts +0 -2
  73. package/PigmentHidden/index.js +0 -25
  74. package/esm/Hidden/Hidden.d.ts +0 -96
  75. package/esm/Hidden/Hidden.js +0 -140
  76. package/esm/Hidden/HiddenCss.d.ts +0 -17
  77. package/esm/Hidden/HiddenCss.js +0 -182
  78. package/esm/Hidden/HiddenJs.d.ts +0 -18
  79. package/esm/Hidden/HiddenJs.js +0 -121
  80. package/esm/Hidden/hiddenCssClasses.d.ts +0 -3
  81. package/esm/Hidden/hiddenCssClasses.js +0 -7
  82. package/esm/Hidden/index.d.ts +0 -2
  83. package/esm/Hidden/index.js +0 -1
  84. package/esm/Hidden/withWidth.d.ts +0 -17
  85. package/esm/Hidden/withWidth.js +0 -109
  86. package/esm/PigmentHidden/PigmentHidden.d.ts +0 -100
  87. package/esm/PigmentHidden/PigmentHidden.js +0 -279
  88. package/esm/PigmentHidden/index.d.ts +0 -2
  89. package/esm/PigmentHidden/index.js +0 -2
  90. package/modern/Hidden/Hidden.d.ts +0 -96
  91. package/modern/Hidden/Hidden.js +0 -140
  92. package/modern/Hidden/HiddenCss.d.ts +0 -17
  93. package/modern/Hidden/HiddenCss.js +0 -182
  94. package/modern/Hidden/HiddenJs.d.ts +0 -18
  95. package/modern/Hidden/HiddenJs.js +0 -121
  96. package/modern/Hidden/hiddenCssClasses.d.ts +0 -3
  97. package/modern/Hidden/hiddenCssClasses.js +0 -7
  98. package/modern/Hidden/index.d.ts +0 -2
  99. package/modern/Hidden/index.js +0 -1
  100. package/modern/Hidden/withWidth.d.ts +0 -17
  101. package/modern/Hidden/withWidth.js +0 -109
  102. package/modern/PigmentHidden/PigmentHidden.d.ts +0 -100
  103. package/modern/PigmentHidden/PigmentHidden.js +0 -279
  104. package/modern/PigmentHidden/index.d.ts +0 -2
  105. package/modern/PigmentHidden/index.js +0 -2
@@ -5,7 +5,7 @@ import { TransitionProps } from "../transitions/transition.js";
5
5
  import { AccordionClasses } from "./accordionClasses.js";
6
6
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
7
7
  import { ExtendPaperTypeMap } from "../Paper/Paper.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
9
9
  export interface AccordionSlots {
10
10
  /**
11
11
  * The component that renders the heading.
@@ -17,15 +17,21 @@ export interface AccordionSlots {
17
17
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
18
18
  * @default Collapse
19
19
  */
20
- transition: React.JSXElementConstructor<TransitionProps & {
21
- children?: React.ReactElement<unknown, any>;
22
- }>;
20
+ transition: React.ElementType;
23
21
  }
24
22
  export interface AccordionTransitionSlotPropsOverrides {}
25
23
  export interface AccordionHeadingSlotPropsOverrides {}
26
24
  export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots, {
27
- heading: SlotProps<React.ElementType<React.HTMLProps<HTMLHeadingElement>>, AccordionHeadingSlotPropsOverrides, AccordionOwnerState>;
28
- transition: SlotProps<React.ElementType<TransitionProps>, AccordionTransitionSlotPropsOverrides, AccordionOwnerState>;
25
+ /**
26
+ * Props forwarded to the heading slot.
27
+ * By default, the avaible props are based on the h3 element.
28
+ */
29
+ heading: SlotProps<'h3', AccordionHeadingSlotPropsOverrides, AccordionOwnerState>;
30
+ /**
31
+ * Props forwarded to the transition slot.
32
+ * By default, the avaible props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component.
33
+ */
34
+ transition: SlotComponentProps<React.ElementType, TransitionProps & AccordionTransitionSlotPropsOverrides, AccordionOwnerState>;
29
35
  }>;
30
36
  export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{
31
37
  props: AdditionalProps & {
@@ -5,7 +5,7 @@ import { TransitionProps } from "../transitions/transition.js";
5
5
  import { Theme } from "../styles/index.js";
6
6
  import { BackdropClasses } from "./backdropClasses.js";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
9
9
  export interface BackdropSlots {
10
10
  /**
11
11
  * The component that renders the root.
@@ -17,15 +17,21 @@ export interface BackdropSlots {
17
17
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
18
18
  * @default Fade
19
19
  */
20
- transition: React.JSXElementConstructor<TransitionProps & {
21
- children: React.ReactElement<unknown, any>;
22
- }>;
20
+ transition: React.ElementType;
23
21
  }
24
22
  export interface BackdropComponentsPropsOverrides {}
25
23
  export interface BackdropTransitionSlotPropsOverrides {}
26
24
  export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<BackdropSlots, {
27
- root: SlotProps<React.ElementType<HTMLDivElement>, BackdropComponentsPropsOverrides, BackdropOwnerState>;
28
- transition: SlotProps<React.JSXElementConstructor<TransitionProps>, BackdropTransitionSlotPropsOverrides, BackdropOwnerState>;
25
+ /**
26
+ * Props forwarded to the transition slot.
27
+ * By default, the avaible props are based on the div element.
28
+ */
29
+ root: SlotProps<'div', BackdropComponentsPropsOverrides, BackdropOwnerState>;
30
+ /**
31
+ * Props forwarded to the transition slot.
32
+ * By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
33
+ */
34
+ transition: SlotComponentProps<React.ElementType, TransitionProps & BackdropTransitionSlotPropsOverrides, BackdropOwnerState>;
29
35
  }>;
30
36
  export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>>, BackdropSlotsAndSlotProps {
31
37
  /**
package/Button/Button.js CHANGED
@@ -508,9 +508,9 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
508
508
  variant = 'text',
509
509
  ...other
510
510
  } = props;
511
- const id = (0, _utils.unstable_useId)(idProp);
511
+ const loadingId = (0, _utils.unstable_useId)(idProp);
512
512
  const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
513
- "aria-labelledby": id,
513
+ "aria-labelledby": loadingId,
514
514
  color: "inherit",
515
515
  size: 16
516
516
  });
@@ -570,7 +570,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
570
570
  focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
571
571
  ref: ref,
572
572
  type: type,
573
- id: id,
573
+ id: loading ? loadingId : idProp,
574
574
  ...other,
575
575
  classes: classes,
576
576
  children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 7.0.0-alpha.2
4
+
5
+ <!-- generated comparing v7.0.0-alpha.1..master -->
6
+
7
+ _Feb 18, 2025_
8
+
9
+ A big thanks to the 9 contributors who made this release possible.
10
+
11
+ ### `@mui/material@7.0.0-alpha.2`
12
+
13
+ - [Autocomplete] Remove legacy `aria-owns` attribute for combobox (#45302) @ZeeshanTamboli
14
+ - [Button] Apply id only if loading indicator is present (#45296) @aarongarciah
15
+ - [Hidden] Remove deprecated Hidden component (#45283) @DiegoAndai
16
+ - [InputBase] Deprecate composed classes (#45234) @sai6855
17
+ - [InputLabel] Changed size prop value from `normal` to `medium` (#45235) @perkrlsn
18
+ - Fix `slotProps.transition` types (#45214) @siriwatknp
19
+
20
+ ### Docs
21
+
22
+ - Fix broken links to MUI X docs (#45145) @mapache-salvaje
23
+ - Add migration guide for package layout changes (#45222) @Janpot
24
+ - [icons] Fix typo in material-icons.md (#45334) @a-s-russo
25
+
26
+ ### Core
27
+
28
+ - Disallow access to esm/modern barrel files (#45332) @Janpot
29
+ - [code-infra] Update `elliptic` (#45311) @Janpot
30
+ - Update release guide to specify package bumping rules (#45294) @DiegoAndai
31
+
32
+ All contributors of this release in alphabetical order: @a-s-russo, @aarongarciah, @DiegoAndai, @Janpot, @mapache-salvaje, @perkrlsn, @sai6855, @siriwatknp, @ZeeshanTamboli
33
+
3
34
  ## 7.0.0-alpha.1
4
35
 
5
36
  <!-- generated comparing v7.0.0-alpha.0..master -->
@@ -6,7 +6,7 @@ import { PaperProps } from "../Paper/index.js";
6
6
  import { ModalProps } from "../Modal/index.js";
7
7
  import { TransitionProps } from "../transitions/transition.js";
8
8
  import { DialogClasses } from "./dialogClasses.js";
9
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
9
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
10
10
  export interface DialogSlots {
11
11
  /**
12
12
  * The component that renders the transition.
@@ -57,7 +57,7 @@ export type DialogSlotsAndSlotProps = CreateSlotsAndSlotProps<DialogSlots, {
57
57
  * Props forwarded to the transition slot.
58
58
  * By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
59
59
  */
60
- transition: SlotProps<React.ElementType<TransitionProps>, DialogTransitionSlotPropsOverrides, DialogOwnerState>;
60
+ transition: SlotComponentProps<React.ElementType, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>;
61
61
  /**
62
62
  * Props forwarded to the paper slot.
63
63
  * By default, the avaible props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
@@ -200,9 +200,9 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
200
200
  loadingIndicator: loadingIndicatorProp,
201
201
  ...other
202
202
  } = props;
203
- const id = (0, _utils.unstable_useId)(idProp);
203
+ const loadingId = (0, _utils.unstable_useId)(idProp);
204
204
  const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
205
- "aria-labelledby": id,
205
+ "aria-labelledby": loadingId,
206
206
  color: "inherit",
207
207
  size: 16
208
208
  });
@@ -218,7 +218,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
218
218
  };
219
219
  const classes = useUtilityClasses(ownerState);
220
220
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(IconButtonRoot, {
221
- id: id,
221
+ id: loading ? loadingId : idProp,
222
222
  className: (0, _clsx.default)(classes.root, className),
223
223
  centerRipple: true,
224
224
  focusRipple: !disableFocusRipple,
@@ -27,17 +27,26 @@ export interface InputBaseClasses {
27
27
  readOnly: string;
28
28
  /** Styles applied to the input element. */
29
29
  input: string;
30
- /** Styles applied to the input element if `size="small"`. */
30
+ /** Styles applied to the input element if `size="small"`.
31
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
32
+ */
31
33
  inputSizeSmall: string;
32
- /** Styles applied to the input element if `multiline={true}`. */
34
+ /** Styles applied to the input element if `multiline={true}`.
35
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
36
+ */
33
37
  inputMultiline: string;
34
- /** Styles applied to the input element if `type="search"`. */
35
38
  inputTypeSearch: string;
36
- /** Styles applied to the input element if `startAdornment` is provided. */
39
+ /** Styles applied to the input element if `startAdornment` is provided.
40
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
41
+ */
37
42
  inputAdornedStart: string;
38
- /** Styles applied to the input element if `endAdornment` is provided. */
43
+ /** Styles applied to the input element if `endAdornment` is provided.
44
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
45
+ */
39
46
  inputAdornedEnd: string;
40
- /** Styles applied to the input element if `hiddenLabel={true}`. */
47
+ /** Styles applied to the input element if `hiddenLabel={true}`.
48
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-hiddenLabel](/material-ui/api/input-base/#inputbase-classes-hiddenLabel) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
49
+ */
41
50
  inputHiddenLabel: string;
42
51
  }
43
52
  export type InputBaseClassKey = keyof InputBaseClasses;
@@ -44,9 +44,9 @@ export interface InputLabelOwnProps extends Pick<FormLabelProps, 'children'> {
44
44
  shrink?: boolean;
45
45
  /**
46
46
  * The size of the component.
47
- * @default 'normal'
47
+ * @default 'medium'
48
48
  */
49
- size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
49
+ size?: OverridableStringUnion<'small' | 'medium', InputLabelPropsSizeOverrides>;
50
50
  /**
51
51
  * The system prop that allows defining system overrides as well as additional CSS styles.
52
52
  */
@@ -32,7 +32,7 @@ const useUtilityClasses = ownerState => {
32
32
  required
33
33
  } = ownerState;
34
34
  const slots = {
35
- root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${(0, _capitalize.default)(size)}`, variant],
35
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${(0, _capitalize.default)(size)}`, variant],
36
36
  asterisk: [required && 'asterisk']
37
37
  };
38
38
  const composedClasses = (0, _composeClasses.default)(slots, _inputLabelClasses.getInputLabelUtilityClasses, classes);
@@ -275,9 +275,9 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes
275
275
  shrink: _propTypes.default.bool,
276
276
  /**
277
277
  * The size of the component.
278
- * @default 'normal'
278
+ * @default 'medium'
279
279
  */
280
- size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['normal', 'small']), _propTypes.default.string]),
280
+ size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
281
281
  /**
282
282
  * The system prop that allows defining system overrides as well as additional CSS styles.
283
283
  */
@@ -51,7 +51,7 @@ export type PopoverSlotsAndSlotProps = CreateSlotsAndSlotProps<PopoverSlots, {
51
51
  */
52
52
  transition: SlotComponentProps<
53
53
  // use SlotComponentProps because transition slot does not support `component` and `sx` prop
54
- React.ElementType<TransitionProps>, PopoverTransitionSlotPropsOverrides, PopoverOwnerState>;
54
+ React.ElementType, TransitionProps & PopoverTransitionSlotPropsOverrides, PopoverOwnerState>;
55
55
  /**
56
56
  * Props forwarded to the backdrop slot.
57
57
  * By default, the avaible props are based on the [Backdrop](https://mui.com/material-ui/api/backdrop/#props) component.
@@ -52,9 +52,9 @@ export type SnackbarSlotsAndSlotProps = CreateSlotsAndSlotProps<SnackbarSlots, {
52
52
  clickAwayListener: SlotComponentProps<typeof ClickAwayListener, SnackbarClickAwayListenerSlotPropsOverrides, SnackbarOwnerState>;
53
53
  /**
54
54
  * Props applied to the transition element.
55
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
55
+ * By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component.
56
56
  */
57
- transition: SlotComponentProps<React.ElementType<TransitionProps>, SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>;
57
+ transition: SlotComponentProps<React.ElementType, TransitionProps & SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>;
58
58
  }>;
59
59
  export interface SnackbarOrigin {
60
60
  vertical: 'top' | 'bottom';
@@ -5,21 +5,23 @@ import { InternalStandardProps as StandardProps } from "../index.js";
5
5
  import { FabProps } from "../Fab/index.js";
6
6
  import { TransitionProps } from "../transitions/index.js";
7
7
  import { SpeedDialClasses } from "./speedDialClasses.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
9
9
  export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
10
10
  export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
11
11
  export interface SpeedDialSlots {
12
12
  /**
13
13
  * The component that renders the transition.
14
14
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
15
- * @default {}
15
+ * @default Zoom
16
16
  */
17
- transition: React.JSXElementConstructor<TransitionProps & {
18
- children: React.ReactElement<unknown, any>;
19
- }>;
17
+ transition: React.ElementType;
20
18
  }
21
19
  export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, {
22
- transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>;
20
+ /**
21
+ * Props forwarded to the transition slot.
22
+ * By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component.
23
+ */
24
+ transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>;
23
25
  }>;
24
26
  export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps {
25
27
  /**
@@ -4,7 +4,7 @@ import { CollapseProps, InternalStandardProps as StandardProps } from "../index.
4
4
  import { Theme } from "../styles/index.js";
5
5
  import { TransitionProps } from "../transitions/transition.js";
6
6
  import { StepContentClasses } from "./stepContentClasses.js";
7
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
7
+ import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
8
8
  export interface StepContentSlots {
9
9
  /**
10
10
  * The component that renders the transition slot.
@@ -20,7 +20,7 @@ export type StepContentSlotsAndSlotProps = CreateSlotsAndSlotProps<StepContentSl
20
20
  * Props forwared to the transition slot.
21
21
  * By default, the available props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component
22
22
  */
23
- transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>;
23
+ transition: SlotComponentProps<React.ElementType, CollapseProps, StepContentOwnerState>;
24
24
  }>;
25
25
  export interface StepContentOwnerState extends StepContentProps {}
26
26
  export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>>, StepContentSlotsAndSlotProps {
@@ -32,10 +32,26 @@ export interface TooltipSlots {
32
32
  arrow: React.ElementType;
33
33
  }
34
34
  export type TooltipSlotsAndSlotProps = CreateSlotsAndSlotProps<TooltipSlots, {
35
+ /**
36
+ * Props forwarded to the popper slot.
37
+ * By default, the avaible props are based on the [Popper](https://mui.com/material-ui/api/popper/#props) component.
38
+ */
35
39
  popper: SlotProps<React.ElementType<PopperProps>, TooltipPopperSlotPropsOverrides, TooltipOwnerState>;
36
- transition: SlotProps<React.ElementType<TransitionProps>, TooltipTransitionSlotPropsOverrides, TooltipOwnerState>;
37
- tooltip: SlotProps<React.ElementType<React.HTMLProps<HTMLDivElement>>, TooltipTooltipSlotPropsOverrides, TooltipOwnerState>;
38
- arrow: SlotProps<React.ElementType<React.HTMLProps<HTMLSpanElement>>, TooltipArrowSlotPropsOverrides, TooltipOwnerState>;
40
+ /**
41
+ * Props forwarded to the transition slot.
42
+ * By default, the avaible props are based on the [Grow](https://mui.com/material-ui/api/grow/#props) component.
43
+ */
44
+ transition: SlotProps<React.ElementType, TransitionProps & TooltipTransitionSlotPropsOverrides, TooltipOwnerState>;
45
+ /**
46
+ * Props forwarded to the tooltip slot.
47
+ * By default, the avaible props are based on the div element.
48
+ */
49
+ tooltip: SlotProps<'div', TooltipTooltipSlotPropsOverrides, TooltipOwnerState>;
50
+ /**
51
+ * Props forwarded to the tooltip slot.
52
+ * By default, the avaible props are based on the span element.
53
+ */
54
+ arrow: SlotProps<'span', TooltipArrowSlotPropsOverrides, TooltipOwnerState>;
39
55
  }>;
40
56
  export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>, 'title'>, TooltipSlotsAndSlotProps {
41
57
  /**
@@ -5,7 +5,7 @@ import { TransitionProps } from "../transitions/transition.js";
5
5
  import { AccordionClasses } from "./accordionClasses.js";
6
6
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
7
7
  import { ExtendPaperTypeMap } from "../Paper/Paper.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
9
9
  export interface AccordionSlots {
10
10
  /**
11
11
  * The component that renders the heading.
@@ -17,15 +17,21 @@ export interface AccordionSlots {
17
17
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
18
18
  * @default Collapse
19
19
  */
20
- transition: React.JSXElementConstructor<TransitionProps & {
21
- children?: React.ReactElement<unknown, any>;
22
- }>;
20
+ transition: React.ElementType;
23
21
  }
24
22
  export interface AccordionTransitionSlotPropsOverrides {}
25
23
  export interface AccordionHeadingSlotPropsOverrides {}
26
24
  export type AccordionSlotsAndSlotProps = CreateSlotsAndSlotProps<AccordionSlots, {
27
- heading: SlotProps<React.ElementType<React.HTMLProps<HTMLHeadingElement>>, AccordionHeadingSlotPropsOverrides, AccordionOwnerState>;
28
- transition: SlotProps<React.ElementType<TransitionProps>, AccordionTransitionSlotPropsOverrides, AccordionOwnerState>;
25
+ /**
26
+ * Props forwarded to the heading slot.
27
+ * By default, the avaible props are based on the h3 element.
28
+ */
29
+ heading: SlotProps<'h3', AccordionHeadingSlotPropsOverrides, AccordionOwnerState>;
30
+ /**
31
+ * Props forwarded to the transition slot.
32
+ * By default, the avaible props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component.
33
+ */
34
+ transition: SlotComponentProps<React.ElementType, TransitionProps & AccordionTransitionSlotPropsOverrides, AccordionOwnerState>;
29
35
  }>;
30
36
  export type AccordionTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'div'> = ExtendPaperTypeMap<{
31
37
  props: AdditionalProps & {
@@ -5,7 +5,7 @@ import { TransitionProps } from "../transitions/transition.js";
5
5
  import { Theme } from "../styles/index.js";
6
6
  import { BackdropClasses } from "./backdropClasses.js";
7
7
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
9
9
  export interface BackdropSlots {
10
10
  /**
11
11
  * The component that renders the root.
@@ -17,15 +17,21 @@ export interface BackdropSlots {
17
17
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
18
18
  * @default Fade
19
19
  */
20
- transition: React.JSXElementConstructor<TransitionProps & {
21
- children: React.ReactElement<unknown, any>;
22
- }>;
20
+ transition: React.ElementType;
23
21
  }
24
22
  export interface BackdropComponentsPropsOverrides {}
25
23
  export interface BackdropTransitionSlotPropsOverrides {}
26
24
  export type BackdropSlotsAndSlotProps = CreateSlotsAndSlotProps<BackdropSlots, {
27
- root: SlotProps<React.ElementType<HTMLDivElement>, BackdropComponentsPropsOverrides, BackdropOwnerState>;
28
- transition: SlotProps<React.JSXElementConstructor<TransitionProps>, BackdropTransitionSlotPropsOverrides, BackdropOwnerState>;
25
+ /**
26
+ * Props forwarded to the transition slot.
27
+ * By default, the avaible props are based on the div element.
28
+ */
29
+ root: SlotProps<'div', BackdropComponentsPropsOverrides, BackdropOwnerState>;
30
+ /**
31
+ * Props forwarded to the transition slot.
32
+ * By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
33
+ */
34
+ transition: SlotComponentProps<React.ElementType, TransitionProps & BackdropTransitionSlotPropsOverrides, BackdropOwnerState>;
29
35
  }>;
30
36
  export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>>, BackdropSlotsAndSlotProps {
31
37
  /**
@@ -501,9 +501,9 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
501
501
  variant = 'text',
502
502
  ...other
503
503
  } = props;
504
- const id = useId(idProp);
504
+ const loadingId = useId(idProp);
505
505
  const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
506
- "aria-labelledby": id,
506
+ "aria-labelledby": loadingId,
507
507
  color: "inherit",
508
508
  size: 16
509
509
  });
@@ -563,7 +563,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
563
563
  focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
564
564
  ref: ref,
565
565
  type: type,
566
- id: id,
566
+ id: loading ? loadingId : idProp,
567
567
  ...other,
568
568
  classes: classes,
569
569
  children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
@@ -6,7 +6,7 @@ import { PaperProps } from "../Paper/index.js";
6
6
  import { ModalProps } from "../Modal/index.js";
7
7
  import { TransitionProps } from "../transitions/transition.js";
8
8
  import { DialogClasses } from "./dialogClasses.js";
9
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
9
+ import { CreateSlotsAndSlotProps, SlotComponentProps, SlotProps } from "../utils/types.js";
10
10
  export interface DialogSlots {
11
11
  /**
12
12
  * The component that renders the transition.
@@ -57,7 +57,7 @@ export type DialogSlotsAndSlotProps = CreateSlotsAndSlotProps<DialogSlots, {
57
57
  * Props forwarded to the transition slot.
58
58
  * By default, the avaible props are based on the [Fade](https://mui.com/material-ui/api/fade/#props) component.
59
59
  */
60
- transition: SlotProps<React.ElementType<TransitionProps>, DialogTransitionSlotPropsOverrides, DialogOwnerState>;
60
+ transition: SlotComponentProps<React.ElementType, TransitionProps & DialogTransitionSlotPropsOverrides, DialogOwnerState>;
61
61
  /**
62
62
  * Props forwarded to the paper slot.
63
63
  * By default, the avaible props are based on the [Paper](https://mui.com/material-ui/api/paper/#props) component.
@@ -193,9 +193,9 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
193
193
  loadingIndicator: loadingIndicatorProp,
194
194
  ...other
195
195
  } = props;
196
- const id = useId(idProp);
196
+ const loadingId = useId(idProp);
197
197
  const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
198
- "aria-labelledby": id,
198
+ "aria-labelledby": loadingId,
199
199
  color: "inherit",
200
200
  size: 16
201
201
  });
@@ -211,7 +211,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
211
211
  };
212
212
  const classes = useUtilityClasses(ownerState);
213
213
  return /*#__PURE__*/_jsxs(IconButtonRoot, {
214
- id: id,
214
+ id: loading ? loadingId : idProp,
215
215
  className: clsx(classes.root, className),
216
216
  centerRipple: true,
217
217
  focusRipple: !disableFocusRipple,
@@ -27,17 +27,26 @@ export interface InputBaseClasses {
27
27
  readOnly: string;
28
28
  /** Styles applied to the input element. */
29
29
  input: string;
30
- /** Styles applied to the input element if `size="small"`. */
30
+ /** Styles applied to the input element if `size="small"`.
31
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-sizeSmall](/material-ui/api/input-base/#inputbase-classes-sizeSmall) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
32
+ */
31
33
  inputSizeSmall: string;
32
- /** Styles applied to the input element if `multiline={true}`. */
34
+ /** Styles applied to the input element if `multiline={true}`.
35
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-multiline](/material-ui/api/input-base/#inputbase-classes-multiline) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
36
+ */
33
37
  inputMultiline: string;
34
- /** Styles applied to the input element if `type="search"`. */
35
38
  inputTypeSearch: string;
36
- /** Styles applied to the input element if `startAdornment` is provided. */
39
+ /** Styles applied to the input element if `startAdornment` is provided.
40
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedStart](/material-ui/api/input-base/#inputbase-classes-adornedStart) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
41
+ */
37
42
  inputAdornedStart: string;
38
- /** Styles applied to the input element if `endAdornment` is provided. */
43
+ /** Styles applied to the input element if `endAdornment` is provided.
44
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-adornedEnd](/material-ui/api/input-base/#inputbase-classes-adornedEnd) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
45
+ */
39
46
  inputAdornedEnd: string;
40
- /** Styles applied to the input element if `hiddenLabel={true}`. */
47
+ /** Styles applied to the input element if `hiddenLabel={true}`.
48
+ * @deprecated Combine the [.MuiInputBase-input](/material-ui/api/input-base/#inputbase-classes-input) and [.MuiInputBase-hiddenLabel](/material-ui/api/input-base/#inputbase-classes-hiddenLabel) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
49
+ */
41
50
  inputHiddenLabel: string;
42
51
  }
43
52
  export type InputBaseClassKey = keyof InputBaseClasses;
@@ -44,9 +44,9 @@ export interface InputLabelOwnProps extends Pick<FormLabelProps, 'children'> {
44
44
  shrink?: boolean;
45
45
  /**
46
46
  * The size of the component.
47
- * @default 'normal'
47
+ * @default 'medium'
48
48
  */
49
- size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
49
+ size?: OverridableStringUnion<'small' | 'medium', InputLabelPropsSizeOverrides>;
50
50
  /**
51
51
  * The system prop that allows defining system overrides as well as additional CSS styles.
52
52
  */
@@ -25,7 +25,7 @@ const useUtilityClasses = ownerState => {
25
25
  required
26
26
  } = ownerState;
27
27
  const slots = {
28
- root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],
28
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'medium' && `size${capitalize(size)}`, variant],
29
29
  asterisk: [required && 'asterisk']
30
30
  };
31
31
  const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
@@ -268,9 +268,9 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes
268
268
  shrink: PropTypes.bool,
269
269
  /**
270
270
  * The size of the component.
271
- * @default 'normal'
271
+ * @default 'medium'
272
272
  */
273
- size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]),
273
+ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
274
274
  /**
275
275
  * The system prop that allows defining system overrides as well as additional CSS styles.
276
276
  */
@@ -51,7 +51,7 @@ export type PopoverSlotsAndSlotProps = CreateSlotsAndSlotProps<PopoverSlots, {
51
51
  */
52
52
  transition: SlotComponentProps<
53
53
  // use SlotComponentProps because transition slot does not support `component` and `sx` prop
54
- React.ElementType<TransitionProps>, PopoverTransitionSlotPropsOverrides, PopoverOwnerState>;
54
+ React.ElementType, TransitionProps & PopoverTransitionSlotPropsOverrides, PopoverOwnerState>;
55
55
  /**
56
56
  * Props forwarded to the backdrop slot.
57
57
  * By default, the avaible props are based on the [Backdrop](https://mui.com/material-ui/api/backdrop/#props) component.
@@ -52,9 +52,9 @@ export type SnackbarSlotsAndSlotProps = CreateSlotsAndSlotProps<SnackbarSlots, {
52
52
  clickAwayListener: SlotComponentProps<typeof ClickAwayListener, SnackbarClickAwayListenerSlotPropsOverrides, SnackbarOwnerState>;
53
53
  /**
54
54
  * Props applied to the transition element.
55
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
55
+ * By default, the element is based on the [Grow](https://mui.com/material-ui/api/grow/#props) component.
56
56
  */
57
- transition: SlotComponentProps<React.ElementType<TransitionProps>, SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>;
57
+ transition: SlotComponentProps<React.ElementType, TransitionProps & SnackbarTransitionSlotPropsOverrides, SnackbarOwnerState>;
58
58
  }>;
59
59
  export interface SnackbarOrigin {
60
60
  vertical: 'top' | 'bottom';
@@ -5,21 +5,23 @@ import { InternalStandardProps as StandardProps } from "../index.js";
5
5
  import { FabProps } from "../Fab/index.js";
6
6
  import { TransitionProps } from "../transitions/index.js";
7
7
  import { SpeedDialClasses } from "./speedDialClasses.js";
8
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
8
+ import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
9
9
  export type CloseReason = 'toggle' | 'blur' | 'mouseLeave' | 'escapeKeyDown';
10
10
  export type OpenReason = 'toggle' | 'focus' | 'mouseEnter';
11
11
  export interface SpeedDialSlots {
12
12
  /**
13
13
  * The component that renders the transition.
14
14
  * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
15
- * @default {}
15
+ * @default Zoom
16
16
  */
17
- transition: React.JSXElementConstructor<TransitionProps & {
18
- children: React.ReactElement<unknown, any>;
19
- }>;
17
+ transition: React.ElementType;
20
18
  }
21
19
  export type SpeedDialSlotsAndSlotProps = CreateSlotsAndSlotProps<SpeedDialSlots, {
22
- transition: SlotProps<React.JSXElementConstructor<TransitionProps>, {}, SpeedDialOwnerState>;
20
+ /**
21
+ * Props forwarded to the transition slot.
22
+ * By default, the avaible props are based on the [Zoom](https://mui.com/material-ui/api/zoom/#props) component.
23
+ */
24
+ transition: SlotComponentProps<React.ElementType, TransitionProps, SpeedDialOwnerState>;
23
25
  }>;
24
26
  export interface SpeedDialProps extends Omit<StandardProps<React.HTMLAttributes<HTMLDivElement>, 'children'>, 'slots' | 'slotProps'>, SpeedDialSlotsAndSlotProps {
25
27
  /**
@@ -4,7 +4,7 @@ import { CollapseProps, InternalStandardProps as StandardProps } from "../index.
4
4
  import { Theme } from "../styles/index.js";
5
5
  import { TransitionProps } from "../transitions/transition.js";
6
6
  import { StepContentClasses } from "./stepContentClasses.js";
7
- import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
7
+ import { CreateSlotsAndSlotProps, SlotComponentProps } from "../utils/types.js";
8
8
  export interface StepContentSlots {
9
9
  /**
10
10
  * The component that renders the transition slot.
@@ -20,7 +20,7 @@ export type StepContentSlotsAndSlotProps = CreateSlotsAndSlotProps<StepContentSl
20
20
  * Props forwared to the transition slot.
21
21
  * By default, the available props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component
22
22
  */
23
- transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>;
23
+ transition: SlotComponentProps<React.ElementType, CollapseProps, StepContentOwnerState>;
24
24
  }>;
25
25
  export interface StepContentOwnerState extends StepContentProps {}
26
26
  export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>>, StepContentSlotsAndSlotProps {