source: trip-planner-front/node_modules/@angular/material/esm2015/tabs/tab-label-wrapper.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 4.2 KB
Line 
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 */
8import { Directive, ElementRef } from '@angular/core';
9import { mixinDisabled } from '@angular/material/core';
10// Boilerplate for applying mixins to MatTabLabelWrapper.
11/** @docs-private */
12const _MatTabLabelWrapperBase = mixinDisabled(class {
13});
14/**
15 * Used in the `mat-tab-group` view to display tab labels.
16 * @docs-private
17 */
18export class MatTabLabelWrapper extends _MatTabLabelWrapperBase {
19 constructor(elementRef) {
20 super();
21 this.elementRef = elementRef;
22 }
23 /** Sets focus on the wrapper element */
24 focus() {
25 this.elementRef.nativeElement.focus();
26 }
27 getOffsetLeft() {
28 return this.elementRef.nativeElement.offsetLeft;
29 }
30 getOffsetWidth() {
31 return this.elementRef.nativeElement.offsetWidth;
32 }
33}
34MatTabLabelWrapper.decorators = [
35 { type: Directive, args: [{
36 selector: '[matTabLabelWrapper]',
37 inputs: ['disabled'],
38 host: {
39 '[class.mat-tab-disabled]': 'disabled',
40 '[attr.aria-disabled]': '!!disabled',
41 }
42 },] }
43];
44MatTabLabelWrapper.ctorParameters = () => [
45 { type: ElementRef }
46];
47//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWxhYmVsLXdyYXBwZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvdGFicy90YWItbGFiZWwtd3JhcHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFHSCxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBQyxN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