A minified version of the GSAP (GreenSock Animation Platform) library has been added to the scripts/vendor directory. This library will be used to provide rich, high-performance animations for various components within the project.
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
|
|
export interface ICollapse {
|
|
options?: {};
|
|
show(): void;
|
|
hide(): void;
|
|
}
|
|
export interface IBasePlugin<O, E> {
|
|
el: E;
|
|
options?: O;
|
|
events?: {};
|
|
}
|
|
declare class HSBasePlugin<O, E = HTMLElement> implements IBasePlugin<O, E> {
|
|
el: E;
|
|
options: O;
|
|
events?: any;
|
|
constructor(el: E, options: O, events?: any);
|
|
createCollection(collection: any[], element: any): void;
|
|
fireEvent(evt: string, payload?: any): any;
|
|
on(evt: string, cb: Function): void;
|
|
}
|
|
export interface ICollectionItem<T> {
|
|
id: string | number;
|
|
element: T;
|
|
}
|
|
declare class HSCollapse extends HSBasePlugin<{}> implements ICollapse {
|
|
private readonly contentId;
|
|
content: HTMLElement | null;
|
|
private animationInProcess;
|
|
constructor(el: HTMLElement, options?: {}, events?: {});
|
|
private init;
|
|
private hideAllMegaMenuItems;
|
|
show(): boolean;
|
|
hide(): boolean;
|
|
static getInstance(target: HTMLElement, isInstance?: boolean): HTMLElement | ICollectionItem<HSCollapse>;
|
|
static autoInit(): void;
|
|
static show(target: HTMLElement): void;
|
|
static hide(target: HTMLElement): void;
|
|
static on(evt: string, target: HTMLElement, cb: Function): void;
|
|
}
|
|
|
|
export {
|
|
HSCollapse as default,
|
|
};
|
|
|
|
export {};
|