Update d.ts files

pull/6632/head
Mert Sincan 2024-10-21 12:50:34 +01:00
parent 243eaf3a05
commit ca12435e7c
21 changed files with 378 additions and 47 deletions

View File

@ -2,29 +2,47 @@
*
* [Live Demo](https://primevue.org/)
*
* @module basecomponent
* @module baseeditableholder
*
*/
export interface ComponentHooks {
onBeforeCreate?(): void;
onCreated?(): void;
onBeforeMount?(): void;
onMounted?(): void;
onBeforeUpdate?(): void;
onUpdated?(): void;
onBeforeUnmount?(): void;
onUnmounted?(): void;
export interface BaseEditableHolderProps {
/**
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* Disables the element, making it non-interactive and unclickable.
* @defaultValue false
*/
disabled?: boolean | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
}
export interface BaseComponentPassThroughOptions {
hooks?: ComponentHooks;
}
/**
* @todo Update all d.ts with it.
*/
export interface BaseComponentPassThroughMethodOptions<I = any, P = any, S = any> {
instance?: I | undefined | null;
props?: P | undefined | null;
state?: S | undefined | null;
export interface BaseEditableHolderEmitsOptions {
/**
* Emitted when the value changes in controlled mode.
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
}

View File

@ -2,29 +2,25 @@
*
* [Live Demo](https://primevue.org/)
*
* @module basecomponent
* @module baseinput
*
*/
export interface ComponentHooks {
onBeforeCreate?(): void;
onCreated?(): void;
onBeforeMount?(): void;
onMounted?(): void;
onBeforeUpdate?(): void;
onUpdated?(): void;
onBeforeUnmount?(): void;
onUnmounted?(): void;
import { BaseEditableHolderEmitsOptions, BaseEditableHolderProps } from '@primevue/core/baseeditableholder';
export interface BaseInputProps extends BaseEditableHolderProps {
/**
* Defines the size of the component.
*/
size?: 'small' | 'large' | undefined;
/**
* Spans 100% width of the container when enabled.
*/
fluid?: boolean | undefined;
/**
* Specifies the input variant of the component.
* @defaultValue outlined
*/
variant?: 'outlined' | 'filled' | undefined;
}
export interface BaseComponentPassThroughOptions {
hooks?: ComponentHooks;
}
/**
* @todo Update all d.ts with it.
*/
export interface BaseComponentPassThroughMethodOptions<I = any, P = any, S = any> {
instance?: I | undefined | null;
props?: P | undefined | null;
state?: S | undefined | null;
}
export interface BaseInputEmitsOptions extends BaseEditableHolderEmitsOptions {}

View File

@ -305,6 +305,14 @@ export interface AutoCompleteProps {
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of suggestions to display.
*/
@ -518,6 +526,10 @@ export interface AutoCompleteProps {
* Identifier of the underlying input element.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -748,6 +760,11 @@ export interface AutoCompleteEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {AutoCompleteChangeEvent} event - Custom change event.

View File

@ -263,6 +263,14 @@ export interface CascadeSelectProps {
* Value of the component.
*/
modelValue?: any | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any | undefined;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of selectitems to display as the available options.
*/
@ -441,6 +449,10 @@ export interface CascadeSelectProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -548,6 +560,11 @@ export interface CascadeSelectEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param { CascadeSelectChangeEvent } event - Custom change event.

View File

@ -102,6 +102,10 @@ export interface CheckboxProps {
* Value binding of the checkbox.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* Name of the input element.
*/
@ -175,6 +179,10 @@ export interface CheckboxProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -250,6 +258,11 @@ export interface CheckboxEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {Event} event - Browser event.

View File

@ -517,6 +517,14 @@ export interface DatePickerProps {
* @defaultValue null
*/
modelValue?: Date | Array<Date> | Array<Date | null> | undefined | null;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: Date | Array<Date> | Array<Date | null> | undefined | null;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Defines the quantity of the selection.
* @defaultValue single
@ -719,10 +727,6 @@ export interface DatePickerProps {
* Placeholder text for the input.
*/
placeholder?: string | undefined;
/**
* Name of the element.
*/
name?: string | undefined;
/**
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
* @defaultValue body
@ -789,6 +793,10 @@ export interface DatePickerProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -965,6 +973,11 @@ export interface DatePickerEmitsOptions {
* @param {string | Date | string[] | Date[] | undefined} value - New value.
*/
'update:modelValue'(value: Date | Array<Date> | Array<Date | null> | undefined | null): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {string | Date | string[] | Date[] | undefined} value - New value.
*/
'value-change'(value: Date | Array<Date> | Array<Date | null> | undefined | null): void;
/**
* Callback to invoke when input field is being typed.
* @param {Event} event - Browser event

View File

@ -193,6 +193,14 @@ export interface InputNumberProps {
* Value of the component.
*/
modelValue?: Nullable<number>;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: Nullable<number>;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Whether to format the value.
* @defaultValue true
@ -359,6 +367,10 @@ export interface InputNumberProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -431,6 +443,11 @@ export interface InputNumberEmitsOptions {
* @param {number} value - New value.
*/
'update:modelValue'(value: number): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {number} value - New value.
*/
'value-change'(value: number): void;
/**
* Callback to invoke when the value is entered.
* @param {InputNumberInputEvent} event - Custom input event.

View File

@ -143,6 +143,14 @@ export interface InputOtpProps {
* @defaultValue null
*/
modelValue?: boolean | string | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: boolean | string | undefined;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
@ -182,6 +190,10 @@ export interface InputOtpProps {
* @defaultValue false
*/
integerOnly?: boolean | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -239,6 +251,11 @@ export interface InputOtpEmitsOptions {
* @param {boolean} value - New value.
*/
'update:modelValue'(value: boolean): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {boolean} value - New value.
*/
'value-change'(value: boolean): void;
/**
* Callback to invoke on value change.
* @param {Event} event - Browser event.

View File

@ -87,6 +87,14 @@ export interface InputTextProps extends InputHTMLAttributes {
* Value of the component.
*/
modelValue?: Nullable<string>;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: Nullable<string>;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Defines the size of the component.
*/
@ -106,6 +114,10 @@ export interface InputTextProps extends InputHTMLAttributes {
* @defaultValue null
*/
fluid?: boolean | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -141,6 +153,11 @@ export interface InputTextEmitsOptions {
* @param {string} value - New value.
*/
'update:modelValue'(value: string | undefined): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {string} value - New value.
*/
'value-change'(value: string | undefined): void;
}
export declare type InputTextEmits = EmitFn<InputTextEmitsOptions>;

View File

@ -259,6 +259,14 @@ export interface ListboxProps {
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of selectitems to display as the available options.
*/
@ -415,6 +423,10 @@ export interface ListboxProps {
* Identifier of the underlying input element.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -564,6 +576,11 @@ export interface ListboxEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {ListboxChangeEvent} event - Custom change event.

View File

@ -316,6 +316,14 @@ export interface MultiSelectProps {
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of select items to display as the available options.
*/
@ -546,6 +554,10 @@ export interface MultiSelectProps {
* Identifier of the underlying input element.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -808,6 +820,11 @@ export interface MultiSelectEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {MultiSelectChangeEvent} event - Custom change event.

View File

@ -174,6 +174,14 @@ export interface PasswordProps extends InputHTMLAttributes {
* Value of the component.
*/
modelValue?: Nullable<string>;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: Nullable<string>;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Text to prompt password entry. Defaults to PrimeVue Locale configuration.
*/
@ -313,6 +321,10 @@ export interface PasswordProps extends InputHTMLAttributes {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -403,6 +415,11 @@ export interface PasswordEmitsOptions {
* @param {string} value - New value.
*/
'update:modelValue'(value: string): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {string} value - New value.
*/
'value-change'(value: string): void;
/**
* Callback to invoke on value change.
* @param {Event} event - Browser event.

View File

@ -101,6 +101,10 @@ export interface RadioButtonProps {
* Value binding of the checkbox.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* Name of the input element.
*/
@ -154,6 +158,10 @@ export interface RadioButtonProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -202,6 +210,11 @@ export interface RadioButtonEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on radio button value change.
* @param {Event} event - Browser event.

View File

@ -144,10 +144,19 @@ export interface RatingProps {
* Value of the rating.
*/
modelValue?: number | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: number | undefined;
/**
* Name of the element.
*/
name?: string | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* When present, it specifies that the element should be disabled.
* @defaultValue false
@ -171,6 +180,10 @@ export interface RatingProps {
* Icon for the off state.
*/
offIcon?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -235,6 +248,11 @@ export interface RatingEmitsOptions {
* @param {number} value - New value.
*/
'update:modelValue'(value: number): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {number} value - New value.
*/
'value-change'(value: number): void;
/**
* Callback to invoke when a suggestion is selected.
* @param {RatingChangeEvent} event - Custom change event.

View File

@ -291,6 +291,14 @@ export interface SelectProps {
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of select items to display as the available options.
*/
@ -532,6 +540,10 @@ export interface SelectProps {
* Identifier of the underlying input element.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -726,6 +738,11 @@ export interface SelectEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {SelectChangeEvent} event - Custom change event.

View File

@ -129,6 +129,14 @@ export interface SelectButtonProps {
* Value of the component.
*/
modelValue?: any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of selectitems to display as the available options.
*/
@ -173,6 +181,10 @@ export interface SelectButtonProps {
* Identifier of the underlying element.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -223,6 +235,11 @@ export interface SelectButtonEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Callback to invoke on value change.
* @param {SelectButtonChangeEvent} event - Custom change event.

View File

@ -101,6 +101,14 @@ export interface SliderProps {
* Value of the component.
*/
modelValue?: number | number[] | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: number | number[] | undefined;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Mininum boundary value.
* @defaultValue 0
@ -126,6 +134,11 @@ export interface SliderProps {
* @defaultValue false
*/
range?: boolean | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* When present, it specifies that the component should be disabled.
* @defaultValue false
@ -143,6 +156,10 @@ export interface SliderProps {
* Used to define a string that labels the element.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -178,6 +195,11 @@ export interface SliderEmitsOptions {
* @param {number | number[]} value - New value.
*/
'update:modelValue'(value: number | number[]): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {number | number[]} value - New value.
*/
'value-change'(value: number | number[]): void;
/**
* Callback to invoke on value change.
* @param {number} value - New value

View File

@ -92,6 +92,14 @@ export interface TextareaProps extends TextareaHTMLAttributes {
* Value of the component.
*/
modelValue?: Nullable<string>;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: Nullable<string>;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* When present, height of textarea changes as being typed.
* @defaultValue false
@ -112,6 +120,10 @@ export interface TextareaProps extends TextareaHTMLAttributes {
* @defaultValue null
*/
fluid?: boolean | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -147,6 +159,11 @@ export interface TextareaEmitsOptions {
* @param {string} value - New value.
*/
'update:modelValue': (value: string) => void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {string} value - New value.
*/
'value-change'(value: string): void;
}
export declare type TextareaEmits = EmitFn<TextareaEmitsOptions>;

View File

@ -104,6 +104,14 @@ export interface ToggleButtonProps {
* @defaultValue false
*/
modelValue?: boolean | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: boolean | undefined;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Icon for the on state.
*/
@ -150,6 +158,10 @@ export interface ToggleButtonProps {
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
*/
ariaLabelledby?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -204,6 +216,11 @@ export interface ToggleButtonEmitsOptions {
* @param {boolean} value - New value.
*/
'update:modelValue'(value: boolean): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {boolean} value - New value.
*/
'value-change'(value: boolean): void;
/**
* Callback to invoke on value change.
* @param {Event} event - Browser event.

View File

@ -88,6 +88,14 @@ export interface ToggleSwitchProps {
* @defaultValue false
*/
modelValue?: boolean | string | undefined;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: boolean | string | undefined;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* Value in checked state.
* @defaultValue true
@ -137,6 +145,10 @@ export interface ToggleSwitchProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -196,6 +208,11 @@ export interface ToggleSwitchEmitsOptions {
* @param {boolean} value - New value.
*/
'update:modelValue'(value: boolean): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {boolean} value - New value.
*/
'value-change'(value: boolean): void;
/**
* Callback to invoke on value change.
* @param {Event} event - Browser event.

View File

@ -173,6 +173,14 @@ export interface TreeSelectProps {
* Value of the component.
*/
modelValue?: TreeNode | any;
/**
* The default value for the input when not controlled by `modelValue`.
*/
defaultValue?: TreeNode | any;
/**
* The name attribute for the element, typically used in form submissions.
*/
name?: string | undefined;
/**
* An array of treenodes.
*/
@ -304,6 +312,10 @@ export interface TreeSelectProps {
* Establishes a string value that labels the component.
*/
ariaLabel?: string | undefined;
/**
* Form control object, typically used for handling validation and form state.
*/
formControl?: Record<string, any> | undefined;
/**
* It generates scoped CSS variables using design tokens for the component.
*/
@ -468,6 +480,11 @@ export interface TreeSelectEmitsOptions {
* @param {*} value - New value.
*/
'update:modelValue'(value: any): void;
/**
* Emitted when the value changes in uncontrolled mode.
* @param {*} value - New value.
*/
'value-change'(value: any): void;
/**
* Emitted when the expanded keys change.
* @param {TreeNode} value - New expanded keys.