formguardian-react
Version:
A reusable, customizable Form Validator Widget for React with comprehensive validation, error handling, and micro-animations.
85 lines (84 loc) • 2.14 kB
TypeScript
/**
* Beautiful, predefined themes for FormGuardian React
* Users can pass a theme or customize colors, spacing, shadows, etc.
*/
export interface FormTheme {
name: string;
primary: string;
secondary: string;
success: string;
danger: string;
warning: string;
background: string;
inputBg: string;
inputBorder: string;
inputBorderHover: string;
inputBorderFocus: string;
inputText: string;
labelText: string;
errorText: string;
successText: string;
spacingBase: string;
borderRadius: string;
shadowSm: string;
shadowMd: string;
shadowLg: string;
fontSize: string;
fontWeight: string;
fontFamily: string;
transitionDuration: string;
}
/**
* Modern Blue Theme - Clean, professional, vibrant
*/
export declare const modernTheme: FormTheme;
/**
* Dark Theme - Sleek dark mode with eye-friendly colors
*/
export declare const darkTheme: FormTheme;
/**
* Minimal Theme - Elegant, minimalist, clean
*/
export declare const minimalTheme: FormTheme;
/**
* Gradient Theme - Vibrant, modern with gradient accents
*/
export declare const gradientTheme: FormTheme;
/**
* Ocean Theme - Cool blues and teals, calm and professional
*/
export declare const oceanTheme: FormTheme;
/**
* Sunset Theme - Warm oranges, reds, pinks
*/
export declare const sunsetTheme: FormTheme;
/**
* Purple Theme - Elegant, creative, modern
*/
export declare const purpleTheme: FormTheme;
/**
* Forest Theme - Green, earthy, natural
*/
export declare const forestTheme: FormTheme;
/**
* All available themes
*/
export declare const themes: {
modern: FormTheme;
dark: FormTheme;
minimal: FormTheme;
gradient: FormTheme;
ocean: FormTheme;
sunset: FormTheme;
purple: FormTheme;
forest: FormTheme;
};
export type ThemeName = keyof typeof themes;
/**
* Get a theme by name or return custom theme
*/
export declare function getTheme(themeName: ThemeName | FormTheme): FormTheme;
/**
* Create CSS custom properties (variables) from a theme
*/
export declare function generateThemeVariables(theme: FormTheme): Record<string, string>;