carbon-components-angular
Version:
Next generation components
88 lines (84 loc) • 3.21 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | tab-headers.component.d.ts
*
* Copyright 2014, 2024 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { QueryList, AfterContentInit, ElementRef, OnChanges, SimpleChanges, OnDestroy, OnInit, ChangeDetectorRef, Renderer2 } from "@angular/core";
import { EventService } from "carbon-components-angular/utils";
import { I18n } from "carbon-components-angular/i18n";
import { BaseTabHeader } from "./base-tab-header.component";
import { Tab } from "./tab.component";
import * as i0 from "@angular/core";
/**
* The `TabHeaders` component contains the `Tab` items and controls scroll functionality
* if content has overflow.
*/
export declare class TabHeaders extends BaseTabHeader implements AfterContentInit, OnChanges, OnDestroy, OnInit {
protected elementRef: ElementRef;
protected changeDetectorRef: ChangeDetectorRef;
protected eventService: EventService;
protected renderer: Renderer2;
protected i18n: I18n;
/**
* List of `Tab` components.
*/
tabInput: QueryList<Tab>;
translations: any;
/**
* Gets the Unordered List element that holds the `Tab` headings from the view DOM.
*/
headerContainer: ElementRef<HTMLElement>;
/**
* ContentChild of all the n-tabs
*/
tabQuery: QueryList<Tab>;
/**
* set to tabQuery if tabInput is empty
*/
tabs: QueryList<Tab>;
/**
* The index of the first visible tab.
*/
firstVisibleTab: number;
/**
* The DOM element containing the `Tab` headings displayed.
*/
allTabHeaders: QueryList<ElementRef>;
private resizeObserver;
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, eventService: EventService, renderer: Renderer2, i18n: I18n);
/**
* Controls the keydown events used for tabbing through the headings.
*/
keyboardInput(event: any): void;
ngOnInit(): void;
ngOnDestroy(): void;
ngAfterContentInit(): void;
ngOnChanges(changes: SimpleChanges): void;
/**
* Controls manually focusing tabs.
*/
onTabFocus(ref: HTMLElement, index: number): void;
getSelectedTab(): any;
/**
* Selects `Tab` 'tab' and moves it into view on the view DOM if it is not already.
*/
selectTab(ref: HTMLElement, tab: Tab, tabIndex: number): void;
/**
* Determines which `Tab` is initially selected.
*/
protected setFirstTab(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TabHeaders, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TabHeaders, "cds-tab-headers, ibm-tab-headers", never, { "tabInput": "tabs"; "translations": "translations"; }, {}, ["tabQuery"], never, false>;
}