@ui-machines/tabs
Version:
Core logic for the tabs widget implemented as a state machine
20 lines (19 loc) • 748 B
TypeScript
import { MachineContext as Ctx } from "./tabs.types";
export declare const dom: {
getDoc: (ctx: Ctx) => Document;
getTablistId: (ctx: Ctx) => string;
getPanelId: (ctx: Ctx, id: string) => string;
getTabId: (ctx: Ctx, id: string) => string;
getTablistEl: (ctx: Ctx) => HTMLElement;
getPanelEl: (ctx: Ctx, id: string) => HTMLElement;
getTabEl: (ctx: Ctx, id: string) => HTMLElement;
getElements: (ctx: Ctx) => HTMLElement[];
getFirstEl: (ctx: Ctx) => HTMLElement;
getLastEl: (ctx: Ctx) => HTMLElement;
getNextEl: (ctx: Ctx, id: string) => HTMLElement;
getPrevEl: (ctx: Ctx, id: string) => HTMLElement;
getRectById: (ctx: Ctx, id: string) => {
left: number;
width: number;
};
};