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.94 kB
import { ElementRef, EventEmitter, type OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class SliderComponent implements OnInit, ControlValueAccessor, Validator { step: number; min: number; max: number; background?: string; isBgTransparent: boolean; change: EventEmitter<number>; isDragging: boolean; slider: ElementRef<HTMLDivElement>; thumb: ElementRef<HTMLDivElement>; x: number; myControl: FormControl<number | null>; isDisabled: boolean; _onChange: (value: any) => void; _onTouched: () => void; _validatorOnChange: () => void; private sliderRect?; private thumbRect?; constructor(); ngOnInit(): void; private updateRects; writeValue(val?: number | string | 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; onDrag(ev: MouseEvent | TouchEvent): void; onResize(): void; private updatePosition; setValueByPosition(thumbRec: DOMRect, sliderRec: DOMRect): void; onDragEnd(ev: MouseEvent | TouchEvent): void; valueChanged(value: number): void; static ɵfac: i0.ɵɵFactoryDeclaration<SliderComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SliderComponent, "slider", never, { "step": { "alias": "step"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "background": { "alias": "background"; "required": false; }; "isBgTransparent": { "alias": "isBgTransparent"; "required": false; }; }, { "change": "change"; }, never, ["*"], true, never>; }