1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { ElementRef, InjectionToken, NgZone } from '@angular/core';
|
---|
9 | /**
|
---|
10 | * Interface for a a MatInkBar positioner method, defining the positioning and width of the ink
|
---|
11 | * bar in a set of tabs.
|
---|
12 | */
|
---|
13 | export interface _MatInkBarPositioner {
|
---|
14 | (element: HTMLElement): {
|
---|
15 | left: string;
|
---|
16 | width: string;
|
---|
17 | };
|
---|
18 | }
|
---|
19 | /** Injection token for the MatInkBar's Positioner. */
|
---|
20 | export declare const _MAT_INK_BAR_POSITIONER: InjectionToken<_MatInkBarPositioner>;
|
---|
21 | /**
|
---|
22 | * The default positioner function for the MatInkBar.
|
---|
23 | * @docs-private
|
---|
24 | */
|
---|
25 | export declare function _MAT_INK_BAR_POSITIONER_FACTORY(): _MatInkBarPositioner;
|
---|
26 | /**
|
---|
27 | * The ink-bar is used to display and animate the line underneath the current active tab label.
|
---|
28 | * @docs-private
|
---|
29 | */
|
---|
30 | export declare class MatInkBar {
|
---|
31 | private _elementRef;
|
---|
32 | private _ngZone;
|
---|
33 | private _inkBarPositioner;
|
---|
34 | _animationMode?: string | undefined;
|
---|
35 | constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _inkBarPositioner: _MatInkBarPositioner, _animationMode?: string | undefined);
|
---|
36 | /**
|
---|
37 | * Calculates the styles from the provided element in order to align the ink-bar to that element.
|
---|
38 | * Shows the ink bar if previously set as hidden.
|
---|
39 | * @param element
|
---|
40 | */
|
---|
41 | alignToElement(element: HTMLElement): void;
|
---|
42 | /** Shows the ink bar. */
|
---|
43 | show(): void;
|
---|
44 | /** Hides the ink bar. */
|
---|
45 | hide(): void;
|
---|
46 | /**
|
---|
47 | * Sets the proper styles to the ink bar element.
|
---|
48 | * @param element
|
---|
49 | */
|
---|
50 | private _setStyles;
|
---|
51 | }
|
---|