@mui/material 6.4.10 → 6.4.12
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.
- package/AvatarGroup/AvatarGroup.js +10 -2
- package/Badge/Badge.d.ts +32 -28
- package/Badge/Badge.js +27 -20
- package/BottomNavigationAction/BottomNavigationAction.d.ts +40 -3
- package/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/CHANGELOG.md +60 -0
- package/CardActionArea/CardActionArea.d.ts +40 -3
- package/CardActionArea/CardActionArea.js +47 -8
- package/Dialog/dialogClasses.d.ts +6 -2
- package/Menu/Menu.d.ts +1 -1
- package/OutlinedInput/OutlinedInput.d.ts +29 -2
- package/OutlinedInput/OutlinedInput.js +30 -10
- package/index.js +1 -1
- package/modern/AvatarGroup/AvatarGroup.js +10 -2
- package/modern/Badge/Badge.js +27 -20
- package/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/modern/CardActionArea/CardActionArea.js +47 -8
- package/modern/OutlinedInput/OutlinedInput.js +30 -10
- package/modern/index.js +1 -1
- package/modern/styles/ThemeProvider.js +17 -17
- package/modern/version/index.js +2 -2
- package/node/AvatarGroup/AvatarGroup.js +10 -2
- package/node/Badge/Badge.js +27 -20
- package/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node/CardActionArea/CardActionArea.js +47 -8
- package/node/OutlinedInput/OutlinedInput.js +30 -10
- package/node/index.js +1 -1
- package/node/styles/ThemeProvider.js +17 -17
- package/node/version/index.js +2 -2
- package/package.json +6 -6
- package/styles/ThemeProvider.js +17 -17
- package/version/index.js +2 -2
|
@@ -93,7 +93,14 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
93
93
|
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
94
94
|
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
95
95
|
const extraAvatarsElement = renderSurplus ? renderSurplus(extraAvatars) : `+${extraAvatars}`;
|
|
96
|
-
|
|
96
|
+
let marginValue;
|
|
97
|
+
if (ownerState.spacing && SPACINGS[ownerState.spacing] !== undefined) {
|
|
98
|
+
marginValue = SPACINGS[ownerState.spacing];
|
|
99
|
+
} else if (ownerState.spacing === 0) {
|
|
100
|
+
marginValue = 0;
|
|
101
|
+
} else {
|
|
102
|
+
marginValue = -ownerState.spacing || SPACINGS.medium;
|
|
103
|
+
}
|
|
97
104
|
const externalForwardedProps = {
|
|
98
105
|
slots,
|
|
99
106
|
slotProps: {
|
|
@@ -118,7 +125,8 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
118
125
|
ref: ref,
|
|
119
126
|
...other,
|
|
120
127
|
style: {
|
|
121
|
-
'--AvatarGroup-spacing':
|
|
128
|
+
'--AvatarGroup-spacing': `${marginValue}px`,
|
|
129
|
+
// marginValue is always defined
|
|
122
130
|
...other.style
|
|
123
131
|
},
|
|
124
132
|
children: [extraAvatars ? /*#__PURE__*/_jsx(SurplusSlot, {
|
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 {
|
|
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
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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(
|
|
302
|
+
className: clsx(classes.root, className),
|
|
303
|
+
ref,
|
|
304
|
+
additionalProps: {
|
|
305
|
+
as: component
|
|
306
|
+
}
|
|
299
307
|
});
|
|
300
|
-
const badgeProps =
|
|
301
|
-
elementType:
|
|
302
|
-
|
|
308
|
+
const [BadgeSlot, badgeProps] = useSlot('badge', {
|
|
309
|
+
elementType: BadgeBadge,
|
|
310
|
+
externalForwardedProps,
|
|
303
311
|
ownerState,
|
|
304
|
-
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
|
|
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
|
|
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 {
|
|
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
|
|
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
|
-
|
|
123
|
-
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
*/
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 6.4.12
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.4.11..v6.x -->
|
|
6
|
+
|
|
7
|
+
_May 30, 2025_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 7 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@6.4.12`
|
|
12
|
+
|
|
13
|
+
- [Badge] Replace useSlotProps with useSlot hook (#45876) @sai6855
|
|
14
|
+
- [BottomNavigationAction] Add slots and slotProps (#45875) @sai6855
|
|
15
|
+
- [CardActionArea] Add slots and slotProps (#45877) @sai6855
|
|
16
|
+
- [OutlinedInput] Add missing `notchedOutline` slot (#45938) @siriwatknp
|
|
17
|
+
- [useMediaQuery] Add warning and docs for using `useMediaQuery('print')` (#45886) @good-jinu
|
|
18
|
+
- Fix theme object changes between renders (#45874) @siriwatknp
|
|
19
|
+
|
|
20
|
+
### `@mui/material-nextjs@6.4.12`
|
|
21
|
+
|
|
22
|
+
- Do not wrap `@layer` order rules in App Router (#45870) @Nayeem-XTREME
|
|
23
|
+
|
|
24
|
+
### `@mui/system@6.4.12`
|
|
25
|
+
|
|
26
|
+
- Skip styled component from being transformed (#46184) @siriwatknp
|
|
27
|
+
|
|
28
|
+
### Docs
|
|
29
|
+
|
|
30
|
+
- [Dialog] Remove deprecated props usage in demos (#45928) @sai6855
|
|
31
|
+
- [Grid] Update grid migration guide (#46153) @sai6855
|
|
32
|
+
- [Menu] Update `paper` slot JSDoc default from `Paper` to `PopoverPaper` (@andreachiera) (#45865) @andreachiera
|
|
33
|
+
- Update CSS variable usage in migration guide for Pigment CSS (#46038) @sai6855
|
|
34
|
+
- Remove outdated StackOverflow tag (9b9f96b) @oliviertassinari
|
|
35
|
+
- Update `@mui/icons-material` install command to use 6.x version (#45810) @Nickknack
|
|
36
|
+
- Add AccordionSummary to the breaking change migration (#45973) @siriwatknp
|
|
37
|
+
|
|
38
|
+
All contributors of this release in alphabetical order: @andreachiera, @good-jinu, @Nayeem-XTREME, @Nickknack, @oliviertassinari, @sai6855, @siriwatknp
|
|
39
|
+
|
|
40
|
+
## 6.4.11
|
|
41
|
+
|
|
42
|
+
_Apr 9, 2025_
|
|
43
|
+
|
|
44
|
+
A big thanks to the 3 contributors who made this release possible.
|
|
45
|
+
|
|
46
|
+
### `@mui/material@6.4.11`
|
|
47
|
+
|
|
48
|
+
- [AvatarGroup] Fix `spacing` prop ignoring value `0` (#45845) @Kartik-Murthy
|
|
49
|
+
- [Dialog] Deprecate composed classes (#45814) @sai6855
|
|
50
|
+
|
|
51
|
+
### `@mui/styled-engine@6.4.11`
|
|
52
|
+
|
|
53
|
+
- Add caching to improve performance for running tests with Jest (#45855) @siriwatknp
|
|
54
|
+
|
|
55
|
+
### Docs
|
|
56
|
+
|
|
57
|
+
- Add missing v7 docs banner (#45842) @DiegoAndai
|
|
58
|
+
- Add v7 is here banner (#45838) @DiegoAndai
|
|
59
|
+
- Fix lab version install instructions (#45770) @DiegoAndai
|
|
60
|
+
|
|
61
|
+
All contributors of this release in alphabetical order: @DiegoAndai, @Kartik-Murthy, @sai6855
|
|
62
|
+
|
|
3
63
|
## 6.4.10
|
|
4
64
|
|
|
5
65
|
<!-- generated comparing v6.4.9..v6.x -->
|
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
-
import { Theme } from '..';
|
|
4
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
*/
|
|
@@ -9,9 +9,13 @@ export interface DialogClasses {
|
|
|
9
9
|
container: string;
|
|
10
10
|
/** Styles applied to the Paper component. */
|
|
11
11
|
paper: string;
|
|
12
|
-
/** Styles applied to the Paper component if `scroll="paper"`.
|
|
12
|
+
/** Styles applied to the Paper component if `scroll="paper"`.
|
|
13
|
+
* @deprecated Combine the [.MuiDialog-paper](/material-ui/api/dialog/#dialog-classes-paper) and [.MuiDialog-scrollPaper](/material-ui/api/dialog/#dialog-classes-scrollPaper) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
14
|
+
*/
|
|
13
15
|
paperScrollPaper: string;
|
|
14
|
-
/** Styles applied to the Paper component if `scroll="body"`.
|
|
16
|
+
/** Styles applied to the Paper component if `scroll="body"`.
|
|
17
|
+
* @deprecated Combine the [.MuiDialog-paper](/material-ui/api/dialog/#dialog-classes-paper) and [.MuiDialog-scrollBody](/material-ui/api/dialog/#dialog-classes-scrollBody) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
18
|
+
*/
|
|
15
19
|
paperScrollBody: string;
|
|
16
20
|
/** Styles applied to the Paper component if `maxWidth=false`. */
|
|
17
21
|
paperWidthFalse: string;
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
-
import {
|
|
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
|
-
|
|
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:
|