import React from 'react'; import Color from './helpers/color'; import typeColor from './utils/validationColor'; import { ParamsColor } from './Params'; declare function noop(): void; interface PanelProps { alpha?: number; className?: string; color?: string | ParamsColor | Color; colorHistory?: string[]; defaultAlpha?: number; defaultColor?: string; enableAlpha?: boolean; enableHistory?: boolean; maxHistory?: number; mode?: 'RGB' | 'HSL' | 'HSB'; onBlur?: () => void; onChange?: (color: any) => void; onFocus?: () => void; onMount?: (ref: HTMLElement) => void; prefixCls?: string; style?: React.CSSProperties; } interface PanelState { color?: string | ParamsColor | Color; alpha?: number; } declare class Panel extends React.Component { ref: HTMLDivElement; systemColorPickerOpen: boolean; _blurTimer: any; static propTypes: { alpha: any; className: any; color: typeof typeColor; colorHistory: any; defaultAlpha: any; defaultColor: typeof typeColor; enableAlpha: any; enableHistory: any; maxHistory: any; mode: any; onBlur: any; onChange: any; onFocus: any; onMount: any; prefixCls: any; style: any; }; static defaultProps: { className: string; colorHistory: any[]; defaultAlpha: number; defaultColor: string; enableAlpha: boolean; enableHistory: boolean; maxHistory: number; mode: string; onBlur: typeof noop; onChange: typeof noop; onFocus: typeof noop; onMount: typeof noop; prefixCls: string; style: {}; }; static getDerivedStateFromProps(nextProps: any, prevState: any): { color?: string; alpha?: number; }; constructor(props: any); componentDidMount(): void; onSystemColorPickerOpen: (e: any) => void; onFocus: () => void; onBlur: () => void; /** * 响应 alpha 的变更 * @param {Number} alpha Range 0~100 */ handleAlphaChange: (alpha: any) => void; /** * color change * @param {Object} color tinycolor instance */ handleChange: (color: any) => void; /** * 响应 History 的变更 * @param {Object} obj color and alpha */ handleHistoryClick: (obj: any) => void; render(): JSX.Element; } export default Panel;