/// import React from 'react'; import { FormControlProps } from 'amis-core'; import type { PresetColor } from 'amis-ui'; import { FormBaseControlSchema } from '../../Schema'; export declare const ColorPicker: React.LazyExoticComponent<{ new (props: Omit, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }, keyof import("amis-core").ThemeProps> & import("amis-core/lib/theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType<{ new (props: Pick, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof import("amis-ui/lib/components/ColorPicker").ColorControl; }>; } & import("hoist-non-react-statics").NonReactStatics<{ new (props: Pick, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1_1> | null) | Pick<{}, K_1_1> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof import("amis-ui/lib/components/ColorPicker").ColorControl; }, {}> & { ComposedComponent: { new (props: Pick, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }): { ref: any; childRef(ref: any): void; getWrappedInstance(): any; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>) => {} | Pick<{}, K_1_2> | null) | Pick<{}, K_1_2> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, "placement" | "className" | "disabled" | "classPrefix" | "classnames" | "theme" | "useMobileUI" | "popOverContainer" | "onChange" | "value" | "resetValue" | "popoverClassName" | "presetColors"> & Partial, "placeholder" | "clearable" | "format" | "allowCustomColor">> & Partial> & { locale?: string | undefined; translate?: ((str: string, ...args: any[]) => string) | undefined; }>, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; contextType: React.Context; ComposedComponent: React.ComponentType; } & import("hoist-non-react-statics").NonReactStatics & { ComposedComponent: typeof import("amis-ui/lib/components/ColorPicker").ColorControl; }; }>; /** * Color 颜色选择框 * 文档:https://baidu.gitee.io/amis/docs/components/form/color */ export interface InputColorControlSchema extends FormBaseControlSchema { /** * 指定为颜色选择框 */ type: 'input-color'; /** * 是否显示清除按钮 */ clearable?: boolean; /** * 颜色格式 */ format?: 'hex' | 'rgb' | 'rgba' | 'hsl'; /** * 选中颜色后是否关闭弹出层。 */ closeOnSelect?: boolean; /** * 预设颜色,用户可以直接从预设中选。 */ presetColors?: Array; /** * 是否允许用户输入颜色。 */ allowCustomColor?: boolean; } export interface ColorProps extends FormControlProps, Omit { } export interface ColorControlState { open: boolean; } export default class ColorControl extends React.PureComponent { static defaultProps: Partial; state: ColorControlState; render(): JSX.Element; } export declare class ColorControlRenderer extends ColorControl { }