baseframe-js
Version:
Baseframe JS is a comprehensive suite of modular plugins and utilities designed for front-end development
44 lines (43 loc) • 1.49 kB
TypeScript
import type { LocationTracking, PrimaryClickElems, StringPluginArgChoices } from './types';
import { type BaseElem } from "base-elem-js";
type tabDefaultContent = string;
export interface ITabsDefaults extends LocationTracking {
tabsEvent: string;
cssPrefix: string;
addIDtoPanel: boolean;
ariaLabel: boolean;
defaultContent: number;
tabChange(tabId: string, prevTabId: string, tabsList: HTMLElement, tabsBody: HTMLElement): void;
onInit(tabsList: HTMLElement, tabsBody: HTMLElement): void;
}
export interface ITabsOptions extends Partial<ITabsDefaults> {
}
export default class Tabs {
#private;
$element: BaseElem;
params: ITabsDefaults;
tabsNav: HTMLElement;
$tabsNav: BaseElem;
$tabsNavBtns: BaseElem;
tabsNavBtns: PrimaryClickElems[];
tabsBody: HTMLElement;
$tabsBody: BaseElem;
$tabsBodyPanels: BaseElem;
prevTabId: string;
initTabId: string;
initDefaultContent: tabDefaultContent;
static defaults: ITabsDefaults;
static version: string;
static pluginName: string;
constructor(element: HTMLElement, options: ITabsOptions | StringPluginArgChoices);
changeTab(clickElem: PrimaryClickElems, tabId: string, updateUrl?: boolean): void;
static remove(element: BaseElem, plugin?: Tabs): void;
}
export interface TabsPlugin {
tabs(options?: ITabsOptions | StringPluginArgChoices): BaseElem;
}
declare module 'base-elem-js' {
interface BaseElem extends TabsPlugin {
}
}
export {};