@mui/material 6.4.11 → 6.5.0

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 (50) hide show
  1. package/Badge/Badge.d.ts +32 -28
  2. package/Badge/Badge.js +27 -20
  3. package/BottomNavigationAction/BottomNavigationAction.d.ts +40 -3
  4. package/BottomNavigationAction/BottomNavigationAction.js +53 -9
  5. package/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  6. package/CHANGELOG.md +66 -0
  7. package/CardActionArea/CardActionArea.d.ts +40 -3
  8. package/CardActionArea/CardActionArea.js +47 -8
  9. package/Menu/Menu.d.ts +1 -1
  10. package/NativeSelect/NativeSelectInput.js +6 -2
  11. package/OutlinedInput/NotchedOutline.js +2 -0
  12. package/OutlinedInput/OutlinedInput.d.ts +29 -2
  13. package/OutlinedInput/OutlinedInput.js +30 -10
  14. package/Radio/RadioButtonIcon.js +7 -2
  15. package/SwipeableDrawer/SwipeArea.js +1 -0
  16. package/index.js +1 -1
  17. package/internal/SwitchBase.js +4 -1
  18. package/modern/Badge/Badge.js +27 -20
  19. package/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
  20. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  21. package/modern/CardActionArea/CardActionArea.js +47 -8
  22. package/modern/NativeSelect/NativeSelectInput.js +6 -2
  23. package/modern/OutlinedInput/NotchedOutline.js +2 -0
  24. package/modern/OutlinedInput/OutlinedInput.js +30 -10
  25. package/modern/Radio/RadioButtonIcon.js +7 -2
  26. package/modern/SwipeableDrawer/SwipeArea.js +1 -0
  27. package/modern/index.js +1 -1
  28. package/modern/internal/SwitchBase.js +4 -1
  29. package/modern/styles/ThemeProvider.js +17 -17
  30. package/modern/styles/shouldSkipGeneratingVar.js +1 -1
  31. package/modern/version/index.js +3 -3
  32. package/node/Badge/Badge.js +27 -20
  33. package/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
  34. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
  35. package/node/CardActionArea/CardActionArea.js +47 -8
  36. package/node/NativeSelect/NativeSelectInput.js +6 -2
  37. package/node/OutlinedInput/NotchedOutline.js +2 -0
  38. package/node/OutlinedInput/OutlinedInput.js +30 -10
  39. package/node/Radio/RadioButtonIcon.js +7 -2
  40. package/node/SwipeableDrawer/SwipeArea.js +1 -0
  41. package/node/index.js +1 -1
  42. package/node/internal/SwitchBase.js +4 -1
  43. package/node/styles/ThemeProvider.js +17 -17
  44. package/node/styles/shouldSkipGeneratingVar.js +1 -1
  45. package/node/version/index.js +3 -3
  46. package/package.json +6 -6
  47. package/styles/ThemeProvider.js +17 -17
  48. package/styles/createThemeNoVars.d.ts +1 -0
  49. package/styles/shouldSkipGeneratingVar.js +1 -1
  50. package/version/index.js +3 -3
package/Badge/Badge.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { OverridableStringUnion, Simplify } from '@mui/types';
4
- import { SlotComponentProps } from '../utils/types';
4
+ import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
5
5
  import { Theme } from '../styles';
6
6
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
7
7
  import { BadgeClasses } from './badgeClasses';
@@ -11,8 +11,37 @@ export interface BadgePropsColorOverrides {}
11
11
  export interface BadgeRootSlotPropsOverrides {}
12
12
  export interface BadgeBadgeSlotPropsOverrides {}
13
13
 
14
+ export interface BadgeSlots {
15
+ /**
16
+ * The component that renders the root.
17
+ * @default span
18
+ */
19
+ root: React.ElementType;
20
+ /**
21
+ * The component that renders the badge.
22
+ * @default span
23
+ */
24
+ badge: React.ElementType;
25
+ }
26
+
27
+ export type BadgeSlotsAndSlotProps = CreateSlotsAndSlotProps<
28
+ BadgeSlots,
29
+ {
30
+ /**
31
+ * Props forwarded to the root slot.
32
+ * By default, the avaible props are based on the span element.
33
+ */
34
+ root: SlotProps<'span', BadgeRootSlotPropsOverrides, BadgeOwnerState>;
35
+ /**
36
+ * Props forwarded to the label slot.
37
+ * By default, the avaible props are based on the span element.
38
+ */
39
+ badge: SlotProps<'span', BadgeBadgeSlotPropsOverrides, BadgeOwnerState>;
40
+ }
41
+ >;
42
+
14
43
  export type BadgeOwnerState = Simplify<
15
- BadgeOwnProps & {
44
+ Omit<BadgeOwnProps, 'slotProps' | 'slots'> & {
16
45
  badgeContent: React.ReactNode;
17
46
  invisible: boolean;
18
47
  max: number;
@@ -33,7 +62,7 @@ export interface BadgeOrigin {
33
62
  horizontal?: 'left' | 'right';
34
63
  }
35
64
 
36
- export interface BadgeOwnProps {
65
+ export interface BadgeOwnProps extends BadgeSlotsAndSlotProps {
37
66
  /**
38
67
  * The anchor of the badge.
39
68
  * @default {
@@ -103,31 +132,6 @@ export interface BadgeOwnProps {
103
132
  * @default 'rectangular'
104
133
  */
105
134
  overlap?: 'rectangular' | 'circular';
106
- /**
107
- * The props used for each slot inside the Badge.
108
- * @default {}
109
- */
110
- slotProps?: {
111
- root?: SlotComponentProps<'span', BadgeRootSlotPropsOverrides, BadgeOwnerState>;
112
- badge?: SlotComponentProps<'span', BadgeBadgeSlotPropsOverrides, BadgeOwnerState>;
113
- };
114
- /**
115
- * The components used for each slot inside the Badge.
116
- * Either a string to use a HTML element or a component.
117
- * @default {}
118
- */
119
- slots?: {
120
- /**
121
- * The component that renders the root.
122
- * @default 'span'
123
- */
124
- root?: React.ElementType;
125
- /**
126
- * The component that renders the badge.
127
- * @default 'span'
128
- */
129
- badge?: React.ElementType;
130
- };
131
135
  /**
132
136
  * Controls whether the badge is hidden when `badgeContent` is zero.
133
137
  * @default false
package/Badge/Badge.js CHANGED
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
  import clsx from 'clsx';
6
6
  import usePreviousProps from '@mui/utils/usePreviousProps';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
- import useSlotProps from '@mui/utils/useSlotProps';
9
8
  import useBadge from "./useBadge.js";
10
9
  import { styled } from "../zero-styled/index.js";
11
10
  import memoTheme from "../utils/memoTheme.js";
@@ -13,6 +12,7 @@ import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFil
13
12
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
14
13
  import capitalize from "../utils/capitalize.js";
15
14
  import badgeClasses, { getBadgeUtilityClass } from "./badgeClasses.js";
15
+ import useSlot from "../utils/useSlot.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  const RADIUS_STANDARD = 10;
18
18
  const RADIUS_DOT = 4;
@@ -282,26 +282,34 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
282
282
  const classes = useUtilityClasses(ownerState);
283
283
 
284
284
  // support both `slots` and `components` for backward compatibility
285
- const RootSlot = slots?.root ?? components.Root ?? BadgeRoot;
286
- const BadgeSlot = slots?.badge ?? components.Badge ?? BadgeBadge;
287
- const rootSlotProps = slotProps?.root ?? componentsProps.root;
288
- const badgeSlotProps = slotProps?.badge ?? componentsProps.badge;
289
- const rootProps = useSlotProps({
290
- elementType: RootSlot,
291
- externalSlotProps: rootSlotProps,
292
- externalForwardedProps: other,
293
- additionalProps: {
294
- ref,
295
- as: component
285
+ const externalForwardedProps = {
286
+ slots: {
287
+ root: slots?.root ?? components.Root,
288
+ badge: slots?.badge ?? components.Badge
289
+ },
290
+ slotProps: {
291
+ root: slotProps?.root ?? componentsProps.root,
292
+ badge: slotProps?.badge ?? componentsProps.badge
293
+ }
294
+ };
295
+ const [RootSlot, rootProps] = useSlot('root', {
296
+ elementType: BadgeRoot,
297
+ externalForwardedProps: {
298
+ ...externalForwardedProps,
299
+ ...other
296
300
  },
297
301
  ownerState,
298
- className: clsx(rootSlotProps?.className, classes.root, className)
302
+ className: clsx(classes.root, className),
303
+ ref,
304
+ additionalProps: {
305
+ as: component
306
+ }
299
307
  });
300
- const badgeProps = useSlotProps({
301
- elementType: BadgeSlot,
302
- externalSlotProps: badgeSlotProps,
308
+ const [BadgeSlot, badgeProps] = useSlot('badge', {
309
+ elementType: BadgeBadge,
310
+ externalForwardedProps,
303
311
  ownerState,
304
- className: clsx(classes.badge, badgeSlotProps?.className)
312
+ className: classes.badge
305
313
  });
306
314
  return /*#__PURE__*/_jsxs(RootSlot, {
307
315
  ...rootProps,
@@ -399,7 +407,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
399
407
  */
400
408
  showZero: PropTypes.bool,
401
409
  /**
402
- * The props used for each slot inside the Badge.
410
+ * The props used for each slot inside.
403
411
  * @default {}
404
412
  */
405
413
  slotProps: PropTypes.shape({
@@ -407,8 +415,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
407
415
  root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
408
416
  }),
409
417
  /**
410
- * The components used for each slot inside the Badge.
411
- * Either a string to use a HTML element or a component.
418
+ * The components used for each slot inside.
412
419
  * @default {}
413
420
  */
414
421
  slots: PropTypes.shape({
@@ -1,11 +1,45 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
- import { Theme } from '..';
4
- import { ButtonBaseTypeMap, ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
3
+ import { CreateSlotsAndSlotProps, SlotProps, Theme } from '..';
4
+ import {
5
+ ButtonBaseProps,
6
+ ButtonBaseTypeMap,
7
+ ExtendButtonBase,
8
+ ExtendButtonBaseTypeMap,
9
+ } from '../ButtonBase';
5
10
  import { OverrideProps } from '../OverridableComponent';
6
11
  import { BottomNavigationActionClasses } from './bottomNavigationActionClasses';
7
12
 
8
- export interface BottomNavigationActionOwnProps {
13
+ export interface BottomNavigationActionSlots {
14
+ /**
15
+ * The component that renders the root.
16
+ * @default ButtonBase
17
+ */
18
+ root: React.ElementType;
19
+ /**
20
+ * The component that renders the label.
21
+ * @default span
22
+ */
23
+ label: React.ElementType;
24
+ }
25
+
26
+ export type BottomNavigationActionSlotsAndSlotProps = CreateSlotsAndSlotProps<
27
+ BottomNavigationActionSlots,
28
+ {
29
+ /**
30
+ * Props forwarded to the root slot.
31
+ * By default, the avaible props are based on the ButtonBase element.
32
+ */
33
+ root: SlotProps<React.ElementType<ButtonBaseProps>, {}, BottomNavigationActionOwnerState>;
34
+ /**
35
+ * Props forwarded to the label slot.
36
+ * By default, the avaible props are based on the span element.
37
+ */
38
+ label: SlotProps<'span', {}, BottomNavigationActionOwnerState>;
39
+ }
40
+ >;
41
+
42
+ export interface BottomNavigationActionOwnProps extends BottomNavigationActionSlotsAndSlotProps {
9
43
  /**
10
44
  * This prop isn't supported.
11
45
  * Use the `component` prop if you need to change the children structure.
@@ -71,4 +105,7 @@ export type BottomNavigationActionProps<
71
105
  component?: React.ElementType;
72
106
  };
73
107
 
108
+ export interface BottomNavigationActionOwnerState
109
+ extends Omit<BottomNavigationActionProps, 'slots' | 'slotProps'> {}
110
+
74
111
  export default BottomNavigationAction;
@@ -10,6 +10,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10
10
  import ButtonBase from "../ButtonBase/index.js";
11
11
  import unsupportedProp from "../utils/unsupportedProp.js";
12
12
  import bottomNavigationActionClasses, { getBottomNavigationActionUtilityClass } from "./bottomNavigationActionClasses.js";
13
+ import useSlot from "../utils/useSlot.js";
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
15
  const useUtilityClasses = ownerState => {
15
16
  const {
@@ -107,6 +108,8 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
107
108
  selected,
108
109
  showLabel,
109
110
  value,
111
+ slots = {},
112
+ slotProps = {},
110
113
  ...other
111
114
  } = props;
112
115
  const ownerState = props;
@@ -119,16 +122,41 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
119
122
  onClick(event);
120
123
  }
121
124
  };
122
- return /*#__PURE__*/_jsxs(BottomNavigationActionRoot, {
123
- ref: ref,
125
+ const externalForwardedProps = {
126
+ slots,
127
+ slotProps
128
+ };
129
+ const [RootSlot, rootProps] = useSlot('root', {
130
+ elementType: BottomNavigationActionRoot,
131
+ externalForwardedProps: {
132
+ ...externalForwardedProps,
133
+ ...other
134
+ },
135
+ shouldForwardComponentProp: true,
136
+ ownerState,
137
+ ref,
124
138
  className: clsx(classes.root, className),
125
- focusRipple: true,
126
- onClick: handleChange,
127
- ownerState: ownerState,
128
- ...other,
129
- children: [icon, /*#__PURE__*/_jsx(BottomNavigationActionLabel, {
130
- className: classes.label,
131
- ownerState: ownerState,
139
+ additionalProps: {
140
+ focusRipple: true
141
+ },
142
+ getSlotProps: handlers => ({
143
+ ...handlers,
144
+ onClick: event => {
145
+ handlers.onClick?.(event);
146
+ handleChange(event);
147
+ }
148
+ })
149
+ });
150
+ const [LabelSlot, labelProps] = useSlot('label', {
151
+ elementType: BottomNavigationActionLabel,
152
+ externalForwardedProps,
153
+ ownerState,
154
+ className: classes.label
155
+ });
156
+ return /*#__PURE__*/_jsxs(RootSlot, {
157
+ ...rootProps,
158
+ children: [icon, /*#__PURE__*/_jsx(LabelSlot, {
159
+ ...labelProps,
132
160
  children: label
133
161
  })]
134
162
  });
@@ -175,6 +203,22 @@ process.env.NODE_ENV !== "production" ? BottomNavigationAction.propTypes /* remo
175
203
  * The prop defaults to the value (`false`) inherited from the parent BottomNavigation component.
176
204
  */
177
205
  showLabel: PropTypes.bool,
206
+ /**
207
+ * The props used for each slot inside.
208
+ * @default {}
209
+ */
210
+ slotProps: PropTypes.shape({
211
+ label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
212
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
213
+ }),
214
+ /**
215
+ * The components used for each slot inside.
216
+ * @default {}
217
+ */
218
+ slots: PropTypes.shape({
219
+ label: PropTypes.elementType,
220
+ root: PropTypes.elementType
221
+ }),
178
222
  /**
179
223
  * The system prop that allows defining system overrides as well as additional CSS styles.
180
224
  */
@@ -8,7 +8,9 @@ import memoTheme from "../utils/memoTheme.js";
8
8
  import MoreHorizIcon from "../internal/svg-icons/MoreHoriz.js";
9
9
  import ButtonBase from "../ButtonBase/index.js";
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const BreadcrumbCollapsedButton = styled(ButtonBase)(memoTheme(({
11
+ const BreadcrumbCollapsedButton = styled(ButtonBase, {
12
+ name: 'MuiBreadcrumbCollapsed'
13
+ })(memoTheme(({
12
14
  theme
13
15
  }) => ({
14
16
  display: 'flex',
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.5.0
4
+
5
+ <!-- generated comparing v6.4.12..v6.x -->
6
+
7
+ _Jul 2, 2025_
8
+
9
+ A big thanks to the 2 contributors who made this release possible.
10
+
11
+ CSS layers make it easier to override styles by splitting a single style sheet into multiple layers.
12
+ To learn more, check out the [CSS layers documentation](https://v6.mui.com/material-ui/customization/css-layers/).
13
+
14
+ ### `@mui/material@6.5.0`
15
+
16
+ - [Dialog] Add codemod for deprecated props (#46335) @sai6855
17
+
18
+ ### `@mui/system@6.5.0`
19
+
20
+ - Backport CSS layers feature from v7 (#46283) @siriwatknp
21
+
22
+ ### `@mui/material-nextjs@6.5.0`
23
+
24
+ - Backport CSS layers feature from v7 (#46283) @siriwatknp
25
+
26
+ ### Docs
27
+
28
+ - Add ListItemButton to make the deprecation clear (#46357) @sai6855
29
+
30
+ All contributors of this release in alphabetical order: @sai6855, @siriwatknp
31
+
32
+ ## 6.4.12
33
+
34
+ <!-- generated comparing v6.4.11..v6.x -->
35
+
36
+ _May 30, 2025_
37
+
38
+ A big thanks to the 7 contributors who made this release possible.
39
+
40
+ ### `@mui/material@6.4.12`
41
+
42
+ - [Badge] Replace useSlotProps with useSlot hook (#45876) @sai6855
43
+ - [BottomNavigationAction] Add slots and slotProps (#45875) @sai6855
44
+ - [CardActionArea] Add slots and slotProps (#45877) @sai6855
45
+ - [OutlinedInput] Add missing `notchedOutline` slot (#45938) @siriwatknp
46
+ - [useMediaQuery] Add warning and docs for using `useMediaQuery('print')` (#45886) @good-jinu
47
+ - Fix theme object changes between renders (#45874) @siriwatknp
48
+
49
+ ### `@mui/material-nextjs@6.4.12`
50
+
51
+ - Do not wrap `@layer` order rules in App Router (#45870) @Nayeem-XTREME
52
+
53
+ ### `@mui/system@6.4.12`
54
+
55
+ - Skip styled component from being transformed (#46184) @siriwatknp
56
+
57
+ ### Docs
58
+
59
+ - [Dialog] Remove deprecated props usage in demos (#45928) @sai6855
60
+ - [Grid] Update grid migration guide (#46153) @sai6855
61
+ - [Menu] Update `paper` slot JSDoc default from `Paper` to `PopoverPaper` (@andreachiera) (#45865) @andreachiera
62
+ - Update CSS variable usage in migration guide for Pigment CSS (#46038) @sai6855
63
+ - Remove outdated StackOverflow tag (9b9f96b) @oliviertassinari
64
+ - Update `@mui/icons-material` install command to use 6.x version (#45810) @Nickknack
65
+ - Add AccordionSummary to the breaking change migration (#45973) @siriwatknp
66
+
67
+ All contributors of this release in alphabetical order: @andreachiera, @good-jinu, @Nayeem-XTREME, @Nickknack, @oliviertassinari, @sai6855, @siriwatknp
68
+
3
69
  ## 6.4.11
4
70
 
5
71
  _Apr 9, 2025_
@@ -1,10 +1,47 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
- import { Theme } from '..';
4
- import { ButtonBaseTypeMap, ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
3
+ import { SlotProps, CreateSlotsAndSlotProps, Theme } from '..';
4
+ import {
5
+ ButtonBaseProps,
6
+ ButtonBaseTypeMap,
7
+ ExtendButtonBase,
8
+ ExtendButtonBaseTypeMap,
9
+ } from '../ButtonBase';
5
10
  import { OverrideProps } from '../OverridableComponent';
6
11
  import { CardActionAreaClasses } from './cardActionAreaClasses';
7
12
 
13
+ export interface CardActionAreaSlots {
14
+ /**
15
+ * The component that renders the root.
16
+ * @default ButtonBase
17
+ */
18
+ root: React.ElementType;
19
+ /**
20
+ * The component that renders the focusHighlight.
21
+ * @default span
22
+ */
23
+ focusHighlight: React.ElementType;
24
+ }
25
+
26
+ export type CardActionAreaSlotsAndSlotProps = CreateSlotsAndSlotProps<
27
+ CardActionAreaSlots,
28
+ {
29
+ /**
30
+ * Props forwarded to the root slot.
31
+ * By default, the avaible props are based on the span element.
32
+ */
33
+ root: SlotProps<React.ElementType<ButtonBaseProps>, {}, CardActionAreaOwnerState>;
34
+ /**
35
+ * Props forwarded to the focusHighlight slot.
36
+ * By default, the avaible props are based on the span element.
37
+ */
38
+ focusHighlight: SlotProps<'span', {}, CardActionAreaOwnerState>;
39
+ }
40
+ >;
41
+
42
+ export interface CardActionAreaOwnerState
43
+ extends Omit<CardActionAreaProps, 'slots' | 'slotProps'> {}
44
+
8
45
  export interface CardActionAreaOwnProps {
9
46
  /**
10
47
  * Override or extend the styles applied to the component.
@@ -21,7 +58,7 @@ export type CardActionAreaTypeMap<
21
58
  AdditionalProps,
22
59
  RootComponent extends React.ElementType,
23
60
  > = ExtendButtonBaseTypeMap<{
24
- props: AdditionalProps & CardActionAreaOwnProps;
61
+ props: AdditionalProps & CardActionAreaOwnProps & CardActionAreaSlotsAndSlotProps;
25
62
  defaultComponent: RootComponent;
26
63
  }>;
27
64
 
@@ -9,6 +9,7 @@ import memoTheme from "../utils/memoTheme.js";
9
9
  import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10
10
  import cardActionAreaClasses, { getCardActionAreaUtilityClass } from "./cardActionAreaClasses.js";
11
11
  import ButtonBase from "../ButtonBase/index.js";
12
+ import useSlot from "../utils/useSlot.js";
12
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
14
  const useUtilityClasses = ownerState => {
14
15
  const {
@@ -72,19 +73,41 @@ const CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(inP
72
73
  children,
73
74
  className,
74
75
  focusVisibleClassName,
76
+ slots = {},
77
+ slotProps = {},
75
78
  ...other
76
79
  } = props;
77
80
  const ownerState = props;
78
81
  const classes = useUtilityClasses(ownerState);
79
- return /*#__PURE__*/_jsxs(CardActionAreaRoot, {
82
+ const externalForwardedProps = {
83
+ slots,
84
+ slotProps
85
+ };
86
+ const [RootSlot, rootProps] = useSlot('root', {
87
+ elementType: CardActionAreaRoot,
88
+ externalForwardedProps: {
89
+ ...externalForwardedProps,
90
+ ...other
91
+ },
92
+ shouldForwardComponentProp: true,
93
+ ownerState,
94
+ ref,
80
95
  className: clsx(classes.root, className),
81
- focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible),
82
- ref: ref,
83
- ownerState: ownerState,
84
- ...other,
85
- children: [children, /*#__PURE__*/_jsx(CardActionAreaFocusHighlight, {
86
- className: classes.focusHighlight,
87
- ownerState: ownerState
96
+ additionalProps: {
97
+ focusVisibleClassName: clsx(focusVisibleClassName, classes.focusVisible)
98
+ }
99
+ });
100
+ const [FocusHighlightSlot, focusHighlightProps] = useSlot('focusHighlight', {
101
+ elementType: CardActionAreaFocusHighlight,
102
+ externalForwardedProps,
103
+ ownerState,
104
+ ref,
105
+ className: classes.focusHighlight
106
+ });
107
+ return /*#__PURE__*/_jsxs(RootSlot, {
108
+ ...rootProps,
109
+ children: [children, /*#__PURE__*/_jsx(FocusHighlightSlot, {
110
+ ...focusHighlightProps
88
111
  })]
89
112
  });
90
113
  });
@@ -109,6 +132,22 @@ process.env.NODE_ENV !== "production" ? CardActionArea.propTypes /* remove-propt
109
132
  * @ignore
110
133
  */
111
134
  focusVisibleClassName: PropTypes.string,
135
+ /**
136
+ * The props used for each slot inside.
137
+ * @default {}
138
+ */
139
+ slotProps: PropTypes.shape({
140
+ focusHighlight: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
141
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
142
+ }),
143
+ /**
144
+ * The components used for each slot inside.
145
+ * @default {}
146
+ */
147
+ slots: PropTypes.shape({
148
+ focusHighlight: PropTypes.elementType,
149
+ root: PropTypes.elementType
150
+ }),
112
151
  /**
113
152
  * The system prop that allows defining system overrides as well as additional CSS styles.
114
153
  */
package/Menu/Menu.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface MenuSlots {
29
29
  root: React.ElementType;
30
30
  /**
31
31
  * The component used for the paper.
32
- * @default Paper
32
+ * @default PopoverPaper
33
33
  */
34
34
  paper: React.ElementType;
35
35
  /**
@@ -25,7 +25,9 @@ const useUtilityClasses = ownerState => {
25
25
  };
26
26
  return composeClasses(slots, getNativeSelectUtilityClasses, classes);
27
27
  };
28
- export const StyledSelectSelect = styled('select')(({
28
+ export const StyledSelectSelect = styled('select', {
29
+ name: 'MuiNativeSelect'
30
+ })(({
29
31
  theme
30
32
  }) => ({
31
33
  // Reset
@@ -99,7 +101,9 @@ const NativeSelectSelect = styled(StyledSelectSelect, {
99
101
  }];
100
102
  }
101
103
  })({});
102
- export const StyledSelectIcon = styled('svg')(({
104
+ export const StyledSelectIcon = styled('svg', {
105
+ name: 'MuiNativeSelect'
106
+ })(({
103
107
  theme
104
108
  }) => ({
105
109
  // We use a position absolute over a flexbox in order to forward the pointer events
@@ -8,6 +8,7 @@ import { styled } from "../zero-styled/index.js";
8
8
  import memoTheme from "../utils/memoTheme.js";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  const NotchedOutlineRoot = styled('fieldset', {
11
+ name: 'MuiNotchedOutlined',
11
12
  shouldForwardProp: rootShouldForwardProp
12
13
  })({
13
14
  textAlign: 'left',
@@ -26,6 +27,7 @@ const NotchedOutlineRoot = styled('fieldset', {
26
27
  minWidth: '0%'
27
28
  });
28
29
  const NotchedOutlineLegend = styled('legend', {
30
+ name: 'MuiNotchedOutlined',
29
31
  shouldForwardProp: rootShouldForwardProp
30
32
  })(memoTheme(({
31
33
  theme
@@ -1,10 +1,35 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
- import { InternalStandardProps as StandardProps, Theme } from '..';
3
+ import {
4
+ CreateSlotsAndSlotProps,
5
+ SlotProps,
6
+ InternalStandardProps as StandardProps,
7
+ Theme,
8
+ } from '..';
4
9
  import { InputBaseProps } from '../InputBase';
5
10
  import { OutlinedInputClasses } from './outlinedInputClasses';
6
11
 
7
- export interface OutlinedInputProps extends StandardProps<InputBaseProps> {
12
+ interface OutlinedInputSlots {
13
+ /**
14
+ * The component that renders the notchedOutline slot.
15
+ * @default NotchedOutline
16
+ */
17
+ notchedOutline: React.ElementType;
18
+ }
19
+
20
+ type OutlinedInputSlotsAndSlotProps = CreateSlotsAndSlotProps<
21
+ OutlinedInputSlots,
22
+ {
23
+ notchedOutline: SlotProps<'fieldset', {}, OutlinedInputOwnerState>;
24
+ }
25
+ > & {
26
+ slots?: InputBaseProps['slots'];
27
+ slotProps?: InputBaseProps['slotProps'];
28
+ };
29
+
30
+ export interface OutlinedInputProps
31
+ extends Omit<StandardProps<InputBaseProps>, 'slots' | 'slotProps'>,
32
+ OutlinedInputSlotsAndSlotProps {
8
33
  /**
9
34
  * Override or extend the styles applied to the component.
10
35
  */
@@ -24,6 +49,8 @@ export interface OutlinedInputProps extends StandardProps<InputBaseProps> {
24
49
  sx?: SxProps<Theme>;
25
50
  }
26
51
 
52
+ export interface OutlinedInputOwnerState extends Omit<OutlinedInputProps, 'slots' | 'slotProps'> {}
53
+
27
54
  /**
28
55
  *
29
56
  * Demos: