ColorPicker d.ts updated
parent
2ba8101e11
commit
e28c0d30f5
|
@ -1,9 +1,18 @@
|
|||
/**
|
||||
*
|
||||
* ColorPicker groups a collection of contents in tabs.
|
||||
*
|
||||
* [Live Demo](https://www.primevue.org/colorpicker/)
|
||||
*
|
||||
* @module colorpicker
|
||||
*
|
||||
*/
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
type ColorPickerFormatType = 'hex' | 'rgb' | 'hsb' | undefined;
|
||||
|
||||
type ColorPickerAppendToType = 'body' | 'self' | string | undefined | HTMLElement;
|
||||
|
||||
/**
|
||||
* Custom change event.
|
||||
* @see change
|
||||
*/
|
||||
export interface ColorPickerChangeEvent {
|
||||
/**
|
||||
* Browser event
|
||||
|
@ -15,6 +24,9 @@ export interface ColorPickerChangeEvent {
|
|||
value: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines valid properties in ColorPicker component.
|
||||
*/
|
||||
export interface ColorPickerProps {
|
||||
/**
|
||||
* Value of the component.
|
||||
|
@ -22,21 +34,22 @@ export interface ColorPickerProps {
|
|||
modelValue?: any;
|
||||
/**
|
||||
* Initial color to display when value is not defined.
|
||||
* Default value is ff0000.
|
||||
* @defaultValue ff0000
|
||||
*/
|
||||
defaultColor?: any;
|
||||
/**
|
||||
* Whether to display as an overlay or not.
|
||||
* @defaultValue false
|
||||
*/
|
||||
inline?: boolean | undefined;
|
||||
/**
|
||||
* Format to use in value binding, supported formats are 'hex', 'rgb' and 'hsb'.
|
||||
* @see ColorPickerFormatType
|
||||
* Default value is 'hex'.
|
||||
* @defaultValue 'hex'
|
||||
*/
|
||||
format?: ColorPickerFormatType;
|
||||
format?: 'hex' | 'rgb' | 'hsb' | undefined;
|
||||
/**
|
||||
* When present, it specifies that the component should be disabled.
|
||||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean | undefined;
|
||||
/**
|
||||
|
@ -45,12 +58,12 @@ export interface ColorPickerProps {
|
|||
tabindex?: string | undefined;
|
||||
/**
|
||||
* Whether to automatically manage layering.
|
||||
* Default value is true.
|
||||
* @defaultValue true
|
||||
*/
|
||||
autoZIndex?: boolean | undefined;
|
||||
/**
|
||||
* Base zIndex value to use in layering.
|
||||
* Default value is 0.
|
||||
* @defaultValue 0
|
||||
*/
|
||||
baseZIndex?: number | undefined;
|
||||
/**
|
||||
|
@ -59,35 +72,49 @@ export interface ColorPickerProps {
|
|||
panelClass?: any;
|
||||
/**
|
||||
* A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself.
|
||||
* @see ColorPickerAppendToType
|
||||
* Default value is 'body'.
|
||||
* @defaultValue 'body'
|
||||
*/
|
||||
appendTo?: ColorPickerAppendToType;
|
||||
appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
|
||||
}
|
||||
|
||||
export interface ColorPickerSlots {}
|
||||
|
||||
export declare type ColorPickerEmits = {
|
||||
/**
|
||||
* Defines valid emits in ColorPicker component.
|
||||
*/
|
||||
export interface ColorPickerEmits {
|
||||
/**
|
||||
* Emitted when the value changes.
|
||||
* @param {*} value - New value.
|
||||
*/
|
||||
'update:modelValue': (value: any) => void;
|
||||
'update:modelValue'(value: any): void;
|
||||
/**
|
||||
* Callback to invoke when a chip is added.
|
||||
* @param {ColorPickerChangeEvent} event - Custom add event.
|
||||
*/
|
||||
change: (event: ColorPickerChangeEvent) => void;
|
||||
change(event: ColorPickerChangeEvent): void;
|
||||
/**
|
||||
* Callback to invoke when input is cleared by the user.
|
||||
*/
|
||||
show: () => void;
|
||||
show(): void;
|
||||
/**
|
||||
* Callback to invoke when input is cleared by the user.
|
||||
*/
|
||||
hide: () => void;
|
||||
};
|
||||
hide(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* **PrimeVue - ColorPicker**
|
||||
*
|
||||
* _ColorPicker groups a collection of contents in tabs._
|
||||
*
|
||||
* [Live Demo](https://www.primevue.org/colorpicker/)
|
||||
* --- ---
|
||||
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
||||
*
|
||||
* @group Component
|
||||
*
|
||||
*/
|
||||
declare class ColorPicker extends ClassComponent<ColorPickerProps, ColorPickerSlots, ColorPickerEmits> {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
|
|
Loading…
Reference in New Issue