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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +811 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
package/fesm2022/icon.mjs CHANGED
@@ -8,384 +8,358 @@ export { getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlEr
8
8
  import '@angular/common/http';
9
9
  import '@angular/platform-browser';
10
10
 
11
- /** Injection token to be used to override the default options for `mat-icon`. */
12
11
  const MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('MAT_ICON_DEFAULT_OPTIONS');
13
- /**
14
- * Injection token used to provide the current location to `MatIcon`.
15
- * Used to handle server-side rendering and to stub out during unit tests.
16
- * @docs-private
17
- */
18
12
  const MAT_ICON_LOCATION = new InjectionToken('mat-icon-location', {
19
- providedIn: 'root',
20
- factory: () => {
21
- const _document = inject(DOCUMENT);
22
- const _location = _document ? _document.location : null;
23
- return {
24
- // Note that this needs to be a function, rather than a property, because Angular
25
- // will only resolve it once, but we want the current path on each call.
26
- getPathname: () => (_location ? _location.pathname + _location.search : ''),
27
- };
28
- },
13
+ providedIn: 'root',
14
+ factory: () => {
15
+ const _document = inject(DOCUMENT);
16
+ const _location = _document ? _document.location : null;
17
+ return {
18
+ getPathname: () => _location ? _location.pathname + _location.search : ''
19
+ };
20
+ }
29
21
  });
30
- /** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */
31
- const funcIriAttributes = [
32
- 'clip-path',
33
- 'color-profile',
34
- 'src',
35
- 'cursor',
36
- 'fill',
37
- 'filter',
38
- 'marker',
39
- 'marker-start',
40
- 'marker-mid',
41
- 'marker-end',
42
- 'mask',
43
- 'stroke',
44
- ];
45
- /** Selector that can be used to find all elements that are using a `FuncIRI`. */
22
+ const funcIriAttributes = ['clip-path', 'color-profile', 'src', 'cursor', 'fill', 'filter', 'marker', 'marker-start', 'marker-mid', 'marker-end', 'mask', 'stroke'];
46
23
  const funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');
47
- /** Regex that can be used to extract the id out of a FuncIRI. */
48
24
  const funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
49
- /**
50
- * Component to display an icon. It can be used in the following ways:
51
- *
52
- * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the
53
- * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of
54
- * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format
55
- * "[namespace]:[name]", if not the value will be the name of an icon in the default namespace.
56
- * Examples:
57
- * `<mat-icon svgIcon="left-arrow"></mat-icon>
58
- * <mat-icon svgIcon="animals:cat"></mat-icon>`
59
- *
60
- * - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the
61
- * content of the `<mat-icon>` component. If you register a custom font class, don't forget to also
62
- * include the special class `mat-ligature-font`. It is recommended to use the attribute alternative
63
- * to prevent the ligature text to be selectable and to appear in search engine results.
64
- * By default, the Material icons font is used as described at
65
- * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an
66
- * alternate font by setting the fontSet input to either the CSS class to apply to use the
67
- * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.
68
- * Examples:
69
- * `<mat-icon fontIcon="home"></mat-icon>
70
- * <mat-icon>home</mat-icon>
71
- * <mat-icon fontSet="myfont" fontIcon="sun"></mat-icon>
72
- * <mat-icon fontSet="myfont">sun</mat-icon>`
73
- *
74
- * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the
75
- * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a
76
- * CSS class which causes the glyph to be displayed via a :before selector, as in
77
- * https://fontawesome-v4.github.io/examples/
78
- * Example:
79
- * `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
80
- */
81
25
  class MatIcon {
82
- _elementRef = inject(ElementRef);
83
- _iconRegistry = inject(MatIconRegistry);
84
- _location = inject(MAT_ICON_LOCATION);
85
- _errorHandler = inject(ErrorHandler);
86
- _defaultColor;
87
- /**
88
- * Theme color of the icon. This API is supported in M2 themes only, it
89
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/icon/styling.
90
- *
91
- * For information on applying color variants in M3, see
92
- * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
93
- */
94
- get color() {
95
- return this._color || this._defaultColor;
26
+ _elementRef = inject(ElementRef);
27
+ _iconRegistry = inject(MatIconRegistry);
28
+ _location = inject(MAT_ICON_LOCATION);
29
+ _errorHandler = inject(ErrorHandler);
30
+ _defaultColor;
31
+ get color() {
32
+ return this._color || this._defaultColor;
33
+ }
34
+ set color(value) {
35
+ this._color = value;
36
+ }
37
+ _color;
38
+ inline = false;
39
+ get svgIcon() {
40
+ return this._svgIcon;
41
+ }
42
+ set svgIcon(value) {
43
+ if (value !== this._svgIcon) {
44
+ if (value) {
45
+ this._updateSvgIcon(value);
46
+ } else if (this._svgIcon) {
47
+ this._clearSvgElement();
48
+ }
49
+ this._svgIcon = value;
96
50
  }
97
- set color(value) {
98
- this._color = value;
51
+ }
52
+ _svgIcon;
53
+ get fontSet() {
54
+ return this._fontSet;
55
+ }
56
+ set fontSet(value) {
57
+ const newValue = this._cleanupFontValue(value);
58
+ if (newValue !== this._fontSet) {
59
+ this._fontSet = newValue;
60
+ this._updateFontIconClasses();
99
61
  }
100
- _color;
101
- /**
102
- * Whether the icon should be inlined, automatically sizing the icon to match the font size of
103
- * the element the icon is contained in.
104
- */
105
- inline = false;
106
- /** Name of the icon in the SVG icon set. */
107
- get svgIcon() {
108
- return this._svgIcon;
62
+ }
63
+ _fontSet;
64
+ get fontIcon() {
65
+ return this._fontIcon;
66
+ }
67
+ set fontIcon(value) {
68
+ const newValue = this._cleanupFontValue(value);
69
+ if (newValue !== this._fontIcon) {
70
+ this._fontIcon = newValue;
71
+ this._updateFontIconClasses();
109
72
  }
110
- set svgIcon(value) {
111
- if (value !== this._svgIcon) {
112
- if (value) {
113
- this._updateSvgIcon(value);
114
- }
115
- else if (this._svgIcon) {
116
- this._clearSvgElement();
117
- }
118
- this._svgIcon = value;
119
- }
73
+ }
74
+ _fontIcon;
75
+ _previousFontSetClass = [];
76
+ _previousFontIconClass;
77
+ _svgName;
78
+ _svgNamespace;
79
+ _previousPath;
80
+ _elementsWithExternalReferences;
81
+ _currentIconFetch = Subscription.EMPTY;
82
+ constructor() {
83
+ const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {
84
+ optional: true
85
+ });
86
+ const defaults = inject(MAT_ICON_DEFAULT_OPTIONS, {
87
+ optional: true
88
+ });
89
+ if (defaults) {
90
+ if (defaults.color) {
91
+ this.color = this._defaultColor = defaults.color;
92
+ }
93
+ if (defaults.fontSet) {
94
+ this.fontSet = defaults.fontSet;
95
+ }
120
96
  }
121
- _svgIcon;
122
- /** Font set that the icon is a part of. */
123
- get fontSet() {
124
- return this._fontSet;
97
+ if (!ariaHidden) {
98
+ this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');
125
99
  }
126
- set fontSet(value) {
127
- const newValue = this._cleanupFontValue(value);
128
- if (newValue !== this._fontSet) {
129
- this._fontSet = newValue;
130
- this._updateFontIconClasses();
131
- }
100
+ }
101
+ _splitIconName(iconName) {
102
+ if (!iconName) {
103
+ return ['', ''];
132
104
  }
133
- _fontSet;
134
- /** Name of an icon within a font set. */
135
- get fontIcon() {
136
- return this._fontIcon;
105
+ const parts = iconName.split(':');
106
+ switch (parts.length) {
107
+ case 1:
108
+ return ['', parts[0]];
109
+ case 2:
110
+ return parts;
111
+ default:
112
+ throw Error(`Invalid icon name: "${iconName}"`);
137
113
  }
138
- set fontIcon(value) {
139
- const newValue = this._cleanupFontValue(value);
140
- if (newValue !== this._fontIcon) {
141
- this._fontIcon = newValue;
142
- this._updateFontIconClasses();
143
- }
144
- }
145
- _fontIcon;
146
- _previousFontSetClass = [];
147
- _previousFontIconClass;
148
- _svgName;
149
- _svgNamespace;
150
- /** Keeps track of the current page path. */
151
- _previousPath;
152
- /** Keeps track of the elements and attributes that we've prefixed with the current path. */
153
- _elementsWithExternalReferences;
154
- /** Subscription to the current in-progress SVG icon request. */
155
- _currentIconFetch = Subscription.EMPTY;
156
- constructor() {
157
- const ariaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });
158
- const defaults = inject(MAT_ICON_DEFAULT_OPTIONS, { optional: true });
159
- if (defaults) {
160
- if (defaults.color) {
161
- this.color = this._defaultColor = defaults.color;
162
- }
163
- if (defaults.fontSet) {
164
- this.fontSet = defaults.fontSet;
165
- }
166
- }
167
- // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is
168
- // the right thing to do for the majority of icon use-cases.
169
- if (!ariaHidden) {
170
- this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');
171
- }
114
+ }
115
+ ngOnInit() {
116
+ this._updateFontIconClasses();
117
+ }
118
+ ngAfterViewChecked() {
119
+ const cachedElements = this._elementsWithExternalReferences;
120
+ if (cachedElements && cachedElements.size) {
121
+ const newPath = this._location.getPathname();
122
+ if (newPath !== this._previousPath) {
123
+ this._previousPath = newPath;
124
+ this._prependPathToReferences(newPath);
125
+ }
172
126
  }
173
- /**
174
- * Splits an svgIcon binding value into its icon set and icon name components.
175
- * Returns a 2-element array of [(icon set), (icon name)].
176
- * The separator for the two fields is ':'. If there is no separator, an empty
177
- * string is returned for the icon set and the entire value is returned for
178
- * the icon name. If the argument is falsy, returns an array of two empty strings.
179
- * Throws an error if the name contains two or more ':' separators.
180
- * Examples:
181
- * `'social:cake' -> ['social', 'cake']
182
- * 'penguin' -> ['', 'penguin']
183
- * null -> ['', '']
184
- * 'a:b:c' -> (throws Error)`
185
- */
186
- _splitIconName(iconName) {
187
- if (!iconName) {
188
- return ['', ''];
189
- }
190
- const parts = iconName.split(':');
191
- switch (parts.length) {
192
- case 1:
193
- return ['', parts[0]]; // Use default namespace.
194
- case 2:
195
- return parts;
196
- default:
197
- throw Error(`Invalid icon name: "${iconName}"`); // TODO: add an ngDevMode check
198
- }
127
+ }
128
+ ngOnDestroy() {
129
+ this._currentIconFetch.unsubscribe();
130
+ if (this._elementsWithExternalReferences) {
131
+ this._elementsWithExternalReferences.clear();
199
132
  }
200
- ngOnInit() {
201
- // Update font classes because ngOnChanges won't be called if none of the inputs are present,
202
- // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.
203
- this._updateFontIconClasses();
133
+ }
134
+ _usingFontIcon() {
135
+ return !this.svgIcon;
136
+ }
137
+ _setSvgElement(svg) {
138
+ this._clearSvgElement();
139
+ const path = this._location.getPathname();
140
+ this._previousPath = path;
141
+ this._cacheChildrenWithExternalReferences(svg);
142
+ this._prependPathToReferences(path);
143
+ this._elementRef.nativeElement.appendChild(svg);
144
+ }
145
+ _clearSvgElement() {
146
+ const layoutElement = this._elementRef.nativeElement;
147
+ let childCount = layoutElement.childNodes.length;
148
+ if (this._elementsWithExternalReferences) {
149
+ this._elementsWithExternalReferences.clear();
204
150
  }
205
- ngAfterViewChecked() {
206
- const cachedElements = this._elementsWithExternalReferences;
207
- if (cachedElements && cachedElements.size) {
208
- const newPath = this._location.getPathname();
209
- // We need to check whether the URL has changed on each change detection since
210
- // the browser doesn't have an API that will let us react on link clicks and
211
- // we can't depend on the Angular router. The references need to be updated,
212
- // because while most browsers don't care whether the URL is correct after
213
- // the first render, Safari will break if the user navigates to a different
214
- // page and the SVG isn't re-rendered.
215
- if (newPath !== this._previousPath) {
216
- this._previousPath = newPath;
217
- this._prependPathToReferences(newPath);
218
- }
219
- }
151
+ while (childCount--) {
152
+ const child = layoutElement.childNodes[childCount];
153
+ if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {
154
+ child.remove();
155
+ }
220
156
  }
221
- ngOnDestroy() {
222
- this._currentIconFetch.unsubscribe();
223
- if (this._elementsWithExternalReferences) {
224
- this._elementsWithExternalReferences.clear();
225
- }
157
+ }
158
+ _updateFontIconClasses() {
159
+ if (!this._usingFontIcon()) {
160
+ return;
226
161
  }
227
- _usingFontIcon() {
228
- return !this.svgIcon;
162
+ const elem = this._elementRef.nativeElement;
163
+ const fontSetClasses = (this.fontSet ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/) : this._iconRegistry.getDefaultFontSetClass()).filter(className => className.length > 0);
164
+ this._previousFontSetClass.forEach(className => elem.classList.remove(className));
165
+ fontSetClasses.forEach(className => elem.classList.add(className));
166
+ this._previousFontSetClass = fontSetClasses;
167
+ if (this.fontIcon !== this._previousFontIconClass && !fontSetClasses.includes('mat-ligature-font')) {
168
+ if (this._previousFontIconClass) {
169
+ elem.classList.remove(this._previousFontIconClass);
170
+ }
171
+ if (this.fontIcon) {
172
+ elem.classList.add(this.fontIcon);
173
+ }
174
+ this._previousFontIconClass = this.fontIcon;
229
175
  }
230
- _setSvgElement(svg) {
231
- this._clearSvgElement();
232
- // Note: we do this fix here, rather than the icon registry, because the
233
- // references have to point to the URL at the time that the icon was created.
234
- const path = this._location.getPathname();
235
- this._previousPath = path;
236
- this._cacheChildrenWithExternalReferences(svg);
237
- this._prependPathToReferences(path);
238
- this._elementRef.nativeElement.appendChild(svg);
176
+ }
177
+ _cleanupFontValue(value) {
178
+ return typeof value === 'string' ? value.trim().split(' ')[0] : value;
179
+ }
180
+ _prependPathToReferences(path) {
181
+ const elements = this._elementsWithExternalReferences;
182
+ if (elements) {
183
+ elements.forEach((attrs, element) => {
184
+ attrs.forEach(attr => {
185
+ element.setAttribute(attr.name, `url('${path}#${attr.value}')`);
186
+ });
187
+ });
239
188
  }
240
- _clearSvgElement() {
241
- const layoutElement = this._elementRef.nativeElement;
242
- let childCount = layoutElement.childNodes.length;
243
- if (this._elementsWithExternalReferences) {
244
- this._elementsWithExternalReferences.clear();
245
- }
246
- // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that
247
- // we can't use innerHTML, because IE will throw if the element has a data binding.
248
- while (childCount--) {
249
- const child = layoutElement.childNodes[childCount];
250
- // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid
251
- // of any loose text nodes, as well as any SVG elements in order to remove any old icons.
252
- if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {
253
- child.remove();
254
- }
189
+ }
190
+ _cacheChildrenWithExternalReferences(element) {
191
+ const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);
192
+ const elements = this._elementsWithExternalReferences = this._elementsWithExternalReferences || new Map();
193
+ for (let i = 0; i < elementsWithFuncIri.length; i++) {
194
+ funcIriAttributes.forEach(attr => {
195
+ const elementWithReference = elementsWithFuncIri[i];
196
+ const value = elementWithReference.getAttribute(attr);
197
+ const match = value ? value.match(funcIriPattern) : null;
198
+ if (match) {
199
+ let attributes = elements.get(elementWithReference);
200
+ if (!attributes) {
201
+ attributes = [];
202
+ elements.set(elementWithReference, attributes);
203
+ }
204
+ attributes.push({
205
+ name: attr,
206
+ value: match[1]
207
+ });
255
208
  }
209
+ });
256
210
  }
257
- _updateFontIconClasses() {
258
- if (!this._usingFontIcon()) {
259
- return;
260
- }
261
- const elem = this._elementRef.nativeElement;
262
- const fontSetClasses = (this.fontSet
263
- ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)
264
- : this._iconRegistry.getDefaultFontSetClass()).filter(className => className.length > 0);
265
- this._previousFontSetClass.forEach(className => elem.classList.remove(className));
266
- fontSetClasses.forEach(className => elem.classList.add(className));
267
- this._previousFontSetClass = fontSetClasses;
268
- if (this.fontIcon !== this._previousFontIconClass &&
269
- !fontSetClasses.includes('mat-ligature-font')) {
270
- if (this._previousFontIconClass) {
271
- elem.classList.remove(this._previousFontIconClass);
272
- }
273
- if (this.fontIcon) {
274
- elem.classList.add(this.fontIcon);
275
- }
276
- this._previousFontIconClass = this.fontIcon;
277
- }
278
- }
279
- /**
280
- * Cleans up a value to be used as a fontIcon or fontSet.
281
- * Since the value ends up being assigned as a CSS class, we
282
- * have to trim the value and omit space-separated values.
283
- */
284
- _cleanupFontValue(value) {
285
- return typeof value === 'string' ? value.trim().split(' ')[0] : value;
286
- }
287
- /**
288
- * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
289
- * reference. This is required because WebKit browsers require references to be prefixed with
290
- * the current path, if the page has a `base` tag.
291
- */
292
- _prependPathToReferences(path) {
293
- const elements = this._elementsWithExternalReferences;
294
- if (elements) {
295
- elements.forEach((attrs, element) => {
296
- attrs.forEach(attr => {
297
- element.setAttribute(attr.name, `url('${path}#${attr.value}')`);
298
- });
299
- });
300
- }
301
- }
302
- /**
303
- * Caches the children of an SVG element that have `url()`
304
- * references that we need to prefix with the current path.
305
- */
306
- _cacheChildrenWithExternalReferences(element) {
307
- const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);
308
- const elements = (this._elementsWithExternalReferences =
309
- this._elementsWithExternalReferences || new Map());
310
- for (let i = 0; i < elementsWithFuncIri.length; i++) {
311
- funcIriAttributes.forEach(attr => {
312
- const elementWithReference = elementsWithFuncIri[i];
313
- const value = elementWithReference.getAttribute(attr);
314
- const match = value ? value.match(funcIriPattern) : null;
315
- if (match) {
316
- let attributes = elements.get(elementWithReference);
317
- if (!attributes) {
318
- attributes = [];
319
- elements.set(elementWithReference, attributes);
320
- }
321
- attributes.push({ name: attr, value: match[1] });
322
- }
323
- });
324
- }
211
+ }
212
+ _updateSvgIcon(rawName) {
213
+ this._svgNamespace = null;
214
+ this._svgName = null;
215
+ this._currentIconFetch.unsubscribe();
216
+ if (rawName) {
217
+ const [namespace, iconName] = this._splitIconName(rawName);
218
+ if (namespace) {
219
+ this._svgNamespace = namespace;
220
+ }
221
+ if (iconName) {
222
+ this._svgName = iconName;
223
+ }
224
+ this._currentIconFetch = this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe(svg => this._setSvgElement(svg), err => {
225
+ const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;
226
+ this._errorHandler.handleError(new Error(errorMessage));
227
+ });
325
228
  }
326
- /** Sets a new SVG icon with a particular name. */
327
- _updateSvgIcon(rawName) {
328
- this._svgNamespace = null;
329
- this._svgName = null;
330
- this._currentIconFetch.unsubscribe();
331
- if (rawName) {
332
- const [namespace, iconName] = this._splitIconName(rawName);
333
- if (namespace) {
334
- this._svgNamespace = namespace;
335
- }
336
- if (iconName) {
337
- this._svgName = iconName;
338
- }
339
- this._currentIconFetch = this._iconRegistry
340
- .getNamedSvgIcon(iconName, namespace)
341
- .pipe(take(1))
342
- .subscribe(svg => this._setSvgElement(svg), (err) => {
343
- const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;
344
- this._errorHandler.handleError(new Error(errorMessage));
345
- });
346
- }
347
- }
348
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
349
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.2.0-next.2", type: MatIcon, isStandalone: true, selector: "mat-icon", inputs: { color: "color", inline: ["inline", "inline", booleanAttribute], svgIcon: "svgIcon", fontSet: "fontSet", fontIcon: "fontIcon" }, host: { attributes: { "role": "img" }, properties: { "class": "color ? \"mat-\" + color : \"\"", "attr.data-mat-icon-type": "_usingFontIcon() ? \"font\" : \"svg\"", "attr.data-mat-icon-name": "_svgName || fontIcon", "attr.data-mat-icon-namespace": "_svgNamespace || fontSet", "attr.fontIcon": "_usingFontIcon() ? fontIcon : null", "class.mat-icon-inline": "inline", "class.mat-icon-no-color": "color !== \"primary\" && color !== \"accent\" && color !== \"warn\"" }, classAttribute: "mat-icon notranslate" }, exportAs: ["matIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
229
+ }
230
+ static ɵfac = i0.ɵɵngDeclareFactory({
231
+ minVersion: "12.0.0",
232
+ version: "20.2.0-next.2",
233
+ ngImport: i0,
234
+ type: MatIcon,
235
+ deps: [],
236
+ target: i0.ɵɵFactoryTarget.Component
237
+ });
238
+ static ɵcmp = i0.ɵɵngDeclareComponent({
239
+ minVersion: "16.1.0",
240
+ version: "20.2.0-next.2",
241
+ type: MatIcon,
242
+ isStandalone: true,
243
+ selector: "mat-icon",
244
+ inputs: {
245
+ color: "color",
246
+ inline: ["inline", "inline", booleanAttribute],
247
+ svgIcon: "svgIcon",
248
+ fontSet: "fontSet",
249
+ fontIcon: "fontIcon"
250
+ },
251
+ host: {
252
+ attributes: {
253
+ "role": "img"
254
+ },
255
+ properties: {
256
+ "class": "color ? \"mat-\" + color : \"\"",
257
+ "attr.data-mat-icon-type": "_usingFontIcon() ? \"font\" : \"svg\"",
258
+ "attr.data-mat-icon-name": "_svgName || fontIcon",
259
+ "attr.data-mat-icon-namespace": "_svgNamespace || fontSet",
260
+ "attr.fontIcon": "_usingFontIcon() ? fontIcon : null",
261
+ "class.mat-icon-inline": "inline",
262
+ "class.mat-icon-no-color": "color !== \"primary\" && color !== \"accent\" && color !== \"warn\""
263
+ },
264
+ classAttribute: "mat-icon notranslate"
265
+ },
266
+ exportAs: ["matIcon"],
267
+ ngImport: i0,
268
+ template: '<ng-content></ng-content>',
269
+ isInline: true,
270
+ styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],
271
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
272
+ encapsulation: i0.ViewEncapsulation.None
273
+ });
350
274
  }
351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIcon, decorators: [{
352
- type: Component,
353
- args: [{ template: '<ng-content></ng-content>', selector: 'mat-icon', exportAs: 'matIcon', host: {
354
- 'role': 'img',
355
- 'class': 'mat-icon notranslate',
356
- '[class]': 'color ? "mat-" + color : ""',
357
- '[attr.data-mat-icon-type]': '_usingFontIcon() ? "font" : "svg"',
358
- '[attr.data-mat-icon-name]': '_svgName || fontIcon',
359
- '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',
360
- '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',
361
- '[class.mat-icon-inline]': 'inline',
362
- '[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"',
363
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"] }]
364
- }], ctorParameters: () => [], propDecorators: { color: [{
365
- type: Input
366
- }], inline: [{
367
- type: Input,
368
- args: [{ transform: booleanAttribute }]
369
- }], svgIcon: [{
370
- type: Input
371
- }], fontSet: [{
372
- type: Input
373
- }], fontIcon: [{
374
- type: Input
375
- }] } });
275
+ i0.ɵɵngDeclareClassMetadata({
276
+ minVersion: "12.0.0",
277
+ version: "20.2.0-next.2",
278
+ ngImport: i0,
279
+ type: MatIcon,
280
+ decorators: [{
281
+ type: Component,
282
+ args: [{
283
+ template: '<ng-content></ng-content>',
284
+ selector: 'mat-icon',
285
+ exportAs: 'matIcon',
286
+ host: {
287
+ 'role': 'img',
288
+ 'class': 'mat-icon notranslate',
289
+ '[class]': 'color ? "mat-" + color : ""',
290
+ '[attr.data-mat-icon-type]': '_usingFontIcon() ? "font" : "svg"',
291
+ '[attr.data-mat-icon-name]': '_svgName || fontIcon',
292
+ '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',
293
+ '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',
294
+ '[class.mat-icon-inline]': 'inline',
295
+ '[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"'
296
+ },
297
+ encapsulation: ViewEncapsulation.None,
298
+ changeDetection: ChangeDetectionStrategy.OnPush,
299
+ styles: ["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"]
300
+ }]
301
+ }],
302
+ ctorParameters: () => [],
303
+ propDecorators: {
304
+ color: [{
305
+ type: Input
306
+ }],
307
+ inline: [{
308
+ type: Input,
309
+ args: [{
310
+ transform: booleanAttribute
311
+ }]
312
+ }],
313
+ svgIcon: [{
314
+ type: Input
315
+ }],
316
+ fontSet: [{
317
+ type: Input
318
+ }],
319
+ fontIcon: [{
320
+ type: Input
321
+ }]
322
+ }
323
+ });
376
324
 
377
325
  class MatIconModule {
378
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
379
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconModule, imports: [MatIcon], exports: [MatIcon, BidiModule] });
380
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconModule, imports: [BidiModule] });
326
+ static ɵfac = i0.ɵɵngDeclareFactory({
327
+ minVersion: "12.0.0",
328
+ version: "20.2.0-next.2",
329
+ ngImport: i0,
330
+ type: MatIconModule,
331
+ deps: [],
332
+ target: i0.ɵɵFactoryTarget.NgModule
333
+ });
334
+ static ɵmod = i0.ɵɵngDeclareNgModule({
335
+ minVersion: "14.0.0",
336
+ version: "20.2.0-next.2",
337
+ ngImport: i0,
338
+ type: MatIconModule,
339
+ imports: [MatIcon],
340
+ exports: [MatIcon, BidiModule]
341
+ });
342
+ static ɵinj = i0.ɵɵngDeclareInjector({
343
+ minVersion: "12.0.0",
344
+ version: "20.2.0-next.2",
345
+ ngImport: i0,
346
+ type: MatIconModule,
347
+ imports: [BidiModule]
348
+ });
381
349
  }
382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatIconModule, decorators: [{
383
- type: NgModule,
384
- args: [{
385
- imports: [MatIcon],
386
- exports: [MatIcon, BidiModule],
387
- }]
388
- }] });
350
+ i0.ɵɵngDeclareClassMetadata({
351
+ minVersion: "12.0.0",
352
+ version: "20.2.0-next.2",
353
+ ngImport: i0,
354
+ type: MatIconModule,
355
+ decorators: [{
356
+ type: NgModule,
357
+ args: [{
358
+ imports: [MatIcon],
359
+ exports: [MatIcon, BidiModule]
360
+ }]
361
+ }]
362
+ });
389
363
 
390
364
  export { MAT_ICON_DEFAULT_OPTIONS, MAT_ICON_LOCATION, MatIcon, MatIconModule, MatIconRegistry };
391
365
  //# sourceMappingURL=icon.mjs.map