import { AcceptedMode, ColorFormat, ColorSelected, Direction, InputColor, ModeInput, Positions, RGBA } from '../../../shared/types'; import { Ref } from 'vue'; import { PrimitiveProps } from 'radix-vue'; export type PickerUiRootProps = PrimitiveProps & { /** * The reading direction of Color Ui when applicable.
If omitted assumes LTR (left-to-right) reading mode. * @defaultValue "ltr" */ dir?: Direction; /** The accepted color mode * @defaultValue ["rgb", "hsl", "hex"] * */ acceptedMode?: AcceptedMode[]; /** Format modelValue * If alpha is `true`, the default value is `rgba` otherwise `rgb` * @defaultValue "rgba" | "rgb" */ colorFormat?: ColorFormat; /** When `true`, allows the user to set the alpha channel. * @defaultValue false */ allowedAlpha?: boolean; /** The default value of the color picker * @defaultValue { r: 255, g: 0, b: 0 } */ defaultValue?: ColorSelected; /** * Options * @defaultValue {historyLimit: 8, defaultHistory: [{ color: number[], alpha: number }]} */ options?: { historyLimit?: number; historyDefault?: { color: number[]; alpha: number; }[]; }; /** * The model value histories of the color picker. */ histories?: { color: number[]; alpha: number; }[]; /** * The model value of the color picker. * Check [useFormatColor](https://color-ui-vue.vercel.app/docs/utilities/use-format-color.html) for type declarations. */ modelValue?: ColorSelected; }; export type PickerUiRootEmits = { /** * Event handler called when the color selected change */ "update:modelValue": [payload: ColorSelected]; /** * Event handler called when the histories change */ "update:histories": [payload: { color: number[]; alpha: number; }[]]; /** * Event handler called when the color selected change is completed */ onChangeComplete: [payload: ColorSelected]; }; export type PickerUiRootProvider = { dir: Ref; containerId: string; acceptedMode: Ref; positionsMain: Ref; allowedAlpha: Ref; alpha: Ref; updateAlpha: () => void; positionAlpha: Ref; positionColor: Ref; color: Ref; updateColorSelected: () => void; updateColor: () => void; colorSelected: Ref; mode: Ref; inputs: Ref; updateInputs: (value: string | number, mode: ModeInput) => void; colorFormat: Ref; updateEyeDropper: (value: string) => void; setColor: (color: RGBA) => void; histories: Ref<{ color: number[]; alpha: number; }[]>; history: () => { remove: (props: { color: number[]; alpha: number; }) => void; create: (props: { color: number[]; alpha: number; }) => void; clear: () => void; init: () => void; }; onChangeComplete: () => void; }; declare const _default: __VLS_WithTemplateSlots; histories: import('vue').PropType<{ color: number[]; alpha: number; }[]>; defaultValue: { type: import('vue').PropType; default: () => { r: number; g: number; b: number; }; }; dir: { type: import('vue').PropType; default: string; }; asChild: { type: import('vue').PropType; }; as: { type: import('vue').PropType; default: string; }; allowedAlpha: { type: import('vue').PropType; default: boolean; }; colorFormat: { type: import('vue').PropType; default: string; }; acceptedMode: { type: import('vue').PropType; default: () => string[]; }; options: { type: import('vue').PropType<{ historyLimit?: number | undefined; historyDefault?: { color: number[]; alpha: number; }[] | undefined; }>; }; }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { "update:modelValue": (payload: ColorSelected) => void; onChangeComplete: (payload: ColorSelected) => void; "update:histories": (payload: { color: number[]; alpha: number; }[]) => void; }, string, import('vue').PublicProps, Readonly; histories: import('vue').PropType<{ color: number[]; alpha: number; }[]>; defaultValue: { type: import('vue').PropType; default: () => { r: number; g: number; b: number; }; }; dir: { type: import('vue').PropType; default: string; }; asChild: { type: import('vue').PropType; }; as: { type: import('vue').PropType; default: string; }; allowedAlpha: { type: import('vue').PropType; default: boolean; }; colorFormat: { type: import('vue').PropType; default: string; }; acceptedMode: { type: import('vue').PropType; default: () => string[]; }; options: { type: import('vue').PropType<{ historyLimit?: number | undefined; historyDefault?: { color: number[]; alpha: number; }[] | undefined; }>; }; }>> & { "onUpdate:modelValue"?: ((payload: ColorSelected) => any) | undefined; onOnChangeComplete?: ((payload: ColorSelected) => any) | undefined; "onUpdate:histories"?: ((payload: { color: number[]; alpha: number; }[]) => any) | undefined; }, { defaultValue: ColorSelected; dir: Direction; as: import('radix-vue').AsTag | import('vue').Component; allowedAlpha: boolean; colorFormat: ColorFormat; acceptedMode: AcceptedMode[]; }, {}>, { default?(_: {}): any; }>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };