@sitecore/sc-contenthub-blok 1.0.28 → 2.0.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/esm/BlokTheme.js +23 -17
- package/esm/BlokTheme.js.map +1 -1
- package/node_modules/@babel/code-frame/package.json +2 -2
- package/node_modules/@babel/generator/lib/buffer.js +11 -8
- package/node_modules/@babel/generator/lib/buffer.js.map +1 -1
- package/node_modules/@babel/generator/lib/node/index.js +22 -8
- package/node_modules/@babel/generator/lib/node/index.js.map +1 -1
- package/node_modules/@babel/generator/lib/printer.js +2 -1
- package/node_modules/@babel/generator/lib/printer.js.map +1 -1
- package/node_modules/@babel/generator/lib/source-map.js +3 -1
- package/node_modules/@babel/generator/lib/source-map.js.map +1 -1
- package/node_modules/@babel/generator/package.json +6 -6
- package/node_modules/@babel/helper-globals/package.json +1 -1
- package/node_modules/@babel/helper-module-imports/package.json +4 -4
- package/node_modules/@babel/helper-string-parser/package.json +1 -1
- package/node_modules/@babel/helper-validator-identifier/package.json +1 -1
- package/node_modules/@babel/parser/lib/index.js +19 -7
- package/node_modules/@babel/parser/lib/index.js.map +1 -1
- package/node_modules/@babel/parser/package.json +7 -7
- package/node_modules/@babel/parser/typings/babel-parser.d.ts +1 -1
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@babel/template/package.json +4 -4
- package/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
- package/node_modules/@babel/traverse/lib/visitors.js +1 -1
- package/node_modules/@babel/traverse/package.json +9 -9
- package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js +2 -1
- package/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -1
- package/node_modules/@babel/types/lib/definitions/core.js +11 -1
- package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
- package/node_modules/@babel/types/lib/index-legacy.d.ts +4 -5
- package/node_modules/@babel/types/lib/index.d.ts +5 -6
- package/node_modules/@babel/types/lib/index.js.flow +4 -5
- package/node_modules/@babel/types/package.json +6 -6
- package/node_modules/@mui/core-downloads-tracker/LICENSE +1 -1
- package/node_modules/@mui/core-downloads-tracker/package.json +1 -1
- package/node_modules/@mui/material/Accordion/Accordion.d.mts +2 -2
- package/node_modules/@mui/material/Accordion/Accordion.d.ts +2 -2
- package/node_modules/@mui/material/Accordion/Accordion.js +3 -2
- package/node_modules/@mui/material/Accordion/Accordion.mjs +3 -2
- package/node_modules/@mui/material/AccordionSummary/AccordionSummary.js +27 -29
- package/node_modules/@mui/material/AccordionSummary/AccordionSummary.mjs +27 -29
- package/node_modules/@mui/material/Autocomplete/Autocomplete.d.mts +12 -1
- package/node_modules/@mui/material/Autocomplete/Autocomplete.d.ts +12 -1
- package/node_modules/@mui/material/Autocomplete/Autocomplete.js +48 -22
- package/node_modules/@mui/material/Autocomplete/Autocomplete.mjs +48 -22
- package/node_modules/@mui/material/Autocomplete/autocompleteClasses.d.mts +2 -0
- package/node_modules/@mui/material/Autocomplete/autocompleteClasses.d.ts +2 -0
- package/node_modules/@mui/material/Autocomplete/autocompleteClasses.js +1 -1
- package/node_modules/@mui/material/Autocomplete/autocompleteClasses.mjs +1 -1
- package/node_modules/@mui/material/Avatar/Avatar.js +2 -0
- package/node_modules/@mui/material/Avatar/Avatar.mjs +2 -0
- package/node_modules/@mui/material/Backdrop/Backdrop.d.mts +2 -2
- package/node_modules/@mui/material/Backdrop/Backdrop.d.ts +2 -2
- package/node_modules/@mui/material/Badge/Badge.js +28 -24
- package/node_modules/@mui/material/Badge/Badge.mjs +28 -24
- package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/node_modules/@mui/material/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/node_modules/@mui/material/Button/Button.js +11 -15
- package/node_modules/@mui/material/Button/Button.mjs +11 -15
- package/node_modules/@mui/material/ButtonBase/ButtonBase.js +1 -1
- package/node_modules/@mui/material/ButtonBase/ButtonBase.mjs +1 -1
- package/node_modules/@mui/material/ButtonBase/Ripple.js +21 -11
- package/node_modules/@mui/material/ButtonBase/Ripple.mjs +21 -11
- package/node_modules/@mui/material/ButtonBase/TouchRipple.js +252 -108
- package/node_modules/@mui/material/ButtonBase/TouchRipple.mjs +253 -109
- package/node_modules/@mui/material/ButtonGroup/ButtonGroup.js +3 -3
- package/node_modules/@mui/material/ButtonGroup/ButtonGroup.mjs +3 -3
- package/node_modules/@mui/material/CHANGELOG.md +286 -0
- package/node_modules/@mui/material/CardActionArea/CardActionArea.js +2 -1
- package/node_modules/@mui/material/CardActionArea/CardActionArea.mjs +2 -1
- package/node_modules/@mui/material/Checkbox/Checkbox.js +3 -1
- package/node_modules/@mui/material/Checkbox/Checkbox.mjs +3 -1
- package/node_modules/@mui/material/Chip/Chip.js +2 -1
- package/node_modules/@mui/material/Chip/Chip.mjs +2 -1
- package/node_modules/@mui/material/CircularProgress/CircularProgress.js +85 -55
- package/node_modules/@mui/material/CircularProgress/CircularProgress.mjs +84 -55
- package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.js +1 -1
- package/node_modules/@mui/material/ClickAwayListener/ClickAwayListener.mjs +1 -1
- package/node_modules/@mui/material/Collapse/Collapse.d.mts +15 -3
- package/node_modules/@mui/material/Collapse/Collapse.d.ts +15 -3
- package/node_modules/@mui/material/Collapse/Collapse.js +44 -31
- package/node_modules/@mui/material/Collapse/Collapse.mjs +43 -30
- package/node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.d.mts +1 -1
- package/node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/node_modules/@mui/material/Dialog/Dialog.d.mts +2 -2
- package/node_modules/@mui/material/Dialog/Dialog.d.ts +2 -2
- package/node_modules/@mui/material/Dialog/Dialog.js +2 -0
- package/node_modules/@mui/material/Dialog/Dialog.mjs +2 -0
- package/node_modules/@mui/material/Drawer/Drawer.d.mts +2 -2
- package/node_modules/@mui/material/Drawer/Drawer.d.ts +2 -2
- package/node_modules/@mui/material/Fab/Fab.js +2 -1
- package/node_modules/@mui/material/Fab/Fab.mjs +2 -1
- package/node_modules/@mui/material/Fade/Fade.d.mts +15 -2
- package/node_modules/@mui/material/Fade/Fade.d.ts +15 -2
- package/node_modules/@mui/material/Fade/Fade.js +46 -19
- package/node_modules/@mui/material/Fade/Fade.mjs +45 -18
- package/node_modules/@mui/material/FilledInput/FilledInput.js +11 -4
- package/node_modules/@mui/material/FilledInput/FilledInput.mjs +11 -4
- package/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.d.mts +2 -0
- package/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.d.ts +2 -0
- package/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.js +1 -1
- package/node_modules/@mui/material/FormControlLabel/formControlLabelClasses.mjs +1 -1
- package/node_modules/@mui/material/Grow/Grow.d.mts +15 -2
- package/node_modules/@mui/material/Grow/Grow.d.ts +15 -2
- package/node_modules/@mui/material/Grow/Grow.js +45 -28
- package/node_modules/@mui/material/Grow/Grow.mjs +44 -27
- package/node_modules/@mui/material/IconButton/IconButton.js +2 -1
- package/node_modules/@mui/material/IconButton/IconButton.mjs +2 -1
- package/node_modules/@mui/material/InitColorSchemeScript/InitColorSchemeScript.d.mts +6 -6
- package/node_modules/@mui/material/InitColorSchemeScript/InitColorSchemeScript.d.ts +6 -6
- package/node_modules/@mui/material/Input/Input.js +3 -2
- package/node_modules/@mui/material/Input/Input.mjs +3 -2
- package/node_modules/@mui/material/InputBase/InputBase.js +3 -1
- package/node_modules/@mui/material/InputBase/InputBase.mjs +3 -1
- package/node_modules/@mui/material/InputLabel/InputLabel.js +2 -1
- package/node_modules/@mui/material/InputLabel/InputLabel.mjs +2 -1
- package/node_modules/@mui/material/LICENSE +1 -1
- package/node_modules/@mui/material/LinearProgress/LinearProgress.js +187 -120
- package/node_modules/@mui/material/LinearProgress/LinearProgress.mjs +186 -120
- package/node_modules/@mui/material/ListItem/ListItem.d.mts +2 -1
- package/node_modules/@mui/material/ListItem/ListItem.d.ts +2 -1
- package/node_modules/@mui/material/ListItem/ListItem.js +3 -2
- package/node_modules/@mui/material/ListItem/ListItem.mjs +3 -2
- package/node_modules/@mui/material/ListItemButton/ListItemButton.d.mts +1 -1
- package/node_modules/@mui/material/ListItemButton/ListItemButton.d.ts +1 -1
- package/node_modules/@mui/material/ListItemButton/ListItemButton.js +2 -1
- package/node_modules/@mui/material/ListItemButton/ListItemButton.mjs +2 -1
- package/node_modules/@mui/material/Menu/Menu.d.mts +1 -1
- package/node_modules/@mui/material/Menu/Menu.d.ts +1 -1
- package/node_modules/@mui/material/MenuItem/MenuItem.d.mts +1 -0
- package/node_modules/@mui/material/MenuItem/MenuItem.d.ts +1 -0
- package/node_modules/@mui/material/MenuItem/MenuItem.js +7 -0
- package/node_modules/@mui/material/MenuItem/MenuItem.mjs +7 -0
- package/node_modules/@mui/material/MenuList/MenuList.js +6 -2
- package/node_modules/@mui/material/MenuList/MenuList.mjs +6 -2
- package/node_modules/@mui/material/MobileStepper/MobileStepper.js +2 -1
- package/node_modules/@mui/material/MobileStepper/MobileStepper.mjs +2 -1
- package/node_modules/@mui/material/Modal/Modal.js +2 -1
- package/node_modules/@mui/material/Modal/Modal.mjs +2 -1
- package/node_modules/@mui/material/Modal/ModalManager.js +19 -30
- package/node_modules/@mui/material/Modal/ModalManager.mjs +19 -30
- package/node_modules/@mui/material/Modal/useModal.js +7 -0
- package/node_modules/@mui/material/Modal/useModal.mjs +7 -0
- package/node_modules/@mui/material/Modal/useModal.types.d.mts +5 -0
- package/node_modules/@mui/material/Modal/useModal.types.d.ts +5 -0
- package/node_modules/@mui/material/NativeSelect/NativeSelectInput.js +32 -3
- package/node_modules/@mui/material/NativeSelect/NativeSelectInput.mjs +32 -3
- package/node_modules/@mui/material/NoSsr/NoSsr.js +1 -0
- package/node_modules/@mui/material/NoSsr/NoSsr.mjs +1 -0
- package/node_modules/@mui/material/OutlinedInput/NotchedOutline.js +4 -3
- package/node_modules/@mui/material/OutlinedInput/NotchedOutline.mjs +4 -3
- package/node_modules/@mui/material/OutlinedInput/OutlinedInput.js +7 -1
- package/node_modules/@mui/material/OutlinedInput/OutlinedInput.mjs +7 -1
- package/node_modules/@mui/material/PaginationItem/PaginationItem.js +2 -1
- package/node_modules/@mui/material/PaginationItem/PaginationItem.mjs +2 -1
- package/node_modules/@mui/material/Paper/Paper.js +2 -1
- package/node_modules/@mui/material/Paper/Paper.mjs +2 -1
- package/node_modules/@mui/material/Popover/Popover.d.mts +1 -1
- package/node_modules/@mui/material/Popover/Popover.d.ts +1 -1
- package/node_modules/@mui/material/Popper/BasePopper.js +1 -6
- package/node_modules/@mui/material/Popper/BasePopper.mjs +1 -6
- package/node_modules/@mui/material/README.md +3 -2
- package/node_modules/@mui/material/Radio/Radio.js +3 -0
- package/node_modules/@mui/material/Radio/Radio.mjs +3 -0
- package/node_modules/@mui/material/Radio/RadioButtonIcon.js +3 -2
- package/node_modules/@mui/material/Radio/RadioButtonIcon.mjs +3 -2
- package/node_modules/@mui/material/Rating/Rating.js +4 -3
- package/node_modules/@mui/material/Rating/Rating.mjs +4 -3
- package/node_modules/@mui/material/Select/SelectInput.js +118 -25
- package/node_modules/@mui/material/Select/SelectInput.mjs +118 -25
- package/node_modules/@mui/material/Select/utils/SelectFocusSourceContext.d.mts +2 -2
- package/node_modules/@mui/material/Select/utils/SelectFocusSourceContext.d.ts +2 -2
- package/node_modules/@mui/material/Select/utils/closedTypeahead.js +73 -0
- package/node_modules/@mui/material/Select/utils/closedTypeahead.mjs +63 -0
- package/node_modules/@mui/material/Skeleton/Skeleton.js +22 -2
- package/node_modules/@mui/material/Skeleton/Skeleton.mjs +22 -2
- package/node_modules/@mui/material/Slide/Slide.d.mts +15 -2
- package/node_modules/@mui/material/Slide/Slide.d.ts +15 -2
- package/node_modules/@mui/material/Slide/Slide.js +53 -25
- package/node_modules/@mui/material/Slide/Slide.mjs +52 -24
- package/node_modules/@mui/material/Slider/Slider.js +4 -3
- package/node_modules/@mui/material/Slider/Slider.mjs +4 -3
- package/node_modules/@mui/material/Slider/SliderValueLabel.d.mts +2 -2
- package/node_modules/@mui/material/Slider/SliderValueLabel.d.ts +2 -2
- package/node_modules/@mui/material/Slider/useSlider.js +1 -1
- package/node_modules/@mui/material/Slider/useSlider.mjs +1 -1
- package/node_modules/@mui/material/Snackbar/Snackbar.d.mts +2 -2
- package/node_modules/@mui/material/Snackbar/Snackbar.d.ts +2 -2
- package/node_modules/@mui/material/SpeedDial/SpeedDial.d.mts +1 -1
- package/node_modules/@mui/material/SpeedDial/SpeedDial.d.ts +1 -1
- package/node_modules/@mui/material/SpeedDial/SpeedDial.js +6 -2
- package/node_modules/@mui/material/SpeedDial/SpeedDial.mjs +6 -2
- package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.js +11 -2
- package/node_modules/@mui/material/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/node_modules/@mui/material/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/node_modules/@mui/material/Stack/Stack.d.mts +1 -1
- package/node_modules/@mui/material/Stack/Stack.d.ts +1 -1
- package/node_modules/@mui/material/Stack/Stack.js +1 -1
- package/node_modules/@mui/material/Stack/Stack.mjs +1 -1
- package/node_modules/@mui/material/Step/Step.js +47 -15
- package/node_modules/@mui/material/Step/Step.mjs +47 -15
- package/node_modules/@mui/material/Step/StepContext.d.mts +1 -1
- package/node_modules/@mui/material/Step/StepContext.d.ts +1 -1
- package/node_modules/@mui/material/StepButton/StepButton.js +9 -3
- package/node_modules/@mui/material/StepButton/StepButton.mjs +9 -3
- package/node_modules/@mui/material/StepConnector/StepConnector.js +10 -0
- package/node_modules/@mui/material/StepConnector/StepConnector.mjs +10 -0
- package/node_modules/@mui/material/StepContent/StepContent.d.mts +2 -2
- package/node_modules/@mui/material/StepContent/StepContent.d.ts +2 -2
- package/node_modules/@mui/material/StepContent/StepContent.js +26 -2
- package/node_modules/@mui/material/StepContent/StepContent.mjs +26 -2
- package/node_modules/@mui/material/StepIcon/StepIcon.js +2 -1
- package/node_modules/@mui/material/StepIcon/StepIcon.mjs +2 -1
- package/node_modules/@mui/material/StepLabel/StepLabel.js +52 -7
- package/node_modules/@mui/material/StepLabel/StepLabel.mjs +52 -7
- package/node_modules/@mui/material/Stepper/Stepper.d.mts +2 -0
- package/node_modules/@mui/material/Stepper/Stepper.d.ts +2 -0
- package/node_modules/@mui/material/Stepper/Stepper.js +20 -2
- package/node_modules/@mui/material/Stepper/Stepper.mjs +20 -2
- package/node_modules/@mui/material/Stepper/StepperContext.d.mts +1 -1
- package/node_modules/@mui/material/Stepper/StepperContext.d.ts +1 -1
- package/node_modules/@mui/material/SvgIcon/SvgIcon.js +2 -1
- package/node_modules/@mui/material/SvgIcon/SvgIcon.mjs +2 -1
- package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.js +14 -3
- package/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.mjs +14 -3
- package/node_modules/@mui/material/Switch/Switch.js +3 -2
- package/node_modules/@mui/material/Switch/Switch.mjs +3 -2
- package/node_modules/@mui/material/TablePagination/TablePagination.js +10 -3
- package/node_modules/@mui/material/TablePagination/TablePagination.mjs +9 -2
- package/node_modules/@mui/material/TableSortLabel/TableSortLabel.js +2 -1
- package/node_modules/@mui/material/TableSortLabel/TableSortLabel.mjs +2 -1
- package/node_modules/@mui/material/Tabs/Tabs.js +15 -3
- package/node_modules/@mui/material/Tabs/Tabs.mjs +15 -3
- package/node_modules/@mui/material/ToggleButton/RovingToggleButton.d.mts +13 -0
- package/node_modules/@mui/material/ToggleButton/RovingToggleButton.d.ts +13 -0
- package/node_modules/@mui/material/ToggleButton/RovingToggleButton.js +37 -0
- package/node_modules/@mui/material/ToggleButton/RovingToggleButton.mjs +31 -0
- package/node_modules/@mui/material/ToggleButton/ToggleButton.js +14 -2
- package/node_modules/@mui/material/ToggleButton/ToggleButton.mjs +14 -2
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.js +33 -13
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroup.mjs +33 -13
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext.d.mts +1 -0
- package/node_modules/@mui/material/ToggleButtonGroup/ToggleButtonGroupContext.d.ts +1 -0
- package/node_modules/@mui/material/Tooltip/Tooltip.d.mts +2 -2
- package/node_modules/@mui/material/Tooltip/Tooltip.d.ts +2 -2
- package/node_modules/@mui/material/Tooltip/Tooltip.js +5 -2
- package/node_modules/@mui/material/Tooltip/Tooltip.mjs +5 -2
- package/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.js +42 -8
- package/node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.mjs +42 -8
- package/node_modules/@mui/material/Zoom/Zoom.d.mts +15 -2
- package/node_modules/@mui/material/Zoom/Zoom.d.ts +15 -2
- package/node_modules/@mui/material/Zoom/Zoom.js +43 -16
- package/node_modules/@mui/material/Zoom/Zoom.mjs +42 -15
- package/node_modules/@mui/material/index.js +1 -1
- package/node_modules/@mui/material/index.mjs +1 -1
- package/node_modules/@mui/material/internal/SwitchBase.js +1 -1
- package/node_modules/@mui/material/internal/SwitchBase.mjs +1 -1
- package/node_modules/@mui/material/internal/Transition.d.mts +34 -0
- package/node_modules/@mui/material/internal/Transition.d.ts +34 -0
- package/node_modules/@mui/material/internal/Transition.js +463 -0
- package/node_modules/@mui/material/internal/Transition.mjs +455 -0
- package/node_modules/@mui/material/internal/react-transition-group.d.mts +16 -0
- package/node_modules/@mui/material/internal/react-transition-group.d.ts +16 -0
- package/node_modules/@mui/material/locale/zhCN.js +21 -0
- package/node_modules/@mui/material/locale/zhCN.mjs +21 -0
- package/node_modules/@mui/material/package.json +11 -8
- package/node_modules/@mui/material/styles/ThemeProvider.d.mts +1 -1
- package/node_modules/@mui/material/styles/ThemeProvider.d.ts +1 -1
- package/node_modules/@mui/material/styles/ThemeProviderWithVars.d.mts +8 -8
- package/node_modules/@mui/material/styles/ThemeProviderWithVars.d.ts +8 -8
- package/node_modules/@mui/material/styles/createGetSelector.d.mts +5 -5
- package/node_modules/@mui/material/styles/createGetSelector.d.ts +5 -5
- package/node_modules/@mui/material/styles/createMotion.d.mts +8 -0
- package/node_modules/@mui/material/styles/createMotion.d.ts +8 -0
- package/node_modules/@mui/material/styles/createMotion.js +13 -0
- package/node_modules/@mui/material/styles/createMotion.mjs +7 -0
- package/node_modules/@mui/material/styles/createThemeFoundation.d.mts +2 -0
- package/node_modules/@mui/material/styles/createThemeFoundation.d.ts +2 -0
- package/node_modules/@mui/material/styles/createThemeNoVars.d.mts +3 -0
- package/node_modules/@mui/material/styles/createThemeNoVars.d.ts +3 -0
- package/node_modules/@mui/material/styles/createThemeNoVars.js +5 -0
- package/node_modules/@mui/material/styles/createThemeNoVars.mjs +5 -0
- package/node_modules/@mui/material/styles/createTransitions.d.mts +6 -2
- package/node_modules/@mui/material/styles/createTransitions.d.ts +6 -2
- package/node_modules/@mui/material/styles/createTransitions.js +12 -4
- package/node_modules/@mui/material/styles/createTransitions.mjs +12 -4
- package/node_modules/@mui/material/styles/enhanceHighContrast.d.mts +70 -0
- package/node_modules/@mui/material/styles/enhanceHighContrast.d.ts +70 -0
- package/node_modules/@mui/material/styles/enhanceHighContrast.js +502 -0
- package/node_modules/@mui/material/styles/enhanceHighContrast.mjs +495 -0
- package/node_modules/@mui/material/styles/identifier.d.mts +1 -1
- package/node_modules/@mui/material/styles/identifier.d.ts +1 -1
- package/node_modules/@mui/material/styles/index.d.mts +2 -0
- package/node_modules/@mui/material/styles/index.d.ts +2 -0
- package/node_modules/@mui/material/styles/index.js +8 -0
- package/node_modules/@mui/material/styles/index.mjs +1 -0
- package/node_modules/@mui/material/styles/reducedMotion.d.mts +7 -0
- package/node_modules/@mui/material/styles/reducedMotion.d.ts +7 -0
- package/node_modules/@mui/material/styles/reducedMotion.js +21 -0
- package/node_modules/@mui/material/styles/reducedMotion.mjs +14 -0
- package/node_modules/@mui/material/styles/shouldSkipGeneratingVar.js +1 -1
- package/node_modules/@mui/material/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/node_modules/@mui/material/styles/stringifyTheme.js +1 -0
- package/node_modules/@mui/material/styles/stringifyTheme.mjs +1 -0
- package/node_modules/@mui/material/transitions/index.d.mts +1 -1
- package/node_modules/@mui/material/transitions/index.d.ts +1 -1
- package/node_modules/@mui/material/transitions/index.js +0 -11
- package/node_modules/@mui/material/transitions/index.mjs +1 -1
- package/node_modules/@mui/material/transitions/transition.d.mts +1 -12
- package/node_modules/@mui/material/transitions/transition.d.ts +1 -12
- package/node_modules/@mui/material/transitions/types.d.mts +73 -0
- package/node_modules/@mui/material/transitions/types.d.ts +73 -0
- package/node_modules/@mui/material/transitions/useReducedMotion.d.mts +14 -0
- package/node_modules/@mui/material/transitions/useReducedMotion.d.ts +14 -0
- package/node_modules/@mui/material/transitions/useReducedMotion.js +117 -0
- package/node_modules/@mui/material/transitions/useReducedMotion.mjs +110 -0
- package/node_modules/@mui/material/transitions/utils.d.mts +34 -2
- package/node_modules/@mui/material/transitions/utils.d.ts +34 -2
- package/node_modules/@mui/material/transitions/utils.js +33 -4
- package/node_modules/@mui/material/transitions/utils.mjs +31 -4
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.mts +8 -1
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.d.ts +8 -1
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.js +76 -13
- package/node_modules/@mui/material/useAutocomplete/useAutocomplete.mjs +76 -13
- package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.js +2 -1
- package/node_modules/@mui/material/useScrollTrigger/useScrollTrigger.mjs +2 -1
- package/node_modules/@mui/material/utils/memoTheme.d.mts +1 -1
- package/node_modules/@mui/material/utils/memoTheme.d.ts +1 -1
- package/node_modules/@mui/material/utils/types.d.mts +1 -1
- package/node_modules/@mui/material/utils/types.d.ts +1 -1
- package/node_modules/@mui/material/utils/useSlot.d.mts +1 -1
- package/node_modules/@mui/material/utils/useSlot.d.ts +1 -1
- package/node_modules/@mui/material/version/index.js +2 -2
- package/node_modules/@mui/material/version/index.mjs +2 -2
- package/node_modules/@mui/material/zero-styled/index.d.mts +1 -1
- package/node_modules/@mui/material/zero-styled/index.d.ts +1 -1
- package/node_modules/@mui/private-theming/CHANGELOG.md +263 -0
- package/node_modules/@mui/private-theming/LICENSE +1 -1
- package/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.d.mts +9 -2
- package/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.d.ts +9 -2
- package/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js +2 -2
- package/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.mjs +3 -4
- package/node_modules/@mui/private-theming/ThemeProvider/index.d.mts +1 -1
- package/node_modules/@mui/private-theming/ThemeProvider/index.d.ts +1 -1
- package/node_modules/@mui/private-theming/ThemeProvider/index.mjs +1 -0
- package/node_modules/@mui/private-theming/ThemeProvider/nested.d.mts +2 -0
- package/node_modules/@mui/private-theming/ThemeProvider/nested.d.ts +2 -0
- package/node_modules/@mui/private-theming/index.d.mts +1 -2
- package/node_modules/@mui/private-theming/index.d.ts +1 -2
- package/node_modules/@mui/private-theming/index.js +1 -1
- package/node_modules/@mui/private-theming/index.mjs +1 -1
- package/node_modules/@mui/private-theming/package.json +3 -3
- package/node_modules/@mui/private-theming/useTheme/ThemeContext.d.mts +3 -0
- package/node_modules/@mui/private-theming/useTheme/ThemeContext.d.ts +3 -0
- package/node_modules/@mui/private-theming/useTheme/index.d.mts +1 -2
- package/node_modules/@mui/private-theming/useTheme/index.d.ts +1 -2
- package/node_modules/@mui/private-theming/useTheme/useTheme.d.mts +1 -1
- package/node_modules/@mui/private-theming/useTheme/useTheme.d.ts +1 -1
- package/node_modules/@mui/styled-engine/CHANGELOG.md +395 -1245
- package/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.d.mts +2 -2
- package/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.d.ts +2 -2
- package/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js +1 -1
- package/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.mjs +1 -1
- package/node_modules/@mui/styled-engine/GlobalStyles/index.d.mts +1 -1
- package/node_modules/@mui/styled-engine/GlobalStyles/index.d.ts +1 -1
- package/node_modules/@mui/styled-engine/LICENSE +1 -1
- package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +10 -2
- package/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.mjs +11 -4
- package/node_modules/@mui/styled-engine/StyledEngineProvider/index.d.mts +1 -1
- package/node_modules/@mui/styled-engine/StyledEngineProvider/index.d.ts +1 -1
- package/node_modules/@mui/styled-engine/index.d.mts +13 -28
- package/node_modules/@mui/styled-engine/index.d.ts +13 -28
- package/node_modules/@mui/styled-engine/index.js +28 -4
- package/node_modules/@mui/styled-engine/index.mjs +30 -3
- package/node_modules/@mui/styled-engine/package.json +2 -2
- package/node_modules/@mui/system/Box/Box.d.mts +15 -19
- package/node_modules/@mui/system/Box/Box.d.ts +15 -19
- package/node_modules/@mui/system/Box/Box.js +16 -1
- package/node_modules/@mui/system/Box/Box.mjs +17 -1
- package/node_modules/@mui/system/Box/index.js +12 -2
- package/node_modules/@mui/system/Box/index.mjs +1 -0
- package/node_modules/@mui/system/CHANGELOG.md +263 -0
- package/node_modules/@mui/system/Container/index.d.mts +1 -1
- package/node_modules/@mui/system/Container/index.d.ts +1 -1
- package/node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.d.mts +1 -1
- package/node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/node_modules/@mui/system/GlobalStyles/GlobalStyles.d.mts +1 -1
- package/node_modules/@mui/system/GlobalStyles/GlobalStyles.d.ts +1 -1
- package/node_modules/@mui/system/Grid/Grid.js +0 -1
- package/node_modules/@mui/system/Grid/Grid.mjs +0 -1
- package/node_modules/@mui/system/Grid/GridProps.d.mts +0 -1
- package/node_modules/@mui/system/Grid/GridProps.d.ts +0 -1
- package/node_modules/@mui/system/Grid/gridGenerator.d.mts +2 -2
- package/node_modules/@mui/system/Grid/gridGenerator.d.ts +2 -2
- package/node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.d.mts +3 -1
- package/node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.d.ts +3 -1
- package/node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.js +34 -1
- package/node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.mjs +33 -1
- package/node_modules/@mui/system/LICENSE +1 -1
- package/node_modules/@mui/system/Stack/Stack.js +1 -1
- package/node_modules/@mui/system/Stack/Stack.mjs +1 -1
- package/node_modules/@mui/system/Stack/StackProps.d.mts +1 -1
- package/node_modules/@mui/system/Stack/StackProps.d.ts +1 -1
- package/node_modules/@mui/system/ThemeProvider/ThemeProvider.d.mts +9 -6
- package/node_modules/@mui/system/ThemeProvider/ThemeProvider.d.ts +9 -6
- package/node_modules/@mui/system/ThemeProvider/ThemeProvider.js +3 -2
- package/node_modules/@mui/system/ThemeProvider/ThemeProvider.mjs +3 -2
- package/node_modules/@mui/system/ThemeProvider/index.d.mts +1 -1
- package/node_modules/@mui/system/ThemeProvider/index.d.ts +1 -1
- package/node_modules/@mui/system/ThemeProvider/useLayerOrder.d.mts +1 -1
- package/node_modules/@mui/system/ThemeProvider/useLayerOrder.d.ts +1 -1
- package/node_modules/@mui/system/borders/borders.d.mts +14 -12
- package/node_modules/@mui/system/borders/borders.d.ts +14 -12
- package/node_modules/@mui/system/borders/borders.js +2 -4
- package/node_modules/@mui/system/borders/borders.mjs +3 -4
- package/node_modules/@mui/system/breakpoints/breakpoints.d.mts +13 -16
- package/node_modules/@mui/system/breakpoints/breakpoints.d.ts +13 -16
- package/node_modules/@mui/system/breakpoints/breakpoints.js +17 -16
- package/node_modules/@mui/system/breakpoints/breakpoints.mjs +17 -16
- package/node_modules/@mui/system/compose/compose.d.mts +3 -10
- package/node_modules/@mui/system/compose/compose.d.ts +3 -10
- package/node_modules/@mui/system/compose/compose.js +0 -2
- package/node_modules/@mui/system/compose/compose.mjs +0 -2
- package/node_modules/@mui/system/createBox/createBox.d.mts +4 -4
- package/node_modules/@mui/system/createBox/createBox.d.ts +4 -4
- package/node_modules/@mui/system/createBreakpoints/createBreakpoints.d.mts +3 -54
- package/node_modules/@mui/system/createBreakpoints/createBreakpoints.d.ts +3 -54
- package/node_modules/@mui/system/createBreakpoints/createBreakpoints.js +6 -8
- package/node_modules/@mui/system/createBreakpoints/createBreakpoints.mjs +6 -8
- package/node_modules/@mui/system/createBreakpoints/index.d.mts +0 -1
- package/node_modules/@mui/system/createBreakpoints/index.d.ts +0 -1
- package/node_modules/@mui/system/createTheme/createSpacing.d.mts +1 -1
- package/node_modules/@mui/system/createTheme/createSpacing.d.ts +1 -1
- package/node_modules/@mui/system/createTheme/shape.d.mts +2 -2
- package/node_modules/@mui/system/createTheme/shape.d.ts +2 -2
- package/node_modules/@mui/system/cssGrid/cssGrid.d.mts +13 -13
- package/node_modules/@mui/system/cssGrid/cssGrid.d.ts +13 -13
- package/node_modules/@mui/system/cssGrid/cssGrid.js +0 -8
- package/node_modules/@mui/system/cssGrid/cssGrid.mjs +0 -9
- package/node_modules/@mui/system/cssVars/createCssVarsProvider.js +2 -2
- package/node_modules/@mui/system/cssVars/createCssVarsProvider.mjs +2 -2
- package/node_modules/@mui/system/cssVars/cssVarsParser.js +10 -2
- package/node_modules/@mui/system/cssVars/cssVarsParser.mjs +10 -2
- package/node_modules/@mui/system/cssVars/useCurrentColorScheme.js +1 -0
- package/node_modules/@mui/system/cssVars/useCurrentColorScheme.mjs +1 -0
- package/node_modules/@mui/system/display/display.d.mts +49 -1
- package/node_modules/@mui/system/display/display.d.ts +49 -1
- package/node_modules/@mui/system/display/display.js +2 -1
- package/node_modules/@mui/system/display/display.mjs +2 -1
- package/node_modules/@mui/system/flexbox/flexbox.d.mts +14 -14
- package/node_modules/@mui/system/flexbox/flexbox.d.ts +14 -14
- package/node_modules/@mui/system/getThemeValue/getThemeValue.d.mts +2 -1
- package/node_modules/@mui/system/getThemeValue/getThemeValue.d.ts +2 -1
- package/node_modules/@mui/system/getThemeValue/getThemeValue.js +6 -2
- package/node_modules/@mui/system/getThemeValue/getThemeValue.mjs +7 -3
- package/node_modules/@mui/system/index.js +1 -1
- package/node_modules/@mui/system/index.mjs +1 -1
- package/node_modules/@mui/system/memoTheme.d.mts +1 -1
- package/node_modules/@mui/system/memoTheme.d.ts +1 -1
- package/node_modules/@mui/system/memoize/memoize.d.mts +1 -1
- package/node_modules/@mui/system/memoize/memoize.d.ts +1 -1
- package/node_modules/@mui/system/package.json +62 -62
- package/node_modules/@mui/system/palette/palette.d.mts +4 -3
- package/node_modules/@mui/system/palette/palette.d.ts +4 -3
- package/node_modules/@mui/system/palette/palette.js +1 -0
- package/node_modules/@mui/system/palette/palette.mjs +2 -0
- package/node_modules/@mui/system/positions/positions.d.mts +49 -1
- package/node_modules/@mui/system/positions/positions.d.ts +49 -1
- package/node_modules/@mui/system/positions/positions.js +2 -1
- package/node_modules/@mui/system/positions/positions.mjs +2 -1
- package/node_modules/@mui/system/propsToClassKey/propsToClassKey.d.mts +5 -0
- package/node_modules/@mui/system/propsToClassKey/propsToClassKey.d.ts +5 -0
- package/node_modules/@mui/system/propsToClassKey/propsToClassKey.js +1 -1
- package/node_modules/@mui/system/propsToClassKey/propsToClassKey.mjs +1 -1
- package/node_modules/@mui/system/shadows/shadows.d.mts +4 -4
- package/node_modules/@mui/system/shadows/shadows.d.ts +4 -4
- package/node_modules/@mui/system/sizing/sizing.d.mts +10 -10
- package/node_modules/@mui/system/sizing/sizing.d.ts +10 -10
- package/node_modules/@mui/system/sizing/sizing.js +7 -2
- package/node_modules/@mui/system/sizing/sizing.mjs +5 -1
- package/node_modules/@mui/system/spacing/spacing.d.mts +10 -14
- package/node_modules/@mui/system/spacing/spacing.d.ts +10 -14
- package/node_modules/@mui/system/spacing/spacing.js +17 -13
- package/node_modules/@mui/system/spacing/spacing.mjs +16 -9
- package/node_modules/@mui/system/styleFunctionSx/defaultSxConfig.d.mts +1 -1
- package/node_modules/@mui/system/styleFunctionSx/defaultSxConfig.d.ts +1 -1
- package/node_modules/@mui/system/styleFunctionSx/extendSxProp.d.mts +4 -2
- package/node_modules/@mui/system/styleFunctionSx/extendSxProp.d.ts +4 -2
- package/node_modules/@mui/system/styled/styled.d.mts +1 -1
- package/node_modules/@mui/system/styled/styled.d.ts +1 -1
- package/node_modules/@mui/system/typography/typography.d.mts +10 -10
- package/node_modules/@mui/system/typography/typography.d.ts +10 -10
- package/node_modules/@mui/system/useTheme/useTheme.d.mts +4 -2
- package/node_modules/@mui/system/useTheme/useTheme.d.ts +4 -2
- package/node_modules/@mui/system/useThemeProps/getThemeProps.d.mts +2 -2
- package/node_modules/@mui/system/useThemeProps/getThemeProps.d.ts +2 -2
- package/node_modules/@mui/system/useThemeProps/index.d.mts +1 -1
- package/node_modules/@mui/system/useThemeProps/index.d.ts +1 -1
- package/node_modules/@mui/system/useThemeProps/useThemeProps.js +7 -6
- package/node_modules/@mui/system/useThemeProps/useThemeProps.mjs +7 -6
- package/node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.d.mts +2 -1
- package/node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.d.ts +2 -1
- package/node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -2
- package/node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.mjs +2 -2
- package/node_modules/@mui/system/version/index.js +3 -3
- package/node_modules/@mui/system/version/index.mjs +3 -3
- package/node_modules/@mui/types/CHANGELOG.md +395 -1245
- package/node_modules/@mui/types/LICENSE +1 -1
- package/node_modules/@mui/types/index.d.mts +1 -1
- package/node_modules/@mui/types/index.d.ts +1 -1
- package/node_modules/@mui/types/index.js +1 -1
- package/node_modules/@mui/types/index.mjs +1 -1
- package/node_modules/@mui/types/package.json +2 -2
- package/node_modules/@mui/utils/CHANGELOG.md +263 -0
- package/node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.d.mts +2 -1
- package/node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.d.ts +2 -1
- package/node_modules/@mui/utils/LICENSE +1 -1
- package/node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.js +1 -1
- package/node_modules/@mui/utils/elementAcceptingRef/elementAcceptingRef.mjs +1 -1
- package/node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.js +1 -1
- package/node_modules/@mui/utils/elementTypeAcceptingRef/elementTypeAcceptingRef.mjs +1 -1
- package/node_modules/@mui/utils/fastDeepAssign/fastDeepAssign.js +6 -1
- package/node_modules/@mui/utils/fastDeepAssign/fastDeepAssign.mjs +6 -1
- package/node_modules/@mui/utils/getDisplayName/getDisplayName.d.mts +1 -1
- package/node_modules/@mui/utils/getDisplayName/getDisplayName.d.ts +1 -1
- package/node_modules/@mui/utils/getDisplayName/getDisplayName.js +1 -1
- package/node_modules/@mui/utils/getDisplayName/getDisplayName.mjs +1 -1
- package/node_modules/@mui/utils/index.d.mts +1 -0
- package/node_modules/@mui/utils/index.d.ts +1 -0
- package/node_modules/@mui/utils/index.js +9 -1
- package/node_modules/@mui/utils/index.mjs +2 -1
- package/node_modules/@mui/utils/isHostComponent/isHostComponent.d.mts +1 -1
- package/node_modules/@mui/utils/isHostComponent/isHostComponent.d.ts +1 -1
- package/node_modules/@mui/utils/isMuiElement/isMuiElement.js +1 -1
- package/node_modules/@mui/utils/isMuiElement/isMuiElement.mjs +1 -1
- package/node_modules/@mui/utils/package.json +18 -4
- package/node_modules/@mui/utils/types/DataAttributes.d.mts +45 -0
- package/node_modules/@mui/utils/types/DataAttributes.d.ts +45 -0
- package/node_modules/@mui/utils/types/DataAttributes.js +5 -0
- package/node_modules/@mui/utils/types/DataAttributes.mjs +1 -0
- package/node_modules/@mui/utils/types/index.d.mts +4 -2
- package/node_modules/@mui/utils/types/index.d.ts +4 -2
- package/node_modules/@mui/utils/useEventCallback/useEventCallback.d.mts +1 -1
- package/node_modules/@mui/utils/useEventCallback/useEventCallback.d.ts +1 -1
- package/node_modules/@mui/utils/useEventCallback/useEventCallback.js +1 -1
- package/node_modules/@mui/utils/useEventCallback/useEventCallback.mjs +1 -1
- package/node_modules/@mui/utils/useForkRef/useForkRef.js +2 -2
- package/node_modules/@mui/utils/useForkRef/useForkRef.mjs +2 -2
- package/node_modules/@mui/utils/useId/useId.js +1 -0
- package/node_modules/@mui/utils/useId/useId.mjs +1 -0
- package/node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.js +2 -2
- package/node_modules/@mui/utils/useIsFocusVisible/useIsFocusVisible.mjs +2 -2
- package/node_modules/@mui/utils/useRovingTabIndex/useRovingTabIndex.d.mts +1 -1
- package/node_modules/@mui/utils/useRovingTabIndex/useRovingTabIndex.d.ts +1 -1
- package/node_modules/@mui/utils/useRovingTabIndex/useRovingTabIndex.js +7 -5
- package/node_modules/@mui/utils/useRovingTabIndex/useRovingTabIndex.mjs +7 -5
- package/node_modules/@mui/utils/useValueAsRef/index.d.mts +1 -0
- package/node_modules/@mui/utils/useValueAsRef/index.d.ts +1 -0
- package/node_modules/@mui/utils/useValueAsRef/index.js +13 -0
- package/node_modules/@mui/utils/useValueAsRef/index.mjs +1 -0
- package/node_modules/@mui/utils/useValueAsRef/useValueAsRef.d.mts +14 -0
- package/node_modules/@mui/utils/useValueAsRef/useValueAsRef.d.ts +14 -0
- package/node_modules/@mui/utils/useValueAsRef/useValueAsRef.js +35 -0
- package/node_modules/@mui/utils/useValueAsRef/useValueAsRef.mjs +29 -0
- package/node_modules/react-is/package.json +3 -3
- package/package.json +3 -3
- /package/node_modules/@mui/material/transitions/{transition.js → types.js} +0 -0
- /package/node_modules/@mui/material/transitions/{transition.mjs → types.mjs} +0 -0
|
@@ -8,6 +8,7 @@ interface ToggleButtonGroupContextType {
|
|
|
8
8
|
fullWidth?: ToggleButtonGroupProps['fullWidth'] | undefined;
|
|
9
9
|
color?: ToggleButtonGroupProps['color'] | undefined;
|
|
10
10
|
disabled?: ToggleButtonGroupProps['disabled'] | undefined;
|
|
11
|
+
isRovingTabIndex?: boolean | undefined;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* @ignore - internal component.
|
|
@@ -8,6 +8,7 @@ interface ToggleButtonGroupContextType {
|
|
|
8
8
|
fullWidth?: ToggleButtonGroupProps['fullWidth'] | undefined;
|
|
9
9
|
color?: ToggleButtonGroupProps['color'] | undefined;
|
|
10
10
|
disabled?: ToggleButtonGroupProps['disabled'] | undefined;
|
|
11
|
+
isRovingTabIndex?: boolean | undefined;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* @ignore - internal component.
|
|
@@ -4,7 +4,7 @@ import { PopperProps } from "../Popper/index.mjs";
|
|
|
4
4
|
import { Theme } from "../styles/index.mjs";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
6
6
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
8
8
|
import { TooltipClasses } from "./tooltipClasses.mjs";
|
|
9
9
|
export interface TooltipPopperSlotPropsOverrides {}
|
|
10
10
|
export interface TooltipTransitionSlotPropsOverrides {}
|
|
@@ -18,7 +18,7 @@ export interface TooltipSlots {
|
|
|
18
18
|
popper: React.ElementType;
|
|
19
19
|
/**
|
|
20
20
|
* The component used for the transition.
|
|
21
|
-
* [Follow this guide](
|
|
21
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
22
22
|
* @default Grow
|
|
23
23
|
*/
|
|
24
24
|
transition: React.ElementType;
|
|
@@ -4,7 +4,7 @@ import { PopperProps } from "../Popper/index.js";
|
|
|
4
4
|
import { Theme } from "../styles/index.js";
|
|
5
5
|
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
|
6
6
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
|
7
|
-
import { TransitionProps } from "../transitions/
|
|
7
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
8
8
|
import { TooltipClasses } from "./tooltipClasses.js";
|
|
9
9
|
export interface TooltipPopperSlotPropsOverrides {}
|
|
10
10
|
export interface TooltipTransitionSlotPropsOverrides {}
|
|
@@ -18,7 +18,7 @@ export interface TooltipSlots {
|
|
|
18
18
|
popper: React.ElementType;
|
|
19
19
|
/**
|
|
20
20
|
* The component used for the transition.
|
|
21
|
-
* [Follow this guide](
|
|
21
|
+
* [Follow this guide](/material-ui/transitions/#transition-slots) to learn more about the requirements for this component.
|
|
22
22
|
* @default Grow
|
|
23
23
|
*/
|
|
24
24
|
transition: React.ElementType;
|
|
@@ -330,6 +330,9 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
330
330
|
});
|
|
331
331
|
});
|
|
332
332
|
const handleMouseOver = event => {
|
|
333
|
+
if (childNode?.disabled) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
333
336
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
334
337
|
return;
|
|
335
338
|
}
|
|
@@ -381,14 +384,14 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
381
384
|
}
|
|
382
385
|
};
|
|
383
386
|
const handleFocus = event => {
|
|
384
|
-
// Workaround for https://github.com/
|
|
387
|
+
// Workaround for https://github.com/react/react/issues/7769
|
|
385
388
|
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
386
389
|
// We need to account for this eventuality.
|
|
387
390
|
if (!childNode) {
|
|
388
391
|
setChildNode(event.currentTarget);
|
|
389
392
|
}
|
|
390
393
|
if ((0, _isFocusVisible.default)(event.target)) {
|
|
391
|
-
// Workaround for https://github.com/
|
|
394
|
+
// Workaround for https://github.com/react/react/issues/9142.
|
|
392
395
|
// React does not fire blur when a focused element becomes disabled.
|
|
393
396
|
const handleNativeBlur = blurEvent => {
|
|
394
397
|
if (blurEvent.target.disabled) {
|
|
@@ -322,6 +322,9 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
324
|
const handleMouseOver = event => {
|
|
325
|
+
if (childNode?.disabled) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
325
328
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
326
329
|
return;
|
|
327
330
|
}
|
|
@@ -373,14 +376,14 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
373
376
|
}
|
|
374
377
|
};
|
|
375
378
|
const handleFocus = event => {
|
|
376
|
-
// Workaround for https://github.com/
|
|
379
|
+
// Workaround for https://github.com/react/react/issues/7769
|
|
377
380
|
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
378
381
|
// We need to account for this eventuality.
|
|
379
382
|
if (!childNode) {
|
|
380
383
|
setChildNode(event.currentTarget);
|
|
381
384
|
}
|
|
382
385
|
if (isFocusVisible(event.target)) {
|
|
383
|
-
// Workaround for https://github.com/
|
|
386
|
+
// Workaround for https://github.com/react/react/issues/9142.
|
|
384
387
|
// React does not fire blur when a focused element becomes disabled.
|
|
385
388
|
const handleNativeBlur = blurEvent => {
|
|
386
389
|
if (blurEvent.target.disabled) {
|
|
@@ -164,17 +164,51 @@ function FocusTrap(props) {
|
|
|
164
164
|
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
+
const rootElement = rootRef.current;
|
|
167
168
|
const activeElement = (0, _getActiveElement.default)(doc);
|
|
169
|
+
if (rootElement === null) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const focusTarget = (0, _focusable.getFocusTarget)(rootElement);
|
|
173
|
+
const isFocusStart = activeElement === rootElement || activeElement === focusTarget;
|
|
168
174
|
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
// Marked focus targets can be non-tabbable, but should start tabbing
|
|
176
|
+
// from the first/last tabbable child.
|
|
177
|
+
if (isFocusStart) {
|
|
178
|
+
const tabbable = getTabbable(rootElement);
|
|
179
|
+
if (tabbable.length === 0) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
nativeEvent.preventDefault();
|
|
183
|
+
if (nativeEvent.shiftKey) {
|
|
184
|
+
tabbable[tabbable.length - 1].focus();
|
|
185
|
+
} else {
|
|
186
|
+
tabbable[0].focus();
|
|
187
|
+
}
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if ((0, _contains.default)(rootElement, activeElement)) {
|
|
191
|
+
const tabbable = getTabbable(rootElement);
|
|
192
|
+
const currentIndex = tabbable.indexOf(activeElement);
|
|
193
|
+
if (currentIndex === -1) {
|
|
194
|
+
// Leave shadow-root descendants to native tab handling.
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const hasPositiveTabIndex = tabbable.some(node => getTabIndex(node) > 0);
|
|
198
|
+
|
|
199
|
+
// Positive tabIndex needs the computed order; regular tabIndex=0 can
|
|
200
|
+
// use native tab handling.
|
|
201
|
+
if (!hasPositiveTabIndex) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
nativeEvent.preventDefault();
|
|
205
|
+
let nextIndex = 0;
|
|
206
|
+
if (nativeEvent.shiftKey) {
|
|
207
|
+
nextIndex = currentIndex <= 0 ? tabbable.length - 1 : currentIndex - 1;
|
|
208
|
+
} else {
|
|
209
|
+
nextIndex = currentIndex === tabbable.length - 1 ? 0 : currentIndex + 1;
|
|
177
210
|
}
|
|
211
|
+
tabbable[nextIndex].focus();
|
|
178
212
|
}
|
|
179
213
|
};
|
|
180
214
|
const contain = () => {
|
|
@@ -157,17 +157,51 @@ function FocusTrap(props) {
|
|
|
157
157
|
if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
+
const rootElement = rootRef.current;
|
|
160
161
|
const activeElement = getActiveElement(doc);
|
|
162
|
+
if (rootElement === null) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const focusTarget = getFocusTarget(rootElement);
|
|
166
|
+
const isFocusStart = activeElement === rootElement || activeElement === focusTarget;
|
|
161
167
|
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
if (
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
// Marked focus targets can be non-tabbable, but should start tabbing
|
|
169
|
+
// from the first/last tabbable child.
|
|
170
|
+
if (isFocusStart) {
|
|
171
|
+
const tabbable = getTabbable(rootElement);
|
|
172
|
+
if (tabbable.length === 0) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
nativeEvent.preventDefault();
|
|
176
|
+
if (nativeEvent.shiftKey) {
|
|
177
|
+
tabbable[tabbable.length - 1].focus();
|
|
178
|
+
} else {
|
|
179
|
+
tabbable[0].focus();
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (contains(rootElement, activeElement)) {
|
|
184
|
+
const tabbable = getTabbable(rootElement);
|
|
185
|
+
const currentIndex = tabbable.indexOf(activeElement);
|
|
186
|
+
if (currentIndex === -1) {
|
|
187
|
+
// Leave shadow-root descendants to native tab handling.
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const hasPositiveTabIndex = tabbable.some(node => getTabIndex(node) > 0);
|
|
191
|
+
|
|
192
|
+
// Positive tabIndex needs the computed order; regular tabIndex=0 can
|
|
193
|
+
// use native tab handling.
|
|
194
|
+
if (!hasPositiveTabIndex) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
nativeEvent.preventDefault();
|
|
198
|
+
let nextIndex = 0;
|
|
199
|
+
if (nativeEvent.shiftKey) {
|
|
200
|
+
nextIndex = currentIndex <= 0 ? tabbable.length - 1 : currentIndex - 1;
|
|
201
|
+
} else {
|
|
202
|
+
nextIndex = currentIndex === tabbable.length - 1 ? 0 : currentIndex + 1;
|
|
170
203
|
}
|
|
204
|
+
tabbable[nextIndex].focus();
|
|
171
205
|
}
|
|
172
206
|
};
|
|
173
207
|
const contain = () => {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TransitionProps } from "../transitions/
|
|
2
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
3
3
|
export interface ZoomProps extends TransitionProps {
|
|
4
|
+
/**
|
|
5
|
+
* Add a custom transition end trigger.
|
|
6
|
+
* Use it when you need custom logic to decide when the transition has ended.
|
|
7
|
+
* Note: Timeouts are still used as a fallback if provided.
|
|
8
|
+
*
|
|
9
|
+
* @param {HTMLElement} node The transitioning DOM node.
|
|
10
|
+
* @param {Function} done Call this when the transition has finished.
|
|
11
|
+
*/
|
|
12
|
+
addEndListener?: TransitionProps['addEndListener'] | undefined;
|
|
4
13
|
/**
|
|
5
14
|
* Perform the enter transition when it first mounts if `in` is also `true`.
|
|
6
15
|
* Set this to `false` to disable this behavior.
|
|
@@ -11,6 +20,11 @@ export interface ZoomProps extends TransitionProps {
|
|
|
11
20
|
* A single child content element.
|
|
12
21
|
*/
|
|
13
22
|
children: React.ReactElement<unknown, any>;
|
|
23
|
+
/**
|
|
24
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
disablePrefersReducedMotion?: boolean | undefined;
|
|
14
28
|
/**
|
|
15
29
|
* The transition timing function.
|
|
16
30
|
* You may specify a single easing or a object containing enter and exit values.
|
|
@@ -35,7 +49,6 @@ export interface ZoomProps extends TransitionProps {
|
|
|
35
49
|
/**
|
|
36
50
|
* The Zoom transition can be used for the floating variant of the
|
|
37
51
|
* [Button](https://mui.com/material-ui/react-floating-action-button/#animation) component.
|
|
38
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
39
52
|
*
|
|
40
53
|
* Demos:
|
|
41
54
|
*
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TransitionProps } from "../transitions/
|
|
2
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
3
3
|
export interface ZoomProps extends TransitionProps {
|
|
4
|
+
/**
|
|
5
|
+
* Add a custom transition end trigger.
|
|
6
|
+
* Use it when you need custom logic to decide when the transition has ended.
|
|
7
|
+
* Note: Timeouts are still used as a fallback if provided.
|
|
8
|
+
*
|
|
9
|
+
* @param {HTMLElement} node The transitioning DOM node.
|
|
10
|
+
* @param {Function} done Call this when the transition has finished.
|
|
11
|
+
*/
|
|
12
|
+
addEndListener?: TransitionProps['addEndListener'] | undefined;
|
|
4
13
|
/**
|
|
5
14
|
* Perform the enter transition when it first mounts if `in` is also `true`.
|
|
6
15
|
* Set this to `false` to disable this behavior.
|
|
@@ -11,6 +20,11 @@ export interface ZoomProps extends TransitionProps {
|
|
|
11
20
|
* A single child content element.
|
|
12
21
|
*/
|
|
13
22
|
children: React.ReactElement<unknown, any>;
|
|
23
|
+
/**
|
|
24
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
disablePrefersReducedMotion?: boolean | undefined;
|
|
14
28
|
/**
|
|
15
29
|
* The transition timing function.
|
|
16
30
|
* You may specify a single easing or a object containing enter and exit values.
|
|
@@ -35,7 +49,6 @@ export interface ZoomProps extends TransitionProps {
|
|
|
35
49
|
/**
|
|
36
50
|
* The Zoom transition can be used for the floating variant of the
|
|
37
51
|
* [Button](https://mui.com/material-ui/react-floating-action-button/#animation) component.
|
|
38
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
39
52
|
*
|
|
40
53
|
* Demos:
|
|
41
54
|
*
|
|
@@ -9,9 +9,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _reactTransitionGroup = require("react-transition-group");
|
|
13
12
|
var _elementAcceptingRef = _interopRequireDefault(require("@mui/utils/elementAcceptingRef"));
|
|
14
13
|
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
14
|
+
var _Transition = _interopRequireDefault(require("../internal/Transition"));
|
|
15
|
+
var _useReducedMotion = _interopRequireDefault(require("../transitions/useReducedMotion"));
|
|
15
16
|
var _zeroStyled = require("../zero-styled");
|
|
16
17
|
var _utils = require("../transitions/utils");
|
|
17
18
|
var _useForkRef = _interopRequireDefault(require("../utils/useForkRef"));
|
|
@@ -38,7 +39,6 @@ const hiddenStyles = {
|
|
|
38
39
|
/**
|
|
39
40
|
* The Zoom transition can be used for the floating variant of the
|
|
40
41
|
* [Button](/material-ui/react-floating-action-button/#animation) component.
|
|
41
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
42
42
|
*/
|
|
43
43
|
const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
44
44
|
const theme = (0, _zeroStyled.useTheme)();
|
|
@@ -50,6 +50,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
50
50
|
addEndListener,
|
|
51
51
|
appear = true,
|
|
52
52
|
children,
|
|
53
|
+
disablePrefersReducedMotion = false,
|
|
53
54
|
easing,
|
|
54
55
|
in: inProp,
|
|
55
56
|
onEnter,
|
|
@@ -62,12 +63,14 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
62
63
|
timeout = defaultTimeout,
|
|
63
64
|
...other
|
|
64
65
|
} = props;
|
|
66
|
+
const reducedMotion = (0, _useReducedMotion.default)(theme.motion.reducedMotion, disablePrefersReducedMotion);
|
|
65
67
|
const nodeRef = React.useRef(null);
|
|
66
68
|
const handleRef = (0, _useForkRef.default)(nodeRef, (0, _getReactElementRef.default)(children), ref);
|
|
67
69
|
const handleEntering = (0, _utils.normalizedTransitionCallback)(nodeRef, onEntering);
|
|
68
70
|
const handleEnter = (0, _utils.normalizedTransitionCallback)(nodeRef, (node, isAppearing) => {
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
+
if (!reducedMotion.shouldReduceMotion) {
|
|
72
|
+
(0, _utils.reflow)(node); // Force layout so the animation starts from the initial styles.
|
|
73
|
+
}
|
|
71
74
|
const transitionProps = (0, _utils.getTransitionProps)({
|
|
72
75
|
style,
|
|
73
76
|
timeout,
|
|
@@ -75,7 +78,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
75
78
|
}, {
|
|
76
79
|
mode: 'enter'
|
|
77
80
|
});
|
|
78
|
-
|
|
81
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
82
|
+
duration: transitionProps.duration,
|
|
83
|
+
delay: transitionProps.delay
|
|
84
|
+
});
|
|
85
|
+
node.style.transition = theme.transitions.create('transform', {
|
|
86
|
+
duration: transitionTiming.duration,
|
|
87
|
+
easing: transitionProps.easing,
|
|
88
|
+
delay: transitionTiming.delay
|
|
89
|
+
});
|
|
79
90
|
if (onEnter) {
|
|
80
91
|
onEnter(node, isAppearing);
|
|
81
92
|
}
|
|
@@ -90,7 +101,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
90
101
|
}, {
|
|
91
102
|
mode: 'exit'
|
|
92
103
|
});
|
|
93
|
-
|
|
104
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
105
|
+
duration: transitionProps.duration,
|
|
106
|
+
delay: transitionProps.delay
|
|
107
|
+
});
|
|
108
|
+
node.style.transition = theme.transitions.create('transform', {
|
|
109
|
+
duration: transitionTiming.duration,
|
|
110
|
+
easing: transitionProps.easing,
|
|
111
|
+
delay: transitionTiming.delay
|
|
112
|
+
});
|
|
94
113
|
if (onExit) {
|
|
95
114
|
onExit(node);
|
|
96
115
|
}
|
|
@@ -101,13 +120,10 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
101
120
|
onExited(node);
|
|
102
121
|
}
|
|
103
122
|
});
|
|
104
|
-
const handleAddEndListener = next => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.Transition, {
|
|
123
|
+
const handleAddEndListener = addEndListener ? next => {
|
|
124
|
+
addEndListener(nodeRef.current, next);
|
|
125
|
+
} : undefined;
|
|
126
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.default, {
|
|
111
127
|
appear: appear,
|
|
112
128
|
in: inProp,
|
|
113
129
|
nodeRef: nodeRef,
|
|
@@ -118,12 +134,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
118
134
|
onExited: handleExited,
|
|
119
135
|
onExiting: handleExiting,
|
|
120
136
|
addEndListener: handleAddEndListener,
|
|
137
|
+
reduceMotion: reducedMotion.shouldReduceMotion,
|
|
121
138
|
timeout: timeout,
|
|
122
139
|
...other,
|
|
123
140
|
children: (state, {
|
|
124
141
|
ownerState,
|
|
125
142
|
...restChildProps
|
|
126
143
|
}) => {
|
|
144
|
+
// Do not pass ownerState to a DOM child. ownerState is only for
|
|
145
|
+
// Material UI styling, and React would treat it as an invalid DOM attribute.
|
|
127
146
|
const childStyle = (0, _utils.getTransitionChildStyle)(state, inProp, styles, hiddenStyles, style, children.props.style);
|
|
128
147
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
129
148
|
style: childStyle,
|
|
@@ -139,9 +158,12 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes /* remove-proptypes */ =
|
|
|
139
158
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
140
159
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
141
160
|
/**
|
|
142
|
-
* Add a custom transition end trigger.
|
|
143
|
-
*
|
|
144
|
-
*
|
|
161
|
+
* Add a custom transition end trigger.
|
|
162
|
+
* Use it when you need custom logic to decide when the transition has ended.
|
|
163
|
+
* Note: Timeouts are still used as a fallback if provided.
|
|
164
|
+
*
|
|
165
|
+
* @param {HTMLElement} node The transitioning DOM node.
|
|
166
|
+
* @param {Function} done Call this when the transition has finished.
|
|
145
167
|
*/
|
|
146
168
|
addEndListener: _propTypes.default.func,
|
|
147
169
|
/**
|
|
@@ -154,6 +176,11 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes /* remove-proptypes */ =
|
|
|
154
176
|
* A single child content element.
|
|
155
177
|
*/
|
|
156
178
|
children: _elementAcceptingRef.default.isRequired,
|
|
179
|
+
/**
|
|
180
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
183
|
+
disablePrefersReducedMotion: _propTypes.default.bool,
|
|
157
184
|
/**
|
|
158
185
|
* The transition timing function.
|
|
159
186
|
* You may specify a single easing or a object containing enter and exit values.
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import { Transition } from 'react-transition-group';
|
|
6
5
|
import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
|
|
7
6
|
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
7
|
+
import Transition from "../internal/Transition.mjs";
|
|
8
|
+
import useReducedMotion from "../transitions/useReducedMotion.mjs";
|
|
8
9
|
import { useTheme } from "../zero-styled/index.mjs";
|
|
9
10
|
import { normalizedTransitionCallback, reflow, getTransitionProps, getTransitionChildStyle } from "../transitions/utils.mjs";
|
|
10
11
|
import useForkRef from "../utils/useForkRef.mjs";
|
|
@@ -31,7 +32,6 @@ const hiddenStyles = {
|
|
|
31
32
|
/**
|
|
32
33
|
* The Zoom transition can be used for the floating variant of the
|
|
33
34
|
* [Button](/material-ui/react-floating-action-button/#animation) component.
|
|
34
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
35
35
|
*/
|
|
36
36
|
const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
37
37
|
const theme = useTheme();
|
|
@@ -43,6 +43,7 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
43
43
|
addEndListener,
|
|
44
44
|
appear = true,
|
|
45
45
|
children,
|
|
46
|
+
disablePrefersReducedMotion = false,
|
|
46
47
|
easing,
|
|
47
48
|
in: inProp,
|
|
48
49
|
onEnter,
|
|
@@ -55,12 +56,14 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
55
56
|
timeout = defaultTimeout,
|
|
56
57
|
...other
|
|
57
58
|
} = props;
|
|
59
|
+
const reducedMotion = useReducedMotion(theme.motion.reducedMotion, disablePrefersReducedMotion);
|
|
58
60
|
const nodeRef = React.useRef(null);
|
|
59
61
|
const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
|
|
60
62
|
const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);
|
|
61
63
|
const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
if (!reducedMotion.shouldReduceMotion) {
|
|
65
|
+
reflow(node); // Force layout so the animation starts from the initial styles.
|
|
66
|
+
}
|
|
64
67
|
const transitionProps = getTransitionProps({
|
|
65
68
|
style,
|
|
66
69
|
timeout,
|
|
@@ -68,7 +71,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
68
71
|
}, {
|
|
69
72
|
mode: 'enter'
|
|
70
73
|
});
|
|
71
|
-
|
|
74
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
75
|
+
duration: transitionProps.duration,
|
|
76
|
+
delay: transitionProps.delay
|
|
77
|
+
});
|
|
78
|
+
node.style.transition = theme.transitions.create('transform', {
|
|
79
|
+
duration: transitionTiming.duration,
|
|
80
|
+
easing: transitionProps.easing,
|
|
81
|
+
delay: transitionTiming.delay
|
|
82
|
+
});
|
|
72
83
|
if (onEnter) {
|
|
73
84
|
onEnter(node, isAppearing);
|
|
74
85
|
}
|
|
@@ -83,7 +94,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
83
94
|
}, {
|
|
84
95
|
mode: 'exit'
|
|
85
96
|
});
|
|
86
|
-
|
|
97
|
+
const transitionTiming = reducedMotion.getTransitionTiming({
|
|
98
|
+
duration: transitionProps.duration,
|
|
99
|
+
delay: transitionProps.delay
|
|
100
|
+
});
|
|
101
|
+
node.style.transition = theme.transitions.create('transform', {
|
|
102
|
+
duration: transitionTiming.duration,
|
|
103
|
+
easing: transitionProps.easing,
|
|
104
|
+
delay: transitionTiming.delay
|
|
105
|
+
});
|
|
87
106
|
if (onExit) {
|
|
88
107
|
onExit(node);
|
|
89
108
|
}
|
|
@@ -94,12 +113,9 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
94
113
|
onExited(node);
|
|
95
114
|
}
|
|
96
115
|
});
|
|
97
|
-
const handleAddEndListener = next => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
addEndListener(nodeRef.current, next);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
116
|
+
const handleAddEndListener = addEndListener ? next => {
|
|
117
|
+
addEndListener(nodeRef.current, next);
|
|
118
|
+
} : undefined;
|
|
103
119
|
return /*#__PURE__*/_jsx(Transition, {
|
|
104
120
|
appear: appear,
|
|
105
121
|
in: inProp,
|
|
@@ -111,12 +127,15 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
111
127
|
onExited: handleExited,
|
|
112
128
|
onExiting: handleExiting,
|
|
113
129
|
addEndListener: handleAddEndListener,
|
|
130
|
+
reduceMotion: reducedMotion.shouldReduceMotion,
|
|
114
131
|
timeout: timeout,
|
|
115
132
|
...other,
|
|
116
133
|
children: (state, {
|
|
117
134
|
ownerState,
|
|
118
135
|
...restChildProps
|
|
119
136
|
}) => {
|
|
137
|
+
// Do not pass ownerState to a DOM child. ownerState is only for
|
|
138
|
+
// Material UI styling, and React would treat it as an invalid DOM attribute.
|
|
120
139
|
const childStyle = getTransitionChildStyle(state, inProp, styles, hiddenStyles, style, children.props.style);
|
|
121
140
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
122
141
|
style: childStyle,
|
|
@@ -132,9 +151,12 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes /* remove-proptypes */ =
|
|
|
132
151
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
133
152
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
134
153
|
/**
|
|
135
|
-
* Add a custom transition end trigger.
|
|
136
|
-
*
|
|
137
|
-
*
|
|
154
|
+
* Add a custom transition end trigger.
|
|
155
|
+
* Use it when you need custom logic to decide when the transition has ended.
|
|
156
|
+
* Note: Timeouts are still used as a fallback if provided.
|
|
157
|
+
*
|
|
158
|
+
* @param {HTMLElement} node The transitioning DOM node.
|
|
159
|
+
* @param {Function} done Call this when the transition has finished.
|
|
138
160
|
*/
|
|
139
161
|
addEndListener: PropTypes.func,
|
|
140
162
|
/**
|
|
@@ -147,6 +169,11 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes /* remove-proptypes */ =
|
|
|
147
169
|
* A single child content element.
|
|
148
170
|
*/
|
|
149
171
|
children: elementAcceptingRef.isRequired,
|
|
172
|
+
/**
|
|
173
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
174
|
+
* @default false
|
|
175
|
+
*/
|
|
176
|
+
disablePrefersReducedMotion: PropTypes.bool,
|
|
150
177
|
/**
|
|
151
178
|
* The transition timing function.
|
|
152
179
|
* You may specify a single easing or a object containing enter and exit values.
|
|
@@ -142,7 +142,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
144
|
const handleInputChange = event => {
|
|
145
|
-
// Workaround for https://github.com/
|
|
145
|
+
// Workaround for https://github.com/react/react/issues/9023
|
|
146
146
|
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
@@ -135,7 +135,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
const handleInputChange = event => {
|
|
138
|
-
// Workaround for https://github.com/
|
|
138
|
+
// Workaround for https://github.com/react/react/issues/9023
|
|
139
139
|
if (event.nativeEvent.defaultPrevented || readOnly) {
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type RenderedTransitionStatus = 'entering' | 'entered' | 'exiting' | 'exited';
|
|
3
|
+
type TransitionEndListener = ((done: () => void) => void) | ((node: HTMLElement, done: () => void) => void);
|
|
4
|
+
interface InternalTransitionProps {
|
|
5
|
+
in?: boolean | undefined;
|
|
6
|
+
appear?: boolean | undefined;
|
|
7
|
+
enter?: boolean | undefined;
|
|
8
|
+
exit?: boolean | undefined;
|
|
9
|
+
timeout?: number | null | {
|
|
10
|
+
appear?: number | undefined;
|
|
11
|
+
enter?: number | undefined;
|
|
12
|
+
exit?: number | undefined;
|
|
13
|
+
} | undefined;
|
|
14
|
+
nodeRef: React.RefObject<HTMLElement | null>;
|
|
15
|
+
mountOnEnter?: boolean | undefined;
|
|
16
|
+
unmountOnExit?: boolean | undefined;
|
|
17
|
+
addEndListener?: TransitionEndListener | undefined;
|
|
18
|
+
reduceMotion?: boolean | undefined;
|
|
19
|
+
getAutoTimeout?: (() => number | null | undefined) | undefined;
|
|
20
|
+
onEnter?: ((isAppearing: boolean) => void) | undefined;
|
|
21
|
+
onEntering?: ((isAppearing: boolean) => void) | undefined;
|
|
22
|
+
onEntered?: ((isAppearing: boolean) => void) | undefined;
|
|
23
|
+
onExit?: (() => void) | undefined;
|
|
24
|
+
onExiting?: (() => void) | undefined;
|
|
25
|
+
onExited?: (() => void) | undefined;
|
|
26
|
+
children: (status: RenderedTransitionStatus, childProps: Record<string, unknown>) => React.ReactNode;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
declare function Transition(props: InternalTransitionProps): React.ReactNode;
|
|
30
|
+
declare namespace Transition {
|
|
31
|
+
var propTypes: any;
|
|
32
|
+
}
|
|
33
|
+
export default Transition;
|
|
34
|
+
export type { InternalTransitionProps, RenderedTransitionStatus };
|