@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
56 lines (55 loc) • 1.85 kB
TypeScript
import { NgClass } from '@angular/common';
import { AfterContentInit, ApplicationRef, ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
import { DokuTab } from './tab.component';
import * as i0 from "@angular/core";
export declare class DokuTabs implements AfterContentInit, OnDestroy {
private elementRef;
private renderer;
private appRef;
/**
* Initial active id of the tab.
* Default to first tab.
*/
activeId: string;
/**
* Whether to use content card styles for the tab body.
*
* @default false
*/
useContentCard: boolean;
/**
* Listen to active tab change.
*/
activeTabChange: EventEmitter<DokuTab>;
protected readonly classes: NgClass['ngClass'];
private tabItems?;
private tabsHeaderElement?;
private tabsBodyElement?;
private destroy$;
/**
* It used in tab component.
*/
protected tabChangeForChild$: import("rxjs").Observable<DokuTab>;
constructor(elementRef: ElementRef, renderer: Renderer2, appRef: ApplicationRef);
ngAfterContentInit(): void;
ngOnDestroy(): void;
/**
* Change the active tab.
* @param id Tab id.
*/
changeActiveTab(id: string): void;
private updateActiveId;
private notifyTabChange;
private getTabById;
private isValidActiveId;
/**
* Update tab elements when adding more or removing tab items.
*/
private updateTabs;
private addTabLabel;
private removeTabLabel;
private addTabContent;
private removeTabContent;
static ɵfac: i0.ɵɵFactoryDeclaration<DokuTabs, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DokuTabs, "doku-tabs", ["dokuTabs"], { "activeId": "activeId"; "useContentCard": "useContentCard"; }, { "activeTabChange": "activeTabChange"; }, ["tabItems"], never, true>;
}