@mui/material 6.0.0-alpha.6 → 6.0.0-alpha.8
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.js +33 -33
- package/AccordionActions/AccordionActions.js +11 -12
- package/AccordionDetails/AccordionDetails.js +7 -9
- package/AccordionSummary/AccordionSummary.js +14 -16
- package/Alert/Alert.js +56 -51
- package/AlertTitle/AlertTitle.js +7 -9
- package/AppBar/AppBar.js +34 -32
- package/Autocomplete/Autocomplete.d.ts +78 -12
- package/Autocomplete/Autocomplete.js +251 -162
- package/Avatar/Avatar.js +41 -35
- package/AvatarGroup/AvatarGroup.js +31 -31
- package/Backdrop/Backdrop.js +33 -30
- package/Badge/Badge.js +31 -30
- package/BottomNavigation/BottomNavigation.js +15 -17
- package/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/Breadcrumbs/Breadcrumbs.js +19 -21
- package/Button/Button.js +32 -29
- package/ButtonBase/ButtonBase.js +43 -42
- package/ButtonBase/TouchRipple.js +9 -12
- package/ButtonGroup/ButtonGroup.js +23 -25
- package/CHANGELOG.md +84 -2
- package/Card/Card.js +11 -12
- package/CardActionArea/CardActionArea.js +9 -12
- package/CardActions/CardActions.js +11 -12
- package/CardContent/CardContent.js +11 -12
- package/CardHeader/CardHeader.js +30 -31
- package/CardMedia/CardMedia.js +19 -20
- package/Checkbox/Checkbox.js +29 -26
- package/Chip/Chip.js +38 -37
- package/CircularProgress/CircularProgress.js +24 -23
- package/CircularProgress/circularProgressClasses.d.ts +6 -2
- package/Collapse/Collapse.js +44 -42
- package/CssBaseline/CssBaseline.js +17 -14
- package/Dialog/Dialog.js +41 -42
- package/DialogActions/DialogActions.js +11 -12
- package/DialogContent/DialogContent.js +11 -12
- package/DialogContentText/DialogContentText.js +13 -11
- package/DialogTitle/DialogTitle.js +8 -10
- package/Divider/Divider.js +19 -21
- package/Drawer/Drawer.js +50 -49
- package/Fab/Fab.js +26 -23
- package/Fade/Fade.js +31 -30
- package/FilledInput/FilledInput.js +48 -44
- package/FilledInput/filledInputClasses.js +4 -2
- package/FormControl/FormControl.js +27 -25
- package/FormControlLabel/FormControlLabel.js +32 -26
- package/FormGroup/FormGroup.js +11 -12
- package/FormHelperText/FormHelperText.js +26 -18
- package/FormLabel/FormLabel.js +27 -19
- package/GlobalStyles/GlobalStyles.js +3 -3
- package/Grid/Grid.js +49 -41
- package/Grow/Grow.js +31 -30
- package/Hidden/Hidden.js +21 -22
- package/Hidden/HiddenCss.js +29 -29
- package/Hidden/withWidth.js +19 -19
- package/Icon/Icon.js +15 -16
- package/IconButton/IconButton.js +18 -20
- package/ImageList/ImageList.js +24 -24
- package/ImageListItem/ImageListItem.js +19 -20
- package/ImageListItemBar/ImageListItemBar.js +15 -17
- package/Input/Input.js +21 -20
- package/Input/inputClasses.js +4 -2
- package/InputAdornment/InputAdornment.js +16 -18
- package/InputBase/InputBase.js +90 -73
- package/InputLabel/InputLabel.js +20 -16
- package/LinearProgress/LinearProgress.js +21 -23
- package/Link/Link.js +27 -26
- package/List/List.js +15 -17
- package/ListItem/ListItem.js +58 -49
- package/ListItemAvatar/ListItemAvatar.js +10 -11
- package/ListItemButton/ListItemButton.js +23 -22
- package/ListItemIcon/ListItemIcon.js +10 -11
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +10 -11
- package/ListItemText/ListItemText.js +25 -27
- package/ListSubheader/ListSubheader.js +15 -16
- package/Menu/Menu.js +34 -36
- package/MenuItem/MenuItem.js +28 -26
- package/MenuList/MenuList.js +17 -20
- package/MobileStepper/MobileStepper.js +21 -22
- package/Modal/Modal.js +47 -38
- package/NativeSelect/NativeSelect.js +26 -22
- package/NativeSelect/NativeSelectInput.js +15 -16
- package/OutlinedInput/NotchedOutline.js +14 -14
- package/OutlinedInput/OutlinedInput.js +46 -42
- package/OutlinedInput/outlinedInputClasses.js +4 -2
- package/Pagination/Pagination.js +36 -32
- package/PaginationItem/PaginationItem.js +31 -30
- package/Paper/Paper.js +26 -23
- package/Popover/Popover.js +71 -71
- package/Popper/Popper.js +25 -27
- package/Radio/Radio.js +24 -22
- package/Radio/RadioButtonIcon.js +3 -3
- package/RadioGroup/RadioGroup.js +15 -18
- package/Rating/Rating.js +54 -47
- package/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/Select/Select.js +63 -57
- package/Select/SelectInput.js +64 -59
- package/Skeleton/Skeleton.js +20 -21
- package/Slide/Slide.js +37 -33
- package/Slider/Slider.js +155 -106
- package/Snackbar/Snackbar.js +52 -45
- package/SnackbarContent/SnackbarContent.js +13 -15
- package/SpeedDial/SpeedDial.js +59 -60
- package/SpeedDialAction/SpeedDialAction.js +34 -33
- package/SpeedDialIcon/SpeedDialIcon.js +10 -12
- package/Step/Step.js +18 -20
- package/StepButton/StepButton.js +16 -17
- package/StepConnector/StepConnector.js +10 -12
- package/StepContent/StepContent.js +18 -20
- package/StepIcon/StepIcon.js +22 -22
- package/StepLabel/StepLabel.js +33 -30
- package/Stepper/Stepper.js +21 -22
- package/SvgIcon/SvgIcon.js +21 -21
- package/SwipeableDrawer/SwipeArea.js +15 -16
- package/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/Switch/Switch.js +23 -20
- package/Tab/Tab.js +32 -33
- package/TabScrollButton/TabScrollButton.js +27 -21
- package/Table/Table.js +17 -17
- package/TableBody/TableBody.js +11 -12
- package/TableCell/TableCell.js +19 -19
- package/TableContainer/TableContainer.js +11 -12
- package/TableFooter/TableFooter.js +11 -12
- package/TableHead/TableHead.js +11 -12
- package/TablePagination/TablePagination.js +56 -52
- package/TablePagination/TablePaginationActions.js +51 -38
- package/TableRow/TableRow.js +13 -14
- package/TableSortLabel/TableSortLabel.js +15 -17
- package/Tabs/ScrollbarSize.js +7 -9
- package/Tabs/Tabs.js +52 -49
- package/TextField/TextField.d.ts +58 -3
- package/TextField/TextField.js +137 -67
- package/ToggleButton/ToggleButton.js +30 -32
- package/ToggleButtonGroup/ToggleButtonGroup.js +19 -21
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -0
- package/Toolbar/Toolbar.js +13 -14
- package/Tooltip/Tooltip.js +75 -60
- package/Typography/Typography.js +37 -35
- package/Zoom/Zoom.js +31 -30
- package/index.js +1 -1
- package/internal/SwitchBase.js +37 -37
- package/modern/Accordion/Accordion.js +33 -33
- package/modern/AccordionActions/AccordionActions.js +11 -12
- package/modern/AccordionDetails/AccordionDetails.js +7 -9
- package/modern/AccordionSummary/AccordionSummary.js +14 -16
- package/modern/Alert/Alert.js +56 -51
- package/modern/AlertTitle/AlertTitle.js +7 -9
- package/modern/AppBar/AppBar.js +34 -32
- package/modern/Autocomplete/Autocomplete.js +251 -162
- package/modern/Avatar/Avatar.js +41 -35
- package/modern/AvatarGroup/AvatarGroup.js +31 -31
- package/modern/Backdrop/Backdrop.js +33 -30
- package/modern/Badge/Badge.js +31 -30
- package/modern/BottomNavigation/BottomNavigation.js +15 -17
- package/modern/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/modern/Breadcrumbs/Breadcrumbs.js +19 -21
- package/modern/Button/Button.js +32 -29
- package/modern/ButtonBase/ButtonBase.js +43 -42
- package/modern/ButtonBase/TouchRipple.js +9 -12
- package/modern/ButtonGroup/ButtonGroup.js +23 -25
- package/modern/Card/Card.js +11 -12
- package/modern/CardActionArea/CardActionArea.js +9 -12
- package/modern/CardActions/CardActions.js +11 -12
- package/modern/CardContent/CardContent.js +11 -12
- package/modern/CardHeader/CardHeader.js +30 -31
- package/modern/CardMedia/CardMedia.js +19 -20
- package/modern/Checkbox/Checkbox.js +29 -26
- package/modern/Chip/Chip.js +38 -37
- package/modern/CircularProgress/CircularProgress.js +24 -23
- package/modern/Collapse/Collapse.js +44 -42
- package/modern/CssBaseline/CssBaseline.js +17 -14
- package/modern/Dialog/Dialog.js +41 -42
- package/modern/DialogActions/DialogActions.js +11 -12
- package/modern/DialogContent/DialogContent.js +11 -12
- package/modern/DialogContentText/DialogContentText.js +13 -11
- package/modern/DialogTitle/DialogTitle.js +8 -10
- package/modern/Divider/Divider.js +19 -21
- package/modern/Drawer/Drawer.js +50 -49
- package/modern/Fab/Fab.js +26 -23
- package/modern/Fade/Fade.js +31 -30
- package/modern/FilledInput/FilledInput.js +48 -44
- package/modern/FilledInput/filledInputClasses.js +4 -2
- package/modern/FormControl/FormControl.js +27 -25
- package/modern/FormControlLabel/FormControlLabel.js +32 -26
- package/modern/FormGroup/FormGroup.js +11 -12
- package/modern/FormHelperText/FormHelperText.js +26 -18
- package/modern/FormLabel/FormLabel.js +27 -19
- package/modern/GlobalStyles/GlobalStyles.js +3 -3
- package/modern/Grid/Grid.js +49 -41
- package/modern/Grow/Grow.js +31 -30
- package/modern/Hidden/Hidden.js +21 -22
- package/modern/Hidden/HiddenCss.js +29 -29
- package/modern/Hidden/withWidth.js +19 -19
- package/modern/Icon/Icon.js +15 -16
- package/modern/IconButton/IconButton.js +18 -20
- package/modern/ImageList/ImageList.js +24 -24
- package/modern/ImageListItem/ImageListItem.js +19 -20
- package/modern/ImageListItemBar/ImageListItemBar.js +15 -17
- package/modern/Input/Input.js +21 -20
- package/modern/Input/inputClasses.js +4 -2
- package/modern/InputAdornment/InputAdornment.js +16 -18
- package/modern/InputBase/InputBase.js +90 -73
- package/modern/InputLabel/InputLabel.js +20 -16
- package/modern/LinearProgress/LinearProgress.js +21 -23
- package/modern/Link/Link.js +27 -26
- package/modern/List/List.js +15 -17
- package/modern/ListItem/ListItem.js +58 -49
- package/modern/ListItemAvatar/ListItemAvatar.js +10 -11
- package/modern/ListItemButton/ListItemButton.js +23 -22
- package/modern/ListItemIcon/ListItemIcon.js +10 -11
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +10 -11
- package/modern/ListItemText/ListItemText.js +25 -27
- package/modern/ListSubheader/ListSubheader.js +15 -16
- package/modern/Menu/Menu.js +34 -36
- package/modern/MenuItem/MenuItem.js +28 -26
- package/modern/MenuList/MenuList.js +17 -20
- package/modern/MobileStepper/MobileStepper.js +21 -22
- package/modern/Modal/Modal.js +47 -38
- package/modern/NativeSelect/NativeSelect.js +26 -22
- package/modern/NativeSelect/NativeSelectInput.js +15 -16
- package/modern/OutlinedInput/NotchedOutline.js +14 -14
- package/modern/OutlinedInput/OutlinedInput.js +46 -42
- package/modern/OutlinedInput/outlinedInputClasses.js +4 -2
- package/modern/Pagination/Pagination.js +36 -32
- package/modern/PaginationItem/PaginationItem.js +31 -30
- package/modern/Paper/Paper.js +26 -23
- package/modern/Popover/Popover.js +71 -71
- package/modern/Popper/Popper.js +25 -27
- package/modern/Radio/Radio.js +24 -22
- package/modern/Radio/RadioButtonIcon.js +3 -3
- package/modern/RadioGroup/RadioGroup.js +15 -18
- package/modern/Rating/Rating.js +54 -47
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/modern/Select/Select.js +63 -57
- package/modern/Select/SelectInput.js +64 -59
- package/modern/Skeleton/Skeleton.js +20 -21
- package/modern/Slide/Slide.js +37 -33
- package/modern/Slider/Slider.js +155 -106
- package/modern/Snackbar/Snackbar.js +52 -45
- package/modern/SnackbarContent/SnackbarContent.js +13 -15
- package/modern/SpeedDial/SpeedDial.js +59 -60
- package/modern/SpeedDialAction/SpeedDialAction.js +34 -33
- package/modern/SpeedDialIcon/SpeedDialIcon.js +10 -12
- package/modern/Step/Step.js +18 -20
- package/modern/StepButton/StepButton.js +16 -17
- package/modern/StepConnector/StepConnector.js +10 -12
- package/modern/StepContent/StepContent.js +18 -20
- package/modern/StepIcon/StepIcon.js +22 -22
- package/modern/StepLabel/StepLabel.js +33 -30
- package/modern/Stepper/Stepper.js +21 -22
- package/modern/SvgIcon/SvgIcon.js +21 -21
- package/modern/SwipeableDrawer/SwipeArea.js +15 -16
- package/modern/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/modern/Switch/Switch.js +23 -20
- package/modern/Tab/Tab.js +32 -33
- package/modern/TabScrollButton/TabScrollButton.js +27 -21
- package/modern/Table/Table.js +17 -17
- package/modern/TableBody/TableBody.js +11 -12
- package/modern/TableCell/TableCell.js +19 -19
- package/modern/TableContainer/TableContainer.js +11 -12
- package/modern/TableFooter/TableFooter.js +11 -12
- package/modern/TableHead/TableHead.js +11 -12
- package/modern/TablePagination/TablePagination.js +56 -52
- package/modern/TablePagination/TablePaginationActions.js +51 -38
- package/modern/TableRow/TableRow.js +13 -14
- package/modern/TableSortLabel/TableSortLabel.js +15 -17
- package/modern/Tabs/ScrollbarSize.js +7 -9
- package/modern/Tabs/Tabs.js +52 -49
- package/modern/TextField/TextField.js +137 -67
- package/modern/ToggleButton/ToggleButton.js +30 -32
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +19 -21
- package/modern/Toolbar/Toolbar.js +13 -14
- package/modern/Tooltip/Tooltip.js +75 -60
- package/modern/Typography/Typography.js +37 -35
- package/modern/Zoom/Zoom.js +31 -30
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +37 -37
- package/modern/styles/CssVarsProvider.js +3 -3
- package/modern/styles/ThemeProvider.js +7 -10
- package/modern/styles/adaptV4Theme.js +31 -31
- package/modern/styles/createMixins.js +4 -4
- package/modern/styles/createPalette.js +16 -13
- package/modern/styles/createTheme.js +16 -11
- package/modern/styles/createTransitions.js +17 -14
- package/modern/styles/createTypography.js +31 -29
- package/modern/styles/experimental_extendTheme.js +47 -37
- package/modern/styles/responsiveFontSizes.js +17 -11
- package/modern/usePagination/usePagination.js +18 -20
- package/modern/useScrollTrigger/useScrollTrigger.js +8 -10
- package/modern/utils/createSvgIcon.js +4 -5
- package/modern/utils/useSlot.js +41 -40
- package/node/Accordion/Accordion.js +33 -33
- package/node/AccordionActions/AccordionActions.js +11 -12
- package/node/AccordionDetails/AccordionDetails.js +7 -9
- package/node/AccordionSummary/AccordionSummary.js +14 -16
- package/node/Alert/Alert.js +56 -51
- package/node/AlertTitle/AlertTitle.js +7 -9
- package/node/AppBar/AppBar.js +125 -129
- package/node/Autocomplete/Autocomplete.js +252 -164
- package/node/Avatar/Avatar.js +41 -35
- package/node/AvatarGroup/AvatarGroup.js +31 -31
- package/node/Backdrop/Backdrop.js +33 -30
- package/node/Badge/Badge.js +179 -184
- package/node/BottomNavigation/BottomNavigation.js +15 -17
- package/node/BottomNavigationAction/BottomNavigationAction.js +15 -18
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/node/Breadcrumbs/Breadcrumbs.js +19 -21
- package/node/Button/Button.js +32 -29
- package/node/ButtonBase/ButtonBase.js +43 -42
- package/node/ButtonBase/TouchRipple.js +9 -12
- package/node/ButtonGroup/ButtonGroup.js +23 -25
- package/node/Card/Card.js +11 -12
- package/node/CardActionArea/CardActionArea.js +9 -12
- package/node/CardActions/CardActions.js +11 -12
- package/node/CardContent/CardContent.js +11 -12
- package/node/CardHeader/CardHeader.js +30 -31
- package/node/CardMedia/CardMedia.js +19 -20
- package/node/Checkbox/Checkbox.js +29 -26
- package/node/Chip/Chip.js +38 -37
- package/node/CircularProgress/CircularProgress.js +24 -23
- package/node/Collapse/Collapse.js +44 -42
- package/node/CssBaseline/CssBaseline.js +17 -14
- package/node/Dialog/Dialog.js +41 -42
- package/node/DialogActions/DialogActions.js +11 -12
- package/node/DialogContent/DialogContent.js +11 -12
- package/node/DialogContentText/DialogContentText.js +13 -11
- package/node/DialogTitle/DialogTitle.js +8 -10
- package/node/Divider/Divider.js +19 -21
- package/node/Drawer/Drawer.js +50 -49
- package/node/Fab/Fab.js +27 -24
- package/node/Fade/Fade.js +31 -30
- package/node/FilledInput/FilledInput.js +48 -44
- package/node/FilledInput/filledInputClasses.js +4 -2
- package/node/FormControl/FormControl.js +27 -25
- package/node/FormControlLabel/FormControlLabel.js +32 -26
- package/node/FormGroup/FormGroup.js +11 -12
- package/node/FormHelperText/FormHelperText.js +26 -18
- package/node/FormLabel/FormLabel.js +27 -19
- package/node/GlobalStyles/GlobalStyles.js +3 -3
- package/node/Grid/Grid.js +49 -41
- package/node/Grow/Grow.js +31 -30
- package/node/Hidden/Hidden.js +24 -26
- package/node/Hidden/HiddenCss.js +29 -29
- package/node/Hidden/withWidth.js +19 -19
- package/node/Icon/Icon.js +15 -16
- package/node/IconButton/IconButton.js +18 -20
- package/node/ImageList/ImageList.js +24 -24
- package/node/ImageListItem/ImageListItem.js +19 -20
- package/node/ImageListItemBar/ImageListItemBar.js +15 -17
- package/node/Input/Input.js +21 -20
- package/node/Input/inputClasses.js +4 -2
- package/node/InputAdornment/InputAdornment.js +16 -18
- package/node/InputBase/InputBase.js +90 -73
- package/node/InputLabel/InputLabel.js +20 -16
- package/node/LinearProgress/LinearProgress.js +21 -23
- package/node/Link/Link.js +27 -26
- package/node/List/List.js +15 -17
- package/node/ListItem/ListItem.js +58 -49
- package/node/ListItemAvatar/ListItemAvatar.js +10 -11
- package/node/ListItemButton/ListItemButton.js +23 -22
- package/node/ListItemIcon/ListItemIcon.js +10 -11
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +10 -11
- package/node/ListItemText/ListItemText.js +25 -27
- package/node/ListSubheader/ListSubheader.js +15 -16
- package/node/Menu/Menu.js +34 -36
- package/node/MenuItem/MenuItem.js +28 -26
- package/node/MenuList/MenuList.js +17 -20
- package/node/MobileStepper/MobileStepper.js +21 -22
- package/node/Modal/Modal.js +47 -38
- package/node/NativeSelect/NativeSelect.js +26 -22
- package/node/NativeSelect/NativeSelectInput.js +15 -16
- package/node/OutlinedInput/NotchedOutline.js +14 -14
- package/node/OutlinedInput/OutlinedInput.js +46 -42
- package/node/OutlinedInput/outlinedInputClasses.js +4 -2
- package/node/Pagination/Pagination.js +36 -32
- package/node/PaginationItem/PaginationItem.js +31 -30
- package/node/Paper/Paper.js +26 -23
- package/node/Popover/Popover.js +71 -71
- package/node/Popper/Popper.js +25 -27
- package/node/Radio/Radio.js +24 -22
- package/node/Radio/RadioButtonIcon.js +3 -3
- package/node/RadioGroup/RadioGroup.js +15 -18
- package/node/Rating/Rating.js +54 -47
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/node/Select/Select.js +63 -57
- package/node/Select/SelectInput.js +64 -59
- package/node/Skeleton/Skeleton.js +20 -21
- package/node/Slide/Slide.js +39 -34
- package/node/Slider/Slider.js +298 -265
- package/node/Snackbar/Snackbar.js +52 -45
- package/node/SnackbarContent/SnackbarContent.js +13 -15
- package/node/SpeedDial/SpeedDial.js +59 -60
- package/node/SpeedDialAction/SpeedDialAction.js +34 -33
- package/node/SpeedDialIcon/SpeedDialIcon.js +10 -12
- package/node/Step/Step.js +18 -20
- package/node/StepButton/StepButton.js +16 -17
- package/node/StepConnector/StepConnector.js +10 -12
- package/node/StepContent/StepContent.js +18 -20
- package/node/StepIcon/StepIcon.js +22 -22
- package/node/StepLabel/StepLabel.js +33 -30
- package/node/Stepper/Stepper.js +21 -22
- package/node/SvgIcon/SvgIcon.js +21 -21
- package/node/SwipeableDrawer/SwipeArea.js +15 -16
- package/node/SwipeableDrawer/SwipeableDrawer.js +51 -44
- package/node/Switch/Switch.js +23 -20
- package/node/Tab/Tab.js +32 -33
- package/node/TabScrollButton/TabScrollButton.js +27 -21
- package/node/Table/Table.js +17 -17
- package/node/TableBody/TableBody.js +11 -12
- package/node/TableCell/TableCell.js +19 -19
- package/node/TableContainer/TableContainer.js +11 -12
- package/node/TableFooter/TableFooter.js +11 -12
- package/node/TableHead/TableHead.js +11 -12
- package/node/TablePagination/TablePagination.js +56 -52
- package/node/TablePagination/TablePaginationActions.js +54 -42
- package/node/TableRow/TableRow.js +13 -14
- package/node/TableSortLabel/TableSortLabel.js +15 -17
- package/node/Tabs/ScrollbarSize.js +7 -9
- package/node/Tabs/Tabs.js +52 -49
- package/node/TextField/TextField.js +137 -67
- package/node/ToggleButton/ToggleButton.js +30 -32
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +19 -21
- package/node/Toolbar/Toolbar.js +13 -14
- package/node/Tooltip/Tooltip.js +75 -60
- package/node/Typography/Typography.js +37 -35
- package/node/Zoom/Zoom.js +31 -30
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +37 -37
- package/node/styles/CssVarsProvider.js +3 -3
- package/node/styles/ThemeProvider.js +7 -10
- package/node/styles/adaptV4Theme.js +31 -32
- package/node/styles/createMixins.js +4 -5
- package/node/styles/createPalette.js +16 -13
- package/node/styles/createTheme.js +16 -11
- package/node/styles/createTransitions.js +17 -15
- package/node/styles/createTypography.js +31 -29
- package/node/styles/experimental_extendTheme.js +47 -37
- package/node/styles/responsiveFontSizes.js +17 -11
- package/node/usePagination/usePagination.js +18 -20
- package/node/useScrollTrigger/useScrollTrigger.js +8 -11
- package/node/utils/createSvgIcon.js +4 -5
- package/node/utils/useSlot.js +41 -40
- package/package.json +6 -6
- package/styles/CssVarsProvider.js +3 -3
- package/styles/ThemeProvider.js +7 -10
- package/styles/adaptV4Theme.js +31 -31
- package/styles/createMixins.js +4 -4
- package/styles/createPalette.js +16 -13
- package/styles/createTheme.js +16 -11
- package/styles/createTransitions.js +17 -14
- package/styles/createTypography.js +31 -29
- package/styles/experimental_extendTheme.js +47 -37
- package/styles/responsiveFontSizes.js +17 -11
- package/usePagination/usePagination.d.ts +1 -1
- package/usePagination/usePagination.js +18 -20
- package/useScrollTrigger/useScrollTrigger.js +8 -10
- package/utils/createSvgIcon.js +4 -5
- package/utils/useSlot.js +41 -40
- package/umd/material-ui.development.js +0 -54172
- package/umd/material-ui.production.min.js +0 -25
package/node/SvgIcon/SvgIcon.js
CHANGED
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
9
|
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -16,7 +14,6 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
|
16
14
|
var _zeroStyled = require("../zero-styled");
|
|
17
15
|
var _svgIconClasses = require("./svgIconClasses");
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
|
|
20
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
19
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSvgIcon');
|
|
@@ -90,7 +87,7 @@ const SvgIconRoot = (0, _zeroStyled.styled)('svg', {
|
|
|
90
87
|
}
|
|
91
88
|
},
|
|
92
89
|
// TODO v5 deprecate color prop, v6 remove for sx
|
|
93
|
-
...Object.entries(((_theme$vars2 = theme.vars) != null ? _theme$vars2 : theme).palette).filter(([, value]) => value.main).map(([color]) => {
|
|
90
|
+
...Object.entries(((_theme$vars2 = theme.vars) != null ? _theme$vars2 : theme).palette).filter(([, value]) => value && value.main).map(([color]) => {
|
|
94
91
|
var _palette, _theme$vars3;
|
|
95
92
|
return {
|
|
96
93
|
props: {
|
|
@@ -130,19 +127,20 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
130
127
|
name: 'MuiSvgIcon'
|
|
131
128
|
});
|
|
132
129
|
const {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
130
|
+
children,
|
|
131
|
+
className,
|
|
132
|
+
color = 'inherit',
|
|
133
|
+
component = 'svg',
|
|
134
|
+
fontSize = 'medium',
|
|
135
|
+
htmlColor,
|
|
136
|
+
inheritViewBox = false,
|
|
137
|
+
titleAccess,
|
|
138
|
+
viewBox = '0 0 24 24',
|
|
139
|
+
...other
|
|
140
|
+
} = props;
|
|
144
141
|
const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';
|
|
145
|
-
const ownerState =
|
|
142
|
+
const ownerState = {
|
|
143
|
+
...props,
|
|
146
144
|
color,
|
|
147
145
|
component,
|
|
148
146
|
fontSize,
|
|
@@ -150,26 +148,28 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
150
148
|
inheritViewBox,
|
|
151
149
|
viewBox,
|
|
152
150
|
hasSvgAsChild
|
|
153
|
-
}
|
|
151
|
+
};
|
|
154
152
|
const more = {};
|
|
155
153
|
if (!inheritViewBox) {
|
|
156
154
|
more.viewBox = viewBox;
|
|
157
155
|
}
|
|
158
156
|
const classes = useUtilityClasses(ownerState);
|
|
159
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SvgIconRoot,
|
|
157
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SvgIconRoot, {
|
|
160
158
|
as: component,
|
|
161
159
|
className: (0, _clsx.default)(classes.root, className),
|
|
162
160
|
focusable: "false",
|
|
163
161
|
color: htmlColor,
|
|
164
162
|
"aria-hidden": titleAccess ? undefined : true,
|
|
165
163
|
role: titleAccess ? 'img' : undefined,
|
|
166
|
-
ref: ref
|
|
167
|
-
|
|
164
|
+
ref: ref,
|
|
165
|
+
...more,
|
|
166
|
+
...other,
|
|
167
|
+
...(hasSvgAsChild && children.props),
|
|
168
168
|
ownerState: ownerState,
|
|
169
169
|
children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
170
170
|
children: titleAccess
|
|
171
171
|
}) : null]
|
|
172
|
-
})
|
|
172
|
+
});
|
|
173
173
|
});
|
|
174
174
|
process.env.NODE_ENV !== "production" ? SvgIcon.propTypes /* remove-proptypes */ = {
|
|
175
175
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
9
|
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -16,7 +14,6 @@ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShoul
|
|
|
16
14
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
17
15
|
var _Drawer = require("../Drawer/Drawer");
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["anchor", "classes", "className", "width", "style"];
|
|
20
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
19
|
const SwipeAreaRoot = (0, _zeroStyled.styled)('div', {
|
|
@@ -69,22 +66,24 @@ const SwipeAreaRoot = (0, _zeroStyled.styled)('div', {
|
|
|
69
66
|
*/
|
|
70
67
|
const SwipeArea = /*#__PURE__*/React.forwardRef(function SwipeArea(props, ref) {
|
|
71
68
|
const {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
anchor,
|
|
70
|
+
classes = {},
|
|
71
|
+
className,
|
|
72
|
+
width,
|
|
73
|
+
style,
|
|
74
|
+
...other
|
|
75
|
+
} = props;
|
|
79
76
|
const ownerState = props;
|
|
80
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SwipeAreaRoot,
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SwipeAreaRoot, {
|
|
81
78
|
className: (0, _clsx.default)('PrivateSwipeArea-root', classes.root, classes[`anchor${(0, _capitalize.default)(anchor)}`], className),
|
|
82
79
|
ref: ref,
|
|
83
|
-
style:
|
|
84
|
-
[(0, _Drawer.isHorizontal)(anchor) ? 'width' : 'height']: width
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
style: {
|
|
81
|
+
[(0, _Drawer.isHorizontal)(anchor) ? 'width' : 'height']: width,
|
|
82
|
+
...style
|
|
83
|
+
},
|
|
84
|
+
ownerState: ownerState,
|
|
85
|
+
...other
|
|
86
|
+
});
|
|
88
87
|
});
|
|
89
88
|
process.env.NODE_ENV !== "production" ? SwipeArea.propTypes = {
|
|
90
89
|
/**
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
exports.reset = reset;
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
14
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -25,11 +23,10 @@ var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
|
25
23
|
var _utils = require("../transitions/utils");
|
|
26
24
|
var _SwipeArea = _interopRequireDefault(require("./SwipeArea"));
|
|
27
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
|
-
const _excluded = ["BackdropProps"],
|
|
29
|
-
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]; // This value is closed to what browsers are using internally to
|
|
30
|
-
// trigger a native scroll.
|
|
31
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
32
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
+
// This value is closed to what browsers are using internally to
|
|
29
|
+
// trigger a native scroll.
|
|
33
30
|
const UNCERTAINTY_THRESHOLD = 3; // px
|
|
34
31
|
|
|
35
32
|
// This is the part of the drawer displayed on touch start.
|
|
@@ -135,28 +132,29 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
135
132
|
exit: theme.transitions.duration.leavingScreen
|
|
136
133
|
};
|
|
137
134
|
const {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
other
|
|
135
|
+
anchor = 'left',
|
|
136
|
+
disableBackdropTransition = false,
|
|
137
|
+
disableDiscovery = false,
|
|
138
|
+
disableSwipeToOpen = iOS,
|
|
139
|
+
hideBackdrop,
|
|
140
|
+
hysteresis = 0.52,
|
|
141
|
+
allowSwipeInChildren = false,
|
|
142
|
+
minFlingVelocity = 450,
|
|
143
|
+
ModalProps: {
|
|
144
|
+
BackdropProps,
|
|
145
|
+
...ModalPropsProp
|
|
146
|
+
} = {},
|
|
147
|
+
onClose,
|
|
148
|
+
onOpen,
|
|
149
|
+
open = false,
|
|
150
|
+
PaperProps = {},
|
|
151
|
+
SwipeAreaProps,
|
|
152
|
+
swipeAreaWidth = 20,
|
|
153
|
+
transitionDuration = transitionDurationDefault,
|
|
154
|
+
variant = 'temporary',
|
|
155
|
+
// Mobile first.
|
|
156
|
+
...other
|
|
157
|
+
} = props;
|
|
160
158
|
const [maybeSwiping, setMaybeSwiping] = React.useState(false);
|
|
161
159
|
const swipeInstance = React.useRef({
|
|
162
160
|
isSwiping: null
|
|
@@ -461,33 +459,42 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
461
459
|
}
|
|
462
460
|
}, [open]);
|
|
463
461
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
464
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.default,
|
|
462
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Drawer.default, {
|
|
465
463
|
open: variant === 'temporary' && maybeSwiping ? true : open,
|
|
466
464
|
variant: variant,
|
|
467
|
-
ModalProps:
|
|
468
|
-
BackdropProps:
|
|
465
|
+
ModalProps: {
|
|
466
|
+
BackdropProps: {
|
|
467
|
+
...BackdropProps,
|
|
469
468
|
ref: backdropRef
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
469
|
+
},
|
|
470
|
+
// Ensures that paperRef.current will be defined inside the touch start event handler
|
|
471
|
+
// See https://github.com/mui/material-ui/issues/30414 for more information
|
|
472
|
+
...(variant === 'temporary' && {
|
|
473
|
+
keepMounted: true
|
|
474
|
+
}),
|
|
475
|
+
...ModalPropsProp
|
|
476
|
+
},
|
|
474
477
|
hideBackdrop: hideBackdrop,
|
|
475
|
-
PaperProps:
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
478
|
+
PaperProps: {
|
|
479
|
+
...PaperProps,
|
|
480
|
+
style: {
|
|
481
|
+
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : '',
|
|
482
|
+
...PaperProps.style
|
|
483
|
+
},
|
|
479
484
|
ref: handleRef
|
|
480
|
-
}
|
|
485
|
+
},
|
|
481
486
|
anchor: anchor,
|
|
482
487
|
transitionDuration: calculatedDurationRef.current || transitionDuration,
|
|
483
488
|
onClose: onClose,
|
|
484
|
-
ref: ref
|
|
485
|
-
|
|
486
|
-
|
|
489
|
+
ref: ref,
|
|
490
|
+
...other
|
|
491
|
+
}), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.NoSsr, {
|
|
492
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SwipeArea.default, {
|
|
487
493
|
anchor: anchor,
|
|
488
494
|
ref: swipeAreaRef,
|
|
489
|
-
width: swipeAreaWidth
|
|
490
|
-
|
|
495
|
+
width: swipeAreaWidth,
|
|
496
|
+
...SwipeAreaProps
|
|
497
|
+
})
|
|
491
498
|
})]
|
|
492
499
|
});
|
|
493
500
|
});
|
package/node/Switch/Switch.js
CHANGED
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.default = void 0;
|
|
10
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -20,7 +18,6 @@ var _SwitchBase = _interopRequireDefault(require("../internal/SwitchBase"));
|
|
|
20
18
|
var _zeroStyled = require("../zero-styled");
|
|
21
19
|
var _switchClasses = _interopRequireWildcard(require("./switchClasses"));
|
|
22
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
const _excluded = ["className", "color", "edge", "size", "sx"];
|
|
24
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
23
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSwitch');
|
|
@@ -41,7 +38,11 @@ const useUtilityClasses = ownerState => {
|
|
|
41
38
|
input: ['input']
|
|
42
39
|
};
|
|
43
40
|
const composedClasses = (0, _composeClasses.default)(slots, _switchClasses.getSwitchUtilityClass, classes);
|
|
44
|
-
return
|
|
41
|
+
return {
|
|
42
|
+
...classes,
|
|
43
|
+
// forward the disabled and checked classes to the SwitchBase
|
|
44
|
+
...composedClasses
|
|
45
|
+
};
|
|
45
46
|
};
|
|
46
47
|
const SwitchRoot = (0, _zeroStyled.styled)('span', {
|
|
47
48
|
name: 'MuiSwitch',
|
|
@@ -152,7 +153,7 @@ const SwitchSwitchBase = (0, _zeroStyled.styled)(_SwitchBase.default, {
|
|
|
152
153
|
backgroundColor: 'transparent'
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
|
-
variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light) // check all the used fields in the style below
|
|
156
|
+
variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.light) // check all the used fields in the style below
|
|
156
157
|
.map(([color]) => ({
|
|
157
158
|
props: {
|
|
158
159
|
color
|
|
@@ -212,18 +213,19 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
|
|
|
212
213
|
name: 'MuiSwitch'
|
|
213
214
|
});
|
|
214
215
|
const {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const ownerState =
|
|
216
|
+
className,
|
|
217
|
+
color = 'primary',
|
|
218
|
+
edge = false,
|
|
219
|
+
size = 'medium',
|
|
220
|
+
sx,
|
|
221
|
+
...other
|
|
222
|
+
} = props;
|
|
223
|
+
const ownerState = {
|
|
224
|
+
...props,
|
|
223
225
|
color,
|
|
224
226
|
edge,
|
|
225
227
|
size
|
|
226
|
-
}
|
|
228
|
+
};
|
|
227
229
|
const classes = useUtilityClasses(ownerState);
|
|
228
230
|
const icon = /*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchThumb, {
|
|
229
231
|
className: classes.thumb,
|
|
@@ -233,17 +235,18 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {
|
|
|
233
235
|
className: (0, _clsx.default)(classes.root, className),
|
|
234
236
|
sx: sx,
|
|
235
237
|
ownerState: ownerState,
|
|
236
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchSwitchBase,
|
|
238
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchSwitchBase, {
|
|
237
239
|
type: "checkbox",
|
|
238
240
|
icon: icon,
|
|
239
241
|
checkedIcon: icon,
|
|
240
242
|
ref: ref,
|
|
241
|
-
ownerState: ownerState
|
|
242
|
-
|
|
243
|
-
classes:
|
|
243
|
+
ownerState: ownerState,
|
|
244
|
+
...other,
|
|
245
|
+
classes: {
|
|
246
|
+
...classes,
|
|
244
247
|
root: classes.switchBase
|
|
245
|
-
}
|
|
246
|
-
})
|
|
248
|
+
}
|
|
249
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SwitchTrack, {
|
|
247
250
|
className: classes.track,
|
|
248
251
|
ownerState: ownerState
|
|
249
252
|
})]
|
package/node/Tab/Tab.js
CHANGED
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
9
|
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -18,7 +16,6 @@ var _zeroStyled = require("../zero-styled");
|
|
|
18
16
|
var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
|
|
19
17
|
var _tabClasses = _interopRequireWildcard(require("./tabClasses"));
|
|
20
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const _excluded = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"];
|
|
22
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
21
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiTab');
|
|
@@ -50,7 +47,8 @@ const TabRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
50
47
|
}
|
|
51
48
|
})(({
|
|
52
49
|
theme
|
|
53
|
-
}) => (
|
|
50
|
+
}) => ({
|
|
51
|
+
...theme.typography.button,
|
|
54
52
|
maxWidth: 360,
|
|
55
53
|
minWidth: 90,
|
|
56
54
|
position: 'relative',
|
|
@@ -190,30 +188,31 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
190
188
|
name: 'MuiTab'
|
|
191
189
|
});
|
|
192
190
|
const {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const ownerState =
|
|
191
|
+
className,
|
|
192
|
+
disabled = false,
|
|
193
|
+
disableFocusRipple = false,
|
|
194
|
+
// eslint-disable-next-line react/prop-types
|
|
195
|
+
fullWidth,
|
|
196
|
+
icon: iconProp,
|
|
197
|
+
iconPosition = 'top',
|
|
198
|
+
// eslint-disable-next-line react/prop-types
|
|
199
|
+
indicator,
|
|
200
|
+
label,
|
|
201
|
+
onChange,
|
|
202
|
+
onClick,
|
|
203
|
+
onFocus,
|
|
204
|
+
// eslint-disable-next-line react/prop-types
|
|
205
|
+
selected,
|
|
206
|
+
// eslint-disable-next-line react/prop-types
|
|
207
|
+
selectionFollowsFocus,
|
|
208
|
+
// eslint-disable-next-line react/prop-types
|
|
209
|
+
textColor = 'inherit',
|
|
210
|
+
value,
|
|
211
|
+
wrapped = false,
|
|
212
|
+
...other
|
|
213
|
+
} = props;
|
|
214
|
+
const ownerState = {
|
|
215
|
+
...props,
|
|
217
216
|
disabled,
|
|
218
217
|
disableFocusRipple,
|
|
219
218
|
selected,
|
|
@@ -223,7 +222,7 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
223
222
|
fullWidth,
|
|
224
223
|
textColor,
|
|
225
224
|
wrapped
|
|
226
|
-
}
|
|
225
|
+
};
|
|
227
226
|
const classes = useUtilityClasses(ownerState);
|
|
228
227
|
const icon = iconProp && label && /*#__PURE__*/React.isValidElement(iconProp) ? /*#__PURE__*/React.cloneElement(iconProp, {
|
|
229
228
|
className: (0, _clsx.default)(classes.iconWrapper, iconProp.props.className)
|
|
@@ -244,7 +243,7 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
244
243
|
onFocus(event);
|
|
245
244
|
}
|
|
246
245
|
};
|
|
247
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TabRoot,
|
|
246
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TabRoot, {
|
|
248
247
|
focusRipple: !disableFocusRipple,
|
|
249
248
|
className: (0, _clsx.default)(classes.root, className),
|
|
250
249
|
ref: ref,
|
|
@@ -254,14 +253,14 @@ const Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {
|
|
|
254
253
|
onClick: handleClick,
|
|
255
254
|
onFocus: handleFocus,
|
|
256
255
|
ownerState: ownerState,
|
|
257
|
-
tabIndex: selected ? 0 : -1
|
|
258
|
-
|
|
256
|
+
tabIndex: selected ? 0 : -1,
|
|
257
|
+
...other,
|
|
259
258
|
children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
260
259
|
children: [icon, label]
|
|
261
260
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
262
261
|
children: [label, icon]
|
|
263
262
|
}), indicator]
|
|
264
|
-
})
|
|
263
|
+
});
|
|
265
264
|
});
|
|
266
265
|
process.env.NODE_ENV !== "production" ? Tab.propTypes /* remove-proptypes */ = {
|
|
267
266
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.default = void 0;
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
10
|
var React = _interopRequireWildcard(require("react"));
|
|
13
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
@@ -21,7 +19,6 @@ var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
|
21
19
|
var _zeroStyled = require("../zero-styled");
|
|
22
20
|
var _tabScrollButtonClasses = _interopRequireWildcard(require("./tabScrollButtonClasses"));
|
|
23
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
const _excluded = ["className", "slots", "slotProps", "direction", "orientation", "disabled"];
|
|
25
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
24
|
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiTabScrollButton');
|
|
@@ -72,17 +69,19 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
72
69
|
name: 'MuiTabScrollButton'
|
|
73
70
|
});
|
|
74
71
|
const {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
other
|
|
72
|
+
className,
|
|
73
|
+
slots = {},
|
|
74
|
+
slotProps = {},
|
|
75
|
+
direction,
|
|
76
|
+
orientation,
|
|
77
|
+
disabled,
|
|
78
|
+
...other
|
|
79
|
+
} = props;
|
|
82
80
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
83
|
-
const ownerState =
|
|
84
|
-
isRtl
|
|
85
|
-
|
|
81
|
+
const ownerState = {
|
|
82
|
+
isRtl,
|
|
83
|
+
...props
|
|
84
|
+
};
|
|
86
85
|
const classes = useUtilityClasses(ownerState);
|
|
87
86
|
const StartButtonIcon = (_slots$StartScrollBut = slots.StartScrollButtonIcon) != null ? _slots$StartScrollBut : _KeyboardArrowLeft.default;
|
|
88
87
|
const EndButtonIcon = (_slots$EndScrollButto = slots.EndScrollButtonIcon) != null ? _slots$EndScrollButto : _KeyboardArrowRight.default;
|
|
@@ -102,19 +101,26 @@ const TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(i
|
|
|
102
101
|
},
|
|
103
102
|
ownerState
|
|
104
103
|
});
|
|
105
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabScrollButtonRoot,
|
|
104
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TabScrollButtonRoot, {
|
|
106
105
|
component: "div",
|
|
107
106
|
className: (0, _clsx.default)(classes.root, className),
|
|
108
107
|
ref: ref,
|
|
109
108
|
role: null,
|
|
110
109
|
ownerState: ownerState,
|
|
111
|
-
tabIndex: null
|
|
112
|
-
|
|
113
|
-
style:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
tabIndex: null,
|
|
111
|
+
...other,
|
|
112
|
+
style: {
|
|
113
|
+
...other.style,
|
|
114
|
+
...(orientation === 'vertical' && {
|
|
115
|
+
'--TabScrollButton-svgRotate': `rotate(${isRtl ? -90 : 90}deg)`
|
|
116
|
+
})
|
|
117
|
+
},
|
|
118
|
+
children: direction === 'left' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(StartButtonIcon, {
|
|
119
|
+
...startButtonIconProps
|
|
120
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(EndButtonIcon, {
|
|
121
|
+
...endButtonIconProps
|
|
122
|
+
})
|
|
123
|
+
});
|
|
118
124
|
});
|
|
119
125
|
process.env.NODE_ENV !== "production" ? TabScrollButton.propTypes /* remove-proptypes */ = {
|
|
120
126
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|