@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,298 +7,347 @@ import { BidiModule } from '@angular/cdk/bidi';
7
7
  import '@angular/cdk/layout';
8
8
 
9
9
  const BADGE_CONTENT_CLASS = 'mat-badge-content';
10
- /**
11
- * Component used to load the structural styles of the badge.
12
- * @docs-private
13
- */
14
10
  class _MatBadgeStyleLoader {
15
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: _MatBadgeStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: _MatBadgeStyleLoader, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, styles: [".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
11
+ static ɵfac = i0.ɵɵngDeclareFactory({
12
+ minVersion: "12.0.0",
13
+ version: "20.2.0-next.2",
14
+ ngImport: i0,
15
+ type: _MatBadgeStyleLoader,
16
+ deps: [],
17
+ target: i0.ɵɵFactoryTarget.Component
18
+ });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({
20
+ minVersion: "14.0.0",
21
+ version: "20.2.0-next.2",
22
+ type: _MatBadgeStyleLoader,
23
+ isStandalone: true,
24
+ selector: "ng-component",
25
+ ngImport: i0,
26
+ template: '',
27
+ isInline: true,
28
+ styles: [".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}\n"],
29
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
30
+ encapsulation: i0.ViewEncapsulation.None
31
+ });
17
32
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: _MatBadgeStyleLoader, decorators: [{
19
- type: Component,
20
- args: [{ encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}\n"] }]
21
- }] });
22
- /** Directive to display a text badge. */
33
+ i0.ɵɵngDeclareClassMetadata({
34
+ minVersion: "12.0.0",
35
+ version: "20.2.0-next.2",
36
+ ngImport: i0,
37
+ type: _MatBadgeStyleLoader,
38
+ decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ encapsulation: ViewEncapsulation.None,
42
+ template: '',
43
+ changeDetection: ChangeDetectionStrategy.OnPush,
44
+ styles: [".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color, var(--mat-sys-error));color:var(--mat-badge-text-color, var(--mat-sys-on-error));font-family:var(--mat-badge-text-font, var(--mat-sys-label-small-font));font-weight:var(--mat-badge-text-weight, var(--mat-sys-label-small-weight));border-radius:var(--mat-badge-container-shape, var(--mat-sys-corner-full))}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}@media(forced-colors: active){.mat-badge-content{outline:solid 1px;border-radius:0}}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-error) 38%, transparent));color:var(--mat-badge-disabled-state-text-color, var(--mat-sys-on-error))}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, 6px);min-height:var(--mat-badge-small-size-container-size, 6px);line-height:var(--mat-badge-small-size-line-height, 6px);padding:var(--mat-badge-small-size-container-padding, 0);font-size:var(--mat-badge-small-size-text-size, 0);margin:var(--mat-badge-small-size-container-offset, -6px 0)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset, -6px)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, 16px);min-height:var(--mat-badge-container-size, 16px);line-height:var(--mat-badge-line-height, 16px);padding:var(--mat-badge-container-padding, 0 4px);font-size:var(--mat-badge-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-container-offset, -12px 0)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset, -12px)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, 16px);min-height:var(--mat-badge-large-size-container-size, 16px);line-height:var(--mat-badge-large-size-line-height, 16px);padding:var(--mat-badge-large-size-container-padding, 0 4px);font-size:var(--mat-badge-large-size-text-size, var(--mat-sys-label-small-size));margin:var(--mat-badge-large-size-container-offset, -12px 0)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset, -12px)}\n"]
45
+ }]
46
+ }]
47
+ });
23
48
  class MatBadge {
24
- _ngZone = inject(NgZone);
25
- _elementRef = inject(ElementRef);
26
- _ariaDescriber = inject(AriaDescriber);
27
- _renderer = inject(Renderer2);
28
- _animationsDisabled = _animationsDisabled();
29
- _idGenerator = inject(_IdGenerator);
30
- /**
31
- * Theme color of the badge. This API is supported in M2 themes only, it
32
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.
33
- *
34
- * For information on applying color variants in M3, see
35
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
36
- */
37
- get color() {
38
- return this._color;
49
+ _ngZone = inject(NgZone);
50
+ _elementRef = inject(ElementRef);
51
+ _ariaDescriber = inject(AriaDescriber);
52
+ _renderer = inject(Renderer2);
53
+ _animationsDisabled = _animationsDisabled();
54
+ _idGenerator = inject(_IdGenerator);
55
+ get color() {
56
+ return this._color;
57
+ }
58
+ set color(value) {
59
+ this._setColor(value);
60
+ this._color = value;
61
+ }
62
+ _color = 'primary';
63
+ overlap = true;
64
+ disabled;
65
+ position = 'above after';
66
+ get content() {
67
+ return this._content;
68
+ }
69
+ set content(newContent) {
70
+ this._updateRenderedContent(newContent);
71
+ }
72
+ _content;
73
+ get description() {
74
+ return this._description;
75
+ }
76
+ set description(newDescription) {
77
+ this._updateDescription(newDescription);
78
+ }
79
+ _description;
80
+ size = 'medium';
81
+ hidden;
82
+ _badgeElement;
83
+ _inlineBadgeDescription;
84
+ _isInitialized = false;
85
+ _interactivityChecker = inject(InteractivityChecker);
86
+ _document = inject(DOCUMENT);
87
+ constructor() {
88
+ const styleLoader = inject(_CdkPrivateStyleLoader);
89
+ styleLoader.load(_MatBadgeStyleLoader);
90
+ styleLoader.load(_VisuallyHiddenLoader);
91
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
92
+ const nativeElement = this._elementRef.nativeElement;
93
+ if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {
94
+ throw Error('matBadge must be attached to an element node.');
95
+ }
96
+ const tagName = inject(HOST_TAG_NAME);
97
+ if (tagName.toLowerCase() === 'mat-icon' && nativeElement.getAttribute('aria-hidden') === 'true') {
98
+ console.warn(`Detected a matBadge on an "aria-hidden" "<mat-icon>". ` + `Consider setting aria-hidden="false" in order to surface the information assistive technology.` + `\n${nativeElement.outerHTML}`);
99
+ }
39
100
  }
40
- set color(value) {
41
- this._setColor(value);
42
- this._color = value;
101
+ }
102
+ isAbove() {
103
+ return this.position.indexOf('below') === -1;
104
+ }
105
+ isAfter() {
106
+ return this.position.indexOf('before') === -1;
107
+ }
108
+ getBadgeElement() {
109
+ return this._badgeElement;
110
+ }
111
+ ngOnInit() {
112
+ this._clearExistingBadges();
113
+ if (this.content && !this._badgeElement) {
114
+ this._badgeElement = this._createBadgeElement();
115
+ this._updateRenderedContent(this.content);
43
116
  }
44
- _color = 'primary';
45
- /** Whether the badge should overlap its contents or not */
46
- overlap = true;
47
- /** Whether the badge is disabled. */
48
- disabled;
49
- /**
50
- * Position the badge should reside.
51
- * Accepts any combination of 'above'|'below' and 'before'|'after'
52
- */
53
- position = 'above after';
54
- /** The content for the badge */
55
- get content() {
56
- return this._content;
117
+ this._isInitialized = true;
118
+ }
119
+ ngOnDestroy() {
120
+ if (this._renderer.destroyNode) {
121
+ this._renderer.destroyNode(this._badgeElement);
122
+ this._inlineBadgeDescription?.remove();
57
123
  }
58
- set content(newContent) {
59
- this._updateRenderedContent(newContent);
124
+ this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);
125
+ }
126
+ _isHostInteractive() {
127
+ return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {
128
+ ignoreVisibility: true
129
+ });
130
+ }
131
+ _createBadgeElement() {
132
+ const badgeElement = this._renderer.createElement('span');
133
+ const activeClass = 'mat-badge-active';
134
+ badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));
135
+ badgeElement.setAttribute('aria-hidden', 'true');
136
+ badgeElement.classList.add(BADGE_CONTENT_CLASS);
137
+ if (this._animationsDisabled) {
138
+ badgeElement.classList.add('_mat-animation-noopable');
60
139
  }
61
- _content;
62
- /** Message used to describe the decorated element via aria-describedby */
63
- get description() {
64
- return this._description;
65
- }
66
- set description(newDescription) {
67
- this._updateDescription(newDescription);
68
- }
69
- _description;
70
- /** Size of the badge. Can be 'small', 'medium', or 'large'. */
71
- size = 'medium';
72
- /** Whether the badge is hidden. */
73
- hidden;
74
- /** Visible badge element. */
75
- _badgeElement;
76
- /** Inline badge description. Used when the badge is applied to non-interactive host elements. */
77
- _inlineBadgeDescription;
78
- /** Whether the OnInit lifecycle hook has run yet */
79
- _isInitialized = false;
80
- /** InteractivityChecker to determine if the badge host is focusable. */
81
- _interactivityChecker = inject(InteractivityChecker);
82
- _document = inject(DOCUMENT);
83
- constructor() {
84
- const styleLoader = inject(_CdkPrivateStyleLoader);
85
- styleLoader.load(_MatBadgeStyleLoader);
86
- styleLoader.load(_VisuallyHiddenLoader);
87
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
88
- const nativeElement = this._elementRef.nativeElement;
89
- if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {
90
- throw Error('matBadge must be attached to an element node.');
91
- }
92
- const tagName = inject(HOST_TAG_NAME);
93
- // Heads-up for developers to avoid putting matBadge on <mat-icon>
94
- // as it is aria-hidden by default docs mention this at:
95
- // https://material.angular.dev/components/badge/overview#accessibility
96
- if (tagName.toLowerCase() === 'mat-icon' &&
97
- nativeElement.getAttribute('aria-hidden') === 'true') {
98
- console.warn(`Detected a matBadge on an "aria-hidden" "<mat-icon>". ` +
99
- `Consider setting aria-hidden="false" in order to surface the information assistive technology.` +
100
- `\n${nativeElement.outerHTML}`);
101
- }
102
- }
103
- }
104
- /** Whether the badge is above the host or not */
105
- isAbove() {
106
- return this.position.indexOf('below') === -1;
107
- }
108
- /** Whether the badge is after the host or not */
109
- isAfter() {
110
- return this.position.indexOf('before') === -1;
111
- }
112
- /**
113
- * Gets the element into which the badge's content is being rendered. Undefined if the element
114
- * hasn't been created (e.g. if the badge doesn't have content).
115
- */
116
- getBadgeElement() {
117
- return this._badgeElement;
118
- }
119
- ngOnInit() {
120
- // We may have server-side rendered badge that we need to clear.
121
- // We need to do this in ngOnInit because the full content of the component
122
- // on which the badge is attached won't necessarily be in the DOM until this point.
123
- this._clearExistingBadges();
124
- if (this.content && !this._badgeElement) {
125
- this._badgeElement = this._createBadgeElement();
126
- this._updateRenderedContent(this.content);
127
- }
128
- this._isInitialized = true;
129
- }
130
- ngOnDestroy() {
131
- // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.
132
- // We have to destroy it ourselves, otherwise it'll be retained in memory.
133
- if (this._renderer.destroyNode) {
134
- this._renderer.destroyNode(this._badgeElement);
135
- this._inlineBadgeDescription?.remove();
136
- }
137
- this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);
138
- }
139
- /** Gets whether the badge's host element is interactive. */
140
- _isHostInteractive() {
141
- // Ignore visibility since it requires an expensive style caluclation.
142
- return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {
143
- ignoreVisibility: true,
140
+ this._elementRef.nativeElement.appendChild(badgeElement);
141
+ if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {
142
+ this._ngZone.runOutsideAngular(() => {
143
+ requestAnimationFrame(() => {
144
+ badgeElement.classList.add(activeClass);
144
145
  });
146
+ });
147
+ } else {
148
+ badgeElement.classList.add(activeClass);
145
149
  }
146
- /** Creates the badge element */
147
- _createBadgeElement() {
148
- const badgeElement = this._renderer.createElement('span');
149
- const activeClass = 'mat-badge-active';
150
- badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));
151
- // The badge is aria-hidden because we don't want it to appear in the page's navigation
152
- // flow. Instead, we use the badge to describe the decorated element with aria-describedby.
153
- badgeElement.setAttribute('aria-hidden', 'true');
154
- badgeElement.classList.add(BADGE_CONTENT_CLASS);
155
- if (this._animationsDisabled) {
156
- badgeElement.classList.add('_mat-animation-noopable');
157
- }
158
- this._elementRef.nativeElement.appendChild(badgeElement);
159
- // animate in after insertion
160
- if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {
161
- this._ngZone.runOutsideAngular(() => {
162
- requestAnimationFrame(() => {
163
- badgeElement.classList.add(activeClass);
164
- });
165
- });
166
- }
167
- else {
168
- badgeElement.classList.add(activeClass);
169
- }
170
- return badgeElement;
150
+ return badgeElement;
151
+ }
152
+ _updateRenderedContent(newContent) {
153
+ const newContentNormalized = `${newContent ?? ''}`.trim();
154
+ if (this._isInitialized && newContentNormalized && !this._badgeElement) {
155
+ this._badgeElement = this._createBadgeElement();
171
156
  }
172
- /** Update the text content of the badge element in the DOM, creating the element if necessary. */
173
- _updateRenderedContent(newContent) {
174
- const newContentNormalized = `${newContent ?? ''}`.trim();
175
- // Don't create the badge element if the directive isn't initialized because we want to
176
- // append the badge element to the *end* of the host element's content for backwards
177
- // compatibility.
178
- if (this._isInitialized && newContentNormalized && !this._badgeElement) {
179
- this._badgeElement = this._createBadgeElement();
180
- }
181
- if (this._badgeElement) {
182
- this._badgeElement.textContent = newContentNormalized;
183
- }
184
- this._content = newContentNormalized;
157
+ if (this._badgeElement) {
158
+ this._badgeElement.textContent = newContentNormalized;
185
159
  }
186
- /** Updates the host element's aria description via AriaDescriber. */
187
- _updateDescription(newDescription) {
188
- // Always start by removing the aria-describedby; we will add a new one if necessary.
189
- this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);
190
- // NOTE: We only check whether the host is interactive here, which happens during
191
- // when then badge content changes. It is possible that the host changes
192
- // interactivity status separate from one of these. However, watching the interactivity
193
- // status of the host would require a `MutationObserver`, which is likely more code + overhead
194
- // than it's worth; from usages inside Google, we see that the vats majority of badges either
195
- // never change interactivity, or also set `matBadgeHidden` based on the same condition.
196
- if (!newDescription || this._isHostInteractive()) {
197
- this._removeInlineDescription();
198
- }
199
- this._description = newDescription;
200
- // We don't add `aria-describedby` for non-interactive hosts elements because we
201
- // instead insert the description inline.
202
- if (this._isHostInteractive()) {
203
- this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);
204
- }
205
- else {
206
- this._updateInlineDescription();
207
- }
160
+ this._content = newContentNormalized;
161
+ }
162
+ _updateDescription(newDescription) {
163
+ this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);
164
+ if (!newDescription || this._isHostInteractive()) {
165
+ this._removeInlineDescription();
208
166
  }
209
- _updateInlineDescription() {
210
- // Create the inline description element if it doesn't exist
211
- if (!this._inlineBadgeDescription) {
212
- this._inlineBadgeDescription = this._document.createElement('span');
213
- this._inlineBadgeDescription.classList.add('cdk-visually-hidden');
214
- }
215
- this._inlineBadgeDescription.textContent = this.description;
216
- this._badgeElement?.appendChild(this._inlineBadgeDescription);
167
+ this._description = newDescription;
168
+ if (this._isHostInteractive()) {
169
+ this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);
170
+ } else {
171
+ this._updateInlineDescription();
217
172
  }
218
- _removeInlineDescription() {
219
- this._inlineBadgeDescription?.remove();
220
- this._inlineBadgeDescription = undefined;
173
+ }
174
+ _updateInlineDescription() {
175
+ if (!this._inlineBadgeDescription) {
176
+ this._inlineBadgeDescription = this._document.createElement('span');
177
+ this._inlineBadgeDescription.classList.add('cdk-visually-hidden');
221
178
  }
222
- /** Adds css theme class given the color to the component host */
223
- _setColor(colorPalette) {
224
- const classList = this._elementRef.nativeElement.classList;
225
- classList.remove(`mat-badge-${this._color}`);
226
- if (colorPalette) {
227
- classList.add(`mat-badge-${colorPalette}`);
228
- }
179
+ this._inlineBadgeDescription.textContent = this.description;
180
+ this._badgeElement?.appendChild(this._inlineBadgeDescription);
181
+ }
182
+ _removeInlineDescription() {
183
+ this._inlineBadgeDescription?.remove();
184
+ this._inlineBadgeDescription = undefined;
185
+ }
186
+ _setColor(colorPalette) {
187
+ const classList = this._elementRef.nativeElement.classList;
188
+ classList.remove(`mat-badge-${this._color}`);
189
+ if (colorPalette) {
190
+ classList.add(`mat-badge-${colorPalette}`);
229
191
  }
230
- /** Clears any existing badges that might be left over from server-side rendering. */
231
- _clearExistingBadges() {
232
- // Only check direct children of this host element in order to avoid deleting
233
- // any badges that might exist in descendant elements.
234
- const badges = this._elementRef.nativeElement.querySelectorAll(`:scope > .${BADGE_CONTENT_CLASS}`);
235
- for (const badgeElement of Array.from(badges)) {
236
- if (badgeElement !== this._badgeElement) {
237
- badgeElement.remove();
238
- }
239
- }
192
+ }
193
+ _clearExistingBadges() {
194
+ const badges = this._elementRef.nativeElement.querySelectorAll(`:scope > .${BADGE_CONTENT_CLASS}`);
195
+ for (const badgeElement of Array.from(badges)) {
196
+ if (badgeElement !== this._badgeElement) {
197
+ badgeElement.remove();
198
+ }
240
199
  }
241
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
242
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatBadge, isStandalone: true, selector: "[matBadge]", inputs: { color: ["matBadgeColor", "color"], overlap: ["matBadgeOverlap", "overlap", booleanAttribute], disabled: ["matBadgeDisabled", "disabled", booleanAttribute], position: ["matBadgePosition", "position"], content: ["matBadge", "content"], description: ["matBadgeDescription", "description"], size: ["matBadgeSize", "size"], hidden: ["matBadgeHidden", "hidden", booleanAttribute] }, host: { properties: { "class.mat-badge-overlap": "overlap", "class.mat-badge-above": "isAbove()", "class.mat-badge-below": "!isAbove()", "class.mat-badge-before": "!isAfter()", "class.mat-badge-after": "isAfter()", "class.mat-badge-small": "size === \"small\"", "class.mat-badge-medium": "size === \"medium\"", "class.mat-badge-large": "size === \"large\"", "class.mat-badge-hidden": "hidden || !content", "class.mat-badge-disabled": "disabled" }, classAttribute: "mat-badge" }, ngImport: i0 });
200
+ }
201
+ static ɵfac = i0.ɵɵngDeclareFactory({
202
+ minVersion: "12.0.0",
203
+ version: "20.2.0-next.2",
204
+ ngImport: i0,
205
+ type: MatBadge,
206
+ deps: [],
207
+ target: i0.ɵɵFactoryTarget.Directive
208
+ });
209
+ static ɵdir = i0.ɵɵngDeclareDirective({
210
+ minVersion: "16.1.0",
211
+ version: "20.2.0-next.2",
212
+ type: MatBadge,
213
+ isStandalone: true,
214
+ selector: "[matBadge]",
215
+ inputs: {
216
+ color: ["matBadgeColor", "color"],
217
+ overlap: ["matBadgeOverlap", "overlap", booleanAttribute],
218
+ disabled: ["matBadgeDisabled", "disabled", booleanAttribute],
219
+ position: ["matBadgePosition", "position"],
220
+ content: ["matBadge", "content"],
221
+ description: ["matBadgeDescription", "description"],
222
+ size: ["matBadgeSize", "size"],
223
+ hidden: ["matBadgeHidden", "hidden", booleanAttribute]
224
+ },
225
+ host: {
226
+ properties: {
227
+ "class.mat-badge-overlap": "overlap",
228
+ "class.mat-badge-above": "isAbove()",
229
+ "class.mat-badge-below": "!isAbove()",
230
+ "class.mat-badge-before": "!isAfter()",
231
+ "class.mat-badge-after": "isAfter()",
232
+ "class.mat-badge-small": "size === \"small\"",
233
+ "class.mat-badge-medium": "size === \"medium\"",
234
+ "class.mat-badge-large": "size === \"large\"",
235
+ "class.mat-badge-hidden": "hidden || !content",
236
+ "class.mat-badge-disabled": "disabled"
237
+ },
238
+ classAttribute: "mat-badge"
239
+ },
240
+ ngImport: i0
241
+ });
243
242
  }
244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadge, decorators: [{
245
- type: Directive,
246
- args: [{
247
- selector: '[matBadge]',
248
- host: {
249
- 'class': 'mat-badge',
250
- '[class.mat-badge-overlap]': 'overlap',
251
- '[class.mat-badge-above]': 'isAbove()',
252
- '[class.mat-badge-below]': '!isAbove()',
253
- '[class.mat-badge-before]': '!isAfter()',
254
- '[class.mat-badge-after]': 'isAfter()',
255
- '[class.mat-badge-small]': 'size === "small"',
256
- '[class.mat-badge-medium]': 'size === "medium"',
257
- '[class.mat-badge-large]': 'size === "large"',
258
- '[class.mat-badge-hidden]': 'hidden || !content',
259
- '[class.mat-badge-disabled]': 'disabled',
260
- },
261
- }]
262
- }], ctorParameters: () => [], propDecorators: { color: [{
263
- type: Input,
264
- args: ['matBadgeColor']
265
- }], overlap: [{
266
- type: Input,
267
- args: [{ alias: 'matBadgeOverlap', transform: booleanAttribute }]
268
- }], disabled: [{
269
- type: Input,
270
- args: [{ alias: 'matBadgeDisabled', transform: booleanAttribute }]
271
- }], position: [{
272
- type: Input,
273
- args: ['matBadgePosition']
274
- }], content: [{
275
- type: Input,
276
- args: ['matBadge']
277
- }], description: [{
278
- type: Input,
279
- args: ['matBadgeDescription']
280
- }], size: [{
281
- type: Input,
282
- args: ['matBadgeSize']
283
- }], hidden: [{
284
- type: Input,
285
- args: [{ alias: 'matBadgeHidden', transform: booleanAttribute }]
286
- }] } });
243
+ i0.ɵɵngDeclareClassMetadata({
244
+ minVersion: "12.0.0",
245
+ version: "20.2.0-next.2",
246
+ ngImport: i0,
247
+ type: MatBadge,
248
+ decorators: [{
249
+ type: Directive,
250
+ args: [{
251
+ selector: '[matBadge]',
252
+ host: {
253
+ 'class': 'mat-badge',
254
+ '[class.mat-badge-overlap]': 'overlap',
255
+ '[class.mat-badge-above]': 'isAbove()',
256
+ '[class.mat-badge-below]': '!isAbove()',
257
+ '[class.mat-badge-before]': '!isAfter()',
258
+ '[class.mat-badge-after]': 'isAfter()',
259
+ '[class.mat-badge-small]': 'size === "small"',
260
+ '[class.mat-badge-medium]': 'size === "medium"',
261
+ '[class.mat-badge-large]': 'size === "large"',
262
+ '[class.mat-badge-hidden]': 'hidden || !content',
263
+ '[class.mat-badge-disabled]': 'disabled'
264
+ }
265
+ }]
266
+ }],
267
+ ctorParameters: () => [],
268
+ propDecorators: {
269
+ color: [{
270
+ type: Input,
271
+ args: ['matBadgeColor']
272
+ }],
273
+ overlap: [{
274
+ type: Input,
275
+ args: [{
276
+ alias: 'matBadgeOverlap',
277
+ transform: booleanAttribute
278
+ }]
279
+ }],
280
+ disabled: [{
281
+ type: Input,
282
+ args: [{
283
+ alias: 'matBadgeDisabled',
284
+ transform: booleanAttribute
285
+ }]
286
+ }],
287
+ position: [{
288
+ type: Input,
289
+ args: ['matBadgePosition']
290
+ }],
291
+ content: [{
292
+ type: Input,
293
+ args: ['matBadge']
294
+ }],
295
+ description: [{
296
+ type: Input,
297
+ args: ['matBadgeDescription']
298
+ }],
299
+ size: [{
300
+ type: Input,
301
+ args: ['matBadgeSize']
302
+ }],
303
+ hidden: [{
304
+ type: Input,
305
+ args: [{
306
+ alias: 'matBadgeHidden',
307
+ transform: booleanAttribute
308
+ }]
309
+ }]
310
+ }
311
+ });
287
312
 
288
313
  class MatBadgeModule {
289
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadgeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
290
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadgeModule, imports: [A11yModule, MatBadge, _MatBadgeStyleLoader], exports: [MatBadge, BidiModule] });
291
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadgeModule, imports: [A11yModule, BidiModule] });
314
+ static ɵfac = i0.ɵɵngDeclareFactory({
315
+ minVersion: "12.0.0",
316
+ version: "20.2.0-next.2",
317
+ ngImport: i0,
318
+ type: MatBadgeModule,
319
+ deps: [],
320
+ target: i0.ɵɵFactoryTarget.NgModule
321
+ });
322
+ static ɵmod = i0.ɵɵngDeclareNgModule({
323
+ minVersion: "14.0.0",
324
+ version: "20.2.0-next.2",
325
+ ngImport: i0,
326
+ type: MatBadgeModule,
327
+ imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],
328
+ exports: [MatBadge, BidiModule]
329
+ });
330
+ static ɵinj = i0.ɵɵngDeclareInjector({
331
+ minVersion: "12.0.0",
332
+ version: "20.2.0-next.2",
333
+ ngImport: i0,
334
+ type: MatBadgeModule,
335
+ imports: [A11yModule, BidiModule]
336
+ });
292
337
  }
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatBadgeModule, decorators: [{
294
- type: NgModule,
295
- args: [{
296
- // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,
297
- // but it seems to be necessary for tests.
298
- imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],
299
- exports: [MatBadge, BidiModule],
300
- }]
301
- }] });
338
+ i0.ɵɵngDeclareClassMetadata({
339
+ minVersion: "12.0.0",
340
+ version: "20.2.0-next.2",
341
+ ngImport: i0,
342
+ type: MatBadgeModule,
343
+ decorators: [{
344
+ type: NgModule,
345
+ args: [{
346
+ imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],
347
+ exports: [MatBadge, BidiModule]
348
+ }]
349
+ }]
350
+ });
302
351
 
303
352
  export { MatBadge, MatBadgeModule };
304
353
  //# sourceMappingURL=badge.mjs.map