UNPKG

xui

Version:

xUI Components for Angular

36 lines (35 loc) 1.59 kB
import { ChangeDetectorRef, OnInit } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { SwitchColor } from './switch.types'; import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from "@angular/core"; export declare class SwitchComponent implements ControlValueAccessor, OnInit { private cdr; control?: NgControl | undefined; static ngAcceptInputType_disabled: BooleanInput; static ngAcceptInputType_value: BooleanInput; private onChange?; private onTouched?; private _value; disabled: boolean; color: SwitchColor; get value(): boolean; set value(v: boolean); get style(): { 'x-switch': boolean; 'x-switch-disabled': boolean; }; get styleSwitch(): { [klass: string]: boolean; }; constructor(cdr: ChangeDetectorRef, control?: NgControl | undefined); ngOnInit(): void; writeValue(source: boolean): void; registerOnChange(onChange: (source: boolean) => void): void; registerOnTouched(onTouched: () => void): void; setDisabledState(isDisabled: boolean): void; private _focusOut; _click(event?: KeyboardEvent | MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, [null, { optional: true; self: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "xui-switch", never, { "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], false, never>; }