@mui/material 5.10.13 → 5.10.15
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 +13 -53
- package/Accordion/AccordionContext.js +0 -6
- package/Accordion/accordionClasses.js +0 -5
- package/Accordion/index.js +0 -6
- package/AccordionActions/AccordionActions.js +5 -28
- package/AccordionActions/accordionActionsClasses.js +0 -5
- package/AccordionActions/index.js +0 -6
- package/AccordionDetails/AccordionDetails.js +4 -26
- package/AccordionDetails/accordionDetailsClasses.js +0 -5
- package/AccordionDetails/index.js +0 -6
- package/AccordionSummary/AccordionSummary.js +8 -38
- package/AccordionSummary/accordionSummaryClasses.js +0 -5
- package/AccordionSummary/index.js +0 -6
- package/Alert/Alert.js +20 -69
- package/Alert/alertClasses.js +0 -5
- package/Alert/index.js +0 -6
- package/AlertTitle/AlertTitle.js +4 -27
- package/AlertTitle/alertTitleClasses.js +0 -5
- package/AlertTitle/index.js +0 -6
- package/AppBar/AppBar.js +11 -40
- package/AppBar/appBarClasses.js +0 -5
- package/AppBar/index.js +0 -6
- package/Autocomplete/Autocomplete.js +61 -174
- package/Autocomplete/autocompleteClasses.js +0 -5
- package/Autocomplete/index.js +0 -5
- package/Avatar/Avatar.js +16 -59
- package/Avatar/avatarClasses.js +0 -5
- package/Avatar/index.js +0 -6
- package/AvatarGroup/AvatarGroup.js +13 -53
- package/AvatarGroup/avatarGroupClasses.js +0 -5
- package/AvatarGroup/index.js +0 -6
- package/Backdrop/Backdrop.js +15 -47
- package/Backdrop/backdropClasses.js +0 -5
- package/Backdrop/index.js +0 -6
- package/Badge/Badge.js +24 -72
- package/Badge/badgeClasses.js +2 -6
- package/Badge/index.js +0 -6
- package/BottomNavigation/BottomNavigation.js +9 -38
- package/BottomNavigation/bottomNavigationClasses.js +0 -5
- package/BottomNavigation/index.js +0 -6
- package/BottomNavigationAction/BottomNavigationAction.js +9 -42
- package/BottomNavigationAction/bottomNavigationActionClasses.js +0 -5
- package/BottomNavigationAction/index.js +0 -6
- package/Box/Box.js +1 -12
- package/Box/index.js +0 -2
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -14
- package/Breadcrumbs/Breadcrumbs.js +17 -57
- package/Breadcrumbs/breadcrumbsClasses.js +0 -5
- package/Breadcrumbs/index.js +0 -6
- package/Button/Button.js +22 -70
- package/Button/buttonClasses.js +0 -5
- package/Button/index.js +0 -6
- package/ButtonBase/ButtonBase.js +39 -126
- package/ButtonBase/Ripple.js +0 -19
- package/ButtonBase/TouchRipple.js +26 -48
- package/ButtonBase/buttonBaseClasses.js +0 -5
- package/ButtonBase/index.js +0 -8
- package/ButtonBase/touchRippleClasses.js +0 -5
- package/ButtonGroup/ButtonGroup.js +18 -60
- package/ButtonGroup/ButtonGroupContext.js +0 -6
- package/ButtonGroup/buttonGroupClasses.js +0 -5
- package/ButtonGroup/index.js +0 -6
- package/CHANGELOG.md +132 -2
- package/Card/Card.js +5 -31
- package/Card/cardClasses.js +0 -5
- package/Card/index.js +0 -6
- package/CardActionArea/CardActionArea.js +6 -30
- package/CardActionArea/cardActionAreaClasses.js +0 -5
- package/CardActionArea/index.js +0 -6
- package/CardActions/CardActions.js +5 -28
- package/CardActions/cardActionsClasses.js +0 -5
- package/CardActions/index.js +0 -6
- package/CardContent/CardContent.js +5 -28
- package/CardContent/cardContentClasses.js +0 -5
- package/CardContent/index.js +0 -6
- package/CardHeader/CardHeader.js +12 -47
- package/CardHeader/cardHeaderClasses.js +0 -5
- package/CardHeader/index.js +0 -6
- package/CardMedia/CardMedia.js +9 -37
- package/CardMedia/cardMediaClasses.js +0 -5
- package/CardMedia/index.js +0 -6
- package/Checkbox/Checkbox.js +13 -62
- package/Checkbox/checkboxClasses.js +0 -5
- package/Checkbox/index.js +0 -6
- package/Chip/Chip.js +22 -86
- package/Chip/chipClasses.js +0 -5
- package/Chip/index.js +0 -6
- package/CircularProgress/CircularProgress.js +14 -52
- package/CircularProgress/circularProgressClasses.js +0 -5
- package/CircularProgress/index.js +0 -6
- package/ClickAwayListener/index.js +0 -4
- package/Collapse/Collapse.js +24 -83
- package/Collapse/collapseClasses.js +0 -5
- package/Collapse/index.js +0 -6
- package/Container/Container.js +3 -20
- package/Container/containerClasses.js +0 -5
- package/Container/index.js +0 -6
- package/CssBaseline/CssBaseline.js +2 -29
- package/CssBaseline/index.js +0 -2
- package/Dialog/Dialog.js +24 -81
- package/Dialog/DialogContext.js +0 -4
- package/Dialog/dialogClasses.js +0 -5
- package/Dialog/index.js +0 -6
- package/DialogActions/DialogActions.js +5 -28
- package/DialogActions/dialogActionsClasses.js +0 -5
- package/DialogActions/index.js +0 -6
- package/DialogContent/DialogContent.js +5 -29
- package/DialogContent/dialogContentClasses.js +0 -5
- package/DialogContent/index.js +0 -6
- package/DialogContentText/DialogContentText.js +4 -27
- package/DialogContentText/dialogContentTextClasses.js +0 -5
- package/DialogContentText/index.js +0 -6
- package/DialogTitle/DialogTitle.js +5 -30
- package/DialogTitle/dialogTitleClasses.js +0 -5
- package/DialogTitle/index.js +0 -6
- package/Divider/Divider.js +15 -50
- package/Divider/dividerClasses.js +0 -5
- package/Divider/index.js +0 -6
- package/Drawer/Drawer.js +27 -72
- package/Drawer/drawerClasses.js +0 -5
- package/Drawer/index.js +0 -6
- package/Fab/Fab.js +15 -55
- package/Fab/fabClasses.js +0 -5
- package/Fab/index.js +0 -6
- package/Fade/Fade.js +21 -56
- package/Fade/index.js +0 -2
- package/FilledInput/FilledInput.js +16 -73
- package/FilledInput/filledInputClasses.js +0 -7
- package/FilledInput/index.js +0 -6
- package/FormControl/FormControl.js +19 -73
- package/FormControl/FormControlContext.js +0 -6
- package/FormControl/formControlClasses.js +0 -5
- package/FormControl/formControlState.js +0 -3
- package/FormControl/index.js +0 -7
- package/FormControl/useFormControl.js +0 -6
- package/FormControlLabel/FormControlLabel.js +12 -56
- package/FormControlLabel/formControlLabelClasses.js +0 -5
- package/FormControlLabel/index.js +0 -6
- package/FormGroup/FormGroup.js +6 -31
- package/FormGroup/formGroupClasses.js +0 -5
- package/FormGroup/index.js +0 -6
- package/FormHelperText/FormHelperText.js +7 -43
- package/FormHelperText/formHelperTextClasses.js +0 -5
- package/FormHelperText/index.js +0 -6
- package/FormLabel/FormLabel.js +7 -41
- package/FormLabel/formLabelClasses.js +0 -5
- package/FormLabel/index.js +0 -6
- package/GlobalStyles/GlobalStyles.js +1 -15
- package/GlobalStyles/index.js +0 -2
- package/Grid/Grid.js +41 -127
- package/Grid/GridContext.js +0 -6
- package/Grid/gridClasses.js +8 -9
- package/Grid/index.js +0 -6
- package/Grow/Grow.js +22 -63
- package/Grow/index.js +0 -2
- package/Hidden/Hidden.js +14 -45
- package/Hidden/HiddenCss.js +6 -46
- package/Hidden/HiddenJs.js +4 -33
- package/Hidden/hiddenCssClasses.js +0 -5
- package/Hidden/index.js +0 -2
- package/Hidden/withWidth.js +17 -45
- package/Icon/Icon.js +12 -42
- package/Icon/iconClasses.js +0 -5
- package/Icon/index.js +0 -6
- package/IconButton/IconButton.js +41 -74
- package/IconButton/iconButtonClasses.js +0 -5
- package/IconButton/index.js +0 -6
- package/ImageList/ImageList.js +13 -47
- package/ImageList/ImageListContext.js +0 -6
- package/ImageList/imageListClasses.js +0 -5
- package/ImageList/index.js +0 -6
- package/ImageListItem/ImageListItem.js +11 -45
- package/ImageListItem/imageListItemClasses.js +0 -5
- package/ImageListItem/index.js +0 -6
- package/ImageListItemBar/ImageListItemBar.js +9 -37
- package/ImageListItemBar/imageListItemBarClasses.js +0 -5
- package/ImageListItemBar/index.js +0 -6
- package/Input/Input.js +16 -73
- package/Input/index.js +0 -6
- package/Input/inputClasses.js +0 -7
- package/InputAdornment/InputAdornment.js +11 -49
- package/InputAdornment/index.js +0 -6
- package/InputAdornment/inputAdornmentClasses.js +0 -5
- package/InputBase/InputBase.js +52 -151
- package/InputBase/index.js +0 -6
- package/InputBase/inputBaseClasses.js +0 -5
- package/InputBase/utils.js +6 -7
- package/InputLabel/InputLabel.js +7 -46
- package/InputLabel/index.js +0 -6
- package/InputLabel/inputLabelClasses.js +0 -5
- package/LinearProgress/LinearProgress.js +10 -52
- package/LinearProgress/index.js +0 -6
- package/LinearProgress/linearProgressClasses.js +0 -5
- package/Link/Link.js +15 -61
- package/Link/getTextDecoration.js +0 -7
- package/Link/index.js +0 -6
- package/Link/linkClasses.js +0 -5
- package/List/List.js +9 -36
- package/List/ListContext.js +0 -6
- package/List/index.js +0 -6
- package/List/listClasses.js +0 -5
- package/ListItem/ListItem.js +38 -92
- package/ListItem/index.js +0 -6
- package/ListItem/listItemClasses.js +0 -5
- package/ListItemAvatar/ListItemAvatar.js +5 -28
- package/ListItemAvatar/index.js +0 -6
- package/ListItemAvatar/listItemAvatarClasses.js +0 -5
- package/ListItemButton/ListItemButton.js +13 -52
- package/ListItemButton/index.js +0 -6
- package/ListItemButton/listItemButtonClasses.js +0 -5
- package/ListItemIcon/ListItemIcon.js +5 -28
- package/ListItemIcon/index.js +0 -6
- package/ListItemIcon/listItemIconClasses.js +0 -5
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +5 -28
- package/ListItemSecondaryAction/index.js +0 -6
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.js +0 -5
- package/ListItemText/ListItemText.js +11 -44
- package/ListItemText/index.js +0 -6
- package/ListItemText/listItemTextClasses.js +0 -5
- package/ListSubheader/ListSubheader.js +9 -37
- package/ListSubheader/index.js +0 -6
- package/ListSubheader/listSubheaderClasses.js +0 -5
- package/Menu/Menu.js +22 -70
- package/Menu/index.js +0 -6
- package/Menu/menuClasses.js +0 -5
- package/MenuItem/MenuItem.js +13 -59
- package/MenuItem/index.js +0 -6
- package/MenuItem/menuItemClasses.js +0 -5
- package/MenuList/MenuList.js +20 -80
- package/MenuList/index.js +0 -2
- package/MobileStepper/MobileStepper.js +11 -43
- package/MobileStepper/index.js +0 -6
- package/MobileStepper/mobileStepperClasses.js +0 -5
- package/Modal/Modal.js +24 -70
- package/Modal/index.js +0 -6
- package/NativeSelect/NativeSelect.js +10 -43
- package/NativeSelect/NativeSelectInput.js +10 -41
- package/NativeSelect/index.js +0 -6
- package/NativeSelect/nativeSelectClasses.js +0 -5
- package/NoSsr/index.js +0 -2
- package/OutlinedInput/NotchedOutline.js +6 -24
- package/OutlinedInput/OutlinedInput.js +12 -68
- package/OutlinedInput/index.js +0 -6
- package/OutlinedInput/outlinedInputClasses.js +0 -7
- package/Pagination/Pagination.js +25 -73
- package/Pagination/index.js +0 -6
- package/Pagination/paginationClasses.js +0 -5
- package/PaginationItem/PaginationItem.js +18 -66
- package/PaginationItem/index.js +0 -6
- package/PaginationItem/paginationItemClasses.js +0 -5
- package/Paper/Paper.js +12 -63
- package/Paper/index.js +0 -6
- package/Paper/paperClasses.js +0 -5
- package/Popover/Popover.js +55 -126
- package/Popover/index.js +0 -6
- package/Popover/popoverClasses.js +0 -5
- package/Popper/Popper.js +16 -60
- package/Popper/index.js +0 -2
- package/Portal/index.js +0 -2
- package/README.md +4 -3
- package/Radio/Radio.js +15 -67
- package/Radio/RadioButtonIcon.js +1 -15
- package/Radio/index.js +0 -6
- package/Radio/radioClasses.js +0 -5
- package/RadioGroup/RadioGroup.js +11 -38
- package/RadioGroup/RadioGroupContext.js +0 -6
- package/RadioGroup/index.js +0 -3
- package/RadioGroup/useRadioGroup.js +0 -6
- package/Rating/Rating.js +27 -114
- package/Rating/index.js +0 -6
- package/Rating/ratingClasses.js +0 -5
- package/ScopedCssBaseline/ScopedCssBaseline.js +5 -33
- package/ScopedCssBaseline/index.js +0 -6
- package/ScopedCssBaseline/scopedCssBaselineClasses.js +0 -5
- package/Select/Select.js +24 -76
- package/Select/SelectInput.js +55 -154
- package/Select/index.js +0 -6
- package/Select/selectClasses.js +0 -5
- package/Skeleton/Skeleton.js +11 -43
- package/Skeleton/index.js +0 -6
- package/Skeleton/skeletonClasses.js +0 -5
- package/Slide/Slide.js +23 -83
- package/Slide/index.js +0 -2
- package/Slider/Slider.js +24 -107
- package/Slider/index.js +0 -4
- package/Snackbar/Snackbar.js +44 -107
- package/Snackbar/index.js +0 -6
- package/Snackbar/snackbarClasses.js +0 -5
- package/SnackbarContent/SnackbarContent.js +8 -36
- package/SnackbarContent/index.js +0 -6
- package/SnackbarContent/snackbarContentClasses.js +0 -5
- package/SpeedDial/SpeedDial.js +44 -120
- package/SpeedDial/index.js +0 -6
- package/SpeedDial/speedDialClasses.js +0 -5
- package/SpeedDialAction/SpeedDialAction.js +13 -53
- package/SpeedDialAction/index.js +0 -6
- package/SpeedDialAction/speedDialActionClasses.js +0 -5
- package/SpeedDialIcon/SpeedDialIcon.js +6 -34
- package/SpeedDialIcon/index.js +0 -6
- package/SpeedDialIcon/speedDialIconClasses.js +0 -5
- package/Stack/Stack.js +8 -42
- package/Stack/index.js +0 -2
- package/Step/Step.js +12 -46
- package/Step/StepContext.js +1 -8
- package/Step/index.js +0 -8
- package/Step/stepClasses.js +0 -5
- package/StepButton/StepButton.js +7 -36
- package/StepButton/index.js +0 -6
- package/StepButton/stepButtonClasses.js +0 -5
- package/StepConnector/StepConnector.js +4 -29
- package/StepConnector/index.js +0 -6
- package/StepConnector/stepConnectorClasses.js +0 -5
- package/StepContent/StepContent.js +8 -40
- package/StepContent/index.js +0 -6
- package/StepContent/stepContentClasses.js +0 -5
- package/StepIcon/StepIcon.js +8 -42
- package/StepIcon/index.js +0 -6
- package/StepIcon/stepIconClasses.js +0 -5
- package/StepLabel/StepLabel.js +12 -47
- package/StepLabel/index.js +0 -6
- package/StepLabel/stepLabelClasses.js +0 -5
- package/Stepper/Stepper.js +11 -42
- package/Stepper/StepperContext.js +1 -8
- package/Stepper/index.js +0 -8
- package/Stepper/stepperClasses.js +0 -5
- package/StyledEngineProvider/index.js +0 -1
- package/SvgIcon/SvgIcon.js +14 -52
- package/SvgIcon/index.js +0 -6
- package/SvgIcon/svgIconClasses.js +0 -5
- package/SwipeableDrawer/SwipeArea.js +8 -26
- package/SwipeableDrawer/SwipeableDrawer.js +61 -146
- package/SwipeableDrawer/index.js +0 -2
- package/Switch/Switch.js +10 -54
- package/Switch/index.js +0 -6
- package/Switch/switchClasses.js +0 -5
- package/Tab/Tab.js +24 -65
- package/Tab/index.js +0 -6
- package/Tab/tabClasses.js +0 -5
- package/TabScrollButton/TabScrollButton.js +5 -35
- package/TabScrollButton/index.js +0 -6
- package/TabScrollButton/tabScrollButtonClasses.js +0 -5
- package/Table/Table.js +9 -38
- package/Table/TableContext.js +0 -6
- package/Table/Tablelvl2Context.js +0 -6
- package/Table/index.js +0 -6
- package/Table/tableClasses.js +0 -5
- package/TableBody/TableBody.js +5 -29
- package/TableBody/index.js +0 -6
- package/TableBody/tableBodyClasses.js +0 -5
- package/TableCell/TableCell.js +14 -57
- package/TableCell/index.js +0 -6
- package/TableCell/tableCellClasses.js +0 -5
- package/TableContainer/TableContainer.js +5 -28
- package/TableContainer/index.js +0 -6
- package/TableContainer/tableContainerClasses.js +0 -5
- package/TableFooter/TableFooter.js +5 -29
- package/TableFooter/index.js +0 -6
- package/TableFooter/tableFooterClasses.js +0 -5
- package/TableHead/TableHead.js +5 -29
- package/TableHead/index.js +0 -6
- package/TableHead/tableHeadClasses.js +0 -5
- package/TablePagination/TablePagination.js +23 -81
- package/TablePagination/TablePaginationActions.js +11 -41
- package/TablePagination/index.js +0 -6
- package/TablePagination/tablePaginationClasses.js +0 -5
- package/TableRow/TableRow.js +7 -35
- package/TableRow/index.js +0 -6
- package/TableRow/tableRowClasses.js +0 -5
- package/TableSortLabel/TableSortLabel.js +10 -39
- package/TableSortLabel/index.js +0 -6
- package/TableSortLabel/tableSortLabelClasses.js +0 -5
- package/Tabs/ScrollbarSize.js +4 -20
- package/Tabs/Tabs.js +42 -157
- package/Tabs/index.js +0 -6
- package/Tabs/tabsClasses.js +0 -5
- package/TextField/TextField.js +39 -115
- package/TextField/index.js +0 -6
- package/TextField/textFieldClasses.js +0 -5
- package/TextareaAutosize/index.js +0 -2
- package/ToggleButton/ToggleButton.js +17 -64
- package/ToggleButton/index.js +0 -6
- package/ToggleButton/toggleButtonClasses.js +0 -5
- package/ToggleButtonGroup/ToggleButtonGroup.js +15 -61
- package/ToggleButtonGroup/index.js +0 -6
- package/ToggleButtonGroup/isValueSelected.js +0 -3
- package/ToggleButtonGroup/toggleButtonGroupClasses.js +0 -5
- package/Toolbar/Toolbar.js +8 -35
- package/Toolbar/index.js +0 -6
- package/Toolbar/toolbarClasses.js +0 -5
- package/Tooltip/Tooltip.js +50 -159
- package/Tooltip/index.js +0 -6
- package/Tooltip/tooltipClasses.js +0 -5
- package/Typography/Typography.js +15 -51
- package/Typography/index.js +0 -6
- package/Typography/typographyClasses.js +0 -5
- package/Unstable_Grid2/Grid2.js +1 -10
- package/Unstable_Grid2/grid2Classes.js +8 -9
- package/Unstable_Grid2/index.js +0 -8
- package/Unstable_TrapFocus/index.js +0 -2
- package/Zoom/Zoom.js +21 -56
- package/Zoom/index.js +0 -2
- package/className/index.js +0 -1
- package/colors/index.js +0 -21
- package/darkScrollbar/index.js +0 -1
- package/esm/Accordion/Accordion.js +13 -37
- package/esm/Accordion/AccordionContext.js +1 -3
- package/esm/AccordionActions/AccordionActions.js +5 -17
- package/esm/AccordionDetails/AccordionDetails.js +4 -14
- package/esm/AccordionSummary/AccordionSummary.js +8 -25
- package/esm/Alert/Alert.js +20 -49
- package/esm/AlertTitle/AlertTitle.js +4 -14
- package/esm/AppBar/AppBar.js +11 -27
- package/esm/Autocomplete/Autocomplete.js +61 -149
- package/esm/Avatar/Avatar.js +16 -48
- package/esm/AvatarGroup/AvatarGroup.js +13 -39
- package/esm/Backdrop/Backdrop.js +15 -35
- package/esm/Badge/Badge.js +24 -57
- package/esm/Badge/badgeClasses.js +2 -1
- package/esm/BottomNavigation/BottomNavigation.js +9 -26
- package/esm/BottomNavigationAction/BottomNavigationAction.js +9 -28
- package/esm/Box/Box.js +1 -6
- package/esm/Breadcrumbs/BreadcrumbCollapsed.js +1 -2
- package/esm/Breadcrumbs/Breadcrumbs.js +17 -43
- package/esm/Button/Button.js +22 -57
- package/esm/ButtonBase/ButtonBase.js +39 -110
- package/esm/ButtonBase/Ripple.js +1 -13
- package/esm/ButtonBase/TouchRipple.js +30 -39
- package/esm/ButtonGroup/ButtonGroup.js +18 -46
- package/esm/ButtonGroup/ButtonGroupContext.js +0 -3
- package/esm/Card/Card.js +5 -18
- package/esm/CardActionArea/CardActionArea.js +6 -17
- package/esm/CardActions/CardActions.js +5 -17
- package/esm/CardContent/CardContent.js +5 -17
- package/esm/CardHeader/CardHeader.js +12 -35
- package/esm/CardMedia/CardMedia.js +9 -26
- package/esm/Checkbox/Checkbox.js +13 -49
- package/esm/Chip/Chip.js +22 -70
- package/esm/CircularProgress/CircularProgress.js +18 -43
- package/esm/Collapse/Collapse.js +24 -66
- package/esm/Container/Container.js +2 -13
- package/esm/CssBaseline/CssBaseline.js +2 -14
- package/esm/Dialog/Dialog.js +24 -61
- package/esm/Dialog/DialogContext.js +0 -2
- package/esm/DialogActions/DialogActions.js +5 -17
- package/esm/DialogContent/DialogContent.js +5 -17
- package/esm/DialogContentText/DialogContentText.js +4 -14
- package/esm/DialogTitle/DialogTitle.js +5 -16
- package/esm/Divider/Divider.js +15 -38
- package/esm/Drawer/Drawer.js +27 -54
- package/esm/Fab/Fab.js +15 -42
- package/esm/Fade/Fade.js +21 -43
- package/esm/FilledInput/FilledInput.js +16 -60
- package/esm/FilledInput/filledInputClasses.js +0 -2
- package/esm/FormControl/FormControl.js +19 -58
- package/esm/FormControl/FormControlContext.js +1 -3
- package/esm/FormControl/formControlState.js +0 -2
- package/esm/FormControlLabel/FormControlLabel.js +12 -41
- package/esm/FormGroup/FormGroup.js +6 -19
- package/esm/FormHelperText/FormHelperText.js +7 -31
- package/esm/FormLabel/FormLabel.js +7 -28
- package/esm/GlobalStyles/GlobalStyles.js +1 -6
- package/esm/Grid/Grid.js +41 -109
- package/esm/Grid/GridContext.js +1 -3
- package/esm/Grid/gridClasses.js +8 -4
- package/esm/Grow/Grow.js +22 -50
- package/esm/Hidden/Hidden.js +15 -35
- package/esm/Hidden/HiddenCss.js +6 -33
- package/esm/Hidden/HiddenJs.js +5 -24
- package/esm/Hidden/withWidth.js +17 -29
- package/esm/Icon/Icon.js +12 -30
- package/esm/IconButton/IconButton.js +41 -59
- package/esm/ImageList/ImageList.js +13 -35
- package/esm/ImageList/ImageListContext.js +1 -3
- package/esm/ImageListItem/ImageListItem.js +11 -29
- package/esm/ImageListItemBar/ImageListItemBar.js +9 -25
- package/esm/Input/Input.js +16 -59
- package/esm/Input/inputClasses.js +0 -2
- package/esm/InputAdornment/InputAdornment.js +11 -35
- package/esm/InputBase/InputBase.js +52 -132
- package/esm/InputBase/utils.js +6 -4
- package/esm/InputLabel/InputLabel.js +7 -33
- package/esm/LinearProgress/LinearProgress.js +16 -45
- package/esm/Link/Link.js +15 -44
- package/esm/Link/getTextDecoration.js +0 -5
- package/esm/List/List.js +9 -25
- package/esm/List/ListContext.js +1 -3
- package/esm/ListItem/ListItem.js +38 -73
- package/esm/ListItemAvatar/ListItemAvatar.js +5 -17
- package/esm/ListItemButton/ListItemButton.js +13 -35
- package/esm/ListItemIcon/ListItemIcon.js +5 -17
- package/esm/ListItemSecondaryAction/ListItemSecondaryAction.js +5 -17
- package/esm/ListItemText/ListItemText.js +11 -32
- package/esm/ListSubheader/ListSubheader.js +9 -25
- package/esm/Menu/Menu.js +22 -53
- package/esm/MenuItem/MenuItem.js +13 -39
- package/esm/MenuList/MenuList.js +20 -66
- package/esm/MobileStepper/MobileStepper.js +11 -28
- package/esm/Modal/Modal.js +24 -58
- package/esm/NativeSelect/NativeSelect.js +10 -32
- package/esm/NativeSelect/NativeSelectInput.js +10 -25
- package/esm/OutlinedInput/NotchedOutline.js +6 -16
- package/esm/OutlinedInput/OutlinedInput.js +12 -54
- package/esm/OutlinedInput/outlinedInputClasses.js +0 -2
- package/esm/Pagination/Pagination.js +25 -60
- package/esm/PaginationItem/PaginationItem.js +18 -47
- package/esm/Paper/Paper.js +11 -45
- package/esm/Popover/Popover.js +54 -105
- package/esm/Popper/Popper.js +16 -46
- package/esm/Radio/Radio.js +15 -51
- package/esm/Radio/RadioButtonIcon.js +1 -6
- package/esm/RadioGroup/RadioGroup.js +11 -24
- package/esm/RadioGroup/RadioGroupContext.js +0 -3
- package/esm/Rating/Rating.js +27 -103
- package/esm/ScopedCssBaseline/ScopedCssBaseline.js +5 -21
- package/esm/Select/Select.js +24 -59
- package/esm/Select/SelectInput.js +55 -135
- package/esm/Skeleton/Skeleton.js +15 -36
- package/esm/Slide/Slide.js +26 -70
- package/esm/Slider/Slider.js +24 -91
- package/esm/Snackbar/Snackbar.js +44 -90
- package/esm/SnackbarContent/SnackbarContent.js +8 -22
- package/esm/SpeedDial/SpeedDial.js +44 -103
- package/esm/SpeedDialAction/SpeedDialAction.js +13 -39
- package/esm/SpeedDialIcon/SpeedDialIcon.js +6 -21
- package/esm/Stack/Stack.js +9 -31
- package/esm/Step/Step.js +12 -35
- package/esm/Step/StepContext.js +1 -4
- package/esm/StepButton/StepButton.js +7 -21
- package/esm/StepConnector/StepConnector.js +4 -16
- package/esm/StepContent/StepContent.js +8 -27
- package/esm/StepIcon/StepIcon.js +8 -29
- package/esm/StepLabel/StepLabel.js +12 -33
- package/esm/Stepper/Stepper.js +11 -30
- package/esm/Stepper/StepperContext.js +1 -4
- package/esm/SvgIcon/SvgIcon.js +14 -40
- package/esm/SwipeableDrawer/SwipeArea.js +8 -13
- package/esm/SwipeableDrawer/SwipeableDrawer.js +64 -128
- package/esm/Switch/Switch.js +10 -41
- package/esm/Tab/Tab.js +24 -51
- package/esm/TabScrollButton/TabScrollButton.js +5 -23
- package/esm/Table/Table.js +9 -26
- package/esm/Table/TableContext.js +1 -3
- package/esm/Table/Tablelvl2Context.js +1 -3
- package/esm/TableBody/TableBody.js +5 -17
- package/esm/TableCell/TableCell.js +14 -43
- package/esm/TableContainer/TableContainer.js +5 -17
- package/esm/TableFooter/TableFooter.js +5 -17
- package/esm/TableHead/TableHead.js +5 -17
- package/esm/TablePagination/TablePagination.js +23 -61
- package/esm/TablePagination/TablePaginationActions.js +12 -28
- package/esm/TableRow/TableRow.js +7 -23
- package/esm/TableSortLabel/TableSortLabel.js +10 -25
- package/esm/Tabs/ScrollbarSize.js +4 -8
- package/esm/Tabs/Tabs.js +42 -138
- package/esm/TextField/TextField.js +39 -97
- package/esm/ToggleButton/ToggleButton.js +17 -50
- package/esm/ToggleButtonGroup/ToggleButtonGroup.js +15 -47
- package/esm/ToggleButtonGroup/isValueSelected.js +0 -2
- package/esm/Toolbar/Toolbar.js +8 -24
- package/esm/Tooltip/Tooltip.js +50 -137
- package/esm/Typography/Typography.js +15 -38
- package/esm/Unstable_Grid2/Grid2.js +1 -5
- package/esm/Unstable_Grid2/grid2Classes.js +8 -4
- package/esm/Zoom/Zoom.js +21 -43
- package/esm/index.js +2 -1
- package/esm/internal/SwitchBase.js +27 -63
- package/esm/internal/animate.js +0 -10
- package/esm/internal/svg-icons/Add.js +1 -1
- package/esm/internal/svg-icons/ArrowDownward.js +1 -1
- package/esm/internal/svg-icons/ArrowDropDown.js +1 -1
- package/esm/internal/svg-icons/Cancel.js +1 -1
- package/esm/internal/svg-icons/CheckBox.js +1 -1
- package/esm/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/esm/internal/svg-icons/CheckCircle.js +1 -1
- package/esm/internal/svg-icons/Close.js +1 -1
- package/esm/internal/svg-icons/ErrorOutline.js +1 -1
- package/esm/internal/svg-icons/FirstPage.js +1 -1
- package/esm/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/esm/internal/svg-icons/InfoOutlined.js +1 -1
- package/esm/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/esm/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/esm/internal/svg-icons/LastPage.js +1 -1
- package/esm/internal/svg-icons/MoreHoriz.js +1 -1
- package/esm/internal/svg-icons/NavigateBefore.js +1 -1
- package/esm/internal/svg-icons/NavigateNext.js +1 -1
- package/esm/internal/svg-icons/Person.js +1 -1
- package/esm/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/esm/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/esm/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/esm/internal/svg-icons/Star.js +1 -1
- package/esm/internal/svg-icons/StarBorder.js +1 -1
- package/esm/internal/svg-icons/SuccessOutlined.js +1 -1
- package/esm/internal/svg-icons/Warning.js +1 -1
- package/esm/locale/index.js +290 -510
- package/esm/styles/CssVarsProvider.js +0 -4
- package/esm/styles/adaptV4Theme.js +21 -22
- package/esm/styles/createPalette.js +8 -36
- package/esm/styles/createStyles.js +2 -2
- package/esm/styles/createTheme.js +10 -21
- package/esm/styles/createTransitions.js +12 -25
- package/esm/styles/createTypography.js +18 -27
- package/esm/styles/cssUtils.js +18 -18
- package/esm/styles/excludeVariablesFromRoot.js +0 -1
- package/esm/styles/experimental_extendTheme.js +23 -38
- package/esm/styles/getOverlayAlpha.js +11 -0
- package/esm/styles/index.js +8 -3
- package/esm/styles/responsiveFontSizes.js +3 -11
- package/esm/styles/shadows.js +2 -3
- package/esm/styles/useTheme.js +0 -2
- package/esm/transitions/utils.js +0 -1
- package/esm/useMediaQuery/useMediaQuery.js +12 -23
- package/esm/useMediaQuery/useMediaQueryTheme.js +2 -1
- package/esm/usePagination/usePagination.js +41 -38
- package/esm/useScrollTrigger/useScrollTrigger.js +6 -13
- package/esm/useTouchRipple/useTouchRipple.js +0 -9
- package/esm/utils/createSvgIcon.js +1 -3
- package/esm/utils/index.js +2 -2
- package/esm/utils/shouldSpreadAdditionalProps.js +0 -2
- package/generateUtilityClass/index.js +0 -1
- package/generateUtilityClasses/index.js +0 -1
- package/index.js +1 -282
- package/internal/SwitchBase.js +27 -78
- package/internal/animate.js +0 -11
- package/internal/svg-icons/Add.js +0 -7
- package/internal/svg-icons/ArrowDownward.js +0 -8
- package/internal/svg-icons/ArrowDropDown.js +0 -8
- package/internal/svg-icons/Cancel.js +0 -8
- package/internal/svg-icons/CheckBox.js +0 -8
- package/internal/svg-icons/CheckBoxOutlineBlank.js +0 -8
- package/internal/svg-icons/CheckCircle.js +0 -8
- package/internal/svg-icons/Close.js +0 -8
- package/internal/svg-icons/ErrorOutline.js +0 -8
- package/internal/svg-icons/FirstPage.js +0 -8
- package/internal/svg-icons/IndeterminateCheckBox.js +0 -8
- package/internal/svg-icons/InfoOutlined.js +0 -8
- package/internal/svg-icons/KeyboardArrowLeft.js +0 -8
- package/internal/svg-icons/KeyboardArrowRight.js +0 -8
- package/internal/svg-icons/LastPage.js +0 -8
- package/internal/svg-icons/MoreHoriz.js +0 -8
- package/internal/svg-icons/NavigateBefore.js +0 -8
- package/internal/svg-icons/NavigateNext.js +0 -8
- package/internal/svg-icons/Person.js +0 -8
- package/internal/svg-icons/RadioButtonChecked.js +0 -8
- package/internal/svg-icons/RadioButtonUnchecked.js +0 -8
- package/internal/svg-icons/ReportProblemOutlined.js +0 -8
- package/internal/svg-icons/Star.js +0 -8
- package/internal/svg-icons/StarBorder.js +0 -8
- package/internal/svg-icons/SuccessOutlined.js +0 -8
- package/internal/svg-icons/Warning.js +0 -8
- package/internal/switchBaseClasses.js +0 -5
- package/legacy/Accordion/Accordion.js +32 -60
- package/legacy/Accordion/AccordionContext.js +1 -3
- package/legacy/AccordionActions/AccordionActions.js +5 -17
- package/legacy/AccordionDetails/AccordionDetails.js +2 -12
- package/legacy/AccordionSummary/AccordionSummary.js +16 -34
- package/legacy/Alert/Alert.js +31 -60
- package/legacy/AlertTitle/AlertTitle.js +2 -12
- package/legacy/AppBar/AppBar.js +15 -31
- package/legacy/Autocomplete/Autocomplete.js +148 -239
- package/legacy/Avatar/Avatar.js +24 -58
- package/legacy/AvatarGroup/AvatarGroup.js +17 -44
- package/legacy/Backdrop/Backdrop.js +20 -40
- package/legacy/Badge/Badge.js +46 -79
- package/legacy/Badge/badgeClasses.js +2 -1
- package/legacy/BottomNavigation/BottomNavigation.js +9 -26
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +13 -32
- package/legacy/Box/Box.js +1 -6
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -2
- package/legacy/Breadcrumbs/Breadcrumbs.js +23 -49
- package/legacy/Button/Button.js +34 -70
- package/legacy/ButtonBase/ButtonBase.js +56 -134
- package/legacy/ButtonBase/Ripple.js +12 -26
- package/legacy/ButtonBase/TouchRipple.js +39 -49
- package/legacy/ButtonGroup/ButtonGroup.js +33 -61
- package/legacy/ButtonGroup/ButtonGroupContext.js +0 -3
- package/legacy/Card/Card.js +4 -17
- package/legacy/CardActionArea/CardActionArea.js +4 -16
- package/legacy/CardActions/CardActions.js +5 -17
- package/legacy/CardContent/CardContent.js +4 -16
- package/legacy/CardHeader/CardHeader.js +12 -36
- package/legacy/CardMedia/CardMedia.js +11 -28
- package/legacy/Checkbox/Checkbox.js +20 -57
- package/legacy/Chip/Chip.js +39 -90
- package/legacy/CircularProgress/CircularProgress.js +23 -48
- package/legacy/Collapse/Collapse.js +43 -86
- package/legacy/Container/Container.js +2 -13
- package/legacy/CssBaseline/CssBaseline.js +6 -22
- package/legacy/Dialog/Dialog.js +36 -73
- package/legacy/Dialog/DialogContext.js +0 -2
- package/legacy/DialogActions/DialogActions.js +5 -17
- package/legacy/DialogContent/DialogContent.js +6 -18
- package/legacy/DialogContentText/DialogContentText.js +3 -13
- package/legacy/DialogTitle/DialogTitle.js +5 -18
- package/legacy/Divider/Divider.js +32 -55
- package/legacy/Drawer/Drawer.js +30 -59
- package/legacy/Fab/Fab.js +24 -51
- package/legacy/Fade/Fade.js +21 -43
- package/legacy/FilledInput/FilledInput.js +21 -68
- package/legacy/FilledInput/filledInputClasses.js +0 -2
- package/legacy/FormControl/FormControl.js +66 -108
- package/legacy/FormControl/FormControlContext.js +1 -3
- package/legacy/FormControl/formControlState.js +2 -4
- package/legacy/FormControlLabel/FormControlLabel.js +22 -51
- package/legacy/FormGroup/FormGroup.js +7 -20
- package/legacy/FormHelperText/FormHelperText.js +21 -46
- package/legacy/FormLabel/FormLabel.js +19 -41
- package/legacy/GlobalStyles/GlobalStyles.js +1 -6
- package/legacy/Grid/Grid.js +68 -139
- package/legacy/Grid/GridContext.js +1 -3
- package/legacy/Grow/Grow.js +40 -71
- package/legacy/Hidden/Hidden.js +24 -44
- package/legacy/Hidden/HiddenCss.js +8 -36
- package/legacy/Hidden/HiddenJs.js +7 -26
- package/legacy/Hidden/withWidth.js +21 -36
- package/legacy/Icon/Icon.js +17 -35
- package/legacy/IconButton/IconButton.js +29 -49
- package/legacy/ImageList/ImageList.js +17 -39
- package/legacy/ImageList/ImageListContext.js +1 -3
- package/legacy/ImageListItem/ImageListItem.js +17 -36
- package/legacy/ImageListItemBar/ImageListItemBar.js +14 -30
- package/legacy/Input/Input.js +19 -66
- package/legacy/Input/inputClasses.js +0 -2
- package/legacy/InputAdornment/InputAdornment.js +18 -42
- package/legacy/InputBase/InputBase.js +79 -167
- package/legacy/InputBase/utils.js +6 -4
- package/legacy/InputLabel/InputLabel.js +15 -41
- package/legacy/LinearProgress/LinearProgress.js +16 -45
- package/legacy/Link/Link.js +26 -58
- package/legacy/Link/getTextDecoration.js +1 -6
- package/legacy/List/List.js +13 -29
- package/legacy/List/ListContext.js +1 -3
- package/legacy/ListItem/ListItem.js +57 -93
- package/legacy/ListItemAvatar/ListItemAvatar.js +4 -16
- package/legacy/ListItemButton/ListItemButton.js +25 -48
- package/legacy/ListItemIcon/ListItemIcon.js +5 -17
- package/legacy/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -16
- package/legacy/ListItemText/ListItemText.js +16 -38
- package/legacy/ListSubheader/ListSubheader.js +17 -33
- package/legacy/Menu/Menu.js +23 -54
- package/legacy/MenuItem/MenuItem.js +23 -50
- package/legacy/MenuList/MenuList.js +21 -67
- package/legacy/MobileStepper/MobileStepper.js +16 -33
- package/legacy/Modal/Modal.js +36 -71
- package/legacy/NativeSelect/NativeSelect.js +12 -34
- package/legacy/NativeSelect/NativeSelectInput.js +15 -31
- package/legacy/OutlinedInput/NotchedOutline.js +7 -17
- package/legacy/OutlinedInput/OutlinedInput.js +18 -61
- package/legacy/OutlinedInput/outlinedInputClasses.js +0 -2
- package/legacy/Pagination/Pagination.js +46 -81
- package/legacy/PaginationItem/PaginationItem.js +36 -66
- package/legacy/Paper/Paper.js +18 -52
- package/legacy/Popover/Popover.js +59 -115
- package/legacy/Popper/Popper.js +14 -44
- package/legacy/Radio/Radio.js +19 -55
- package/legacy/Radio/RadioButtonIcon.js +6 -11
- package/legacy/RadioGroup/RadioGroup.js +14 -27
- package/legacy/RadioGroup/RadioGroupContext.js +0 -3
- package/legacy/Rating/Rating.js +89 -175
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +8 -25
- package/legacy/Select/Select.js +30 -65
- package/legacy/Select/SelectInput.js +78 -165
- package/legacy/Skeleton/Skeleton.js +19 -40
- package/legacy/Slide/Slide.js +28 -72
- package/legacy/Slider/Slider.js +37 -107
- package/legacy/Snackbar/Snackbar.js +42 -90
- package/legacy/SnackbarContent/SnackbarContent.js +7 -21
- package/legacy/SpeedDial/SpeedDial.js +51 -111
- package/legacy/SpeedDialAction/SpeedDialAction.js +21 -48
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +8 -24
- package/legacy/Stack/Stack.js +11 -34
- package/legacy/Step/Step.js +25 -49
- package/legacy/Step/StepContext.js +1 -4
- package/legacy/StepButton/StepButton.js +8 -23
- package/legacy/StepConnector/StepConnector.js +14 -27
- package/legacy/StepContent/StepContent.js +14 -34
- package/legacy/StepIcon/StepIcon.js +12 -34
- package/legacy/StepLabel/StepLabel.js +25 -50
- package/legacy/Stepper/Stepper.js +17 -36
- package/legacy/Stepper/StepperContext.js +1 -4
- package/legacy/SvgIcon/SvgIcon.js +20 -46
- package/legacy/SwipeableDrawer/SwipeArea.js +8 -13
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +77 -142
- package/legacy/Switch/Switch.js +17 -51
- package/legacy/Tab/Tab.js +30 -58
- package/legacy/TabScrollButton/TabScrollButton.js +7 -24
- package/legacy/Table/Table.js +13 -30
- package/legacy/Table/TableContext.js +1 -3
- package/legacy/Table/Tablelvl2Context.js +1 -3
- package/legacy/TableBody/TableBody.js +4 -16
- package/legacy/TableCell/TableCell.js +19 -48
- package/legacy/TableContainer/TableContainer.js +4 -16
- package/legacy/TableFooter/TableFooter.js +4 -16
- package/legacy/TableHead/TableHead.js +4 -16
- package/legacy/TablePagination/TablePagination.js +34 -74
- package/legacy/TablePagination/TablePaginationActions.js +10 -26
- package/legacy/TableRow/TableRow.js +12 -29
- package/legacy/TableSortLabel/TableSortLabel.js +15 -30
- package/legacy/Tabs/ScrollbarSize.js +2 -6
- package/legacy/Tabs/Tabs.js +85 -189
- package/legacy/TextField/TextField.js +46 -104
- package/legacy/ToggleButton/ToggleButton.js +26 -60
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +23 -55
- package/legacy/ToggleButtonGroup/isValueSelected.js +0 -2
- package/legacy/Toolbar/Toolbar.js +13 -29
- package/legacy/Tooltip/Tooltip.js +89 -188
- package/legacy/Typography/Typography.js +25 -48
- package/legacy/Unstable_Grid2/Grid2.js +1 -5
- package/legacy/Zoom/Zoom.js +21 -43
- package/legacy/index.js +3 -2
- package/legacy/internal/SwitchBase.js +38 -75
- package/legacy/internal/animate.js +3 -12
- package/legacy/internal/svg-icons/Add.js +1 -1
- package/legacy/internal/svg-icons/ArrowDownward.js +1 -1
- package/legacy/internal/svg-icons/ArrowDropDown.js +1 -1
- package/legacy/internal/svg-icons/Cancel.js +1 -1
- package/legacy/internal/svg-icons/CheckBox.js +1 -1
- package/legacy/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/legacy/internal/svg-icons/CheckCircle.js +1 -1
- package/legacy/internal/svg-icons/Close.js +1 -1
- package/legacy/internal/svg-icons/ErrorOutline.js +1 -1
- package/legacy/internal/svg-icons/FirstPage.js +1 -1
- package/legacy/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/legacy/internal/svg-icons/InfoOutlined.js +1 -1
- package/legacy/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/legacy/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/legacy/internal/svg-icons/LastPage.js +1 -1
- package/legacy/internal/svg-icons/MoreHoriz.js +1 -1
- package/legacy/internal/svg-icons/NavigateBefore.js +1 -1
- package/legacy/internal/svg-icons/NavigateNext.js +1 -1
- package/legacy/internal/svg-icons/Person.js +1 -1
- package/legacy/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/legacy/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/legacy/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/legacy/internal/svg-icons/Star.js +1 -1
- package/legacy/internal/svg-icons/StarBorder.js +1 -1
- package/legacy/internal/svg-icons/SuccessOutlined.js +1 -1
- package/legacy/internal/svg-icons/Warning.js +1 -1
- package/legacy/locale/index.js +377 -594
- package/legacy/styles/CssVarsProvider.js +20 -26
- package/legacy/styles/adaptV4Theme.js +22 -23
- package/legacy/styles/createMixins.js +0 -1
- package/legacy/styles/createMuiStrictModeTheme.js +0 -1
- package/legacy/styles/createPalette.js +16 -50
- package/legacy/styles/createStyles.js +2 -2
- package/legacy/styles/createTheme.js +15 -29
- package/legacy/styles/createTransitions.js +13 -27
- package/legacy/styles/createTypography.js +18 -27
- package/legacy/styles/cssUtils.js +29 -31
- package/legacy/styles/excludeVariablesFromRoot.js +0 -2
- package/legacy/styles/experimental_extendTheme.js +25 -46
- package/legacy/styles/getOverlayAlpha.js +11 -0
- package/legacy/styles/index.js +8 -3
- package/legacy/styles/responsiveFontSizes.js +10 -18
- package/legacy/styles/shadows.js +2 -3
- package/legacy/styles/useTheme.js +0 -2
- package/legacy/styles/useThemeProps.js +1 -1
- package/legacy/transitions/utils.js +3 -4
- package/legacy/useMediaQuery/useMediaQuery.js +51 -68
- package/legacy/useMediaQuery/useMediaQueryTheme.js +2 -1
- package/legacy/usePagination/usePagination.js +51 -52
- package/legacy/useScrollTrigger/useScrollTrigger.js +14 -24
- package/legacy/useTouchRipple/useTouchRipple.js +7 -18
- package/legacy/utils/createSvgIcon.js +1 -3
- package/legacy/utils/index.js +2 -2
- package/legacy/utils/shouldSpreadAdditionalProps.js +0 -2
- package/locale/index.d.ts +1 -0
- package/locale/index.js +288 -511
- package/modern/Accordion/Accordion.js +13 -37
- package/modern/Accordion/AccordionContext.js +1 -3
- package/modern/AccordionActions/AccordionActions.js +5 -17
- package/modern/AccordionDetails/AccordionDetails.js +4 -14
- package/modern/AccordionSummary/AccordionSummary.js +8 -25
- package/modern/Alert/Alert.js +20 -48
- package/modern/AlertTitle/AlertTitle.js +4 -14
- package/modern/AppBar/AppBar.js +11 -27
- package/modern/Autocomplete/Autocomplete.js +58 -144
- package/modern/Avatar/Avatar.js +16 -48
- package/modern/AvatarGroup/AvatarGroup.js +13 -38
- package/modern/Backdrop/Backdrop.js +15 -34
- package/modern/Badge/Badge.js +24 -56
- package/modern/Badge/badgeClasses.js +2 -1
- package/modern/BottomNavigation/BottomNavigation.js +9 -26
- package/modern/BottomNavigationAction/BottomNavigationAction.js +9 -28
- package/modern/Box/Box.js +1 -6
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -2
- package/modern/Breadcrumbs/Breadcrumbs.js +17 -43
- package/modern/Button/Button.js +22 -56
- package/modern/ButtonBase/ButtonBase.js +39 -110
- package/modern/ButtonBase/Ripple.js +1 -13
- package/modern/ButtonBase/TouchRipple.js +26 -33
- package/modern/ButtonGroup/ButtonGroup.js +18 -46
- package/modern/ButtonGroup/ButtonGroupContext.js +0 -3
- package/modern/Card/Card.js +5 -18
- package/modern/CardActionArea/CardActionArea.js +6 -17
- package/modern/CardActions/CardActions.js +5 -17
- package/modern/CardContent/CardContent.js +5 -17
- package/modern/CardHeader/CardHeader.js +12 -35
- package/modern/CardMedia/CardMedia.js +9 -26
- package/modern/Checkbox/Checkbox.js +13 -48
- package/modern/Chip/Chip.js +22 -70
- package/modern/CircularProgress/CircularProgress.js +14 -37
- package/modern/Collapse/Collapse.js +24 -66
- package/modern/Container/Container.js +2 -13
- package/modern/CssBaseline/CssBaseline.js +2 -12
- package/modern/Dialog/Dialog.js +24 -61
- package/modern/Dialog/DialogContext.js +0 -2
- package/modern/DialogActions/DialogActions.js +5 -17
- package/modern/DialogContent/DialogContent.js +5 -17
- package/modern/DialogContentText/DialogContentText.js +4 -14
- package/modern/DialogTitle/DialogTitle.js +5 -16
- package/modern/Divider/Divider.js +15 -38
- package/modern/Drawer/Drawer.js +27 -54
- package/modern/Fab/Fab.js +15 -41
- package/modern/Fade/Fade.js +21 -43
- package/modern/FilledInput/FilledInput.js +16 -58
- package/modern/FilledInput/filledInputClasses.js +0 -2
- package/modern/FormControl/FormControl.js +19 -58
- package/modern/FormControl/FormControlContext.js +1 -3
- package/modern/FormControl/formControlState.js +0 -2
- package/modern/FormControlLabel/FormControlLabel.js +12 -40
- package/modern/FormGroup/FormGroup.js +6 -19
- package/modern/FormHelperText/FormHelperText.js +7 -31
- package/modern/FormLabel/FormLabel.js +7 -28
- package/modern/GlobalStyles/GlobalStyles.js +1 -6
- package/modern/Grid/Grid.js +41 -107
- package/modern/Grid/GridContext.js +1 -3
- package/modern/Grid/gridClasses.js +8 -4
- package/modern/Grow/Grow.js +22 -50
- package/modern/Hidden/Hidden.js +15 -35
- package/modern/Hidden/HiddenCss.js +6 -33
- package/modern/Hidden/HiddenJs.js +5 -24
- package/modern/Hidden/withWidth.js +17 -29
- package/modern/Icon/Icon.js +12 -30
- package/modern/IconButton/IconButton.js +40 -59
- package/modern/ImageList/ImageList.js +13 -35
- package/modern/ImageList/ImageListContext.js +1 -3
- package/modern/ImageListItem/ImageListItem.js +11 -29
- package/modern/ImageListItemBar/ImageListItemBar.js +9 -25
- package/modern/Input/Input.js +16 -58
- package/modern/Input/inputClasses.js +0 -2
- package/modern/InputAdornment/InputAdornment.js +11 -35
- package/modern/InputBase/InputBase.js +52 -131
- package/modern/InputBase/utils.js +6 -4
- package/modern/InputLabel/InputLabel.js +7 -33
- package/modern/LinearProgress/LinearProgress.js +10 -37
- package/modern/Link/Link.js +15 -44
- package/modern/Link/getTextDecoration.js +0 -5
- package/modern/List/List.js +9 -25
- package/modern/List/ListContext.js +1 -3
- package/modern/ListItem/ListItem.js +38 -73
- package/modern/ListItemAvatar/ListItemAvatar.js +5 -17
- package/modern/ListItemButton/ListItemButton.js +13 -35
- package/modern/ListItemIcon/ListItemIcon.js +5 -17
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +5 -17
- package/modern/ListItemText/ListItemText.js +11 -32
- package/modern/ListSubheader/ListSubheader.js +9 -25
- package/modern/Menu/Menu.js +22 -53
- package/modern/MenuItem/MenuItem.js +13 -39
- package/modern/MenuList/MenuList.js +20 -66
- package/modern/MobileStepper/MobileStepper.js +11 -28
- package/modern/Modal/Modal.js +24 -57
- package/modern/NativeSelect/NativeSelect.js +10 -32
- package/modern/NativeSelect/NativeSelectInput.js +10 -25
- package/modern/OutlinedInput/NotchedOutline.js +6 -16
- package/modern/OutlinedInput/OutlinedInput.js +12 -54
- package/modern/OutlinedInput/outlinedInputClasses.js +0 -2
- package/modern/Pagination/Pagination.js +25 -60
- package/modern/PaginationItem/PaginationItem.js +18 -47
- package/modern/Paper/Paper.js +11 -44
- package/modern/Popover/Popover.js +54 -105
- package/modern/Popper/Popper.js +16 -45
- package/modern/Radio/Radio.js +15 -50
- package/modern/Radio/RadioButtonIcon.js +1 -6
- package/modern/RadioGroup/RadioGroup.js +11 -24
- package/modern/RadioGroup/RadioGroupContext.js +0 -3
- package/modern/Rating/Rating.js +27 -103
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +5 -20
- package/modern/Select/Select.js +24 -59
- package/modern/Select/SelectInput.js +55 -135
- package/modern/Skeleton/Skeleton.js +11 -30
- package/modern/Slide/Slide.js +26 -70
- package/modern/Slider/Slider.js +24 -90
- package/modern/Snackbar/Snackbar.js +44 -90
- package/modern/SnackbarContent/SnackbarContent.js +8 -22
- package/modern/SpeedDial/SpeedDial.js +44 -103
- package/modern/SpeedDialAction/SpeedDialAction.js +13 -39
- package/modern/SpeedDialIcon/SpeedDialIcon.js +6 -21
- package/modern/Stack/Stack.js +9 -31
- package/modern/Step/Step.js +12 -35
- package/modern/Step/StepContext.js +1 -4
- package/modern/StepButton/StepButton.js +7 -21
- package/modern/StepConnector/StepConnector.js +4 -16
- package/modern/StepContent/StepContent.js +8 -27
- package/modern/StepIcon/StepIcon.js +8 -29
- package/modern/StepLabel/StepLabel.js +12 -32
- package/modern/Stepper/Stepper.js +11 -30
- package/modern/Stepper/StepperContext.js +1 -4
- package/modern/SvgIcon/SvgIcon.js +14 -39
- package/modern/SwipeableDrawer/SwipeArea.js +8 -13
- package/modern/SwipeableDrawer/SwipeableDrawer.js +64 -128
- package/modern/Switch/Switch.js +10 -41
- package/modern/Tab/Tab.js +24 -51
- package/modern/TabScrollButton/TabScrollButton.js +5 -23
- package/modern/Table/Table.js +9 -26
- package/modern/Table/TableContext.js +1 -3
- package/modern/Table/Tablelvl2Context.js +1 -3
- package/modern/TableBody/TableBody.js +5 -17
- package/modern/TableCell/TableCell.js +14 -43
- package/modern/TableContainer/TableContainer.js +5 -17
- package/modern/TableFooter/TableFooter.js +5 -17
- package/modern/TableHead/TableHead.js +5 -17
- package/modern/TablePagination/TablePagination.js +23 -61
- package/modern/TablePagination/TablePaginationActions.js +12 -28
- package/modern/TableRow/TableRow.js +7 -23
- package/modern/TableSortLabel/TableSortLabel.js +10 -25
- package/modern/Tabs/ScrollbarSize.js +4 -8
- package/modern/Tabs/Tabs.js +42 -138
- package/modern/TextField/TextField.js +39 -97
- package/modern/ToggleButton/ToggleButton.js +17 -50
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +15 -47
- package/modern/ToggleButtonGroup/isValueSelected.js +0 -2
- package/modern/Toolbar/Toolbar.js +8 -24
- package/modern/Tooltip/Tooltip.js +50 -135
- package/modern/Typography/Typography.js +15 -38
- package/modern/Unstable_Grid2/Grid2.js +1 -5
- package/modern/Unstable_Grid2/grid2Classes.js +8 -4
- package/modern/Zoom/Zoom.js +21 -43
- package/modern/index.js +3 -2
- package/modern/internal/SwitchBase.js +27 -63
- package/modern/internal/animate.js +0 -10
- package/modern/internal/svg-icons/Add.js +1 -1
- package/modern/internal/svg-icons/ArrowDownward.js +1 -1
- package/modern/internal/svg-icons/ArrowDropDown.js +1 -1
- package/modern/internal/svg-icons/Cancel.js +1 -1
- package/modern/internal/svg-icons/CheckBox.js +1 -1
- package/modern/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/modern/internal/svg-icons/CheckCircle.js +1 -1
- package/modern/internal/svg-icons/Close.js +1 -1
- package/modern/internal/svg-icons/ErrorOutline.js +1 -1
- package/modern/internal/svg-icons/FirstPage.js +1 -1
- package/modern/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/modern/internal/svg-icons/InfoOutlined.js +1 -1
- package/modern/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/modern/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/modern/internal/svg-icons/LastPage.js +1 -1
- package/modern/internal/svg-icons/MoreHoriz.js +1 -1
- package/modern/internal/svg-icons/NavigateBefore.js +1 -1
- package/modern/internal/svg-icons/NavigateNext.js +1 -1
- package/modern/internal/svg-icons/Person.js +1 -1
- package/modern/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/modern/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/modern/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/modern/internal/svg-icons/Star.js +1 -1
- package/modern/internal/svg-icons/StarBorder.js +1 -1
- package/modern/internal/svg-icons/SuccessOutlined.js +1 -1
- package/modern/internal/svg-icons/Warning.js +1 -1
- package/modern/locale/index.js +290 -510
- package/modern/styles/CssVarsProvider.js +0 -3
- package/modern/styles/adaptV4Theme.js +21 -22
- package/modern/styles/createPalette.js +8 -36
- package/modern/styles/createStyles.js +2 -2
- package/modern/styles/createTheme.js +10 -21
- package/modern/styles/createTransitions.js +12 -25
- package/modern/styles/createTypography.js +18 -27
- package/modern/styles/cssUtils.js +18 -18
- package/modern/styles/excludeVariablesFromRoot.js +0 -1
- package/modern/styles/experimental_extendTheme.js +23 -37
- package/modern/styles/getOverlayAlpha.js +11 -0
- package/modern/styles/index.js +8 -3
- package/modern/styles/responsiveFontSizes.js +3 -11
- package/modern/styles/shadows.js +2 -3
- package/modern/styles/useTheme.js +0 -2
- package/modern/useMediaQuery/useMediaQuery.js +12 -23
- package/modern/useMediaQuery/useMediaQueryTheme.js +2 -1
- package/modern/usePagination/usePagination.js +41 -38
- package/modern/useScrollTrigger/useScrollTrigger.js +6 -13
- package/modern/useTouchRipple/useTouchRipple.js +0 -5
- package/modern/utils/createSvgIcon.js +1 -3
- package/modern/utils/index.js +2 -2
- package/modern/utils/shouldSpreadAdditionalProps.js +0 -2
- package/package.json +7 -7
- package/styles/CssVarsProvider.js +0 -9
- package/styles/ThemeProvider.js +0 -1
- package/styles/adaptV4Theme.js +21 -24
- package/styles/createMixins.js +0 -3
- package/styles/createMuiStrictModeTheme.js +0 -4
- package/styles/createPalette.js +8 -49
- package/styles/createStyles.js +2 -2
- package/styles/createTheme.js +10 -36
- package/styles/createTransitions.js +12 -28
- package/styles/createTypography.js +18 -32
- package/styles/cssUtils.js +18 -25
- package/styles/defaultTheme.js +0 -3
- package/styles/excludeVariablesFromRoot.js +0 -2
- package/styles/experimental_extendTheme.d.ts +18 -0
- package/styles/experimental_extendTheme.js +24 -46
- package/styles/getOverlayAlpha.d.ts +2 -0
- package/styles/getOverlayAlpha.js +18 -0
- package/styles/index.d.ts +6 -0
- package/styles/index.js +25 -22
- package/styles/makeStyles.js +0 -2
- package/styles/responsiveFontSizes.js +3 -14
- package/styles/shadows.js +2 -3
- package/styles/styled.js +0 -5
- package/styles/useTheme.js +0 -9
- package/styles/useThemeProps.js +0 -4
- package/styles/withStyles.js +0 -2
- package/styles/withTheme.js +0 -2
- package/themeCssVarsAugmentation/index.d.ts +2 -0
- package/transitions/index.js +0 -2
- package/transitions/utils.js +0 -4
- package/umd/material-ui.development.js +3556 -8113
- package/umd/material-ui.production.min.js +20 -20
- package/useAutocomplete/index.js +0 -3
- package/useAutocomplete/useAutocomplete.js +0 -2
- package/useMediaQuery/index.js +0 -2
- package/useMediaQuery/useMediaQuery.js +11 -30
- package/useMediaQuery/useMediaQueryTheme.js +0 -3
- package/usePagination/index.js +0 -2
- package/usePagination/usePagination.js +41 -43
- package/useScrollTrigger/index.js +0 -2
- package/useScrollTrigger/useScrollTrigger.js +6 -20
- package/useTouchRipple/index.js +0 -2
- package/useTouchRipple/useTouchRipple.js +0 -13
- package/utils/capitalize.js +0 -2
- package/utils/createChainedFunction.js +0 -2
- package/utils/createSvgIcon.js +0 -10
- package/utils/debounce.js +0 -2
- package/utils/deprecatedPropType.js +0 -2
- package/utils/getScrollbarSize.js +0 -2
- package/utils/index.js +0 -21
- package/utils/isMuiElement.js +0 -2
- package/utils/ownerDocument.js +0 -2
- package/utils/ownerWindow.js +0 -2
- package/utils/requirePropFactory.js +0 -2
- package/utils/scrollLeft.js +0 -1
- package/utils/setRef.js +0 -2
- package/utils/shouldSpreadAdditionalProps.js +0 -3
- package/utils/unsupportedProp.js +0 -2
- package/utils/useControlled.js +0 -2
- package/utils/useEnhancedEffect.js +0 -2
- package/utils/useEventCallback.js +0 -2
- package/utils/useForkRef.js +0 -2
- package/utils/useId.js +0 -2
- package/utils/useIsFocusVisible.js +0 -2
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["colorSchemes", "cssVarPrefix"],
|
|
4
|
-
|
|
4
|
+
_excluded2 = ["palette"];
|
|
5
5
|
import { deepmerge } from '@mui/utils';
|
|
6
6
|
import { colorChannel, alpha, darken, lighten, emphasize, unstable_createGetCssVar as systemCreateGetCssVar } from '@mui/system';
|
|
7
7
|
import createThemeWithoutVars from './createTheme';
|
|
8
|
-
import
|
|
8
|
+
import getOverlayAlpha from './getOverlayAlpha';
|
|
9
9
|
const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
10
10
|
if (index === 0) {
|
|
11
11
|
return undefined;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
const overlay = getOverlayAlpha(index);
|
|
15
14
|
return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;
|
|
16
15
|
});
|
|
17
|
-
|
|
18
16
|
function assignNode(obj, keys) {
|
|
19
17
|
keys.forEach(k => {
|
|
20
18
|
if (!obj[k]) {
|
|
@@ -22,31 +20,25 @@ function assignNode(obj, keys) {
|
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
|
-
|
|
26
23
|
function setColor(obj, key, defaultValue) {
|
|
27
24
|
obj[key] = obj[key] || defaultValue;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
export const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);
|
|
31
27
|
export default function extendTheme(options = {}, ...args) {
|
|
32
28
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
33
|
-
|
|
34
29
|
const {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
colorSchemes: colorSchemesInput = {},
|
|
31
|
+
cssVarPrefix = 'mui'
|
|
32
|
+
} = options,
|
|
33
|
+
input = _objectWithoutPropertiesLoose(options, _excluded);
|
|
40
34
|
const getCssVar = createGetCssVar(cssVarPrefix);
|
|
41
|
-
|
|
42
35
|
const _createThemeWithoutVa = createThemeWithoutVars(_extends({}, input, colorSchemesInput.light && {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
palette: (_colorSchemesInput$li = colorSchemesInput.light) == null ? void 0 : _colorSchemesInput$li.palette
|
|
37
|
+
})),
|
|
38
|
+
{
|
|
39
|
+
palette: lightPalette
|
|
40
|
+
} = _createThemeWithoutVa,
|
|
41
|
+
muiTheme = _objectWithoutPropertiesLoose(_createThemeWithoutVa, _excluded2);
|
|
50
42
|
const {
|
|
51
43
|
palette: darkPalette
|
|
52
44
|
} = createThemeWithoutVars({
|
|
@@ -54,7 +46,6 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
54
46
|
mode: 'dark'
|
|
55
47
|
}, (_colorSchemesInput$da = colorSchemesInput.dark) == null ? void 0 : _colorSchemesInput$da.palette)
|
|
56
48
|
});
|
|
57
|
-
|
|
58
49
|
let theme = _extends({}, muiTheme, {
|
|
59
50
|
cssVarPrefix,
|
|
60
51
|
getCssVar,
|
|
@@ -81,21 +72,20 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
81
72
|
})
|
|
82
73
|
})
|
|
83
74
|
});
|
|
84
|
-
|
|
85
75
|
Object.keys(theme.colorSchemes).forEach(key => {
|
|
86
|
-
const palette = theme.colorSchemes[key].palette;
|
|
76
|
+
const palette = theme.colorSchemes[key].palette;
|
|
87
77
|
|
|
78
|
+
// attach black & white channels to common node
|
|
88
79
|
if (key === 'light') {
|
|
89
80
|
setColor(palette.common, 'background', '#fff');
|
|
90
81
|
setColor(palette.common, 'onBackground', '#000');
|
|
91
82
|
} else {
|
|
92
83
|
setColor(palette.common, 'background', '#000');
|
|
93
84
|
setColor(palette.common, 'onBackground', '#fff');
|
|
94
|
-
}
|
|
95
|
-
|
|
85
|
+
}
|
|
96
86
|
|
|
87
|
+
// assign component variables
|
|
97
88
|
assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);
|
|
98
|
-
|
|
99
89
|
if (key === 'light') {
|
|
100
90
|
setColor(palette.Alert, 'errorColor', darken(palette.error.light, 0.6));
|
|
101
91
|
setColor(palette.Alert, 'infoColor', darken(palette.info.light, 0.6));
|
|
@@ -177,9 +167,7 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
177
167
|
setColor(palette.Alert, 'warningIconColor', getCssVar('palette-warning-main'));
|
|
178
168
|
setColor(palette.AppBar, 'defaultBg', getCssVar('palette-grey-900'));
|
|
179
169
|
setColor(palette.AppBar, 'darkBg', getCssVar('palette-background-paper')); // specific for dark mode
|
|
180
|
-
|
|
181
170
|
setColor(palette.AppBar, 'darkColor', getCssVar('palette-text-primary')); // specific for dark mode
|
|
182
|
-
|
|
183
171
|
setColor(palette.Avatar, 'defaultBg', getCssVar('palette-grey-600'));
|
|
184
172
|
setColor(palette.Chip, 'defaultBorder', getCssVar('palette-grey-700'));
|
|
185
173
|
setColor(palette.Chip, 'defaultAvatarColor', getCssVar('palette-grey-300'));
|
|
@@ -217,43 +205,40 @@ export default function extendTheme(options = {}, ...args) {
|
|
|
217
205
|
setColor(palette.TableCell, 'border', darken(alpha(palette.divider, 1), 0.68));
|
|
218
206
|
setColor(palette.Tooltip, 'bg', alpha(palette.grey[700], 0.92));
|
|
219
207
|
}
|
|
208
|
+
palette.background.defaultChannel = colorChannel(palette.background.default); // MUI X - DataGrid needs this token.
|
|
220
209
|
|
|
221
210
|
palette.common.backgroundChannel = colorChannel(palette.common.background);
|
|
222
211
|
palette.common.onBackgroundChannel = colorChannel(palette.common.onBackground);
|
|
223
212
|
palette.dividerChannel = colorChannel(palette.divider);
|
|
224
213
|
Object.keys(palette).forEach(color => {
|
|
225
|
-
const colors = palette[color];
|
|
214
|
+
const colors = palette[color];
|
|
226
215
|
|
|
216
|
+
// Color palettes: primary, secondary, error, info, success, and warning
|
|
227
217
|
if (colors.main) {
|
|
228
218
|
palette[color].mainChannel = colorChannel(colors.main);
|
|
229
219
|
}
|
|
230
|
-
|
|
231
220
|
if (colors.light) {
|
|
232
221
|
palette[color].lightChannel = colorChannel(colors.light);
|
|
233
222
|
}
|
|
234
|
-
|
|
235
223
|
if (colors.dark) {
|
|
236
224
|
palette[color].darkChannel = colorChannel(colors.dark);
|
|
237
225
|
}
|
|
238
|
-
|
|
239
226
|
if (colors.contrastText) {
|
|
240
227
|
palette[color].contrastTextChannel = colorChannel(colors.contrastText);
|
|
241
|
-
}
|
|
242
|
-
|
|
228
|
+
}
|
|
243
229
|
|
|
230
|
+
// Text colors: text.primary, text.secondary
|
|
244
231
|
if (colors.primary) {
|
|
245
232
|
palette[color].primaryChannel = colorChannel(colors.primary);
|
|
246
233
|
}
|
|
247
|
-
|
|
248
234
|
if (colors.secondary) {
|
|
249
235
|
palette[color].secondaryChannel = colorChannel(colors.secondary);
|
|
250
|
-
}
|
|
251
|
-
|
|
236
|
+
}
|
|
252
237
|
|
|
238
|
+
// Action colors: action.active, action.selected
|
|
253
239
|
if (colors.active) {
|
|
254
240
|
palette[color].activeChannel = colorChannel(colors.active);
|
|
255
241
|
}
|
|
256
|
-
|
|
257
242
|
if (colors.selected) {
|
|
258
243
|
palette[color].selectedChannel = colorChannel(colors.selected);
|
|
259
244
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
|
|
2
|
+
const getOverlayAlpha = elevation => {
|
|
3
|
+
let alphaValue;
|
|
4
|
+
if (elevation < 1) {
|
|
5
|
+
alphaValue = 5.11916 * elevation ** 2;
|
|
6
|
+
} else {
|
|
7
|
+
alphaValue = 4.5 * Math.log(elevation + 1) + 2;
|
|
8
|
+
}
|
|
9
|
+
return (alphaValue / 100).toFixed(2);
|
|
10
|
+
};
|
|
11
|
+
export default getOverlayAlpha;
|
package/esm/styles/index.js
CHANGED
|
@@ -11,11 +11,16 @@ export { default as useThemeProps } from './useThemeProps';
|
|
|
11
11
|
export { default as styled } from './styled';
|
|
12
12
|
export { default as experimentalStyled } from './styled';
|
|
13
13
|
export { default as ThemeProvider } from './ThemeProvider';
|
|
14
|
-
export { StyledEngineProvider } from '@mui/system';
|
|
14
|
+
export { StyledEngineProvider } from '@mui/system';
|
|
15
|
+
// The legacy utilities from @mui/styles
|
|
15
16
|
// These are just empty functions that throws when invoked
|
|
16
|
-
|
|
17
17
|
export { default as makeStyles } from './makeStyles';
|
|
18
18
|
export { default as withStyles } from './withStyles';
|
|
19
19
|
export { default as withTheme } from './withTheme';
|
|
20
20
|
export * from './CssVarsProvider';
|
|
21
|
-
export { default as experimental_extendTheme } from './experimental_extendTheme';
|
|
21
|
+
export { default as experimental_extendTheme } from './experimental_extendTheme';
|
|
22
|
+
export { default as getOverlayAlpha } from './getOverlayAlpha';
|
|
23
|
+
|
|
24
|
+
// Private methods for creating parts of the theme
|
|
25
|
+
export { default as private_createTypography } from './createTypography';
|
|
26
|
+
export { default as private_excludeVariablesFromRoot } from './excludeVariablesFromRoot';
|
|
@@ -8,41 +8,34 @@ export default function responsiveFontSizes(themeInput, options = {}) {
|
|
|
8
8
|
factor = 2,
|
|
9
9
|
variants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline']
|
|
10
10
|
} = options;
|
|
11
|
-
|
|
12
11
|
const theme = _extends({}, themeInput);
|
|
13
|
-
|
|
14
12
|
theme.typography = _extends({}, theme.typography);
|
|
15
|
-
const typography = theme.typography;
|
|
16
|
-
// Set the baseFontSize for your project. Defaults to 16px (also the browser default).
|
|
13
|
+
const typography = theme.typography;
|
|
17
14
|
|
|
15
|
+
// Convert between CSS lengths e.g. em->px or px->rem
|
|
16
|
+
// Set the baseFontSize for your project. Defaults to 16px (also the browser default).
|
|
18
17
|
const convert = convertLength(typography.htmlFontSize);
|
|
19
18
|
const breakpointValues = breakpoints.map(x => theme.breakpoints.values[x]);
|
|
20
19
|
variants.forEach(variant => {
|
|
21
20
|
const style = typography[variant];
|
|
22
21
|
const remFontSize = parseFloat(convert(style.fontSize, 'rem'));
|
|
23
|
-
|
|
24
22
|
if (remFontSize <= 1) {
|
|
25
23
|
return;
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
const maxFontSize = remFontSize;
|
|
29
26
|
const minFontSize = 1 + (maxFontSize - 1) / factor;
|
|
30
27
|
let {
|
|
31
28
|
lineHeight
|
|
32
29
|
} = style;
|
|
33
|
-
|
|
34
30
|
if (!isUnitless(lineHeight) && !disableAlign) {
|
|
35
31
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported non-unitless line height with grid alignment.
|
|
36
32
|
Use unitless line heights instead.` : _formatMuiErrorMessage(6));
|
|
37
33
|
}
|
|
38
|
-
|
|
39
34
|
if (!isUnitless(lineHeight)) {
|
|
40
35
|
// make it unitless
|
|
41
36
|
lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
let transform = null;
|
|
45
|
-
|
|
46
39
|
if (!disableAlign) {
|
|
47
40
|
transform = value => alignProperty({
|
|
48
41
|
size: value,
|
|
@@ -53,7 +46,6 @@ Use unitless line heights instead.` : _formatMuiErrorMessage(6));
|
|
|
53
46
|
})
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
typography[variant] = _extends({}, style, responsiveProperty({
|
|
58
50
|
cssProperty: 'fontSize',
|
|
59
51
|
min: minFontSize,
|
package/esm/styles/shadows.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const shadowKeyUmbraOpacity = 0.2;
|
|
2
2
|
const shadowKeyPenumbraOpacity = 0.14;
|
|
3
3
|
const shadowAmbientShadowOpacity = 0.12;
|
|
4
|
-
|
|
5
4
|
function createShadow(...px) {
|
|
6
5
|
return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');
|
|
7
|
-
}
|
|
8
|
-
|
|
6
|
+
}
|
|
9
7
|
|
|
8
|
+
// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
|
|
10
9
|
const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
|
11
10
|
export default shadows;
|
package/esm/styles/useTheme.js
CHANGED
|
@@ -3,11 +3,9 @@ import { useTheme as useThemeSystem } from '@mui/system';
|
|
|
3
3
|
import defaultTheme from './defaultTheme';
|
|
4
4
|
export default function useTheme() {
|
|
5
5
|
const theme = useThemeSystem(defaultTheme);
|
|
6
|
-
|
|
7
6
|
if (process.env.NODE_ENV !== 'production') {
|
|
8
7
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
9
8
|
React.useDebugValue(theme);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
return theme;
|
|
13
11
|
}
|
package/esm/transitions/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getThemeProps, useThemeWithoutDefault as useTheme } from '@mui/system';
|
|
3
3
|
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
|
|
6
7
|
*/
|
|
@@ -11,24 +12,20 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
|
|
|
11
12
|
if (noSsr && supportMatchMedia) {
|
|
12
13
|
return matchMedia(query).matches;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
15
|
if (ssrMatchMedia) {
|
|
16
16
|
return ssrMatchMedia(query).matches;
|
|
17
|
-
}
|
|
18
|
-
// event listeners to return the correct matches value.
|
|
19
|
-
|
|
17
|
+
}
|
|
20
18
|
|
|
19
|
+
// Once the component is mounted, we rely on the
|
|
20
|
+
// event listeners to return the correct matches value.
|
|
21
21
|
return defaultMatches;
|
|
22
22
|
});
|
|
23
23
|
useEnhancedEffect(() => {
|
|
24
24
|
let active = true;
|
|
25
|
-
|
|
26
25
|
if (!supportMatchMedia) {
|
|
27
26
|
return undefined;
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
const queryList = matchMedia(query);
|
|
31
|
-
|
|
32
29
|
const updateMatch = () => {
|
|
33
30
|
// Workaround Safari wrong implementation of matchMedia
|
|
34
31
|
// TODO can we remove it?
|
|
@@ -37,9 +34,8 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
|
|
|
37
34
|
setMatch(queryList.matches);
|
|
38
35
|
}
|
|
39
36
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
updateMatch();
|
|
38
|
+
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
43
39
|
queryList.addListener(updateMatch);
|
|
44
40
|
return () => {
|
|
45
41
|
active = false;
|
|
@@ -47,11 +43,10 @@ function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSs
|
|
|
47
43
|
};
|
|
48
44
|
}, [query, matchMedia, supportMatchMedia]);
|
|
49
45
|
return match;
|
|
50
|
-
}
|
|
51
|
-
|
|
46
|
+
}
|
|
52
47
|
|
|
48
|
+
// eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
53
49
|
const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
|
|
54
|
-
|
|
55
50
|
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
56
51
|
const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
|
|
57
52
|
const getServerSnapshot = React.useMemo(() => {
|
|
@@ -61,14 +56,12 @@ function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
|
61
56
|
} = ssrMatchMedia(query);
|
|
62
57
|
return () => matches;
|
|
63
58
|
}
|
|
64
|
-
|
|
65
59
|
return getDefaultSnapshot;
|
|
66
60
|
}, [getDefaultSnapshot, query, ssrMatchMedia]);
|
|
67
61
|
const [getSnapshot, subscribe] = React.useMemo(() => {
|
|
68
62
|
if (matchMedia === null) {
|
|
69
63
|
return [getDefaultSnapshot, () => () => {}];
|
|
70
64
|
}
|
|
71
|
-
|
|
72
65
|
const mediaQueryList = matchMedia(query);
|
|
73
66
|
return [() => mediaQueryList.matches, notify => {
|
|
74
67
|
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
@@ -81,13 +74,12 @@ function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
|
81
74
|
const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
82
75
|
return match;
|
|
83
76
|
}
|
|
84
|
-
|
|
85
77
|
export default function useMediaQuery(queryInput, options = {}) {
|
|
86
|
-
const theme = useTheme();
|
|
78
|
+
const theme = useTheme();
|
|
79
|
+
// Wait for jsdom to support the match media feature.
|
|
87
80
|
// All the browsers MUI support have this built-in.
|
|
88
81
|
// This defensive check is here for simplicity.
|
|
89
82
|
// Most of the time, the match media logic isn't central to people tests.
|
|
90
|
-
|
|
91
83
|
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
92
84
|
const {
|
|
93
85
|
defaultMatches = false,
|
|
@@ -99,19 +91,17 @@ export default function useMediaQuery(queryInput, options = {}) {
|
|
|
99
91
|
props: options,
|
|
100
92
|
theme
|
|
101
93
|
});
|
|
102
|
-
|
|
103
94
|
if (process.env.NODE_ENV !== 'production') {
|
|
104
95
|
if (typeof queryInput === 'function' && theme === null) {
|
|
105
96
|
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
106
97
|
}
|
|
107
98
|
}
|
|
108
|
-
|
|
109
99
|
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
110
|
-
query = query.replace(/^@media( ?)/m, '');
|
|
100
|
+
query = query.replace(/^@media( ?)/m, '');
|
|
111
101
|
|
|
102
|
+
// TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
|
|
112
103
|
const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
|
|
113
104
|
const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
|
|
114
|
-
|
|
115
105
|
if (process.env.NODE_ENV !== 'production') {
|
|
116
106
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
117
107
|
React.useDebugValue({
|
|
@@ -119,6 +109,5 @@ export default function useMediaQuery(queryInput, options = {}) {
|
|
|
119
109
|
match
|
|
120
110
|
});
|
|
121
111
|
}
|
|
122
|
-
|
|
123
112
|
return match;
|
|
124
113
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import useMediaQuery from './useMediaQuery';
|
|
1
|
+
import useMediaQuery from './useMediaQuery';
|
|
2
2
|
|
|
3
|
+
// TODO v5: to deprecate in v4.x and remove in v5
|
|
3
4
|
export default function useMediaQueryTheme(...args) {
|
|
4
5
|
return useMediaQuery(...args);
|
|
5
6
|
}
|
|
@@ -5,85 +5,88 @@ import { unstable_useControlled as useControlled } from '@mui/utils';
|
|
|
5
5
|
export default function usePagination(props = {}) {
|
|
6
6
|
// keep default values in sync with @default tags in Pagination.propTypes
|
|
7
7
|
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
boundaryCount = 1,
|
|
9
|
+
componentName = 'usePagination',
|
|
10
|
+
count = 1,
|
|
11
|
+
defaultPage = 1,
|
|
12
|
+
disabled = false,
|
|
13
|
+
hideNextButton = false,
|
|
14
|
+
hidePrevButton = false,
|
|
15
|
+
onChange: handleChange,
|
|
16
|
+
page: pageProp,
|
|
17
|
+
showFirstButton = false,
|
|
18
|
+
showLastButton = false,
|
|
19
|
+
siblingCount = 1
|
|
20
|
+
} = props,
|
|
21
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
23
22
|
const [page, setPageState] = useControlled({
|
|
24
23
|
controlled: pageProp,
|
|
25
24
|
default: defaultPage,
|
|
26
25
|
name: componentName,
|
|
27
26
|
state: 'page'
|
|
28
27
|
});
|
|
29
|
-
|
|
30
28
|
const handleClick = (event, value) => {
|
|
31
29
|
if (!pageProp) {
|
|
32
30
|
setPageState(value);
|
|
33
31
|
}
|
|
34
|
-
|
|
35
32
|
if (handleChange) {
|
|
36
33
|
handleChange(event, value);
|
|
37
34
|
}
|
|
38
|
-
};
|
|
39
|
-
|
|
35
|
+
};
|
|
40
36
|
|
|
37
|
+
// https://dev.to/namirsab/comment/2050
|
|
41
38
|
const range = (start, end) => {
|
|
42
39
|
const length = end - start + 1;
|
|
43
40
|
return Array.from({
|
|
44
41
|
length
|
|
45
42
|
}, (_, i) => start + i);
|
|
46
43
|
};
|
|
47
|
-
|
|
48
44
|
const startPages = range(1, Math.min(boundaryCount, count));
|
|
49
45
|
const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);
|
|
50
|
-
const siblingsStart = Math.max(Math.min(
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
const siblingsStart = Math.max(Math.min(
|
|
47
|
+
// Natural start
|
|
48
|
+
page - siblingCount,
|
|
49
|
+
// Lower boundary when page is high
|
|
50
|
+
count - boundaryCount - siblingCount * 2 - 1),
|
|
51
|
+
// Greater than startPages
|
|
53
52
|
boundaryCount + 2);
|
|
54
|
-
const siblingsEnd = Math.min(Math.max(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
const siblingsEnd = Math.min(Math.max(
|
|
54
|
+
// Natural end
|
|
55
|
+
page + siblingCount,
|
|
56
|
+
// Upper boundary when page is low
|
|
57
|
+
boundaryCount + siblingCount * 2 + 2),
|
|
58
|
+
// Less than endPages
|
|
59
|
+
endPages.length > 0 ? endPages[0] - 2 : count - 1);
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
// Basic list of items to render
|
|
62
|
+
// e.g. itemList = ['first', 'previous', 1, 'ellipsis', 4, 5, 6, 'ellipsis', 10, 'next', 'last']
|
|
63
|
+
const itemList = [...(showFirstButton ? ['first'] : []), ...(hidePrevButton ? [] : ['previous']), ...startPages,
|
|
64
|
+
// Start ellipsis
|
|
61
65
|
// eslint-disable-next-line no-nested-ternary
|
|
62
|
-
...(siblingsStart > boundaryCount + 2 ? ['start-ellipsis'] : boundaryCount + 1 < count - boundaryCount ? [boundaryCount + 1] : []),
|
|
63
|
-
|
|
66
|
+
...(siblingsStart > boundaryCount + 2 ? ['start-ellipsis'] : boundaryCount + 1 < count - boundaryCount ? [boundaryCount + 1] : []),
|
|
67
|
+
// Sibling pages
|
|
68
|
+
...range(siblingsStart, siblingsEnd),
|
|
69
|
+
// End ellipsis
|
|
64
70
|
// eslint-disable-next-line no-nested-ternary
|
|
65
|
-
...(siblingsEnd < count - boundaryCount - 1 ? ['end-ellipsis'] : count - boundaryCount > boundaryCount ? [count - boundaryCount] : []), ...endPages, ...(hideNextButton ? [] : ['next']), ...(showLastButton ? ['last'] : [])];
|
|
71
|
+
...(siblingsEnd < count - boundaryCount - 1 ? ['end-ellipsis'] : count - boundaryCount > boundaryCount ? [count - boundaryCount] : []), ...endPages, ...(hideNextButton ? [] : ['next']), ...(showLastButton ? ['last'] : [])];
|
|
66
72
|
|
|
73
|
+
// Map the button type to its page number
|
|
67
74
|
const buttonPage = type => {
|
|
68
75
|
switch (type) {
|
|
69
76
|
case 'first':
|
|
70
77
|
return 1;
|
|
71
|
-
|
|
72
78
|
case 'previous':
|
|
73
79
|
return page - 1;
|
|
74
|
-
|
|
75
80
|
case 'next':
|
|
76
81
|
return page + 1;
|
|
77
|
-
|
|
78
82
|
case 'last':
|
|
79
83
|
return count;
|
|
80
|
-
|
|
81
84
|
default:
|
|
82
85
|
return null;
|
|
83
86
|
}
|
|
84
|
-
};
|
|
85
|
-
|
|
87
|
+
};
|
|
86
88
|
|
|
89
|
+
// Convert the basic item list to PaginationItem props objects
|
|
87
90
|
const items = itemList.map(item => {
|
|
88
91
|
return typeof item === 'number' ? {
|
|
89
92
|
onClick: event => {
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["getTrigger", "target"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
|
|
6
5
|
function defaultTrigger(store, options) {
|
|
7
6
|
const {
|
|
8
7
|
disableHysteresis = false,
|
|
@@ -10,29 +9,24 @@ function defaultTrigger(store, options) {
|
|
|
10
9
|
target
|
|
11
10
|
} = options;
|
|
12
11
|
const previous = store.current;
|
|
13
|
-
|
|
14
12
|
if (target) {
|
|
15
13
|
// Get vertical scroll
|
|
16
14
|
store.current = target.pageYOffset !== undefined ? target.pageYOffset : target.scrollTop;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
if (!disableHysteresis && previous !== undefined) {
|
|
20
17
|
if (store.current < previous) {
|
|
21
18
|
return false;
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
|
|
25
21
|
return store.current > threshold;
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
const defaultTarget = typeof window !== 'undefined' ? window : null;
|
|
29
24
|
export default function useScrollTrigger(options = {}) {
|
|
30
25
|
const {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
getTrigger = defaultTrigger,
|
|
27
|
+
target = defaultTarget
|
|
28
|
+
} = options,
|
|
29
|
+
other = _objectWithoutPropertiesLoose(options, _excluded);
|
|
36
30
|
const store = React.useRef();
|
|
37
31
|
const [trigger, setTrigger] = React.useState(() => getTrigger(store, other));
|
|
38
32
|
React.useEffect(() => {
|
|
@@ -41,9 +35,7 @@ export default function useScrollTrigger(options = {}) {
|
|
|
41
35
|
target
|
|
42
36
|
}, other)));
|
|
43
37
|
};
|
|
44
|
-
|
|
45
38
|
handleScroll(); // Re-evaluate trigger when dependencies change
|
|
46
|
-
|
|
47
39
|
target.addEventListener('scroll', handleScroll, {
|
|
48
40
|
passive: true
|
|
49
41
|
});
|
|
@@ -51,7 +43,8 @@ export default function useScrollTrigger(options = {}) {
|
|
|
51
43
|
target.removeEventListener('scroll', handleScroll, {
|
|
52
44
|
passive: true
|
|
53
45
|
});
|
|
54
|
-
};
|
|
46
|
+
};
|
|
47
|
+
// See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
|
|
55
48
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
49
|
}, [target, getTrigger, JSON.stringify(other)]);
|
|
57
50
|
return trigger;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useEventCallback } from '../utils';
|
|
3
|
-
|
|
4
3
|
const useTouchRipple = props => {
|
|
5
4
|
const {
|
|
6
5
|
disabled,
|
|
@@ -13,28 +12,23 @@ const useTouchRipple = props => {
|
|
|
13
12
|
React.useEffect(() => {
|
|
14
13
|
if (focusVisible && !disableFocusRipple && !disableRipple) {
|
|
15
14
|
var _rippleRef$current;
|
|
16
|
-
|
|
17
15
|
(_rippleRef$current = rippleRef.current) == null ? void 0 : _rippleRef$current.pulsate();
|
|
18
16
|
}
|
|
19
17
|
}, [rippleRef, focusVisible, disableFocusRipple, disableRipple]);
|
|
20
|
-
|
|
21
18
|
function useRippleHandler(rippleAction, skipRippleAction = disableTouchRipple) {
|
|
22
19
|
return useEventCallback(event => {
|
|
23
20
|
if (!skipRippleAction && rippleRef.current) {
|
|
24
21
|
rippleRef.current[rippleAction](event);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
return true;
|
|
28
24
|
});
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
const keydownRef = React.useRef(false);
|
|
32
27
|
const handleKeyDown = useEventCallback(event => {
|
|
33
28
|
if (!disableFocusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
|
|
34
29
|
keydownRef.current = true;
|
|
35
30
|
rippleRef.current.stop(event, () => {
|
|
36
31
|
var _rippleRef$current2;
|
|
37
|
-
|
|
38
32
|
rippleRef == null ? void 0 : (_rippleRef$current2 = rippleRef.current) == null ? void 0 : _rippleRef$current2.start(event);
|
|
39
33
|
});
|
|
40
34
|
}
|
|
@@ -46,7 +40,6 @@ const useTouchRipple = props => {
|
|
|
46
40
|
keydownRef.current = false;
|
|
47
41
|
rippleRef.current.stop(event, () => {
|
|
48
42
|
var _rippleRef$current3;
|
|
49
|
-
|
|
50
43
|
rippleRef == null ? void 0 : (_rippleRef$current3 = rippleRef.current) == null ? void 0 : _rippleRef$current3.pulsate(event);
|
|
51
44
|
});
|
|
52
45
|
}
|
|
@@ -85,7 +78,6 @@ const useTouchRipple = props => {
|
|
|
85
78
|
name: eventName,
|
|
86
79
|
handler: ev => {
|
|
87
80
|
var _otherEvents$eventNam;
|
|
88
|
-
|
|
89
81
|
(_otherEvents$eventNam = otherEvents[eventName]) == null ? void 0 : _otherEvents$eventNam.call(otherEvents, ev);
|
|
90
82
|
rippleHandlers[eventName](ev);
|
|
91
83
|
}
|
|
@@ -101,5 +93,4 @@ const useTouchRipple = props => {
|
|
|
101
93
|
getRippleHandlers
|
|
102
94
|
};
|
|
103
95
|
};
|
|
104
|
-
|
|
105
96
|
export default useTouchRipple;
|