@mui/material 6.4.7 → 6.4.9
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 +20 -5
- package/Accordion/Accordion.js +18 -6
- package/AccordionActions/AccordionActions.d.ts +2 -2
- package/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +62 -7
- package/AccordionSummary/AccordionSummary.js +67 -16
- 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 +78 -4
- 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 +12 -2
- package/ListItemText/ListItemText.js +14 -5
- 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 +4 -4
- 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/Snackbar/Snackbar.js +7 -1
- package/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/SpeedDial/SpeedDial.d.ts +12 -2
- package/SpeedDial/SpeedDial.js +40 -11
- package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
- package/SpeedDialAction/SpeedDialAction.js +1 -1
- 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 +28 -17
- 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 +3 -15
- package/Tooltip/Tooltip.js +1 -1
- package/Typography/Typography.d.ts +3 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/index.js +1 -1
- package/modern/Accordion/Accordion.js +18 -6
- package/modern/AccordionSummary/AccordionSummary.js +67 -16
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
- package/modern/Grid2/Grid2.js +2 -2
- package/modern/ListItemText/ListItemText.js +14 -5
- 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/Popper/Popper.js +4 -4
- package/modern/Portal/Portal.js +2 -2
- package/modern/Snackbar/Snackbar.js +7 -1
- package/modern/SpeedDial/SpeedDial.js +40 -11
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -1
- 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 +28 -17
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/ThemeProvider.js +11 -0
- package/modern/styles/createThemeNoVars.js +1 -3
- package/modern/useAutocomplete/useAutocomplete.js +3 -3
- package/modern/useScrollTrigger/useScrollTrigger.js +3 -0
- package/modern/version/index.js +2 -2
- package/node/Accordion/Accordion.js +18 -6
- package/node/AccordionSummary/AccordionSummary.js +67 -16
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/ClickAwayListener/ClickAwayListener.js +3 -3
- package/node/Grid2/Grid2.js +2 -2
- package/node/ListItemText/ListItemText.js +14 -5
- 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/Popper/Popper.js +4 -4
- package/node/Portal/Portal.js +2 -2
- package/node/Snackbar/Snackbar.js +7 -1
- package/node/SpeedDial/SpeedDial.js +40 -11
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- 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 +27 -16
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/ThemeProvider.js +11 -0
- package/node/styles/createThemeNoVars.js +1 -3
- package/node/useAutocomplete/useAutocomplete.js +3 -3
- package/node/useScrollTrigger/useScrollTrigger.js +3 -0
- package/node/version/index.js +2 -2
- package/package.json +6 -6
- package/styles/ThemeProvider.js +11 -0
- package/styles/createThemeNoVars.js +1 -3
- package/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/useAutocomplete/useAutocomplete.js +3 -3
- package/useScrollTrigger/useScrollTrigger.d.ts +1 -1
- package/useScrollTrigger/useScrollTrigger.js +3 -0
- package/version/index.js +2 -2
|
@@ -23,11 +23,11 @@ const useUtilityClasses = ownerState => {
|
|
|
23
23
|
*
|
|
24
24
|
* Demos:
|
|
25
25
|
*
|
|
26
|
-
* - [Container](https://mui.com/material-ui/react-container/)
|
|
26
|
+
* - [Container](https://v6.mui.com/material-ui/react-container/)
|
|
27
27
|
*
|
|
28
28
|
* API:
|
|
29
29
|
*
|
|
30
|
-
* - [PigmentContainer API](https://mui.com/material-ui/api/pigment-container/)
|
|
30
|
+
* - [PigmentContainer API](https://v6.mui.com/material-ui/api/pigment-container/)
|
|
31
31
|
*/
|
|
32
32
|
const PigmentContainer = /*#__PURE__*/React.forwardRef(function PigmentContainer({
|
|
33
33
|
className,
|
|
@@ -37,11 +37,11 @@ const useUtilityClasses = ownerState => {
|
|
|
37
37
|
*
|
|
38
38
|
* Demos:
|
|
39
39
|
*
|
|
40
|
-
* - [Grid version 2](https://mui.com/material-ui/react-grid2/)
|
|
40
|
+
* - [Grid version 2](https://v6.mui.com/material-ui/react-grid2/)
|
|
41
41
|
*
|
|
42
42
|
* API:
|
|
43
43
|
*
|
|
44
|
-
* - [PigmentGrid API](https://mui.com/material-ui/api/pigment-grid/)
|
|
44
|
+
* - [PigmentGrid API](https://v6.mui.com/material-ui/api/pigment-grid/)
|
|
45
45
|
*/
|
|
46
46
|
const PigmentGrid = /*#__PURE__*/React.forwardRef(function PigmentGrid(props, ref) {
|
|
47
47
|
const {
|
|
@@ -171,11 +171,11 @@ process.env.NODE_ENV !== "production" ? HiddenCss.propTypes /* remove-proptypes
|
|
|
171
171
|
*
|
|
172
172
|
* Demos:
|
|
173
173
|
*
|
|
174
|
-
* - [Hidden](https://mui.com/material-ui/react-hidden/)
|
|
174
|
+
* - [Hidden](https://v6.mui.com/material-ui/react-hidden/)
|
|
175
175
|
*
|
|
176
176
|
* API:
|
|
177
177
|
*
|
|
178
|
-
* - [PigmentHidden API](https://mui.com/material-ui/api/pigment-hidden/)
|
|
178
|
+
* - [PigmentHidden API](https://v6.mui.com/material-ui/api/pigment-hidden/)
|
|
179
179
|
*/
|
|
180
180
|
function PigmentHidden({
|
|
181
181
|
implementation = 'js',
|
|
@@ -16,11 +16,11 @@ const useUtilityClasses = () => {
|
|
|
16
16
|
*
|
|
17
17
|
* Demos:
|
|
18
18
|
*
|
|
19
|
-
* - [Stack](https://mui.com/material-ui/react-stack/)
|
|
19
|
+
* - [Stack](https://v6.mui.com/material-ui/react-stack/)
|
|
20
20
|
*
|
|
21
21
|
* API:
|
|
22
22
|
*
|
|
23
|
-
* - [PigmentStack API](https://mui.com/material-ui/api/pigment-stack/)
|
|
23
|
+
* - [PigmentStack API](https://v6.mui.com/material-ui/api/pigment-stack/)
|
|
24
24
|
*/
|
|
25
25
|
const PigmentStack = /*#__PURE__*/React.forwardRef(function PigmentStack({
|
|
26
26
|
className,
|
package/modern/Popper/Popper.js
CHANGED
|
@@ -19,13 +19,13 @@ const PopperRoot = styled(BasePopper, {
|
|
|
19
19
|
*
|
|
20
20
|
* Demos:
|
|
21
21
|
*
|
|
22
|
-
* - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)
|
|
23
|
-
* - [Menu](https://mui.com/material-ui/react-menu/)
|
|
24
|
-
* - [Popper](https://mui.com/material-ui/react-popper/)
|
|
22
|
+
* - [Autocomplete](https://v6.mui.com/material-ui/react-autocomplete/)
|
|
23
|
+
* - [Menu](https://v6.mui.com/material-ui/react-menu/)
|
|
24
|
+
* - [Popper](https://v6.mui.com/material-ui/react-popper/)
|
|
25
25
|
*
|
|
26
26
|
* API:
|
|
27
27
|
*
|
|
28
|
-
* - [Popper API](https://mui.com/material-ui/api/popper/)
|
|
28
|
+
* - [Popper API](https://v6.mui.com/material-ui/api/popper/)
|
|
29
29
|
*/
|
|
30
30
|
const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
|
|
31
31
|
const isRtl = useRtl();
|
package/modern/Portal/Portal.js
CHANGED
|
@@ -14,11 +14,11 @@ function getContainer(container) {
|
|
|
14
14
|
*
|
|
15
15
|
* Demos:
|
|
16
16
|
*
|
|
17
|
-
* - [Portal](https://mui.com/material-ui/react-portal/)
|
|
17
|
+
* - [Portal](https://v6.mui.com/material-ui/react-portal/)
|
|
18
18
|
*
|
|
19
19
|
* API:
|
|
20
20
|
*
|
|
21
|
-
* - [Portal API](https://mui.com/material-ui/api/portal/)
|
|
21
|
+
* - [Portal API](https://v6.mui.com/material-ui/api/portal/)
|
|
22
22
|
*/
|
|
23
23
|
const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {
|
|
24
24
|
const {
|
|
@@ -196,7 +196,10 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
196
196
|
},
|
|
197
197
|
ownerState
|
|
198
198
|
});
|
|
199
|
-
const [ClickAwaySlot,
|
|
199
|
+
const [ClickAwaySlot, {
|
|
200
|
+
ownerState: clickAwayOwnerStateProp,
|
|
201
|
+
...clickAwayListenerProps
|
|
202
|
+
}] = useSlot('clickAwayListener', {
|
|
200
203
|
elementType: ClickAwayListener,
|
|
201
204
|
externalForwardedProps,
|
|
202
205
|
getSlotProps: handlers => ({
|
|
@@ -245,6 +248,9 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
245
248
|
}
|
|
246
249
|
return /*#__PURE__*/_jsx(ClickAwaySlot, {
|
|
247
250
|
...clickAwayListenerProps,
|
|
251
|
+
...(slots.clickAwayListener && {
|
|
252
|
+
ownerState: clickAwayOwnerStateProp
|
|
253
|
+
}),
|
|
248
254
|
children: /*#__PURE__*/_jsx(Root, {
|
|
249
255
|
...rootProps,
|
|
250
256
|
children: /*#__PURE__*/_jsx(TransitionSlot, {
|
|
@@ -372,22 +372,49 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
372
372
|
slots: backwardCompatibleSlots,
|
|
373
373
|
slotProps: backwardCompatibleSlotProps
|
|
374
374
|
};
|
|
375
|
+
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
376
|
+
elementType: SpeedDialRoot,
|
|
377
|
+
externalForwardedProps: {
|
|
378
|
+
...externalForwardedProps,
|
|
379
|
+
...other
|
|
380
|
+
},
|
|
381
|
+
ownerState,
|
|
382
|
+
ref,
|
|
383
|
+
className: clsx(classes.root, className),
|
|
384
|
+
additionalProps: {
|
|
385
|
+
role: 'presentation'
|
|
386
|
+
},
|
|
387
|
+
getSlotProps: handlers => ({
|
|
388
|
+
...handlers,
|
|
389
|
+
onKeyDown: event => {
|
|
390
|
+
handlers.onKeyDown?.(event);
|
|
391
|
+
handleKeyDown(event);
|
|
392
|
+
},
|
|
393
|
+
onBlur: event => {
|
|
394
|
+
handlers.onBlur?.(event);
|
|
395
|
+
handleClose(event);
|
|
396
|
+
},
|
|
397
|
+
onFocus: event => {
|
|
398
|
+
handlers.onFocus?.(event);
|
|
399
|
+
handleOpen(event);
|
|
400
|
+
},
|
|
401
|
+
onMouseEnter: event => {
|
|
402
|
+
handlers.onMouseEnter?.(event);
|
|
403
|
+
handleOpen(event);
|
|
404
|
+
},
|
|
405
|
+
onMouseLeave: event => {
|
|
406
|
+
handlers.onMouseLeave?.(event);
|
|
407
|
+
handleClose(event);
|
|
408
|
+
}
|
|
409
|
+
})
|
|
410
|
+
});
|
|
375
411
|
const [TransitionSlot, transitionProps] = useSlot('transition', {
|
|
376
412
|
elementType: Zoom,
|
|
377
413
|
externalForwardedProps,
|
|
378
414
|
ownerState
|
|
379
415
|
});
|
|
380
|
-
return /*#__PURE__*/_jsxs(
|
|
381
|
-
|
|
382
|
-
ref: ref,
|
|
383
|
-
role: "presentation",
|
|
384
|
-
onKeyDown: handleKeyDown,
|
|
385
|
-
onBlur: handleClose,
|
|
386
|
-
onFocus: handleOpen,
|
|
387
|
-
onMouseEnter: handleOpen,
|
|
388
|
-
onMouseLeave: handleClose,
|
|
389
|
-
ownerState: ownerState,
|
|
390
|
-
...other,
|
|
416
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
417
|
+
...rootSlotProps,
|
|
391
418
|
children: [/*#__PURE__*/_jsx(TransitionSlot, {
|
|
392
419
|
in: !hidden,
|
|
393
420
|
timeout: transitionDuration,
|
|
@@ -507,6 +534,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
507
534
|
* @default {}
|
|
508
535
|
*/
|
|
509
536
|
slotProps: PropTypes.shape({
|
|
537
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
510
538
|
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
511
539
|
}),
|
|
512
540
|
/**
|
|
@@ -514,6 +542,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
514
542
|
* @default {}
|
|
515
543
|
*/
|
|
516
544
|
slots: PropTypes.shape({
|
|
545
|
+
root: PropTypes.elementType,
|
|
517
546
|
transition: PropTypes.elementType
|
|
518
547
|
}),
|
|
519
548
|
/**
|
|
@@ -341,7 +341,7 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
|
|
|
341
341
|
* @default 'left'
|
|
342
342
|
* @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
343
343
|
*/
|
|
344
|
-
tooltipPlacement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
344
|
+
tooltipPlacement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
345
345
|
/**
|
|
346
346
|
* Label to display in the tooltip.
|
|
347
347
|
* @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
@@ -162,6 +162,16 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
162
162
|
...slotProps
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
+
const [RootSlot, rootProps] = useSlot('root', {
|
|
166
|
+
elementType: StepLabelRoot,
|
|
167
|
+
externalForwardedProps: {
|
|
168
|
+
...externalForwardedProps,
|
|
169
|
+
...other
|
|
170
|
+
},
|
|
171
|
+
ownerState,
|
|
172
|
+
ref,
|
|
173
|
+
className: clsx(classes.root, className)
|
|
174
|
+
});
|
|
165
175
|
const [LabelSlot, labelProps] = useSlot('label', {
|
|
166
176
|
elementType: StepLabelLabel,
|
|
167
177
|
externalForwardedProps,
|
|
@@ -172,11 +182,8 @@ const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref)
|
|
|
172
182
|
externalForwardedProps,
|
|
173
183
|
ownerState
|
|
174
184
|
});
|
|
175
|
-
return /*#__PURE__*/_jsxs(
|
|
176
|
-
|
|
177
|
-
ref: ref,
|
|
178
|
-
ownerState: ownerState,
|
|
179
|
-
...other,
|
|
185
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
186
|
+
...rootProps,
|
|
180
187
|
children: [icon || StepIconSlot ? /*#__PURE__*/_jsx(StepLabelIconContainer, {
|
|
181
188
|
className: classes.iconContainer,
|
|
182
189
|
ownerState: ownerState,
|
|
@@ -242,6 +249,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
242
249
|
*/
|
|
243
250
|
slotProps: PropTypes.shape({
|
|
244
251
|
label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
252
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
245
253
|
stepIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
246
254
|
}),
|
|
247
255
|
/**
|
|
@@ -250,6 +258,7 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
250
258
|
*/
|
|
251
259
|
slots: PropTypes.shape({
|
|
252
260
|
label: PropTypes.elementType,
|
|
261
|
+
root: PropTypes.elementType,
|
|
253
262
|
stepIcon: PropTypes.elementType
|
|
254
263
|
}),
|
|
255
264
|
/**
|
package/modern/Switch/Switch.js
CHANGED
|
@@ -14,6 +14,7 @@ import { styled } from "../zero-styled/index.js";
|
|
|
14
14
|
import memoTheme from "../utils/memoTheme.js";
|
|
15
15
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
16
16
|
import switchClasses, { getSwitchUtilityClass } from "./switchClasses.js";
|
|
17
|
+
import useSlot from "../utils/useSlot.js";
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
const useUtilityClasses = ownerState => {
|
|
19
20
|
const {
|
|
@@ -212,6 +213,8 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
|
|
|
212
213
|
edge = false,
|
|
213
214
|
size = 'medium',
|
|
214
215
|
sx,
|
|
216
|
+
slots = {},
|
|
217
|
+
slotProps = {},
|
|
215
218
|
...other
|
|
216
219
|
} = props;
|
|
217
220
|
const ownerState = {
|
|
@@ -221,14 +224,36 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
|
|
|
221
224
|
size
|
|
222
225
|
};
|
|
223
226
|
const classes = useUtilityClasses(ownerState);
|
|
224
|
-
const
|
|
227
|
+
const externalForwardedProps = {
|
|
228
|
+
slots,
|
|
229
|
+
slotProps
|
|
230
|
+
};
|
|
231
|
+
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
232
|
+
className: clsx(classes.root, className),
|
|
233
|
+
elementType: SwitchRoot,
|
|
234
|
+
externalForwardedProps,
|
|
235
|
+
ownerState,
|
|
236
|
+
additionalProps: {
|
|
237
|
+
sx
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
const [ThumbSlot, thumbSlotProps] = useSlot('thumb', {
|
|
225
241
|
className: classes.thumb,
|
|
226
|
-
|
|
242
|
+
elementType: SwitchThumb,
|
|
243
|
+
externalForwardedProps,
|
|
244
|
+
ownerState
|
|
227
245
|
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
246
|
+
const icon = /*#__PURE__*/_jsx(ThumbSlot, {
|
|
247
|
+
...thumbSlotProps
|
|
248
|
+
});
|
|
249
|
+
const [TrackSlot, trackSlotProps] = useSlot('track', {
|
|
250
|
+
className: classes.track,
|
|
251
|
+
elementType: SwitchTrack,
|
|
252
|
+
externalForwardedProps,
|
|
253
|
+
ownerState
|
|
254
|
+
});
|
|
255
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
256
|
+
...rootSlotProps,
|
|
232
257
|
children: [/*#__PURE__*/_jsx(SwitchSwitchBase, {
|
|
233
258
|
type: "checkbox",
|
|
234
259
|
icon: icon,
|
|
@@ -239,10 +264,25 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
|
|
|
239
264
|
classes: {
|
|
240
265
|
...classes,
|
|
241
266
|
root: classes.switchBase
|
|
267
|
+
},
|
|
268
|
+
slots: {
|
|
269
|
+
...(slots.switchBase && {
|
|
270
|
+
root: slots.switchBase
|
|
271
|
+
}),
|
|
272
|
+
...(slots.input && {
|
|
273
|
+
input: slots.input
|
|
274
|
+
})
|
|
275
|
+
},
|
|
276
|
+
slotProps: {
|
|
277
|
+
...(slotProps.switchBase && {
|
|
278
|
+
root: typeof slotProps.switchBase === 'function' ? slotProps.switchBase(ownerState) : slotProps.switchBase
|
|
279
|
+
}),
|
|
280
|
+
...(slotProps.input && {
|
|
281
|
+
input: typeof slotProps.input === 'function' ? slotProps.input(ownerState) : slotProps.input
|
|
282
|
+
})
|
|
242
283
|
}
|
|
243
|
-
}), /*#__PURE__*/_jsx(
|
|
244
|
-
|
|
245
|
-
ownerState: ownerState
|
|
284
|
+
}), /*#__PURE__*/_jsx(TrackSlot, {
|
|
285
|
+
...trackSlotProps
|
|
246
286
|
})]
|
|
247
287
|
});
|
|
248
288
|
});
|
|
@@ -332,6 +372,28 @@ process.env.NODE_ENV !== "production" ? Switch.propTypes /* remove-proptypes */
|
|
|
332
372
|
* @default 'medium'
|
|
333
373
|
*/
|
|
334
374
|
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
375
|
+
/**
|
|
376
|
+
* The props used for each slot inside.
|
|
377
|
+
* @default {}
|
|
378
|
+
*/
|
|
379
|
+
slotProps: PropTypes.shape({
|
|
380
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
381
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
382
|
+
switchBase: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
383
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
384
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
385
|
+
}),
|
|
386
|
+
/**
|
|
387
|
+
* The components used for each slot inside.
|
|
388
|
+
* @default {}
|
|
389
|
+
*/
|
|
390
|
+
slots: PropTypes.shape({
|
|
391
|
+
input: PropTypes.elementType,
|
|
392
|
+
root: PropTypes.elementType,
|
|
393
|
+
switchBase: PropTypes.elementType,
|
|
394
|
+
thumb: PropTypes.elementType,
|
|
395
|
+
track: PropTypes.elementType
|
|
396
|
+
}),
|
|
335
397
|
/**
|
|
336
398
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
337
399
|
*/
|
package/modern/Tabs/Tabs.js
CHANGED
|
@@ -693,6 +693,10 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
693
693
|
});
|
|
694
694
|
});
|
|
695
695
|
const handleKeyDown = event => {
|
|
696
|
+
// Check if a modifier key (Alt, Shift, Ctrl, Meta) is pressed
|
|
697
|
+
if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
696
700
|
const list = tabListRef.current;
|
|
697
701
|
const currentFocus = ownerDocument(list).activeElement;
|
|
698
702
|
// Keyboard navigation assumes that [role="tab"] are siblings
|
|
@@ -160,6 +160,25 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
160
160
|
}
|
|
161
161
|
inputAdditionalProps['aria-describedby'] = undefined;
|
|
162
162
|
}
|
|
163
|
+
const [RootSlot, rootProps] = useSlot('root', {
|
|
164
|
+
elementType: TextFieldRoot,
|
|
165
|
+
shouldForwardComponentProp: true,
|
|
166
|
+
externalForwardedProps: {
|
|
167
|
+
...externalForwardedProps,
|
|
168
|
+
...other
|
|
169
|
+
},
|
|
170
|
+
ownerState,
|
|
171
|
+
className: clsx(classes.root, className),
|
|
172
|
+
ref,
|
|
173
|
+
additionalProps: {
|
|
174
|
+
disabled,
|
|
175
|
+
error,
|
|
176
|
+
fullWidth,
|
|
177
|
+
required,
|
|
178
|
+
color,
|
|
179
|
+
variant
|
|
180
|
+
}
|
|
181
|
+
});
|
|
163
182
|
const [InputSlot, inputProps] = useSlot('input', {
|
|
164
183
|
elementType: InputComponent,
|
|
165
184
|
externalForwardedProps,
|
|
@@ -211,17 +230,8 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
211
230
|
},
|
|
212
231
|
...inputProps
|
|
213
232
|
});
|
|
214
|
-
return /*#__PURE__*/_jsxs(
|
|
215
|
-
|
|
216
|
-
disabled: disabled,
|
|
217
|
-
error: error,
|
|
218
|
-
fullWidth: fullWidth,
|
|
219
|
-
ref: ref,
|
|
220
|
-
required: required,
|
|
221
|
-
color: color,
|
|
222
|
-
variant: variant,
|
|
223
|
-
ownerState: ownerState,
|
|
224
|
-
...other,
|
|
233
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
234
|
+
...rootProps,
|
|
225
235
|
children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabelSlot, {
|
|
226
236
|
htmlFor: id,
|
|
227
237
|
id: inputLabelId,
|
|
@@ -423,6 +433,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
|
|
|
423
433
|
htmlInput: PropTypes.elementType,
|
|
424
434
|
input: PropTypes.elementType,
|
|
425
435
|
inputLabel: PropTypes.elementType,
|
|
436
|
+
root: PropTypes.elementType,
|
|
426
437
|
select: PropTypes.elementType
|
|
427
438
|
}),
|
|
428
439
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';
|
|
5
|
+
import { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_ownerWindow as ownerWindow } from '@mui/utils';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
function getStyleValue(value) {
|
|
8
8
|
return parseInt(value, 10) || 0;
|
|
@@ -37,11 +37,11 @@ function isEmpty(obj) {
|
|
|
37
37
|
*
|
|
38
38
|
* Demos:
|
|
39
39
|
*
|
|
40
|
-
* - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
|
|
40
|
+
* - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
|
|
41
41
|
*
|
|
42
42
|
* API:
|
|
43
43
|
*
|
|
44
|
-
* - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
|
|
44
|
+
* - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
|
|
45
45
|
*/
|
|
46
46
|
const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {
|
|
47
47
|
const {
|
|
@@ -112,6 +112,15 @@ const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize
|
|
|
112
112
|
overflowing
|
|
113
113
|
};
|
|
114
114
|
}, [maxRows, minRows, props.placeholder]);
|
|
115
|
+
const didHeightChange = useEventCallback(() => {
|
|
116
|
+
const textarea = textareaRef.current;
|
|
117
|
+
const textareaStyles = calculateTextareaStyles();
|
|
118
|
+
if (!textarea || !textareaStyles || isEmpty(textareaStyles)) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
const outerHeightStyle = textareaStyles.outerHeightStyle;
|
|
122
|
+
return heightRef.current != null && heightRef.current !== outerHeightStyle;
|
|
123
|
+
});
|
|
115
124
|
const syncHeight = React.useCallback(() => {
|
|
116
125
|
const textarea = textareaRef.current;
|
|
117
126
|
const textareaStyles = calculateTextareaStyles();
|
|
@@ -127,37 +136,39 @@ const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize
|
|
|
127
136
|
}, [calculateTextareaStyles]);
|
|
128
137
|
const frameRef = React.useRef(-1);
|
|
129
138
|
useEnhancedEffect(() => {
|
|
130
|
-
const
|
|
139
|
+
const debouncedHandleResize = debounce(syncHeight);
|
|
131
140
|
const textarea = textareaRef?.current;
|
|
132
141
|
if (!textarea) {
|
|
133
142
|
return undefined;
|
|
134
143
|
}
|
|
135
144
|
const containerWindow = ownerWindow(textarea);
|
|
136
|
-
containerWindow.addEventListener('resize',
|
|
145
|
+
containerWindow.addEventListener('resize', debouncedHandleResize);
|
|
137
146
|
let resizeObserver;
|
|
138
147
|
if (typeof ResizeObserver !== 'undefined') {
|
|
139
148
|
resizeObserver = new ResizeObserver(() => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
if (didHeightChange()) {
|
|
150
|
+
// avoid "ResizeObserver loop completed with undelivered notifications" error
|
|
151
|
+
// by temporarily unobserving the textarea element while manipulating the height
|
|
152
|
+
// and reobserving one frame later
|
|
153
|
+
resizeObserver.unobserve(textarea);
|
|
154
|
+
cancelAnimationFrame(frameRef.current);
|
|
155
|
+
syncHeight();
|
|
156
|
+
frameRef.current = requestAnimationFrame(() => {
|
|
157
|
+
resizeObserver.observe(textarea);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
149
160
|
});
|
|
150
161
|
resizeObserver.observe(textarea);
|
|
151
162
|
}
|
|
152
163
|
return () => {
|
|
153
|
-
|
|
164
|
+
debouncedHandleResize.clear();
|
|
154
165
|
cancelAnimationFrame(frameRef.current);
|
|
155
|
-
containerWindow.removeEventListener('resize',
|
|
166
|
+
containerWindow.removeEventListener('resize', debouncedHandleResize);
|
|
156
167
|
if (resizeObserver) {
|
|
157
168
|
resizeObserver.disconnect();
|
|
158
169
|
}
|
|
159
170
|
};
|
|
160
|
-
}, [calculateTextareaStyles, syncHeight]);
|
|
171
|
+
}, [calculateTextareaStyles, syncHeight, didHeightChange]);
|
|
161
172
|
useEnhancedEffect(() => {
|
|
162
173
|
syncHeight();
|
|
163
174
|
});
|
|
@@ -841,7 +841,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
|
|
|
841
841
|
* Tooltip placement.
|
|
842
842
|
* @default 'bottom'
|
|
843
843
|
*/
|
|
844
|
-
placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
844
|
+
placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
845
845
|
/**
|
|
846
846
|
* The component used for the popper.
|
|
847
847
|
* @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
package/modern/index.js
CHANGED
|
@@ -17,6 +17,17 @@ export default function ThemeProvider({
|
|
|
17
17
|
}
|
|
18
18
|
const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
|
|
19
19
|
if (!('colorSchemes' in muiTheme)) {
|
|
20
|
+
if (!('vars' in muiTheme)) {
|
|
21
|
+
// For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
|
|
22
|
+
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
23
|
+
return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
|
|
24
|
+
theme: {
|
|
25
|
+
...theme,
|
|
26
|
+
vars: null
|
|
27
|
+
},
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
20
31
|
return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
|
|
21
32
|
theme: theme,
|
|
22
33
|
...props
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -29,6 +29,9 @@ export default function useScrollTrigger(options = {}) {
|
|
|
29
29
|
const store = React.useRef();
|
|
30
30
|
const [trigger, setTrigger] = React.useState(() => getTrigger(store, other));
|
|
31
31
|
React.useEffect(() => {
|
|
32
|
+
if (target === null) {
|
|
33
|
+
return setTrigger(false);
|
|
34
|
+
}
|
|
32
35
|
const handleScroll = () => {
|
|
33
36
|
setTrigger(getTrigger(store, {
|
|
34
37
|
target,
|
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.4.
|
|
1
|
+
export const version = "6.4.9";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("4");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("9");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|