@mui/material 6.2.0 → 6.2.1
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/Autocomplete/Autocomplete.js +6 -6
- package/AvatarGroup/AvatarGroup.js +5 -4
- package/CHANGELOG.md +35 -0
- package/CardHeader/CardHeader.js +7 -5
- package/FormControl/FormControl.js +5 -8
- package/FormLabel/FormLabel.js +5 -8
- package/Select/SelectInput.js +8 -0
- package/TextField/TextField.d.ts +1 -0
- package/TextField/TextField.js +1 -0
- package/index.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +6 -6
- package/modern/AvatarGroup/AvatarGroup.js +5 -4
- package/modern/CardHeader/CardHeader.js +7 -5
- package/modern/FormControl/FormControl.js +5 -8
- package/modern/FormLabel/FormLabel.js +5 -8
- package/modern/Select/SelectInput.js +8 -0
- package/modern/TextField/TextField.js +1 -0
- package/modern/index.js +1 -1
- package/modern/usePagination/usePagination.js +1 -1
- package/modern/version/index.js +2 -2
- package/node/Autocomplete/Autocomplete.js +6 -6
- package/node/AvatarGroup/AvatarGroup.js +5 -4
- package/node/CardHeader/CardHeader.js +7 -5
- package/node/FormControl/FormControl.js +5 -8
- package/node/FormLabel/FormLabel.js +5 -8
- package/node/Select/SelectInput.js +8 -0
- package/node/TextField/TextField.js +1 -0
- 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/usePagination/usePagination.js +1 -1
- package/version/index.js +2 -2
|
@@ -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,
|
|
@@ -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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 6.2.1
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.2.0..master -->
|
|
6
|
+
|
|
7
|
+
_Dec 17, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 10 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### `@mui/material@6.2.1`
|
|
12
|
+
|
|
13
|
+
- Update `overridesResolver` return from object to array of styles (#44752) @siddhantantil39
|
|
14
|
+
- [Pagination] Use correct `aria-current` value (#44753) @jacklaurencegaray
|
|
15
|
+
- [Select] Set `aria-required` & `aria-invalid` on `combobox` instead of hidden input (#44731) @ben-pomelo
|
|
16
|
+
|
|
17
|
+
### `@mui/system@6.2.1`
|
|
18
|
+
|
|
19
|
+
- Warns if the hex color contains trailing space (#44538) @siriwatknp
|
|
20
|
+
|
|
21
|
+
### Docs
|
|
22
|
+
|
|
23
|
+
- [material-ui][Dialog] Fix crashing of DraggableDialog demo (#44747) @sai6855
|
|
24
|
+
- [material-ui][TextField] Update `react-number-format` demo to use the recommended prop (#44743) @siriwatknp
|
|
25
|
+
- [material-ui][TextField] Add size default prop to api docs (#44714) @sai6855
|
|
26
|
+
- [material-ui][TextField] Add suffix shrink demo (#44744) @siriwatknp
|
|
27
|
+
|
|
28
|
+
### Core
|
|
29
|
+
|
|
30
|
+
- [api-docs-builder] Preserve multiline prop descriptions with `rawDescriptions` option (#44737) @vladmoroz
|
|
31
|
+
- Fix running mocha related scripts on Windows locally (#44664) @ChristopherJamesL
|
|
32
|
+
- Update `eslint-plugin-jsx-a11y` (#44701) @ZeeshanTamboli
|
|
33
|
+
- Add documentation to `useThemeProps`, `deepmerge` and `composeClasses` functions (#44703) @JCQuintas
|
|
34
|
+
- [examples] Add Theme Mode Switch to Next.js TS example (#43576) @TurtIeSocks
|
|
35
|
+
|
|
36
|
+
All contributors of this release in alphabetical order: @ben-pomelo, @ChristopherJamesL, @jacklaurencegaray, @JCQuintas, @sai6855, @siddhantantil39, @siriwatknp, @TurtIeSocks, @vladmoroz, @ZeeshanTamboli
|
|
37
|
+
|
|
3
38
|
## 6.2.0
|
|
4
39
|
|
|
5
40
|
<!-- 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',
|
|
@@ -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/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/TextField/TextField.d.ts
CHANGED
package/TextField/TextField.js
CHANGED
|
@@ -400,6 +400,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
400
400
|
SelectProps: PropTypes.object,
|
|
401
401
|
/**
|
|
402
402
|
* The size of the component.
|
|
403
|
+
* @default 'medium'
|
|
403
404
|
*/
|
|
404
405
|
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
405
406
|
/**
|
package/index.js
CHANGED
|
@@ -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,
|
|
@@ -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
|
}) => ({
|
|
@@ -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',
|
|
@@ -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',
|
|
@@ -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
|
|
@@ -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
|
*/
|
|
@@ -400,6 +400,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
400
400
|
SelectProps: PropTypes.object,
|
|
401
401
|
/**
|
|
402
402
|
* The size of the component.
|
|
403
|
+
* @default 'medium'
|
|
403
404
|
*/
|
|
404
405
|
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
405
406
|
/**
|
package/modern/index.js
CHANGED
|
@@ -95,7 +95,7 @@ export default function usePagination(props = {}) {
|
|
|
95
95
|
page: item,
|
|
96
96
|
selected: item === page,
|
|
97
97
|
disabled,
|
|
98
|
-
'aria-current': item === page ? '
|
|
98
|
+
'aria-current': item === page ? 'page' : undefined
|
|
99
99
|
} : {
|
|
100
100
|
onClick: event => {
|
|
101
101
|
handleClick(event, buttonPage(item));
|
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.2.
|
|
1
|
+
export const version = "6.2.1";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("2");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("1");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
|
@@ -264,12 +264,12 @@ const AutocompleteClearIndicator = (0, _zeroStyled.styled)(_IconButton.default,
|
|
|
264
264
|
const AutocompletePopupIndicator = (0, _zeroStyled.styled)(_IconButton.default, {
|
|
265
265
|
name: 'MuiAutocomplete',
|
|
266
266
|
slot: 'PopupIndicator',
|
|
267
|
-
overridesResolver: ({
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
267
|
+
overridesResolver: (props, styles) => {
|
|
268
|
+
const {
|
|
269
|
+
ownerState
|
|
270
|
+
} = props;
|
|
271
|
+
return [styles.popupIndicator, ownerState.popupOpen && styles.popupIndicatorOpen];
|
|
272
|
+
}
|
|
273
273
|
})({
|
|
274
274
|
padding: 2,
|
|
275
275
|
marginRight: -2,
|
|
@@ -37,10 +37,11 @@ const useUtilityClasses = ownerState => {
|
|
|
37
37
|
const AvatarGroupRoot = (0, _zeroStyled.styled)('div', {
|
|
38
38
|
name: 'MuiAvatarGroup',
|
|
39
39
|
slot: 'Root',
|
|
40
|
-
overridesResolver: (props, styles) =>
|
|
41
|
-
[
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
overridesResolver: (props, styles) => {
|
|
41
|
+
return [{
|
|
42
|
+
[`& .${_avatarGroupClasses.default.avatar}`]: styles.avatar
|
|
43
|
+
}, styles.root];
|
|
44
|
+
}
|
|
44
45
|
})((0, _memoTheme.default)(({
|
|
45
46
|
theme
|
|
46
47
|
}) => ({
|
|
@@ -33,11 +33,13 @@ const useUtilityClasses = ownerState => {
|
|
|
33
33
|
const CardHeaderRoot = (0, _zeroStyled.styled)('div', {
|
|
34
34
|
name: 'MuiCardHeader',
|
|
35
35
|
slot: 'Root',
|
|
36
|
-
overridesResolver: (props, styles) =>
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
overridesResolver: (props, styles) => {
|
|
37
|
+
return [{
|
|
38
|
+
[`& .${_cardHeaderClasses.default.title}`]: styles.title
|
|
39
|
+
}, {
|
|
40
|
+
[`& .${_cardHeaderClasses.default.subheader}`]: styles.subheader
|
|
41
|
+
}, styles.root];
|
|
42
|
+
}
|
|
41
43
|
})({
|
|
42
44
|
display: 'flex',
|
|
43
45
|
alignItems: 'center',
|
|
@@ -33,14 +33,11 @@ const useUtilityClasses = ownerState => {
|
|
|
33
33
|
const FormControlRoot = (0, _zeroStyled.styled)('div', {
|
|
34
34
|
name: 'MuiFormControl',
|
|
35
35
|
slot: 'Root',
|
|
36
|
-
overridesResolver: ({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...styles[`margin${(0, _capitalize.default)(ownerState.margin)}`],
|
|
42
|
-
...(ownerState.fullWidth && styles.fullWidth)
|
|
43
|
-
};
|
|
36
|
+
overridesResolver: (props, styles) => {
|
|
37
|
+
const {
|
|
38
|
+
ownerState
|
|
39
|
+
} = props;
|
|
40
|
+
return [styles.root, styles[`margin${(0, _capitalize.default)(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];
|
|
44
41
|
}
|
|
45
42
|
})({
|
|
46
43
|
display: 'inline-flex',
|
|
@@ -39,14 +39,11 @@ const useUtilityClasses = ownerState => {
|
|
|
39
39
|
const FormLabelRoot = exports.FormLabelRoot = (0, _zeroStyled.styled)('label', {
|
|
40
40
|
name: 'MuiFormLabel',
|
|
41
41
|
slot: 'Root',
|
|
42
|
-
overridesResolver: ({
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
...(ownerState.color === 'secondary' && styles.colorSecondary),
|
|
48
|
-
...(ownerState.filled && styles.filled)
|
|
49
|
-
};
|
|
42
|
+
overridesResolver: (props, styles) => {
|
|
43
|
+
const {
|
|
44
|
+
ownerState
|
|
45
|
+
} = props;
|
|
46
|
+
return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];
|
|
50
47
|
}
|
|
51
48
|
})((0, _memoTheme.default)(({
|
|
52
49
|
theme
|
|
@@ -140,6 +140,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
140
140
|
open: openProp,
|
|
141
141
|
readOnly,
|
|
142
142
|
renderValue,
|
|
143
|
+
required,
|
|
143
144
|
SelectDisplayProps = {},
|
|
144
145
|
tabIndex: tabIndexProp,
|
|
145
146
|
// catching `type` from Input which makes no sense for SelectInput
|
|
@@ -456,6 +457,8 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
456
457
|
"aria-label": ariaLabel,
|
|
457
458
|
"aria-labelledby": [labelId, buttonId].filter(Boolean).join(' ') || undefined,
|
|
458
459
|
"aria-describedby": ariaDescribedby,
|
|
460
|
+
"aria-required": required ? 'true' : undefined,
|
|
461
|
+
"aria-invalid": error ? 'true' : undefined,
|
|
459
462
|
onKeyDown: handleKeyDown,
|
|
460
463
|
onMouseDown: disabled || readOnly ? null : handleMouseDown,
|
|
461
464
|
onBlur: handleBlur,
|
|
@@ -483,6 +486,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
483
486
|
disabled: disabled,
|
|
484
487
|
className: classes.nativeInput,
|
|
485
488
|
autoFocus: autoFocus,
|
|
489
|
+
required: required,
|
|
486
490
|
...other,
|
|
487
491
|
ownerState: ownerState
|
|
488
492
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectIcon, {
|
|
@@ -648,6 +652,10 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
648
652
|
* @returns {ReactNode}
|
|
649
653
|
*/
|
|
650
654
|
renderValue: _propTypes.default.func,
|
|
655
|
+
/**
|
|
656
|
+
* If `true`, the component is required.
|
|
657
|
+
*/
|
|
658
|
+
required: _propTypes.default.bool,
|
|
651
659
|
/**
|
|
652
660
|
* Props applied to the clickable div element.
|
|
653
661
|
*/
|
|
@@ -407,6 +407,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
407
407
|
SelectProps: _propTypes.default.object,
|
|
408
408
|
/**
|
|
409
409
|
* The size of the component.
|
|
410
|
+
* @default 'medium'
|
|
410
411
|
*/
|
|
411
412
|
size: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
|
|
412
413
|
/**
|
package/node/index.js
CHANGED
|
@@ -101,7 +101,7 @@ function usePagination(props = {}) {
|
|
|
101
101
|
page: item,
|
|
102
102
|
selected: item === page,
|
|
103
103
|
disabled,
|
|
104
|
-
'aria-current': item === page ? '
|
|
104
|
+
'aria-current': item === page ? 'page' : undefined
|
|
105
105
|
} : {
|
|
106
106
|
onClick: event => {
|
|
107
107
|
handleClick(event, buttonPage(item));
|
package/node/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "6.2.
|
|
7
|
+
const version = exports.version = "6.2.1";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
9
|
const minor = exports.minor = Number("2");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("1");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.26.0",
|
|
31
31
|
"@popperjs/core": "^2.11.8",
|
|
32
|
-
"@types/react-transition-group": "^4.4.
|
|
32
|
+
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
34
|
"csstype": "^3.1.3",
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/utils": "^6.2.
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.2.1",
|
|
39
|
+
"@mui/utils": "^6.2.1",
|
|
40
|
+
"@mui/types": "^7.2.20",
|
|
41
|
+
"@mui/system": "^6.2.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
47
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@mui/material-pigment-css": "^6.2.
|
|
49
|
+
"@mui/material-pigment-css": "^6.2.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -11,6 +11,33 @@ export type ThemedProps<Theme, Name extends keyof any> = Theme extends {
|
|
|
11
11
|
? Props
|
|
12
12
|
: {};
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Merges input `props` with the `defaultProps` for a component that were defined in the theme.
|
|
16
|
+
*
|
|
17
|
+
* The `defaultProps` are defined in the theme under `theme.components[componentName].defaultProps`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const createTheme = () => ({
|
|
23
|
+
* components: {
|
|
24
|
+
* MuiStat: {
|
|
25
|
+
* defaultProps: {
|
|
26
|
+
* variant: 'outlined',
|
|
27
|
+
* },
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* function Stat(props) {
|
|
33
|
+
* const themeProps = useThemeProps({ props, name: 'MuiStat' });
|
|
34
|
+
* return <div {...themeProps} />;
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @param params.props The input props
|
|
39
|
+
* @param params.name The name of the component as defined in the theme
|
|
40
|
+
*/
|
|
14
41
|
export default function useThemeProps<
|
|
15
42
|
Theme extends ThemeWithProps,
|
|
16
43
|
Props,
|
|
@@ -95,7 +95,7 @@ export default function usePagination(props = {}) {
|
|
|
95
95
|
page: item,
|
|
96
96
|
selected: item === page,
|
|
97
97
|
disabled,
|
|
98
|
-
'aria-current': item === page ? '
|
|
98
|
+
'aria-current': item === page ? 'page' : undefined
|
|
99
99
|
} : {
|
|
100
100
|
onClick: event => {
|
|
101
101
|
handleClick(event, buttonPage(item));
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.2.
|
|
1
|
+
export const version = "6.2.1";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("2");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("1");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|