@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
81 lines (80 loc) • 3.46 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { SelectedAriaAttributes, SheetAriaAttribute, SheetBackground, SheetMotionHiddenEndEventDetail, SheetMotionVisibleEndEventDetail } from '../types';
export type PSheetProps = BaseProps & {
/**
* Sets ARIA attributes on the sheet dialog element for improved accessibility when the default `aria-label` is insufficient.
*/
aria?: SelectedAriaAttributes<SheetAriaAttribute>;
/**
* Sets the background color of the sheet panel (`canvas` or `surface`).
* @default 'canvas'
*/
background?: SheetBackground;
/**
* When enabled, clicking the backdrop will not close the sheet.
* @default false
*/
disableBackdropClick?: boolean;
/**
* Shows a dismiss button in the sheet header so users can manually close it.
* @default true
*/
dismissButton?: boolean;
/**
* Emitted when the user dismisses the sheet via the close button, backdrop click, or Escape key.
*/
onDismiss?: (event: CustomEvent<void>) => void;
/**
* Emitted after the sheet's close transition has fully completed and the panel is hidden.
*/
onMotionHiddenEnd?: (event: CustomEvent<SheetMotionHiddenEndEventDetail>) => void;
/**
* Emitted after the sheet's open transition has fully completed and the panel is visible.
*/
onMotionVisibleEnd?: (event: CustomEvent<SheetMotionVisibleEndEventDetail>) => void;
/**
* Controls whether the sheet panel slides in from the bottom and is visible to the user.
* @default false
*/
open: boolean;
};
export declare const PSheet: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* Sets ARIA attributes on the sheet dialog element for improved accessibility when the default `aria-label` is insufficient.
*/
aria?: SelectedAriaAttributes<SheetAriaAttribute>;
/**
* Sets the background color of the sheet panel (`canvas` or `surface`).
* @default 'canvas'
*/
background?: SheetBackground;
/**
* When enabled, clicking the backdrop will not close the sheet.
* @default false
*/
disableBackdropClick?: boolean;
/**
* Shows a dismiss button in the sheet header so users can manually close it.
* @default true
*/
dismissButton?: boolean;
/**
* Emitted when the user dismisses the sheet via the close button, backdrop click, or Escape key.
*/
onDismiss?: (event: CustomEvent<void>) => void;
/**
* Emitted after the sheet's close transition has fully completed and the panel is hidden.
*/
onMotionHiddenEnd?: (event: CustomEvent<SheetMotionHiddenEndEventDetail>) => void;
/**
* Emitted after the sheet's open transition has fully completed and the panel is visible.
*/
onMotionVisibleEnd?: (event: CustomEvent<SheetMotionVisibleEndEventDetail>) => void;
/**
* Controls whether the sheet panel slides in from the bottom and is visible to the user.
* @default false
*/
open: boolean;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;