/** @module @airtable/blocks/ui: ColorPalette */ /** */
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps } from './system';
import { TooltipAnchorProps } from './types/tooltip_anchor_props';
/**
 * Style props shared between the {@link ColorPalette} and {@link ColorPaletteSynced} components. Accepts:
 * * {@link FlexItemSetProps}
 * * {@link MarginProps}
 * * {@link MaxWidthProps}
 * * {@link MinWidthProps}
 * * {@link PositionSetProps}
 * * {@link WidthProps}
 *
 * @noInheritDoc
 */
export interface ColorPaletteStyleProps extends MaxWidthProps, MinWidthProps, WidthProps, FlexItemSetProps, PositionSetProps, MarginProps {
}
export declare const colorPaletteStylePropTypes: {
    [x: string]: PropTypes.Validator<any>;
};
/**
 * Props shared between the {@link ColorPalette} and {@link ColorPaletteSynced} components.
 */
export interface SharedColorPaletteProps extends ColorPaletteStyleProps, TooltipAnchorProps {
    /** The list of {@link Color|colors} to display in the color palette. */
    allowedColors: Array<string>;
    /** A function to be called when the selected color changes. */
    onChange?: (arg1: string) => unknown;
    /** The margin between color squares in the color palette. */
    squareMargin?: number;
    /** Additional class names to apply to the color palette, separated by spaces. */
    className?: string;
    /** Additional styles to apply to the color palette. */
    style?: React.CSSProperties;
    /** If set to `true`, the color palette will not allow color selection. */
    disabled?: boolean;
}
export declare const sharedColorPalettePropTypes: {
    onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
    onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
    onClick: PropTypes.Requireable<(...args: any[]) => any>;
    hasOnClick: PropTypes.Requireable<boolean>;
    allowedColors: PropTypes.Validator<(string | null | undefined)[]>;
    onChange: PropTypes.Requireable<(...args: any[]) => any>;
    squareMargin: PropTypes.Requireable<number>;
    className: PropTypes.Requireable<string>;
    style: PropTypes.Requireable<object>;
    disabled: PropTypes.Requireable<boolean>;
};
/**
 * Props for the {@link ColorPalette} component. Also accepts:
 * * {@link ColorPaletteStyleProps}
 *
 * @docsPath UI/components/ColorPalette
 */
interface ColorPaletteProps extends SharedColorPaletteProps {
    /** The current selected {@link Color} option. */
    color?: string | null;
}
/** @hidden */
interface ColorPaletteState {
    squareSize: number;
}
/**
 * A color selection component. Accepts a list of `allowedColors` to be displayed
 * as selectable color squares.
 *
 * [[ Story id="colorpalette--example" title="Color palette example" ]]
 *
 * @component
 * @docsPath UI/components/ColorPalette
 */
export declare class ColorPalette extends React.Component<ColorPaletteProps, ColorPaletteState> {
    /** @hidden */
    static propTypes: {
        onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
        onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
        onClick: PropTypes.Requireable<(...args: any[]) => any>;
        hasOnClick: PropTypes.Requireable<boolean>;
        allowedColors: PropTypes.Validator<(string | null | undefined)[]>;
        onChange: PropTypes.Requireable<(...args: any[]) => any>;
        squareMargin: PropTypes.Requireable<number>;
        className: PropTypes.Requireable<string>;
        style: PropTypes.Requireable<object>;
        disabled: PropTypes.Requireable<boolean>;
        color: PropTypes.Requireable<string>;
    };
    /** @hidden */
    static defaultProps: {
        squareMargin: number;
        className: string;
        style: {};
    };
    /** @internal */
    _detectElementResize: {
        addResizeListener: (element: HTMLElement, fn: () => void) => void;
        removeResizeListener: (element: HTMLElement, fn: () => void) => void;
    };
    /** @internal */
    _colorPaletteContainerRef: {
        current: HTMLElement | null;
    };
    /** @hidden */
    constructor(props: ColorPaletteProps);
    /** @hidden */
    componentDidMount(): void;
    /** @hidden */
    componentWillUnmount(): void;
    /** @hidden */
    componentDidUpdate(prevProps: ColorPaletteProps): void;
    /** @internal */
    _setColorSquareSize(): void;
    /** @internal */
    _onChange(color: string): void;
    /** @hidden */
    render(): JSX.Element;
}
declare const _default: React.RefForwardingComponent<ColorPalette, Omit<ColorPaletteProps, keyof ColorPaletteStyleProps> & ColorPaletteStyleProps & React.RefAttributes<ColorPalette>>;
export default _default;
