@ngx-uk-frontend/core
Version:
Core utilities and shared functionality for ngx-uk-frontend libraries
31 lines (30 loc) • 1.59 kB
TypeScript
import { TabDirective } from './tab.directive';
import * as i0 from "@angular/core";
/**
* Base directive for tabs components across different design systems.
* Provides common functionality for managing tab collections and navigation.
*/
export declare abstract class TabsDirective {
/** The title for the tabs component. This input is required. */
readonly title: import("@angular/core").InputSignal<string>;
/** Two-way binding model for the currently active tab index. Defaults to 0 (first tab). */
readonly activeTab: import("@angular/core").ModelSignal<number>;
/**
* Abstract method that concrete components must implement to provide their tab items.
* This allows the base directive to work with different component types.
*/
protected abstract getTabs(): readonly TabDirective[];
/**
* Computed property that returns the tab items.
* This provides a consistent interface for templates to access tabs.
*/
tabs(): readonly TabDirective[];
/**
* Selects a tab at the specified index.
* @param index The index of the tab to select
* @param event The event that triggered the selection
*/
selectTab(index: number, event: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TabsDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TabsDirective, never, never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; }, { "activeTab": "activeTabChange"; }, never, never, true, never>;
}