@mui/material 5.13.0 → 5.13.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 +44 -43
- package/AccordionActions/AccordionActions.js +18 -18
- package/AccordionDetails/AccordionDetails.js +7 -9
- package/AccordionSummary/AccordionSummary.js +32 -32
- package/Alert/Alert.js +64 -60
- package/AlertTitle/AlertTitle.js +7 -9
- package/AppBar/AppBar.js +89 -73
- package/Autocomplete/Autocomplete.js +172 -141
- package/Avatar/Avatar.js +42 -38
- package/AvatarGroup/AvatarGroup.js +34 -33
- package/Backdrop/Backdrop.js +33 -31
- package/Badge/Badge.js +119 -107
- package/BottomNavigation/BottomNavigation.js +15 -17
- package/BottomNavigationAction/BottomNavigationAction.js +29 -31
- package/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/Breadcrumbs/Breadcrumbs.js +19 -21
- package/Button/Button.js +168 -133
- package/ButtonBase/ButtonBase.js +43 -42
- package/ButtonBase/TouchRipple.js +9 -12
- package/ButtonGroup/ButtonGroup.js +111 -89
- package/CHANGELOG.md +62 -0
- package/Card/Card.js +11 -12
- package/CardActionArea/CardActionArea.js +9 -12
- package/CardActions/CardActions.js +18 -18
- package/CardContent/CardContent.js +11 -12
- package/CardHeader/CardHeader.js +30 -31
- package/CardMedia/CardMedia.js +28 -27
- package/Checkbox/Checkbox.js +44 -39
- package/Chip/Chip.js +146 -129
- package/CircularProgress/CircularProgress.js +43 -36
- package/Collapse/Collapse.js +73 -65
- package/CssBaseline/CssBaseline.js +17 -14
- package/Dialog/Dialog.js +103 -94
- package/DialogActions/DialogActions.js +18 -18
- package/DialogContent/DialogContent.js +22 -22
- package/DialogContentText/DialogContentText.js +13 -11
- package/DialogTitle/DialogTitle.js +8 -10
- package/Divider/Divider.js +99 -84
- package/Drawer/Drawer.js +85 -76
- package/Fab/Fab.js +71 -60
- package/Fade/Fade.js +31 -30
- package/FilledInput/FilledInput.js +135 -117
- package/FilledInput/filledInputClasses.js +4 -2
- package/FormControl/FormControl.js +41 -35
- package/FormControlLabel/FormControlLabel.js +43 -38
- package/FormGroup/FormGroup.js +16 -16
- package/FormHelperText/FormHelperText.js +30 -23
- package/FormLabel/FormLabel.js +26 -18
- package/GlobalStyles/GlobalStyles.js +3 -3
- package/Grid/Grid.js +50 -41
- package/Grow/Grow.js +31 -30
- package/Hidden/Hidden.js +21 -22
- package/Hidden/HiddenCss.js +29 -29
- package/Hidden/withWidth.js +19 -19
- package/Icon/Icon.js +14 -15
- package/IconButton/IconButton.js +59 -52
- package/ImageList/ImageList.js +30 -29
- package/ImageListItem/ImageListItem.js +40 -39
- package/ImageListItemBar/ImageListItemBar.js +47 -41
- package/Input/Input.js +77 -74
- package/Input/inputClasses.js +4 -2
- package/InputAdornment/InputAdornment.js +36 -34
- package/InputBase/InputBase.js +116 -92
- package/InputLabel/InputLabel.js +83 -68
- package/LinearProgress/LinearProgress.js +64 -58
- package/Link/Link.js +69 -64
- package/List/List.js +24 -24
- package/ListItem/ListItem.js +113 -96
- package/ListItemAvatar/ListItemAvatar.js +15 -15
- package/ListItemButton/ListItemButton.js +40 -35
- package/ListItemIcon/ListItemIcon.js +15 -15
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +15 -15
- package/ListItemText/ListItemText.js +34 -34
- package/ListSubheader/ListSubheader.js +36 -32
- package/Menu/Menu.js +38 -39
- package/MenuItem/MenuItem.js +50 -45
- package/MenuList/MenuList.js +17 -20
- package/MobileStepper/MobileStepper.js +61 -53
- package/Modal/Modal.js +50 -45
- package/NativeSelect/NativeSelect.js +26 -22
- package/NativeSelect/NativeSelectInput.js +50 -43
- package/OutlinedInput/NotchedOutline.js +55 -51
- package/OutlinedInput/OutlinedInput.js +72 -59
- package/OutlinedInput/outlinedInputClasses.js +4 -2
- package/Pagination/Pagination.js +35 -31
- package/PaginationItem/PaginationItem.js +105 -93
- package/Paper/Paper.js +32 -28
- package/Popover/Popover.js +49 -51
- package/Popper/Popper.js +25 -27
- package/README.md +1 -1
- package/Radio/Radio.js +36 -33
- package/Radio/RadioButtonIcon.js +11 -10
- package/RadioGroup/RadioGroup.js +14 -17
- package/Rating/Rating.js +88 -73
- package/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/Select/Select.js +59 -55
- package/Select/SelectInput.js +58 -57
- package/Skeleton/Skeleton.js +51 -46
- package/Slide/Slide.js +37 -33
- package/Slider/Slider.js +281 -216
- package/Snackbar/Snackbar.js +81 -67
- package/SnackbarContent/SnackbarContent.js +13 -15
- package/SpeedDial/SpeedDial.js +85 -83
- package/SpeedDialAction/SpeedDialAction.js +57 -52
- package/SpeedDialIcon/SpeedDialIcon.js +25 -24
- package/Step/Step.js +27 -26
- package/StepButton/StepButton.js +23 -24
- package/StepConnector/StepConnector.js +34 -31
- package/StepContent/StepContent.js +23 -24
- package/StepIcon/StepIcon.js +22 -22
- package/StepLabel/StepLabel.js +34 -33
- package/Stepper/Stepper.js +33 -31
- package/SvgIcon/SvgIcon.js +19 -20
- package/SwipeableDrawer/SwipeArea.js +33 -30
- package/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/Switch/Switch.js +59 -52
- package/Tab/Tab.js +93 -83
- package/TabScrollButton/TabScrollButton.js +30 -25
- package/Table/Table.js +20 -19
- package/TableBody/TableBody.js +11 -12
- package/TableCell/TableCell.js +70 -59
- package/TableContainer/TableContainer.js +11 -12
- package/TableFooter/TableFooter.js +11 -12
- package/TableHead/TableHead.js +11 -12
- package/TablePagination/TablePagination.js +53 -49
- package/TablePagination/TablePaginationActions.js +22 -25
- package/TableRow/TableRow.js +13 -14
- package/TableSortLabel/TableSortLabel.js +23 -23
- package/Tabs/ScrollbarSize.js +7 -9
- package/Tabs/Tabs.js +107 -92
- package/TextField/TextField.js +57 -57
- package/ToggleButton/ToggleButton.js +36 -35
- package/ToggleButtonGroup/ToggleButtonGroup.js +60 -59
- package/Toolbar/Toolbar.js +26 -25
- package/Tooltip/Tooltip.js +177 -147
- package/Typography/Typography.js +37 -32
- package/Zoom/Zoom.js +31 -30
- package/index.js +1 -1
- package/internal/SwitchBase.js +45 -43
- package/legacy/Accordion/Accordion.js +9 -8
- package/legacy/AccordionActions/AccordionActions.js +6 -4
- package/legacy/AccordionDetails/AccordionDetails.js +4 -2
- package/legacy/AccordionSummary/AccordionSummary.js +12 -11
- package/legacy/Alert/Alert.js +11 -10
- package/legacy/AlertTitle/AlertTitle.js +4 -2
- package/legacy/AppBar/AppBar.js +18 -16
- package/legacy/Autocomplete/Autocomplete.js +45 -43
- package/legacy/Avatar/Avatar.js +11 -9
- package/legacy/AvatarGroup/AvatarGroup.js +10 -9
- package/legacy/Backdrop/Backdrop.js +10 -8
- package/legacy/Badge/Badge.js +16 -15
- package/legacy/BottomNavigation/BottomNavigation.js +6 -4
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +9 -8
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +10 -8
- package/legacy/Breadcrumbs/Breadcrumbs.js +5 -4
- package/legacy/Button/Button.js +37 -36
- package/legacy/ButtonBase/ButtonBase.js +6 -5
- package/legacy/ButtonBase/TouchRipple.js +5 -3
- package/legacy/ButtonGroup/ButtonGroup.js +28 -27
- package/legacy/Card/Card.js +5 -3
- package/legacy/CardActionArea/CardActionArea.js +4 -3
- package/legacy/CardActions/CardActions.js +6 -4
- package/legacy/CardContent/CardContent.js +5 -3
- package/legacy/CardHeader/CardHeader.js +11 -10
- package/legacy/CardMedia/CardMedia.js +9 -7
- package/legacy/Checkbox/Checkbox.js +9 -8
- package/legacy/Chip/Chip.js +26 -25
- package/legacy/CircularProgress/CircularProgress.js +12 -10
- package/legacy/Collapse/Collapse.js +17 -16
- package/legacy/CssBaseline/CssBaseline.js +9 -7
- package/legacy/Dialog/Dialog.js +20 -19
- package/legacy/DialogActions/DialogActions.js +6 -4
- package/legacy/DialogContent/DialogContent.js +5 -4
- package/legacy/DialogContentText/DialogContentText.js +6 -4
- package/legacy/DialogTitle/DialogTitle.js +4 -2
- package/legacy/Divider/Divider.js +19 -17
- package/legacy/Drawer/Drawer.js +23 -21
- package/legacy/Fab/Fab.js +13 -12
- package/legacy/Fade/Fade.js +8 -6
- package/legacy/FilledInput/FilledInput.js +24 -23
- package/legacy/FilledInput/filledInputClasses.js +4 -2
- package/legacy/FormControl/FormControl.js +10 -8
- package/legacy/FormControlLabel/FormControlLabel.js +11 -10
- package/legacy/FormGroup/FormGroup.js +6 -4
- package/legacy/FormHelperText/FormHelperText.js +12 -11
- package/legacy/FormLabel/FormLabel.js +13 -12
- package/legacy/GlobalStyles/GlobalStyles.js +4 -2
- package/legacy/Grid/Grid.js +13 -11
- package/legacy/Grow/Grow.js +8 -6
- package/legacy/Hidden/Hidden.js +5 -3
- package/legacy/Hidden/HiddenCss.js +4 -3
- package/legacy/Hidden/withWidth.js +6 -4
- package/legacy/Icon/Icon.js +5 -3
- package/legacy/IconButton/IconButton.js +15 -14
- package/legacy/ImageList/ImageList.js +9 -7
- package/legacy/ImageListItem/ImageListItem.js +9 -8
- package/legacy/ImageListItemBar/ImageListItemBar.js +13 -11
- package/legacy/Input/Input.js +8 -7
- package/legacy/Input/inputClasses.js +4 -2
- package/legacy/InputAdornment/InputAdornment.js +9 -8
- package/legacy/InputBase/InputBase.js +28 -27
- package/legacy/InputLabel/InputLabel.js +14 -13
- package/legacy/LinearProgress/LinearProgress.js +17 -15
- package/legacy/Link/Link.js +9 -8
- package/legacy/List/List.js +8 -6
- package/legacy/ListItem/ListItem.js +25 -24
- package/legacy/ListItemAvatar/ListItemAvatar.js +6 -4
- package/legacy/ListItemButton/ListItemButton.js +16 -15
- package/legacy/ListItemIcon/ListItemIcon.js +6 -4
- package/legacy/ListItemSecondaryAction/ListItemSecondaryAction.js +6 -4
- package/legacy/ListItemText/ListItemText.js +11 -10
- package/legacy/ListSubheader/ListSubheader.js +10 -8
- package/legacy/Menu/Menu.js +12 -10
- package/legacy/MenuItem/MenuItem.js +22 -21
- package/legacy/MenuList/MenuList.js +5 -3
- package/legacy/MobileStepper/MobileStepper.js +12 -10
- package/legacy/Modal/Modal.js +10 -8
- package/legacy/NativeSelect/NativeSelect.js +8 -6
- package/legacy/NativeSelect/NativeSelectInput.js +17 -16
- package/legacy/OutlinedInput/NotchedOutline.js +8 -6
- package/legacy/OutlinedInput/OutlinedInput.js +23 -22
- package/legacy/OutlinedInput/outlinedInputClasses.js +4 -2
- package/legacy/Pagination/Pagination.js +9 -7
- package/legacy/PaginationItem/PaginationItem.js +24 -23
- package/legacy/Paper/Paper.js +9 -7
- package/legacy/Popover/Popover.js +12 -10
- package/legacy/Popper/Popper.js +6 -4
- package/legacy/Radio/Radio.js +8 -7
- package/legacy/Radio/RadioButtonIcon.js +5 -3
- package/legacy/RadioGroup/RadioGroup.js +5 -3
- package/legacy/Rating/Rating.js +24 -23
- package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -4
- package/legacy/Select/Select.js +10 -8
- package/legacy/Select/SelectInput.js +11 -10
- package/legacy/Skeleton/Skeleton.js +13 -11
- package/legacy/Slide/Slide.js +10 -8
- package/legacy/Slider/Slider.js +65 -64
- package/legacy/Snackbar/Snackbar.js +16 -15
- package/legacy/SnackbarContent/SnackbarContent.js +5 -4
- package/legacy/SpeedDial/SpeedDial.js +15 -14
- package/legacy/SpeedDialAction/SpeedDialAction.js +16 -15
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +7 -6
- package/legacy/Step/Step.js +8 -6
- package/legacy/StepButton/StepButton.js +8 -7
- package/legacy/StepConnector/StepConnector.js +10 -8
- package/legacy/StepContent/StepContent.js +9 -7
- package/legacy/StepIcon/StepIcon.js +7 -6
- package/legacy/StepLabel/StepLabel.js +20 -19
- package/legacy/Stepper/Stepper.js +10 -8
- package/legacy/SvgIcon/SvgIcon.js +6 -4
- package/legacy/SwipeableDrawer/SwipeArea.js +9 -8
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +10 -8
- package/legacy/Switch/Switch.js +11 -10
- package/legacy/Tab/Tab.js +16 -15
- package/legacy/TabScrollButton/TabScrollButton.js +7 -6
- package/legacy/Table/Table.js +7 -5
- package/legacy/TableBody/TableBody.js +5 -3
- package/legacy/TableCell/TableCell.js +15 -14
- package/legacy/TableContainer/TableContainer.js +5 -3
- package/legacy/TableFooter/TableFooter.js +5 -3
- package/legacy/TableHead/TableHead.js +5 -3
- package/legacy/TablePagination/TablePagination.js +15 -14
- package/legacy/TablePagination/TablePaginationActions.js +9 -7
- package/legacy/TableRow/TableRow.js +4 -3
- package/legacy/TableSortLabel/TableSortLabel.js +7 -6
- package/legacy/Tabs/ScrollbarSize.js +4 -2
- package/legacy/Tabs/Tabs.js +23 -22
- package/legacy/TextField/TextField.js +14 -12
- package/legacy/ToggleButton/ToggleButton.js +12 -11
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +8 -7
- package/legacy/Toolbar/Toolbar.js +6 -5
- package/legacy/Tooltip/Tooltip.js +34 -33
- package/legacy/Typography/Typography.js +11 -9
- package/legacy/Zoom/Zoom.js +8 -6
- package/legacy/index.js +1 -1
- package/legacy/internal/SwitchBase.js +10 -8
- package/legacy/locale/index.js +383 -68
- package/legacy/styles/CssVarsProvider.js +4 -2
- package/legacy/styles/ThemeProvider.js +4 -2
- package/legacy/styles/adaptV4Theme.js +7 -6
- package/legacy/styles/createMixins.js +3 -2
- package/legacy/styles/createPalette.js +6 -4
- package/legacy/styles/createTheme.js +4 -3
- package/legacy/styles/createTransitions.js +7 -5
- package/legacy/styles/createTypography.js +6 -4
- package/legacy/styles/experimental_extendTheme.js +12 -10
- package/legacy/styles/responsiveFontSizes.js +6 -4
- package/legacy/usePagination/usePagination.js +4 -2
- package/legacy/useScrollTrigger/useScrollTrigger.js +4 -2
- package/legacy/utils/createSvgIcon.js +5 -3
- package/locale/index.d.ts +4 -0
- package/locale/index.js +309 -0
- package/modern/Accordion/Accordion.js +44 -43
- package/modern/AccordionActions/AccordionActions.js +18 -18
- package/modern/AccordionDetails/AccordionDetails.js +7 -9
- package/modern/AccordionSummary/AccordionSummary.js +32 -32
- package/modern/Alert/Alert.js +64 -60
- package/modern/AlertTitle/AlertTitle.js +7 -9
- package/modern/AppBar/AppBar.js +89 -73
- package/modern/Autocomplete/Autocomplete.js +169 -138
- package/modern/Avatar/Avatar.js +42 -38
- package/modern/AvatarGroup/AvatarGroup.js +34 -33
- package/modern/Backdrop/Backdrop.js +33 -31
- package/modern/Badge/Badge.js +119 -107
- package/modern/BottomNavigation/BottomNavigation.js +15 -17
- package/modern/BottomNavigationAction/BottomNavigationAction.js +29 -31
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/modern/Breadcrumbs/Breadcrumbs.js +19 -21
- package/modern/Button/Button.js +168 -133
- package/modern/ButtonBase/ButtonBase.js +43 -42
- package/modern/ButtonBase/TouchRipple.js +9 -12
- package/modern/ButtonGroup/ButtonGroup.js +111 -89
- package/modern/Card/Card.js +11 -12
- package/modern/CardActionArea/CardActionArea.js +9 -12
- package/modern/CardActions/CardActions.js +18 -18
- package/modern/CardContent/CardContent.js +11 -12
- package/modern/CardHeader/CardHeader.js +30 -31
- package/modern/CardMedia/CardMedia.js +28 -27
- package/modern/Checkbox/Checkbox.js +44 -39
- package/modern/Chip/Chip.js +146 -129
- package/modern/CircularProgress/CircularProgress.js +43 -36
- package/modern/Collapse/Collapse.js +73 -65
- package/modern/CssBaseline/CssBaseline.js +17 -14
- package/modern/Dialog/Dialog.js +103 -94
- package/modern/DialogActions/DialogActions.js +18 -18
- package/modern/DialogContent/DialogContent.js +22 -22
- package/modern/DialogContentText/DialogContentText.js +13 -11
- package/modern/DialogTitle/DialogTitle.js +8 -10
- package/modern/Divider/Divider.js +99 -84
- package/modern/Drawer/Drawer.js +85 -76
- package/modern/Fab/Fab.js +70 -59
- package/modern/Fade/Fade.js +31 -30
- package/modern/FilledInput/FilledInput.js +135 -117
- package/modern/FilledInput/filledInputClasses.js +4 -2
- package/modern/FormControl/FormControl.js +41 -35
- package/modern/FormControlLabel/FormControlLabel.js +43 -38
- package/modern/FormGroup/FormGroup.js +16 -16
- package/modern/FormHelperText/FormHelperText.js +30 -23
- package/modern/FormLabel/FormLabel.js +26 -18
- package/modern/GlobalStyles/GlobalStyles.js +3 -3
- package/modern/Grid/Grid.js +50 -41
- package/modern/Grow/Grow.js +31 -30
- package/modern/Hidden/Hidden.js +21 -22
- package/modern/Hidden/HiddenCss.js +29 -29
- package/modern/Hidden/withWidth.js +19 -19
- package/modern/Icon/Icon.js +14 -15
- package/modern/IconButton/IconButton.js +59 -52
- package/modern/ImageList/ImageList.js +30 -29
- package/modern/ImageListItem/ImageListItem.js +40 -39
- package/modern/ImageListItemBar/ImageListItemBar.js +47 -41
- package/modern/Input/Input.js +77 -74
- package/modern/Input/inputClasses.js +4 -2
- package/modern/InputAdornment/InputAdornment.js +36 -34
- package/modern/InputBase/InputBase.js +116 -92
- package/modern/InputLabel/InputLabel.js +83 -68
- package/modern/LinearProgress/LinearProgress.js +64 -58
- package/modern/Link/Link.js +69 -64
- package/modern/List/List.js +24 -24
- package/modern/ListItem/ListItem.js +113 -96
- package/modern/ListItemAvatar/ListItemAvatar.js +15 -15
- package/modern/ListItemButton/ListItemButton.js +40 -35
- package/modern/ListItemIcon/ListItemIcon.js +15 -15
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +15 -15
- package/modern/ListItemText/ListItemText.js +34 -34
- package/modern/ListSubheader/ListSubheader.js +36 -32
- package/modern/Menu/Menu.js +38 -39
- package/modern/MenuItem/MenuItem.js +50 -45
- package/modern/MenuList/MenuList.js +17 -20
- package/modern/MobileStepper/MobileStepper.js +61 -53
- package/modern/Modal/Modal.js +50 -45
- package/modern/NativeSelect/NativeSelect.js +26 -22
- package/modern/NativeSelect/NativeSelectInput.js +50 -43
- package/modern/OutlinedInput/NotchedOutline.js +55 -51
- package/modern/OutlinedInput/OutlinedInput.js +72 -59
- package/modern/OutlinedInput/outlinedInputClasses.js +4 -2
- package/modern/Pagination/Pagination.js +35 -31
- package/modern/PaginationItem/PaginationItem.js +105 -93
- package/modern/Paper/Paper.js +32 -28
- package/modern/Popover/Popover.js +49 -51
- package/modern/Popper/Popper.js +25 -27
- package/modern/Radio/Radio.js +36 -33
- package/modern/Radio/RadioButtonIcon.js +11 -10
- package/modern/RadioGroup/RadioGroup.js +14 -17
- package/modern/Rating/Rating.js +88 -73
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/modern/Select/Select.js +59 -55
- package/modern/Select/SelectInput.js +58 -57
- package/modern/Skeleton/Skeleton.js +51 -46
- package/modern/Slide/Slide.js +37 -33
- package/modern/Slider/Slider.js +281 -216
- package/modern/Snackbar/Snackbar.js +81 -67
- package/modern/SnackbarContent/SnackbarContent.js +13 -15
- package/modern/SpeedDial/SpeedDial.js +85 -83
- package/modern/SpeedDialAction/SpeedDialAction.js +57 -52
- package/modern/SpeedDialIcon/SpeedDialIcon.js +25 -24
- package/modern/Step/Step.js +27 -26
- package/modern/StepButton/StepButton.js +23 -24
- package/modern/StepConnector/StepConnector.js +34 -31
- package/modern/StepContent/StepContent.js +23 -24
- package/modern/StepIcon/StepIcon.js +22 -22
- package/modern/StepLabel/StepLabel.js +34 -33
- package/modern/Stepper/Stepper.js +33 -31
- package/modern/SvgIcon/SvgIcon.js +19 -20
- package/modern/SwipeableDrawer/SwipeArea.js +33 -30
- package/modern/SwipeableDrawer/SwipeableDrawer.js +49 -43
- package/modern/Switch/Switch.js +59 -52
- package/modern/Tab/Tab.js +93 -83
- package/modern/TabScrollButton/TabScrollButton.js +30 -25
- package/modern/Table/Table.js +20 -19
- package/modern/TableBody/TableBody.js +11 -12
- package/modern/TableCell/TableCell.js +70 -59
- package/modern/TableContainer/TableContainer.js +11 -12
- package/modern/TableFooter/TableFooter.js +11 -12
- package/modern/TableHead/TableHead.js +11 -12
- package/modern/TablePagination/TablePagination.js +53 -49
- package/modern/TablePagination/TablePaginationActions.js +22 -25
- package/modern/TableRow/TableRow.js +13 -14
- package/modern/TableSortLabel/TableSortLabel.js +23 -23
- package/modern/Tabs/ScrollbarSize.js +7 -9
- package/modern/Tabs/Tabs.js +107 -92
- package/modern/TextField/TextField.js +57 -57
- package/modern/ToggleButton/ToggleButton.js +36 -35
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +60 -59
- package/modern/Toolbar/Toolbar.js +26 -25
- package/modern/Tooltip/Tooltip.js +177 -147
- package/modern/Typography/Typography.js +37 -32
- package/modern/Zoom/Zoom.js +31 -30
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +45 -43
- package/modern/locale/index.js +309 -0
- package/modern/styles/CssVarsProvider.js +3 -3
- package/modern/styles/ThemeProvider.js +7 -10
- package/modern/styles/adaptV4Theme.js +31 -31
- package/modern/styles/createMixins.js +4 -4
- package/modern/styles/createPalette.js +16 -13
- package/modern/styles/createTheme.js +16 -11
- package/modern/styles/createTransitions.js +17 -14
- package/modern/styles/createTypography.js +31 -29
- package/modern/styles/experimental_extendTheme.js +41 -33
- package/modern/styles/responsiveFontSizes.js +17 -11
- package/modern/usePagination/usePagination.js +18 -20
- package/modern/useScrollTrigger/useScrollTrigger.js +8 -10
- package/modern/utils/createSvgIcon.js +4 -5
- package/node/Accordion/Accordion.js +44 -43
- package/node/AccordionActions/AccordionActions.js +18 -18
- package/node/AccordionDetails/AccordionDetails.js +7 -9
- package/node/AccordionSummary/AccordionSummary.js +32 -32
- package/node/Alert/Alert.js +64 -60
- package/node/AlertTitle/AlertTitle.js +7 -9
- package/node/AppBar/AppBar.js +89 -73
- package/node/Autocomplete/Autocomplete.js +172 -141
- package/node/Avatar/Avatar.js +42 -38
- package/node/AvatarGroup/AvatarGroup.js +34 -33
- package/node/Backdrop/Backdrop.js +33 -31
- package/node/Badge/Badge.js +119 -107
- package/node/BottomNavigation/BottomNavigation.js +15 -17
- package/node/BottomNavigationAction/BottomNavigationAction.js +29 -31
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +35 -34
- package/node/Breadcrumbs/Breadcrumbs.js +19 -21
- package/node/Button/Button.js +168 -133
- package/node/ButtonBase/ButtonBase.js +43 -42
- package/node/ButtonBase/TouchRipple.js +9 -12
- package/node/ButtonGroup/ButtonGroup.js +111 -89
- package/node/Card/Card.js +11 -12
- package/node/CardActionArea/CardActionArea.js +9 -12
- package/node/CardActions/CardActions.js +18 -18
- package/node/CardContent/CardContent.js +11 -12
- package/node/CardHeader/CardHeader.js +30 -31
- package/node/CardMedia/CardMedia.js +28 -27
- package/node/Checkbox/Checkbox.js +44 -39
- package/node/Chip/Chip.js +146 -129
- package/node/CircularProgress/CircularProgress.js +43 -36
- package/node/Collapse/Collapse.js +73 -65
- package/node/CssBaseline/CssBaseline.js +17 -14
- package/node/Dialog/Dialog.js +103 -94
- package/node/DialogActions/DialogActions.js +18 -18
- package/node/DialogContent/DialogContent.js +22 -22
- package/node/DialogContentText/DialogContentText.js +13 -11
- package/node/DialogTitle/DialogTitle.js +8 -10
- package/node/Divider/Divider.js +99 -84
- package/node/Drawer/Drawer.js +85 -76
- package/node/Fab/Fab.js +71 -60
- package/node/Fade/Fade.js +31 -30
- package/node/FilledInput/FilledInput.js +135 -117
- package/node/FilledInput/filledInputClasses.js +4 -2
- package/node/FormControl/FormControl.js +41 -35
- package/node/FormControlLabel/FormControlLabel.js +43 -38
- package/node/FormGroup/FormGroup.js +16 -16
- package/node/FormHelperText/FormHelperText.js +30 -23
- package/node/FormLabel/FormLabel.js +26 -18
- package/node/GlobalStyles/GlobalStyles.js +3 -3
- package/node/Grid/Grid.js +54 -43
- package/node/Grow/Grow.js +31 -30
- package/node/Hidden/Hidden.js +24 -26
- package/node/Hidden/HiddenCss.js +29 -29
- package/node/Hidden/withWidth.js +19 -19
- package/node/Icon/Icon.js +14 -15
- package/node/IconButton/IconButton.js +59 -52
- package/node/ImageList/ImageList.js +30 -29
- package/node/ImageListItem/ImageListItem.js +40 -39
- package/node/ImageListItemBar/ImageListItemBar.js +47 -41
- package/node/Input/Input.js +77 -74
- package/node/Input/inputClasses.js +4 -2
- package/node/InputAdornment/InputAdornment.js +36 -34
- package/node/InputBase/InputBase.js +116 -92
- package/node/InputLabel/InputLabel.js +83 -68
- package/node/LinearProgress/LinearProgress.js +64 -58
- package/node/Link/Link.js +69 -64
- package/node/List/List.js +24 -24
- package/node/ListItem/ListItem.js +113 -96
- package/node/ListItemAvatar/ListItemAvatar.js +15 -15
- package/node/ListItemButton/ListItemButton.js +40 -35
- package/node/ListItemIcon/ListItemIcon.js +15 -15
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +15 -15
- package/node/ListItemText/ListItemText.js +34 -34
- package/node/ListSubheader/ListSubheader.js +36 -32
- package/node/Menu/Menu.js +38 -39
- package/node/MenuItem/MenuItem.js +50 -45
- package/node/MenuList/MenuList.js +17 -20
- package/node/MobileStepper/MobileStepper.js +61 -53
- package/node/Modal/Modal.js +50 -45
- package/node/NativeSelect/NativeSelect.js +26 -22
- package/node/NativeSelect/NativeSelectInput.js +50 -43
- package/node/OutlinedInput/NotchedOutline.js +55 -51
- package/node/OutlinedInput/OutlinedInput.js +72 -59
- package/node/OutlinedInput/outlinedInputClasses.js +4 -2
- package/node/Pagination/Pagination.js +35 -31
- package/node/PaginationItem/PaginationItem.js +105 -93
- package/node/Paper/Paper.js +32 -28
- package/node/Popover/Popover.js +49 -51
- package/node/Popper/Popper.js +25 -27
- package/node/Radio/Radio.js +36 -33
- package/node/Radio/RadioButtonIcon.js +11 -10
- package/node/RadioGroup/RadioGroup.js +14 -17
- package/node/Rating/Rating.js +88 -73
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +18 -15
- package/node/Select/Select.js +59 -55
- package/node/Select/SelectInput.js +58 -57
- package/node/Skeleton/Skeleton.js +51 -46
- package/node/Slide/Slide.js +39 -34
- package/node/Slider/Slider.js +281 -216
- package/node/Snackbar/Snackbar.js +81 -67
- package/node/SnackbarContent/SnackbarContent.js +13 -15
- package/node/SpeedDial/SpeedDial.js +85 -83
- package/node/SpeedDialAction/SpeedDialAction.js +59 -52
- package/node/SpeedDialIcon/SpeedDialIcon.js +25 -24
- package/node/Step/Step.js +27 -26
- package/node/StepButton/StepButton.js +23 -24
- package/node/StepConnector/StepConnector.js +34 -31
- package/node/StepContent/StepContent.js +23 -24
- package/node/StepIcon/StepIcon.js +22 -22
- package/node/StepLabel/StepLabel.js +34 -33
- package/node/Stepper/Stepper.js +33 -31
- package/node/SvgIcon/SvgIcon.js +19 -20
- package/node/SwipeableDrawer/SwipeArea.js +33 -30
- package/node/SwipeableDrawer/SwipeableDrawer.js +51 -44
- package/node/Switch/Switch.js +61 -52
- package/node/Tab/Tab.js +93 -83
- package/node/TabScrollButton/TabScrollButton.js +32 -26
- package/node/Table/Table.js +20 -19
- package/node/TableBody/TableBody.js +11 -12
- package/node/TableCell/TableCell.js +70 -59
- package/node/TableContainer/TableContainer.js +11 -12
- package/node/TableFooter/TableFooter.js +11 -12
- package/node/TableHead/TableHead.js +11 -12
- package/node/TablePagination/TablePagination.js +53 -49
- package/node/TablePagination/TablePaginationActions.js +22 -25
- package/node/TableRow/TableRow.js +13 -14
- package/node/TableSortLabel/TableSortLabel.js +23 -23
- package/node/Tabs/ScrollbarSize.js +7 -9
- package/node/Tabs/Tabs.js +107 -92
- package/node/TextField/TextField.js +57 -57
- package/node/ToggleButton/ToggleButton.js +38 -35
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +60 -59
- package/node/Toolbar/Toolbar.js +26 -25
- package/node/Tooltip/Tooltip.js +177 -147
- package/node/Typography/Typography.js +37 -32
- package/node/Zoom/Zoom.js +31 -30
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +45 -43
- package/node/locale/index.js +314 -1
- package/node/styles/CssVarsProvider.js +3 -3
- package/node/styles/ThemeProvider.js +7 -10
- package/node/styles/adaptV4Theme.js +31 -32
- package/node/styles/createMixins.js +4 -5
- package/node/styles/createPalette.js +16 -13
- package/node/styles/createTheme.js +16 -11
- package/node/styles/createTransitions.js +17 -15
- package/node/styles/createTypography.js +31 -30
- package/node/styles/experimental_extendTheme.js +41 -33
- package/node/styles/responsiveFontSizes.js +17 -12
- package/node/usePagination/usePagination.js +18 -21
- package/node/useScrollTrigger/useScrollTrigger.js +8 -11
- package/node/utils/createSvgIcon.js +4 -5
- package/package.json +5 -5
- package/styles/CssVarsProvider.js +3 -3
- package/styles/ThemeProvider.js +7 -10
- package/styles/adaptV4Theme.js +31 -31
- package/styles/createMixins.js +4 -4
- package/styles/createPalette.js +16 -13
- package/styles/createTheme.js +16 -11
- package/styles/createTransitions.js +17 -14
- package/styles/createTypography.js +31 -29
- package/styles/experimental_extendTheme.js +41 -33
- package/styles/responsiveFontSizes.js +17 -11
- package/umd/material-ui.development.js +7513 -6042
- package/umd/material-ui.production.min.js +21 -21
- package/usePagination/usePagination.js +18 -20
- package/useScrollTrigger/useScrollTrigger.js +8 -10
- package/utils/createSvgIcon.js +4 -5
package/modern/Slider/Slider.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import PropTypes from 'prop-types';
|
|
6
3
|
import clsx from 'clsx';
|
|
@@ -32,7 +29,7 @@ const SliderRoot = styled('span', {
|
|
|
32
29
|
})(({
|
|
33
30
|
theme,
|
|
34
31
|
ownerState
|
|
35
|
-
}) =>
|
|
32
|
+
}) => ({
|
|
36
33
|
borderRadius: 12,
|
|
37
34
|
boxSizing: 'content-box',
|
|
38
35
|
display: 'inline-block',
|
|
@@ -40,34 +37,39 @@ const SliderRoot = styled('span', {
|
|
|
40
37
|
cursor: 'pointer',
|
|
41
38
|
touchAction: 'none',
|
|
42
39
|
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
43
|
-
WebkitTapHighlightColor: 'transparent'
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
40
|
+
WebkitTapHighlightColor: 'transparent',
|
|
41
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
42
|
+
height: 4,
|
|
43
|
+
width: '100%',
|
|
44
|
+
padding: '13px 0',
|
|
45
|
+
// The primary input mechanism of the device includes a pointing device of limited accuracy.
|
|
46
|
+
'@media (pointer: coarse)': {
|
|
47
|
+
// Reach 42px touch target, about ~8mm on screen.
|
|
48
|
+
padding: '20px 0'
|
|
49
|
+
},
|
|
50
|
+
...(ownerState.size === 'small' && {
|
|
51
|
+
height: 2
|
|
52
|
+
}),
|
|
53
|
+
...(ownerState.marked && {
|
|
54
|
+
marginBottom: 20
|
|
55
|
+
})
|
|
56
|
+
}),
|
|
57
|
+
...(ownerState.orientation === 'vertical' && {
|
|
58
|
+
height: '100%',
|
|
59
|
+
width: 4,
|
|
60
|
+
padding: '0 13px',
|
|
61
|
+
// The primary input mechanism of the device includes a pointing device of limited accuracy.
|
|
62
|
+
'@media (pointer: coarse)': {
|
|
63
|
+
// Reach 42px touch target, about ~8mm on screen.
|
|
64
|
+
padding: '0 20px'
|
|
65
|
+
},
|
|
66
|
+
...(ownerState.size === 'small' && {
|
|
67
|
+
width: 2
|
|
68
|
+
}),
|
|
69
|
+
...(ownerState.marked && {
|
|
70
|
+
marginRight: 44
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
71
73
|
'@media print': {
|
|
72
74
|
colorAdjust: 'exact'
|
|
73
75
|
},
|
|
@@ -99,24 +101,27 @@ const SliderRail = styled('span', {
|
|
|
99
101
|
overridesResolver: (props, styles) => styles.rail
|
|
100
102
|
})(({
|
|
101
103
|
ownerState
|
|
102
|
-
}) =>
|
|
104
|
+
}) => ({
|
|
103
105
|
display: 'block',
|
|
104
106
|
position: 'absolute',
|
|
105
107
|
borderRadius: 'inherit',
|
|
106
108
|
backgroundColor: 'currentColor',
|
|
107
|
-
opacity: 0.38
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
opacity: 0.38,
|
|
110
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
111
|
+
width: '100%',
|
|
112
|
+
height: 'inherit',
|
|
113
|
+
top: '50%',
|
|
114
|
+
transform: 'translateY(-50%)'
|
|
115
|
+
}),
|
|
116
|
+
...(ownerState.orientation === 'vertical' && {
|
|
117
|
+
height: '100%',
|
|
118
|
+
width: 'inherit',
|
|
119
|
+
left: '50%',
|
|
120
|
+
transform: 'translateX(-50%)'
|
|
121
|
+
}),
|
|
122
|
+
...(ownerState.track === 'inverted' && {
|
|
123
|
+
opacity: 1
|
|
124
|
+
})
|
|
120
125
|
}));
|
|
121
126
|
process.env.NODE_ENV !== "production" ? SliderRail.propTypes /* remove-proptypes */ = {
|
|
122
127
|
// ----------------------------- Warning --------------------------------
|
|
@@ -140,7 +145,7 @@ const SliderTrack = styled('span', {
|
|
|
140
145
|
const color =
|
|
141
146
|
// Same logic as the LinearProgress track color
|
|
142
147
|
theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.5);
|
|
143
|
-
return
|
|
148
|
+
return {
|
|
144
149
|
display: 'block',
|
|
145
150
|
position: 'absolute',
|
|
146
151
|
borderRadius: 'inherit',
|
|
@@ -148,23 +153,28 @@ const SliderTrack = styled('span', {
|
|
|
148
153
|
backgroundColor: 'currentColor',
|
|
149
154
|
transition: theme.transitions.create(['left', 'width', 'bottom', 'height'], {
|
|
150
155
|
duration: theme.transitions.duration.shortest
|
|
156
|
+
}),
|
|
157
|
+
...(ownerState.size === 'small' && {
|
|
158
|
+
border: 'none'
|
|
159
|
+
}),
|
|
160
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
161
|
+
height: 'inherit',
|
|
162
|
+
top: '50%',
|
|
163
|
+
transform: 'translateY(-50%)'
|
|
164
|
+
}),
|
|
165
|
+
...(ownerState.orientation === 'vertical' && {
|
|
166
|
+
width: 'inherit',
|
|
167
|
+
left: '50%',
|
|
168
|
+
transform: 'translateX(-50%)'
|
|
169
|
+
}),
|
|
170
|
+
...(ownerState.track === false && {
|
|
171
|
+
display: 'none'
|
|
172
|
+
}),
|
|
173
|
+
...(ownerState.track === 'inverted' && {
|
|
174
|
+
backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
|
|
175
|
+
borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
|
|
151
176
|
})
|
|
152
|
-
}
|
|
153
|
-
border: 'none'
|
|
154
|
-
}, ownerState.orientation === 'horizontal' && {
|
|
155
|
-
height: 'inherit',
|
|
156
|
-
top: '50%',
|
|
157
|
-
transform: 'translateY(-50%)'
|
|
158
|
-
}, ownerState.orientation === 'vertical' && {
|
|
159
|
-
width: 'inherit',
|
|
160
|
-
left: '50%',
|
|
161
|
-
transform: 'translateX(-50%)'
|
|
162
|
-
}, ownerState.track === false && {
|
|
163
|
-
display: 'none'
|
|
164
|
-
}, ownerState.track === 'inverted' && {
|
|
165
|
-
backgroundColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color,
|
|
166
|
-
borderColor: theme.vars ? theme.vars.palette.Slider[`${ownerState.color}Track`] : color
|
|
167
|
-
});
|
|
177
|
+
};
|
|
168
178
|
});
|
|
169
179
|
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes /* remove-proptypes */ = {
|
|
170
180
|
// ----------------------------- Warning --------------------------------
|
|
@@ -189,7 +199,7 @@ const SliderThumb = styled('span', {
|
|
|
189
199
|
})(({
|
|
190
200
|
theme,
|
|
191
201
|
ownerState
|
|
192
|
-
}) =>
|
|
202
|
+
}) => ({
|
|
193
203
|
position: 'absolute',
|
|
194
204
|
width: 20,
|
|
195
205
|
height: 20,
|
|
@@ -202,27 +212,30 @@ const SliderThumb = styled('span', {
|
|
|
202
212
|
justifyContent: 'center',
|
|
203
213
|
transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
|
|
204
214
|
duration: theme.transitions.duration.shortest
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
}),
|
|
216
|
+
...(ownerState.size === 'small' && {
|
|
217
|
+
width: 12,
|
|
218
|
+
height: 12
|
|
219
|
+
}),
|
|
220
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
221
|
+
top: '50%',
|
|
222
|
+
transform: 'translate(-50%, -50%)'
|
|
223
|
+
}),
|
|
224
|
+
...(ownerState.orientation === 'vertical' && {
|
|
225
|
+
left: '50%',
|
|
226
|
+
transform: 'translate(-50%, 50%)'
|
|
227
|
+
}),
|
|
228
|
+
'&:before': {
|
|
217
229
|
position: 'absolute',
|
|
218
230
|
content: '""',
|
|
219
231
|
borderRadius: 'inherit',
|
|
220
232
|
width: '100%',
|
|
221
233
|
height: '100%',
|
|
222
|
-
boxShadow: (theme.vars || theme).shadows[2]
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
234
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
235
|
+
...(ownerState.size === 'small' && {
|
|
236
|
+
boxShadow: 'none'
|
|
237
|
+
})
|
|
238
|
+
},
|
|
226
239
|
'&::after': {
|
|
227
240
|
position: 'absolute',
|
|
228
241
|
content: '""',
|
|
@@ -267,13 +280,13 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
267
280
|
})(({
|
|
268
281
|
theme,
|
|
269
282
|
ownerState
|
|
270
|
-
}) =>
|
|
283
|
+
}) => ({
|
|
271
284
|
[`&.${sliderClasses.valueLabelOpen}`]: {
|
|
272
285
|
transform: `${ownerState.orientation === 'vertical' ? 'translateY(-50%)' : 'translateY(-100%)'} scale(1)`
|
|
273
286
|
},
|
|
274
287
|
zIndex: 1,
|
|
275
|
-
whiteSpace: 'nowrap'
|
|
276
|
-
|
|
288
|
+
whiteSpace: 'nowrap',
|
|
289
|
+
...theme.typography.body2,
|
|
277
290
|
fontWeight: 500,
|
|
278
291
|
transition: theme.transitions.create(['transform'], {
|
|
279
292
|
duration: theme.transitions.duration.shortest
|
|
@@ -286,37 +299,40 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
286
299
|
display: 'flex',
|
|
287
300
|
alignItems: 'center',
|
|
288
301
|
justifyContent: 'center',
|
|
289
|
-
padding: '0.25rem 0.75rem'
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
302
|
+
padding: '0.25rem 0.75rem',
|
|
303
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
304
|
+
top: '-10px',
|
|
305
|
+
transformOrigin: 'bottom center',
|
|
306
|
+
'&:before': {
|
|
307
|
+
position: 'absolute',
|
|
308
|
+
content: '""',
|
|
309
|
+
width: 8,
|
|
310
|
+
height: 8,
|
|
311
|
+
transform: 'translate(-50%, 50%) rotate(45deg)',
|
|
312
|
+
backgroundColor: 'inherit',
|
|
313
|
+
bottom: 0,
|
|
314
|
+
left: '50%'
|
|
315
|
+
}
|
|
316
|
+
}),
|
|
317
|
+
...(ownerState.orientation === 'vertical' && {
|
|
318
|
+
right: ownerState.size === 'small' ? '20px' : '30px',
|
|
319
|
+
top: '50%',
|
|
320
|
+
transformOrigin: 'right center',
|
|
321
|
+
'&:before': {
|
|
322
|
+
position: 'absolute',
|
|
323
|
+
content: '""',
|
|
324
|
+
width: 8,
|
|
325
|
+
height: 8,
|
|
326
|
+
transform: 'translate(-50%, -50%) rotate(45deg)',
|
|
327
|
+
backgroundColor: 'inherit',
|
|
328
|
+
right: '-20%',
|
|
329
|
+
top: '50%'
|
|
330
|
+
}
|
|
331
|
+
}),
|
|
332
|
+
...(ownerState.size === 'small' && {
|
|
333
|
+
fontSize: theme.typography.pxToRem(12),
|
|
334
|
+
padding: '0.25rem 0.5rem'
|
|
335
|
+
})
|
|
320
336
|
}));
|
|
321
337
|
process.env.NODE_ENV !== "production" ? StyledSliderValueLabel.propTypes /* remove-proptypes */ = {
|
|
322
338
|
// ----------------------------- Warning --------------------------------
|
|
@@ -343,21 +359,24 @@ const SliderMark = styled('span', {
|
|
|
343
359
|
theme,
|
|
344
360
|
ownerState,
|
|
345
361
|
markActive
|
|
346
|
-
}) =>
|
|
362
|
+
}) => ({
|
|
347
363
|
position: 'absolute',
|
|
348
364
|
width: 2,
|
|
349
365
|
height: 2,
|
|
350
366
|
borderRadius: 1,
|
|
351
|
-
backgroundColor: 'currentColor'
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
},
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
367
|
+
backgroundColor: 'currentColor',
|
|
368
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
369
|
+
top: '50%',
|
|
370
|
+
transform: 'translate(-1px, -50%)'
|
|
371
|
+
}),
|
|
372
|
+
...(ownerState.orientation === 'vertical' && {
|
|
373
|
+
left: '50%',
|
|
374
|
+
transform: 'translate(-50%, 1px)'
|
|
375
|
+
}),
|
|
376
|
+
...(markActive && {
|
|
377
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
378
|
+
opacity: 0.8
|
|
379
|
+
})
|
|
361
380
|
}));
|
|
362
381
|
process.env.NODE_ENV !== "production" ? SliderMark.propTypes /* remove-proptypes */ = {
|
|
363
382
|
// ----------------------------- Warning --------------------------------
|
|
@@ -379,24 +398,28 @@ const SliderMarkLabel = styled('span', {
|
|
|
379
398
|
theme,
|
|
380
399
|
ownerState,
|
|
381
400
|
markLabelActive
|
|
382
|
-
}) =>
|
|
401
|
+
}) => ({
|
|
402
|
+
...theme.typography.body2,
|
|
383
403
|
color: (theme.vars || theme).palette.text.secondary,
|
|
384
404
|
position: 'absolute',
|
|
385
|
-
whiteSpace: 'nowrap'
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
405
|
+
whiteSpace: 'nowrap',
|
|
406
|
+
...(ownerState.orientation === 'horizontal' && {
|
|
407
|
+
top: 30,
|
|
408
|
+
transform: 'translateX(-50%)',
|
|
409
|
+
'@media (pointer: coarse)': {
|
|
410
|
+
top: 40
|
|
411
|
+
}
|
|
412
|
+
}),
|
|
413
|
+
...(ownerState.orientation === 'vertical' && {
|
|
414
|
+
left: 36,
|
|
415
|
+
transform: 'translateY(50%)',
|
|
416
|
+
'@media (pointer: coarse)': {
|
|
417
|
+
left: 44
|
|
418
|
+
}
|
|
419
|
+
}),
|
|
420
|
+
...(markLabelActive && {
|
|
421
|
+
color: (theme.vars || theme).palette.text.primary
|
|
422
|
+
})
|
|
400
423
|
}));
|
|
401
424
|
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes /* remove-proptypes */ = {
|
|
402
425
|
// ----------------------------- Warning --------------------------------
|
|
@@ -447,35 +470,41 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
447
470
|
const theme = useTheme();
|
|
448
471
|
const isRtl = theme.direction === 'rtl';
|
|
449
472
|
const {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
473
|
+
'aria-label': ariaLabel,
|
|
474
|
+
'aria-valuetext': ariaValuetext,
|
|
475
|
+
'aria-labelledby': ariaLabelledby,
|
|
476
|
+
// eslint-disable-next-line react/prop-types
|
|
477
|
+
component = 'span',
|
|
478
|
+
components = {},
|
|
479
|
+
componentsProps = {},
|
|
480
|
+
color = 'primary',
|
|
481
|
+
classes: classesProp,
|
|
482
|
+
className,
|
|
483
|
+
disableSwap = false,
|
|
484
|
+
disabled = false,
|
|
485
|
+
getAriaLabel,
|
|
486
|
+
getAriaValueText,
|
|
487
|
+
marks: marksProp = false,
|
|
488
|
+
max = 100,
|
|
489
|
+
min = 0,
|
|
490
|
+
name,
|
|
491
|
+
onChange,
|
|
492
|
+
onChangeCommitted,
|
|
493
|
+
orientation = 'horizontal',
|
|
494
|
+
size = 'medium',
|
|
495
|
+
step = 1,
|
|
496
|
+
scale = Identity,
|
|
497
|
+
slotProps,
|
|
498
|
+
slots,
|
|
499
|
+
tabIndex,
|
|
500
|
+
track = 'normal',
|
|
501
|
+
value: valueProp,
|
|
502
|
+
valueLabelDisplay = 'off',
|
|
503
|
+
valueLabelFormat = Identity,
|
|
504
|
+
...other
|
|
505
|
+
} = props;
|
|
506
|
+
const ownerState = {
|
|
507
|
+
...props,
|
|
479
508
|
isRtl,
|
|
480
509
|
max,
|
|
481
510
|
min,
|
|
@@ -491,7 +520,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
491
520
|
track,
|
|
492
521
|
valueLabelDisplay,
|
|
493
522
|
valueLabelFormat
|
|
494
|
-
}
|
|
523
|
+
};
|
|
495
524
|
const {
|
|
496
525
|
axisProps,
|
|
497
526
|
getRootProps,
|
|
@@ -507,9 +536,10 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
507
536
|
values,
|
|
508
537
|
trackOffset,
|
|
509
538
|
trackLeap
|
|
510
|
-
} = useSlider(
|
|
539
|
+
} = useSlider({
|
|
540
|
+
...ownerState,
|
|
511
541
|
rootRef: ref
|
|
512
|
-
})
|
|
542
|
+
});
|
|
513
543
|
ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
|
|
514
544
|
ownerState.dragging = dragging;
|
|
515
545
|
ownerState.focusedThumbIndex = focusedThumbIndex;
|
|
@@ -537,10 +567,15 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
537
567
|
getSlotProps: getRootProps,
|
|
538
568
|
externalSlotProps: rootSlotProps,
|
|
539
569
|
externalForwardedProps: other,
|
|
540
|
-
additionalProps:
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
570
|
+
additionalProps: {
|
|
571
|
+
...(shouldSpreadAdditionalProps(RootSlot) && {
|
|
572
|
+
as: component
|
|
573
|
+
})
|
|
574
|
+
},
|
|
575
|
+
ownerState: {
|
|
576
|
+
...ownerState,
|
|
577
|
+
...rootSlotProps?.ownerState
|
|
578
|
+
},
|
|
544
579
|
className: [classes.root, className]
|
|
545
580
|
});
|
|
546
581
|
const railProps = useSlotProps({
|
|
@@ -553,22 +588,34 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
553
588
|
elementType: TrackSlot,
|
|
554
589
|
externalSlotProps: trackSlotProps,
|
|
555
590
|
additionalProps: {
|
|
556
|
-
style:
|
|
591
|
+
style: {
|
|
592
|
+
...axisProps[axis].offset(trackOffset),
|
|
593
|
+
...axisProps[axis].leap(trackLeap)
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
ownerState: {
|
|
597
|
+
...ownerState,
|
|
598
|
+
...trackSlotProps?.ownerState
|
|
557
599
|
},
|
|
558
|
-
ownerState: _extends({}, ownerState, trackSlotProps?.ownerState),
|
|
559
600
|
className: classes.track
|
|
560
601
|
});
|
|
561
602
|
const thumbProps = useSlotProps({
|
|
562
603
|
elementType: ThumbSlot,
|
|
563
604
|
getSlotProps: getThumbProps,
|
|
564
605
|
externalSlotProps: thumbSlotProps,
|
|
565
|
-
ownerState:
|
|
606
|
+
ownerState: {
|
|
607
|
+
...ownerState,
|
|
608
|
+
...thumbSlotProps?.ownerState
|
|
609
|
+
},
|
|
566
610
|
className: classes.thumb
|
|
567
611
|
});
|
|
568
612
|
const valueLabelProps = useSlotProps({
|
|
569
613
|
elementType: ValueLabelSlot,
|
|
570
614
|
externalSlotProps: valueLabelSlotProps,
|
|
571
|
-
ownerState:
|
|
615
|
+
ownerState: {
|
|
616
|
+
...ownerState,
|
|
617
|
+
...valueLabelSlotProps?.ownerState
|
|
618
|
+
},
|
|
572
619
|
className: classes.valueLabel
|
|
573
620
|
});
|
|
574
621
|
const markProps = useSlotProps({
|
|
@@ -589,8 +636,13 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
589
636
|
externalSlotProps: inputSlotProps,
|
|
590
637
|
ownerState
|
|
591
638
|
});
|
|
592
|
-
return /*#__PURE__*/_jsxs(RootSlot,
|
|
593
|
-
|
|
639
|
+
return /*#__PURE__*/_jsxs(RootSlot, {
|
|
640
|
+
...rootProps,
|
|
641
|
+
children: [/*#__PURE__*/_jsx(RailSlot, {
|
|
642
|
+
...railProps
|
|
643
|
+
}), /*#__PURE__*/_jsx(TrackSlot, {
|
|
644
|
+
...trackProps
|
|
645
|
+
}), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
|
|
594
646
|
const percent = valueToPercent(mark.value, min, max);
|
|
595
647
|
const style = axisProps[axis].offset(percent);
|
|
596
648
|
let markActive;
|
|
@@ -600,23 +652,31 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
600
652
|
markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);
|
|
601
653
|
}
|
|
602
654
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
603
|
-
children: [/*#__PURE__*/_jsx(MarkSlot,
|
|
604
|
-
"data-index": index
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
655
|
+
children: [/*#__PURE__*/_jsx(MarkSlot, {
|
|
656
|
+
"data-index": index,
|
|
657
|
+
...markProps,
|
|
658
|
+
...(!isHostComponent(MarkSlot) && {
|
|
659
|
+
markActive
|
|
660
|
+
}),
|
|
661
|
+
style: {
|
|
662
|
+
...style,
|
|
663
|
+
...markProps.style
|
|
664
|
+
},
|
|
609
665
|
className: clsx(markProps.className, markActive && classes.markActive)
|
|
610
|
-
})
|
|
666
|
+
}), mark.label != null ? /*#__PURE__*/_jsx(MarkLabelSlot, {
|
|
611
667
|
"aria-hidden": true,
|
|
612
|
-
"data-index": index
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
668
|
+
"data-index": index,
|
|
669
|
+
...markLabelProps,
|
|
670
|
+
...(!isHostComponent(MarkLabelSlot) && {
|
|
671
|
+
markLabelActive: markActive
|
|
672
|
+
}),
|
|
673
|
+
style: {
|
|
674
|
+
...style,
|
|
675
|
+
...markLabelProps.style
|
|
676
|
+
},
|
|
617
677
|
className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive),
|
|
618
678
|
children: mark.label
|
|
619
|
-
})
|
|
679
|
+
}) : null]
|
|
620
680
|
}, index);
|
|
621
681
|
}), values.map((value, index) => {
|
|
622
682
|
const percent = valueToPercent(value, min, max);
|
|
@@ -625,34 +685,39 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
625
685
|
return (
|
|
626
686
|
/*#__PURE__*/
|
|
627
687
|
/* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
|
|
628
|
-
_jsx(ValueLabelComponent,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
688
|
+
_jsx(ValueLabelComponent, {
|
|
689
|
+
...(!isHostComponent(ValueLabelComponent) && {
|
|
690
|
+
valueLabelFormat,
|
|
691
|
+
valueLabelDisplay,
|
|
692
|
+
value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
|
|
693
|
+
index,
|
|
694
|
+
open: open === index || active === index || valueLabelDisplay === 'on',
|
|
695
|
+
disabled
|
|
696
|
+
}),
|
|
697
|
+
...valueLabelProps,
|
|
698
|
+
children: /*#__PURE__*/_jsx(ThumbSlot, {
|
|
699
|
+
"data-index": index,
|
|
700
|
+
...thumbProps,
|
|
639
701
|
className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
|
|
640
|
-
style:
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
702
|
+
style: {
|
|
703
|
+
...style,
|
|
704
|
+
pointerEvents: disableSwap && active !== index ? 'none' : undefined,
|
|
705
|
+
...thumbProps.style
|
|
706
|
+
},
|
|
707
|
+
children: /*#__PURE__*/_jsx(InputSlot, {
|
|
644
708
|
"data-index": index,
|
|
645
709
|
"aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
|
646
710
|
"aria-valuenow": scale(value),
|
|
647
711
|
"aria-labelledby": ariaLabelledby,
|
|
648
712
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
|
649
|
-
value: values[index]
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
713
|
+
value: values[index],
|
|
714
|
+
...inputSliderProps
|
|
715
|
+
})
|
|
716
|
+
})
|
|
717
|
+
}, index)
|
|
653
718
|
);
|
|
654
719
|
})]
|
|
655
|
-
})
|
|
720
|
+
});
|
|
656
721
|
});
|
|
657
722
|
process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */ = {
|
|
658
723
|
// ----------------------------- Warning --------------------------------
|