UNPKG

@studiocms/ui

Version:

The UI library for StudioCMS. Includes the layouts & components we use to build StudioCMS.

18 lines (17 loc) 825 B
/** * Handles the logic of switching tabs, updating ARIA attributes, and syncing state. * @param tabContainer The main container of the tab system. * @param newActiveHeader The header element of the tab to be activated. * @param originatedFromSync A flag to prevent cyclic updates with synced tabs. */ declare const switchTab: (tabContainer: HTMLDivElement, newActiveHeader: HTMLElement, originatedFromSync?: boolean) => void; /** * Sets up a single tab container, wiring up ARIA attributes and event listeners. * @param tabContainer The main container element of a tab system to set up. */ declare const setupTabContainer: (tabContainer: HTMLDivElement) => void; /** * Initializes all tab systems on the page. * Finds all tab containers and applies the setup logic to each. */ declare const loadTabs: () => void;