@angular/material 10.0.0-rc.3 → 10.1.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 (627) hide show
  1. package/_theming.scss +17 -17
  2. package/autocomplete/index.metadata.json +1 -1
  3. package/autocomplete/testing/autocomplete-harness.d.ts +2 -0
  4. package/bundles/material-autocomplete-testing.umd.js +11 -0
  5. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  6. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  7. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  8. package/bundles/material-autocomplete.umd.js +3 -1
  9. package/bundles/material-autocomplete.umd.js.map +1 -1
  10. package/bundles/material-autocomplete.umd.min.js +5 -5
  11. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  12. package/bundles/material-badge-testing.umd.min.js +1 -1
  13. package/bundles/material-badge-testing.umd.min.js.map +1 -1
  14. package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
  15. package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
  16. package/bundles/material-button-testing.umd.js +11 -0
  17. package/bundles/material-button-testing.umd.js.map +1 -1
  18. package/bundles/material-button-testing.umd.min.js +2 -2
  19. package/bundles/material-button-testing.umd.min.js.map +1 -1
  20. package/bundles/material-button-toggle-testing.umd.js +11 -0
  21. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  22. package/bundles/material-button-toggle-testing.umd.min.js +3 -3
  23. package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
  24. package/bundles/material-button-toggle.umd.js +12 -3
  25. package/bundles/material-button-toggle.umd.js.map +1 -1
  26. package/bundles/material-button-toggle.umd.min.js +2 -2
  27. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  28. package/bundles/material-button.umd.js +7 -2
  29. package/bundles/material-button.umd.js.map +1 -1
  30. package/bundles/material-button.umd.min.js +4 -4
  31. package/bundles/material-button.umd.min.js.map +1 -1
  32. package/bundles/material-card-testing.umd.js +335 -0
  33. package/bundles/material-card-testing.umd.js.map +1 -0
  34. package/bundles/material-card-testing.umd.min.js +44 -0
  35. package/bundles/material-card-testing.umd.min.js.map +1 -0
  36. package/bundles/material-checkbox-testing.umd.js +11 -0
  37. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  38. package/bundles/material-checkbox-testing.umd.min.js +3 -3
  39. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  40. package/bundles/material-checkbox.umd.js.map +1 -1
  41. package/bundles/material-chips.umd.js +36 -12
  42. package/bundles/material-chips.umd.js.map +1 -1
  43. package/bundles/material-chips.umd.min.js +4 -4
  44. package/bundles/material-chips.umd.min.js.map +1 -1
  45. package/bundles/material-core-testing.umd.min.js +1 -1
  46. package/bundles/material-core-testing.umd.min.js.map +1 -1
  47. package/bundles/material-core.umd.js +11 -3
  48. package/bundles/material-core.umd.js.map +1 -1
  49. package/bundles/material-core.umd.min.js +11 -11
  50. package/bundles/material-core.umd.min.js.map +1 -1
  51. package/bundles/material-datepicker.umd.js +20 -11
  52. package/bundles/material-datepicker.umd.js.map +1 -1
  53. package/bundles/material-datepicker.umd.min.js +5 -5
  54. package/bundles/material-datepicker.umd.min.js.map +1 -1
  55. package/bundles/material-dialog-testing.umd.min.js +1 -1
  56. package/bundles/material-dialog-testing.umd.min.js.map +1 -1
  57. package/bundles/material-dialog.umd.js +45 -8
  58. package/bundles/material-dialog.umd.js.map +1 -1
  59. package/bundles/material-dialog.umd.min.js +14 -7
  60. package/bundles/material-dialog.umd.min.js.map +1 -1
  61. package/bundles/material-divider-testing.umd.min.js +1 -1
  62. package/bundles/material-divider-testing.umd.min.js.map +1 -1
  63. package/bundles/material-expansion-testing.umd.js +11 -0
  64. package/bundles/material-expansion-testing.umd.js.map +1 -1
  65. package/bundles/material-expansion-testing.umd.min.js +3 -3
  66. package/bundles/material-expansion-testing.umd.min.js.map +1 -1
  67. package/bundles/material-form-field-testing.umd.js +32 -0
  68. package/bundles/material-form-field-testing.umd.js.map +1 -1
  69. package/bundles/material-form-field-testing.umd.min.js +4 -4
  70. package/bundles/material-form-field-testing.umd.min.js.map +1 -1
  71. package/bundles/material-form-field.umd.js +47 -21
  72. package/bundles/material-form-field.umd.js.map +1 -1
  73. package/bundles/material-form-field.umd.min.js +5 -5
  74. package/bundles/material-form-field.umd.min.js.map +1 -1
  75. package/bundles/material-grid-list-testing.umd.min.js +1 -1
  76. package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
  77. package/bundles/material-grid-list.umd.js +2 -2
  78. package/bundles/material-grid-list.umd.js.map +1 -1
  79. package/bundles/material-grid-list.umd.min.js +2 -2
  80. package/bundles/material-grid-list.umd.min.js.map +1 -1
  81. package/bundles/material-input-testing.umd.js +23 -6
  82. package/bundles/material-input-testing.umd.js.map +1 -1
  83. package/bundles/material-input-testing.umd.min.js +3 -3
  84. package/bundles/material-input-testing.umd.min.js.map +1 -1
  85. package/bundles/material-input.umd.js +28 -3
  86. package/bundles/material-input.umd.js.map +1 -1
  87. package/bundles/material-input.umd.min.js +3 -3
  88. package/bundles/material-input.umd.min.js.map +1 -1
  89. package/bundles/material-list-testing.umd.js +33 -0
  90. package/bundles/material-list-testing.umd.js.map +1 -1
  91. package/bundles/material-list-testing.umd.min.js +2 -2
  92. package/bundles/material-list-testing.umd.min.js.map +1 -1
  93. package/bundles/material-list.umd.js +3 -3
  94. package/bundles/material-list.umd.min.js +1 -1
  95. package/bundles/material-list.umd.min.js.map +1 -1
  96. package/bundles/material-menu-testing.umd.js +22 -0
  97. package/bundles/material-menu-testing.umd.js.map +1 -1
  98. package/bundles/material-menu-testing.umd.min.js +2 -2
  99. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  100. package/bundles/material-menu.umd.js +13 -2
  101. package/bundles/material-menu.umd.js.map +1 -1
  102. package/bundles/material-menu.umd.min.js +4 -4
  103. package/bundles/material-menu.umd.min.js.map +1 -1
  104. package/bundles/material-paginator-testing.umd.min.js +1 -1
  105. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  106. package/bundles/material-progress-bar-testing.umd.min.js +1 -1
  107. package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
  108. package/bundles/material-progress-spinner-testing.umd.js +1 -1
  109. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  110. package/bundles/material-progress-spinner-testing.umd.min.js +2 -2
  111. package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
  112. package/bundles/material-progress-spinner.umd.js +2 -2
  113. package/bundles/material-progress-spinner.umd.min.js +3 -3
  114. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  115. package/bundles/material-radio-testing.umd.js +11 -0
  116. package/bundles/material-radio-testing.umd.js.map +1 -1
  117. package/bundles/material-radio-testing.umd.min.js +3 -3
  118. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  119. package/bundles/material-radio.umd.js +15 -5
  120. package/bundles/material-radio.umd.js.map +1 -1
  121. package/bundles/material-radio.umd.min.js +2 -2
  122. package/bundles/material-radio.umd.min.js.map +1 -1
  123. package/bundles/material-select-testing.umd.js +11 -0
  124. package/bundles/material-select-testing.umd.js.map +1 -1
  125. package/bundles/material-select-testing.umd.min.js +2 -2
  126. package/bundles/material-select-testing.umd.min.js.map +1 -1
  127. package/bundles/material-select.umd.js +11 -3
  128. package/bundles/material-select.umd.js.map +1 -1
  129. package/bundles/material-select.umd.min.js +4 -4
  130. package/bundles/material-select.umd.min.js.map +1 -1
  131. package/bundles/material-sidenav-testing.umd.min.js +1 -1
  132. package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
  133. package/bundles/material-sidenav.umd.js +41 -17
  134. package/bundles/material-sidenav.umd.js.map +1 -1
  135. package/bundles/material-sidenav.umd.min.js +2 -2
  136. package/bundles/material-sidenav.umd.min.js.map +1 -1
  137. package/bundles/material-slide-toggle-testing.umd.js +11 -0
  138. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  139. package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
  140. package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
  141. package/bundles/material-slide-toggle.umd.js.map +1 -1
  142. package/bundles/material-slider-testing.umd.js +11 -0
  143. package/bundles/material-slider-testing.umd.js.map +1 -1
  144. package/bundles/material-slider-testing.umd.min.js +2 -2
  145. package/bundles/material-slider-testing.umd.min.js.map +1 -1
  146. package/bundles/material-snack-bar-testing.umd.min.js +1 -1
  147. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  148. package/bundles/material-snack-bar.umd.js +47 -39
  149. package/bundles/material-snack-bar.umd.js.map +1 -1
  150. package/bundles/material-snack-bar.umd.min.js +2 -2
  151. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  152. package/bundles/material-sort-testing.umd.js +10 -10
  153. package/bundles/material-sort-testing.umd.js.map +1 -1
  154. package/bundles/material-sort-testing.umd.min.js +3 -3
  155. package/bundles/material-sort-testing.umd.min.js.map +1 -1
  156. package/bundles/material-sort.umd.js +25 -12
  157. package/bundles/material-sort.umd.js.map +1 -1
  158. package/bundles/material-sort.umd.min.js +5 -5
  159. package/bundles/material-sort.umd.min.js.map +1 -1
  160. package/bundles/material-table-testing.umd.min.js +1 -1
  161. package/bundles/material-table-testing.umd.min.js.map +1 -1
  162. package/bundles/material-table.umd.min.js +2 -2
  163. package/bundles/material-table.umd.min.js.map +1 -1
  164. package/bundles/material-tabs-testing.umd.min.js +1 -1
  165. package/bundles/material-tabs-testing.umd.min.js.map +1 -1
  166. package/bundles/material-tabs.umd.js +23 -4
  167. package/bundles/material-tabs.umd.js.map +1 -1
  168. package/bundles/material-tabs.umd.min.js +5 -12
  169. package/bundles/material-tabs.umd.min.js.map +1 -1
  170. package/bundles/material-toolbar-testing.umd.js +330 -0
  171. package/bundles/material-toolbar-testing.umd.js.map +1 -0
  172. package/bundles/material-toolbar-testing.umd.min.js +44 -0
  173. package/bundles/material-toolbar-testing.umd.min.js.map +1 -0
  174. package/bundles/material-tooltip-testing.umd.min.js +1 -1
  175. package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
  176. package/bundles/material-tooltip.umd.js +14 -1
  177. package/bundles/material-tooltip.umd.js.map +1 -1
  178. package/bundles/material-tooltip.umd.min.js +3 -3
  179. package/bundles/material-tooltip.umd.min.js.map +1 -1
  180. package/bundles/material-tree.umd.js.map +1 -1
  181. package/button/_button-base.scss +1 -1
  182. package/button/_button-theme.scss +8 -8
  183. package/button/index.metadata.json +1 -1
  184. package/button/testing/button-harness.d.ts +2 -0
  185. package/button-toggle/button-toggle.d.ts +10 -3
  186. package/button-toggle/index.metadata.json +1 -1
  187. package/button-toggle/testing/button-toggle-harness.d.ts +2 -0
  188. package/card/testing/card-harness-filters.d.ts +17 -0
  189. package/card/testing/card-harness.d.ts +36 -0
  190. package/card/testing/index.d.ts +8 -0
  191. package/card/testing/package.json +9 -0
  192. package/card/testing/public-api.d.ts +9 -0
  193. package/checkbox/index.metadata.json +1 -1
  194. package/checkbox/testing/checkbox-harness.d.ts +2 -0
  195. package/chips/chip.d.ts +19 -1
  196. package/chips/index.metadata.json +1 -1
  197. package/core/focus-indicators/_focus-indicators.scss +6 -6
  198. package/core/index.metadata.json +1 -1
  199. package/core/option/optgroup.d.ts +7 -0
  200. package/core/ripple/ripple-ref.d.ts +21 -2
  201. package/core/ripple/ripple-renderer.d.ts +1 -19
  202. package/core/ripple/ripple.d.ts +2 -2
  203. package/core/style/_list-common.scss +1 -1
  204. package/datepicker/date-range-input-parts.d.ts +2 -4
  205. package/datepicker/date-range-input.d.ts +4 -4
  206. package/datepicker/date-range-picker.d.ts +10 -3
  207. package/datepicker/datepicker.d.ts +2 -3
  208. package/datepicker/index.metadata.json +1 -1
  209. package/datepicker/public-api.d.ts +1 -1
  210. package/dialog/dialog-container.d.ts +9 -2
  211. package/dialog/dialog-content-directives.d.ts +1 -0
  212. package/dialog/dialog-ref.d.ts +7 -0
  213. package/dialog/index.metadata.json +1 -1
  214. package/esm2015/autocomplete/autocomplete-module.js +18 -22
  215. package/esm2015/autocomplete/autocomplete-origin.js +16 -20
  216. package/esm2015/autocomplete/autocomplete-trigger.js +519 -521
  217. package/esm2015/autocomplete/autocomplete.js +126 -130
  218. package/esm2015/autocomplete/testing/autocomplete-harness.js +99 -97
  219. package/esm2015/badge/badge-module.js +13 -17
  220. package/esm2015/badge/badge.js +184 -188
  221. package/esm2015/badge/testing/badge-harness.js +74 -78
  222. package/esm2015/bottom-sheet/bottom-sheet-container.js +161 -165
  223. package/esm2015/bottom-sheet/bottom-sheet-module.js +15 -19
  224. package/esm2015/bottom-sheet/bottom-sheet.js +124 -128
  225. package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +29 -33
  226. package/esm2015/button/button-module.js +20 -24
  227. package/esm2015/button/button.js +111 -114
  228. package/esm2015/button/testing/button-harness.js +60 -58
  229. package/esm2015/button-toggle/button-toggle-module.js +10 -14
  230. package/esm2015/button-toggle/button-toggle.js +368 -368
  231. package/esm2015/button-toggle/testing/button-toggle-group-harness.js +42 -46
  232. package/esm2015/button-toggle/testing/button-toggle-harness.js +113 -111
  233. package/esm2015/card/card-module.js +30 -34
  234. package/esm2015/card/card.js +147 -203
  235. package/esm2015/card/testing/card-harness-filters.js +8 -0
  236. package/esm2015/card/testing/card-harness.js +52 -0
  237. package/esm2015/card/testing/index.js +9 -0
  238. package/esm2015/card/testing/public-api.js +10 -0
  239. package/esm2015/card/testing/testing.externs.js +0 -0
  240. package/esm2015/checkbox/checkbox-module.js +21 -29
  241. package/esm2015/checkbox/checkbox-required-validator.js +9 -13
  242. package/esm2015/checkbox/checkbox.js +315 -319
  243. package/esm2015/checkbox/testing/checkbox-harness.js +150 -148
  244. package/esm2015/chips/chip-input.js +119 -123
  245. package/esm2015/chips/chip-list.js +572 -576
  246. package/esm2015/chips/chip.js +333 -328
  247. package/esm2015/chips/chips-module.js +16 -20
  248. package/esm2015/core/animation/animation.js +12 -20
  249. package/esm2015/core/common-behaviors/common-module.js +91 -95
  250. package/esm2015/core/datetime/index.js +19 -27
  251. package/esm2015/core/datetime/native-date-adapter.js +202 -206
  252. package/esm2015/core/error/error-options.js +16 -24
  253. package/esm2015/core/line/line.js +18 -26
  254. package/esm2015/core/option/index.js +10 -14
  255. package/esm2015/core/option/optgroup.js +36 -33
  256. package/esm2015/core/option/option.js +181 -185
  257. package/esm2015/core/ripple/index.js +10 -14
  258. package/esm2015/core/ripple/ripple-ref.js +1 -1
  259. package/esm2015/core/ripple/ripple-renderer.js +1 -1
  260. package/esm2015/core/ripple/ripple.js +102 -106
  261. package/esm2015/core/selection/index.js +9 -13
  262. package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +32 -36
  263. package/esm2015/core/testing/optgroup-harness.js +39 -43
  264. package/esm2015/core/testing/option-harness.js +51 -55
  265. package/esm2015/core/version.js +1 -1
  266. package/esm2015/datepicker/calendar-body.js +214 -218
  267. package/esm2015/datepicker/calendar.js +295 -303
  268. package/esm2015/datepicker/date-range-input-parts.js +214 -229
  269. package/esm2015/datepicker/date-range-input.js +244 -242
  270. package/esm2015/datepicker/date-range-picker.js +19 -23
  271. package/esm2015/datepicker/date-range-selection-strategy.js +31 -35
  272. package/esm2015/datepicker/date-selection-model.js +110 -122
  273. package/esm2015/datepicker/datepicker-base.js +418 -426
  274. package/esm2015/datepicker/datepicker-input-base.js +227 -224
  275. package/esm2015/datepicker/datepicker-input.js +111 -115
  276. package/esm2015/datepicker/datepicker-intl.js +37 -41
  277. package/esm2015/datepicker/datepicker-module.js +62 -66
  278. package/esm2015/datepicker/datepicker-toggle.js +81 -89
  279. package/esm2015/datepicker/datepicker.js +13 -17
  280. package/esm2015/datepicker/month-view.js +283 -287
  281. package/esm2015/datepicker/multi-year-view.js +198 -202
  282. package/esm2015/datepicker/public-api.js +2 -2
  283. package/esm2015/datepicker/year-view.js +220 -224
  284. package/esm2015/dialog/dialog-container.js +175 -164
  285. package/esm2015/dialog/dialog-content-directives.js +105 -114
  286. package/esm2015/dialog/dialog-module.js +32 -36
  287. package/esm2015/dialog/dialog-ref.js +17 -3
  288. package/esm2015/dialog/dialog.js +236 -240
  289. package/esm2015/dialog/testing/dialog-harness.js +58 -62
  290. package/esm2015/divider/divider-module.js +10 -14
  291. package/esm2015/divider/divider.js +33 -37
  292. package/esm2015/divider/testing/divider-harness.js +16 -20
  293. package/esm2015/expansion/accordion.js +73 -77
  294. package/esm2015/expansion/expansion-module.js +26 -30
  295. package/esm2015/expansion/expansion-panel-content.js +13 -17
  296. package/esm2015/expansion/expansion-panel-header.js +168 -180
  297. package/esm2015/expansion/expansion-panel.js +144 -152
  298. package/esm2015/expansion/testing/accordion-harness.js +24 -28
  299. package/esm2015/expansion/testing/expansion-harness.js +136 -134
  300. package/esm2015/form-field/error.js +26 -23
  301. package/esm2015/form-field/form-field-control.js +6 -10
  302. package/esm2015/form-field/form-field-module.js +31 -35
  303. package/esm2015/form-field/form-field.js +407 -409
  304. package/esm2015/form-field/hint.js +35 -29
  305. package/esm2015/form-field/label.js +8 -12
  306. package/esm2015/form-field/placeholder.js +8 -12
  307. package/esm2015/form-field/prefix.js +16 -13
  308. package/esm2015/form-field/suffix.js +16 -13
  309. package/esm2015/form-field/testing/form-field-harness.js +220 -206
  310. package/esm2015/grid-list/grid-list-module.js +26 -30
  311. package/esm2015/grid-list/grid-list.js +108 -112
  312. package/esm2015/grid-list/grid-tile.js +91 -111
  313. package/esm2015/grid-list/testing/grid-list-harness.js +62 -66
  314. package/esm2015/grid-list/testing/grid-tile-harness.js +69 -73
  315. package/esm2015/grid-list/tile-styler.js +1 -1
  316. package/esm2015/icon/icon-module.js +10 -14
  317. package/esm2015/icon/icon-registry.js +406 -410
  318. package/esm2015/icon/icon.js +228 -232
  319. package/esm2015/icon/testing/fake-icon-registry.js +66 -74
  320. package/esm2015/input/autosize.js +30 -34
  321. package/esm2015/input/input-module.js +21 -25
  322. package/esm2015/input/input.js +305 -284
  323. package/esm2015/input/testing/input-harness.js +129 -123
  324. package/esm2015/list/list-module.js +32 -36
  325. package/esm2015/list/list.js +165 -189
  326. package/esm2015/list/selection-list.js +503 -511
  327. package/esm2015/list/testing/action-list-harness.js +55 -57
  328. package/esm2015/list/testing/list-harness.js +31 -39
  329. package/esm2015/list/testing/list-item-harness-base.js +13 -17
  330. package/esm2015/list/testing/nav-list-harness.js +62 -64
  331. package/esm2015/list/testing/selection-list-harness.js +136 -138
  332. package/esm2015/menu/menu-content.js +74 -71
  333. package/esm2015/menu/menu-item.js +119 -123
  334. package/esm2015/menu/menu-module.js +29 -37
  335. package/esm2015/menu/menu-panel.js +1 -1
  336. package/esm2015/menu/menu-trigger.js +402 -405
  337. package/esm2015/menu/menu.js +329 -339
  338. package/esm2015/menu/testing/menu-harness.js +193 -189
  339. package/esm2015/paginator/paginator-intl.js +36 -40
  340. package/esm2015/paginator/paginator-module.js +16 -20
  341. package/esm2015/paginator/paginator.js +205 -209
  342. package/esm2015/paginator/testing/paginator-harness.js +91 -95
  343. package/esm2015/progress-bar/progress-bar-module.js +10 -14
  344. package/esm2015/progress-bar/progress-bar.js +114 -118
  345. package/esm2015/progress-bar/testing/progress-bar-harness.js +27 -31
  346. package/esm2015/progress-spinner/progress-spinner-module.js +17 -21
  347. package/esm2015/progress-spinner/progress-spinner.js +181 -189
  348. package/esm2015/progress-spinner/testing/progress-spinner-harness.js +28 -32
  349. package/esm2015/radio/radio-module.js +10 -14
  350. package/esm2015/radio/radio.js +437 -444
  351. package/esm2015/radio/testing/radio-harness.js +241 -243
  352. package/esm2015/select/select-module.js +23 -27
  353. package/esm2015/select/select.js +917 -918
  354. package/esm2015/select/testing/select-harness.js +138 -136
  355. package/esm2015/sidenav/drawer.js +632 -620
  356. package/esm2015/sidenav/sidenav-module.js +31 -35
  357. package/esm2015/sidenav/sidenav.js +104 -116
  358. package/esm2015/sidenav/testing/drawer-harness.js +40 -44
  359. package/esm2015/sidenav/testing/sidenav-harness.js +20 -24
  360. package/esm2015/slide-toggle/slide-toggle-module.js +27 -35
  361. package/esm2015/slide-toggle/slide-toggle-required-validator.js +9 -13
  362. package/esm2015/slide-toggle/slide-toggle.js +184 -188
  363. package/esm2015/slide-toggle/testing/slide-toggle-harness.js +123 -121
  364. package/esm2015/slider/slider-module.js +10 -14
  365. package/esm2015/slider/slider.js +640 -644
  366. package/esm2015/slider/testing/slider-harness.js +129 -127
  367. package/esm2015/snack-bar/simple-snack-bar.js +32 -36
  368. package/esm2015/snack-bar/snack-bar-container.js +144 -148
  369. package/esm2015/snack-bar/snack-bar-module.js +17 -21
  370. package/esm2015/snack-bar/snack-bar-ref.js +1 -1
  371. package/esm2015/snack-bar/snack-bar.js +208 -205
  372. package/esm2015/snack-bar/testing/snack-bar-harness.js +112 -116
  373. package/esm2015/sort/sort-header-intl.js +21 -21
  374. package/esm2015/sort/sort-header.js +200 -194
  375. package/esm2015/sort/sort-module.js +11 -15
  376. package/esm2015/sort/sort.js +92 -96
  377. package/esm2015/sort/testing/sort-harness.js +28 -32
  378. package/esm2015/sort/testing/sort-header-harness.js +66 -67
  379. package/esm2015/stepper/step-header.js +78 -82
  380. package/esm2015/stepper/step-label.js +8 -12
  381. package/esm2015/stepper/stepper-button.js +23 -31
  382. package/esm2015/stepper/stepper-icon.js +16 -20
  383. package/esm2015/stepper/stepper-intl.js +15 -19
  384. package/esm2015/stepper/stepper-module.js +40 -44
  385. package/esm2015/stepper/stepper.js +139 -155
  386. package/esm2015/table/cell.js +94 -122
  387. package/esm2015/table/row.js +90 -118
  388. package/esm2015/table/table-module.js +13 -17
  389. package/esm2015/table/table.js +26 -30
  390. package/esm2015/table/testing/cell-harness.js +56 -68
  391. package/esm2015/table/testing/row-harness.js +90 -102
  392. package/esm2015/table/testing/table-harness.js +65 -69
  393. package/esm2015/table/text-column.js +17 -21
  394. package/esm2015/tabs/index.js +4 -2
  395. package/esm2015/tabs/ink-bar.js +55 -59
  396. package/esm2015/tabs/paginated-tab-header.js +415 -419
  397. package/esm2015/tabs/tab-body.js +179 -191
  398. package/esm2015/tabs/tab-content.js +21 -16
  399. package/esm2015/tabs/tab-group.js +263 -271
  400. package/esm2015/tabs/tab-header.js +69 -77
  401. package/esm2015/tabs/tab-label-wrapper.js +29 -33
  402. package/esm2015/tabs/tab-label.js +16 -13
  403. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +199 -215
  404. package/esm2015/tabs/tab.js +80 -83
  405. package/esm2015/tabs/tabs-module.js +38 -42
  406. package/esm2015/tabs/testing/tab-group-harness.js +52 -56
  407. package/esm2015/tabs/testing/tab-harness.js +78 -82
  408. package/esm2015/toolbar/testing/index.js +9 -0
  409. package/esm2015/toolbar/testing/public-api.js +10 -0
  410. package/esm2015/toolbar/testing/testing.externs.js +0 -0
  411. package/esm2015/toolbar/testing/toolbar-harness-filters.js +8 -0
  412. package/esm2015/toolbar/testing/toolbar-harness.js +47 -0
  413. package/esm2015/toolbar/toolbar-module.js +10 -14
  414. package/esm2015/toolbar/toolbar.js +61 -69
  415. package/esm2015/tooltip/testing/tooltip-harness.js +43 -47
  416. package/esm2015/tooltip/tooltip-module.js +17 -21
  417. package/esm2015/tooltip/tooltip.js +502 -497
  418. package/esm2015/tree/data-source/flat-data-source.js +1 -1
  419. package/esm2015/tree/node.js +99 -111
  420. package/esm2015/tree/outlet.js +19 -23
  421. package/esm2015/tree/padding.js +13 -17
  422. package/esm2015/tree/toggle.js +15 -19
  423. package/esm2015/tree/tree-module.js +10 -14
  424. package/esm2015/tree/tree.js +23 -27
  425. package/expansion/testing/expansion-harness.d.ts +2 -0
  426. package/fesm2015/autocomplete/testing.js +98 -95
  427. package/fesm2015/autocomplete/testing.js.map +1 -1
  428. package/fesm2015/autocomplete.js +677 -687
  429. package/fesm2015/autocomplete.js.map +1 -1
  430. package/fesm2015/badge/testing.js +73 -76
  431. package/fesm2015/badge/testing.js.map +1 -1
  432. package/fesm2015/badge.js +195 -201
  433. package/fesm2015/badge.js.map +1 -1
  434. package/fesm2015/bottom-sheet/testing.js +28 -31
  435. package/fesm2015/bottom-sheet/testing.js.map +1 -1
  436. package/fesm2015/bottom-sheet.js +297 -306
  437. package/fesm2015/bottom-sheet.js.map +1 -1
  438. package/fesm2015/button/testing.js +59 -56
  439. package/fesm2015/button/testing.js.map +1 -1
  440. package/fesm2015/button-toggle/testing.js +155 -155
  441. package/fesm2015/button-toggle/testing.js.map +1 -1
  442. package/fesm2015/button-toggle.js +377 -378
  443. package/fesm2015/button-toggle.js.map +1 -1
  444. package/fesm2015/button.js +129 -133
  445. package/fesm2015/button.js.map +1 -1
  446. package/fesm2015/card/testing.js +79 -0
  447. package/fesm2015/card/testing.js.map +1 -0
  448. package/fesm2015/card.js +175 -220
  449. package/fesm2015/card.js.map +1 -1
  450. package/fesm2015/checkbox/testing.js +149 -146
  451. package/fesm2015/checkbox/testing.js.map +1 -1
  452. package/fesm2015/checkbox.js +342 -354
  453. package/fesm2015/checkbox.js.map +1 -1
  454. package/fesm2015/chips.js +1039 -1039
  455. package/fesm2015/chips.js.map +1 -1
  456. package/fesm2015/core/testing.js +88 -94
  457. package/fesm2015/core/testing.js.map +1 -1
  458. package/fesm2015/core.js +729 -773
  459. package/fesm2015/core.js.map +1 -1
  460. package/fesm2015/datepicker.js +2821 -2884
  461. package/fesm2015/datepicker.js.map +1 -1
  462. package/fesm2015/dialog/testing.js +57 -60
  463. package/fesm2015/dialog/testing.js.map +1 -1
  464. package/fesm2015/dialog.js +564 -549
  465. package/fesm2015/dialog.js.map +1 -1
  466. package/fesm2015/divider/testing.js +15 -18
  467. package/fesm2015/divider/testing.js.map +1 -1
  468. package/fesm2015/divider.js +41 -47
  469. package/fesm2015/divider.js.map +1 -1
  470. package/fesm2015/expansion/testing.js +159 -159
  471. package/fesm2015/expansion/testing.js.map +1 -1
  472. package/fesm2015/expansion.js +422 -446
  473. package/fesm2015/expansion.js.map +1 -1
  474. package/fesm2015/form-field/testing.js +219 -204
  475. package/fesm2015/form-field/testing.js.map +1 -1
  476. package/fesm2015/form-field.js +538 -532
  477. package/fesm2015/form-field.js.map +1 -1
  478. package/fesm2015/grid-list/testing.js +129 -135
  479. package/fesm2015/grid-list/testing.js.map +1 -1
  480. package/fesm2015/grid-list.js +221 -242
  481. package/fesm2015/grid-list.js.map +1 -1
  482. package/fesm2015/icon/testing.js +65 -71
  483. package/fesm2015/icon/testing.js.map +1 -1
  484. package/fesm2015/icon.js +660 -669
  485. package/fesm2015/icon.js.map +1 -1
  486. package/fesm2015/input/testing.js +128 -121
  487. package/fesm2015/input/testing.js.map +1 -1
  488. package/fesm2015/input.js +353 -337
  489. package/fesm2015/input.js.map +1 -1
  490. package/fesm2015/list/testing.js +298 -307
  491. package/fesm2015/list/testing.js.map +1 -1
  492. package/fesm2015/list.js +698 -725
  493. package/fesm2015/list.js.map +1 -1
  494. package/fesm2015/menu/testing.js +192 -186
  495. package/fesm2015/menu/testing.js.map +1 -1
  496. package/fesm2015/menu.js +948 -962
  497. package/fesm2015/menu.js.map +1 -1
  498. package/fesm2015/paginator/testing.js +90 -93
  499. package/fesm2015/paginator/testing.js.map +1 -1
  500. package/fesm2015/paginator.js +247 -256
  501. package/fesm2015/paginator.js.map +1 -1
  502. package/fesm2015/progress-bar/testing.js +26 -29
  503. package/fesm2015/progress-bar/testing.js.map +1 -1
  504. package/fesm2015/progress-bar.js +122 -128
  505. package/fesm2015/progress-bar.js.map +1 -1
  506. package/fesm2015/progress-spinner/testing.js +27 -30
  507. package/fesm2015/progress-spinner/testing.js.map +1 -1
  508. package/fesm2015/progress-spinner.js +196 -205
  509. package/fesm2015/progress-spinner.js.map +1 -1
  510. package/fesm2015/radio/testing.js +240 -240
  511. package/fesm2015/radio/testing.js.map +1 -1
  512. package/fesm2015/radio.js +447 -453
  513. package/fesm2015/radio.js.map +1 -1
  514. package/fesm2015/select/testing.js +137 -134
  515. package/fesm2015/select/testing.js.map +1 -1
  516. package/fesm2015/select.js +939 -941
  517. package/fesm2015/select.js.map +1 -1
  518. package/fesm2015/sidenav/testing.js +58 -64
  519. package/fesm2015/sidenav/testing.js.map +1 -1
  520. package/fesm2015/sidenav.js +765 -762
  521. package/fesm2015/sidenav.js.map +1 -1
  522. package/fesm2015/slide-toggle/testing.js +122 -119
  523. package/fesm2015/slide-toggle/testing.js.map +1 -1
  524. package/fesm2015/slide-toggle.js +217 -229
  525. package/fesm2015/slide-toggle.js.map +1 -1
  526. package/fesm2015/slider/testing.js +128 -125
  527. package/fesm2015/slider/testing.js.map +1 -1
  528. package/fesm2015/slider.js +648 -654
  529. package/fesm2015/slider.js.map +1 -1
  530. package/fesm2015/snack-bar/testing.js +111 -114
  531. package/fesm2015/snack-bar/testing.js.map +1 -1
  532. package/fesm2015/snack-bar.js +426 -431
  533. package/fesm2015/snack-bar.js.map +1 -1
  534. package/fesm2015/sort/testing.js +92 -95
  535. package/fesm2015/sort/testing.js.map +1 -1
  536. package/fesm2015/sort.js +320 -318
  537. package/fesm2015/sort.js.map +1 -1
  538. package/fesm2015/stepper.js +312 -345
  539. package/fesm2015/stepper.js.map +1 -1
  540. package/fesm2015/table/testing.js +208 -229
  541. package/fesm2015/table/testing.js.map +1 -1
  542. package/fesm2015/table.js +235 -286
  543. package/fesm2015/table.js.map +1 -1
  544. package/fesm2015/tabs/testing.js +128 -134
  545. package/fesm2015/tabs/testing.js.map +1 -1
  546. package/fesm2015/tabs.js +1362 -1399
  547. package/fesm2015/tabs.js.map +1 -1
  548. package/fesm2015/toolbar/testing.js +74 -0
  549. package/fesm2015/toolbar/testing.js.map +1 -0
  550. package/fesm2015/toolbar.js +69 -78
  551. package/fesm2015/toolbar.js.map +1 -1
  552. package/fesm2015/tooltip/testing.js +42 -45
  553. package/fesm2015/tooltip/testing.js.map +1 -1
  554. package/fesm2015/tooltip.js +517 -513
  555. package/fesm2015/tooltip.js.map +1 -1
  556. package/fesm2015/tree.js +173 -197
  557. package/fesm2015/tree.js.map +1 -1
  558. package/form-field/error.d.ts +7 -0
  559. package/form-field/hint.d.ts +10 -0
  560. package/form-field/index.metadata.json +1 -1
  561. package/form-field/prefix.d.ts +7 -0
  562. package/form-field/suffix.d.ts +7 -0
  563. package/form-field/testing/form-field-harness.d.ts +8 -0
  564. package/grid-list/grid-list.d.ts +2 -1
  565. package/grid-list/index.metadata.json +1 -1
  566. package/grid-list/tile-styler.d.ts +10 -5
  567. package/input/_input-theme.scss +2 -2
  568. package/input/index.metadata.json +1 -1
  569. package/input/input.d.ts +6 -2
  570. package/input/testing/input-harness.d.ts +2 -0
  571. package/list/index.metadata.json +1 -1
  572. package/list/testing/action-list-harness.d.ts +2 -0
  573. package/list/testing/nav-list-harness.d.ts +2 -0
  574. package/list/testing/selection-list-harness.d.ts +2 -0
  575. package/menu/index.metadata.json +1 -1
  576. package/menu/menu-content.d.ts +7 -1
  577. package/menu/menu-panel.d.ts +1 -0
  578. package/menu/menu.d.ts +4 -0
  579. package/menu/testing/menu-harness.d.ts +4 -0
  580. package/package.json +6 -6
  581. package/prebuilt-themes/deeppurple-amber.css +1 -1
  582. package/prebuilt-themes/indigo-pink.css +1 -1
  583. package/prebuilt-themes/pink-bluegrey.css +1 -1
  584. package/prebuilt-themes/purple-green.css +1 -1
  585. package/progress-spinner/index.metadata.json +1 -1
  586. package/radio/index.metadata.json +1 -1
  587. package/radio/radio.d.ts +6 -0
  588. package/radio/testing/radio-harness.d.ts +2 -0
  589. package/schematics/migration.json +5 -0
  590. package/schematics/ng-add/index.js +2 -2
  591. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +3 -3
  592. package/schematics/ng-generate/navigation/schema.json +5 -0
  593. package/schematics/ng-update/data/index.js +1 -1
  594. package/schematics/ng-update/index.d.ts +2 -0
  595. package/schematics/ng-update/index.js +7 -2
  596. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +639 -639
  597. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
  598. package/select/index.metadata.json +1 -1
  599. package/select/select.d.ts +6 -0
  600. package/select/testing/select-harness.d.ts +2 -0
  601. package/sidenav/drawer.d.ts +15 -3
  602. package/sidenav/index.metadata.json +1 -1
  603. package/slide-toggle/index.metadata.json +1 -1
  604. package/slide-toggle/testing/slide-toggle-harness.d.ts +2 -0
  605. package/slider/testing/slider-harness.d.ts +2 -0
  606. package/snack-bar/index.metadata.json +1 -1
  607. package/snack-bar/simple-snack-bar.d.ts +13 -1
  608. package/snack-bar/snack-bar-container.d.ts +16 -3
  609. package/snack-bar/snack-bar-ref.d.ts +3 -3
  610. package/snack-bar/snack-bar.d.ts +10 -3
  611. package/sort/index.metadata.json +1 -1
  612. package/sort/sort-header-intl.d.ts +5 -1
  613. package/sort/sort-header.d.ts +3 -1
  614. package/sort/testing/sort-header-harness.d.ts +6 -2
  615. package/tabs/index.d.ts +3 -1
  616. package/tabs/index.metadata.json +1 -1
  617. package/tabs/tab-content.d.ts +7 -1
  618. package/tabs/tab-label.d.ts +7 -0
  619. package/toolbar/testing/index.d.ts +8 -0
  620. package/toolbar/testing/package.json +9 -0
  621. package/toolbar/testing/public-api.d.ts +9 -0
  622. package/toolbar/testing/toolbar-harness-filters.d.ts +13 -0
  623. package/toolbar/testing/toolbar-harness.d.ts +31 -0
  624. package/tooltip/index.metadata.json +1 -1
  625. package/tooltip/tooltip.d.ts +1 -0
  626. package/tree/data-source/flat-data-source.d.ts +4 -4
  627. package/tree/index.metadata.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { ObserversModule } from '@angular/cdk/observers';
2
2
  import { CommonModule } from '@angular/common';
3
- import { Directive, Input, InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, Optional, Inject, NgZone, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';
3
+ import { InjectionToken, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, Optional, Inject, NgZone, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';
4
4
  import { mixinColor, MAT_LABEL_GLOBAL_OPTIONS, MatCommonModule } from '@angular/material/core';
5
5
  import { Directionality } from '@angular/cdk/bidi';
6
6
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
@@ -18,28 +18,32 @@ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
18
18
  * found in the LICENSE file at https://angular.io/license
19
19
  */
20
20
  let nextUniqueId = 0;
21
+ /**
22
+ * Injection token that can be used to reference instances of `MatError`. It serves as
23
+ * alternative token to the actual `MatError` class which could cause unnecessary
24
+ * retention of the class and its directive metadata.
25
+ */
26
+ const MAT_ERROR = new InjectionToken('MatError');
21
27
  /** Single error message to be shown underneath the form field. */
22
- let MatError = /** @class */ (() => {
23
- class MatError {
24
- constructor() {
25
- this.id = `mat-error-${nextUniqueId++}`;
26
- }
28
+ class MatError {
29
+ constructor() {
30
+ this.id = `mat-error-${nextUniqueId++}`;
27
31
  }
28
- MatError.decorators = [
29
- { type: Directive, args: [{
30
- selector: 'mat-error',
31
- host: {
32
- 'class': 'mat-error',
33
- 'role': 'alert',
34
- '[attr.id]': 'id',
35
- }
36
- },] }
37
- ];
38
- MatError.propDecorators = {
39
- id: [{ type: Input }]
40
- };
41
- return MatError;
42
- })();
32
+ }
33
+ MatError.decorators = [
34
+ { type: Directive, args: [{
35
+ selector: 'mat-error',
36
+ host: {
37
+ 'class': 'mat-error',
38
+ 'role': 'alert',
39
+ '[attr.id]': 'id',
40
+ },
41
+ providers: [{ provide: MAT_ERROR, useExisting: MatError }],
42
+ },] }
43
+ ];
44
+ MatError.propDecorators = {
45
+ id: [{ type: Input }]
46
+ };
43
47
 
44
48
  /**
45
49
  * @license
@@ -72,14 +76,11 @@ const matFormFieldAnimations = {
72
76
  * found in the LICENSE file at https://angular.io/license
73
77
  */
74
78
  /** An interface which allows a control to work inside of a `MatFormField`. */
75
- let MatFormFieldControl = /** @class */ (() => {
76
- class MatFormFieldControl {
77
- }
78
- MatFormFieldControl.decorators = [
79
- { type: Directive }
80
- ];
81
- return MatFormFieldControl;
82
- })();
79
+ class MatFormFieldControl {
80
+ }
81
+ MatFormFieldControl.decorators = [
82
+ { type: Directive }
83
+ ];
83
84
 
84
85
  /**
85
86
  * @license
@@ -109,34 +110,41 @@ function getMatFormFieldMissingControlError() {
109
110
  * found in the LICENSE file at https://angular.io/license
110
111
  */
111
112
  let nextUniqueId$1 = 0;
113
+ /**
114
+ * Injection token that can be used to reference instances of `MatHint`. It serves as
115
+ * alternative token to the actual `MatHint` class which could cause unnecessary
116
+ * retention of the class and its directive metadata.
117
+ *
118
+ * *Note*: This is not part of the public API as the MDC-based form-field will not
119
+ * need a lightweight token for `MatHint` and we want to reduce breaking changes.
120
+ */
121
+ const _MAT_HINT = new InjectionToken('MatHint');
112
122
  /** Hint text to be shown underneath the form field control. */
113
- let MatHint = /** @class */ (() => {
114
- class MatHint {
115
- constructor() {
116
- /** Whether to align the hint label at the start or end of the line. */
117
- this.align = 'start';
118
- /** Unique ID for the hint. Used for the aria-describedby on the form field control. */
119
- this.id = `mat-hint-${nextUniqueId$1++}`;
120
- }
123
+ class MatHint {
124
+ constructor() {
125
+ /** Whether to align the hint label at the start or end of the line. */
126
+ this.align = 'start';
127
+ /** Unique ID for the hint. Used for the aria-describedby on the form field control. */
128
+ this.id = `mat-hint-${nextUniqueId$1++}`;
121
129
  }
122
- MatHint.decorators = [
123
- { type: Directive, args: [{
124
- selector: 'mat-hint',
125
- host: {
126
- 'class': 'mat-hint',
127
- '[class.mat-right]': 'align == "end"',
128
- '[attr.id]': 'id',
129
- // Remove align attribute to prevent it from interfering with layout.
130
- '[attr.align]': 'null',
131
- }
132
- },] }
133
- ];
134
- MatHint.propDecorators = {
135
- align: [{ type: Input }],
136
- id: [{ type: Input }]
137
- };
138
- return MatHint;
139
- })();
130
+ }
131
+ MatHint.decorators = [
132
+ { type: Directive, args: [{
133
+ selector: 'mat-hint',
134
+ host: {
135
+ 'class': 'mat-hint',
136
+ '[class.mat-right]': 'align == "end"',
137
+ '[attr.id]': 'id',
138
+ // Remove align attribute to prevent it from interfering with layout.
139
+ '[attr.align]': 'null',
140
+ },
141
+ providers: [{ provide: _MAT_HINT, useExisting: MatHint }],
142
+ },] }
143
+ ];
144
+ MatHint.propDecorators = {
145
+ align: [{ type: Input }],
146
+ id: [{ type: Input }]
147
+ };
140
148
 
141
149
  /**
142
150
  * @license
@@ -146,16 +154,13 @@ let MatHint = /** @class */ (() => {
146
154
  * found in the LICENSE file at https://angular.io/license
147
155
  */
148
156
  /** The floating label for a `mat-form-field`. */
149
- let MatLabel = /** @class */ (() => {
150
- class MatLabel {
151
- }
152
- MatLabel.decorators = [
153
- { type: Directive, args: [{
154
- selector: 'mat-label'
155
- },] }
156
- ];
157
- return MatLabel;
158
- })();
157
+ class MatLabel {
158
+ }
159
+ MatLabel.decorators = [
160
+ { type: Directive, args: [{
161
+ selector: 'mat-label'
162
+ },] }
163
+ ];
159
164
 
160
165
  /**
161
166
  * @license
@@ -170,16 +175,13 @@ let MatLabel = /** @class */ (() => {
170
175
  * placeholder.
171
176
  * @breaking-change 8.0.0
172
177
  */
173
- let MatPlaceholder = /** @class */ (() => {
174
- class MatPlaceholder {
175
- }
176
- MatPlaceholder.decorators = [
177
- { type: Directive, args: [{
178
- selector: 'mat-placeholder'
179
- },] }
180
- ];
181
- return MatPlaceholder;
182
- })();
178
+ class MatPlaceholder {
179
+ }
180
+ MatPlaceholder.decorators = [
181
+ { type: Directive, args: [{
182
+ selector: 'mat-placeholder'
183
+ },] }
184
+ ];
183
185
 
184
186
  /**
185
187
  * @license
@@ -188,17 +190,21 @@ let MatPlaceholder = /** @class */ (() => {
188
190
  * Use of this source code is governed by an MIT-style license that can be
189
191
  * found in the LICENSE file at https://angular.io/license
190
192
  */
193
+ /**
194
+ * Injection token that can be used to reference instances of `MatPrefix`. It serves as
195
+ * alternative token to the actual `MatPrefix` class which could cause unnecessary
196
+ * retention of the class and its directive metadata.
197
+ */
198
+ const MAT_PREFIX = new InjectionToken('MatPrefix');
191
199
  /** Prefix to be placed in front of the form field. */
192
- let MatPrefix = /** @class */ (() => {
193
- class MatPrefix {
194
- }
195
- MatPrefix.decorators = [
196
- { type: Directive, args: [{
197
- selector: '[matPrefix]',
198
- },] }
199
- ];
200
- return MatPrefix;
201
- })();
200
+ class MatPrefix {
201
+ }
202
+ MatPrefix.decorators = [
203
+ { type: Directive, args: [{
204
+ selector: '[matPrefix]',
205
+ providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }],
206
+ },] }
207
+ ];
202
208
 
203
209
  /**
204
210
  * @license
@@ -207,17 +213,21 @@ let MatPrefix = /** @class */ (() => {
207
213
  * Use of this source code is governed by an MIT-style license that can be
208
214
  * found in the LICENSE file at https://angular.io/license
209
215
  */
216
+ /**
217
+ * Injection token that can be used to reference instances of `MatSuffix`. It serves as
218
+ * alternative token to the actual `MatSuffix` class which could cause unnecessary
219
+ * retention of the class and its directive metadata.
220
+ */
221
+ const MAT_SUFFIX = new InjectionToken('MatSuffix');
210
222
  /** Suffix to be placed at the end of the form field. */
211
- let MatSuffix = /** @class */ (() => {
212
- class MatSuffix {
213
- }
214
- MatSuffix.decorators = [
215
- { type: Directive, args: [{
216
- selector: '[matSuffix]',
217
- },] }
218
- ];
219
- return MatSuffix;
220
- })();
223
+ class MatSuffix {
224
+ }
225
+ MatSuffix.decorators = [
226
+ { type: Directive, args: [{
227
+ selector: '[matSuffix]',
228
+ providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }],
229
+ },] }
230
+ ];
221
231
 
222
232
  /**
223
233
  * @license
@@ -255,437 +265,436 @@ const MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken('MAT_FORM_FIELD_DEFAUL
255
265
  */
256
266
  const MAT_FORM_FIELD = new InjectionToken('MatFormField');
257
267
  /** Container for form controls that applies Material Design styling and behavior. */
258
- let MatFormField = /** @class */ (() => {
259
- class MatFormField extends _MatFormFieldMixinBase {
260
- constructor(_elementRef, _changeDetectorRef, labelOptions, _dir, _defaults, _platform, _ngZone, _animationMode) {
261
- super(_elementRef);
262
- this._elementRef = _elementRef;
263
- this._changeDetectorRef = _changeDetectorRef;
264
- this._dir = _dir;
265
- this._defaults = _defaults;
266
- this._platform = _platform;
267
- this._ngZone = _ngZone;
268
- /**
269
- * Whether the outline gap needs to be calculated
270
- * immediately on the next change detection run.
271
- */
272
- this._outlineGapCalculationNeededImmediately = false;
273
- /** Whether the outline gap needs to be calculated next time the zone has stabilized. */
274
- this._outlineGapCalculationNeededOnStable = false;
275
- this._destroyed = new Subject();
276
- /** Override for the logic that disables the label animation in certain cases. */
277
- this._showAlwaysAnimate = false;
278
- /** State of the mat-hint and mat-error animations. */
279
- this._subscriptAnimationState = '';
280
- this._hintLabel = '';
281
- // Unique id for the hint label.
282
- this._hintLabelId = `mat-hint-${nextUniqueId$2++}`;
283
- // Unique id for the internal form field label.
284
- this._labelId = `mat-form-field-label-${nextUniqueId$2++}`;
285
- this._labelOptions = labelOptions ? labelOptions : {};
286
- this.floatLabel = this._getDefaultFloatLabelState();
287
- this._animationsEnabled = _animationMode !== 'NoopAnimations';
288
- // Set the default through here so we invoke the setter on the first run.
289
- this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';
290
- this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?
291
- _defaults.hideRequiredMarker : false;
292
- }
293
- /** The form-field appearance style. */
294
- get appearance() { return this._appearance; }
295
- set appearance(value) {
296
- const oldValue = this._appearance;
297
- this._appearance = value || (this._defaults && this._defaults.appearance) || 'legacy';
298
- if (this._appearance === 'outline' && oldValue !== value) {
299
- this._outlineGapCalculationNeededOnStable = true;
300
- }
301
- }
302
- /** Whether the required marker should be hidden. */
303
- get hideRequiredMarker() { return this._hideRequiredMarker; }
304
- set hideRequiredMarker(value) {
305
- this._hideRequiredMarker = coerceBooleanProperty(value);
306
- }
307
- /** Whether the floating label should always float or not. */
308
- get _shouldAlwaysFloat() {
309
- return this.floatLabel === 'always' && !this._showAlwaysAnimate;
310
- }
311
- /** Whether the label can float or not. */
312
- get _canLabelFloat() { return this.floatLabel !== 'never'; }
313
- /** Text for the form field hint. */
314
- get hintLabel() { return this._hintLabel; }
315
- set hintLabel(value) {
316
- this._hintLabel = value;
317
- this._processHints();
318
- }
268
+ class MatFormField extends _MatFormFieldMixinBase {
269
+ constructor(_elementRef, _changeDetectorRef, labelOptions, _dir, _defaults, _platform, _ngZone, _animationMode) {
270
+ super(_elementRef);
271
+ this._elementRef = _elementRef;
272
+ this._changeDetectorRef = _changeDetectorRef;
273
+ this._dir = _dir;
274
+ this._defaults = _defaults;
275
+ this._platform = _platform;
276
+ this._ngZone = _ngZone;
319
277
  /**
320
- * Whether the label should always float, never float or float as the user types.
321
- *
322
- * Note: only the legacy appearance supports the `never` option. `never` was originally added as a
323
- * way to make the floating label emulate the behavior of a standard input placeholder. However
324
- * the form field now supports both floating labels and placeholders. Therefore in the non-legacy
325
- * appearances the `never` option has been disabled in favor of just using the placeholder.
278
+ * Whether the outline gap needs to be calculated
279
+ * immediately on the next change detection run.
326
280
  */
327
- get floatLabel() {
328
- return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;
329
- }
330
- set floatLabel(value) {
331
- if (value !== this._floatLabel) {
332
- this._floatLabel = value || this._getDefaultFloatLabelState();
333
- this._changeDetectorRef.markForCheck();
334
- }
335
- }
336
- get _control() {
337
- // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.
338
- // We should clean this up once Ivy is the default renderer.
339
- return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;
340
- }
341
- set _control(value) {
342
- this._explicitFormFieldControl = value;
343
- }
344
- get _labelChild() {
345
- return this._labelChildNonStatic || this._labelChildStatic;
281
+ this._outlineGapCalculationNeededImmediately = false;
282
+ /** Whether the outline gap needs to be calculated next time the zone has stabilized. */
283
+ this._outlineGapCalculationNeededOnStable = false;
284
+ this._destroyed = new Subject();
285
+ /** Override for the logic that disables the label animation in certain cases. */
286
+ this._showAlwaysAnimate = false;
287
+ /** State of the mat-hint and mat-error animations. */
288
+ this._subscriptAnimationState = '';
289
+ this._hintLabel = '';
290
+ // Unique id for the hint label.
291
+ this._hintLabelId = `mat-hint-${nextUniqueId$2++}`;
292
+ // Unique id for the internal form field label.
293
+ this._labelId = `mat-form-field-label-${nextUniqueId$2++}`;
294
+ this._labelOptions = labelOptions ? labelOptions : {};
295
+ this.floatLabel = this._getDefaultFloatLabelState();
296
+ this._animationsEnabled = _animationMode !== 'NoopAnimations';
297
+ // Set the default through here so we invoke the setter on the first run.
298
+ this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';
299
+ this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?
300
+ _defaults.hideRequiredMarker : false;
301
+ }
302
+ /** The form-field appearance style. */
303
+ get appearance() { return this._appearance; }
304
+ set appearance(value) {
305
+ const oldValue = this._appearance;
306
+ this._appearance = value || (this._defaults && this._defaults.appearance) || 'legacy';
307
+ if (this._appearance === 'outline' && oldValue !== value) {
308
+ this._outlineGapCalculationNeededOnStable = true;
346
309
  }
347
- /**
348
- * Gets an ElementRef for the element that a overlay attached to the form-field should be
349
- * positioned relative to.
350
- */
351
- getConnectedOverlayOrigin() {
352
- return this._connectionContainerRef || this._elementRef;
310
+ }
311
+ /** Whether the required marker should be hidden. */
312
+ get hideRequiredMarker() { return this._hideRequiredMarker; }
313
+ set hideRequiredMarker(value) {
314
+ this._hideRequiredMarker = coerceBooleanProperty(value);
315
+ }
316
+ /** Whether the floating label should always float or not. */
317
+ get _shouldAlwaysFloat() {
318
+ return this.floatLabel === 'always' && !this._showAlwaysAnimate;
319
+ }
320
+ /** Whether the label can float or not. */
321
+ get _canLabelFloat() { return this.floatLabel !== 'never'; }
322
+ /** Text for the form field hint. */
323
+ get hintLabel() { return this._hintLabel; }
324
+ set hintLabel(value) {
325
+ this._hintLabel = value;
326
+ this._processHints();
327
+ }
328
+ /**
329
+ * Whether the label should always float, never float or float as the user types.
330
+ *
331
+ * Note: only the legacy appearance supports the `never` option. `never` was originally added as a
332
+ * way to make the floating label emulate the behavior of a standard input placeholder. However
333
+ * the form field now supports both floating labels and placeholders. Therefore in the non-legacy
334
+ * appearances the `never` option has been disabled in favor of just using the placeholder.
335
+ */
336
+ get floatLabel() {
337
+ return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;
338
+ }
339
+ set floatLabel(value) {
340
+ if (value !== this._floatLabel) {
341
+ this._floatLabel = value || this._getDefaultFloatLabelState();
342
+ this._changeDetectorRef.markForCheck();
353
343
  }
354
- ngAfterContentInit() {
355
- this._validateControlChild();
356
- const control = this._control;
357
- if (control.controlType) {
358
- this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);
359
- }
360
- // Subscribe to changes in the child control state in order to update the form field UI.
361
- control.stateChanges.pipe(startWith(null)).subscribe(() => {
362
- this._validatePlaceholders();
363
- this._syncDescribedByIds();
364
- this._changeDetectorRef.markForCheck();
365
- });
366
- // Run change detection if the value changes.
367
- if (control.ngControl && control.ngControl.valueChanges) {
368
- control.ngControl.valueChanges
369
- .pipe(takeUntil(this._destroyed))
370
- .subscribe(() => this._changeDetectorRef.markForCheck());
371
- }
372
- // Note that we have to run outside of the `NgZone` explicitly,
373
- // in order to avoid throwing users into an infinite loop
374
- // if `zone-patch-rxjs` is included.
375
- this._ngZone.runOutsideAngular(() => {
376
- this._ngZone.onStable.asObservable().pipe(takeUntil(this._destroyed)).subscribe(() => {
377
- if (this._outlineGapCalculationNeededOnStable) {
378
- this.updateOutlineGap();
379
- }
380
- });
381
- });
382
- // Run change detection and update the outline if the suffix or prefix changes.
383
- merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {
384
- this._outlineGapCalculationNeededOnStable = true;
385
- this._changeDetectorRef.markForCheck();
386
- });
387
- // Re-validate when the number of hints changes.
388
- this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {
389
- this._processHints();
390
- this._changeDetectorRef.markForCheck();
391
- });
392
- // Update the aria-described by when the number of errors changes.
393
- this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {
394
- this._syncDescribedByIds();
395
- this._changeDetectorRef.markForCheck();
344
+ }
345
+ get _control() {
346
+ // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.
347
+ // We should clean this up once Ivy is the default renderer.
348
+ return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;
349
+ }
350
+ set _control(value) {
351
+ this._explicitFormFieldControl = value;
352
+ }
353
+ get _labelChild() {
354
+ return this._labelChildNonStatic || this._labelChildStatic;
355
+ }
356
+ /**
357
+ * Gets an ElementRef for the element that a overlay attached to the form-field should be
358
+ * positioned relative to.
359
+ */
360
+ getConnectedOverlayOrigin() {
361
+ return this._connectionContainerRef || this._elementRef;
362
+ }
363
+ ngAfterContentInit() {
364
+ this._validateControlChild();
365
+ const control = this._control;
366
+ if (control.controlType) {
367
+ this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);
368
+ }
369
+ // Subscribe to changes in the child control state in order to update the form field UI.
370
+ control.stateChanges.pipe(startWith(null)).subscribe(() => {
371
+ this._validatePlaceholders();
372
+ this._syncDescribedByIds();
373
+ this._changeDetectorRef.markForCheck();
374
+ });
375
+ // Run change detection if the value changes.
376
+ if (control.ngControl && control.ngControl.valueChanges) {
377
+ control.ngControl.valueChanges
378
+ .pipe(takeUntil(this._destroyed))
379
+ .subscribe(() => this._changeDetectorRef.markForCheck());
380
+ }
381
+ // Note that we have to run outside of the `NgZone` explicitly,
382
+ // in order to avoid throwing users into an infinite loop
383
+ // if `zone-patch-rxjs` is included.
384
+ this._ngZone.runOutsideAngular(() => {
385
+ this._ngZone.onStable.asObservable().pipe(takeUntil(this._destroyed)).subscribe(() => {
386
+ if (this._outlineGapCalculationNeededOnStable) {
387
+ this.updateOutlineGap();
388
+ }
396
389
  });
397
- if (this._dir) {
398
- this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
399
- if (typeof requestAnimationFrame === 'function') {
400
- this._ngZone.runOutsideAngular(() => {
401
- requestAnimationFrame(() => this.updateOutlineGap());
402
- });
403
- }
404
- else {
405
- this.updateOutlineGap();
406
- }
407
- });
408
- }
409
- }
410
- ngAfterContentChecked() {
411
- this._validateControlChild();
412
- if (this._outlineGapCalculationNeededImmediately) {
413
- this.updateOutlineGap();
414
- }
415
- }
416
- ngAfterViewInit() {
417
- // Avoid animations on load.
418
- this._subscriptAnimationState = 'enter';
419
- this._changeDetectorRef.detectChanges();
420
- }
421
- ngOnDestroy() {
422
- this._destroyed.next();
423
- this._destroyed.complete();
424
- }
425
- /** Determines whether a class from the NgControl should be forwarded to the host element. */
426
- _shouldForward(prop) {
427
- const ngControl = this._control ? this._control.ngControl : null;
428
- return ngControl && ngControl[prop];
429
- }
430
- _hasPlaceholder() {
431
- return !!(this._control && this._control.placeholder || this._placeholderChild);
432
- }
433
- _hasLabel() {
434
- return !!this._labelChild;
435
- }
436
- _shouldLabelFloat() {
437
- return this._canLabelFloat && (this._control.shouldLabelFloat || this._shouldAlwaysFloat);
438
- }
439
- _hideControlPlaceholder() {
440
- // In the legacy appearance the placeholder is promoted to a label if no label is given.
441
- return this.appearance === 'legacy' && !this._hasLabel() ||
442
- this._hasLabel() && !this._shouldLabelFloat();
443
- }
444
- _hasFloatingLabel() {
445
- // In the legacy appearance the placeholder is promoted to a label if no label is given.
446
- return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();
447
- }
448
- /** Determines whether to display hints or errors. */
449
- _getDisplayedMessages() {
450
- return (this._errorChildren && this._errorChildren.length > 0 &&
451
- this._control.errorState) ? 'error' : 'hint';
452
- }
453
- /** Animates the placeholder up and locks it in position. */
454
- _animateAndLockLabel() {
455
- if (this._hasFloatingLabel() && this._canLabelFloat) {
456
- // If animations are disabled, we shouldn't go in here,
457
- // because the `transitionend` will never fire.
458
- if (this._animationsEnabled && this._label) {
459
- this._showAlwaysAnimate = true;
460
- fromEvent(this._label.nativeElement, 'transitionend').pipe(take(1)).subscribe(() => {
461
- this._showAlwaysAnimate = false;
390
+ });
391
+ // Run change detection and update the outline if the suffix or prefix changes.
392
+ merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {
393
+ this._outlineGapCalculationNeededOnStable = true;
394
+ this._changeDetectorRef.markForCheck();
395
+ });
396
+ // Re-validate when the number of hints changes.
397
+ this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {
398
+ this._processHints();
399
+ this._changeDetectorRef.markForCheck();
400
+ });
401
+ // Update the aria-described by when the number of errors changes.
402
+ this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {
403
+ this._syncDescribedByIds();
404
+ this._changeDetectorRef.markForCheck();
405
+ });
406
+ if (this._dir) {
407
+ this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
408
+ if (typeof requestAnimationFrame === 'function') {
409
+ this._ngZone.runOutsideAngular(() => {
410
+ requestAnimationFrame(() => this.updateOutlineGap());
462
411
  });
463
412
  }
464
- this.floatLabel = 'always';
465
- this._changeDetectorRef.markForCheck();
466
- }
467
- }
468
- /**
469
- * Ensure that there is only one placeholder (either `placeholder` attribute on the child control
470
- * or child element with the `mat-placeholder` directive).
471
- */
472
- _validatePlaceholders() {
473
- if (this._control.placeholder && this._placeholderChild) {
474
- throw getMatFormFieldPlaceholderConflictError();
475
- }
413
+ else {
414
+ this.updateOutlineGap();
415
+ }
416
+ });
476
417
  }
477
- /** Does any extra processing that is required when handling the hints. */
478
- _processHints() {
479
- this._validateHints();
480
- this._syncDescribedByIds();
418
+ }
419
+ ngAfterContentChecked() {
420
+ this._validateControlChild();
421
+ if (this._outlineGapCalculationNeededImmediately) {
422
+ this.updateOutlineGap();
481
423
  }
482
- /**
483
- * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
484
- * attribute being considered as `align="start"`.
485
- */
486
- _validateHints() {
487
- if (this._hintChildren) {
488
- let startHint;
489
- let endHint;
490
- this._hintChildren.forEach((hint) => {
491
- if (hint.align === 'start') {
492
- if (startHint || this.hintLabel) {
493
- throw getMatFormFieldDuplicatedHintError('start');
494
- }
495
- startHint = hint;
496
- }
497
- else if (hint.align === 'end') {
498
- if (endHint) {
499
- throw getMatFormFieldDuplicatedHintError('end');
500
- }
501
- endHint = hint;
502
- }
424
+ }
425
+ ngAfterViewInit() {
426
+ // Avoid animations on load.
427
+ this._subscriptAnimationState = 'enter';
428
+ this._changeDetectorRef.detectChanges();
429
+ }
430
+ ngOnDestroy() {
431
+ this._destroyed.next();
432
+ this._destroyed.complete();
433
+ }
434
+ /** Determines whether a class from the NgControl should be forwarded to the host element. */
435
+ _shouldForward(prop) {
436
+ const ngControl = this._control ? this._control.ngControl : null;
437
+ return ngControl && ngControl[prop];
438
+ }
439
+ _hasPlaceholder() {
440
+ return !!(this._control && this._control.placeholder || this._placeholderChild);
441
+ }
442
+ _hasLabel() {
443
+ return !!this._labelChild;
444
+ }
445
+ _shouldLabelFloat() {
446
+ return this._canLabelFloat &&
447
+ ((this._control && this._control.shouldLabelFloat) || this._shouldAlwaysFloat);
448
+ }
449
+ _hideControlPlaceholder() {
450
+ // In the legacy appearance the placeholder is promoted to a label if no label is given.
451
+ return this.appearance === 'legacy' && !this._hasLabel() ||
452
+ this._hasLabel() && !this._shouldLabelFloat();
453
+ }
454
+ _hasFloatingLabel() {
455
+ // In the legacy appearance the placeholder is promoted to a label if no label is given.
456
+ return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();
457
+ }
458
+ /** Determines whether to display hints or errors. */
459
+ _getDisplayedMessages() {
460
+ return (this._errorChildren && this._errorChildren.length > 0 &&
461
+ this._control.errorState) ? 'error' : 'hint';
462
+ }
463
+ /** Animates the placeholder up and locks it in position. */
464
+ _animateAndLockLabel() {
465
+ if (this._hasFloatingLabel() && this._canLabelFloat) {
466
+ // If animations are disabled, we shouldn't go in here,
467
+ // because the `transitionend` will never fire.
468
+ if (this._animationsEnabled && this._label) {
469
+ this._showAlwaysAnimate = true;
470
+ fromEvent(this._label.nativeElement, 'transitionend').pipe(take(1)).subscribe(() => {
471
+ this._showAlwaysAnimate = false;
503
472
  });
504
473
  }
474
+ this.floatLabel = 'always';
475
+ this._changeDetectorRef.markForCheck();
505
476
  }
506
- /** Gets the default float label state. */
507
- _getDefaultFloatLabelState() {
508
- return (this._defaults && this._defaults.floatLabel) || this._labelOptions.float || 'auto';
477
+ }
478
+ /**
479
+ * Ensure that there is only one placeholder (either `placeholder` attribute on the child control
480
+ * or child element with the `mat-placeholder` directive).
481
+ */
482
+ _validatePlaceholders() {
483
+ if (this._control.placeholder && this._placeholderChild) {
484
+ throw getMatFormFieldPlaceholderConflictError();
509
485
  }
510
- /**
511
- * Sets the list of element IDs that describe the child control. This allows the control to update
512
- * its `aria-describedby` attribute accordingly.
513
- */
514
- _syncDescribedByIds() {
515
- if (this._control) {
516
- let ids = [];
517
- if (this._getDisplayedMessages() === 'hint') {
518
- const startHint = this._hintChildren ?
519
- this._hintChildren.find(hint => hint.align === 'start') : null;
520
- const endHint = this._hintChildren ?
521
- this._hintChildren.find(hint => hint.align === 'end') : null;
522
- if (startHint) {
523
- ids.push(startHint.id);
524
- }
525
- else if (this._hintLabel) {
526
- ids.push(this._hintLabelId);
486
+ }
487
+ /** Does any extra processing that is required when handling the hints. */
488
+ _processHints() {
489
+ this._validateHints();
490
+ this._syncDescribedByIds();
491
+ }
492
+ /**
493
+ * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
494
+ * attribute being considered as `align="start"`.
495
+ */
496
+ _validateHints() {
497
+ if (this._hintChildren) {
498
+ let startHint;
499
+ let endHint;
500
+ this._hintChildren.forEach((hint) => {
501
+ if (hint.align === 'start') {
502
+ if (startHint || this.hintLabel) {
503
+ throw getMatFormFieldDuplicatedHintError('start');
527
504
  }
505
+ startHint = hint;
506
+ }
507
+ else if (hint.align === 'end') {
528
508
  if (endHint) {
529
- ids.push(endHint.id);
509
+ throw getMatFormFieldDuplicatedHintError('end');
530
510
  }
511
+ endHint = hint;
512
+ }
513
+ });
514
+ }
515
+ }
516
+ /** Gets the default float label state. */
517
+ _getDefaultFloatLabelState() {
518
+ return (this._defaults && this._defaults.floatLabel) || this._labelOptions.float || 'auto';
519
+ }
520
+ /**
521
+ * Sets the list of element IDs that describe the child control. This allows the control to update
522
+ * its `aria-describedby` attribute accordingly.
523
+ */
524
+ _syncDescribedByIds() {
525
+ if (this._control) {
526
+ let ids = [];
527
+ if (this._getDisplayedMessages() === 'hint') {
528
+ const startHint = this._hintChildren ?
529
+ this._hintChildren.find(hint => hint.align === 'start') : null;
530
+ const endHint = this._hintChildren ?
531
+ this._hintChildren.find(hint => hint.align === 'end') : null;
532
+ if (startHint) {
533
+ ids.push(startHint.id);
531
534
  }
532
- else if (this._errorChildren) {
533
- ids = this._errorChildren.map(error => error.id);
535
+ else if (this._hintLabel) {
536
+ ids.push(this._hintLabelId);
537
+ }
538
+ if (endHint) {
539
+ ids.push(endHint.id);
534
540
  }
535
- this._control.setDescribedByIds(ids);
536
541
  }
537
- }
538
- /** Throws an error if the form field's control is missing. */
539
- _validateControlChild() {
540
- if (!this._control) {
541
- throw getMatFormFieldMissingControlError();
542
+ else if (this._errorChildren) {
543
+ ids = this._errorChildren.map(error => error.id);
542
544
  }
545
+ this._control.setDescribedByIds(ids);
543
546
  }
544
- /**
545
- * Updates the width and position of the gap in the outline. Only relevant for the outline
546
- * appearance.
547
- */
548
- updateOutlineGap() {
549
- const labelEl = this._label ? this._label.nativeElement : null;
550
- if (this.appearance !== 'outline' || !labelEl || !labelEl.children.length ||
551
- !labelEl.textContent.trim()) {
552
- return;
553
- }
554
- if (!this._platform.isBrowser) {
555
- // getBoundingClientRect isn't available on the server.
556
- return;
557
- }
558
- // If the element is not present in the DOM, the outline gap will need to be calculated
559
- // the next time it is checked and in the DOM.
560
- if (!this._isAttachedToDOM()) {
561
- this._outlineGapCalculationNeededImmediately = true;
547
+ }
548
+ /** Throws an error if the form field's control is missing. */
549
+ _validateControlChild() {
550
+ if (!this._control) {
551
+ throw getMatFormFieldMissingControlError();
552
+ }
553
+ }
554
+ /**
555
+ * Updates the width and position of the gap in the outline. Only relevant for the outline
556
+ * appearance.
557
+ */
558
+ updateOutlineGap() {
559
+ const labelEl = this._label ? this._label.nativeElement : null;
560
+ if (this.appearance !== 'outline' || !labelEl || !labelEl.children.length ||
561
+ !labelEl.textContent.trim()) {
562
+ return;
563
+ }
564
+ if (!this._platform.isBrowser) {
565
+ // getBoundingClientRect isn't available on the server.
566
+ return;
567
+ }
568
+ // If the element is not present in the DOM, the outline gap will need to be calculated
569
+ // the next time it is checked and in the DOM.
570
+ if (!this._isAttachedToDOM()) {
571
+ this._outlineGapCalculationNeededImmediately = true;
572
+ return;
573
+ }
574
+ let startWidth = 0;
575
+ let gapWidth = 0;
576
+ const container = this._connectionContainerRef.nativeElement;
577
+ const startEls = container.querySelectorAll('.mat-form-field-outline-start');
578
+ const gapEls = container.querySelectorAll('.mat-form-field-outline-gap');
579
+ if (this._label && this._label.nativeElement.children.length) {
580
+ const containerRect = container.getBoundingClientRect();
581
+ // If the container's width and height are zero, it means that the element is
582
+ // invisible and we can't calculate the outline gap. Mark the element as needing
583
+ // to be checked the next time the zone stabilizes. We can't do this immediately
584
+ // on the next change detection, because even if the element becomes visible,
585
+ // the `ClientRect` won't be reclaculated immediately. We reset the
586
+ // `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.
587
+ if (containerRect.width === 0 && containerRect.height === 0) {
588
+ this._outlineGapCalculationNeededOnStable = true;
589
+ this._outlineGapCalculationNeededImmediately = false;
562
590
  return;
563
591
  }
564
- let startWidth = 0;
565
- let gapWidth = 0;
566
- const container = this._connectionContainerRef.nativeElement;
567
- const startEls = container.querySelectorAll('.mat-form-field-outline-start');
568
- const gapEls = container.querySelectorAll('.mat-form-field-outline-gap');
569
- if (this._label && this._label.nativeElement.children.length) {
570
- const containerRect = container.getBoundingClientRect();
571
- // If the container's width and height are zero, it means that the element is
572
- // invisible and we can't calculate the outline gap. Mark the element as needing
573
- // to be checked the next time the zone stabilizes. We can't do this immediately
574
- // on the next change detection, because even if the element becomes visible,
575
- // the `ClientRect` won't be reclaculated immediately. We reset the
576
- // `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.
577
- if (containerRect.width === 0 && containerRect.height === 0) {
578
- this._outlineGapCalculationNeededOnStable = true;
579
- this._outlineGapCalculationNeededImmediately = false;
580
- return;
581
- }
582
- const containerStart = this._getStartEnd(containerRect);
583
- const labelStart = this._getStartEnd(labelEl.children[0].getBoundingClientRect());
584
- let labelWidth = 0;
585
- for (const child of labelEl.children) {
586
- labelWidth += child.offsetWidth;
587
- }
588
- startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;
589
- gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;
590
- }
591
- for (let i = 0; i < startEls.length; i++) {
592
- startEls[i].style.width = `${startWidth}px`;
593
- }
594
- for (let i = 0; i < gapEls.length; i++) {
595
- gapEls[i].style.width = `${gapWidth}px`;
592
+ const containerStart = this._getStartEnd(containerRect);
593
+ const labelChildren = labelEl.children;
594
+ const labelStart = this._getStartEnd(labelChildren[0].getBoundingClientRect());
595
+ let labelWidth = 0;
596
+ for (let i = 0; i < labelChildren.length; i++) {
597
+ labelWidth += labelChildren[i].offsetWidth;
596
598
  }
597
- this._outlineGapCalculationNeededOnStable =
598
- this._outlineGapCalculationNeededImmediately = false;
599
+ startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;
600
+ gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;
599
601
  }
600
- /** Gets the start end of the rect considering the current directionality. */
601
- _getStartEnd(rect) {
602
- return (this._dir && this._dir.value === 'rtl') ? rect.right : rect.left;
602
+ for (let i = 0; i < startEls.length; i++) {
603
+ startEls[i].style.width = `${startWidth}px`;
603
604
  }
604
- /** Checks whether the form field is attached to the DOM. */
605
- _isAttachedToDOM() {
606
- const element = this._elementRef.nativeElement;
607
- if (element.getRootNode) {
608
- const rootNode = element.getRootNode();
609
- // If the element is inside the DOM the root node will be either the document
610
- // or the closest shadow root, otherwise it'll be the element itself.
611
- return rootNode && rootNode !== element;
612
- }
613
- // Otherwise fall back to checking if it's in the document. This doesn't account for
614
- // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.
615
- return document.documentElement.contains(element);
605
+ for (let i = 0; i < gapEls.length; i++) {
606
+ gapEls[i].style.width = `${gapWidth}px`;
616
607
  }
608
+ this._outlineGapCalculationNeededOnStable =
609
+ this._outlineGapCalculationNeededImmediately = false;
610
+ }
611
+ /** Gets the start end of the rect considering the current directionality. */
612
+ _getStartEnd(rect) {
613
+ return (this._dir && this._dir.value === 'rtl') ? rect.right : rect.left;
617
614
  }
618
- MatFormField.decorators = [
619
- { type: Component, args: [{
620
- selector: 'mat-form-field',
621
- exportAs: 'matFormField',
622
- template: "<div class=\"mat-form-field-wrapper\">\n <div class=\"mat-form-field-flex\" #connectionContainer\n (click)=\"_control.onContainerClick && _control.onContainerClick($event)\">\n\n <!-- Outline used for outline appearance. -->\n <ng-container *ngIf=\"appearance == 'outline'\">\n <div class=\"mat-form-field-outline\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n <div class=\"mat-form-field-outline mat-form-field-outline-thick\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n </ng-container>\n\n <div class=\"mat-form-field-prefix\" *ngIf=\"_prefixChildren.length\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-infix\" #inputContainer>\n <ng-content></ng-content>\n\n <span class=\"mat-form-field-label-wrapper\">\n <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't\n read if it comes before the control in the DOM. -->\n <label class=\"mat-form-field-label\"\n (cdkObserveContent)=\"updateOutlineGap()\"\n [cdkObserveContentDisabled]=\"appearance != 'outline'\"\n [id]=\"_labelId\"\n [attr.for]=\"_control.id\"\n [attr.aria-owns]=\"_control.id\"\n [class.mat-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-form-field-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"\n #label\n *ngIf=\"_hasFloatingLabel()\"\n [ngSwitch]=\"_hasLabel()\">\n\n <!-- @breaking-change 8.0.0 remove in favor of mat-label element an placeholder attr. -->\n <ng-container *ngSwitchCase=\"false\">\n <ng-content select=\"mat-placeholder\"></ng-content>\n <span>{{_control.placeholder}}</span>\n </ng-container>\n\n <ng-content select=\"mat-label\" *ngSwitchCase=\"true\"></ng-content>\n\n <!-- @breaking-change 8.0.0 remove `mat-placeholder-required` class -->\n <span\n class=\"mat-placeholder-required mat-form-field-required-marker\"\n aria-hidden=\"true\"\n *ngIf=\"!hideRequiredMarker && _control.required && !_control.disabled\">&#32;*</span>\n </label>\n </span>\n </div>\n\n <div class=\"mat-form-field-suffix\" *ngIf=\"_suffixChildren.length\">\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n <!-- Underline used for legacy, standard, and box appearances. -->\n <div class=\"mat-form-field-underline\" #underline\n *ngIf=\"appearance != 'outline'\">\n <span class=\"mat-form-field-ripple\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"></span>\n </div>\n\n <div class=\"mat-form-field-subscript-wrapper\"\n [ngSwitch]=\"_getDisplayedMessages()\">\n <div *ngSwitchCase=\"'error'\" [@transitionMessages]=\"_subscriptAnimationState\">\n <ng-content select=\"mat-error\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-hint-wrapper\" *ngSwitchCase=\"'hint'\"\n [@transitionMessages]=\"_subscriptAnimationState\">\n <!-- TODO(mmalerba): use an actual <mat-hint> once all selectors are switched to mat-* -->\n <div *ngIf=\"hintLabel\" [id]=\"_hintLabelId\" class=\"mat-hint\">{{hintLabel}}</div>\n <ng-content select=\"mat-hint:not([align='end'])\"></ng-content>\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n </div>\n</div>\n",
623
- animations: [matFormFieldAnimations.transitionMessages],
624
- host: {
625
- 'class': 'mat-form-field',
626
- '[class.mat-form-field-appearance-standard]': 'appearance == "standard"',
627
- '[class.mat-form-field-appearance-fill]': 'appearance == "fill"',
628
- '[class.mat-form-field-appearance-outline]': 'appearance == "outline"',
629
- '[class.mat-form-field-appearance-legacy]': 'appearance == "legacy"',
630
- '[class.mat-form-field-invalid]': '_control.errorState',
631
- '[class.mat-form-field-can-float]': '_canLabelFloat',
632
- '[class.mat-form-field-should-float]': '_shouldLabelFloat()',
633
- '[class.mat-form-field-has-label]': '_hasFloatingLabel()',
634
- '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',
635
- '[class.mat-form-field-disabled]': '_control.disabled',
636
- '[class.mat-form-field-autofilled]': '_control.autofilled',
637
- '[class.mat-focused]': '_control.focused',
638
- '[class.mat-accent]': 'color == "accent"',
639
- '[class.mat-warn]': 'color == "warn"',
640
- '[class.ng-untouched]': '_shouldForward("untouched")',
641
- '[class.ng-touched]': '_shouldForward("touched")',
642
- '[class.ng-pristine]': '_shouldForward("pristine")',
643
- '[class.ng-dirty]': '_shouldForward("dirty")',
644
- '[class.ng-valid]': '_shouldForward("valid")',
645
- '[class.ng-invalid]': '_shouldForward("invalid")',
646
- '[class.ng-pending]': '_shouldForward("pending")',
647
- '[class._mat-animation-noopable]': '!_animationsEnabled',
648
- },
649
- inputs: ['color'],
650
- encapsulation: ViewEncapsulation.None,
651
- changeDetection: ChangeDetectionStrategy.OnPush,
652
- providers: [
653
- { provide: MAT_FORM_FIELD, useExisting: MatFormField },
654
- ],
655
- styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
656
- },] }
657
- ];
658
- MatFormField.ctorParameters = () => [
659
- { type: ElementRef },
660
- { type: ChangeDetectorRef },
661
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }] },
662
- { type: Directionality, decorators: [{ type: Optional }] },
663
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }] },
664
- { type: Platform },
665
- { type: NgZone },
666
- { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
667
- ];
668
- MatFormField.propDecorators = {
669
- appearance: [{ type: Input }],
670
- hideRequiredMarker: [{ type: Input }],
671
- hintLabel: [{ type: Input }],
672
- floatLabel: [{ type: Input }],
673
- underlineRef: [{ type: ViewChild, args: ['underline',] }],
674
- _connectionContainerRef: [{ type: ViewChild, args: ['connectionContainer', { static: true },] }],
675
- _inputContainerRef: [{ type: ViewChild, args: ['inputContainer',] }],
676
- _label: [{ type: ViewChild, args: ['label',] }],
677
- _controlNonStatic: [{ type: ContentChild, args: [MatFormFieldControl,] }],
678
- _controlStatic: [{ type: ContentChild, args: [MatFormFieldControl, { static: true },] }],
679
- _labelChildNonStatic: [{ type: ContentChild, args: [MatLabel,] }],
680
- _labelChildStatic: [{ type: ContentChild, args: [MatLabel, { static: true },] }],
681
- _placeholderChild: [{ type: ContentChild, args: [MatPlaceholder,] }],
682
- _errorChildren: [{ type: ContentChildren, args: [MatError, { descendants: true },] }],
683
- _hintChildren: [{ type: ContentChildren, args: [MatHint, { descendants: true },] }],
684
- _prefixChildren: [{ type: ContentChildren, args: [MatPrefix, { descendants: true },] }],
685
- _suffixChildren: [{ type: ContentChildren, args: [MatSuffix, { descendants: true },] }]
686
- };
687
- return MatFormField;
688
- })();
615
+ /** Checks whether the form field is attached to the DOM. */
616
+ _isAttachedToDOM() {
617
+ const element = this._elementRef.nativeElement;
618
+ if (element.getRootNode) {
619
+ const rootNode = element.getRootNode();
620
+ // If the element is inside the DOM the root node will be either the document
621
+ // or the closest shadow root, otherwise it'll be the element itself.
622
+ return rootNode && rootNode !== element;
623
+ }
624
+ // Otherwise fall back to checking if it's in the document. This doesn't account for
625
+ // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.
626
+ return document.documentElement.contains(element);
627
+ }
628
+ }
629
+ MatFormField.decorators = [
630
+ { type: Component, args: [{
631
+ selector: 'mat-form-field',
632
+ exportAs: 'matFormField',
633
+ template: "<div class=\"mat-form-field-wrapper\">\n <div class=\"mat-form-field-flex\" #connectionContainer\n (click)=\"_control.onContainerClick && _control.onContainerClick($event)\">\n\n <!-- Outline used for outline appearance. -->\n <ng-container *ngIf=\"appearance == 'outline'\">\n <div class=\"mat-form-field-outline\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n <div class=\"mat-form-field-outline mat-form-field-outline-thick\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n </ng-container>\n\n <div class=\"mat-form-field-prefix\" *ngIf=\"_prefixChildren.length\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-infix\" #inputContainer>\n <ng-content></ng-content>\n\n <span class=\"mat-form-field-label-wrapper\">\n <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't\n read if it comes before the control in the DOM. -->\n <label class=\"mat-form-field-label\"\n (cdkObserveContent)=\"updateOutlineGap()\"\n [cdkObserveContentDisabled]=\"appearance != 'outline'\"\n [id]=\"_labelId\"\n [attr.for]=\"_control.id\"\n [attr.aria-owns]=\"_control.id\"\n [class.mat-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-form-field-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"\n #label\n *ngIf=\"_hasFloatingLabel()\"\n [ngSwitch]=\"_hasLabel()\">\n\n <!-- @breaking-change 8.0.0 remove in favor of mat-label element an placeholder attr. -->\n <ng-container *ngSwitchCase=\"false\">\n <ng-content select=\"mat-placeholder\"></ng-content>\n <span>{{_control.placeholder}}</span>\n </ng-container>\n\n <ng-content select=\"mat-label\" *ngSwitchCase=\"true\"></ng-content>\n\n <!-- @breaking-change 8.0.0 remove `mat-placeholder-required` class -->\n <span\n class=\"mat-placeholder-required mat-form-field-required-marker\"\n aria-hidden=\"true\"\n *ngIf=\"!hideRequiredMarker && _control.required && !_control.disabled\">&#32;*</span>\n </label>\n </span>\n </div>\n\n <div class=\"mat-form-field-suffix\" *ngIf=\"_suffixChildren.length\">\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n <!-- Underline used for legacy, standard, and box appearances. -->\n <div class=\"mat-form-field-underline\" #underline\n *ngIf=\"appearance != 'outline'\">\n <span class=\"mat-form-field-ripple\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"></span>\n </div>\n\n <div class=\"mat-form-field-subscript-wrapper\"\n [ngSwitch]=\"_getDisplayedMessages()\">\n <div *ngSwitchCase=\"'error'\" [@transitionMessages]=\"_subscriptAnimationState\">\n <ng-content select=\"mat-error\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-hint-wrapper\" *ngSwitchCase=\"'hint'\"\n [@transitionMessages]=\"_subscriptAnimationState\">\n <!-- TODO(mmalerba): use an actual <mat-hint> once all selectors are switched to mat-* -->\n <div *ngIf=\"hintLabel\" [id]=\"_hintLabelId\" class=\"mat-hint\">{{hintLabel}}</div>\n <ng-content select=\"mat-hint:not([align='end'])\"></ng-content>\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n </div>\n</div>\n",
634
+ animations: [matFormFieldAnimations.transitionMessages],
635
+ host: {
636
+ 'class': 'mat-form-field',
637
+ '[class.mat-form-field-appearance-standard]': 'appearance == "standard"',
638
+ '[class.mat-form-field-appearance-fill]': 'appearance == "fill"',
639
+ '[class.mat-form-field-appearance-outline]': 'appearance == "outline"',
640
+ '[class.mat-form-field-appearance-legacy]': 'appearance == "legacy"',
641
+ '[class.mat-form-field-invalid]': '_control.errorState',
642
+ '[class.mat-form-field-can-float]': '_canLabelFloat',
643
+ '[class.mat-form-field-should-float]': '_shouldLabelFloat()',
644
+ '[class.mat-form-field-has-label]': '_hasFloatingLabel()',
645
+ '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',
646
+ '[class.mat-form-field-disabled]': '_control.disabled',
647
+ '[class.mat-form-field-autofilled]': '_control.autofilled',
648
+ '[class.mat-focused]': '_control.focused',
649
+ '[class.mat-accent]': 'color == "accent"',
650
+ '[class.mat-warn]': 'color == "warn"',
651
+ '[class.ng-untouched]': '_shouldForward("untouched")',
652
+ '[class.ng-touched]': '_shouldForward("touched")',
653
+ '[class.ng-pristine]': '_shouldForward("pristine")',
654
+ '[class.ng-dirty]': '_shouldForward("dirty")',
655
+ '[class.ng-valid]': '_shouldForward("valid")',
656
+ '[class.ng-invalid]': '_shouldForward("invalid")',
657
+ '[class.ng-pending]': '_shouldForward("pending")',
658
+ '[class._mat-animation-noopable]': '!_animationsEnabled',
659
+ },
660
+ inputs: ['color'],
661
+ encapsulation: ViewEncapsulation.None,
662
+ changeDetection: ChangeDetectionStrategy.OnPush,
663
+ providers: [
664
+ { provide: MAT_FORM_FIELD, useExisting: MatFormField },
665
+ ],
666
+ styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
667
+ },] }
668
+ ];
669
+ MatFormField.ctorParameters = () => [
670
+ { type: ElementRef },
671
+ { type: ChangeDetectorRef },
672
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }] },
673
+ { type: Directionality, decorators: [{ type: Optional }] },
674
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }] },
675
+ { type: Platform },
676
+ { type: NgZone },
677
+ { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
678
+ ];
679
+ MatFormField.propDecorators = {
680
+ appearance: [{ type: Input }],
681
+ hideRequiredMarker: [{ type: Input }],
682
+ hintLabel: [{ type: Input }],
683
+ floatLabel: [{ type: Input }],
684
+ underlineRef: [{ type: ViewChild, args: ['underline',] }],
685
+ _connectionContainerRef: [{ type: ViewChild, args: ['connectionContainer', { static: true },] }],
686
+ _inputContainerRef: [{ type: ViewChild, args: ['inputContainer',] }],
687
+ _label: [{ type: ViewChild, args: ['label',] }],
688
+ _controlNonStatic: [{ type: ContentChild, args: [MatFormFieldControl,] }],
689
+ _controlStatic: [{ type: ContentChild, args: [MatFormFieldControl, { static: true },] }],
690
+ _labelChildNonStatic: [{ type: ContentChild, args: [MatLabel,] }],
691
+ _labelChildStatic: [{ type: ContentChild, args: [MatLabel, { static: true },] }],
692
+ _placeholderChild: [{ type: ContentChild, args: [MatPlaceholder,] }],
693
+ _errorChildren: [{ type: ContentChildren, args: [MAT_ERROR, { descendants: true },] }],
694
+ _hintChildren: [{ type: ContentChildren, args: [_MAT_HINT, { descendants: true },] }],
695
+ _prefixChildren: [{ type: ContentChildren, args: [MAT_PREFIX, { descendants: true },] }],
696
+ _suffixChildren: [{ type: ContentChildren, args: [MAT_SUFFIX, { descendants: true },] }]
697
+ };
689
698
 
690
699
  /**
691
700
  * @license
@@ -694,39 +703,36 @@ let MatFormField = /** @class */ (() => {
694
703
  * Use of this source code is governed by an MIT-style license that can be
695
704
  * found in the LICENSE file at https://angular.io/license
696
705
  */
697
- let MatFormFieldModule = /** @class */ (() => {
698
- class MatFormFieldModule {
699
- }
700
- MatFormFieldModule.decorators = [
701
- { type: NgModule, args: [{
702
- declarations: [
703
- MatError,
704
- MatFormField,
705
- MatHint,
706
- MatLabel,
707
- MatPlaceholder,
708
- MatPrefix,
709
- MatSuffix,
710
- ],
711
- imports: [
712
- CommonModule,
713
- MatCommonModule,
714
- ObserversModule,
715
- ],
716
- exports: [
717
- MatCommonModule,
718
- MatError,
719
- MatFormField,
720
- MatHint,
721
- MatLabel,
722
- MatPlaceholder,
723
- MatPrefix,
724
- MatSuffix,
725
- ],
726
- },] }
727
- ];
728
- return MatFormFieldModule;
729
- })();
706
+ class MatFormFieldModule {
707
+ }
708
+ MatFormFieldModule.decorators = [
709
+ { type: NgModule, args: [{
710
+ declarations: [
711
+ MatError,
712
+ MatFormField,
713
+ MatHint,
714
+ MatLabel,
715
+ MatPlaceholder,
716
+ MatPrefix,
717
+ MatSuffix,
718
+ ],
719
+ imports: [
720
+ CommonModule,
721
+ MatCommonModule,
722
+ ObserversModule,
723
+ ],
724
+ exports: [
725
+ MatCommonModule,
726
+ MatError,
727
+ MatFormField,
728
+ MatHint,
729
+ MatLabel,
730
+ MatPlaceholder,
731
+ MatPrefix,
732
+ MatSuffix,
733
+ ],
734
+ },] }
735
+ ];
730
736
 
731
737
  /**
732
738
  * @license
@@ -740,5 +746,5 @@ let MatFormFieldModule = /** @class */ (() => {
740
746
  * Generated bundle index. Do not edit.
741
747
  */
742
748
 
743
- export { MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };
749
+ export { MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, _MAT_HINT, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };
744
750
  //# sourceMappingURL=form-field.js.map