UNPKG

@obliczeniowo/elementary

Version:
61 lines (57 loc) 2.35 kB
import * as i0 from '@angular/core'; import { TemplateRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import * as i2 from '@angular/common'; import * as i3 from '@obliczeniowo/elementary/loading'; import * as i4 from '@obliczeniowo/elementary/icons'; /** * Css variables: * * --obl-switcher-width * --obl-switcher-height * * --obl-switcher-border-color * --obl-switcher-color * --obl-switcher-spinner-color * --obl-switcher-disabled */ declare class SwitcherComponent implements ControlValueAccessor { /** */ value: boolean; /** */ on?: string; /** */ off?: string; /** */ onIcon?: string | TemplateRef<any>; /** */ offIcon?: string | TemplateRef<any>; /** */ disabled?: boolean; /** */ loading?: boolean; /** */ valueChanged: EventEmitter<boolean>; toggle(): void; onChange: (value: boolean) => void; onTouched: () => void; writeValue(value: boolean | { value: boolean; loading?: boolean; on?: string; off?: string; }): void; registerOnChange(onChange: any): void; registerOnTouched(onTouched: any): void; setDisabledState?(isDisabled: boolean): void; protected isString(type: any): false | string; protected template(type: any): TemplateRef<any> | undefined; static ɵfac: i0.ɵɵFactoryDeclaration<SwitcherComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SwitcherComponent, "obl-switcher", never, { "value": { "alias": "value"; "required": false; }; "on": { "alias": "on"; "required": false; }; "off": { "alias": "off"; "required": false; }; "onIcon": { "alias": "onIcon"; "required": false; }; "offIcon": { "alias": "offIcon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, false, never>; } declare class SwitcherModule { static ɵfac: i0.ɵɵFactoryDeclaration<SwitcherModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SwitcherModule, [typeof SwitcherComponent], [typeof i2.CommonModule, typeof i3.LoadingModule, typeof i4.IconsModule], [typeof SwitcherComponent]>; static ɵinj: i0.ɵɵInjectorDeclaration<SwitcherModule>; } export { SwitcherComponent, SwitcherModule };