/** * ContrastGuard Component * A React wrapper component that ensures WCAG contrast compliance */ import React from "react"; import { type ContrastLevel } from "../../utils/contrastGuard"; import type { LiquidGlassMaterial, MaterialVariant } from "../../tokens/glass"; type ContrastGuardElement = keyof HTMLElementTagNameMap; export interface ContrastGuardProps extends React.HTMLAttributes { /** * Content to be rendered with contrast protection */ children?: React.ReactNode; /** * Target WCAG compliance level * @default 'AA' */ level?: ContrastLevel; /** * Minimum contrast ratio * @default 4.5 */ minContrast?: number; /** * Fallback text color if contrast cannot be met */ fallbackColor?: string; /** * Background color to test against */ backgroundColor?: string; /** * Text color * @default 'var(--glass-text-primary)' */ textColor?: string; /** * Glass material type */ material?: LiquidGlassMaterial; /** * Material variant */ variant?: MaterialVariant; /** * Whether to automatically adjust contrast * @default true */ autoAdjust?: boolean; /** * Custom className */ className?: string; /** * Element type to render * @default 'span' */ as?: ContrastGuardElement; /** * Callback when contrast adjustment is applied */ onAdjustment?: (meetsRequirement: boolean, ratio: number) => void; /** * Show a small contrast status indicator. Useful in docs, previews, and * audit tooling where the component's behavior should be visible. */ showIndicator?: boolean; /** * Optional package-owned demo backdrop for docs/previews. Normal app usage * should leave this as `none`. * @default 'none' */ demoBackdrop?: "none" | "busy-light" | "busy-dark"; } /** * ContrastGuard wrapper component * Ensures text content meets WCAG contrast requirements */ export declare const ContrastGuard: React.ForwardRefExoticComponent>; /** * Simpler text wrapper with contrast protection */ export interface TextWithContrastProps extends React.HTMLAttributes { children?: React.ReactNode; level?: "AA" | "AAA"; className?: string; as?: ContrastGuardElement; } export declare const TextWithContrast: React.FC; /** * High contrast mode wrapper for critical UI elements */ export declare const HighContrastText: React.FC<{ children: React.ReactNode; className?: string; }>; export default ContrastGuard; //# sourceMappingURL=ContrastGuard.d.ts.map