import { ClassNameOrFunction, RenderProps } from './utils'; import { DialogProps, DialogTriggerProps } from './Dialog'; import { GlobalDOMAttributes } from '@react-types/shared'; import { ModalOverlayProps, ModalRenderProps } from './Modal'; import React from 'react'; type SheetPosition = 'bottom' | 'top' | 'left' | 'right' | 'center'; type SheetSwipeDirection = 'bottom' | 'top' | 'vertical' | 'left' | 'right' | 'horizontal'; export interface SheetRenderProps extends ModalRenderProps { /** * The placement of the sheet on the screen. `start` and `end` are resolved to `left` or `right` * based on the locale direction. * * @selector [data-position="bottom | top | left | right | center"] */ position: SheetPosition; /** * The direction the sheet can be swiped. `start` and `end` are resolved to `left` or `right` * based on the locale direction. * * @selector [data-swipe-direction="bottom | top | vertical | left | right | horizontal"] */ swipeDirection: SheetSwipeDirection; /** * The index of the sheet in the stack. * * @selector [data-stack-index="0 | 1 | 2 | ..."] */ stackIndex: number; /** * Whether the sheet has descendants. * * @selector [data-has-descendants] */ hasDescendants: boolean; /** * Whether the sheet is fully expanded to its last snap point. * * @selector [data-expanded] */ isExpanded: boolean; } export interface SheetOverlayProps extends Omit, RenderProps { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-SheetOverlay' */ className?: ClassNameOrFunction; /** * The placement of the sheet on the screen. `start` and `end` are mirrored in right-to-left * locales. * * @default 'bottom' */ position?: 'bottom' | 'top' | 'left' | 'right' | 'start' | 'end' | 'center'; /** * The direction the sheet can be swiped. `start` and `end` are mirrored in right-to-left locales. * Defaults to the same direction as `position`. */ swipeDirection?: 'bottom' | 'top' | 'vertical' | 'left' | 'right' | 'start' | 'end' | 'horizontal'; /** * Snap points the sheet will stop at, expressed as the amount of the sheet that is visible. * Numbers are pixels, and percentages are relative to the size of the sheet. Sheets initially * open to the first snap point. */ snapPoints?: Array; /** * Whether to prevent the user from closing the sheet by swiping, pressing Escape, or interacting * outside it. * * @default false */ preventDismissal?: boolean; } export interface SheetTriggerProps extends DialogTriggerProps { } /** * A SheetTrigger opens a sheet when a trigger element is pressed. */ export declare function SheetTrigger(props: SheetTriggerProps): React.JSX.Element; /** * A SheetOverlay is a container for a SheetBackdrop and a Sheet. */ export declare const SheetOverlay: React.ForwardRefExoticComponent>; export interface SheetProps extends Omit, RenderProps { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-Sheet' */ className?: ClassNameOrFunction; /** CSS `@keyframes` name for the animation that occurs while the user swipes. */ swipeAnimation?: string; /** * The snap point indices between which the swipe animation occurs. If omitted, the animation will * occur over the full range of the sheet's movement. */ swipeAnimationRange?: { start?: number; end?: number; }; /** CSS `@keyframes` name for the animation that occurs when a sheet has descendants. */ stackAnimation?: string; /** Whether to add padding to the sheet so that it appears to continue outside the viewport. */ overscrollPadding?: boolean; } /** * A Sheet is a swipeable overlay that slides in from the edge of the viewport. */ export declare const Sheet: React.ForwardRefExoticComponent>; export interface SheetBackdropProps extends RenderProps, GlobalDOMAttributes { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for * the element. A function may be provided to compute the class based on component state. * * @default 'react-aria-SheetBackdrop' */ className?: ClassNameOrFunction; /** CSS `@keyframes` name for the animation that occurs while the user swipes. */ swipeAnimation?: string; /** * The snap point indices between which the swipe animation occurs. If omitted, the animation will * occur over the full range of the sheet's movement. */ swipeAnimationRange?: { start?: number; end?: number; }; } /** * The backdrop behind a sheet. */ export declare const SheetBackdrop: React.ForwardRefExoticComponent>; export interface SheetContentProps extends Omit { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. * * @default 'react-aria-SheetContent' */ className?: string; } /** * The scrollable content area of a sheet. */ export declare const SheetContent: React.ForwardRefExoticComponent>; export {};