@mui/material 6.2.0 → 6.3.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.
- package/AccordionSummary/AccordionSummary.js +4 -3
- package/Autocomplete/Autocomplete.js +7 -7
- package/AvatarGroup/AvatarGroup.js +5 -4
- package/Backdrop/Backdrop.js +1 -9
- package/CHANGELOG.md +76 -0
- package/CardHeader/CardHeader.js +7 -5
- package/Collapse/Collapse.js +5 -4
- package/Fade/Fade.js +5 -2
- package/FilledInput/FilledInput.js +1 -3
- package/FormControl/FormControl.js +5 -8
- package/FormLabel/FormLabel.js +5 -8
- package/Grow/Grow.js +5 -2
- package/Icon/Icon.js +1 -3
- package/Input/Input.js +1 -3
- package/OutlinedInput/OutlinedInput.js +1 -3
- package/Select/SelectInput.js +8 -0
- package/Slide/Slide.js +5 -2
- package/StepContent/StepContent.d.ts +31 -2
- package/StepContent/StepContent.js +39 -7
- package/StepLabel/StepLabel.js +1 -3
- package/SvgIcon/SvgIcon.js +1 -3
- package/TablePagination/TablePagination.d.ts +134 -18
- package/TablePagination/TablePagination.js +89 -33
- package/TextField/TextField.d.ts +1 -0
- package/TextField/TextField.js +1 -0
- package/Zoom/Zoom.js +5 -2
- package/index.js +1 -1
- package/modern/AccordionSummary/AccordionSummary.js +4 -3
- package/modern/Autocomplete/Autocomplete.js +7 -7
- package/modern/AvatarGroup/AvatarGroup.js +5 -4
- package/modern/Backdrop/Backdrop.js +1 -9
- package/modern/CardHeader/CardHeader.js +7 -5
- package/modern/Collapse/Collapse.js +5 -4
- package/modern/Fade/Fade.js +5 -2
- package/modern/FilledInput/FilledInput.js +1 -3
- package/modern/FormControl/FormControl.js +5 -8
- package/modern/FormLabel/FormLabel.js +5 -8
- package/modern/Grow/Grow.js +5 -2
- package/modern/Icon/Icon.js +1 -3
- package/modern/Input/Input.js +1 -3
- package/modern/OutlinedInput/OutlinedInput.js +1 -3
- package/modern/Select/SelectInput.js +8 -0
- package/modern/Slide/Slide.js +5 -2
- package/modern/StepContent/StepContent.js +39 -7
- package/modern/StepLabel/StepLabel.js +1 -3
- package/modern/SvgIcon/SvgIcon.js +1 -3
- package/modern/TablePagination/TablePagination.js +89 -33
- package/modern/TextField/TextField.js +1 -0
- package/modern/Zoom/Zoom.js +5 -2
- package/modern/index.js +1 -1
- package/modern/usePagination/usePagination.js +1 -1
- package/modern/version/index.js +2 -2
- package/node/AccordionSummary/AccordionSummary.js +4 -3
- package/node/Autocomplete/Autocomplete.js +7 -7
- package/node/AvatarGroup/AvatarGroup.js +5 -4
- package/node/Backdrop/Backdrop.js +1 -9
- package/node/CardHeader/CardHeader.js +7 -5
- package/node/Collapse/Collapse.js +5 -4
- package/node/Fade/Fade.js +5 -2
- package/node/FilledInput/FilledInput.js +1 -3
- package/node/FormControl/FormControl.js +5 -8
- package/node/FormLabel/FormLabel.js +5 -8
- package/node/Grow/Grow.js +5 -2
- package/node/Icon/Icon.js +1 -3
- package/node/Input/Input.js +1 -3
- package/node/OutlinedInput/OutlinedInput.js +1 -3
- package/node/Select/SelectInput.js +8 -0
- package/node/Slide/Slide.js +5 -2
- package/node/StepContent/StepContent.js +39 -7
- package/node/StepLabel/StepLabel.js +1 -3
- package/node/SvgIcon/SvgIcon.js +1 -3
- package/node/TablePagination/TablePagination.js +89 -33
- package/node/TextField/TextField.js +1 -0
- package/node/Zoom/Zoom.js +5 -2
- package/node/index.js +1 -1
- package/node/usePagination/usePagination.js +1 -1
- package/node/version/index.js +2 -2
- package/package.json +7 -7
- package/styles/useThemeProps.d.ts +27 -0
- package/useAutocomplete/useAutocomplete.d.ts +20 -5
- package/usePagination/usePagination.js +1 -1
- package/version/index.js +2 -2
|
@@ -38,6 +38,7 @@ const AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
38
38
|
};
|
|
39
39
|
return {
|
|
40
40
|
display: 'flex',
|
|
41
|
+
width: '100%',
|
|
41
42
|
minHeight: 48,
|
|
42
43
|
padding: theme.spacing(0, 2),
|
|
43
44
|
transition: theme.transitions.create(['min-height', 'background-color'], transition),
|
|
@@ -60,7 +61,7 @@ const AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
60
61
|
}]
|
|
61
62
|
};
|
|
62
63
|
}));
|
|
63
|
-
const AccordionSummaryContent = styled('
|
|
64
|
+
const AccordionSummaryContent = styled('span', {
|
|
64
65
|
name: 'MuiAccordionSummary',
|
|
65
66
|
slot: 'Content',
|
|
66
67
|
overridesResolver: (props, styles) => styles.content
|
|
@@ -68,6 +69,7 @@ const AccordionSummaryContent = styled('div', {
|
|
|
68
69
|
theme
|
|
69
70
|
}) => ({
|
|
70
71
|
display: 'flex',
|
|
72
|
+
textAlign: 'start',
|
|
71
73
|
flexGrow: 1,
|
|
72
74
|
margin: '12px 0',
|
|
73
75
|
variants: [{
|
|
@@ -82,7 +84,7 @@ const AccordionSummaryContent = styled('div', {
|
|
|
82
84
|
}
|
|
83
85
|
}]
|
|
84
86
|
})));
|
|
85
|
-
const AccordionSummaryExpandIconWrapper = styled('
|
|
87
|
+
const AccordionSummaryExpandIconWrapper = styled('span', {
|
|
86
88
|
name: 'MuiAccordionSummary',
|
|
87
89
|
slot: 'ExpandIconWrapper',
|
|
88
90
|
overridesResolver: (props, styles) => styles.expandIconWrapper
|
|
@@ -137,7 +139,6 @@ const AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary
|
|
|
137
139
|
focusRipple: false,
|
|
138
140
|
disableRipple: true,
|
|
139
141
|
disabled: disabled,
|
|
140
|
-
component: "div",
|
|
141
142
|
"aria-expanded": expanded,
|
|
142
143
|
className: clsx(classes.root, className),
|
|
143
144
|
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
@@ -251,12 +251,12 @@ const AutocompleteClearIndicator = styled(IconButton, {
|
|
|
251
251
|
const AutocompletePopupIndicator = styled(IconButton, {
|
|
252
252
|
name: 'MuiAutocomplete',
|
|
253
253
|
slot: 'PopupIndicator',
|
|
254
|
-
overridesResolver: ({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
254
|
+
overridesResolver: (props, styles) => {
|
|
255
|
+
const {
|
|
256
|
+
ownerState
|
|
257
|
+
} = props;
|
|
258
|
+
return [styles.popupIndicator, ownerState.popupOpen && styles.popupIndicatorOpen];
|
|
259
|
+
}
|
|
260
260
|
})({
|
|
261
261
|
padding: 2,
|
|
262
262
|
marginRight: -2,
|
|
@@ -952,7 +952,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
952
952
|
* If provided, the options will be grouped under the returned string.
|
|
953
953
|
* The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
|
|
954
954
|
*
|
|
955
|
-
* @param {Value}
|
|
955
|
+
* @param {Value} option The Autocomplete option.
|
|
956
956
|
* @returns {string}
|
|
957
957
|
*/
|
|
958
958
|
groupBy: PropTypes.func,
|
|
@@ -30,10 +30,11 @@ const useUtilityClasses = ownerState => {
|
|
|
30
30
|
const AvatarGroupRoot = styled('div', {
|
|
31
31
|
name: 'MuiAvatarGroup',
|
|
32
32
|
slot: 'Root',
|
|
33
|
-
overridesResolver: (props, styles) =>
|
|
34
|
-
[
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
overridesResolver: (props, styles) => {
|
|
34
|
+
return [{
|
|
35
|
+
[`& .${avatarGroupClasses.avatar}`]: styles.avatar
|
|
36
|
+
}, styles.root];
|
|
37
|
+
}
|
|
37
38
|
})(memoTheme(({
|
|
38
39
|
theme
|
|
39
40
|
}) => ({
|
package/Backdrop/Backdrop.js
CHANGED
|
@@ -10,13 +10,6 @@ import useSlot from "../utils/useSlot.js";
|
|
|
10
10
|
import Fade from "../Fade/index.js";
|
|
11
11
|
import { getBackdropUtilityClass } from "./backdropClasses.js";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const removeOwnerState = props => {
|
|
14
|
-
const {
|
|
15
|
-
ownerState,
|
|
16
|
-
...rest
|
|
17
|
-
} = props;
|
|
18
|
-
return rest;
|
|
19
|
-
};
|
|
20
13
|
const useUtilityClasses = ownerState => {
|
|
21
14
|
const {
|
|
22
15
|
classes,
|
|
@@ -105,12 +98,11 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
105
98
|
externalForwardedProps,
|
|
106
99
|
ownerState
|
|
107
100
|
});
|
|
108
|
-
const transitionPropsRemoved = removeOwnerState(transitionProps);
|
|
109
101
|
return /*#__PURE__*/_jsx(TransitionSlot, {
|
|
110
102
|
in: open,
|
|
111
103
|
timeout: transitionDuration,
|
|
112
104
|
...other,
|
|
113
|
-
...
|
|
105
|
+
...transitionProps,
|
|
114
106
|
children: /*#__PURE__*/_jsx(RootSlot, {
|
|
115
107
|
"aria-hidden": true,
|
|
116
108
|
...rootProps,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.2.1..master -->
|
|
6
|
+
|
|
7
|
+
_Dec 23, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- Fix invalid HTML structure in the Accordion component (#44408) @ZeeshanTamboli
|
|
12
|
+
The HTML elements of the Accordion summary have been updated:
|
|
13
|
+
- the root element is now button (previously div).
|
|
14
|
+
- summary content and the icon wrapper are now span (previously div).
|
|
15
|
+
This will only impact you if you used the HTML element as selectors in your styles.
|
|
16
|
+
|
|
17
|
+
### `@mui/material@6.3.0`
|
|
18
|
+
|
|
19
|
+
- [Accordion] Fix invalid HTML inside heading (#44408) @ZeeshanTamboli
|
|
20
|
+
- [useAutocomplete] Improve TS typing of `groupedOptions` prop (#44657) @lewxdev
|
|
21
|
+
- Prevent `ownerState` propagation for transition slots (#44401) @ZeeshanTamboli
|
|
22
|
+
- [StepContent] Add slots and slotProps (#44742) @sai6855
|
|
23
|
+
- [TablePagination] Add the rest of `slots` and `slotProps`. (#44570) @siriwatknp
|
|
24
|
+
|
|
25
|
+
### `@mui/system@6.3.0`
|
|
26
|
+
|
|
27
|
+
- Set `before` directly without using prepend for global styles (#44648) @siriwatknp
|
|
28
|
+
|
|
29
|
+
### Docs
|
|
30
|
+
|
|
31
|
+
- [material-ui] Improve `theme.applyStyles()` docs (#44658) @DiegoAndai
|
|
32
|
+
- [material-ui] Update MD callout (#43958) @aarongarciah
|
|
33
|
+
|
|
34
|
+
### Core
|
|
35
|
+
|
|
36
|
+
- Remove unnecessary conditional around `.muiName =` (#44071) @Janpot
|
|
37
|
+
- [blog] Material UI: 2024 EOY updates blog post (#44722) @alelthomas
|
|
38
|
+
- Fix quickstart command in pigment docs (#44806) @yash49
|
|
39
|
+
- [docs-infra] Remove Next.js production profiler (#44823) @romgrk
|
|
40
|
+
- [docs-infra] Remove no longer support `optimizeFonts` Next.js option (#44802) @LukasTy
|
|
41
|
+
|
|
42
|
+
All contributors of this release in alphabetical order: @aarongarciah, @alelthomas, @DiegoAndai, @Janpot, @lewxdev, @LukasTy, @romgrk, @sai6855, @siriwatknp, @yash49, @ZeeshanTamboli
|
|
43
|
+
|
|
44
|
+
## 6.2.1
|
|
45
|
+
|
|
46
|
+
<!-- generated comparing v6.2.0..master -->
|
|
47
|
+
|
|
48
|
+
_Dec 17, 2024_
|
|
49
|
+
|
|
50
|
+
A big thanks to the 10 contributors who made this release possible.
|
|
51
|
+
|
|
52
|
+
### `@mui/material@6.2.1`
|
|
53
|
+
|
|
54
|
+
- Update `overridesResolver` return from object to array of styles (#44752) @siddhantantil39
|
|
55
|
+
- [Pagination] Use correct `aria-current` value (#44753) @jacklaurencegaray
|
|
56
|
+
- [Select] Set `aria-required` & `aria-invalid` on `combobox` instead of hidden input (#44731) @ben-pomelo
|
|
57
|
+
|
|
58
|
+
### `@mui/system@6.2.1`
|
|
59
|
+
|
|
60
|
+
- Warns if the hex color contains trailing space (#44538) @siriwatknp
|
|
61
|
+
|
|
62
|
+
### Docs
|
|
63
|
+
|
|
64
|
+
- [material-ui][Dialog] Fix crashing of DraggableDialog demo (#44747) @sai6855
|
|
65
|
+
- [material-ui][TextField] Update `react-number-format` demo to use the recommended prop (#44743) @siriwatknp
|
|
66
|
+
- [material-ui][TextField] Add size default prop to api docs (#44714) @sai6855
|
|
67
|
+
- [material-ui][TextField] Add suffix shrink demo (#44744) @siriwatknp
|
|
68
|
+
|
|
69
|
+
### Core
|
|
70
|
+
|
|
71
|
+
- [api-docs-builder] Preserve multiline prop descriptions with `rawDescriptions` option (#44737) @vladmoroz
|
|
72
|
+
- Fix running mocha related scripts on Windows locally (#44664) @ChristopherJamesL
|
|
73
|
+
- Update `eslint-plugin-jsx-a11y` (#44701) @ZeeshanTamboli
|
|
74
|
+
- Add documentation to `useThemeProps`, `deepmerge` and `composeClasses` functions (#44703) @JCQuintas
|
|
75
|
+
- [examples] Add Theme Mode Switch to Next.js TS example (#43576) @TurtIeSocks
|
|
76
|
+
|
|
77
|
+
All contributors of this release in alphabetical order: @ben-pomelo, @ChristopherJamesL, @jacklaurencegaray, @JCQuintas, @sai6855, @siddhantantil39, @siriwatknp, @TurtIeSocks, @vladmoroz, @ZeeshanTamboli
|
|
78
|
+
|
|
3
79
|
## 6.2.0
|
|
4
80
|
|
|
5
81
|
<!-- generated comparing v6.1.10..master -->
|
package/CardHeader/CardHeader.js
CHANGED
|
@@ -26,11 +26,13 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
const CardHeaderRoot = styled('div', {
|
|
27
27
|
name: 'MuiCardHeader',
|
|
28
28
|
slot: 'Root',
|
|
29
|
-
overridesResolver: (props, styles) =>
|
|
30
|
-
[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
overridesResolver: (props, styles) => {
|
|
30
|
+
return [{
|
|
31
|
+
[`& .${cardHeaderClasses.title}`]: styles.title
|
|
32
|
+
}, {
|
|
33
|
+
[`& .${cardHeaderClasses.subheader}`]: styles.subheader
|
|
34
|
+
}, styles.root];
|
|
35
|
+
}
|
|
34
36
|
})({
|
|
35
37
|
display: 'flex',
|
|
36
38
|
alignItems: 'center',
|
package/Collapse/Collapse.js
CHANGED
|
@@ -272,7 +272,10 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
272
272
|
nodeRef: nodeRef,
|
|
273
273
|
timeout: timeout === 'auto' ? null : timeout,
|
|
274
274
|
...other,
|
|
275
|
-
children: (state,
|
|
275
|
+
children: (state, {
|
|
276
|
+
ownerState: incomingOwnerState,
|
|
277
|
+
...restChildProps
|
|
278
|
+
}) => /*#__PURE__*/_jsx(CollapseRoot, {
|
|
276
279
|
as: component,
|
|
277
280
|
className: clsx(classes.root, className, {
|
|
278
281
|
'entered': classes.entered,
|
|
@@ -283,13 +286,11 @@ const Collapse = /*#__PURE__*/React.forwardRef(function Collapse(inProps, ref) {
|
|
|
283
286
|
...style
|
|
284
287
|
},
|
|
285
288
|
ref: handleRef,
|
|
286
|
-
...childProps,
|
|
287
|
-
// `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
|
|
288
|
-
// that might have been forwarded from the Transition component.
|
|
289
289
|
ownerState: {
|
|
290
290
|
...ownerState,
|
|
291
291
|
state
|
|
292
292
|
},
|
|
293
|
+
...restChildProps,
|
|
293
294
|
children: /*#__PURE__*/_jsx(CollapseWrapper, {
|
|
294
295
|
ownerState: {
|
|
295
296
|
...ownerState,
|
package/Fade/Fade.js
CHANGED
|
@@ -114,7 +114,10 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
114
114
|
addEndListener: handleAddEndListener,
|
|
115
115
|
timeout: timeout,
|
|
116
116
|
...other,
|
|
117
|
-
children: (state,
|
|
117
|
+
children: (state, {
|
|
118
|
+
ownerState,
|
|
119
|
+
...restChildProps
|
|
120
|
+
}) => {
|
|
118
121
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
119
122
|
style: {
|
|
120
123
|
opacity: 0,
|
|
@@ -124,7 +127,7 @@ const Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {
|
|
|
124
127
|
...children.props.style
|
|
125
128
|
},
|
|
126
129
|
ref: handleRef,
|
|
127
|
-
...
|
|
130
|
+
...restChildProps
|
|
128
131
|
});
|
|
129
132
|
}
|
|
130
133
|
});
|
|
@@ -512,7 +512,5 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
|
|
|
512
512
|
*/
|
|
513
513
|
value: PropTypes.any
|
|
514
514
|
} : void 0;
|
|
515
|
-
|
|
516
|
-
FilledInput.muiName = 'Input';
|
|
517
|
-
}
|
|
515
|
+
FilledInput.muiName = 'Input';
|
|
518
516
|
export default FilledInput;
|
|
@@ -26,14 +26,11 @@ const useUtilityClasses = ownerState => {
|
|
|
26
26
|
const FormControlRoot = styled('div', {
|
|
27
27
|
name: 'MuiFormControl',
|
|
28
28
|
slot: 'Root',
|
|
29
|
-
overridesResolver: ({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...styles[`margin${capitalize(ownerState.margin)}`],
|
|
35
|
-
...(ownerState.fullWidth && styles.fullWidth)
|
|
36
|
-
};
|
|
29
|
+
overridesResolver: (props, styles) => {
|
|
30
|
+
const {
|
|
31
|
+
ownerState
|
|
32
|
+
} = props;
|
|
33
|
+
return [styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];
|
|
37
34
|
}
|
|
38
35
|
})({
|
|
39
36
|
display: 'inline-flex',
|
package/FormLabel/FormLabel.js
CHANGED
|
@@ -32,14 +32,11 @@ const useUtilityClasses = ownerState => {
|
|
|
32
32
|
export const FormLabelRoot = styled('label', {
|
|
33
33
|
name: 'MuiFormLabel',
|
|
34
34
|
slot: 'Root',
|
|
35
|
-
overridesResolver: ({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
...(ownerState.color === 'secondary' && styles.colorSecondary),
|
|
41
|
-
...(ownerState.filled && styles.filled)
|
|
42
|
-
};
|
|
35
|
+
overridesResolver: (props, styles) => {
|
|
36
|
+
const {
|
|
37
|
+
ownerState
|
|
38
|
+
} = props;
|
|
39
|
+
return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];
|
|
43
40
|
}
|
|
44
41
|
})(memoTheme(({
|
|
45
42
|
theme
|
package/Grow/Grow.js
CHANGED
|
@@ -163,7 +163,10 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
163
163
|
addEndListener: handleAddEndListener,
|
|
164
164
|
timeout: timeout === 'auto' ? null : timeout,
|
|
165
165
|
...other,
|
|
166
|
-
children: (state,
|
|
166
|
+
children: (state, {
|
|
167
|
+
ownerState,
|
|
168
|
+
...restChildProps
|
|
169
|
+
}) => {
|
|
167
170
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
168
171
|
style: {
|
|
169
172
|
opacity: 0,
|
|
@@ -174,7 +177,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
174
177
|
...children.props.style
|
|
175
178
|
},
|
|
176
179
|
ref: handleRef,
|
|
177
|
-
...
|
|
180
|
+
...restChildProps
|
|
178
181
|
});
|
|
179
182
|
}
|
|
180
183
|
});
|
package/Icon/Icon.js
CHANGED
|
@@ -181,7 +181,5 @@ process.env.NODE_ENV !== "production" ? Icon.propTypes /* remove-proptypes */ =
|
|
|
181
181
|
*/
|
|
182
182
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
183
183
|
} : void 0;
|
|
184
|
-
|
|
185
|
-
Icon.muiName = 'Icon';
|
|
186
|
-
}
|
|
184
|
+
Icon.muiName = 'Icon';
|
|
187
185
|
export default Icon;
|
package/Input/Input.js
CHANGED
|
@@ -406,7 +406,5 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
|
|
|
406
406
|
*/
|
|
407
407
|
value: PropTypes.any
|
|
408
408
|
} : void 0;
|
|
409
|
-
|
|
410
|
-
OutlinedInput.muiName = 'Input';
|
|
411
|
-
}
|
|
409
|
+
OutlinedInput.muiName = 'Input';
|
|
412
410
|
export default OutlinedInput;
|
package/Select/SelectInput.js
CHANGED
|
@@ -133,6 +133,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
133
133
|
open: openProp,
|
|
134
134
|
readOnly,
|
|
135
135
|
renderValue,
|
|
136
|
+
required,
|
|
136
137
|
SelectDisplayProps = {},
|
|
137
138
|
tabIndex: tabIndexProp,
|
|
138
139
|
// catching `type` from Input which makes no sense for SelectInput
|
|
@@ -449,6 +450,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
449
450
|
"aria-label": ariaLabel,
|
|
450
451
|
"aria-labelledby": [labelId, buttonId].filter(Boolean).join(' ') || undefined,
|
|
451
452
|
"aria-describedby": ariaDescribedby,
|
|
453
|
+
"aria-required": required ? 'true' : undefined,
|
|
454
|
+
"aria-invalid": error ? 'true' : undefined,
|
|
452
455
|
onKeyDown: handleKeyDown,
|
|
453
456
|
onMouseDown: disabled || readOnly ? null : handleMouseDown,
|
|
454
457
|
onBlur: handleBlur,
|
|
@@ -476,6 +479,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
476
479
|
disabled: disabled,
|
|
477
480
|
className: classes.nativeInput,
|
|
478
481
|
autoFocus: autoFocus,
|
|
482
|
+
required: required,
|
|
479
483
|
...other,
|
|
480
484
|
ownerState: ownerState
|
|
481
485
|
}), /*#__PURE__*/_jsx(SelectIcon, {
|
|
@@ -641,6 +645,10 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
641
645
|
* @returns {ReactNode}
|
|
642
646
|
*/
|
|
643
647
|
renderValue: PropTypes.func,
|
|
648
|
+
/**
|
|
649
|
+
* If `true`, the component is required.
|
|
650
|
+
*/
|
|
651
|
+
required: PropTypes.bool,
|
|
644
652
|
/**
|
|
645
653
|
* Props applied to the clickable div element.
|
|
646
654
|
*/
|
package/Slide/Slide.js
CHANGED
|
@@ -217,7 +217,10 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
217
217
|
in: inProp,
|
|
218
218
|
timeout: timeout,
|
|
219
219
|
...other,
|
|
220
|
-
children: (state,
|
|
220
|
+
children: (state, {
|
|
221
|
+
ownerState,
|
|
222
|
+
...restChildProps
|
|
223
|
+
}) => {
|
|
221
224
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
222
225
|
ref: handleRef,
|
|
223
226
|
style: {
|
|
@@ -225,7 +228,7 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
225
228
|
...style,
|
|
226
229
|
...children.props.style
|
|
227
230
|
},
|
|
228
|
-
...
|
|
231
|
+
...restChildProps
|
|
229
232
|
});
|
|
230
233
|
}
|
|
231
234
|
});
|
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
-
import { InternalStandardProps as StandardProps } from '..';
|
|
3
|
+
import { CollapseProps, InternalStandardProps as StandardProps } from '..';
|
|
4
4
|
import { Theme } from '../styles';
|
|
5
5
|
import { TransitionProps } from '../transitions/transition';
|
|
6
6
|
import { StepContentClasses } from './stepContentClasses';
|
|
7
|
+
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
|
7
8
|
|
|
8
|
-
export interface
|
|
9
|
+
export interface StepContentSlots {
|
|
10
|
+
/**
|
|
11
|
+
* The component that renders the transition slot.
|
|
12
|
+
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
13
|
+
* @default Collapse
|
|
14
|
+
*/
|
|
15
|
+
transition?: React.JSXElementConstructor<
|
|
16
|
+
TransitionProps & { children?: React.ReactElement<unknown, any> }
|
|
17
|
+
>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type StepContentSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
21
|
+
StepContentSlots,
|
|
22
|
+
{
|
|
23
|
+
/**
|
|
24
|
+
* Props forwared to the transition slot.
|
|
25
|
+
* By default, the available props are based on the [Collapse](https://mui.com/material-ui/api/collapse/#props) component
|
|
26
|
+
*/
|
|
27
|
+
transition: SlotProps<React.ElementType<CollapseProps>, {}, StepContentOwnerState>;
|
|
28
|
+
}
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export interface StepContentOwnerState extends StepContentProps {}
|
|
32
|
+
|
|
33
|
+
export interface StepContentProps
|
|
34
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>>,
|
|
35
|
+
StepContentSlotsAndSlotProps {
|
|
9
36
|
/**
|
|
10
37
|
* The content of the component.
|
|
11
38
|
*/
|
|
@@ -22,6 +49,7 @@ export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTM
|
|
|
22
49
|
* The component used for the transition.
|
|
23
50
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
24
51
|
* @default Collapse
|
|
52
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
25
53
|
*/
|
|
26
54
|
TransitionComponent?: React.JSXElementConstructor<
|
|
27
55
|
TransitionProps & { children: React.ReactElement<unknown, any> }
|
|
@@ -37,6 +65,7 @@ export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTM
|
|
|
37
65
|
/**
|
|
38
66
|
* Props applied to the transition element.
|
|
39
67
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
68
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
40
69
|
*/
|
|
41
70
|
TransitionProps?: TransitionProps;
|
|
42
71
|
}
|
|
@@ -11,6 +11,7 @@ import Collapse from "../Collapse/index.js";
|
|
|
11
11
|
import StepperContext from "../Stepper/StepperContext.js";
|
|
12
12
|
import StepContext from "../Step/StepContext.js";
|
|
13
13
|
import { getStepContentUtilityClass } from "./stepContentClasses.js";
|
|
14
|
+
import useSlot from "../utils/useSlot.js";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const useUtilityClasses = ownerState => {
|
|
16
17
|
const {
|
|
@@ -66,6 +67,8 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
66
67
|
TransitionComponent = Collapse,
|
|
67
68
|
transitionDuration: transitionDurationProp = 'auto',
|
|
68
69
|
TransitionProps,
|
|
70
|
+
slots = {},
|
|
71
|
+
slotProps = {},
|
|
69
72
|
...other
|
|
70
73
|
} = props;
|
|
71
74
|
const {
|
|
@@ -90,19 +93,32 @@ const StepContent = /*#__PURE__*/React.forwardRef(function StepContent(inProps,
|
|
|
90
93
|
if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
|
|
91
94
|
transitionDuration = undefined;
|
|
92
95
|
}
|
|
96
|
+
const externalForwardedProps = {
|
|
97
|
+
slots,
|
|
98
|
+
slotProps: {
|
|
99
|
+
transition: TransitionProps,
|
|
100
|
+
...slotProps
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
|
104
|
+
elementType: StepContentTransition,
|
|
105
|
+
externalForwardedProps,
|
|
106
|
+
ownerState,
|
|
107
|
+
className: classes.transition,
|
|
108
|
+
additionalProps: {
|
|
109
|
+
in: active || expanded,
|
|
110
|
+
timeout: transitionDuration,
|
|
111
|
+
unmountOnExit: true
|
|
112
|
+
}
|
|
113
|
+
});
|
|
93
114
|
return /*#__PURE__*/_jsx(StepContentRoot, {
|
|
94
115
|
className: clsx(classes.root, className),
|
|
95
116
|
ref: ref,
|
|
96
117
|
ownerState: ownerState,
|
|
97
118
|
...other,
|
|
98
|
-
children: /*#__PURE__*/_jsx(
|
|
119
|
+
children: /*#__PURE__*/_jsx(TransitionSlot, {
|
|
99
120
|
as: TransitionComponent,
|
|
100
|
-
|
|
101
|
-
className: classes.transition,
|
|
102
|
-
ownerState: ownerState,
|
|
103
|
-
timeout: transitionDuration,
|
|
104
|
-
unmountOnExit: true,
|
|
105
|
-
...TransitionProps,
|
|
121
|
+
...transitionProps,
|
|
106
122
|
children: children
|
|
107
123
|
})
|
|
108
124
|
});
|
|
@@ -124,6 +140,20 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
124
140
|
* @ignore
|
|
125
141
|
*/
|
|
126
142
|
className: PropTypes.string,
|
|
143
|
+
/**
|
|
144
|
+
* The props used for each slot inside.
|
|
145
|
+
* @default {}
|
|
146
|
+
*/
|
|
147
|
+
slotProps: PropTypes.shape({
|
|
148
|
+
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
149
|
+
}),
|
|
150
|
+
/**
|
|
151
|
+
* The components used for each slot inside.
|
|
152
|
+
* @default {}
|
|
153
|
+
*/
|
|
154
|
+
slots: PropTypes.shape({
|
|
155
|
+
transition: PropTypes.elementType
|
|
156
|
+
}),
|
|
127
157
|
/**
|
|
128
158
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
129
159
|
*/
|
|
@@ -132,6 +162,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
132
162
|
* The component used for the transition.
|
|
133
163
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
134
164
|
* @default Collapse
|
|
165
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
135
166
|
*/
|
|
136
167
|
TransitionComponent: PropTypes.elementType,
|
|
137
168
|
/**
|
|
@@ -149,6 +180,7 @@ process.env.NODE_ENV !== "production" ? StepContent.propTypes /* remove-proptype
|
|
|
149
180
|
/**
|
|
150
181
|
* Props applied to the transition element.
|
|
151
182
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
183
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
152
184
|
*/
|
|
153
185
|
TransitionProps: PropTypes.object
|
|
154
186
|
} : void 0;
|
package/StepLabel/StepLabel.js
CHANGED
|
@@ -267,7 +267,5 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
267
267
|
*/
|
|
268
268
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
269
269
|
} : void 0;
|
|
270
|
-
|
|
271
|
-
StepLabel.muiName = 'StepLabel';
|
|
272
|
-
}
|
|
270
|
+
StepLabel.muiName = 'StepLabel';
|
|
273
271
|
export default StepLabel;
|
package/SvgIcon/SvgIcon.js
CHANGED