@mui/material 9.0.0-beta.1 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.mts +3 -3
- package/Accordion/Accordion.d.ts +3 -3
- package/AccordionActions/AccordionActions.d.mts +2 -2
- package/AccordionActions/AccordionActions.d.ts +2 -2
- package/AccordionDetails/AccordionDetails.d.mts +2 -2
- package/AccordionDetails/AccordionDetails.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.mts +3 -3
- package/AccordionSummary/AccordionSummary.d.ts +3 -3
- package/Alert/Alert.d.mts +3 -3
- package/Alert/Alert.d.ts +3 -3
- package/AlertTitle/AlertTitle.d.mts +3 -3
- package/AlertTitle/AlertTitle.d.ts +3 -3
- package/AppBar/AppBar.d.mts +3 -3
- package/AppBar/AppBar.d.ts +3 -3
- package/Autocomplete/Autocomplete.d.mts +2 -2
- package/Autocomplete/Autocomplete.d.ts +2 -2
- package/Autocomplete/Autocomplete.js +65 -11
- package/Autocomplete/Autocomplete.mjs +65 -11
- package/Avatar/Avatar.d.mts +2 -2
- package/Avatar/Avatar.d.ts +2 -2
- package/Avatar/Avatar.js +4 -0
- package/Avatar/Avatar.mjs +4 -0
- package/AvatarGroup/AvatarGroup.d.mts +2 -2
- package/AvatarGroup/AvatarGroup.d.ts +2 -2
- package/Backdrop/Backdrop.d.mts +3 -3
- package/Backdrop/Backdrop.d.ts +3 -3
- package/Badge/Badge.d.mts +3 -3
- package/Badge/Badge.d.ts +3 -3
- package/Badge/Badge.js +3 -0
- package/Badge/Badge.mjs +3 -0
- package/BottomNavigation/BottomNavigation.d.mts +2 -2
- package/BottomNavigation/BottomNavigation.d.ts +2 -2
- package/BottomNavigationAction/BottomNavigationAction.d.mts +3 -3
- package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
- package/Box/Box.d.mts +3 -3
- package/Box/Box.d.ts +3 -3
- package/Breadcrumbs/Breadcrumbs.d.mts +3 -3
- package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/Button/Button.d.mts +6 -6
- package/Button/Button.d.ts +6 -6
- package/Button/Button.js +19 -2
- package/Button/Button.mjs +19 -2
- package/ButtonBase/ButtonBase.d.mts +9 -2
- package/ButtonBase/ButtonBase.d.ts +9 -2
- package/ButtonBase/ButtonBase.js +5 -2
- package/ButtonBase/ButtonBase.mjs +5 -2
- package/ButtonGroup/ButtonGroup.d.mts +2 -2
- package/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/CHANGELOG.md +160 -1245
- package/Card/Card.d.mts +3 -3
- package/Card/Card.d.ts +3 -3
- package/CardActionArea/CardActionArea.d.mts +3 -3
- package/CardActionArea/CardActionArea.d.ts +3 -3
- package/CardActions/CardActions.d.mts +2 -2
- package/CardActions/CardActions.d.ts +2 -2
- package/CardContent/CardContent.d.mts +2 -2
- package/CardContent/CardContent.d.ts +2 -2
- package/CardHeader/CardHeader.d.mts +2 -2
- package/CardHeader/CardHeader.d.ts +2 -2
- package/CardMedia/CardMedia.d.mts +2 -2
- package/CardMedia/CardMedia.d.ts +2 -2
- package/Checkbox/Checkbox.d.mts +4 -4
- package/Checkbox/Checkbox.d.ts +4 -4
- package/Checkbox/Checkbox.js +2 -1
- package/Checkbox/Checkbox.mjs +2 -1
- package/Chip/Chip.d.mts +2 -2
- package/Chip/Chip.d.ts +2 -2
- package/CircularProgress/CircularProgress.d.mts +14 -4
- package/CircularProgress/CircularProgress.d.ts +14 -4
- package/CircularProgress/CircularProgress.js +33 -6
- package/CircularProgress/CircularProgress.mjs +33 -6
- package/ClickAwayListener/ClickAwayListener.d.mts +3 -3
- package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
- package/ClickAwayListener/ClickAwayListener.js +6 -9
- package/ClickAwayListener/ClickAwayListener.mjs +6 -9
- package/Collapse/Collapse.d.mts +5 -5
- package/Collapse/Collapse.d.ts +5 -5
- package/Collapse/Collapse.js +6 -18
- package/Collapse/Collapse.mjs +7 -19
- package/Container/Container.d.mts +2 -2
- package/Container/Container.d.ts +2 -2
- package/CssBaseline/CssBaseline.d.mts +2 -2
- package/CssBaseline/CssBaseline.d.ts +2 -2
- package/Dialog/Dialog.d.mts +3 -3
- package/Dialog/Dialog.d.ts +3 -3
- package/Dialog/Dialog.js +11 -6
- package/Dialog/Dialog.mjs +11 -6
- package/DialogActions/DialogActions.d.mts +2 -2
- package/DialogActions/DialogActions.d.ts +2 -2
- package/DialogContent/DialogContent.d.mts +2 -2
- package/DialogContent/DialogContent.d.ts +2 -2
- package/DialogContentText/DialogContentText.d.mts +3 -3
- package/DialogContentText/DialogContentText.d.ts +3 -3
- package/DialogTitle/DialogTitle.d.mts +3 -3
- package/DialogTitle/DialogTitle.d.ts +3 -3
- package/Divider/Divider.d.mts +4 -4
- package/Divider/Divider.d.ts +4 -4
- package/Drawer/Drawer.d.mts +3 -3
- package/Drawer/Drawer.d.ts +3 -3
- package/Drawer/Drawer.js +19 -8
- package/Drawer/Drawer.mjs +19 -8
- package/Fab/Fab.d.mts +3 -3
- package/Fab/Fab.d.ts +3 -3
- package/Fab/Fab.js +7 -1
- package/Fab/Fab.mjs +7 -1
- package/Fade/Fade.d.mts +3 -3
- package/Fade/Fade.d.ts +3 -3
- package/Fade/Fade.js +28 -32
- package/Fade/Fade.mjs +29 -33
- package/FilledInput/FilledInput.d.mts +7 -3
- package/FilledInput/FilledInput.d.ts +7 -3
- package/FilledInput/FilledInput.js +18 -20
- package/FilledInput/FilledInput.mjs +18 -20
- package/FormControl/FormControl.d.mts +7 -7
- package/FormControl/FormControl.d.ts +7 -7
- package/FormControl/useFormControl.d.mts +12 -2
- package/FormControl/useFormControl.d.ts +12 -2
- package/FormControl/useFormControl.js +13 -0
- package/FormControl/useFormControl.mjs +12 -0
- package/FormControlLabel/FormControlLabel.d.mts +4 -4
- package/FormControlLabel/FormControlLabel.d.ts +4 -4
- package/FormControlLabel/FormControlLabel.js +5 -8
- package/FormControlLabel/FormControlLabel.mjs +5 -8
- package/FormGroup/FormGroup.d.mts +3 -3
- package/FormGroup/FormGroup.d.ts +3 -3
- package/FormGroup/FormGroup.js +2 -5
- package/FormGroup/FormGroup.mjs +2 -5
- package/FormHelperText/FormHelperText.d.mts +3 -3
- package/FormHelperText/FormHelperText.d.ts +3 -3
- package/FormHelperText/FormHelperText.js +2 -5
- package/FormHelperText/FormHelperText.mjs +2 -5
- package/FormLabel/FormLabel.d.mts +5 -5
- package/FormLabel/FormLabel.d.ts +5 -5
- package/FormLabel/FormLabel.js +2 -5
- package/FormLabel/FormLabel.mjs +2 -5
- package/GlobalStyles/GlobalStyles.d.mts +2 -2
- package/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/Grid/Grid.d.mts +2 -2
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js +2 -2
- package/Grid/Grid.mjs +2 -2
- package/Grow/Grow.d.mts +5 -5
- package/Grow/Grow.d.ts +5 -5
- package/Grow/Grow.js +30 -38
- package/Grow/Grow.mjs +31 -39
- package/Icon/Icon.d.mts +3 -3
- package/Icon/Icon.d.ts +3 -3
- package/IconButton/IconButton.d.mts +5 -5
- package/IconButton/IconButton.d.ts +5 -5
- package/IconButton/IconButton.js +1 -8
- package/IconButton/IconButton.mjs +1 -8
- package/ImageList/ImageList.d.mts +2 -2
- package/ImageList/ImageList.d.ts +2 -2
- package/ImageListItem/ImageListItem.d.mts +2 -2
- package/ImageListItem/ImageListItem.d.ts +2 -2
- package/ImageListItemBar/ImageListItemBar.d.mts +2 -2
- package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.d.mts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.js +2 -2
- package/InitColorSchemeScript/InitColorSchemeScript.mjs +2 -2
- package/Input/Input.d.mts +7 -3
- package/Input/Input.d.ts +7 -3
- package/Input/Input.js +6 -0
- package/Input/Input.mjs +6 -0
- package/InputAdornment/InputAdornment.d.mts +2 -2
- package/InputAdornment/InputAdornment.d.ts +2 -2
- package/InputBase/InputBase.d.mts +4 -3
- package/InputBase/InputBase.d.ts +4 -3
- package/InputBase/InputBase.js +50 -15
- package/InputBase/InputBase.mjs +50 -15
- package/InputLabel/InputLabel.d.mts +4 -4
- package/InputLabel/InputLabel.d.ts +4 -4
- package/InputLabel/InputLabel.js +5 -8
- package/InputLabel/InputLabel.mjs +5 -8
- package/LinearProgress/LinearProgress.d.mts +14 -4
- package/LinearProgress/LinearProgress.d.ts +14 -4
- package/LinearProgress/LinearProgress.js +42 -10
- package/LinearProgress/LinearProgress.mjs +42 -10
- package/Link/Link.d.mts +4 -4
- package/Link/Link.d.ts +4 -4
- package/List/List.d.mts +4 -4
- package/List/List.d.ts +4 -4
- package/List/List.js +2 -1
- package/List/List.mjs +2 -1
- package/ListItem/ListItem.d.mts +3 -3
- package/ListItem/ListItem.d.ts +3 -3
- package/ListItem/ListItem.js +1 -2
- package/ListItem/ListItem.mjs +1 -2
- package/ListItemAvatar/ListItemAvatar.d.mts +2 -2
- package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
- package/ListItemButton/ListItemButton.d.mts +4 -4
- package/ListItemButton/ListItemButton.d.ts +4 -4
- package/ListItemButton/ListItemButton.js +7 -1
- package/ListItemButton/ListItemButton.mjs +7 -1
- package/ListItemIcon/ListItemIcon.d.mts +3 -3
- package/ListItemIcon/ListItemIcon.d.ts +3 -3
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.mts +2 -2
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
- package/ListItemText/ListItemText.d.mts +3 -3
- package/ListItemText/ListItemText.d.ts +3 -3
- package/ListSubheader/ListSubheader.d.mts +3 -3
- package/ListSubheader/ListSubheader.d.ts +3 -3
- package/Menu/Menu.d.mts +4 -4
- package/Menu/Menu.d.ts +4 -4
- package/MenuItem/MenuItem.d.mts +3 -3
- package/MenuItem/MenuItem.d.ts +3 -3
- package/MenuItem/MenuItem.js +7 -1
- package/MenuItem/MenuItem.mjs +7 -1
- package/MenuList/MenuList.d.mts +4 -4
- package/MenuList/MenuList.d.ts +4 -4
- package/MenuList/MenuList.js +2 -1
- package/MenuList/MenuList.mjs +2 -1
- package/MobileStepper/MobileStepper.d.mts +3 -3
- package/MobileStepper/MobileStepper.d.ts +3 -3
- package/Modal/Modal.d.mts +7 -7
- package/Modal/Modal.d.ts +7 -7
- package/NativeSelect/NativeSelect.d.mts +3 -3
- package/NativeSelect/NativeSelect.d.ts +3 -3
- package/NativeSelect/NativeSelect.js +2 -5
- package/NativeSelect/NativeSelect.mjs +2 -5
- package/NoSsr/NoSsr.d.mts +2 -2
- package/NoSsr/NoSsr.d.ts +2 -2
- package/NoSsr/NoSsr.js +2 -2
- package/NoSsr/NoSsr.mjs +2 -2
- package/OutlinedInput/OutlinedInput.d.mts +4 -4
- package/OutlinedInput/OutlinedInput.d.ts +4 -4
- package/OutlinedInput/OutlinedInput.js +13 -23
- package/OutlinedInput/OutlinedInput.mjs +13 -23
- package/Pagination/Pagination.d.mts +2 -2
- package/Pagination/Pagination.d.ts +2 -2
- package/PaginationItem/PaginationItem.d.mts +3 -3
- package/PaginationItem/PaginationItem.d.ts +3 -3
- package/Paper/Paper.d.mts +4 -4
- package/Paper/Paper.d.ts +4 -4
- package/PigmentContainer/PigmentContainer.d.mts +2 -2
- package/PigmentContainer/PigmentContainer.d.ts +2 -2
- package/PigmentContainer/PigmentContainer.js +2 -3
- package/PigmentContainer/PigmentContainer.mjs +2 -3
- package/PigmentGrid/PigmentGrid.d.mts +2 -2
- package/PigmentGrid/PigmentGrid.d.ts +2 -2
- package/PigmentGrid/PigmentGrid.js +2 -2
- package/PigmentGrid/PigmentGrid.mjs +2 -2
- package/PigmentStack/PigmentStack.d.mts +2 -2
- package/PigmentStack/PigmentStack.d.ts +2 -2
- package/PigmentStack/PigmentStack.js +2 -2
- package/PigmentStack/PigmentStack.mjs +2 -2
- package/Popover/Popover.d.mts +4 -4
- package/Popover/Popover.d.ts +4 -4
- package/Popper/BasePopper.js +23 -1
- package/Popper/BasePopper.mjs +23 -1
- package/Popper/Popper.d.mts +4 -4
- package/Popper/Popper.d.ts +4 -4
- package/Popper/Popper.js +4 -4
- package/Popper/Popper.mjs +4 -4
- package/Portal/Portal.d.mts +2 -2
- package/Portal/Portal.d.ts +2 -2
- package/Portal/Portal.js +2 -2
- package/Portal/Portal.mjs +2 -2
- package/README.md +3 -3
- package/Radio/Radio.d.mts +3 -3
- package/Radio/Radio.d.ts +3 -3
- package/RadioGroup/RadioGroup.d.mts +3 -3
- package/RadioGroup/RadioGroup.d.ts +3 -3
- package/Rating/Rating.d.mts +2 -2
- package/Rating/Rating.d.ts +2 -2
- package/ScopedCssBaseline/ScopedCssBaseline.d.mts +2 -2
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
- package/Select/Select.d.mts +3 -3
- package/Select/Select.d.ts +3 -3
- package/Select/Select.js +2 -5
- package/Select/Select.mjs +2 -5
- package/Select/SelectInput.js +164 -2
- package/Select/SelectInput.mjs +164 -2
- package/Skeleton/Skeleton.d.mts +2 -2
- package/Skeleton/Skeleton.d.ts +2 -2
- package/Slide/Slide.d.mts +4 -4
- package/Slide/Slide.d.ts +4 -4
- package/Slide/Slide.js +73 -50
- package/Slide/Slide.mjs +74 -52
- package/Slider/Slider.d.mts +4 -4
- package/Slider/Slider.d.ts +4 -4
- package/Slider/Slider.js +11 -2
- package/Slider/Slider.mjs +11 -2
- package/Slider/useSlider.d.mts +1 -1
- package/Slider/useSlider.d.ts +1 -1
- package/Slider/useSlider.js +236 -209
- package/Slider/useSlider.mjs +236 -209
- package/Slider/useSlider.types.d.mts +2 -2
- package/Slider/useSlider.types.d.ts +2 -2
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SnackbarContent/SnackbarContent.d.mts +3 -3
- package/SnackbarContent/SnackbarContent.d.ts +3 -3
- package/SpeedDial/SpeedDial.d.mts +2 -2
- package/SpeedDial/SpeedDial.d.ts +2 -2
- package/SpeedDialAction/SpeedDialAction.d.mts +3 -3
- package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
- package/SpeedDialIcon/SpeedDialIcon.d.mts +2 -2
- package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
- package/Stack/Stack.d.mts +2 -2
- package/Stack/Stack.d.ts +2 -2
- package/Step/Step.d.mts +2 -2
- package/Step/Step.d.ts +2 -2
- package/StepButton/StepButton.d.mts +3 -3
- package/StepButton/StepButton.d.ts +3 -3
- package/StepConnector/StepConnector.d.mts +2 -2
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepConnector/StepConnector.js +1 -2
- package/StepConnector/StepConnector.mjs +1 -2
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepIcon/StepIcon.d.mts +3 -3
- package/StepIcon/StepIcon.d.ts +3 -3
- package/StepLabel/StepLabel.d.mts +2 -2
- package/StepLabel/StepLabel.d.ts +2 -2
- package/Stepper/Stepper.d.mts +2 -2
- package/Stepper/Stepper.d.ts +2 -2
- package/SvgIcon/SvgIcon.d.mts +3 -3
- package/SvgIcon/SvgIcon.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.d.mts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
- package/SwipeableDrawer/SwipeableDrawer.js +7 -6
- package/SwipeableDrawer/SwipeableDrawer.mjs +7 -6
- package/Switch/Switch.d.mts +4 -4
- package/Switch/Switch.d.ts +4 -4
- package/Switch/Switch.js +9 -4
- package/Switch/Switch.mjs +9 -4
- package/Tab/Tab.d.mts +3 -3
- package/Tab/Tab.d.ts +3 -3
- package/TabScrollButton/TabScrollButton.d.mts +2 -2
- package/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/Table/Table.d.mts +2 -2
- package/Table/Table.d.ts +2 -2
- package/TableBody/TableBody.d.mts +2 -2
- package/TableBody/TableBody.d.ts +2 -2
- package/TableCell/TableCell.d.mts +2 -2
- package/TableCell/TableCell.d.ts +2 -2
- package/TableContainer/TableContainer.d.mts +2 -2
- package/TableContainer/TableContainer.d.ts +2 -2
- package/TableFooter/TableFooter.d.mts +2 -2
- package/TableFooter/TableFooter.d.ts +2 -2
- package/TableHead/TableHead.d.mts +2 -2
- package/TableHead/TableHead.d.ts +2 -2
- package/TablePagination/TablePagination.d.mts +4 -4
- package/TablePagination/TablePagination.d.ts +4 -4
- package/TablePaginationActions/TablePaginationActions.d.mts +2 -2
- package/TablePaginationActions/TablePaginationActions.d.ts +2 -2
- package/TableRow/TableRow.d.mts +2 -2
- package/TableRow/TableRow.d.ts +2 -2
- package/TableSortLabel/TableSortLabel.d.mts +3 -3
- package/TableSortLabel/TableSortLabel.d.ts +3 -3
- package/TableSortLabel/TableSortLabel.js +1 -2
- package/TableSortLabel/TableSortLabel.mjs +1 -2
- package/Tabs/ScrollbarSize.js +2 -1
- package/Tabs/ScrollbarSize.mjs +2 -1
- package/Tabs/Tabs.d.mts +2 -2
- package/Tabs/Tabs.d.ts +2 -2
- package/Tabs/Tabs.js +2 -1
- package/Tabs/Tabs.mjs +2 -1
- package/TextField/TextField.d.mts +10 -10
- package/TextField/TextField.d.ts +10 -10
- package/TextareaAutosize/TextareaAutosize.d.mts +2 -2
- package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
- package/TextareaAutosize/TextareaAutosize.js +2 -2
- package/TextareaAutosize/TextareaAutosize.mjs +2 -2
- package/ToggleButton/ToggleButton.d.mts +3 -3
- package/ToggleButton/ToggleButton.d.ts +3 -3
- package/ToggleButtonGroup/ToggleButtonGroup.d.mts +2 -2
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
- package/Toolbar/Toolbar.d.mts +2 -2
- package/Toolbar/Toolbar.d.ts +2 -2
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +26 -108
- package/Tooltip/Tooltip.mjs +26 -108
- package/Typography/Typography.d.mts +4 -4
- package/Typography/Typography.d.ts +4 -4
- package/Unstable_TrapFocus/FocusTrap.js +18 -14
- package/Unstable_TrapFocus/FocusTrap.mjs +18 -14
- package/Zoom/Zoom.d.mts +3 -3
- package/Zoom/Zoom.d.ts +3 -3
- package/Zoom/Zoom.js +24 -30
- package/Zoom/Zoom.mjs +25 -31
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +7 -7
- package/styles/createThemeNoVars.js +1 -1
- package/styles/createThemeNoVars.mjs +1 -1
- package/styles/responsiveFontSizes.js +19 -8
- package/styles/responsiveFontSizes.mjs +19 -8
- package/styles/useThemeProps.d.mts +3 -3
- package/styles/useThemeProps.d.ts +3 -3
- package/transitions/utils.d.mts +24 -0
- package/transitions/utils.d.ts +24 -0
- package/transitions/utils.js +91 -0
- package/transitions/utils.mjs +88 -0
- package/useAutocomplete/useAutocomplete.d.mts +4 -5
- package/useAutocomplete/useAutocomplete.d.ts +4 -5
- package/useAutocomplete/useAutocomplete.js +166 -53
- package/useAutocomplete/useAutocomplete.mjs +166 -53
- package/utils/contains.d.mts +2 -0
- package/utils/contains.d.ts +2 -0
- package/utils/contains.js +9 -0
- package/utils/contains.mjs +2 -0
- package/utils/focusable.d.mts +7 -0
- package/utils/focusable.d.ts +7 -0
- package/utils/focusable.js +20 -0
- package/utils/focusable.mjs +13 -0
- package/utils/getEventTarget.d.mts +2 -0
- package/utils/getEventTarget.d.ts +2 -0
- package/utils/getEventTarget.js +9 -0
- package/utils/getEventTarget.mjs +2 -0
- package/utils/mergeSlotProps.js +2 -8
- package/utils/mergeSlotProps.mjs +1 -8
- package/version/index.js +3 -3
- package/version/index.mjs +3 -3
- package/FormControl/formControlState.js +0 -21
- package/FormControl/formControlState.mjs +0 -15
package/Slide/Slide.js
CHANGED
|
@@ -22,26 +22,50 @@ var _zeroStyled = require("../zero-styled");
|
|
|
22
22
|
var _utils = require("../transitions/utils");
|
|
23
23
|
var _utils2 = require("../utils");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
const hiddenStyles = {
|
|
26
|
+
visibility: 'hidden'
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Detects SwipeableDrawer's active-swipe `translate(x, y)` transform.
|
|
31
|
+
* Keep this in sync with SwipeableDrawer.setPosition.
|
|
32
|
+
*/
|
|
33
|
+
function isGestureTranslate(transform) {
|
|
34
|
+
return typeof transform === 'string' && /^translate\(.+,\s*.+\)$/.test(transform);
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
// Translate the node so it can't be seen on the screen.
|
|
26
38
|
// Later, we're going to translate the node back to its original location with `none`.
|
|
27
|
-
function getTranslateValue(direction, node, resolvedContainer) {
|
|
28
|
-
const
|
|
39
|
+
function getTranslateValue(direction, node, resolvedContainer, options = {}) {
|
|
40
|
+
const {
|
|
41
|
+
resetInlineTransform = true
|
|
42
|
+
} = options;
|
|
29
43
|
const containerRect = resolvedContainer && resolvedContainer.getBoundingClientRect();
|
|
30
44
|
const containerWindow = (0, _utils2.ownerWindow)(node);
|
|
45
|
+
let rect;
|
|
31
46
|
let transform;
|
|
32
|
-
if (
|
|
33
|
-
transform
|
|
47
|
+
if (resetInlineTransform) {
|
|
48
|
+
// Clear the inline transform and transition before reading layout and computed
|
|
49
|
+
// style so we compute from the element's natural position, not its previous
|
|
50
|
+
// off-screen translation.
|
|
51
|
+
const previousTransform = node.style.transform;
|
|
52
|
+
const previousTransition = node.style.transition;
|
|
53
|
+
node.style.transition = '';
|
|
54
|
+
node.style.transform = '';
|
|
55
|
+
rect = node.getBoundingClientRect();
|
|
56
|
+
const computedStyle = containerWindow.getComputedStyle(node);
|
|
57
|
+
transform = computedStyle.getPropertyValue('transform');
|
|
58
|
+
node.style.transform = previousTransform;
|
|
59
|
+
node.style.transition = previousTransition;
|
|
34
60
|
} else {
|
|
61
|
+
rect = node.getBoundingClientRect();
|
|
35
62
|
const computedStyle = containerWindow.getComputedStyle(node);
|
|
36
|
-
transform = computedStyle.getPropertyValue('
|
|
37
|
-
}
|
|
38
|
-
let offsetX = 0;
|
|
39
|
-
let offsetY = 0;
|
|
40
|
-
if (transform && transform !== 'none' && typeof transform === 'string') {
|
|
41
|
-
const transformValues = transform.split('(')[1].split(')')[0].split(',');
|
|
42
|
-
offsetX = parseInt(transformValues[4], 10);
|
|
43
|
-
offsetY = parseInt(transformValues[5], 10);
|
|
63
|
+
transform = computedStyle.getPropertyValue('transform');
|
|
44
64
|
}
|
|
65
|
+
const {
|
|
66
|
+
offsetX,
|
|
67
|
+
offsetY
|
|
68
|
+
} = (0, _utils.getTranslateOffsets)(transform);
|
|
45
69
|
if (direction === 'left') {
|
|
46
70
|
if (containerRect) {
|
|
47
71
|
return `translateX(${containerRect.right + offsetX - rect.left}px)`;
|
|
@@ -70,11 +94,10 @@ function getTranslateValue(direction, node, resolvedContainer) {
|
|
|
70
94
|
function resolveContainer(containerPropProp) {
|
|
71
95
|
return typeof containerPropProp === 'function' ? containerPropProp() : containerPropProp;
|
|
72
96
|
}
|
|
73
|
-
function setTranslateValue(direction, node, containerProp) {
|
|
97
|
+
function setTranslateValue(direction, node, containerProp, options) {
|
|
74
98
|
const resolvedContainer = resolveContainer(containerProp);
|
|
75
|
-
const transform = getTranslateValue(direction, node, resolvedContainer);
|
|
99
|
+
const transform = getTranslateValue(direction, node, resolvedContainer, options);
|
|
76
100
|
if (transform) {
|
|
77
|
-
node.style.webkitTransform = transform;
|
|
78
101
|
node.style.transform = transform;
|
|
79
102
|
}
|
|
80
103
|
}
|
|
@@ -109,30 +132,19 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
109
132
|
onExiting,
|
|
110
133
|
style,
|
|
111
134
|
timeout = defaultTimeout,
|
|
112
|
-
// eslint-disable-next-line react/prop-types
|
|
113
|
-
TransitionComponent = _reactTransitionGroup.Transition,
|
|
114
135
|
...other
|
|
115
136
|
} = props;
|
|
116
137
|
const childrenRef = React.useRef(null);
|
|
138
|
+
const preserveInlineTransformRef = React.useRef(false);
|
|
117
139
|
const handleRef = (0, _useForkRef.default)((0, _getReactElementRef.default)(children), childrenRef, ref);
|
|
118
|
-
const
|
|
119
|
-
if (callback) {
|
|
120
|
-
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
|
121
|
-
if (isAppearing === undefined) {
|
|
122
|
-
callback(childrenRef.current);
|
|
123
|
-
} else {
|
|
124
|
-
callback(childrenRef.current, isAppearing);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
|
|
140
|
+
const handleEnter = (0, _utils.normalizedTransitionCallback)(childrenRef, (node, isAppearing) => {
|
|
129
141
|
setTranslateValue(direction, node, containerProp);
|
|
130
142
|
(0, _utils.reflow)(node);
|
|
131
143
|
if (onEnter) {
|
|
132
144
|
onEnter(node, isAppearing);
|
|
133
145
|
}
|
|
134
146
|
});
|
|
135
|
-
const handleEntering = normalizedTransitionCallback((node, isAppearing) => {
|
|
147
|
+
const handleEntering = (0, _utils.normalizedTransitionCallback)(childrenRef, (node, isAppearing) => {
|
|
136
148
|
const transitionProps = (0, _utils.getTransitionProps)({
|
|
137
149
|
timeout,
|
|
138
150
|
style,
|
|
@@ -140,21 +152,15 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
140
152
|
}, {
|
|
141
153
|
mode: 'enter'
|
|
142
154
|
});
|
|
143
|
-
node.style.
|
|
144
|
-
...transitionProps
|
|
145
|
-
});
|
|
146
|
-
node.style.transition = theme.transitions.create('transform', {
|
|
147
|
-
...transitionProps
|
|
148
|
-
});
|
|
149
|
-
node.style.webkitTransform = 'none';
|
|
155
|
+
node.style.transition = theme.transitions.create('transform', transitionProps);
|
|
150
156
|
node.style.transform = 'none';
|
|
151
157
|
if (onEntering) {
|
|
152
158
|
onEntering(node, isAppearing);
|
|
153
159
|
}
|
|
154
160
|
});
|
|
155
|
-
const handleEntered = normalizedTransitionCallback(onEntered);
|
|
156
|
-
const handleExiting = normalizedTransitionCallback(onExiting);
|
|
157
|
-
const handleExit = normalizedTransitionCallback(node => {
|
|
161
|
+
const handleEntered = (0, _utils.normalizedTransitionCallback)(childrenRef, onEntered);
|
|
162
|
+
const handleExiting = (0, _utils.normalizedTransitionCallback)(childrenRef, onExiting);
|
|
163
|
+
const handleExit = (0, _utils.normalizedTransitionCallback)(childrenRef, node => {
|
|
158
164
|
const transitionProps = (0, _utils.getTransitionProps)({
|
|
159
165
|
timeout,
|
|
160
166
|
style,
|
|
@@ -162,16 +168,22 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
162
168
|
}, {
|
|
163
169
|
mode: 'exit'
|
|
164
170
|
});
|
|
165
|
-
node.style.webkitTransition = theme.transitions.create('-webkit-transform', transitionProps);
|
|
166
171
|
node.style.transition = theme.transitions.create('transform', transitionProps);
|
|
167
|
-
|
|
172
|
+
const preserveInlineTransform = isGestureTranslate(node.style.transform);
|
|
173
|
+
preserveInlineTransformRef.current = preserveInlineTransform;
|
|
174
|
+
|
|
175
|
+
// Preserve SwipeableDrawer's inline gesture transform during exit. Slide's
|
|
176
|
+
// own off-screen translateX/Y transforms still use the reset path.
|
|
177
|
+
setTranslateValue(direction, node, containerProp, {
|
|
178
|
+
resetInlineTransform: !preserveInlineTransform
|
|
179
|
+
});
|
|
168
180
|
if (onExit) {
|
|
169
181
|
onExit(node);
|
|
170
182
|
}
|
|
171
183
|
});
|
|
172
|
-
const handleExited = normalizedTransitionCallback(node => {
|
|
184
|
+
const handleExited = (0, _utils.normalizedTransitionCallback)(childrenRef, node => {
|
|
185
|
+
preserveInlineTransformRef.current = false;
|
|
173
186
|
// No need for transitions when the component is hidden
|
|
174
|
-
node.style.webkitTransition = '';
|
|
175
187
|
node.style.transition = '';
|
|
176
188
|
if (onExited) {
|
|
177
189
|
onExited(node);
|
|
@@ -206,13 +218,13 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
206
218
|
};
|
|
207
219
|
}, [direction, inProp, containerProp]);
|
|
208
220
|
React.useEffect(() => {
|
|
209
|
-
if (!inProp) {
|
|
221
|
+
if (!inProp && !preserveInlineTransformRef.current) {
|
|
210
222
|
// We need to update the position of the drawer when the direction change and
|
|
211
223
|
// when it's hidden.
|
|
212
224
|
updatePosition();
|
|
213
225
|
}
|
|
214
226
|
}, [inProp, updatePosition]);
|
|
215
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
227
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
|
|
216
228
|
nodeRef: childrenRef,
|
|
217
229
|
onEnter: handleEnter,
|
|
218
230
|
onEntered: handleEntered,
|
|
@@ -229,13 +241,24 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
229
241
|
ownerState,
|
|
230
242
|
...restChildProps
|
|
231
243
|
}) => {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
style
|
|
235
|
-
visibility:
|
|
244
|
+
let childStyle;
|
|
245
|
+
if (state === 'exited' && !inProp) {
|
|
246
|
+
childStyle = style || children.props.style ? {
|
|
247
|
+
visibility: 'hidden',
|
|
248
|
+
...style,
|
|
249
|
+
...children.props.style
|
|
250
|
+
} : hiddenStyles;
|
|
251
|
+
} else if (style && children.props.style) {
|
|
252
|
+
childStyle = {
|
|
236
253
|
...style,
|
|
237
254
|
...children.props.style
|
|
238
|
-
}
|
|
255
|
+
};
|
|
256
|
+
} else {
|
|
257
|
+
childStyle = style || children.props.style;
|
|
258
|
+
}
|
|
259
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
260
|
+
ref: handleRef,
|
|
261
|
+
style: childStyle,
|
|
239
262
|
...restChildProps
|
|
240
263
|
});
|
|
241
264
|
}
|
package/Slide/Slide.mjs
CHANGED
|
@@ -11,30 +11,53 @@ import isLayoutSupported from "../utils/isLayoutSupported.mjs";
|
|
|
11
11
|
import debounce from "../utils/debounce.mjs";
|
|
12
12
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
13
13
|
import { useTheme } from "../zero-styled/index.mjs";
|
|
14
|
-
import { reflow, getTransitionProps } from "../transitions/utils.mjs";
|
|
14
|
+
import { normalizedTransitionCallback, reflow, getTransitionProps, getTranslateOffsets } from "../transitions/utils.mjs";
|
|
15
15
|
import { ownerWindow } from "../utils/index.mjs";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const hiddenStyles = {
|
|
18
|
+
visibility: 'hidden'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Detects SwipeableDrawer's active-swipe `translate(x, y)` transform.
|
|
23
|
+
* Keep this in sync with SwipeableDrawer.setPosition.
|
|
24
|
+
*/
|
|
25
|
+
function isGestureTranslate(transform) {
|
|
26
|
+
return typeof transform === 'string' && /^translate\(.+,\s*.+\)$/.test(transform);
|
|
27
|
+
}
|
|
16
28
|
|
|
17
29
|
// Translate the node so it can't be seen on the screen.
|
|
18
30
|
// Later, we're going to translate the node back to its original location with `none`.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
function getTranslateValue(direction, node, resolvedContainer, options = {}) {
|
|
32
|
+
const {
|
|
33
|
+
resetInlineTransform = true
|
|
34
|
+
} = options;
|
|
22
35
|
const containerRect = resolvedContainer && resolvedContainer.getBoundingClientRect();
|
|
23
36
|
const containerWindow = ownerWindow(node);
|
|
37
|
+
let rect;
|
|
24
38
|
let transform;
|
|
25
|
-
if (
|
|
26
|
-
transform
|
|
39
|
+
if (resetInlineTransform) {
|
|
40
|
+
// Clear the inline transform and transition before reading layout and computed
|
|
41
|
+
// style so we compute from the element's natural position, not its previous
|
|
42
|
+
// off-screen translation.
|
|
43
|
+
const previousTransform = node.style.transform;
|
|
44
|
+
const previousTransition = node.style.transition;
|
|
45
|
+
node.style.transition = '';
|
|
46
|
+
node.style.transform = '';
|
|
47
|
+
rect = node.getBoundingClientRect();
|
|
48
|
+
const computedStyle = containerWindow.getComputedStyle(node);
|
|
49
|
+
transform = computedStyle.getPropertyValue('transform');
|
|
50
|
+
node.style.transform = previousTransform;
|
|
51
|
+
node.style.transition = previousTransition;
|
|
27
52
|
} else {
|
|
53
|
+
rect = node.getBoundingClientRect();
|
|
28
54
|
const computedStyle = containerWindow.getComputedStyle(node);
|
|
29
|
-
transform = computedStyle.getPropertyValue('
|
|
30
|
-
}
|
|
31
|
-
let offsetX = 0;
|
|
32
|
-
let offsetY = 0;
|
|
33
|
-
if (transform && transform !== 'none' && typeof transform === 'string') {
|
|
34
|
-
const transformValues = transform.split('(')[1].split(')')[0].split(',');
|
|
35
|
-
offsetX = parseInt(transformValues[4], 10);
|
|
36
|
-
offsetY = parseInt(transformValues[5], 10);
|
|
55
|
+
transform = computedStyle.getPropertyValue('transform');
|
|
37
56
|
}
|
|
57
|
+
const {
|
|
58
|
+
offsetX,
|
|
59
|
+
offsetY
|
|
60
|
+
} = getTranslateOffsets(transform);
|
|
38
61
|
if (direction === 'left') {
|
|
39
62
|
if (containerRect) {
|
|
40
63
|
return `translateX(${containerRect.right + offsetX - rect.left}px)`;
|
|
@@ -63,11 +86,10 @@ function getTranslateValue(direction, node, resolvedContainer) {
|
|
|
63
86
|
function resolveContainer(containerPropProp) {
|
|
64
87
|
return typeof containerPropProp === 'function' ? containerPropProp() : containerPropProp;
|
|
65
88
|
}
|
|
66
|
-
export function setTranslateValue(direction, node, containerProp) {
|
|
89
|
+
export function setTranslateValue(direction, node, containerProp, options) {
|
|
67
90
|
const resolvedContainer = resolveContainer(containerProp);
|
|
68
|
-
const transform = getTranslateValue(direction, node, resolvedContainer);
|
|
91
|
+
const transform = getTranslateValue(direction, node, resolvedContainer, options);
|
|
69
92
|
if (transform) {
|
|
70
|
-
node.style.webkitTransform = transform;
|
|
71
93
|
node.style.transform = transform;
|
|
72
94
|
}
|
|
73
95
|
}
|
|
@@ -102,30 +124,19 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
102
124
|
onExiting,
|
|
103
125
|
style,
|
|
104
126
|
timeout = defaultTimeout,
|
|
105
|
-
// eslint-disable-next-line react/prop-types
|
|
106
|
-
TransitionComponent = Transition,
|
|
107
127
|
...other
|
|
108
128
|
} = props;
|
|
109
129
|
const childrenRef = React.useRef(null);
|
|
130
|
+
const preserveInlineTransformRef = React.useRef(false);
|
|
110
131
|
const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref);
|
|
111
|
-
const
|
|
112
|
-
if (callback) {
|
|
113
|
-
// onEnterXxx and onExitXxx callbacks have a different arguments.length value.
|
|
114
|
-
if (isAppearing === undefined) {
|
|
115
|
-
callback(childrenRef.current);
|
|
116
|
-
} else {
|
|
117
|
-
callback(childrenRef.current, isAppearing);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
|
|
132
|
+
const handleEnter = normalizedTransitionCallback(childrenRef, (node, isAppearing) => {
|
|
122
133
|
setTranslateValue(direction, node, containerProp);
|
|
123
134
|
reflow(node);
|
|
124
135
|
if (onEnter) {
|
|
125
136
|
onEnter(node, isAppearing);
|
|
126
137
|
}
|
|
127
138
|
});
|
|
128
|
-
const handleEntering = normalizedTransitionCallback((node, isAppearing) => {
|
|
139
|
+
const handleEntering = normalizedTransitionCallback(childrenRef, (node, isAppearing) => {
|
|
129
140
|
const transitionProps = getTransitionProps({
|
|
130
141
|
timeout,
|
|
131
142
|
style,
|
|
@@ -133,21 +144,15 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
133
144
|
}, {
|
|
134
145
|
mode: 'enter'
|
|
135
146
|
});
|
|
136
|
-
node.style.
|
|
137
|
-
...transitionProps
|
|
138
|
-
});
|
|
139
|
-
node.style.transition = theme.transitions.create('transform', {
|
|
140
|
-
...transitionProps
|
|
141
|
-
});
|
|
142
|
-
node.style.webkitTransform = 'none';
|
|
147
|
+
node.style.transition = theme.transitions.create('transform', transitionProps);
|
|
143
148
|
node.style.transform = 'none';
|
|
144
149
|
if (onEntering) {
|
|
145
150
|
onEntering(node, isAppearing);
|
|
146
151
|
}
|
|
147
152
|
});
|
|
148
|
-
const handleEntered = normalizedTransitionCallback(onEntered);
|
|
149
|
-
const handleExiting = normalizedTransitionCallback(onExiting);
|
|
150
|
-
const handleExit = normalizedTransitionCallback(node => {
|
|
153
|
+
const handleEntered = normalizedTransitionCallback(childrenRef, onEntered);
|
|
154
|
+
const handleExiting = normalizedTransitionCallback(childrenRef, onExiting);
|
|
155
|
+
const handleExit = normalizedTransitionCallback(childrenRef, node => {
|
|
151
156
|
const transitionProps = getTransitionProps({
|
|
152
157
|
timeout,
|
|
153
158
|
style,
|
|
@@ -155,16 +160,22 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
155
160
|
}, {
|
|
156
161
|
mode: 'exit'
|
|
157
162
|
});
|
|
158
|
-
node.style.webkitTransition = theme.transitions.create('-webkit-transform', transitionProps);
|
|
159
163
|
node.style.transition = theme.transitions.create('transform', transitionProps);
|
|
160
|
-
|
|
164
|
+
const preserveInlineTransform = isGestureTranslate(node.style.transform);
|
|
165
|
+
preserveInlineTransformRef.current = preserveInlineTransform;
|
|
166
|
+
|
|
167
|
+
// Preserve SwipeableDrawer's inline gesture transform during exit. Slide's
|
|
168
|
+
// own off-screen translateX/Y transforms still use the reset path.
|
|
169
|
+
setTranslateValue(direction, node, containerProp, {
|
|
170
|
+
resetInlineTransform: !preserveInlineTransform
|
|
171
|
+
});
|
|
161
172
|
if (onExit) {
|
|
162
173
|
onExit(node);
|
|
163
174
|
}
|
|
164
175
|
});
|
|
165
|
-
const handleExited = normalizedTransitionCallback(node => {
|
|
176
|
+
const handleExited = normalizedTransitionCallback(childrenRef, node => {
|
|
177
|
+
preserveInlineTransformRef.current = false;
|
|
166
178
|
// No need for transitions when the component is hidden
|
|
167
|
-
node.style.webkitTransition = '';
|
|
168
179
|
node.style.transition = '';
|
|
169
180
|
if (onExited) {
|
|
170
181
|
onExited(node);
|
|
@@ -199,13 +210,13 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
199
210
|
};
|
|
200
211
|
}, [direction, inProp, containerProp]);
|
|
201
212
|
React.useEffect(() => {
|
|
202
|
-
if (!inProp) {
|
|
213
|
+
if (!inProp && !preserveInlineTransformRef.current) {
|
|
203
214
|
// We need to update the position of the drawer when the direction change and
|
|
204
215
|
// when it's hidden.
|
|
205
216
|
updatePosition();
|
|
206
217
|
}
|
|
207
218
|
}, [inProp, updatePosition]);
|
|
208
|
-
return /*#__PURE__*/_jsx(
|
|
219
|
+
return /*#__PURE__*/_jsx(Transition, {
|
|
209
220
|
nodeRef: childrenRef,
|
|
210
221
|
onEnter: handleEnter,
|
|
211
222
|
onEntered: handleEntered,
|
|
@@ -222,13 +233,24 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
222
233
|
ownerState,
|
|
223
234
|
...restChildProps
|
|
224
235
|
}) => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
style
|
|
228
|
-
visibility:
|
|
236
|
+
let childStyle;
|
|
237
|
+
if (state === 'exited' && !inProp) {
|
|
238
|
+
childStyle = style || children.props.style ? {
|
|
239
|
+
visibility: 'hidden',
|
|
240
|
+
...style,
|
|
241
|
+
...children.props.style
|
|
242
|
+
} : hiddenStyles;
|
|
243
|
+
} else if (style && children.props.style) {
|
|
244
|
+
childStyle = {
|
|
229
245
|
...style,
|
|
230
246
|
...children.props.style
|
|
231
|
-
}
|
|
247
|
+
};
|
|
248
|
+
} else {
|
|
249
|
+
childStyle = style || children.props.style;
|
|
250
|
+
}
|
|
251
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
252
|
+
ref: handleRef,
|
|
253
|
+
style: childStyle,
|
|
232
254
|
...restChildProps
|
|
233
255
|
});
|
|
234
256
|
}
|
package/Slider/Slider.d.mts
CHANGED
|
@@ -92,7 +92,7 @@ export type SliderSlotsAndSlotProps = CreateSlotsAndSlotProps<SliderSlots, {
|
|
|
92
92
|
markLabel: SlotProps<'span', SliderMarkLabelSlotPropsOverrides, SliderOwnerState>;
|
|
93
93
|
/**
|
|
94
94
|
* Props forwarded to the value label slot.
|
|
95
|
-
* By default, the available props are based on the [SliderValueLabel](https://
|
|
95
|
+
* By default, the available props are based on the [SliderValueLabel](https://mui.com/material-ui/api/slider/) component.
|
|
96
96
|
*/
|
|
97
97
|
valueLabel: SlotComponentProps<typeof SliderValueLabelComponent, SliderValueLabelSlotPropsOverrides, SliderOwnerState>;
|
|
98
98
|
/**
|
|
@@ -197,7 +197,7 @@ export interface SliderOwnProps<Value extends number | readonly number[]> {
|
|
|
197
197
|
*/
|
|
198
198
|
onChange?: ((event: Event, value: Value, activeThumb: number) => void) | undefined;
|
|
199
199
|
/**
|
|
200
|
-
* Callback function that is fired when the
|
|
200
|
+
* Callback function that is fired when the pointer or touch interaction ends.
|
|
201
201
|
*
|
|
202
202
|
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
203
203
|
* @param {Value} value The new value.
|
|
@@ -312,11 +312,11 @@ export declare const SliderValueLabel: React.FC<SliderValueLabelProps>;
|
|
|
312
312
|
*
|
|
313
313
|
* Demos:
|
|
314
314
|
*
|
|
315
|
-
* - [Slider](https://
|
|
315
|
+
* - [Slider](https://mui.com/material-ui/react-slider/)
|
|
316
316
|
*
|
|
317
317
|
* API:
|
|
318
318
|
*
|
|
319
|
-
* - [Slider API](https://
|
|
319
|
+
* - [Slider API](https://mui.com/material-ui/api/slider/)
|
|
320
320
|
*/
|
|
321
321
|
declare const Slider: SliderType;
|
|
322
322
|
export type SliderProps<RootComponent extends React.ElementType = SliderTypeMap['defaultComponent'], AdditionalProps = {}, Value extends number | readonly number[] = number | number[]> = OverrideProps<SliderTypeMap<RootComponent, AdditionalProps, Value>, RootComponent> & {
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export type SliderSlotsAndSlotProps = CreateSlotsAndSlotProps<SliderSlots, {
|
|
|
92
92
|
markLabel: SlotProps<'span', SliderMarkLabelSlotPropsOverrides, SliderOwnerState>;
|
|
93
93
|
/**
|
|
94
94
|
* Props forwarded to the value label slot.
|
|
95
|
-
* By default, the available props are based on the [SliderValueLabel](https://
|
|
95
|
+
* By default, the available props are based on the [SliderValueLabel](https://mui.com/material-ui/api/slider/) component.
|
|
96
96
|
*/
|
|
97
97
|
valueLabel: SlotComponentProps<typeof SliderValueLabelComponent, SliderValueLabelSlotPropsOverrides, SliderOwnerState>;
|
|
98
98
|
/**
|
|
@@ -197,7 +197,7 @@ export interface SliderOwnProps<Value extends number | readonly number[]> {
|
|
|
197
197
|
*/
|
|
198
198
|
onChange?: ((event: Event, value: Value, activeThumb: number) => void) | undefined;
|
|
199
199
|
/**
|
|
200
|
-
* Callback function that is fired when the
|
|
200
|
+
* Callback function that is fired when the pointer or touch interaction ends.
|
|
201
201
|
*
|
|
202
202
|
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
203
203
|
* @param {Value} value The new value.
|
|
@@ -312,11 +312,11 @@ export declare const SliderValueLabel: React.FC<SliderValueLabelProps>;
|
|
|
312
312
|
*
|
|
313
313
|
* Demos:
|
|
314
314
|
*
|
|
315
|
-
* - [Slider](https://
|
|
315
|
+
* - [Slider](https://mui.com/material-ui/react-slider/)
|
|
316
316
|
*
|
|
317
317
|
* API:
|
|
318
318
|
*
|
|
319
|
-
* - [Slider API](https://
|
|
319
|
+
* - [Slider API](https://mui.com/material-ui/api/slider/)
|
|
320
320
|
*/
|
|
321
321
|
declare const Slider: SliderType;
|
|
322
322
|
export type SliderProps<RootComponent extends React.ElementType = SliderTypeMap['defaultComponent'], AdditionalProps = {}, Value extends number | readonly number[] = number | number[]> = OverrideProps<SliderTypeMap<RootComponent, AdditionalProps, Value>, RootComponent> & {
|
package/Slider/Slider.js
CHANGED
|
@@ -138,6 +138,10 @@ const SliderRail = exports.SliderRail = (0, _zeroStyled.styled)('span', {
|
|
|
138
138
|
borderRadius: 'inherit',
|
|
139
139
|
backgroundColor: 'currentColor',
|
|
140
140
|
opacity: 0.38,
|
|
141
|
+
'@media (forced-colors: active)': {
|
|
142
|
+
border: '1px solid transparent',
|
|
143
|
+
boxSizing: 'border-box'
|
|
144
|
+
},
|
|
141
145
|
variants: [{
|
|
142
146
|
props: {
|
|
143
147
|
orientation: 'horizontal'
|
|
@@ -187,7 +191,9 @@ const SliderTrack = exports.SliderTrack = (0, _zeroStyled.styled)('span', {
|
|
|
187
191
|
size: 'small'
|
|
188
192
|
},
|
|
189
193
|
style: {
|
|
190
|
-
|
|
194
|
+
'@media (forced-colors: none)': {
|
|
195
|
+
border: 'none'
|
|
196
|
+
}
|
|
191
197
|
}
|
|
192
198
|
}, {
|
|
193
199
|
props: {
|
|
@@ -256,6 +262,9 @@ const SliderThumb = exports.SliderThumb = (0, _zeroStyled.styled)('span', {
|
|
|
256
262
|
transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
|
|
257
263
|
duration: theme.transitions.duration.shortest
|
|
258
264
|
}),
|
|
265
|
+
'@media (forced-colors: active)': {
|
|
266
|
+
border: '1px solid ButtonBorder'
|
|
267
|
+
},
|
|
259
268
|
'&::before': {
|
|
260
269
|
position: 'absolute',
|
|
261
270
|
content: '""',
|
|
@@ -882,7 +891,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
882
891
|
*/
|
|
883
892
|
onChange: _propTypes.default.func,
|
|
884
893
|
/**
|
|
885
|
-
* Callback function that is fired when the
|
|
894
|
+
* Callback function that is fired when the pointer or touch interaction ends.
|
|
886
895
|
*
|
|
887
896
|
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
888
897
|
* @param {Value} value The new value.
|
package/Slider/Slider.mjs
CHANGED
|
@@ -131,6 +131,10 @@ export const SliderRail = styled('span', {
|
|
|
131
131
|
borderRadius: 'inherit',
|
|
132
132
|
backgroundColor: 'currentColor',
|
|
133
133
|
opacity: 0.38,
|
|
134
|
+
'@media (forced-colors: active)': {
|
|
135
|
+
border: '1px solid transparent',
|
|
136
|
+
boxSizing: 'border-box'
|
|
137
|
+
},
|
|
134
138
|
variants: [{
|
|
135
139
|
props: {
|
|
136
140
|
orientation: 'horizontal'
|
|
@@ -180,7 +184,9 @@ export const SliderTrack = styled('span', {
|
|
|
180
184
|
size: 'small'
|
|
181
185
|
},
|
|
182
186
|
style: {
|
|
183
|
-
|
|
187
|
+
'@media (forced-colors: none)': {
|
|
188
|
+
border: 'none'
|
|
189
|
+
}
|
|
184
190
|
}
|
|
185
191
|
}, {
|
|
186
192
|
props: {
|
|
@@ -249,6 +255,9 @@ export const SliderThumb = styled('span', {
|
|
|
249
255
|
transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
|
|
250
256
|
duration: theme.transitions.duration.shortest
|
|
251
257
|
}),
|
|
258
|
+
'@media (forced-colors: active)': {
|
|
259
|
+
border: '1px solid ButtonBorder'
|
|
260
|
+
},
|
|
252
261
|
'&::before': {
|
|
253
262
|
position: 'absolute',
|
|
254
263
|
content: '""',
|
|
@@ -876,7 +885,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
876
885
|
*/
|
|
877
886
|
onChange: PropTypes.func,
|
|
878
887
|
/**
|
|
879
|
-
* Callback function that is fired when the
|
|
888
|
+
* Callback function that is fired when the pointer or touch interaction ends.
|
|
880
889
|
*
|
|
881
890
|
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
882
891
|
* @param {Value} value The new value.
|
package/Slider/useSlider.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UseSliderParameters, UseSliderReturnValue } from "./useSlider.types.mjs";
|
|
2
2
|
export declare function valueToPercent(value: number, min: number, max: number): number;
|
|
3
|
-
export declare const Identity: (x:
|
|
3
|
+
export declare const Identity: (x: number) => number;
|
|
4
4
|
export declare function useSlider(parameters: UseSliderParameters): UseSliderReturnValue;
|
package/Slider/useSlider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { UseSliderParameters, UseSliderReturnValue } from "./useSlider.types.js";
|
|
2
2
|
export declare function valueToPercent(value: number, min: number, max: number): number;
|
|
3
|
-
export declare const Identity: (x:
|
|
3
|
+
export declare const Identity: (x: number) => number;
|
|
4
4
|
export declare function useSlider(parameters: UseSliderParameters): UseSliderReturnValue;
|