primevue
Version:
PrimeVue is a premium UI library for Vue featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, wh
155 lines (143 loc) • 4.59 kB
TypeScript
/**
*
* Button that invokes the browser's [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper)
* (Chromium-only) to sample a color from the screen and apply it to the parent `InputColor`. Renders a default
* pipette icon; override via slot to use a custom icon.
*
* @module inputcoloreyedropper
*
*/
import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import type { Component, VNode } from 'vue';
/**
* Custom passthrough(pt) option type, used to forward attributes via {@link InputColorEyeDropperPassThroughOptions}.
*/
export declare type InputColorEyeDropperPassThroughOptionType = InputColorEyeDropperPassThroughAttributes | ((options: InputColorEyeDropperPassThroughMethodOptions) => InputColorEyeDropperPassThroughAttributes | string) | string | null | undefined;
/**
* Custom passthrough(pt) option method.
*/
export interface InputColorEyeDropperPassThroughMethodOptions {
/**
* Defines instance.
*/
instance: any;
/**
* Defines valid properties.
*/
props: InputColorEyeDropperProps;
/**
* Defines valid attributes.
*/
attrs: any;
/**
* Defines parent options.
*/
parent: any;
/**
* Defines passthrough(pt) options in global config.
*/
global: object | undefined;
}
/**
* Custom passthrough(pt) options.
* @see {@link InputColorEyeDropperProps.pt}
*/
export interface InputColorEyeDropperPassThroughOptions {
/**
* Used to pass attributes to the root's DOM element.
*/
root?: InputColorEyeDropperPassThroughOptionType;
/**
* Used to manage all lifecycle hooks.
* @see {@link BaseComponent.ComponentHooks}
*/
hooks?: ComponentHooks;
}
/**
* Custom passthrough attributes for each DOM elements.
*/
export interface InputColorEyeDropperPassThroughAttributes {
[key: string]: any;
}
/**
* Defines valid properties in InputColorEyeDropper component.
*/
export interface InputColorEyeDropperProps {
/**
* Use to change the HTML tag of root element.
* @defaultValue Button
*/
as?: string | Component | undefined;
/**
* When enabled, it changes the default rendered element for the one passed as a child element.
* @defaultValue false
*/
asChild?: boolean | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
dt?: DesignToken<any>;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {InputColorEyeDropperPassThroughOptions}
*/
pt?: PassThrough<InputColorEyeDropperPassThroughOptions>;
/**
* Used to configure passthrough(pt) options of the component.
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
/**
* Defines valid slots in InputColorEyeDropper component.
*/
export interface InputColorEyeDropperSlots {
/**
* Default slot, place a custom icon to override the built-in pipette icon.
* @param {Object} scope - default slot's params.
*/
default(scope: {
/**
* Style class of the eye dropper root.
*/
class: string;
/**
* Attributes to spread on the consumer's root element.
*/
a11yAttrs: Record<string, unknown>;
}): VNode[];
}
/**
* Defines valid emits in InputColorEyeDropper component.
*/
export interface InputColorEyeDropperEmitsOptions {}
/**
* Type alias for emits resolved from {@link InputColorEyeDropperEmitsOptions}.
*/
export declare type InputColorEyeDropperEmits = EmitFn<InputColorEyeDropperEmitsOptions>;
/**
* **PrimeVue - InputColorEyeDropper**
*
* _Button that invokes the browser's EyeDropper API to sample a color from the screen._
*
* [Live Demo](https://www.primevue.dev/inputcolor/)
* --- ---
* 
*
* @group Component
*
*/
declare const InputColorEyeDropper: DefineComponent<InputColorEyeDropperProps, InputColorEyeDropperSlots, InputColorEyeDropperEmits>;
declare module 'vue' {
export interface GlobalComponents {
InputColorEyeDropper: DefineComponent<InputColorEyeDropperProps, InputColorEyeDropperSlots, InputColorEyeDropperEmits>;
}
}
export default InputColorEyeDropper;