pull/3689/head
mertsincan 2023-03-01 12:27:43 +00:00
commit d6331bf076
4 changed files with 138 additions and 73 deletions

View File

@ -126,7 +126,7 @@ export interface CheckboxEmits {
* @group Component
*
*/
export declare class Checkbox extends ClassComponent<CheckboxProps, CheckboxSlots, CheckboxEmits> {}
declare class Checkbox extends ClassComponent<CheckboxProps, CheckboxSlots, CheckboxEmits> {}
declare module '@vue/runtime-core' {
interface GlobalComponents {
@ -134,13 +134,4 @@ declare module '@vue/runtime-core' {
}
}
/**
*
* Checkbox is an extension to standard checkbox element with theming.
*
* Demos:
*
* - [Checkbox](https://www.primefaces.org/primevue/checkbox)
*
*/
export default Checkbox;

View File

@ -1,6 +1,19 @@
/**
*
* Chips groups a collection of contents in tabs.
*
* [Live Demo](https://www.primevue.org/chips/)
*
* @module chips
*
*/
import { InputHTMLAttributes, VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom remove event.
* @see remove
*/
export interface ChipsAddEvent {
/**
* Browser event.
@ -13,10 +26,15 @@ export interface ChipsAddEvent {
}
/**
* Custom remove event.
* @see remove
* @extends ChipsAddEvent
*/
export interface ChipsRemoveEvent extends ChipsAddEvent {}
/**
* Defines valid properties in Chips component.
*/
export interface ChipsProps {
/**
* Value of the component.
@ -77,38 +95,54 @@ export interface ChipsProps {
*/
'aria-label'?: string | undefined;
}
/**
* Defines valid slots in Chips slots.
*/
export interface ChipsSlots {
/**
* Custom chip template.
* @param {Object} scope - chip slot's params.
*/
chip: (scope: {
chip(scope: {
/**
* Value of the component
*/
value: any;
}) => VNode[];
}): VNode[];
}
export declare type ChipsEmits = {
/**
* Defines valid emits in Chips component.
*/
export interface ChipsEmits {
/**
* 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 {ChipsAddEvent} event - Custom add event.
*/
add: (event: ChipsAddEvent) => void;
add(event: ChipsAddEvent): void;
/**
* Callback to invoke when a chip is removed.
* @param {ChipsRemoveEvent} event - Custom remove event.
*/
remove: (event: ChipsRemoveEvent) => void;
};
remove(event: ChipsRemoveEvent): void;
}
/**
* **PrimeVue - Chips**
*
* _Chips is used to enter multiple values on an input field._
*
* [Live Demo](https://www.primevue.org/chips/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
declare class Chips extends ClassComponent<ChipsProps, ChipsSlots, ChipsEmits> {}
declare module '@vue/runtime-core' {
@ -117,13 +151,4 @@ declare module '@vue/runtime-core' {
}
}
/**
*
* Chips is used to enter multiple values on an input field.
*
* Demos:
*
* - [Chips](https://www.primefaces.org/primevue/chips)
*
*/
export default Chips;

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';
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' {
@ -96,13 +123,4 @@ declare module '@vue/runtime-core' {
}
}
/**
*
* ColorPicker is an input component to select a color.
*
* Demos:
*
* - [ColorPicker](https://www.primefaces.org/primevue/colorpicker)
*
*/
export default ColorPicker;

View File

@ -1,6 +1,19 @@
/**
*
* Editor groups a collection of contents in tabs.
*
* [Live Demo](https://www.primevue.org/editor/)
*
* @module editor
*
*/
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom text change event.
* @see text-change
*/
export interface EditorTextChangeEvent {
/**
* Current value as html.
@ -23,7 +36,10 @@ export interface EditorTextChangeEvent {
*/
instance: any;
}
/**
* Custom selection change event.
* @see selection-change
*/
export interface EditorSelectionChangeEvent {
/**
* Current value as html.
@ -50,7 +66,10 @@ export interface EditorSelectionChangeEvent {
*/
instance: any;
}
/**
* Custom load event.
* @see load
*/
export interface EditorLoadEvent {
/**
* Text editor instance.
@ -58,6 +77,9 @@ export interface EditorLoadEvent {
instance: any;
}
/**
* Defines valid properties in Editor component.
*/
export interface EditorProps {
/**
* Value of the content.
@ -85,6 +107,9 @@ export interface EditorProps {
modules?: any;
}
/**
* Defines valid slots in Editor slots.
*/
export interface EditorSlots {
/**
* Custom toolbar template.
@ -92,29 +117,44 @@ export interface EditorSlots {
toolbar: () => VNode[];
}
export declare type EditorEmits = {
/**
* Defines valid emits in Editor component.
*/
export interface EditorEmits {
/**
* Emitted when the value changes.
* @param {string} value - New value.
*/
'update:modelValue': (value: string) => void;
'update:modelValue'(value: string): void;
/**
* Callback to invoke when text of editor changes.
* @param {EditorTextChangeEvent} event - Custom text change event.
*/
'text-change': (event: EditorTextChangeEvent) => void;
'text-change'(event: EditorTextChangeEvent): void;
/**
* Callback to invoke when selection of the text changes.
* @param {EditorSelectionChangeEvent} event - Custom selection change event.
*/
'selection-change': (event: EditorSelectionChangeEvent) => void;
'selection-change'(event: EditorSelectionChangeEvent): void;
/**
* Callback to invoke when the quill modules are loaded.
* @param {EditorLoadEvent} event - Custom load event.
*/
load: (event: EditorLoadEvent) => void;
};
load(event: EditorLoadEvent): void;
}
/**
* **PrimeVue - Editor**
*
* _Editor groups a collection of contents in tabs._
*
* [Live Demo](https://www.primevue.org/editor/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
declare class Editor extends ClassComponent<EditorProps, EditorSlots, EditorEmits> {}
declare module '@vue/runtime-core' {
@ -123,13 +163,4 @@ declare module '@vue/runtime-core' {
}
}
/**
*
* Editor is rich text editor component based on Quill.
*
* Demos:
*
* - [Editor](https://www.primefaces.org/primevue/editor)
*
*/
export default Editor;