@ribajs/bs4
Version:
Bootstrap 4 module for Riba.js
55 lines (54 loc) • 1.99 kB
TypeScript
export interface Config {
toggle: boolean;
parent: string | HTMLElement;
}
export declare const NAME = "collapse";
export declare const VERSION = "4.3.1";
export declare const DATA_KEY = "bs.collapse";
export declare const EVENT_KEY = ".bs.collapse";
export declare const Default: {
toggle: boolean;
parent: string;
};
export declare const DefaultType: {
toggle: string;
parent: string;
};
export declare const EVENT_SHOW = "show.bs.collapse";
export declare const EVENT_SHOWN = "shown.bs.collapse";
export declare const EVENT_HIDE = "hide.bs.collapse";
export declare const EVENT_HIDDEN = "hidden.bs.collapse";
export declare const CLASS_NAME_SHOW = "show";
export declare const CLASS_NAME_COLLAPSE = "collapse";
export declare const CLASS_NAME_COLLAPSING = "collapsing";
export declare const CLASS_NAME_COLLAPSED = "collapsed";
export declare const WIDTH = "width";
export declare const HEIGHT = "height";
export declare const SELECTOR_ACTIVES = ".show, .collapsing";
export declare class CollapseService {
_isTransitioning: boolean;
_element: HTMLElement | null;
_config: any;
_triggerArray: HTMLElement[] | null;
_selector: string | null;
_parent: HTMLElement | null;
constructor(element: HTMLElement, triggerList: NodeListOf<HTMLElement> | HTMLElement[], config?: Partial<Config>);
static get VERSION(): string;
static get Default(): {
toggle: boolean;
parent: string;
};
isExpanded(): boolean;
isCollapsed(): boolean;
toggle(): void;
show(): void;
hide(): void;
setTransitioning(isTransitioning: boolean): void;
dispose(): void;
_getConfig(config: Partial<Config>): Config;
_getDimension(): "width" | "height";
_getParent(): any;
_addAriaAndCollapsedClass(element: HTMLElement, triggerArray: HTMLElement[], isOpen?: boolean): void;
static collapseInterface(element: HTMLElement, config: string): void;
static getInstance(element: HTMLElement): any;
}