carbon-components-angular
Version:
Next generation components
108 lines (104 loc) • 3.13 kB
TypeScript
/*!
*
* Neutrino v0.0.0 | tab-headers.component.d.ts
*
* Copyright 2014, 2018 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, AfterViewInit, AfterContentInit } from "@angular/core";
import { Tab } from "./tab.component";
/**
* The `TabHeaders` neutrino component contains the `Tab` items and controls scroll functionality
* if content has overflow.
* @export
* @class TabHeaders
* @implements {AfterViewInit}
*/
export declare class TabHeaders implements AfterViewInit, AfterContentInit {
/**
* List of `Tab` components.
* @type {QueryList<Tab>}
* @memberof TabHeaders
*/
tabInput: QueryList<Tab>;
/**
* Set to 'true' to have `Tab` items cached and not reloaded on tab switching.
* Duplicate from `n-tabs` to support standalone headers
* @memberof Tabs
*/
cacheActive: boolean;
/**
* Gets the Unordered List element that holds the `Tab` headings from the view DOM.
* @memberof TabHeaders
*/
headerContainer: any;
/**
* 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.
* @memberof TabHeaders
*/
firstVisibleTab: number;
/**
* The DOM element containing the `Tab` headings displayed.
* @memberof TabHeaders
*/
allTabHeaders: any;
/**
* Controls the manual focusing done by tabbing through headings.
* @memberof TabHeaders
*/
currentSelectedTab: number;
tabListVisible: boolean;
/**
* Controls the keydown events used for tabbing through the headings.
* @param {any} event
* @memberof TabHeaders
*/
keyboardInput(event: any): void;
ngAfterContentInit(): void;
/**
* Performs check to see if there is overflow and needs scrolling.
* @memberof TabHeaders
*/
ngAfterViewInit(): void;
/**
* Controls manually focusing tabs.
* @param {HTMLElement} ref
* @param {number} index
* @memberof TabHeaders
*/
onTabFocus(ref: HTMLElement, index: number): void;
getSelectedTab(): any;
showTabList(): void;
/**
* Selects `Tab` 'tab' and moves it into view on the view DOM if it is not already.
* @param ref
* @param tab
* @param tabIndex
* @memberof TabHeaders
*/
selectTab(ref: HTMLElement, tab: Tab, tabIndex: number): void;
/**
* Determines which `Tab` is initially selected.
* @private
* @memberof Tabs
*/
private setFirstTab;
}