import PropTypes from 'prop-types'; import React from 'react'; import { MarginProps } from 'styled-system'; import tinycolor from 'tinycolor2'; import { CactusEventTarget } from '../helpers/events'; import { Status } from '../helpers/status'; interface BaseProps extends MarginProps, Omit, 'color' | 'onChange' | 'onFocus' | 'onBlur'> { name?: string; id?: string; status?: Status | null; phrases?: Partial; disabled?: boolean; } interface ColorPickerProps extends BaseProps { format?: Format; value?: Color; onChange?: React.ChangeEventHandler>; onFocus?: React.FocusEventHandler>; onBlur?: React.FocusEventHandler>; } interface HSL { h: number; s: number; l: number; } interface HSV { h: number; s: number; v: number; } interface RGB { r: number; g: number; b: number; } declare type Format = 'hex' | 'rgb' | 'hsl' | 'hsv'; declare type Color = string | RGB | HSL | HSV; interface Phrases { colorLabel: string; hexLabel: string; redLabel: string; greenLabel: string; blueLabel: string; triggerLabel: string; applyLabel: string; cancelLabel: string; } interface ColorState { input: Color; color: tinycolor.Instance; } export declare class ColorPicker extends React.Component { static displayName: string; static propTypes: { name: PropTypes.Requireable; id: PropTypes.Requireable; format: PropTypes.Requireable; value: (props: { [key: string]: any; }, propName: string, componentName: string, location: string, propFullName: string) => Error | null; status: PropTypes.Requireable<"error" | "success" | "warning">; phrases: PropTypes.Requireable; hexLabel: PropTypes.Requireable; redLabel: PropTypes.Requireable; greenLabel: PropTypes.Requireable; blueLabel: PropTypes.Requireable; triggerLabel: PropTypes.Requireable; applyLabel: PropTypes.Requireable; cancelLabel: PropTypes.Requireable; }>>; onChange: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; disabled: PropTypes.Requireable; }; state: ColorState; private hasFocus; private eventTarget; private anchorRef; static getDerivedStateFromProps(props: Readonly, state: ColorState): Partial | null; private syncTarget; private contains; private handleFocus; private handleBlur; private setColor; render(): React.ReactElement; static toString(): string; } export default ColorPicker;