carbon-components-angular
Version:
Next generation components
121 lines (117 loc) • 4.52 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | base-tab-header.component.d.ts
*
* Copyright 2014, 2026 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 { ElementRef, TemplateRef, ChangeDetectorRef, Renderer2 } from "@angular/core";
import { EventService } from "carbon-components-angular/utils";
import * as i0 from "@angular/core";
/**
* There are two ways to create a tab, this class is a collection of features
* & metadata required by both.
*/
export declare class BaseTabHeader {
protected elementRef: ElementRef;
protected changeDetectorRef: ChangeDetectorRef;
protected eventService: EventService;
protected renderer: Renderer2;
/**
* Set to `true` to have `Tab` items cached and not reloaded on tab switching.
* Duplicated from `cds-tabs` to support standalone headers.
*/
cacheActive: boolean;
/**
* Set to 'true' to have tabs automatically activated and have their content displayed when they receive focus.
*/
followFocus: boolean;
/**
* Sets the aria label on the nav element.
*/
ariaLabel: string;
/**
* Sets the aria labelledby on the nav element.
*/
ariaLabelledby: string;
/**
* Template projected before tab items inside the tab list.
*/
contentBefore: TemplateRef<any>;
/**
* Template projected after tab items inside the tab list.
*/
contentAfter: TemplateRef<any>;
/**
* Visual style of the tab list: `line` or `contained`.
*/
type: "line" | "contained";
/**
* Theme for contained tabs: `dark` or `light`.
*/
theme: "dark" | "light";
/**
* When using icon-only tabs, icon size: `default` (16px) or `lg` (20px).
*/
iconSize: "default" | "lg";
/**
* **Contained only**: Evenly sized tabs across the row (**must** have fewer than 9 tabs).
*/
fullWidth: boolean;
/**
* Show a close control on each tab.
*/
dismissable: boolean;
/**
* Scroll the active tab into view on focus/select.
*/
scrollIntoView: boolean;
/**
* Debounce (ms) for tab list scroll events; affects overflow chevron updates.
*/
scrollDebounceWait: number;
tabsClass: boolean;
get containedClass(): boolean;
get themeClass(): boolean;
get dismissableClass(): boolean;
get iconSizeDefaultClass(): boolean;
get iconSizeLgClass(): boolean;
get layoutSizeLgClass(): boolean;
/**
* Gets the Unordered List element that holds the `Tab` headings from the view DOM.
*/
headerContainer: any;
/**
* Controls the manual focusing done by tabbing through headings.
*/
currentSelectedTab: number;
readonly OVERFLOW_BUTTON_OFFSET = 44;
readonly longPressMultiplier = 3;
readonly clickMultiplier = 1.5;
protected longPressInterval: any;
protected tickInterval: any;
protected scrollDebounceTimer: any;
get hasHorizontalOverflow(): boolean;
get leftOverflowNavButtonHidden(): boolean;
get rightOverflowNavButtonHidden(): boolean;
constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, eventService: EventService, renderer: Renderer2);
handleScroll(): void;
handleOverflowNavClick(direction: number, numOftabs?: number): void;
handleOverflowNavMouseDown(direction: number): void;
/**
* Clear intervals/Timeout & reset scroll behavior
*/
handleOverflowNavMouseUp(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTabHeader, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<BaseTabHeader, "ng-component", never, { "cacheActive": "cacheActive"; "followFocus": "followFocus"; "ariaLabel": "ariaLabel"; "ariaLabelledby": "ariaLabelledby"; "contentBefore": "contentBefore"; "contentAfter": "contentAfter"; "type": "type"; "theme": "theme"; "iconSize": "iconSize"; "fullWidth": "fullWidth"; "dismissable": "dismissable"; "scrollIntoView": "scrollIntoView"; "scrollDebounceWait": "scrollDebounceWait"; }, {}, never, never, false>;
}