Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions packages/primevue/src/carousel/Carousel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { DefineComponent, DesignToken, EmitFn, PassThrough } from '@primevu
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { ButtonPassThroughOptions } from 'primevue/button';
import type { PassThroughOptions } from 'primevue/passthrough';
import { VNode } from 'vue';
import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue';

export declare type CarouselPassThroughOptionType = CarouselPassThroughAttributes | ((options: CarouselPassThroughMethodOptions) => CarouselPassThroughAttributes | string) | string | null | undefined;

Expand Down Expand Up @@ -248,11 +248,11 @@ export interface CarouselResponsiveOptions {
/**
* Defines valid properties in Carousel component.
*/
export interface CarouselProps {
export interface CarouselProps<T = any> {
/**
* An array of objects to display.
*/
value?: any | undefined;
value?: T[] | undefined;
/**
* Index of the first item.
* @defaultValue 0
Expand Down Expand Up @@ -349,7 +349,7 @@ export interface CarouselProps {
/**
* Defines valid slots in Carousel slots.
*/
export interface CarouselSlots {
export interface CarouselSlots<T = any> {
/**
* Custom content for each item.
* @param {Object} scope - item slot's params.
Expand All @@ -358,7 +358,7 @@ export interface CarouselSlots {
/**
* Data of the component
*/
data: any;
data: T;
/**
* Index of the item
*/
Expand Down Expand Up @@ -411,11 +411,19 @@ export declare type CarouselEmits = EmitFn<CarouselEmitsOptions>;
* @group Component
*
*/
declare const Carousel: DefineComponent<CarouselProps, CarouselSlots, CarouselEmits>;
declare const Carousel: {
new <T = any>(
props: CarouselProps<T>
): {
$props: CarouselProps<T> & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$slots: CarouselSlots<T>;
$emit: EmitFn<CarouselEmitsOptions>;
};
};

declare module 'vue' {
export interface GlobalComponents {
Carousel: DefineComponent<CarouselProps, CarouselSlots, CarouselEmits>;
Carousel: typeof Carousel;
}
}

Expand Down
26 changes: 17 additions & 9 deletions packages/primevue/src/galleria/Galleria.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
import { AllowedComponentProps, ButtonHTMLAttributes, ComponentCustomProps, HTMLAttributes, TransitionProps, VNode, VNodeProps } from 'vue';

export declare type GalleriaPassThroughOptionType = GalleriaPassThroughAttributes | ((options: GalleriaPassThroughMethodOptions) => GalleriaPassThroughAttributes | string) | string | null | undefined;

Expand Down Expand Up @@ -270,15 +270,15 @@ export interface GalleriaContext {
/**
* Defines valid properties in Galleria component.
*/
export interface GalleriaProps {
export interface GalleriaProps<T = any> {
/**
* Unique identifier of the element.
*/
id?: string | undefined;
/**
* An array of objects to display.
*/
value?: any[];
value?: T[];
/**
* Index of the first item.
* @defaultValue 0
Expand Down Expand Up @@ -429,7 +429,7 @@ export interface GalleriaProps {
/**
* Defines valid slots in Galleria slots.
*/
export interface GalleriaSlots {
export interface GalleriaSlots<T = any> {
/**
* Custom header template.
*/
Expand All @@ -446,7 +446,7 @@ export interface GalleriaSlots {
/**
* Item instance
*/
item: any;
item: T;
}): VNode[];
/**
* Custom caption template.
Expand All @@ -456,7 +456,7 @@ export interface GalleriaSlots {
/**
* Item instance
*/
item: any;
item: T;
}): VNode[];
/**
* Custom indicator template.
Expand Down Expand Up @@ -484,7 +484,7 @@ export interface GalleriaSlots {
/**
* Item instance
*/
item: any;
item: T;
}): VNode[];
/**
* Custom close icon template.
Expand Down Expand Up @@ -538,11 +538,19 @@ export declare type GalleriaEmits = EmitFn<GalleriaEmitsOptions>;
* @group Component
*
*/
declare const Galleria: DefineComponent<GalleriaProps, GalleriaSlots, GalleriaEmits>;
declare const Galleria: {
new <T = any>(
props: GalleriaProps<T>
): {
$props: GalleriaProps<T> & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$slots: GalleriaSlots<T>;
$emit: EmitFn<GalleriaEmitsOptions>;
};
};

declare module 'vue' {
export interface GlobalComponents {
Galleria: DefineComponent<GalleriaProps, GalleriaSlots, GalleriaEmits>;
Galleria: typeof Galleria;
}
}

Expand Down
28 changes: 18 additions & 10 deletions packages/primevue/src/timeline/Timeline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import type { DefineComponent, DesignToken, EmitFn, HintedString, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import { VNode } from 'vue';
import { AllowedComponentProps, ComponentCustomProps, VNode, VNodeProps } from 'vue';

export declare type TimelinePassThroughOptionType = TimelinePassThroughAttributes | ((options: TimelinePassThroughMethodOptions) => TimelinePassThroughAttributes | string) | string | null | undefined;

Expand Down Expand Up @@ -108,11 +108,11 @@ export interface TimelineContext {
/**
* Defines valid properties in Timeline component.
*/
export interface TimelineProps {
export interface TimelineProps<T = any> {
/**
* An array of events to display.
*/
value?: any[] | undefined;
value?: T[] | undefined;
/**
* Position of the timeline bar relative to the content.
* @defaultValue left
Expand Down Expand Up @@ -151,7 +151,7 @@ export interface TimelineProps {
/**
* Defines valid slots in Timeline component.
*/
export interface TimelineSlots {
export interface TimelineSlots<T = any> {
/**
* Custom content template
* @param {Object} scope - content slot's params.
Expand All @@ -160,7 +160,7 @@ export interface TimelineSlots {
/**
* Item data
*/
item: any;
item: T;
/**
* Index of item
*/
Expand All @@ -174,7 +174,7 @@ export interface TimelineSlots {
/**
* Item data
*/
item: any;
item: T;
/**
* Index of item
*/
Expand All @@ -188,7 +188,7 @@ export interface TimelineSlots {
/**
* Item data
*/
item: any;
item: T;
/**
* Index of item
*/
Expand All @@ -201,7 +201,7 @@ export interface TimelineSlots {
/**
* Item data
*/
item: any;
item: T;
/**
* Index of item
*/
Expand All @@ -228,11 +228,19 @@ export declare type TimelineEmits = EmitFn<TimelineEmitsOptions>;
* @group Component
*
*/
declare const Timeline: DefineComponent<TimelineProps, TimelineSlots, TimelineEmits>;
declare const Timeline: {
new <T = any>(
props: TimelineProps<T>
): {
$props: TimelineProps<T> & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$slots: TimelineSlots<T>;
$emit: EmitFn<TimelineEmitsOptions>;
};
};

declare module 'vue' {
export interface GlobalComponents {
Timeline: DefineComponent<TimelineProps, TimelineSlots, TimelineEmits>;
Timeline: typeof Timeline;
}
}

Expand Down