UNPKG

neumorphic-peripheral

Version:

A lightweight, framework-agnostic JavaScript/TypeScript library for beautiful neumorphic styling

97 lines 2.65 kB
export interface CardConfig extends BaseComponentConfig { variant?: 'raised' | 'inset' | 'flat'; size?: 'sm' | 'md' | 'lg'; padding?: string; hover?: boolean; } export interface ButtonConfig extends BaseComponentConfig { variant?: 'primary' | 'secondary' | 'ghost'; size?: 'sm' | 'md' | 'lg'; loading?: boolean; icon?: 'left' | 'right' | 'only'; onClick?: (event: Event) => void; } export interface InputConfig extends BaseComponentConfig { type?: string; validate?: ValidationRules; validateOn?: 'change' | 'blur' | 'submit'; placeholder?: string; errorMessage?: string; showValidation?: boolean; debounce?: number; } export interface PasswordConfig extends InputConfig { showToggle?: boolean; togglePosition?: 'left' | 'right'; strengthIndicator?: boolean; maskCharacter?: string; strengthConfig?: PasswordStrengthConfig; } export interface TextareaConfig extends InputConfig { autoResize?: boolean; maxHeight?: string; minHeight?: string; rows?: number; cols?: number; } export interface ToggleConfig extends BaseComponentConfig { type?: 'switch' | 'checkbox' | 'radio'; size?: 'sm' | 'md' | 'lg'; checked?: boolean; animated?: boolean; onChange?: (checked: boolean) => void; } export interface ComponentInstance { element: HTMLElement; config: BaseComponentConfig; update(config: Partial<BaseComponentConfig>): void; destroy(): void; } export interface InputInstance extends ComponentInstance { getValue(): string; setValue(value: string): void; validate(): ValidationResult; isValid(): boolean; focus(): void; blur(): void; select(): void; clearErrors(): void; } export interface PasswordInstance extends InputInstance { toggleVisibility(): void; isVisible(): boolean; showPassword(): void; hidePassword(): void; getPasswordStrength(): any; } export interface NeumorphicTheme { colors: { surface: string; shadowLight: string; shadowDark: string; text: string; textSecondary: string; accent: string; error: string; success: string; shadow: { light: string; dark: string; }; }; borderRadius: string; spacing: string; shadowIntensity: number; duration: string; easing: string; animation: { duration: string; easing: string; }; } export interface BaseComponentConfig { theme?: NeumorphicTheme | ThemePreset; disabled?: boolean; className?: string; } //# sourceMappingURL=index.d.ts.map