import { HTMLAttributes, ReactNode } from 'react';
import { ContainerProps } from '../Container';
import { DialogProps } from '../Dialog';
export type FlyoutProps = DialogProps;
export interface FlyoutTriggerProps extends HTMLAttributes {
/** The content of the trigger */
children: ReactNode;
}
export type FlyoutSizeType = 'default' | 'narrow' | 'wide' | 'widest';
export type FlyoutStrategy = 'relative' | 'absolute' | 'fixed';
export type FlyoutType = 'default' | 'inline';
export type FlyoutAlignmentType = 'start' | 'end';
export interface FlyoutContentProps extends HTMLAttributes {
children: ReactNode;
container?: HTMLElement | null;
showOverlay?: boolean;
size?: FlyoutSizeType;
type?: FlyoutType;
strategy?: FlyoutStrategy;
closeOnInteractOutside?: boolean;
width?: string;
align?: FlyoutAlignmentType;
/** Whether to show a shadow on the flyout */
hasShadow?: boolean;
onInteractOutside?: (event: CustomEvent) => void;
onEscapeKeyDown?: (event: KeyboardEvent) => void;
onPointerDownOutside?: (event: CustomEvent) => void;
onFocusOutside?: (event: CustomEvent) => void;
onOpenAutoFocus?: (event: Event) => void;
onCloseAutoFocus?: (event: Event) => void;
}
interface TitleHeaderProps extends Omit {
title: string;
description?: string;
type?: FlyoutType;
children?: never;
showClose?: boolean;
showSeparator?: boolean;
className?: string;
}
interface ChildrenHeaderProps extends Omit {
title?: never;
type?: FlyoutType;
description?: never;
showClose?: boolean;
showSeparator?: boolean;
className?: string;
}
export type FlyoutHeaderProps = TitleHeaderProps | ChildrenHeaderProps;
export interface FlyoutFooterProps extends Omit, 'orientation' | 'justifyContent' | 'component' | 'padding' | 'gap'> {
type?: FlyoutType;
className?: string;
}
export {};