import { Accessibility, AlertBehaviorProps } from '@fluentui/accessibility'; import { UIComponentProps, ContentComponentProps } from '../../utils'; import { ComponentEventHandler, ShorthandValue, ShorthandCollection, FluentComponentStaticProps } from '../../types'; import { BoxProps } from '../Box/Box'; import { ButtonProps } from '../Button/Button'; import { TextProps } from '../Text/Text'; import { ButtonGroupProps } from '../Button/ButtonGroup'; import { AlertDismissAction, AlertDismissActionProps } from './AlertDismissAction'; import { ComponentWithAs } from '@fluentui/react-bindings'; export interface AlertSlotClassNames { content: string; actions: string; icon: string; header: string; body: string; } export interface AlertProps extends UIComponentProps, ContentComponentProps> { /** * Accessibility behavior if overridden by the user. * @available alertWarningBehavior */ accessibility?: Accessibility; /** An alert can contain action buttons. */ actions?: ShorthandValue | ShorthandCollection; /** An alert may contain an icon. */ icon?: ShorthandValue; /** An alert may contain a header. */ header?: ShorthandValue; /** An alert's position relative to neighboring items. */ attached?: boolean | 'top' | 'bottom'; /** An alert can only take up the width of its content. */ fitted?: boolean; /** An alert may be formatted to display a danger message. */ danger?: boolean; /** A default value for the `visible` prop. */ defaultVisible?: boolean; /** An alert can be dismissible. */ dismissible?: boolean; /** * A button shorthand for the dismiss action slot. To use this slot the alert should be * dismissible. */ dismissAction?: ShorthandValue; /** An alert may be formatted to display information. */ info?: boolean; /** * Called after user will dismiss the alert. * @param event - React's original SyntheticEvent. * @param data - All props. */ onVisibleChange?: ComponentEventHandler; /** * Called after the alert is focused. * @param event - React's original SyntheticEvent. * @param data - All props. */ onFocus?: ComponentEventHandler; /** An alert can be formatted to display a successful message. */ success?: boolean; /** An alert can be set to visible to force itself to be shown. */ visible?: boolean; /** An alert can be formatted to display a warning message. */ warning?: boolean; /** An alert can have a body that contains header and content elements. */ body?: ShorthandValue; } export declare type AlertStylesProps = Required>; export declare const alertClassName = "ui-alert"; export declare const alertSlotClassNames: AlertSlotClassNames; /** * An Alert displays a brief, important message to attract a user's attention without interrupting their current task. * * @accessibility * Implements [ARIA Alert](https://www.w3.org/TR/wai-aria-practices-1.1/#alert) design pattern. */ export declare const Alert: ComponentWithAs<'div', AlertProps> & FluentComponentStaticProps & { DismissAction: typeof AlertDismissAction; };