@mui/material 5.15.15 → 6.0.0-alpha.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.js +1 -2
- package/AccordionSummary/AccordionSummary.js +1 -2
- package/Alert/Alert.js +1 -2
- package/AppBar/AppBar.js +119 -69
- package/Autocomplete/Autocomplete.js +11 -16
- package/AvatarGroup/AvatarGroup.js +27 -25
- package/Backdrop/Backdrop.d.ts +40 -22
- package/Backdrop/Backdrop.js +50 -33
- package/Badge/Badge.d.ts +2 -4
- package/Badge/Badge.js +158 -168
- package/BottomNavigation/BottomNavigation.js +2 -2
- package/BottomNavigationAction/BottomNavigationAction.js +40 -24
- package/Breadcrumbs/Breadcrumbs.js +2 -2
- package/Button/Button.js +221 -134
- package/ButtonBase/ButtonBase.js +3 -4
- package/ButtonBase/Ripple.js +1 -1
- package/ButtonBase/TouchRipple.js +37 -43
- package/ButtonGroup/ButtonGroup.js +168 -71
- package/ButtonGroup/buttonGroupClasses.d.ts +57 -17
- package/ButtonGroup/buttonGroupClasses.js +1 -1
- package/CHANGELOG.md +169 -3
- package/Card/Card.js +4 -6
- package/CardActionArea/CardActionArea.js +3 -4
- package/CardActions/CardActions.js +16 -12
- package/CardContent/CardContent.js +7 -9
- package/CardHeader/CardHeader.js +3 -4
- package/CardMedia/CardMedia.js +22 -13
- package/Checkbox/Checkbox.js +2 -3
- package/Chip/Chip.js +191 -122
- package/CircularProgress/CircularProgress.js +10 -15
- package/CssBaseline/CssBaseline.js +3 -6
- package/DialogTitle/DialogTitle.js +1 -1
- package/Divider/Divider.js +140 -81
- package/Fab/Fab.js +55 -58
- package/FilledInput/FilledInput.js +4 -6
- package/FormControl/FormControl.js +30 -15
- package/FormControlLabel/FormControlLabel.js +42 -27
- package/FormGroup/FormGroup.js +14 -10
- package/Grid/Grid.js +5 -4
- package/IconButton/IconButton.js +2 -3
- package/ImageListItemBar/ImageListItemBar.js +1 -2
- package/Input/Input.js +3 -4
- package/InputAdornment/InputAdornment.js +1 -2
- package/InputBase/InputBase.js +2 -4
- package/LinearProgress/LinearProgress.js +16 -24
- package/List/List.js +1 -2
- package/ListItem/ListItem.js +1 -2
- package/ListItemText/ListItemText.js +2 -3
- package/Menu/Menu.js +2 -3
- package/MobileStepper/MobileStepper.js +80 -47
- package/Modal/Modal.js +22 -19
- package/NativeSelect/NativeSelectInput.js +1 -2
- package/OutlinedInput/OutlinedInput.js +4 -5
- package/PaginationItem/PaginationItem.js +1 -2
- package/Paper/Paper.js +15 -18
- package/Popover/Popover.js +7 -8
- package/Popper/Popper.js +3 -4
- package/README.md +3 -1
- package/Radio/Radio.js +2 -3
- package/Radio/RadioButtonIcon.js +1 -2
- package/Rating/Rating.js +1 -2
- package/ScopedCssBaseline/ScopedCssBaseline.js +1 -2
- package/Select/SelectInput.js +3 -5
- package/Skeleton/Skeleton.js +11 -16
- package/Slider/Slider.js +185 -203
- package/Slider/SliderValueLabel.js +1 -2
- package/SnackbarContent/SnackbarContent.js +1 -2
- package/SpeedDial/SpeedDial.js +1 -2
- package/SpeedDialAction/SpeedDialAction.js +1 -2
- package/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/Step/Step.js +23 -14
- package/StepButton/StepButton.js +17 -14
- package/StepConnector/StepConnector.js +45 -26
- package/StepContent/StepContent.js +13 -8
- package/StepIcon/StepIcon.js +3 -4
- package/StepLabel/StepLabel.d.ts +25 -13
- package/StepLabel/StepLabel.js +47 -27
- package/Stepper/Stepper.js +29 -15
- package/SvgIcon/SvgIcon.js +26 -30
- package/SwipeableDrawer/SwipeableDrawer.js +2 -4
- package/Switch/Switch.js +1 -2
- package/TabScrollButton/TabScrollButton.js +2 -3
- package/Table/Table.d.ts +0 -2
- package/Table/Table.js +0 -2
- package/TablePagination/TablePagination.js +2 -4
- package/TablePagination/TablePaginationActions.js +11 -13
- package/TableSortLabel/TableSortLabel.js +1 -2
- package/Tabs/Tabs.js +6 -10
- package/TextField/TextField.js +1 -2
- package/Tooltip/Tooltip.js +14 -17
- package/index.js +1 -1
- package/internal/SwitchBase.js +1 -2
- package/legacy/Accordion/Accordion.js +1 -2
- package/legacy/AccordionSummary/AccordionSummary.js +1 -2
- package/legacy/Alert/Alert.js +1 -2
- package/legacy/AppBar/AppBar.js +124 -64
- package/legacy/Autocomplete/Autocomplete.js +1 -2
- package/legacy/AvatarGroup/AvatarGroup.js +19 -11
- package/legacy/Backdrop/Backdrop.js +66 -44
- package/legacy/Badge/Badge.js +3 -6
- package/legacy/BottomNavigation/BottomNavigation.js +2 -2
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +42 -23
- package/legacy/Breadcrumbs/Breadcrumbs.js +2 -2
- package/legacy/Button/Button.js +219 -125
- package/legacy/ButtonBase/ButtonBase.js +3 -4
- package/legacy/ButtonBase/Ripple.js +1 -1
- package/legacy/ButtonBase/TouchRipple.js +3 -4
- package/legacy/ButtonGroup/ButtonGroup.js +164 -69
- package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
- package/legacy/Card/Card.js +4 -6
- package/legacy/CardActionArea/CardActionArea.js +3 -4
- package/legacy/CardActions/CardActions.js +16 -13
- package/legacy/CardContent/CardContent.js +7 -9
- package/legacy/CardHeader/CardHeader.js +3 -4
- package/legacy/CardMedia/CardMedia.js +24 -16
- package/legacy/Chip/Chip.js +199 -107
- package/legacy/CssBaseline/CssBaseline.js +1 -2
- package/legacy/Divider/Divider.js +148 -88
- package/legacy/FormControl/FormControl.js +37 -23
- package/legacy/FormControlLabel/FormControlLabel.js +42 -25
- package/legacy/FormGroup/FormGroup.js +15 -12
- package/legacy/Grid/Grid.js +3 -0
- package/legacy/ImageListItemBar/ImageListItemBar.js +1 -2
- package/legacy/InputAdornment/InputAdornment.js +1 -2
- package/legacy/InputBase/InputBase.js +1 -2
- package/legacy/LinearProgress/LinearProgress.js +1 -2
- package/legacy/List/List.js +1 -2
- package/legacy/ListItem/ListItem.js +1 -2
- package/legacy/ListItemText/ListItemText.js +1 -2
- package/legacy/MobileStepper/MobileStepper.js +80 -48
- package/legacy/Modal/Modal.js +20 -15
- package/legacy/NativeSelect/NativeSelectInput.js +1 -2
- package/legacy/OutlinedInput/OutlinedInput.js +1 -2
- package/legacy/PaginationItem/PaginationItem.js +1 -2
- package/legacy/Popover/Popover.js +2 -2
- package/legacy/Radio/RadioButtonIcon.js +1 -2
- package/legacy/Rating/Rating.js +1 -2
- package/legacy/Select/SelectInput.js +1 -2
- package/legacy/Slider/Slider.js +25 -26
- package/legacy/Slider/SliderValueLabel.js +1 -2
- package/legacy/SnackbarContent/SnackbarContent.js +1 -2
- package/legacy/SpeedDial/SpeedDial.js +1 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +1 -2
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/legacy/Step/Step.js +22 -14
- package/legacy/StepButton/StepButton.js +17 -15
- package/legacy/StepConnector/StepConnector.js +46 -28
- package/legacy/StepContent/StepContent.js +15 -10
- package/legacy/StepIcon/StepIcon.js +3 -4
- package/legacy/StepLabel/StepLabel.js +65 -44
- package/legacy/Stepper/Stepper.js +28 -15
- package/legacy/SvgIcon/SvgIcon.js +1 -2
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +1 -2
- package/legacy/Switch/Switch.js +1 -2
- package/legacy/Table/Table.js +0 -2
- package/legacy/TablePagination/TablePagination.js +1 -2
- package/legacy/TablePagination/TablePaginationActions.js +1 -2
- package/legacy/TableSortLabel/TableSortLabel.js +1 -2
- package/legacy/Tabs/Tabs.js +1 -2
- package/legacy/TextField/TextField.js +1 -2
- package/legacy/Tooltip/Tooltip.js +1 -2
- package/legacy/index.js +1 -1
- package/legacy/internal/SwitchBase.js +1 -2
- package/legacy/styles/CssVarsProvider.js +1 -3
- package/legacy/styles/createGetSelector.js +21 -0
- package/legacy/styles/experimental_extendTheme.js +50 -9
- package/legacy/zero-styled/index.js +1 -0
- package/modern/Accordion/Accordion.js +1 -2
- package/modern/AccordionSummary/AccordionSummary.js +1 -2
- package/modern/Alert/Alert.js +1 -2
- package/modern/AppBar/AppBar.js +118 -68
- package/modern/Autocomplete/Autocomplete.js +1 -2
- package/modern/AvatarGroup/AvatarGroup.js +25 -22
- package/modern/Backdrop/Backdrop.js +50 -32
- package/modern/Badge/Badge.js +3 -6
- package/modern/BottomNavigation/BottomNavigation.js +2 -2
- package/modern/BottomNavigationAction/BottomNavigationAction.js +40 -24
- package/modern/Breadcrumbs/Breadcrumbs.js +2 -2
- package/modern/Button/Button.js +221 -133
- package/modern/ButtonBase/ButtonBase.js +3 -4
- package/modern/ButtonBase/Ripple.js +1 -1
- package/modern/ButtonBase/TouchRipple.js +3 -4
- package/modern/ButtonGroup/ButtonGroup.js +168 -71
- package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
- package/modern/Card/Card.js +4 -6
- package/modern/CardActionArea/CardActionArea.js +3 -4
- package/modern/CardActions/CardActions.js +16 -12
- package/modern/CardContent/CardContent.js +7 -9
- package/modern/CardHeader/CardHeader.js +3 -4
- package/modern/CardMedia/CardMedia.js +22 -13
- package/modern/Chip/Chip.js +191 -122
- package/modern/CssBaseline/CssBaseline.js +1 -2
- package/modern/Divider/Divider.js +140 -81
- package/modern/FormControl/FormControl.js +30 -15
- package/modern/FormControlLabel/FormControlLabel.js +38 -22
- package/modern/FormGroup/FormGroup.js +14 -10
- package/modern/Grid/Grid.js +3 -0
- package/modern/ImageListItemBar/ImageListItemBar.js +1 -2
- package/modern/InputAdornment/InputAdornment.js +1 -2
- package/modern/InputBase/InputBase.js +1 -2
- package/modern/LinearProgress/LinearProgress.js +1 -2
- package/modern/List/List.js +1 -2
- package/modern/ListItem/ListItem.js +1 -2
- package/modern/ListItemText/ListItemText.js +1 -2
- package/modern/MobileStepper/MobileStepper.js +80 -47
- package/modern/Modal/Modal.js +15 -11
- package/modern/NativeSelect/NativeSelectInput.js +1 -2
- package/modern/OutlinedInput/OutlinedInput.js +1 -2
- package/modern/PaginationItem/PaginationItem.js +1 -2
- package/modern/Popover/Popover.js +2 -2
- package/modern/Radio/RadioButtonIcon.js +1 -2
- package/modern/Rating/Rating.js +1 -2
- package/modern/Select/SelectInput.js +1 -2
- package/modern/Slider/Slider.js +23 -24
- package/modern/Slider/SliderValueLabel.js +1 -2
- package/modern/SnackbarContent/SnackbarContent.js +1 -2
- package/modern/SpeedDial/SpeedDial.js +1 -2
- package/modern/SpeedDialAction/SpeedDialAction.js +1 -2
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -2
- package/modern/Step/Step.js +23 -14
- package/modern/StepButton/StepButton.js +17 -14
- package/modern/StepConnector/StepConnector.js +45 -26
- package/modern/StepContent/StepContent.js +13 -8
- package/modern/StepIcon/StepIcon.js +3 -4
- package/modern/StepLabel/StepLabel.js +47 -26
- package/modern/Stepper/Stepper.js +29 -15
- package/modern/SvgIcon/SvgIcon.js +1 -2
- package/modern/SwipeableDrawer/SwipeableDrawer.js +1 -2
- package/modern/Switch/Switch.js +1 -2
- package/modern/Table/Table.js +0 -2
- package/modern/TablePagination/TablePagination.js +1 -2
- package/modern/TablePagination/TablePaginationActions.js +1 -2
- package/modern/TableSortLabel/TableSortLabel.js +1 -2
- package/modern/Tabs/Tabs.js +1 -2
- package/modern/TextField/TextField.js +1 -2
- package/modern/Tooltip/Tooltip.js +1 -2
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +1 -2
- package/modern/styles/CssVarsProvider.js +1 -3
- package/modern/styles/createGetSelector.js +21 -0
- package/modern/styles/experimental_extendTheme.js +45 -10
- package/modern/zero-styled/index.js +1 -0
- package/node/Accordion/Accordion.js +1 -1
- package/node/Accordion/AccordionContext.js +1 -1
- package/node/Accordion/index.js +1 -1
- package/node/AccordionActions/AccordionActions.js +1 -1
- package/node/AccordionActions/index.js +1 -1
- package/node/AccordionDetails/AccordionDetails.js +1 -1
- package/node/AccordionDetails/index.js +1 -1
- package/node/AccordionSummary/AccordionSummary.js +1 -1
- package/node/AccordionSummary/index.js +1 -1
- package/node/Alert/Alert.js +1 -1
- package/node/Alert/index.js +1 -1
- package/node/AlertTitle/AlertTitle.js +1 -1
- package/node/AlertTitle/index.js +1 -1
- package/node/AppBar/AppBar.js +126 -67
- package/node/AppBar/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/Autocomplete/index.js +1 -1
- package/node/Avatar/Avatar.js +1 -1
- package/node/Avatar/index.js +1 -1
- package/node/AvatarGroup/AvatarGroup.js +27 -23
- package/node/AvatarGroup/index.js +1 -1
- package/node/Backdrop/Backdrop.js +53 -36
- package/node/Backdrop/index.js +1 -1
- package/node/Badge/Badge.js +3 -5
- package/node/Badge/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +5 -5
- package/node/BottomNavigation/index.js +1 -1
- package/node/BottomNavigationAction/BottomNavigationAction.js +43 -26
- package/node/BottomNavigationAction/index.js +1 -1
- package/node/Box/index.js +1 -1
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
- package/node/Breadcrumbs/Breadcrumbs.js +7 -7
- package/node/Breadcrumbs/index.js +1 -1
- package/node/Button/Button.js +225 -136
- package/node/Button/index.js +1 -1
- package/node/ButtonBase/ButtonBase.js +5 -5
- package/node/ButtonBase/Ripple.js +2 -2
- package/node/ButtonBase/TouchRipple.js +10 -11
- package/node/ButtonBase/index.js +1 -1
- package/node/ButtonGroup/ButtonGroup.js +171 -74
- package/node/ButtonGroup/ButtonGroupButtonContext.js +1 -1
- package/node/ButtonGroup/ButtonGroupContext.js +1 -1
- package/node/ButtonGroup/buttonGroupClasses.js +1 -1
- package/node/ButtonGroup/index.js +1 -1
- package/node/Card/Card.js +7 -9
- package/node/Card/index.js +1 -1
- package/node/CardActionArea/CardActionArea.js +6 -6
- package/node/CardActionArea/index.js +1 -1
- package/node/CardActions/CardActions.js +19 -15
- package/node/CardActions/index.js +1 -1
- package/node/CardContent/CardContent.js +10 -12
- package/node/CardContent/index.js +1 -1
- package/node/CardHeader/CardHeader.js +8 -8
- package/node/CardHeader/index.js +1 -1
- package/node/CardMedia/CardMedia.js +25 -16
- package/node/CardMedia/index.js +1 -1
- package/node/Checkbox/Checkbox.js +1 -1
- package/node/Checkbox/index.js +1 -1
- package/node/Chip/Chip.js +194 -124
- package/node/Chip/index.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/CircularProgress/index.js +1 -1
- package/node/Collapse/Collapse.js +1 -1
- package/node/Collapse/index.js +1 -1
- package/node/Container/index.js +1 -1
- package/node/CssBaseline/CssBaseline.js +1 -1
- package/node/Dialog/Dialog.js +1 -1
- package/node/Dialog/DialogContext.js +1 -1
- package/node/Dialog/index.js +1 -1
- package/node/DialogActions/DialogActions.js +1 -1
- package/node/DialogActions/index.js +1 -1
- package/node/DialogContent/DialogContent.js +1 -1
- package/node/DialogContent/index.js +1 -1
- package/node/DialogContentText/DialogContentText.js +1 -1
- package/node/DialogContentText/index.js +1 -1
- package/node/DialogTitle/DialogTitle.js +1 -1
- package/node/DialogTitle/index.js +1 -1
- package/node/Divider/Divider.js +144 -85
- package/node/Divider/index.js +1 -1
- package/node/Drawer/Drawer.js +1 -1
- package/node/Drawer/index.js +1 -1
- package/node/Fab/Fab.js +1 -1
- package/node/Fab/index.js +1 -1
- package/node/Fade/Fade.js +1 -1
- package/node/FilledInput/FilledInput.js +1 -1
- package/node/FilledInput/index.js +1 -1
- package/node/FormControl/FormControl.js +33 -18
- package/node/FormControl/FormControlContext.js +1 -1
- package/node/FormControl/index.js +1 -1
- package/node/FormControl/useFormControl.js +1 -1
- package/node/FormControlLabel/FormControlLabel.js +41 -24
- package/node/FormControlLabel/index.js +1 -1
- package/node/FormGroup/FormGroup.js +17 -13
- package/node/FormGroup/index.js +1 -1
- package/node/FormHelperText/FormHelperText.js +1 -1
- package/node/FormHelperText/index.js +1 -1
- package/node/FormLabel/FormLabel.js +1 -1
- package/node/FormLabel/index.js +1 -1
- package/node/GlobalStyles/GlobalStyles.js +1 -1
- package/node/Grid/Grid.js +4 -1
- package/node/Grid/GridContext.js +1 -1
- package/node/Grid/index.js +1 -1
- package/node/Grow/Grow.js +1 -1
- package/node/Hidden/Hidden.js +1 -1
- package/node/Hidden/HiddenCss.js +1 -1
- package/node/Hidden/HiddenJs.js +1 -1
- package/node/Hidden/withWidth.js +1 -1
- package/node/Icon/Icon.js +1 -1
- package/node/Icon/index.js +1 -1
- package/node/IconButton/IconButton.js +1 -1
- package/node/IconButton/index.js +1 -1
- package/node/ImageList/ImageList.js +1 -1
- package/node/ImageList/ImageListContext.js +1 -1
- package/node/ImageList/index.js +1 -1
- package/node/ImageListItem/ImageListItem.js +1 -1
- package/node/ImageListItem/index.js +1 -1
- package/node/ImageListItemBar/ImageListItemBar.js +1 -1
- package/node/ImageListItemBar/index.js +1 -1
- package/node/Input/Input.js +1 -1
- package/node/Input/index.js +1 -1
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputAdornment/index.js +1 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/InputBase/index.js +1 -1
- package/node/InputLabel/InputLabel.js +1 -1
- package/node/InputLabel/index.js +1 -1
- package/node/LinearProgress/LinearProgress.js +1 -1
- package/node/LinearProgress/index.js +1 -1
- package/node/Link/Link.js +1 -1
- package/node/Link/index.js +1 -1
- package/node/List/List.js +1 -1
- package/node/List/ListContext.js +1 -1
- package/node/List/index.js +1 -1
- package/node/ListItem/ListItem.js +1 -1
- package/node/ListItem/index.js +1 -1
- package/node/ListItemAvatar/ListItemAvatar.js +1 -1
- package/node/ListItemAvatar/index.js +1 -1
- package/node/ListItemButton/ListItemButton.js +1 -1
- package/node/ListItemButton/index.js +1 -1
- package/node/ListItemIcon/ListItemIcon.js +1 -1
- package/node/ListItemIcon/index.js +1 -1
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +1 -1
- package/node/ListItemSecondaryAction/index.js +1 -1
- package/node/ListItemText/ListItemText.js +1 -1
- package/node/ListItemText/index.js +1 -1
- package/node/ListSubheader/ListSubheader.js +1 -1
- package/node/ListSubheader/index.js +1 -1
- package/node/Menu/Menu.js +1 -1
- package/node/Menu/index.js +1 -1
- package/node/MenuItem/MenuItem.js +1 -1
- package/node/MenuItem/index.js +1 -1
- package/node/MenuList/MenuList.js +1 -1
- package/node/MobileStepper/MobileStepper.js +86 -52
- package/node/MobileStepper/index.js +1 -1
- package/node/Modal/Modal.js +18 -13
- package/node/Modal/index.js +1 -1
- package/node/NativeSelect/NativeSelect.js +1 -1
- package/node/NativeSelect/NativeSelectInput.js +1 -1
- package/node/NativeSelect/index.js +1 -1
- package/node/OutlinedInput/NotchedOutline.js +1 -1
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/OutlinedInput/index.js +1 -1
- package/node/Pagination/Pagination.js +1 -1
- package/node/Pagination/index.js +1 -1
- package/node/PaginationItem/PaginationItem.js +1 -1
- package/node/PaginationItem/index.js +1 -1
- package/node/Paper/Paper.js +1 -1
- package/node/Paper/index.js +1 -1
- package/node/Popover/Popover.js +6 -6
- package/node/Popover/index.js +1 -1
- package/node/Popper/Popper.js +1 -1
- package/node/Radio/Radio.js +1 -1
- package/node/Radio/RadioButtonIcon.js +1 -1
- package/node/Radio/index.js +1 -1
- package/node/RadioGroup/RadioGroup.js +1 -1
- package/node/RadioGroup/RadioGroupContext.js +1 -1
- package/node/RadioGroup/index.js +1 -1
- package/node/RadioGroup/useRadioGroup.js +1 -1
- package/node/Rating/Rating.js +1 -1
- package/node/Rating/index.js +1 -1
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
- package/node/ScopedCssBaseline/index.js +1 -1
- package/node/Select/Select.js +1 -1
- package/node/Select/SelectInput.js +1 -1
- package/node/Select/index.js +1 -1
- package/node/Skeleton/Skeleton.js +1 -1
- package/node/Skeleton/index.js +1 -1
- package/node/Slide/Slide.js +1 -1
- package/node/Slider/Slider.js +26 -26
- package/node/Slider/SliderValueLabel.js +1 -1
- package/node/Slider/index.js +1 -1
- package/node/Snackbar/Snackbar.js +1 -1
- package/node/Snackbar/index.js +1 -1
- package/node/SnackbarContent/SnackbarContent.js +1 -1
- package/node/SnackbarContent/index.js +1 -1
- package/node/SpeedDial/SpeedDial.js +1 -1
- package/node/SpeedDial/index.js +1 -1
- package/node/SpeedDialAction/SpeedDialAction.js +1 -1
- package/node/SpeedDialAction/index.js +1 -1
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/SpeedDialIcon/index.js +1 -1
- package/node/Step/Step.js +25 -15
- package/node/Step/StepContext.js +1 -1
- package/node/Step/index.js +1 -1
- package/node/StepButton/StepButton.js +20 -17
- package/node/StepButton/index.js +1 -1
- package/node/StepConnector/StepConnector.js +49 -30
- package/node/StepConnector/index.js +1 -1
- package/node/StepContent/StepContent.js +17 -12
- package/node/StepContent/index.js +1 -1
- package/node/StepIcon/StepIcon.js +6 -6
- package/node/StepIcon/index.js +1 -1
- package/node/StepLabel/StepLabel.js +52 -31
- package/node/StepLabel/index.js +1 -1
- package/node/Stepper/Stepper.js +32 -18
- package/node/Stepper/StepperContext.js +1 -1
- package/node/Stepper/index.js +1 -1
- package/node/SvgIcon/SvgIcon.js +1 -1
- package/node/SvgIcon/index.js +1 -1
- package/node/SwipeableDrawer/SwipeArea.js +1 -1
- package/node/SwipeableDrawer/SwipeableDrawer.js +1 -1
- package/node/Switch/Switch.js +1 -1
- package/node/Switch/index.js +1 -1
- package/node/Tab/Tab.js +1 -1
- package/node/Tab/index.js +1 -1
- package/node/TabScrollButton/TabScrollButton.js +1 -1
- package/node/TabScrollButton/index.js +1 -1
- package/node/Table/Table.js +1 -3
- package/node/Table/TableContext.js +1 -1
- package/node/Table/Tablelvl2Context.js +1 -1
- package/node/Table/index.js +1 -1
- package/node/TableBody/TableBody.js +1 -1
- package/node/TableBody/index.js +1 -1
- package/node/TableCell/TableCell.js +1 -1
- package/node/TableCell/index.js +1 -1
- package/node/TableContainer/TableContainer.js +1 -1
- package/node/TableContainer/index.js +1 -1
- package/node/TableFooter/TableFooter.js +1 -1
- package/node/TableFooter/index.js +1 -1
- package/node/TableHead/TableHead.js +1 -1
- package/node/TableHead/index.js +1 -1
- package/node/TablePagination/TablePagination.js +1 -1
- package/node/TablePagination/TablePaginationActions.js +1 -1
- package/node/TablePagination/index.js +1 -1
- package/node/TableRow/TableRow.js +1 -1
- package/node/TableRow/index.js +1 -1
- package/node/TableSortLabel/TableSortLabel.js +1 -1
- package/node/TableSortLabel/index.js +1 -1
- package/node/Tabs/ScrollbarSize.js +1 -1
- package/node/Tabs/Tabs.js +1 -1
- package/node/Tabs/index.js +1 -1
- package/node/TextField/TextField.js +1 -1
- package/node/TextField/index.js +1 -1
- package/node/ToggleButton/ToggleButton.js +1 -1
- package/node/ToggleButton/index.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroupButtonContext.js +1 -1
- package/node/ToggleButtonGroup/ToggleButtonGroupContext.js +1 -1
- package/node/ToggleButtonGroup/index.js +1 -1
- package/node/Toolbar/Toolbar.js +1 -1
- package/node/Toolbar/index.js +1 -1
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/Tooltip/index.js +1 -1
- package/node/Typography/Typography.js +1 -1
- package/node/Typography/index.js +1 -1
- package/node/Unstable_Grid2/index.js +1 -1
- package/node/Zoom/Zoom.js +1 -1
- package/node/index.js +2 -2
- package/node/internal/SwitchBase.js +1 -1
- package/node/internal/svg-icons/Add.js +1 -1
- package/node/internal/svg-icons/ArrowDownward.js +1 -1
- package/node/internal/svg-icons/ArrowDropDown.js +1 -1
- package/node/internal/svg-icons/Cancel.js +1 -1
- package/node/internal/svg-icons/CheckBox.js +1 -1
- package/node/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/node/internal/svg-icons/CheckCircle.js +1 -1
- package/node/internal/svg-icons/Close.js +1 -1
- package/node/internal/svg-icons/ErrorOutline.js +1 -1
- package/node/internal/svg-icons/FirstPage.js +1 -1
- package/node/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/node/internal/svg-icons/InfoOutlined.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/node/internal/svg-icons/LastPage.js +1 -1
- package/node/internal/svg-icons/MoreHoriz.js +1 -1
- package/node/internal/svg-icons/NavigateBefore.js +1 -1
- package/node/internal/svg-icons/NavigateNext.js +1 -1
- package/node/internal/svg-icons/Person.js +1 -1
- package/node/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/node/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/node/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/node/internal/svg-icons/Star.js +1 -1
- package/node/internal/svg-icons/StarBorder.js +1 -1
- package/node/internal/svg-icons/SuccessOutlined.js +1 -1
- package/node/internal/svg-icons/Warning.js +1 -1
- package/node/styles/CssVarsProvider.js +1 -3
- package/node/styles/ThemeProvider.js +1 -1
- package/node/styles/createGetSelector.js +29 -0
- package/node/styles/createTheme.js +1 -1
- package/node/styles/experimental_extendTheme.js +46 -11
- package/node/styles/index.js +1 -1
- package/node/styles/useTheme.js +1 -1
- package/node/useAutocomplete/index.js +1 -1
- package/node/useScrollTrigger/useScrollTrigger.js +1 -1
- package/node/useTouchRipple/useTouchRipple.js +1 -1
- package/node/utils/createSvgIcon.js +1 -1
- package/node/zero-styled/index.js +7 -0
- package/package.json +6 -6
- package/styles/CssVarsProvider.js +1 -3
- package/styles/createGetSelector.d.ts +10 -0
- package/styles/createGetSelector.js +21 -0
- package/styles/createTheme.js +1 -1
- package/styles/excludeVariablesFromRoot.d.ts +1 -1
- package/styles/experimental_extendTheme.d.ts +25 -5
- package/styles/experimental_extendTheme.js +52 -18
- package/styles/shouldSkipGeneratingVar.js +1 -2
- package/transitions/utils.js +2 -3
- package/umd/material-ui.development.js +1718 -1047
- package/umd/material-ui.production.min.js +4 -4
- package/useTouchRipple/useTouchRipple.js +4 -8
- package/utils/useSlot.js +1 -1
- package/zero-styled/index.d.ts +1 -0
- package/zero-styled/index.js +1 -0
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _createSvgIcon = _interopRequireDefault(require("../../utils/createSvgIcon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
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); }
|
|
13
|
-
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 &&
|
|
13
|
+
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; }
|
|
14
14
|
/**
|
|
15
15
|
* @ignore - internal component.
|
|
16
16
|
*/
|
|
@@ -14,7 +14,6 @@ var _system = require("@mui/system");
|
|
|
14
14
|
var _styleFunctionSx = _interopRequireDefault(require("@mui/system/styleFunctionSx"));
|
|
15
15
|
var _experimental_extendTheme = _interopRequireDefault(require("./experimental_extendTheme"));
|
|
16
16
|
var _createTypography = _interopRequireDefault(require("./createTypography"));
|
|
17
|
-
var _excludeVariablesFromRoot = _interopRequireDefault(require("./excludeVariablesFromRoot"));
|
|
18
17
|
var _identifier = _interopRequireDefault(require("./identifier"));
|
|
19
18
|
const defaultTheme = (0, _experimental_extendTheme.default)();
|
|
20
19
|
const {
|
|
@@ -42,8 +41,7 @@ const {
|
|
|
42
41
|
});
|
|
43
42
|
};
|
|
44
43
|
return newTheme;
|
|
45
|
-
}
|
|
46
|
-
excludeVariablesFromRoot: _excludeVariablesFromRoot.default
|
|
44
|
+
}
|
|
47
45
|
});
|
|
48
46
|
exports.getInitColorSchemeScript = getInitColorSchemeScript;
|
|
49
47
|
exports.useColorScheme = useColorScheme;
|
|
@@ -15,7 +15,7 @@ var _identifier = _interopRequireDefault(require("./identifier"));
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const _excluded = ["theme"];
|
|
17
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); }
|
|
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 &&
|
|
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; }
|
|
19
19
|
function ThemeProvider(_ref) {
|
|
20
20
|
let {
|
|
21
21
|
theme: themeInput
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _excludeVariablesFromRoot = _interopRequireDefault(require("./excludeVariablesFromRoot"));
|
|
9
|
+
var _default = theme => (colorScheme, css) => {
|
|
10
|
+
if (theme.defaultColorScheme === colorScheme) {
|
|
11
|
+
if (colorScheme === 'dark') {
|
|
12
|
+
const excludedVariables = {};
|
|
13
|
+
(0, _excludeVariablesFromRoot.default)(theme.cssVarPrefix).forEach(cssVar => {
|
|
14
|
+
excludedVariables[cssVar] = css[cssVar];
|
|
15
|
+
delete css[cssVar];
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
[`[${theme.attribute}="${String(colorScheme)}"]`]: excludedVariables,
|
|
19
|
+
[theme.colorSchemeSelector]: css
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return `${theme.colorSchemeSelector}, [${theme.attribute}="${String(colorScheme)}"]`;
|
|
23
|
+
}
|
|
24
|
+
if (colorScheme) {
|
|
25
|
+
return `[${theme.attribute}="${String(colorScheme)}"]`;
|
|
26
|
+
}
|
|
27
|
+
return theme.colorSchemeSelector;
|
|
28
|
+
};
|
|
29
|
+
exports.default = _default;
|
|
@@ -21,7 +21,7 @@ var _createTransitions = _interopRequireDefault(require("./createTransitions"));
|
|
|
21
21
|
var _zIndex = _interopRequireDefault(require("./zIndex"));
|
|
22
22
|
const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
23
23
|
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); }
|
|
24
|
-
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 &&
|
|
24
|
+
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; }
|
|
25
25
|
function createTheme(options = {}, ...args) {
|
|
26
26
|
const {
|
|
27
27
|
mixins: mixinsInput = {},
|
|
@@ -10,15 +10,18 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
|
12
12
|
var _system = require("@mui/system");
|
|
13
|
+
var _spacing = require("@mui/system/spacing");
|
|
14
|
+
var _cssVars = require("@mui/system/cssVars");
|
|
13
15
|
var _styleFunctionSx = _interopRequireWildcard(require("@mui/system/styleFunctionSx"));
|
|
14
16
|
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
15
17
|
var _shouldSkipGeneratingVar = _interopRequireDefault(require("./shouldSkipGeneratingVar"));
|
|
16
18
|
var _createTheme = _interopRequireDefault(require("./createTheme"));
|
|
17
19
|
var _getOverlayAlpha = _interopRequireDefault(require("./getOverlayAlpha"));
|
|
18
|
-
|
|
20
|
+
var _createGetSelector = _interopRequireDefault(require("./createGetSelector"));
|
|
21
|
+
const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar", "getSelector"],
|
|
19
22
|
_excluded2 = ["palette"];
|
|
20
23
|
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
|
-
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 &&
|
|
24
|
+
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
25
|
const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
23
26
|
if (index === 0) {
|
|
24
27
|
return undefined;
|
|
@@ -51,6 +54,21 @@ function setColorChannel(obj, key) {
|
|
|
51
54
|
obj[`${key}Channel`] = (0, _colorManipulator.private_safeColorChannel)(toRgb(obj[key]), `MUI: Can't create \`palette.${key}Channel\` because \`palette.${key}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\n' + `To suppress this warning, you need to explicitly provide the \`palette.${key}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`);
|
|
52
55
|
}
|
|
53
56
|
}
|
|
57
|
+
function getSpacingVal(spacingInput) {
|
|
58
|
+
if (typeof spacingInput === 'number') {
|
|
59
|
+
return `${spacingInput}px`;
|
|
60
|
+
}
|
|
61
|
+
if (typeof spacingInput === 'string') {
|
|
62
|
+
return spacingInput;
|
|
63
|
+
}
|
|
64
|
+
if (typeof spacingInput === 'function') {
|
|
65
|
+
return getSpacingVal(spacingInput(1));
|
|
66
|
+
}
|
|
67
|
+
if (Array.isArray(spacingInput)) {
|
|
68
|
+
return spacingInput;
|
|
69
|
+
}
|
|
70
|
+
return '8px';
|
|
71
|
+
}
|
|
54
72
|
const silent = fn => {
|
|
55
73
|
try {
|
|
56
74
|
return fn();
|
|
@@ -66,7 +84,8 @@ function extendTheme(options = {}, ...args) {
|
|
|
66
84
|
const {
|
|
67
85
|
colorSchemes: colorSchemesInput = {},
|
|
68
86
|
cssVarPrefix = 'mui',
|
|
69
|
-
shouldSkipGeneratingVar = _shouldSkipGeneratingVar.default
|
|
87
|
+
shouldSkipGeneratingVar = _shouldSkipGeneratingVar.default,
|
|
88
|
+
getSelector
|
|
70
89
|
} = options,
|
|
71
90
|
input = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);
|
|
72
91
|
const getCssVar = createGetCssVar(cssVarPrefix);
|
|
@@ -84,7 +103,9 @@ function extendTheme(options = {}, ...args) {
|
|
|
84
103
|
mode: 'dark'
|
|
85
104
|
}, (_colorSchemesInput$da = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da.palette)
|
|
86
105
|
});
|
|
87
|
-
let theme = (0, _extends2.default)({
|
|
106
|
+
let theme = (0, _extends2.default)({
|
|
107
|
+
defaultColorScheme: 'light'
|
|
108
|
+
}, muiTheme, {
|
|
88
109
|
cssVarPrefix,
|
|
89
110
|
getCssVar,
|
|
90
111
|
colorSchemes: (0, _extends2.default)({}, colorSchemesInput, {
|
|
@@ -108,7 +129,8 @@ function extendTheme(options = {}, ...args) {
|
|
|
108
129
|
}, (_colorSchemesInput$da2 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da2.opacity),
|
|
109
130
|
overlays: ((_colorSchemesInput$da3 = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da3.overlays) || defaultDarkOverlays
|
|
110
131
|
})
|
|
111
|
-
})
|
|
132
|
+
}),
|
|
133
|
+
spacing: getSpacingVal(input.spacing)
|
|
112
134
|
});
|
|
113
135
|
Object.keys(theme.colorSchemes).forEach(key => {
|
|
114
136
|
const palette = theme.colorSchemes[key].palette;
|
|
@@ -301,14 +323,27 @@ function extendTheme(options = {}, ...args) {
|
|
|
301
323
|
theme = args.reduce((acc, argument) => (0, _deepmerge.default)(acc, argument), theme);
|
|
302
324
|
const parserConfig = {
|
|
303
325
|
prefix: cssVarPrefix,
|
|
304
|
-
shouldSkipGeneratingVar
|
|
326
|
+
shouldSkipGeneratingVar,
|
|
327
|
+
getSelector: getSelector || (0, _createGetSelector.default)(theme)
|
|
305
328
|
};
|
|
306
329
|
const {
|
|
307
|
-
vars
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
theme.
|
|
330
|
+
vars,
|
|
331
|
+
generateThemeVars,
|
|
332
|
+
generateStyleSheets
|
|
333
|
+
} = (0, _cssVars.prepareCssVars)(theme, parserConfig);
|
|
334
|
+
theme.attribute = 'data-mui-color-scheme';
|
|
335
|
+
theme.colorSchemeSelector = ':root';
|
|
336
|
+
theme.vars = vars;
|
|
337
|
+
Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {
|
|
338
|
+
theme[key] = value;
|
|
339
|
+
});
|
|
340
|
+
theme.generateThemeVars = generateThemeVars;
|
|
341
|
+
theme.generateStyleSheets = generateStyleSheets;
|
|
342
|
+
theme.generateSpacing = function generateSpacing() {
|
|
343
|
+
return (0, _system.createSpacing)(input.spacing, (0, _spacing.createUnarySpacing)(this));
|
|
344
|
+
};
|
|
345
|
+
theme.getColorSchemeSelector = colorScheme => `[${theme.attribute}="${colorScheme}"] &`;
|
|
346
|
+
theme.spacing = theme.generateSpacing();
|
|
312
347
|
theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;
|
|
313
348
|
theme.unstable_sxConfig = (0, _extends2.default)({}, _styleFunctionSx.unstable_defaultSxConfig, input == null ? void 0 : input.unstable_sxConfig);
|
|
314
349
|
theme.unstable_sx = function sx(props) {
|
package/node/styles/index.js
CHANGED
|
@@ -318,7 +318,7 @@ var _createTypography = _interopRequireDefault(require("./createTypography"));
|
|
|
318
318
|
var _createMixins = _interopRequireDefault(require("./createMixins"));
|
|
319
319
|
var _excludeVariablesFromRoot = _interopRequireDefault(require("./excludeVariablesFromRoot"));
|
|
320
320
|
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); }
|
|
321
|
-
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 &&
|
|
321
|
+
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; }
|
|
322
322
|
// TODO: Remove this function in v6.
|
|
323
323
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
324
324
|
function experimental_sx() {
|
package/node/styles/useTheme.js
CHANGED
|
@@ -11,7 +11,7 @@ var _system = require("@mui/system");
|
|
|
11
11
|
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
|
|
12
12
|
var _identifier = _interopRequireDefault(require("./identifier"));
|
|
13
13
|
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); }
|
|
14
|
-
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 &&
|
|
14
|
+
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; }
|
|
15
15
|
function useTheme() {
|
|
16
16
|
const theme = (0, _system.useTheme)(_defaultTheme.default);
|
|
17
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -18,4 +18,4 @@ Object.defineProperty(exports, "default", {
|
|
|
18
18
|
});
|
|
19
19
|
var _useAutocomplete = _interopRequireWildcard(require("./useAutocomplete"));
|
|
20
20
|
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
|
-
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 &&
|
|
21
|
+
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; }
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
const _excluded = ["getTrigger", "target"];
|
|
13
13
|
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); }
|
|
14
|
-
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 &&
|
|
14
|
+
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; }
|
|
15
15
|
function defaultTrigger(store, options) {
|
|
16
16
|
const {
|
|
17
17
|
disableHysteresis = false,
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _utils = require("../utils");
|
|
10
10
|
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); }
|
|
11
|
-
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 &&
|
|
11
|
+
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; }
|
|
12
12
|
const useTouchRipple = props => {
|
|
13
13
|
const {
|
|
14
14
|
disabled,
|
|
@@ -11,7 +11,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _SvgIcon = _interopRequireDefault(require("../SvgIcon"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
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); }
|
|
14
|
-
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 &&
|
|
14
|
+
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; }
|
|
15
15
|
/**
|
|
16
16
|
* Private module reserved for @mui packages.
|
|
17
17
|
*/function createSvgIcon(path, displayName) {
|
|
@@ -5,6 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.createUseThemeProps = createUseThemeProps;
|
|
8
|
+
Object.defineProperty(exports, "keyframes", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _system.keyframes;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
Object.defineProperty(exports, "styled", {
|
|
9
15
|
enumerable: true,
|
|
10
16
|
get: function () {
|
|
@@ -12,6 +18,7 @@ Object.defineProperty(exports, "styled", {
|
|
|
12
18
|
}
|
|
13
19
|
});
|
|
14
20
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
21
|
+
var _system = require("@mui/system");
|
|
15
22
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
16
23
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
24
|
function createUseThemeProps(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"url": "https://opencollective.com/mui-org"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "^7.
|
|
30
|
+
"@babel/runtime": "^7.24.4",
|
|
31
31
|
"@types/react-transition-group": "^4.4.10",
|
|
32
32
|
"clsx": "^2.1.0",
|
|
33
33
|
"csstype": "^3.1.3",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"react-is": "^18.2.0",
|
|
36
36
|
"react-transition-group": "^4.4.5",
|
|
37
|
-
"@mui/base": "5.0.0-beta.
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
37
|
+
"@mui/base": "5.0.0-beta.42",
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.0.0-alpha.1",
|
|
39
|
+
"@mui/system": "^6.0.0-alpha.1",
|
|
40
|
+
"@mui/utils": "^6.0.0-alpha.1",
|
|
41
41
|
"@mui/types": "^7.2.14"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -8,7 +8,6 @@ import { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/sy
|
|
|
8
8
|
import styleFunctionSx from '@mui/system/styleFunctionSx';
|
|
9
9
|
import experimental_extendTheme from './experimental_extendTheme';
|
|
10
10
|
import createTypography from './createTypography';
|
|
11
|
-
import excludeVariablesFromRoot from './excludeVariablesFromRoot';
|
|
12
11
|
import THEME_ID from './identifier';
|
|
13
12
|
const defaultTheme = experimental_extendTheme();
|
|
14
13
|
const {
|
|
@@ -36,7 +35,6 @@ const {
|
|
|
36
35
|
});
|
|
37
36
|
};
|
|
38
37
|
return newTheme;
|
|
39
|
-
}
|
|
40
|
-
excludeVariablesFromRoot
|
|
38
|
+
}
|
|
41
39
|
});
|
|
42
40
|
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: <T extends {
|
|
2
|
+
attribute: string;
|
|
3
|
+
colorSchemeSelector: string;
|
|
4
|
+
colorSchemes?: Record<string, any> | undefined;
|
|
5
|
+
defaultColorScheme?: string | undefined;
|
|
6
|
+
cssVarPrefix?: string | undefined;
|
|
7
|
+
}>(theme: T) => (colorScheme: keyof T['colorSchemes'] | undefined, css: Record<string, any>) => string | {
|
|
8
|
+
[x: string]: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import excludeVariablesFromRoot from './excludeVariablesFromRoot';
|
|
2
|
+
export default (theme => (colorScheme, css) => {
|
|
3
|
+
if (theme.defaultColorScheme === colorScheme) {
|
|
4
|
+
if (colorScheme === 'dark') {
|
|
5
|
+
const excludedVariables = {};
|
|
6
|
+
excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {
|
|
7
|
+
excludedVariables[cssVar] = css[cssVar];
|
|
8
|
+
delete css[cssVar];
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
[`[${theme.attribute}="${String(colorScheme)}"]`]: excludedVariables,
|
|
12
|
+
[theme.colorSchemeSelector]: css
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
return `${theme.colorSchemeSelector}, [${theme.attribute}="${String(colorScheme)}"]`;
|
|
16
|
+
}
|
|
17
|
+
if (colorScheme) {
|
|
18
|
+
return `[${theme.attribute}="${String(colorScheme)}"]`;
|
|
19
|
+
}
|
|
20
|
+
return theme.colorSchemeSelector;
|
|
21
|
+
});
|
package/styles/createTheme.js
CHANGED
|
@@ -67,7 +67,7 @@ Please use another name.` : _formatMuiErrorMessage(18));
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other
|
|
70
|
+
muiTheme.unstable_sxConfig = _extends({}, defaultSxConfig, other?.unstable_sxConfig);
|
|
71
71
|
muiTheme.unstable_sx = function sx(props) {
|
|
72
72
|
return styleFunctionSx({
|
|
73
73
|
sx: props,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
3
|
*/
|
|
4
|
-
declare const excludeVariablesFromRoot: (cssVarPrefix
|
|
4
|
+
declare const excludeVariablesFromRoot: (cssVarPrefix?: string) => string[];
|
|
5
5
|
export default excludeVariablesFromRoot;
|
|
@@ -289,6 +289,26 @@ export interface CssVarsThemeOptions extends Omit<ThemeOptions, 'palette' | 'com
|
|
|
289
289
|
* Color schemes configuration
|
|
290
290
|
*/
|
|
291
291
|
colorSchemes?: Partial<Record<SupportedColorScheme, ColorSystemOptions>>;
|
|
292
|
+
/**
|
|
293
|
+
* If provided, it will be used to create a selector for the color scheme.
|
|
294
|
+
* This is useful if you want to use class or data-* attributes to apply the color scheme.
|
|
295
|
+
*
|
|
296
|
+
* The callback receives the colorScheme with the possible values of:
|
|
297
|
+
* - undefined: the selector for tokens that are not color scheme dependent
|
|
298
|
+
* - string: the selector for the color scheme
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* // class selector
|
|
302
|
+
* (colorScheme) => colorScheme !== 'light' ? `.theme-${colorScheme}` : ":root"
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* // data-* attribute selector
|
|
306
|
+
* (colorScheme) => colorScheme !== 'light' ? `[data-theme="${colorScheme}"`] : ":root"
|
|
307
|
+
*/
|
|
308
|
+
getSelector?: (
|
|
309
|
+
colorScheme: SupportedColorScheme | undefined,
|
|
310
|
+
css: Record<string, any>,
|
|
311
|
+
) => string | Record<string, any>;
|
|
292
312
|
/**
|
|
293
313
|
* A function to determine if the key, value should be attached as CSS Variable
|
|
294
314
|
* `keys` is an array that represents the object path keys.
|
|
@@ -314,6 +334,7 @@ export interface ThemeVars {
|
|
|
314
334
|
overlays: Overlays;
|
|
315
335
|
shadows: Shadows;
|
|
316
336
|
shape: Theme['shape'];
|
|
337
|
+
spacing: string;
|
|
317
338
|
zIndex: ZIndex;
|
|
318
339
|
}
|
|
319
340
|
|
|
@@ -409,10 +430,9 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
409
430
|
vars: ThemeVars;
|
|
410
431
|
getCssVar: (field: ThemeCssVar, ...vars: ThemeCssVar[]) => string;
|
|
411
432
|
getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
};
|
|
433
|
+
generateThemeVars: () => ThemeVars;
|
|
434
|
+
generateStyleSheets: () => Array<Record<string, any>>;
|
|
435
|
+
generateSpacing: () => Theme['spacing'];
|
|
416
436
|
|
|
417
437
|
// Default theme tokens
|
|
418
438
|
spacing: Theme['spacing'];
|
|
@@ -446,4 +466,4 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
446
466
|
export default function experimental_extendTheme(
|
|
447
467
|
options?: CssVarsThemeOptions,
|
|
448
468
|
...args: object[]
|
|
449
|
-
): Omit<Theme, '
|
|
469
|
+
): Omit<Theme, 'applyStyles'> & CssVarsTheme;
|