ColorPicker d.ts updated

pull/3689/head
Bahadır Sofuoğlu 2023-03-01 15:21:14 +03:00
parent 2ba8101e11
commit e28c0d30f5
1 changed files with 46 additions and 19 deletions

View File

@ -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'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type ColorPickerFormatType = 'hex' | 'rgb' | 'hsb' | undefined; /**
* Custom change event.
type ColorPickerAppendToType = 'body' | 'self' | string | undefined | HTMLElement; * @see change
*/
export interface ColorPickerChangeEvent { export interface ColorPickerChangeEvent {
/** /**
* Browser event * Browser event
@ -15,6 +24,9 @@ export interface ColorPickerChangeEvent {
value: any; value: any;
} }
/**
* Defines valid properties in ColorPicker component.
*/
export interface ColorPickerProps { export interface ColorPickerProps {
/** /**
* Value of the component. * Value of the component.
@ -22,21 +34,22 @@ export interface ColorPickerProps {
modelValue?: any; modelValue?: any;
/** /**
* Initial color to display when value is not defined. * Initial color to display when value is not defined.
* Default value is ff0000. * @defaultValue ff0000
*/ */
defaultColor?: any; defaultColor?: any;
/** /**
* Whether to display as an overlay or not. * Whether to display as an overlay or not.
* @defaultValue false
*/ */
inline?: boolean | undefined; inline?: boolean | undefined;
/** /**
* Format to use in value binding, supported formats are 'hex', 'rgb' and 'hsb'. * Format to use in value binding, supported formats are 'hex', 'rgb' and 'hsb'.
* @see ColorPickerFormatType * @defaultValue 'hex'
* Default value is 'hex'.
*/ */
format?: ColorPickerFormatType; format?: 'hex' | 'rgb' | 'hsb' | undefined;
/** /**
* When present, it specifies that the component should be disabled. * When present, it specifies that the component should be disabled.
* @defaultValue false
*/ */
disabled?: boolean | undefined; disabled?: boolean | undefined;
/** /**
@ -45,12 +58,12 @@ export interface ColorPickerProps {
tabindex?: string | undefined; tabindex?: string | undefined;
/** /**
* Whether to automatically manage layering. * Whether to automatically manage layering.
* Default value is true. * @defaultValue true
*/ */
autoZIndex?: boolean | undefined; autoZIndex?: boolean | undefined;
/** /**
* Base zIndex value to use in layering. * Base zIndex value to use in layering.
* Default value is 0. * @defaultValue 0
*/ */
baseZIndex?: number | undefined; baseZIndex?: number | undefined;
/** /**
@ -59,35 +72,49 @@ export interface ColorPickerProps {
panelClass?: any; 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. * 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 * @defaultValue 'body'
* Default value is 'body'.
*/ */
appendTo?: ColorPickerAppendToType; appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
} }
export interface ColorPickerSlots {} export interface ColorPickerSlots {}
export declare type ColorPickerEmits = { /**
* Defines valid emits in ColorPicker component.
*/
export interface ColorPickerEmits {
/** /**
* Emitted when the value changes. * Emitted when the value changes.
* @param {*} value - New value. * @param {*} value - New value.
*/ */
'update:modelValue': (value: any) => void; 'update:modelValue'(value: any): void;
/** /**
* Callback to invoke when a chip is added. * Callback to invoke when a chip is added.
* @param {ColorPickerChangeEvent} event - Custom add event. * @param {ColorPickerChangeEvent} event - Custom add event.
*/ */
change: (event: ColorPickerChangeEvent) => void; change(event: ColorPickerChangeEvent): void;
/** /**
* Callback to invoke when input is cleared by the user. * Callback to invoke when input is cleared by the user.
*/ */
show: () => void; show(): void;
/** /**
* Callback to invoke when input is cleared by the user. * 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 class ColorPicker extends ClassComponent<ColorPickerProps, ColorPickerSlots, ColorPickerEmits> {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {