UNPKG

ngx-input-color

Version:

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

46 lines (45 loc) 2.04 kB
import { ElementRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor, FormControl, AbstractControl, ValidationErrors } from '@angular/forms'; import { IPosition } from '../models/IPosition'; import * as i0 from "@angular/core"; export declare class SaturationComponent implements ControlValueAccessor { width?: number; height?: number; color: string; step: number; min: IPosition; max: { x: number; y: number; }; change: EventEmitter<IPosition>; isDragging: boolean; saturation: ElementRef<HTMLDivElement>; thumb: ElementRef<HTMLDivElement>; x: number; y: number; myControl: FormControl<IPosition | null>; isDisabled: boolean; _onChange: (value: any) => void; _onTouched: () => void; _validatorOnChange: () => void; private saturationRect?; private thumbRect?; constructor(); private updateRects; writeValue(val?: IPosition | null): void; validate(control: AbstractControl): ValidationErrors | null; registerOnValidatorChange?(fn: () => void): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState?(disabled: boolean): void; dragStart(ev: MouseEvent | TouchEvent): void; onResize(): void; onDrag(ev: MouseEvent | TouchEvent): void; private updatePosition; onDragEnd(ev: MouseEvent | TouchEvent): void; setValueByPosition(thumbRec: DOMRect, saturationRec: DOMRect): void; valueChanged(value: IPosition): void; static ɵfac: i0.ɵɵFactoryDeclaration<SaturationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SaturationComponent, "saturation", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "color": { "alias": "color"; "required": false; }; "step": { "alias": "step"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, { "change": "change"; }, never, never, true, never>; }