gov-gui
Version:
Gov UI Component Library Demo ready Build
46 lines (45 loc) • 1.49 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { GlobalProps } from '../../global/global-styles-helper';
import { AnimationProps } from '../../global/animation-helpers';
export declare class GovCheckbox implements GlobalProps, AnimationProps {
el: HTMLElement;
label: string;
checked: boolean;
disabled: boolean;
value: string;
required: boolean;
requiredErrorMessage: string;
isHovered: boolean;
error: string;
valueChanged: EventEmitter<boolean>;
animation?: string;
animationDelay?: '2s' | '3s' | '4s' | '5s';
animationSpeed?: 'slow' | 'slower' | 'fast' | 'faster';
classes?: string;
styles?: any;
private _styles;
variant?: string;
size?: string;
private allClasses;
/**
* Returns the current value of the checkbox.
* If checked, returns the `value` prop; otherwise, returns an empty string.
*/
getValue(): Promise<string>;
/**
* Public method to validate the checkbox.
* If the checkbox is required and not checked, sets an error message and returns false.
*/
validate(): Promise<boolean>;
handleCheckboxClick: () => void;
handleMouseEnter: () => void;
handleMouseLeave: () => void;
watchAnimations(): void;
watchAnimationsDelay(): void;
watchAnimationsSpeed(): void;
watchStyles(newValue: any): void;
connectedCallback(): void;
componentWillLoad(): void;
provideClass(): void;
render(): any;
}