import { Ref } from 'react'; import { ColorEditorValue, ColorInput, ColorValue, GradientInput } from '../shared/color.js'; /** Size token for the inner controls (scrubbers, hex input, gradient buttons). */ export type ColorEditorControlSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl'; /** Which channel scrubbers the inputs row shows. Does not affect the emitted value. */ export type ColorEditorFormat = 'rgb' | 'hsl' | 'hsb'; interface ColorEditorBaseProps { /** Size of the inner controls — scrubbers, hex input, gradient buttons. Default `'md'`. * * The Solid/Gradient toolbar is rendered one step smaller. */ controlSize?: ColorEditorControlSize; /** Render the surface outline on the inner controls — channel/alpha scrubbers, hex input, and the Solid/Gradient toolbar. * * The gradient bar's flip/angle controls stay ghost regardless. Default `true`. */ controlOutline?: boolean; /** Show the alpha slider and the alpha scrubber. Default `true`. */ alpha?: boolean; /** Show the channel-scrubber row. Default `true`. */ inputs?: boolean; /** Which channels the scrubber row shows. Default `'rgb'`. */ format?: ColorEditorFormat; /** Show the hex input. Default `true`. */ hexInput?: boolean; /** Angle control in gradient mode: a 45°-step button, or a degree scrubber. Default `'scrubber'`. */ angleControl?: 'button' | 'scrubber'; /** Preset colors rendered as a row of thumbs. Clicking one applies it to the color (or the selected gradient stop). * * Solid colors only. */ swatches?: ColorInput[]; /** Dim the panel and block interaction. */ disabled?: boolean; /** Block interaction without the dimmed treatment. */ readOnly?: boolean; /** Debounce `onChange` calls in ms. Fires once after changes stop for N ms. Defaults to `0` (immediate). */ debounce?: number; /** Throttle `onChange` calls in ms. Fires immediately, then at most once per N ms while changing, with a trailing call for the final value. Defaults to `0` (immediate). * * Takes precedence over `debounce`. */ throttle?: number; /** Content rendered above the panel, before the controls. * * Stays interactive when `disabled` (only the panel below dims). * * For inherit toggles, titles, eyedroppers, etc. * */ header?: React.ReactNode; /** Content rendered below the panel, after the swatches. Stays interactive when `disabled`. */ footer?: React.ReactNode; /** Extra classes for the panel root. The panel is full-width — size it via its container. */ className?: string; /** Extra classes for the saturation/brightness area (e.g. to set its height). */ areaClassName?: string; /** Forwarded to the panel root element. */ ref?: Ref; } type SolidColorEditorProps = ColorEditorBaseProps & { /** Enable the Solid/Gradient switch and gradient editing. Default `false`. */ gradient?: false; /** Controlled value. A CSS color string or any one channel set. */ value?: ColorInput; /** Initial value (uncontrolled). */ defaultValue?: ColorInput; /** Fires on every change with the full color. */ onChange?: (value: ColorValue) => void; }; type GradientColorEditorProps = ColorEditorBaseProps & { gradient: true; /** Controlled value. A CSS color/gradient string, a channel set, or a gradient object. */ value?: ColorInput | GradientInput; /** Initial value (uncontrolled). */ defaultValue?: ColorInput | GradientInput; /** Fires on every change with a discriminated `solid` / `linear` value. */ onChange?: (value: ColorEditorValue) => void; }; export type ColorEditorProps = SolidColorEditorProps | GradientColorEditorProps; /** Shape of `ColorEditor` defaults that can be supplied via `CladdProvider`'s `defaults` prop. */ export type ColorEditorDefaultProps = Partial>; export declare const ColorEditor: (props: ColorEditorProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=ColorEditor.d.ts.map