index.d.ts 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { AfterContentChecked } from '@angular/core';
  3. import { AfterContentInit } from '@angular/core';
  4. import { AfterViewInit } from '@angular/core';
  5. import { AnimationEvent as AnimationEvent_2 } from '@angular/animations';
  6. import { AnimationTriggerMetadata } from '@angular/animations';
  7. import { BehaviorSubject } from 'rxjs';
  8. import { BooleanInput } from '@angular/cdk/coercion';
  9. import { CanColor } from '@angular/material/core';
  10. import { CanDisable } from '@angular/material/core';
  11. import { CanDisableRipple } from '@angular/material/core';
  12. import { CdkPortal } from '@angular/cdk/portal';
  13. import { CdkPortalOutlet } from '@angular/cdk/portal';
  14. import { ChangeDetectorRef } from '@angular/core';
  15. import { ComponentFactoryResolver } from '@angular/core';
  16. import { _Constructor } from '@angular/material/core';
  17. import { Direction } from '@angular/cdk/bidi';
  18. import { Directionality } from '@angular/cdk/bidi';
  19. import { ElementRef } from '@angular/core';
  20. import { EventEmitter } from '@angular/core';
  21. import { FocusableOption } from '@angular/cdk/a11y';
  22. import { FocusMonitor } from '@angular/cdk/a11y';
  23. import { FocusOrigin } from '@angular/cdk/a11y';
  24. import { HasTabIndex } from '@angular/material/core';
  25. import * as i0 from '@angular/core';
  26. import * as i10 from '@angular/material/core';
  27. import * as i11 from '@angular/cdk/portal';
  28. import * as i12 from '@angular/cdk/observers';
  29. import * as i13 from '@angular/cdk/a11y';
  30. import * as i9 from '@angular/common';
  31. import { InjectionToken } from '@angular/core';
  32. import { NgZone } from '@angular/core';
  33. import { NumberInput } from '@angular/cdk/coercion';
  34. import { OnChanges } from '@angular/core';
  35. import { OnDestroy } from '@angular/core';
  36. import { OnInit } from '@angular/core';
  37. import { Platform } from '@angular/cdk/platform';
  38. import { QueryList } from '@angular/core';
  39. import { RippleConfig } from '@angular/material/core';
  40. import { RippleGlobalOptions } from '@angular/material/core';
  41. import { RippleTarget } from '@angular/material/core';
  42. import { SimpleChanges } from '@angular/core';
  43. import { Subject } from 'rxjs';
  44. import { TemplatePortal } from '@angular/cdk/portal';
  45. import { TemplateRef } from '@angular/core';
  46. import { ThemePalette } from '@angular/material/core';
  47. import { ViewContainerRef } from '@angular/core';
  48. import { ViewportRuler } from '@angular/cdk/scrolling';
  49. declare namespace i1 {
  50. export {
  51. MAT_TAB_CONTENT,
  52. MatTabContent
  53. }
  54. }
  55. declare namespace i2 {
  56. export {
  57. MAT_TAB_LABEL,
  58. MAT_TAB,
  59. MatTabLabel
  60. }
  61. }
  62. declare namespace i3 {
  63. export {
  64. MAT_TAB_GROUP,
  65. _MatTabBase,
  66. MatTab
  67. }
  68. }
  69. declare namespace i4 {
  70. export {
  71. MatTabGroupBaseHeader,
  72. MatTabHeaderPosition,
  73. _MatTabGroupBase,
  74. MatTabGroup,
  75. MatTabChangeEvent
  76. }
  77. }
  78. declare namespace i5 {
  79. export {
  80. _MatTabNavBase,
  81. _MatTabLinkBase,
  82. MatTabNav,
  83. MatTabLink,
  84. MatTabNavPanel
  85. }
  86. }
  87. declare namespace i6 {
  88. export {
  89. MatTabBodyPortal,
  90. MatTabBodyPositionState,
  91. _MatTabBodyBase,
  92. MatTabBody,
  93. MatTabBodyOriginState
  94. }
  95. }
  96. declare namespace i7 {
  97. export {
  98. _MatTabLabelWrapperBase,
  99. MatTabLabelWrapper
  100. }
  101. }
  102. declare namespace i8 {
  103. export {
  104. _MatTabHeaderBase,
  105. MatTabHeader
  106. }
  107. }
  108. /** Injection token for the MatInkBar's Positioner. */
  109. export declare const _MAT_INK_BAR_POSITIONER: InjectionToken<_MatInkBarPositioner>;
  110. /**
  111. * The default positioner function for the MatInkBar.
  112. * @docs-private
  113. */
  114. export declare function _MAT_INK_BAR_POSITIONER_FACTORY(): _MatInkBarPositioner;
  115. /**
  116. * Used to provide a tab label to a tab without causing a circular dependency.
  117. * @docs-private
  118. */
  119. export declare const MAT_TAB: InjectionToken<any>;
  120. /**
  121. * Injection token that can be used to reference instances of `MatTabContent`. It serves as
  122. * alternative token to the actual `MatTabContent` class which could cause unnecessary
  123. * retention of the class and its directive metadata.
  124. */
  125. export declare const MAT_TAB_CONTENT: InjectionToken<MatTabContent>;
  126. /**
  127. * Used to provide a tab group to a tab without causing a circular dependency.
  128. * @docs-private
  129. */
  130. export declare const MAT_TAB_GROUP: InjectionToken<any>;
  131. /**
  132. * Injection token that can be used to reference instances of `MatTabLabel`. It serves as
  133. * alternative token to the actual `MatTabLabel` class which could cause unnecessary
  134. * retention of the class and its directive metadata.
  135. */
  136. export declare const MAT_TAB_LABEL: InjectionToken<MatTabLabel>;
  137. /** Injection token that can be used to provide the default options the tabs module. */
  138. export declare const MAT_TABS_CONFIG: InjectionToken<MatTabsConfig>;
  139. /**
  140. * Abstraction around the MDC tab indicator that acts as the tab header's ink bar.
  141. * @docs-private
  142. */
  143. export declare class MatInkBar {
  144. private _items;
  145. /** Item to which the ink bar is aligned currently. */
  146. private _currentItem;
  147. constructor(_items: QueryList<MatInkBarItem>);
  148. /** Hides the ink bar. */
  149. hide(): void;
  150. /** Aligns the ink bar to a DOM node. */
  151. alignToElement(element: HTMLElement): void;
  152. }
  153. /**
  154. * Item inside a tab header relative to which the ink bar can be aligned.
  155. * @docs-private
  156. */
  157. declare interface MatInkBarItem extends OnInit, OnDestroy {
  158. elementRef: ElementRef<HTMLElement>;
  159. activateInkBar(previousIndicatorClientRect?: ClientRect): void;
  160. deactivateInkBar(): void;
  161. fitInkBarToContent: boolean;
  162. }
  163. /**
  164. * Interface for a a MatInkBar positioner method, defining the positioning and width of the ink
  165. * bar in a set of tabs.
  166. */
  167. export declare interface _MatInkBarPositioner {
  168. (element: HTMLElement): {
  169. left: string;
  170. width: string;
  171. };
  172. }
  173. /**
  174. * Base class for a tab header that supported pagination.
  175. * @docs-private
  176. */
  177. export declare abstract class MatPaginatedTabHeader implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
  178. protected _elementRef: ElementRef<HTMLElement>;
  179. protected _changeDetectorRef: ChangeDetectorRef;
  180. private _viewportRuler;
  181. private _dir;
  182. private _ngZone;
  183. private _platform;
  184. _animationMode?: string | undefined;
  185. abstract _items: QueryList<MatPaginatedTabHeaderItem>;
  186. abstract _inkBar: {
  187. hide: () => void;
  188. alignToElement: (element: HTMLElement) => void;
  189. };
  190. abstract _tabListContainer: ElementRef<HTMLElement>;
  191. abstract _tabList: ElementRef<HTMLElement>;
  192. abstract _tabListInner: ElementRef<HTMLElement>;
  193. abstract _nextPaginator: ElementRef<HTMLElement>;
  194. abstract _previousPaginator: ElementRef<HTMLElement>;
  195. /** The distance in pixels that the tab labels should be translated to the left. */
  196. private _scrollDistance;
  197. /** Whether the header should scroll to the selected index after the view has been checked. */
  198. private _selectedIndexChanged;
  199. /** Emits when the component is destroyed. */
  200. protected readonly _destroyed: Subject<void>;
  201. /** Whether the controls for pagination should be displayed */
  202. _showPaginationControls: boolean;
  203. /** Whether the tab list can be scrolled more towards the end of the tab label list. */
  204. _disableScrollAfter: boolean;
  205. /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
  206. _disableScrollBefore: boolean;
  207. /**
  208. * The number of tab labels that are displayed on the header. When this changes, the header
  209. * should re-evaluate the scroll position.
  210. */
  211. private _tabLabelCount;
  212. /** Whether the scroll distance has changed and should be applied after the view is checked. */
  213. private _scrollDistanceChanged;
  214. /** Used to manage focus between the tabs. */
  215. private _keyManager;
  216. /** Cached text content of the header. */
  217. private _currentTextContent;
  218. /** Stream that will stop the automated scrolling. */
  219. private _stopScrolling;
  220. /**
  221. * Whether pagination should be disabled. This can be used to avoid unnecessary
  222. * layout recalculations if it's known that pagination won't be required.
  223. */
  224. get disablePagination(): boolean;
  225. set disablePagination(value: BooleanInput);
  226. private _disablePagination;
  227. /** The index of the active tab. */
  228. get selectedIndex(): number;
  229. set selectedIndex(value: NumberInput);
  230. private _selectedIndex;
  231. /** Event emitted when the option is selected. */
  232. readonly selectFocusedIndex: EventEmitter<number>;
  233. /** Event emitted when a label is focused. */
  234. readonly indexFocused: EventEmitter<number>;
  235. constructor(_elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _viewportRuler: ViewportRuler, _dir: Directionality, _ngZone: NgZone, _platform: Platform, _animationMode?: string | undefined);
  236. /** Called when the user has selected an item via the keyboard. */
  237. protected abstract _itemSelected(event: KeyboardEvent): void;
  238. ngAfterViewInit(): void;
  239. ngAfterContentInit(): void;
  240. /** Sends any changes that could affect the layout of the items. */
  241. private _itemsResized;
  242. ngAfterContentChecked(): void;
  243. ngOnDestroy(): void;
  244. /** Handles keyboard events on the header. */
  245. _handleKeydown(event: KeyboardEvent): void;
  246. /**
  247. * Callback for when the MutationObserver detects that the content has changed.
  248. */
  249. _onContentChanges(): void;
  250. /**
  251. * Updates the view whether pagination should be enabled or not.
  252. *
  253. * WARNING: Calling this method can be very costly in terms of performance. It should be called
  254. * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
  255. * page.
  256. */
  257. updatePagination(): void;
  258. /** Tracks which element has focus; used for keyboard navigation */
  259. get focusIndex(): number;
  260. /** When the focus index is set, we must manually send focus to the correct label */
  261. set focusIndex(value: number);
  262. /**
  263. * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
  264. * providing a valid index and return true.
  265. */
  266. _isValidIndex(index: number): boolean;
  267. /**
  268. * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
  269. * scrolling is enabled.
  270. */
  271. _setTabFocus(tabIndex: number): void;
  272. /** The layout direction of the containing app. */
  273. _getLayoutDirection(): Direction;
  274. /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
  275. _updateTabScrollPosition(): void;
  276. /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
  277. get scrollDistance(): number;
  278. set scrollDistance(value: number);
  279. /**
  280. * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
  281. * the end of the list, respectively). The distance to scroll is computed to be a third of the
  282. * length of the tab list view window.
  283. *
  284. * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
  285. * should be called sparingly.
  286. */
  287. _scrollHeader(direction: ScrollDirection): {
  288. maxScrollDistance: number;
  289. distance: number;
  290. };
  291. /** Handles click events on the pagination arrows. */
  292. _handlePaginatorClick(direction: ScrollDirection): void;
  293. /**
  294. * Moves the tab list such that the desired tab label (marked by index) is moved into view.
  295. *
  296. * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
  297. * should be called sparingly.
  298. */
  299. _scrollToLabel(labelIndex: number): void;
  300. /**
  301. * Evaluate whether the pagination controls should be displayed. If the scroll width of the
  302. * tab list is wider than the size of the header container, then the pagination controls should
  303. * be shown.
  304. *
  305. * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
  306. * should be called sparingly.
  307. */
  308. _checkPaginationEnabled(): void;
  309. /**
  310. * Evaluate whether the before and after controls should be enabled or disabled.
  311. * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
  312. * before button. If the header is at the end of the list (scroll distance is equal to the
  313. * maximum distance we can scroll), then disable the after button.
  314. *
  315. * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
  316. * should be called sparingly.
  317. */
  318. _checkScrollingControls(): void;
  319. /**
  320. * Determines what is the maximum length in pixels that can be set for the scroll distance. This
  321. * is equal to the difference in width between the tab list container and tab header container.
  322. *
  323. * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
  324. * should be called sparingly.
  325. */
  326. _getMaxScrollDistance(): number;
  327. /** Tells the ink-bar to align itself to the current label wrapper */
  328. _alignInkBarToSelectedTab(): void;
  329. /** Stops the currently-running paginator interval. */
  330. _stopInterval(): void;
  331. /**
  332. * Handles the user pressing down on one of the paginators.
  333. * Starts scrolling the header after a certain amount of time.
  334. * @param direction In which direction the paginator should be scrolled.
  335. */
  336. _handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent): void;
  337. /**
  338. * Scrolls the header to a given position.
  339. * @param position Position to which to scroll.
  340. * @returns Information on the current scroll distance and the maximum.
  341. */
  342. private _scrollTo;
  343. static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginatedTabHeader, [null, null, null, { optional: true; }, null, null, { optional: true; }]>;
  344. static ɵdir: i0.ɵɵDirectiveDeclaration<MatPaginatedTabHeader, never, never, { "disablePagination": { "alias": "disablePagination"; "required": false; }; }, {}, never, never, false, never>;
  345. }
  346. /** Item inside a paginated tab header. */
  347. declare type MatPaginatedTabHeaderItem = FocusableOption & {
  348. elementRef: ElementRef;
  349. };
  350. export declare class MatTab extends _MatTabBase {
  351. /**
  352. * Template provided in the tab content that will be used if present, used to enable lazy-loading
  353. */
  354. _explicitContent: TemplateRef<any>;
  355. /** Content for the tab label given by `<ng-template mat-tab-label>`. */
  356. get templateLabel(): MatTabLabel;
  357. set templateLabel(value: MatTabLabel);
  358. static ɵfac: i0.ɵɵFactoryDeclaration<MatTab, never>;
  359. static ɵcmp: i0.ɵɵComponentDeclaration<MatTab, "mat-tab", ["matTab"], { "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["_explicitContent", "templateLabel"], ["*"], false, never>;
  360. }
  361. /** @docs-private */
  362. export declare class _MatTabBase extends _MatTabMixinBase implements CanDisable, OnInit, OnChanges, OnDestroy {
  363. private _viewContainerRef;
  364. _closestTabGroup: any;
  365. /** Content for the tab label given by `<ng-template mat-tab-label>`. */
  366. protected _templateLabel: MatTabLabel;
  367. /**
  368. * Template provided in the tab content that will be used if present, used to enable lazy-loading
  369. */
  370. _explicitContent: TemplateRef<any>;
  371. /** Template inside the MatTab view that contains an `<ng-content>`. */
  372. _implicitContent: TemplateRef<any>;
  373. /** Plain text label for the tab, used when there is no template label. */
  374. textLabel: string;
  375. /** Aria label for the tab. */
  376. ariaLabel: string;
  377. /**
  378. * Reference to the element that the tab is labelled by.
  379. * Will be cleared if `aria-label` is set at the same time.
  380. */
  381. ariaLabelledby: string;
  382. /**
  383. * Classes to be passed to the tab label inside the mat-tab-header container.
  384. * Supports string and string array values, same as `ngClass`.
  385. */
  386. labelClass: string | string[];
  387. /**
  388. * Classes to be passed to the tab mat-tab-body container.
  389. * Supports string and string array values, same as `ngClass`.
  390. */
  391. bodyClass: string | string[];
  392. /** Portal that will be the hosted content of the tab */
  393. private _contentPortal;
  394. /** @docs-private */
  395. get content(): TemplatePortal | null;
  396. /** Emits whenever the internal state of the tab changes. */
  397. readonly _stateChanges: Subject<void>;
  398. /**
  399. * The relatively indexed position where 0 represents the center, negative is left, and positive
  400. * represents the right.
  401. */
  402. position: number | null;
  403. /**
  404. * The initial relatively index origin of the tab if it was created and selected after there
  405. * was already a selected tab. Provides context of what position the tab should originate from.
  406. */
  407. origin: number | null;
  408. /**
  409. * Whether the tab is currently active.
  410. */
  411. isActive: boolean;
  412. constructor(_viewContainerRef: ViewContainerRef, _closestTabGroup: any);
  413. ngOnChanges(changes: SimpleChanges): void;
  414. ngOnDestroy(): void;
  415. ngOnInit(): void;
  416. /**
  417. * This has been extracted to a util because of TS 4 and VE.
  418. * View Engine doesn't support property rename inheritance.
  419. * TS 4.0 doesn't allow properties to override accessors or vice-versa.
  420. * @docs-private
  421. */
  422. protected _setTemplateLabelInput(value: MatTabLabel | undefined): void;
  423. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabBase, [null, { optional: true; }]>;
  424. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabBase, never, never, { "textLabel": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "labelClass": { "alias": "labelClass"; "required": false; }; "bodyClass": { "alias": "bodyClass"; "required": false; }; }, {}, never, never, false, never>;
  425. }
  426. /**
  427. * Wrapper for the contents of a tab.
  428. * @docs-private
  429. */
  430. export declare class MatTabBody extends _MatTabBodyBase {
  431. _portalHost: CdkPortalOutlet;
  432. constructor(elementRef: ElementRef<HTMLElement>, dir: Directionality, changeDetectorRef: ChangeDetectorRef);
  433. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabBody, [null, { optional: true; }, null]>;
  434. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabBody, "mat-tab-body", never, {}, {}, never, never, false, never>;
  435. }
  436. /**
  437. * Base class with all of the `MatTabBody` functionality.
  438. * @docs-private
  439. */
  440. export declare abstract class _MatTabBodyBase implements OnInit, OnDestroy {
  441. private _elementRef;
  442. private _dir;
  443. /** Current position of the tab-body in the tab-group. Zero means that the tab is visible. */
  444. private _positionIndex;
  445. /** Subscription to the directionality change observable. */
  446. private _dirChangeSubscription;
  447. /** Tab body position state. Used by the animation trigger for the current state. */
  448. _position: MatTabBodyPositionState;
  449. /** Emits when an animation on the tab is complete. */
  450. readonly _translateTabComplete: Subject<AnimationEvent_2>;
  451. /** Event emitted when the tab begins to animate towards the center as the active tab. */
  452. readonly _onCentering: EventEmitter<number>;
  453. /** Event emitted before the centering of the tab begins. */
  454. readonly _beforeCentering: EventEmitter<boolean>;
  455. /** Event emitted before the centering of the tab begins. */
  456. readonly _afterLeavingCenter: EventEmitter<void>;
  457. /** Event emitted when the tab completes its animation towards the center. */
  458. readonly _onCentered: EventEmitter<void>;
  459. /** The portal host inside of this container into which the tab body content will be loaded. */
  460. abstract _portalHost: CdkPortalOutlet;
  461. /** The tab body content to display. */
  462. _content: TemplatePortal;
  463. /** Position that will be used when the tab is immediately becoming visible after creation. */
  464. origin: number | null;
  465. /** Duration for the tab's animation. */
  466. animationDuration: string;
  467. /** Whether the tab's content should be kept in the DOM while it's off-screen. */
  468. preserveContent: boolean;
  469. /** The shifted index position of the tab body, where zero represents the active center tab. */
  470. set position(position: number);
  471. constructor(_elementRef: ElementRef<HTMLElement>, _dir: Directionality, changeDetectorRef: ChangeDetectorRef);
  472. /**
  473. * After initialized, check if the content is centered and has an origin. If so, set the
  474. * special position states that transition the tab from the left or right before centering.
  475. */
  476. ngOnInit(): void;
  477. ngOnDestroy(): void;
  478. _onTranslateTabStarted(event: AnimationEvent_2): void;
  479. /** The text direction of the containing app. */
  480. _getLayoutDirection(): Direction;
  481. /** Whether the provided position state is considered center, regardless of origin. */
  482. _isCenterPosition(position: MatTabBodyPositionState | string): boolean;
  483. /** Computes the position state that will be used for the tab-body animation trigger. */
  484. private _computePositionAnimationState;
  485. /**
  486. * Computes the position state based on the specified origin position. This is used if the
  487. * tab is becoming visible immediately after creation.
  488. */
  489. private _computePositionFromOrigin;
  490. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabBodyBase, [null, { optional: true; }, null]>;
  491. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabBodyBase, never, never, { "_content": { "alias": "content"; "required": false; }; "origin": { "alias": "origin"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "_onCentering": "_onCentering"; "_beforeCentering": "_beforeCentering"; "_afterLeavingCenter": "_afterLeavingCenter"; "_onCentered": "_onCentered"; }, never, never, false, never>;
  492. }
  493. /**
  494. * The origin state is an internally used state that is set on a new tab body indicating if it
  495. * began to the left or right of the prior selected index. For example, if the selected index was
  496. * set to 1, and a new tab is created and selected at index 2, then the tab body would have an
  497. * origin of right because its index was greater than the prior selected index.
  498. */
  499. export declare type MatTabBodyOriginState = 'left' | 'right';
  500. /**
  501. * The portal host directive for the contents of the tab.
  502. * @docs-private
  503. */
  504. export declare class MatTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestroy {
  505. private _host;
  506. /** Subscription to events for when the tab body begins centering. */
  507. private _centeringSub;
  508. /** Subscription to events for when the tab body finishes leaving from center position. */
  509. private _leavingSub;
  510. constructor(componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, _host: MatTabBody, _document: any);
  511. /** Set initial visibility or set up subscription for changing visibility. */
  512. ngOnInit(): void;
  513. /** Clean up centering subscription. */
  514. ngOnDestroy(): void;
  515. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabBodyPortal, never>;
  516. static ɵdir: i0.ɵɵDirectiveDeclaration<MatTabBodyPortal, "[matTabBodyHost]", never, {}, {}, never, never, false, never>;
  517. }
  518. /**
  519. * These position states are used internally as animation states for the tab body. Setting the
  520. * position state to left, right, or center will transition the tab body from its current
  521. * position to its respective state. If there is not current position (void, in the case of a new
  522. * tab body), then there will be no transition animation to its state.
  523. *
  524. * In the case of a new tab body that should immediately be centered with an animating transition,
  525. * then left-origin-center or right-origin-center can be used, which will use left or right as its
  526. * pseudo-prior state.
  527. */
  528. export declare type MatTabBodyPositionState = 'left' | 'center' | 'right' | 'left-origin-center' | 'right-origin-center';
  529. /** A simple change event emitted on focus or selection changes. */
  530. export declare class MatTabChangeEvent {
  531. /** Index of the currently-selected tab. */
  532. index: number;
  533. /** Reference to the currently-selected tab. */
  534. tab: MatTab;
  535. }
  536. /** Decorates the `ng-template` tags and reads out the template from it. */
  537. export declare class MatTabContent {
  538. template: TemplateRef<any>;
  539. constructor(/** Content for the tab. */ template: TemplateRef<any>);
  540. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabContent, never>;
  541. static ɵdir: i0.ɵɵDirectiveDeclaration<MatTabContent, "[matTabContent]", never, {}, {}, never, never, false, never>;
  542. }
  543. /**
  544. * Material design tab-group component. Supports basic tab pairs (label + content) and includes
  545. * animated ink-bar, keyboard navigation, and screen reader.
  546. * See: https://material.io/design/components/tabs.html
  547. */
  548. export declare class MatTabGroup extends _MatTabGroupBase {
  549. _allTabs: QueryList<MatTab>;
  550. _tabBodyWrapper: ElementRef;
  551. _tabHeader: MatTabHeader;
  552. /** Whether the ink bar should fit its width to the size of the tab label content. */
  553. get fitInkBarToContent(): boolean;
  554. set fitInkBarToContent(v: BooleanInput);
  555. private _fitInkBarToContent;
  556. /** Whether tabs should be stretched to fill the header. */
  557. get stretchTabs(): boolean;
  558. set stretchTabs(v: BooleanInput);
  559. private _stretchTabs;
  560. constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, defaultConfig?: MatTabsConfig, animationMode?: string);
  561. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabGroup, [null, null, { optional: true; }, { optional: true; }]>;
  562. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabGroup, "mat-tab-group", ["matTabGroup"], { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "fitInkBarToContent": { "alias": "fitInkBarToContent"; "required": false; }; "stretchTabs": { "alias": "mat-stretch-tabs"; "required": false; }; }, {}, ["_allTabs"], never, false, never>;
  563. }
  564. /**
  565. * Base class with all of the `MatTabGroupBase` functionality.
  566. * @docs-private
  567. */
  568. export declare abstract class _MatTabGroupBase extends _MatTabGroupMixinBase implements AfterContentInit, AfterContentChecked, OnDestroy, CanColor, CanDisableRipple {
  569. protected _changeDetectorRef: ChangeDetectorRef;
  570. _animationMode?: string | undefined;
  571. /**
  572. * All tabs inside the tab group. This includes tabs that belong to groups that are nested
  573. * inside the current one. We filter out only the tabs that belong to this group in `_tabs`.
  574. */
  575. abstract _allTabs: QueryList<MatTab>;
  576. abstract _tabBodyWrapper: ElementRef;
  577. abstract _tabHeader: MatTabGroupBaseHeader;
  578. /** All of the tabs that belong to the group. */
  579. _tabs: QueryList<MatTab>;
  580. /** The tab index that should be selected after the content has been checked. */
  581. private _indexToSelect;
  582. /** Index of the tab that was focused last. */
  583. private _lastFocusedTabIndex;
  584. /** Snapshot of the height of the tab body wrapper before another tab is activated. */
  585. private _tabBodyWrapperHeight;
  586. /** Subscription to tabs being added/removed. */
  587. private _tabsSubscription;
  588. /** Subscription to changes in the tab labels. */
  589. private _tabLabelSubscription;
  590. /** Whether the tab group should grow to the size of the active tab. */
  591. get dynamicHeight(): boolean;
  592. set dynamicHeight(value: BooleanInput);
  593. private _dynamicHeight;
  594. /** The index of the active tab. */
  595. get selectedIndex(): number | null;
  596. set selectedIndex(value: NumberInput);
  597. private _selectedIndex;
  598. /** Position of the tab header. */
  599. headerPosition: MatTabHeaderPosition;
  600. /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */
  601. get animationDuration(): string;
  602. set animationDuration(value: NumberInput);
  603. private _animationDuration;
  604. /**
  605. * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved
  606. * accessibility when the tab does not have focusable elements or if it has scrollable content.
  607. * The `tabindex` will be removed automatically for inactive tabs.
  608. * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html
  609. */
  610. get contentTabIndex(): number | null;
  611. set contentTabIndex(value: NumberInput);
  612. private _contentTabIndex;
  613. /**
  614. * Whether pagination should be disabled. This can be used to avoid unnecessary
  615. * layout recalculations if it's known that pagination won't be required.
  616. */
  617. get disablePagination(): boolean;
  618. set disablePagination(value: BooleanInput);
  619. private _disablePagination;
  620. /**
  621. * By default tabs remove their content from the DOM while it's off-screen.
  622. * Setting this to `true` will keep it in the DOM which will prevent elements
  623. * like iframes and videos from reloading next time it comes back into the view.
  624. */
  625. get preserveContent(): boolean;
  626. set preserveContent(value: BooleanInput);
  627. private _preserveContent;
  628. /** Background color of the tab group. */
  629. get backgroundColor(): ThemePalette;
  630. set backgroundColor(value: ThemePalette);
  631. private _backgroundColor;
  632. /** Output to enable support for two-way binding on `[(selectedIndex)]` */
  633. readonly selectedIndexChange: EventEmitter<number>;
  634. /** Event emitted when focus has changed within a tab group. */
  635. readonly focusChange: EventEmitter<MatTabChangeEvent>;
  636. /** Event emitted when the body animation has completed */
  637. readonly animationDone: EventEmitter<void>;
  638. /** Event emitted when the tab selection has changed. */
  639. readonly selectedTabChange: EventEmitter<MatTabChangeEvent>;
  640. private _groupId;
  641. constructor(elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, defaultConfig?: MatTabsConfig, _animationMode?: string | undefined);
  642. /**
  643. * After the content is checked, this component knows what tabs have been defined
  644. * and what the selected index should be. This is where we can know exactly what position
  645. * each tab should be in according to the new selected index, and additionally we know how
  646. * a new selected tab should transition in (from the left or right).
  647. */
  648. ngAfterContentChecked(): void;
  649. ngAfterContentInit(): void;
  650. /** Listens to changes in all of the tabs. */
  651. private _subscribeToAllTabChanges;
  652. ngOnDestroy(): void;
  653. /** Re-aligns the ink bar to the selected tab element. */
  654. realignInkBar(): void;
  655. /**
  656. * Recalculates the tab group's pagination dimensions.
  657. *
  658. * WARNING: Calling this method can be very costly in terms of performance. It should be called
  659. * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
  660. * page.
  661. */
  662. updatePagination(): void;
  663. /**
  664. * Sets focus to a particular tab.
  665. * @param index Index of the tab to be focused.
  666. */
  667. focusTab(index: number): void;
  668. _focusChanged(index: number): void;
  669. private _createChangeEvent;
  670. /**
  671. * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
  672. * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
  673. * binding to be updated, we need to subscribe to changes in it and trigger change detection
  674. * manually.
  675. */
  676. private _subscribeToTabLabels;
  677. /** Clamps the given index to the bounds of 0 and the tabs length. */
  678. private _clampTabIndex;
  679. /** Returns a unique id for each tab label element */
  680. _getTabLabelId(i: number): string;
  681. /** Returns a unique id for each tab content element */
  682. _getTabContentId(i: number): string;
  683. /**
  684. * Sets the height of the body wrapper to the height of the activating tab if dynamic
  685. * height property is true.
  686. */
  687. _setTabBodyWrapperHeight(tabHeight: number): void;
  688. /** Removes the height of the tab body wrapper. */
  689. _removeTabBodyWrapperHeight(): void;
  690. /** Handle click events, setting new selected index if appropriate. */
  691. _handleClick(tab: MatTab, tabHeader: MatTabGroupBaseHeader, index: number): void;
  692. /** Retrieves the tabindex for the tab. */
  693. _getTabIndex(index: number): number;
  694. /** Callback for when the focused state of a tab has changed. */
  695. _tabFocusChanged(focusOrigin: FocusOrigin, index: number): void;
  696. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabGroupBase, [null, null, { optional: true; }, { optional: true; }]>;
  697. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabGroupBase, never, never, { "dynamicHeight": { "alias": "dynamicHeight"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "contentTabIndex": { "alias": "contentTabIndex"; "required": false; }; "disablePagination": { "alias": "disablePagination"; "required": false; }; "preserveContent": { "alias": "preserveContent"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, { "selectedIndexChange": "selectedIndexChange"; "focusChange": "focusChange"; "animationDone": "animationDone"; "selectedTabChange": "selectedTabChange"; }, never, never, false, never>;
  698. }
  699. /** @docs-private */
  700. export declare interface MatTabGroupBaseHeader {
  701. _alignInkBarToSelectedTab(): void;
  702. updatePagination(): void;
  703. focusIndex: number;
  704. }
  705. /** @docs-private */
  706. declare const _MatTabGroupMixinBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & {
  707. new (_elementRef: ElementRef): {
  708. _elementRef: ElementRef;
  709. };
  710. };
  711. /**
  712. * The header of the tab group which displays a list of all the tabs in the tab group. Includes
  713. * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
  714. * width of the header container, then arrows will be displayed to allow the user to scroll
  715. * left and right across the header.
  716. * @docs-private
  717. */
  718. export declare class MatTabHeader extends _MatTabHeaderBase implements AfterContentInit {
  719. _items: QueryList<MatTabLabelWrapper>;
  720. _tabListContainer: ElementRef;
  721. _tabList: ElementRef;
  722. _tabListInner: ElementRef;
  723. _nextPaginator: ElementRef<HTMLElement>;
  724. _previousPaginator: ElementRef<HTMLElement>;
  725. _inkBar: MatInkBar;
  726. constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, dir: Directionality, ngZone: NgZone, platform: Platform, animationMode?: string);
  727. ngAfterContentInit(): void;
  728. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabHeader, [null, null, null, { optional: true; }, null, null, { optional: true; }]>;
  729. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabHeader, "mat-tab-header", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; }, { "selectFocusedIndex": "selectFocusedIndex"; "indexFocused": "indexFocused"; }, ["_items"], ["*"], false, never>;
  730. }
  731. /**
  732. * Base class with all of the `MatTabHeader` functionality.
  733. * @docs-private
  734. */
  735. export declare abstract class _MatTabHeaderBase extends MatPaginatedTabHeader implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {
  736. /** Whether the ripple effect is disabled or not. */
  737. get disableRipple(): boolean;
  738. set disableRipple(value: BooleanInput);
  739. private _disableRipple;
  740. constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, dir: Directionality, ngZone: NgZone, platform: Platform, animationMode?: string);
  741. protected _itemSelected(event: KeyboardEvent): void;
  742. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabHeaderBase, [null, null, null, { optional: true; }, null, null, { optional: true; }]>;
  743. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabHeaderBase, never, never, { "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, never, never, false, never>;
  744. }
  745. /** Possible positions for the tab header. */
  746. export declare type MatTabHeaderPosition = 'above' | 'below';
  747. /** Used to flag tab labels for use with the portal directive */
  748. export declare class MatTabLabel extends CdkPortal {
  749. _closestTab: any;
  750. constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef, _closestTab: any);
  751. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabLabel, [null, null, { optional: true; }]>;
  752. static ɵdir: i0.ɵɵDirectiveDeclaration<MatTabLabel, "[mat-tab-label], [matTabLabel]", never, {}, {}, never, never, false, never>;
  753. }
  754. /**
  755. * Used in the `mat-tab-group` view to display tab labels.
  756. * @docs-private
  757. */
  758. export declare class MatTabLabelWrapper extends _MatTabLabelWrapperBaseWithInkBarItem implements MatInkBarItem {
  759. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabLabelWrapper, never>;
  760. static ɵdir: i0.ɵɵDirectiveDeclaration<MatTabLabelWrapper, "[matTabLabelWrapper]", never, { "disabled": { "alias": "disabled"; "required": false; }; "fitInkBarToContent": { "alias": "fitInkBarToContent"; "required": false; }; }, {}, never, never, false, never>;
  761. }
  762. /**
  763. * Used in the `mat-tab-group` view to display tab labels.
  764. * @docs-private
  765. */
  766. export declare class _MatTabLabelWrapperBase extends _MatTabLabelWrapperMixinBase implements CanDisable {
  767. elementRef: ElementRef;
  768. constructor(elementRef: ElementRef);
  769. /** Sets focus on the wrapper element */
  770. focus(): void;
  771. getOffsetLeft(): number;
  772. getOffsetWidth(): number;
  773. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabLabelWrapperBase, never>;
  774. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabLabelWrapperBase, never, never, {}, {}, never, never, false, never>;
  775. }
  776. declare const _MatTabLabelWrapperBaseWithInkBarItem: typeof _MatTabLabelWrapperBase & (new (...args: any[]) => MatInkBarItem);
  777. /** @docs-private */
  778. declare const _MatTabLabelWrapperMixinBase: _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
  779. new (): {};
  780. };
  781. /**
  782. * Link inside of a `mat-tab-nav-bar`.
  783. */
  784. export declare class MatTabLink extends _MatTabLinkBaseWithInkBarItem implements MatInkBarItem, OnDestroy {
  785. private readonly _destroyed;
  786. constructor(tabNavBar: MatTabNav, elementRef: ElementRef, globalRippleOptions: RippleGlobalOptions | null, tabIndex: string, focusMonitor: FocusMonitor, animationMode?: string);
  787. ngOnDestroy(): void;
  788. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabLink, [null, null, { optional: true; }, { attribute: "tabindex"; }, null, { optional: true; }]>;
  789. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabLink, "[mat-tab-link], [matTabLink]", ["matTabLink"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "active": { "alias": "active"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, ["*"], false, never>;
  790. }
  791. /** Base class with all of the `MatTabLink` functionality. */
  792. export declare class _MatTabLinkBase extends _MatTabLinkMixinBase implements AfterViewInit, OnDestroy, CanDisable, CanDisableRipple, HasTabIndex, RippleTarget, FocusableOption {
  793. private _tabNavBar;
  794. /** @docs-private */ elementRef: ElementRef;
  795. private _focusMonitor;
  796. /** Whether the tab link is active or not. */
  797. protected _isActive: boolean;
  798. /** Whether the link is active. */
  799. get active(): boolean;
  800. set active(value: BooleanInput);
  801. /**
  802. * Ripple configuration for ripples that are launched on pointer down. The ripple config
  803. * is set to the global ripple options since we don't have any configurable options for
  804. * the tab link ripples.
  805. * @docs-private
  806. */
  807. rippleConfig: RippleConfig & RippleGlobalOptions;
  808. /**
  809. * Whether ripples are disabled on interaction.
  810. * @docs-private
  811. */
  812. get rippleDisabled(): boolean;
  813. /** Unique id for the tab. */
  814. id: string;
  815. constructor(_tabNavBar: _MatTabNavBase,
  816. /** @docs-private */ elementRef: ElementRef, globalRippleOptions: RippleGlobalOptions | null, tabIndex: string, _focusMonitor: FocusMonitor, animationMode?: string);
  817. /** Focuses the tab link. */
  818. focus(): void;
  819. ngAfterViewInit(): void;
  820. ngOnDestroy(): void;
  821. _handleFocus(): void;
  822. _handleKeydown(event: KeyboardEvent): void;
  823. _getAriaControls(): string | null;
  824. _getAriaSelected(): string | null;
  825. _getAriaCurrent(): string | null;
  826. _getRole(): string | null;
  827. _getTabIndex(): number;
  828. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabLinkBase, [null, null, { optional: true; }, { attribute: "tabindex"; }, null, { optional: true; }]>;
  829. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabLinkBase, never, never, { "active": { "alias": "active"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, false, never>;
  830. }
  831. declare const _MatTabLinkBaseWithInkBarItem: typeof _MatTabLinkBase & (new (...args: any[]) => MatInkBarItem);
  832. declare const _MatTabLinkMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
  833. new (): {};
  834. };
  835. /** @docs-private */
  836. declare const _MatTabMixinBase: _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
  837. new (): {};
  838. };
  839. /**
  840. * Navigation component matching the styles of the tab group header.
  841. * Provides anchored navigation with animated ink bar.
  842. */
  843. export declare class MatTabNav extends _MatTabNavBase implements AfterContentInit, AfterViewInit {
  844. /** Whether the ink bar should fit its width to the size of the tab label content. */
  845. get fitInkBarToContent(): boolean;
  846. set fitInkBarToContent(v: BooleanInput);
  847. _fitInkBarToContent: BehaviorSubject<boolean>;
  848. /** Whether tabs should be stretched to fill the header. */
  849. get stretchTabs(): boolean;
  850. set stretchTabs(v: BooleanInput);
  851. private _stretchTabs;
  852. _items: QueryList<MatTabLink>;
  853. _tabListContainer: ElementRef;
  854. _tabList: ElementRef;
  855. _tabListInner: ElementRef;
  856. _nextPaginator: ElementRef<HTMLElement>;
  857. _previousPaginator: ElementRef<HTMLElement>;
  858. _inkBar: MatInkBar;
  859. constructor(elementRef: ElementRef, dir: Directionality, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, platform: Platform, animationMode?: string, defaultConfig?: MatTabsConfig);
  860. ngAfterContentInit(): void;
  861. ngAfterViewInit(): void;
  862. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabNav, [null, { optional: true; }, null, null, null, null, { optional: true; }, { optional: true; }]>;
  863. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabNav, "[mat-tab-nav-bar]", ["matTabNavBar", "matTabNav"], { "color": { "alias": "color"; "required": false; }; "fitInkBarToContent": { "alias": "fitInkBarToContent"; "required": false; }; "stretchTabs": { "alias": "mat-stretch-tabs"; "required": false; }; }, {}, ["_items"], ["*"], false, never>;
  864. }
  865. /**
  866. * Base class with all of the `MatTabNav` functionality.
  867. * @docs-private
  868. */
  869. export declare abstract class _MatTabNavBase extends MatPaginatedTabHeader implements AfterContentChecked, AfterContentInit, OnDestroy {
  870. /** Query list of all tab links of the tab navigation. */
  871. abstract _items: QueryList<MatPaginatedTabHeaderItem & {
  872. active: boolean;
  873. id: string;
  874. }>;
  875. /** Background color of the tab nav. */
  876. get backgroundColor(): ThemePalette;
  877. set backgroundColor(value: ThemePalette);
  878. private _backgroundColor;
  879. /** Whether the ripple effect is disabled or not. */
  880. get disableRipple(): boolean;
  881. set disableRipple(value: BooleanInput);
  882. private _disableRipple;
  883. /** Theme color of the nav bar. */
  884. color: ThemePalette;
  885. /**
  886. * Associated tab panel controlled by the nav bar. If not provided, then the nav bar
  887. * follows the ARIA link / navigation landmark pattern. If provided, it follows the
  888. * ARIA tabs design pattern.
  889. */
  890. tabPanel?: MatTabNavPanel;
  891. constructor(elementRef: ElementRef, dir: Directionality, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, viewportRuler: ViewportRuler, platform: Platform, animationMode?: string);
  892. protected _itemSelected(): void;
  893. ngAfterContentInit(): void;
  894. /** Notifies the component that the active link has been changed. */
  895. updateActiveLink(): void;
  896. _getRole(): string | null;
  897. static ɵfac: i0.ɵɵFactoryDeclaration<_MatTabNavBase, [null, { optional: true; }, null, null, null, null, { optional: true; }]>;
  898. static ɵdir: i0.ɵɵDirectiveDeclaration<_MatTabNavBase, never, never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabPanel": { "alias": "tabPanel"; "required": false; }; }, {}, never, never, false, never>;
  899. }
  900. /**
  901. * Tab panel component associated with MatTabNav.
  902. */
  903. export declare class MatTabNavPanel {
  904. /** Unique id for the tab panel. */
  905. id: string;
  906. /** Id of the active tab in the nav bar. */
  907. _activeTabId?: string;
  908. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabNavPanel, never>;
  909. static ɵcmp: i0.ɵɵComponentDeclaration<MatTabNavPanel, "mat-tab-nav-panel", ["matTabNavPanel"], { "id": { "alias": "id"; "required": false; }; }, {}, never, ["*"], false, never>;
  910. }
  911. /**
  912. * Animations used by the Material tabs.
  913. * @docs-private
  914. */
  915. export declare const matTabsAnimations: {
  916. readonly translateTab: AnimationTriggerMetadata;
  917. };
  918. /** Object that can be used to configure the default options for the tabs module. */
  919. export declare interface MatTabsConfig {
  920. /** Duration for the tab animation. Must be a valid CSS value (e.g. 600ms). */
  921. animationDuration?: string;
  922. /**
  923. * Whether pagination should be disabled. This can be used to avoid unnecessary
  924. * layout recalculations if it's known that pagination won't be required.
  925. */
  926. disablePagination?: boolean;
  927. /**
  928. * Whether the ink bar should fit its width to the size of the tab label content.
  929. * This only applies to the MDC-based tabs.
  930. */
  931. fitInkBarToContent?: boolean;
  932. /** Whether the tab group should grow to the size of the active tab. */
  933. dynamicHeight?: boolean;
  934. /** `tabindex` to be set on the inner element that wraps the tab content. */
  935. contentTabIndex?: number;
  936. /**
  937. * By default tabs remove their content from the DOM while it's off-screen.
  938. * Setting this to `true` will keep it in the DOM which will prevent elements
  939. * like iframes and videos from reloading next time it comes back into the view.
  940. */
  941. preserveContent?: boolean;
  942. /** Whether tabs should be stretched to fill the header. */
  943. stretchTabs?: boolean;
  944. }
  945. export declare class MatTabsModule {
  946. static ɵfac: i0.ɵɵFactoryDeclaration<MatTabsModule, never>;
  947. static ɵmod: i0.ɵɵNgModuleDeclaration<MatTabsModule, [typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabNavPanel, typeof i5.MatTabLink, typeof i6.MatTabBody, typeof i6.MatTabBodyPortal, typeof i7.MatTabLabelWrapper, typeof i8.MatTabHeader], [typeof i9.CommonModule, typeof i10.MatCommonModule, typeof i11.PortalModule, typeof i10.MatRippleModule, typeof i12.ObserversModule, typeof i13.A11yModule], [typeof i10.MatCommonModule, typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabNavPanel, typeof i5.MatTabLink]>;
  948. static ɵinj: i0.ɵɵInjectorDeclaration<MatTabsModule>;
  949. }
  950. /**
  951. * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'
  952. * will scroll the header towards the end of the tabs list and 'before' will scroll towards the
  953. * beginning of the list.
  954. */
  955. export declare type ScrollDirection = 'after' | 'before';
  956. export { }