/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Directive, ElementRef } from '@angular/core'; import { mixinInkBarItem } from './ink-bar'; import { mixinDisabled } from '@angular/material/core'; import * as i0 from "@angular/core"; // Boilerplate for applying mixins to MatTabLabelWrapper. /** @docs-private */ const _MatTabLabelWrapperMixinBase = mixinDisabled(class { }); /** * Used in the `mat-tab-group` view to display tab labels. * @docs-private */ export class _MatTabLabelWrapperBase extends _MatTabLabelWrapperMixinBase { constructor(elementRef) { super(); this.elementRef = elementRef; } /** Sets focus on the wrapper element */ focus() { this.elementRef.nativeElement.focus(); } getOffsetLeft() { return this.elementRef.nativeElement.offsetLeft; } getOffsetWidth() { return this.elementRef.nativeElement.offsetWidth; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: _MatTabLabelWrapperBase, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: _MatTabLabelWrapperBase, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: _MatTabLabelWrapperBase, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } }); const _MatTabLabelWrapperBaseWithInkBarItem = mixinInkBarItem(_MatTabLabelWrapperBase); /** * Used in the `mat-tab-group` view to display tab labels. * @docs-private */ export class MatTabLabelWrapper extends _MatTabLabelWrapperBaseWithInkBarItem { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTabLabelWrapper, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.1", type: MatTabLabelWrapper, selector: "[matTabLabelWrapper]", inputs: { disabled: "disabled", fitInkBarToContent: "fitInkBarToContent" }, host: { properties: { "class.mat-mdc-tab-disabled": "disabled", "attr.aria-disabled": "!!disabled" } }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.1", ngImport: i0, type: MatTabLabelWrapper, decorators: [{ type: Directive, args: [{ selector: '[matTabLabelWrapper]', inputs: ['disabled', 'fitInkBarToContent'], host: { '[class.mat-mdc-tab-disabled]': 'disabled', '[attr.aria-disabled]': '!!disabled', }, }] }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWxhYmVsLXdyYXBwZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvdGFicy90YWItbGFiZWwtd3JhcHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsU0FBUyxFQUFFLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNwRCxPQUFPLEVBQWdCLGVBQWUsRUFBQyxNQUFNLFdBQVcsQ0FBQztBQUN6RCxPQUFPLEVBQWEsYUFBYSxFQUFDLE1BQU0sd0JBQXdCLENBQUM7O0FBRWpFLHlEQUF5RDtBQUN6RCxvQkFBb0I7QUFDcEIsTUFBTSw0QkFBNEIsR0FBRyxhQUFhLENBQUM7Q0FBUSxDQUFDLENBQUM7QUFFN0Q7OztHQUdHO0FBRUgsTUFBTSxPQUFPLHVCQUF3QixTQUFRLDRCQUE0QjtJQUN2RSxZQUFtQixVQUFzQjtRQUN2QyxLQUFLLEVBQUUsQ0FBQztRQURTLGVBQVUsR0FBVixVQUFVLENBQVk7SUFFekMsQ0FBQztJQUVELHdDQUF3QztJQUN4QyxLQUFLO1FBQ0gsSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQUFhLEN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