@mui/material 6.0.0-dev.240424162023-9968b4889d → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +13 -4
- package/Accordion/Accordion.js +73 -54
- package/Accordion/accordionClasses.d.ts +2 -0
- package/Accordion/accordionClasses.js +1 -1
- package/Accordion/index.js +3 -3
- package/AccordionActions/AccordionActions.d.ts +1 -1
- package/AccordionActions/AccordionActions.js +15 -16
- package/AccordionActions/index.js +3 -3
- package/AccordionDetails/AccordionDetails.d.ts +1 -1
- package/AccordionDetails/AccordionDetails.js +14 -15
- package/AccordionDetails/index.js +3 -3
- package/AccordionSummary/AccordionSummary.js +27 -28
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/AccordionSummary/index.js +3 -3
- package/Alert/Alert.d.ts +15 -6
- package/Alert/Alert.js +74 -68
- package/Alert/alertClasses.d.ts +12 -12
- package/Alert/index.js +3 -3
- package/AlertTitle/AlertTitle.d.ts +3 -3
- package/AlertTitle/AlertTitle.js +15 -16
- package/AlertTitle/index.js +3 -3
- package/AppBar/AppBar.js +45 -46
- package/AppBar/index.js +3 -3
- package/Autocomplete/Autocomplete.d.ts +81 -21
- package/Autocomplete/Autocomplete.js +261 -184
- package/Autocomplete/index.js +3 -3
- package/Avatar/Avatar.d.ts +0 -1
- package/Avatar/Avatar.js +53 -45
- package/Avatar/index.js +3 -3
- package/AvatarGroup/AvatarGroup.d.ts +51 -18
- package/AvatarGroup/AvatarGroup.js +68 -48
- package/AvatarGroup/index.js +3 -3
- package/Backdrop/Backdrop.d.ts +4 -7
- package/Backdrop/Backdrop.js +41 -41
- package/Backdrop/index.js +3 -3
- package/Badge/Badge.d.ts +3 -3
- package/Badge/Badge.js +43 -41
- package/Badge/index.js +3 -3
- package/Badge/useBadge.d.ts +13 -0
- package/Badge/useBadge.js +41 -0
- package/Badge/useBadge.types.d.ts +39 -0
- package/BottomNavigation/BottomNavigation.js +22 -23
- package/BottomNavigation/index.js +3 -3
- package/BottomNavigationAction/BottomNavigationAction.js +26 -28
- package/BottomNavigationAction/index.js +3 -3
- package/Box/Box.js +4 -4
- package/Box/index.js +3 -3
- package/Breadcrumbs/BreadcrumbCollapsed.js +41 -39
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +27 -29
- package/Breadcrumbs/index.js +3 -3
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +48 -44
- package/Button/buttonClasses.d.ts +33 -33
- package/Button/index.js +3 -3
- package/ButtonBase/ButtonBase.d.ts +1 -1
- package/ButtonBase/ButtonBase.js +69 -97
- package/ButtonBase/TouchRipple.js +14 -17
- package/ButtonBase/index.js +5 -5
- package/ButtonGroup/ButtonGroup.js +33 -34
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/ButtonGroup/index.js +5 -5
- package/CHANGELOG.md +1367 -22
- package/Card/Card.js +16 -17
- package/Card/index.js +3 -3
- package/CardActionArea/CardActionArea.js +19 -21
- package/CardActionArea/index.js +3 -3
- package/CardActions/CardActions.d.ts +1 -1
- package/CardActions/CardActions.js +15 -16
- package/CardActions/index.js +3 -3
- package/CardContent/CardContent.js +15 -16
- package/CardContent/index.js +3 -3
- package/CardHeader/CardHeader.d.ts +1 -1
- package/CardHeader/CardHeader.js +41 -38
- package/CardHeader/index.js +3 -3
- package/CardMedia/CardMedia.js +25 -26
- package/CardMedia/index.js +3 -3
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.js +43 -37
- package/Checkbox/index.js +3 -3
- package/Chip/Chip.d.ts +3 -3
- package/Chip/Chip.js +50 -50
- package/Chip/chipClasses.d.ts +28 -26
- package/Chip/chipClasses.js +1 -1
- package/Chip/index.js +3 -3
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +34 -32
- package/CircularProgress/circularProgressClasses.d.ts +6 -2
- package/CircularProgress/index.js +3 -3
- package/ClickAwayListener/ClickAwayListener.d.ts +47 -0
- package/ClickAwayListener/ClickAwayListener.js +177 -0
- package/ClickAwayListener/index.d.ts +2 -2
- package/ClickAwayListener/index.js +1 -1
- package/Collapse/Collapse.d.ts +1 -1
- package/Collapse/Collapse.js +117 -84
- package/Collapse/index.js +3 -3
- package/Container/Container.js +3 -3
- package/Container/index.js +3 -3
- package/CssBaseline/CssBaseline.d.ts +1 -1
- package/CssBaseline/CssBaseline.js +84 -23
- package/CssBaseline/index.js +1 -1
- package/DefaultPropsProvider/DefaultPropsProvider.d.ts +15 -0
- package/{Unstable_Grid2/Grid2.js → DefaultPropsProvider/DefaultPropsProvider.js} +15 -18
- package/DefaultPropsProvider/index.d.ts +1 -0
- package/DefaultPropsProvider/index.js +1 -0
- package/DefaultPropsProvider/package.json +6 -0
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +156 -115
- package/Dialog/index.js +3 -3
- package/DialogActions/DialogActions.d.ts +1 -1
- package/DialogActions/DialogActions.js +28 -25
- package/DialogActions/index.js +3 -3
- package/DialogContent/DialogContent.d.ts +1 -1
- package/DialogContent/DialogContent.js +41 -31
- package/DialogContent/index.js +3 -3
- package/DialogContentText/DialogContentText.js +20 -17
- package/DialogContentText/index.js +3 -3
- package/DialogTitle/DialogTitle.js +14 -16
- package/DialogTitle/index.js +3 -3
- package/Divider/Divider.d.ts +1 -1
- package/Divider/Divider.js +36 -32
- package/Divider/index.js +3 -3
- package/Drawer/Drawer.d.ts +1 -1
- package/Drawer/Drawer.js +134 -92
- package/Drawer/index.js +3 -3
- package/Fab/Fab.js +38 -34
- package/Fab/index.js +3 -3
- package/Fade/Fade.d.ts +2 -2
- package/Fade/Fade.js +36 -34
- package/Fade/index.js +1 -1
- package/FilledInput/FilledInput.d.ts +2 -1
- package/FilledInput/FilledInput.js +231 -141
- package/FilledInput/filledInputClasses.d.ts +1 -13
- package/FilledInput/filledInputClasses.js +5 -3
- package/FilledInput/index.js +3 -3
- package/FormControl/FormControl.js +35 -33
- package/FormControl/index.js +4 -4
- package/FormControl/useFormControl.js +1 -1
- package/FormControlLabel/FormControlLabel.d.ts +23 -16
- package/FormControlLabel/FormControlLabel.js +64 -41
- package/FormControlLabel/index.js +3 -3
- package/FormGroup/FormGroup.d.ts +1 -1
- package/FormGroup/FormGroup.js +17 -18
- package/FormGroup/index.js +3 -3
- package/FormHelperText/FormHelperText.js +36 -27
- package/FormHelperText/index.js +3 -3
- package/FormLabel/FormLabel.js +59 -40
- package/FormLabel/index.js +4 -4
- package/GlobalStyles/GlobalStyles.d.ts +1 -1
- package/GlobalStyles/GlobalStyles.js +5 -5
- package/GlobalStyles/index.js +1 -1
- package/Grid/Grid.d.ts +3 -0
- package/Grid/Grid.js +71 -62
- package/Grid/index.js +3 -3
- package/Grid2/Grid2.d.ts +109 -0
- package/Grid2/Grid2.js +112 -0
- package/{Unstable_Grid2 → Grid2}/grid2Classes.d.ts +1 -1
- package/{Unstable_Grid2 → Grid2}/index.d.ts +1 -1
- package/Grid2/index.js +6 -0
- package/{Unstable_Grid2 → Grid2}/package.json +1 -1
- package/Grow/Grow.d.ts +2 -2
- package/Grow/Grow.js +39 -35
- package/Grow/index.js +1 -1
- package/Hidden/Hidden.d.ts +2 -0
- package/Hidden/Hidden.js +25 -24
- package/Hidden/HiddenCss.js +35 -33
- package/Hidden/HiddenJs.js +2 -2
- package/Hidden/hiddenCssClasses.d.ts +3 -0
- package/Hidden/index.js +1 -1
- package/Hidden/withWidth.js +22 -22
- package/Icon/Icon.js +83 -43
- package/Icon/index.js +3 -3
- package/IconButton/IconButton.js +78 -80
- package/IconButton/index.js +3 -3
- package/ImageList/ImageList.js +29 -37
- package/ImageList/index.js +3 -3
- package/ImageListItem/ImageListItem.js +25 -26
- package/ImageListItem/index.js +3 -3
- package/ImageListItemBar/ImageListItemBar.d.ts +1 -1
- package/ImageListItemBar/ImageListItemBar.js +30 -31
- package/ImageListItemBar/imageListItemBarClasses.d.ts +16 -4
- package/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/ImageListItemBar/index.js +3 -3
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +10 -0
- package/InitColorSchemeScript/InitColorSchemeScript.js +16 -0
- package/InitColorSchemeScript/index.d.ts +1 -0
- package/InitColorSchemeScript/index.js +1 -0
- package/InitColorSchemeScript/package.json +6 -0
- package/Input/Input.d.ts +2 -1
- package/Input/Input.js +109 -88
- package/Input/index.js +3 -3
- package/Input/inputClasses.js +5 -3
- package/InputAdornment/InputAdornment.js +62 -49
- package/InputAdornment/index.js +3 -3
- package/InputBase/InputBase.d.ts +3 -5
- package/InputBase/InputBase.js +187 -148
- package/InputBase/index.js +3 -3
- package/InputLabel/InputLabel.js +147 -80
- package/InputLabel/index.js +3 -3
- package/LinearProgress/LinearProgress.d.ts +1 -1
- package/LinearProgress/LinearProgress.js +35 -36
- package/LinearProgress/index.js +3 -3
- package/Link/Link.js +162 -91
- package/Link/getTextDecoration.d.ts +0 -7
- package/Link/getTextDecoration.js +2 -12
- package/Link/index.js +3 -3
- package/List/List.js +39 -32
- package/List/index.js +3 -3
- package/ListItem/ListItem.d.ts +5 -61
- package/ListItem/ListItem.js +75 -152
- package/ListItem/index.js +3 -3
- package/ListItem/listItemClasses.d.ts +0 -8
- package/ListItem/listItemClasses.js +1 -1
- package/ListItemAvatar/ListItemAvatar.d.ts +1 -1
- package/ListItemAvatar/ListItemAvatar.js +15 -16
- package/ListItemAvatar/index.js +3 -3
- package/ListItemButton/ListItemButton.js +35 -32
- package/ListItemButton/index.js +3 -3
- package/ListItemIcon/ListItemIcon.d.ts +1 -1
- package/ListItemIcon/ListItemIcon.js +29 -24
- package/ListItemIcon/index.js +3 -3
- package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +5 -1
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +17 -16
- package/ListItemSecondaryAction/index.js +3 -3
- package/ListItemText/ListItemText.d.ts +3 -1
- package/ListItemText/ListItemText.js +36 -34
- package/ListItemText/index.js +3 -3
- package/ListSubheader/ListSubheader.js +26 -24
- package/ListSubheader/index.js +3 -3
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.js +43 -47
- package/Menu/index.js +3 -3
- package/MenuItem/MenuItem.js +81 -58
- package/MenuItem/index.js +3 -3
- package/MenuList/MenuList.js +23 -26
- package/MenuList/index.js +1 -1
- package/MobileStepper/MobileStepper.d.ts +1 -1
- package/MobileStepper/MobileStepper.js +34 -34
- package/MobileStepper/index.js +3 -3
- package/Modal/Modal.d.ts +4 -6
- package/Modal/Modal.js +84 -66
- package/Modal/ModalManager.d.ts +25 -0
- package/Modal/ModalManager.js +211 -0
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +4 -4
- package/Modal/useModal.d.ts +13 -0
- package/Modal/useModal.js +195 -0
- package/Modal/useModal.types.d.ts +114 -0
- package/NativeSelect/NativeSelect.d.ts +2 -2
- package/NativeSelect/NativeSelect.js +33 -29
- package/NativeSelect/NativeSelectInput.js +93 -69
- package/NativeSelect/index.js +3 -3
- package/NoSsr/NoSsr.d.ts +25 -0
- package/NoSsr/NoSsr.js +73 -0
- package/NoSsr/NoSsr.types.d.ts +18 -0
- package/NoSsr/NoSsr.types.js +1 -0
- package/NoSsr/index.d.ts +3 -2
- package/NoSsr/index.js +1 -1
- package/OutlinedInput/NotchedOutline.js +74 -56
- package/OutlinedInput/OutlinedInput.d.ts +3 -1
- package/OutlinedInput/OutlinedInput.js +154 -92
- package/OutlinedInput/index.js +3 -3
- package/OutlinedInput/outlinedInputClasses.js +5 -3
- package/OverridableComponent.d.ts +2 -2
- package/Pagination/Pagination.d.ts +8 -4
- package/Pagination/Pagination.js +44 -40
- package/Pagination/index.js +3 -3
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +107 -61
- package/PaginationItem/index.js +3 -3
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Paper/Paper.js +64 -38
- package/Paper/index.js +3 -3
- package/PigmentContainer/PigmentContainer.d.ts +55 -0
- package/PigmentContainer/PigmentContainer.js +98 -0
- package/PigmentContainer/index.d.ts +3 -0
- package/PigmentContainer/index.js +3 -0
- package/PigmentContainer/package.json +6 -0
- package/PigmentGrid/PigmentGrid.d.ts +108 -0
- package/PigmentGrid/PigmentGrid.js +149 -0
- package/PigmentGrid/index.d.ts +3 -0
- package/PigmentGrid/index.js +3 -0
- package/{useTouchRipple → PigmentGrid}/package.json +1 -1
- package/PigmentHidden/PigmentHidden.d.ts +97 -0
- package/PigmentHidden/PigmentHidden.js +278 -0
- package/PigmentHidden/index.d.ts +2 -0
- package/PigmentHidden/index.js +2 -0
- package/PigmentHidden/package.json +6 -0
- package/PigmentStack/PigmentStack.d.ts +51 -0
- package/PigmentStack/PigmentStack.js +81 -0
- package/PigmentStack/index.d.ts +3 -0
- package/PigmentStack/index.js +3 -0
- package/PigmentStack/package.json +6 -0
- package/Popover/Popover.d.ts +18 -23
- package/Popover/Popover.js +97 -96
- package/Popover/index.js +4 -4
- package/Popper/BasePopper.d.ts +7 -0
- package/Popper/BasePopper.js +370 -0
- package/Popper/BasePopper.types.d.ts +130 -0
- package/Popper/BasePopper.types.js +1 -0
- package/Popper/Popper.d.ts +5 -1
- package/Popper/Popper.js +36 -33
- package/Popper/index.d.ts +2 -1
- package/Popper/index.js +2 -1
- package/Popper/popperClasses.d.ts +8 -0
- package/Popper/popperClasses.js +7 -0
- package/Portal/Portal.d.ts +16 -0
- package/Portal/Portal.js +91 -0
- package/Portal/Portal.types.d.ts +23 -0
- package/Portal/Portal.types.js +1 -0
- package/Portal/index.d.ts +3 -2
- package/Portal/index.js +1 -1
- package/README.md +1 -1
- package/Radio/Radio.d.ts +1 -1
- package/Radio/Radio.js +38 -33
- package/Radio/RadioButtonIcon.js +10 -9
- package/Radio/index.js +3 -3
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/RadioGroup/RadioGroup.js +21 -24
- package/RadioGroup/index.js +4 -4
- package/RadioGroup/useRadioGroup.js +1 -1
- package/Rating/Rating.d.ts +2 -2
- package/Rating/Rating.js +73 -71
- package/Rating/index.js +3 -3
- package/ScopedCssBaseline/ScopedCssBaseline.js +45 -28
- package/ScopedCssBaseline/index.js +3 -3
- package/Select/Select.d.ts +2 -2
- package/Select/Select.js +77 -69
- package/Select/SelectInput.js +80 -73
- package/Select/index.js +3 -3
- package/Select/selectClasses.d.ts +2 -0
- package/Skeleton/Skeleton.js +133 -85
- package/Skeleton/index.js +3 -3
- package/Slide/Slide.d.ts +2 -2
- package/Slide/Slide.js +44 -39
- package/Slide/index.js +1 -1
- package/Slider/Slider.d.ts +5 -5
- package/Slider/Slider.js +182 -131
- package/Slider/SliderValueLabel.js +1 -1
- package/Slider/SliderValueLabel.types.d.ts +1 -2
- package/Slider/index.js +4 -4
- package/Slider/useSlider.d.ts +14 -0
- package/Slider/useSlider.js +647 -0
- package/Slider/useSlider.types.d.ts +228 -0
- package/Slider/useSlider.types.js +1 -0
- package/Snackbar/Snackbar.d.ts +4 -4
- package/Snackbar/Snackbar.js +127 -94
- package/Snackbar/index.js +3 -3
- package/Snackbar/useSnackbar.d.ts +14 -0
- package/Snackbar/useSnackbar.js +133 -0
- package/Snackbar/useSnackbar.types.d.ts +59 -0
- package/Snackbar/useSnackbar.types.js +1 -0
- package/SnackbarContent/SnackbarContent.d.ts +1 -1
- package/SnackbarContent/SnackbarContent.js +21 -22
- package/SnackbarContent/index.js +3 -3
- package/SpeedDial/SpeedDial.d.ts +27 -2
- package/SpeedDial/SpeedDial.js +162 -107
- package/SpeedDial/index.js +3 -3
- package/SpeedDialAction/SpeedDialAction.d.ts +1 -1
- package/SpeedDialAction/SpeedDialAction.js +96 -68
- package/SpeedDialAction/index.js +3 -3
- package/SpeedDialIcon/SpeedDialIcon.d.ts +3 -1
- package/SpeedDialIcon/SpeedDialIcon.js +52 -32
- package/SpeedDialIcon/index.js +3 -3
- package/Stack/Stack.js +2 -2
- package/Stack/index.js +2 -2
- package/Step/Step.js +24 -26
- package/Step/index.js +5 -5
- package/StepButton/StepButton.js +25 -26
- package/StepButton/index.js +3 -3
- package/StepConnector/StepConnector.d.ts +2 -2
- package/StepConnector/StepConnector.js +20 -21
- package/StepConnector/index.js +3 -3
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +28 -29
- package/StepContent/index.js +3 -3
- package/StepIcon/StepIcon.d.ts +1 -1
- package/StepIcon/StepIcon.js +34 -33
- package/StepIcon/index.js +3 -3
- package/StepLabel/StepLabel.d.ts +2 -4
- package/StepLabel/StepLabel.js +47 -46
- package/StepLabel/index.js +3 -3
- package/Stepper/Stepper.d.ts +1 -1
- package/Stepper/Stepper.js +31 -30
- package/Stepper/index.js +5 -5
- package/Stepper/stepperClasses.d.ts +2 -0
- package/Stepper/stepperClasses.js +1 -1
- package/SvgIcon/SvgIcon.js +99 -46
- package/SvgIcon/index.js +3 -3
- package/SwipeableDrawer/SwipeArea.js +58 -37
- package/SwipeableDrawer/SwipeableDrawer.js +62 -56
- package/SwipeableDrawer/index.js +1 -1
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.js +37 -33
- package/Switch/index.js +3 -3
- package/Tab/Tab.d.ts +1 -1
- package/Tab/Tab.js +174 -98
- package/Tab/index.js +3 -3
- package/Tab/tabClasses.d.ts +5 -1
- package/Tab/tabClasses.js +1 -1
- package/TabScrollButton/TabScrollButton.d.ts +2 -2
- package/TabScrollButton/TabScrollButton.js +54 -36
- package/TabScrollButton/index.js +3 -3
- package/Table/Table.js +25 -24
- package/Table/index.js +3 -3
- package/TableBody/TableBody.js +16 -17
- package/TableBody/index.js +3 -3
- package/TableCell/TableCell.d.ts +1 -1
- package/TableCell/TableCell.js +29 -28
- package/TableCell/index.js +3 -3
- package/TableContainer/TableContainer.js +15 -16
- package/TableContainer/index.js +3 -3
- package/TableFooter/TableFooter.js +16 -17
- package/TableFooter/index.js +3 -3
- package/TableHead/TableHead.js +16 -17
- package/TableHead/index.js +3 -3
- package/TablePagination/TablePagination.js +77 -72
- package/TablePagination/TablePaginationActions.js +56 -43
- package/TablePagination/index.js +3 -3
- package/TableRow/TableRow.js +21 -21
- package/TableRow/index.js +3 -3
- package/TableSortLabel/TableSortLabel.js +28 -29
- package/TableSortLabel/index.js +3 -3
- package/TableSortLabel/tableSortLabelClasses.d.ts +10 -2
- package/TableSortLabel/tableSortLabelClasses.js +1 -1
- package/Tabs/ScrollbarSize.js +9 -11
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +175 -127
- package/Tabs/index.js +3 -3
- package/TextField/TextField.d.ts +59 -4
- package/TextField/TextField.js +148 -78
- package/TextField/index.js +3 -3
- package/TextareaAutosize/TextareaAutosize.d.ts +14 -0
- package/TextareaAutosize/TextareaAutosize.js +222 -0
- package/TextareaAutosize/TextareaAutosize.types.d.ts +13 -0
- package/TextareaAutosize/TextareaAutosize.types.js +1 -0
- package/TextareaAutosize/index.d.ts +3 -2
- package/TextareaAutosize/index.js +1 -1
- package/ToggleButton/ToggleButton.js +42 -43
- package/ToggleButton/index.js +3 -3
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButtonGroup/ToggleButtonGroup.js +30 -31
- package/ToggleButtonGroup/index.js +3 -3
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +4 -2
- package/Toolbar/Toolbar.js +21 -25
- package/Toolbar/index.js +3 -3
- package/Tooltip/Tooltip.d.ts +5 -7
- package/Tooltip/Tooltip.js +283 -182
- package/Tooltip/index.js +3 -3
- package/Typography/Typography.d.ts +22 -2
- package/Typography/Typography.js +129 -63
- package/Typography/index.js +3 -3
- package/Typography/typographyClasses.d.ts +4 -1
- package/Unstable_TrapFocus/FocusTrap.d.ts +10 -0
- package/Unstable_TrapFocus/FocusTrap.js +329 -0
- package/Unstable_TrapFocus/FocusTrap.types.d.ts +51 -0
- package/Unstable_TrapFocus/FocusTrap.types.js +1 -0
- package/Unstable_TrapFocus/index.d.ts +2 -2
- package/Unstable_TrapFocus/index.js +1 -1
- package/Zoom/Zoom.d.ts +2 -2
- package/Zoom/Zoom.js +36 -34
- package/Zoom/index.js +1 -1
- package/colors/index.js +20 -20
- package/index.d.ts +6 -23
- package/index.js +276 -276
- package/internal/SwitchBase.js +80 -52
- package/internal/svg-icons/Add.js +1 -1
- package/internal/svg-icons/ArrowDownward.js +1 -1
- package/internal/svg-icons/ArrowDropDown.js +1 -1
- package/internal/svg-icons/Cancel.js +1 -1
- package/internal/svg-icons/CheckBox.js +1 -1
- package/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/internal/svg-icons/CheckCircle.js +1 -1
- package/internal/svg-icons/Close.js +1 -1
- package/internal/svg-icons/ErrorOutline.js +1 -1
- package/internal/svg-icons/FirstPage.js +1 -1
- package/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/internal/svg-icons/InfoOutlined.js +1 -1
- package/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/internal/svg-icons/LastPage.js +1 -1
- package/internal/svg-icons/MoreHoriz.js +1 -1
- package/internal/svg-icons/NavigateBefore.js +1 -1
- package/internal/svg-icons/NavigateNext.js +1 -1
- package/internal/svg-icons/Person.js +1 -1
- package/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/internal/svg-icons/Star.js +1 -1
- package/internal/svg-icons/StarBorder.js +1 -1
- package/internal/svg-icons/SuccessOutlined.js +1 -1
- package/internal/svg-icons/Warning.js +1 -1
- package/locale/index.d.ts +1 -0
- package/locale/index.js +74 -1
- package/modern/Accordion/Accordion.js +73 -54
- package/modern/Accordion/accordionClasses.js +1 -1
- package/modern/Accordion/index.js +3 -3
- package/modern/AccordionActions/AccordionActions.js +15 -16
- package/modern/AccordionActions/index.js +3 -3
- package/modern/AccordionDetails/AccordionDetails.js +14 -15
- package/modern/AccordionDetails/index.js +3 -3
- package/modern/AccordionSummary/AccordionSummary.js +27 -28
- package/modern/AccordionSummary/index.js +3 -3
- package/modern/Alert/Alert.js +74 -68
- package/modern/Alert/index.js +3 -3
- package/modern/AlertTitle/AlertTitle.js +15 -16
- package/modern/AlertTitle/index.js +3 -3
- package/modern/AppBar/AppBar.js +45 -46
- package/modern/AppBar/index.js +3 -3
- package/modern/Autocomplete/Autocomplete.js +261 -184
- package/modern/Autocomplete/index.js +3 -3
- package/modern/Avatar/Avatar.js +53 -45
- package/modern/Avatar/index.js +3 -3
- package/modern/AvatarGroup/AvatarGroup.js +68 -48
- package/modern/AvatarGroup/index.js +3 -3
- package/modern/Backdrop/Backdrop.js +41 -41
- package/modern/Backdrop/index.js +3 -3
- package/modern/Badge/Badge.js +43 -41
- package/modern/Badge/index.js +3 -3
- package/modern/Badge/useBadge.js +41 -0
- package/modern/Badge/useBadge.types.js +1 -0
- package/modern/BottomNavigation/BottomNavigation.js +22 -23
- package/modern/BottomNavigation/index.js +3 -3
- package/modern/BottomNavigationAction/BottomNavigationAction.js +26 -28
- package/modern/BottomNavigationAction/index.js +3 -3
- package/modern/Box/Box.js +4 -4
- package/modern/Box/index.js +3 -3
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +41 -39
- package/modern/Breadcrumbs/Breadcrumbs.js +27 -29
- package/modern/Breadcrumbs/index.js +3 -3
- package/modern/Button/Button.js +48 -44
- package/modern/Button/index.js +3 -3
- package/modern/ButtonBase/ButtonBase.js +69 -97
- package/modern/ButtonBase/TouchRipple.js +14 -17
- package/modern/ButtonBase/index.js +5 -5
- package/modern/ButtonGroup/ButtonGroup.js +33 -34
- package/modern/ButtonGroup/index.js +5 -5
- package/modern/Card/Card.js +16 -17
- package/modern/Card/index.js +3 -3
- package/modern/CardActionArea/CardActionArea.js +19 -21
- package/modern/CardActionArea/index.js +3 -3
- package/modern/CardActions/CardActions.js +15 -16
- package/modern/CardActions/index.js +3 -3
- package/modern/CardContent/CardContent.js +15 -16
- package/modern/CardContent/index.js +3 -3
- package/modern/CardHeader/CardHeader.js +41 -38
- package/modern/CardHeader/index.js +3 -3
- package/modern/CardMedia/CardMedia.js +25 -26
- package/modern/CardMedia/index.js +3 -3
- package/modern/Checkbox/Checkbox.js +43 -37
- package/modern/Checkbox/index.js +3 -3
- package/modern/Chip/Chip.js +50 -50
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/Chip/index.js +3 -3
- package/modern/CircularProgress/CircularProgress.js +34 -32
- package/modern/CircularProgress/index.js +3 -3
- package/modern/ClickAwayListener/ClickAwayListener.js +177 -0
- package/modern/ClickAwayListener/index.js +1 -1
- package/modern/Collapse/Collapse.js +117 -84
- package/modern/Collapse/index.js +3 -3
- package/modern/Container/Container.js +3 -3
- package/modern/Container/index.js +3 -3
- package/modern/CssBaseline/CssBaseline.js +84 -23
- package/modern/CssBaseline/index.js +1 -1
- package/modern/{Unstable_Grid2/Grid2.js → DefaultPropsProvider/DefaultPropsProvider.js} +15 -18
- package/modern/DefaultPropsProvider/index.js +1 -0
- package/modern/Dialog/Dialog.js +156 -115
- package/modern/Dialog/index.js +3 -3
- package/modern/DialogActions/DialogActions.js +28 -25
- package/modern/DialogActions/index.js +3 -3
- package/modern/DialogContent/DialogContent.js +41 -31
- package/modern/DialogContent/index.js +3 -3
- package/modern/DialogContentText/DialogContentText.js +20 -17
- package/modern/DialogContentText/index.js +3 -3
- package/modern/DialogTitle/DialogTitle.js +14 -16
- package/modern/DialogTitle/index.js +3 -3
- package/modern/Divider/Divider.js +36 -32
- package/modern/Divider/index.js +3 -3
- package/modern/Drawer/Drawer.js +134 -92
- package/modern/Drawer/index.js +3 -3
- package/modern/Fab/Fab.js +38 -34
- package/modern/Fab/index.js +3 -3
- package/modern/Fade/Fade.js +36 -34
- package/modern/Fade/index.js +1 -1
- package/modern/FilledInput/FilledInput.js +231 -141
- package/modern/FilledInput/filledInputClasses.js +5 -3
- package/modern/FilledInput/index.js +3 -3
- package/modern/FormControl/FormControl.js +35 -33
- package/modern/FormControl/index.js +4 -4
- package/modern/FormControl/useFormControl.js +1 -1
- package/modern/FormControlLabel/FormControlLabel.js +64 -41
- package/modern/FormControlLabel/index.js +3 -3
- package/modern/FormGroup/FormGroup.js +17 -18
- package/modern/FormGroup/index.js +3 -3
- package/modern/FormHelperText/FormHelperText.js +36 -27
- package/modern/FormHelperText/index.js +3 -3
- package/modern/FormLabel/FormLabel.js +59 -40
- package/modern/FormLabel/index.js +4 -4
- package/modern/GlobalStyles/GlobalStyles.js +5 -5
- package/modern/GlobalStyles/index.js +1 -1
- package/modern/Grid/Grid.js +71 -62
- package/modern/Grid/index.js +3 -3
- package/modern/Grid2/Grid2.js +112 -0
- package/modern/Grid2/index.js +6 -0
- package/modern/Grow/Grow.js +39 -35
- package/modern/Grow/index.js +1 -1
- package/modern/Hidden/Hidden.js +25 -24
- package/modern/Hidden/HiddenCss.js +35 -33
- package/modern/Hidden/HiddenJs.js +2 -2
- package/modern/Hidden/index.js +1 -1
- package/modern/Hidden/withWidth.js +22 -22
- package/modern/Icon/Icon.js +83 -43
- package/modern/Icon/index.js +3 -3
- package/modern/IconButton/IconButton.js +78 -80
- package/modern/IconButton/index.js +3 -3
- package/modern/ImageList/ImageList.js +29 -37
- package/modern/ImageList/index.js +3 -3
- package/modern/ImageListItem/ImageListItem.js +25 -26
- package/modern/ImageListItem/index.js +3 -3
- package/modern/ImageListItemBar/ImageListItemBar.js +30 -31
- package/modern/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/modern/ImageListItemBar/index.js +3 -3
- package/modern/InitColorSchemeScript/InitColorSchemeScript.js +16 -0
- package/modern/InitColorSchemeScript/index.js +1 -0
- package/modern/Input/Input.js +109 -88
- package/modern/Input/index.js +3 -3
- package/modern/Input/inputClasses.js +5 -3
- package/modern/InputAdornment/InputAdornment.js +62 -49
- package/modern/InputAdornment/index.js +3 -3
- package/modern/InputBase/InputBase.js +187 -148
- package/modern/InputBase/index.js +3 -3
- package/modern/InputLabel/InputLabel.js +147 -80
- package/modern/InputLabel/index.js +3 -3
- package/modern/LinearProgress/LinearProgress.js +35 -36
- package/modern/LinearProgress/index.js +3 -3
- package/modern/Link/Link.js +162 -91
- package/modern/Link/getTextDecoration.js +2 -12
- package/modern/Link/index.js +3 -3
- package/modern/List/List.js +39 -32
- package/modern/List/index.js +3 -3
- package/modern/ListItem/ListItem.js +75 -152
- package/modern/ListItem/index.js +3 -3
- package/modern/ListItem/listItemClasses.js +1 -1
- package/modern/ListItemAvatar/ListItemAvatar.js +15 -16
- package/modern/ListItemAvatar/index.js +3 -3
- package/modern/ListItemButton/ListItemButton.js +35 -32
- package/modern/ListItemButton/index.js +3 -3
- package/modern/ListItemIcon/ListItemIcon.js +29 -24
- package/modern/ListItemIcon/index.js +3 -3
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +17 -16
- package/modern/ListItemSecondaryAction/index.js +3 -3
- package/modern/ListItemText/ListItemText.js +36 -34
- package/modern/ListItemText/index.js +3 -3
- package/modern/ListSubheader/ListSubheader.js +26 -24
- package/modern/ListSubheader/index.js +3 -3
- package/modern/Menu/Menu.js +43 -47
- package/modern/Menu/index.js +3 -3
- package/modern/MenuItem/MenuItem.js +81 -58
- package/modern/MenuItem/index.js +3 -3
- package/modern/MenuList/MenuList.js +23 -26
- package/modern/MenuList/index.js +1 -1
- package/modern/MobileStepper/MobileStepper.js +34 -34
- package/modern/MobileStepper/index.js +3 -3
- package/modern/Modal/Modal.js +84 -66
- package/modern/Modal/ModalManager.js +211 -0
- package/modern/Modal/index.js +4 -4
- package/modern/Modal/useModal.js +195 -0
- package/modern/Modal/useModal.types.js +1 -0
- package/modern/NativeSelect/NativeSelect.js +33 -29
- package/modern/NativeSelect/NativeSelectInput.js +93 -69
- package/modern/NativeSelect/index.js +3 -3
- package/modern/NoSsr/NoSsr.js +73 -0
- package/modern/NoSsr/NoSsr.types.js +1 -0
- package/modern/NoSsr/index.js +1 -1
- package/modern/OutlinedInput/NotchedOutline.js +74 -56
- package/modern/OutlinedInput/OutlinedInput.js +154 -92
- package/modern/OutlinedInput/index.js +3 -3
- package/modern/OutlinedInput/outlinedInputClasses.js +5 -3
- package/modern/Pagination/Pagination.js +44 -40
- package/modern/Pagination/index.js +3 -3
- package/modern/PaginationItem/PaginationItem.js +107 -61
- package/modern/PaginationItem/index.js +3 -3
- package/modern/Paper/Paper.js +64 -38
- package/modern/Paper/index.js +3 -3
- package/modern/PigmentContainer/PigmentContainer.js +98 -0
- package/modern/PigmentContainer/index.js +3 -0
- package/modern/PigmentGrid/PigmentGrid.js +149 -0
- package/modern/PigmentGrid/index.js +3 -0
- package/modern/PigmentHidden/PigmentHidden.js +278 -0
- package/modern/PigmentHidden/index.js +2 -0
- package/modern/PigmentStack/PigmentStack.js +81 -0
- package/modern/PigmentStack/index.js +3 -0
- package/modern/Popover/Popover.js +97 -96
- package/modern/Popover/index.js +4 -4
- package/modern/Popper/BasePopper.js +370 -0
- package/modern/Popper/BasePopper.types.js +1 -0
- package/modern/Popper/Popper.js +36 -33
- package/modern/Popper/index.js +2 -1
- package/modern/Popper/popperClasses.js +7 -0
- package/modern/Portal/Portal.js +91 -0
- package/modern/Portal/Portal.types.js +1 -0
- package/modern/Portal/index.js +1 -1
- package/modern/Radio/Radio.js +38 -33
- package/modern/Radio/RadioButtonIcon.js +10 -9
- package/modern/Radio/index.js +3 -3
- package/modern/RadioGroup/RadioGroup.js +21 -24
- package/modern/RadioGroup/index.js +4 -4
- package/modern/RadioGroup/useRadioGroup.js +1 -1
- package/modern/Rating/Rating.js +73 -71
- package/modern/Rating/index.js +3 -3
- package/modern/ScopedCssBaseline/ScopedCssBaseline.js +45 -28
- package/modern/ScopedCssBaseline/index.js +3 -3
- package/modern/Select/Select.js +77 -69
- package/modern/Select/SelectInput.js +80 -73
- package/modern/Select/index.js +3 -3
- package/modern/Skeleton/Skeleton.js +133 -85
- package/modern/Skeleton/index.js +3 -3
- package/modern/Slide/Slide.js +44 -39
- package/modern/Slide/index.js +1 -1
- package/modern/Slider/Slider.js +182 -131
- package/modern/Slider/SliderValueLabel.js +1 -1
- package/modern/Slider/index.js +4 -4
- package/modern/Slider/useSlider.js +647 -0
- package/modern/Slider/useSlider.types.js +1 -0
- package/modern/Snackbar/Snackbar.js +127 -94
- package/modern/Snackbar/index.js +3 -3
- package/modern/Snackbar/useSnackbar.js +133 -0
- package/modern/Snackbar/useSnackbar.types.js +1 -0
- package/modern/SnackbarContent/SnackbarContent.js +21 -22
- package/modern/SnackbarContent/index.js +3 -3
- package/modern/SpeedDial/SpeedDial.js +162 -107
- package/modern/SpeedDial/index.js +3 -3
- package/modern/SpeedDialAction/SpeedDialAction.js +96 -68
- package/modern/SpeedDialAction/index.js +3 -3
- package/modern/SpeedDialIcon/SpeedDialIcon.js +52 -32
- package/modern/SpeedDialIcon/index.js +3 -3
- package/modern/Stack/Stack.js +2 -2
- package/modern/Stack/index.js +2 -2
- package/modern/Step/Step.js +24 -26
- package/modern/Step/index.js +5 -5
- package/modern/StepButton/StepButton.js +25 -26
- package/modern/StepButton/index.js +3 -3
- package/modern/StepConnector/StepConnector.js +20 -21
- package/modern/StepConnector/index.js +3 -3
- package/modern/StepContent/StepContent.js +28 -29
- package/modern/StepContent/index.js +3 -3
- package/modern/StepIcon/StepIcon.js +34 -33
- package/modern/StepIcon/index.js +3 -3
- package/modern/StepLabel/StepLabel.js +47 -46
- package/modern/StepLabel/index.js +3 -3
- package/modern/Stepper/Stepper.js +31 -30
- package/modern/Stepper/index.js +5 -5
- package/modern/Stepper/stepperClasses.js +1 -1
- package/modern/SvgIcon/SvgIcon.js +99 -46
- package/modern/SvgIcon/index.js +3 -3
- package/modern/SwipeableDrawer/SwipeArea.js +58 -37
- package/modern/SwipeableDrawer/SwipeableDrawer.js +62 -56
- package/modern/SwipeableDrawer/index.js +1 -1
- package/modern/Switch/Switch.js +37 -33
- package/modern/Switch/index.js +3 -3
- package/modern/Tab/Tab.js +174 -98
- package/modern/Tab/index.js +3 -3
- package/modern/Tab/tabClasses.js +1 -1
- package/modern/TabScrollButton/TabScrollButton.js +54 -36
- package/modern/TabScrollButton/index.js +3 -3
- package/modern/Table/Table.js +25 -24
- package/modern/Table/index.js +3 -3
- package/modern/TableBody/TableBody.js +16 -17
- package/modern/TableBody/index.js +3 -3
- package/modern/TableCell/TableCell.js +29 -28
- package/modern/TableCell/index.js +3 -3
- package/modern/TableContainer/TableContainer.js +15 -16
- package/modern/TableContainer/index.js +3 -3
- package/modern/TableFooter/TableFooter.js +16 -17
- package/modern/TableFooter/index.js +3 -3
- package/modern/TableHead/TableHead.js +16 -17
- package/modern/TableHead/index.js +3 -3
- package/modern/TablePagination/TablePagination.js +77 -72
- package/modern/TablePagination/TablePaginationActions.js +56 -43
- package/modern/TablePagination/index.js +3 -3
- package/modern/TableRow/TableRow.js +21 -21
- package/modern/TableRow/index.js +3 -3
- package/modern/TableSortLabel/TableSortLabel.js +28 -29
- package/modern/TableSortLabel/index.js +3 -3
- package/modern/TableSortLabel/tableSortLabelClasses.js +1 -1
- package/modern/Tabs/ScrollbarSize.js +9 -11
- package/modern/Tabs/Tabs.js +175 -127
- package/modern/Tabs/index.js +3 -3
- package/modern/TextField/TextField.js +148 -78
- package/modern/TextField/index.js +3 -3
- package/modern/TextareaAutosize/TextareaAutosize.js +222 -0
- package/modern/TextareaAutosize/TextareaAutosize.types.js +1 -0
- package/modern/TextareaAutosize/index.js +1 -1
- package/modern/ToggleButton/ToggleButton.js +42 -43
- package/modern/ToggleButton/index.js +3 -3
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +30 -31
- package/modern/ToggleButtonGroup/index.js +3 -3
- package/modern/Toolbar/Toolbar.js +21 -25
- package/modern/Toolbar/index.js +3 -3
- package/modern/Tooltip/Tooltip.js +283 -182
- package/modern/Tooltip/index.js +3 -3
- package/modern/Typography/Typography.js +129 -63
- package/modern/Typography/index.js +3 -3
- package/modern/Unstable_TrapFocus/FocusTrap.js +329 -0
- package/modern/Unstable_TrapFocus/FocusTrap.types.js +1 -0
- package/modern/Unstable_TrapFocus/index.js +1 -1
- package/modern/Zoom/Zoom.js +36 -34
- package/modern/Zoom/index.js +1 -1
- package/modern/colors/index.js +20 -20
- package/modern/index.js +276 -276
- package/modern/internal/SwitchBase.js +80 -52
- 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 +74 -1
- package/modern/styles/ThemeProvider.js +25 -27
- package/modern/styles/ThemeProviderNoVars.js +17 -0
- package/modern/styles/ThemeProviderWithVars.js +89 -0
- package/modern/styles/adaptV4Theme.js +31 -31
- package/modern/styles/createColorScheme.js +41 -0
- package/modern/styles/createGetSelector.js +46 -8
- package/modern/styles/createMixins.js +4 -4
- package/modern/styles/createMuiStrictModeTheme.js +1 -1
- package/modern/styles/createPalette.js +24 -21
- package/modern/styles/createTheme.js +71 -83
- package/modern/styles/createThemeNoVars.js +94 -0
- package/modern/styles/createThemeWithVars.js +384 -0
- package/modern/styles/createTransitions.js +19 -16
- package/modern/styles/createTypography.js +31 -29
- package/modern/styles/defaultTheme.js +1 -1
- package/modern/styles/excludeVariablesFromRoot.js +1 -1
- package/modern/styles/experimental_extendTheme.js +8 -344
- package/modern/styles/index.js +27 -24
- package/modern/styles/responsiveFontSizes.js +21 -12
- package/modern/styles/rootShouldForwardProp.js +1 -1
- package/modern/styles/shouldSkipGeneratingVar.js +1 -1
- package/modern/styles/stringifyTheme.js +54 -0
- package/modern/styles/styled.js +5 -5
- package/modern/styles/useTheme.js +2 -2
- package/modern/styles/useThemeProps.js +2 -2
- package/modern/transitions/index.js +1 -1
- package/modern/useAutocomplete/index.js +1 -1
- package/modern/useAutocomplete/useAutocomplete.js +969 -2
- package/modern/useLazyRipple/index.js +3 -0
- package/modern/useLazyRipple/useLazyRipple.js +85 -0
- package/modern/usePagination/index.js +1 -1
- package/modern/usePagination/usePagination.js +20 -22
- package/modern/useScrollTrigger/index.js +1 -1
- package/modern/useScrollTrigger/useScrollTrigger.js +8 -10
- package/modern/utils/PolymorphicComponent.js +1 -0
- package/modern/utils/areArraysEqual.js +4 -0
- package/modern/utils/createSvgIcon.js +5 -6
- package/modern/utils/index.js +18 -18
- package/modern/utils/isHostComponent.js +7 -0
- package/modern/utils/memoTheme.js +24 -0
- package/modern/utils/omitEventHandlers.js +18 -0
- package/modern/utils/shouldSpreadAdditionalProps.js +1 -1
- package/modern/utils/useSlot.js +44 -41
- package/modern/version/index.js +7 -0
- package/modern/zero-styled/index.js +25 -6
- package/node/Accordion/Accordion.js +66 -47
- package/node/Accordion/accordionClasses.js +1 -1
- package/node/AccordionActions/AccordionActions.js +13 -14
- package/node/AccordionDetails/AccordionDetails.js +12 -13
- package/node/AccordionSummary/AccordionSummary.js +23 -24
- package/node/Alert/Alert.js +63 -57
- package/node/AlertTitle/AlertTitle.js +12 -13
- package/node/AppBar/AppBar.js +127 -137
- package/node/Autocomplete/Autocomplete.js +250 -177
- package/node/Avatar/Avatar.js +49 -41
- package/node/AvatarGroup/AvatarGroup.js +65 -46
- package/node/Backdrop/Backdrop.js +37 -37
- package/node/Badge/Badge.js +196 -201
- package/node/Badge/useBadge.js +46 -0
- package/node/BottomNavigation/BottomNavigation.js +20 -21
- package/node/BottomNavigationAction/BottomNavigationAction.js +22 -24
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +40 -38
- package/node/Breadcrumbs/Breadcrumbs.js +24 -26
- package/node/Button/Button.js +44 -41
- package/node/ButtonBase/ButtonBase.js +64 -92
- package/node/ButtonBase/TouchRipple.js +15 -18
- package/node/ButtonGroup/ButtonGroup.js +28 -29
- package/node/Card/Card.js +13 -14
- package/node/CardActionArea/CardActionArea.js +16 -18
- package/node/CardActions/CardActions.js +13 -14
- package/node/CardContent/CardContent.js +13 -14
- package/node/CardHeader/CardHeader.js +39 -36
- package/node/CardMedia/CardMedia.js +23 -24
- package/node/Checkbox/Checkbox.js +37 -32
- package/node/Chip/Chip.js +43 -43
- package/node/Chip/chipClasses.js +1 -1
- package/node/CircularProgress/CircularProgress.js +31 -29
- package/node/ClickAwayListener/ClickAwayListener.js +183 -0
- package/node/ClickAwayListener/index.js +1 -1
- package/node/Collapse/Collapse.js +117 -84
- package/node/CssBaseline/CssBaseline.js +85 -27
- package/node/DefaultPropsProvider/DefaultPropsProvider.js +38 -0
- package/node/DefaultPropsProvider/index.js +20 -0
- package/node/Dialog/Dialog.js +154 -113
- package/node/DialogActions/DialogActions.js +28 -25
- package/node/DialogContent/DialogContent.js +40 -30
- package/node/DialogContentText/DialogContentText.js +20 -17
- package/node/DialogTitle/DialogTitle.js +12 -14
- package/node/Divider/Divider.js +34 -30
- package/node/Drawer/Drawer.js +134 -92
- package/node/Fab/Fab.js +119 -118
- package/node/Fade/Fade.js +35 -33
- package/node/FilledInput/FilledInput.js +234 -146
- package/node/FilledInput/filledInputClasses.js +4 -2
- package/node/FormControl/FormControl.js +29 -27
- package/node/FormControlLabel/FormControlLabel.js +61 -39
- package/node/FormGroup/FormGroup.js +13 -14
- package/node/FormHelperText/FormHelperText.js +33 -24
- package/node/FormLabel/FormLabel.js +57 -38
- package/node/GlobalStyles/GlobalStyles.js +3 -3
- package/node/Grid/Grid.js +67 -60
- package/node/Grid2/Grid2.js +118 -0
- package/node/{Unstable_Grid2 → Grid2}/index.js +4 -6
- package/node/Grow/Grow.js +38 -34
- package/node/Hidden/Hidden.js +26 -26
- package/node/Hidden/HiddenCss.js +31 -29
- package/node/Hidden/withWidth.js +19 -19
- package/node/Icon/Icon.js +82 -42
- package/node/IconButton/IconButton.js +74 -76
- package/node/ImageList/ImageList.js +28 -36
- package/node/ImageListItem/ImageListItem.js +23 -24
- package/node/ImageListItemBar/ImageListItemBar.js +33 -34
- package/node/ImageListItemBar/imageListItemBarClasses.js +1 -1
- package/node/InitColorSchemeScript/InitColorSchemeScript.js +25 -0
- package/node/InitColorSchemeScript/index.js +13 -0
- package/node/Input/Input.js +112 -92
- package/node/Input/inputClasses.js +4 -2
- package/node/InputAdornment/InputAdornment.js +58 -45
- package/node/InputBase/InputBase.js +184 -146
- package/node/InputLabel/InputLabel.js +144 -77
- package/node/LinearProgress/LinearProgress.js +32 -33
- package/node/Link/Link.js +160 -89
- package/node/Link/getTextDecoration.js +5 -15
- package/node/List/List.js +38 -31
- package/node/ListItem/ListItem.js +72 -149
- package/node/ListItem/listItemClasses.js +1 -1
- package/node/ListItemAvatar/ListItemAvatar.js +14 -15
- package/node/ListItemButton/ListItemButton.js +32 -29
- package/node/ListItemIcon/ListItemIcon.js +28 -23
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +16 -15
- package/node/ListItemText/ListItemText.js +36 -34
- package/node/ListSubheader/ListSubheader.js +25 -23
- package/node/Menu/Menu.js +48 -53
- package/node/MenuItem/MenuItem.js +75 -52
- package/node/MenuList/MenuList.js +18 -21
- package/node/MobileStepper/MobileStepper.js +28 -28
- package/node/Modal/Modal.js +80 -63
- package/node/Modal/ModalManager.js +219 -0
- package/node/Modal/index.js +2 -2
- package/node/Modal/useModal.js +203 -0
- package/node/Modal/useModal.types.js +5 -0
- package/node/NativeSelect/NativeSelect.js +26 -22
- package/node/NativeSelect/NativeSelectInput.js +93 -71
- package/node/NoSsr/NoSsr.js +81 -0
- package/node/NoSsr/NoSsr.types.js +5 -0
- package/node/NoSsr/index.js +3 -2
- package/node/OutlinedInput/NotchedOutline.js +78 -60
- package/node/OutlinedInput/OutlinedInput.js +156 -94
- package/node/OutlinedInput/outlinedInputClasses.js +4 -2
- package/node/Pagination/Pagination.js +43 -39
- package/node/PaginationItem/PaginationItem.js +99 -53
- package/node/Paper/Paper.js +66 -43
- package/node/PigmentContainer/PigmentContainer.js +108 -0
- package/node/PigmentContainer/index.js +36 -0
- package/node/PigmentGrid/PigmentGrid.js +159 -0
- package/node/PigmentGrid/index.js +36 -0
- package/node/PigmentHidden/PigmentHidden.js +287 -0
- package/node/PigmentHidden/index.js +26 -0
- package/node/PigmentStack/PigmentStack.js +91 -0
- package/node/PigmentStack/index.js +36 -0
- package/node/Popover/Popover.js +89 -89
- package/node/Popper/BasePopper.js +378 -0
- package/node/Popper/BasePopper.types.js +5 -0
- package/node/Popper/Popper.js +38 -36
- package/node/Popper/index.js +14 -1
- package/node/Popper/popperClasses.js +15 -0
- package/node/Portal/Portal.js +99 -0
- package/node/Portal/Portal.types.js +5 -0
- package/node/Portal/index.js +3 -2
- package/node/Radio/Radio.js +34 -30
- package/node/Radio/RadioButtonIcon.js +8 -7
- package/node/RadioGroup/RadioGroup.js +15 -18
- package/node/Rating/Rating.js +74 -72
- package/node/ScopedCssBaseline/ScopedCssBaseline.js +44 -28
- package/node/Select/Select.js +71 -63
- package/node/Select/SelectInput.js +75 -69
- package/node/Skeleton/Skeleton.js +134 -86
- package/node/Slide/Slide.js +43 -37
- package/node/Slider/Slider.js +342 -308
- package/node/Slider/useSlider.js +658 -0
- package/node/Slider/useSlider.types.js +5 -0
- package/node/Snackbar/Snackbar.js +126 -93
- package/node/Snackbar/useSnackbar.js +141 -0
- package/node/Snackbar/useSnackbar.types.js +5 -0
- package/node/SnackbarContent/SnackbarContent.js +22 -23
- package/node/SpeedDial/SpeedDial.js +159 -104
- package/node/SpeedDialAction/SpeedDialAction.js +95 -67
- package/node/SpeedDialIcon/SpeedDialIcon.js +51 -31
- package/node/Step/Step.js +20 -22
- package/node/StepButton/StepButton.js +18 -19
- package/node/StepConnector/StepConnector.js +15 -16
- package/node/StepContent/StepContent.js +23 -24
- package/node/StepIcon/StepIcon.js +29 -28
- package/node/StepLabel/StepLabel.js +42 -41
- package/node/Stepper/Stepper.js +27 -26
- package/node/Stepper/stepperClasses.js +1 -1
- package/node/SvgIcon/SvgIcon.js +106 -56
- package/node/SwipeableDrawer/SwipeArea.js +58 -37
- package/node/SwipeableDrawer/SwipeableDrawer.js +58 -52
- package/node/Switch/Switch.js +33 -29
- package/node/Tab/Tab.js +171 -95
- package/node/Tab/tabClasses.js +1 -1
- package/node/TabScrollButton/TabScrollButton.js +55 -38
- package/node/Table/Table.js +24 -23
- package/node/TableBody/TableBody.js +15 -16
- package/node/TableCell/TableCell.js +26 -25
- package/node/TableContainer/TableContainer.js +15 -16
- package/node/TableFooter/TableFooter.js +15 -16
- package/node/TableHead/TableHead.js +15 -16
- package/node/TablePagination/TablePagination.js +77 -73
- package/node/TablePagination/TablePaginationActions.js +62 -51
- package/node/TableRow/TableRow.js +20 -20
- package/node/TableSortLabel/TableSortLabel.js +26 -27
- package/node/TableSortLabel/tableSortLabelClasses.js +1 -1
- package/node/Tabs/ScrollbarSize.js +7 -9
- package/node/Tabs/Tabs.js +180 -135
- package/node/TextField/TextField.js +141 -71
- package/node/TextareaAutosize/TextareaAutosize.js +230 -0
- package/node/TextareaAutosize/TextareaAutosize.types.js +5 -0
- package/node/TextareaAutosize/index.js +3 -2
- package/node/ToggleButton/ToggleButton.js +35 -36
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +24 -25
- package/node/Toolbar/Toolbar.js +21 -25
- package/node/Tooltip/Tooltip.js +289 -190
- package/node/Typography/Typography.js +128 -62
- package/node/Unstable_TrapFocus/FocusTrap.js +337 -0
- package/node/Unstable_TrapFocus/FocusTrap.types.js +5 -0
- package/node/Unstable_TrapFocus/index.js +3 -2
- package/node/Zoom/Zoom.js +35 -33
- package/node/index.js +27 -26
- package/node/internal/SwitchBase.js +77 -49
- package/node/locale/index.js +75 -2
- package/node/styles/ThemeProvider.js +24 -26
- package/node/styles/ThemeProviderNoVars.js +25 -0
- package/node/styles/ThemeProviderWithVars.js +100 -0
- package/node/styles/adaptV4Theme.js +31 -32
- package/node/styles/createColorScheme.js +50 -0
- package/node/styles/createGetSelector.js +45 -7
- package/node/styles/createMixins.js +4 -5
- package/node/styles/createPalette.js +16 -13
- package/node/styles/createTheme.js +76 -84
- package/node/styles/createThemeNoVars.js +104 -0
- package/node/styles/createThemeWithVars.js +395 -0
- package/node/styles/createTransitions.js +19 -17
- package/node/styles/createTypography.js +31 -29
- package/node/styles/excludeVariablesFromRoot.js +1 -1
- package/node/styles/experimental_extendTheme.js +9 -350
- package/node/styles/index.js +39 -6
- package/node/styles/responsiveFontSizes.js +20 -11
- package/node/styles/shouldSkipGeneratingVar.js +2 -3
- package/node/styles/stringifyTheme.js +61 -0
- package/node/transitions/utils.js +2 -3
- package/node/useAutocomplete/useAutocomplete.js +971 -18
- package/node/{useTouchRipple → useLazyRipple}/index.js +2 -2
- package/node/useLazyRipple/useLazyRipple.js +95 -0
- package/node/usePagination/usePagination.js +20 -22
- package/node/useScrollTrigger/useScrollTrigger.js +8 -11
- package/node/utils/PolymorphicComponent.js +5 -0
- package/node/utils/areArraysEqual.js +10 -0
- package/node/utils/createSvgIcon.js +4 -5
- package/node/utils/index.js +9 -9
- package/node/utils/isHostComponent.js +13 -0
- package/node/utils/memoTheme.js +30 -0
- package/node/utils/omitEventHandlers.js +24 -0
- package/node/utils/shouldSpreadAdditionalProps.js +3 -2
- package/node/utils/useSlot.js +46 -43
- package/node/version/index.js +13 -0
- package/node/zero-styled/index.js +33 -5
- package/package.json +30 -14
- package/styles/ThemeProvider.d.ts +52 -15
- package/styles/ThemeProvider.js +25 -27
- package/styles/ThemeProviderNoVars.d.ts +7 -0
- package/styles/ThemeProviderNoVars.js +17 -0
- package/styles/ThemeProviderWithVars.d.ts +49 -0
- package/styles/ThemeProviderWithVars.js +89 -0
- package/styles/adaptV4Theme.js +31 -31
- package/styles/createColorScheme.d.ts +9 -0
- package/styles/createColorScheme.js +41 -0
- package/styles/createGetSelector.d.ts +17 -6
- package/styles/createGetSelector.js +46 -8
- package/styles/createMixins.js +4 -4
- package/styles/createMuiStrictModeTheme.js +1 -1
- package/styles/createPalette.d.ts +17 -1
- package/styles/createPalette.js +24 -21
- package/styles/createTheme.d.ts +8 -56
- package/styles/createTheme.js +71 -83
- package/styles/createThemeNoVars.d.ts +100 -0
- package/styles/createThemeNoVars.js +94 -0
- package/styles/{experimental_extendTheme.d.ts → createThemeWithVars.d.ts} +25 -21
- package/styles/createThemeWithVars.js +384 -0
- package/styles/createTransitions.d.ts +2 -0
- package/styles/createTransitions.js +19 -16
- package/styles/createTypography.js +31 -29
- package/styles/defaultTheme.js +1 -1
- package/styles/excludeVariablesFromRoot.d.ts +1 -1
- package/styles/excludeVariablesFromRoot.js +1 -1
- package/styles/experimental_extendTheme.js +8 -344
- package/styles/index.d.ts +9 -3
- package/styles/index.js +27 -24
- package/styles/overrides.d.ts +2 -2
- package/styles/props.d.ts +1 -1
- package/styles/responsiveFontSizes.d.ts +3 -4
- package/styles/responsiveFontSizes.js +21 -12
- package/styles/rootShouldForwardProp.js +1 -1
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/stringifyTheme.d.ts +20 -0
- package/styles/stringifyTheme.js +54 -0
- package/styles/styled.js +5 -5
- package/styles/useTheme.js +2 -2
- package/styles/useThemeProps.js +2 -2
- package/themeCssVarsAugmentation/index.d.ts +4 -22
- package/transitions/index.js +1 -1
- package/types/OverridableComponentAugmentation.d.ts +2 -2
- package/useAutocomplete/index.js +1 -1
- package/useAutocomplete/useAutocomplete.d.ts +468 -2
- package/useAutocomplete/useAutocomplete.js +969 -2
- package/useLazyRipple/index.d.ts +1 -0
- package/useLazyRipple/index.js +3 -0
- package/useLazyRipple/package.json +6 -0
- package/useLazyRipple/useLazyRipple.d.ts +32 -0
- package/useLazyRipple/useLazyRipple.js +85 -0
- package/usePagination/index.js +1 -1
- package/usePagination/usePagination.d.ts +1 -1
- package/usePagination/usePagination.js +20 -22
- package/useScrollTrigger/index.js +1 -1
- package/useScrollTrigger/useScrollTrigger.js +8 -10
- package/utils/PolymorphicComponent.d.ts +17 -0
- package/utils/PolymorphicComponent.js +1 -0
- package/utils/areArraysEqual.d.ts +3 -0
- package/utils/areArraysEqual.js +4 -0
- package/utils/createSvgIcon.js +5 -6
- package/utils/index.d.ts +3 -2
- package/utils/index.js +18 -18
- package/utils/isHostComponent.d.ts +6 -0
- package/utils/isHostComponent.js +7 -0
- package/utils/memoTheme.d.ts +13 -0
- package/utils/memoTheme.js +24 -0
- package/utils/omitEventHandlers.d.ts +9 -0
- package/utils/omitEventHandlers.js +18 -0
- package/utils/shouldSpreadAdditionalProps.js +1 -1
- package/utils/types.d.ts +2 -2
- package/utils/useSlot.js +44 -41
- package/version/index.d.ts +7 -0
- package/version/index.js +7 -0
- package/version/package.json +6 -0
- package/zero-styled/index.d.ts +10 -2
- package/zero-styled/index.js +25 -6
- package/Unstable_Grid2/Grid2.d.ts +0 -4
- package/Unstable_Grid2/Grid2Props.d.ts +0 -15
- package/Unstable_Grid2/index.js +0 -6
- package/modern/Unstable_Grid2/index.js +0 -6
- package/modern/styles/CssVarsProvider.js +0 -40
- package/modern/useMediaQuery/useMediaQueryTheme.js +0 -8
- package/modern/useTouchRipple/index.js +0 -3
- package/modern/useTouchRipple/useTouchRipple.js +0 -94
- package/modern/utils/scrollLeft.js +0 -1
- package/modern/utils/useIsFocusVisible.js +0 -4
- package/node/Unstable_Grid2/Grid2.js +0 -38
- package/node/styles/CssVarsProvider.js +0 -48
- package/node/useMediaQuery/useMediaQueryTheme.js +0 -13
- package/node/useTouchRipple/useTouchRipple.js +0 -105
- package/node/utils/scrollLeft.js +0 -18
- package/node/utils/useIsFocusVisible.js +0 -10
- package/styles/CssVarsProvider.d.ts +0 -20
- package/styles/CssVarsProvider.js +0 -40
- package/umd/material-ui.development.js +0 -52729
- package/umd/material-ui.production.min.js +0 -25
- package/useMediaQuery/useMediaQueryTheme.d.ts +0 -3
- package/useMediaQuery/useMediaQueryTheme.js +0 -8
- package/useTouchRipple/index.d.ts +0 -1
- package/useTouchRipple/index.js +0 -3
- package/useTouchRipple/useTouchRipple.d.ts +0 -28
- package/useTouchRipple/useTouchRipple.js +0 -94
- package/utils/scrollLeft.js +0 -1
- package/utils/useIsFocusVisible.d.ts +0 -3
- package/utils/useIsFocusVisible.js +0 -4
- /package/{Unstable_Grid2/Grid2Props.js → Badge/useBadge.types.js} +0 -0
- /package/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
- /package/{modern/Unstable_Grid2/Grid2Props.js → Modal/useModal.types.js} +0 -0
- /package/modern/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
- /package/node/{Unstable_Grid2/Grid2Props.js → Badge/useBadge.types.js} +0 -0
- /package/node/{Unstable_Grid2 → Grid2}/grid2Classes.js +0 -0
|
@@ -6,21 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.TypographyRoot = void 0;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
9
|
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
-
var _styleFunctionSx = require("@mui/system/styleFunctionSx");
|
|
15
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
-
var
|
|
17
|
-
var
|
|
13
|
+
var _zeroStyled = require("../zero-styled");
|
|
14
|
+
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
15
|
+
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
18
16
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
19
17
|
var _typographyClasses = require("./typographyClasses");
|
|
20
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const _excluded = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"];
|
|
22
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
const v6Colors = {
|
|
22
|
+
primary: true,
|
|
23
|
+
secondary: true,
|
|
24
|
+
error: true,
|
|
25
|
+
info: true,
|
|
26
|
+
success: true,
|
|
27
|
+
warning: true,
|
|
28
|
+
textPrimary: true,
|
|
29
|
+
textSecondary: true,
|
|
30
|
+
textDisabled: true
|
|
31
|
+
};
|
|
32
|
+
const extendSxProp = (0, _zeroStyled.internal_createExtendSxProp)();
|
|
24
33
|
const useUtilityClasses = ownerState => {
|
|
25
34
|
const {
|
|
26
35
|
align,
|
|
@@ -35,7 +44,7 @@ const useUtilityClasses = ownerState => {
|
|
|
35
44
|
};
|
|
36
45
|
return (0, _composeClasses.default)(slots, _typographyClasses.getTypographyUtilityClass, classes);
|
|
37
46
|
};
|
|
38
|
-
const TypographyRoot = exports.TypographyRoot = (0,
|
|
47
|
+
const TypographyRoot = exports.TypographyRoot = (0, _zeroStyled.styled)('span', {
|
|
39
48
|
name: 'MuiTypography',
|
|
40
49
|
slot: 'Root',
|
|
41
50
|
overridesResolver: (props, styles) => {
|
|
@@ -44,27 +53,71 @@ const TypographyRoot = exports.TypographyRoot = (0, _styled.default)('span', {
|
|
|
44
53
|
} = props;
|
|
45
54
|
return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${(0, _capitalize.default)(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];
|
|
46
55
|
}
|
|
47
|
-
})(({
|
|
48
|
-
theme
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
})((0, _memoTheme.default)(({
|
|
57
|
+
theme
|
|
58
|
+
}) => ({
|
|
59
|
+
margin: 0,
|
|
60
|
+
variants: [{
|
|
61
|
+
props: {
|
|
62
|
+
variant: 'inherit'
|
|
63
|
+
},
|
|
64
|
+
style: {
|
|
65
|
+
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
66
|
+
font: 'inherit',
|
|
67
|
+
lineHeight: 'inherit',
|
|
68
|
+
letterSpacing: 'inherit'
|
|
69
|
+
}
|
|
70
|
+
}, ...Object.entries(theme.typography).filter(([variant, value]) => variant !== 'inherit' && value && typeof value === 'object').map(([variant, value]) => ({
|
|
71
|
+
props: {
|
|
72
|
+
variant
|
|
73
|
+
},
|
|
74
|
+
style: value
|
|
75
|
+
})), ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({
|
|
76
|
+
props: {
|
|
77
|
+
color
|
|
78
|
+
},
|
|
79
|
+
style: {
|
|
80
|
+
color: (theme.vars || theme).palette[color].main
|
|
81
|
+
}
|
|
82
|
+
})), ...Object.entries(theme.palette?.text || {}).filter(([, value]) => typeof value === 'string').map(([color]) => ({
|
|
83
|
+
props: {
|
|
84
|
+
color: `text${(0, _capitalize.default)(color)}`
|
|
85
|
+
},
|
|
86
|
+
style: {
|
|
87
|
+
color: (theme.vars || theme).palette.text[color]
|
|
88
|
+
}
|
|
89
|
+
})), {
|
|
90
|
+
props: ({
|
|
91
|
+
ownerState
|
|
92
|
+
}) => ownerState.align !== 'inherit',
|
|
93
|
+
style: {
|
|
94
|
+
textAlign: 'var(--Typography-textAlign)'
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
props: ({
|
|
98
|
+
ownerState
|
|
99
|
+
}) => ownerState.noWrap,
|
|
100
|
+
style: {
|
|
101
|
+
overflow: 'hidden',
|
|
102
|
+
textOverflow: 'ellipsis',
|
|
103
|
+
whiteSpace: 'nowrap'
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
props: ({
|
|
107
|
+
ownerState
|
|
108
|
+
}) => ownerState.gutterBottom,
|
|
109
|
+
style: {
|
|
110
|
+
marginBottom: '0.35em'
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
props: ({
|
|
114
|
+
ownerState
|
|
115
|
+
}) => ownerState.paragraph,
|
|
116
|
+
style: {
|
|
117
|
+
marginBottom: 16
|
|
118
|
+
}
|
|
119
|
+
}]
|
|
120
|
+
})));
|
|
68
121
|
const defaultVariantMapping = {
|
|
69
122
|
h1: 'h1',
|
|
70
123
|
h2: 'h2',
|
|
@@ -78,39 +131,35 @@ const defaultVariantMapping = {
|
|
|
78
131
|
body2: 'p',
|
|
79
132
|
inherit: 'p'
|
|
80
133
|
};
|
|
81
|
-
|
|
82
|
-
// TODO v6: deprecate these color values in v5.x and remove the transformation in v6
|
|
83
|
-
const colorTransformations = {
|
|
84
|
-
primary: 'primary.main',
|
|
85
|
-
textPrimary: 'text.primary',
|
|
86
|
-
secondary: 'secondary.main',
|
|
87
|
-
textSecondary: 'text.secondary',
|
|
88
|
-
error: 'error.main'
|
|
89
|
-
};
|
|
90
|
-
const transformDeprecatedColors = color => {
|
|
91
|
-
return colorTransformations[color] || color;
|
|
92
|
-
};
|
|
93
134
|
const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, ref) {
|
|
94
|
-
const
|
|
135
|
+
const {
|
|
136
|
+
color,
|
|
137
|
+
...themeProps
|
|
138
|
+
} = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
95
139
|
props: inProps,
|
|
96
140
|
name: 'MuiTypography'
|
|
97
141
|
});
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
142
|
+
const isSxColor = !v6Colors[color];
|
|
143
|
+
// TODO: Remove `extendSxProp` in v7
|
|
144
|
+
const props = extendSxProp({
|
|
145
|
+
...themeProps,
|
|
146
|
+
...(isSxColor && {
|
|
147
|
+
color
|
|
148
|
+
})
|
|
149
|
+
});
|
|
102
150
|
const {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const ownerState =
|
|
151
|
+
align = 'inherit',
|
|
152
|
+
className,
|
|
153
|
+
component,
|
|
154
|
+
gutterBottom = false,
|
|
155
|
+
noWrap = false,
|
|
156
|
+
paragraph = false,
|
|
157
|
+
variant = 'body1',
|
|
158
|
+
variantMapping = defaultVariantMapping,
|
|
159
|
+
...other
|
|
160
|
+
} = props;
|
|
161
|
+
const ownerState = {
|
|
162
|
+
...props,
|
|
114
163
|
align,
|
|
115
164
|
color,
|
|
116
165
|
className,
|
|
@@ -120,16 +169,22 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
|
|
|
120
169
|
paragraph,
|
|
121
170
|
variant,
|
|
122
171
|
variantMapping
|
|
123
|
-
}
|
|
172
|
+
};
|
|
124
173
|
const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';
|
|
125
174
|
const classes = useUtilityClasses(ownerState);
|
|
126
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyRoot,
|
|
175
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographyRoot, {
|
|
127
176
|
as: Component,
|
|
128
177
|
ref: ref,
|
|
129
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
130
|
-
|
|
131
|
-
ownerState: ownerState
|
|
132
|
-
|
|
178
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
179
|
+
...other,
|
|
180
|
+
ownerState: ownerState,
|
|
181
|
+
style: {
|
|
182
|
+
...(align !== 'inherit' && {
|
|
183
|
+
'--Typography-textAlign': align
|
|
184
|
+
}),
|
|
185
|
+
...other.style
|
|
186
|
+
}
|
|
187
|
+
});
|
|
133
188
|
});
|
|
134
189
|
process.env.NODE_ENV !== "production" ? Typography.propTypes /* remove-proptypes */ = {
|
|
135
190
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -153,6 +208,12 @@ process.env.NODE_ENV !== "production" ? Typography.propTypes /* remove-proptypes
|
|
|
153
208
|
* @ignore
|
|
154
209
|
*/
|
|
155
210
|
className: _propTypes.default.string,
|
|
211
|
+
/**
|
|
212
|
+
* The color of the component.
|
|
213
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
214
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
215
|
+
*/
|
|
216
|
+
color: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_propTypes.default.oneOf(['primary', 'secondary', 'success', 'error', 'info', 'warning', 'textPrimary', 'textSecondary', 'textDisabled']), _propTypes.default.string]),
|
|
156
217
|
/**
|
|
157
218
|
* The component used for the root node.
|
|
158
219
|
* Either a string to use a HTML element or a component.
|
|
@@ -174,8 +235,13 @@ process.env.NODE_ENV !== "production" ? Typography.propTypes /* remove-proptypes
|
|
|
174
235
|
/**
|
|
175
236
|
* If `true`, the element will be a paragraph element.
|
|
176
237
|
* @default false
|
|
238
|
+
* @deprecated Use the `component` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
177
239
|
*/
|
|
178
240
|
paragraph: _propTypes.default.bool,
|
|
241
|
+
/**
|
|
242
|
+
* @ignore
|
|
243
|
+
*/
|
|
244
|
+
style: _propTypes.default.object,
|
|
179
245
|
/**
|
|
180
246
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
181
247
|
*/
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = void 0;
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _utils = require("@mui/utils");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
// Inspired by https://github.com/focus-trap/tabbable
|
|
17
|
+
const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(',');
|
|
18
|
+
function getTabIndex(node) {
|
|
19
|
+
const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);
|
|
20
|
+
if (!Number.isNaN(tabindexAttr)) {
|
|
21
|
+
return tabindexAttr;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
25
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2
|
|
26
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
27
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
28
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
29
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
30
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
31
|
+
// order, consider their tab index to be 0.
|
|
32
|
+
if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
return node.tabIndex;
|
|
36
|
+
}
|
|
37
|
+
function isNonTabbableRadio(node) {
|
|
38
|
+
if (node.tagName !== 'INPUT' || node.type !== 'radio') {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (!node.name) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const getRadio = selector => node.ownerDocument.querySelector(`input[type="radio"]${selector}`);
|
|
45
|
+
let roving = getRadio(`[name="${node.name}"]:checked`);
|
|
46
|
+
if (!roving) {
|
|
47
|
+
roving = getRadio(`[name="${node.name}"]`);
|
|
48
|
+
}
|
|
49
|
+
return roving !== node;
|
|
50
|
+
}
|
|
51
|
+
function isNodeMatchingSelectorFocusable(node) {
|
|
52
|
+
if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
function defaultGetTabbable(root) {
|
|
58
|
+
const regularTabNodes = [];
|
|
59
|
+
const orderedTabNodes = [];
|
|
60
|
+
Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {
|
|
61
|
+
const nodeTabIndex = getTabIndex(node);
|
|
62
|
+
if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (nodeTabIndex === 0) {
|
|
66
|
+
regularTabNodes.push(node);
|
|
67
|
+
} else {
|
|
68
|
+
orderedTabNodes.push({
|
|
69
|
+
documentOrder: i,
|
|
70
|
+
tabIndex: nodeTabIndex,
|
|
71
|
+
node: node
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);
|
|
76
|
+
}
|
|
77
|
+
function defaultIsEnabled() {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @ignore - internal component.
|
|
83
|
+
*/
|
|
84
|
+
function FocusTrap(props) {
|
|
85
|
+
const {
|
|
86
|
+
children,
|
|
87
|
+
disableAutoFocus = false,
|
|
88
|
+
disableEnforceFocus = false,
|
|
89
|
+
disableRestoreFocus = false,
|
|
90
|
+
getTabbable = defaultGetTabbable,
|
|
91
|
+
isEnabled = defaultIsEnabled,
|
|
92
|
+
open
|
|
93
|
+
} = props;
|
|
94
|
+
const ignoreNextEnforceFocus = React.useRef(false);
|
|
95
|
+
const sentinelStart = React.useRef(null);
|
|
96
|
+
const sentinelEnd = React.useRef(null);
|
|
97
|
+
const nodeToRestore = React.useRef(null);
|
|
98
|
+
const reactFocusEventTarget = React.useRef(null);
|
|
99
|
+
// This variable is useful when disableAutoFocus is true.
|
|
100
|
+
// It waits for the active element to move into the component to activate.
|
|
101
|
+
const activated = React.useRef(false);
|
|
102
|
+
const rootRef = React.useRef(null);
|
|
103
|
+
const handleRef = (0, _utils.unstable_useForkRef)((0, _utils.unstable_getReactNodeRef)(children), rootRef);
|
|
104
|
+
const lastKeydown = React.useRef(null);
|
|
105
|
+
React.useEffect(() => {
|
|
106
|
+
// We might render an empty child.
|
|
107
|
+
if (!open || !rootRef.current) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
activated.current = !disableAutoFocus;
|
|
111
|
+
}, [disableAutoFocus, open]);
|
|
112
|
+
React.useEffect(() => {
|
|
113
|
+
// We might render an empty child.
|
|
114
|
+
if (!open || !rootRef.current) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const doc = (0, _utils.unstable_ownerDocument)(rootRef.current);
|
|
118
|
+
if (!rootRef.current.contains(doc.activeElement)) {
|
|
119
|
+
if (!rootRef.current.hasAttribute('tabIndex')) {
|
|
120
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
121
|
+
console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to "-1".'].join('\n'));
|
|
122
|
+
}
|
|
123
|
+
rootRef.current.setAttribute('tabIndex', '-1');
|
|
124
|
+
}
|
|
125
|
+
if (activated.current) {
|
|
126
|
+
rootRef.current.focus();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return () => {
|
|
130
|
+
// restoreLastFocus()
|
|
131
|
+
if (!disableRestoreFocus) {
|
|
132
|
+
// In IE11 it is possible for document.activeElement to be null resulting
|
|
133
|
+
// in nodeToRestore.current being null.
|
|
134
|
+
// Not all elements in IE11 have a focus method.
|
|
135
|
+
// Once IE11 support is dropped the focus() call can be unconditional.
|
|
136
|
+
if (nodeToRestore.current && nodeToRestore.current.focus) {
|
|
137
|
+
ignoreNextEnforceFocus.current = true;
|
|
138
|
+
nodeToRestore.current.focus();
|
|
139
|
+
}
|
|
140
|
+
nodeToRestore.current = null;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
// Missing `disableRestoreFocus` which is fine.
|
|
144
|
+
// We don't support changing that prop on an open FocusTrap
|
|
145
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
146
|
+
}, [open]);
|
|
147
|
+
React.useEffect(() => {
|
|
148
|
+
// We might render an empty child.
|
|
149
|
+
if (!open || !rootRef.current) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const doc = (0, _utils.unstable_ownerDocument)(rootRef.current);
|
|
153
|
+
const loopFocus = nativeEvent => {
|
|
154
|
+
lastKeydown.current = nativeEvent;
|
|
155
|
+
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Make sure the next tab starts from the right place.
|
|
160
|
+
// doc.activeElement refers to the origin.
|
|
161
|
+
if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {
|
|
162
|
+
// We need to ignore the next contain as
|
|
163
|
+
// it will try to move the focus back to the rootRef element.
|
|
164
|
+
ignoreNextEnforceFocus.current = true;
|
|
165
|
+
if (sentinelEnd.current) {
|
|
166
|
+
sentinelEnd.current.focus();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const contain = () => {
|
|
171
|
+
const rootElement = rootRef.current;
|
|
172
|
+
|
|
173
|
+
// Cleanup functions are executed lazily in React 17.
|
|
174
|
+
// Contain can be called between the component being unmounted and its cleanup function being run.
|
|
175
|
+
if (rootElement === null) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
|
|
179
|
+
ignoreNextEnforceFocus.current = false;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// The focus is already inside
|
|
184
|
+
if (rootElement.contains(doc.activeElement)) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)
|
|
189
|
+
if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// if the focus event is not coming from inside the children's react tree, reset the refs
|
|
194
|
+
if (doc.activeElement !== reactFocusEventTarget.current) {
|
|
195
|
+
reactFocusEventTarget.current = null;
|
|
196
|
+
} else if (reactFocusEventTarget.current !== null) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (!activated.current) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
let tabbable = [];
|
|
203
|
+
if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
|
|
204
|
+
tabbable = getTabbable(rootRef.current);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// one of the sentinel nodes was focused, so move the focus
|
|
208
|
+
// to the first/last tabbable element inside the focus trap
|
|
209
|
+
if (tabbable.length > 0) {
|
|
210
|
+
const isShiftTab = Boolean(lastKeydown.current?.shiftKey && lastKeydown.current?.key === 'Tab');
|
|
211
|
+
const focusNext = tabbable[0];
|
|
212
|
+
const focusPrevious = tabbable[tabbable.length - 1];
|
|
213
|
+
if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {
|
|
214
|
+
if (isShiftTab) {
|
|
215
|
+
focusPrevious.focus();
|
|
216
|
+
} else {
|
|
217
|
+
focusNext.focus();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// no tabbable elements in the trap focus or the focus was outside of the focus trap
|
|
221
|
+
} else {
|
|
222
|
+
rootElement.focus();
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
doc.addEventListener('focusin', contain);
|
|
226
|
+
doc.addEventListener('keydown', loopFocus, true);
|
|
227
|
+
|
|
228
|
+
// With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.
|
|
229
|
+
// for example https://bugzilla.mozilla.org/show_bug.cgi?id=559561.
|
|
230
|
+
// Instead, we can look if the active element was restored on the BODY element.
|
|
231
|
+
//
|
|
232
|
+
// The whatwg spec defines how the browser should behave but does not explicitly mention any events:
|
|
233
|
+
// https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.
|
|
234
|
+
const interval = setInterval(() => {
|
|
235
|
+
if (doc.activeElement && doc.activeElement.tagName === 'BODY') {
|
|
236
|
+
contain();
|
|
237
|
+
}
|
|
238
|
+
}, 50);
|
|
239
|
+
return () => {
|
|
240
|
+
clearInterval(interval);
|
|
241
|
+
doc.removeEventListener('focusin', contain);
|
|
242
|
+
doc.removeEventListener('keydown', loopFocus, true);
|
|
243
|
+
};
|
|
244
|
+
}, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);
|
|
245
|
+
const onFocus = event => {
|
|
246
|
+
if (nodeToRestore.current === null) {
|
|
247
|
+
nodeToRestore.current = event.relatedTarget;
|
|
248
|
+
}
|
|
249
|
+
activated.current = true;
|
|
250
|
+
reactFocusEventTarget.current = event.target;
|
|
251
|
+
const childrenPropsHandler = children.props.onFocus;
|
|
252
|
+
if (childrenPropsHandler) {
|
|
253
|
+
childrenPropsHandler(event);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const handleFocusSentinel = event => {
|
|
257
|
+
if (nodeToRestore.current === null) {
|
|
258
|
+
nodeToRestore.current = event.relatedTarget;
|
|
259
|
+
}
|
|
260
|
+
activated.current = true;
|
|
261
|
+
};
|
|
262
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
263
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
264
|
+
tabIndex: open ? 0 : -1,
|
|
265
|
+
onFocus: handleFocusSentinel,
|
|
266
|
+
ref: sentinelStart,
|
|
267
|
+
"data-testid": "sentinelStart"
|
|
268
|
+
}), /*#__PURE__*/React.cloneElement(children, {
|
|
269
|
+
ref: handleRef,
|
|
270
|
+
onFocus
|
|
271
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
272
|
+
tabIndex: open ? 0 : -1,
|
|
273
|
+
onFocus: handleFocusSentinel,
|
|
274
|
+
ref: sentinelEnd,
|
|
275
|
+
"data-testid": "sentinelEnd"
|
|
276
|
+
})]
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
process.env.NODE_ENV !== "production" ? FocusTrap.propTypes /* remove-proptypes */ = {
|
|
280
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
281
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
282
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
283
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
284
|
+
/**
|
|
285
|
+
* A single child content element.
|
|
286
|
+
*/
|
|
287
|
+
children: _utils.elementAcceptingRef,
|
|
288
|
+
/**
|
|
289
|
+
* If `true`, the focus trap will not automatically shift focus to itself when it opens, and
|
|
290
|
+
* replace it to the last focused element when it closes.
|
|
291
|
+
* This also works correctly with any focus trap children that have the `disableAutoFocus` prop.
|
|
292
|
+
*
|
|
293
|
+
* Generally this should never be set to `true` as it makes the focus trap less
|
|
294
|
+
* accessible to assistive technologies, like screen readers.
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
disableAutoFocus: _propTypes.default.bool,
|
|
298
|
+
/**
|
|
299
|
+
* If `true`, the focus trap will not prevent focus from leaving the focus trap while open.
|
|
300
|
+
*
|
|
301
|
+
* Generally this should never be set to `true` as it makes the focus trap less
|
|
302
|
+
* accessible to assistive technologies, like screen readers.
|
|
303
|
+
* @default false
|
|
304
|
+
*/
|
|
305
|
+
disableEnforceFocus: _propTypes.default.bool,
|
|
306
|
+
/**
|
|
307
|
+
* If `true`, the focus trap will not restore focus to previously focused element once
|
|
308
|
+
* focus trap is hidden or unmounted.
|
|
309
|
+
* @default false
|
|
310
|
+
*/
|
|
311
|
+
disableRestoreFocus: _propTypes.default.bool,
|
|
312
|
+
/**
|
|
313
|
+
* Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.
|
|
314
|
+
* For instance, you can provide the "tabbable" npm dependency.
|
|
315
|
+
* @param {HTMLElement} root
|
|
316
|
+
*/
|
|
317
|
+
getTabbable: _propTypes.default.func,
|
|
318
|
+
/**
|
|
319
|
+
* This prop extends the `open` prop.
|
|
320
|
+
* It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.
|
|
321
|
+
* This prop should be memoized.
|
|
322
|
+
* It can be used to support multiple focus trap mounted at the same time.
|
|
323
|
+
* @default function defaultIsEnabled(): boolean {
|
|
324
|
+
* return true;
|
|
325
|
+
* }
|
|
326
|
+
*/
|
|
327
|
+
isEnabled: _propTypes.default.func,
|
|
328
|
+
/**
|
|
329
|
+
* If `true`, focus is locked.
|
|
330
|
+
*/
|
|
331
|
+
open: _propTypes.default.bool.isRequired
|
|
332
|
+
} : void 0;
|
|
333
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
334
|
+
// eslint-disable-next-line
|
|
335
|
+
FocusTrap['propTypes' + ''] = (0, _utils.exactProp)(FocusTrap.propTypes);
|
|
336
|
+
}
|
|
337
|
+
var _default = exports.default = FocusTrap;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
Object.defineProperty(exports, "default", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function () {
|
|
9
|
-
return _FocusTrap.
|
|
10
|
+
return _FocusTrap.default;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
|
-
var _FocusTrap = require("
|
|
13
|
+
var _FocusTrap = _interopRequireDefault(require("./FocusTrap"));
|