import type { ControlSize } from "@charcuterie/tokens"; import type { ReactNode } from "react"; export type ColorPickerCustomPanelProps = { /** The color the panel opens on — the current custom value, or a seed. */ initialColor: string; isDisabled: boolean; label: string; onApply: (hex: string) => void; onCancel: () => void; getColorError?: (hex: string) => null | string; size: ControlSize; }; /** * The custom-color surface `ColorPicker` reveals under its trigger. * * ### The native color input is allowed here, and only here * * Every other picker in this library is ours because the OS paints the * native one and no token reaches inside it. A custom color is the one * case where the OS dialog is the right tool: it has the wheel, the * eyedropper and the sliders, none of which a person wants rebuilt. * So the native `` is the custom MODE, inside a * panel this component owns — never the whole picker, which is the * shape the presets replace. * * ### Nothing is applied until the person says so * * The native input fires on every movement of the wheel. Applying each * one would write dozens of colors to an app's server while a person * drags, and a refused color would flash an error mid-drag. The panel * holds a draft; **Use color** applies it, Enter in the hex field does * the same, and Escape or **Cancel** drops it. */ export declare const ColorPickerCustomPanel: ({ getColorError, initialColor, isDisabled, label, onApply, onCancel, size, }: ColorPickerCustomPanelProps) => ReactNode; //# sourceMappingURL=ColorPickerCustomPanel.d.ts.map