import { MappedOmit } from "@trackunit/shared-utils"; import { BaseInputProps } from "../BaseInput/BaseInput"; import { FormGroupProps } from "../FormGroup/FormGroup"; type FormGroupExposedProps = Pick; type ColorFieldBaseInputProps = MappedOmit; /** * Validates if the given value is a valid hex color. * * @param value - The string value to be validated. * @returns {boolean} True if the value is a valid hex color, otherwise false. */ export declare const isValidHEXColor: (value: string) => boolean; export interface ColorFieldProps extends FormGroupExposedProps, ColorFieldBaseInputProps { /** * If a value is set, the field is rendered in its invalid state. */ errorMessage?: string; } /** * The `` component is used to select and enter colors. * It provides both a color picker and a text input for hex color codes, * with validation ensuring valid hex format (#RRGGBB). * * ### When to use * - Color selection in theming or customization forms * - Brand color configuration * - Any input requiring a valid hex color value * * ### When not to use * - When you need a full color palette with named colors * - When opacity/alpha channel is required (only supports 6-digit hex) * * @example Basic usage * ```tsx * import { ColorField } from "@trackunit/react-form-components"; * * const [color, setColor] = useState("#3B82F6"); * * setColor(e.target.value)} * /> * ``` * @example With validation * ```tsx * import { ColorField } from "@trackunit/react-form-components"; * * * ``` */ export declare const ColorField: { ({ label, id, tip, helpText, errorMessage, helpAddon, className, defaultValue, "data-testid": dataTestId, value: propValue, onChange, isInvalid, onBlur, fieldSize, style, disabled, readOnly, isWarning, inputClassName, ref, required, ...inputProps }: ColorFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};