@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
|
@@ -22,12 +22,18 @@ import useForkRef from "../utils/useForkRef.mjs";
|
|
|
22
22
|
import useControlled from "../utils/useControlled.mjs";
|
|
23
23
|
import selectClasses, { getSelectUtilityClasses } from "./selectClasses.mjs";
|
|
24
24
|
import { areEqualValues, isEmpty, getOpenInteractionType } from "./utils/index.mjs";
|
|
25
|
+
import { canCycleRepeatedCharacter, getMatchingOptionIndex, getTypeaheadOptions } from "./utils/closedTypeahead.mjs";
|
|
25
26
|
import { SelectFocusSourceProvider } from "./utils/SelectFocusSourceContext.mjs";
|
|
26
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
28
|
const OPENING_MOUSE_UP_BOUNDARY_OFFSET = 2;
|
|
28
29
|
// The initial mouseup may land on an item when the menu opens over the trigger.
|
|
29
30
|
const SELECTED_MOUSE_UP_DELAY = 400;
|
|
30
31
|
const UNSELECTED_MOUSE_UP_DELAY = 200;
|
|
32
|
+
const TYPEAHEAD_RESET_MS = 750;
|
|
33
|
+
const SPACE = ' ';
|
|
34
|
+
const ARROW_UP = 'ArrowUp';
|
|
35
|
+
const ARROW_DOWN = 'ArrowDown';
|
|
36
|
+
const ENTER = 'Enter';
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
39
|
* Returns true when a native mouse event should be treated as happening inside
|
|
@@ -190,8 +196,14 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
190
196
|
allowSelectedMouseUp: false,
|
|
191
197
|
allowUnselectedMouseUp: false
|
|
192
198
|
});
|
|
199
|
+
const closedTypeaheadRef = React.useRef({
|
|
200
|
+
buffer: '',
|
|
201
|
+
previousSearchIndex: null,
|
|
202
|
+
matchedIndex: null
|
|
203
|
+
});
|
|
193
204
|
const selectedMouseUpTimer = useTimeout();
|
|
194
205
|
const unselectedMouseUpTimer = useTimeout();
|
|
206
|
+
const typeaheadResetTimer = useTimeout();
|
|
195
207
|
const [displayNode, setDisplayNode] = React.useState(null);
|
|
196
208
|
const {
|
|
197
209
|
current: isOpenControlled
|
|
@@ -214,9 +226,18 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
214
226
|
value
|
|
215
227
|
}), [value]);
|
|
216
228
|
const open = displayNode !== null && openState;
|
|
229
|
+
const resetClosedTypeahead = React.useCallback(() => {
|
|
230
|
+
typeaheadResetTimer.clear();
|
|
231
|
+
closedTypeaheadRef.current.buffer = '';
|
|
232
|
+
closedTypeaheadRef.current.previousSearchIndex = null;
|
|
233
|
+
closedTypeaheadRef.current.matchedIndex = null;
|
|
234
|
+
}, [typeaheadResetTimer]);
|
|
217
235
|
useEnhancedEffect(() => {
|
|
218
236
|
openRef.current = open;
|
|
219
|
-
|
|
237
|
+
if (open) {
|
|
238
|
+
resetClosedTypeahead();
|
|
239
|
+
}
|
|
240
|
+
}, [open, resetClosedTypeahead]);
|
|
220
241
|
const clearSelectionTimers = React.useCallback(() => {
|
|
221
242
|
selectedMouseUpTimer.clear();
|
|
222
243
|
unselectedMouseUpTimer.clear();
|
|
@@ -248,8 +269,9 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
248
269
|
return () => {
|
|
249
270
|
resetMouseUpSelection();
|
|
250
271
|
clearOpeningMouseUpListener();
|
|
272
|
+
resetClosedTypeahead();
|
|
251
273
|
};
|
|
252
|
-
}, [resetMouseUpSelection, clearOpeningMouseUpListener]);
|
|
274
|
+
}, [resetMouseUpSelection, clearOpeningMouseUpListener, resetClosedTypeahead]);
|
|
253
275
|
React.useEffect(() => {
|
|
254
276
|
if (!open || !anchorElement || autoWidth) {
|
|
255
277
|
return undefined;
|
|
@@ -306,6 +328,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
306
328
|
clearOpeningMouseUpListener();
|
|
307
329
|
}
|
|
308
330
|
if (openParam) {
|
|
331
|
+
resetClosedTypeahead();
|
|
309
332
|
setOpenInteractionType(getOpenInteractionType(event));
|
|
310
333
|
if (onOpen) {
|
|
311
334
|
onOpen(event);
|
|
@@ -353,6 +376,9 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
353
376
|
}
|
|
354
377
|
// Hijack the default focus behavior.
|
|
355
378
|
event.preventDefault();
|
|
379
|
+
if (!displayRef.current) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
356
382
|
displayRef.current.focus();
|
|
357
383
|
const doc = ownerDocument(event.currentTarget);
|
|
358
384
|
scheduleMouseUpSelection();
|
|
@@ -395,6 +421,25 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
395
421
|
onChange(event, child);
|
|
396
422
|
}
|
|
397
423
|
};
|
|
424
|
+
const handleValueChange = (event, child, newValue) => {
|
|
425
|
+
setValueState(newValue);
|
|
426
|
+
if (onChange) {
|
|
427
|
+
// Redefine target to allow name and value to be read.
|
|
428
|
+
// This allows seamless integration with the most popular form libraries.
|
|
429
|
+
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
|
|
430
|
+
// Clone the event to not override `target` of the original event.
|
|
431
|
+
const nativeEvent = event.nativeEvent || event;
|
|
432
|
+
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
433
|
+
Object.defineProperty(clonedEvent, 'target', {
|
|
434
|
+
writable: true,
|
|
435
|
+
value: {
|
|
436
|
+
value: newValue,
|
|
437
|
+
name
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
onChange(clonedEvent, child);
|
|
441
|
+
}
|
|
442
|
+
};
|
|
398
443
|
const handleItemClick = child => event => {
|
|
399
444
|
didPointerDownOnItemRef.current = false;
|
|
400
445
|
let newValue;
|
|
@@ -418,23 +463,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
418
463
|
child.props.onClick(event);
|
|
419
464
|
}
|
|
420
465
|
if (value !== newValue) {
|
|
421
|
-
|
|
422
|
-
if (onChange) {
|
|
423
|
-
// Redefine target to allow name and value to be read.
|
|
424
|
-
// This allows seamless integration with the most popular form libraries.
|
|
425
|
-
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
|
|
426
|
-
// Clone the event to not override `target` of the original event.
|
|
427
|
-
const nativeEvent = event.nativeEvent || event;
|
|
428
|
-
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
429
|
-
Object.defineProperty(clonedEvent, 'target', {
|
|
430
|
-
writable: true,
|
|
431
|
-
value: {
|
|
432
|
-
value: newValue,
|
|
433
|
-
name
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
onChange(clonedEvent, child);
|
|
437
|
-
}
|
|
466
|
+
handleValueChange(event, child, newValue);
|
|
438
467
|
}
|
|
439
468
|
if (!multiple) {
|
|
440
469
|
update(false, event);
|
|
@@ -453,13 +482,57 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
453
482
|
}
|
|
454
483
|
event.currentTarget.click();
|
|
455
484
|
};
|
|
485
|
+
const handleClosedTypeahead = event => {
|
|
486
|
+
const state = closedTypeaheadRef.current;
|
|
487
|
+
const hasActiveBuffer = state.buffer !== '';
|
|
488
|
+
if (open || multiple || disabled || event.defaultPrevented || event.nativeEvent?.isComposing || event.key.length !== 1 || event.ctrlKey || event.metaKey || event.altKey || event.key === SPACE && !hasActiveBuffer) {
|
|
489
|
+
return false;
|
|
490
|
+
}
|
|
491
|
+
if (event.key === SPACE) {
|
|
492
|
+
event.preventDefault();
|
|
493
|
+
}
|
|
494
|
+
const isNewSession = state.buffer === '';
|
|
495
|
+
const {
|
|
496
|
+
options: searchableOptions,
|
|
497
|
+
selectedIndex
|
|
498
|
+
} = getTypeaheadOptions(childrenArray, value);
|
|
499
|
+
if (searchableOptions.length === 0) {
|
|
500
|
+
if (event.key !== SPACE) {
|
|
501
|
+
resetClosedTypeahead();
|
|
502
|
+
}
|
|
503
|
+
return true;
|
|
504
|
+
}
|
|
505
|
+
if (isNewSession) {
|
|
506
|
+
state.previousSearchIndex = selectedIndex;
|
|
507
|
+
}
|
|
508
|
+
const key = event.key.toLowerCase();
|
|
509
|
+
if (state.buffer === key && canCycleRepeatedCharacter(searchableOptions, key)) {
|
|
510
|
+
state.buffer = '';
|
|
511
|
+
state.previousSearchIndex = state.matchedIndex;
|
|
512
|
+
}
|
|
513
|
+
state.buffer += key;
|
|
514
|
+
typeaheadResetTimer.start(TYPEAHEAD_RESET_MS, resetClosedTypeahead);
|
|
515
|
+
const matchingIndex = getMatchingOptionIndex(searchableOptions, state.buffer, (state.previousSearchIndex ?? -1) + 1);
|
|
516
|
+
if (matchingIndex !== -1) {
|
|
517
|
+
const matchedOption = searchableOptions[matchingIndex];
|
|
518
|
+
state.matchedIndex = matchingIndex;
|
|
519
|
+
if (!areEqualValues(value, matchedOption.value)) {
|
|
520
|
+
handleValueChange(event, matchedOption.child, matchedOption.value);
|
|
521
|
+
}
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
if (event.key !== SPACE) {
|
|
525
|
+
resetClosedTypeahead();
|
|
526
|
+
}
|
|
527
|
+
return true;
|
|
528
|
+
};
|
|
456
529
|
const handleKeyDown = event => {
|
|
457
530
|
if (!readOnly) {
|
|
458
|
-
const
|
|
459
|
-
// The native select doesn't respond to
|
|
531
|
+
const isClosedTypeaheadHandled = handleClosedTypeahead(event);
|
|
532
|
+
// The native select doesn't respond to Enter on macOS, but it's recommended by
|
|
460
533
|
// https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
|
|
461
|
-
|
|
462
|
-
if (
|
|
534
|
+
const isOpenKey = event.key === SPACE || event.key === ARROW_UP || event.key === ARROW_DOWN || event.key === ENTER;
|
|
535
|
+
if (!isClosedTypeaheadHandled && isOpenKey) {
|
|
463
536
|
event.preventDefault();
|
|
464
537
|
update(true, event);
|
|
465
538
|
}
|
|
@@ -467,6 +540,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
467
540
|
}
|
|
468
541
|
};
|
|
469
542
|
const handleBlur = event => {
|
|
543
|
+
resetClosedTypeahead();
|
|
470
544
|
// if open event.stopImmediatePropagation
|
|
471
545
|
if (!open && onBlur) {
|
|
472
546
|
// Preact support, target is read only property on a native event.
|
|
@@ -480,6 +554,19 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
480
554
|
onBlur(event);
|
|
481
555
|
}
|
|
482
556
|
};
|
|
557
|
+
const handleItemKeyDown = child => event => {
|
|
558
|
+
child?.props?.onKeyDown?.(event);
|
|
559
|
+
if (event.key === SPACE && event.target === event.currentTarget && !event.defaultPrevented) {
|
|
560
|
+
// Prevent the browser from scrolling the page
|
|
561
|
+
event.preventDefault();
|
|
562
|
+
// Ignore auto-repeated keydowns to avoid toggling multiple times
|
|
563
|
+
if (!event.repeat) {
|
|
564
|
+
// Trigger via click so that onClick receives a click event,
|
|
565
|
+
// consistent with Enter and pointer interactions.
|
|
566
|
+
event.currentTarget.click();
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
};
|
|
483
570
|
delete other['aria-invalid'];
|
|
484
571
|
let display;
|
|
485
572
|
let displaySingle;
|
|
@@ -537,7 +624,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
537
624
|
onClick: handleItemClick(child),
|
|
538
625
|
onMouseUp: handleItemMouseUp(child, selected),
|
|
539
626
|
onKeyUp: event => {
|
|
540
|
-
if (event.key ===
|
|
627
|
+
if (event.key === SPACE) {
|
|
541
628
|
// otherwise our MenuItems dispatches a click event
|
|
542
629
|
// it's not behavior of the native <option> and causes
|
|
543
630
|
// the select to close immediately since we open on space keydown
|
|
@@ -547,6 +634,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
547
634
|
child.props.onKeyUp(event);
|
|
548
635
|
}
|
|
549
636
|
},
|
|
637
|
+
onKeyDown: handleItemKeyDown(child),
|
|
550
638
|
role: 'option',
|
|
551
639
|
selected,
|
|
552
640
|
value: undefined,
|
|
@@ -558,7 +646,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
558
646
|
// Keep the opening mouseup guard current without mutating refs during render.
|
|
559
647
|
useEnhancedEffect(() => {
|
|
560
648
|
hasSelectedItemInListRef.current = foundMatch;
|
|
561
|
-
|
|
649
|
+
if (!open && !multiple && !foundMatch) {
|
|
650
|
+
resetClosedTypeahead();
|
|
651
|
+
}
|
|
652
|
+
}, [foundMatch, multiple, open, resetClosedTypeahead]);
|
|
562
653
|
if (process.env.NODE_ENV !== 'production') {
|
|
563
654
|
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
564
655
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -622,6 +713,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
622
713
|
"aria-disabled": disabled ? 'true' : undefined,
|
|
623
714
|
"aria-expanded": open ? 'true' : 'false',
|
|
624
715
|
"aria-haspopup": "listbox",
|
|
716
|
+
"aria-readonly": readOnly ? 'true' : undefined,
|
|
625
717
|
"aria-label": ariaLabel,
|
|
626
718
|
"aria-labelledby": labelId,
|
|
627
719
|
"aria-describedby": ariaDescribedby,
|
|
@@ -652,6 +744,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
652
744
|
onChange: handleChange,
|
|
653
745
|
tabIndex: -1,
|
|
654
746
|
disabled: disabled,
|
|
747
|
+
readOnly: readOnly,
|
|
655
748
|
className: classes.nativeInput,
|
|
656
749
|
autoFocus: autoFocus,
|
|
657
750
|
required: required,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare function useSelectFocusSource(): "
|
|
3
|
-
declare const SelectFocusSourceProvider: React.Provider<"
|
|
2
|
+
declare function useSelectFocusSource(): "keyboard" | "mouse" | "touch" | null;
|
|
3
|
+
declare const SelectFocusSourceProvider: React.Provider<"keyboard" | "mouse" | "touch" | null>;
|
|
4
4
|
export { useSelectFocusSource, SelectFocusSourceProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare function useSelectFocusSource(): "
|
|
3
|
-
declare const SelectFocusSourceProvider: React.Provider<"
|
|
2
|
+
declare function useSelectFocusSource(): "keyboard" | "mouse" | "touch" | null;
|
|
3
|
+
declare const SelectFocusSourceProvider: React.Provider<"keyboard" | "mouse" | "touch" | null>;
|
|
4
4
|
export { useSelectFocusSource, SelectFocusSourceProvider };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.canCycleRepeatedCharacter = canCycleRepeatedCharacter;
|
|
9
|
+
exports.getMatchingOptionIndex = getMatchingOptionIndex;
|
|
10
|
+
exports.getTypeaheadOptions = getTypeaheadOptions;
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _areEqualValues = _interopRequireDefault(require("./areEqualValues"));
|
|
13
|
+
function hasOwnValueProp(child) {
|
|
14
|
+
return Object.prototype.hasOwnProperty.call(child.props, 'value');
|
|
15
|
+
}
|
|
16
|
+
function getTextFromReactNode(node) {
|
|
17
|
+
if (typeof node === 'string' || typeof node === 'number') {
|
|
18
|
+
return String(node);
|
|
19
|
+
}
|
|
20
|
+
let text = '';
|
|
21
|
+
React.Children.forEach(node, child => {
|
|
22
|
+
if (typeof child === 'string' || typeof child === 'number') {
|
|
23
|
+
text += String(child);
|
|
24
|
+
} else if (/*#__PURE__*/React.isValidElement(child)) {
|
|
25
|
+
text += getTextFromReactNode(child.props.children);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return text;
|
|
29
|
+
}
|
|
30
|
+
function getMatchingOptionIndex(options, search, startIndex = 0) {
|
|
31
|
+
if (options.length === 0) {
|
|
32
|
+
return -1;
|
|
33
|
+
}
|
|
34
|
+
const normalizedStartIndex = (startIndex % options.length + options.length) % options.length;
|
|
35
|
+
for (let offset = 0; offset < options.length; offset += 1) {
|
|
36
|
+
const index = (normalizedStartIndex + offset) % options.length;
|
|
37
|
+
if (options[index].label.startsWith(search)) {
|
|
38
|
+
return index;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return -1;
|
|
42
|
+
}
|
|
43
|
+
function canCycleRepeatedCharacter(options, key) {
|
|
44
|
+
return !options.some(option => option.label[0] === key && option.label[1] === key);
|
|
45
|
+
}
|
|
46
|
+
function getTypeaheadOptions(childrenArray, value) {
|
|
47
|
+
const options = [];
|
|
48
|
+
let selectedIndex = -1;
|
|
49
|
+
for (let index = 0; index < childrenArray.length; index += 1) {
|
|
50
|
+
const child = childrenArray[index];
|
|
51
|
+
if (! /*#__PURE__*/React.isValidElement(child) || !hasOwnValueProp(child) || child.props.disabled) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Closed typeahead cannot exclude CSS-hidden text because no option DOM is mounted.
|
|
56
|
+
const label = getTextFromReactNode(child.props.children).trim().toLowerCase();
|
|
57
|
+
if (label === '') {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (selectedIndex === -1 && (0, _areEqualValues.default)(value, child.props.value)) {
|
|
61
|
+
selectedIndex = options.length;
|
|
62
|
+
}
|
|
63
|
+
options.push({
|
|
64
|
+
child,
|
|
65
|
+
label,
|
|
66
|
+
value: child.props.value
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
options,
|
|
71
|
+
selectedIndex
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import areEqualValues from "./areEqualValues.mjs";
|
|
3
|
+
function hasOwnValueProp(child) {
|
|
4
|
+
return Object.prototype.hasOwnProperty.call(child.props, 'value');
|
|
5
|
+
}
|
|
6
|
+
function getTextFromReactNode(node) {
|
|
7
|
+
if (typeof node === 'string' || typeof node === 'number') {
|
|
8
|
+
return String(node);
|
|
9
|
+
}
|
|
10
|
+
let text = '';
|
|
11
|
+
React.Children.forEach(node, child => {
|
|
12
|
+
if (typeof child === 'string' || typeof child === 'number') {
|
|
13
|
+
text += String(child);
|
|
14
|
+
} else if (/*#__PURE__*/React.isValidElement(child)) {
|
|
15
|
+
text += getTextFromReactNode(child.props.children);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return text;
|
|
19
|
+
}
|
|
20
|
+
export function getMatchingOptionIndex(options, search, startIndex = 0) {
|
|
21
|
+
if (options.length === 0) {
|
|
22
|
+
return -1;
|
|
23
|
+
}
|
|
24
|
+
const normalizedStartIndex = (startIndex % options.length + options.length) % options.length;
|
|
25
|
+
for (let offset = 0; offset < options.length; offset += 1) {
|
|
26
|
+
const index = (normalizedStartIndex + offset) % options.length;
|
|
27
|
+
if (options[index].label.startsWith(search)) {
|
|
28
|
+
return index;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return -1;
|
|
32
|
+
}
|
|
33
|
+
export function canCycleRepeatedCharacter(options, key) {
|
|
34
|
+
return !options.some(option => option.label[0] === key && option.label[1] === key);
|
|
35
|
+
}
|
|
36
|
+
export function getTypeaheadOptions(childrenArray, value) {
|
|
37
|
+
const options = [];
|
|
38
|
+
let selectedIndex = -1;
|
|
39
|
+
for (let index = 0; index < childrenArray.length; index += 1) {
|
|
40
|
+
const child = childrenArray[index];
|
|
41
|
+
if (! /*#__PURE__*/React.isValidElement(child) || !hasOwnValueProp(child) || child.props.disabled) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Closed typeahead cannot exclude CSS-hidden text because no option DOM is mounted.
|
|
46
|
+
const label = getTextFromReactNode(child.props.children).trim().toLowerCase();
|
|
47
|
+
if (label === '') {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (selectedIndex === -1 && areEqualValues(value, child.props.value)) {
|
|
51
|
+
selectedIndex = options.length;
|
|
52
|
+
}
|
|
53
|
+
options.push({
|
|
54
|
+
child,
|
|
55
|
+
label,
|
|
56
|
+
value: child.props.value
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
options,
|
|
61
|
+
selectedIndex
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -15,6 +15,7 @@ var _styles = require("../styles");
|
|
|
15
15
|
var _zeroStyled = require("../zero-styled");
|
|
16
16
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
17
17
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
18
|
+
var _utils = require("../transitions/utils");
|
|
18
19
|
var _skeletonClasses = require("./skeletonClasses");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
@@ -84,6 +85,15 @@ const SkeletonRoot = (0, _zeroStyled.styled)('span', {
|
|
|
84
85
|
}) => {
|
|
85
86
|
const radiusUnit = (0, _styles.unstable_getUnit)(theme.shape.borderRadius) || 'px';
|
|
86
87
|
const radiusValue = (0, _styles.unstable_toUnitless)(theme.shape.borderRadius);
|
|
88
|
+
const reducedMotionPulseStyles = (0, _utils.getReducedMotionStyles)(theme, {
|
|
89
|
+
animation: 'none'
|
|
90
|
+
});
|
|
91
|
+
const reducedMotionWaveStyles = (0, _utils.getReducedMotionStyles)(theme, {
|
|
92
|
+
'&::after': {
|
|
93
|
+
animation: 'none',
|
|
94
|
+
display: 'none'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
87
97
|
return {
|
|
88
98
|
display: 'block',
|
|
89
99
|
// Create a "on paper" color with sufficient contrast retaining the color
|
|
@@ -148,7 +158,12 @@ const SkeletonRoot = (0, _zeroStyled.styled)('span', {
|
|
|
148
158
|
style: pulseAnimation || {
|
|
149
159
|
animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
|
|
150
160
|
}
|
|
151
|
-
}, {
|
|
161
|
+
}, ...(reducedMotionPulseStyles ? [{
|
|
162
|
+
props: {
|
|
163
|
+
animation: 'pulse'
|
|
164
|
+
},
|
|
165
|
+
style: reducedMotionPulseStyles
|
|
166
|
+
}] : []), {
|
|
152
167
|
props: {
|
|
153
168
|
animation: 'wave'
|
|
154
169
|
},
|
|
@@ -182,7 +197,12 @@ const SkeletonRoot = (0, _zeroStyled.styled)('span', {
|
|
|
182
197
|
animation: `${waveKeyframe} 2s linear 0.5s infinite`
|
|
183
198
|
}
|
|
184
199
|
}
|
|
185
|
-
}
|
|
200
|
+
}, ...(reducedMotionWaveStyles ? [{
|
|
201
|
+
props: {
|
|
202
|
+
animation: 'wave'
|
|
203
|
+
},
|
|
204
|
+
style: reducedMotionWaveStyles
|
|
205
|
+
}] : [])]
|
|
186
206
|
};
|
|
187
207
|
}));
|
|
188
208
|
const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
|
|
@@ -8,6 +8,7 @@ import { unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from "
|
|
|
8
8
|
import { keyframes, css, styled } from "../zero-styled/index.mjs";
|
|
9
9
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
10
10
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
11
|
+
import { getReducedMotionStyles } from "../transitions/utils.mjs";
|
|
11
12
|
import { getSkeletonUtilityClass } from "./skeletonClasses.mjs";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -77,6 +78,15 @@ const SkeletonRoot = styled('span', {
|
|
|
77
78
|
}) => {
|
|
78
79
|
const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';
|
|
79
80
|
const radiusValue = toUnitless(theme.shape.borderRadius);
|
|
81
|
+
const reducedMotionPulseStyles = getReducedMotionStyles(theme, {
|
|
82
|
+
animation: 'none'
|
|
83
|
+
});
|
|
84
|
+
const reducedMotionWaveStyles = getReducedMotionStyles(theme, {
|
|
85
|
+
'&::after': {
|
|
86
|
+
animation: 'none',
|
|
87
|
+
display: 'none'
|
|
88
|
+
}
|
|
89
|
+
});
|
|
80
90
|
return {
|
|
81
91
|
display: 'block',
|
|
82
92
|
// Create a "on paper" color with sufficient contrast retaining the color
|
|
@@ -141,7 +151,12 @@ const SkeletonRoot = styled('span', {
|
|
|
141
151
|
style: pulseAnimation || {
|
|
142
152
|
animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
|
|
143
153
|
}
|
|
144
|
-
}, {
|
|
154
|
+
}, ...(reducedMotionPulseStyles ? [{
|
|
155
|
+
props: {
|
|
156
|
+
animation: 'pulse'
|
|
157
|
+
},
|
|
158
|
+
style: reducedMotionPulseStyles
|
|
159
|
+
}] : []), {
|
|
145
160
|
props: {
|
|
146
161
|
animation: 'wave'
|
|
147
162
|
},
|
|
@@ -175,7 +190,12 @@ const SkeletonRoot = styled('span', {
|
|
|
175
190
|
animation: `${waveKeyframe} 2s linear 0.5s infinite`
|
|
176
191
|
}
|
|
177
192
|
}
|
|
178
|
-
}
|
|
193
|
+
}, ...(reducedMotionWaveStyles ? [{
|
|
194
|
+
props: {
|
|
195
|
+
animation: 'wave'
|
|
196
|
+
},
|
|
197
|
+
style: reducedMotionWaveStyles
|
|
198
|
+
}] : [])]
|
|
179
199
|
};
|
|
180
200
|
}));
|
|
181
201
|
const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
|
|
@@ -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 SlideProps 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.
|
|
@@ -16,6 +25,11 @@ export interface SlideProps extends TransitionProps {
|
|
|
16
25
|
* It's used to set the container the Slide is transitioning from.
|
|
17
26
|
*/
|
|
18
27
|
container?: null | Element | ((element: Element) => Element) | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
disablePrefersReducedMotion?: boolean | undefined;
|
|
19
33
|
/**
|
|
20
34
|
* Direction the child node will enter from.
|
|
21
35
|
* @default 'down'
|
|
@@ -48,7 +62,6 @@ export interface SlideProps extends TransitionProps {
|
|
|
48
62
|
|
|
49
63
|
/**
|
|
50
64
|
* The Slide transition is used by the [Drawer](https://mui.com/material-ui/react-drawer/) component.
|
|
51
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
52
65
|
*
|
|
53
66
|
* Demos:
|
|
54
67
|
*
|
|
@@ -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 SlideProps 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.
|
|
@@ -16,6 +25,11 @@ export interface SlideProps extends TransitionProps {
|
|
|
16
25
|
* It's used to set the container the Slide is transitioning from.
|
|
17
26
|
*/
|
|
18
27
|
container?: null | Element | ((element: Element) => Element) | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* If `true`, the transition ignores `theme.motion.reducedMotion` and keeps its normal timing.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
disablePrefersReducedMotion?: boolean | undefined;
|
|
19
33
|
/**
|
|
20
34
|
* Direction the child node will enter from.
|
|
21
35
|
* @default 'down'
|
|
@@ -48,7 +62,6 @@ export interface SlideProps extends TransitionProps {
|
|
|
48
62
|
|
|
49
63
|
/**
|
|
50
64
|
* The Slide transition is used by the [Drawer](https://mui.com/material-ui/react-drawer/) component.
|
|
51
|
-
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
52
65
|
*
|
|
53
66
|
* Demos:
|
|
54
67
|
*
|