import React from 'react'; import { BoxSystemProps } from './Box'; import { StyleConfig } from '../utils/styleConfig'; import { FocusableTarget } from '../utils/createFocusTrap'; export declare type SheetParts = { sheet: 'enter' | 'opened' | 'exit'; overlay: 'enter' | 'opened' | 'exit'; }; declare type SheetDOMProps = React.ComponentPropsWithRef<'div'>; declare type SheetStyleConfigProp = { styleConfig?: StyleConfig; }; declare type SheetSystemProps = BoxSystemProps; declare type SheetOwnProps = { /** whether the Sheet is currently opened or not */ isOpen: boolean; /** A function called when the Sheet is closed from the inside (escape / outslide click) */ onClose?: () => void; /** The side where the Sheet should open */ side?: 'left' | 'right'; /** * A ref to an element to focus on inside the Sheet after it is opened. * (default: first focusable element inside the Sheet) * (fallback: first focusable element inside the Sheet, then the Sheet's content container) */ refToFocusOnOpen?: React.RefObject; /** * A ref to an element to focus on outside the Sheet after it is closed. * (default: last focused element before the Sheet was opened) * (fallback: none) */ refToFocusOnClose?: React.RefObject; /** * Whether pressing the `Escape` key should close the Sheet * (default: `true`) */ shouldCloseOnEscape?: boolean; /** * Whether clicking outside the Sheet should close it * (default: `true`) */ shouldCloseOnOutsideClick?: boolean | ((event: MouseEvent | TouchEvent) => boolean); }; export declare type SheetProps = SheetDOMProps & SheetStyleConfigProp & SheetSystemProps & SheetOwnProps & { as?: React.ElementType; }; export declare const Sheet: React.ForwardRefExoticComponent & React.RefAttributes>; export {};