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 * @group Component
* *
*/ */
export declare class Checkbox extends ClassComponent<CheckboxProps, CheckboxSlots, CheckboxEmits> {} declare class Checkbox extends ClassComponent<CheckboxProps, CheckboxSlots, CheckboxEmits> {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
interface GlobalComponents { 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; 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 { InputHTMLAttributes, VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom remove event.
* @see remove
*/
export interface ChipsAddEvent { export interface ChipsAddEvent {
/** /**
* Browser event. * Browser event.
@ -13,10 +26,15 @@ export interface ChipsAddEvent {
} }
/** /**
* Custom remove event.
* @see remove
* @extends ChipsAddEvent * @extends ChipsAddEvent
*/ */
export interface ChipsRemoveEvent extends ChipsAddEvent {} export interface ChipsRemoveEvent extends ChipsAddEvent {}
/**
* Defines valid properties in Chips component.
*/
export interface ChipsProps { export interface ChipsProps {
/** /**
* Value of the component. * Value of the component.
@ -77,38 +95,54 @@ export interface ChipsProps {
*/ */
'aria-label'?: string | undefined; 'aria-label'?: string | undefined;
} }
/**
* Defines valid slots in Chips slots.
*/
export interface ChipsSlots { export interface ChipsSlots {
/** /**
* Custom chip template. * Custom chip template.
* @param {Object} scope - chip slot's params. * @param {Object} scope - chip slot's params.
*/ */
chip: (scope: { chip(scope: {
/** /**
* Value of the component * Value of the component
*/ */
value: any; value: any;
}) => VNode[]; }): VNode[];
} }
/**
export declare type ChipsEmits = { * Defines valid emits in Chips component.
*/
export interface ChipsEmits {
/** /**
* 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 {ChipsAddEvent} event - Custom add event. * @param {ChipsAddEvent} event - Custom add event.
*/ */
add: (event: ChipsAddEvent) => void; add(event: ChipsAddEvent): void;
/** /**
* Callback to invoke when a chip is removed. * Callback to invoke when a chip is removed.
* @param {ChipsRemoveEvent} event - Custom remove event. * @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 class Chips extends ClassComponent<ChipsProps, ChipsSlots, ChipsEmits> {}
declare module '@vue/runtime-core' { 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; 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'; 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' {
@ -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; 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 { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers'; import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
/**
* Custom text change event.
* @see text-change
*/
export interface EditorTextChangeEvent { export interface EditorTextChangeEvent {
/** /**
* Current value as html. * Current value as html.
@ -23,7 +36,10 @@ export interface EditorTextChangeEvent {
*/ */
instance: any; instance: any;
} }
/**
* Custom selection change event.
* @see selection-change
*/
export interface EditorSelectionChangeEvent { export interface EditorSelectionChangeEvent {
/** /**
* Current value as html. * Current value as html.
@ -50,7 +66,10 @@ export interface EditorSelectionChangeEvent {
*/ */
instance: any; instance: any;
} }
/**
* Custom load event.
* @see load
*/
export interface EditorLoadEvent { export interface EditorLoadEvent {
/** /**
* Text editor instance. * Text editor instance.
@ -58,6 +77,9 @@ export interface EditorLoadEvent {
instance: any; instance: any;
} }
/**
* Defines valid properties in Editor component.
*/
export interface EditorProps { export interface EditorProps {
/** /**
* Value of the content. * Value of the content.
@ -85,6 +107,9 @@ export interface EditorProps {
modules?: any; modules?: any;
} }
/**
* Defines valid slots in Editor slots.
*/
export interface EditorSlots { export interface EditorSlots {
/** /**
* Custom toolbar template. * Custom toolbar template.
@ -92,29 +117,44 @@ export interface EditorSlots {
toolbar: () => VNode[]; toolbar: () => VNode[];
} }
export declare type EditorEmits = { /**
* Defines valid emits in Editor component.
*/
export interface EditorEmits {
/** /**
* Emitted when the value changes. * Emitted when the value changes.
* @param {string} value - New value. * @param {string} value - New value.
*/ */
'update:modelValue': (value: string) => void; 'update:modelValue'(value: string): void;
/** /**
* Callback to invoke when text of editor changes. * Callback to invoke when text of editor changes.
* @param {EditorTextChangeEvent} event - Custom text change event. * @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. * Callback to invoke when selection of the text changes.
* @param {EditorSelectionChangeEvent} event - Custom selection change event. * @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. * Callback to invoke when the quill modules are loaded.
* @param {EditorLoadEvent} event - Custom load event. * @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 class Editor extends ClassComponent<EditorProps, EditorSlots, EditorEmits> {}
declare module '@vue/runtime-core' { 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; export default Editor;