1 | import * as React from 'react';
|
2 | import type { IColorPickerProps, IColorPicker } from './ColorPicker.types';
|
3 | import type { IColor } from '../../utilities/color/interfaces';
|
4 | declare type ColorComponent = keyof Pick<IColor, 'r' | 'g' | 'b' | 'a' | 't' | 'hex'>;
|
5 | export interface IColorPickerState {
|
6 |
|
7 | color: IColor;
|
8 |
|
9 | editingColor?: {
|
10 |
|
11 | component: ColorComponent;
|
12 |
|
13 | value: string;
|
14 | };
|
15 | }
|
16 |
|
17 |
|
18 |
|
19 | export declare class ColorPickerBase extends React.Component<IColorPickerProps, IColorPickerState> implements IColorPicker {
|
20 | static defaultProps: Partial<IColorPickerProps>;
|
21 | private _textChangeHandlers;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | private _textLabels;
|
27 |
|
28 | private _strings;
|
29 | constructor(props: IColorPickerProps);
|
30 | get color(): IColor;
|
31 | componentDidUpdate(prevProps: Readonly<IColorPickerProps>, prevState: Readonly<IColorPickerState>): void;
|
32 | render(): JSX.Element;
|
33 | private _getDisplayValue;
|
34 | private _getTooltipValue;
|
35 | private _onSVChanged;
|
36 | private _onHChanged;
|
37 | /** Callback for when the alpha/transparency slider changes */
|
38 | private _onATChanged;
|
39 | private _onTextChange;
|
40 | private _onBlur;
|
41 | /**
|
42 | * Update the displayed color and call change handlers if appropriate.
|
43 | * @param ev - Event if call was triggered by an event (undefined if triggered by props change)
|
44 | * @param newColor - Updated color
|
45 | */
|
46 | private _updateColor;
|
47 | }
|
48 | export {};
|