import { default as React } from 'react'; import { InfoType } from '@sudobility/types'; /** @deprecated Use InfoType from @sudobility/types instead */ export type BannerVariant = `${InfoType}`; export interface BannerProps { /** Whether the banner is visible */ isVisible: boolean; /** Callback when banner is dismissed */ onDismiss: () => void; /** Banner title */ title: string; /** Banner description (optional) */ description?: string; /** Visual variant */ variant?: InfoType; /** Auto-dismiss duration in milliseconds (0 to disable, default: 5000) */ duration?: number; /** Custom icon (overrides variant icon) */ icon?: React.ReactNode; /** Additional CSS classes */ className?: string; /** Accessible label for close button */ closeAriaLabel?: string; } /** * Banner Component * * A temporary notification banner that slides down from the top of the screen. * Similar to SwiftMessage for iOS - less intrusive than a modal. * * Features: * - Slides down from top with animation * - Auto-dismisses after configurable duration (default 5 seconds) * - Manual dismiss via close button * - Multiple variants: info, success, warning, error * - Dark/light theme support * * @example * ```tsx * const [showBanner, setShowBanner] = useState(false); * * setShowBanner(false)} * variant="success" * title="Changes saved" * description="Your settings have been updated successfully." * /> * ``` */ export declare const Banner: React.FC; export interface UseBannerOptions { /** Default duration for auto-dismiss (default: 5000) */ defaultDuration?: number; } export interface UseBannerReturn { /** Whether the banner is currently visible */ isVisible: boolean; /** Current banner props */ bannerProps: { title: string; description?: string; variant: InfoType; duration: number; } | null; /** Show a banner */ showBanner: (options: { title: string; description?: string; variant?: InfoType; duration?: number; }) => void; /** Hide the current banner */ hideBanner: () => void; } /** * Hook for managing banner state * * @example * ```tsx * const { isVisible, bannerProps, showBanner, hideBanner } = useBanner(); * * // Show a banner * showBanner({ * title: 'Success!', * description: 'Your changes have been saved.', * variant: 'success', * }); * * // Render the banner * {bannerProps && ( * * )} * ``` */ export declare const useBanner: (options?: UseBannerOptions) => UseBannerReturn; //# sourceMappingURL=banner.d.ts.map