import type { ReactNode, Ref } from 'react'; import type { OverlayOpenChangeDetails } from '../overlays/_shared/overlayTypes.js'; import type { SheetDetent } from './useSheetDetents.js'; export type RenderProp = import('react').ReactElement | ((props: any, state?: any) => import('react').ReactElement); /** Logical edge: start/end flip under dir=rtl. Physical left/right are resolved internally only (data-side on the popup). */ export type SheetSide = 'start' | 'end' | 'top' | 'bottom'; export type SheetPreset = 'panel' | 'action'; export interface SheetRootProps { /** Controlled open state. Pair with `onOpenChange`. */ open?: boolean; /** Initial open state when uncontrolled. */ defaultOpen?: boolean; /** Called with the next open state when it changes. */ onOpenChange?: ((open: boolean, details: OverlayOpenChangeDetails) => void) | undefined; /** Anchored edge; 'start'/'end' resolve against the text direction. */ side?: SheetSide; /** 'action' forces side=bottom and composes Sheet.Action items + a separated cancel. */ preset?: SheetPreset; /** Traps focus and blocks the page behind while open. */ modal?: boolean; /** Allows closing the sheet with an outside press. */ dismissible?: boolean; /** LayerStack kind the sheet registers as (S-25); a navigation drawer built on Sheet (SURF Sidebar.Drawer) registers as 'drawer'. Default 'sheet'. */ layerKind?: 'sheet' | 'drawer'; /** Detents as fractions of 100dvh (1 = full height); omitted = the content height. side="bottom" only. */ detents?: SheetDetent[]; /** Controlled index into `detents`. Pair with `onDetentChange`. */ detent?: number; /** Initial index into `detents` when uncontrolled. */ defaultDetent?: number; /** Called with the index of the detent the sheet settles at. */ onDetentChange?: (index: number) => void; /** Overrides for the built-in, localizable UI strings. */ labels?: { close?: string; handle?: string; detents?: string[]; }; /** Content rendered inside the component. */ children?: ReactNode; } export interface SheetTriggerProps { children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface SheetPopupProps { /** side sheets: 320/400/560px, capped at calc(100vw - 48px). */ size?: 'sm' | 'md' | 'lg'; render?: RenderProp; children?: ReactNode; className?: string; ref?: Ref; [key: string]: unknown; } export interface SheetContentProps extends SheetPopupProps { keepMounted?: boolean; backdrop?: boolean; } export interface SheetButtonishProps { children?: ReactNode; className?: string; ref?: Ref; /** Element-specific casts happen at the BU boundary. */ [key: string]: unknown; } export interface SheetActionProps extends SheetButtonishProps { onClick?: (e: unknown) => void; } export interface SheetLayoutProps { children?: ReactNode; className?: string; padding?: 'default' | 'none'; } //# sourceMappingURL=Sheet.types.d.ts.map