UNPKG

ngx-input-color

Version:

Angular color input component and color picker (with HSL, HSV, RGB, CMYK, HEX, alpha, eye-dropper, etc)

41 lines (40 loc) 1.98 kB
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, Renderer2, ViewContainerRef } from '@angular/core'; import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class NgxInputGradientDirective implements AfterViewInit, OnDestroy, ControlValueAccessor, Validator { private _doc; private el; private renderer; private viewContainerRef; setInputBackground: boolean; theme: 'light' | 'dark' | 'auto'; private _targetInput?; set ngxInputColor(el: HTMLInputElement | ElementRef<HTMLInputElement> | null | undefined | ''); change: EventEmitter<string>; private boundInputHandler; private isHostInput; private pickerComponentRef?; private backdrop?; private pickerEl?; isDisabled: boolean; value: string; _onChange: (value: string) => void; _onTouched: () => void; _onValidateChange: () => void; constructor(_doc: Document, el: ElementRef, renderer: Renderer2, viewContainerRef: ViewContainerRef); onClick(ev: Event): void; ngAfterViewInit(): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(disabled: boolean): void; registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; ngOnDestroy(): void; writeValue(value: any): void; toggleColorPicker(): void; setPosition(): void; destroyPicker(): void; private emitChange; static ɵfac: i0.ɵɵFactoryDeclaration<NgxInputGradientDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NgxInputGradientDirective, "[ngxInputGradient]", never, { "setInputBackground": { "alias": "setInputBackground"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "ngxInputColor": { "alias": "ngxInputColor"; "required": false; }; }, { "change": "change"; }, never, never, false, never>; }