@angular/material 21.0.0-next.9 → 21.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +811 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
package/fesm2022/tabs.mjs CHANGED
@@ -17,2096 +17,2419 @@ import { MatRipple, MAT_RIPPLE_GLOBAL_OPTIONS } from './_ripple-chunk.mjs';
17
17
  import '@angular/cdk/layout';
18
18
  import '@angular/cdk/coercion';
19
19
 
20
- /**
21
- * Injection token that can be used to reference instances of `MatTabContent`. It serves as
22
- * alternative token to the actual `MatTabContent` class which could cause unnecessary
23
- * retention of the class and its directive metadata.
24
- */
25
20
  const MAT_TAB_CONTENT = new InjectionToken('MatTabContent');
26
- /** Decorates the `ng-template` tags and reads out the template from it. */
27
21
  class MatTabContent {
28
- template = inject(TemplateRef);
29
- constructor() { }
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
31
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatTabContent, isStandalone: true, selector: "[matTabContent]", providers: [{ provide: MAT_TAB_CONTENT, useExisting: MatTabContent }], ngImport: i0 });
22
+ template = inject(TemplateRef);
23
+ constructor() {}
24
+ static ɵfac = i0.ɵɵngDeclareFactory({
25
+ minVersion: "12.0.0",
26
+ version: "20.2.0-next.2",
27
+ ngImport: i0,
28
+ type: MatTabContent,
29
+ deps: [],
30
+ target: i0.ɵɵFactoryTarget.Directive
31
+ });
32
+ static ɵdir = i0.ɵɵngDeclareDirective({
33
+ minVersion: "14.0.0",
34
+ version: "20.2.0-next.2",
35
+ type: MatTabContent,
36
+ isStandalone: true,
37
+ selector: "[matTabContent]",
38
+ providers: [{
39
+ provide: MAT_TAB_CONTENT,
40
+ useExisting: MatTabContent
41
+ }],
42
+ ngImport: i0
43
+ });
32
44
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabContent, decorators: [{
34
- type: Directive,
35
- args: [{
36
- selector: '[matTabContent]',
37
- providers: [{ provide: MAT_TAB_CONTENT, useExisting: MatTabContent }],
38
- }]
39
- }], ctorParameters: () => [] });
45
+ i0.ɵɵngDeclareClassMetadata({
46
+ minVersion: "12.0.0",
47
+ version: "20.2.0-next.2",
48
+ ngImport: i0,
49
+ type: MatTabContent,
50
+ decorators: [{
51
+ type: Directive,
52
+ args: [{
53
+ selector: '[matTabContent]',
54
+ providers: [{
55
+ provide: MAT_TAB_CONTENT,
56
+ useExisting: MatTabContent
57
+ }]
58
+ }]
59
+ }],
60
+ ctorParameters: () => []
61
+ });
40
62
 
41
- /**
42
- * Injection token that can be used to reference instances of `MatTabLabel`. It serves as
43
- * alternative token to the actual `MatTabLabel` class which could cause unnecessary
44
- * retention of the class and its directive metadata.
45
- */
46
63
  const MAT_TAB_LABEL = new InjectionToken('MatTabLabel');
47
- /**
48
- * Used to provide a tab label to a tab without causing a circular dependency.
49
- * @docs-private
50
- */
51
64
  const MAT_TAB = new InjectionToken('MAT_TAB');
52
- /** Used to flag tab labels for use with the portal directive */
53
65
  class MatTabLabel extends CdkPortal {
54
- _closestTab = inject(MAT_TAB, { optional: true });
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive });
56
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatTabLabel, isStandalone: true, selector: "[mat-tab-label], [matTabLabel]", providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }], usesInheritance: true, ngImport: i0 });
66
+ _closestTab = inject(MAT_TAB, {
67
+ optional: true
68
+ });
69
+ static ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "20.2.0-next.2",
72
+ ngImport: i0,
73
+ type: MatTabLabel,
74
+ deps: null,
75
+ target: i0.ɵɵFactoryTarget.Directive
76
+ });
77
+ static ɵdir = i0.ɵɵngDeclareDirective({
78
+ minVersion: "14.0.0",
79
+ version: "20.2.0-next.2",
80
+ type: MatTabLabel,
81
+ isStandalone: true,
82
+ selector: "[mat-tab-label], [matTabLabel]",
83
+ providers: [{
84
+ provide: MAT_TAB_LABEL,
85
+ useExisting: MatTabLabel
86
+ }],
87
+ usesInheritance: true,
88
+ ngImport: i0
89
+ });
57
90
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLabel, decorators: [{
59
- type: Directive,
60
- args: [{
61
- selector: '[mat-tab-label], [matTabLabel]',
62
- providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }],
63
- }]
64
- }] });
91
+ i0.ɵɵngDeclareClassMetadata({
92
+ minVersion: "12.0.0",
93
+ version: "20.2.0-next.2",
94
+ ngImport: i0,
95
+ type: MatTabLabel,
96
+ decorators: [{
97
+ type: Directive,
98
+ args: [{
99
+ selector: '[mat-tab-label], [matTabLabel]',
100
+ providers: [{
101
+ provide: MAT_TAB_LABEL,
102
+ useExisting: MatTabLabel
103
+ }]
104
+ }]
105
+ }]
106
+ });
65
107
 
66
- /**
67
- * Used to provide a tab group to a tab without causing a circular dependency.
68
- * @docs-private
69
- */
70
108
  const MAT_TAB_GROUP = new InjectionToken('MAT_TAB_GROUP');
71
109
  class MatTab {
72
- _viewContainerRef = inject(ViewContainerRef);
73
- _closestTabGroup = inject(MAT_TAB_GROUP, { optional: true });
74
- /** whether the tab is disabled. */
75
- disabled = false;
76
- /** Content for the tab label given by `<ng-template mat-tab-label>`. */
77
- get templateLabel() {
78
- return this._templateLabel;
79
- }
80
- set templateLabel(value) {
81
- this._setTemplateLabelInput(value);
82
- }
83
- _templateLabel;
84
- /**
85
- * Template provided in the tab content that will be used if present, used to enable lazy-loading
86
- */
87
- _explicitContent = undefined;
88
- /** Template inside the MatTab view that contains an `<ng-content>`. */
89
- _implicitContent;
90
- /** Plain text label for the tab, used when there is no template label. */
91
- textLabel = '';
92
- /** Aria label for the tab. */
93
- ariaLabel;
94
- /**
95
- * Reference to the element that the tab is labelled by.
96
- * Will be cleared if `aria-label` is set at the same time.
97
- */
98
- ariaLabelledby;
99
- /** Classes to be passed to the tab label inside the mat-tab-header container. */
100
- labelClass;
101
- /** Classes to be passed to the tab mat-tab-body container. */
102
- bodyClass;
103
- /**
104
- * Custom ID for the tab, overriding the auto-generated one by Material.
105
- * Note that when using this input, it's your responsibility to ensure that the ID is unique.
106
- */
107
- id = null;
108
- /** Portal that will be the hosted content of the tab */
109
- _contentPortal = null;
110
- /** @docs-private */
111
- get content() {
112
- return this._contentPortal;
113
- }
114
- /** Emits whenever the internal state of the tab changes. */
115
- _stateChanges = new Subject();
116
- /**
117
- * The relatively indexed position where 0 represents the center, negative is left, and positive
118
- * represents the right.
119
- */
120
- position = null;
121
- // TODO(crisbeto): we no longer use this, but some internal apps appear to rely on it.
122
- /**
123
- * The initial relatively index origin of the tab if it was created and selected after there
124
- * was already a selected tab. Provides context of what position the tab should originate from.
125
- */
126
- origin = null;
127
- /**
128
- * Whether the tab is currently active.
129
- */
130
- isActive = false;
131
- constructor() {
132
- inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
133
- }
134
- ngOnChanges(changes) {
135
- if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
136
- this._stateChanges.next();
137
- }
138
- }
139
- ngOnDestroy() {
140
- this._stateChanges.complete();
141
- }
142
- ngOnInit() {
143
- this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);
144
- }
145
- /**
146
- * This has been extracted to a util because of TS 4 and VE.
147
- * View Engine doesn't support property rename inheritance.
148
- * TS 4.0 doesn't allow properties to override accessors or vice-versa.
149
- * @docs-private
150
- */
151
- _setTemplateLabelInput(value) {
152
- // Only update the label if the query managed to find one. This works around an issue where a
153
- // user may have manually set `templateLabel` during creation mode, which would then get
154
- // clobbered by `undefined` when the query resolves. Also note that we check that the closest
155
- // tab matches the current one so that we don't pick up labels from nested tabs.
156
- if (value && value._closestTab === this) {
157
- this._templateLabel = value;
158
- }
159
- }
160
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
161
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTab, isStandalone: true, selector: "mat-tab", inputs: { disabled: ["disabled", "disabled", booleanAttribute], textLabel: ["label", "textLabel"], ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], labelClass: "labelClass", bodyClass: "bodyClass", id: "id" }, host: { attributes: { "hidden": "" }, properties: { "attr.id": "null" } }, providers: [{ provide: MAT_TAB, useExisting: MatTab }], queries: [{ propertyName: "templateLabel", first: true, predicate: MatTabLabel, descendants: true }, { propertyName: "_explicitContent", first: true, predicate: MatTabContent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "_implicitContent", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: ["matTab"], usesOnChanges: true, ngImport: i0, template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
110
+ _viewContainerRef = inject(ViewContainerRef);
111
+ _closestTabGroup = inject(MAT_TAB_GROUP, {
112
+ optional: true
113
+ });
114
+ disabled = false;
115
+ get templateLabel() {
116
+ return this._templateLabel;
117
+ }
118
+ set templateLabel(value) {
119
+ this._setTemplateLabelInput(value);
120
+ }
121
+ _templateLabel;
122
+ _explicitContent = undefined;
123
+ _implicitContent;
124
+ textLabel = '';
125
+ ariaLabel;
126
+ ariaLabelledby;
127
+ labelClass;
128
+ bodyClass;
129
+ id = null;
130
+ _contentPortal = null;
131
+ get content() {
132
+ return this._contentPortal;
133
+ }
134
+ _stateChanges = new Subject();
135
+ position = null;
136
+ origin = null;
137
+ isActive = false;
138
+ constructor() {
139
+ inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
140
+ }
141
+ ngOnChanges(changes) {
142
+ if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {
143
+ this._stateChanges.next();
144
+ }
145
+ }
146
+ ngOnDestroy() {
147
+ this._stateChanges.complete();
148
+ }
149
+ ngOnInit() {
150
+ this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);
151
+ }
152
+ _setTemplateLabelInput(value) {
153
+ if (value && value._closestTab === this) {
154
+ this._templateLabel = value;
155
+ }
156
+ }
157
+ static ɵfac = i0.ɵɵngDeclareFactory({
158
+ minVersion: "12.0.0",
159
+ version: "20.2.0-next.2",
160
+ ngImport: i0,
161
+ type: MatTab,
162
+ deps: [],
163
+ target: i0.ɵɵFactoryTarget.Component
164
+ });
165
+ static ɵcmp = i0.ɵɵngDeclareComponent({
166
+ minVersion: "16.1.0",
167
+ version: "20.2.0-next.2",
168
+ type: MatTab,
169
+ isStandalone: true,
170
+ selector: "mat-tab",
171
+ inputs: {
172
+ disabled: ["disabled", "disabled", booleanAttribute],
173
+ textLabel: ["label", "textLabel"],
174
+ ariaLabel: ["aria-label", "ariaLabel"],
175
+ ariaLabelledby: ["aria-labelledby", "ariaLabelledby"],
176
+ labelClass: "labelClass",
177
+ bodyClass: "bodyClass",
178
+ id: "id"
179
+ },
180
+ host: {
181
+ attributes: {
182
+ "hidden": ""
183
+ },
184
+ properties: {
185
+ "attr.id": "null"
186
+ }
187
+ },
188
+ providers: [{
189
+ provide: MAT_TAB,
190
+ useExisting: MatTab
191
+ }],
192
+ queries: [{
193
+ propertyName: "templateLabel",
194
+ first: true,
195
+ predicate: MatTabLabel,
196
+ descendants: true
197
+ }, {
198
+ propertyName: "_explicitContent",
199
+ first: true,
200
+ predicate: MatTabContent,
201
+ descendants: true,
202
+ read: TemplateRef,
203
+ static: true
204
+ }],
205
+ viewQueries: [{
206
+ propertyName: "_implicitContent",
207
+ first: true,
208
+ predicate: TemplateRef,
209
+ descendants: true,
210
+ static: true
211
+ }],
212
+ exportAs: ["matTab"],
213
+ usesOnChanges: true,
214
+ ngImport: i0,
215
+ template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n",
216
+ changeDetection: i0.ChangeDetectionStrategy.Default,
217
+ encapsulation: i0.ViewEncapsulation.None
218
+ });
162
219
  }
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTab, decorators: [{
164
- type: Component,
165
- args: [{ selector: 'mat-tab', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, exportAs: 'matTab', providers: [{ provide: MAT_TAB, useExisting: MatTab }], host: {
166
- // This element will be rendered on the server in order to support hydration.
167
- // Hide it so it doesn't cause a layout shift when it's removed on the client.
168
- 'hidden': '',
169
- // Clear any custom IDs from the tab since they'll be forwarded to the actual tab.
170
- '[attr.id]': 'null',
171
- }, template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n" }]
172
- }], ctorParameters: () => [], propDecorators: { disabled: [{
173
- type: Input,
174
- args: [{ transform: booleanAttribute }]
175
- }], templateLabel: [{
176
- type: ContentChild,
177
- args: [MatTabLabel]
178
- }], _explicitContent: [{
179
- type: ContentChild,
180
- args: [MatTabContent, { read: TemplateRef, static: true }]
181
- }], _implicitContent: [{
182
- type: ViewChild,
183
- args: [TemplateRef, { static: true }]
184
- }], textLabel: [{
185
- type: Input,
186
- args: ['label']
187
- }], ariaLabel: [{
188
- type: Input,
189
- args: ['aria-label']
190
- }], ariaLabelledby: [{
191
- type: Input,
192
- args: ['aria-labelledby']
193
- }], labelClass: [{
194
- type: Input
195
- }], bodyClass: [{
196
- type: Input
197
- }], id: [{
198
- type: Input
199
- }] } });
220
+ i0.ɵɵngDeclareClassMetadata({
221
+ minVersion: "12.0.0",
222
+ version: "20.2.0-next.2",
223
+ ngImport: i0,
224
+ type: MatTab,
225
+ decorators: [{
226
+ type: Component,
227
+ args: [{
228
+ selector: 'mat-tab',
229
+ changeDetection: ChangeDetectionStrategy.Default,
230
+ encapsulation: ViewEncapsulation.None,
231
+ exportAs: 'matTab',
232
+ providers: [{
233
+ provide: MAT_TAB,
234
+ useExisting: MatTab
235
+ }],
236
+ host: {
237
+ 'hidden': '',
238
+ '[attr.id]': 'null'
239
+ },
240
+ template: "<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\n tab-group. -->\n<ng-template><ng-content></ng-content></ng-template>\n"
241
+ }]
242
+ }],
243
+ ctorParameters: () => [],
244
+ propDecorators: {
245
+ disabled: [{
246
+ type: Input,
247
+ args: [{
248
+ transform: booleanAttribute
249
+ }]
250
+ }],
251
+ templateLabel: [{
252
+ type: ContentChild,
253
+ args: [MatTabLabel]
254
+ }],
255
+ _explicitContent: [{
256
+ type: ContentChild,
257
+ args: [MatTabContent, {
258
+ read: TemplateRef,
259
+ static: true
260
+ }]
261
+ }],
262
+ _implicitContent: [{
263
+ type: ViewChild,
264
+ args: [TemplateRef, {
265
+ static: true
266
+ }]
267
+ }],
268
+ textLabel: [{
269
+ type: Input,
270
+ args: ['label']
271
+ }],
272
+ ariaLabel: [{
273
+ type: Input,
274
+ args: ['aria-label']
275
+ }],
276
+ ariaLabelledby: [{
277
+ type: Input,
278
+ args: ['aria-labelledby']
279
+ }],
280
+ labelClass: [{
281
+ type: Input
282
+ }],
283
+ bodyClass: [{
284
+ type: Input
285
+ }],
286
+ id: [{
287
+ type: Input
288
+ }]
289
+ }
290
+ });
200
291
 
201
- /** Class that is applied when a tab indicator is active. */
202
292
  const ACTIVE_CLASS = 'mdc-tab-indicator--active';
203
- /** Class that is applied when the tab indicator should not transition. */
204
293
  const NO_TRANSITION_CLASS = 'mdc-tab-indicator--no-transition';
205
- /**
206
- * Abstraction around the MDC tab indicator that acts as the tab header's ink bar.
207
- * @docs-private
208
- */
209
294
  class MatInkBar {
210
- _items;
211
- /** Item to which the ink bar is aligned currently. */
212
- _currentItem;
213
- constructor(_items) {
214
- this._items = _items;
215
- }
216
- /** Hides the ink bar. */
217
- hide() {
218
- this._items.forEach(item => item.deactivateInkBar());
219
- this._currentItem = undefined;
220
- }
221
- /** Aligns the ink bar to a DOM node. */
222
- alignToElement(element) {
223
- const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);
224
- const currentItem = this._currentItem;
225
- if (correspondingItem === currentItem) {
226
- return;
227
- }
228
- currentItem?.deactivateInkBar();
229
- if (correspondingItem) {
230
- const domRect = currentItem?.elementRef.nativeElement.getBoundingClientRect?.();
231
- // The ink bar won't animate unless we give it the `DOMRect` of the previous item.
232
- correspondingItem.activateInkBar(domRect);
233
- this._currentItem = correspondingItem;
234
- }
235
- }
295
+ _items;
296
+ _currentItem;
297
+ constructor(_items) {
298
+ this._items = _items;
299
+ }
300
+ hide() {
301
+ this._items.forEach(item => item.deactivateInkBar());
302
+ this._currentItem = undefined;
303
+ }
304
+ alignToElement(element) {
305
+ const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);
306
+ const currentItem = this._currentItem;
307
+ if (correspondingItem === currentItem) {
308
+ return;
309
+ }
310
+ currentItem?.deactivateInkBar();
311
+ if (correspondingItem) {
312
+ const domRect = currentItem?.elementRef.nativeElement.getBoundingClientRect?.();
313
+ correspondingItem.activateInkBar(domRect);
314
+ this._currentItem = correspondingItem;
315
+ }
316
+ }
236
317
  }
237
318
  class InkBarItem {
238
- _elementRef = inject(ElementRef);
239
- _inkBarElement;
240
- _inkBarContentElement;
241
- _fitToContent = false;
242
- /** Whether the ink bar should fit to the entire tab or just its content. */
243
- get fitInkBarToContent() {
244
- return this._fitToContent;
245
- }
246
- set fitInkBarToContent(newValue) {
247
- if (this._fitToContent !== newValue) {
248
- this._fitToContent = newValue;
249
- if (this._inkBarElement) {
250
- this._appendInkBarElement();
251
- }
252
- }
253
- }
254
- /** Aligns the ink bar to the current item. */
255
- activateInkBar(previousIndicatorClientRect) {
256
- const element = this._elementRef.nativeElement;
257
- // Early exit if no indicator is present to handle cases where an indicator
258
- // may be activated without a prior indicator state
259
- if (!previousIndicatorClientRect ||
260
- !element.getBoundingClientRect ||
261
- !this._inkBarContentElement) {
262
- element.classList.add(ACTIVE_CLASS);
263
- return;
264
- }
265
- // This animation uses the FLIP approach. You can read more about it at the link below:
266
- // https://aerotwist.com/blog/flip-your-animations/
267
- // Calculate the dimensions based on the dimensions of the previous indicator
268
- const currentClientRect = element.getBoundingClientRect();
269
- const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;
270
- const xPosition = previousIndicatorClientRect.left - currentClientRect.left;
271
- element.classList.add(NO_TRANSITION_CLASS);
272
- this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);
273
- // Force repaint before updating classes and transform to ensure the transform properly takes effect
274
- element.getBoundingClientRect();
275
- element.classList.remove(NO_TRANSITION_CLASS);
276
- element.classList.add(ACTIVE_CLASS);
277
- this._inkBarContentElement.style.setProperty('transform', '');
278
- }
279
- /** Removes the ink bar from the current item. */
280
- deactivateInkBar() {
281
- this._elementRef.nativeElement.classList.remove(ACTIVE_CLASS);
282
- }
283
- /** Initializes the foundation. */
284
- ngOnInit() {
285
- this._createInkBarElement();
286
- }
287
- /** Destroys the foundation. */
288
- ngOnDestroy() {
289
- this._inkBarElement?.remove();
290
- this._inkBarElement = this._inkBarContentElement = null;
291
- }
292
- /** Creates and appends the ink bar element. */
293
- _createInkBarElement() {
294
- const documentNode = this._elementRef.nativeElement.ownerDocument || document;
295
- const inkBarElement = (this._inkBarElement = documentNode.createElement('span'));
296
- const inkBarContentElement = (this._inkBarContentElement = documentNode.createElement('span'));
297
- inkBarElement.className = 'mdc-tab-indicator';
298
- inkBarContentElement.className =
299
- 'mdc-tab-indicator__content mdc-tab-indicator__content--underline';
300
- inkBarElement.appendChild(this._inkBarContentElement);
319
+ _elementRef = inject(ElementRef);
320
+ _inkBarElement;
321
+ _inkBarContentElement;
322
+ _fitToContent = false;
323
+ get fitInkBarToContent() {
324
+ return this._fitToContent;
325
+ }
326
+ set fitInkBarToContent(newValue) {
327
+ if (this._fitToContent !== newValue) {
328
+ this._fitToContent = newValue;
329
+ if (this._inkBarElement) {
301
330
  this._appendInkBarElement();
302
- }
303
- /**
304
- * Appends the ink bar to the tab host element or content, depending on whether
305
- * the ink bar should fit to content.
306
- */
307
- _appendInkBarElement() {
308
- if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
309
- throw Error('Ink bar element has not been created and cannot be appended');
310
- }
311
- const parentElement = this._fitToContent
312
- ? this._elementRef.nativeElement.querySelector('.mdc-tab__content')
313
- : this._elementRef.nativeElement;
314
- if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
315
- throw Error('Missing element to host the ink bar');
316
- }
317
- parentElement.appendChild(this._inkBarElement);
318
- }
319
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: InkBarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
320
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: InkBarItem, isStandalone: true, inputs: { fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute] }, ngImport: i0 });
331
+ }
332
+ }
333
+ }
334
+ activateInkBar(previousIndicatorClientRect) {
335
+ const element = this._elementRef.nativeElement;
336
+ if (!previousIndicatorClientRect || !element.getBoundingClientRect || !this._inkBarContentElement) {
337
+ element.classList.add(ACTIVE_CLASS);
338
+ return;
339
+ }
340
+ const currentClientRect = element.getBoundingClientRect();
341
+ const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;
342
+ const xPosition = previousIndicatorClientRect.left - currentClientRect.left;
343
+ element.classList.add(NO_TRANSITION_CLASS);
344
+ this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);
345
+ element.getBoundingClientRect();
346
+ element.classList.remove(NO_TRANSITION_CLASS);
347
+ element.classList.add(ACTIVE_CLASS);
348
+ this._inkBarContentElement.style.setProperty('transform', '');
349
+ }
350
+ deactivateInkBar() {
351
+ this._elementRef.nativeElement.classList.remove(ACTIVE_CLASS);
352
+ }
353
+ ngOnInit() {
354
+ this._createInkBarElement();
355
+ }
356
+ ngOnDestroy() {
357
+ this._inkBarElement?.remove();
358
+ this._inkBarElement = this._inkBarContentElement = null;
359
+ }
360
+ _createInkBarElement() {
361
+ const documentNode = this._elementRef.nativeElement.ownerDocument || document;
362
+ const inkBarElement = this._inkBarElement = documentNode.createElement('span');
363
+ const inkBarContentElement = this._inkBarContentElement = documentNode.createElement('span');
364
+ inkBarElement.className = 'mdc-tab-indicator';
365
+ inkBarContentElement.className = 'mdc-tab-indicator__content mdc-tab-indicator__content--underline';
366
+ inkBarElement.appendChild(this._inkBarContentElement);
367
+ this._appendInkBarElement();
368
+ }
369
+ _appendInkBarElement() {
370
+ if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
371
+ throw Error('Ink bar element has not been created and cannot be appended');
372
+ }
373
+ const parentElement = this._fitToContent ? this._elementRef.nativeElement.querySelector('.mdc-tab__content') : this._elementRef.nativeElement;
374
+ if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
375
+ throw Error('Missing element to host the ink bar');
376
+ }
377
+ parentElement.appendChild(this._inkBarElement);
378
+ }
379
+ static ɵfac = i0.ɵɵngDeclareFactory({
380
+ minVersion: "12.0.0",
381
+ version: "20.2.0-next.2",
382
+ ngImport: i0,
383
+ type: InkBarItem,
384
+ deps: [],
385
+ target: i0.ɵɵFactoryTarget.Directive
386
+ });
387
+ static ɵdir = i0.ɵɵngDeclareDirective({
388
+ minVersion: "16.1.0",
389
+ version: "20.2.0-next.2",
390
+ type: InkBarItem,
391
+ isStandalone: true,
392
+ inputs: {
393
+ fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute]
394
+ },
395
+ ngImport: i0
396
+ });
321
397
  }
322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: InkBarItem, decorators: [{
323
- type: Directive
324
- }], propDecorators: { fitInkBarToContent: [{
325
- type: Input,
326
- args: [{ transform: booleanAttribute }]
327
- }] } });
328
- /** Injection token for the MatInkBar's Positioner. */
398
+ i0.ɵɵngDeclareClassMetadata({
399
+ minVersion: "12.0.0",
400
+ version: "20.2.0-next.2",
401
+ ngImport: i0,
402
+ type: InkBarItem,
403
+ decorators: [{
404
+ type: Directive
405
+ }],
406
+ propDecorators: {
407
+ fitInkBarToContent: [{
408
+ type: Input,
409
+ args: [{
410
+ transform: booleanAttribute
411
+ }]
412
+ }]
413
+ }
414
+ });
329
415
  const _MAT_INK_BAR_POSITIONER = new InjectionToken('MatInkBarPositioner', {
330
- providedIn: 'root',
331
- factory: () => {
332
- const method = (element) => ({
333
- left: element ? (element.offsetLeft || 0) + 'px' : '0',
334
- width: element ? (element.offsetWidth || 0) + 'px' : '0',
335
- });
336
- return method;
337
- },
416
+ providedIn: 'root',
417
+ factory: () => {
418
+ const method = element => ({
419
+ left: element ? (element.offsetLeft || 0) + 'px' : '0',
420
+ width: element ? (element.offsetWidth || 0) + 'px' : '0'
421
+ });
422
+ return method;
423
+ }
338
424
  });
339
425
 
340
- /**
341
- * Used in the `mat-tab-group` view to display tab labels.
342
- * @docs-private
343
- */
344
426
  class MatTabLabelWrapper extends InkBarItem {
345
- elementRef = inject(ElementRef);
346
- /** Whether the tab is disabled. */
347
- disabled = false;
348
- /** Sets focus on the wrapper element */
349
- focus() {
350
- this.elementRef.nativeElement.focus();
351
- }
352
- getOffsetLeft() {
353
- return this.elementRef.nativeElement.offsetLeft;
354
- }
355
- getOffsetWidth() {
356
- return this.elementRef.nativeElement.offsetWidth;
357
- }
358
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLabelWrapper, deps: null, target: i0.ɵɵFactoryTarget.Directive });
359
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTabLabelWrapper, isStandalone: true, selector: "[matTabLabelWrapper]", inputs: { disabled: ["disabled", "disabled", booleanAttribute] }, host: { properties: { "class.mat-mdc-tab-disabled": "disabled", "attr.aria-disabled": "!!disabled" } }, usesInheritance: true, ngImport: i0 });
427
+ elementRef = inject(ElementRef);
428
+ disabled = false;
429
+ focus() {
430
+ this.elementRef.nativeElement.focus();
431
+ }
432
+ getOffsetLeft() {
433
+ return this.elementRef.nativeElement.offsetLeft;
434
+ }
435
+ getOffsetWidth() {
436
+ return this.elementRef.nativeElement.offsetWidth;
437
+ }
438
+ static ɵfac = i0.ɵɵngDeclareFactory({
439
+ minVersion: "12.0.0",
440
+ version: "20.2.0-next.2",
441
+ ngImport: i0,
442
+ type: MatTabLabelWrapper,
443
+ deps: null,
444
+ target: i0.ɵɵFactoryTarget.Directive
445
+ });
446
+ static ɵdir = i0.ɵɵngDeclareDirective({
447
+ minVersion: "16.1.0",
448
+ version: "20.2.0-next.2",
449
+ type: MatTabLabelWrapper,
450
+ isStandalone: true,
451
+ selector: "[matTabLabelWrapper]",
452
+ inputs: {
453
+ disabled: ["disabled", "disabled", booleanAttribute]
454
+ },
455
+ host: {
456
+ properties: {
457
+ "class.mat-mdc-tab-disabled": "disabled",
458
+ "attr.aria-disabled": "!!disabled"
459
+ }
460
+ },
461
+ usesInheritance: true,
462
+ ngImport: i0
463
+ });
360
464
  }
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLabelWrapper, decorators: [{
362
- type: Directive,
363
- args: [{
364
- selector: '[matTabLabelWrapper]',
365
- host: {
366
- '[class.mat-mdc-tab-disabled]': 'disabled',
367
- '[attr.aria-disabled]': '!!disabled',
368
- },
369
- }]
370
- }], propDecorators: { disabled: [{
371
- type: Input,
372
- args: [{ transform: booleanAttribute }]
373
- }] } });
465
+ i0.ɵɵngDeclareClassMetadata({
466
+ minVersion: "12.0.0",
467
+ version: "20.2.0-next.2",
468
+ ngImport: i0,
469
+ type: MatTabLabelWrapper,
470
+ decorators: [{
471
+ type: Directive,
472
+ args: [{
473
+ selector: '[matTabLabelWrapper]',
474
+ host: {
475
+ '[class.mat-mdc-tab-disabled]': 'disabled',
476
+ '[attr.aria-disabled]': '!!disabled'
477
+ }
478
+ }]
479
+ }],
480
+ propDecorators: {
481
+ disabled: [{
482
+ type: Input,
483
+ args: [{
484
+ transform: booleanAttribute
485
+ }]
486
+ }]
487
+ }
488
+ });
374
489
 
375
- /** Config used to bind passive event listeners */
376
490
  const passiveEventListenerOptions = {
377
- passive: true,
491
+ passive: true
378
492
  };
379
- /**
380
- * Amount of milliseconds to wait before starting to scroll the header automatically.
381
- * Set a little conservatively in order to handle fake events dispatched on touch devices.
382
- */
383
493
  const HEADER_SCROLL_DELAY = 650;
384
- /**
385
- * Interval in milliseconds at which to scroll the header
386
- * while the user is holding their pointer.
387
- */
388
494
  const HEADER_SCROLL_INTERVAL = 100;
389
- /**
390
- * Base class for a tab header that supported pagination.
391
- * @docs-private
392
- */
393
495
  class MatPaginatedTabHeader {
394
- _elementRef = inject(ElementRef);
395
- _changeDetectorRef = inject(ChangeDetectorRef);
396
- _viewportRuler = inject(ViewportRuler);
397
- _dir = inject(Directionality, { optional: true });
398
- _ngZone = inject(NgZone);
399
- _platform = inject(Platform);
400
- _sharedResizeObserver = inject(SharedResizeObserver);
401
- _injector = inject(Injector);
402
- _renderer = inject(Renderer2);
403
- _animationsDisabled = _animationsDisabled();
404
- _eventCleanups;
405
- /** The distance in pixels that the tab labels should be translated to the left. */
406
- _scrollDistance = 0;
407
- /** Whether the header should scroll to the selected index after the view has been checked. */
408
- _selectedIndexChanged = false;
409
- /** Emits when the component is destroyed. */
410
- _destroyed = new Subject();
411
- /** Whether the controls for pagination should be displayed */
412
- _showPaginationControls = false;
413
- /** Whether the tab list can be scrolled more towards the end of the tab label list. */
414
- _disableScrollAfter = true;
415
- /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
416
- _disableScrollBefore = true;
417
- /**
418
- * The number of tab labels that are displayed on the header. When this changes, the header
419
- * should re-evaluate the scroll position.
420
- */
421
- _tabLabelCount;
422
- /** Whether the scroll distance has changed and should be applied after the view is checked. */
423
- _scrollDistanceChanged;
424
- /** Used to manage focus between the tabs. */
425
- _keyManager;
426
- /** Cached text content of the header. */
427
- _currentTextContent;
428
- /** Stream that will stop the automated scrolling. */
429
- _stopScrolling = new Subject();
430
- /**
431
- * Whether pagination should be disabled. This can be used to avoid unnecessary
432
- * layout recalculations if it's known that pagination won't be required.
433
- */
434
- disablePagination = false;
435
- /** The index of the active tab. */
436
- get selectedIndex() {
437
- return this._selectedIndex;
438
- }
439
- set selectedIndex(v) {
440
- const value = isNaN(v) ? 0 : v;
441
- if (this._selectedIndex != value) {
442
- this._selectedIndexChanged = true;
443
- this._selectedIndex = value;
444
- if (this._keyManager) {
445
- this._keyManager.updateActiveItem(value);
446
- }
447
- }
448
- }
449
- _selectedIndex = 0;
450
- /** Event emitted when the option is selected. */
451
- selectFocusedIndex = new EventEmitter();
452
- /** Event emitted when a label is focused. */
453
- indexFocused = new EventEmitter();
454
- constructor() {
455
- // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.
456
- this._eventCleanups = this._ngZone.runOutsideAngular(() => [
457
- this._renderer.listen(this._elementRef.nativeElement, 'mouseleave', () => this._stopInterval()),
458
- ]);
459
- }
460
- ngAfterViewInit() {
461
- // We need to handle these events manually, because we want to bind passive event listeners.
462
- this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('before'), passiveEventListenerOptions), this._renderer.listen(this._nextPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('after'), passiveEventListenerOptions));
463
- }
464
- ngAfterContentInit() {
465
- const dirChange = this._dir ? this._dir.change : of('ltr');
466
- // We need to debounce resize events because the alignment logic is expensive.
467
- // If someone animates the width of tabs, we don't want to realign on every animation frame.
468
- // Once we haven't seen any more resize events in the last 32ms (~2 animaion frames) we can
469
- // re-align.
470
- const resize = this._sharedResizeObserver
471
- .observe(this._elementRef.nativeElement)
472
- .pipe(debounceTime(32), takeUntil(this._destroyed));
473
- // Note: We do not actually need to watch these events for proper functioning of the tabs,
474
- // the resize events above should capture any viewport resize that we care about. However,
475
- // removing this is fairly breaking for screenshot tests, so we're leaving it here for now.
476
- const viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));
477
- const realign = () => {
478
- this.updatePagination();
479
- this._alignInkBarToSelectedTab();
480
- };
481
- this._keyManager = new FocusKeyManager(this._items)
482
- .withHorizontalOrientation(this._getLayoutDirection())
483
- .withHomeAndEnd()
484
- .withWrap()
485
- // Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls
486
- .skipPredicate(() => false);
487
- // Fall back to the first link as being active if there isn't a selected one.
488
- // This is relevant primarily for the tab nav bar.
489
- this._keyManager.updateActiveItem(Math.max(this._selectedIndex, 0));
490
- // Note: We do not need to realign after the first render for proper functioning of the tabs
491
- // the resize events above should fire when we first start observing the element. However,
492
- // removing this is fairly breaking for screenshot tests, so we're leaving it here for now.
493
- afterNextRender(realign, { injector: this._injector });
494
- // On dir change or resize, realign the ink bar and update the orientation of
495
- // the key manager if the direction has changed.
496
- merge(dirChange, viewportResize, resize, this._items.changes, this._itemsResized())
497
- .pipe(takeUntil(this._destroyed))
498
- .subscribe(() => {
499
- // We need to defer this to give the browser some time to recalculate
500
- // the element dimensions. The call has to be wrapped in `NgZone.run`,
501
- // because the viewport change handler runs outside of Angular.
502
- this._ngZone.run(() => {
503
- Promise.resolve().then(() => {
504
- // Clamp the scroll distance, because it can change with the number of tabs.
505
- this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));
506
- realign();
507
- });
508
- });
509
- this._keyManager?.withHorizontalOrientation(this._getLayoutDirection());
510
- });
511
- // If there is a change in the focus key manager we need to emit the `indexFocused`
512
- // event in order to provide a public event that notifies about focus changes. Also we realign
513
- // the tabs container by scrolling the new focused tab into the visible section.
514
- this._keyManager.change.subscribe(newFocusIndex => {
515
- this.indexFocused.emit(newFocusIndex);
516
- this._setTabFocus(newFocusIndex);
496
+ _elementRef = inject(ElementRef);
497
+ _changeDetectorRef = inject(ChangeDetectorRef);
498
+ _viewportRuler = inject(ViewportRuler);
499
+ _dir = inject(Directionality, {
500
+ optional: true
501
+ });
502
+ _ngZone = inject(NgZone);
503
+ _platform = inject(Platform);
504
+ _sharedResizeObserver = inject(SharedResizeObserver);
505
+ _injector = inject(Injector);
506
+ _renderer = inject(Renderer2);
507
+ _animationsDisabled = _animationsDisabled();
508
+ _eventCleanups;
509
+ _scrollDistance = 0;
510
+ _selectedIndexChanged = false;
511
+ _destroyed = new Subject();
512
+ _showPaginationControls = false;
513
+ _disableScrollAfter = true;
514
+ _disableScrollBefore = true;
515
+ _tabLabelCount;
516
+ _scrollDistanceChanged;
517
+ _keyManager;
518
+ _currentTextContent;
519
+ _stopScrolling = new Subject();
520
+ disablePagination = false;
521
+ get selectedIndex() {
522
+ return this._selectedIndex;
523
+ }
524
+ set selectedIndex(v) {
525
+ const value = isNaN(v) ? 0 : v;
526
+ if (this._selectedIndex != value) {
527
+ this._selectedIndexChanged = true;
528
+ this._selectedIndex = value;
529
+ if (this._keyManager) {
530
+ this._keyManager.updateActiveItem(value);
531
+ }
532
+ }
533
+ }
534
+ _selectedIndex = 0;
535
+ selectFocusedIndex = new EventEmitter();
536
+ indexFocused = new EventEmitter();
537
+ constructor() {
538
+ this._eventCleanups = this._ngZone.runOutsideAngular(() => [this._renderer.listen(this._elementRef.nativeElement, 'mouseleave', () => this._stopInterval())]);
539
+ }
540
+ ngAfterViewInit() {
541
+ this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('before'), passiveEventListenerOptions), this._renderer.listen(this._nextPaginator.nativeElement, 'touchstart', () => this._handlePaginatorPress('after'), passiveEventListenerOptions));
542
+ }
543
+ ngAfterContentInit() {
544
+ const dirChange = this._dir ? this._dir.change : of('ltr');
545
+ const resize = this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(debounceTime(32), takeUntil(this._destroyed));
546
+ const viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));
547
+ const realign = () => {
548
+ this.updatePagination();
549
+ this._alignInkBarToSelectedTab();
550
+ };
551
+ this._keyManager = new FocusKeyManager(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(() => false);
552
+ this._keyManager.updateActiveItem(Math.max(this._selectedIndex, 0));
553
+ afterNextRender(realign, {
554
+ injector: this._injector
555
+ });
556
+ merge(dirChange, viewportResize, resize, this._items.changes, this._itemsResized()).pipe(takeUntil(this._destroyed)).subscribe(() => {
557
+ this._ngZone.run(() => {
558
+ Promise.resolve().then(() => {
559
+ this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));
560
+ realign();
517
561
  });
518
- }
519
- /** Sends any changes that could affect the layout of the items. */
520
- _itemsResized() {
521
- if (typeof ResizeObserver !== 'function') {
522
- return EMPTY;
523
- }
524
- return this._items.changes.pipe(startWith(this._items), switchMap((tabItems) => new Observable((observer) => this._ngZone.runOutsideAngular(() => {
525
- const resizeObserver = new ResizeObserver(entries => observer.next(entries));
526
- tabItems.forEach(item => resizeObserver.observe(item.elementRef.nativeElement));
527
- return () => {
528
- resizeObserver.disconnect();
529
- };
530
- }))),
531
- // Skip the first emit since the resize observer emits when an item
532
- // is observed for new items when the tab is already inserted
533
- skip(1),
534
- // Skip emissions where all the elements are invisible since we don't want
535
- // the header to try and re-render with invalid measurements. See #25574.
536
- filter(entries => entries.some(e => e.contentRect.width > 0 && e.contentRect.height > 0)));
537
- }
538
- ngAfterContentChecked() {
539
- // If the number of tab labels have changed, check if scrolling should be enabled
540
- if (this._tabLabelCount != this._items.length) {
541
- this.updatePagination();
542
- this._tabLabelCount = this._items.length;
543
- this._changeDetectorRef.markForCheck();
544
- }
545
- // If the selected index has changed, scroll to the label and check if the scrolling controls
546
- // should be disabled.
547
- if (this._selectedIndexChanged) {
548
- this._scrollToLabel(this._selectedIndex);
549
- this._checkScrollingControls();
550
- this._alignInkBarToSelectedTab();
551
- this._selectedIndexChanged = false;
552
- this._changeDetectorRef.markForCheck();
553
- }
554
- // If the scroll distance has been changed (tab selected, focused, scroll controls activated),
555
- // then translate the header to reflect this.
556
- if (this._scrollDistanceChanged) {
557
- this._updateTabScrollPosition();
558
- this._scrollDistanceChanged = false;
559
- this._changeDetectorRef.markForCheck();
560
- }
561
- }
562
- ngOnDestroy() {
563
- this._eventCleanups.forEach(cleanup => cleanup());
564
- this._keyManager?.destroy();
565
- this._destroyed.next();
566
- this._destroyed.complete();
567
- this._stopScrolling.complete();
568
- }
569
- /** Handles keyboard events on the header. */
570
- _handleKeydown(event) {
571
- // We don't handle any key bindings with a modifier key.
572
- if (hasModifierKey(event)) {
573
- return;
574
- }
575
- switch (event.keyCode) {
576
- case ENTER:
577
- case SPACE:
578
- if (this.focusIndex !== this.selectedIndex) {
579
- const item = this._items.get(this.focusIndex);
580
- if (item && !item.disabled) {
581
- this.selectFocusedIndex.emit(this.focusIndex);
582
- this._itemSelected(event);
583
- }
584
- }
585
- break;
586
- default:
587
- this._keyManager?.onKeydown(event);
588
- }
589
- }
590
- /**
591
- * Callback for when the MutationObserver detects that the content has changed.
592
- */
593
- _onContentChanges() {
594
- const textContent = this._elementRef.nativeElement.textContent;
595
- // We need to diff the text content of the header, because the MutationObserver callback
596
- // will fire even if the text content didn't change which is inefficient and is prone
597
- // to infinite loops if a poorly constructed expression is passed in (see #14249).
598
- if (textContent !== this._currentTextContent) {
599
- this._currentTextContent = textContent || '';
600
- // The content observer runs outside the `NgZone` by default, which
601
- // means that we need to bring the callback back in ourselves.
602
- this._ngZone.run(() => {
603
- this.updatePagination();
604
- this._alignInkBarToSelectedTab();
605
- this._changeDetectorRef.markForCheck();
606
- });
607
- }
608
- }
609
- /**
610
- * Updates the view whether pagination should be enabled or not.
611
- *
612
- * WARNING: Calling this method can be very costly in terms of performance. It should be called
613
- * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
614
- * page.
615
- */
616
- updatePagination() {
617
- this._checkPaginationEnabled();
618
- this._checkScrollingControls();
619
- this._updateTabScrollPosition();
620
- }
621
- /** Tracks which element has focus; used for keyboard navigation */
622
- get focusIndex() {
623
- return this._keyManager ? this._keyManager.activeItemIndex : 0;
624
- }
625
- /** When the focus index is set, we must manually send focus to the correct label */
626
- set focusIndex(value) {
627
- if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
628
- return;
629
- }
630
- this._keyManager.setActiveItem(value);
631
- }
632
- /**
633
- * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is
634
- * providing a valid index and return true.
635
- */
636
- _isValidIndex(index) {
637
- return this._items ? !!this._items.toArray()[index] : true;
638
- }
639
- /**
640
- * Sets focus on the HTML element for the label wrapper and scrolls it into the view if
641
- * scrolling is enabled.
642
- */
643
- _setTabFocus(tabIndex) {
644
- if (this._showPaginationControls) {
645
- this._scrollToLabel(tabIndex);
646
- }
647
- if (this._items && this._items.length) {
648
- this._items.toArray()[tabIndex].focus();
649
- // Do not let the browser manage scrolling to focus the element, this will be handled
650
- // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width
651
- // should be the full width minus the offset width.
652
- const containerEl = this._tabListContainer.nativeElement;
653
- const dir = this._getLayoutDirection();
654
- if (dir == 'ltr') {
655
- containerEl.scrollLeft = 0;
656
- }
657
- else {
658
- containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
659
- }
660
- }
661
- }
662
- /** The layout direction of the containing app. */
663
- _getLayoutDirection() {
664
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
665
- }
666
- /** Performs the CSS transformation on the tab list that will cause the list to scroll. */
667
- _updateTabScrollPosition() {
668
- if (this.disablePagination) {
669
- return;
670
- }
671
- const scrollDistance = this.scrollDistance;
672
- const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
673
- // Don't use `translate3d` here because we don't want to create a new layer. A new layer
674
- // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar
675
- // and ripples will exceed the boundaries of the visible tab bar.
676
- // See: https://github.com/angular/components/issues/10276
677
- // We round the `transform` here, because transforms with sub-pixel precision cause some
678
- // browsers to blur the content of the element.
679
- this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
680
- // Setting the `transform` on IE will change the scroll offset of the parent, causing the
681
- // position to be thrown off in some cases. We have to reset it ourselves to ensure that
682
- // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing
683
- // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).
684
- if (this._platform.TRIDENT || this._platform.EDGE) {
685
- this._tabListContainer.nativeElement.scrollLeft = 0;
686
- }
687
- }
688
- /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
689
- get scrollDistance() {
690
- return this._scrollDistance;
691
- }
692
- set scrollDistance(value) {
693
- this._scrollTo(value);
694
- }
695
- /**
696
- * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or
697
- * the end of the list, respectively). The distance to scroll is computed to be a third of the
698
- * length of the tab list view window.
699
- *
700
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
701
- * should be called sparingly.
702
- */
703
- _scrollHeader(direction) {
704
- const viewLength = this._tabListContainer.nativeElement.offsetWidth;
705
- // Move the scroll distance one-third the length of the tab list's viewport.
706
- const scrollAmount = ((direction == 'before' ? -1 : 1) * viewLength) / 3;
707
- return this._scrollTo(this._scrollDistance + scrollAmount);
708
- }
709
- /** Handles click events on the pagination arrows. */
710
- _handlePaginatorClick(direction) {
711
- this._stopInterval();
712
- this._scrollHeader(direction);
713
- }
714
- /**
715
- * Moves the tab list such that the desired tab label (marked by index) is moved into view.
716
- *
717
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
718
- * should be called sparingly.
719
- */
720
- _scrollToLabel(labelIndex) {
721
- if (this.disablePagination) {
722
- return;
723
- }
724
- const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
725
- if (!selectedLabel) {
726
- return;
727
- }
728
- // The view length is the visible width of the tab labels.
729
- const viewLength = this._tabListContainer.nativeElement.offsetWidth;
730
- const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;
731
- let labelBeforePos, labelAfterPos;
732
- if (this._getLayoutDirection() == 'ltr') {
733
- labelBeforePos = offsetLeft;
734
- labelAfterPos = labelBeforePos + offsetWidth;
735
- }
736
- else {
737
- labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;
738
- labelBeforePos = labelAfterPos - offsetWidth;
739
- }
740
- const beforeVisiblePos = this.scrollDistance;
741
- const afterVisiblePos = this.scrollDistance + viewLength;
742
- if (labelBeforePos < beforeVisiblePos) {
743
- // Scroll header to move label to the before direction
744
- this.scrollDistance -= beforeVisiblePos - labelBeforePos;
745
- }
746
- else if (labelAfterPos > afterVisiblePos) {
747
- // Scroll header to move label to the after direction
748
- this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);
749
- }
750
- }
751
- /**
752
- * Evaluate whether the pagination controls should be displayed. If the scroll width of the
753
- * tab list is wider than the size of the header container, then the pagination controls should
754
- * be shown.
755
- *
756
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
757
- * should be called sparingly.
758
- */
759
- _checkPaginationEnabled() {
760
- if (this.disablePagination) {
761
- this._showPaginationControls = false;
762
- }
763
- else {
764
- const scrollWidth = this._tabListInner.nativeElement.scrollWidth;
765
- const containerWidth = this._elementRef.nativeElement.offsetWidth;
766
- // Usually checking that the scroll width is greater than the container width should be
767
- // enough, but on Safari at specific widths the browser ends up rounding up when there's
768
- // no pagination and rounding down once the pagination is added. This can throw the component
769
- // into an infinite loop where the pagination shows up and disappears constantly. We work
770
- // around it by adding a threshold to the calculation. From manual testing the threshold
771
- // can be lowered to 2px and still resolve the issue, but we set a higher one to be safe.
772
- // This shouldn't cause any content to be clipped, because tabs have a 24px horizontal
773
- // padding. See b/316395154 for more information.
774
- const isEnabled = scrollWidth - containerWidth >= 5;
775
- if (!isEnabled) {
776
- this.scrollDistance = 0;
777
- }
778
- if (isEnabled !== this._showPaginationControls) {
779
- this._showPaginationControls = isEnabled;
780
- this._changeDetectorRef.markForCheck();
781
- }
782
- }
783
- }
784
- /**
785
- * Evaluate whether the before and after controls should be enabled or disabled.
786
- * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the
787
- * before button. If the header is at the end of the list (scroll distance is equal to the
788
- * maximum distance we can scroll), then disable the after button.
789
- *
790
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
791
- * should be called sparingly.
792
- */
793
- _checkScrollingControls() {
794
- if (this.disablePagination) {
795
- this._disableScrollAfter = this._disableScrollBefore = true;
796
- }
797
- else {
798
- // Check if the pagination arrows should be activated.
799
- this._disableScrollBefore = this.scrollDistance == 0;
800
- this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
801
- this._changeDetectorRef.markForCheck();
802
- }
803
- }
804
- /**
805
- * Determines what is the maximum length in pixels that can be set for the scroll distance. This
806
- * is equal to the difference in width between the tab list container and tab header container.
807
- *
808
- * This is an expensive call that forces a layout reflow to compute box and scroll metrics and
809
- * should be called sparingly.
810
- */
811
- _getMaxScrollDistance() {
812
- const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
813
- const viewLength = this._tabListContainer.nativeElement.offsetWidth;
814
- return lengthOfTabList - viewLength || 0;
815
- }
816
- /** Tells the ink-bar to align itself to the current label wrapper */
817
- _alignInkBarToSelectedTab() {
818
- const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
819
- const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
820
- if (selectedLabelWrapper) {
821
- this._inkBar.alignToElement(selectedLabelWrapper);
822
- }
823
- else {
824
- this._inkBar.hide();
825
- }
826
- }
827
- /** Stops the currently-running paginator interval. */
828
- _stopInterval() {
829
- this._stopScrolling.next();
830
- }
831
- /**
832
- * Handles the user pressing down on one of the paginators.
833
- * Starts scrolling the header after a certain amount of time.
834
- * @param direction In which direction the paginator should be scrolled.
835
- */
836
- _handlePaginatorPress(direction, mouseEvent) {
837
- // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to
838
- // null check the `button`, but we do it so we don't break tests that use fake events.
839
- if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
840
- return;
841
- }
842
- // Avoid overlapping timers.
562
+ });
563
+ this._keyManager?.withHorizontalOrientation(this._getLayoutDirection());
564
+ });
565
+ this._keyManager.change.subscribe(newFocusIndex => {
566
+ this.indexFocused.emit(newFocusIndex);
567
+ this._setTabFocus(newFocusIndex);
568
+ });
569
+ }
570
+ _itemsResized() {
571
+ if (typeof ResizeObserver !== 'function') {
572
+ return EMPTY;
573
+ }
574
+ return this._items.changes.pipe(startWith(this._items), switchMap(tabItems => new Observable(observer => this._ngZone.runOutsideAngular(() => {
575
+ const resizeObserver = new ResizeObserver(entries => observer.next(entries));
576
+ tabItems.forEach(item => resizeObserver.observe(item.elementRef.nativeElement));
577
+ return () => {
578
+ resizeObserver.disconnect();
579
+ };
580
+ }))), skip(1), filter(entries => entries.some(e => e.contentRect.width > 0 && e.contentRect.height > 0)));
581
+ }
582
+ ngAfterContentChecked() {
583
+ if (this._tabLabelCount != this._items.length) {
584
+ this.updatePagination();
585
+ this._tabLabelCount = this._items.length;
586
+ this._changeDetectorRef.markForCheck();
587
+ }
588
+ if (this._selectedIndexChanged) {
589
+ this._scrollToLabel(this._selectedIndex);
590
+ this._checkScrollingControls();
591
+ this._alignInkBarToSelectedTab();
592
+ this._selectedIndexChanged = false;
593
+ this._changeDetectorRef.markForCheck();
594
+ }
595
+ if (this._scrollDistanceChanged) {
596
+ this._updateTabScrollPosition();
597
+ this._scrollDistanceChanged = false;
598
+ this._changeDetectorRef.markForCheck();
599
+ }
600
+ }
601
+ ngOnDestroy() {
602
+ this._eventCleanups.forEach(cleanup => cleanup());
603
+ this._keyManager?.destroy();
604
+ this._destroyed.next();
605
+ this._destroyed.complete();
606
+ this._stopScrolling.complete();
607
+ }
608
+ _handleKeydown(event) {
609
+ if (hasModifierKey(event)) {
610
+ return;
611
+ }
612
+ switch (event.keyCode) {
613
+ case ENTER:
614
+ case SPACE:
615
+ if (this.focusIndex !== this.selectedIndex) {
616
+ const item = this._items.get(this.focusIndex);
617
+ if (item && !item.disabled) {
618
+ this.selectFocusedIndex.emit(this.focusIndex);
619
+ this._itemSelected(event);
620
+ }
621
+ }
622
+ break;
623
+ default:
624
+ this._keyManager?.onKeydown(event);
625
+ }
626
+ }
627
+ _onContentChanges() {
628
+ const textContent = this._elementRef.nativeElement.textContent;
629
+ if (textContent !== this._currentTextContent) {
630
+ this._currentTextContent = textContent || '';
631
+ this._ngZone.run(() => {
632
+ this.updatePagination();
633
+ this._alignInkBarToSelectedTab();
634
+ this._changeDetectorRef.markForCheck();
635
+ });
636
+ }
637
+ }
638
+ updatePagination() {
639
+ this._checkPaginationEnabled();
640
+ this._checkScrollingControls();
641
+ this._updateTabScrollPosition();
642
+ }
643
+ get focusIndex() {
644
+ return this._keyManager ? this._keyManager.activeItemIndex : 0;
645
+ }
646
+ set focusIndex(value) {
647
+ if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {
648
+ return;
649
+ }
650
+ this._keyManager.setActiveItem(value);
651
+ }
652
+ _isValidIndex(index) {
653
+ return this._items ? !!this._items.toArray()[index] : true;
654
+ }
655
+ _setTabFocus(tabIndex) {
656
+ if (this._showPaginationControls) {
657
+ this._scrollToLabel(tabIndex);
658
+ }
659
+ if (this._items && this._items.length) {
660
+ this._items.toArray()[tabIndex].focus();
661
+ const containerEl = this._tabListContainer.nativeElement;
662
+ const dir = this._getLayoutDirection();
663
+ if (dir == 'ltr') {
664
+ containerEl.scrollLeft = 0;
665
+ } else {
666
+ containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;
667
+ }
668
+ }
669
+ }
670
+ _getLayoutDirection() {
671
+ return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
672
+ }
673
+ _updateTabScrollPosition() {
674
+ if (this.disablePagination) {
675
+ return;
676
+ }
677
+ const scrollDistance = this.scrollDistance;
678
+ const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
679
+ this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;
680
+ if (this._platform.TRIDENT || this._platform.EDGE) {
681
+ this._tabListContainer.nativeElement.scrollLeft = 0;
682
+ }
683
+ }
684
+ get scrollDistance() {
685
+ return this._scrollDistance;
686
+ }
687
+ set scrollDistance(value) {
688
+ this._scrollTo(value);
689
+ }
690
+ _scrollHeader(direction) {
691
+ const viewLength = this._tabListContainer.nativeElement.offsetWidth;
692
+ const scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;
693
+ return this._scrollTo(this._scrollDistance + scrollAmount);
694
+ }
695
+ _handlePaginatorClick(direction) {
696
+ this._stopInterval();
697
+ this._scrollHeader(direction);
698
+ }
699
+ _scrollToLabel(labelIndex) {
700
+ if (this.disablePagination) {
701
+ return;
702
+ }
703
+ const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;
704
+ if (!selectedLabel) {
705
+ return;
706
+ }
707
+ const viewLength = this._tabListContainer.nativeElement.offsetWidth;
708
+ const {
709
+ offsetLeft,
710
+ offsetWidth
711
+ } = selectedLabel.elementRef.nativeElement;
712
+ let labelBeforePos, labelAfterPos;
713
+ if (this._getLayoutDirection() == 'ltr') {
714
+ labelBeforePos = offsetLeft;
715
+ labelAfterPos = labelBeforePos + offsetWidth;
716
+ } else {
717
+ labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;
718
+ labelBeforePos = labelAfterPos - offsetWidth;
719
+ }
720
+ const beforeVisiblePos = this.scrollDistance;
721
+ const afterVisiblePos = this.scrollDistance + viewLength;
722
+ if (labelBeforePos < beforeVisiblePos) {
723
+ this.scrollDistance -= beforeVisiblePos - labelBeforePos;
724
+ } else if (labelAfterPos > afterVisiblePos) {
725
+ this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);
726
+ }
727
+ }
728
+ _checkPaginationEnabled() {
729
+ if (this.disablePagination) {
730
+ this._showPaginationControls = false;
731
+ } else {
732
+ const scrollWidth = this._tabListInner.nativeElement.scrollWidth;
733
+ const containerWidth = this._elementRef.nativeElement.offsetWidth;
734
+ const isEnabled = scrollWidth - containerWidth >= 5;
735
+ if (!isEnabled) {
736
+ this.scrollDistance = 0;
737
+ }
738
+ if (isEnabled !== this._showPaginationControls) {
739
+ this._showPaginationControls = isEnabled;
740
+ this._changeDetectorRef.markForCheck();
741
+ }
742
+ }
743
+ }
744
+ _checkScrollingControls() {
745
+ if (this.disablePagination) {
746
+ this._disableScrollAfter = this._disableScrollBefore = true;
747
+ } else {
748
+ this._disableScrollBefore = this.scrollDistance == 0;
749
+ this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();
750
+ this._changeDetectorRef.markForCheck();
751
+ }
752
+ }
753
+ _getMaxScrollDistance() {
754
+ const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;
755
+ const viewLength = this._tabListContainer.nativeElement.offsetWidth;
756
+ return lengthOfTabList - viewLength || 0;
757
+ }
758
+ _alignInkBarToSelectedTab() {
759
+ const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;
760
+ const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;
761
+ if (selectedLabelWrapper) {
762
+ this._inkBar.alignToElement(selectedLabelWrapper);
763
+ } else {
764
+ this._inkBar.hide();
765
+ }
766
+ }
767
+ _stopInterval() {
768
+ this._stopScrolling.next();
769
+ }
770
+ _handlePaginatorPress(direction, mouseEvent) {
771
+ if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {
772
+ return;
773
+ }
774
+ this._stopInterval();
775
+ timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL).pipe(takeUntil(merge(this._stopScrolling, this._destroyed))).subscribe(() => {
776
+ const {
777
+ maxScrollDistance,
778
+ distance
779
+ } = this._scrollHeader(direction);
780
+ if (distance === 0 || distance >= maxScrollDistance) {
843
781
  this._stopInterval();
844
- // Start a timer after the delay and keep firing based on the interval.
845
- timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)
846
- // Keep the timer going until something tells it to stop or the component is destroyed.
847
- .pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))
848
- .subscribe(() => {
849
- const { maxScrollDistance, distance } = this._scrollHeader(direction);
850
- // Stop the timer if we've reached the start or the end.
851
- if (distance === 0 || distance >= maxScrollDistance) {
852
- this._stopInterval();
853
- }
854
- });
855
- }
856
- /**
857
- * Scrolls the header to a given position.
858
- * @param position Position to which to scroll.
859
- * @returns Information on the current scroll distance and the maximum.
860
- */
861
- _scrollTo(position) {
862
- if (this.disablePagination) {
863
- return { maxScrollDistance: 0, distance: 0 };
864
- }
865
- const maxScrollDistance = this._getMaxScrollDistance();
866
- this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
867
- // Mark that the scroll distance has changed so that after the view is checked, the CSS
868
- // transformation can move the header.
869
- this._scrollDistanceChanged = true;
870
- this._checkScrollingControls();
871
- return { maxScrollDistance, distance: this._scrollDistance };
872
- }
873
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatPaginatedTabHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
874
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatPaginatedTabHeader, isStandalone: true, inputs: { disablePagination: ["disablePagination", "disablePagination", booleanAttribute], selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute] }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, ngImport: i0 });
782
+ }
783
+ });
784
+ }
785
+ _scrollTo(position) {
786
+ if (this.disablePagination) {
787
+ return {
788
+ maxScrollDistance: 0,
789
+ distance: 0
790
+ };
791
+ }
792
+ const maxScrollDistance = this._getMaxScrollDistance();
793
+ this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));
794
+ this._scrollDistanceChanged = true;
795
+ this._checkScrollingControls();
796
+ return {
797
+ maxScrollDistance,
798
+ distance: this._scrollDistance
799
+ };
800
+ }
801
+ static ɵfac = i0.ɵɵngDeclareFactory({
802
+ minVersion: "12.0.0",
803
+ version: "20.2.0-next.2",
804
+ ngImport: i0,
805
+ type: MatPaginatedTabHeader,
806
+ deps: [],
807
+ target: i0.ɵɵFactoryTarget.Directive
808
+ });
809
+ static ɵdir = i0.ɵɵngDeclareDirective({
810
+ minVersion: "16.1.0",
811
+ version: "20.2.0-next.2",
812
+ type: MatPaginatedTabHeader,
813
+ isStandalone: true,
814
+ inputs: {
815
+ disablePagination: ["disablePagination", "disablePagination", booleanAttribute],
816
+ selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute]
817
+ },
818
+ outputs: {
819
+ selectFocusedIndex: "selectFocusedIndex",
820
+ indexFocused: "indexFocused"
821
+ },
822
+ ngImport: i0
823
+ });
875
824
  }
876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatPaginatedTabHeader, decorators: [{
877
- type: Directive
878
- }], ctorParameters: () => [], propDecorators: { disablePagination: [{
879
- type: Input,
880
- args: [{ transform: booleanAttribute }]
881
- }], selectedIndex: [{
882
- type: Input,
883
- args: [{ transform: numberAttribute }]
884
- }], selectFocusedIndex: [{
885
- type: Output
886
- }], indexFocused: [{
887
- type: Output
888
- }] } });
825
+ i0.ɵɵngDeclareClassMetadata({
826
+ minVersion: "12.0.0",
827
+ version: "20.2.0-next.2",
828
+ ngImport: i0,
829
+ type: MatPaginatedTabHeader,
830
+ decorators: [{
831
+ type: Directive
832
+ }],
833
+ ctorParameters: () => [],
834
+ propDecorators: {
835
+ disablePagination: [{
836
+ type: Input,
837
+ args: [{
838
+ transform: booleanAttribute
839
+ }]
840
+ }],
841
+ selectedIndex: [{
842
+ type: Input,
843
+ args: [{
844
+ transform: numberAttribute
845
+ }]
846
+ }],
847
+ selectFocusedIndex: [{
848
+ type: Output
849
+ }],
850
+ indexFocused: [{
851
+ type: Output
852
+ }]
853
+ }
854
+ });
889
855
 
890
- /**
891
- * The header of the tab group which displays a list of all the tabs in the tab group. Includes
892
- * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the
893
- * width of the header container, then arrows will be displayed to allow the user to scroll
894
- * left and right across the header.
895
- * @docs-private
896
- */
897
856
  class MatTabHeader extends MatPaginatedTabHeader {
898
- _items;
899
- _tabListContainer;
900
- _tabList;
901
- _tabListInner;
902
- _nextPaginator;
903
- _previousPaginator;
904
- _inkBar;
905
- /** Aria label of the header. */
906
- ariaLabel;
907
- /** Sets the `aria-labelledby` of the header. */
908
- ariaLabelledby;
909
- /** Whether the ripple effect is disabled or not. */
910
- disableRipple = false;
911
- ngAfterContentInit() {
912
- this._inkBar = new MatInkBar(this._items);
913
- super.ngAfterContentInit();
914
- }
915
- _itemSelected(event) {
916
- event.preventDefault();
917
- }
918
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabHeader, deps: null, target: i0.ɵɵFactoryTarget.Component });
919
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTabHeader, isStandalone: true, selector: "mat-tab-header", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], disableRipple: ["disableRipple", "disableRipple", booleanAttribute] }, host: { properties: { "class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls", "class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'" }, classAttribute: "mat-mdc-tab-header" }, queries: [{ propertyName: "_items", predicate: MatTabLabelWrapper }], viewQueries: [{ propertyName: "_tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "_tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "_tabListInner", first: true, predicate: ["tabListInner"], descendants: true, static: true }, { propertyName: "_nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "_previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
857
+ _items;
858
+ _tabListContainer;
859
+ _tabList;
860
+ _tabListInner;
861
+ _nextPaginator;
862
+ _previousPaginator;
863
+ _inkBar;
864
+ ariaLabel;
865
+ ariaLabelledby;
866
+ disableRipple = false;
867
+ ngAfterContentInit() {
868
+ this._inkBar = new MatInkBar(this._items);
869
+ super.ngAfterContentInit();
870
+ }
871
+ _itemSelected(event) {
872
+ event.preventDefault();
873
+ }
874
+ static ɵfac = i0.ɵɵngDeclareFactory({
875
+ minVersion: "12.0.0",
876
+ version: "20.2.0-next.2",
877
+ ngImport: i0,
878
+ type: MatTabHeader,
879
+ deps: null,
880
+ target: i0.ɵɵFactoryTarget.Component
881
+ });
882
+ static ɵcmp = i0.ɵɵngDeclareComponent({
883
+ minVersion: "16.1.0",
884
+ version: "20.2.0-next.2",
885
+ type: MatTabHeader,
886
+ isStandalone: true,
887
+ selector: "mat-tab-header",
888
+ inputs: {
889
+ ariaLabel: ["aria-label", "ariaLabel"],
890
+ ariaLabelledby: ["aria-labelledby", "ariaLabelledby"],
891
+ disableRipple: ["disableRipple", "disableRipple", booleanAttribute]
892
+ },
893
+ host: {
894
+ properties: {
895
+ "class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls",
896
+ "class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'"
897
+ },
898
+ classAttribute: "mat-mdc-tab-header"
899
+ },
900
+ queries: [{
901
+ propertyName: "_items",
902
+ predicate: MatTabLabelWrapper
903
+ }],
904
+ viewQueries: [{
905
+ propertyName: "_tabListContainer",
906
+ first: true,
907
+ predicate: ["tabListContainer"],
908
+ descendants: true,
909
+ static: true
910
+ }, {
911
+ propertyName: "_tabList",
912
+ first: true,
913
+ predicate: ["tabList"],
914
+ descendants: true,
915
+ static: true
916
+ }, {
917
+ propertyName: "_tabListInner",
918
+ first: true,
919
+ predicate: ["tabListInner"],
920
+ descendants: true,
921
+ static: true
922
+ }, {
923
+ propertyName: "_nextPaginator",
924
+ first: true,
925
+ predicate: ["nextPaginator"],
926
+ descendants: true
927
+ }, {
928
+ propertyName: "_previousPaginator",
929
+ first: true,
930
+ predicate: ["previousPaginator"],
931
+ descendants: true
932
+ }],
933
+ usesInheritance: true,
934
+ ngImport: i0,
935
+ template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
936
+ styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"],
937
+ dependencies: [{
938
+ kind: "directive",
939
+ type: MatRipple,
940
+ selector: "[mat-ripple], [matRipple]",
941
+ inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
942
+ exportAs: ["matRipple"]
943
+ }, {
944
+ kind: "directive",
945
+ type: CdkObserveContent,
946
+ selector: "[cdkObserveContent]",
947
+ inputs: ["cdkObserveContentDisabled", "debounce"],
948
+ outputs: ["cdkObserveContent"],
949
+ exportAs: ["cdkObserveContent"]
950
+ }],
951
+ changeDetection: i0.ChangeDetectionStrategy.Default,
952
+ encapsulation: i0.ViewEncapsulation.None
953
+ });
920
954
  }
921
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabHeader, decorators: [{
922
- type: Component,
923
- args: [{ selector: 'mat-tab-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
924
- 'class': 'mat-mdc-tab-header',
925
- '[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
926
- '[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
927
- }, imports: [MatRipple, CdkObserveContent], template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"] }]
928
- }], propDecorators: { _items: [{
929
- type: ContentChildren,
930
- args: [MatTabLabelWrapper, { descendants: false }]
931
- }], _tabListContainer: [{
932
- type: ViewChild,
933
- args: ['tabListContainer', { static: true }]
934
- }], _tabList: [{
935
- type: ViewChild,
936
- args: ['tabList', { static: true }]
937
- }], _tabListInner: [{
938
- type: ViewChild,
939
- args: ['tabListInner', { static: true }]
940
- }], _nextPaginator: [{
941
- type: ViewChild,
942
- args: ['nextPaginator']
943
- }], _previousPaginator: [{
944
- type: ViewChild,
945
- args: ['previousPaginator']
946
- }], ariaLabel: [{
947
- type: Input,
948
- args: ['aria-label']
949
- }], ariaLabelledby: [{
950
- type: Input,
951
- args: ['aria-labelledby']
952
- }], disableRipple: [{
953
- type: Input,
954
- args: [{ transform: booleanAttribute }]
955
- }] } });
955
+ i0.ɵɵngDeclareClassMetadata({
956
+ minVersion: "12.0.0",
957
+ version: "20.2.0-next.2",
958
+ ngImport: i0,
959
+ type: MatTabHeader,
960
+ decorators: [{
961
+ type: Component,
962
+ args: [{
963
+ selector: 'mat-tab-header',
964
+ encapsulation: ViewEncapsulation.None,
965
+ changeDetection: ChangeDetectionStrategy.Default,
966
+ host: {
967
+ 'class': 'mat-mdc-tab-header',
968
+ '[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
969
+ '[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'"
970
+ },
971
+ imports: [MatRipple, CdkObserveContent],
972
+ template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div\n class=\"mat-mdc-tab-label-container\"\n #tabListContainer\n (keydown)=\"_handleKeydown($event)\"\n [class._mat-animation-noopable]=\"_animationsDisabled\">\n <div\n #tabList\n class=\"mat-mdc-tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-labels\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
973
+ styles: [".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}}\n"]
974
+ }]
975
+ }],
976
+ propDecorators: {
977
+ _items: [{
978
+ type: ContentChildren,
979
+ args: [MatTabLabelWrapper, {
980
+ descendants: false
981
+ }]
982
+ }],
983
+ _tabListContainer: [{
984
+ type: ViewChild,
985
+ args: ['tabListContainer', {
986
+ static: true
987
+ }]
988
+ }],
989
+ _tabList: [{
990
+ type: ViewChild,
991
+ args: ['tabList', {
992
+ static: true
993
+ }]
994
+ }],
995
+ _tabListInner: [{
996
+ type: ViewChild,
997
+ args: ['tabListInner', {
998
+ static: true
999
+ }]
1000
+ }],
1001
+ _nextPaginator: [{
1002
+ type: ViewChild,
1003
+ args: ['nextPaginator']
1004
+ }],
1005
+ _previousPaginator: [{
1006
+ type: ViewChild,
1007
+ args: ['previousPaginator']
1008
+ }],
1009
+ ariaLabel: [{
1010
+ type: Input,
1011
+ args: ['aria-label']
1012
+ }],
1013
+ ariaLabelledby: [{
1014
+ type: Input,
1015
+ args: ['aria-labelledby']
1016
+ }],
1017
+ disableRipple: [{
1018
+ type: Input,
1019
+ args: [{
1020
+ transform: booleanAttribute
1021
+ }]
1022
+ }]
1023
+ }
1024
+ });
956
1025
 
957
- /** Injection token that can be used to provide the default options the tabs module. */
958
1026
  const MAT_TABS_CONFIG = new InjectionToken('MAT_TABS_CONFIG');
959
1027
 
960
- /**
961
- * The portal host directive for the contents of the tab.
962
- * @docs-private
963
- */
964
1028
  class MatTabBodyPortal extends CdkPortalOutlet {
965
- _host = inject(MatTabBody);
966
- _ngZone = inject(NgZone);
967
- /** Subscription to events for when the tab body begins centering. */
968
- _centeringSub = Subscription.EMPTY;
969
- /** Subscription to events for when the tab body finishes leaving from center position. */
970
- _leavingSub = Subscription.EMPTY;
971
- constructor() {
972
- super();
973
- }
974
- /** Set initial visibility or set up subscription for changing visibility. */
975
- ngOnInit() {
976
- super.ngOnInit();
977
- this._centeringSub = this._host._beforeCentering
978
- .pipe(startWith(this._host._isCenterPosition()))
979
- .subscribe((isCentering) => {
980
- if (this._host._content && isCentering && !this.hasAttached()) {
981
- // Attach in the zone since the events from the tab body may be happening outside.
982
- // See: https://github.com/angular/components/issues/31867
983
- this._ngZone.run(() => {
984
- // `Promise.resolve` is necessary to destabilize the zone.
985
- // Otherwise some apps throw a `ApplicationRef.tick is called recursively` error.
986
- Promise.resolve().then();
987
- this.attach(this._host._content);
988
- });
989
- }
990
- });
991
- this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {
992
- if (!this._host.preserveContent) {
993
- this._ngZone.run(() => this.detach());
994
- }
1029
+ _host = inject(MatTabBody);
1030
+ _ngZone = inject(NgZone);
1031
+ _centeringSub = Subscription.EMPTY;
1032
+ _leavingSub = Subscription.EMPTY;
1033
+ constructor() {
1034
+ super();
1035
+ }
1036
+ ngOnInit() {
1037
+ super.ngOnInit();
1038
+ this._centeringSub = this._host._beforeCentering.pipe(startWith(this._host._isCenterPosition())).subscribe(isCentering => {
1039
+ if (this._host._content && isCentering && !this.hasAttached()) {
1040
+ this._ngZone.run(() => {
1041
+ Promise.resolve().then();
1042
+ this.attach(this._host._content);
995
1043
  });
996
- }
997
- /** Clean up centering subscription. */
998
- ngOnDestroy() {
999
- super.ngOnDestroy();
1000
- this._centeringSub.unsubscribe();
1001
- this._leavingSub.unsubscribe();
1002
- }
1003
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabBodyPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1004
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatTabBodyPortal, isStandalone: true, selector: "[matTabBodyHost]", usesInheritance: true, ngImport: i0 });
1044
+ }
1045
+ });
1046
+ this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {
1047
+ if (!this._host.preserveContent) {
1048
+ this._ngZone.run(() => this.detach());
1049
+ }
1050
+ });
1051
+ }
1052
+ ngOnDestroy() {
1053
+ super.ngOnDestroy();
1054
+ this._centeringSub.unsubscribe();
1055
+ this._leavingSub.unsubscribe();
1056
+ }
1057
+ static ɵfac = i0.ɵɵngDeclareFactory({
1058
+ minVersion: "12.0.0",
1059
+ version: "20.2.0-next.2",
1060
+ ngImport: i0,
1061
+ type: MatTabBodyPortal,
1062
+ deps: [],
1063
+ target: i0.ɵɵFactoryTarget.Directive
1064
+ });
1065
+ static ɵdir = i0.ɵɵngDeclareDirective({
1066
+ minVersion: "14.0.0",
1067
+ version: "20.2.0-next.2",
1068
+ type: MatTabBodyPortal,
1069
+ isStandalone: true,
1070
+ selector: "[matTabBodyHost]",
1071
+ usesInheritance: true,
1072
+ ngImport: i0
1073
+ });
1005
1074
  }
1006
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabBodyPortal, decorators: [{
1007
- type: Directive,
1008
- args: [{ selector: '[matTabBodyHost]' }]
1009
- }], ctorParameters: () => [] });
1010
- /**
1011
- * Wrapper for the contents of a tab.
1012
- * @docs-private
1013
- */
1075
+ i0.ɵɵngDeclareClassMetadata({
1076
+ minVersion: "12.0.0",
1077
+ version: "20.2.0-next.2",
1078
+ ngImport: i0,
1079
+ type: MatTabBodyPortal,
1080
+ decorators: [{
1081
+ type: Directive,
1082
+ args: [{
1083
+ selector: '[matTabBodyHost]'
1084
+ }]
1085
+ }],
1086
+ ctorParameters: () => []
1087
+ });
1014
1088
  class MatTabBody {
1015
- _elementRef = inject(ElementRef);
1016
- _dir = inject(Directionality, { optional: true });
1017
- _ngZone = inject(NgZone);
1018
- _injector = inject(Injector);
1019
- _renderer = inject(Renderer2);
1020
- _diAnimationsDisabled = _animationsDisabled();
1021
- _eventCleanups;
1022
- _initialized;
1023
- _fallbackTimer;
1024
- /** Current position of the tab-body in the tab-group. Zero means that the tab is visible. */
1025
- _positionIndex;
1026
- /** Subscription to the directionality change observable. */
1027
- _dirChangeSubscription = Subscription.EMPTY;
1028
- /** Current position of the body within the tab group. */
1029
- _position;
1030
- /** Previous position of the body. */
1031
- _previousPosition;
1032
- /** Event emitted when the tab begins to animate towards the center as the active tab. */
1033
- _onCentering = new EventEmitter();
1034
- /** Event emitted before the centering of the tab begins. */
1035
- _beforeCentering = new EventEmitter();
1036
- /** Event emitted before the centering of the tab begins. */
1037
- _afterLeavingCenter = new EventEmitter();
1038
- /** Event emitted when the tab completes its animation towards the center. */
1039
- _onCentered = new EventEmitter(true);
1040
- /** The portal host inside of this container into which the tab body content will be loaded. */
1041
- _portalHost;
1042
- /** Element in which the content is rendered. */
1043
- _contentElement;
1044
- /** The tab body content to display. */
1045
- _content;
1046
- // Note that the default value will always be overwritten by `MatTabBody`, but we need one
1047
- // anyway to prevent the animations module from throwing an error if the body is used on its own.
1048
- /** Duration for the tab's animation. */
1049
- animationDuration = '500ms';
1050
- /** Whether the tab's content should be kept in the DOM while it's off-screen. */
1051
- preserveContent = false;
1052
- /** The shifted index position of the tab body, where zero represents the active center tab. */
1053
- set position(position) {
1054
- this._positionIndex = position;
1055
- this._computePositionAnimationState();
1056
- }
1057
- constructor() {
1058
- if (this._dir) {
1059
- const changeDetectorRef = inject(ChangeDetectorRef);
1060
- this._dirChangeSubscription = this._dir.change.subscribe((dir) => {
1061
- this._computePositionAnimationState(dir);
1062
- changeDetectorRef.markForCheck();
1063
- });
1064
- }
1065
- }
1066
- ngOnInit() {
1067
- this._bindTransitionEvents();
1068
- if (this._position === 'center') {
1069
- this._setActiveClass(true);
1070
- // Allows for the dynamic height to animate properly on the initial run.
1071
- afterNextRender(() => this._onCentering.emit(this._elementRef.nativeElement.clientHeight), {
1072
- injector: this._injector,
1073
- });
1074
- }
1075
- this._initialized = true;
1076
- }
1077
- ngOnDestroy() {
1078
- clearTimeout(this._fallbackTimer);
1079
- this._eventCleanups?.forEach(cleanup => cleanup());
1080
- this._dirChangeSubscription.unsubscribe();
1081
- }
1082
- /** Sets up the transition events. */
1083
- _bindTransitionEvents() {
1084
- this._ngZone.runOutsideAngular(() => {
1085
- const element = this._elementRef.nativeElement;
1086
- const transitionDone = (event) => {
1087
- if (event.target === this._contentElement?.nativeElement) {
1088
- this._elementRef.nativeElement.classList.remove('mat-tab-body-animating');
1089
- // Only fire the actual callback when a transition is fully finished,
1090
- // otherwise the content can jump around when the next transition starts.
1091
- if (event.type === 'transitionend') {
1092
- this._transitionDone();
1093
- }
1094
- }
1095
- };
1096
- this._eventCleanups = [
1097
- this._renderer.listen(element, 'transitionstart', (event) => {
1098
- if (event.target === this._contentElement?.nativeElement) {
1099
- this._elementRef.nativeElement.classList.add('mat-tab-body-animating');
1100
- this._transitionStarted();
1101
- }
1102
- }),
1103
- this._renderer.listen(element, 'transitionend', transitionDone),
1104
- this._renderer.listen(element, 'transitioncancel', transitionDone),
1105
- ];
1106
- });
1107
- }
1108
- /** Called when a transition has started. */
1109
- _transitionStarted() {
1110
- clearTimeout(this._fallbackTimer);
1111
- const isCentering = this._position === 'center';
1112
- this._beforeCentering.emit(isCentering);
1113
- if (isCentering) {
1114
- this._onCentering.emit(this._elementRef.nativeElement.clientHeight);
1115
- }
1116
- }
1117
- /** Called when a transition is done. */
1118
- _transitionDone() {
1119
- if (this._position === 'center') {
1120
- this._onCentered.emit();
1121
- }
1122
- else if (this._previousPosition === 'center') {
1123
- this._afterLeavingCenter.emit();
1124
- }
1125
- }
1126
- /** Sets the active styling on the tab body based on its current position. */
1127
- _setActiveClass(isActive) {
1128
- this._elementRef.nativeElement.classList.toggle('mat-mdc-tab-body-active', isActive);
1129
- }
1130
- /** The text direction of the containing app. */
1131
- _getLayoutDirection() {
1132
- return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
1133
- }
1134
- /** Whether the provided position state is considered center, regardless of origin. */
1135
- _isCenterPosition() {
1136
- return this._positionIndex === 0;
1137
- }
1138
- /** Computes the position state that will be used for the tab-body animation trigger. */
1139
- _computePositionAnimationState(dir = this._getLayoutDirection()) {
1140
- this._previousPosition = this._position;
1141
- if (this._positionIndex < 0) {
1142
- this._position = dir == 'ltr' ? 'left' : 'right';
1143
- }
1144
- else if (this._positionIndex > 0) {
1145
- this._position = dir == 'ltr' ? 'right' : 'left';
1146
- }
1147
- else {
1148
- this._position = 'center';
1149
- }
1150
- if (this._animationsDisabled()) {
1151
- this._simulateTransitionEvents();
1152
- }
1153
- else if (this._initialized &&
1154
- (this._position === 'center' || this._previousPosition === 'center')) {
1155
- // The transition events are load-bearing and in some cases they might not fire (e.g.
1156
- // tests setting `* {transition: none}` to disable animations). This timeout will simulate
1157
- // them if a transition doesn't start within a certain amount of time.
1158
- clearTimeout(this._fallbackTimer);
1159
- this._fallbackTimer = this._ngZone.runOutsideAngular(() => setTimeout(() => this._simulateTransitionEvents(), 100));
1160
- }
1161
- }
1162
- /** Simulates the body's transition events in an environment where they might not fire. */
1163
- _simulateTransitionEvents() {
1164
- this._transitionStarted();
1165
- afterNextRender(() => this._transitionDone(), { injector: this._injector });
1166
- }
1167
- /** Whether animations are disabled for the tab group. */
1168
- _animationsDisabled() {
1169
- return (this._diAnimationsDisabled ||
1170
- this.animationDuration === '0ms' ||
1171
- this.animationDuration === '0s');
1172
- }
1173
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabBody, deps: [], target: i0.ɵɵFactoryTarget.Component });
1174
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatTabBody, isStandalone: true, selector: "mat-tab-body", inputs: { _content: ["content", "_content"], animationDuration: "animationDuration", preserveContent: "preserveContent", position: "position" }, outputs: { _onCentering: "_onCentering", _beforeCentering: "_beforeCentering", _onCentered: "_onCentered" }, host: { properties: { "attr.inert": "_position === \"center\" ? null : \"\"" }, classAttribute: "mat-mdc-tab-body" }, viewQueries: [{ propertyName: "_portalHost", first: true, predicate: MatTabBodyPortal, descendants: true }, { propertyName: "_contentElement", first: true, predicate: ["content"], descendants: true }], ngImport: i0, template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n", styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"], dependencies: [{ kind: "directive", type: MatTabBodyPortal, selector: "[matTabBodyHost]" }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
1089
+ _elementRef = inject(ElementRef);
1090
+ _dir = inject(Directionality, {
1091
+ optional: true
1092
+ });
1093
+ _ngZone = inject(NgZone);
1094
+ _injector = inject(Injector);
1095
+ _renderer = inject(Renderer2);
1096
+ _diAnimationsDisabled = _animationsDisabled();
1097
+ _eventCleanups;
1098
+ _initialized;
1099
+ _fallbackTimer;
1100
+ _positionIndex;
1101
+ _dirChangeSubscription = Subscription.EMPTY;
1102
+ _position;
1103
+ _previousPosition;
1104
+ _onCentering = new EventEmitter();
1105
+ _beforeCentering = new EventEmitter();
1106
+ _afterLeavingCenter = new EventEmitter();
1107
+ _onCentered = new EventEmitter(true);
1108
+ _portalHost;
1109
+ _contentElement;
1110
+ _content;
1111
+ animationDuration = '500ms';
1112
+ preserveContent = false;
1113
+ set position(position) {
1114
+ this._positionIndex = position;
1115
+ this._computePositionAnimationState();
1116
+ }
1117
+ constructor() {
1118
+ if (this._dir) {
1119
+ const changeDetectorRef = inject(ChangeDetectorRef);
1120
+ this._dirChangeSubscription = this._dir.change.subscribe(dir => {
1121
+ this._computePositionAnimationState(dir);
1122
+ changeDetectorRef.markForCheck();
1123
+ });
1124
+ }
1125
+ }
1126
+ ngOnInit() {
1127
+ this._bindTransitionEvents();
1128
+ if (this._position === 'center') {
1129
+ this._setActiveClass(true);
1130
+ afterNextRender(() => this._onCentering.emit(this._elementRef.nativeElement.clientHeight), {
1131
+ injector: this._injector
1132
+ });
1133
+ }
1134
+ this._initialized = true;
1135
+ }
1136
+ ngOnDestroy() {
1137
+ clearTimeout(this._fallbackTimer);
1138
+ this._eventCleanups?.forEach(cleanup => cleanup());
1139
+ this._dirChangeSubscription.unsubscribe();
1140
+ }
1141
+ _bindTransitionEvents() {
1142
+ this._ngZone.runOutsideAngular(() => {
1143
+ const element = this._elementRef.nativeElement;
1144
+ const transitionDone = event => {
1145
+ if (event.target === this._contentElement?.nativeElement) {
1146
+ this._elementRef.nativeElement.classList.remove('mat-tab-body-animating');
1147
+ if (event.type === 'transitionend') {
1148
+ this._transitionDone();
1149
+ }
1150
+ }
1151
+ };
1152
+ this._eventCleanups = [this._renderer.listen(element, 'transitionstart', event => {
1153
+ if (event.target === this._contentElement?.nativeElement) {
1154
+ this._elementRef.nativeElement.classList.add('mat-tab-body-animating');
1155
+ this._transitionStarted();
1156
+ }
1157
+ }), this._renderer.listen(element, 'transitionend', transitionDone), this._renderer.listen(element, 'transitioncancel', transitionDone)];
1158
+ });
1159
+ }
1160
+ _transitionStarted() {
1161
+ clearTimeout(this._fallbackTimer);
1162
+ const isCentering = this._position === 'center';
1163
+ this._beforeCentering.emit(isCentering);
1164
+ if (isCentering) {
1165
+ this._onCentering.emit(this._elementRef.nativeElement.clientHeight);
1166
+ }
1167
+ }
1168
+ _transitionDone() {
1169
+ if (this._position === 'center') {
1170
+ this._onCentered.emit();
1171
+ } else if (this._previousPosition === 'center') {
1172
+ this._afterLeavingCenter.emit();
1173
+ }
1174
+ }
1175
+ _setActiveClass(isActive) {
1176
+ this._elementRef.nativeElement.classList.toggle('mat-mdc-tab-body-active', isActive);
1177
+ }
1178
+ _getLayoutDirection() {
1179
+ return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
1180
+ }
1181
+ _isCenterPosition() {
1182
+ return this._positionIndex === 0;
1183
+ }
1184
+ _computePositionAnimationState(dir = this._getLayoutDirection()) {
1185
+ this._previousPosition = this._position;
1186
+ if (this._positionIndex < 0) {
1187
+ this._position = dir == 'ltr' ? 'left' : 'right';
1188
+ } else if (this._positionIndex > 0) {
1189
+ this._position = dir == 'ltr' ? 'right' : 'left';
1190
+ } else {
1191
+ this._position = 'center';
1192
+ }
1193
+ if (this._animationsDisabled()) {
1194
+ this._simulateTransitionEvents();
1195
+ } else if (this._initialized && (this._position === 'center' || this._previousPosition === 'center')) {
1196
+ clearTimeout(this._fallbackTimer);
1197
+ this._fallbackTimer = this._ngZone.runOutsideAngular(() => setTimeout(() => this._simulateTransitionEvents(), 100));
1198
+ }
1199
+ }
1200
+ _simulateTransitionEvents() {
1201
+ this._transitionStarted();
1202
+ afterNextRender(() => this._transitionDone(), {
1203
+ injector: this._injector
1204
+ });
1205
+ }
1206
+ _animationsDisabled() {
1207
+ return this._diAnimationsDisabled || this.animationDuration === '0ms' || this.animationDuration === '0s';
1208
+ }
1209
+ static ɵfac = i0.ɵɵngDeclareFactory({
1210
+ minVersion: "12.0.0",
1211
+ version: "20.2.0-next.2",
1212
+ ngImport: i0,
1213
+ type: MatTabBody,
1214
+ deps: [],
1215
+ target: i0.ɵɵFactoryTarget.Component
1216
+ });
1217
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1218
+ minVersion: "14.0.0",
1219
+ version: "20.2.0-next.2",
1220
+ type: MatTabBody,
1221
+ isStandalone: true,
1222
+ selector: "mat-tab-body",
1223
+ inputs: {
1224
+ _content: ["content", "_content"],
1225
+ animationDuration: "animationDuration",
1226
+ preserveContent: "preserveContent",
1227
+ position: "position"
1228
+ },
1229
+ outputs: {
1230
+ _onCentering: "_onCentering",
1231
+ _beforeCentering: "_beforeCentering",
1232
+ _onCentered: "_onCentered"
1233
+ },
1234
+ host: {
1235
+ properties: {
1236
+ "attr.inert": "_position === \"center\" ? null : \"\""
1237
+ },
1238
+ classAttribute: "mat-mdc-tab-body"
1239
+ },
1240
+ viewQueries: [{
1241
+ propertyName: "_portalHost",
1242
+ first: true,
1243
+ predicate: MatTabBodyPortal,
1244
+ descendants: true
1245
+ }, {
1246
+ propertyName: "_contentElement",
1247
+ first: true,
1248
+ predicate: ["content"],
1249
+ descendants: true
1250
+ }],
1251
+ ngImport: i0,
1252
+ template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n",
1253
+ styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"],
1254
+ dependencies: [{
1255
+ kind: "directive",
1256
+ type: MatTabBodyPortal,
1257
+ selector: "[matTabBodyHost]"
1258
+ }, {
1259
+ kind: "directive",
1260
+ type: CdkScrollable,
1261
+ selector: "[cdk-scrollable], [cdkScrollable]"
1262
+ }],
1263
+ changeDetection: i0.ChangeDetectionStrategy.Default,
1264
+ encapsulation: i0.ViewEncapsulation.None
1265
+ });
1175
1266
  }
1176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabBody, decorators: [{
1177
- type: Component,
1178
- args: [{ selector: 'mat-tab-body', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
1179
- 'class': 'mat-mdc-tab-body',
1180
- // In most cases the `hidden` that we set on the off-screen content is enough
1181
- // to stop interactions with it, but if a child element sets its own `visibility`, it'll
1182
- // override the one from the parent. This ensures that even those elements will be removed
1183
- // from the accessibility tree.
1184
- '[attr.inert]': '_position === "center" ? null : ""',
1185
- }, imports: [MatTabBodyPortal, CdkScrollable], template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n", styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"] }]
1186
- }], ctorParameters: () => [], propDecorators: { _onCentering: [{
1187
- type: Output
1188
- }], _beforeCentering: [{
1189
- type: Output
1190
- }], _onCentered: [{
1191
- type: Output
1192
- }], _portalHost: [{
1193
- type: ViewChild,
1194
- args: [MatTabBodyPortal]
1195
- }], _contentElement: [{
1196
- type: ViewChild,
1197
- args: ['content']
1198
- }], _content: [{
1199
- type: Input,
1200
- args: ['content']
1201
- }], animationDuration: [{
1202
- type: Input
1203
- }], preserveContent: [{
1204
- type: Input
1205
- }], position: [{
1206
- type: Input
1207
- }] } });
1267
+ i0.ɵɵngDeclareClassMetadata({
1268
+ minVersion: "12.0.0",
1269
+ version: "20.2.0-next.2",
1270
+ ngImport: i0,
1271
+ type: MatTabBody,
1272
+ decorators: [{
1273
+ type: Component,
1274
+ args: [{
1275
+ selector: 'mat-tab-body',
1276
+ encapsulation: ViewEncapsulation.None,
1277
+ changeDetection: ChangeDetectionStrategy.Default,
1278
+ host: {
1279
+ 'class': 'mat-mdc-tab-body',
1280
+ '[attr.inert]': '_position === "center" ? null : ""'
1281
+ },
1282
+ imports: [MatTabBodyPortal, CdkScrollable],
1283
+ template: "<div\n class=\"mat-mdc-tab-body-content\"\n #content\n cdkScrollable\n [class.mat-tab-body-content-left]=\"_position === 'left'\"\n [class.mat-tab-body-content-right]=\"_position === 'right'\"\n [class.mat-tab-body-content-can-animate]=\"_position === 'center' || _previousPosition === 'center'\">\n <ng-template matTabBodyHost></ng-template>\n</div>\n",
1284
+ styles: [".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)}\n"]
1285
+ }]
1286
+ }],
1287
+ ctorParameters: () => [],
1288
+ propDecorators: {
1289
+ _onCentering: [{
1290
+ type: Output
1291
+ }],
1292
+ _beforeCentering: [{
1293
+ type: Output
1294
+ }],
1295
+ _onCentered: [{
1296
+ type: Output
1297
+ }],
1298
+ _portalHost: [{
1299
+ type: ViewChild,
1300
+ args: [MatTabBodyPortal]
1301
+ }],
1302
+ _contentElement: [{
1303
+ type: ViewChild,
1304
+ args: ['content']
1305
+ }],
1306
+ _content: [{
1307
+ type: Input,
1308
+ args: ['content']
1309
+ }],
1310
+ animationDuration: [{
1311
+ type: Input
1312
+ }],
1313
+ preserveContent: [{
1314
+ type: Input
1315
+ }],
1316
+ position: [{
1317
+ type: Input
1318
+ }]
1319
+ }
1320
+ });
1208
1321
 
1209
- /**
1210
- * Material design tab-group component. Supports basic tab pairs (label + content) and includes
1211
- * animated ink-bar, keyboard navigation, and screen reader.
1212
- * See: https://material.io/design/components/tabs.html
1213
- */
1214
1322
  class MatTabGroup {
1215
- _elementRef = inject(ElementRef);
1216
- _changeDetectorRef = inject(ChangeDetectorRef);
1217
- _ngZone = inject(NgZone);
1218
- _tabsSubscription = Subscription.EMPTY;
1219
- _tabLabelSubscription = Subscription.EMPTY;
1220
- _tabBodySubscription = Subscription.EMPTY;
1221
- _diAnimationsDisabled = _animationsDisabled();
1222
- /**
1223
- * All tabs inside the tab group. This includes tabs that belong to groups that are nested
1224
- * inside the current one. We filter out only the tabs that belong to this group in `_tabs`.
1225
- */
1226
- _allTabs;
1227
- _tabBodies;
1228
- _tabBodyWrapper;
1229
- _tabHeader;
1230
- /** All of the tabs that belong to the group. */
1231
- _tabs = new QueryList();
1232
- /** The tab index that should be selected after the content has been checked. */
1233
- _indexToSelect = 0;
1234
- /** Index of the tab that was focused last. */
1235
- _lastFocusedTabIndex = null;
1236
- /** Snapshot of the height of the tab body wrapper before another tab is activated. */
1237
- _tabBodyWrapperHeight = 0;
1238
- /**
1239
- * Theme color of the tab group. This API is supported in M2 themes only, it
1240
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/tabs/styling.
1241
- *
1242
- * For information on applying color variants in M3, see
1243
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1244
- */
1245
- color;
1246
- /** Whether the ink bar should fit its width to the size of the tab label content. */
1247
- get fitInkBarToContent() {
1248
- return this._fitInkBarToContent;
1249
- }
1250
- set fitInkBarToContent(value) {
1251
- this._fitInkBarToContent = value;
1252
- this._changeDetectorRef.markForCheck();
1253
- }
1254
- _fitInkBarToContent = false;
1255
- /** Whether tabs should be stretched to fill the header. */
1256
- stretchTabs = true;
1257
- /** Alignment for tabs label. */
1258
- alignTabs = null;
1259
- /** Whether the tab group should grow to the size of the active tab. */
1260
- dynamicHeight = false;
1261
- /** The index of the active tab. */
1262
- get selectedIndex() {
1263
- return this._selectedIndex;
1264
- }
1265
- set selectedIndex(value) {
1266
- this._indexToSelect = isNaN(value) ? null : value;
1267
- }
1268
- _selectedIndex = null;
1269
- /** Position of the tab header. */
1270
- headerPosition = 'above';
1271
- /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */
1272
- get animationDuration() {
1273
- return this._animationDuration;
1274
- }
1275
- set animationDuration(value) {
1276
- const stringValue = value + '';
1277
- this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
1278
- }
1279
- _animationDuration;
1280
- /**
1281
- * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved
1282
- * accessibility when the tab does not have focusable elements or if it has scrollable content.
1283
- * The `tabindex` will be removed automatically for inactive tabs.
1284
- * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html
1285
- */
1286
- get contentTabIndex() {
1287
- return this._contentTabIndex;
1288
- }
1289
- set contentTabIndex(value) {
1290
- this._contentTabIndex = isNaN(value) ? null : value;
1291
- }
1292
- _contentTabIndex;
1293
- /**
1294
- * Whether pagination should be disabled. This can be used to avoid unnecessary
1295
- * layout recalculations if it's known that pagination won't be required.
1296
- */
1297
- disablePagination = false;
1298
- /** Whether ripples in the tab group are disabled. */
1299
- disableRipple = false;
1300
- /**
1301
- * By default tabs remove their content from the DOM while it's off-screen.
1302
- * Setting this to `true` will keep it in the DOM which will prevent elements
1303
- * like iframes and videos from reloading next time it comes back into the view.
1304
- */
1305
- preserveContent = false;
1306
- /**
1307
- * Theme color of the background of the tab group. This API is supported in M2 themes only, it
1308
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/tabs/styling.
1309
- *
1310
- * For information on applying color variants in M3, see
1311
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1312
- *
1313
- * @deprecated The background color should be customized through Sass theming APIs.
1314
- * @breaking-change 20.0.0 Remove this input
1315
- */
1316
- get backgroundColor() {
1317
- return this._backgroundColor;
1318
- }
1319
- set backgroundColor(value) {
1320
- const classList = this._elementRef.nativeElement.classList;
1321
- classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
1322
- if (value) {
1323
- classList.add('mat-tabs-with-background', `mat-background-${value}`);
1324
- }
1325
- this._backgroundColor = value;
1326
- }
1327
- _backgroundColor;
1328
- /** Aria label of the inner `tablist` of the group. */
1329
- ariaLabel;
1330
- /** Sets the `aria-labelledby` of the inner `tablist` of the group. */
1331
- ariaLabelledby;
1332
- /** Output to enable support for two-way binding on `[(selectedIndex)]` */
1333
- selectedIndexChange = new EventEmitter();
1334
- /** Event emitted when focus has changed within a tab group. */
1335
- focusChange = new EventEmitter();
1336
- /** Event emitted when the body animation has completed */
1337
- animationDone = new EventEmitter();
1338
- /** Event emitted when the tab selection has changed. */
1339
- selectedTabChange = new EventEmitter(true);
1340
- _groupId;
1341
- /** Whether the tab group is rendered on the server. */
1342
- _isServer = !inject(Platform).isBrowser;
1343
- constructor() {
1344
- const defaultConfig = inject(MAT_TABS_CONFIG, { optional: true });
1345
- this._groupId = inject(_IdGenerator).getId('mat-tab-group-');
1346
- this.animationDuration =
1347
- defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';
1348
- this.disablePagination =
1349
- defaultConfig && defaultConfig.disablePagination != null
1350
- ? defaultConfig.disablePagination
1351
- : false;
1352
- this.dynamicHeight =
1353
- defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;
1354
- if (defaultConfig?.contentTabIndex != null) {
1355
- this.contentTabIndex = defaultConfig.contentTabIndex;
1356
- }
1357
- this.preserveContent = !!defaultConfig?.preserveContent;
1358
- this.fitInkBarToContent =
1359
- defaultConfig && defaultConfig.fitInkBarToContent != null
1360
- ? defaultConfig.fitInkBarToContent
1361
- : false;
1362
- this.stretchTabs =
1363
- defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
1364
- this.alignTabs =
1365
- defaultConfig && defaultConfig.alignTabs != null ? defaultConfig.alignTabs : null;
1366
- }
1367
- /**
1368
- * After the content is checked, this component knows what tabs have been defined
1369
- * and what the selected index should be. This is where we can know exactly what position
1370
- * each tab should be in according to the new selected index, and additionally we know how
1371
- * a new selected tab should transition in (from the left or right).
1372
- */
1373
- ngAfterContentChecked() {
1374
- // Don't clamp the `indexToSelect` immediately in the setter because it can happen that
1375
- // the amount of tabs changes before the actual change detection runs.
1376
- const indexToSelect = (this._indexToSelect = this._clampTabIndex(this._indexToSelect));
1377
- // If there is a change in selected index, emit a change event. Should not trigger if
1378
- // the selected index has not yet been initialized.
1379
- if (this._selectedIndex != indexToSelect) {
1380
- const isFirstRun = this._selectedIndex == null;
1381
- if (!isFirstRun) {
1382
- this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
1383
- // Preserve the height so page doesn't scroll up during tab change.
1384
- // Fixes https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change
1385
- const wrapper = this._tabBodyWrapper.nativeElement;
1386
- wrapper.style.minHeight = wrapper.clientHeight + 'px';
1387
- }
1388
- // Changing these values after change detection has run
1389
- // since the checked content may contain references to them.
1390
- Promise.resolve().then(() => {
1391
- this._tabs.forEach((tab, index) => (tab.isActive = index === indexToSelect));
1392
- if (!isFirstRun) {
1393
- this.selectedIndexChange.emit(indexToSelect);
1394
- // Clear the min-height, this was needed during tab change to avoid
1395
- // unnecessary scrolling.
1396
- this._tabBodyWrapper.nativeElement.style.minHeight = '';
1397
- }
1398
- });
1399
- }
1400
- // Setup the position for each tab and optionally setup an origin on the next selected tab.
1401
- this._tabs.forEach((tab, index) => {
1402
- tab.position = index - indexToSelect;
1403
- // If there is already a selected tab, then set up an origin for the next selected tab
1404
- // if it doesn't have one already.
1405
- if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {
1406
- tab.origin = indexToSelect - this._selectedIndex;
1407
- }
1408
- });
1409
- if (this._selectedIndex !== indexToSelect) {
1410
- this._selectedIndex = indexToSelect;
1411
- this._lastFocusedTabIndex = null;
1412
- this._changeDetectorRef.markForCheck();
1413
- }
1414
- }
1415
- ngAfterContentInit() {
1416
- this._subscribeToAllTabChanges();
1417
- this._subscribeToTabLabels();
1418
- // Subscribe to changes in the amount of tabs, in order to be
1419
- // able to re-render the content as new tabs are added or removed.
1420
- this._tabsSubscription = this._tabs.changes.subscribe(() => {
1421
- const indexToSelect = this._clampTabIndex(this._indexToSelect);
1422
- // Maintain the previously-selected tab if a new tab is added or removed and there is no
1423
- // explicit change that selects a different tab.
1424
- if (indexToSelect === this._selectedIndex) {
1425
- const tabs = this._tabs.toArray();
1426
- let selectedTab;
1427
- for (let i = 0; i < tabs.length; i++) {
1428
- if (tabs[i].isActive) {
1429
- // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
1430
- // event, otherwise the consumer may end up in an infinite loop in some edge cases like
1431
- // adding a tab within the `selectedIndexChange` event.
1432
- this._indexToSelect = this._selectedIndex = i;
1433
- this._lastFocusedTabIndex = null;
1434
- selectedTab = tabs[i];
1435
- break;
1436
- }
1437
- }
1438
- // If we haven't found an active tab and a tab exists at the selected index, it means
1439
- // that the active tab was swapped out. Since this won't be picked up by the rendering
1440
- // loop in `ngAfterContentChecked`, we need to sync it up manually.
1441
- if (!selectedTab && tabs[indexToSelect]) {
1442
- Promise.resolve().then(() => {
1443
- tabs[indexToSelect].isActive = true;
1444
- this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
1445
- });
1446
- }
1447
- }
1448
- this._changeDetectorRef.markForCheck();
1449
- });
1450
- }
1451
- ngAfterViewInit() {
1452
- this._tabBodySubscription = this._tabBodies.changes.subscribe(() => this._bodyCentered(true));
1453
- }
1454
- /** Listens to changes in all of the tabs. */
1455
- _subscribeToAllTabChanges() {
1456
- // Since we use a query with `descendants: true` to pick up the tabs, we may end up catching
1457
- // some that are inside of nested tab groups. We filter them out manually by checking that
1458
- // the closest group to the tab is the current one.
1459
- this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe((tabs) => {
1460
- this._tabs.reset(tabs.filter(tab => {
1461
- return tab._closestTabGroup === this || !tab._closestTabGroup;
1462
- }));
1463
- this._tabs.notifyOnChanges();
1464
- });
1465
- }
1466
- ngOnDestroy() {
1467
- this._tabs.destroy();
1468
- this._tabsSubscription.unsubscribe();
1469
- this._tabLabelSubscription.unsubscribe();
1470
- this._tabBodySubscription.unsubscribe();
1471
- }
1472
- /** Re-aligns the ink bar to the selected tab element. */
1473
- realignInkBar() {
1474
- if (this._tabHeader) {
1475
- this._tabHeader._alignInkBarToSelectedTab();
1476
- }
1477
- }
1478
- /**
1479
- * Recalculates the tab group's pagination dimensions.
1480
- *
1481
- * WARNING: Calling this method can be very costly in terms of performance. It should be called
1482
- * as infrequently as possible from outside of the Tabs component as it causes a reflow of the
1483
- * page.
1484
- */
1485
- updatePagination() {
1486
- if (this._tabHeader) {
1487
- this._tabHeader.updatePagination();
1488
- }
1489
- }
1490
- /**
1491
- * Sets focus to a particular tab.
1492
- * @param index Index of the tab to be focused.
1493
- */
1494
- focusTab(index) {
1495
- const header = this._tabHeader;
1496
- if (header) {
1497
- header.focusIndex = index;
1498
- }
1499
- }
1500
- _focusChanged(index) {
1501
- this._lastFocusedTabIndex = index;
1502
- this.focusChange.emit(this._createChangeEvent(index));
1503
- }
1504
- _createChangeEvent(index) {
1505
- const event = new MatTabChangeEvent();
1506
- event.index = index;
1507
- if (this._tabs && this._tabs.length) {
1508
- event.tab = this._tabs.toArray()[index];
1509
- }
1510
- return event;
1511
- }
1512
- /**
1513
- * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is
1514
- * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the
1515
- * binding to be updated, we need to subscribe to changes in it and trigger change detection
1516
- * manually.
1517
- */
1518
- _subscribeToTabLabels() {
1519
- if (this._tabLabelSubscription) {
1520
- this._tabLabelSubscription.unsubscribe();
1521
- }
1522
- this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());
1523
- }
1524
- /** Clamps the given index to the bounds of 0 and the tabs length. */
1525
- _clampTabIndex(index) {
1526
- // Note the `|| 0`, which ensures that values like NaN can't get through
1527
- // and which would otherwise throw the component into an infinite loop
1528
- // (since Math.max(NaN, 0) === NaN).
1529
- return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
1530
- }
1531
- /** Returns a unique id for each tab label element */
1532
- _getTabLabelId(tab, index) {
1533
- return tab.id || `${this._groupId}-label-${index}`;
1534
- }
1535
- /** Returns a unique id for each tab content element */
1536
- _getTabContentId(index) {
1537
- return `${this._groupId}-content-${index}`;
1538
- }
1539
- /**
1540
- * Sets the height of the body wrapper to the height of the activating tab if dynamic
1541
- * height property is true.
1542
- */
1543
- _setTabBodyWrapperHeight(tabHeight) {
1544
- if (!this.dynamicHeight || !this._tabBodyWrapperHeight) {
1545
- this._tabBodyWrapperHeight = tabHeight;
1546
- return;
1547
- }
1548
- const wrapper = this._tabBodyWrapper.nativeElement;
1549
- wrapper.style.height = this._tabBodyWrapperHeight + 'px';
1550
- // This conditional forces the browser to paint the height so that
1551
- // the animation to the new height can have an origin.
1552
- if (this._tabBodyWrapper.nativeElement.offsetHeight) {
1553
- wrapper.style.height = tabHeight + 'px';
1554
- }
1555
- }
1556
- /** Removes the height of the tab body wrapper. */
1557
- _removeTabBodyWrapperHeight() {
1323
+ _elementRef = inject(ElementRef);
1324
+ _changeDetectorRef = inject(ChangeDetectorRef);
1325
+ _ngZone = inject(NgZone);
1326
+ _tabsSubscription = Subscription.EMPTY;
1327
+ _tabLabelSubscription = Subscription.EMPTY;
1328
+ _tabBodySubscription = Subscription.EMPTY;
1329
+ _diAnimationsDisabled = _animationsDisabled();
1330
+ _allTabs;
1331
+ _tabBodies;
1332
+ _tabBodyWrapper;
1333
+ _tabHeader;
1334
+ _tabs = new QueryList();
1335
+ _indexToSelect = 0;
1336
+ _lastFocusedTabIndex = null;
1337
+ _tabBodyWrapperHeight = 0;
1338
+ color;
1339
+ get fitInkBarToContent() {
1340
+ return this._fitInkBarToContent;
1341
+ }
1342
+ set fitInkBarToContent(value) {
1343
+ this._fitInkBarToContent = value;
1344
+ this._changeDetectorRef.markForCheck();
1345
+ }
1346
+ _fitInkBarToContent = false;
1347
+ stretchTabs = true;
1348
+ alignTabs = null;
1349
+ dynamicHeight = false;
1350
+ get selectedIndex() {
1351
+ return this._selectedIndex;
1352
+ }
1353
+ set selectedIndex(value) {
1354
+ this._indexToSelect = isNaN(value) ? null : value;
1355
+ }
1356
+ _selectedIndex = null;
1357
+ headerPosition = 'above';
1358
+ get animationDuration() {
1359
+ return this._animationDuration;
1360
+ }
1361
+ set animationDuration(value) {
1362
+ const stringValue = value + '';
1363
+ this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
1364
+ }
1365
+ _animationDuration;
1366
+ get contentTabIndex() {
1367
+ return this._contentTabIndex;
1368
+ }
1369
+ set contentTabIndex(value) {
1370
+ this._contentTabIndex = isNaN(value) ? null : value;
1371
+ }
1372
+ _contentTabIndex;
1373
+ disablePagination = false;
1374
+ disableRipple = false;
1375
+ preserveContent = false;
1376
+ get backgroundColor() {
1377
+ return this._backgroundColor;
1378
+ }
1379
+ set backgroundColor(value) {
1380
+ const classList = this._elementRef.nativeElement.classList;
1381
+ classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
1382
+ if (value) {
1383
+ classList.add('mat-tabs-with-background', `mat-background-${value}`);
1384
+ }
1385
+ this._backgroundColor = value;
1386
+ }
1387
+ _backgroundColor;
1388
+ ariaLabel;
1389
+ ariaLabelledby;
1390
+ selectedIndexChange = new EventEmitter();
1391
+ focusChange = new EventEmitter();
1392
+ animationDone = new EventEmitter();
1393
+ selectedTabChange = new EventEmitter(true);
1394
+ _groupId;
1395
+ _isServer = !inject(Platform).isBrowser;
1396
+ constructor() {
1397
+ const defaultConfig = inject(MAT_TABS_CONFIG, {
1398
+ optional: true
1399
+ });
1400
+ this._groupId = inject(_IdGenerator).getId('mat-tab-group-');
1401
+ this.animationDuration = defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';
1402
+ this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;
1403
+ this.dynamicHeight = defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;
1404
+ if (defaultConfig?.contentTabIndex != null) {
1405
+ this.contentTabIndex = defaultConfig.contentTabIndex;
1406
+ }
1407
+ this.preserveContent = !!defaultConfig?.preserveContent;
1408
+ this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;
1409
+ this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
1410
+ this.alignTabs = defaultConfig && defaultConfig.alignTabs != null ? defaultConfig.alignTabs : null;
1411
+ }
1412
+ ngAfterContentChecked() {
1413
+ const indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);
1414
+ if (this._selectedIndex != indexToSelect) {
1415
+ const isFirstRun = this._selectedIndex == null;
1416
+ if (!isFirstRun) {
1417
+ this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
1558
1418
  const wrapper = this._tabBodyWrapper.nativeElement;
1559
- this._tabBodyWrapperHeight = wrapper.clientHeight;
1560
- wrapper.style.height = '';
1561
- this._ngZone.run(() => this.animationDone.emit());
1562
- }
1563
- /** Handle click events, setting new selected index if appropriate. */
1564
- _handleClick(tab, tabHeader, index) {
1565
- tabHeader.focusIndex = index;
1566
- if (!tab.disabled) {
1567
- this.selectedIndex = index;
1568
- }
1569
- }
1570
- /** Retrieves the tabindex for the tab. */
1571
- _getTabIndex(index) {
1572
- const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;
1573
- return index === targetIndex ? 0 : -1;
1574
- }
1575
- /** Callback for when the focused state of a tab has changed. */
1576
- _tabFocusChanged(focusOrigin, index) {
1577
- // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which
1578
- // can cause the tab to be moved out from under the pointer, interrupting the
1579
- // click sequence (see #21898). We don't need to scroll the tab into view for
1580
- // such cases anyway, because it will be done when the tab becomes selected.
1581
- if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {
1582
- this._tabHeader.focusIndex = index;
1583
- }
1584
- }
1585
- /**
1586
- * Callback invoked when the centered state of a tab body changes.
1587
- * @param isCenter Whether the tab will be in the center.
1588
- */
1589
- _bodyCentered(isCenter) {
1590
- // Marks all the existing tabs as inactive and the center tab as active. Note that this can
1591
- // be achieved much easier by using a class binding on each body. The problem with
1592
- // doing so is that we can't control the timing of when the class is removed from the
1593
- // previously-active element and added to the newly-active one. If there's a tick between
1594
- // removing the class and adding the new one, the content will jump in a very jarring way.
1595
- // We go through the trouble of setting the classes ourselves to guarantee that they're
1596
- // swapped out at the same time.
1597
- if (isCenter) {
1598
- this._tabBodies?.forEach((body, i) => body._setActiveClass(i === this._selectedIndex));
1599
- }
1600
- }
1601
- _animationsDisabled() {
1602
- return (this._diAnimationsDisabled ||
1603
- this.animationDuration === '0' ||
1604
- this.animationDuration === '0ms');
1605
- }
1606
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
1607
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-next.2", type: MatTabGroup, isStandalone: true, selector: "mat-tab-group", inputs: { color: "color", fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute], stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute], alignTabs: ["mat-align-tabs", "alignTabs"], dynamicHeight: ["dynamicHeight", "dynamicHeight", booleanAttribute], selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute], headerPosition: "headerPosition", animationDuration: "animationDuration", contentTabIndex: ["contentTabIndex", "contentTabIndex", numberAttribute], disablePagination: ["disablePagination", "disablePagination", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute], preserveContent: ["preserveContent", "preserveContent", booleanAttribute], backgroundColor: "backgroundColor", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"] }, outputs: { selectedIndexChange: "selectedIndexChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { properties: { "class": "\"mat-\" + (color || \"primary\")", "class.mat-mdc-tab-group-dynamic-height": "dynamicHeight", "class.mat-mdc-tab-group-inverted-header": "headerPosition === \"below\"", "class.mat-mdc-tab-group-stretch-tabs": "stretchTabs", "attr.mat-align-tabs": "alignTabs", "style.--mat-tab-animation-duration": "animationDuration" }, classAttribute: "mat-mdc-tab-group" }, providers: [
1608
- {
1609
- provide: MAT_TAB_GROUP,
1610
- useExisting: MatTabGroup,
1611
- },
1612
- ], queries: [{ propertyName: "_allTabs", predicate: MatTab, descendants: true }], viewQueries: [{ propertyName: "_tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true }, { propertyName: "_tabHeader", first: true, predicate: ["tabHeader"], descendants: true }, { propertyName: "_tabBodies", predicate: MatTabBody, descendants: true }], exportAs: ["matTabGroup"], ngImport: i0, template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"], dependencies: [{ kind: "component", type: MatTabHeader, selector: "mat-tab-header", inputs: ["aria-label", "aria-labelledby", "disableRipple"] }, { kind: "directive", type: MatTabLabelWrapper, selector: "[matTabLabelWrapper]", inputs: ["disabled"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: MatTabBody, selector: "mat-tab-body", inputs: ["content", "animationDuration", "preserveContent", "position"], outputs: ["_onCentering", "_beforeCentering", "_onCentered"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
1419
+ wrapper.style.minHeight = wrapper.clientHeight + 'px';
1420
+ }
1421
+ Promise.resolve().then(() => {
1422
+ this._tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);
1423
+ if (!isFirstRun) {
1424
+ this.selectedIndexChange.emit(indexToSelect);
1425
+ this._tabBodyWrapper.nativeElement.style.minHeight = '';
1426
+ }
1427
+ });
1428
+ }
1429
+ this._tabs.forEach((tab, index) => {
1430
+ tab.position = index - indexToSelect;
1431
+ if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {
1432
+ tab.origin = indexToSelect - this._selectedIndex;
1433
+ }
1434
+ });
1435
+ if (this._selectedIndex !== indexToSelect) {
1436
+ this._selectedIndex = indexToSelect;
1437
+ this._lastFocusedTabIndex = null;
1438
+ this._changeDetectorRef.markForCheck();
1439
+ }
1440
+ }
1441
+ ngAfterContentInit() {
1442
+ this._subscribeToAllTabChanges();
1443
+ this._subscribeToTabLabels();
1444
+ this._tabsSubscription = this._tabs.changes.subscribe(() => {
1445
+ const indexToSelect = this._clampTabIndex(this._indexToSelect);
1446
+ if (indexToSelect === this._selectedIndex) {
1447
+ const tabs = this._tabs.toArray();
1448
+ let selectedTab;
1449
+ for (let i = 0; i < tabs.length; i++) {
1450
+ if (tabs[i].isActive) {
1451
+ this._indexToSelect = this._selectedIndex = i;
1452
+ this._lastFocusedTabIndex = null;
1453
+ selectedTab = tabs[i];
1454
+ break;
1455
+ }
1456
+ }
1457
+ if (!selectedTab && tabs[indexToSelect]) {
1458
+ Promise.resolve().then(() => {
1459
+ tabs[indexToSelect].isActive = true;
1460
+ this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));
1461
+ });
1462
+ }
1463
+ }
1464
+ this._changeDetectorRef.markForCheck();
1465
+ });
1466
+ }
1467
+ ngAfterViewInit() {
1468
+ this._tabBodySubscription = this._tabBodies.changes.subscribe(() => this._bodyCentered(true));
1469
+ }
1470
+ _subscribeToAllTabChanges() {
1471
+ this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe(tabs => {
1472
+ this._tabs.reset(tabs.filter(tab => {
1473
+ return tab._closestTabGroup === this || !tab._closestTabGroup;
1474
+ }));
1475
+ this._tabs.notifyOnChanges();
1476
+ });
1477
+ }
1478
+ ngOnDestroy() {
1479
+ this._tabs.destroy();
1480
+ this._tabsSubscription.unsubscribe();
1481
+ this._tabLabelSubscription.unsubscribe();
1482
+ this._tabBodySubscription.unsubscribe();
1483
+ }
1484
+ realignInkBar() {
1485
+ if (this._tabHeader) {
1486
+ this._tabHeader._alignInkBarToSelectedTab();
1487
+ }
1488
+ }
1489
+ updatePagination() {
1490
+ if (this._tabHeader) {
1491
+ this._tabHeader.updatePagination();
1492
+ }
1493
+ }
1494
+ focusTab(index) {
1495
+ const header = this._tabHeader;
1496
+ if (header) {
1497
+ header.focusIndex = index;
1498
+ }
1499
+ }
1500
+ _focusChanged(index) {
1501
+ this._lastFocusedTabIndex = index;
1502
+ this.focusChange.emit(this._createChangeEvent(index));
1503
+ }
1504
+ _createChangeEvent(index) {
1505
+ const event = new MatTabChangeEvent();
1506
+ event.index = index;
1507
+ if (this._tabs && this._tabs.length) {
1508
+ event.tab = this._tabs.toArray()[index];
1509
+ }
1510
+ return event;
1511
+ }
1512
+ _subscribeToTabLabels() {
1513
+ if (this._tabLabelSubscription) {
1514
+ this._tabLabelSubscription.unsubscribe();
1515
+ }
1516
+ this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());
1517
+ }
1518
+ _clampTabIndex(index) {
1519
+ return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));
1520
+ }
1521
+ _getTabLabelId(tab, index) {
1522
+ return tab.id || `${this._groupId}-label-${index}`;
1523
+ }
1524
+ _getTabContentId(index) {
1525
+ return `${this._groupId}-content-${index}`;
1526
+ }
1527
+ _setTabBodyWrapperHeight(tabHeight) {
1528
+ if (!this.dynamicHeight || !this._tabBodyWrapperHeight) {
1529
+ this._tabBodyWrapperHeight = tabHeight;
1530
+ return;
1531
+ }
1532
+ const wrapper = this._tabBodyWrapper.nativeElement;
1533
+ wrapper.style.height = this._tabBodyWrapperHeight + 'px';
1534
+ if (this._tabBodyWrapper.nativeElement.offsetHeight) {
1535
+ wrapper.style.height = tabHeight + 'px';
1536
+ }
1537
+ }
1538
+ _removeTabBodyWrapperHeight() {
1539
+ const wrapper = this._tabBodyWrapper.nativeElement;
1540
+ this._tabBodyWrapperHeight = wrapper.clientHeight;
1541
+ wrapper.style.height = '';
1542
+ this._ngZone.run(() => this.animationDone.emit());
1543
+ }
1544
+ _handleClick(tab, tabHeader, index) {
1545
+ tabHeader.focusIndex = index;
1546
+ if (!tab.disabled) {
1547
+ this.selectedIndex = index;
1548
+ }
1549
+ }
1550
+ _getTabIndex(index) {
1551
+ const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;
1552
+ return index === targetIndex ? 0 : -1;
1553
+ }
1554
+ _tabFocusChanged(focusOrigin, index) {
1555
+ if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {
1556
+ this._tabHeader.focusIndex = index;
1557
+ }
1558
+ }
1559
+ _bodyCentered(isCenter) {
1560
+ if (isCenter) {
1561
+ this._tabBodies?.forEach((body, i) => body._setActiveClass(i === this._selectedIndex));
1562
+ }
1563
+ }
1564
+ _animationsDisabled() {
1565
+ return this._diAnimationsDisabled || this.animationDuration === '0' || this.animationDuration === '0ms';
1566
+ }
1567
+ static ɵfac = i0.ɵɵngDeclareFactory({
1568
+ minVersion: "12.0.0",
1569
+ version: "20.2.0-next.2",
1570
+ ngImport: i0,
1571
+ type: MatTabGroup,
1572
+ deps: [],
1573
+ target: i0.ɵɵFactoryTarget.Component
1574
+ });
1575
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1576
+ minVersion: "17.0.0",
1577
+ version: "20.2.0-next.2",
1578
+ type: MatTabGroup,
1579
+ isStandalone: true,
1580
+ selector: "mat-tab-group",
1581
+ inputs: {
1582
+ color: "color",
1583
+ fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute],
1584
+ stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute],
1585
+ alignTabs: ["mat-align-tabs", "alignTabs"],
1586
+ dynamicHeight: ["dynamicHeight", "dynamicHeight", booleanAttribute],
1587
+ selectedIndex: ["selectedIndex", "selectedIndex", numberAttribute],
1588
+ headerPosition: "headerPosition",
1589
+ animationDuration: "animationDuration",
1590
+ contentTabIndex: ["contentTabIndex", "contentTabIndex", numberAttribute],
1591
+ disablePagination: ["disablePagination", "disablePagination", booleanAttribute],
1592
+ disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
1593
+ preserveContent: ["preserveContent", "preserveContent", booleanAttribute],
1594
+ backgroundColor: "backgroundColor",
1595
+ ariaLabel: ["aria-label", "ariaLabel"],
1596
+ ariaLabelledby: ["aria-labelledby", "ariaLabelledby"]
1597
+ },
1598
+ outputs: {
1599
+ selectedIndexChange: "selectedIndexChange",
1600
+ focusChange: "focusChange",
1601
+ animationDone: "animationDone",
1602
+ selectedTabChange: "selectedTabChange"
1603
+ },
1604
+ host: {
1605
+ properties: {
1606
+ "class": "\"mat-\" + (color || \"primary\")",
1607
+ "class.mat-mdc-tab-group-dynamic-height": "dynamicHeight",
1608
+ "class.mat-mdc-tab-group-inverted-header": "headerPosition === \"below\"",
1609
+ "class.mat-mdc-tab-group-stretch-tabs": "stretchTabs",
1610
+ "attr.mat-align-tabs": "alignTabs",
1611
+ "style.--mat-tab-animation-duration": "animationDuration"
1612
+ },
1613
+ classAttribute: "mat-mdc-tab-group"
1614
+ },
1615
+ providers: [{
1616
+ provide: MAT_TAB_GROUP,
1617
+ useExisting: MatTabGroup
1618
+ }],
1619
+ queries: [{
1620
+ propertyName: "_allTabs",
1621
+ predicate: MatTab,
1622
+ descendants: true
1623
+ }],
1624
+ viewQueries: [{
1625
+ propertyName: "_tabBodyWrapper",
1626
+ first: true,
1627
+ predicate: ["tabBodyWrapper"],
1628
+ descendants: true
1629
+ }, {
1630
+ propertyName: "_tabHeader",
1631
+ first: true,
1632
+ predicate: ["tabHeader"],
1633
+ descendants: true
1634
+ }, {
1635
+ propertyName: "_tabBodies",
1636
+ predicate: MatTabBody,
1637
+ descendants: true
1638
+ }],
1639
+ exportAs: ["matTabGroup"],
1640
+ ngImport: i0,
1641
+ template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n",
1642
+ styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"],
1643
+ dependencies: [{
1644
+ kind: "component",
1645
+ type: MatTabHeader,
1646
+ selector: "mat-tab-header",
1647
+ inputs: ["aria-label", "aria-labelledby", "disableRipple"]
1648
+ }, {
1649
+ kind: "directive",
1650
+ type: MatTabLabelWrapper,
1651
+ selector: "[matTabLabelWrapper]",
1652
+ inputs: ["disabled"]
1653
+ }, {
1654
+ kind: "directive",
1655
+ type: CdkMonitorFocus,
1656
+ selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]",
1657
+ outputs: ["cdkFocusChange"],
1658
+ exportAs: ["cdkMonitorFocus"]
1659
+ }, {
1660
+ kind: "directive",
1661
+ type: MatRipple,
1662
+ selector: "[mat-ripple], [matRipple]",
1663
+ inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
1664
+ exportAs: ["matRipple"]
1665
+ }, {
1666
+ kind: "directive",
1667
+ type: CdkPortalOutlet,
1668
+ selector: "[cdkPortalOutlet]",
1669
+ inputs: ["cdkPortalOutlet"],
1670
+ outputs: ["attached"],
1671
+ exportAs: ["cdkPortalOutlet"]
1672
+ }, {
1673
+ kind: "component",
1674
+ type: MatTabBody,
1675
+ selector: "mat-tab-body",
1676
+ inputs: ["content", "animationDuration", "preserveContent", "position"],
1677
+ outputs: ["_onCentering", "_beforeCentering", "_onCentered"]
1678
+ }],
1679
+ changeDetection: i0.ChangeDetectionStrategy.Default,
1680
+ encapsulation: i0.ViewEncapsulation.None
1681
+ });
1613
1682
  }
1614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabGroup, decorators: [{
1615
- type: Component,
1616
- args: [{ selector: 'mat-tab-group', exportAs: 'matTabGroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [
1617
- {
1618
- provide: MAT_TAB_GROUP,
1619
- useExisting: MatTabGroup,
1620
- },
1621
- ], host: {
1622
- 'class': 'mat-mdc-tab-group',
1623
- '[class]': '"mat-" + (color || "primary")',
1624
- '[class.mat-mdc-tab-group-dynamic-height]': 'dynamicHeight',
1625
- '[class.mat-mdc-tab-group-inverted-header]': 'headerPosition === "below"',
1626
- '[class.mat-mdc-tab-group-stretch-tabs]': 'stretchTabs',
1627
- '[attr.mat-align-tabs]': 'alignTabs',
1628
- '[style.--mat-tab-animation-duration]': 'animationDuration',
1629
- }, imports: [
1630
- MatTabHeader,
1631
- MatTabLabelWrapper,
1632
- CdkMonitorFocus,
1633
- MatRipple,
1634
- CdkPortalOutlet,
1635
- MatTabBody,
1636
- ], template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"] }]
1637
- }], ctorParameters: () => [], propDecorators: { _allTabs: [{
1638
- type: ContentChildren,
1639
- args: [MatTab, { descendants: true }]
1640
- }], _tabBodies: [{
1641
- type: ViewChildren,
1642
- args: [MatTabBody]
1643
- }], _tabBodyWrapper: [{
1644
- type: ViewChild,
1645
- args: ['tabBodyWrapper']
1646
- }], _tabHeader: [{
1647
- type: ViewChild,
1648
- args: ['tabHeader']
1649
- }], color: [{
1650
- type: Input
1651
- }], fitInkBarToContent: [{
1652
- type: Input,
1653
- args: [{ transform: booleanAttribute }]
1654
- }], stretchTabs: [{
1655
- type: Input,
1656
- args: [{ alias: 'mat-stretch-tabs', transform: booleanAttribute }]
1657
- }], alignTabs: [{
1658
- type: Input,
1659
- args: [{ alias: 'mat-align-tabs' }]
1660
- }], dynamicHeight: [{
1661
- type: Input,
1662
- args: [{ transform: booleanAttribute }]
1663
- }], selectedIndex: [{
1664
- type: Input,
1665
- args: [{ transform: numberAttribute }]
1666
- }], headerPosition: [{
1667
- type: Input
1668
- }], animationDuration: [{
1669
- type: Input
1670
- }], contentTabIndex: [{
1671
- type: Input,
1672
- args: [{ transform: numberAttribute }]
1673
- }], disablePagination: [{
1674
- type: Input,
1675
- args: [{ transform: booleanAttribute }]
1676
- }], disableRipple: [{
1677
- type: Input,
1678
- args: [{ transform: booleanAttribute }]
1679
- }], preserveContent: [{
1680
- type: Input,
1681
- args: [{ transform: booleanAttribute }]
1682
- }], backgroundColor: [{
1683
- type: Input
1684
- }], ariaLabel: [{
1685
- type: Input,
1686
- args: ['aria-label']
1687
- }], ariaLabelledby: [{
1688
- type: Input,
1689
- args: ['aria-labelledby']
1690
- }], selectedIndexChange: [{
1691
- type: Output
1692
- }], focusChange: [{
1693
- type: Output
1694
- }], animationDone: [{
1695
- type: Output
1696
- }], selectedTabChange: [{
1697
- type: Output
1698
- }] } });
1699
- /** A simple change event emitted on focus or selection changes. */
1683
+ i0.ɵɵngDeclareClassMetadata({
1684
+ minVersion: "12.0.0",
1685
+ version: "20.2.0-next.2",
1686
+ ngImport: i0,
1687
+ type: MatTabGroup,
1688
+ decorators: [{
1689
+ type: Component,
1690
+ args: [{
1691
+ selector: 'mat-tab-group',
1692
+ exportAs: 'matTabGroup',
1693
+ encapsulation: ViewEncapsulation.None,
1694
+ changeDetection: ChangeDetectionStrategy.Default,
1695
+ providers: [{
1696
+ provide: MAT_TAB_GROUP,
1697
+ useExisting: MatTabGroup
1698
+ }],
1699
+ host: {
1700
+ 'class': 'mat-mdc-tab-group',
1701
+ '[class]': '"mat-" + (color || "primary")',
1702
+ '[class.mat-mdc-tab-group-dynamic-height]': 'dynamicHeight',
1703
+ '[class.mat-mdc-tab-group-inverted-header]': 'headerPosition === "below"',
1704
+ '[class.mat-mdc-tab-group-stretch-tabs]': 'stretchTabs',
1705
+ '[attr.mat-align-tabs]': 'alignTabs',
1706
+ '[style.--mat-tab-animation-duration]': 'animationDuration'
1707
+ },
1708
+ imports: [MatTabHeader, MatTabLabelWrapper, CdkMonitorFocus, MatRipple, CdkPortalOutlet, MatTabBody],
1709
+ template: "<mat-tab-header #tabHeader\n [selectedIndex]=\"selectedIndex || 0\"\n [disableRipple]=\"disableRipple\"\n [disablePagination]=\"disablePagination\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby\"\n (indexFocused)=\"_focusChanged($event)\"\n (selectFocusedIndex)=\"selectedIndex = $event\">\n\n @for (tab of _tabs; track tab) {\n <div class=\"mdc-tab mat-mdc-tab mat-focus-indicator\"\n #tabNode\n role=\"tab\"\n matTabLabelWrapper\n cdkMonitorElementFocus\n [id]=\"_getTabLabelId(tab, $index)\"\n [attr.tabIndex]=\"_getTabIndex($index)\"\n [attr.aria-posinset]=\"$index + 1\"\n [attr.aria-setsize]=\"_tabs.length\"\n [attr.aria-controls]=\"_getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.aria-label]=\"tab.ariaLabel || null\"\n [attr.aria-labelledby]=\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\"\n [class.mdc-tab--active]=\"selectedIndex === $index\"\n [class]=\"tab.labelClass\"\n [disabled]=\"tab.disabled\"\n [fitInkBarToContent]=\"fitInkBarToContent\"\n (click)=\"_handleClick(tab, tabHeader, $index)\"\n (cdkFocusChange)=\"_tabFocusChanged($event, $index)\">\n <span class=\"mdc-tab__ripple\"></span>\n\n <!-- Needs to be a separate element, because we can't put\n `overflow: hidden` on tab due to the ink bar. -->\n <div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"tabNode\"\n [matRippleDisabled]=\"tab.disabled || disableRipple\"></div>\n\n <span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <!--\n If there is a label template, use it, otherwise fall back to the text label.\n Note that we don't have indentation around the text label, because it adds\n whitespace around the text which breaks some internal tests.\n -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\"></ng-template>\n } @else {{{tab.textLabel}}}\n </span>\n </span>\n </div>\n }\n</mat-tab-header>\n\n<!--\n We need to project the content somewhere to avoid hydration errors. Some observations:\n 1. This is only necessary on the server.\n 2. We get a hydration error if there aren't any nodes after the `ng-content`.\n 3. We get a hydration error if `ng-content` is wrapped in another element.\n-->\n@if (_isServer) {\n <ng-content/>\n}\n\n<div\n class=\"mat-mdc-tab-body-wrapper\"\n [class._mat-animation-noopable]=\"_animationsDisabled()\"\n #tabBodyWrapper>\n @for (tab of _tabs; track tab;) {\n <mat-tab-body role=\"tabpanel\"\n [id]=\"_getTabContentId($index)\"\n [attr.tabindex]=\"(contentTabIndex != null && selectedIndex === $index) ? contentTabIndex : null\"\n [attr.aria-labelledby]=\"_getTabLabelId(tab, $index)\"\n [attr.aria-hidden]=\"selectedIndex !== $index\"\n [class]=\"tab.bodyClass\"\n [content]=\"tab.content!\"\n [position]=\"tab.position!\"\n [animationDuration]=\"animationDuration\"\n [preserveContent]=\"preserveContent\"\n (_onCentered)=\"_removeTabBodyWrapperHeight()\"\n (_onCentering)=\"_setTabBodyWrapperHeight($event)\"\n (_beforeCentering)=\"_bodyCentered($event)\"/>\n }\n</div>\n",
1710
+ styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\n"]
1711
+ }]
1712
+ }],
1713
+ ctorParameters: () => [],
1714
+ propDecorators: {
1715
+ _allTabs: [{
1716
+ type: ContentChildren,
1717
+ args: [MatTab, {
1718
+ descendants: true
1719
+ }]
1720
+ }],
1721
+ _tabBodies: [{
1722
+ type: ViewChildren,
1723
+ args: [MatTabBody]
1724
+ }],
1725
+ _tabBodyWrapper: [{
1726
+ type: ViewChild,
1727
+ args: ['tabBodyWrapper']
1728
+ }],
1729
+ _tabHeader: [{
1730
+ type: ViewChild,
1731
+ args: ['tabHeader']
1732
+ }],
1733
+ color: [{
1734
+ type: Input
1735
+ }],
1736
+ fitInkBarToContent: [{
1737
+ type: Input,
1738
+ args: [{
1739
+ transform: booleanAttribute
1740
+ }]
1741
+ }],
1742
+ stretchTabs: [{
1743
+ type: Input,
1744
+ args: [{
1745
+ alias: 'mat-stretch-tabs',
1746
+ transform: booleanAttribute
1747
+ }]
1748
+ }],
1749
+ alignTabs: [{
1750
+ type: Input,
1751
+ args: [{
1752
+ alias: 'mat-align-tabs'
1753
+ }]
1754
+ }],
1755
+ dynamicHeight: [{
1756
+ type: Input,
1757
+ args: [{
1758
+ transform: booleanAttribute
1759
+ }]
1760
+ }],
1761
+ selectedIndex: [{
1762
+ type: Input,
1763
+ args: [{
1764
+ transform: numberAttribute
1765
+ }]
1766
+ }],
1767
+ headerPosition: [{
1768
+ type: Input
1769
+ }],
1770
+ animationDuration: [{
1771
+ type: Input
1772
+ }],
1773
+ contentTabIndex: [{
1774
+ type: Input,
1775
+ args: [{
1776
+ transform: numberAttribute
1777
+ }]
1778
+ }],
1779
+ disablePagination: [{
1780
+ type: Input,
1781
+ args: [{
1782
+ transform: booleanAttribute
1783
+ }]
1784
+ }],
1785
+ disableRipple: [{
1786
+ type: Input,
1787
+ args: [{
1788
+ transform: booleanAttribute
1789
+ }]
1790
+ }],
1791
+ preserveContent: [{
1792
+ type: Input,
1793
+ args: [{
1794
+ transform: booleanAttribute
1795
+ }]
1796
+ }],
1797
+ backgroundColor: [{
1798
+ type: Input
1799
+ }],
1800
+ ariaLabel: [{
1801
+ type: Input,
1802
+ args: ['aria-label']
1803
+ }],
1804
+ ariaLabelledby: [{
1805
+ type: Input,
1806
+ args: ['aria-labelledby']
1807
+ }],
1808
+ selectedIndexChange: [{
1809
+ type: Output
1810
+ }],
1811
+ focusChange: [{
1812
+ type: Output
1813
+ }],
1814
+ animationDone: [{
1815
+ type: Output
1816
+ }],
1817
+ selectedTabChange: [{
1818
+ type: Output
1819
+ }]
1820
+ }
1821
+ });
1700
1822
  class MatTabChangeEvent {
1701
- /** Index of the currently-selected tab. */
1702
- index;
1703
- /** Reference to the currently-selected tab. */
1704
- tab;
1823
+ index;
1824
+ tab;
1705
1825
  }
1706
1826
 
1707
- /**
1708
- * Navigation component matching the styles of the tab group header.
1709
- * Provides anchored navigation with animated ink bar.
1710
- */
1711
1827
  class MatTabNav extends MatPaginatedTabHeader {
1712
- _focusedItem = signal(null, ...(ngDevMode ? [{ debugName: "_focusedItem" }] : []));
1713
- /** Whether the ink bar should fit its width to the size of the tab label content. */
1714
- get fitInkBarToContent() {
1715
- return this._fitInkBarToContent.value;
1716
- }
1717
- set fitInkBarToContent(value) {
1718
- this._fitInkBarToContent.next(value);
1828
+ _focusedItem = signal(null, ...(ngDevMode ? [{
1829
+ debugName: "_focusedItem"
1830
+ }] : []));
1831
+ get fitInkBarToContent() {
1832
+ return this._fitInkBarToContent.value;
1833
+ }
1834
+ set fitInkBarToContent(value) {
1835
+ this._fitInkBarToContent.next(value);
1836
+ this._changeDetectorRef.markForCheck();
1837
+ }
1838
+ _fitInkBarToContent = new BehaviorSubject(false);
1839
+ stretchTabs = true;
1840
+ get animationDuration() {
1841
+ return this._animationDuration;
1842
+ }
1843
+ set animationDuration(value) {
1844
+ const stringValue = value + '';
1845
+ this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
1846
+ }
1847
+ _animationDuration;
1848
+ _items;
1849
+ get backgroundColor() {
1850
+ return this._backgroundColor;
1851
+ }
1852
+ set backgroundColor(value) {
1853
+ const classList = this._elementRef.nativeElement.classList;
1854
+ classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
1855
+ if (value) {
1856
+ classList.add('mat-tabs-with-background', `mat-background-${value}`);
1857
+ }
1858
+ this._backgroundColor = value;
1859
+ }
1860
+ _backgroundColor;
1861
+ get disableRipple() {
1862
+ return this._disableRipple();
1863
+ }
1864
+ set disableRipple(value) {
1865
+ this._disableRipple.set(value);
1866
+ }
1867
+ _disableRipple = signal(false, ...(ngDevMode ? [{
1868
+ debugName: "_disableRipple"
1869
+ }] : []));
1870
+ color = 'primary';
1871
+ tabPanel;
1872
+ _tabListContainer;
1873
+ _tabList;
1874
+ _tabListInner;
1875
+ _nextPaginator;
1876
+ _previousPaginator;
1877
+ _inkBar;
1878
+ constructor() {
1879
+ const defaultConfig = inject(MAT_TABS_CONFIG, {
1880
+ optional: true
1881
+ });
1882
+ super();
1883
+ this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;
1884
+ this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;
1885
+ this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
1886
+ }
1887
+ _itemSelected() {}
1888
+ ngAfterContentInit() {
1889
+ this._inkBar = new MatInkBar(this._items);
1890
+ this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => this.updateActiveLink());
1891
+ super.ngAfterContentInit();
1892
+ this._keyManager.change.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => this._focusedItem.set(this._keyManager?.activeItem || null));
1893
+ }
1894
+ ngAfterViewInit() {
1895
+ if (!this.tabPanel && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1896
+ throw new Error('A mat-tab-nav-panel must be specified via [tabPanel].');
1897
+ }
1898
+ super.ngAfterViewInit();
1899
+ }
1900
+ updateActiveLink() {
1901
+ if (!this._items) {
1902
+ return;
1903
+ }
1904
+ const items = this._items.toArray();
1905
+ for (let i = 0; i < items.length; i++) {
1906
+ if (items[i].active) {
1907
+ this.selectedIndex = i;
1908
+ if (this.tabPanel) {
1909
+ this.tabPanel._activeTabId = items[i].id;
1910
+ }
1911
+ this._focusedItem.set(items[i]);
1719
1912
  this._changeDetectorRef.markForCheck();
1720
- }
1721
- _fitInkBarToContent = new BehaviorSubject(false);
1722
- /** Whether tabs should be stretched to fill the header. */
1723
- stretchTabs = true;
1724
- get animationDuration() {
1725
- return this._animationDuration;
1726
- }
1727
- set animationDuration(value) {
1728
- const stringValue = value + '';
1729
- this._animationDuration = /^\d+$/.test(stringValue) ? value + 'ms' : stringValue;
1730
- }
1731
- _animationDuration;
1732
- /** Query list of all tab links of the tab navigation. */
1733
- _items;
1734
- /**
1735
- * Theme color of the background of the tab nav. This API is supported in M2 themes only, it
1736
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/tabs/styling.
1737
- *
1738
- * For information on applying color variants in M3, see
1739
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1740
- */
1741
- get backgroundColor() {
1742
- return this._backgroundColor;
1743
- }
1744
- set backgroundColor(value) {
1745
- const classList = this._elementRef.nativeElement.classList;
1746
- classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);
1747
- if (value) {
1748
- classList.add('mat-tabs-with-background', `mat-background-${value}`);
1749
- }
1750
- this._backgroundColor = value;
1751
- }
1752
- _backgroundColor;
1753
- /** Whether the ripple effect is disabled or not. */
1754
- get disableRipple() {
1755
- return this._disableRipple();
1756
- }
1757
- set disableRipple(value) {
1758
- this._disableRipple.set(value);
1759
- }
1760
- _disableRipple = signal(false, ...(ngDevMode ? [{ debugName: "_disableRipple" }] : []));
1761
- /**
1762
- * Theme color of the nav bar. This API is supported in M2 themes only, it has
1763
- * no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/tabs/styling.
1764
- *
1765
- * For information on applying color variants in M3, see
1766
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1767
- */
1768
- color = 'primary';
1769
- /**
1770
- * Associated tab panel controlled by the nav bar. If not provided, then the nav bar
1771
- * follows the ARIA link / navigation landmark pattern. If provided, it follows the
1772
- * ARIA tabs design pattern.
1773
- */
1774
- tabPanel;
1775
- _tabListContainer;
1776
- _tabList;
1777
- _tabListInner;
1778
- _nextPaginator;
1779
- _previousPaginator;
1780
- _inkBar;
1781
- constructor() {
1782
- const defaultConfig = inject(MAT_TABS_CONFIG, { optional: true });
1783
- super();
1784
- this.disablePagination =
1785
- defaultConfig && defaultConfig.disablePagination != null
1786
- ? defaultConfig.disablePagination
1787
- : false;
1788
- this.fitInkBarToContent =
1789
- defaultConfig && defaultConfig.fitInkBarToContent != null
1790
- ? defaultConfig.fitInkBarToContent
1791
- : false;
1792
- this.stretchTabs =
1793
- defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;
1794
- }
1795
- _itemSelected() {
1796
- // noop
1797
- }
1798
- ngAfterContentInit() {
1799
- this._inkBar = new MatInkBar(this._items);
1800
- // We need this to run before the `changes` subscription in parent to ensure that the
1801
- // selectedIndex is up-to-date by the time the super class starts looking for it.
1802
- this._items.changes
1803
- .pipe(startWith(null), takeUntil(this._destroyed))
1804
- .subscribe(() => this.updateActiveLink());
1805
- super.ngAfterContentInit();
1806
- // Turn the `change` stream into a signal to try and avoid "changed after checked" errors.
1807
- this._keyManager.change.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => this._focusedItem.set(this._keyManager?.activeItem || null));
1808
- }
1809
- ngAfterViewInit() {
1810
- if (!this.tabPanel && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1811
- throw new Error('A mat-tab-nav-panel must be specified via [tabPanel].');
1812
- }
1813
- super.ngAfterViewInit();
1814
- }
1815
- /** Notifies the component that the active link has been changed. */
1816
- updateActiveLink() {
1817
- if (!this._items) {
1818
- return;
1819
- }
1820
- const items = this._items.toArray();
1821
- for (let i = 0; i < items.length; i++) {
1822
- if (items[i].active) {
1823
- this.selectedIndex = i;
1824
- if (this.tabPanel) {
1825
- this.tabPanel._activeTabId = items[i].id;
1826
- }
1827
- // Updating the `selectedIndex` won't trigger the `change` event on
1828
- // the key manager so we need to set the signal from here.
1829
- this._focusedItem.set(items[i]);
1830
- this._changeDetectorRef.markForCheck();
1831
- return;
1832
- }
1833
- }
1834
- this.selectedIndex = -1;
1835
- }
1836
- _getRole() {
1837
- return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');
1838
- }
1839
- _hasFocus(link) {
1840
- return this._keyManager?.activeItem === link;
1841
- }
1842
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
1843
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTabNav, isStandalone: true, selector: "[mat-tab-nav-bar]", inputs: { fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute], stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute], animationDuration: "animationDuration", backgroundColor: "backgroundColor", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], color: "color", tabPanel: "tabPanel" }, host: { properties: { "attr.role": "_getRole()", "class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls", "class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'", "class.mat-mdc-tab-nav-bar-stretch-tabs": "stretchTabs", "class.mat-primary": "color !== \"warn\" && color !== \"accent\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "class._mat-animation-noopable": "_animationsDisabled", "style.--mat-tab-animation-duration": "animationDuration" }, classAttribute: "mat-mdc-tab-nav-bar mat-mdc-tab-header" }, queries: [{ propertyName: "_items", predicate: i0.forwardRef(() => MatTabLink), descendants: true }], viewQueries: [{ propertyName: "_tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "_tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "_tabListInner", first: true, predicate: ["tabListInner"], descendants: true, static: true }, { propertyName: "_nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "_previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], exportAs: ["matTabNavBar", "matTabNav"], usesInheritance: true, ngImport: i0, template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
1913
+ return;
1914
+ }
1915
+ }
1916
+ this.selectedIndex = -1;
1917
+ }
1918
+ _getRole() {
1919
+ return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');
1920
+ }
1921
+ _hasFocus(link) {
1922
+ return this._keyManager?.activeItem === link;
1923
+ }
1924
+ static ɵfac = i0.ɵɵngDeclareFactory({
1925
+ minVersion: "12.0.0",
1926
+ version: "20.2.0-next.2",
1927
+ ngImport: i0,
1928
+ type: MatTabNav,
1929
+ deps: [],
1930
+ target: i0.ɵɵFactoryTarget.Component
1931
+ });
1932
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1933
+ minVersion: "16.1.0",
1934
+ version: "20.2.0-next.2",
1935
+ type: MatTabNav,
1936
+ isStandalone: true,
1937
+ selector: "[mat-tab-nav-bar]",
1938
+ inputs: {
1939
+ fitInkBarToContent: ["fitInkBarToContent", "fitInkBarToContent", booleanAttribute],
1940
+ stretchTabs: ["mat-stretch-tabs", "stretchTabs", booleanAttribute],
1941
+ animationDuration: "animationDuration",
1942
+ backgroundColor: "backgroundColor",
1943
+ disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
1944
+ color: "color",
1945
+ tabPanel: "tabPanel"
1946
+ },
1947
+ host: {
1948
+ properties: {
1949
+ "attr.role": "_getRole()",
1950
+ "class.mat-mdc-tab-header-pagination-controls-enabled": "_showPaginationControls",
1951
+ "class.mat-mdc-tab-header-rtl": "_getLayoutDirection() == 'rtl'",
1952
+ "class.mat-mdc-tab-nav-bar-stretch-tabs": "stretchTabs",
1953
+ "class.mat-primary": "color !== \"warn\" && color !== \"accent\"",
1954
+ "class.mat-accent": "color === \"accent\"",
1955
+ "class.mat-warn": "color === \"warn\"",
1956
+ "class._mat-animation-noopable": "_animationsDisabled",
1957
+ "style.--mat-tab-animation-duration": "animationDuration"
1958
+ },
1959
+ classAttribute: "mat-mdc-tab-nav-bar mat-mdc-tab-header"
1960
+ },
1961
+ queries: [{
1962
+ propertyName: "_items",
1963
+ predicate: i0.forwardRef(() => MatTabLink),
1964
+ descendants: true
1965
+ }],
1966
+ viewQueries: [{
1967
+ propertyName: "_tabListContainer",
1968
+ first: true,
1969
+ predicate: ["tabListContainer"],
1970
+ descendants: true,
1971
+ static: true
1972
+ }, {
1973
+ propertyName: "_tabList",
1974
+ first: true,
1975
+ predicate: ["tabList"],
1976
+ descendants: true,
1977
+ static: true
1978
+ }, {
1979
+ propertyName: "_tabListInner",
1980
+ first: true,
1981
+ predicate: ["tabListInner"],
1982
+ descendants: true,
1983
+ static: true
1984
+ }, {
1985
+ propertyName: "_nextPaginator",
1986
+ first: true,
1987
+ predicate: ["nextPaginator"],
1988
+ descendants: true
1989
+ }, {
1990
+ propertyName: "_previousPaginator",
1991
+ first: true,
1992
+ predicate: ["previousPaginator"],
1993
+ descendants: true
1994
+ }],
1995
+ exportAs: ["matTabNavBar", "matTabNav"],
1996
+ usesInheritance: true,
1997
+ ngImport: i0,
1998
+ template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
1999
+ styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"],
2000
+ dependencies: [{
2001
+ kind: "directive",
2002
+ type: MatRipple,
2003
+ selector: "[mat-ripple], [matRipple]",
2004
+ inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
2005
+ exportAs: ["matRipple"]
2006
+ }, {
2007
+ kind: "directive",
2008
+ type: CdkObserveContent,
2009
+ selector: "[cdkObserveContent]",
2010
+ inputs: ["cdkObserveContentDisabled", "debounce"],
2011
+ outputs: ["cdkObserveContent"],
2012
+ exportAs: ["cdkObserveContent"]
2013
+ }],
2014
+ changeDetection: i0.ChangeDetectionStrategy.Default,
2015
+ encapsulation: i0.ViewEncapsulation.None
2016
+ });
1844
2017
  }
1845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabNav, decorators: [{
1846
- type: Component,
1847
- args: [{ selector: '[mat-tab-nav-bar]', exportAs: 'matTabNavBar, matTabNav', host: {
1848
- '[attr.role]': '_getRole()',
1849
- 'class': 'mat-mdc-tab-nav-bar mat-mdc-tab-header',
1850
- '[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
1851
- '[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
1852
- '[class.mat-mdc-tab-nav-bar-stretch-tabs]': 'stretchTabs',
1853
- '[class.mat-primary]': 'color !== "warn" && color !== "accent"',
1854
- '[class.mat-accent]': 'color === "accent"',
1855
- '[class.mat-warn]': 'color === "warn"',
1856
- '[class._mat-animation-noopable]': '_animationsDisabled',
1857
- '[style.--mat-tab-animation-duration]': 'animationDuration',
1858
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [MatRipple, CdkObserveContent], template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n", styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"] }]
1859
- }], ctorParameters: () => [], propDecorators: { fitInkBarToContent: [{
1860
- type: Input,
1861
- args: [{ transform: booleanAttribute }]
1862
- }], stretchTabs: [{
1863
- type: Input,
1864
- args: [{ alias: 'mat-stretch-tabs', transform: booleanAttribute }]
1865
- }], animationDuration: [{
1866
- type: Input
1867
- }], _items: [{
1868
- type: ContentChildren,
1869
- args: [forwardRef(() => MatTabLink), { descendants: true }]
1870
- }], backgroundColor: [{
1871
- type: Input
1872
- }], disableRipple: [{
1873
- type: Input,
1874
- args: [{ transform: booleanAttribute }]
1875
- }], color: [{
1876
- type: Input
1877
- }], tabPanel: [{
1878
- type: Input
1879
- }], _tabListContainer: [{
1880
- type: ViewChild,
1881
- args: ['tabListContainer', { static: true }]
1882
- }], _tabList: [{
1883
- type: ViewChild,
1884
- args: ['tabList', { static: true }]
1885
- }], _tabListInner: [{
1886
- type: ViewChild,
1887
- args: ['tabListInner', { static: true }]
1888
- }], _nextPaginator: [{
1889
- type: ViewChild,
1890
- args: ['nextPaginator']
1891
- }], _previousPaginator: [{
1892
- type: ViewChild,
1893
- args: ['previousPaginator']
1894
- }] } });
1895
- /**
1896
- * Link inside a `mat-tab-nav-bar`.
1897
- */
2018
+ i0.ɵɵngDeclareClassMetadata({
2019
+ minVersion: "12.0.0",
2020
+ version: "20.2.0-next.2",
2021
+ ngImport: i0,
2022
+ type: MatTabNav,
2023
+ decorators: [{
2024
+ type: Component,
2025
+ args: [{
2026
+ selector: '[mat-tab-nav-bar]',
2027
+ exportAs: 'matTabNavBar, matTabNav',
2028
+ host: {
2029
+ '[attr.role]': '_getRole()',
2030
+ 'class': 'mat-mdc-tab-nav-bar mat-mdc-tab-header',
2031
+ '[class.mat-mdc-tab-header-pagination-controls-enabled]': '_showPaginationControls',
2032
+ '[class.mat-mdc-tab-header-rtl]': "_getLayoutDirection() == 'rtl'",
2033
+ '[class.mat-mdc-tab-nav-bar-stretch-tabs]': 'stretchTabs',
2034
+ '[class.mat-primary]': 'color !== "warn" && color !== "accent"',
2035
+ '[class.mat-accent]': 'color === "accent"',
2036
+ '[class.mat-warn]': 'color === "warn"',
2037
+ '[class._mat-animation-noopable]': '_animationsDisabled',
2038
+ '[style.--mat-tab-animation-duration]': 'animationDuration'
2039
+ },
2040
+ encapsulation: ViewEncapsulation.None,
2041
+ changeDetection: ChangeDetectionStrategy.Default,
2042
+ imports: [MatRipple, CdkObserveContent],
2043
+ template: "<!--\n Note that this intentionally uses a `div` instead of a `button`, because it's not part of\n the regular tabs flow and is only here to support mouse users. It should also not be focusable.\n-->\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-before\"\n #previousPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollBefore || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollBefore\"\n (click)=\"_handlePaginatorClick('before')\"\n (mousedown)=\"_handlePaginatorPress('before', $event)\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n\n<div class=\"mat-mdc-tab-link-container\" #tabListContainer (keydown)=\"_handleKeydown($event)\">\n <div class=\"mat-mdc-tab-list\" #tabList (cdkObserveContent)=\"_onContentChanges()\">\n <div class=\"mat-mdc-tab-links\" #tabListInner>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n\n<div class=\"mat-mdc-tab-header-pagination mat-mdc-tab-header-pagination-after\"\n #nextPaginator\n mat-ripple\n [matRippleDisabled]=\"_disableScrollAfter || disableRipple\"\n [class.mat-mdc-tab-header-pagination-disabled]=\"_disableScrollAfter\"\n (mousedown)=\"_handlePaginatorPress('after', $event)\"\n (click)=\"_handlePaginatorClick('after')\"\n (touchend)=\"_stopInterval()\">\n <div class=\"mat-mdc-tab-header-pagination-chevron\"></div>\n</div>\n",
2044
+ styles: [".mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}\n"]
2045
+ }]
2046
+ }],
2047
+ ctorParameters: () => [],
2048
+ propDecorators: {
2049
+ fitInkBarToContent: [{
2050
+ type: Input,
2051
+ args: [{
2052
+ transform: booleanAttribute
2053
+ }]
2054
+ }],
2055
+ stretchTabs: [{
2056
+ type: Input,
2057
+ args: [{
2058
+ alias: 'mat-stretch-tabs',
2059
+ transform: booleanAttribute
2060
+ }]
2061
+ }],
2062
+ animationDuration: [{
2063
+ type: Input
2064
+ }],
2065
+ _items: [{
2066
+ type: ContentChildren,
2067
+ args: [forwardRef(() => MatTabLink), {
2068
+ descendants: true
2069
+ }]
2070
+ }],
2071
+ backgroundColor: [{
2072
+ type: Input
2073
+ }],
2074
+ disableRipple: [{
2075
+ type: Input,
2076
+ args: [{
2077
+ transform: booleanAttribute
2078
+ }]
2079
+ }],
2080
+ color: [{
2081
+ type: Input
2082
+ }],
2083
+ tabPanel: [{
2084
+ type: Input
2085
+ }],
2086
+ _tabListContainer: [{
2087
+ type: ViewChild,
2088
+ args: ['tabListContainer', {
2089
+ static: true
2090
+ }]
2091
+ }],
2092
+ _tabList: [{
2093
+ type: ViewChild,
2094
+ args: ['tabList', {
2095
+ static: true
2096
+ }]
2097
+ }],
2098
+ _tabListInner: [{
2099
+ type: ViewChild,
2100
+ args: ['tabListInner', {
2101
+ static: true
2102
+ }]
2103
+ }],
2104
+ _nextPaginator: [{
2105
+ type: ViewChild,
2106
+ args: ['nextPaginator']
2107
+ }],
2108
+ _previousPaginator: [{
2109
+ type: ViewChild,
2110
+ args: ['previousPaginator']
2111
+ }]
2112
+ }
2113
+ });
1898
2114
  class MatTabLink extends InkBarItem {
1899
- _tabNavBar = inject(MatTabNav);
1900
- elementRef = inject(ElementRef);
1901
- _focusMonitor = inject(FocusMonitor);
1902
- _destroyed = new Subject();
1903
- /** Whether the tab link is active or not. */
1904
- _isActive = false;
1905
- _tabIndex = computed(() => this._tabNavBar._focusedItem() === this ? this.tabIndex : -1, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : []));
1906
- /** Whether the link is active. */
1907
- get active() {
1908
- return this._isActive;
1909
- }
1910
- set active(value) {
1911
- if (value !== this._isActive) {
1912
- this._isActive = value;
1913
- this._tabNavBar.updateActiveLink();
1914
- }
1915
- }
1916
- /** Whether the tab link is disabled. */
1917
- disabled = false;
1918
- /** Whether ripples are disabled on the tab link. */
1919
- get disableRipple() {
1920
- return this._disableRipple();
1921
- }
1922
- set disableRipple(value) {
1923
- this._disableRipple.set(value);
1924
- }
1925
- _disableRipple = signal(false, ...(ngDevMode ? [{ debugName: "_disableRipple" }] : []));
1926
- tabIndex = 0;
1927
- /**
1928
- * Ripple configuration for ripples that are launched on pointer down. The ripple config
1929
- * is set to the global ripple options since we don't have any configurable options for
1930
- * the tab link ripples.
1931
- * @docs-private
1932
- */
1933
- rippleConfig;
1934
- /**
1935
- * Whether ripples are disabled on interaction.
1936
- * @docs-private
1937
- */
1938
- get rippleDisabled() {
1939
- return (this.disabled ||
1940
- this.disableRipple ||
1941
- this._tabNavBar.disableRipple ||
1942
- !!this.rippleConfig.disabled);
1943
- }
1944
- /** Unique id for the tab. */
1945
- id = inject(_IdGenerator).getId('mat-tab-link-');
1946
- constructor() {
1947
- super();
1948
- inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
1949
- const globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {
1950
- optional: true,
1951
- });
1952
- const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });
1953
- this.rippleConfig = globalRippleOptions || {};
1954
- this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;
1955
- if (_animationsDisabled()) {
1956
- this.rippleConfig.animation = { enterDuration: 0, exitDuration: 0 };
1957
- }
1958
- this._tabNavBar._fitInkBarToContent
1959
- .pipe(takeUntil(this._destroyed))
1960
- .subscribe(fitInkBarToContent => {
1961
- this.fitInkBarToContent = fitInkBarToContent;
1962
- });
1963
- }
1964
- /** Focuses the tab link. */
1965
- focus() {
1966
- this.elementRef.nativeElement.focus();
1967
- }
1968
- ngAfterViewInit() {
1969
- this._focusMonitor.monitor(this.elementRef);
1970
- }
1971
- ngOnDestroy() {
1972
- this._destroyed.next();
1973
- this._destroyed.complete();
1974
- super.ngOnDestroy();
1975
- this._focusMonitor.stopMonitoring(this.elementRef);
1976
- }
1977
- _handleFocus() {
1978
- // Since we allow navigation through tabbing in the nav bar, we
1979
- // have to update the focused index whenever the link receives focus.
1980
- this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);
1981
- }
1982
- _handleKeydown(event) {
1983
- if (event.keyCode === SPACE || event.keyCode === ENTER) {
1984
- if (this.disabled) {
1985
- event.preventDefault();
1986
- }
1987
- else if (this._tabNavBar.tabPanel) {
1988
- // Only prevent the default action on space since it can scroll the page.
1989
- // Don't prevent enter since it can break link navigation.
1990
- if (event.keyCode === SPACE) {
1991
- event.preventDefault();
1992
- }
1993
- this.elementRef.nativeElement.click();
1994
- }
1995
- }
1996
- }
1997
- _getAriaControls() {
1998
- return this._tabNavBar.tabPanel
1999
- ? this._tabNavBar.tabPanel?.id
2000
- : this.elementRef.nativeElement.getAttribute('aria-controls');
2001
- }
2002
- _getAriaSelected() {
2003
- if (this._tabNavBar.tabPanel) {
2004
- return this.active ? 'true' : 'false';
2005
- }
2006
- else {
2007
- return this.elementRef.nativeElement.getAttribute('aria-selected');
2008
- }
2009
- }
2010
- _getAriaCurrent() {
2011
- return this.active && !this._tabNavBar.tabPanel ? 'page' : null;
2012
- }
2013
- _getRole() {
2014
- return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');
2015
- }
2016
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
2017
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatTabLink, isStandalone: true, selector: "[mat-tab-link], [matTabLink]", inputs: { active: ["active", "active", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute], tabIndex: ["tabIndex", "tabIndex", (value) => (value == null ? 0 : numberAttribute(value))], id: "id" }, host: { listeners: { "focus": "_handleFocus()", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-controls": "_getAriaControls()", "attr.aria-current": "_getAriaCurrent()", "attr.aria-disabled": "disabled", "attr.aria-selected": "_getAriaSelected()", "attr.id": "id", "attr.tabIndex": "_tabIndex()", "attr.role": "_getRole()", "class.mat-mdc-tab-disabled": "disabled", "class.mdc-tab--active": "active" }, classAttribute: "mdc-tab mat-mdc-tab-link mat-focus-indicator" }, exportAs: ["matTabLink"], usesInheritance: true, ngImport: i0, template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n", styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"], dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2115
+ _tabNavBar = inject(MatTabNav);
2116
+ elementRef = inject(ElementRef);
2117
+ _focusMonitor = inject(FocusMonitor);
2118
+ _destroyed = new Subject();
2119
+ _isActive = false;
2120
+ _tabIndex = computed(() => this._tabNavBar._focusedItem() === this ? this.tabIndex : -1, ...(ngDevMode ? [{
2121
+ debugName: "_tabIndex"
2122
+ }] : []));
2123
+ get active() {
2124
+ return this._isActive;
2125
+ }
2126
+ set active(value) {
2127
+ if (value !== this._isActive) {
2128
+ this._isActive = value;
2129
+ this._tabNavBar.updateActiveLink();
2130
+ }
2131
+ }
2132
+ disabled = false;
2133
+ get disableRipple() {
2134
+ return this._disableRipple();
2135
+ }
2136
+ set disableRipple(value) {
2137
+ this._disableRipple.set(value);
2138
+ }
2139
+ _disableRipple = signal(false, ...(ngDevMode ? [{
2140
+ debugName: "_disableRipple"
2141
+ }] : []));
2142
+ tabIndex = 0;
2143
+ rippleConfig;
2144
+ get rippleDisabled() {
2145
+ return this.disabled || this.disableRipple || this._tabNavBar.disableRipple || !!this.rippleConfig.disabled;
2146
+ }
2147
+ id = inject(_IdGenerator).getId('mat-tab-link-');
2148
+ constructor() {
2149
+ super();
2150
+ inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
2151
+ const globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, {
2152
+ optional: true
2153
+ });
2154
+ const tabIndex = inject(new HostAttributeToken('tabindex'), {
2155
+ optional: true
2156
+ });
2157
+ this.rippleConfig = globalRippleOptions || {};
2158
+ this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;
2159
+ if (_animationsDisabled()) {
2160
+ this.rippleConfig.animation = {
2161
+ enterDuration: 0,
2162
+ exitDuration: 0
2163
+ };
2164
+ }
2165
+ this._tabNavBar._fitInkBarToContent.pipe(takeUntil(this._destroyed)).subscribe(fitInkBarToContent => {
2166
+ this.fitInkBarToContent = fitInkBarToContent;
2167
+ });
2168
+ }
2169
+ focus() {
2170
+ this.elementRef.nativeElement.focus();
2171
+ }
2172
+ ngAfterViewInit() {
2173
+ this._focusMonitor.monitor(this.elementRef);
2174
+ }
2175
+ ngOnDestroy() {
2176
+ this._destroyed.next();
2177
+ this._destroyed.complete();
2178
+ super.ngOnDestroy();
2179
+ this._focusMonitor.stopMonitoring(this.elementRef);
2180
+ }
2181
+ _handleFocus() {
2182
+ this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);
2183
+ }
2184
+ _handleKeydown(event) {
2185
+ if (event.keyCode === SPACE || event.keyCode === ENTER) {
2186
+ if (this.disabled) {
2187
+ event.preventDefault();
2188
+ } else if (this._tabNavBar.tabPanel) {
2189
+ if (event.keyCode === SPACE) {
2190
+ event.preventDefault();
2191
+ }
2192
+ this.elementRef.nativeElement.click();
2193
+ }
2194
+ }
2195
+ }
2196
+ _getAriaControls() {
2197
+ return this._tabNavBar.tabPanel ? this._tabNavBar.tabPanel?.id : this.elementRef.nativeElement.getAttribute('aria-controls');
2198
+ }
2199
+ _getAriaSelected() {
2200
+ if (this._tabNavBar.tabPanel) {
2201
+ return this.active ? 'true' : 'false';
2202
+ } else {
2203
+ return this.elementRef.nativeElement.getAttribute('aria-selected');
2204
+ }
2205
+ }
2206
+ _getAriaCurrent() {
2207
+ return this.active && !this._tabNavBar.tabPanel ? 'page' : null;
2208
+ }
2209
+ _getRole() {
2210
+ return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');
2211
+ }
2212
+ static ɵfac = i0.ɵɵngDeclareFactory({
2213
+ minVersion: "12.0.0",
2214
+ version: "20.2.0-next.2",
2215
+ ngImport: i0,
2216
+ type: MatTabLink,
2217
+ deps: [],
2218
+ target: i0.ɵɵFactoryTarget.Component
2219
+ });
2220
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2221
+ minVersion: "16.1.0",
2222
+ version: "20.2.0-next.2",
2223
+ type: MatTabLink,
2224
+ isStandalone: true,
2225
+ selector: "[mat-tab-link], [matTabLink]",
2226
+ inputs: {
2227
+ active: ["active", "active", booleanAttribute],
2228
+ disabled: ["disabled", "disabled", booleanAttribute],
2229
+ disableRipple: ["disableRipple", "disableRipple", booleanAttribute],
2230
+ tabIndex: ["tabIndex", "tabIndex", value => value == null ? 0 : numberAttribute(value)],
2231
+ id: "id"
2232
+ },
2233
+ host: {
2234
+ listeners: {
2235
+ "focus": "_handleFocus()",
2236
+ "keydown": "_handleKeydown($event)"
2237
+ },
2238
+ properties: {
2239
+ "attr.aria-controls": "_getAriaControls()",
2240
+ "attr.aria-current": "_getAriaCurrent()",
2241
+ "attr.aria-disabled": "disabled",
2242
+ "attr.aria-selected": "_getAriaSelected()",
2243
+ "attr.id": "id",
2244
+ "attr.tabIndex": "_tabIndex()",
2245
+ "attr.role": "_getRole()",
2246
+ "class.mat-mdc-tab-disabled": "disabled",
2247
+ "class.mdc-tab--active": "active"
2248
+ },
2249
+ classAttribute: "mdc-tab mat-mdc-tab-link mat-focus-indicator"
2250
+ },
2251
+ exportAs: ["matTabLink"],
2252
+ usesInheritance: true,
2253
+ ngImport: i0,
2254
+ template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n",
2255
+ styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"],
2256
+ dependencies: [{
2257
+ kind: "directive",
2258
+ type: MatRipple,
2259
+ selector: "[mat-ripple], [matRipple]",
2260
+ inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"],
2261
+ exportAs: ["matRipple"]
2262
+ }],
2263
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2264
+ encapsulation: i0.ViewEncapsulation.None
2265
+ });
2018
2266
  }
2019
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabLink, decorators: [{
2020
- type: Component,
2021
- args: [{ selector: '[mat-tab-link], [matTabLink]', exportAs: 'matTabLink', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
2022
- 'class': 'mdc-tab mat-mdc-tab-link mat-focus-indicator',
2023
- '[attr.aria-controls]': '_getAriaControls()',
2024
- '[attr.aria-current]': '_getAriaCurrent()',
2025
- '[attr.aria-disabled]': 'disabled',
2026
- '[attr.aria-selected]': '_getAriaSelected()',
2027
- '[attr.id]': 'id',
2028
- '[attr.tabIndex]': '_tabIndex()',
2029
- '[attr.role]': '_getRole()',
2030
- '[class.mat-mdc-tab-disabled]': 'disabled',
2031
- '[class.mdc-tab--active]': 'active',
2032
- '(focus)': '_handleFocus()',
2033
- '(keydown)': '_handleKeydown($event)',
2034
- }, imports: [MatRipple], template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n", styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"] }]
2035
- }], ctorParameters: () => [], propDecorators: { active: [{
2036
- type: Input,
2037
- args: [{ transform: booleanAttribute }]
2038
- }], disabled: [{
2039
- type: Input,
2040
- args: [{ transform: booleanAttribute }]
2041
- }], disableRipple: [{
2042
- type: Input,
2043
- args: [{ transform: booleanAttribute }]
2044
- }], tabIndex: [{
2045
- type: Input,
2046
- args: [{
2047
- transform: (value) => (value == null ? 0 : numberAttribute(value)),
2048
- }]
2049
- }], id: [{
2050
- type: Input
2051
- }] } });
2052
- /**
2053
- * Tab panel component associated with MatTabNav.
2054
- */
2267
+ i0.ɵɵngDeclareClassMetadata({
2268
+ minVersion: "12.0.0",
2269
+ version: "20.2.0-next.2",
2270
+ ngImport: i0,
2271
+ type: MatTabLink,
2272
+ decorators: [{
2273
+ type: Component,
2274
+ args: [{
2275
+ selector: '[mat-tab-link], [matTabLink]',
2276
+ exportAs: 'matTabLink',
2277
+ changeDetection: ChangeDetectionStrategy.OnPush,
2278
+ encapsulation: ViewEncapsulation.None,
2279
+ host: {
2280
+ 'class': 'mdc-tab mat-mdc-tab-link mat-focus-indicator',
2281
+ '[attr.aria-controls]': '_getAriaControls()',
2282
+ '[attr.aria-current]': '_getAriaCurrent()',
2283
+ '[attr.aria-disabled]': 'disabled',
2284
+ '[attr.aria-selected]': '_getAriaSelected()',
2285
+ '[attr.id]': 'id',
2286
+ '[attr.tabIndex]': '_tabIndex()',
2287
+ '[attr.role]': '_getRole()',
2288
+ '[class.mat-mdc-tab-disabled]': 'disabled',
2289
+ '[class.mdc-tab--active]': 'active',
2290
+ '(focus)': '_handleFocus()',
2291
+ '(keydown)': '_handleKeydown($event)'
2292
+ },
2293
+ imports: [MatRipple],
2294
+ template: "<span class=\"mdc-tab__ripple\"></span>\n\n<div\n class=\"mat-mdc-tab-ripple\"\n mat-ripple\n [matRippleTrigger]=\"elementRef.nativeElement\"\n [matRippleDisabled]=\"rippleDisabled\"></div>\n\n<span class=\"mdc-tab__content\">\n <span class=\"mdc-tab__text-label\">\n <ng-content></ng-content>\n </span>\n</span>\n\n",
2295
+ styles: [".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\"\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\n"]
2296
+ }]
2297
+ }],
2298
+ ctorParameters: () => [],
2299
+ propDecorators: {
2300
+ active: [{
2301
+ type: Input,
2302
+ args: [{
2303
+ transform: booleanAttribute
2304
+ }]
2305
+ }],
2306
+ disabled: [{
2307
+ type: Input,
2308
+ args: [{
2309
+ transform: booleanAttribute
2310
+ }]
2311
+ }],
2312
+ disableRipple: [{
2313
+ type: Input,
2314
+ args: [{
2315
+ transform: booleanAttribute
2316
+ }]
2317
+ }],
2318
+ tabIndex: [{
2319
+ type: Input,
2320
+ args: [{
2321
+ transform: value => value == null ? 0 : numberAttribute(value)
2322
+ }]
2323
+ }],
2324
+ id: [{
2325
+ type: Input
2326
+ }]
2327
+ }
2328
+ });
2055
2329
  class MatTabNavPanel {
2056
- /** Unique id for the tab panel. */
2057
- id = inject(_IdGenerator).getId('mat-tab-nav-panel-');
2058
- /** Id of the active tab in the nav bar. */
2059
- _activeTabId;
2060
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabNavPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
2061
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatTabNavPanel, isStandalone: true, selector: "mat-tab-nav-panel", inputs: { id: "id" }, host: { attributes: { "role": "tabpanel" }, properties: { "attr.aria-labelledby": "_activeTabId", "attr.id": "id" }, classAttribute: "mat-mdc-tab-nav-panel" }, exportAs: ["matTabNavPanel"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2330
+ id = inject(_IdGenerator).getId('mat-tab-nav-panel-');
2331
+ _activeTabId;
2332
+ static ɵfac = i0.ɵɵngDeclareFactory({
2333
+ minVersion: "12.0.0",
2334
+ version: "20.2.0-next.2",
2335
+ ngImport: i0,
2336
+ type: MatTabNavPanel,
2337
+ deps: [],
2338
+ target: i0.ɵɵFactoryTarget.Component
2339
+ });
2340
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2341
+ minVersion: "14.0.0",
2342
+ version: "20.2.0-next.2",
2343
+ type: MatTabNavPanel,
2344
+ isStandalone: true,
2345
+ selector: "mat-tab-nav-panel",
2346
+ inputs: {
2347
+ id: "id"
2348
+ },
2349
+ host: {
2350
+ attributes: {
2351
+ "role": "tabpanel"
2352
+ },
2353
+ properties: {
2354
+ "attr.aria-labelledby": "_activeTabId",
2355
+ "attr.id": "id"
2356
+ },
2357
+ classAttribute: "mat-mdc-tab-nav-panel"
2358
+ },
2359
+ exportAs: ["matTabNavPanel"],
2360
+ ngImport: i0,
2361
+ template: '<ng-content></ng-content>',
2362
+ isInline: true,
2363
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2364
+ encapsulation: i0.ViewEncapsulation.None
2365
+ });
2062
2366
  }
2063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabNavPanel, decorators: [{
2064
- type: Component,
2065
- args: [{
2066
- selector: 'mat-tab-nav-panel',
2067
- exportAs: 'matTabNavPanel',
2068
- template: '<ng-content></ng-content>',
2069
- host: {
2070
- '[attr.aria-labelledby]': '_activeTabId',
2071
- '[attr.id]': 'id',
2072
- 'class': 'mat-mdc-tab-nav-panel',
2073
- 'role': 'tabpanel',
2074
- },
2075
- encapsulation: ViewEncapsulation.None,
2076
- changeDetection: ChangeDetectionStrategy.OnPush,
2077
- }]
2078
- }], propDecorators: { id: [{
2079
- type: Input
2080
- }] } });
2367
+ i0.ɵɵngDeclareClassMetadata({
2368
+ minVersion: "12.0.0",
2369
+ version: "20.2.0-next.2",
2370
+ ngImport: i0,
2371
+ type: MatTabNavPanel,
2372
+ decorators: [{
2373
+ type: Component,
2374
+ args: [{
2375
+ selector: 'mat-tab-nav-panel',
2376
+ exportAs: 'matTabNavPanel',
2377
+ template: '<ng-content></ng-content>',
2378
+ host: {
2379
+ '[attr.aria-labelledby]': '_activeTabId',
2380
+ '[attr.id]': 'id',
2381
+ 'class': 'mat-mdc-tab-nav-panel',
2382
+ 'role': 'tabpanel'
2383
+ },
2384
+ encapsulation: ViewEncapsulation.None,
2385
+ changeDetection: ChangeDetectionStrategy.OnPush
2386
+ }]
2387
+ }],
2388
+ propDecorators: {
2389
+ id: [{
2390
+ type: Input
2391
+ }]
2392
+ }
2393
+ });
2081
2394
 
2082
2395
  class MatTabsModule {
2083
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2084
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabsModule, imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink], exports: [BidiModule,
2085
- MatTabContent,
2086
- MatTabLabel,
2087
- MatTab,
2088
- MatTabGroup,
2089
- MatTabNav,
2090
- MatTabNavPanel,
2091
- MatTabLink] });
2092
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabsModule, imports: [BidiModule] });
2396
+ static ɵfac = i0.ɵɵngDeclareFactory({
2397
+ minVersion: "12.0.0",
2398
+ version: "20.2.0-next.2",
2399
+ ngImport: i0,
2400
+ type: MatTabsModule,
2401
+ deps: [],
2402
+ target: i0.ɵɵFactoryTarget.NgModule
2403
+ });
2404
+ static ɵmod = i0.ɵɵngDeclareNgModule({
2405
+ minVersion: "14.0.0",
2406
+ version: "20.2.0-next.2",
2407
+ ngImport: i0,
2408
+ type: MatTabsModule,
2409
+ imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink],
2410
+ exports: [BidiModule, MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink]
2411
+ });
2412
+ static ɵinj = i0.ɵɵngDeclareInjector({
2413
+ minVersion: "12.0.0",
2414
+ version: "20.2.0-next.2",
2415
+ ngImport: i0,
2416
+ type: MatTabsModule,
2417
+ imports: [BidiModule]
2418
+ });
2093
2419
  }
2094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatTabsModule, decorators: [{
2095
- type: NgModule,
2096
- args: [{
2097
- imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink],
2098
- exports: [
2099
- BidiModule,
2100
- MatTabContent,
2101
- MatTabLabel,
2102
- MatTab,
2103
- MatTabGroup,
2104
- MatTabNav,
2105
- MatTabNavPanel,
2106
- MatTabLink,
2107
- ],
2108
- }]
2109
- }] });
2420
+ i0.ɵɵngDeclareClassMetadata({
2421
+ minVersion: "12.0.0",
2422
+ version: "20.2.0-next.2",
2423
+ ngImport: i0,
2424
+ type: MatTabsModule,
2425
+ decorators: [{
2426
+ type: NgModule,
2427
+ args: [{
2428
+ imports: [MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink],
2429
+ exports: [BidiModule, MatTabContent, MatTabLabel, MatTab, MatTabGroup, MatTabNav, MatTabNavPanel, MatTabLink]
2430
+ }]
2431
+ }]
2432
+ });
2110
2433
 
2111
2434
  export { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_CONTENT, MAT_TAB_GROUP, MAT_TAB_LABEL, MatInkBar, MatPaginatedTabHeader, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER };
2112
2435
  //# sourceMappingURL=tabs.mjs.map