import * as React from 'react'; import { SlotComponentProps } from '@mui/base/utils'; import MuiPaper, { PaperProps as MuiPaperProps } from '@mui/material/Paper'; import MuiPopper, { PopperProps as MuiPopperProps, PopperPlacementType } from '@mui/material/Popper'; import { TrapFocusProps as MuiTrapFocusProps } from '@mui/material/Unstable_TrapFocus'; import { TransitionProps as MuiTransitionProps } from '@mui/material/transitions'; import { PickersPopperClasses } from './pickersPopperClasses'; import { UncapitalizeObjectKeys } from '../utils/slots-migration'; import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue.types'; interface PickersPopperOwnerState extends PickerPopperProps { placement: PopperPlacementType; } export interface PickersPopperSlotsComponent { /** * Custom component for the paper rendered inside the desktop picker's Popper. * @default PickersPopperPaper */ DesktopPaper?: React.JSXElementConstructor; /** * Custom component for the desktop popper [Transition](https://mui.com/material-ui/transitions/). * @default Grow or Fade from '@mui/material' when `reduceAnimations` is `true`. */ DesktopTransition?: React.JSXElementConstructor; /** * Custom component for trapping the focus inside the views on desktop. * @default FocusTrap from '@mui/base'. */ DesktopTrapFocus?: React.JSXElementConstructor; /** * Custom component for the popper inside which the views are rendered on desktop. * @default Popper from '@mui/material'. */ Popper?: React.ElementType; } export interface PickersPopperSlotsComponentsProps { /** * Props passed down to the desktop [Paper](https://mui.com/material-ui/api/paper/) component. */ desktopPaper?: SlotComponentProps; /** * Props passed down to the desktop [Transition](https://mui.com/material-ui/transitions/) component. */ desktopTransition?: Partial; /** * Props passed down to the [FocusTrap](https://mui.com/base-ui/react-focus-trap/) component on desktop. */ desktopTrapFocus?: Partial; /** * Props passed down to [Popper](https://mui.com/material-ui/api/popper/) component. */ popper?: SlotComponentProps; } export interface PickerPopperProps extends UsePickerValueActions { role: 'tooltip' | 'dialog'; anchorEl: MuiPopperProps['anchorEl']; open: MuiPopperProps['open']; placement?: MuiPopperProps['placement']; containerRef?: React.Ref; children?: React.ReactNode; onBlur?: () => void; slots?: UncapitalizeObjectKeys; slotProps?: PickersPopperSlotsComponentsProps; /** * Override or extend the styles applied to the component. */ classes?: Partial; shouldRestoreFocus?: () => boolean; reduceAnimations?: boolean; } export declare function PickersPopper(inProps: PickerPopperProps): React.JSX.Element; export {};