UNPKG

@ribajs/bs4

Version:

Bootstrap 4 module for Riba.js

51 lines (50 loc) 1.99 kB
import { TemplateFunction, TemplatesComponent, ScopeBase } from "@ribajs/core"; export interface Tab { title: string; content: string; handle: string; active: boolean; type?: string; index: number; } export interface Scope extends ScopeBase { items: Tab[]; activate: Bs4TabsComponent["activate"]; deactivate: Bs4TabsComponent["activate"]; deactivateAll: Bs4TabsComponent["deactivateAll"]; optionTabsAutoHeight: boolean; optionTabsAngle: "vertical" | "horizontal"; } export declare class Bs4TabsComponent extends TemplatesComponent { static tagName: string; protected templateAttributes: { name: string; required: boolean; }[]; scope: Scope; protected tabs?: NodeListOf<Element>; protected tabPanes?: NodeListOf<Element>; protected scrollable?: Element | null; static get observedAttributes(): string[]; constructor(); protected _onResize(): void; protected onResize: (...params: any[]) => Promise<any>; setHeight(): void; deactivateAll(): void; deactivate(tab: Tab): void; activate(tab: Tab): void; protected activateFirstTab(): void; protected getTabContentChildByIndex(index: number): Element | undefined; protected triggerVisibilityChangedForElement(element: Element, visible: boolean): void; protected connectedCallback(): void; protected disconnectedCallback(): void; protected setElements(): void; protected resizeTabsArray(newSize: number): void; protected onTabShownEventHandler(event: Event): void; protected initTabs(): void; protected addTabByAttribute(attributeName: string, newValue: string): void; protected transformTemplateAttributes(attributes: any, index: number): any; protected parsedAttributeChangedCallback(attributeName: string, oldValue: any, newValue: any, namespace: string | null): void; protected afterBind(): Promise<any>; protected template(): ReturnType<TemplateFunction>; }