Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (53 sloc) 2.18 KB
/// <reference types="jquery" />
/// <reference types="tinycolor2" />
import * as t from './modules/types';
import * as Picker from './modules/picker';
export declare class Instance {
protected ns: string;
protected ss: string;
protected instance: number;
protected options: t.Options;
protected $element: JQuery;
protected $hiddenElement: JQuery;
protected $swatch: JQuery;
protected elementTagName: string;
protected elementTagType: string;
protected elementIsTextualInput: boolean;
protected elementIsColorInput: boolean;
protected elementIsInput: boolean;
protected elementOriginalTitleAttr: string;
protected elementOriginalCssColor: string;
protected elementOriginalCssBackground: string;
protected elementOriginalCssBorderColor: string;
protected animationEnd: string;
protected picker: Picker.Instance;
constructor(element: JQuery | HTMLElement, options?: t.OptionsArg);
protected setupElement(): void;
protected setupSwatch(): void;
protected onBeforeOpen(): void;
protected onOpened(): void;
protected onBeforeClose(): void;
protected onClosed(): void;
protected onColorActive(color: t.Color): void;
protected onActiveColorClosed(color: t.Color): void;
protected onColorSelected(color: t.Color): void;
protected onElementAlter(e: JQueryEventObject, via?: string): void;
protected onSwatchClick(e: JQueryEventObject): void;
open(hexKeyOrName?: t.Color | string): void;
toggle(): void;
close(): void;
getColors(): t.Colors;
getColorKeysByName(): string[];
getColorKeysByHue(): string[];
getColor(hexKeyOrName: t.Color | string): t.Color | undefined;
getActiveColor(): t.Color | undefined;
setActiveColor(hexKeyOrName: t.Color | string): void;
getSelectedColor(): string;
setSelectedColor(hexKeyOrName: t.Color | string, updateElement?: boolean, triggerEvents?: boolean): void;
destroy(keepPicker?: boolean): void;
protected swatchBgTiny(tiny: tinycolorInstance): tinycolorInstance;
protected swatchMarkup(): string;
}
declare const _default: t.JQueryNamedColorPicker;
export default _default;
export declare function setup(): t.JQueryNamedColorPicker;