From ca12435e7c9c2a44046fe8e9b6d21cff53cd2a86 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Mon, 21 Oct 2024 12:50:34 +0100 Subject: [PATCH] Update d.ts files --- .../BaseEditableHolder.d.ts | 60 ++++++++++++------- packages/core/src/baseinput/BaseInput.d.ts | 40 ++++++------- .../src/autocomplete/AutoComplete.d.ts | 17 ++++++ .../src/cascadeselect/CascadeSelect.d.ts | 17 ++++++ packages/primevue/src/checkbox/Checkbox.d.ts | 13 ++++ .../primevue/src/datepicker/DatePicker.d.ts | 21 +++++-- .../primevue/src/inputnumber/InputNumber.d.ts | 17 ++++++ packages/primevue/src/inputotp/InputOtp.d.ts | 17 ++++++ .../primevue/src/inputtext/InputText.d.ts | 17 ++++++ packages/primevue/src/listbox/Listbox.d.ts | 17 ++++++ .../primevue/src/multiselect/MultiSelect.d.ts | 17 ++++++ packages/primevue/src/password/Password.d.ts | 17 ++++++ .../primevue/src/radiobutton/RadioButton.d.ts | 13 ++++ packages/primevue/src/rating/Rating.d.ts | 18 ++++++ packages/primevue/src/select/Select.d.ts | 17 ++++++ .../src/selectbutton/SelectButton.d.ts | 17 ++++++ packages/primevue/src/slider/Slider.d.ts | 22 +++++++ packages/primevue/src/textarea/Textarea.d.ts | 17 ++++++ .../src/togglebutton/ToggleButton.d.ts | 17 ++++++ .../src/toggleswitch/ToggleSwitch.d.ts | 17 ++++++ .../primevue/src/treeselect/TreeSelect.d.ts | 17 ++++++ 21 files changed, 378 insertions(+), 47 deletions(-) diff --git a/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts b/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts index 2a42d0d4b..7c9ec1848 100644 --- a/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts +++ b/packages/core/src/baseeditableholder/BaseEditableHolder.d.ts @@ -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 | undefined; } -export interface BaseComponentPassThroughOptions { - hooks?: ComponentHooks; -} - -/** - * @todo Update all d.ts with it. - */ -export interface BaseComponentPassThroughMethodOptions { - 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; } diff --git a/packages/core/src/baseinput/BaseInput.d.ts b/packages/core/src/baseinput/BaseInput.d.ts index 2a42d0d4b..7462d86c3 100644 --- a/packages/core/src/baseinput/BaseInput.d.ts +++ b/packages/core/src/baseinput/BaseInput.d.ts @@ -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 { - instance?: I | undefined | null; - props?: P | undefined | null; - state?: S | undefined | null; -} +export interface BaseInputEmitsOptions extends BaseEditableHolderEmitsOptions {} diff --git a/packages/primevue/src/autocomplete/AutoComplete.d.ts b/packages/primevue/src/autocomplete/AutoComplete.d.ts index 55e2c68d3..69f41a576 100755 --- a/packages/primevue/src/autocomplete/AutoComplete.d.ts +++ b/packages/primevue/src/autocomplete/AutoComplete.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/cascadeselect/CascadeSelect.d.ts b/packages/primevue/src/cascadeselect/CascadeSelect.d.ts index 4c068ffa5..9ead6ddcb 100644 --- a/packages/primevue/src/cascadeselect/CascadeSelect.d.ts +++ b/packages/primevue/src/cascadeselect/CascadeSelect.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/checkbox/Checkbox.d.ts b/packages/primevue/src/checkbox/Checkbox.d.ts index 34a4d3ceb..598624eb4 100755 --- a/packages/primevue/src/checkbox/Checkbox.d.ts +++ b/packages/primevue/src/checkbox/Checkbox.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/datepicker/DatePicker.d.ts b/packages/primevue/src/datepicker/DatePicker.d.ts index 3910e5bf2..2bee6a578 100755 --- a/packages/primevue/src/datepicker/DatePicker.d.ts +++ b/packages/primevue/src/datepicker/DatePicker.d.ts @@ -517,6 +517,14 @@ export interface DatePickerProps { * @defaultValue null */ modelValue?: Date | Array | Array | undefined | null; + /** + * The default value for the input when not controlled by `modelValue`. + */ + defaultValue?: Date | Array | Array | 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 | 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 | Array | 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 | Array | undefined | null): void; /** * Callback to invoke when input field is being typed. * @param {Event} event - Browser event diff --git a/packages/primevue/src/inputnumber/InputNumber.d.ts b/packages/primevue/src/inputnumber/InputNumber.d.ts index 802ecbc71..0a55b3cc8 100755 --- a/packages/primevue/src/inputnumber/InputNumber.d.ts +++ b/packages/primevue/src/inputnumber/InputNumber.d.ts @@ -193,6 +193,14 @@ export interface InputNumberProps { * Value of the component. */ modelValue?: Nullable; + /** + * The default value for the input when not controlled by `modelValue`. + */ + defaultValue?: Nullable; + /** + * 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 | 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. diff --git a/packages/primevue/src/inputotp/InputOtp.d.ts b/packages/primevue/src/inputotp/InputOtp.d.ts index 1a67fdd40..0fdd53d0c 100755 --- a/packages/primevue/src/inputotp/InputOtp.d.ts +++ b/packages/primevue/src/inputotp/InputOtp.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/inputtext/InputText.d.ts b/packages/primevue/src/inputtext/InputText.d.ts index 7add5a35e..4f4e0c6d4 100755 --- a/packages/primevue/src/inputtext/InputText.d.ts +++ b/packages/primevue/src/inputtext/InputText.d.ts @@ -87,6 +87,14 @@ export interface InputTextProps extends InputHTMLAttributes { * Value of the component. */ modelValue?: Nullable; + /** + * The default value for the input when not controlled by `modelValue`. + */ + defaultValue?: Nullable; + /** + * 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 | 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; diff --git a/packages/primevue/src/listbox/Listbox.d.ts b/packages/primevue/src/listbox/Listbox.d.ts index b19114f93..9d7531e10 100755 --- a/packages/primevue/src/listbox/Listbox.d.ts +++ b/packages/primevue/src/listbox/Listbox.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/multiselect/MultiSelect.d.ts b/packages/primevue/src/multiselect/MultiSelect.d.ts index 5f8df0398..1169dc737 100755 --- a/packages/primevue/src/multiselect/MultiSelect.d.ts +++ b/packages/primevue/src/multiselect/MultiSelect.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/password/Password.d.ts b/packages/primevue/src/password/Password.d.ts index 893d5efff..c093a2c97 100755 --- a/packages/primevue/src/password/Password.d.ts +++ b/packages/primevue/src/password/Password.d.ts @@ -174,6 +174,14 @@ export interface PasswordProps extends InputHTMLAttributes { * Value of the component. */ modelValue?: Nullable; + /** + * The default value for the input when not controlled by `modelValue`. + */ + defaultValue?: Nullable; + /** + * 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 | 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. diff --git a/packages/primevue/src/radiobutton/RadioButton.d.ts b/packages/primevue/src/radiobutton/RadioButton.d.ts index 2ef7aa16c..d32768931 100755 --- a/packages/primevue/src/radiobutton/RadioButton.d.ts +++ b/packages/primevue/src/radiobutton/RadioButton.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/rating/Rating.d.ts b/packages/primevue/src/rating/Rating.d.ts index 713998180..39111b85d 100755 --- a/packages/primevue/src/rating/Rating.d.ts +++ b/packages/primevue/src/rating/Rating.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/select/Select.d.ts b/packages/primevue/src/select/Select.d.ts index 6d2429706..e935d6490 100755 --- a/packages/primevue/src/select/Select.d.ts +++ b/packages/primevue/src/select/Select.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/selectbutton/SelectButton.d.ts b/packages/primevue/src/selectbutton/SelectButton.d.ts index 930237f69..9772c39de 100755 --- a/packages/primevue/src/selectbutton/SelectButton.d.ts +++ b/packages/primevue/src/selectbutton/SelectButton.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/slider/Slider.d.ts b/packages/primevue/src/slider/Slider.d.ts index da6d91b01..5ba1f1e97 100755 --- a/packages/primevue/src/slider/Slider.d.ts +++ b/packages/primevue/src/slider/Slider.d.ts @@ -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 | 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 diff --git a/packages/primevue/src/textarea/Textarea.d.ts b/packages/primevue/src/textarea/Textarea.d.ts index 2d2932b9f..d58a4fd7e 100755 --- a/packages/primevue/src/textarea/Textarea.d.ts +++ b/packages/primevue/src/textarea/Textarea.d.ts @@ -92,6 +92,14 @@ export interface TextareaProps extends TextareaHTMLAttributes { * Value of the component. */ modelValue?: Nullable; + /** + * The default value for the input when not controlled by `modelValue`. + */ + defaultValue?: Nullable; + /** + * 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 | 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; diff --git a/packages/primevue/src/togglebutton/ToggleButton.d.ts b/packages/primevue/src/togglebutton/ToggleButton.d.ts index 13a97e2ef..66a594ad3 100755 --- a/packages/primevue/src/togglebutton/ToggleButton.d.ts +++ b/packages/primevue/src/togglebutton/ToggleButton.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/toggleswitch/ToggleSwitch.d.ts b/packages/primevue/src/toggleswitch/ToggleSwitch.d.ts index f634f26c9..d9cfd6b0b 100755 --- a/packages/primevue/src/toggleswitch/ToggleSwitch.d.ts +++ b/packages/primevue/src/toggleswitch/ToggleSwitch.d.ts @@ -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 | 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. diff --git a/packages/primevue/src/treeselect/TreeSelect.d.ts b/packages/primevue/src/treeselect/TreeSelect.d.ts index 90b74a9bd..021b9527f 100644 --- a/packages/primevue/src/treeselect/TreeSelect.d.ts +++ b/packages/primevue/src/treeselect/TreeSelect.d.ts @@ -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 | 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.