@mui/material 7.3.9 → 7.3.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 +18 -2
- package/Autocomplete/Autocomplete.js +48 -25
- 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 +3 -2
- package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/Button/Button.d.ts +6 -5
- package/ButtonBase/ButtonBase.d.ts +2 -2
- package/ButtonBase/ButtonBase.js +8 -2
- package/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/CHANGELOG.md +47 -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/CardHeader/CardHeader.js +5 -1
- 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/Collapse/Collapse.js +6 -18
- package/Container/Container.d.ts +2 -2
- package/CssBaseline/CssBaseline.d.ts +2 -2
- package/Dialog/Dialog.d.ts +10 -3
- package/Dialog/Dialog.js +9 -1
- 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 +4 -3
- package/Drawer/Drawer.d.ts +3 -3
- package/Fab/Fab.d.ts +3 -3
- package/Fade/Fade.d.ts +3 -3
- package/Fade/Fade.js +28 -32
- package/FilledInput/FilledInput.d.ts +3 -3
- package/FilledInput/FilledInput.js +1 -1
- package/FormControl/FormControl.d.ts +7 -7
- package/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/FormGroup/FormGroup.d.ts +3 -3
- package/FormHelperText/FormHelperText.d.ts +3 -3
- package/FormLabel/FormLabel.d.ts +5 -5
- package/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js +2 -2
- package/GridLegacy/GridLegacy.d.ts +2 -2
- package/Grow/Grow.d.ts +5 -5
- package/Grow/Grow.js +30 -38
- package/Icon/Icon.d.ts +3 -3
- package/IconButton/IconButton.d.ts +5 -5
- package/ImageList/ImageList.d.ts +2 -2
- package/ImageListItem/ImageListItem.d.ts +2 -2
- package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.js +2 -2
- package/Input/Input.d.ts +3 -3
- package/Input/Input.js +1 -1
- package/InputAdornment/InputAdornment.d.ts +2 -2
- package/InputBase/InputBase.d.ts +2 -2
- package/InputLabel/InputLabel.d.ts +4 -4
- package/LinearProgress/LinearProgress.d.ts +2 -2
- package/Link/Link.d.ts +4 -4
- package/List/List.d.ts +4 -3
- package/ListItem/ListItem.d.ts +3 -3
- package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/ListItemButton/ListItemButton.d.ts +4 -3
- package/ListItemIcon/ListItemIcon.d.ts +3 -2
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/ListItemText/ListItemText.d.ts +3 -2
- package/ListItemText/ListItemText.js +5 -1
- package/ListSubheader/ListSubheader.d.ts +3 -2
- package/Menu/Menu.d.ts +4 -4
- package/MenuItem/MenuItem.d.ts +3 -3
- package/MenuItem/MenuItem.js +21 -1
- 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 +4 -4
- package/Pagination/Pagination.d.ts +2 -2
- package/PaginationItem/PaginationItem.d.ts +3 -3
- package/Paper/Paper.d.ts +4 -3
- package/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/PigmentContainer/PigmentContainer.js +2 -3
- package/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/PigmentGrid/PigmentGrid.js +2 -3
- package/PigmentStack/PigmentStack.d.ts +2 -2
- package/PigmentStack/PigmentStack.js +2 -3
- package/Popover/Popover.d.ts +4 -4
- package/Popper/Popper.d.ts +4 -4
- package/Popper/Popper.js +4 -4
- package/Popper/index.d.ts +1 -0
- package/Popper/index.js +11 -2
- package/Portal/Portal.d.ts +2 -2
- package/Portal/Portal.js +2 -2
- package/README.md +2 -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/Select/SelectInput.js +46 -47
- package/Select/index.d.ts +1 -0
- package/Select/index.js +12 -0
- package/Select/utils/SelectFocusSourceContext.d.ts +4 -0
- package/Select/utils/SelectFocusSourceContext.js +19 -0
- package/Select/utils/areEqualValues.d.ts +1 -0
- package/Select/utils/areEqualValues.js +14 -0
- package/Select/utils/getOpenInteractionType.d.ts +1 -0
- package/Select/utils/getOpenInteractionType.js +18 -0
- package/Select/utils/index.d.ts +4 -0
- package/Select/utils/index.js +40 -0
- package/Select/utils/isEmpty.d.ts +1 -0
- package/Select/utils/isEmpty.js +9 -0
- package/Skeleton/Skeleton.d.ts +2 -2
- package/Slide/Slide.d.ts +4 -4
- package/Slide/Slide.js +43 -42
- package/Slider/Slider.d.ts +7 -7
- 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 +2 -2
- package/Stepper/Stepper.d.ts +2 -2
- package/SvgIcon/SvgIcon.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.js +0 -3
- package/Switch/Switch.d.ts +4 -4
- package/Switch/Switch.js +4 -0
- 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/TablePaginationActions/TablePaginationActions.d.ts +2 -2
- package/TableRow/TableRow.d.ts +2 -2
- package/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/Tabs/Tabs.d.ts +2 -2
- package/TextField/TextField.d.ts +10 -10
- 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 +4 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/Zoom/Zoom.js +24 -30
- package/esm/Accordion/Accordion.d.ts +3 -3
- package/esm/AccordionActions/AccordionActions.d.ts +2 -2
- package/esm/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/esm/AccordionSummary/AccordionSummary.d.ts +3 -3
- package/esm/Alert/Alert.d.ts +3 -3
- package/esm/AlertTitle/AlertTitle.d.ts +3 -3
- package/esm/AppBar/AppBar.d.ts +3 -3
- package/esm/Autocomplete/Autocomplete.d.ts +18 -2
- package/esm/Autocomplete/Autocomplete.js +48 -25
- package/esm/Avatar/Avatar.d.ts +2 -2
- package/esm/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/esm/Backdrop/Backdrop.d.ts +3 -3
- package/esm/Badge/Badge.d.ts +3 -3
- package/esm/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/esm/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
- package/esm/Box/Box.d.ts +3 -2
- package/esm/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/esm/Button/Button.d.ts +6 -5
- package/esm/ButtonBase/ButtonBase.d.ts +2 -2
- package/esm/ButtonBase/ButtonBase.js +8 -2
- package/esm/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/esm/Card/Card.d.ts +3 -3
- package/esm/CardActionArea/CardActionArea.d.ts +3 -3
- package/esm/CardActions/CardActions.d.ts +2 -2
- package/esm/CardContent/CardContent.d.ts +2 -2
- package/esm/CardHeader/CardHeader.d.ts +2 -2
- package/esm/CardHeader/CardHeader.js +5 -1
- package/esm/CardMedia/CardMedia.d.ts +2 -2
- package/esm/Checkbox/Checkbox.d.ts +4 -4
- package/esm/Chip/Chip.d.ts +2 -2
- package/esm/CircularProgress/CircularProgress.d.ts +2 -2
- package/esm/ClickAwayListener/ClickAwayListener.d.ts +3 -3
- package/esm/ClickAwayListener/ClickAwayListener.js +3 -3
- package/esm/Collapse/Collapse.d.ts +5 -5
- package/esm/Collapse/Collapse.js +7 -19
- package/esm/Container/Container.d.ts +2 -2
- package/esm/CssBaseline/CssBaseline.d.ts +2 -2
- package/esm/Dialog/Dialog.d.ts +10 -3
- package/esm/Dialog/Dialog.js +9 -1
- package/esm/DialogActions/DialogActions.d.ts +2 -2
- package/esm/DialogContent/DialogContent.d.ts +2 -2
- package/esm/DialogContentText/DialogContentText.d.ts +3 -3
- package/esm/DialogTitle/DialogTitle.d.ts +3 -3
- package/esm/Divider/Divider.d.ts +4 -3
- package/esm/Drawer/Drawer.d.ts +3 -3
- package/esm/Fab/Fab.d.ts +3 -3
- package/esm/Fade/Fade.d.ts +3 -3
- package/esm/Fade/Fade.js +29 -33
- package/esm/FilledInput/FilledInput.d.ts +3 -3
- package/esm/FilledInput/FilledInput.js +1 -1
- package/esm/FormControl/FormControl.d.ts +7 -7
- package/esm/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/esm/FormGroup/FormGroup.d.ts +3 -3
- package/esm/FormHelperText/FormHelperText.d.ts +3 -3
- package/esm/FormLabel/FormLabel.d.ts +5 -5
- package/esm/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/esm/Grid/Grid.d.ts +2 -2
- package/esm/Grid/Grid.js +2 -2
- package/esm/GridLegacy/GridLegacy.d.ts +2 -2
- package/esm/Grow/Grow.d.ts +5 -5
- package/esm/Grow/Grow.js +31 -39
- package/esm/Icon/Icon.d.ts +3 -3
- package/esm/IconButton/IconButton.d.ts +5 -5
- package/esm/ImageList/ImageList.d.ts +2 -2
- package/esm/ImageListItem/ImageListItem.d.ts +2 -2
- package/esm/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -2
- package/esm/InitColorSchemeScript/InitColorSchemeScript.js +2 -2
- package/esm/Input/Input.d.ts +3 -3
- package/esm/Input/Input.js +1 -1
- package/esm/InputAdornment/InputAdornment.d.ts +2 -2
- package/esm/InputBase/InputBase.d.ts +2 -2
- package/esm/InputLabel/InputLabel.d.ts +4 -4
- package/esm/LinearProgress/LinearProgress.d.ts +2 -2
- package/esm/Link/Link.d.ts +4 -4
- package/esm/List/List.d.ts +4 -3
- package/esm/ListItem/ListItem.d.ts +3 -3
- package/esm/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/esm/ListItemButton/ListItemButton.d.ts +4 -3
- package/esm/ListItemIcon/ListItemIcon.d.ts +3 -2
- package/esm/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/esm/ListItemText/ListItemText.d.ts +3 -2
- package/esm/ListItemText/ListItemText.js +5 -1
- package/esm/ListSubheader/ListSubheader.d.ts +3 -2
- package/esm/Menu/Menu.d.ts +4 -4
- package/esm/MenuItem/MenuItem.d.ts +3 -3
- package/esm/MenuItem/MenuItem.js +23 -1
- package/esm/MenuList/MenuList.d.ts +4 -4
- package/esm/MobileStepper/MobileStepper.d.ts +3 -3
- package/esm/Modal/Modal.d.ts +7 -7
- package/esm/NativeSelect/NativeSelect.d.ts +3 -3
- package/esm/NoSsr/NoSsr.d.ts +2 -2
- package/esm/NoSsr/NoSsr.js +2 -2
- package/esm/OutlinedInput/OutlinedInput.d.ts +4 -4
- package/esm/Pagination/Pagination.d.ts +2 -2
- package/esm/PaginationItem/PaginationItem.d.ts +3 -3
- package/esm/Paper/Paper.d.ts +4 -3
- package/esm/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/esm/PigmentContainer/PigmentContainer.js +2 -4
- package/esm/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/esm/PigmentGrid/PigmentGrid.js +2 -4
- package/esm/PigmentStack/PigmentStack.d.ts +2 -2
- package/esm/PigmentStack/PigmentStack.js +2 -4
- package/esm/Popover/Popover.d.ts +4 -4
- package/esm/Popper/Popper.d.ts +4 -4
- package/esm/Popper/Popper.js +4 -4
- package/esm/Popper/index.d.ts +1 -0
- package/esm/Popper/index.js +1 -0
- package/esm/Portal/Portal.d.ts +2 -2
- package/esm/Portal/Portal.js +2 -2
- package/esm/Radio/Radio.d.ts +3 -3
- package/esm/RadioGroup/RadioGroup.d.ts +3 -3
- package/esm/Rating/Rating.d.ts +2 -2
- package/esm/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
- package/esm/Select/Select.d.ts +3 -3
- package/esm/Select/SelectInput.js +43 -44
- package/esm/Select/index.d.ts +1 -0
- package/esm/Select/index.js +1 -0
- package/esm/Select/utils/SelectFocusSourceContext.d.ts +4 -0
- package/esm/Select/utils/SelectFocusSourceContext.js +13 -0
- package/esm/Select/utils/areEqualValues.d.ts +1 -0
- package/esm/Select/utils/areEqualValues.js +8 -0
- package/esm/Select/utils/getOpenInteractionType.d.ts +1 -0
- package/esm/Select/utils/getOpenInteractionType.js +12 -0
- package/esm/Select/utils/index.d.ts +4 -0
- package/esm/Select/utils/index.js +4 -0
- package/esm/Select/utils/isEmpty.d.ts +1 -0
- package/esm/Select/utils/isEmpty.js +3 -0
- package/esm/Skeleton/Skeleton.d.ts +2 -2
- package/esm/Slide/Slide.d.ts +4 -4
- package/esm/Slide/Slide.js +44 -44
- package/esm/Slider/Slider.d.ts +7 -7
- package/esm/Snackbar/Snackbar.d.ts +2 -2
- package/esm/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/esm/SpeedDial/SpeedDial.d.ts +2 -2
- package/esm/SpeedDialAction/SpeedDialAction.d.ts +3 -3
- package/esm/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
- package/esm/Stack/Stack.d.ts +2 -2
- package/esm/Step/Step.d.ts +2 -2
- package/esm/StepButton/StepButton.d.ts +3 -3
- package/esm/StepConnector/StepConnector.d.ts +2 -2
- package/esm/StepContent/StepContent.d.ts +2 -2
- package/esm/StepIcon/StepIcon.d.ts +3 -3
- package/esm/StepLabel/StepLabel.d.ts +2 -2
- package/esm/Stepper/Stepper.d.ts +2 -2
- package/esm/SvgIcon/SvgIcon.d.ts +3 -3
- package/esm/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
- package/esm/SwipeableDrawer/SwipeableDrawer.js +0 -3
- package/esm/Switch/Switch.d.ts +4 -4
- package/esm/Switch/Switch.js +4 -0
- package/esm/Tab/Tab.d.ts +3 -3
- package/esm/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/esm/Table/Table.d.ts +2 -2
- package/esm/TableBody/TableBody.d.ts +2 -2
- package/esm/TableCell/TableCell.d.ts +2 -2
- package/esm/TableContainer/TableContainer.d.ts +2 -2
- package/esm/TableFooter/TableFooter.d.ts +2 -2
- package/esm/TableHead/TableHead.d.ts +2 -2
- package/esm/TablePagination/TablePagination.d.ts +4 -4
- package/esm/TablePaginationActions/TablePaginationActions.d.ts +2 -2
- package/esm/TableRow/TableRow.d.ts +2 -2
- package/esm/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/esm/Tabs/Tabs.d.ts +2 -2
- package/esm/TextField/TextField.d.ts +10 -10
- package/esm/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/esm/TextareaAutosize/TextareaAutosize.js +2 -2
- package/esm/ToggleButton/ToggleButton.d.ts +3 -3
- package/esm/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/esm/Toolbar/Toolbar.d.ts +2 -2
- package/esm/Tooltip/Tooltip.d.ts +2 -2
- package/esm/Typography/Typography.d.ts +4 -3
- package/esm/Zoom/Zoom.d.ts +3 -3
- package/esm/Zoom/Zoom.js +25 -31
- package/esm/index.js +1 -1
- package/esm/styles/createThemeNoVars.js +1 -1
- package/esm/styles/createThemeWithVars.js +9 -9
- package/esm/transitions/utils.d.ts +7 -0
- package/esm/transitions/utils.js +25 -0
- package/esm/useAutocomplete/useAutocomplete.js +58 -3
- package/esm/version/index.js +2 -2
- package/index.js +1 -1
- package/package.json +5 -5
- package/styles/createThemeNoVars.js +1 -1
- package/styles/createThemeWithVars.js +9 -9
- package/transitions/utils.d.ts +7 -0
- package/transitions/utils.js +27 -0
- package/useAutocomplete/useAutocomplete.js +58 -3
- package/version/index.js +2 -2
|
@@ -329,21 +329,21 @@ export default function createThemeWithVars(options = {}, ...args) {
|
|
|
329
329
|
setColor(palette.TableCell, 'border', colorMix(safeDarken, safeAlpha(nativeColor ? getCssVar('palette-divider') : palette.divider, 1), 0.68));
|
|
330
330
|
setColor(palette.Tooltip, 'bg', colorMix(safeAlpha, nativeColor ? getCssVar('palette-grey-700') : palette.grey[700], 0.92));
|
|
331
331
|
}
|
|
332
|
+
if (!nativeColor) {
|
|
333
|
+
setColorChannel(palette.background, 'default');
|
|
332
334
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
setColorChannel(palette.common, 'onBackground');
|
|
340
|
-
setColorChannel(palette, 'divider');
|
|
335
|
+
// added for consistency with the `background.default` token
|
|
336
|
+
setColorChannel(palette.background, 'paper');
|
|
337
|
+
setColorChannel(palette.common, 'background');
|
|
338
|
+
setColorChannel(palette.common, 'onBackground');
|
|
339
|
+
setColorChannel(palette, 'divider');
|
|
340
|
+
}
|
|
341
341
|
Object.keys(palette).forEach(color => {
|
|
342
342
|
const colors = palette[color];
|
|
343
343
|
|
|
344
344
|
// The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.
|
|
345
345
|
|
|
346
|
-
if (color !== 'tonalOffset' && colors && typeof colors === 'object') {
|
|
346
|
+
if (color !== 'tonalOffset' && !nativeColor && colors && typeof colors === 'object') {
|
|
347
347
|
// Silent the error for custom palettes.
|
|
348
348
|
if (colors.main) {
|
|
349
349
|
setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));
|
|
@@ -19,5 +19,12 @@ interface TransitionProps {
|
|
|
19
19
|
easing: string | undefined;
|
|
20
20
|
delay: string | undefined;
|
|
21
21
|
}
|
|
22
|
+
export declare function normalizedTransitionCallback(nodeRef: React.RefObject<HTMLElement | null>, callback: ((node: HTMLElement, isAppearing?: boolean) => void) | undefined): (maybeIsAppearing?: boolean) => void;
|
|
23
|
+
type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited';
|
|
24
|
+
/**
|
|
25
|
+
* Computes the child style for a transition component, reusing existing
|
|
26
|
+
* references when possible to preserve referential equality for React.memo.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getTransitionChildStyle(state: TransitionState, inProp: boolean | undefined, baseStyles: Record<string, React.CSSProperties>, hiddenStyles: React.CSSProperties, styleProp: React.CSSProperties | undefined, childStyle: React.CSSProperties | undefined): React.CSSProperties | undefined;
|
|
22
29
|
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
30
|
export {};
|
package/esm/transitions/utils.js
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
export const reflow = node => node.scrollTop;
|
|
2
|
+
export function normalizedTransitionCallback(nodeRef, callback) {
|
|
3
|
+
return maybeIsAppearing => {
|
|
4
|
+
if (callback) {
|
|
5
|
+
const node = nodeRef.current;
|
|
6
|
+
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
|
7
|
+
if (maybeIsAppearing === undefined) {
|
|
8
|
+
callback(node);
|
|
9
|
+
} else {
|
|
10
|
+
callback(node, maybeIsAppearing);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Computes the child style for a transition component, reusing existing
|
|
17
|
+
* references when possible to preserve referential equality for React.memo.
|
|
18
|
+
*/
|
|
19
|
+
export function getTransitionChildStyle(state, inProp, baseStyles, hiddenStyles, styleProp, childStyle) {
|
|
20
|
+
const base = state === 'exited' && !inProp ? hiddenStyles : baseStyles[state] || baseStyles.exited;
|
|
21
|
+
return styleProp || childStyle ? {
|
|
22
|
+
...base,
|
|
23
|
+
...styleProp,
|
|
24
|
+
...childStyle
|
|
25
|
+
} : base;
|
|
26
|
+
}
|
|
2
27
|
export function getTransitionProps(props, options) {
|
|
3
28
|
const {
|
|
4
29
|
timeout,
|
|
@@ -56,6 +56,7 @@ const defaultFilterOptions = createFilterOptions();
|
|
|
56
56
|
// Number of options to jump in list box when `Page Up` and `Page Down` keys are used.
|
|
57
57
|
const pageSize = 5;
|
|
58
58
|
const defaultIsActiveElementInListbox = listboxRef => listboxRef.current !== null && listboxRef.current.parentElement?.contains(document.activeElement);
|
|
59
|
+
const defaultIsOptionEqualToValue = (option, value) => option === value;
|
|
59
60
|
const MULTIPLE_DEFAULT_VALUE = [];
|
|
60
61
|
function getInputValue(value, multiple, getOptionLabel, renderValue) {
|
|
61
62
|
if (multiple || value == null || renderValue) {
|
|
@@ -94,7 +95,7 @@ function useAutocomplete(props) {
|
|
|
94
95
|
id: idProp,
|
|
95
96
|
includeInputInList = false,
|
|
96
97
|
inputValue: inputValueProp,
|
|
97
|
-
isOptionEqualToValue =
|
|
98
|
+
isOptionEqualToValue = defaultIsOptionEqualToValue,
|
|
98
99
|
multiple = false,
|
|
99
100
|
onChange,
|
|
100
101
|
onClose,
|
|
@@ -126,6 +127,7 @@ function useAutocomplete(props) {
|
|
|
126
127
|
const firstFocus = React.useRef(true);
|
|
127
128
|
const inputRef = React.useRef(null);
|
|
128
129
|
const listboxRef = React.useRef(null);
|
|
130
|
+
const windowLostFocus = React.useRef(false);
|
|
129
131
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
130
132
|
const [focusedItem, setFocusedItem] = React.useState(-1);
|
|
131
133
|
const defaultHighlighted = autoHighlight ? 0 : -1;
|
|
@@ -171,8 +173,30 @@ function useAutocomplete(props) {
|
|
|
171
173
|
const [inputPristine, setInputPristine] = React.useState(true);
|
|
172
174
|
const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);
|
|
173
175
|
const popupOpen = open && !readOnly;
|
|
176
|
+
const selectedValues = React.useMemo(() => {
|
|
177
|
+
if (multiple) {
|
|
178
|
+
return value;
|
|
179
|
+
}
|
|
180
|
+
if (value != null) {
|
|
181
|
+
return [value];
|
|
182
|
+
}
|
|
183
|
+
return [];
|
|
184
|
+
}, [multiple, value]);
|
|
185
|
+
const selectedValuesSet = React.useMemo(() => {
|
|
186
|
+
// Fast path for the default strict equality comparator to avoid O(n^2) option checks.
|
|
187
|
+
if (isOptionEqualToValue !== defaultIsOptionEqualToValue || selectedValues.length === 0) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
return new Set(selectedValues);
|
|
191
|
+
}, [isOptionEqualToValue, selectedValues]);
|
|
192
|
+
const isOptionSelected = React.useCallback(option => {
|
|
193
|
+
if (selectedValuesSet) {
|
|
194
|
+
return selectedValuesSet.has(option);
|
|
195
|
+
}
|
|
196
|
+
return selectedValues.some(value2 => value2 != null && isOptionEqualToValue(option, value2));
|
|
197
|
+
}, [isOptionEqualToValue, selectedValues, selectedValuesSet]);
|
|
174
198
|
const filteredOptions = popupOpen ? filterOptions(options.filter(option => {
|
|
175
|
-
if (filterSelectedOptions && (
|
|
199
|
+
if (filterSelectedOptions && isOptionSelected(option)) {
|
|
176
200
|
return false;
|
|
177
201
|
}
|
|
178
202
|
return true;
|
|
@@ -490,6 +514,21 @@ function useAutocomplete(props) {
|
|
|
490
514
|
syncHighlightedIndex();
|
|
491
515
|
}
|
|
492
516
|
}, [syncHighlightedIndex, filteredOptionsChanged, popupOpen, disableCloseOnSelect]);
|
|
517
|
+
|
|
518
|
+
// Listen for browser window blur to detect when the user switches tabs or windows.
|
|
519
|
+
// This helps prevent the popup from reopening automatically when the window regains focus.
|
|
520
|
+
React.useEffect(() => {
|
|
521
|
+
if (typeof window === 'undefined') {
|
|
522
|
+
return undefined;
|
|
523
|
+
}
|
|
524
|
+
const handleWindowBlur = () => {
|
|
525
|
+
windowLostFocus.current = true;
|
|
526
|
+
};
|
|
527
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
528
|
+
return () => {
|
|
529
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
530
|
+
};
|
|
531
|
+
}, []);
|
|
493
532
|
const handleOpen = event => {
|
|
494
533
|
if (open) {
|
|
495
534
|
return;
|
|
@@ -825,6 +864,14 @@ function useAutocomplete(props) {
|
|
|
825
864
|
// Ensure DOM focus lands on the input
|
|
826
865
|
focusItem(-1);
|
|
827
866
|
}
|
|
867
|
+
|
|
868
|
+
// If the window previously lost focus while the popup was open,
|
|
869
|
+
// ignore this focus event to prevent unintended reopening.
|
|
870
|
+
// Reset the flag so normal focus behavior resumes.
|
|
871
|
+
if (windowLostFocus.current) {
|
|
872
|
+
windowLostFocus.current = false;
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
828
875
|
if (openOnFocus && !ignoreFocus.current) {
|
|
829
876
|
handleOpen(event);
|
|
830
877
|
}
|
|
@@ -915,6 +962,10 @@ function useAutocomplete(props) {
|
|
|
915
962
|
if (!event.currentTarget.contains(event.target)) {
|
|
916
963
|
return;
|
|
917
964
|
}
|
|
965
|
+
// Don't interfere with interactions outside the input area (e.g. helper text)
|
|
966
|
+
if (anchorEl && !anchorEl.contains(event.target)) {
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
918
969
|
if (event.target.getAttribute('id') !== id) {
|
|
919
970
|
event.preventDefault();
|
|
920
971
|
}
|
|
@@ -926,6 +977,10 @@ function useAutocomplete(props) {
|
|
|
926
977
|
if (!event.currentTarget.contains(event.target)) {
|
|
927
978
|
return;
|
|
928
979
|
}
|
|
980
|
+
// Don't interfere with interactions outside the input area (e.g. helper text)
|
|
981
|
+
if (anchorEl && !anchorEl.contains(event.target)) {
|
|
982
|
+
return;
|
|
983
|
+
}
|
|
929
984
|
inputRef.current.focus();
|
|
930
985
|
if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) {
|
|
931
986
|
inputRef.current.select();
|
|
@@ -1054,7 +1109,7 @@ function useAutocomplete(props) {
|
|
|
1054
1109
|
index,
|
|
1055
1110
|
option
|
|
1056
1111
|
}) => {
|
|
1057
|
-
const selected = (
|
|
1112
|
+
const selected = isOptionSelected(option);
|
|
1058
1113
|
const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
|
|
1059
1114
|
return {
|
|
1060
1115
|
key: getOptionKey?.(option) ?? getOptionLabel(option),
|
package/esm/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "7.3.
|
|
1
|
+
export const version = "7.3.10";
|
|
2
2
|
export const major = Number("7");
|
|
3
3
|
export const minor = Number("3");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("10");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.10",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"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.",
|
|
6
6
|
"keywords": [
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
34
|
"react-is": "^19.2.3",
|
|
35
35
|
"react-transition-group": "^4.4.5",
|
|
36
|
-
"@mui/core-downloads-tracker": "^7.3.
|
|
37
|
-
"@mui/system": "^7.3.9",
|
|
36
|
+
"@mui/core-downloads-tracker": "^7.3.10",
|
|
38
37
|
"@mui/types": "^7.4.12",
|
|
39
|
-
"@mui/utils": "^7.3.
|
|
38
|
+
"@mui/utils": "^7.3.10",
|
|
39
|
+
"@mui/system": "^7.3.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.5.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
45
45
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
46
46
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
|
-
"@mui/material-pigment-css": "^7.3.
|
|
47
|
+
"@mui/material-pigment-css": "^7.3.10"
|
|
48
48
|
},
|
|
49
49
|
"peerDependenciesMeta": {
|
|
50
50
|
"@types/react": {
|
|
@@ -89,7 +89,7 @@ function createThemeNoVars(options = {}, ...args) {
|
|
|
89
89
|
options.generateThemeVars === undefined) {
|
|
90
90
|
throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
|
|
91
91
|
// #host-reference
|
|
92
|
-
'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage.default)(20));
|
|
92
|
+
'Please use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage.default)(20));
|
|
93
93
|
}
|
|
94
94
|
const palette = (0, _createPalette.default)({
|
|
95
95
|
...paletteInput,
|
|
@@ -339,21 +339,21 @@ function createThemeWithVars(options = {}, ...args) {
|
|
|
339
339
|
setColor(palette.TableCell, 'border', colorMix(_colorManipulator.private_safeDarken, (0, _colorManipulator.private_safeAlpha)(nativeColor ? getCssVar('palette-divider') : palette.divider, 1), 0.68));
|
|
340
340
|
setColor(palette.Tooltip, 'bg', colorMix(_colorManipulator.private_safeAlpha, nativeColor ? getCssVar('palette-grey-700') : palette.grey[700], 0.92));
|
|
341
341
|
}
|
|
342
|
+
if (!nativeColor) {
|
|
343
|
+
setColorChannel(palette.background, 'default');
|
|
342
344
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
setColorChannel(palette.common, 'onBackground');
|
|
350
|
-
setColorChannel(palette, 'divider');
|
|
345
|
+
// added for consistency with the `background.default` token
|
|
346
|
+
setColorChannel(palette.background, 'paper');
|
|
347
|
+
setColorChannel(palette.common, 'background');
|
|
348
|
+
setColorChannel(palette.common, 'onBackground');
|
|
349
|
+
setColorChannel(palette, 'divider');
|
|
350
|
+
}
|
|
351
351
|
Object.keys(palette).forEach(color => {
|
|
352
352
|
const colors = palette[color];
|
|
353
353
|
|
|
354
354
|
// The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.
|
|
355
355
|
|
|
356
|
-
if (color !== 'tonalOffset' && colors && typeof colors === 'object') {
|
|
356
|
+
if (color !== 'tonalOffset' && !nativeColor && colors && typeof colors === 'object') {
|
|
357
357
|
// Silent the error for custom palettes.
|
|
358
358
|
if (colors.main) {
|
|
359
359
|
setColor(palette[color], 'mainChannel', (0, _colorManipulator.private_safeColorChannel)(toRgb(colors.main)));
|
package/transitions/utils.d.ts
CHANGED
|
@@ -19,5 +19,12 @@ interface TransitionProps {
|
|
|
19
19
|
easing: string | undefined;
|
|
20
20
|
delay: string | undefined;
|
|
21
21
|
}
|
|
22
|
+
export declare function normalizedTransitionCallback(nodeRef: React.RefObject<HTMLElement | null>, callback: ((node: HTMLElement, isAppearing?: boolean) => void) | undefined): (maybeIsAppearing?: boolean) => void;
|
|
23
|
+
type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited';
|
|
24
|
+
/**
|
|
25
|
+
* Computes the child style for a transition component, reusing existing
|
|
26
|
+
* references when possible to preserve referential equality for React.memo.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getTransitionChildStyle(state: TransitionState, inProp: boolean | undefined, baseStyles: Record<string, React.CSSProperties>, hiddenStyles: React.CSSProperties, styleProp: React.CSSProperties | undefined, childStyle: React.CSSProperties | undefined): React.CSSProperties | undefined;
|
|
22
29
|
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
30
|
export {};
|
package/transitions/utils.js
CHANGED
|
@@ -3,10 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getTransitionChildStyle = getTransitionChildStyle;
|
|
6
7
|
exports.getTransitionProps = getTransitionProps;
|
|
8
|
+
exports.normalizedTransitionCallback = normalizedTransitionCallback;
|
|
7
9
|
exports.reflow = void 0;
|
|
8
10
|
const reflow = node => node.scrollTop;
|
|
9
11
|
exports.reflow = reflow;
|
|
12
|
+
function normalizedTransitionCallback(nodeRef, callback) {
|
|
13
|
+
return maybeIsAppearing => {
|
|
14
|
+
if (callback) {
|
|
15
|
+
const node = nodeRef.current;
|
|
16
|
+
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
|
17
|
+
if (maybeIsAppearing === undefined) {
|
|
18
|
+
callback(node);
|
|
19
|
+
} else {
|
|
20
|
+
callback(node, maybeIsAppearing);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Computes the child style for a transition component, reusing existing
|
|
27
|
+
* references when possible to preserve referential equality for React.memo.
|
|
28
|
+
*/
|
|
29
|
+
function getTransitionChildStyle(state, inProp, baseStyles, hiddenStyles, styleProp, childStyle) {
|
|
30
|
+
const base = state === 'exited' && !inProp ? hiddenStyles : baseStyles[state] || baseStyles.exited;
|
|
31
|
+
return styleProp || childStyle ? {
|
|
32
|
+
...base,
|
|
33
|
+
...styleProp,
|
|
34
|
+
...childStyle
|
|
35
|
+
} : base;
|
|
36
|
+
}
|
|
10
37
|
function getTransitionProps(props, options) {
|
|
11
38
|
const {
|
|
12
39
|
timeout,
|
|
@@ -64,6 +64,7 @@ const defaultFilterOptions = createFilterOptions();
|
|
|
64
64
|
// Number of options to jump in list box when `Page Up` and `Page Down` keys are used.
|
|
65
65
|
const pageSize = 5;
|
|
66
66
|
const defaultIsActiveElementInListbox = listboxRef => listboxRef.current !== null && listboxRef.current.parentElement?.contains(document.activeElement);
|
|
67
|
+
const defaultIsOptionEqualToValue = (option, value) => option === value;
|
|
67
68
|
const MULTIPLE_DEFAULT_VALUE = [];
|
|
68
69
|
function getInputValue(value, multiple, getOptionLabel, renderValue) {
|
|
69
70
|
if (multiple || value == null || renderValue) {
|
|
@@ -102,7 +103,7 @@ function useAutocomplete(props) {
|
|
|
102
103
|
id: idProp,
|
|
103
104
|
includeInputInList = false,
|
|
104
105
|
inputValue: inputValueProp,
|
|
105
|
-
isOptionEqualToValue =
|
|
106
|
+
isOptionEqualToValue = defaultIsOptionEqualToValue,
|
|
106
107
|
multiple = false,
|
|
107
108
|
onChange,
|
|
108
109
|
onClose,
|
|
@@ -134,6 +135,7 @@ function useAutocomplete(props) {
|
|
|
134
135
|
const firstFocus = React.useRef(true);
|
|
135
136
|
const inputRef = React.useRef(null);
|
|
136
137
|
const listboxRef = React.useRef(null);
|
|
138
|
+
const windowLostFocus = React.useRef(false);
|
|
137
139
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
138
140
|
const [focusedItem, setFocusedItem] = React.useState(-1);
|
|
139
141
|
const defaultHighlighted = autoHighlight ? 0 : -1;
|
|
@@ -179,8 +181,30 @@ function useAutocomplete(props) {
|
|
|
179
181
|
const [inputPristine, setInputPristine] = React.useState(true);
|
|
180
182
|
const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);
|
|
181
183
|
const popupOpen = open && !readOnly;
|
|
184
|
+
const selectedValues = React.useMemo(() => {
|
|
185
|
+
if (multiple) {
|
|
186
|
+
return value;
|
|
187
|
+
}
|
|
188
|
+
if (value != null) {
|
|
189
|
+
return [value];
|
|
190
|
+
}
|
|
191
|
+
return [];
|
|
192
|
+
}, [multiple, value]);
|
|
193
|
+
const selectedValuesSet = React.useMemo(() => {
|
|
194
|
+
// Fast path for the default strict equality comparator to avoid O(n^2) option checks.
|
|
195
|
+
if (isOptionEqualToValue !== defaultIsOptionEqualToValue || selectedValues.length === 0) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
return new Set(selectedValues);
|
|
199
|
+
}, [isOptionEqualToValue, selectedValues]);
|
|
200
|
+
const isOptionSelected = React.useCallback(option => {
|
|
201
|
+
if (selectedValuesSet) {
|
|
202
|
+
return selectedValuesSet.has(option);
|
|
203
|
+
}
|
|
204
|
+
return selectedValues.some(value2 => value2 != null && isOptionEqualToValue(option, value2));
|
|
205
|
+
}, [isOptionEqualToValue, selectedValues, selectedValuesSet]);
|
|
182
206
|
const filteredOptions = popupOpen ? filterOptions(options.filter(option => {
|
|
183
|
-
if (filterSelectedOptions && (
|
|
207
|
+
if (filterSelectedOptions && isOptionSelected(option)) {
|
|
184
208
|
return false;
|
|
185
209
|
}
|
|
186
210
|
return true;
|
|
@@ -498,6 +522,21 @@ function useAutocomplete(props) {
|
|
|
498
522
|
syncHighlightedIndex();
|
|
499
523
|
}
|
|
500
524
|
}, [syncHighlightedIndex, filteredOptionsChanged, popupOpen, disableCloseOnSelect]);
|
|
525
|
+
|
|
526
|
+
// Listen for browser window blur to detect when the user switches tabs or windows.
|
|
527
|
+
// This helps prevent the popup from reopening automatically when the window regains focus.
|
|
528
|
+
React.useEffect(() => {
|
|
529
|
+
if (typeof window === 'undefined') {
|
|
530
|
+
return undefined;
|
|
531
|
+
}
|
|
532
|
+
const handleWindowBlur = () => {
|
|
533
|
+
windowLostFocus.current = true;
|
|
534
|
+
};
|
|
535
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
536
|
+
return () => {
|
|
537
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
538
|
+
};
|
|
539
|
+
}, []);
|
|
501
540
|
const handleOpen = event => {
|
|
502
541
|
if (open) {
|
|
503
542
|
return;
|
|
@@ -833,6 +872,14 @@ function useAutocomplete(props) {
|
|
|
833
872
|
// Ensure DOM focus lands on the input
|
|
834
873
|
focusItem(-1);
|
|
835
874
|
}
|
|
875
|
+
|
|
876
|
+
// If the window previously lost focus while the popup was open,
|
|
877
|
+
// ignore this focus event to prevent unintended reopening.
|
|
878
|
+
// Reset the flag so normal focus behavior resumes.
|
|
879
|
+
if (windowLostFocus.current) {
|
|
880
|
+
windowLostFocus.current = false;
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
836
883
|
if (openOnFocus && !ignoreFocus.current) {
|
|
837
884
|
handleOpen(event);
|
|
838
885
|
}
|
|
@@ -923,6 +970,10 @@ function useAutocomplete(props) {
|
|
|
923
970
|
if (!event.currentTarget.contains(event.target)) {
|
|
924
971
|
return;
|
|
925
972
|
}
|
|
973
|
+
// Don't interfere with interactions outside the input area (e.g. helper text)
|
|
974
|
+
if (anchorEl && !anchorEl.contains(event.target)) {
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
926
977
|
if (event.target.getAttribute('id') !== id) {
|
|
927
978
|
event.preventDefault();
|
|
928
979
|
}
|
|
@@ -934,6 +985,10 @@ function useAutocomplete(props) {
|
|
|
934
985
|
if (!event.currentTarget.contains(event.target)) {
|
|
935
986
|
return;
|
|
936
987
|
}
|
|
988
|
+
// Don't interfere with interactions outside the input area (e.g. helper text)
|
|
989
|
+
if (anchorEl && !anchorEl.contains(event.target)) {
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
937
992
|
inputRef.current.focus();
|
|
938
993
|
if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) {
|
|
939
994
|
inputRef.current.select();
|
|
@@ -1062,7 +1117,7 @@ function useAutocomplete(props) {
|
|
|
1062
1117
|
index,
|
|
1063
1118
|
option
|
|
1064
1119
|
}) => {
|
|
1065
|
-
const selected = (
|
|
1120
|
+
const selected = isOptionSelected(option);
|
|
1066
1121
|
const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
|
|
1067
1122
|
return {
|
|
1068
1123
|
key: getOptionKey?.(option) ?? getOptionLabel(option),
|
package/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 = "7.3.
|
|
7
|
+
const version = exports.version = "7.3.10";
|
|
8
8
|
const major = exports.major = Number("7");
|
|
9
9
|
const minor = exports.minor = Number("3");
|
|
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;
|