@mui/material 6.4.8 → 6.4.10
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/Accordion/Accordion.d.ts +3 -3
- package/AccordionActions/AccordionActions.d.ts +2 -2
- package/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +3 -3
- package/Alert/Alert.d.ts +3 -3
- package/AlertTitle/AlertTitle.d.ts +3 -3
- package/AppBar/AppBar.d.ts +3 -3
- package/Autocomplete/Autocomplete.d.ts +2 -2
- package/Autocomplete/Autocomplete.js +1 -1
- package/Avatar/Avatar.d.ts +2 -2
- package/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/Backdrop/Backdrop.d.ts +3 -3
- package/Badge/Badge.d.ts +3 -3
- package/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
- package/Box/Box.d.ts +2 -2
- package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/Button/Button.d.ts +4 -4
- package/ButtonBase/ButtonBase.d.ts +2 -2
- package/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/CHANGELOG.md +54 -0
- package/Card/Card.d.ts +3 -3
- package/CardActionArea/CardActionArea.d.ts +3 -3
- package/CardActions/CardActions.d.ts +2 -2
- package/CardContent/CardContent.d.ts +2 -2
- package/CardHeader/CardHeader.d.ts +2 -2
- package/CardMedia/CardMedia.d.ts +2 -2
- package/Checkbox/Checkbox.d.ts +4 -4
- package/Chip/Chip.d.ts +2 -2
- package/CircularProgress/CircularProgress.d.ts +2 -2
- package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
- package/ClickAwayListener/ClickAwayListener.js +3 -3
- package/Collapse/Collapse.d.ts +5 -5
- package/Container/Container.d.ts +2 -2
- package/CssBaseline/CssBaseline.d.ts +2 -2
- package/Dialog/Dialog.d.ts +3 -3
- package/DialogActions/DialogActions.d.ts +2 -2
- package/DialogContent/DialogContent.d.ts +2 -2
- package/DialogContentText/DialogContentText.d.ts +3 -3
- package/DialogTitle/DialogTitle.d.ts +3 -3
- package/Divider/Divider.d.ts +3 -3
- package/Drawer/Drawer.d.ts +3 -3
- package/Fab/Fab.d.ts +3 -3
- package/Fade/Fade.d.ts +3 -3
- package/FilledInput/FilledInput.d.ts +3 -3
- package/FormControl/FormControl.d.ts +6 -6
- package/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/FormGroup/FormGroup.d.ts +3 -3
- package/FormHelperText/FormHelperText.d.ts +2 -2
- package/FormLabel/FormLabel.d.ts +4 -4
- package/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/Grid/Grid.d.ts +2 -2
- package/Grid2/Grid2.d.ts +2 -2
- package/Grid2/Grid2.js +2 -2
- package/Grow/Grow.d.ts +5 -5
- package/Hidden/Hidden.d.ts +2 -2
- package/Icon/Icon.d.ts +3 -3
- package/IconButton/IconButton.d.ts +4 -4
- package/ImageList/ImageList.d.ts +2 -2
- package/ImageListItem/ImageListItem.d.ts +2 -2
- package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/Input/Input.d.ts +3 -3
- package/InputAdornment/InputAdornment.d.ts +2 -2
- package/InputBase/InputBase.d.ts +2 -2
- package/InputLabel/InputLabel.d.ts +3 -3
- package/LinearProgress/LinearProgress.d.ts +2 -2
- package/Link/Link.d.ts +4 -4
- package/List/List.d.ts +3 -3
- package/ListItem/ListItem.d.ts +3 -3
- package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/ListItemButton/ListItemButton.d.ts +3 -3
- package/ListItemIcon/ListItemIcon.d.ts +2 -2
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/ListItemText/ListItemText.d.ts +2 -2
- package/ListSubheader/ListSubheader.d.ts +2 -2
- package/Menu/Menu.d.ts +4 -4
- package/MenuItem/MenuItem.d.ts +3 -3
- package/MenuList/MenuList.d.ts +4 -4
- package/MobileStepper/MobileStepper.d.ts +3 -3
- package/Modal/Modal.d.ts +7 -7
- package/NativeSelect/NativeSelect.d.ts +3 -3
- package/NoSsr/NoSsr.d.ts +2 -2
- package/NoSsr/NoSsr.js +2 -2
- package/OutlinedInput/OutlinedInput.d.ts +3 -3
- package/Pagination/Pagination.d.ts +2 -2
- package/PaginationItem/PaginationItem.d.ts +2 -2
- package/Paper/Paper.d.ts +3 -3
- package/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/PigmentContainer/PigmentContainer.js +2 -2
- package/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/PigmentGrid/PigmentGrid.js +2 -2
- package/PigmentHidden/PigmentHidden.d.ts +2 -2
- package/PigmentHidden/PigmentHidden.js +2 -2
- package/PigmentStack/PigmentStack.d.ts +2 -2
- package/PigmentStack/PigmentStack.js +2 -2
- package/Popover/Popover.d.ts +5 -6
- package/Popover/Popover.js +1 -1
- package/Popper/Popper.d.ts +4 -4
- package/Popper/Popper.js +4 -4
- package/Portal/Portal.d.ts +2 -2
- package/Portal/Portal.js +2 -2
- package/README.md +4 -2
- package/Radio/Radio.d.ts +3 -3
- package/RadioGroup/RadioGroup.d.ts +3 -3
- package/Rating/Rating.d.ts +2 -2
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
- package/Select/Select.d.ts +3 -3
- package/Skeleton/Skeleton.d.ts +2 -2
- package/Slide/Slide.d.ts +4 -4
- package/Slider/Slider.d.ts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/SpeedDial/SpeedDial.d.ts +2 -2
- package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
- package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
- package/Stack/Stack.d.ts +2 -2
- package/Step/Step.d.ts +2 -2
- package/StepButton/StepButton.d.ts +3 -3
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepIcon/StepIcon.d.ts +3 -3
- package/StepLabel/StepLabel.d.ts +21 -3
- package/StepLabel/StepLabel.js +14 -5
- package/Stepper/Stepper.d.ts +2 -2
- package/SvgIcon/SvgIcon.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
- package/Switch/Switch.d.ts +78 -5
- package/Switch/Switch.js +71 -9
- package/Tab/Tab.d.ts +3 -3
- package/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/Table/Table.d.ts +2 -2
- package/TableBody/TableBody.d.ts +2 -2
- package/TableCell/TableCell.d.ts +2 -2
- package/TableContainer/TableContainer.d.ts +2 -2
- package/TableFooter/TableFooter.d.ts +2 -2
- package/TableHead/TableHead.d.ts +2 -2
- package/TablePagination/TablePagination.d.ts +4 -4
- package/TableRow/TableRow.d.ts +2 -2
- package/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/Tabs/Tabs.d.ts +2 -2
- package/Tabs/Tabs.js +4 -0
- package/TextField/TextField.d.ts +40 -10
- package/TextField/TextField.js +22 -11
- package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/TextareaAutosize/TextareaAutosize.js +2 -2
- package/ToggleButton/ToggleButton.d.ts +3 -3
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/Toolbar/Toolbar.d.ts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Typography/Typography.d.ts +3 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/index.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
- package/modern/Grid2/Grid2.js +2 -2
- package/modern/NoSsr/NoSsr.js +2 -2
- package/modern/PigmentContainer/PigmentContainer.js +2 -2
- package/modern/PigmentGrid/PigmentGrid.js +2 -2
- package/modern/PigmentHidden/PigmentHidden.js +2 -2
- package/modern/PigmentStack/PigmentStack.js +2 -2
- package/modern/Popover/Popover.js +1 -1
- package/modern/Popper/Popper.js +4 -4
- package/modern/Portal/Portal.js +2 -2
- package/modern/StepLabel/StepLabel.js +14 -5
- package/modern/Switch/Switch.js +71 -9
- package/modern/Tabs/Tabs.js +4 -0
- package/modern/TextField/TextField.js +22 -11
- package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
- package/modern/index.js +1 -1
- package/modern/styles/createThemeNoVars.js +1 -3
- package/modern/useAutocomplete/useAutocomplete.js +5 -5
- package/modern/version/index.js +2 -2
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node/Grid2/Grid2.js +2 -2
- package/node/NoSsr/NoSsr.js +2 -2
- package/node/PigmentContainer/PigmentContainer.js +2 -2
- package/node/PigmentGrid/PigmentGrid.js +2 -2
- package/node/PigmentHidden/PigmentHidden.js +2 -2
- package/node/PigmentStack/PigmentStack.js +2 -2
- package/node/Popover/Popover.js +1 -1
- package/node/Popper/Popper.js +4 -4
- package/node/Portal/Portal.js +2 -2
- package/node/StepLabel/StepLabel.js +14 -5
- package/node/Switch/Switch.js +71 -9
- package/node/Tabs/Tabs.js +4 -0
- package/node/TextField/TextField.js +22 -11
- package/node/TextareaAutosize/TextareaAutosize.js +2 -2
- package/node/index.js +1 -1
- package/node/styles/createThemeNoVars.js +1 -3
- package/node/useAutocomplete/useAutocomplete.js +5 -5
- package/node/version/index.js +2 -2
- package/package.json +6 -6
- package/styles/createThemeNoVars.js +1 -3
- package/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/useAutocomplete/useAutocomplete.js +5 -5
- package/version/index.js +2 -2
|
@@ -44,11 +44,11 @@ function isEmpty(obj) {
|
|
|
44
44
|
*
|
|
45
45
|
* Demos:
|
|
46
46
|
*
|
|
47
|
-
* - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
|
|
47
|
+
* - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
|
|
48
48
|
*
|
|
49
49
|
* API:
|
|
50
50
|
*
|
|
51
|
-
* - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
|
|
51
|
+
* - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
|
|
52
52
|
*/
|
|
53
53
|
const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {
|
|
54
54
|
const {
|
package/node/index.js
CHANGED
|
@@ -34,9 +34,7 @@ function createThemeNoVars(options = {}, ...args) {
|
|
|
34
34
|
// The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
35
35
|
// `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
36
36
|
options.generateThemeVars === undefined) {
|
|
37
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
|
|
38
|
-
// #host-reference
|
|
39
|
-
'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage2.default)(20));
|
|
37
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage2.default)(20));
|
|
40
38
|
}
|
|
41
39
|
const palette = (0, _createPalette.default)(paletteInput);
|
|
42
40
|
const systemTheme = (0, _createTheme.default)(options);
|
|
@@ -127,8 +127,8 @@ function useAutocomplete(props) {
|
|
|
127
127
|
const highlightedIndexRef = React.useRef(defaultHighlighted);
|
|
128
128
|
|
|
129
129
|
// Calculate the initial inputValue on mount only.
|
|
130
|
-
//
|
|
131
|
-
const initialInputValue = React.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
|
|
130
|
+
// useRef ensures it doesn't update dynamically with defaultValue or value props.
|
|
131
|
+
const initialInputValue = React.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
|
|
132
132
|
const [value, setValueState] = (0, _utils.unstable_useControlled)({
|
|
133
133
|
controlled: valueProp,
|
|
134
134
|
default: defaultValue,
|
|
@@ -244,7 +244,7 @@ function useAutocomplete(props) {
|
|
|
244
244
|
const setHighlightedIndex = (0, _utils.unstable_useEventCallback)(({
|
|
245
245
|
event,
|
|
246
246
|
index,
|
|
247
|
-
reason
|
|
247
|
+
reason
|
|
248
248
|
}) => {
|
|
249
249
|
highlightedIndexRef.current = index;
|
|
250
250
|
|
|
@@ -254,7 +254,7 @@ function useAutocomplete(props) {
|
|
|
254
254
|
} else {
|
|
255
255
|
inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
|
|
256
256
|
}
|
|
257
|
-
if (onHighlightChange) {
|
|
257
|
+
if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
|
|
258
258
|
onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
|
|
259
259
|
}
|
|
260
260
|
if (!listboxRef.current) {
|
|
@@ -307,7 +307,7 @@ function useAutocomplete(props) {
|
|
|
307
307
|
event,
|
|
308
308
|
diff,
|
|
309
309
|
direction = 'next',
|
|
310
|
-
reason
|
|
310
|
+
reason
|
|
311
311
|
}) => {
|
|
312
312
|
if (!popupOpen) {
|
|
313
313
|
return;
|
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.4.
|
|
7
|
+
const version = exports.version = "6.4.10";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
9
|
const minor = exports.minor = Number("4");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("10");
|
|
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.4.
|
|
3
|
+
"version": "6.4.10",
|
|
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.",
|
|
@@ -35,10 +35,10 @@
|
|
|
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/
|
|
40
|
-
"@mui/system": "^6.4.
|
|
41
|
-
"@mui/
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.4.10",
|
|
39
|
+
"@mui/utils": "^6.4.9",
|
|
40
|
+
"@mui/system": "^6.4.10",
|
|
41
|
+
"@mui/types": "~7.2.24"
|
|
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.4.
|
|
49
|
+
"@mui/material-pigment-css": "^6.4.10"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
|
@@ -25,9 +25,7 @@ function createThemeNoVars(options = {}, ...args) {
|
|
|
25
25
|
// The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
26
26
|
// `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
27
27
|
options.generateThemeVars === undefined) {
|
|
28
|
-
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
|
|
29
|
-
// #host-reference
|
|
30
|
-
'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
|
|
28
|
+
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
|
|
31
29
|
}
|
|
32
30
|
const palette = createPalette(paletteInput);
|
|
33
31
|
const systemTheme = systemCreateTheme(options);
|
|
@@ -246,7 +246,7 @@ export interface UseAutocompleteProps<
|
|
|
246
246
|
*
|
|
247
247
|
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
248
248
|
* @param {Value} option The highlighted option.
|
|
249
|
-
* @param {string} reason Can be: `"keyboard"`, `"
|
|
249
|
+
* @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
|
|
250
250
|
*/
|
|
251
251
|
onHighlightChange?: (
|
|
252
252
|
event: React.SyntheticEvent,
|
|
@@ -312,7 +312,7 @@ export interface UseAutocompleteParameters<
|
|
|
312
312
|
FreeSolo extends boolean | undefined,
|
|
313
313
|
> extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo> {}
|
|
314
314
|
|
|
315
|
-
export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | '
|
|
315
|
+
export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | 'touch';
|
|
316
316
|
|
|
317
317
|
export type AutocompleteChangeReason =
|
|
318
318
|
| 'createOption'
|
|
@@ -121,8 +121,8 @@ function useAutocomplete(props) {
|
|
|
121
121
|
const highlightedIndexRef = React.useRef(defaultHighlighted);
|
|
122
122
|
|
|
123
123
|
// Calculate the initial inputValue on mount only.
|
|
124
|
-
//
|
|
125
|
-
const initialInputValue = React.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
|
|
124
|
+
// useRef ensures it doesn't update dynamically with defaultValue or value props.
|
|
125
|
+
const initialInputValue = React.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
|
|
126
126
|
const [value, setValueState] = useControlled({
|
|
127
127
|
controlled: valueProp,
|
|
128
128
|
default: defaultValue,
|
|
@@ -238,7 +238,7 @@ function useAutocomplete(props) {
|
|
|
238
238
|
const setHighlightedIndex = useEventCallback(({
|
|
239
239
|
event,
|
|
240
240
|
index,
|
|
241
|
-
reason
|
|
241
|
+
reason
|
|
242
242
|
}) => {
|
|
243
243
|
highlightedIndexRef.current = index;
|
|
244
244
|
|
|
@@ -248,7 +248,7 @@ function useAutocomplete(props) {
|
|
|
248
248
|
} else {
|
|
249
249
|
inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
|
|
250
250
|
}
|
|
251
|
-
if (onHighlightChange) {
|
|
251
|
+
if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
|
|
252
252
|
onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
|
|
253
253
|
}
|
|
254
254
|
if (!listboxRef.current) {
|
|
@@ -301,7 +301,7 @@ function useAutocomplete(props) {
|
|
|
301
301
|
event,
|
|
302
302
|
diff,
|
|
303
303
|
direction = 'next',
|
|
304
|
-
reason
|
|
304
|
+
reason
|
|
305
305
|
}) => {
|
|
306
306
|
if (!popupOpen) {
|
|
307
307
|
return;
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.4.
|
|
1
|
+
export const version = "6.4.10";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("4");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("10");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|