tgui-angular
Version:
🚀 Angular UI library for Telegram Web Apps with modern components and theming support | 💼 Author is open to work opportunities | 📧 Contact: a.blagovestnov@gmail.com | 💬 Telegram: @ablagovestnov
43 lines (42 loc) • 2.05 kB
TypeScript
import { QueryList, AfterContentInit, OnDestroy } from '@angular/core';
import { SegmentedControlItemComponent } from './segmented-control-item.component';
import * as i0 from "@angular/core";
/**
* The SegmentedControl component renders a set of options as a segmented control,
* commonly used for toggling between views or filtering content.
* It is designed to adapt its appearance based on the platform,
* offering a native look and feel.
*/
export declare class SegmentedControlComponent implements AfterContentInit, OnDestroy {
/** Selected tab index */
selectedIndex: import("@angular/core").InputSignal<number>;
/** Selected index change event */
selectedIndexChange: import("@angular/core").OutputEmitterRef<number>;
/** Number of tabs */
tabsCount: import("@angular/core").WritableSignal<number>;
/** Check if there is a selected tab */
hasSelectedTab: import("@angular/core").WritableSignal<boolean>;
/** Current active tab index (internal) */
private activeTabIndex;
/** Get all child SegmentedControlItem elements */
tabItems: QueryList<SegmentedControlItemComponent>;
/** Subscriptions to tab events */
private subscriptions;
/** Platform service to check platform type */
private platformService;
constructor();
/** Check if platform is iOS */
get isIOS(): boolean;
ngAfterContentInit(): void;
ngOnDestroy(): void;
/** Get slider transform */
getSliderTransform(): string;
/** Update number of tabs */
private updateTabsCount;
/** Select tab by index */
selectTab(index: number): void;
/** Update selected state of tabs */
private updateSelectedState;
static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedControlComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedControlComponent, "tgui-segmented-control", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; }, { "selectedIndexChange": "selectedIndexChange"; }, ["tabItems"], ["*"], true, never>;
}