ngx-colors-v
Version:
A beautiful color picker for angular that let you choose from a color palette, using sliders (Hue, Lightness, Alpha sliders) or through text input(hex, rgba, hsla)
42 lines (41 loc) • 2.17 kB
TypeScript
import { EventEmitter, ElementRef, ComponentRef } from "@angular/core";
import { PanelFactoryService } from "../services/panel-factory.service";
import { PanelComponent } from "../components/panel/panel.component";
import { ControlValueAccessor } from "@angular/forms";
import { NgxColor } from "../clases/color";
import * as i0 from "@angular/core";
export declare class NgxColorsTriggerDirective implements ControlValueAccessor {
private triggerRef;
private panelFactory;
color: string;
colorsAnimation: "slide-in" | "popup";
palette: Array<string> | Array<NgxColor>;
format: string;
position: "top" | "bottom";
hideTextInput: boolean;
hideColorPicker: boolean;
attachTo: string | HTMLElement | Element | undefined;
overlayClassName: string | undefined;
colorPickerControls: "default" | "only-alpha" | "no-alpha";
acceptLabel: string;
cancelLabel: string;
change: EventEmitter<string>;
input: EventEmitter<string>;
slider: EventEmitter<string>;
onClick(): void;
constructor(triggerRef: ElementRef, panelFactory: PanelFactoryService);
panelRef: ComponentRef<PanelComponent>;
isDisabled: boolean;
onTouchedCallback: () => void;
onChangeCallback: (_: any) => void;
open(): void;
close(): void;
setDisabledState(isDisabled: boolean): void;
setColor(color: any): void;
sliderChange(color: any): void;
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxColorsTriggerDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxColorsTriggerDirective, "[ngx-colors-trigger]", never, { "colorsAnimation": "colorsAnimation"; "palette": "palette"; "format": "format"; "position": "position"; "hideTextInput": "hideTextInput"; "hideColorPicker": "hideColorPicker"; "attachTo": "attachTo"; "overlayClassName": "overlayClassName"; "colorPickerControls": "colorPickerControls"; "acceptLabel": "acceptLabel"; "cancelLabel": "cancelLabel"; }, { "change": "change"; "input": "input"; "slider": "slider"; }, never>;
}