@angular/material 21.0.0-next.8 → 21.0.0-rc.0

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 (204) 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 +810 -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 -350
  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 +125 -186
  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/sort.d.ts +1 -1
  203. package/types/table-testing.d.ts +27 -1
  204. package/types/timepicker.d.ts +148 -128
@@ -7,533 +7,598 @@ import { InjectionToken, inject, ElementRef, Component, ViewEncapsulation, Chang
7
7
  import { coerceNumberProperty } from '@angular/cdk/coercion';
8
8
  import 'rxjs/operators';
9
9
 
10
- /**
11
- * Injection token used to provide a grid list to a tile and to avoid circular imports.
12
- * @docs-private
13
- */
14
10
  const MAT_GRID_LIST = new InjectionToken('MAT_GRID_LIST');
15
11
 
16
12
  class MatGridTile {
17
- _element = inject(ElementRef);
18
- _gridList = inject(MAT_GRID_LIST, { optional: true });
19
- _rowspan = 1;
20
- _colspan = 1;
21
- constructor() { }
22
- /** Amount of rows that the grid tile takes up. */
23
- get rowspan() {
24
- return this._rowspan;
25
- }
26
- set rowspan(value) {
27
- this._rowspan = Math.round(coerceNumberProperty(value));
28
- }
29
- /** Amount of columns that the grid tile takes up. */
30
- get colspan() {
31
- return this._colspan;
32
- }
33
- set colspan(value) {
34
- this._colspan = Math.round(coerceNumberProperty(value));
35
- }
36
- /**
37
- * Sets the style of the grid-tile element. Needs to be set manually to avoid
38
- * "Changed after checked" errors that would occur with HostBinding.
39
- */
40
- _setStyle(property, value) {
41
- this._element.nativeElement.style[property] = value;
42
- }
43
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTile, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridTile, isStandalone: true, selector: "mat-grid-tile", inputs: { rowspan: "rowspan", colspan: "colspan" }, host: { properties: { "attr.rowspan": "rowspan", "attr.colspan": "colspan" }, classAttribute: "mat-grid-tile" }, exportAs: ["matGridTile"], ngImport: i0, template: "<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
13
+ _element = inject(ElementRef);
14
+ _gridList = inject(MAT_GRID_LIST, {
15
+ optional: true
16
+ });
17
+ _rowspan = 1;
18
+ _colspan = 1;
19
+ constructor() {}
20
+ get rowspan() {
21
+ return this._rowspan;
22
+ }
23
+ set rowspan(value) {
24
+ this._rowspan = Math.round(coerceNumberProperty(value));
25
+ }
26
+ get colspan() {
27
+ return this._colspan;
28
+ }
29
+ set colspan(value) {
30
+ this._colspan = Math.round(coerceNumberProperty(value));
31
+ }
32
+ _setStyle(property, value) {
33
+ this._element.nativeElement.style[property] = value;
34
+ }
35
+ static ɵfac = i0.ɵɵngDeclareFactory({
36
+ minVersion: "12.0.0",
37
+ version: "20.2.0-next.2",
38
+ ngImport: i0,
39
+ type: MatGridTile,
40
+ deps: [],
41
+ target: i0.ɵɵFactoryTarget.Component
42
+ });
43
+ static ɵcmp = i0.ɵɵngDeclareComponent({
44
+ minVersion: "14.0.0",
45
+ version: "20.2.0-next.2",
46
+ type: MatGridTile,
47
+ isStandalone: true,
48
+ selector: "mat-grid-tile",
49
+ inputs: {
50
+ rowspan: "rowspan",
51
+ colspan: "colspan"
52
+ },
53
+ host: {
54
+ properties: {
55
+ "attr.rowspan": "rowspan",
56
+ "attr.colspan": "colspan"
57
+ },
58
+ classAttribute: "mat-grid-tile"
59
+ },
60
+ exportAs: ["matGridTile"],
61
+ ngImport: i0,
62
+ template: "<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n",
63
+ styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"],
64
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
65
+ encapsulation: i0.ViewEncapsulation.None
66
+ });
45
67
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTile, decorators: [{
47
- type: Component,
48
- args: [{ selector: 'mat-grid-tile', exportAs: 'matGridTile', host: {
49
- 'class': 'mat-grid-tile',
50
- // Ensures that the "rowspan" and "colspan" input value is reflected in
51
- // the DOM. This is needed for the grid-tile harness.
52
- '[attr.rowspan]': 'rowspan',
53
- '[attr.colspan]': 'colspan',
54
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n", styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"] }]
55
- }], ctorParameters: () => [], propDecorators: { rowspan: [{
56
- type: Input
57
- }], colspan: [{
58
- type: Input
59
- }] } });
68
+ i0.ɵɵngDeclareClassMetadata({
69
+ minVersion: "12.0.0",
70
+ version: "20.2.0-next.2",
71
+ ngImport: i0,
72
+ type: MatGridTile,
73
+ decorators: [{
74
+ type: Component,
75
+ args: [{
76
+ selector: 'mat-grid-tile',
77
+ exportAs: 'matGridTile',
78
+ host: {
79
+ 'class': 'mat-grid-tile',
80
+ '[attr.rowspan]': 'rowspan',
81
+ '[attr.colspan]': 'colspan'
82
+ },
83
+ encapsulation: ViewEncapsulation.None,
84
+ changeDetection: ChangeDetectionStrategy.OnPush,
85
+ template: "<div class=\"mat-grid-tile-content\">\n <ng-content></ng-content>\n</div>\n",
86
+ styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"]
87
+ }]
88
+ }],
89
+ ctorParameters: () => [],
90
+ propDecorators: {
91
+ rowspan: [{
92
+ type: Input
93
+ }],
94
+ colspan: [{
95
+ type: Input
96
+ }]
97
+ }
98
+ });
60
99
  class MatGridTileText {
61
- _element = inject(ElementRef);
62
- _lines;
63
- constructor() { }
64
- ngAfterContentInit() {
65
- setLines(this._lines, this._element);
66
- }
67
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileText, deps: [], target: i0.ɵɵFactoryTarget.Component });
68
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridTileText, isStandalone: true, selector: "mat-grid-tile-header, mat-grid-tile-footer", queries: [{ propertyName: "_lines", predicate: MatLine, descendants: true }], ngImport: i0, template: "<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
100
+ _element = inject(ElementRef);
101
+ _lines;
102
+ constructor() {}
103
+ ngAfterContentInit() {
104
+ setLines(this._lines, this._element);
105
+ }
106
+ static ɵfac = i0.ɵɵngDeclareFactory({
107
+ minVersion: "12.0.0",
108
+ version: "20.2.0-next.2",
109
+ ngImport: i0,
110
+ type: MatGridTileText,
111
+ deps: [],
112
+ target: i0.ɵɵFactoryTarget.Component
113
+ });
114
+ static ɵcmp = i0.ɵɵngDeclareComponent({
115
+ minVersion: "14.0.0",
116
+ version: "20.2.0-next.2",
117
+ type: MatGridTileText,
118
+ isStandalone: true,
119
+ selector: "mat-grid-tile-header, mat-grid-tile-footer",
120
+ queries: [{
121
+ propertyName: "_lines",
122
+ predicate: MatLine,
123
+ descendants: true
124
+ }],
125
+ ngImport: i0,
126
+ template: "<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\n",
127
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
128
+ encapsulation: i0.ViewEncapsulation.None
129
+ });
69
130
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileText, decorators: [{
71
- type: Component,
72
- args: [{ selector: 'mat-grid-tile-header, mat-grid-tile-footer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\n" }]
73
- }], ctorParameters: () => [], propDecorators: { _lines: [{
74
- type: ContentChildren,
75
- args: [MatLine, { descendants: true }]
76
- }] } });
77
- /**
78
- * Directive whose purpose is to add the mat- CSS styling to this selector.
79
- * @docs-private
80
- */
131
+ i0.ɵɵngDeclareClassMetadata({
132
+ minVersion: "12.0.0",
133
+ version: "20.2.0-next.2",
134
+ ngImport: i0,
135
+ type: MatGridTileText,
136
+ decorators: [{
137
+ type: Component,
138
+ args: [{
139
+ selector: 'mat-grid-tile-header, mat-grid-tile-footer',
140
+ changeDetection: ChangeDetectionStrategy.OnPush,
141
+ encapsulation: ViewEncapsulation.None,
142
+ template: "<ng-content select=\"[mat-grid-avatar], [matGridAvatar]\"></ng-content>\n<div class=\"mat-grid-list-text\"><ng-content select=\"[mat-line], [matLine]\"></ng-content></div>\n<ng-content></ng-content>\n"
143
+ }]
144
+ }],
145
+ ctorParameters: () => [],
146
+ propDecorators: {
147
+ _lines: [{
148
+ type: ContentChildren,
149
+ args: [MatLine, {
150
+ descendants: true
151
+ }]
152
+ }]
153
+ }
154
+ });
81
155
  class MatGridAvatarCssMatStyler {
82
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridAvatarCssMatStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
83
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridAvatarCssMatStyler, isStandalone: true, selector: "[mat-grid-avatar], [matGridAvatar]", host: { classAttribute: "mat-grid-avatar" }, ngImport: i0 });
156
+ static ɵfac = i0.ɵɵngDeclareFactory({
157
+ minVersion: "12.0.0",
158
+ version: "20.2.0-next.2",
159
+ ngImport: i0,
160
+ type: MatGridAvatarCssMatStyler,
161
+ deps: [],
162
+ target: i0.ɵɵFactoryTarget.Directive
163
+ });
164
+ static ɵdir = i0.ɵɵngDeclareDirective({
165
+ minVersion: "14.0.0",
166
+ version: "20.2.0-next.2",
167
+ type: MatGridAvatarCssMatStyler,
168
+ isStandalone: true,
169
+ selector: "[mat-grid-avatar], [matGridAvatar]",
170
+ host: {
171
+ classAttribute: "mat-grid-avatar"
172
+ },
173
+ ngImport: i0
174
+ });
84
175
  }
85
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridAvatarCssMatStyler, decorators: [{
86
- type: Directive,
87
- args: [{
88
- selector: '[mat-grid-avatar], [matGridAvatar]',
89
- host: { 'class': 'mat-grid-avatar' },
90
- }]
91
- }] });
92
- /**
93
- * Directive whose purpose is to add the mat- CSS styling to this selector.
94
- * @docs-private
95
- */
176
+ i0.ɵɵngDeclareClassMetadata({
177
+ minVersion: "12.0.0",
178
+ version: "20.2.0-next.2",
179
+ ngImport: i0,
180
+ type: MatGridAvatarCssMatStyler,
181
+ decorators: [{
182
+ type: Directive,
183
+ args: [{
184
+ selector: '[mat-grid-avatar], [matGridAvatar]',
185
+ host: {
186
+ 'class': 'mat-grid-avatar'
187
+ }
188
+ }]
189
+ }]
190
+ });
96
191
  class MatGridTileHeaderCssMatStyler {
97
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileHeaderCssMatStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
98
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridTileHeaderCssMatStyler, isStandalone: true, selector: "mat-grid-tile-header", host: { classAttribute: "mat-grid-tile-header" }, ngImport: i0 });
192
+ static ɵfac = i0.ɵɵngDeclareFactory({
193
+ minVersion: "12.0.0",
194
+ version: "20.2.0-next.2",
195
+ ngImport: i0,
196
+ type: MatGridTileHeaderCssMatStyler,
197
+ deps: [],
198
+ target: i0.ɵɵFactoryTarget.Directive
199
+ });
200
+ static ɵdir = i0.ɵɵngDeclareDirective({
201
+ minVersion: "14.0.0",
202
+ version: "20.2.0-next.2",
203
+ type: MatGridTileHeaderCssMatStyler,
204
+ isStandalone: true,
205
+ selector: "mat-grid-tile-header",
206
+ host: {
207
+ classAttribute: "mat-grid-tile-header"
208
+ },
209
+ ngImport: i0
210
+ });
99
211
  }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileHeaderCssMatStyler, decorators: [{
101
- type: Directive,
102
- args: [{
103
- selector: 'mat-grid-tile-header',
104
- host: { 'class': 'mat-grid-tile-header' },
105
- }]
106
- }] });
107
- /**
108
- * Directive whose purpose is to add the mat- CSS styling to this selector.
109
- * @docs-private
110
- */
212
+ i0.ɵɵngDeclareClassMetadata({
213
+ minVersion: "12.0.0",
214
+ version: "20.2.0-next.2",
215
+ ngImport: i0,
216
+ type: MatGridTileHeaderCssMatStyler,
217
+ decorators: [{
218
+ type: Directive,
219
+ args: [{
220
+ selector: 'mat-grid-tile-header',
221
+ host: {
222
+ 'class': 'mat-grid-tile-header'
223
+ }
224
+ }]
225
+ }]
226
+ });
111
227
  class MatGridTileFooterCssMatStyler {
112
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileFooterCssMatStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive });
113
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridTileFooterCssMatStyler, isStandalone: true, selector: "mat-grid-tile-footer", host: { classAttribute: "mat-grid-tile-footer" }, ngImport: i0 });
228
+ static ɵfac = i0.ɵɵngDeclareFactory({
229
+ minVersion: "12.0.0",
230
+ version: "20.2.0-next.2",
231
+ ngImport: i0,
232
+ type: MatGridTileFooterCssMatStyler,
233
+ deps: [],
234
+ target: i0.ɵɵFactoryTarget.Directive
235
+ });
236
+ static ɵdir = i0.ɵɵngDeclareDirective({
237
+ minVersion: "14.0.0",
238
+ version: "20.2.0-next.2",
239
+ type: MatGridTileFooterCssMatStyler,
240
+ isStandalone: true,
241
+ selector: "mat-grid-tile-footer",
242
+ host: {
243
+ classAttribute: "mat-grid-tile-footer"
244
+ },
245
+ ngImport: i0
246
+ });
114
247
  }
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridTileFooterCssMatStyler, decorators: [{
116
- type: Directive,
117
- args: [{
118
- selector: 'mat-grid-tile-footer',
119
- host: { 'class': 'mat-grid-tile-footer' },
120
- }]
121
- }] });
248
+ i0.ɵɵngDeclareClassMetadata({
249
+ minVersion: "12.0.0",
250
+ version: "20.2.0-next.2",
251
+ ngImport: i0,
252
+ type: MatGridTileFooterCssMatStyler,
253
+ decorators: [{
254
+ type: Directive,
255
+ args: [{
256
+ selector: 'mat-grid-tile-footer',
257
+ host: {
258
+ 'class': 'mat-grid-tile-footer'
259
+ }
260
+ }]
261
+ }]
262
+ });
122
263
 
123
- /**
124
- * RegExp that can be used to check whether a value will
125
- * be allowed inside a CSS `calc()` expression.
126
- */
127
264
  const cssCalcAllowedValue = /^-?\d+((\.\d+)?[A-Za-z%$]?)+$/;
128
- /**
129
- * Sets the style properties for an individual tile, given the position calculated by the
130
- * Tile Coordinator.
131
- * @docs-private
132
- */
133
265
  class TileStyler {
134
- _gutterSize;
135
- _rows = 0;
136
- _rowspan = 0;
137
- _cols;
138
- _direction;
139
- /**
140
- * Adds grid-list layout info once it is available. Cannot be processed in the constructor
141
- * because these properties haven't been calculated by that point.
142
- *
143
- * @param gutterSize Size of the grid's gutter.
144
- * @param tracker Instance of the TileCoordinator.
145
- * @param cols Amount of columns in the grid.
146
- * @param direction Layout direction of the grid.
147
- */
148
- init(gutterSize, tracker, cols, direction) {
149
- this._gutterSize = normalizeUnits(gutterSize);
150
- this._rows = tracker.rowCount;
151
- this._rowspan = tracker.rowspan;
152
- this._cols = cols;
153
- this._direction = direction;
154
- }
155
- /**
156
- * Computes the amount of space a single 1x1 tile would take up (width or height).
157
- * Used as a basis for other calculations.
158
- * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.
159
- * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.
160
- * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().
161
- */
162
- getBaseTileSize(sizePercent, gutterFraction) {
163
- // Take the base size percent (as would be if evenly dividing the size between cells),
164
- // and then subtracting the size of one gutter. However, since there are no gutters on the
165
- // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter
166
- // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the
167
- // edge evenly among the cells).
168
- return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;
169
- }
170
- /**
171
- * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.
172
- * @param offset Number of tiles that have already been rendered in the row/column.
173
- * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
174
- * @return Position of the tile as a CSS calc() expression.
175
- */
176
- getTilePosition(baseSize, offset) {
177
- // The position comes the size of a 1x1 tile plus gutter for each previous tile in the
178
- // row/column (offset).
179
- return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);
180
- }
181
- /**
182
- * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.
183
- * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).
184
- * @param span The tile's rowspan or colspan.
185
- * @return Size of the tile as a CSS calc() expression.
186
- */
187
- getTileSize(baseSize, span) {
188
- return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;
189
- }
190
- /**
191
- * Sets the style properties to be applied to a tile for the given row and column index.
192
- * @param tile Tile to which to apply the styling.
193
- * @param rowIndex Index of the tile's row.
194
- * @param colIndex Index of the tile's column.
195
- */
196
- setStyle(tile, rowIndex, colIndex) {
197
- // Percent of the available horizontal space that one column takes up.
198
- let percentWidthPerTile = 100 / this._cols;
199
- // Fraction of the vertical gutter size that each column takes up.
200
- // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.
201
- let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;
202
- this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);
203
- this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);
204
- }
205
- /** Sets the horizontal placement of the tile in the list. */
206
- setColStyles(tile, colIndex, percentWidth, gutterWidth) {
207
- // Base horizontal size of a column.
208
- let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);
209
- // The width and horizontal position of each tile is always calculated the same way, but the
210
- // height and vertical position depends on the rowMode.
211
- let side = this._direction === 'rtl' ? 'right' : 'left';
212
- tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));
213
- tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));
214
- }
215
- /**
216
- * Calculates the total size taken up by gutters across one axis of a list.
217
- */
218
- getGutterSpan() {
219
- return `${this._gutterSize} * (${this._rowspan} - 1)`;
220
- }
221
- /**
222
- * Calculates the total size taken up by tiles across one axis of a list.
223
- * @param tileHeight Height of the tile.
224
- */
225
- getTileSpan(tileHeight) {
226
- return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;
227
- }
228
- /**
229
- * Calculates the computed height and returns the correct style property to set.
230
- * This method can be implemented by each type of TileStyler.
231
- * @docs-private
232
- */
233
- getComputedHeight() {
234
- return null;
235
- }
266
+ _gutterSize;
267
+ _rows = 0;
268
+ _rowspan = 0;
269
+ _cols;
270
+ _direction;
271
+ init(gutterSize, tracker, cols, direction) {
272
+ this._gutterSize = normalizeUnits(gutterSize);
273
+ this._rows = tracker.rowCount;
274
+ this._rowspan = tracker.rowspan;
275
+ this._cols = cols;
276
+ this._direction = direction;
277
+ }
278
+ getBaseTileSize(sizePercent, gutterFraction) {
279
+ return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;
280
+ }
281
+ getTilePosition(baseSize, offset) {
282
+ return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);
283
+ }
284
+ getTileSize(baseSize, span) {
285
+ return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;
286
+ }
287
+ setStyle(tile, rowIndex, colIndex) {
288
+ let percentWidthPerTile = 100 / this._cols;
289
+ let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;
290
+ this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);
291
+ this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);
292
+ }
293
+ setColStyles(tile, colIndex, percentWidth, gutterWidth) {
294
+ let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);
295
+ let side = this._direction === 'rtl' ? 'right' : 'left';
296
+ tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));
297
+ tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));
298
+ }
299
+ getGutterSpan() {
300
+ return `${this._gutterSize} * (${this._rowspan} - 1)`;
301
+ }
302
+ getTileSpan(tileHeight) {
303
+ return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;
304
+ }
305
+ getComputedHeight() {
306
+ return null;
307
+ }
236
308
  }
237
- /**
238
- * This type of styler is instantiated when the user passes in a fixed row height.
239
- * Example `<mat-grid-list cols="3" rowHeight="100px">`
240
- * @docs-private
241
- */
242
309
  class FixedTileStyler extends TileStyler {
243
- fixedRowHeight;
244
- constructor(fixedRowHeight) {
245
- super();
246
- this.fixedRowHeight = fixedRowHeight;
247
- }
248
- init(gutterSize, tracker, cols, direction) {
249
- super.init(gutterSize, tracker, cols, direction);
250
- this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);
251
- if (!cssCalcAllowedValue.test(this.fixedRowHeight) &&
252
- (typeof ngDevMode === 'undefined' || ngDevMode)) {
253
- throw Error(`Invalid value "${this.fixedRowHeight}" set as rowHeight.`);
254
- }
255
- }
256
- setRowStyles(tile, rowIndex) {
257
- tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));
258
- tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));
259
- }
260
- getComputedHeight() {
261
- return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];
262
- }
263
- reset(list) {
264
- list._setListStyle(['height', null]);
265
- if (list._tiles) {
266
- list._tiles.forEach(tile => {
267
- tile._setStyle('top', null);
268
- tile._setStyle('height', null);
269
- });
270
- }
271
- }
310
+ fixedRowHeight;
311
+ constructor(fixedRowHeight) {
312
+ super();
313
+ this.fixedRowHeight = fixedRowHeight;
314
+ }
315
+ init(gutterSize, tracker, cols, direction) {
316
+ super.init(gutterSize, tracker, cols, direction);
317
+ this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);
318
+ if (!cssCalcAllowedValue.test(this.fixedRowHeight) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
319
+ throw Error(`Invalid value "${this.fixedRowHeight}" set as rowHeight.`);
320
+ }
321
+ }
322
+ setRowStyles(tile, rowIndex) {
323
+ tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));
324
+ tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));
325
+ }
326
+ getComputedHeight() {
327
+ return ['height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)];
328
+ }
329
+ reset(list) {
330
+ list._setListStyle(['height', null]);
331
+ if (list._tiles) {
332
+ list._tiles.forEach(tile => {
333
+ tile._setStyle('top', null);
334
+ tile._setStyle('height', null);
335
+ });
336
+ }
337
+ }
272
338
  }
273
- /**
274
- * This type of styler is instantiated when the user passes in a width:height ratio
275
- * for the row height. Example `<mat-grid-list cols="3" rowHeight="3:1">`
276
- * @docs-private
277
- */
278
339
  class RatioTileStyler extends TileStyler {
279
- /** Ratio width:height given by user to determine row height. */
280
- rowHeightRatio;
281
- baseTileHeight;
282
- constructor(value) {
283
- super();
284
- this._parseRatio(value);
285
- }
286
- setRowStyles(tile, rowIndex, percentWidth, gutterWidth) {
287
- let percentHeightPerTile = percentWidth / this.rowHeightRatio;
288
- this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);
289
- // Use padding-top and margin-top to maintain the given aspect ratio, as
290
- // a percentage-based value for these properties is applied versus the *width* of the
291
- // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties
292
- tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));
293
- tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));
294
- }
295
- getComputedHeight() {
296
- return [
297
- 'paddingBottom',
298
- calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`),
299
- ];
300
- }
301
- reset(list) {
302
- list._setListStyle(['paddingBottom', null]);
303
- list._tiles.forEach(tile => {
304
- tile._setStyle('marginTop', null);
305
- tile._setStyle('paddingTop', null);
306
- });
307
- }
308
- _parseRatio(value) {
309
- const ratioParts = value.split(':');
310
- if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
311
- throw Error(`mat-grid-list: invalid ratio given for row-height: "${value}"`);
312
- }
313
- this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);
314
- }
340
+ rowHeightRatio;
341
+ baseTileHeight;
342
+ constructor(value) {
343
+ super();
344
+ this._parseRatio(value);
345
+ }
346
+ setRowStyles(tile, rowIndex, percentWidth, gutterWidth) {
347
+ let percentHeightPerTile = percentWidth / this.rowHeightRatio;
348
+ this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);
349
+ tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));
350
+ tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));
351
+ }
352
+ getComputedHeight() {
353
+ return ['paddingBottom', calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)];
354
+ }
355
+ reset(list) {
356
+ list._setListStyle(['paddingBottom', null]);
357
+ list._tiles.forEach(tile => {
358
+ tile._setStyle('marginTop', null);
359
+ tile._setStyle('paddingTop', null);
360
+ });
361
+ }
362
+ _parseRatio(value) {
363
+ const ratioParts = value.split(':');
364
+ if (ratioParts.length !== 2 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
365
+ throw Error(`mat-grid-list: invalid ratio given for row-height: "${value}"`);
366
+ }
367
+ this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);
368
+ }
315
369
  }
316
- /**
317
- * This type of styler is instantiated when the user selects a "fit" row height mode.
318
- * In other words, the row height will reflect the total height of the container divided
319
- * by the number of rows. Example `<mat-grid-list cols="3" rowHeight="fit">`
320
- *
321
- * @docs-private
322
- */
323
370
  class FitTileStyler extends TileStyler {
324
- setRowStyles(tile, rowIndex) {
325
- // Percent of the available vertical space that one row takes up.
326
- let percentHeightPerTile = 100 / this._rowspan;
327
- // Fraction of the horizontal gutter size that each column takes up.
328
- let gutterHeightPerTile = (this._rows - 1) / this._rows;
329
- // Base vertical size of a column.
330
- let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);
331
- tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));
332
- tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));
333
- }
334
- reset(list) {
335
- if (list._tiles) {
336
- list._tiles.forEach(tile => {
337
- tile._setStyle('top', null);
338
- tile._setStyle('height', null);
339
- });
340
- }
341
- }
371
+ setRowStyles(tile, rowIndex) {
372
+ let percentHeightPerTile = 100 / this._rowspan;
373
+ let gutterHeightPerTile = (this._rows - 1) / this._rows;
374
+ let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);
375
+ tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));
376
+ tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));
377
+ }
378
+ reset(list) {
379
+ if (list._tiles) {
380
+ list._tiles.forEach(tile => {
381
+ tile._setStyle('top', null);
382
+ tile._setStyle('height', null);
383
+ });
384
+ }
385
+ }
342
386
  }
343
- /** Wraps a CSS string in a calc function */
344
387
  function calc(exp) {
345
- return `calc(${exp})`;
388
+ return `calc(${exp})`;
346
389
  }
347
- /** Appends pixels to a CSS string if no units are given. */
348
390
  function normalizeUnits(value) {
349
- return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;
391
+ return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;
350
392
  }
351
393
 
352
- // TODO(kara): Conditional (responsive) column count / row size.
353
- // TODO(kara): Re-layout on window resize / media change (debounced).
354
- // TODO(kara): gridTileHeader and gridTileFooter.
355
394
  const MAT_FIT_MODE = 'fit';
356
395
  class MatGridList {
357
- _element = inject(ElementRef);
358
- _dir = inject(Directionality, { optional: true });
359
- /** Number of columns being rendered. */
360
- _cols;
361
- /** Used for determining the position of each tile in the grid. */
362
- _tileCoordinator;
363
- /**
364
- * Row height value passed in by user. This can be one of three types:
365
- * - Number value (ex: "100px"): sets a fixed row height to that value
366
- * - Ratio value (ex: "4:3"): sets the row height based on width:height ratio
367
- * - "Fit" mode (ex: "fit"): sets the row height to total height divided by number of rows
368
- */
369
- _rowHeight;
370
- /** The amount of space between tiles. This will be something like '5px' or '2em'. */
371
- _gutter = '1px';
372
- /** Sets position and size styles for a tile */
373
- _tileStyler;
374
- /** Query list of tiles that are being rendered. */
375
- _tiles;
376
- constructor() { }
377
- /** Amount of columns in the grid list. */
378
- get cols() {
379
- return this._cols;
380
- }
381
- set cols(value) {
382
- this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));
383
- }
384
- /** Size of the grid list's gutter in pixels. */
385
- get gutterSize() {
386
- return this._gutter;
387
- }
388
- set gutterSize(value) {
389
- this._gutter = `${value == null ? '' : value}`;
390
- }
391
- /** Set internal representation of row height from the user-provided value. */
392
- get rowHeight() {
393
- return this._rowHeight;
394
- }
395
- set rowHeight(value) {
396
- const newValue = `${value == null ? '' : value}`;
397
- if (newValue !== this._rowHeight) {
398
- this._rowHeight = newValue;
399
- this._setTileStyler(this._rowHeight);
400
- }
401
- }
402
- ngOnInit() {
403
- this._checkCols();
404
- this._checkRowHeight();
405
- }
406
- /**
407
- * The layout calculation is fairly cheap if nothing changes, so there's little cost
408
- * to run it frequently.
409
- */
410
- ngAfterContentChecked() {
411
- this._layoutTiles();
412
- }
413
- /** Throw a friendly error if cols property is missing */
414
- _checkCols() {
415
- if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {
416
- throw Error(`mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols="3">`);
417
- }
418
- }
419
- /** Default to equal width:height if rowHeight property is missing */
420
- _checkRowHeight() {
421
- if (!this._rowHeight) {
422
- this._setTileStyler('1:1');
423
- }
424
- }
425
- /** Creates correct Tile Styler subtype based on rowHeight passed in by user */
426
- _setTileStyler(rowHeight) {
427
- if (this._tileStyler) {
428
- this._tileStyler.reset(this);
429
- }
430
- if (rowHeight === MAT_FIT_MODE) {
431
- this._tileStyler = new FitTileStyler();
432
- }
433
- else if (rowHeight && rowHeight.indexOf(':') > -1) {
434
- this._tileStyler = new RatioTileStyler(rowHeight);
435
- }
436
- else {
437
- this._tileStyler = new FixedTileStyler(rowHeight);
438
- }
439
- }
440
- /** Computes and applies the size and position for all children grid tiles. */
441
- _layoutTiles() {
442
- if (!this._tileCoordinator) {
443
- this._tileCoordinator = new TileCoordinator();
444
- }
445
- const tracker = this._tileCoordinator;
446
- const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);
447
- const direction = this._dir ? this._dir.value : 'ltr';
448
- this._tileCoordinator.update(this.cols, tiles);
449
- this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);
450
- tiles.forEach((tile, index) => {
451
- const pos = tracker.positions[index];
452
- this._tileStyler.setStyle(tile, pos.row, pos.col);
453
- });
454
- this._setListStyle(this._tileStyler.getComputedHeight());
455
- }
456
- /** Sets style on the main grid-list element, given the style name and value. */
457
- _setListStyle(style) {
458
- if (style) {
459
- this._element.nativeElement.style[style[0]] = style[1];
460
- }
461
- }
462
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridList, deps: [], target: i0.ɵɵFactoryTarget.Component });
463
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatGridList, isStandalone: true, selector: "mat-grid-list", inputs: { cols: "cols", gutterSize: "gutterSize", rowHeight: "rowHeight" }, host: { properties: { "attr.cols": "cols" }, classAttribute: "mat-grid-list" }, providers: [
464
- {
465
- provide: MAT_GRID_LIST,
466
- useExisting: MatGridList,
467
- },
468
- ], queries: [{ propertyName: "_tiles", predicate: MatGridTile, descendants: true }], exportAs: ["matGridList"], ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
396
+ _element = inject(ElementRef);
397
+ _dir = inject(Directionality, {
398
+ optional: true
399
+ });
400
+ _cols;
401
+ _tileCoordinator;
402
+ _rowHeight;
403
+ _gutter = '1px';
404
+ _tileStyler;
405
+ _tiles;
406
+ constructor() {}
407
+ get cols() {
408
+ return this._cols;
409
+ }
410
+ set cols(value) {
411
+ this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));
412
+ }
413
+ get gutterSize() {
414
+ return this._gutter;
415
+ }
416
+ set gutterSize(value) {
417
+ this._gutter = `${value == null ? '' : value}`;
418
+ }
419
+ get rowHeight() {
420
+ return this._rowHeight;
421
+ }
422
+ set rowHeight(value) {
423
+ const newValue = `${value == null ? '' : value}`;
424
+ if (newValue !== this._rowHeight) {
425
+ this._rowHeight = newValue;
426
+ this._setTileStyler(this._rowHeight);
427
+ }
428
+ }
429
+ ngOnInit() {
430
+ this._checkCols();
431
+ this._checkRowHeight();
432
+ }
433
+ ngAfterContentChecked() {
434
+ this._layoutTiles();
435
+ }
436
+ _checkCols() {
437
+ if (!this.cols && (typeof ngDevMode === 'undefined' || ngDevMode)) {
438
+ throw Error(`mat-grid-list: must pass in number of columns. ` + `Example: <mat-grid-list cols="3">`);
439
+ }
440
+ }
441
+ _checkRowHeight() {
442
+ if (!this._rowHeight) {
443
+ this._setTileStyler('1:1');
444
+ }
445
+ }
446
+ _setTileStyler(rowHeight) {
447
+ if (this._tileStyler) {
448
+ this._tileStyler.reset(this);
449
+ }
450
+ if (rowHeight === MAT_FIT_MODE) {
451
+ this._tileStyler = new FitTileStyler();
452
+ } else if (rowHeight && rowHeight.indexOf(':') > -1) {
453
+ this._tileStyler = new RatioTileStyler(rowHeight);
454
+ } else {
455
+ this._tileStyler = new FixedTileStyler(rowHeight);
456
+ }
457
+ }
458
+ _layoutTiles() {
459
+ if (!this._tileCoordinator) {
460
+ this._tileCoordinator = new TileCoordinator();
461
+ }
462
+ const tracker = this._tileCoordinator;
463
+ const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);
464
+ const direction = this._dir ? this._dir.value : 'ltr';
465
+ this._tileCoordinator.update(this.cols, tiles);
466
+ this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);
467
+ tiles.forEach((tile, index) => {
468
+ const pos = tracker.positions[index];
469
+ this._tileStyler.setStyle(tile, pos.row, pos.col);
470
+ });
471
+ this._setListStyle(this._tileStyler.getComputedHeight());
472
+ }
473
+ _setListStyle(style) {
474
+ if (style) {
475
+ this._element.nativeElement.style[style[0]] = style[1];
476
+ }
477
+ }
478
+ static ɵfac = i0.ɵɵngDeclareFactory({
479
+ minVersion: "12.0.0",
480
+ version: "20.2.0-next.2",
481
+ ngImport: i0,
482
+ type: MatGridList,
483
+ deps: [],
484
+ target: i0.ɵɵFactoryTarget.Component
485
+ });
486
+ static ɵcmp = i0.ɵɵngDeclareComponent({
487
+ minVersion: "14.0.0",
488
+ version: "20.2.0-next.2",
489
+ type: MatGridList,
490
+ isStandalone: true,
491
+ selector: "mat-grid-list",
492
+ inputs: {
493
+ cols: "cols",
494
+ gutterSize: "gutterSize",
495
+ rowHeight: "rowHeight"
496
+ },
497
+ host: {
498
+ properties: {
499
+ "attr.cols": "cols"
500
+ },
501
+ classAttribute: "mat-grid-list"
502
+ },
503
+ providers: [{
504
+ provide: MAT_GRID_LIST,
505
+ useExisting: MatGridList
506
+ }],
507
+ queries: [{
508
+ propertyName: "_tiles",
509
+ predicate: MatGridTile,
510
+ descendants: true
511
+ }],
512
+ exportAs: ["matGridList"],
513
+ ngImport: i0,
514
+ template: "<div>\n <ng-content></ng-content>\n</div>",
515
+ styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"],
516
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
517
+ encapsulation: i0.ViewEncapsulation.None
518
+ });
469
519
  }
470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridList, decorators: [{
471
- type: Component,
472
- args: [{ selector: 'mat-grid-list', exportAs: 'matGridList', host: {
473
- 'class': 'mat-grid-list',
474
- // Ensures that the "cols" input value is reflected in the DOM. This is
475
- // needed for the grid-list harness.
476
- '[attr.cols]': 'cols',
477
- }, providers: [
478
- {
479
- provide: MAT_GRID_LIST,
480
- useExisting: MatGridList,
481
- },
482
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"] }]
483
- }], ctorParameters: () => [], propDecorators: { _tiles: [{
484
- type: ContentChildren,
485
- args: [MatGridTile, { descendants: true }]
486
- }], cols: [{
487
- type: Input
488
- }], gutterSize: [{
489
- type: Input
490
- }], rowHeight: [{
491
- type: Input
492
- }] } });
520
+ i0.ɵɵngDeclareClassMetadata({
521
+ minVersion: "12.0.0",
522
+ version: "20.2.0-next.2",
523
+ ngImport: i0,
524
+ type: MatGridList,
525
+ decorators: [{
526
+ type: Component,
527
+ args: [{
528
+ selector: 'mat-grid-list',
529
+ exportAs: 'matGridList',
530
+ host: {
531
+ 'class': 'mat-grid-list',
532
+ '[attr.cols]': 'cols'
533
+ },
534
+ providers: [{
535
+ provide: MAT_GRID_LIST,
536
+ useExisting: MatGridList
537
+ }],
538
+ changeDetection: ChangeDetectionStrategy.OnPush,
539
+ encapsulation: ViewEncapsulation.None,
540
+ template: "<div>\n <ng-content></ng-content>\n</div>",
541
+ styles: [".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size, var(--mat-sys-body-large))}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size, var(--mat-sys-body-medium))}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}\n"]
542
+ }]
543
+ }],
544
+ ctorParameters: () => [],
545
+ propDecorators: {
546
+ _tiles: [{
547
+ type: ContentChildren,
548
+ args: [MatGridTile, {
549
+ descendants: true
550
+ }]
551
+ }],
552
+ cols: [{
553
+ type: Input
554
+ }],
555
+ gutterSize: [{
556
+ type: Input
557
+ }],
558
+ rowHeight: [{
559
+ type: Input
560
+ }]
561
+ }
562
+ });
493
563
 
494
564
  class MatGridListModule {
495
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
496
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridListModule, imports: [MatLineModule,
497
- MatGridList,
498
- MatGridTile,
499
- MatGridTileText,
500
- MatGridTileHeaderCssMatStyler,
501
- MatGridTileFooterCssMatStyler,
502
- MatGridAvatarCssMatStyler], exports: [BidiModule,
503
- MatGridList,
504
- MatGridTile,
505
- MatGridTileText,
506
- MatLineModule,
507
- MatGridTileHeaderCssMatStyler,
508
- MatGridTileFooterCssMatStyler,
509
- MatGridAvatarCssMatStyler] });
510
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridListModule, imports: [MatLineModule, BidiModule,
511
- MatLineModule] });
565
+ static ɵfac = i0.ɵɵngDeclareFactory({
566
+ minVersion: "12.0.0",
567
+ version: "20.2.0-next.2",
568
+ ngImport: i0,
569
+ type: MatGridListModule,
570
+ deps: [],
571
+ target: i0.ɵɵFactoryTarget.NgModule
572
+ });
573
+ static ɵmod = i0.ɵɵngDeclareNgModule({
574
+ minVersion: "14.0.0",
575
+ version: "20.2.0-next.2",
576
+ ngImport: i0,
577
+ type: MatGridListModule,
578
+ imports: [MatLineModule, MatGridList, MatGridTile, MatGridTileText, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler, MatGridAvatarCssMatStyler],
579
+ exports: [BidiModule, MatGridList, MatGridTile, MatGridTileText, MatLineModule, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler, MatGridAvatarCssMatStyler]
580
+ });
581
+ static ɵinj = i0.ɵɵngDeclareInjector({
582
+ minVersion: "12.0.0",
583
+ version: "20.2.0-next.2",
584
+ ngImport: i0,
585
+ type: MatGridListModule,
586
+ imports: [MatLineModule, BidiModule, MatLineModule]
587
+ });
512
588
  }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatGridListModule, decorators: [{
514
- type: NgModule,
515
- args: [{
516
- imports: [
517
- MatLineModule,
518
- MatGridList,
519
- MatGridTile,
520
- MatGridTileText,
521
- MatGridTileHeaderCssMatStyler,
522
- MatGridTileFooterCssMatStyler,
523
- MatGridAvatarCssMatStyler,
524
- ],
525
- exports: [
526
- BidiModule,
527
- MatGridList,
528
- MatGridTile,
529
- MatGridTileText,
530
- MatLineModule,
531
- MatGridTileHeaderCssMatStyler,
532
- MatGridTileFooterCssMatStyler,
533
- MatGridAvatarCssMatStyler,
534
- ],
535
- }]
536
- }] });
589
+ i0.ɵɵngDeclareClassMetadata({
590
+ minVersion: "12.0.0",
591
+ version: "20.2.0-next.2",
592
+ ngImport: i0,
593
+ type: MatGridListModule,
594
+ decorators: [{
595
+ type: NgModule,
596
+ args: [{
597
+ imports: [MatLineModule, MatGridList, MatGridTile, MatGridTileText, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler, MatGridAvatarCssMatStyler],
598
+ exports: [BidiModule, MatGridList, MatGridTile, MatGridTileText, MatLineModule, MatGridTileHeaderCssMatStyler, MatGridTileFooterCssMatStyler, MatGridAvatarCssMatStyler]
599
+ }]
600
+ }]
601
+ });
537
602
 
538
603
  export { MatGridAvatarCssMatStyler, MatGridList, MatGridListModule, MatGridTile, MatGridTileFooterCssMatStyler, MatGridTileHeaderCssMatStyler, MatGridTileText, MatLine };
539
604
  //# sourceMappingURL=grid-list.mjs.map