tab.d.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 { TemplatePortal } from '@angular/cdk/portal';
  9. import { OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
  10. import { CanDisable, CanDisableCtor } from '@angular/material/core';
  11. import { Subject } from 'rxjs';
  12. import { MatTabLabel } from './tab-label';
  13. /** @docs-private */
  14. declare class MatTabBase {
  15. }
  16. declare const _MatTabMixinBase: CanDisableCtor & typeof MatTabBase;
  17. export declare class MatTab extends _MatTabMixinBase implements OnInit, CanDisable, OnChanges, OnDestroy {
  18. private _viewContainerRef;
  19. /** Content for the tab label given by `<ng-template mat-tab-label>`. */
  20. templateLabel: MatTabLabel;
  21. /**
  22. * Template provided in the tab content that will be used if present, used to enable lazy-loading
  23. */
  24. _explicitContent: TemplateRef<any>;
  25. /** Template inside the MatTab view that contains an `<ng-content>`. */
  26. _implicitContent: TemplateRef<any>;
  27. /** Plain text label for the tab, used when there is no template label. */
  28. textLabel: string;
  29. /** Aria label for the tab. */
  30. ariaLabel: string;
  31. /**
  32. * Reference to the element that the tab is labelled by.
  33. * Will be cleared if `aria-label` is set at the same time.
  34. */
  35. ariaLabelledby: string;
  36. /** Portal that will be the hosted content of the tab */
  37. private _contentPortal;
  38. /** @docs-private */
  39. readonly content: TemplatePortal | null;
  40. /** Emits whenever the internal state of the tab changes. */
  41. readonly _stateChanges: Subject<void>;
  42. /**
  43. * The relatively indexed position where 0 represents the center, negative is left, and positive
  44. * represents the right.
  45. */
  46. position: number | null;
  47. /**
  48. * The initial relatively index origin of the tab if it was created and selected after there
  49. * was already a selected tab. Provides context of what position the tab should originate from.
  50. */
  51. origin: number | null;
  52. /**
  53. * Whether the tab is currently active.
  54. */
  55. isActive: boolean;
  56. constructor(_viewContainerRef: ViewContainerRef);
  57. ngOnChanges(changes: SimpleChanges): void;
  58. ngOnDestroy(): void;
  59. ngOnInit(): void;
  60. }
  61. export {};