1/**
2 * Alert Component
3 *
4 * Unified alert component that replaces Toast, Banner, and Notification.
5 * Controls layout and behavior via the `variant` prop.
6 */
7
8import { ReactNode } from 'react';
9import { cn } from '../../lib/utils';
10import { CloseIcon } from '../icons';
11import {
12 WarningCircleIcon,
13 ErrorCircleIcon,
14 SuccessCircleIcon,
15 InfoCircleIcon,
16} from '../icons/FeedbackIcons';
17
18export type AlertVariant = 'toast' | 'banner' | 'notification';
19export type AlertType = 'info' | 'warning' | 'error' | 'success';
20export type AlertFill = 'solid' | 'light' | 'card' | 'outline';
21
22export interface AlertAction {
23 label: string;
24 href?: string;
25 onClick?: () => void;
26}
27
28export interface AlertProps {
29 /** Layout variant: toast (floating), banner (inline), or notification (card with action) */
30 variant?: AlertVariant;
31 /** Type determines color and icon */
32 type?: AlertType;
33 /** Fill style - solid (full color), light (subtle background), card, or outline. */
34 fill?: AlertFill;
35 /** Whether the alert is visible */
36 open?: boolean;
37 /** Callback when close button is clicked */
38 onClose?: () => void;
39 /** Optional action button (notification variant) */
40 action?: AlertAction;