neumorphic-peripheral
Version:
A lightweight, framework-agnostic JavaScript/TypeScript library for beautiful neumorphic styling
29 lines • 1.17 kB
TypeScript
import { PasswordConfig, PasswordInstance } from '../types';
import { InputComponent } from './input';
import { validatePasswordStrength } from '../validators';
export declare class PasswordComponent extends InputComponent implements PasswordInstance {
private _passwordConfig;
private _isVisible;
private _toggleButton?;
private _strengthIndicator?;
private _originalType;
constructor(element: HTMLElement, config?: PasswordConfig);
protected init(): void;
protected bindEvents(): void;
private setupPasswordField;
private createInputWrapper;
private createToggleButton;
private updateToggleIcon;
private createEyeIcon;
private createStrengthIndicator;
private updateStrengthIndicator;
toggleVisibility(): void;
isVisible(): boolean;
showPassword(): void;
hidePassword(): void;
getPasswordStrength(): ReturnType<typeof validatePasswordStrength> | null;
protected onUpdate(newConfig: Partial<PasswordConfig>): void;
protected onDestroy(): void;
}
export declare function password(element: HTMLElement, config?: PasswordConfig): PasswordComponent;
//# sourceMappingURL=password.d.ts.map