@frank-auth/react
Version:
Flexible and customizable React UI components for Frank Authentication
38 lines • 1.21 kB
TypeScript
import { ClassValue } from 'clsx';
/**
* Utility function to merge Tailwind CSS classes with clsx and tailwind-merge
*/
export declare function cn(...inputs: ClassValue[]): string;
/**
* Generate a unique ID for components
*/
export declare function generateId(prefix?: string): string;
/**
* Debounce function for performance optimization
*/
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
/**
* Check if a value is a valid React node
*/
export declare function isValidElement(value: any): boolean;
/**
* Create ripple effect coordinates
*/
export declare function createRipple(event: React.MouseEvent<HTMLElement>, element: HTMLElement): {
x: number;
y: number;
size: number;
};
/**
* Convert size prop to numeric value
*/
export declare function getSizeValue(size: 'sm' | 'md' | 'lg' | 'xl'): number;
/**
* Get contrast color for backgrounds
*/
export declare function getContrastColor(backgroundColor: string): 'light' | 'dark';
/**
* Format validation error messages
*/
export declare function formatErrorMessage(error: string | undefined): string | undefined;
//# sourceMappingURL=utils.d.ts.map