You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
import type { Ref, ToRefs, UnwrapRef } from 'vue';
|
|
export interface ICarouselItemProps {
|
|
name: string;
|
|
label: string | number;
|
|
key: string;
|
|
}
|
|
export interface ICarouselItemData {
|
|
hover: boolean;
|
|
translate: number;
|
|
scale: number;
|
|
active: boolean;
|
|
ready: boolean;
|
|
inStage: boolean;
|
|
animating: boolean;
|
|
}
|
|
export interface ICarouselProps {
|
|
initialIndex: number;
|
|
height: string;
|
|
trigger: string;
|
|
autoplay: boolean;
|
|
interval: number;
|
|
indicatorPosition: string;
|
|
indicator: boolean;
|
|
arrow: string;
|
|
type: string;
|
|
loop: boolean;
|
|
direction: string;
|
|
pauseOnHover: boolean;
|
|
}
|
|
export declare type UnionCarouselItemData = ICarouselItemProps & ToRefs<ICarouselItemData>;
|
|
export interface CarouselItem extends UnionCarouselItemData {
|
|
uid: number;
|
|
translateItem: (index: number, activeIndex: number, oldIndex: number) => void;
|
|
}
|
|
export interface InjectCarouselScope {
|
|
root: Ref<HTMLElement>;
|
|
direction: string;
|
|
type: string;
|
|
items: Ref<UnwrapRef<CarouselItem[]>>;
|
|
loop: boolean;
|
|
addItem: (item: CarouselItem) => void;
|
|
removeItem: (uid: number) => void;
|
|
setActiveItem: (index: number) => void;
|
|
}
|